php /** * 生成缩略图函数(支持图片格式:gif、jpeg、png和bmp) * @author ruxing.li * @param string $src 源图片路径 * @param
while(strlen($pwd) < $length){ $rand_char = mt_rand(0, $chars_length); $pwd .= $characters[$rand_char];
PHP /** * 上传图片 */ class imgUpload{ static protected $a; protected $formName; //表单名称 protected $directory;
php class Thumb { public function create($srcPath, $dstPath, $dstWidth, $dstHeight) { if (!file_exists($srcPath))
php class ValidationCode { //属性 private $width; private $height; private $codeNum; private $image;
refresh_code() { form1.imgcode.src="verifycode.php?a="+Math.random(); }
随机生成难点是在于如何避免碰撞,有人说用md5,GUID这些机制啊,当然可以,但是做为账号,看着有乱,而且生成位数也过长。 本方法只需要解决1秒内的并发碰撞就可以,因为固定头部采用的是unixti
你的学历、学校、专业、英语成绩、论文、竞赛获奖、工作经验、参与开源项目等背景情况?一定很牛吧? A: 真的不牛,矮丑穷,纯 RP 爆发而已。本科天津大学软件学院,硕士天津大学计算机学院。高中无竞赛经历,本科阶段
Gitalist 是一个基于Web的 Git 资料库浏览器。 主要特性: 支持多库 支持多分支 提交的比较 生成Atom聚合 对提交历史代码进行着色 兼容Gitweb.cgi URL 项目主页:
com/lyle-nel/siga siga(simple genetic algorithm) This is a small experiment that focuses on leveraging population-based
利用jQuery为一组图标链接添加当鼠标移过时,图标会产生向上升起+倒影的效果。
利用jQuery创建一个Twitter风格的下拉登录表单。
http://www.boarsoft.com/javascript/dtree MagicDTree是 JQuery 著名树形插件Dynatree的包装类,增加右键菜单,添加、删除、更新接口。 基本示例
Hibernate Annotator能够让你利用Java 5注释(annotations)来生成Hibernate mapping xml文件.它可作为那些原来使用xdoclet但要移植到Java5的一个替代品或作为Hibernate
P This book offers Python programmers one place to look when they need help remembering or deciphering the syntax of this open source language and its many powerful but scantily documented modules. This comprehensive reference guide makes it easy to look up the most frequently needed information--not just about the Python language itself, but also the most frequently used parts of the standard library and the most important third-party extensions.
P Java in a Nutshell, 5th Edition
那么,这时候就要A*算法就可以排上用场了。 A*算法和普通的算法有什么区别呢?我们可以用一个示例说明一下: /* * 0 0 0 0 0 * 1 1 1 1 1 * 1 0 0 0 1 * 1 0 0 0 1
When.js 是 cujojs 的轻量级的 Promises/A 和 when() 实现,从 wire.js 的异步核心和 cujojs 的 IOC 容器派生而来。包含很多其他有用的 Promiss
这是一个iOS库,用来对你的iOS应用程序执行远程控制和监控的A/B测试。提供UIButton控制按钮文本和按钮的背景图像。还提供了一个通用的测试字符串值的机制可以用来控制任何消息传递或行为。
S4A是使Arduino开源硬件平台能够简单编程的Scratch修改版。在S4A中,提供了一系列新的传感器模块和输出模块,并通过它们连接到你的Arduin控制器上。 项目主页: http://www