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
# Program to find the probability that n people all have different birthdays | |
class ::Fixnum | |
def factorial | |
result = self | |
self.times do |n| | |
result *= (self - n) if not n == 0 | |
end | |
result | |
end |
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<meta name="description" content="site description here" /> | |
<title>ctrl+reset</title> | |
<link rel="stylesheet/less" type="text/css" href="styles.less"> | |
<script src="less.js" type="text/javascript"></script> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
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 answer = Math.floor(Math.random()*11); | |
var guesscount = 0; | |
while (guess != answer) { | |
var guess = Number(prompt("Guess what number I'm thinking of.")); | |
var guesscount = guesscount + 1; | |
if (guess > answer){ alert("Too high!"); } | |
else if (guess < answer){ alert("Too low!"); } | |
else { alert("You guessed it! Only took you " + guesscount + " guesses."); } | |
} |
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
a:active { | |
position: relative; | |
top: 3px; | |
} |
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
# Make the project folder | |
Dir.mkdir("New_Project") | |
# Navigate to the project folder | |
Dir.chdir("New_Project") | |
# Make the index.html file | |
File.new("index.html", "w+") | |
# Make the internal project folders |
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
num = 100 | |
while num >= 1 | |
num = num - 1 | |
puts num.to_s + ' bottles of beer on the wall, ' + num.to_s + ' bottles of beer! Take one down, pass it around, ' + (num - 1).to_s + ' bottles of beer on the wall!' | |
end |
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
<?php include 'header.html'; ?> | |
<div id="container"> | |
<div id="header"> | |
<img src="images/bluegreenyoulllookgreat.jpg" alt="You'll Look Great" /> | |
<h2>We are in the business of brand makeovers.</h2> | |
<h3>Find out what we can do for you.</h3> | |
</div> | |
NewerOlder