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
/* | |
highlight v3 !! Modified by Jon Raasch (http://jonraasch.com) to fix IE6 bug !! | |
Highlights arbitrary terms. | |
<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html> | |
MIT license. |
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
// https://github.com/bcit-ci/CodeIgniter/pull/1750 | |
$nb = 1000; | |
$str = str_repeat('<lorem ipsum here>' . "\n", 10); | |
$t1 = microtime(true); | |
for ($i = $nb; $i--; ) { | |
preg_replace('/\s+/', ' ', $str); | |
} | |
$t2 = microtime(true); |
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 | |
file_exists('./bootstrap/compiled.php') || exit('File compiled.php not found'); | |
$content = file_get_contents('./bootstrap/compiled.php'); | |
$root = realpath('.'); | |
// foo\bar --> foo/bar |
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 | |
require './vendor/autoload.php'; | |
use Stringy\Stringy; | |
class MyStringy extends Stringy { | |
public $managedCharsArray; |
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 | |
require './vendor/autoload.php'; | |
use Stringy\Stringy; | |
class MyStringy extends Stringy { | |
// http://php.net/manual/en/language.oop5.visibility.php#language.oop5.visibility-other-objects |
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 | |
require './vendor/autoload.php'; | |
use Patchwork\Utf8; | |
use Stringy\Stringy; | |
class MyStringy extends Stringy { | |
public function charsArray() { |
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
@SETLOCAL | |
@SET expr=%* | |
@SET expr=%expr:"=\"% | |
@IF ^%expr:~-1%==^; SET expr=%expr:~0,-1% | |
@php -r "var_dump(%expr%);" | |
::A few examples: | |
::phpdump PHP_OS // "Everything should be made as simple as possible, but not simpler." | |
::phpdump ord("\n") // double quotation marks don't produce errors | |
::phpdump hexdec('ff'); // trailing semicolon should be omitted, yet it is supported for convenience |
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
' taken from FreeFileSync - www.freefilesync.org | |
set argIn = WScript.Arguments | |
num = argIn.Count | |
if num = 0 then | |
WScript.Echo "Call a Windows batch file (*.cmd, *.bat) without showing the console window" & VbCrLf & VbCrLf &_ | |
"Command line:" & VbCrLf & "WScript HideConsole.vbs MyBatchfile.cmd <command line arguments>" | |
WScript.Quit 1 | |
end if |
OlderNewer