- 博客(70)
- 资源 (4)
- 收藏
- 关注
原创 android-input
//设置输入法 InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); if (inputMethodManager.isActive())
2016-11-03 17:19:54
582
原创 JFinal bug问题
tomcat 1.redirect("/index?"); 重定向的使用,必须在重定向路径上加上设置的路由路径jetty 1.“
2016-10-18 09:27:38
762
原创 图片上传 预览 及 获取base64
<div class="row"> <div class="col-lg-1 form-group"> <button type="button" class="btn btn-default img_upload_btn">选择图片 </button>
2016-10-13 10:37:37
2410
转载 5分钟内搞定 Tomcat 的 SSL 配置
本教程使用 JDK 6 和 Tomcat 7,其他版本类似。基本步骤:使用 java 创建一个 keystore 文件 配置 Tomcat 以使用该 keystore 文件 测试 配置应用以便使用 SSL ,例如 https://localhost:8443/yourApp 1. 创建 keystore 文件执行 keytool -genkey -alias tomcat -keyalg R
2016-09-28 15:01:37
618
原创 Centos6.5 安装 MySQL5.6 or MySQL5.7 or 卸载MySQL
Centos6.5 Install MySQL5.6 or MySQL5.7 or Uninstall MySQL1.安装 MySQL5.6rpm -qa | grep mysqlmysql-utilities-1.3.6-1.el6.noarchmysql-server-5.1.71-1.el6.x86_64mysql-libs-5.1.71-1.el6.x86_64mysql-5.1.7
2016-09-01 18:14:04
2192
原创 Java 极光推送 ios,android 服务端
import cn.jpush.api.JPushClient;import cn.jpush.api.common.resp.APIConnectionException;import cn.jpush.api.common.resp.APIRequestException;import cn.jpush.api.push.PushResult;import cn.jpush.api.pu
2016-08-18 10:48:10
3931
原创 mysql ---- max_allowed_packet
进入mysql 设置 max_allowed_packet 执行set global max_allowed_packet = 2*1024*1024*10;重启mysql服务service mysqld restart;
2016-08-01 11:31:07
476
原创 centos6.5测试环境,mysql5.6,java8,tomcat8,文件解压,tomcat输出日志
一、在centos中安装java环境1.查看CentOS自带JDK是否已安装。 输入:yum list installed |grep java。2.若有自带安装的JDK,如何卸载CentOS系统自带Java环境? 卸载JDK相关文件输入:yum -y remove java-1.7.0-openjdk*。 卸载tzdata-java输入:yum -y remove tzdata-java.n
2016-06-27 19:37:55
846
原创 linux 命令
1.按两次大写Z 则退出vi并保存当前设置2.ls 显示目录下的文件3.vi 打开文件编辑器4.ip addr 查看 ip5.ifconfig //修复不能用 yum install net-tools.x86_646.cd /etc/sysconfig/network-scripts/ifcfg-enp0s3 修改IP地址
2016-06-24 16:27:13
380
原创 MyBatis 中的LIKE
<select id="citysByLetter" resultMap="addrCityResultMap"parameterType="String"> select * from a_addr_city where letter like CONCAT('%',#{letter},'%' ) </select>
2016-06-16 18:41:40
433
原创 Maven 手动添加本地jar包
mvn 命令mvn install:install-file -Dfile=jar绝对路径 -DgroupId=项目组织唯一的标识符 -DartifactId=项目的唯一的标识符 -Dversion=jar版本 -Dpackaging=jarmvn install:install-file -Dfile=E:\taobao-sdk-java-auto_1455552377940-20160505.j
2016-06-13 10:50:38
4623
1
原创 packet for query is too large <1781> 1024 >. you can change this value on the server by setting the
packet for query is too large <1781> 1024 >. you can change this value on the server by setting the max_allowed_packet' variable解决方法:进入mysql的安装目录找到my.ini 文件 搜索max_allowed_packet 是否存在 如果存在则 改成50M 或者 2
2016-06-12 18:43:51
2591
原创 JS Input File Multiple 文件格式限制
var format = "png,jpg,gif"; function limitFileFormat(files,format){ var length = files.length; var temp = ""; for (var i = 0; i < length; i++
2016-05-17 10:38:39
2381
原创 SQL 子查询之查询所有主表的数据同时统计另一张表的与主表关联的数据
主表 从表 SQL(查询所有主表的数据同时统计另一张表的与主表关联的数据)select go.*,(select count(cc.id) from cook_comment as cc where cc.goodsId=go.id) as commentNumber from goods as go ;
2016-05-12 13:22:06
19156
3
原创 commons-fileupload 多文件上传
public final void upload() throws Exception { // <dependency> // <groupId>commons-fileupload</groupId> // <artifactId>commons-fileupload</artifactId> // <version>1.3.1</
2016-04-29 17:34:12
1627
原创 MySQL SQL Error Code : 1175 , 1093 解决方案
1.在删除语句中再嵌套一个子查询 delete from account_redpacket where id in (select id from (select id from account_redpacket where redId=6) ar);2.设置 SET SQL_SAFE_UPDATES = 0; 分析:http://www.2cto.com/database/201209
2016-04-28 11:01:06
1256
原创 开启线程池 加入任务 传入参数 此任务能够在执行完成时得到返回值
开启线程池 加入任务 传入参数 此任务能够在执行完成时得到返回值 public static void main(String[] args) { class TaskWithResult implements Callable<String> { public int id; public TaskWithResult(int
2016-04-11 16:39:05
2905
原创 JFinal 设置maxFormContentSize 参数
JFinal 2016-03-21 16:33:11[ERROR]-[Thread: qtp581374081-25]-[com.jfinal.core.ActionHandler.handle()]: /cook/managerCookWordsjava.lang.IllegalStateException: Form too large1105684>200000 at org.e
2016-03-21 16:37:29
2083
转载 Mysql:is not allowed to connect to this MySQL server
http://blog.chinaunix.net/uid-27666459-id-4028596.html
2016-03-10 10:03:29
482
原创 Flash 通过RTMP协议 连接 Red5服务器
Flash code:import flash.net.NetConnection;import flash.events.NetStatusEvent;function netStatus(event:NetStatusEvent):void{ trace(event.info.code);}var nc:NetConnection = new NetConnection();
2016-02-22 13:45:54
1878
原创 Flash通过RTMP协议连接到RED5服务器发生不信任的本地SWF文件可能不能联系Internent
解决方案: 1.在控制面板 搜索flash 出现flash player (32) 的程序打开 2.在高级菜单中选择受信任位置设置 添加flash文件的保存目录 3.完成后重新运行flash文件 通过!
2016-02-22 13:13:17
1367
原创 java server 传输给 ios 图像数据的三种方式
1.得到服务器的图像byte[] 以byte[]传输2.得到服务器的图像byte[] 通过base64编码3.得到服务器的图像静态地址获取资源/** * 根据绝对文件地址 获取文件的字节数据 * * @param url * @return */ private final byte[] findFileByteArrayByPath(
2016-01-29 10:02:17
735
原创 CSS3 彩虹背景
/* 彩虹背景效果 style ="background: -moz-linear-gradient(left, red, #f96, yellow, green, #ace); background: -webkit-linear-gradient(left, red, #f96, yellow, green, #ace); background: -o-line
2016-01-20 15:01:20
1146
原创 Drag Validation - 拖动验证-解锁
drag-validation.js$(function() { var drag = $this("drag"); var dvi = $this("drag-validation-img"); var dvl = $this("drag-validation-lock"); var dvc = $this("drag-validation-canvas");
2016-01-19 17:38:18
3097
原创 HTTP - POST 406 Not Acceptable
pom.xml <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.7</version> </dependency>servle
2016-01-08 14:49:03
4045
原创 java.lang.OutOfMemoryError: PermGen space
Jetty maven VM arguments:-server -Xms512m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:+PrintGCDetails
2016-01-07 15:02:11
577
转载 JVM的GC简介和实例
本文是一次内部分享中总结了jvm gc的分类和一些实例, 内容是introduction级别的,供初学人士参考.成文仓促,难免有些错误,如果有大牛发现,请留言,我一定及时更正,谢谢!JVM内存布局主要包含下面几个部分:Java Virtual Machine Stack: 也就是我们常见的局部变量栈,线程私有,保存线程执行的局部变量表、操作栈、动态连接等。Java Heap:我们最常打交道的内
2016-01-07 14:58:42
674
原创 Spring 集成Quartz Scheduler 定时调度任务 Example
<---------spring-quartz.xml------------------------------------------------------------------------------------------------------------------------------------------------------------------------><?xm
2016-01-07 09:10:34
712
原创 JSTL 计算时间差
JSTL 计算时间差 <c:if test="${((currentTime-c.commentDatetime.time)/1000/60/60)>=1}"> <fmt:formatNumber value="${((currentTime-c.commentDatetime.time)/1000/60/60)
2016-01-06 17:10:56
3326
原创 2016-01-06 09:42:53.547:WARN:oejs.HttpChannel:qtp2109938810-27: Could not send response error 500: j
org.apache.jasper.JasperException: java.lang.IllegalStateException: STREAM at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585) at org.apache.jasper.ser
2016-01-06 09:45:16
2846
原创 2016-01-06 09:37:21.282:WARN:oejs.HttpChannel:qtp2109938810-27: Could not send response error 500: j
2016-01-06 09:37:21.219:WARN:oejs.ServletHandler:qtp2109938810-27: javax.servlet.ServletException: Filtered request failed. at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(Abs
2016-01-06 09:40:08
3910
原创 JSP_EXTENDS
BlockTag:import java.io.IOException;import javax.servlet.jsp.JspException;import javax.servlet.jsp.tagext.TagSupport;public class BlockTag extends TagSupport{ private static final long serialVersi
2015-12-31 17:01:50
890
原创 RSA 非对称加密算法
RSA 非对称加密算法:import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.ObjectInputStream;import java.io.ObjectOutputStream;import java.security.Key;import j
2015-12-30 10:20:27
582
原创 获取Java项目的绝对根地址
获取Java项目的绝对根地址public static String findProjectRootPath() { RSAEncrypt encrypt = new RSAEncrypt(); String path = encrypt.getClass().getResource("").toString().replace("file:/", "");
2015-12-30 09:57:12
1231
原创 maven 添加本地jar
mvn install:install-file -Dfile=D:\mvn\spring-context-support-3.1.0.RELEASE.jar -DgroupId=org.springframework -DartifactId=spring-context-support -Dversion=3.1.0.RELEASE -Dpackaging=jar
2015-12-29 17:05:00
406
原创 Spring4 Note @Scope @RequestMapping @Controller
@Controller使用@Controller 注解的类为Spring mvc 控制器类@RequestMappingvalue 指定请求的实际地址,地址可以是URI Template模式.method 指定请求的method方法类型GET,POST,PUT,DELETE.consumes 指定提交的请求的内容的类型(Content-type) 如:application/json,tex
2015-12-25 22:48:34
1167
原创 maven Jetty plugin config
<plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.3.6.v20151106</version>
2015-12-25 15:06:48
496
原创 bookmark
Java EE 7 Deployment Descriptorshttp://antoniogoncalves.org/2013/06/04/java-ee-7-deployment-descriptors/
2015-12-25 10:32:45
616
原创 maven multipart project manage
app-parent:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd
2015-12-24 17:05:58
534
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人