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 armory = { | |
swords: [ | |
"Broadsword", | |
"Claymore", | |
"Scimitar" | |
], | |
addSword: function(sword) { | |
this.swords = this.swords || []; | |
this.swords.push(sword); | |
}, |
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 Knight(name, regiment) { | |
this.name = name; | |
this.regiment = regiment; | |
switch(regiment) { | |
case 1: | |
this.weapon = "Broadsword"; | |
break; | |
case 2: | |
this.weapon = "Claymore"; |
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
//noprotect | |
function SpeedTest(testImplement, testPrams, repetitions) { | |
this.testImplement = testImplement; | |
this.testPrams = testPrams; | |
this.repetitions = repetitions || 10000; | |
this.average = 0; | |
} | |
SpeedTest.prototype = { |
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
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<meta name="twitter:card" content="summary"> | |
<meta name="twitter:site" content=""> | |
<meta name="twitter:creator" content=""> | |
<meta name="twitter:title" content=""> | |
<meta name="twitter:description" content=""> | |
<meta name="og:title" content=""> |
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
//noprotect | |
function SignalFire(ID, startingLogs) { | |
this.fireID = ID; | |
this.logsLeft = startingLogs; | |
} | |
SignalFire.prototype = { | |
addLogs: function(numLogs) { | |
this.logsLeft += numLogs; |
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> | |
<meta name="description" content="JavaScript DocumentFragment" /> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<h1>Knights of the Week !</h1> |
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() { | |
$.hello = function() { | |
alert("Hello there!"); | |
}; | |
})(jQuery); | |
$.hello(); |
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://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<meta name="description" content="jQuery Plugin" /> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.example { | |
width: 50px; |
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
/* Portrait */ | |
@media screen and (orientation:portrait) { | |
/* Portrait styles */ | |
} | |
/* Landscape */ | |
@media screen and (orientation:landscape) { | |
/* Landscape styles */ | |
} |
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
public function findByUsername($username) { | |
return User::with('statuses' => function($query) { | |
$query->latest(); | |
})->whereUsername($username)->first(); | |
} |