浏览模式: 标准 | 列表Tag:database
Submitted by gouki on 2008, December 15, 2:00 PM
说实话,对于《家有喜事》我还是挺喜欢看的,虽然有人说《97家有喜事》并不能算这个系列,但如果不算上它,它就不是系列了。。。
第一部是张国荣主演,还有梁家辉等等名人,第二部又有星爷加入,据说今年是想拍第三部,但因为星爷身价太高,肯定是不会请了,但又听说吴君如好象会参加。。
再来随便说说,好象,每一部《家有喜事》年都是金融风暴年哦,92年。。。97年。。。今年08年。下次又将是什么时候呢?借家有喜事来冲冲喜?呵呵
不过,电影我还是喜欢看的,如果今年重拍,不知道会有什么样的惊喜。有空的时候,上网温习一下这两部老电影先。
Tags: 家有喜事, 周星驰, 黄百鸣, 张国荣, 经济危机
Misc | 评论:2
| 阅读:19196
Submitted by gouki on 2008, November 25, 6:33 PM
本来是看到一篇文章,写研究的,想COPY过来就完事了。该来来自于cssRain,但是在看的过程中,发现内容和标准偏差很多,于是就贴上它的链接,然后自己谈谈理解吧。
CSSRAIN的链接为:http://www.cssrain.cn/article.asp?id=1176
在jQuery里面对于一些HTML的元素操作都是很简化的,这也是很多人选择使用jQuery的原因。
对于获取某一个元素的值,如input框,我们往往是用$('#test').val();
$('#test')这个我就不多说了,反正就是获取ID为test的这个元素。
$('#test').val(),也就是获取它的值,一般来说,凡是能够用在FORM里的元素,都可以用.val()来进行值的获取,如input,textarea,select等,都可以用.val()来获取它们的当前值
而.val('aa');则是设置该元素的值,$('#test').val('aa'),也就是相当于设置test元素的值为aa。
类似这样的用法还有两种:.html(),.text(),这两种用法往往用在div和span元素上,一般是为这两种元素进行赋值和取值。
.html()替代了以前的 .innerHTML , .html('test') ,则是替代了 .innerHTML = 'test';
这些类似的简化写法让我们在实际的操作中感觉得更加流畅。
这些方法都是直接在方法名里加参数来进行赋值和取值的。还有一些是通过第二个参数进行取值的(说的不太清楚。。。),比如$('#test').attr('name'),那么,返回的值就是它的attribute中的name了,如果$('#test').attr('id','test2'),则是相当于把这个test元素的name设为test2,再进行取值的时候,name就是test2了。
说的太乱了。。。。
懒得整理,权当笔记
Tags: jquery, html, 研究
Javascript | 评论:1
| 阅读:47718
Submitted by gouki on 2008, November 25, 6:13 PM
回忆未来的张宴推荐了这本书,并且在他的博客上提供了下载的链接,链接是新浪的爱问:点此下载《High Performance MySQL Second Edition》PDF电子版,并且博客上还有详细介绍:
XML/HTML代码
- High Performance MySQL Second Edition
- 作者: Baron Schwartz / Peter Zaitsev / Vadim Tkachenko / Jeremy Zawodny / Arjen Lentz / Derek Balling
-
- 副标题: Optimization, Backups, Replication, and More
- ISBN: 9780596101718
- 页数: 708
- 定价: USD 49.99
- 出版社: O'Reilly Media, Inc.
- 装帧: Paperback
- 出版年: 2008-06-18
-
- High Performance MySQL is the definitive guide to building fast, reliable systems with MySQL. Written by noted experts with years of real-world experience building very large systems, this book covers every aspect of MySQL performance in detail, and focuses on robustness, security, and data integrity.
-
- High Performance MySQL teaches you advanced techniques in depth so you can bring out MySQL's full power. Learn how to design schemas, indexes, queries and advanced MySQL features for maximum performance, and get detailed guidance for tuning your MySQL server, operating system, and hardware to their fullest potential. You'll also learn practical, safe, high-performance ways to scale your applications with replication, load balancing, high availability, and failover.
-
- This second edition is completely revised and greatly expanded, with deeper coverage in all areas. Major additions include:
- * Emphasis throughout on both performance and reliability
- * Thorough coverage of storage engines, including in-depth tuning and optimizations for the InnoDB storage engine
- * Effects of new features in MySQL 5.0 and 5.1, including stored procedures, partitioned databases, triggers, and views
- * A detailed discussion on how to build very large, highly scalable systems with MySQL
- * New options for backups and replication
- * Optimization of advanced querying features, such as full-text searches
- * Four new appendices
- The book also includes chapters on benchmarking, profiling, backups, security, and tools and techniques to help you measure, monitor, and manage your MySQL installations.
为此,张宴还提供了一张图片:

