This file has been truncated, but you can view the full file.
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
-- | |
-- PostgreSQL database dump | |
-- | |
SET statement_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; |
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
//OWNERS COLLECTION – PATS_mongo | |
// To be safe, drop any prior collections | |
db.owners.drop(); | |
db.pets.drop(); | |
// set up some owners | |
var doc1 = { | |
"name": {"first": "Ed", "last": "Gruberman"}, | |
"street": "1600 Bigelow Blvd", |
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
//: Possible solutions to parts 1 & 2 of the 67-442 midterm (2015) | |
import UIKit | |
// PART 1: Closures | |
var characterFirstAppearance = ["obi-wan": "ANH", | |
"yoda": "ESB", | |
"luke": "ANH", | |
"windu": "TPM", |
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
# Classic OOP exercise, done in Ruby | |
class Wall | |
# Set up the wall with a set of bottles. The default | |
# number of bottles is 99 | |
def initialize( ) | |
end |
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
-- Using Prof. H's superhero_transact database | |
-- the pg_dump file for this database at: https://gist.github.com/profh/a243685482ac0d8f3244 | |
SELECT * FROM heroes; | |
BEGIN; | |
UPDATE heroes SET name = 'The Tickster' WHERE hero_id = 14; | |
SELECT * FROM heroes; | |
UPDATE heroes SET age = 42; | |
-- foo! I did't mean to change age of everyone to 42... |
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
-- PostgreSQL database dump | |
-- | |
SET statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; | |
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; | |
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; |
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
### Stepping through class example on BookManager | |
# Import Ecto.Query first, or none of this works in iex: | |
import Ecto.Query | |
# A simple example | |
query = from BookManager.Book | |
BookManager.Repo.all(query) | |
# Creating aliases because BookManager is just to long to keep rewriting: |
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
# Simple method format purposes | |
def brk | |
puts "============================" | |
end | |
# Finding all symbols and symbol methods that Ruby already knows: | |
symbols = Symbol.all_symbols.sort{|x,y| x.to_s <=> y.to_s } | |
symbols.each { |x| print x.to_s + "\t" } | |
brk |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Vue.js Demos</title> | |
<script type="text/javascript" src="https://unpkg.com/vue@2.5.9/dist/vue.js"></script> | |
OlderNewer