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 | |
interface DoSomething | |
{ | |
function doSomething(); | |
} | |
trait Test | |
{ |
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 | |
$usersGrouped = array(); | |
foreach($users as $user) | |
{ | |
$key = sprintf("%s:%s:%s", $user->field1, $user->field2, $user->field3); | |
if(!isset($usersGrouped[$key])) | |
{ | |
$usersGrouped[$key] = 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
//Module fasctgi | |
class Fastcgi | |
{ | |
} | |
class FastcgiRequestFactory implements RequestFactory | |
{ | |
public method getRequest() |
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
package require http | |
namespace eval twitter { | |
variable status_url "http://api.twitter.com/1/statuses/user_timeline/" | |
bind pub -|- "!twitter" twitter::tweet | |
} | |
proc twitter::tweet {nick uhost hand chan argv} { | |
if {[string length $argv] < 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
def add_role(subject, role): | |
for name, function in inspect.getmembers(role, predicate=inspect.isfunction): | |
setattr(subject, name, types.MethodType(function, subject)) | |
def remove_role(subject, role): | |
for name, function in inspect.getmembers(role, predicate=inspect.isfunction): | |
delattr(subject, name) | |
class Person: | |
pass |
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
diff --git a/src/components/compiler/assembler.c b/src/components/compiler/assembler.c | |
index 42dad59..2a36bfe 100644 | |
--- a/src/components/compiler/assembler.c | |
+++ b/src/components/compiler/assembler.c | |
@@ -446,6 +446,7 @@ static void _assembler_output_frame(t_dll *frame, FILE *f) { | |
case OPERATOR_XOR : fprintf(f, "XOR"); break; | |
case OPERATOR_SHL : fprintf(f, "SHL"); break; | |
case OPERATOR_SHR : fprintf(f, "SHR"); break; | |
+ case OPERATOR_COA : fprintf(f, "COA"); break; | |
} |
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
assignment_expression: | |
conditional_expression { $$ = $1; } | |
| coalesce_expression { $$ = $1; } | |
| unary_expression assignment_operator assignment_expression { $$ = ast_assignment($2, $1, $3); } | |
; | |
coalesce_expression: | |
T_IDENTIFIER T_COALESCE scalar_value { $$ = ast_opr(T_COALESCE, 2, $1, $3); } | |
; |
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
a = requests.get('http://www.google.nl') | |
dir(a) | |
['__bool__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__nonzero__', '__qualname__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_content', '_content_consumed', 'apparent_encoding', 'close', 'connection', 'content', 'cookies', 'encoding', 'headers', 'history', 'iter_content', 'iter_lines', 'json', 'links', 'ok', 'raise_for_status', 'raw', 'reason', 'request', 'status_code', 'text', 'url'] |
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
git-feature-branch :: (topic) » git log --all --decorate --graph --oneline ~/tmp/git-feature-branch | |
* 420737a (HEAD, topic) B4 | |
* d3fe9b6 B3 | |
|\ | |
* | 046de8c B2 | |
* | fc175ec B1 | |
| | * 2f01b7a (master) A3 | |
| |/ | |
| * 926464b A2 | |
|/ |
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 Test\Controller; | |
use Zend\Mvc\Controller\AbstractActionController; | |
use Zend\View\Helper\ViewModel; | |
class TestController extends AbstractActionController | |
{ | |
public function indexAction() |