One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
SELECT c.*, p1.* | |
FROM customer c | |
JOIN purchase p1 ON (c.id = p1.customer_id) | |
LEFT OUTER JOIN purchase p2 ON (c.id = p2.customer_id AND | |
(p1.date < p2.date OR p1.date = p2.date AND p1.id < p2.id)) | |
WHERE p2.id IS NULL; |
var panel = new Ext.form.FormPanel({ | |
title: 'Example', | |
width: 350, | |
items: [], | |
listeners: { | |
add: function(me, component, index) { | |
component.on('change', function(f,n,o) { | |
alert('detected! '+f.label+' value changed from '+o+' to '+n); | |
console.log(component.startValue); | |
}); |
-- First, update the attribute input type to multiselect | |
UPDATE eav_attribute SET | |
entity_type_id = 4, | |
attribute_model = NULL, | |
backend_model = 'eav/entity_attribute_backend_array', | |
backend_type = 'varchar', | |
backend_table = NULL, | |
frontend_model = NULL, | |
frontend_input = 'multiselect', | |
frontend_class = NULL |
The Laracasts PHPStorm theme.
https://www.dropbox.com/s/f4l3qc2falnvq61/laracasts_theme_updated.icls
(Add to ~/Library/Preferences/WebIde80/colors
on Mac.)
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
<?php | |
function random_password( $length = 8 ) { | |
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?"; | |
$password = substr( str_shuffle( $chars ), 0, $length ); | |
return $password; | |
} | |
?> |
I will maybe someday get around to dusting off my C and making these changes myself unless someone else does it first.
Imagine a long-running development branch periodically merges from master. The
git log --graph --all --topo-order
is not as simple as it could be, as of git version 1.7.10.4.
It doesn't seem like a big deal in this example, but when you're trying to follow the history trails in ASCII and you've got several different branches displayed at once, it gets difficult quickly.
<?php | |
class Website_Model_Product extends Object_Concrete | |
{ | |
/** | |
* Retreive the values in an array | |
* | |
* @return array | |
*/ | |
public function toArray() |
<?php | |
$zipcode = $_GET[zipcode]; | |
$url = "http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=" . $zipcode; | |
$geocode = simplexml_load_file($url); | |
$city = $geocode->result->address_component[1]->long_name; | |
for ($i = 2; $i < 6; $i++) | |
{ | |
if ($geocode->result->address_component[$i]->type == "administrative_area_level_1") | |
{ |