易栈网-膘叔

浏览模式: 标准 | 列表 | 图文
jQuery UI 1.7 发布

jQuery UI 1.7 发布

继jQuery 1.3.1发布之后,UI包一直没跟上,3月6日,兼容jQuery 1.3.1的UI包终于发布了。大家可以来这里下载jquery-ui-1.7.custom.zip,svn方式:http://jquery-ui.googlecode.com/svn/tags/1.7/

这次改动主要如下:

  • 和jQuery1.3兼容。
  • 修补和优化以前的UI插件。
  • 崭新的CSS框架。
    jQuery UI 1.7建立在一个崭新的强大的css框架上,这个框架不仅仅用于jQuery UI的插件,还可以用于定制插件,任何开发者都能很容易地基于ThemeRoller(jQuery UI 的换肤插件)为插件创建皮肤。更多关于CSS框架
  • 新版的ThemeRoller(V2)。
  • 健全的演示和文档。
  • 完全离线的帮助文档。
  • 重构了download builder,即使javascript被禁用,这个插件仍然能运作。
  • 皮肤打包。
    点击这里可以立即下载所有皮肤: jquery-ui-themes-1.7.zip,svn: http://jquery-ui.googlecode.com/svn/tags/1.7/themes/
  • 为jQuery UI新建了一个网站http://www.jqueryui.com/。
    这个网站和主站分开,专注于UI研发。


-----------------

  • 出处:http://kaima.cnblogs.com
  • 作者:kai.ma
LAMP的一些专题

LAMP的一些专题

phpChina虽然我不是很喜欢,因为论坛里的斗争搞得象国外的党派斗争一样,几乎沦为口水娃了。

但是,他上面的专题还是很不错的。

专题网址如下:http://www.phpchina.com/html/thematic.html

打开任意一个专题,右侧都有专题列表,我复制过来了。希望对大家有用吧。。(其实是对自己有用)

使用ZendFramework的时候打印SQL

使用ZendFramework的时候打印SQL

在使用ZendFramework开发的时候,会遇到要对SQL进行优化的处理,但是从ZEND的DB类里并没有找到输出SQL的方法,唯一看到的输出也是在SELECT类里面有一个__toString()的方法,但这个方法也只能输出SELECT的语句,对于Insert,Update,Delete之类的语句并不能处理。

开始的时候,很郁闷,后来问HaoHappy,因为他是国内第一批翻译ZF手册的人,果然我一问,他一下子就说,有一个Profiler类可以解决。
翻开手册,Zend_Db_Profiler,里面果然有操作。。(注:类名是凭记忆的,以下内容也是凭记忆写出来的)

1、在DB的CONFIG里面把profiler打开,如果没有打开,则需要用$profiler = $db->getProfiler();然后 $profiler->setEnable(true); (好象记错了,请看手册,我这里只说解决方法)

2、然后有一个设置 Profiler 的filter条件的,可以设定select,insert,update,delete的操作。

3、然后根据官方的例子,对SQL进行输出(手册上的例子,只是输出了执行时间最长的SQL哦)。如果需要每条都输出,你得在那个 if 判断外把sql 存储下来,即 $query->getQuery();

4、根据手册,还可以输出到fireBug和利用FirePHP来进行类似的debug,但我试了一下没有成功( QEE 支持 firePHP ,不知道是否借鉴了ZEND的这个功能,猜测而己 )

纯粹是一个记录,顺便感谢一下HaoHappy

免费模版网站列表

纯记录:http://gofreeserve.info/archives/free-web-template-resources

Check out these 40 excellent websites that offer W3 standard-compliant website templates and flash template pages for free download without any registration or sign-up!

Simavera Website Templates
Simavera Website Templates
Flash and web site templates. Great collection with some attractive and modern designs to choose from.

Open Designs
Open Designs
XHTML and CSS based free web design templates. Over 1100 open source designs available for download and growing by the day!

Tristar Web Design
Tristar Web Design Templates
Just 9 templates here but if your looking for free fast loading quality XHTML & CSS templates, this site is a must!

Solucija
Solucija Templates
Free XHTML/CSS website templates available to use without any limitations. They can be used on a non commercial site as well as on a commercial one. Keeping a small credit link in the footer is not obligatory. All templates are hand coded and lightweight (under 60KB) which ensures fast loading.

