`
这些年
  • 浏览: 389897 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
在tomcat的conf/Catalina/localhost目录下配置项目路径,tomcat启动是会直接根据配置去加载项目。 虽然配置就一句话,但经常忘,今天记下来。 如果你的项目成名是:mypro,那你的文件命名为:mypro.xml。 文件里一句话:<Context docBase="D:\Workspaces\mypro\WebRoot" path="/mypro" reloadable="true"/> docBase是项目路径,path是项目名称。   2访问tomcat根目录下的文件 可以把文件放到R ...

poi处理大量数据

    博客分类:
  • poi
使用的pom.xml文件如下所示:        <dependency>             <groupId>org.apache.poi</groupId>             <artifactId>poi</artifactId>             <version>3.8</version>         </dependency>         <dependency>             <groupId>org.apache.poi ...
对list进行分组 import java.util.ArrayList; import java.util.List; import org.apache.commons.collections.CollectionUtils; public class GroupUtil { /** * 为了提高查询性能,将节点进行分组 */ public static List<List<String>> divideIntoGroups(List<String> nodeCodes, int groupSize) { i ...
1:while ,for 中一般不要有变量的创建 public void getBandwidth(){ for(int i=o;i<10;i++){ int b= new Integer(i); #b变量应该在外面创建 System.out.println(b); } } public void getBandwidth(){ int b=null; for(int i=o;i<10;i++){ b= new Integer( ...

vim 的一些用法

1:替换命令 替换一行中的数据 :s/vivian/sky/ 替换当前行第一个 vivian 为 sky :s/vivian/sky/g 替换当前行所有 vivian 为 sky   替换每一行中的数据 :%s/vivian/sky/(等同于 :g/vivian/s//sky/) 替换每一行的第一个 vivian 为 sky :%s/vivian/sky/g(等同于 :g/vivian/s//sky/g) 替换每一行中所有 vivian 为 sky   替换一定范围的数据 :n,$s/vivian/sky/ 替换第 n 行开始到最后一行中每一行的第一个 vivian 为 sk ...

python 语法

1:输出数据 print 'hello world!'print "hello world!"print 'hello %s!' %('world')    %d表示数字占位符(print type("")可以查看类型)  如何输出% print 'hello %s!  %%' %('world')   2:if a = 1; b = 2if(a == b) :    print 'a == b'elif (a > b) :    print 'a > b'elif (a < b) :    print 'a < b ...

初识python

python很好, 1:安装 windows安装:       下载地址:http://www.python.org/download/       环境变量:PATH=PATH;c:\python27(默认安在c盘上) linux安装:       1): 下载:http://www.python.org/download/        2):tar -xzf Python-2.7.3.tgz        3):cd python-2.7.3 && ./configure && make&& make install   ...
1:统计出现在次数 cat access_20130819.log |awk '{print $1}'|sort|uniq -c  2:awk中的if awk '{if ($9 != "200")print $0 }' access_20130819.log |wc -l 3:得到目录下文件大小 du -sh *  4:查看第n行以后的内容 cat -n customer_report_config.xml|awk '{if ($1 > n)print $0}'  5:保持程序关机后自动运行   crontab    必须先cd到目录,在sh if ...
[snp@date Flux]$ telnet anonymousrelay.chinacache.com 25 Trying 61.135.207.214... Connected to anonymousrelay.chinacache.com (61.135.207.214). Escape character is '^]'. 220 corp.chinacache.com Microsoft ESMTP MAIL Service ready at Wed, 14 Aug 2013 14:32:39 +0800 helo chinacache.com 250 corp.ch ...

返回json

    博客分类:
  • java
@Override public String getChannelInfosResultFromJson(List<ChannelInfo> channelInfos) throws IOException { JSONArray js = new JSONArray(); js.addAll(channelInfos); return js.toJSONString(); } 或 public String taskJsonData(String taskId) { JSONArray list = JSONArray.f ...

tomcat打出错误日志

    博客分类:
  • java
今天启动Tomcat启动不了,报以下错: org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/******] startup failed due to previous errors 网上找了N多文章,都没有切中要害。 后来在国外网站上搜到一个方法 http://grails.1312388.n4.nabble.com/Deployme ...

web.xml详细配置

    博客分类:
  • java
web.xml加载顺序 应用服务器启动时web.xml加载过程,至于这些节点在xml文件中的前后顺序没有关系,不过有些应用服务器,我曾碰到过的 websphere就严格要求web.xml的节点顺序,否则部署不成功,所以还是赞成按照web.xml标准格式写content- ...
登入mysql: msql -u用户名 -p;   修改表结构: alter table productbandwidth_productbandwidth modify column productcode varchar(20); 并加注释 alter table member add column province varchar(50) COMMENT '户籍省';   给表加注释 ALTER TABLE table_name COMMENT='这是表的注释';  修改默认值时(defalut null 之前加上null ) ALTER TABLE member ...
1:sql中的占位符一定不要用引号  private void baskHist(final List<String[]> userBillingOrChannel) { String sqlFiled = DateFormatUtils.format(Calendar.getInstance().getTime(), "yyyyMM"); String sql = "INSERT into user_to_billing (user_id,billing_id,bak_date) VALUES (?,?,'"+ sqlFi ...

jdbc mysql orcale

    博客分类:
  • java
mysql   mysql.jdbc.driverClassName=com.mysql.jdbc.Driver mysqlDataBase.url=jdbc:mysql://localhost:3306/queryservicehistorymysqlDataBase.user=rootmysqlDataBase.passwd=root   Class.forName("com.mysql.jdbc.Driver");conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/rav ...
Global site tag (gtag.js) - Google Analytics