ITeye博客

cmysunny

cmysunny · 共 8 篇文章

服务器jvm参数配置

Eclipse崩溃,错误提示: MyEclipse has detected that less than 5% of the 64MB of Perm Gen (Non-heap memory) space remains. It is strongly recommended that you exit and restart MyEclipse with new virtual machine memory paramters to increase this memory. Failure to do so can result in data loss. The recommend…

2015-05-13 10:59 · 评论(0)

Eclipse中怎么清除EGit记住的GitHub用户名和密码

Eclipse中如何清除EGit记住的GitHub用户名和密码 现在公司的项目都是使用GitHub存储,然后再Eclipse中安装Git插件,pull或push代码的。第一次pull项目的时候eclipse记住了填写的github账号和密码,一直都很正常。昨天登录github的时候忘记密码了,于是选择重置并修改后!代码就同步不了了,也不能pull和push,一直报没有认证。我意识到eclipse记住的还是以前的密码。但找了半天也没找到,上网查也没人提过这个问题。 后来查eclipse官方文档,原来很简单,特此mark一下! window-preferences-General-Securit…

2015-04-13 19:06 · github · 评论(0)

Map 遍历的四种方式

Map<String, String> map = new HashMap<String, String>(); map.put("1", "value1"); map.put("2", "value2"); map.put("3", "value3"); //第一种:普遍使用,二次取值 System.out.println("通过Map.keySet遍历key和value:"); for (String key : map.keySet()) { System.out.println("key= "+ key + " and value= " + map.get(key)); } //第二…

2015-03-20 14:46 · java · 评论(0)

memcached win7 启动过程

C:\work\memcached>memcached.exe -d install failed to install service or service already installed 出现这种情况,用管理员身份运行cmd.exe 即可

2015-03-13 14:00 · 评论(0)

git 笔记

1、查询git的版本状况 git branch 2、分支创建与切换 git checkout -b dev 相当于 git branch dev 创建; git checkout dev 切换; git checkout -t origin/git_doc; # 其他开发人员基于origin/git_doc创建本地分支 2、分支删除 git branch -D dev 3、当前分支的状态 git status 4、分支提交代码 git commit -a -m '我提交的' -a 表示可以将那些没有通过git add标识的变化一并强行提交,但是不建议使用这种方式。 -m 标识提交时的信息 5…

2015-03-04 11:38 · github · 评论(0)

mongodb工具类

package org.sunstar.util; import java.net.UnknownHostException; import java.util.List; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.PropertiesConfiguration; import com.mongodb.BasicDBObject; import com.mongodb.DB; import com.mongodb.DBColle…

2015-03-04 11:35 · mongodb · 评论(0)

oracle 数据导入导出

1、导出txt select * into outfile "d:/dataout.txt" fields terminated by "|" lines terminated by "\n" from export_test 2、导入txt load data infile "d:/dataout.txt" into import_test fields terminated by "|" lines terminated by "\n" 3、替换特定字符 select *,replace(adstract,char(10)," ") into outfile "d:/dataout.tx…

2013-02-05 15:46 · 数据库 · 评论(0)

Spring+hibernate+junit的Dao测试

开发一个eclipse3.4+Struts2.0+hibernate3.2+Spring2.5+oracle10g的项目。实现完DAO层后,想对Dao层做下测试。以前都是用的Junit3.8,这次换了最新的Junit4.4,但是在写测试类时遇到不少麻烦,将碰到的问题和解决方法记录下来,供后来的朋友们参考。 下面分别讲解在Junit4.4和Junit3.8下如何写测试类。 对于Junit3.8: Spring的DAO层的测试,spring-test.jar包里有个AbstractTransactionalDataSourceSpringContextTests类,只要继承它,然后重写getCo…

2010-06-09 15:06 · Spring · 评论(0)