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 | |
| /* This class is part of the XP framework | |
| * | |
| * $Id$ | |
| */ | |
| /** | |
| * Throwable extension methods | |
| * | |
| * @see https://github.com/xp-framework/xp-framework/pull/136 |
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/tools/src/main/php/xp/runtime/Reflect.class.php b/tools/src/main/php/xp/runtime/Reflect.class.php | |
| index 58b2bf4..8941f2f 100644 | |
| --- a/tools/src/main/php/xp/runtime/Reflect.class.php | |
| +++ b/tools/src/main/php/xp/runtime/Reflect.class.php | |
| @@ -33,11 +33,13 @@ | |
| * Prints methods - static first, rest then | |
| * | |
| * @param lang.reflect.Method[] methods | |
| + * @param bool methodComments | |
| */ |
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
| inotifywait -r -m src/ | while read line ; do echo -e "\033]0;"`unittest src | tee unittest.tmp | tail -n 3 | head -n 1`"\007"; cat unittest.tmp ; rm unittest.tmp ; done |
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
| Certificate: | |
| Data: | |
| Version: 1 (0x0) | |
| Serial Number: | |
| 7d:d9:fe:07:cf:a8:1e:b7:10:79:67:fb:a7:89:34:c6 | |
| Signature Algorithm: sha1WithRSAEncryption | |
| Issuer: C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network | |
| Validity | |
| Not Before: May 18 00:00:00 1998 GMT | |
| Not After : Aug 1 23:59:59 2028 GMT |
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/core/src/main/php/lang/AbstractClassLoader.class.php b/core/src/main/php/lang/AbstractClassLoader.class.php | |
| index 2b81b01..2992162 100644 | |
| --- a/core/src/main/php/lang/AbstractClassLoader.class.php | |
| +++ b/core/src/main/php/lang/AbstractClassLoader.class.php | |
| @@ -19,11 +19,12 @@ | |
| * Load the class by the specified name | |
| * | |
| * @param string class fully qualified class name io.File | |
| + * @param string intent default NULL what kind of class we're looking for | |
| * @return lang.XPClass |
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 | |
| /* This class is part of the XP framework | |
| * | |
| * $Id$ | |
| */ | |
| uses('lang.types.Character', 'lang.types.Bytes'); | |
| if (extension_loaded('mbstring')) { | |
| fputs(STDERR, "String.mbstring.partial.php\n"); |
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 | |
| function rescue($mask, $handle) { | |
| return function($code, $message, $file, $line, $context) use($mask, $handle) { | |
| if ($code & $mask) { | |
| return $handle($code, $message, $file, $line, $context); | |
| } | |
| }; | |
| } | |
| function begin($try, $handle) { |
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 | |
| use \util\profiling\Timer; | |
| use \lang\Runtime; | |
| class EndsWithTest extends Object { | |
| public static function main($args) { | |
| foreach (['not-contained', 'contained'] as $needle) { | |
| foreach (['', 'Hello runners', file_get_contents(__FILE__), file_get_contents('README.md')] as $haystack) { | |
| $haystack.= 'contained'; |
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
| #!/bin/sh | |
| dir=${1-test} | |
| mkdir -p $dir | |
| rm -f $dir/updated | |
| while read input ; do | |
| id=${input%=*} | |
| name=${input#*=} |
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
| #include <wchar.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <fcntl.h> | |
| #include <io.h> | |
| int wmain(int argc, wchar_t** argv) { | |
| int i; | |
| _setmode(_fileno(stdout), _O_U8TEXT); |