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
1. Find a teammates encoders repo ( from this lab https://github.com/flatiron-school-students/string-manipulation-bk-001) | |
2. Fork it! | |
3. Clone it! | |
4. Play with the encoder | |
5. Write a decoder | |
6. Push the decoder up to your Github repo | |
7. Post the link here! |
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
1. Find a teammates encoders repo ( from this lab https://github.com/flatiron-school-students/string-manipulation-bk-001) | |
2. Fork it! | |
3. Clone it! | |
4. Play with the encoder | |
5. Write a decoder | |
6. Push the decoder up to your Github repo | |
7. Post the link here! |
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
{ | |
"service": { | |
"responsecode": "0", | |
"timestamp": "7/8/2014 5:21:01 PM", | |
"subway": { | |
"line": [ | |
{ | |
"name": "123", | |
"status": "GOOD SERVICE" | |
}, |
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
# encoding: UTF-8 | |
# This file is auto-generated from the current state of the database. Instead | |
# of editing this file, please use the migrations feature of Active Record to | |
# incrementally modify your database, and then regenerate this schema definition. | |
# | |
# Note that this schema.rb definition is the authoritative source for your | |
# database schema. If you need to create the application database on another | |
# system, you should be using db:schema:load, not running all the migrations | |
# from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
# you'll amass, the slower it'll run and the greater likelihood for issues). |
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
Rails.application.routes.draw do | |
resources :contacts | |
resources :recipients |
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
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rarequire File.expand_path('../config/application', __FILE__) | |
require File.expand_path('../config/application', __FILE__) | |
Rails.application.load_tasks | |
task :text_each_alert => :environment do | |
Alert.all.each do |alert| |
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 Alert < ActiveRecord::Base | |
belongs_to :recipient | |
has_many :services | |
#make variable/method Service.find_by(name: self.service_name).traffic | |
def bad_service? | |
Service.find_by(name: self.service_name).traffic =! "GOOD SERVICE" | |
end | |
def self.current_train_status |
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
#2 models | |
class EarlyVoteSite < ActiveRecord::Base | |
has_and_belongs_to_many :locality, | |
:foreign_key => 'locality_id', :primary_key => 'p_id' | |
end | |
class Locality < ActiveRecord::Base | |
has_and_belongs_to_many :early_vote_sites, |
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
// Copygright 2016 Google Inc. All rights reserved. | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to writing, software distributed | |
// under the License is distributed on a "AS IS" BASIS, WITHOUT WARRANTIES OR | |
// CONDITIONS OF ANY KIND, either express or implied. | |
// |
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 submit = $("button"); | |
var inputField = $("input"); | |
var menuType = $("select"); | |
var listContainer = $("#listContainer"); | |
var selectType; | |
var results; | |
submit.on('click', function(){ | |
var artistName = inputField.val(); | |
selectType = menuType.val(); |
OlderNewer