This file contains 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
field_type :optional_name_check do | |
field :self do | |
type :text_field, :minlength=>0 | |
end | |
validates :logic=>lambda{ |field| | |
if (get_value.length==1) || ((get_value.split(/(.)\1\1/).join != get_value) || (get_value.split(/[@#\$%&*_;:"+=.,<>?\\\}\{\^\(\)\]\[]/).join != get_value )) && (get_value.length >1) | |
errors.add(field_name, "Only alphabetic, not 3 consecutive identical, longer than 1 character.") | |
end | |
} , :allow_blank=>true | |
end |
This file contains 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
field_type :address_type_check do | |
field :self do | |
type :text_field, :size => 25, :maxlength => 25 | |
end | |
validates :logic => lambda{|field| | |
errors.add(field_name, "Must have street names and numbers, and no groups of 3 consecutive letters. ") unless ((get_value.length>1) && (get_value.split(" ").count>1) && (get_value.split(/(\D)\1\1/).join == get_value) ) | |
# (get_value.length>1) | |
# && (get_value.split(" ").count>2) | |
# && (get_value.split(/(.)\1\1/).join != get_value) | |
} |
This file contains 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
$('html').find('body').bind('mouseover', function() { | |
//$('html').find('body').bind('load', function() { // this binding didn't work | |
var age = Age(); | |
if (age != 0 && !age) | |
age = ''; | |
$('#form_general_age').val(age); | |
window.displayGuarantorSection(age); | |
}); | |
This file contains 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
{ | |
"data": { | |
"general_patient_type": "No", | |
"general_wsib": "No", | |
"general_language": "E", | |
"general_first_name": "Rick", | |
"general_middle_name": "Roland", | |
"general_last_name": "Graham", | |
"general_sex": "M", | |
"general_dob_day": "3", |
This file contains 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
{ | |
id: item[0], | |
date: item[1], | |
message: item[2], | |
commiter: item[3], | |
branch: item[4], | |
x: 0, | |
y: 0, | |
height: 0, | |
width: 0 |
This file contains 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 'minitest/mock' | |
require 'minitest/unit' | |
require 'date' | |
MiniTest::Unit.autorun | |
class TestMailPurge < MiniTest::Unit::TestCase | |
class MailPurge | |
def initialize(imap) | |
@imap = imap |
This file contains 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
“Children are wonderfully confident in their own imaginations. Most of us lose this confidence as we grow up.” | |
Sir Ken Robinson | |
"The glory of creation is in its infinite diversity." | |
"And in the way our differences combine to create meaning and beauty." | |
-- Dr. Miranda Jones and Spock, "Is There in Truth No Beauty?", | |
stardate 5630.8 | |
“I am strong because I've been weak. I am fearless because I've been afraid. I am wise because I've been foolish.” | |
Unknown |
This file contains 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
the following brands as having met their standards for being true extra virgin olive oil. | |
Corto Olive | |
California Olive Ranch | |
Kirkland Organic | |
Lucero (Ascolano) | |
McEvoy Ranch Organic | |
Pompeian | |
- See more at: http://cdn.eatlocalgrown.com/10-fake-olive-oil.html#sthash.e7jgVqAE.dpuf |
This file contains 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
pragma solidity ^0.4.2; | |
contract Erc20 { | |
uint public _totalSupply; | |
function balanceOf(address who) public constant returns (uint); | |
function allowance(address owner, address spender) public constant returns (uint); | |
function transfer(address to, uint value) public returns (bool ok); | |
function transferFrom(address from, address to, uint value) public returns (bool ok); | |
function approve(address spender, uint value) public returns (bool ok); |