because there's so much more than "get"
Is your method retrieving a record(s) from a data source? (e.g., a database or external service, or making a GET request)
get_*
fetch_*
Is your method creating a new record in a data source?
because there's so much more than "get"
Is your method retrieving a record(s) from a data source? (e.g., a database or external service, or making a GET request)
get_*
fetch_*
Is your method creating a new record in a data source?
~good test~
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
# for all numbers between 1 and a number, | |
# which can you add to the number infinitely | |
# (wrapping around when you hit the number) | |
# such that every number is stopped at once | |
def check_intervals(num) | |
best_intervals = [] | |
current_max = 0 | |
def subsets(array) | |
return [[]] if array.empty? | |
first = array.shift | |
subs = subsets(array) | |
other_subs = subs.map do |sub| | |
sub = sub + [first] | |
end | |
other_subs + subs |
class Enumerable | |
def deep_dup | |
self.map do |*elements| | |
if element.is_a?(Enumerable) | |
element.deep_dup | |
else | |
elements.map do |element| | |
begin | |
duplicate = element.class.allocate | |
duplicate.send(:initialize_copy, element) |
require 'selenium-webdriver' | |
username = 'your_username' | |
pword = 'your_pword' | |
browser = Selenium::WebDriver.for :firefox | |
browser.get 'https://linkedin.com' | |
wait = Selenium::WebDriver::Wait.new(:timeout => 10) |
require 'uri' | |
q1 = 'username=charlie&email=charlie@gmail' | |
q2 = 'user[username]=charlie&user[email][email protected]&user[password]=password' | |
q3 = 'user[address][street]=market&user[address][zipcode]=94103&user[email][email protected]' | |
puts URI.decode_www_form(q1).to_s | |
puts URI.decode_www_form(q2).to_s | |
puts URI.decode_www_form(q3).to_s |
$(function() { | |
$('body').one('click', function(event) { | |
var halfHeight = window.innerHeight / 2; | |
var halfWidth = window.innerWidth / 2; | |
var horizontalRule = $('<div style="width: 100%; height: ' + halfHeight + 'px; border: 0; border-bottom: thin solid blue; position: absolute; top:0;left:0"></div>'); | |
var verticalRule = $('<div style="width: ' + halfWidth + 'px; height: 100%; border: 0; border-right: thin solid blue; position: absolute; top:0;left:0"></div>'); | |
$('body').append(horizontalRule); | |
$('body').append(verticalRule); | |
}) |