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
| function UpdateQuestions() { | |
| console.log("Updating Questions..."); | |
| } |
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
| require 'optparse' | |
| options = {} | |
| options[:samplerate] = 44100.0 | |
| options[:transform] = :fft | |
| option_parser = OptionParser.new do |opts| | |
| opts.banner = "Usage: ruby transform.rb -p path_to_input_file [-r samplerate] [--plot]" | |
| opts.on("-r", "--samplerate SAMPLERATE", Float, "Specify the sample rate of the generated signal") do |r| | |
| options[:samplerate] = r |
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
| ActionView::Helpers::AssetTagHelper.register_javascript_expansion :jquery => ['jquery', 'jquery-ui', 'rails'] | |
| ActiveSupport.on_load(:action_view) do | |
| ActiveSupport.on_load(:after_initialize) do | |
| ActionView::Helpers::AssetTagHelper::register_javascript_expansion :defaults => ['jquery', 'jquery-ui', 'rails'] | |
| end | |
| end |
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
| var countyOptionsTemplate = new EJS({text: "<option value=''></option><% for(var i=0; i<data.length; i++) { %><option value='<%= data[i]['county']['id'] %>'><%= data[i]['county']['name'] %></option><% } %>"}); | |
| var cityOptionsTemplate = new EJS({text: "<option value=''></option><% for(var i=0; i<data.length; i++) { %><option value='<%= data[i]['city']['id'] %>'><%= data[i]['city']['name'] %></option><% } %>"}); | |
| function GetScopedCounties(e) { | |
| var selectedState = $('#LocationState').val(); | |
| if (!selectedState) | |
| return; | |
| var countiesPath; | |
| if (selectedState) { | |
| countiesPath = '/states/' + selectedState + '/counties.json'; |
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
| module ActiveRecord | |
| # = Active Record Through Association Scope | |
| module Associations | |
| module ThroughAssociationScope | |
| protected | |
| def aliased_through_table_name | |
| @reflection.table_name == @reflection.through_reflection.table_name ? | |
| Base.connection.quote_table_name(@reflection.through_reflection.table_name + '_join') : |
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
| 1: .campaign-data-group | |
| 2: %h3 | |
| 3: Polling by | |
| 4: = CallCampaign.human_enum_name :query_type, call_campaign.query_type | |
| 5: - if permitted_to? :edit, call_campaign | |
| 6: = link_to t("web_app_theme.edit", :default=> "Edit"), send("edit_#{call_campaign.class.to_s.tableize.singularize}_path", call_campaign), :class => "dialog_link", :"data-title" => "Edit #{call_campaign.name} Targets" | |
| 7: - case call_campaign.query_type |
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
| # coding: utf-8 | |
| class TransliterationController < ApplicationController | |
| def view | |
| end | |
| def result | |
| if request.post? | |
| @errors = [] | |
| @result = transliterate(:script, :text); |
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
| class CallCampaign < ActiveRecord::Base | |
| has_many :campaign_targets, :autosave => true | |
| has_many :call_lists, :through => :campaign_targets | |
| has_many :phone_numbers, :through => :call_lists | |
| end |
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
| module LayoutHelper | |
| def title(page_title, show_title = true) | |
| content_for(:title) { page_title.to_s } | |
| @show_title = show_title | |
| end | |
| def show_title? | |
| @show_title | |
| end |
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
| irb(main):001:0> $: | |
| => ["/Users/simonmurphy/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1", "/Users/simonmurphy/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby/1.9.1/x86_64-darwin10.4.0", "/Users/simonmurphy/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/site_ruby", "/Users/simonmurphy/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/vendor_ruby/1.9.1", "/Users/simonmurphy/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/vendor_ruby/1.9.1/x86_64-darwin10.4.0", "/Users/simonmurphy/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/vendor_ruby", "/Users/simonmurphy/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1", "/Users/simonmurphy/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/x86_64-darwin10.4.0"] |