Skip to content

Instantly share code, notes, and snippets.

fns = [];
_ref = ["A", "B", "C"];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
ch = _ref[_i];
fns.push(function() {
return console.log(ch);
});
}
for (_j = 0, _len2 = fns.length; _j < _len2; _j++) {
f = fns[_j];
fns = []
for ch in ["A", "B", "C"]
fns.push -> console.log ch
for f in fns
f()
$ ->
localStorage.clear()
googleSpreadsheet = new GoogleSpreadsheet()
googleSpreadsheet.url "0AkHpzadx2wordERkOGROYlpNNkJhVkFrQWpWR0VMYUE"
googleSpreadsheet.load (result) ->
ConferenceSpreadsheetParser.parse result.cells, (conferences) ->
map = new google.maps.Map $("#map-canvas")[0],
zoom: 1
mapTypeId: google.maps.MapTypeId.ROADMAP
map.setCenter new google.maps.LatLng(0, 0)
$("#slider-range").slider({
range: true,
min: 0,
max: 20,
values: [5, 11],
slide: function(_, ui) {
return console.log("" + ui.values[0] + " to " + ui.values[1]);
}
});
$("#slider-range").slider
range: true
min: 0
max: 20
values: [5, 11]
slide: (_, ui) -> console.log "#{ui.values[0]} to #{ui.values[1]}"
$(function() {
var map;
map = new google.maps.Map($("#map-canvas")[0], {
zoom: 1,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
map.setCenter(new google.maps.LatLng(0, 0));
return new google.maps.Marker({
position: new google.maps.LatLng(56, 12),
map: map
$ ->
map = new google.maps.Map $("#map-canvas")[0],
zoom: 1
mapTypeId: google.maps.MapTypeId.ROADMAP
map.setCenter new google.maps.LatLng(0, 0)
new google.maps.Marker
position: new google.maps.LatLng 56, 12
map: map
<html>
<head>
<title>Using Google maps for showing custom points</title>
<link href="style.css" rel="stylesheet" type="text/css">
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/start/jquery-ui.css"
type="text/css" rel="stylesheet">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
{
'A1': 'YOW! Melbourne'
'B1': '1500'
'C1': 'Melbourne, Australia'
'A2': 'GOTO Aarhus'
'B2': '1700'
'C2': 'Aarhus, Denmark'
}
$("#slider-range").slider
range: true
min: 0
max: 20
values: [5, 11]
slide: (_, ui) -> console.log ui.values[0] + ", " + ui.values[1]