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 name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<title>Simple markers</title> | |
<script src="https://cdn.socket.io/socket.io-1.3.5.js"></script> | |
<style> | |
html, body { |
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 name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<script src="https://cdn.socket.io/socket.io-1.3.5.js"></script> | |
<title>Simple markers</title> | |
<style> | |
html, body { | |
height: 100%; |
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 req = require("request"); | |
var fs = require("fs"); | |
var spawn = require('child_process').spawn; | |
spawn('raspistill',["-o","./uploads/photo.jpg"]).on("close",function(code,signal){ | |
console.log(code); | |
var data = req.post("http://brttncm.herokuapp.com/api/photo",function(err,resp,body){ | |
if(err){ | |
console.log(er); | |
}else{ |
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
class Academy | |
@@students_spring =[] | |
@@students_winter= [] | |
@@winter = {'winter' => @@students_winter } | |
@@spring = {'spring' => @@students_spring } | |
def initialize(student, session) | |
@student = student | |
if session.downcase == 'winter' | |
@@students_winter << @student |
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
require 'rspec' | |
require_relative 'array_statistics' | |
describe ArrayStats do | |
it 'Input of an array gives the largest number in the array' do | |
expect(ArrayStats.new([1, 2, 3, 4, 2, 5, 3]).largest_num).to eql(5) | |
end | |
it 'Input of an array gives the smallest number in the array' do |
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
class Anagram | |
def initialize(word) | |
@characters =[] | |
word.each_char{|x| @characters<<x} | |
end | |
def convert | |
anagrams = [] | |
@characters.permutation.each {|x| anagrams << x.join} | |
p anagrams |
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
[ | |
{ | |
first_name: 'Johnny', | |
last_name: 'Smith', | |
annual_income: 120000, | |
tax_paid: 28000 | |
}, | |
{ | |
first_name: 'Liz', |
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> | |
<title>Over Engineering and Kick Ball</title> | |
<link href='http://fonts.googleapis.com/css?family=Press+Start+2P' rel='stylesheet' type='text/css'> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script> | |
<style> | |
body{ | |
margin:0px; | |
font-family: 'Press Start 2P'; |
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
every_game=[] | |
teams =[] | |
game = 0 | |
winner = nil | |
def no_dups?(teams) | |
names=[] | |
teams.each do |team| | |
if names.include?(team['team_name']) | |
return false |
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
teams =[] | |
def no_dups?(teams) | |
names=[] | |
teams.each do |team| | |
if names.include?(team['team_name']) | |
return false | |
else | |
names << team['team_name'] | |
end |