V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  xing393939  ›  全部回复第 16 页 / 共 20 页
回复总数  388
1 ... 8  9  10  11  12  13  14  15  16  17 ... 20  
2013-05-10 15:01:55 +08:00
回复了 t2doo 创建的主题 问与答 谁要好域名,开个价扔给我,我要淘个好域名啊~
@cloverstd 贿赂。。。。
2013-05-09 14:09:53 +08:00
回复了 aisensiy 创建的主题 设计 我想收集大家觉得很酷的代码段,我想做一个这样的文化衫!
do {
db.query("drop database myself");
} then game over
2013-05-08 13:11:44 +08:00
回复了 ookiddy 创建的主题 分享创造 [搜狗狗] -- 个性化影片推荐,帮忙测试一下...sogougou.cn
不错,偶尔不知道看什么电影可以上来淘淘
http://open.189works.com/doc/authCode.html 没有用过,不知道怎么样
2013-04-23 10:24:27 +08:00
回复了 workaholic 创建的主题 程序员 求get请求中参数加密解密算法
<?php

$a = encode(2147483642);
echo $a, '<br/>';
$b = decode($a);
echo $b;

$time=microtime(1);
for ($i=0;$i<100000;$i++)
hash('md5', 'string');
echo microtime(1)-$time,': hash/md5<br>';

$time=microtime(1);
for ($i=1;$i<200;$i++) {
$s = encode($i);
//echo $s, '<br>';
echo decode($s), '<br>';

}
echo microtime(1)-$time,': jia/jie<br>';

function encode($id)
{
if ($id > 100) {
$id = (string)$id;
$len = strlen($id) - 1;
$id = $id{0} . $id{$len} . substr($id, 2, -1) . $id{1};
}
$id += 60512868;
$str = base_convert($id, 10, 36);
$l = strlen($str);
$str = substr($str, 0, $l - 2) . xchange(substr($str, -2, 1)) . xchange(substr($str, -1));
return $str;
}

function decode($str)
{
$l = strlen($str);
$str = substr($str, 0, $l - 2) . xchange(substr($str, -2, 1), 1) . xchange(substr($str, -1), 1);
$id = base_convert($str, 36, 10);
$id -= 60512868;
if ($id > 100) {
$id = (string)$id;
$len = strlen($id) - 1;
return $id{0} . $id{$len} . substr($id, 2, -1) . $id{1};
} else {
return $id;
}
}

function xchange($s, $decode = 0)
{
if ($decode) {
$str = "ytuvsrqzxwilng7fed2cbajk1096h53m8o4p";
} else {
$str = "poiuytrewqlkjhgfdsamnbvcxz6541239807";
}
$s = base_convert($s, 36, 10);
return $str{$s};
}

?>
2013-04-23 09:59:54 +08:00
回复了 workaholic 创建的主题 程序员 求get请求中参数加密解密算法
sorry 看错了 是有问题,应该是个bug,有时间修复下
2013-04-23 09:56:54 +08:00
回复了 workaholic 创建的主题 程序员 求get请求中参数加密解密算法
@workaholic
<?php

$a = encode(2147483642);
echo $a, '<br/>';
$b = decode($a);
echo $b;

function encode($id) {
if($id > 100) {
$id = (string) $id;
$len = strlen($id) - 1;
$id = $id{0} . $id{$len} . substr($id, 2, -1). $id{1};
}
$id += 60512868;
$str = base_convert($id, 10, 36);
$str = substr($str, 0, -2) . xchange($str{4}) . xchange($str{5});
return $str;
}

function decode($str) {
$str = substr($str, 0, -2) . xchange($str{4}, 1) . xchange($str{5}, 1);
$id = base_convert($str, 36, 10);
$id -= 60512868;
if($id > 100) {
$id = (string) $id;
$len = strlen($id) - 1;
return $id{0} . $id{$len} . substr($id, 2, -1). $id{1};
} else {
return $id;
}
}

function xchange($s, $decode = 0) {
if($decode) {
$str = "ytuvsrqzxwilng7fed2cbajk1096h53m8o4p";
} else {
$str = "poiuytrewqlkjhgfdsamnbvcxz6541239807";
}
$s = base_convert($s, 36, 10);
return $str{$s};
}
?>
2013-04-23 09:56:25 +08:00
回复了 workaholic 创建的主题 程序员 求get请求中参数加密解密算法
2013-04-22 13:37:07 +08:00
回复了 workaholic 创建的主题 程序员 求get请求中参数加密解密算法
2013-04-22 10:22:24 +08:00
回复了 workaholic 创建的主题 程序员 求get请求中参数加密解密算法
办法太多了吧,自己弄个就行,用网上的说不定一眼就被人看出来了
2013-04-16 23:17:14 +08:00
回复了 jason2be 创建的主题 iPhone 废旧 iPhone 怎么处理?
300卖我吧
2013-04-16 19:51:16 +08:00
回复了 xing393939 创建的主题 Linode linode这么突然变得很慢啊
@laoyu 你是哪里的?
2013-04-16 19:43:37 +08:00
回复了 xing393939 创建的主题 Linode linode这么突然变得很慢啊
美国的
2013-04-06 12:25:10 +08:00
回复了 xing393939 创建的主题 问与答 有没有api可以判断图片是人的照片,并且不是明星
@sinxccc 有这样考虑过,不知道能不能用google图片搜索
2013-03-10 11:16:10 +08:00
回复了 tamamaxox 创建的主题 奇思妙想 球一台比较geek的手持设备
2013-03-08 15:27:06 +08:00
回复了 cisier 创建的主题 问与答 这种风格名字叫什么?很炫
视差滑动效果,参考启维网
2013-03-08 13:06:34 +08:00
回复了 Koolday 创建的主题 分享发现 调戏smartVPS的客服,结果(似乎)被反调戏了……
我觉得你可以点一个系着红领巾的品种
1 ... 8  9  10  11  12  13  14  15  16  17 ... 20  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3215 人在线   最高记录 6547   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 32ms · UTC 13:43 · PVG 21:43 · LAX 06:43 · JFK 09:43
Developed with CodeLauncher
♥ Do have faith in what you're doing.