It's a neat little gem that you're gunna love
Have trouble being happy while you're coding Ruby? You've come to the right place. This gem makes it dirt easy.
<?php | |
class Person { | |
public $first_name; | |
public $last_name; | |
public function __construct($first_name, $last_name) | |
{ | |
$this->first_name = $first_name; | |
$this->last_name = $last_name; |
<?php | |
class Person { | |
public $first_name; | |
public $last_name; | |
public $address; | |
public $city; | |
public $state; | |
public $zip; |
It's a neat little gem that you're gunna love
Have trouble being happy while you're coding Ruby? You've come to the right place. This gem makes it dirt easy.
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12) | |
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> def mogrify(li): | |
... for i, v in enumerate(li): | |
... li[i] = v * 2 | |
... | |
>>> x = [1,2,3] | |
>>> id(x) | |
445976 |
<!-- LinkedIn Profile Position Template --> | |
<ul> | |
<li></li> | |
<li></li> | |
</ul> | |
<!-- Director of Product Development, Publish2 --> | |
<ul> | |
<li>Launched News Exchange web and print content sharing product, garnering a Knight-Batten Special Distinction Award and a <em>TechCrunch</em> Disrupt Cup finalist place </li> | |
<li>Improved Link Journalism product by simplifying JavaScript bookmarklet user experience, refactoring PHP web application, and normalizing MySQL database </li> |
http://www.junauza.com/2010/12/top-50-programming-quotes-of-all-time.html | |
50. "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning." | |
- Rick Cook | |
49. "Lisp isn't a language, it's a building material." | |
- Alan Kay. | |
48. "Walking on water and developing software from a specification are easy if both are frozen." | |
- Edward V Berard |
<?php | |
/* | |
Copyright 2010 Sam Bisbee | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
<?php | |
error_reporting(E_ALL); | |
require_once('../src/Sag.php'); |
# Permutations without Repetition | |
# | |
# n! | |
# -------- | |
# (n-r)! | |
def permutations(total) | |
(total-1).downto(1) do |i| | |
total = total * i unless i == 0 |