摘要: 下载mongodb之后,扔D盘,配置安装mongodb service服务后,启动出现1053错误。网上各种方法,有改mongod.exe权限,有改成绝对目录的,好吧,自己比较懒,就用最省事儿的方法了,就是扔到C盘。1.将压缩包重解压到C盘根目录,并重命名为mongodb2.创建2个目录:c:\mongodb\logs ,c:\mongodb\data\db3.通过命令行切换目录至c:\mongodb\bin, 如果之前安装过mongodb,那么先执行mongod --remove 然后,输入以下命令:mongod --logpath c:\mongodb\logs\mongo.log -.. 阅读全文
posted @ 2013-08-24 19:31 eyotata 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 使用代理处理类,需要实现InvocationHandler接口package com.lan.dynamicProxy.myDynamicProxy;import java.lang.reflect.InvocationHandler;import java.lang.reflect.Method;import java.util.Arrays;/** * Created with IntelliJ IDEA. * User: Njoy * Date: 13-8-21 * Time: 上午10:12 * To change this template use File | Settings | 阅读全文
posted @ 2013-08-23 13:42 eyotata 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 正则转义字符: Table 10-2. Regular expression character classesCharacter Matches[...] Any one character between the brackets.[^...] Any one character not between the brackets.. Any character except newline or another Unicode line terminator.\w Any ASCII word character. Equivalent to [a-zA-Z0-9_].\W Any ch. 阅读全文
posted @ 2013-08-17 20:04 eyotata 阅读(525) 评论(0) 推荐(0) 编辑
摘要: String.prototype.trim = String.prototype.trim || function () {if (!this) return this;//Don't alert the empty string/* this.replace(/^\s+|\s+$/g, "") 和 this.replace(/^\s+/,'').repalce(/\s+$/,'');相比.后者比前者快150ms左右,如果字符串更长可能差距会更大,所以决定使用高效的方法*/this.replace(/^\s+/, '' 阅读全文
posted @ 2013-08-17 19:58 eyotata 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Closure: JavaScript词缀作用域。javascript的函数在执行时是按照定义作用域链起作用。内嵌函数f()被包含在一个作用域链中,在这个作用域链中scope被赋值为"local scope"。无论f最终在哪里被执行,这种绑定一直存在。var scope = "global scope";function checkscope() { var scope = "local scope"; function f() { return scope; } return f;}console.log(checkscope()( 阅读全文
posted @ 2013-08-11 21:18 eyotata 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 21 83 84 85 86 87 hello world88 89 注意:在if()判断体内自动转为false的是:0,'',undefined,null,NaN。而' ','0'在if()判断体中为true90 91 92 阅读全文
posted @ 2013-08-09 11:22 eyotata 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 常用快捷键设置jvm参数:Setting--Compiler--Java Compiler设置自动导入:Setting--Editor--Auto Import更多快捷键用ctrl+j查看,比如sout和eclipse的syso一样。iter:for in循环itar:遍历数组类似的还有fori;热部署:tomcat server--deployment--点击加号--extenal source 指向 webapp 所在的目录。tomcat需要以debug模式启动,启动后修改java文件后,ctrl[+shift]+f9编译文件,就热部署了。也可以打个devevm的jvm补丁,直接就热部署。 阅读全文
posted @ 2013-08-05 10:07 eyotata 阅读(214) 评论(0) 推荐(0) 编辑
摘要: open 主机名用户名密码lcd d:\ #设置本地目录,文件将被下载到此处get xxx #获取主机上的文件将上面保存为任意文件,比如ftp.同级目录下,新建一个bat,内容为c:\windows\system32\ftp.exe -s:ftp保存为xxx.bat.双击xxx.bat即可。 阅读全文
posted @ 2013-08-05 07:46 eyotata 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 引用http://biyutong.iteye.com/blog/1574981Java代码find.-name"stat_*_2012_05_26_log.tgz"-execcp{}/home/adstat/apache_log/stat/\;上述命令代表在当前文件夹下查找符合正则表达式stat_*_2012_05_26_log.tgz 的文件并分别复制到/home/adstat/apache_log/stat/目录下。 那么批量解压文件是否这样呢:Java代码find.-name"stat_*_2012_05_26_log.tgz"|xargstar 阅读全文
posted @ 2012-07-03 09:54 eyotata 阅读(6758) 评论(0) 推荐(0) 编辑
摘要: 参考http://blog.csdn.net/zjx2388/article/details/2185807这是因为在url中使用了http://xxx?method=xxx但是在struts.xml配置文件中没有定义:parameter=method 阅读全文
posted @ 2012-06-25 09:37 eyotata 阅读(193) 评论(0) 推荐(0) 编辑