Styleshout
Styleshout Templates
Large collection of quality free website templates for download. All templates are valid xthml(strict) and valid CSS, and distributed under a Creative Commons Attribution 2.5 license

Dream Template
Dream Template
334 free templates but users must at all times have the pre-installed DreamTemplate linking button/text on the front page of their web site. This policy does NOT apply to registered/paid members.

Metamorphozis Design
Metamorphosis Design Templates
A large collection of attractive designs released under a Creative Commons Attribution 2.5 license by the metamorphosis designers.

Iron Myers
Iron Myers Templates
Simplify your site designs with 168 of the most useful Grid and CSS Layouts. They are perfect for website templates, Blog themes, CMS or as a starting point for your web projects. Layouts offer full Grade-A browser support, That is, the layouts will look and behave the same in all internet browsers.

Six Shooter Media
Six Shooter Media Templates
A list of 11 extremely fast loading quality templates fully xhtml 1.1 and css compliant.

Nice and Free CSS Templates
Nice and Free CSS Templates
Just copy and paste any of the 12 layouts, all templates are XHTML 1.0 and CSS2/ tableless.

CSSTemps
CSS Temps
About 60 free valid XHTML/CSS templates. All templates are protected by the license inside the template.

Free CSS Templates
Free CSS Templates
All of these templates are released for FREE under the Creative Commons Attribution 2.5 license for any type of personal or commercial use provided you follow the license. Link back required.

Clan Templates
Clan Templates
Free templates for on-line gaming clans for games with multiplayer options. Clan Templates provides free gaming layouts and graphics to gamers and designers alike.

Free Website Templates
Free Website Templates
Claims to be the best free website templates on the internet and you don’t need to link back, but you should state that you used a template originally made by Free Website Templates.

Template World
Template World
Absolutely top quality, unique and creative web site XHTML/CSS templates designed by Template World. Templates have been tested and proven compatible with all major browser environments and operating systems. Released under Creative Commons Attribution 2.5 license you are free to modify but you must link back to Template World.

Layout Gala
Layout Gala
A collection of 40 CSS layouts based on the same markup and ready for download! If you want, you can download the entire collection, 40 HTML pages in a single zip file.

Open Web Design
Open Web Design
Download and upload free web designs, over 3000 demo’s to browse through!

Free CSS
Free CSS
All of the 1000 templates or so that are featured within Free CSS are distributed under some form of GNU/GPL License or under a Creative Commons License.

Open Source Web Design
Open Source Web Design
A collection of 2000+ web designs submitted by the community that anyone can download free of charge!

CSS 4 Free
CSS 4 Free Templates
Free CSS based website templates gallery for you to preview, rate, comment on, and download. Most of the templates are licensed under Creative Commons 2.5 or GPL.

Open Source Web Templates
Open Source Web Templates
Free Open Source XHTML/CSS templates designed with true web 2.0 standard and 100% W3C validated.

Premium Website Templates
Premium Website Templates
Tableless web templates built using XHTML and CSS with some also available as Blogger template or Wordpress theme. All released under a Creative Commons Attribution 2.5 license

Template Navigator
Template Navigator
Free templates catalogue that links only to high quality and free templates that can be 100% downloaded.

Templates Box
Templates Box
A large inventory of free website and flash templates available. Link back is required, downloads include the .PSD files and fonts.

Open Source Templates
Open Source Templates
Studio 7 designs all free CSS/XHTML website templates are free to use under the Creative Commons Attribution 2.5 license

Free Layouts
Free Layouts
Offers several hundred free W3 standard-compliant website templates and flash template pages for download. The site has some older templates in the collection that may not validate, and as such, you should make sure your code validates before using the template.

Dotcom Webdesign
Dotcom Design Templates
Premier source with 527 free website templates and layouts created specifically for CMSimple.

Themebot
Themebot Templates
Portal helping users to find themes/templates/styles/skins for various content management systems, blog and forum software. Free high quality open source website templates using XHTML and CSS.

Interspire
Interspire Templates
Dozens of website templates, website layouts, newsletter templates and logo templates, that you can download free of charge.

Free CSS Templates
Free CSS Templates
One of the biggest, never before seen collection of free CSS Templates on the web! All these CSS templates are released under the Creative Commons Attribution 2.5 license. At present, there are 219 free CSS templates downloadable in .Zip format.

All Free Templates
All Free Templates
Nice collection of free web and flash templates for personal and business use. Some templates include the .PSD files.

