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/bash | |
# supervisor job control | |
function job() | |
{ | |
if [ $# -gt 0 ]; then | |
cmd=$1 | |
else | |
cmd="status" |
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 | |
/** | |
* 实际业务操作 | |
*/ | |
class business | |
{ | |
/** | |
* 操作入口 | |
*/ |
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 | |
$start = @$_GET['start']; | |
$start || $start = 0; | |
$d = file_get_contents('http://www.douban.com/photos/album/20987752/?start='.$start); | |
preg_match_all('/\/photos\/photo\/(\d{10})\/"/i', $d, $photo_ms); | |
preg_match_all('/http:\/\/img(\d{1})\.douban\.com\//i', $d, $server_ms); | |
preg_match_all('/class="photolst_photo" title="(.*?)"/is', $d, $title_ms); |
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
int a = 10000, b, c = 2800, d, e, f[2801], g; | |
main() | |
{ | |
for(; b - c ;) | |
{ | |
f[b++] = a / 5; | |
} | |
for(; d = 0, g = c * 2; c -= 14, printf("%.4d", e + d / a), e = d % a) | |
{ |
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 | |
/** | |
* 圆周率计算(BBP) | |
* @author Moyo <[email protected]> | |
* @url http://moyo.uuland.org/code/php-pi-calc/ | |
* @version 1.0 | |
* @date 2013.01.12 | |
*/ |
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
/* | |
* Computation of the n'th decimal digit of \pi with very little memory. | |
* Written by Fabrice Bellard on January 8, 1997. | |
* | |
* We use a slightly modified version of the method described by Simon | |
* Plouffe in "On the Computation of the n'th decimal digit of various | |
* transcendental numbers" (November 1996). We have modified the algorithm | |
* to get a running time of O(n^2) instead of O(n^3log(n)^3). | |
* | |
* This program uses mostly integer arithmetic. It may be slow on some |
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 | |
/** | |
* DSN 字符串解析 | |
* @param string $dsn | |
*/ | |
function dsn_resolver($dsn) | |
{ | |
preg_match('/^([a-z]+)\:\/\/(\w+)[\:]?(\w+)?[@]+([\w|\.]+)?[\:]?([0-9]+)?[\/]?(\w+)$/i', $dsn, $matchs); | |
if ($matchs) |
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 | |
/** | |
* 代理管理 | |
*/ | |
class ProxyManager | |
{ | |
/** | |
* 创建类代理 | |
* @param type $className |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}] | |
[HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1] | |
@="Microsoft Internet Controls" | |
[HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0] | |
[HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0\win32] | |
@="C:\\WINDOWS\\system32\\ieframe.dll" |
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
@echo off | |
::需要设置的网络,一般为“本地连接”或者“无线网络连接” | |
set name="无线网络连接" | |
::请根据您的参数修改以下数据 | |
::设置 IP地址 | |
set ipaddress=18.1.16.169 | |
::设置 子掩码 | |
set mask=255.255.252.0 | |
::设置 网关 | |
set gateway=18.1.19.254 |