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
[:inspect, :to_s, :to_a, :to_ary, :frozen?, :==, :eql?, :hash, :[], :[]=, :at, :fetch, :first, :last, :concat, :<<, :push, :pop, :shift, :unshift, :insert, :each, :each_index, :reverse_each, :length, :size, :empty?, :find_index, :index, :rindex, :join, :reverse, :reverse!, :rotate, :rotate!, :sort, :sort!, :sort_by!, :collect, :collect!, :map, :map!, :select, :select!, :keep_if, :values_at, :delete, :delete_at, :delete_if, :reject, :reject!, :zip, :transpose, :replace, :clear, :fill, :include?, :<=>, :slice, :slice!, :assoc, :rassoc, :+, :*, :-, :&, :|, :uniq, :uniq!, :compact, :compact!, :flatten, :flatten!, :count, :shuffle!, :shuffle, :sample, :cycle, :permutation, :combination, :repeated_permutation, :repeated_combination, :product, :take, :take_while, :drop, :drop_while, :pack, :dclone, :entries, :sort_by, :grep, :find, :detect, :find_all, :flat_map, :collect_concat, :inject, :reduce, :partition, :group_by, :all?, :any?, :one?, :none?, :min, :max, :minmax, :min_by, :max_by, :minmax_by, :member?, :each_wi |
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 function getSubscriberList(){ | |
$result = array(); | |
$startIndex = 0; | |
$limit = 500; | |
$numberOfCurrentBatchRecord = $limit; | |
$numberOfBatchRan = 0; | |
$safeGardCount = 10; | |
while($limit == $numberOfCurrentBatchRecord && $numberOfBatchRan < $safeGardCount){ | |
$startIndex = $limit * $numberOfBatchRan; |
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
vr.addListMember({ | |
'session_id' => sid, | |
'list_member' => { | |
'list_id' => lid, | |
'member_data' => [ | |
{ | |
'name' => 'email_address', | |
'value' => '[email protected]' | |
}, | |
{ |
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
Blue | |
* Totally New to Programming | |
* You have little to no experience with the terminal or a graphical IDE | |
* You might have done a little bit with HTML or CSS, but not necessarily | |
* You're unfamiliar with terms like methods, arrays, lists, hashes, or dictionaries. | |
Green | |
* Somewhat New to Programming | |
* You may have used the terminal a little — perhaps to change directories, for instance | |
* You might has done an online programming tutorial or two |
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
Bridgetroll::Application.routes.draw do | |
root :to => "events#index" | |
devise_for :users | |
resources :users do | |
resource :profile, :only => [:edit, :update, :show] | |
end | |
resources :meetup_users, :only => [:index, :show] |
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
def mode(array) | |
frequency_hash = {} | |
array.each do |index| | |
frequency_hash[index] = array.count(index) | |
end | |
# now we have a hash of { number: frequency } | |
puts "here's the frequency of each thing, key = number, value = frequency of that number" | |
puts frequency_hash | |
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 RPNCalculator | |
def evaluate(exp) | |
exp_array = exp.split(" ").to_a | |
rpn_array = [] | |
exp_array.each do |i| | |
if i.match(/\d/) != nil | |
rpn_array << i.to_i | |
else | |
rpn_array << i | |
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
def factorial(n) | |
if n == 0 | |
return 1 | |
end | |
total = n | |
(n-1).times do | |
total = total * (n - 1) | |
n -= 1 | |
end | |
total |
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
<?php | |
$vr->sendEmailCampaignTest( | |
array( | |
'session_id' => $sid, | |
'campaign_id' => $cid, | |
'recipients' => array( | |
array( | |
array( | |
'name' => "email_address", | |
'value' => '[email protected]', |
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
Git Cheat Sheet | |
first time: | |
git config --global user.name "My Name" | |
git config --global user.email "[email protected]" | |
each repo: | |
git init | |
LOCAL THINGS |
OlderNewer