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 LocationData::Profiles < ActiveResource::Base | |
| self.schema = Front::PROFILE_SCHEMA | |
| def method_missing(name, *args, &block) | |
| super(name, *args, &block) | |
| rescue NoMethodError, NameError => e | |
| if name.to_s =~ /^(?:county|state|provincial)_profiles$/ | |
| [] | |
| else | |
| raise e |
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
| ⨀_⨀ | |
| ⨂_⨂ | |
| (/◔ ◡ ◔)/ | |
| °ﺑ° | |
| (¬_¬) | |
| (´・ω・`) | |
| (ʘ_ʘ) | |
| (ʘ‿ʘ) | |
| (๏̯͡๏ ) | |
| (◕_◕) |
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
| .large_break | |
| .two_col_left | |
| -form_for @template_group, :url => template_group_form_url, :method => template_group_form_method do |f| | |
| %fieldset#template_group | |
| %legend Template Groupd Details | |
| =f.label :name | |
| =f.text_field :name | |
| %br |
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 ContentUI | |
| module Presenters | |
| class Short < ContentUI::Presenters::Base | |
| def render_body | |
| @template.content_tag :div, :class => "float_left" do | |
| @form.text_field @template.content_field_name(self), "data-max-chars" => self.max_length | |
| end | |
| end | |
| 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
| Scenario: International Lead | |
| #Given I am on the home page | |
| #When I follow "International" within the footer | |
| #Then I should be on the international page | |
| Given I am on the international page | |
| When I follow "Germany" | |
| Then I should be on the "Germany" international directory page | |
| And the spam-protected "Country" field should contain "Germany" | |
| When I fill out the spam-protected form within the "main body" section following these instructions: | |
| | action | name | value | |
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
| <script src='http://fronts.dev/assets/javascripts/widget/bail-calc.js' type='text/javascript'></script> <div id='bail-widget-container' data-attr='[{"maxValue":"1000","percentage":"10"},{"maxValue":"15000","percentage":"15"}]' data-phone='123-456-7890'> Bail Bonds calculator by <a id='ab_link' href='http://www.aboutbail.com/'>AboutBail</a>. </div> |
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
| <ul> | |
| <li> | |
| User Locale: {{ fb.user.locale }} | |
| </li> | |
| <li> | |
| User Country: {{ fb.user.country }} | |
| </li> | |
| <li> | |
| Min Age: {{ fb.user.age.min }} | |
| </li> |
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
| ## SOLUTION | |
| def binary(value, data, low, high) | |
| center = low + (high - low) / 2 # C | |
| if center < low # C | |
| nil # C | |
| elsif data[center] == value # C | |
| center # C | |
| elsif data[center] > value # C | |
| binary(value, data, low, center - 1) # T(n/2) + C |
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
| std::list<int> list; | |
| std::list<int>::iterator pos; | |
| pos = list.begin(); | |
| list.insert(it, 1024); | |
| pos = std::find(list.begin(), list.end(), 1024); | |
| *pos; // get |
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
| # Helps you migrate from attachment_fu | |
| # put it in your /lib dir and include it your xxxx_uploader.rb | |
| module UploaderFu | |
| def partition_dir | |
| ("%08d" % model.id).scan(/\d{4}/).join("/") | |
| end | |
| def model_dir | |
| "#{model.class.to_s.underscore}/#{mounted_as}/" |