All of the commands that start with '$' should be done in the terminal with out the '$' part.
As an example when you see:
$rails c
You should type
rails c
class BoggleBoard | |
#your code here | |
end | |
dice_grid = [["b", "r", "a", "e"], | |
["i", "o", "d", "t"], | |
["e", "c", "l", "r"], |
class BoggleBoard | |
attr_reader :num_rows, :num_cols | |
def initialize(board) | |
@board = board | |
@num_rows = @board.count | |
@num_cols = @board[0].count | |
end | |
def create_word(*coords) |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>DOM manipulation with jQuery</title> | |
<!-- Add a link to jQuery CDN here script here --> | |
<script type="text/javascript" src="jquery_example.js"></script> | |
</head> | |
<body> |
require 'snoo' | |
require 'json' | |
config = { | |
export_file_name: 'comments_for_ginger', | |
subreddit: 'askreddit' | |
} | |
class RedditParser | |
attr_accessor :subreddit |
#left-column { | |
height: 600px; | |
width: 48%; | |
float: left; | |
margin: 16px 1% 0 2%; | |
background-color: blue; | |
} | |
#center-nav, #right-column { | |
height: 600px; |
850002400720000009004000000000107002305000900040000000000080070017000000000036040 | |
005300000800000020070010500400005300010070006003200080060500009004000030000009700 | |
120040000005069010009000500000000070700052090030000002090600050400900801003000904 | |
000570030100000020700023400000080004007004000490000605042000300000700900001800000 | |
700152300000000920000300000100004708000000060000000000009000506040907000800006010 | |
100007090030020008009600500005300900010080002600004000300000010040000007007000300 | |
100034080000800500004060021018000000300102006000000810520070900006009000090640002 | |
000920000006803000190070006230040100001000700008030029700080091000507200000064000 | |
060504030100090008000000000900050006040602070700040005000000000400080001050203040 | |
700000400020070080003008079900500300060020090001097006000300900030040060009001035 |
require 'artoo' | |
connection :arduino, adaptor: :firmata, port: '/dev/cu.usbmodem1421' # linux | |
device :board, :driver => :device_info | |
device :serv, :driver => :servo, :pin => 5 # pin must be a PWM pin | |
work do | |
puts "Firmware name: #{board.firmware_name}" | |
puts "Firmata version: #{board.version}" |
class Sudoku | |
def initialize board | |
@board = board | |
end | |
def solve! | |
num_index = @board.index('0') | |
return true unless num_index | |
('1'..'9').each do |possibility| | |
@board[num_index] = possibility |
# From | |
# | |
# $*.map{|a|(i=a=~/0/)?(v=*?1..?9).fill{|j|v-=[a[j+i-k=i%9],a[ | |
# k+j*=9],a[j%26+i-i%3-i%27+k]]}+v.map{|k|$*.<<$`<<k<<$'}:p(a)} | |
# | |
# | |
# To | |
start = Time.now | |
ARGV.map do |board| |
All of the commands that start with '$' should be done in the terminal with out the '$' part.
As an example when you see:
$rails c
You should type
rails c