This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void btnLoad_Click(object sender, RoutedEventArgs e) | |
{ | |
// Display select file dialog | |
OpenFileDialog op = new OpenFileDialog(); | |
op.Title = "Select a picture"; | |
op.Filter = "All supported graphics|*.jpg;*.jpeg;*.png|" + | |
"JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|" + | |
"Portable Network Graphic (*.png)|*.png"; | |
if (op.ShowDialog() == true) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Remove the IE default clear button and password reveal button */ | |
*::-ms-clear, *::-ms-reveal { | |
display: none; | |
} | |
/* Fix fieldsets and icons with align top */ | |
/* Sebastian Tomescu */ | |
.x-ie .x-dock-vertical.x-stretched > .x-dock-body, | |
.x-ie .x-iconalign-top.x-button{ | |
height: auto !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function validateEmail(email) { | |
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
return re.test(email); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Timestamps = [ | |
{ start: 1360454400000, end: 1360540800000 }, | |
{ start: 1360454400000, end: 1360574700000 }, | |
{ start: 1372668447947, end: 1372668447947 }] | |
var timeOverlaps = function (Timestamps) { | |
for (var i = 0; i < Timestamps.length; i++) { | |
for (var j = i + 1; j < Timestamps.length; j++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date.prototype.getWeek = function () { | |
var onejan = new Date(this.getFullYear(), 0, 1); | |
return Math.ceil((((this - onejan) / 86400000) + onejan.getDay() + 1) / 7); | |
}; | |
var myDate = new Date("2001-02-02"); | |
myDate.getWeek(); //=> 5 |