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
# SQLEditor export: Rails Migration | |
# id columns are removed | |
class Untitled < ActiveRecord::Migration | |
def change | |
create_table :Arraignments do |t| | |
end | |
create_table :Arrests do |t| | |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- SQL XML created by WWW SQL Designer, http://code.google.com/p/wwwsqldesigner/ --> | |
<!-- Active URL: https://socrates.devbootcamp.com/sql --> | |
<sql> | |
<datatypes db="postgresql"> | |
<group label="Numeric" color="rgb(238,238,170)"> | |
<type label="Integer" length="0" sql="INTEGER" re="INT" quote="" /> | |
<type label="Small Integer" length="0" sql="SMALLINT" quote="" /> | |
<type label="Big Integer" length="0" sql="BIGINT" quote="" /> | |
<type label="Decimal" length="1" sql="DECIMAL" re="numeric" quote="" /> |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* | |
You will work with the following two variables. The first, students, holds the names of four students. | |
The second, scores, holds groups of test scores. The relative positions of elements within the two | |
variables match (i.e., 'Joseph' is the first element in students; his scores are the first value in scores.). | |
Do not alter the students and scores code. | |
*/ |
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
/* | |
You will work with the following two variables. The first, students, holds the names of four students. | |
The second, scores, holds groups of test scores. The relative positions of elements within the two | |
variables match (i.e., 'Joseph' is the first element in students; his scores are the first value in scores.). | |
Do not alter the students and scores code. | |
*/ |
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 BoggleBoard | |
#your code here | |
class BoggleBoard | |
# This will create an object called board that I can use later to directly access the board | |
attr_reader :board | |
# Initialize the board | |
def initialize(board) | |
@board = board | |
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
class CreditCard | |
def initialize(cc_num) | |
raise ArgumentError if cc_num.to_s.length != 16 | |
@cc_num=cc_num | |
end | |
def check_card | |
@cc_num_array1 = @cc_num.to_s | |
#puts @cc_num | |
#puts @cc_num_array1 | |
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
class GuessingGame | |
def initialize(answer) | |
@answer=answer | |
end | |
#define methods for guess, high, low, correct, solved | |
# guess method takes in user input | |
def guess | |
puts "Whats your guess?" | |
last_guest=gets.chomp | |
last_guest=guess |
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 GuessingGame | |
def initialize(answer) | |
@answer=answer; | |
@guess=guess; | |
@high=high; | |
@low=low; | |
@correct=correct; | |
@solved=solved; | |
end | |
#Define methods of guess, high, low, correct, solved |
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 GuessingGame | |
def initialize(answer) | |
#Define methods of answer, guess, high, low, correct, solved | |
def answer | |
@@answer=answer | |
end | |
def guess | |
@@guess=guess.gets.to_i | |
end | |
def high(guess>answer) #Make method for high be set to guess being higher than answer |
NewerOlder