摘要: 虽然PHP提供了散列和加密函数、字符串函数,我们还是有必要采取额外的安全措施以确保用户的信息安全。给密码加salt,也就是在对密码进行散列计算时添加额外的字符串,是一种相当简单有效地增强安全性的方法。 salt是一个字符串,可以事先定义好,也可以随机产生。在对用户输入数据进行散列时,就是用它给输入数据加料。 如果不适用salt,会这样对密码进行散列:$hash = sha1($password); 下面的代码给上面这个散列运算加了点随机的salt:$salt = substr(mdt(time()), 0, 7); //创建随机salt$hash = $salt. sha... 阅读全文
posted @ 2014-02-22 13:57 wannianma 阅读(1998) 评论(0) 推荐(0) 编辑
摘要: DescriptionGoAccess is a very handy tool, that runs in the terminal on most *nix Systems (e.g. Linux, Mac OS X, BSD etc.) and displays relatime data gathered from Apache’s access logfile.It offers a very structured display with different “modules” that break down the parsed access.log data into sect 阅读全文
posted @ 2014-02-05 20:31 wannianma 阅读(502) 评论(0) 推荐(0) 编辑
摘要: 设置 style中 z-index:autoauto可定义为一个值(整数数字),越大代表越置前,如可定义为:z-index:9999。若定义为-1,代表为最底层。另:若是会被一些FLASH文件给遮住,可将flash对象的参数wmode设置为transparent即可 阅读全文
posted @ 2014-01-25 01:33 wannianma 阅读(1874) 评论(0) 推荐(0) 编辑
摘要: 用Navicat导出的SQL文件中看到如下语句:DROP TABLE IF EXISTS `ls_about`;CREATE TABLE `ls_about` ( `id` int(5) NOT NULL AUTO_INCREMENT, `title` varchar(1000) DEFAULT NULL, `type_id` tinyint(2) DEFAULT NULL, `author` varchar(16) DEFAULT NULL, `pics` varchar(50) DEFAULT NULL, `content` longtext, `times` datetim... 阅读全文
posted @ 2014-01-22 22:56 wannianma 阅读(1186) 评论(0) 推荐(0) 编辑
摘要: 找到Apache安装目录下httpd.conf这个文件,搜索找到,“LoadModule rewrite_module modules/mod_rewrite.so”,找到这一行,去掉前面的“#”; 阅读全文
posted @ 2014-01-22 18:55 wannianma 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 1990年代初,微软计划进入企业数据库市场,开始给圈内的高手打电话挖角时,发现所有人都会提及一个名字,更令人惊讶的是,所有人都会说这个人比我更强,或者他已给我打过电话谈论此事。这个奇人,就是Jim Gray。1998年,他因为数据库尤其是事务处理方面的开创性贡献而获得图灵奖。1944年1月12日,Jim Gray生于美国旧金山一个普通人家,母亲是教师,父亲在军队服役。大概七岁时父母离异。因为家里穷,1961年Gray选择进入公立的加州大学伯克利分 校就读。第一学年他曾因化学成绩糟糕一度放弃学业,跑到General Dynamics做实习生。六个月后对公司感到厌倦回到校园时,他选择了数值分析、离 阅读全文
posted @ 2013-12-05 22:36 wannianma 阅读(1370) 评论(0) 推荐(0) 编辑
摘要: 1.从Editplus官方网站下载支持Ruby的扩展包 http://www.editplus.com/others.html 2.下载的包中有两个文件是语法文件(stx)与自动完成文件(acp)将这两个文件放到Editplus的安装目录 3.打开editplus ,tools->Preferences->settings&syntax,增加ruby类型,然后设置一下文件扩展名,关联一下刚才下载的语法文件与自动完成文件 。PS:另外加入对rhtml的支持也容易,新建一个类型把安装目录现成的jsp.stx关联一下就成 阅读全文
posted @ 2013-09-29 23:41 wannianma 阅读(169) 评论(0) 推荐(0) 编辑
摘要: ls -R 显示所有子目录及目录下文件ls -s 显示文件大小ls -d 将目录像文件一样显示,而非显示目录下文件分屏显示: ls -l | more ls -l | less 具体区别自己体会只显示目录: ls -l | grep ^d只显示文件: ls -l | grep ^[^d]ls排序: ls -l (字符排序) ls -t(最近修改时间) ls -S(文件大小) ls -X(文件扩展名) ls -r(反向排序)组合:ls -alls -altls -ald 阅读全文
posted @ 2013-06-25 10:43 wannianma 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 面向对象设计问题:要求:1 有一个停车场,有N个车位,初始化为空,每个车位可以停一辆车 2.停车前检查是否有空位,是否车牌号已停在停车场内,没有则可以 3.车入车位开始计时,离开时则停止计时,算出停车费。import java.util.*;class Car{ public String carNum; //车牌号 public int inHour; public int inMinute; public int inSecond; public int outHour; public int outMinute; public int... 阅读全文
posted @ 2013-04-06 21:48 wannianma 阅读(697) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <stdlib.h>typedef struct Lnode{ int data; struct Lnode *next;}Lnode, *LinkList;//创建一个起始元素为start,终止元素为end的链表Lnode *CreateList_L(int start, int end){ Lnode *L, *p, *rear; int i; L = (LinkList) malloc(sizeof(Lnode)); L->next = NULL; //尾插法 rear = L; ... 阅读全文
posted @ 2013-04-06 13:51 wannianma 阅读(275) 评论(0) 推荐(0) 编辑