> db.foo.update({_id:1}, {$set: {}}, true); db.getLastErrorObj();
{
"updatedExisting" : false,
"n" : 1,
"connectionId" : 1,
"err" : null,
"ok" : 1
This file contains hidden or 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 | |
set -e | |
base_install_dir="$HOME/bin/php-bin" | |
download_dir="$HOME/bin/php-cache" | |
php_tarball="" # set after calling get_php() | |
debug() { | |
echo "===> $1" | |
} |
This file contains hidden or 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 Doctrine\ODM\MongoDB\Tests; | |
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM; | |
class GH895Test extends \Doctrine\ODM\MongoDB\Tests\BaseTest | |
{ | |
public function testQueryWithSelectShouldRefreshDocument() | |
{ |
This file contains hidden or 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 Doctrine\ODM\MongoDB\Tests; | |
use Doctrine\Common\EventSubscriber; | |
use Doctrine\ODM\MongoDB\Events; | |
use Doctrine\ODM\MongoDB\Event\PreUpdateEventArgs; | |
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM; | |
class SO23927996Test extends BaseTest |
This file contains hidden or 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
$ telnet 192.168.13.14 2014 | |
Trying 192.168.13.14... | |
Connected to 192.168.13.14. | |
Escape character is '^]'. | |
hello | |
192.168.12.221: ohai | |
192.168.13.89: GET / HTTP/1.1 | |
Host: 192.168.13.14:2014 | |
Connection: keep-alive | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 |
This file contains hidden or 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
217.249: 10.10.218.139: 10.10.217.247: 10.10.217.232: 10.10.218.16: 10.10.219.203: 10.10.217.101: 10.10.217.212: 10.10.217.249: 10.10.217.249: 10.10.217.162: 10.10.218.74: 10.10.218.170: 10.10.218.178: 10.10.219.196: 10.10.218.249: 10.10.218.60: 10.10.218.70: 10.10.218.154: 10.10.217.197: 10.10.218.81: 10.10.218.5: 10.10.218.128: 10.10.217.173: 10.10.218.149: 10.10.219.147: 10.10.217.249: 10.10.217.186: 10.10.217.232: 10.10.218.168: 10.10.218.174: 10.10.218.191: 10.10.217.212: 10.10.218.16: 10.10.218.139: 10.10.219.203: 10.10.218.193: 10.10.217.101: 10.10.217.247: 10.10.217.173: 10.10.218.168: 10.10.218.74: 10.10.218.5: 10.10.218.249: 10.10.218.170: 10.10.218.149: 10.10.219.196: 10.10.218.178: 10.10.218.70: 10.10.217.197: 10.10.218.60: 10.10.218.154: 10.10.218.128: 10.10.218.81: 10.10.219.147: 10.10.218.191: 10.10.218.174: 10.10.218.139: 10.10.218.193: 10.10.217.249: 10.10.217.186: 10.10.217.162: 10.10.217.212: 10.10.217.101: 10.10.218.16: 10.10.217.232: 10.10.217.247: 10.10.218.5: :q | |
10.10.219.203: 10.10. |
This file contains hidden or 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
make_php () { | |
# Directory for PHP git repo (for git-new-workdir) | |
phpsrcdir="/home/jmikola/workspace/php/php-src" | |
# Git branch for this build (for git-new-workdir) | |
phpbranch="PHP-$1" | |
# Where compiled builds should be installed | |
installdir="/home/jmikola/bin/php" |
This file contains hidden or 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
make_php () { | |
# Directory for PHP git repo (for git-new-workdir) | |
phpsrcdir="$HOME/workspace/php/php-src" | |
# Git branch for this build (for git-new-workdir) | |
phpbranch="PHP-$1" | |
# Directory where PHP builds will be stored | |
buildsdir="$HOME/workspace/php/builds" |
This file contains hidden or 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
$m = new MongoClient(); | |
$m->test->foo->drop(); | |
$m->test->createCollection('foo', ['capped' => true, 'size' => 67108864]); | |
$c = $m->test->foo; | |
$c->insert(['x' => 1]); | |
$cursor = $c->find()->awaitData()->tailable(); | |
while (1) { | |
if (!$cursor->hasNext()) { | |
if ($cursor->dead()) { |