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 | |
function xpathEscape($query, $default_delim = '"') | |
{ | |
if (strpos($query, $default_delim) === false) | |
return $default_delim . $query . $default_delim; | |
preg_match_all("#(?:('+)|[^']+)#", $query, $matches); | |
list($parts, $apos) = $matches; | |
foreach ($parts as $i => &$part) { | |
$delim = $apos[$i] ? '"' : "'"; | |
$part = $delim . $part . $delim; |
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
var Mists = {}; | |
Mists.ready = function () { | |
var user = new Mists.User(); | |
user.login(function () { | |
var wall = new Mists.Wall(user); | |
var wallButton = Mists.Menu.getInstance().getWallButton(); | |
if (wallButton.length) { | |
wallButton.attr('href', wall.getUrl()); | |
wall.checkNewMessages(function (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
<?php | |
namespace Acme\HelloBundle\Form\DataTransformer; | |
use Symfony\Component\Form\DataTransformerInterface; | |
use Symfony\Component\Form\Exception\UnexpectedTypeException; | |
use Symfony\Component\Form\Exception\TransformationFailedException; | |
/** | |
* A simple number transformer that allows either comma or dot as decimal separator. | |
* |
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 Acme\HelloBundle\Extensions; | |
/** | |
* Inspect Twig templates with a debugger. | |
* Usages: | |
* {{ inspect() }} | |
* {{ inspect(myVar) }} | |
*/ |
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
Ext.override(Ext.data.Store, { | |
constructor: function(config) { | |
this.initConfig(config); | |
this.callParent(arguments); | |
this.addEvents( | |
/** | |
* @event clone | |
* Fires when a store is cloned | |
* @param {Ext.data.Store} this | |
* @param {Ext.data.Store} clone The new clone |
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 | |
declare(strict_types=1); | |
use PHPUnit\Framework\TestCase; | |
class WhitespaceMatchTest extends TestCase { | |
const SLASH_S = "#\s#"; | |
const SLASH_S_U = "#\s#u"; |