- 博客(94)
- 收藏
- 关注
原创 【Thinking in Java】二:一切都是对象
1 Java如何操纵对象2 Java存储3 Java 基本类型 和 精度数据操作类4 Java 类成员默认初始化
2016-03-24 10:57:31
409
原创 Java多线程基础
进程(Process)是计算机中的程序关于某数据集合上的一次运行活动,是系统进行资源分配和调度的基本单位,是操作系统结构的基础。在早期面向进程设计的计算机结构中,进程是程序的基本执行实体;在当代面向线程设计的计算机结构中,进程是线程的容器。程序是指令、数据及其组织形式的描述,进程是程序的实体。
2017-06-30 20:41:58
251
原创 limit 1
primary key auto_increment,email varchar(255),password varchar(255));每个用户的email是唯一的,如果用户使用email作为用户名登陆的话,就需要查询出email对应的一条记录。SELECT * FROM t_user WHERE email=?; 上面的语句实现了查询email对应的一条用户信息,但是由于email这一列没有加索引,会导致全表扫描,效率会很低。 SELECT *
2017-06-30 11:38:19
606
原创 mysq乱码
SET character_set_client='utf8'; SET character_set_connection='utf8'; SET character_set_results='utf8';
2017-06-07 22:24:15
164
Mockito Spring @value
flectionTestUtils.setField(manageService, "defaultUrl", "url123");}[/code]
2017-04-25 20:44:53
1728
Java HttpUtil
org/[/url][/size][b][color=red]3 HttpUtil[/color][/b][code="java"]import org.apache.http.HttpEntity;import org.apache.http.HttpResponse;import org.apache.http.client.ClientProtocolException;import org.apache.http.client.Response
2017-04-15 20:02:09
176
JavaBean和XML 互转工具类
lic class Person { private String firstname; private String lastname; private PhoneNumber phone; private PhoneNumber fax; public Person(String firstname,String lastname){ this.firstname = firstname; this.lastname = lastname;
2016-09-13 17:19:06
166
JAVA 判断某个文件中是否包含指定字符串
indStringInFile(String path) throws IOException{ File file = new File(path); InputStreamReader read = new InputStreamReader(new FileInputStream(file),"UTF-8");//考虑到编码格式 BufferedReader bufferedReader = new BufferedReader(read)
2016-08-10 10:11:51
2088
原创 Eclipse Java注释模板设置详解
les)注释标签:/** * @Title: ${file_name} * @Package ${package_name} * @Description: ${todo}(用一句话描述该文件做什么) * @author A18ccms A18ccms_gmail_com * @date ${date} ${time} * @version V1.0 */类型(Types)注释标签(类的注释):/** * @ClassName: ${typ
2016-08-09 09:51:24
126
原创 Eclipse导入项目:No projects are found to import
隐藏文件.classpath,如果没有,你可以参考一下方法方法1:最直接的操作,可以把其它项目的.project, .classpath文件拷贝过来,修改相应的地方则可。1).project文件只需要修改AboxTVExchange这个项目名称则可2) .classpath文件通常不用改,内容如下: kind= “… “是指这个目录在project中的类型。kind= “src “为源文件目录,这个目录下的文件会
2016-07-29 23:29:17
291
原创 RabbitMQ 常用命令
http://www.rabbitmq.com/rabbitmq-signing-key-public.asc# rpm -ivh http://www.rabbitmq.com/releases/rabbitmq-server/v3.0.0/rabbitmq-server-3.0.0-1.noarch.rpm打开server# chkconfig rabbitmq-server on# rabbitmqctl status会报异常:# rabbitmqctl status
2016-07-29 16:46:32
238
Software caused connection abort: socket write error
ckoverflow.com/questions/36024911/apache-commons-ftpclient-storefile-error-caused-by-java-net-socketexception[/url]
2016-07-25 14:41:20
480
原创 Access restriction: The constructor SunJCE() is not accessible 错误
t\sunjce_provider.jar')Access restriction: The constructor SunJCE() is not accessible due to restriction on required library D:\Program files\jdk1.6.0_07\jre\lib\ext\sunjce_provider.jarAccess restriction: The type SunJCE is not accessible due to re
2016-07-22 11:20:50
222
原创 The type javax.servlet.ServletContext cannot be resolved. It is indirectly refer
2016-07-22 11:17:00
328
JAVA 3DES加解密与C对接
ipher=Cipher.getInstance("DESede/ECB/NoPadding");生成的32位 与C端相同Java 解密、工具类 见下文[/color]Java 官方附录:[url]http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#AlgorithmParameterGenerator[/url]Cipher cipher=Ciph
2016-07-14 10:48:23
308
原创 Rabbitmq 从零入门
shanyou/p/4067250.html3 RabbitMq 简单的Java Demo http://www.cnblogs.com/luxiaoxun/p/3918054.html Hello World Demo 优快云私人版 http://blog.youkuaiyun.com/mydreamongo/article/details/8272025 官网详解版 https://www.rabbitmq.com/tutorials/tutorial-one
2016-06-28 09:54:27
141
Java 大数据 取出两列不同的值 生成到文本中
Util { private static final String encoding="GBK"; private static final String n = System.getProperty("line.separator"); public static void main(String[] args) throws Exception { Map map1 = new HashMap(); String filePath1
2016-06-20 11:24:46
163
HIbernate save报错 org.hibernate.exception.SQLGrammarException: could not execute
heck the manual that corresponds to your MySQL server version for the right syntax to use near[color=red] 'group[/color], manageFlag, id) values ('wind', '123456', null, null, null, null, 4)' at line 1使用了mysql的关键字group,换成其他字段即可。
2016-06-03 21:20:52
202
转载 Java 生成随机数
"abcdefghijkllmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; public static final String NUMBERCHAR = "0123456789"; /** * 返回一个定长的随机字符串(只包含大小写字母、数字) * * @param length * 随机字符串长度
2016-05-13 14:37:51
144
Java 源码解析:十进制转二进制
'v', 'w', 'x', 'y', 'z' }; public static String toBinaryString(int paramInt){ return toUnsignedString(paramInt, 1); } private static String toUnsignedString(int paramInt1, int paramInt2){ char[] arrayOfChar = new char[32]; int i
2016-05-09 18:13:08
168
Java 源码十进制转二进制
'v', 'w', 'x', 'y', 'z' }; public static String toBinaryString(int paramInt){ return toUnsignedString(paramInt, 1); } private static String toUnsignedString(int paramInt1, int paramInt2){ char[] arrayOfChar = new char[32]; int i
2016-05-09 18:11:37
314
Linux tomcat java.nio.file.NoSuchFileException: /home/****/apache-tomcat-7.0.4/
2016-05-06 17:35:49
2416
【Thinking in Java】六:复用
mal"); }}class Monkey extends Animal{ Monkey(){ System.println.out("Monkey"); } public static void main(String[] args){ Monkey() m = new Monkey(); }}[/code]Output:AnimalMonkey
2016-04-15 15:57:55
96
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