This file contains 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 securehasing { | |
public static function registerImplementation($alias, $class) {} | |
public static function instanceForImplementation($alias = 'sha512') {} | |
} | |
interface securehasing_interface { | |
public function random($length = 12); |
This file contains 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 A { | |
public function foo() { | |
B::baz(); | |
} | |
} | |
class B { | |
static public function baz() { |
This file contains 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
<form action="/~tobias/Support.webapp/Public/profile.;update" method="post"> | |
<dl> | |
<dt>Name</dt> | |
<dd><input type="text" name="name" value="Tobias Tom" /></dd> | |
<dt>Email</dt> | |
<dd><input type="text" name="email" value="[email protected]" /></dd> | |
</dl> | |
<p><input type="checkbox" id="passwordInterfaceOption" onchange="document.getElementById('passwordInterface').style.display=this.checked?'block':'none';" /> | |
<label for="passwordInterfaceOption">I would like to change my password</label></p> |
This file contains 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 function deleteAction($identifier) { | |
$this->user = \User\User::instanceWithId($identifier); | |
if (!$this->user) { | |
return self::NotFoundStatus; | |
} | |
if ($this->request->isConfirmed()) { | |
$this->user->delete(); | |
$this->response->layoutVariant = 'Successful'; | |
return self::DeletedStatus; |
This file contains 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
curl -i http://127.0.0.1/~tobias/Support.webapp/Public/user/2.; | |
HTTP/1.0 200 Ok | |
Date: Fri, 11 Sep 2009 18:29:47 GMT | |
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k DAV/2 PHP/5.3.0 | |
X-Powered-By: PHP/5.3.0 | |
Content-Language: en | |
Last-Modified: Fri, 11 Sep 2009 19:12:07 CEST | |
Content-MD5: e4dc2f4198ca5481ce3cce68abd761bd |
This file contains 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 function generatePasswordAction($identifier, $sendByEmail = false) { | |
$this->user = \User\User::instanceWithId($identifier); | |
if (!$this->user) { | |
return self::NotFoundStatus; | |
} | |
if ($this->request->isConfirmed()) { | |
$this->user->password = $this->password = \User\User::generateRandomPassword(); | |
$this->user->save(); |
This file contains 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 | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL|E_STRICT); | |
$xml = <<<XML | |
<html xmlns:s="http://succont.com"> | |
<head> | |
<title s:content="title" /> | |
</head> |
This file contains 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
beaver:1.3 tobias$ phploc ./ | |
phploc 1.2.0 by Sebastian Bergmann. | |
Directories: 1696 | |
Files: 4813 | |
Lines of Code (LOC): 751611 | |
Comment Lines of Code (CLOC): 322498 | |
Non-Comment Lines of Code (NCLOC): 429113 |
This file contains 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
dispatch_apply(count, dispatch_get_global_queue(0, 0), ^(size_t i){ | |
results[i] = do_work(data, i); | |
}); | |
total = summarize(results, count); |
This file contains 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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <dispatch/dispatch.h> | |
int main(void) { | |
dispatch_queue_t the_queue = dispatch_get_concurrent_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT); | |
size_t iterations = 100; |
OlderNewer