`
文章列表

clear:both

    博客分类:
  • css
clear:both的替代方案 http://www.quirksmode.org/css/clearing.html

REST service的produces

    博客分类:
  • rest
REST service的produces一定要制定,否则部分浏览器无法正确的解析返回值。 如: 一个REST服务,返回一个普通的字符串,如果不指定produces,chrome可以正常解析,但是firefox就不能够正常解析。所以,此时就需要指定@Produces("text/plain")
xkr.us/articles/javascript Comparing escape(), encodeURI(), andencodeURIComponent() The purpose of this article is to examine the differences between these three methods and decide on the appropriate times to use each. escape() method Defined in: JavaScript 1.0 Descriptions

mysql常用命令

1、查看用户权限:   show grants for tour;   2、执行sql文件,指定编码 mysql --default-character-set=utf8 -h 127.0.0.1 -u username -P port -p < init-data.sql   3、修改用户密码: SET PASSWORD FOR -> 'jeffrey'@'localhost' = PASSWORD('mypass'); 4、创建用户 grant all on tour.* to 'tour'@'localhost' identified b ...

mysql绑定ip地址

mysql的配置文件中,有bind-address设置
Maven安装jar包到私服、本地仓库(转载) 博客分类:  Maven   1. 安装到本地库:     例如安装jsr173.jar  Cmd代码  
采用requirejs加载jquery mobile,如果顺序不对,一些事件,比如pageinit,pageshow可能听不到。 注意: 1、在逻辑代码中,一定要先绑定事件,然后再加载jqm   define([],function(){ $('#mainPage').live('pageinit', fn1); }); require(['jqm'],function(){});     2、可能由于缓存的原因(不确定),在加载jqm前,要首先禁止页面初始化,然后在jqm加载完成后再手动初始化页面。   $(document).bind("mob ...
原帖地址:http://forum.geonames.org/gforum/posts/list/3960.page   dojo跨域调用支持CORS的网站,默认报403错误,需要在 xhrGet中增加如下参数:     headers: { // This is required to stop the "X-Requested-With": "" // server from rejecting the }, // GET request
参考:http://stackoverflow.com/questions/6290470/eclipse-debugger-always-blocks-on-threadpoolexecutor-without-any-obvious-excepti   具体方法: Preferences->Java->Debug,去掉"Suspend execution on uncaught exceptions"
在server.xml的host下面,增加  <Context docBase="d:/outdir" path="/context/outdir" reloadable="true"/>

linux 常用命令

http://www.blogjava.net/bukebushuo/archive/2009/08/27/283427.html   1. 压缩: tar -cvf /tmp/etc.tar /etc   2. 解压: 先进入要存放解压文件的目录,然后执行 tar -zxvf /tmp/etc.tar.gz   tar -ixvf /tmp/etc.tar.gz   tar -xvf /tmp/etc.tar.gz     3. local file copy to remort: scp tomcat.tar root@remoteip:tomcat.rar   ...
如果文件已经提交到git仓库中,然后把文件加入到.gitignore中,这些文件就不能被git忽略。 需要做如下操作: git rm --cached filename   或者   git rm -r --cached foldname   删除仓库中的文件即可。
ubuntu下,gedit打开文件可能会出现乱码,方法: 1, 首先确定文件的编码方式,如:windows下面,一般是gb2312 2, 执行: gedit --encoding=gb2312 filename

Resteasy vs Jersey

    博客分类:
  • rest
Resteasy正如名称,真的构建rest服务真的是"easy"   1. Jersey预定义的Exception比Resteasy要少很多。 2. Jersey没有Interceptor机制 3. Jersey中,标记为get的方法,不能返回void,否则报“is not recognized as valid Java method annotated with @HttpMethod.”错误。此限制倒也合理。 4. Jersey中,rest方法返回的对象,必须用@XmlRootElement标记才可以自动序列化成json/xml,resteasy可以不用标记 ...
1. Down chrome 2.  sudo dpkg -i chrome.deb. This step may fail, you can try: sudo apt-get -f install
Global site tag (gtag.js) - Google Analytics