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
dojo.provide("stdlib.command.MapControllersCommand"); | |
dojo.require("mojo.command.Command"); | |
dojo.declare("stdlib.command.MapControllersCommand", mojo.command.Command, { | |
execute: function(requestObj) { | |
var contextObj = null; | |
if(requestObj.getParams()) { | |
// parameters: contextObj: String or HTMLElement |
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
<div id="map_canvas" style="width: 400px; height: 600px"></div> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
// load the data | |
$.getScript('js/store.js', function() { | |
//this gets invoked after store.js loads | |
var myLatlng = new google.maps.LatLng(65.000, 16.500 ); | |
var myOptions = { |
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
(function( $ ){ | |
$.fn.bovan = function() { | |
console.log("hello, this is: ", this); | |
}; | |
})( jQuery ); | |
$(document).ready(function() { |
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 data = $(document.body).data('trafikk'); | |
$(data).each(function(index, value){ | |
// filter function | |
$(data[index].ActualCounties).each(function(i, county){ | |
// if road is in more than 1 county, iterate | |
if(!$.isArray(county.String )) county.String = [count.String]; | |
data[index].include = (filter.indexOf(county.String.join()) < 0) ? false: true; |
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 express = require('express') | |
var app = express.createServer(); | |
var contentHash = {'sha1:content' : 'your mom'}; | |
app.configure(function() { | |
app.use(express.methodOverride()) | |
app.use(express.bodyDecoder()) | |
app.use(app.router) | |
}); |
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
//this is very dirty | |
(condition) ? function() { | |
//o yes! | |
}() : function() { | |
//o noes! | |
}(); |
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
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA | |
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO | |
9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" /> |
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
class Animal | |
talk: (value) -> console.log value |
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 Animal; | |
Animal = (function() { | |
function Animal() {} | |
Animal.prototype.talk = function(value) { | |
return console.log(value); | |
}; | |
return Animal; | |
})(); |
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
when("a user lands on the page") | |
.it("should always have the correct title", function() { | |
}) | |
.it("should always have ten items in the Top 10 Benchmarks carousel", function() { | |
}) | |
.it("should always have three tabs in the hero carousel", function() { | |