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
| states = Array[ ["AK", "Alaska"], | |
| ["AL", "Alabama"], | |
| ["AR", "Arkansas"], | |
| ["AS", "American Samoa"], | |
| ["AZ", "Arizona"], | |
| ["CA", "California"], | |
| ["CO", "Colorado"], | |
| ["CT", "Connecticut"], | |
| ["DC", "District of Columbia"], | |
| ["DE", "Delaware"], |
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
| Deep learning here: https://www.youtube.com/watch?v=y57OnWV6dRE | |
| https://gorails.com/episodes/the-params-hash?autoplay=1 |
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
| Migration Overview | |
| Migrations are a convenient way to alter your database schema over time in a consistent and easy way. | |
| They use a Ruby DSL so that you don't have to write SQL by hand, allowing your schema and changes to be | |
| database independent. | |
| db:migrate runs (single) migrations that have not run yet. | |
| db:create creates the database | |
| db:drop deletes the database | |
| db:schema:load creates tables and columns within the (existing) database following schema.rb |
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
| HTML: | |
| <div class="hover_img"> | |
| <a href="http://ddeveloperr.github.io/p1/" target="_blank">Build a Simple Google Clone Website<span><img src="img/1_google_clone.jpg" alt="image" height="100" /></span></a> | |
| </div> | |
| CSS: | |
| .hover_img a { position:relative; } | |
| .hover_img a span { position:absolute; display:none; z-index:99; } |
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
| TO LEARN: https://curl.haxx.se/docs/httpscripting.html | |
| Why cURL? | |
| Because: http://code.tutsplus.com/tutorials/techniques-for-mastering-curl--net-8470 |
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
| ## More details: http://ruby.bastardsbook.com/chapters/recursion/ | |
| #1 | |
| def countdown(n) | |
| return if n.zero? # base case | |
| puts n | |
| countdown(n-1) # getting closer to base case | |
| end | |
| countdown(5) # > 5 4 3 2 1 |
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
| # Example of Self-Referential Data Structures - A Binary Tree | |
| class TreeNode | |
| attr_accessor :value, :left, :right | |
| # The Tree node contains a value, and a pointer to two children - left and right | |
| # Values lesser than this node will be inserted on its left | |
| # Values greater than it will be inserted on its right | |
| def initialize val,left,right | |
| @value = val |