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
const X_B = { | |
"B,s1": ["X", "R", "s2"], | |
"B,s2": ["B", "L", "s3"], | |
"X,s3": ["B", "R", "s4"], | |
"B,s4": ["B", "L", "s1"], | |
} | |
var tape = ["B", "B"], | |
head = 0, | |
state = "s1"; |
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
<form action="https://technovationchallenge.org/" method="GET"> | |
<label for="s">Search:</label> | |
<input name="s" type="text" /> | |
<p> | |
<input type="submit" value="Search" /> | |
</p> | |
</form> |
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
@events = RegionalPitchEvent.in_region_of(current_ambassador) | |
.joins(:divisions, :judges, teams: { team_submissions: :submission_scores }) | |
@event.teams.order("teams.name") # OKAY | |
@event.teams.order("LOWER(teams.name)") # NOT OKAY | |
#PG::InvalidColumnReference: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list | |
#LINE 1: ..._event_id" = $1 AND (divisions.name = 0) ORDER BY LOWER(team... | |
^ |
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
source 'https://rubygems.org' | |
ruby "~> 2.3.1" | |
gem 'rails', '~> 5.0' | |
gem 'puma', '~> 3.8' | |
gem 'pg', '~> 0.20' | |
gem 'uglifier', '~> 3.1' | |
gem 'jquery-rails', "~> 4.3" | |
gem 'lodash-rails', "~> 4.17" |
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
# Rubygems v. 2.6.11 | |
# Bundler v. 1.14.6 | |
# NOTE the gems without version constraints -- had to remove the constraints due to dependency resolving | |
# NOTE ALSO - you don't see two gems I removed because trying to run bundle update wouldn't find compatible dependencies: | |
# sass-rails | |
# sinatra (in test group for a network stubbing helper) | |
source 'https://rubygems.org' |
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 (~> 5.0.2) was resolved to 5.0.2, which depends on | |
actionpack (= 5.0.2) was resolved to 5.0.2, which depends on | |
rack (~> 2.0) | |
rails (~> 5.0.2) was resolved to 5.0.2, which depends on | |
sprockets-rails (>= 2.0.0) was resolved to 2.0.0, which depends on | |
sprockets (~> 2.8) was resolved to 2.8.0, which depends on | |
rack (~> 1.0) |
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 MentorProfile < ActiveRecord::Base | |
# ... omitted | |
def enable_searchability | |
# called ONLY from a consent waiver model being saved and | |
# when a background check model is saved | |
update_attributes(searchable: can_enable_searchable?) | |
if can_enable_searchable? | |
RegistrationMailer.welcome_mentor(account).deliver_later |
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
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
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
(function() { | |
var forms = document.getElementsByClassName('new_submission_score'); | |
function handleSuccessfulSave(evt, xhr, status, error) { | |
debugger; | |
createFlashNotification("success", "Saved!"); | |
} | |
for (var i = 0; i < forms.length; i++) { | |
$(forms[i]).on('ajax:success', handleSuccessfulSave); |
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> | |
<link href="https://fonts.googleapis.com/css?family=Nunito+Sans" rel="stylesheet"> | |
<title>Change the font!!!!!</title> | |
<style type="text/css"> | |
html { | |
font-family: 'Nunito Sans', sans-serif; | |
} |