`
文章列表
    We are all want safety food to eat,we have to trust a lot of people for our food to make it safely all the way from the cow's feed to the cereal now. Last Friday, one of the highest officials—the ministry of health and agriculture, lose his job, because the lack of supervision the food safety.   ...
Google Picasa是一个在线的相册系统,他提供了很多API,我们可以对相册进行操作,下面就是一个简单的获得一个用户所有相册,并把相册里面所有的图片显示出来,页面我也没有做什么美化,在初步研究之后,发现它的API的功能还比较强大,以后有时间了再看看其他的功能。源代码和.war文件都太大了,上传两个图片看看。。 [size=medium] import java.io.BufferedInputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; ...
    Since January, more than a fifth of the five million residents of the HangZhou area have recieved the same vouchers, HangZhou official want to use this manner to stimulate the downturn of the economic.    After that, some delegates even advice to give every person one thousand RMB to stimulate t ...
hibernate.hbm2ddl.auto = create.    Usually you only leave it turned on in continuous unit testing, but another run of hbm2ddl would drop everything you have stored - the create configuration setting actually translates into "drop all tables from the schema, then re-create all tables, when the ...
    我们发现sql语句的个数是相同的,功能也差不多,但发现上面在两个update语句里面,又把name设置了一下,但底下的sql语句则显示的比较“智能”一些,不知道为什么,恳请高手解释。 [/size] public class Address { private lo ...
刚用到的,保留在此,以备查询。 try { URL url = new URL( "http://lh3.ggpht.com/_d4XrOKBCIPc/ScL_LIHMDAI/AAAAAAAAABI/mP8Dmd0h9XY/s72/error.png"); java.io.BufferedInputStream bis = new BufferedInputStream(url.openStream()); byte[] bytes = new byte[100]; OutputStream b ...
发现google code是一个好东西,今天发现两个还不错的项目,先研究一下,看能不能参与进去。 Micrite is an application that developers can refer to when starting a web project base on Struts and Spring. It should aid you learn how to develop a complicated web application, from design to coding, from compiler to integration testing... Micrit ...
   Just today the ministry of Commerce said Coca-Cola company purchase HuiYuan juice company is going against the anti-trust and anti-monopoly. As we all know, Coca-Cola is very popular in China market, but HuiYuan company is almost is the largest local company in our country in the juice area.    A ...
Mobile device is very popular in the past years, especially the intelligent mobile device, around 2007 years, Apple launched a new version of mobile phone, called IPhone. It attracted tens of thousands of client's interest,although it's very expensive. After that, Apple company continue to ...
整合时,由于要spring来托管struts2的action,要把struts2的action的scope设置成prototype, 让它每一次都生成一个新的实例,要不然始终在内存中一个,就会出现问题。 每次提交一下,都会增加一条出错信息。  
2009-3-18 11:02:08 com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters 严重: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'submit' on 'class com.learning.action.LoginAction: Error setting expression 'submit' with value '[Ljava.lang.String;@19d6af' 我 ...
一个含N个整数的数组,其中一个元素出现次数 k>N/2,找出这个元素。限O(N)时间,O(1)空间。其实就是找数组中出现次数最多的那个元素,看到一篇帖子,调试了一把发现有问题, http://hi.baidu.com/wzfxyer/blog/item/a16bec99e6b7700f6f068c69.html public class FindKinN { public static void main(String[] args) { int[] a = {1,1,1,1,2,2,1,1,2,2,2,1}; int count, ...
昨天看到jive方法里面的String替换的方法,感觉哪里面实现的比较繁琐,看看一个简单的方法。但效率的话我还没有比较。 public static String replaceAll(final String original, final String pattern, final String value) { String copy = new String(or ...
我们经常在代码中使用String的replace方法和replaceAll方法,但JDK的类调用比较复杂,下面我们看看jive中的实现: public static final String replace(String line, String oldString, String newString) { if (line == null) { return null; } int i = 0; if ((i = line.indexOf(oldString, i)) >= 0) { char[] line2 = line.toCha ...
现在我们编写struts的配置文件: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <constant name="str ...
Global site tag (gtag.js) - Google Analytics