This file contains 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 doStuff = function() { | |
// do some awesome stuff | |
}; | |
setInterval(doStuff, 100); |
This file contains 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 doStuffLoop = function() { | |
doStuff(); | |
setTimeout(doStuffLoop, 100); | |
}; | |
doStuffLoop(); |
This file contains 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 isDoingStuff = false, | |
possiblyDoStuff = function() { | |
if (!isDoingStuff) { | |
isDoingStuff = true; | |
doStuff(); | |
isDoingStuff = false; | |
} | |
}; |
This file contains 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
using (Browser browser = new IE("http://www.google.com")) | |
{ | |
browser.TextField(Find.ByName("q")).TypeText("watin"); | |
browser.Button(Find.ByName("btnG")).Click(); | |
Assert.IsTrue(browser.ContainsText("WatiN Home")); | |
} |
This file contains 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 gistPrefix = 'http://gist.github.com/', | |
cachedWrite = document.write, | |
body = $('body'), | |
gists = $('p.gist').map(function(n, p) { | |
p = $(p); | |
var a = $('a', p), | |
href = a.attr('href'); | |
if (a.length && href.indexOf(gistPrefix) == 0) { |
This file contains 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 z="http://gist.github.com/",y=document.write,x=$("body"),w=$("p.gist").map(function(b,a){a=$(a);var c=$("a",a),u=c.attr("href");if(c.length&&u.indexOf(z)==0)return{p:a,id:u.substring(z.length)}}).get(),v=function(){if(w.length==0)document.write=y;else{var b=w.shift();document.write=function(){document.write=function(a){b.p.replaceWith(a);v()}};x.append('<scr'+'ipt src="'+z+b.id+'.js"></scr'+'ipt>')}};v(); |
This file contains 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 gistPrefix = 'http://gist.github.com/', | |
// Cache document.write so that it can be restored once all Gists have been | |
// embedded. | |
cachedWrite = document.write, | |
body = $('body'), | |
// Map each p.gist to an object that contains the paragraph to be replaced | |
// and the Gist's identifier. | |
gists = $('p.gist').map(function(n, p) { | |
p = $(p); |
This file contains 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 message = 'Hello!'; | |
(function() { | |
var message = 'Hi!'; | |
alert(message); | |
})(); |
This file contains 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 message = 'Hello!'; | |
(function() { | |
alert(message); | |
var message = 'Hi!'; | |
})(); |
This file contains 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 message = 'Hello!'; | |
(function () { | |
var message; | |
alert(message); | |
message = 'Hi!'; | |
})(); |
OlderNewer