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
// https://ellislab.com/codeigniter/user-guide/database/active_record.html | |
// is | |
$this->db->where_not_in('group_id', array(2, 13)); | |
// the same as? | |
$this->db->where('group_id !=', 2); | |
$this->db->where('group_id !=', 13); |
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_once __DIR__ . '/vendor/autoload.php'; | |
use \bkmorse\sportstats\Factory as Factory; | |
$baseball = Factory::create('\bkmorse\sportstats\Baseball'); | |
print $baseball->battingAverage(50, 100); | |
print $baseball->slg(10, 12); |
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
function find_max_sum($v) { | |
$sum = 0; | |
for($i = 0; $i < count($v); $i++) | |
{ | |
if($i%2===0) | |
{ | |
$sum = $v[$i] + $sum; | |
} | |
} |
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
@import "bootstrap/bootstrap.less"; | |
body.landing { | |
.container { | |
.photo { | |
.make-sm-column(6); | |
.make-md-column(4); | |
.make-lg-column(3, 15); | |
} | |
} |
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
--- | |
vagrantfile-local: | |
vm: | |
box: puphpet/centos65-x64 | |
box_url: puphpet/centos65-x64 | |
hostname: '' | |
memory: '512' | |
cpus: '1' | |
chosen_provider: virtualbox | |
network: |
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
select id, created_at, social_username, source, | |
case source | |
when 'TWITTER' then concat('http://twitter.com/statuses/', social_message_id) | |
when 'INSTAGRAM' then (select instagrams.i_link from instagrams where instagrams.i_id = sweepstakes_entries.social_message_id) | |
end as url | |
from sweepstakes_entries; |
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
Warning: Some directories in /usr/local/share/man aren't writable. | |
This can happen if you "sudo make install" software that isn't managed | |
by Homebrew. If a brew tries to add locale information to one of these | |
directories, then the install will fail during the link step. | |
You should probably `chown` them: | |
/usr/local/share/man/man8 | |
Warning: Unbrewed dylibs were found in /usr/local/lib. | |
If you didn't put them there on purpose they could cause problems when |
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":[{"id":"100003912471639_481025108704567","name":"Autunno\/inverno uomo 2014-2015","picture":"https:\/\/scontent-b.xx.fbcdn.net\/hphotos-xap1\/v\/t1.0-9\/p130x130\/10713000_10152426049177671_9138801902197344190_n.jpg?oh=d7df8eb7cefb86b9582875fc7a712283&oe=54CDEBEB","caption":"Sneakers NIKE \n#sneaker #cool #style #nike #colori #sport #love #man","created_time":"2014-10-08T19:09:32+0000","from":{"id":"100003912471639","name":"Cinzia Pizzioli"}},{"id":"100004741412301_354103554757689","picture":"https:\/\/fbcdn-vthumb-a.akamaihd.net\/hvthumb-ak-xap1\/v\/t15.0-10\/10679050_384338771719570_384338441719603_1221_893_t.jpg?oh=71f298d36c92497fb2202d6e4818e937&oe=54B8BB8D&__gda__=1421682427_692a5d78e066fba2b079a8f9b4c3529b","message":"What a flexible bodies they have","description":"#Cool & #Amazing!","created_time":"2014-10-08T19:06:18+0000","from":{"id":"100004741412301","name":"Lovelle Facinabao"}},{"id":"100004946588479_337785333063017","picture":"https:\/\/fbcdn-sphotos-d-a.akamaihd.net\/hphotos-ak-xfp1\/ |
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
/** | |
* Builds a horizontal masonry in whats possbily (i haven't researched | |
* the techniques) a crude manner. | |
* Fits elements into columns if there is room and sets the width of | |
* the container element to contain all the columns. | |
* | |
* Known Issues: | |
* - Does not do anything clever for elements where height exceeds | |
* window height (probably just gets chopped off if overflow: hidden) | |
* - All elements are expected to be the column width |
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
Aberconwy and Colwyn | |
Aberdeen City | |
Aberdeenshire | |
Anglesey | |
Angus | |
Antrim | |
Argyll and Bute | |
Armagh | |
Avon | |
Ayrshire |
NewerOlder