-
you can make anything you want here, even if the tools aren't here yet
-
you are responsible for, and capable of, creating the change you want to see in the world
-
it's okay to mess up, just fix and learn from your mistakes
-
be completely honest with yourself and others
-
we are hands-on, cooperative, and behave excellently to each other
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
(110 results for 480) | |
(46 results for 602) | |
Other area/country codes: | |
+353 | |
088 | |
208 | |
209 | |
240 | |
303 |
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
# from http://stackoverflow.com/questions/19305067/regex-binary-multiple-of-4 | |
class String | |
def binary_multiple_4? | |
(/^[10]*00$/ =~ self) == 0 | |
end | |
end | |
puts "4" | |
puts 4.to_s(2).binary_multiple_4? |
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
#usage: <%= li_link_to 'Home', home_path if (can? :read, Home) %> | |
def li_link_to(name = nil, options = nil, html_options = nil, &block) | |
html_options, options, name = options, name, block if block_given? | |
options ||= {} | |
html_options = convert_options_to_data_attributes(options, html_options) | |
url = url_for(options) | |
html_options['href'] ||= url |
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
class Business < ActiveRecord::Base | |
has_many :businesses_users, :primary_key=>:business_id | |
has_many :users, through: :businesses_users | |
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
<script type="text/javascript">// <![CDATA[ | |
/* Javascript Countdown Timer | |
* Will Bradley (www.willbradley.name) Dec. 2009 | |
* Code released publicly without any warranty or license. | |
*/ | |
function showtime() { | |
dateString = new Date().toUTCString(); | |
now = Date.parse(dateString); | |
xmasDateString = new Date(1261724400000).toUTCString(); // The long number is December 25, 2009 in Javascript's .getTime() format. You can put almost any value in here, including plain english dates. |
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
def solution(instructions) | |
position = [0,0] | |
directions = [ | |
[0,1], # north | |
[1,0], # east | |
[0,-1], # south | |
[-1,0] # west | |
] | |
current_dir = 0; | |
history = [] |
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
<?php | |
class SomeController { | |
private function filterSecurityContext($action, $items){ | |
$user = $this->get('security.context')->getToken()->getUser(); | |
$results = array(); | |
foreach($items as $item){ | |
if($this->get('security.context')->isGranted($action, $item)){ | |
$results[] = $item; | |
} |
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
<?php | |
namespace Acme\YourCompanyBundle\Tests\Controller; | |
use Liip\FunctionalTestBundle\Test\WebTestCase; | |
use Doctrine\ORM\Tools\SchemaTool; | |
// Note: be sure to replace any instance of "Your"/"your" with the appropriate values. | |
class YourControllerTest extends WebTestCase |
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
alert( is_iana_reserved_ip("192.168.5.5") ); | |
alert( is_iana_reserved_ip("192.200.5.5") ); |
OlderNewer