Screenshot:
JSFiddle: https://jsfiddle.net/650spwen/
| #include "windows.h" | |
| #include <tchar.h> | |
| #include <stdio.h> | |
| #define BUFSIZE 4096 | |
| void _tmain(int argc, TCHAR *argv[]) | |
| { | |
| DWORD retval=0; | |
| BOOL success; |
| <?php | |
| function html_entity_encode_unicode($str) { | |
| $str = mb_convert_encoding($str , 'UTF-32', 'UTF-8'); | |
| $t = unpack("N*", $str); | |
| $t = array_map(function($n) { | |
| return $n < 128 ? chr($n) : "&#$n;"; | |
| }, $t); |
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Product Discount On Top Left Corner</title> | |
| <style> | |
| .product{ | |
| border: 1px solid black; | |
| width: 400px; | |
| height: 300px; | |
| position: relative; |
| <?php | |
| return [ | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Validation Language Lines | |
| |-------------------------------------------------------------------------- | |
| | | |
| | The following language lines contain the default error messages used by |
| <?xml version="1.0"?> | |
| <?mso-application progid="Excel.Sheet"?> | |
| <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" | |
| xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"> | |
| <Worksheet ss:Name="tt"> | |
| <Table> | |
| <Row> | |
| <Cell><Data ss:Type="String">Hello</Data></Cell> | |
| </Row> | |
| <Row> |
| <?php | |
| echo sprintf("%10s %10s\n", 'cost', 'time'); | |
| for ($cost = 8; $cost < 20; $cost++) { | |
| $begin = microtime(true); | |
| password_hash('test1234', PASSWORD_BCRYPT, ['cost' => $cost]); | |
| $delta = microtime(true) - $begin; |
| <?php | |
| class User extends BaseModel | |
| { | |
| const PASSWORD_COST = 11; // 这里配置bcrypt算法的代价,根据需要来随时升级 | |
| const PASSWORD_ALGO = PASSWORD_BCRYPT; // 默认使用(现在也只能用)bcrypt | |
| /** | |
| * 验证密码是否正确 | |
| * |
| <?php | |
| $testRounds = 100; | |
| $testTimes = 1000000; | |
| $times = []; | |
| $data = 'abcdefgh'; | |
| for ($i = 0; $i < $testRounds; $i++){ | |
| $begin = microtime(true); |
| <?php | |
| /** | |
| * 计算PHP中各种随机函数的香农熵 | |
| */ | |
| define('DATA_MAX_BITS', 1 * 1024); | |
| define('DATA_MAX_BYTES', DATA_MAX_BITS / 8); | |
| define('TEST_TIMES', 100); | |
| /** |
Screenshot:
JSFiddle: https://jsfiddle.net/650spwen/