I hereby claim:
- I am davidlfox on github.
- I am davidfox (https://keybase.io/davidfox) on keybase.
- I have a public key ASCaDM08-Dro3Va2fO-TFb1EjL7Y6vrv7_6PLGf6A3KJBAo
To claim this, I am signing this object:
using System.Text.RegularExpressions; | |
namespace GeneratedRegexTest; | |
public static partial class RegexUtilities | |
{ | |
// define a partial, parameterless method with GeneratedRegex attribute | |
// pattern to match SSN format (e.g. 123-45-6789) | |
[GeneratedRegex(@"\b\d{3}-\d{2}-\d{4}\b")] | |
public static partial Regex SsnRegex(); |
I hereby claim:
To claim this, I am signing this object:
array(1) { ["node"]=> array(3) { [57]=> object(stdClass)#72 (3) { ["nid"]=> string(2) "57" ["vid"]=> string(2) "57" ["type"]=> string(14) "carousel_image" } [18]=> object(stdClass)#103 (3) { ["nid"]=> string(2) "18" ["vid"]=> string(2) "18" ["type"]=> string(14) "carousel_image" } [70]=> object(stdClass)#105 (3) { ["nid"]=> string(2) "70" ["vid"]=> string(2) "70" ["type"]=> string(14) "carousel_image" } } } 1 |
$query = new EntityFieldQuery(); | |
$entities = $query->entityCondition('entity_type', 'node') | |
->propertyCondition('type', 'carousel_image') | |
->propertyCondition('status', 1) | |
->fieldOrderBy(‘field_weight', 'ASC') | |
->execute(); | |
$nodes = node_load_multiple(array_keys($entities['node'])); |
require 'capistrano/setup' | |
require 'capistrano/deploy' | |
require 'capistrano/rvm' | |
require 'capistrano/rails' | |
require "capistrano-resque" | |
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } |
[ElasticType(Name = "blsdata")] | |
public class SalaryDocument : IElasticSearchDocumentType<string> | |
{ | |
public SalaryDocument() | |
{ | |
} | |
/// <summary> | |
/// document id |
undefined local variable or method `card_href' for #<PayController:0x00000105199190> | |
bombing on this line: | |
card = Balanced::Card.fetch(card_href) |
class Chore < ActiveRecord::Base | |
belongs_to :user | |
has_many :taken_chore | |
scope :available, -> { where(:available => true) } | |
scope :ordered, -> { available.order(created_at: :desc) } | |
end |
def search | |
@chores = Chore.available | |
if search_params[:search_text] | |
@chores = @chores.where('description LIKE ?', "%%%s%" % search_params[:search_text]) | |
elsif search_params[:zipcode] | |
@chores = @chores.where('location LIKE ?', "%%%s%" % search_params[:zipcode]) | |
end | |
@chores = @chores.order(created_at: :desc).all |
class Chore < ActiveRecord::Base | |
belongs_to :user | |
belongs_to :category | |
validates :price, :format => { :with => /\A\d{1,9}\.\d{0,2}\z/, :message => 'regex failed'}, :numericality => {:greater_than => 0} | |
validates :category, presence: true | |
validates :user, presence: true | |
end |