整篇博客我作了一下整理和排序,想看原文的,请到:http://blog.s135.com/read.php?381,因为在这个页面上张宴采用了划词翻译,如果有看不懂英文的话,选中一下就会自动翻译了。。我没有提供。也不想再插入一些代码。呵呵
为了方便大家,我也上传了这个文件,大家可以点击下载:high.performance.mysql_second.edition.zip
Tags: mysql, database, pdf, download
Baby | 评论:0
| 阅读:30304
Submitted by gouki on 2008, November 13, 10:45 AM
原文地址:http://www.phpv.net/html/1639.html,作者:手气不错
未删节版本
开门见山,考虑下面的代码(原文连接有详细的解释)
PHP代码
- <html>
- <body>
- <?php
- if (isset($_REQUEST['submitted']) && $_REQUEST['submitted'] == '1') {
- echo "Form submitted!";
- }
- ?>
- <form action="<?php echo $_SERVER['PHP_SELF']; ?>">
- <input type="hidden" name="submitted" value="1" />
- <input type="submit" value="Submit!" />
- </form>
- </body>
- </html>
看似准确无误的代码,但是暗藏着危险。让我们将其保存为 foo.php ,然后放到 PHP 环境中使用
foo.php/%22%3E%3Cscript%3Ealert('xss')%3C/script%3E%3Cfoo
访问,会发现弹出个 Javascript 的 alert -- 这很明显又是个 XSS 的注入漏洞。究其原因,发现是在
echo $_SERVER['PHP_SELF'];
这条语句上直接输出了未过滤的值。追根数源,我们看下 PHP 手册的描述
'PHP_SELF'
The filename of the currently executing script, relative to the document root.
For instance, $_SERVER['PHP_SELF'] in a script at the address
http://example.com/test.php/foo.bar would be /test.php/foo.bar. The __FILE__
constant contains the full path and filename of the current (i.e. included) file.
If PHP is running as a command-line processor this variable contains the script
name since PHP 4.3.0. Previously it was not available.
原因很明确了,原来是 $_SERVER['PHP_SELF'] 虽然“看起来”是服务器提供的环境变量,但这的确和 $_POST 与 $_GET 一样,是可以被用户更改的。
其它类似的变量有很多,比如 $_COOKIE 等(如果用户想“把玩”他们的 cookie,那我们也是没有办法)。解决方案很简单,使用 strip_tags、htmlentities 等此类函数过滤或者转义。
echo htmlentities($_SERVER['PHP_SELF']);
-- Split --
上述的例子让我们需要时刻保持谨慎 coding 的心态。Chris Shiflett 在他的 Blog 总结的相当直白,防止 XSS 的两个基本的安全思想就是
Filter input
Escape output
我将上面翻译成 “过滤输入,转义输出”。详细的内容,可以参考他 Blog 的这篇文章,此处略。
Tags: php, php_self
PHP | 评论:3
| 阅读:24079
Submitted by gouki on 2008, September 27, 8:07 PM
做网站的人关心的是怎么样能够被更多的收录,毕竟收录的越多,被搜索的机会也就越大,被搜索的机会越大,被收录的也就会更多,这是一个良性循环。
对于这一点google的PAGERANK也算是一个门槛,相比较而言,PR值越高的网站,GOOGLE等爬虫就会越关注这个网站,如果上面的资料多,那么被收录的机会就会大大增加。
SEO做的就是这些功能。。
今天pr大更新,欣慰的是neatstudio.com的PR终于升到5了,neatcn.com的PR升到3,然而,52cd.net的PR降为1了,原来是3啊。心痛中。。。
不过,升到5也算是一个好消息了。52cd.net的,我以后会慢慢补回来的。。哼
neatcn.com的alexa rank是342050了,一切在向好的方面发展
谨以此文纪念一下这些数值,OHYEAH.
Tags: pagerank, google, pr
Misc | 评论:0
| 阅读:20864