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
| Daniels-MacBook-Air:5735077 daniel$ php test.php | |
| escape1: 52.938008308411µs. | |
| escape2: 11.997318267822µs. | |
| escape3: 11.176705360413µs. | |
| escape4: 11.816596984863µs. | |
| escape5: 10.962629318237µs. | |
| escape6: 12.953281402588µs. | |
| Daniels-MacBook-Air:5735077 daniel$ php test.php | |
| escape1: 54.372382164001µs. | |
| escape2: 11.764526367188µs. |
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
| <!DOCTYPE html> | |
| <html lang="en" dir="ltr"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>rel=":stylesheet" safety test</title> | |
| <link rel="stylesheet" href="safe.css"> | |
| <link rel=":stylesheet" href="unsafe.css"> | |
| </head> | |
| <body> | |
| <p>Background color indicates safety within this browser; Blue = Safe, only rel="stylesheet" is loaded. Red = Unsafe, rel=":stylesheet" was loaded as a stylesheet.</p> |
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
| { | |
| "require": { | |
| "easyrdf/easyrdf": "@beta" | |
| } | |
| } |
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 | |
| $ns = json_decode( file_get_contents( "http://prefix.cc/popular/all.file.json" ) ); | |
| foreach ( $ns as $k => $v ) { | |
| if ( is_null( $v ) ) { | |
| unset( $ns->{$k} ); | |
| } | |
| } | |
| $types = array( '/ns/', '/ns#', '/rdf/', '/rdf#', '/ns/', '/ns#', '/schema/', '/schema#', '/ontologies/', '/ontologies#', '/vocab/', '/vocab#', '/namespaces/', '/namespaces#', '/ontology/', '/ontology#', '/xml/', '/xml#', '/owl/', '/owl#', '/schema/', '/schema#', '/spec/', '/spec#', '/terms/', '/terms#', '/schemas/', '/schemas#' ); | |
| $types = array_combine( $types, array_fill( 0, count( $types ), 0 ) ); |
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
| @media screen { | |
| .a { color: red; } | |
| } | |
| @media screen and (max-width: 600px) { | |
| .a { color: blue; } | |
| } | |
| @media screen { | |
| .b { color: green; } | |
| } |
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
| import logging, gevent | |
| from gevent import monkey | |
| from stompest.config import StompConfig | |
| from stompest.protocol import StompSpec | |
| from stompest.sync import Stomp | |
| ## Ideally this code (or something like it) would work without the following two lines | |
| monkey.patch_socket() | |
| monkey.patch_select() |
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 | |
| $wgResourceModules['skins.yourskin'] = array( | |
| 'styles' => array( | |
| 'yourskin/yourskin.css' => array( 'media' => 'screen' ), | |
| ), | |
| 'remoteBasePath' => &$GLOBALS['wgStylePath'], | |
| 'localBasePath' => &$GLOBALS['wgStyleDirectory'], | |
| ); |
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 TemplateNode { | |
| } | |
| class TemplateText extends TemplateNode { | |
| } | |
| class TemplateCondition extends TemplateNode {} |
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 time = 0; | |
| [ | |
| [ 0, 'This is the new notification system.' ], | |
| [ 6, 'As you can see it has autohide just like the previous one.' ], | |
| [ 6, 'And clicking on a message will also hide it just like before.' ], | |
| [ 6, 'But this time arround.' ], | |
| [ 1, 'We support multiple messages.' ], | |
| [ 2, 'Any sane number of them, really.' ], | |
| [ 6, 'Auto-hide is good and all. But frankly sometimes you just HAVE to have a notification stick around.' ], | |
| [ 1, 'This one uses { autoHide: false }', { autoHide: false } ], |
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 Application { | |
| // [...] | |
| function getOwners() { | |
| $res = $db->select( | |
| array( 'user', 'application_owner' ), | |
| User::selectFields(), | |
| array( 'ao_app' => $this->getID() ), | |
| __METHOD__, | |
| null, |