passer1991

2012年11月1日

如何判断浏览器的请求头是不是结束

摘要: \r\n\r\n好像是结束符packagecom.maple.detail3;importjava.io.FileInputStream;importjava.io.FileNotFoundException;importjava.io.IOException;importjava.io.InputStream;importjava.io.OutputStream;importjava.io.PrintWriter;importjava.net.ServerSocket;importjava.net.Socket;publicclassTcpServer3{publicstaticvoidma 阅读全文

posted @ 2012-11-01 00:37 passer1991 阅读(239) 评论(0) 推荐(0) 编辑

2012年10月28日

cmd检查jdk的版本

摘要: java -version 阅读全文

posted @ 2012-10-28 20:25 passer1991 阅读(859) 评论(0) 推荐(0) 编辑

2012年10月15日

JavaMail学习笔记

摘要: JavaMail学习笔记(二)、JavaMail API简介和配置开发环境一、JavaMail API 简介 JavaMail API是Sun公司为方便Java开发人员在应用程序中实现邮件发送和接收功能而提供的一套标准开发包,它支持一些常用的邮件协议,如:SMTP、POP3、IMAP和MIME等。开发人员使用JavaMail API编写邮件处理软件时,无须考虑邮件协议底层的实现细节,只要调用JavaMail开发包中相应的API类就可以了。JavaMail API封装在一个名mail.jar的文件中,它是开发JavaMail应用程序时所必须使用的核心jar包。二、配置 JavaMail 开发环境 阅读全文

posted @ 2012-10-15 17:59 passer1991 阅读(515) 评论(0) 推荐(0) 编辑

2012年10月6日

Struts2的工作原理

摘要: http://www.cnblogs.com/jy02444453/archive/2011/08/27/2155427.html 阅读全文

posted @ 2012-10-06 20:22 passer1991 阅读(88) 评论(0) 推荐(0) 编辑

Java类装载的过程及原理介绍

摘要: http://soft.chinabyte.com/database/6/11330006.shtml 阅读全文

posted @ 2012-10-06 15:22 passer1991 阅读(165) 评论(0) 推荐(0) 编辑

2012年10月5日

截取字符串,只截取前N个字节的字符

摘要: publicvoidcutString(Stringstr,intn){Stringtemp;intcount=0;for(inti=0;i<str.length();i++){temp=str.charAt(i)+"";count+=temp.getBytes().length;if(count>n)break;System.out.print(temp);}}@TestpublicvoidtestString(){cutString("我ABC好的sfd",7);} 阅读全文

posted @ 2012-10-05 15:52 passer1991 阅读(406) 评论(0) 推荐(0) 编辑

插入排序

摘要: publicvoidinsertSort(List<Integer>list){if(list.size()<2)return;for(inti=1;i<list.size();i++){inttemp=list.get(i);intbefore=list.get(i-1);if(temp>before)continue;for(intj=0;j<i;j++){if(list.get(j)>temp){list.remove(i);list.add(j,temp);break;}}}}@TestpublicvoidtestInsertSort(){Li 阅读全文

posted @ 2012-10-05 15:28 passer1991 阅读(130) 评论(0) 推荐(0) 编辑

2012年10月4日

我的快速排序

摘要: privatevoidquickSort(int[]arr,intbegin,intend){if(begin>=end)return;intlow=begin;inthigh=end;intindex=begin;inttemp=arr[begin];booleanflag=false;//当flag的值为true向前,否则向后while(low!=high){if(flag){for(;low<high;low++){if(arr[low]>temp){arr[high]=arr[low];high--;index=low;flag=false;break;}}}else 阅读全文

posted @ 2012-10-04 10:29 passer1991 阅读(142) 评论(0) 推荐(0) 编辑

快速排序

摘要: http://www.cnblogs.com/morewindows/archive/2011/08/13/2137415.html 阅读全文

posted @ 2012-10-04 09:25 passer1991 阅读(82) 评论(0) 推荐(0) 编辑

2012年10月2日

修改MyEclipse8.6中的Servlet.java模板

摘要: http://hi.baidu.com/x_xiao_eng/item/f39f3987a64eb6deef083db7进入MyEclipse的安装目录...Genuitec\Common\plugins用解压文件工具进入com.genuitec.eclipse.wizards_8.6.0.me201007140905.jar\templates 修改Servlet.java文件 阅读全文

posted @ 2012-10-02 00:00 passer1991 阅读(343) 评论(0) 推荐(0) 编辑

导航