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
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" | |
| xmlns:v1="http://www.sungard.com/bsil/acctmgmt/v1-0" | |
| xmlns:v11="http://www.sungard.com/ws/v1-0" | |
| xmlns:v12="http://www.sungard.com/common/v1-0" | |
| xmlns:v13="http://www.sungard.com/product/v1-0" | |
| xmlns:v14="http://www.sungard.com/cloud/v1-0" | |
| xmlns:v15="http://www.sungard.com/payment/v1-0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
| <soapenv:Body> |
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
| let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$' | |
| let g:ctrlp_use_caching = 0 | |
| let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""' | |
| " Default to filename searches - so that appctrl will find application | |
| " controller | |
| let g:ctrlp_by_filename = 1 | |
| " We don't want to use Ctrl-p as the mapping because | |
| " it interferes with YankRing (paste, then hit ctrl-p) | |
| let g:ctrlp_map = ',f' |
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
| you need ripper-tags for this to work. | |
| `gem install ripper-tags` | |
| then just drop the .vim script in |
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
| using System; | |
| using System.Linq; | |
| using System.Threading; | |
| using NLog; | |
| using RealTick.Api.ClientAdapter; | |
| using RealTick.Api.Domain; | |
| using RealTick.Api.Domain.Livequote; | |
| namespace Chaikin.RealTick | |
| { |
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
| # Side effect is that converting the array to a hash will remove | |
| # duplicate entries, if they exist | |
| require 'benchmark' | |
| def find_sums_hashed(arr, target) | |
| hash = Hash[*arr.zip(Array.new(arr.length)).flatten] | |
| hash.each_key do |key| | |
| if hash.has_key?(target-key) && target != target - key | |
| yield [key, target-key] if block_given? | |
| 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
| { | |
| bullish_alerts: { | |
| buy_signals: { | |
| today: [ | |
| {symbol: AAPL, name: "A-SignalType", trigger_price: 999.99 }, | |
| {symbol: AAPL, name: "A-SignalType", trigger_price: 999.99 }, | |
| {symbol: AAPL, name: "B-SignalType", trigger_price: 999.99 }, | |
| {symbol: AAPL, name: "C-SignalType", trigger_price: 999.99 }, | |
| ] |
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
| // x-axis - time values: | |
| time_values = [1332475200000, 1332734400000, 1332820800000, 1332907200000, 1332993600000, 1333080000000, 1333339200000, 1333425600000, 1333512000000, 1333598400000, 1333944000000, 1334030400000, 1334116800000, 1334203200000, 1334289600000, 1334548800000, 1334635200000, 1334721600000, 1334808000000, 1334894400000, 1335153600000, 1335240000000, 1335326400000, 1335412800000, 1335499200000, 1335758400000, 1335844800000, 1335931200000, 1336017600000, 1336104000000, 1336363200000, 1336449600000, 1336536000000, 1336622400000, 1336708800000, 1336968000000, 1337054400000, 1337140800000, 1337227200000, 1337313600000, 1337572800000, 1337659200000, 1337745600000, 1337832000000, 1337918400000, 1338264000000, 1338350400000, 1338436800000, 1338523200000, 1338782400000, 1338868800000, 1338955200000, 1339041600000, 1339128000000, 1339387200000, 1339473600000, 1339560000000, 1339646400000, 1339732800000, 1339992000000, 1340078400000, 1340164800000, 1340251200000, 1340337600000, 1340596800000, 134068320 |
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 User < ActiveRecord::Base | |
| attr_accessible :name | |
| has_one :address | |
| end | |
| class Address < ActiveRecord::Base | |
| attr_accessible :addr1, :addr2 | |
| belongs_to :user | |
| validates_presence_of :user | |
| 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
| describe FactoryGirl::EvaluatorClassDefiner do | |
| let(:simple_attribute) { | |
| stub("simple attribute", name: :simple, to_proc: -> { 1 }) | |
| } | |
| let(:relative_attribute) { | |
| stub("relative attribute", name: :relative, to_proc: -> { simple + 1 }) | |
| } | |
| let(:evaluator) { | |
| class_definer = FactoryGirl::EvaluatorClassDefiner.new( |
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 'rubygems' | |
| require 'active_model' | |
| class Test | |
| include ActiveModel::Validations | |
| def initialize(attributes = {}) | |
| attributes.each do |name, value| | |
| send("#{name}=", value) | |
| end |