This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<META name="y_key" content="cad3f627043ad8fe"> | |
<meta name="msvalidate.01" content="03698D8D9E3442108B1FE6E16A8E19EF" /> | |
<meta name="google-site-verification" content="qFvIH3xt2gnvFYHZr2ZaSLSAL2TbRmPKpnmJAHMT-_I" /> | |
<meta name="keywords" content="<%= @meta_keywords || "web, design, development, applications, apps, deployment, hosting, marketing, Warsaw, Indiana, South Bend, Fort Wayne, Winona Lake" %>" /> | |
<meta name="description" content="<%= @meta_description || "Disruptive Ventures builds disruptive businesses." %>" /> | |
<title><%= @page_title || "Disruptive Ventures, Inc." %></title> |
This file contains hidden or 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 the "layout" for the whole site --> | |
<!-- the container. should have a width and margin: 0px auto; --> | |
<div id="container"> | |
<div id="header"> header </div> | |
<!-- this has the faux columns. bg:url(bg-image.png), overflow: hidden, etc --> | |
<!-- has a width ( col1 width + col1 padding + col2 width + col2 padding --> | |
<div id="main"> |
This file contains hidden or 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 pirates = ["pirate1", "pirate2", "pirate3", "pirate4", "pirate5"]; | |
var distanceToGo = 20; | |
var newPirates = true; | |
var getMorePirates = function(pirates) { | |
pirates.push( | |
"pirate" + | |
(pirates.length+1) | |
); | |
console.log("we've ordered some new pirates!"); |
This file contains hidden or 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
puts 'Hello. What year would you like to begin with?' | |
@alpha_year = gets.chomp | |
puts 'What year would you like to end with?' | |
@omega_year = gets.chomp | |
while(@alpha_year <= @omega_year) | |
puts @alpha_year | |
puts @alpha_year%4 | |
This file contains hidden or 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 startYear = 2000; | |
var endYear = 2020; | |
while(startYear <= endYear) | |
{ | |
if(startYear%4 == 0 && (startYear%100 != 0 && startYear%400 != 0)) | |
{ | |
console.log(startYear); | |
} | |
startYear++ |
This file contains hidden or 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
# If you put in a beginning year and an end year, it should spit out a list of | |
# all of the leap years in between. | |
puts 'Hello. What year would you like to begin with?' | |
@start_year=gets.chomp | |
puts 'What year would you like to end with?' | |
@end_year=gets.chomp | |
input='' | |
while @start_year < @end_year |