Template Workz
Template Workz
Templates are free to download and use for your personal and business projects. Website templates are available in Photoshop (PSD) and HTML formats, all the fonts are also included with the PSD file. Link back only required if you use the downloaded graphics.

Snakeye Dreamweaver Web Templates
Snakeye Dreamweaver Web Templates
20 free Dreamweaver web site templates and web page templates for download. May be used for any web site, provided the tagline at the base of the template remains within the template design.

TemplateYes
TemplateYes
About 100 cool web, flash and CSS templates 100% free. Link back required.

Mashable
Mashable Templates
A collection of 150+ great free templates from around the web including 40+ one column layouts, 80+ two column layouts and 30+ three column layouts.

Free Templates Online
Free Templates Online
Gallery of 150 professional looking websites free of charge! Link back required.

Web Design Company
Web Design Company
Unique and professional Web site templates, Flash templates, HTML templates including the full set of sub-pages free of cost. Submit name and email prior to download and link back required.

Andreas Viklund
Andreas Viklund Templates
All templates are made with valid XHTML (strict) and CSS, and they are supposed to be small, easy to work with and of high code quality. Templates are free to use for any purpose without any limitations, obligations or conditions.

Zymic
Zymic Templates
Preview live and download any one of the 90+ top quality free web designs and layouts. Link back is required!

Free online web template generator
doTemplate Generator
Easily create unique professional web templates: Pick Template > Customise > Download!
doTemplate offers a catalogue of free web templates. All templates are fully customizable to your taste and needs. You can easily tweak the colors, the fonts, apply a bunch of graphical effects to create a unique professional template in no time.

翻译:crontab的介绍

翻译:crontab的介绍

以下内容来自于linux的101个hack,昨天看到了,顺手翻译了一下,毕竟看中文比看英文舒服。翻译的还是有点问题的,理解一下下啦。。。

Hack 74. Crontab
第74个hack:Crontab

Using cron you can execute a shell-script or Linux commands at a specific time and date. For example a sysadmin can schedule a backup job that can run every day.
使用cron功能你可以在任意的时间执行一条shell指令或者Linux的命令。例如系统管理员可以运行一个计划任务来进行每天的备份工作。

How to add a job to the cron?
那么,怎么样把一个任务加入到cron呢?

# crontab –e
0 5 * * * /root/bin/backup.sh

This will execute /root/bin/backup.sh at 5 a.m every day.
上面这条指令,让你在每天上午5点 运行 /root/bin/目录下的 backup.sh 指令

Description of Cron fields.
Cron命令的各个字段的注释。

Following is the format of the crontab file.
crontab文件的格式均以下格式

{minute} {hour} {day-of-month} {month} {day-of-week} {full-path-to-shell-script}
{分钟} {小时} {每月的第几天} {月份} {每周的第几天} {指令的全路径}

o minute: Allowed range 0 -59
o 分钟的取值范围是 0-59

o hour: Allowed range 0 -23
o 小时的取值范围是 0-23

o day-of-month: Allowed range 0 - 31
o 每月的第几天,取值范围为 0-31

o month: Allowed range 1 -12. 1 = January. 12 = December.
o 月份的取值范围为 1-12 ,1是1月,12是12月

o Day-of-week: Allowed range 0 -7. Sunday is either 0 or 7.
o 每周的第几天,取值范围为0-7,0或者7都代表星期天

Crontab examples
Crontab 的例子

1. Run at 12:01 a.m. 1 minute after midnight everyday. This is a good time to run backup when the system is not under load.
1. 每天午夜12点零1分 ,当系统不再被加载时就是进行备份的好时机(not under load翻译不来)

1 0 * * * /root/bin/backup.sh


2. Run backup every weekday (Mon – Fri) at 11:59 p.m.
每周1-5晚上11点59分执行备份操作

59 11 * * 1,2,3,4,5 /root/bin/backup.sh

Following will also do the same.
下面的例子则是另一种格式,功能完全一致

59 11 * * 1-5 /root/bin/backup.sh

3. Execute the command every 5 minutes.
每五分钟执行一条命令
*/5 * * * * /root/bin/check-status.sh

4. Execute at 1:10 p.m on 1st of every month
每月第一天的下午1点10分执行备份
10 13 1 * * /root/bin/full-backup.sh

