windk

2012年3月9日

javascript 中的 || 和 && 操作符

摘要: 首先上ECMA-262 5th中的说明:The production LogicalANDExpression : LogicalANDExpression && BitwiseORExpression is evaluated as follows:1. Let lref be the result of evaluating LogicalANDExpression.2. Let lval be GetValue(lref).3. If ToBoolean(lval) is false, return lval.4. Let rref be the result of ev 阅读全文

posted @ 2012-03-09 14:29 windk 阅读(243) 评论(0) 推荐(0)

2011年10月12日

css 不错的网站

摘要: http://css.doyoe.com/css 不错的网站 阅读全文

posted @ 2011-10-12 18:25 windk 阅读(216) 评论(0) 推荐(0)

CSS 实现多余文字省略号的方法:

摘要: CSS 实现多余文字省略号的方法:1 设置width, 或者max-width,规定超过多少长度是越界2 设置white-space:nowrap;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;vertical-align:top; white-space:nowrap;是文字显示在一行,即使越界也不换行 overflow:hidden;多余的部分隐藏起来 text-overflow:ellipsis以'...'代表省略部分 vertical-align:top;垂直对齐的基准线设置为顶部。兼容 阅读全文

posted @ 2011-10-12 18:19 windk 阅读(1317) 评论(0) 推荐(0)

2011年10月9日

css 截取字符串 省略号代替多余部分 完美截取 不出现半个字 跨浏览器 通用

摘要: css 截取字符串 省略号代替多余部分 完美截取 不出现半个字 跨浏览器 通用 阅读全文

posted @ 2011-10-09 15:04 windk 阅读(636) 评论(0) 推荐(0)

2011年9月14日

http://www.php.net/manual/zh/refs.basic.other.php 有时间多看看这个。

摘要: http://www.php.net/manual/zh/refs.basic.other.php非常有用的php函数系列 阅读全文

posted @ 2011-09-14 19:03 windk 阅读(170) 评论(0) 推荐(0)

php_strip_whitespace 去除php文件空行,注释

摘要: stringphp_strip_whitespace(string$filename)Return source with stripped comments and whitespace 阅读全文

posted @ 2011-09-14 18:57 windk 阅读(392) 评论(0) 推荐(0)

2011年9月8日

jquery, 点击页面元素,使其移动到浏览器顶部,再点击还原。

摘要: <script> $(function(){ //save the position top of browser's scroll prevous = 0; $(".details").toggle( function(){ $(".details").next().hide(); $(this... 阅读全文

posted @ 2011-09-08 13:34 windk 阅读(589) 评论(0) 推荐(0)

2011年9月6日

php 解析dom,可用作抓取工具

摘要: // Create DOM from URL or file$html = file_get_html('http://www.google.com/');// Find all images foreach($html->find('img') as $element) echo $element->src . '<br>';// Find all links foreach($html->find('a') as $element) echo $element->href . '&l 阅读全文

posted @ 2011-09-06 11:22 windk 阅读(273) 评论(0) 推荐(0)

MySQL 中文截取 字符串 中英文混合截取 无乱码

摘要: SET NAMES 'utf8';SELECT LEFT('截取字符串test.STRING' COLLATE utf8_general_ci, 1) AS result; 原理就是设置一下 COLLATE, 翻译成 整理 也可以,字符编码方式也可以。 阅读全文

posted @ 2011-09-06 11:19 windk 阅读(2933) 评论(0) 推荐(1)

2011年8月9日

emacs geben xdebug mac

摘要: 1 配置 mac php mysql apache 环境, 安装上 xdebug memcached2 安装 emacs3 下载 gebenhttp://code.google.com/p/geben-on-emacs/解压到~/emacs/elisp/4 增加下面4行到~/.emacs(add-to-list 'load-path "~/emacs/elisp/")(add-to-list 'load-path "~/emacs/elisp/geben")(require 'geben)(require 'dbgp)5s 阅读全文

posted @ 2011-08-09 21:41 windk 阅读(463) 评论(0) 推荐(0)

导航