A Brief Introduction to Multi-Threading in PHP
- Foreword
- Execution
- Sharing
- Synchronization
- Pitfalls
//This is a port of Ken Perlin's "Improved Noise" | |
// http://mrl.nyu.edu/~perlin/noise/ | |
// Originally from http://therandomuniverse.blogspot.com/2007/01/perlin-noise-your-new-best-friend.html | |
// but the site appears to be down, so here is a mirror of it | |
class Perlin { | |
var $p, $permutation, $seed; | |
var $_default_size = 64; |
<?php | |
define("COMPARATOR_VERSION", "0.1"); | |
ini_set("memory_limit", "512M"); | |
$node1 = json_decode(@file_get_contents($argv[1]), true); | |
if($node1 == ""){ | |
echo "Provide a valid json file produced by the Extractor".PHP_EOL; | |
exit(1); | |
} | |
$node2 = json_decode(@file_get_contents($argv[2]), true); |
<?php | |
/* | |
UTF-8 encoded. | |
UPPERCASE words are replaced with data, do NOT modify that, only move it to the correct place. | |
Words like PocketMine, Mojang, Minecraft, Pocket Edition and Mine Pocket shouldn't be translated. | |
Don't modify HTML tags (exception: text inside the tags and NOT in UPPERCASE) | |
Translations completed: English (shoghicp), Spanish (shoghicp), Standard Chinese (HAZ_ljyloo), Dutch (Intyre), Japanese (Omattyao), Russian (Alexey Egoshin), French (symonium), German (Xmoe) | |
Translations being publicly checked: Vietnamese (Phuocpeter19), Italian (ceppopipc1999), Serbian (xXStefoXx) | |
Translations in progress: Korean (bigswbigsw), Irish (A9_0Z), Turkish |
<?php | |
/* | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. |
This protocol aims to use less bandwidth sending big packets / chunks of smaller packets compressed using DEFLATE. It works encapsulating raw packets into this protocol, without modifying them. It follows a mixed approach, letting normal packets work and handling compressed packet seamlessly. Both parties must support this protocol, so a Handshake system exists.
All numbers are Big-endian
| Packet ID | Field Name | Type | Notes |
'use strict'; | |
var COMPILED = !0, goog = goog || {}; | |
goog.global = this; | |
goog.DEBUG = !1; | |
goog.LOCALE = "en"; | |
goog.provide = function (a) { | |
if (!COMPILED) { | |
if (goog.isProvided_(a)) | |
throw Error('Namespace "' + a + '" already declared.'); |
-
/ \
/ \
/ PocketMine \
/ MP \
|\ @shoghicp /|
|. \ / .|
| .. \ / .. |
| .. | .. |
<?php | |
if(!extension_loaded("pthreads") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "pthreads." . PHP_SHLIB_SUFFIX) === false){ | |
trigger_error("Unable to find pthreads extension", E_USER_ERROR); | |
exit(1); | |
} | |
function kill($pid){ | |
$uname = strtoupper(php_uname("s")); |