Lok tar
Nonkr · 共 69 篇文章
jQuery.proxy可以往函数里传参
for (j = td_counter; j < rows; j++) { td = document.createElement("td"); td.innerHTML = ' '; td.onclick = $.proxy(this.onclick, this, i); tr.appendChild(td); }
2013-08-06 10:33 · Javascript · 评论(0)
扩展prototype.js Object.deepExtend深度扩展
Object.deepExtend = function(destination, source) { for (var property in source) { if (source[property] && source[property].constructor && source[property].constructor === Object) { destination[property] = destination[property] || {}; arguments.callee(destination[property], source[property]); } els…
2013-07-29 23:08 · Javascript · 评论(0)
prototype.js1.7.1在IE下getOffsetParent()会返回body
prototype1.7.1在IE下getOffsetParent()会返回body 可用ancestors()[0]
2013-07-29 20:32 · Javascript · 评论(0)
Javascript string repeat 重复拼写字符串
function repeat(s, n){ var a = []; while(a.length < n){ a.push(s); } return a.join(''); } //或者 String.prototype.repeat = function( num ) { return new Array( num + 1 ).join( this ); }
2013-07-17 17:31 · Javascript · 评论(0)
Intellij IDEA不能创建和显示rcS文件
1. File -> Settings 2. Select “File Types" 3. In the bottom of the window there is a field called “Ignore files and folders" that contains “rcs". 4. Remove the rcs part from the above field and click “OK".
2013-07-15 10:00 · 编辑器 · 评论(0)
PowerDesigner怎样才能在修改表的字段Name的时候Code不自动跟着变
http://blog.csdn.net/hongqishi/article/details/7050255
2013-05-07 10:01 · Database · 评论(0)
搭建JW Player编译环境
环境 Centos6.3 首先从svn中获取源码,以6.3版本为例 svn co http://developer.longtailvideo.com/svn/tags/mediaplayer-6.3 按照README中的说明,安装 Flex SDK和Ant * Flex SDK 4.1: http://sourceforge.net/adobe/flexsdk/wiki/Downloads/ * Ant 1.7.0: http://ant.apache.org/bindownload.cgi 两个都只需要解压即可 配置Ant环境 export ANT_HOME=/opt/ant/apach…
2013-04-18 14:53 · 其他 · 评论(0)
Javascript 判断本地文件是否存在
function fileExists(url) { var http = new XMLHttpRequest(); http.open('HEAD', url, false); http.send(); return http.status!=404; }
2013-04-15 14:42 · Javascript · 评论(0)
可以参考的javascript编码风格
https://github.com/aralejs/aralejs.org/wiki/JavaScript-%E7%BC%96%E7%A0%81%E9%A3%8E%E6%A0%BC
2013-03-22 23:04 · Javascript · 评论(0)
javascript 禁止鼠标右键
function doProhibit() { if(window.Event) document.captureEvents(Event.MOUSEUP); function nocontextmenu() { event.cancelBubble = true event.returnvalue = false; return false; } function norightclick(e) { if (window.Event) { if (e.which == 2 || e.which == 3) return false; } else if (event.button == 2…
2013-03-22 13:29 · Javascript · 评论(0)
CASE expression of SQLite
CASE x WHEN w1 THEN r1 WHEN w2 THEN r2 ELSE r3 END CASE WHEN x=w1 THEN r1 WHEN x=w2 THEN r2 ELSE r3 END
2013-03-22 10:55 · SQLite · 评论(0)
Intellij 编辑properties中文(自动native2ascii)
在编辑器的设置里找到File Encodings 1. 把Default encoding for properties files 选上UTF-8 2. 再把下面的Transparent native-to-ascii conversion打上勾
2013-03-03 18:28 · 编辑器 · 评论(0)
Win7因为NPF不能正常使用Wireshark
Win7可能因为没有默认启动NPF而不能正常使用Wireshark抓包工具,虽然可以以管理员运行cmd,然后net start npf。但是这样每次要使用wireshark都需要这样手工执行一下命令,很不方便。事实上,可以设置开机默认启动NPF: sc config npf start= system 注意,等号后面是有一个空格的。
2012-12-15 15:37 · 其他 · 评论(0)