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
var backgroundOpacity = jQuery("<div>").css({ | |
position: "fixed", | |
top: 0, | |
left: 0, | |
width: "100%", | |
height: "100%", | |
backgroundColor: "rgba(0,0,0,0.5)", | |
zIndex: 25, | |
display: "none" | |
}); |
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
for (var i=1; i <= 20; i++) { | |
if ( num % 15 = 0 ) | |
console.log("Fizzbuzz") | |
else if ( num % 5 = 0) | |
console.log("Buzz") | |
else if (num % 3 = 0 ) | |
console.log("Fizz") | |
else | |
console.log(i) |
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
### Keybase proof | |
I hereby claim: | |
* I am alicht on github. | |
* I am alicht (https://keybase.io/alicht) on keybase. | |
* I have a public key whose fingerprint is EB9D 8865 B486 0AA7 5DD4 3E14 1E53 ACA5 0204 92F9 | |
To claim this, I am signing this object: |
- Most magical form helper in rails
- form_for is a ruby method into which a ruby object is passed
- form_for yields a form builder object (typically
f
) - methods to create form controls are called on
f
, the form builder element - when the object is passed as a form_for parameter, it creates corresponding inputs with each of the attributes
- if i had
form_for(@cat)
, then the form field params would look likecat[name]
,cat[color]
, etc
- if i had
- in keeping with Rails convention regarding RESTful routes, there should be a resource declared for each model object (eg,
resources :cats
)
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
puts "Christina Cannito" | |
puts "Avi Lichtschein" | |
puts "George Taveras" | |
puts "Hannah Kim" | |
#then we had to randomize our names, so a random name would be selected. See code below | |
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
# Establishing what the board pieces are now, so I can call it below during the introduction | |
board_pieces = ["X" , "0"] | |
@player1 = "X" | |
@player2 = "0" | |
# Introducing the players | |
puts "Welcome! Lets play Tic Tac Toe!" | |
puts "Player 1, what is your name?" | |
@player1_name = gets.chomp.capitalize |