5. Execute 11 p.m on weekdays.
每周工作日的下午11点执行备份
0 23 * * 1-5 /root/bin/incremental-backup.sh

Crontab Options
Crontab 的一些参数

Following are the available options with crontab:
以下是crontab所支持一些参数

o crontab –e : Edit the crontab file. This will create a crontab, if it doesn’t exist
o crontab -e : 编辑crontab文件,如果文件不存在,则创建一个crontab

o crontab –l : Display the crontab file.
o crontab -l : 显示crontab文件

o crontab -r : Remove the crontab file.
o crontab -r : 删除crontab文件

o crontab -ir : This will prompt user before deleting a crontab.
o crontag -ir : 删除crontab文件,但在删除前会让用户进行确认

备忘:swfUpload注意事项

在使用swfupload上传文件的时候,老是绕不过登录验证。查了一下GOOGLe,没查到,问了百度,他告诉我答案:

swfuplaod在上传时,会新开一个进程,和原来的进程不一致,要解决这个问题,需要指定session_id,然后在登录页面判断,如果有post过来的session_id,那么就用函数session_id( $_POST['PHP_SESSIONID'])指定一下。

上传页的JS里面,可以获取当前的SESSION_ID的。

例如上传页的JS中:

post_params: {"PHPSESSID": "<?php echo session_id(); ?>"},

在验证的判断页中:

if (isset($_POST["PHPSESSID"])) {
session_id($_POST["PHPSESSID"]);
}

(这一段是网上的注释:在带有Session验证的网站后台中SWFUpload无法正常工作,这是因为SWFUpload在上传时相当于重新开辟了一个新的Session 进程,因此无法与原有程序的Session保持一致,这就需要在上传时传递原有程序的SessionID,根据它来“找回”其应有的Session。)

记一次失败的下载:for wps

wps是我喜爱的国产软件之一,听说升级到2009了,兴冲冲的到网站上去下载。
进入:http://www.wps.cn/product/index.htm,我想我应该没有理解错网站的意思,于是我先下载了升级包,结果失败,说我是最新版,我想2007大概不能升级到2009吧,然后就下载了直接的安装包。安装时提醒我说有旧软件要删除,兴奋呀。。

安装好后一运行 ,MD,还是2007.晕了我

看来是我RP太差了吧。

[分享]VIM操作指令的壁纸

[分享]VIM操作指令的壁纸

在很久前,我与大家分享过一张VI/VIM的操作键位图,那张相对较小一点,如今,发现两张大的,再放上来与君共享。(下载不在本地,如果是图片,那么点击小图,可以查看大图,已经本地版了,呵呵)

原文:http://www.cnitblog.com/benwhite/archive/2009/03/06/55167.html

内容:

近来心血来潮,想成为一个Vimer,于是开始发愤使用,但是新手的普遍问题就是常常在纷繁的命令中发懵,于是我想到了著名的vi-vim-cheat-sheet(ywpg推荐的),另外也找到了两张全黑的国人做的命令壁纸,但是两者均有失偏颇,不如干脆来个整合,做一个新版的壁纸。经过两个多小时,成果如下:(考虑到宽屏的童鞋,一并提供宽屏版)[由于都是很简单的命令,初学者下,高手请绕道:P]

打包下载 或 直接点击下面图片

1024x768
0fd8bb6c80c8149897351662237b6fbe

1680x1050
e8d9c3abc8dffa5a924630cc7628f1bb

版权说明:本版本主要是从www.viemu.com 的cheat sheet改编,我想原作者会同意的,毕竟这是推广一个vi/vim的举动,顺便也替他做了广告:)

[转摘]如何利用MySQL加密函数保护Web网站敏感数据

[转摘]如何利用MySQL加密函数保护Web网站敏感数据

原文:http://www.javauu.com/thread-4678-1-1.html
如果您正在运行使用MySQL的Web应用程序,那么它把密码或者其他敏感信息保存在应用程序里的机会就很大。保护这些数据免受黑客或者窥探者的获取是一个令人关注的重要问题,因为您既不能让未经授权的人员使用或者破坏应用程序,同时还要保证您的竞争优势。幸运的是,MySQL带有很多设计用来提供这种类型安全的加密函数。本文概述了其中的一些函数,并说明了如何使用它们,以及它们能够提供的不同级别的安全。

双向加密

