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
<div class='container-fluid language-javascript' > | |
<!-- tabs --> | |
<ul class="nav nav-pills"> | |
<li class="active"> | |
<a href="#readme" data-toggle="tab">Readme</a> | |
</li> | |
<li> |
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
// $ psql -f Downloads/library-data.sql library postgres | |
// $ psql library postgres | |
// library-# SELECT * FROM books; | |
RESULT: | |
id | title | author | |
------+------------------------------------------+--------------------- | |
1259 | Eloquent Ruby | Russell A. Olson | |
1593 | JavaScript: The Good Parts | Douglas Crockford | |
8982 | Designing Object-Oriented Software | Rebecca Wirfs-Brock |
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
[4] pry(#<Post>):1> nesting | |
Nesting status: | |
-- | |
0. main (Pry top level) | |
1. #<Post> | |
[5] pry(#<Post>):1> self.to_s | |
=> "#<Post:0x007f8bc222b398>" | |
[6] pry(#<Post>):1> self.title = 'some new title' | |
=> "some new title" | |
[7] pry(#<Post>):1> self.body = 'some new body' |
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 flatten = function(array) { | |
var results = []; | |
for(var i = 0; i < array.length; i++) { | |
if(Array.isArray(array[i])) { | |
results = results.concat(flatten(array[i])); | |
} else { | |
results.push(array[i]); | |
} | |
} |