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
class SecretHandshake | |
def initialize(input) | |
@data = input | |
@solution = [] | |
end | |
def commands | |
unless @data.to_i == 0 | |
@data = @data.to_s(2) |
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
class OCR | |
attr_accessor :text | |
OCR_DB = { | |
[' _ ', '| |', '|_|'] => '0', | |
[' ', ' |', ' |'] => '1', | |
[' _ ', ' _|', '|_ '] => '2', | |
[' _ ', ' _|', ' _|'] => '3', | |
[' ', '|_|', ' |'] => '4', | |
[' _ ', '|_ ', ' _|'] => '5', |
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
class Triplet | |
attr_reader :alfa, :bravo, :charlie | |
def initialize(alfa, bravo, charlie) | |
@alfa = alfa | |
@bravo = bravo | |
@charlie = charlie | |
end | |
def sum |
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
require 'pry' | |
class Robot | |
attr_reader :compass | |
def initialize | |
@compass = [:north, :east, :south, :west] | |
@facing_to = true | |
@x_axis = [] | |
@y_axis = [] |
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
::::::::::::::::::::::::::::::::::::::::::::: | |
::::::::::::::::::: INDEX ::::::::::::::::::: | |
::::::::::::::::::::::::::::::::::::::::::::: | |
1- PRIMITIVES VS. OBJECTS | |
2- NULL VS. UNDEFINED | |
3- FUNCTION DECLARATION AND FUNCTION EXPRESSION | |
4- JS FUNCTION-S: FIRST CLASS VALUES | |
5- ANONYMOUS FUNCTIONS, SCOPE AND CLOSURE | |
6- FUNCTION EXPRESSION WITH GROUPING OPERATORS |
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
THIS AND $(THIS) IN JAVASCRIPT AND jQuery | |
by Willem T for LauchSchool.com – FE2 Assessment 249 | |
–---- Definition –---- |
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
[ | |
{ | |
"city": "New York", | |
"growth_from_2000_to_2013": "4.8%", | |
"latitude": 40.7127837, | |
"longitude": -74.0059413, | |
"population": "8405837", | |
"rank": "1", | |
"state": "New York" | |
}, |
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
App.ResultView = Marionette.ItemView.extend({ | |
template: "#js-result", | |
}) | |
App.ResultsView = Marionette.CompositeView.extend({ | |
tagName: "ul", | |
// className: ".suggestions", | |
childView: App.ResultView, | |
template: "#js-results", | |
// this.listenTo("show", this.filter()), |
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
[ | |
{ | |
"city": "New York", | |
"growth_from_2000_to_2013": "4.8%", | |
"latitude": 40.7127837, | |
"longitude": -74.0059413, | |
"population": "8405837", | |
"rank": "1", | |
"state": "New York" | |
}, |
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
2016-02-29T21:36:19.668818+00:00 heroku[router]: at=info method=GET path="/css/vendor/backbone.modal.theme.css" host=pure-river-85638.herokuapp.com request_id=d4764083-8e82-462d-9bb8-aee383a4bd7c fwd="213.152.161.35" dyno=web.1 connect=1ms service=2ms status=304 bytes=178 | |
2016-02-29T21:36:19.651712+00:00 heroku[router]: at=info method=GET path="/css/vendor/backbone.modal.css" host=pure-river-85638.herokuapp.com request_id=562feef9-b283-4acc-9142-2ddf08565bf5 fwd="213.152.161.35" dyno=web.1 connect=2ms service=2ms status=304 bytes=176 | |
2016-02-29T21:36:19.637946+00:00 heroku[router]: at=info method=GET path="/css/vendor/bootstrap.css" host=pure-river-85638.herokuapp.com request_id=cab133f2-742c-451f-8b66-6a1c02d48a08 fwd="213.152.161.35" dyno=web.1 connect=1ms service=4ms status=304 bytes=179 | |
2016-02-29T21:36:19.674544+00:00 heroku[router]: at=info method=GET path="/js/vendor/jquery-ui.min.js" host=pure-river-85638.herokuapp.com request_id=8a5fbe31-1d3b-4be5-83ff-59720dc807eb fwd="213.152.161.35" dyno=web.1 con |
OlderNewer