就让我们从最简单的加密开始:双向加密。在这里,一段数据通过一个密钥被加密,只能够由知道这个密钥的人来解密。MySQL有两个函数来支持这种类型的加密,分别叫做ENCODE()和DECODE()。下面是一个简单的实例:

mysql> INSERT INTO users (username, password) VALUES ('joe', ENCODE('guessme', 'abracadabra'));
Query OK, 1 row affected (0.14 sec)

其中,Joe的密码是guessme,它通过密钥abracadabra被加密。要注意的是,加密完的结果是一个二进制字符串,如下所示:

mysql> SELECT * FROM users WHERE username='joe';
+----------+----------+
| username | password |
+----------+----------+
| joe | ¡?i??!? |
+----------+----------+
1 row in set (0.02 sec)

abracadabra这个密钥对于恢复到原始的字符串至关重要。这个密钥必须被传递给DECODE()函数,以获得原始的、未加密的密码。下面就是它的使用方法:

mysql> SELECT DECODE(password, 'abracadabra') FROM users WHERE username='joe';
+---------------------------------+
| DECODE(password, 'abracadabra') |
+---------------------------------+
| guessme |
+---------------------------------+
1 row in set (0.00 sec)

应该很容易就看到它在Web应用程序里是如何运行的――在验证用户登录的时候,DECODE()会用网站专用的密钥解开保存在数据库里的密码,并和用户输入的内容进行对比。假设您把PHP用作自己的脚本语言,那么可以像下面这样进行查询:

$query = "SELECT COUNT(*) FROM users WHERE username='$inputUser' AND DECODE(password, 'abracadabra') = '$inputPass'";?>

提示:虽然ENCODE()和DECODE()这两个函数能够满足大多数的要求,但是有的时候您希望使用强度更高的加密手段。在这种情况下,您可以使用AES_ENCRYPT()和AES_DECRYPT()函数,它们的工作方式是相同的,但是加密强度更高。

单向加密

单向加密与双向加密不同,一旦数据被加密就没有办法颠倒这一过程。因此密码的验证包括对用户输入内容的重新加密,并将它与保存的密文进行比对,看是否匹配。一种简单的单向加密方式是MD5校验码。MySQL的MD5()函数会为您的数据创建一个“指纹”并将它保存起来,供验证测试使用。下面就是如何使用它的一个简单例子:

mysql> INSERT INTO users (username, password) VALUES ('joe', MD5('guessme'));
Query OK, 1 row affected (0.00 sec)
mysql> SELECT * FROM users WHERE username='joe';
+----------+----------------------------------+
| username | password |
+----------+----------------------------------+
| joe | 81a58e89df1f34c5487568e17327a219 |
+----------+----------------------------------+
1 row in set (0.02 sec)

现在您可以测试用户输入的内容是否与已经保存的密码匹配,方法是取得用户输入密码的MD5校验码,并将它与已经保存的密码进行比对,就像下面这样:

mysql> SELECT COUNT(*) FROM users WHERE username='joe' AND password=MD5('guessme');
+----------+
| COUNT(*) |
+----------+
| 1 |
+----------+
1 row in set (0.00 sec)

或者,您考虑一下使用ENCRYPT()函数,它使用系统底层的crypt()系统调用来完成加密。这个函数有两个参数:一个是要被加密的字符串,另一个是双(或者多)字符的“salt”。它然后会用salt加密字符串;这个salt然后可以被用来再次加密用户输入的内容,并将它与先前加密的字符串进行比对。下面一个例子说明了如何使用它:

mysql> INSERT INTO users (username, password) VALUES ('joe', ENCRYPT('guessme', 'ab'));
Query OK, 1 row affected (0.00 sec)
mysql> SELECT * FROM users WHERE username='joe';
+----------+---------------+
| username | password |
+----------+---------------+
| joe | ab/G8gtZdMwak |
+----------+---------------+
1 row in set (0.00 sec)

结果是

mysql> SELECT COUNT(*) FROM users WHERE username='joe' AND password=ENCRYPT('guessme', 'ab');
+----------+
| COUNT(*) |
+----------+
| 1 |
+----------+
1 row in set (0.00 sec)

提示:ENCRYPT()只能用在*NIX系统上,因为它需要用到底层的crypt()库。

幸运的是,上面的例子说明了能够如何利用MySQL对您的数据进行单向和双向的加密,并告诉了您一些关于如何保护数据库和其他敏感数据库信息安全的理念。