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 map = ["string", "string2"] | |
$.each(map, function(key, value) { | |
alert(key + ': ' + 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
#model for drinks | |
belongs_to :person |
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
<html> | |
<head> | |
<style> | |
#benson { overflow: hidden; } | |
#benson select { float: left; margin: 0px 10px; } | |
</style> | |
</head> |
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 pseudo code, so you'll probably need to fix it. | |
def index | |
#@tabs = []; | |
#@articles.each do |article| | |
# @tags << article.tags | |
#end | |
@tabs = [ |
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
controller :sites do | |
match '/:action' | |
end |
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
<script> | |
function WriteToTheConsole(information) { | |
console.log(information); | |
} | |
$(document).ready(function() { | |
WriteToTheConsole("hey jackass"); | |
}); |
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
<form id="new_size"> | |
<input type="text" name="size_name" id="size_input" /> | |
<input type="submit" /> | |
</form> | |
<script> | |
$(document).ready(function() { | |
$("#new_size").submit(function(evt) { |
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
<script> | |
// this is a function that you're going to pass a messageCode to. | |
// the message code will be an integer and you'll return a string | |
// that is the error message. | |
function getErrorMessage(messageCode) | |
{ | |
var errorMessage = ""; | |
// start the switch statement |
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
<script> | |
// this is a function that you're going to pass a messageCode to. | |
// the message code will be an integer and you'll return a string | |
// that is the error message. | |
function getErrorMessage(messageCode) | |
{ | |
var errorMessage = ""; | |
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
<?php | |
$action = $_GET['action']; | |
API::process_action($action); | |
?> | |
<?php | |
class API { |