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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="css/main.css"> | |
<title>The Story Maker</title> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>The Story Maker</h1> | |
<script src="story.js"></script> |
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> | |
<script src="https://apis.google.com/js/client.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script> | |
function auth() { | |
var config = { | |
'client_id': 'OAUTH_CLIENT_ID', | |
'scope': 'https://www.google.com/m8/feeds' | |
}; |
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
import java.util.Scanner; | |
import java.io.*; | |
public class White | |
{ | |
public static void main(String[] args) throws IOException | |
{ | |
// Gets the PrintWriter and Scanner classes | |
PrintWriter file = new PrintWriter("names.txt"); | |
Scanner keyboard = new Scanner(System.in); |
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
//first, checks if it isn't implemented yet | |
if (!String.prototype.format) { | |
String.prototype.format = function() { | |
var args = arguments; | |
return this.replace(/{(\d+)}/g, function(match, number) { | |
return typeof args[number] != 'undefined' | |
? args[number] | |
: match | |
; | |
}); |
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
// Bonfire: Reverse a String | |
// Author: @twhite96 | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-reverse-a-string?solution=function%20reverseString(str)%20%7B%0A%20%20str%20%3D%20str.split(%27%27)%3B%0A%20%20str%20%3D%20str.reverse()%3B%0A%20%20str%20%3D%20str.join(%27%27)%3B%0A%20%20return%20str%3B%0A%7D%0A%0A%0A%0A%0A%0AreverseString(%22hello%22)%3B%0A | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function reverseString(str) { | |
str = str.split(''); | |
str = str.reverse(); | |
str = str.join(''); | |
return str; |
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
// Bonfire: Factorialize a Number | |
// Author: @twhite96 | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-factorialize-a-number?solution=function%20factorialize(num)%20%7B%0A%20%20if%20(num%20%3D%3D%3D%200)%20%7B%0A%20%20%20%20return%201%3B%0A%20%20%7D%0A%20%20%20%20return%20num%20*%20factorialize(num%20-%201)%3B%0A%7D%0A%0Afactorialize(5)%3B%0A | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function factorialize(num) { | |
if (num === 0) { | |
return 1; | |
} | |
return num * factorialize(num - 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
// Bonfire: Check for Palindromes | |
// Author: @twhite96 | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-check-for-palindromes?solution=function%20palindrome(str)%20%7B%0A%20%20%2F%2F%20Good%20luck!%0A%20%20%0A%20%20str%20%3D%20str.toLowerCase()%3B%0A%20%20%0A%20%20str%20%3D%20str.replace(%2F%5B%5Ea-z%7C1-9%5D%2Fg%2C%20%22%22)%3B%0A%20%20%0A%20%20if%20(str.length%20%3D%3D%3D%200)%7B%0A%20%20%20%20return%20true%3B%0A%20%20%7D%0A%20%20%0A%20%20if%20(str%5B0%5D%20!%3D%3D%20str%5Bstr.length-1%5D)%7B%0A%20%20%20%20return%20false%3B%0A%20%20%7D%0A%20%20%0A%20%20else%20%7B%0A%20%20%20%20return%20palindrome(str.slice(1%2Cstr.length%20-%201))%3B%0A%20%20%7D%0A%7D%0A%0A%0Apalindrome(%22eye%22)%3B%0A | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function palindrome(str) { | |
str = str.toLowerCase().replace(/[\W_]/g, ''); | |
for(var i = 0, len = str.length - 1; i < len/2; i++) { | |
if(str[i] !== str[len-i]) { | |
return false; |
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
// Bonfire: Find the Longest Word in a String | |
// Author: @twhite96 | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-find-the-longest-word-in-a-string?solution=function%20findLongestWord(str)%20%7B%0A%20%20var%20words%20%3D%20str.split(%27%20%27)%3B%0A%20%0A%20%20var%20longest%20%3D%200%3B%0A%20%20%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20words.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20if%20(words%5Bi%5D.length%20%3E%20longest)%20%7B%0A%20%20%20%20%20%20longest%20%3D%20words%5Bi%5D.length%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%20%20%7D%0A%20%20%0A%20%20%20%20%20%20return%20longest%3B%0A%7D%0A%0AfindLongestWord(%22The%20quick%20brown%20fox%20jumped%20over%20the%20lazy%20dog%22)%3B%0A | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function findLongestWord(str) { | |
var words = str.split(' '); | |
var longest = 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
// Bonfire: Title Case a Sentence | |
// Author: @twhite96 | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-title-case-a-sentence | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function titleCase(str) { | |
// Made the string an array | |
var arrayList = str.split(' '); | |
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
// Bonfire: Return Largest Numbers in Arrays | |
// Author: @twhite96 | |
function largestOfFour(arr) { | |
// You can do this! | |
//Need a place to store the solution | |
var results = []; |