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 coffeescriptCompiler = new CoffeeScriptCompiler(new ScriptReader(), new TempScriptWriter()); | |
string s = coffeescriptCompiler.EvaluateScript(@"# Objects: | |
math = | |
root: Math.sqrt, square: square | |
cube: (x) -> x * square x"); | |
Console.WriteLine(s); | |
Console.ReadLine(); |
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
public static void Main(string[] args) | |
{ | |
Model.PlacementList allPlacements = Model.PlacementList.GetAll(); | |
foreach (Model.Placement p in allPlacements) | |
{ | |
if (p.CanBeTacitRenewed()) | |
{ | |
Model.GripTPrincipal principal = GripTPrincipal.ForUserId(p.PlacementAST.GetPrimaryContact()); | |
p.PerformTacitRenewal(); |
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 loadCss(url) { | |
var link = document.createElement("link"); | |
link.type = "text/css"; | |
link.rel = "stylesheet"; | |
link.href = url; | |
document.getElementsByTagName("head")[0].appendChild(link); | |
} |
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
<script type="text/javascript"> | |
if(!Modernizr.borderradius){ | |
require(["scripts/jquery-corners.js"], function(){ | |
$(".borderradius").roundedcorners(); | |
}); | |
} | |
</script> |
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
<script type="text/javascript"> | |
if(!Modernizr.borderradius){ | |
$(".borderradius").roundedcorners(); | |
} | |
</script> |
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
$("#somelement").bind("click", function(){ | |
// this element was clicked | |
}); |
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
$("#somelement").bind("outsideclick", function(){ | |
// some other element was clicked | |
}); |
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
$("#somelement").bind("click", function(){ | |
if($("#dialog").is(":visible")){ | |
$("#dialog").hide(); | |
} | |
// perform function | |
}); |
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
<h1>ToDo List</h1> | |
<form id="new-task-form" action="\"> | |
<p> | |
<label for="task">Task:</label> | |
<input type="text" id="task" name="task"/> | |
</p> | |
<p> | |
<label for="note">Note:</label> | |
<textarea id="note" name="note" rows="5" cols="30"></textarea> | |
</p> |
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 model = {}, // empty model object | |
list = $("#todo-list"), | |
form = $('#new-task-form'), | |
addBtn = $("#add"), | |
saveBtn = $("#save"); | |
// link ui to model | |
form.link(model); | |
// handle onclick |
OlderNewer