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 recurse = function(depth){ | |
try{ | |
return recurse(depth + 1); | |
}catch(ex){ | |
return depth; | |
} | |
}; | |
console.log(recurse(1)); |
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 = 'Spoon!'; | |
$('#foo').bind('click', {msg: message}, function(event) { | |
alert(event.data.msg); | |
}); | |
message = 'Not in the face!'; | |
$('#bar').bind('click', {msg: message}, function(event) { | |
alert(event.data.msg); | |
}); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
<script src="http://ajax.cdnjs.com/ajax/libs/modernizr/1.7/modernizr-1.7.min.js"></script> | |
<style>header{height:100px}</style> | |
</head> | |
<body> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
<script src="http://ajax.cdnjs.com/ajax/libs/modernizr/1.7/modernizr-1.7.min.js"></script> | |
<style>header{height:100px}</style> | |
</head> | |
<body> |
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
// 1: how could you rewrite the following to make it shorter? | |
if (foo) { | |
bar.doSomething(el); | |
} else { | |
bar.doSomethingElse(el); | |
} | |
bar[foo?'doSomething':'doSomethingElse'](el); | |
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.center = function () { | |
return this.each(function () { | |
var top = ($(window).height() - $(this).outerHeight()) / 2; | |
var left = ($(window).width() - $(this).outerWidth()) / 2; | |
$(this).css({ | |
position: 'absolute', | |
margin: 0, | |
top: (top > 0 ? top : 0) + 'px', | |
left: (left > 0 ? left : 0) + 'px' |
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
/*! | |
* jQuery.preloadImg | |
* description: cache images via $.preloadImg(['src','src']) or $('img').preloadImg() | |
* author: Cody Lindley | |
*/ | |
(function($) { | |
$.preloadImg = function() { | |
$.preloadImg.runLoader(arguments[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
/*recent orders*/ | |
before(function(context) { | |
var email = context.store.get('email'); | |
if(email) { | |
var foo = context.cache(); | |
console.log(foo.recentOrders); | |
if(foo.recentOrders){ | |
context.partial('templates/previous_orders/recent.mustache', PreviousOrdersView(context.cache().recentOrders), function(html) { |
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
As the video says, I think your position on the matter is intellectually dishonest. The very origins of the word | |
atheism makes a positive assertion "without gods". Does Hitchens follow your line of reasoning? From what I know | |
of his book, its not a single sentence (or more) requesting proof. | |
Like I've stated, the burden of proof in this case are on both parties because both an atheist and a christian | |
are making claims. Trivial wordings aside. We should set this proof thing aside. I think we agree in theory | |
that if you assert you have a burden of proof requirement. | |
Here a few more comments: |