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
[xdebug] | |
xdebug.remote_enable=1 | |
xdebug.remote_handler=dbgp | |
xdebug.remote_port=9000 | |
xdebug.remote_autostart=1 | |
xdebug.remote_connect_back=1 |
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
db.posts.aggregate( [ { $project : { 'comments.author': 1 } }, { $unwind : "$comments" }, { $group : { _id : { comments : "$comments" }, n : { $sum : 1 } } }, { $sort: {"n": -1} } ] ) |
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 src="/user/emails" type="text/javascript"></script> |
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 | |
protected function loadDataAndLabels($data, $graph_type) { | |
$o = ''; | |
foreach($data['labels'] as $label) { | |
foreach($label as $type => $label_name) { | |
$o.= "data.addColumn('$type', '$label_name');\n"; | |
} | |
} | |
$data_count = count($data['data']); |
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 | |
$data = array( | |
'labels' => array( | |
array('string' => 'Sample'), | |
array('number' => 'Piston 1'), | |
array('number' => 'Piston 2') | |
), | |
'data' => array( | |
array('S1', 74.01, 74.03), |
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 | |
use \Zumba\PHPUnit\Extensions\Mongo\TestTrait as MongoTest; | |
class DatabaseTestCase extends \PHPUnit_Extensions_Database_TestCase { | |
use MongoTest { | |
MongoTest::setUp as mongoSetUp; | |
MongoTest::tearDown as mongoTearDown; | |
} | |
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
var getTopCategory = function(category, callback) { | |
var sorter = {}; | |
sorter[category] = -1; | |
this.collection('results').aggregate([ | |
{ $sort: sorter }, | |
{ $project: { | |
_id: 0, | |
name: 1, | |
category_value: '$' + category | |
}}, |
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
// Find a flyer that's at the maximum range | |
var flyer = _.find(roundInfo.getMobs(), function(mob) { | |
return mob.type === 'flyer' && mob.position === 5; | |
}); | |
if (flyer) { | |
commander.target(flyer.id); | |
commander.attackMode('ranged'); | |
return; | |
} |
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
#!/bin/sh | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
# Determine if a file list is passed | |
if [ "$#" -eq 1 ] | |
then | |
oIFS=$IFS | |
IFS=' |
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 Sample { | |
public __construct() { | |
} | |
public function sayHello($name) { | |
return Someclass::getInstance()->hello($name); | |
} |
OlderNewer