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 | |
class F { | |
private function __construct() { } | |
public static function factory() { | |
// Make instance and return | |
} | |
} |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<container xmlns="http://umpirsky.com/schema/element/configuration"> | |
<elements> | |
<element> | |
<a attr="at"/> | |
<e attr="at"/> | |
<e attr="at"/> | |
<e attr="at"/> | |
</element> |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<container xmlns="http://umpirsky.com/schema/element/configuration"> | |
<elements> | |
<element> | |
<a attr="at"/> | |
<e attr="at"/> | |
<e attr="at"/> | |
<e attr="at"/> | |
</element> |
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
cut-to-clipboard | |
"{% trans %}" paste-from-clipboard "{% endtrans %}" |
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 My\Security\Factory; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\Security\Core\Exception\BadCredentialsException; | |
use Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener; | |
use Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener; | |
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; | |
use Symfony\Component\Security\Core\SecurityContextInterface; |
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 | |
$file = new SplFileObject('/path/to/file.csv', 'rb'); | |
$file->setFlags(SplFileObject::READ_CSV | SplFileObject::SKIP_EMPTY); | |
$file->setCsvControl(';'); | |
foreach($file as $data) { | |
// $data is array | |
} |
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 | |
class SoapClient extends \SoapClient { | |
function __doRequest($request, $location, $action, $version, $one_way = null) { | |
$headers = array( | |
'Method: POST', | |
'Connection: Close', | |
'User-Agent: PHP Soap Client', |
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 | |
/** | |
* Admin area. | |
*/ | |
class AdminController extends Zend_Controller_Action { | |
public function preDispatch() { | |
if ( |
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
<glade-catalog name="save_project_repository_notifier_dialog" domain="glade-3" | |
depends="gtk+" version="1.0"> | |
<glade-widget-classes> | |
<glade-widget-class title="Save Project" name="SaveProjectRepositoryNotifierDialog" | |
generic-name="SaveProjectRepositoryNotifierDialog" parent="GtkDialog" | |
icon-name="widget-gtk-window"/> | |
</glade-widget-classes> | |
</glade-catalog> |
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
print tmp['logs'] | |
print dict(tmp['logs'].items()) | |
tmp['logs'] = dict(tmp['logs'].items()) | |
print tmp['logs'] | |
prints: | |
<desktopcouch.records.RecordDict object at 0xa1d0f0c> | |
{} | |
<desktopcouch.records.RecordDict object at 0xa1d0f0c> |
OlderNewer