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
"use strict" | |
var $ = require('jquery'); | |
require('fixedheadertable'); | |
// ... |
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 Devtools; | |
// /vendor/Devtools/Response.php | |
class Response | |
{ | |
... | |
} |
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
$stmt = $this->connection->prepare($queryString); | |
$executeResult = !is_null($params) | |
? $stmt->execute($params) | |
: $stmt->execute(); | |
$data = $stmt->fetchAll($fetchType); | |
$isInsertStatement = empty($data) | |
&& $executeResult | |
&& ($lastInsertId = $this->connection->lastInsertId()) !== 0; | |
$isUpdateStatement = empty($data); |
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
function it_saves_values_to_repository( | |
Devtools\Model $model, | |
Repository\UserRepositoryAdapter $repository | |
) { | |
$repository | |
->getProperties() | |
->shouldBeCalled() | |
->willReturn( | |
[ | |
'userId', |
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
interface Entity {} | |
class UserEntity implements Entity {} | |
interface Repository | |
{ | |
public function persist(Entity $entity); | |
} | |
class UserRepository implements Repository | |
{ |
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
function! TagbarGotoTag() | |
normal! "zyiw | |
call tagbar#OpenWindow('fcj') | |
:exe "/".@z."" | |
" Need to send a carriage return here to select the tag | |
:nohlsearch | |
endfunction |
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 | |
define(MQ_SEND_ACCESS , 2); | |
define(MQ_DENY_NONE , 0); | |
$msgQueueInfo = new COM("MSMQ.MSMQQueueInfo") or die("can not create MSMQ Info object"); | |
$msgQueueInfo->PathName = ".\TestQueue"; | |
$msgQueue = new COM("MSMQ.MSMQQueue") or die("can not create MSMQ object"); | |
$msgQueue=$msgQueueInfo->Open(MQ_SEND_ACCESS, MQ_DENY_NONE ); | |
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
public static function error_handler($errno, $errstr, $errfile, $errline, $errcontext) { | |
global $errorLog; | |
if (is_array($errstr) || is_object($errstr)) { | |
$errstr = var_export($errstr, true); | |
} | |
$message = "$errno:$errfile:$errline:$errstr:".json_encode($errcontext); | |
if (isset($errorLog) && get_class($errorLog)==='Devtools\Log') { | |
$errorLog->write($message, false); | |
} else { | |
echo $message; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
mysqldump -u root -p[password] [db_src] | mysql -u root -p[password] [db_dest] |