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 'spec_helper' | |
| describe FeedsController do | |
| let!(:user) { User.make!(:registered) } | |
| render_views | |
| describe "GET 'events'" do | |
| it "successfully responds to ICS format" do | |
| get 'events', :format => :ics, :token => user.feed_token |
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
| // | |
| // LocationViewController.m | |
| // BoxBox | |
| // | |
| // Created by Warut Surapat on 12/19/11. | |
| // Copyright (c) 2011 StardustDream. All rights reserved. | |
| // | |
| #import "LocationViewController.h" | |
| #import "GlobalData.h" |
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
| workload.each do |screen_name| | |
| statuses = Status.retrieve(screen_name, Status.cursor[screen_name]) | |
| next if statuses.blank? | |
| .... | |
| 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
| at_prefixed_chunks = text.split(/(?<=\s)@/).reject(&:blank?) |
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
| userPreference = [NSUserDefaults standardUserDefaults]; | |
| // Check for a value of a specific key | |
| if([userPreference objectForKey:@"login_info"]){ | |
| NSString *userInfo = [userPreference objectForKey:@"login_info"]; | |
| NSArray *tokens = [userInfo componentsSeparatedByString:@"/"]; | |
| [self.telephoneTextField setText:[tokens objectAtIndex:0]]; | |
| [self.passwordTextField setText:[tokens objectAtIndex:1]]; | |
| [self login:self]; | |
| } |
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
| namespace :tasks do | |
| namespace :create do | |
| desc "Create all survey templates" | |
| task :all => [:task1, :task2, :task3] | |
| desc "desc1" | |
| task :task1 => :environment do | |
| 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
| # collect values from a particular field | |
| @users.collect(&:email) | |
| # collect values from a particular method | |
| @users.collect(&method(:user_preferences_url)) |
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
| public class calculator(){ | |
| private Keyboard keyboard; | |
| private Screen screen; | |
| private Stack operant; | |
| private Stack operator; | |
| private String showValue; | |
| private State calState; | |
| enum State{ | |
| on, |
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
| public class Mobile{ | |
| private Keyboard keyboard; | |
| private Screen screen; | |
| private Stack callStack; | |
| private State phoneState; | |
| private String currentNumber; | |
| enum State{ | |
| on, | |
| off, |
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
| @implementation NonAnimatedSegue | |
| - (id) initWithIdentifier:(NSString *)identifier source:(UIViewController *)source destination:(UIViewController *)destination{ | |
| self = [super initWithIdentifier:identifier source:source destination:destination]; | |
| if(self){ | |
| } | |
| return self; | |
| } |