- 博客(44)
- 资源 (26)
- 问答 (1)
- 收藏
- 关注
原创 Thinkpad T420 Fn热键在Windows10中的解决方案
之前升级Windows10时,看官方没有提供一些热键的驱动,就没有折腾了。使用了近三年,心中始终有疙瘩。总感觉不能支持Fn热键的小黑不是真小黑,不甘心,遂折腾。目前恢复了静音按键和F5、F6、F8热键的功能。整理了一下涉及到的驱动和方法,供大家参考。使用的都是联想官网提供的驱动。所有涉及到的驱动都使用Window7版本,可以完美兼容。建议操作前,先备份系统。驱动列表集成System ...
2020-02-15 17:34:51
5959
原创 Yarn 安装过程出现 read ECONNRESET 错误
在使用yarn安装项目依赖包时,出现以下错误。info There appears to be trouble with your network connection. Retrying...error An unexpected error occurred: "http://r.cnpmjs.org/which/download/which-1.2.14.tgz: read ECONNR...
2018-12-05 11:44:50
12915
原创 Dell 3620 加装SSD遇到的磁盘100%的坑
我的3620工作站原本是500G的机械硬盘 + Win10,苦于硬盘使用率经常达到100%,遂决定加装SSD。SSD作为系统盘,原先的机械盘作为存储盘。安装完系统后,遇到了磁盘使用率达到100%,导致系统经常卡顿。尝试着关闭Windows Defender、Windows Update、Superfetch、Connected User Experiences and Telemetry、Cor...
2018-12-04 19:25:04
2843
原创 使用Nginx对Websocket进行反向代理
使用Nginx对Websocket进行反向代理背景Nginx配置示例Vue配置示例背景在Vue项目中,开发websocket时,将IP和端口号固定,或者根据NODE_ENV判断环境,修改IP和端口,相当不可取。当环境地址变更时,就需要重新打包,再发布版本,很是麻烦。使用Nginx对WebSocket进行反向代理,就会解决这一痛点问题。Nginx配置示例<html><bo...
2018-11-27 21:56:08
18420
1
原创 G2自定义Tooltip
G2自定义Tooltip<div id="interfaceChart" class="interface-chart-main"></div>import G2 from '@antv/g2'import DataSet from '@antv/data-set'let chart = new G2.Chart({ container: 'interfac...
2018-11-16 16:41:06
6977
1
原创 ECharts加载省份地图
因为项目只需要展示单独省份的城市,而目前Echarts官网已不再提供地图下载功能。详细见:EChartsMap ECharts地图下载但是可以从ECharts安装包中找到矢量地图数据,文件路径 node_modules\echarts\map\json示例代码:<!DOCTYPE html><html><head> <meta...
2018-11-14 14:50:49
8789
2
原创 JavaScript读取图片base64编码
HTML代码&lt;input type="file" onchange="onChange(event)"&gt;JavaScript代码function onChange(event) { let file = event.target.files[0] let reader = new FileReader() reader.onload = function(event...
2018-11-14 14:17:30
1584
原创 Corodva Could not resolve com.android.tools.build:gradle:3.0.0 解决方法
Corodva Could not resolve com.android.tools.build:gradle:3.0.0 解决方法使用 cordova run android 运行时,出现错误* What went wrong:A problem occurred configuring root project 'android'.> Could not resolv...
2018-08-02 10:45:00
13375
原创 React Native Error while uploading app-debug.apk : Unknown failure ([CDS]close[0])
React Native Error while uploading app-debug.apk : Unknown failure ([CDS]close[0])
2017-12-01 17:32:12
1566
原创 Lodash兼容IE6~IE8
lodash 从4.0.0开始支持的环境有: Chrome 46-47, Firefox 42-43, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10.x, 0.12.x, 4.x, & 5.x, & PhantomJS 1.9.8。已不再支持IE6~IE8。 如果想兼容IE6~IE8,只能使用3.x版本。lodash 3.x 版本没有直接提供可用的js, 需
2016-09-29 13:33:07
6373
原创 模块化单文件引入Echarts报错 Cannot read property 'mod' of undefined
模块化单文件引入Echarts报错Cannot read property 'mod' of undefined。问题原因如下:echarts-optimizer压缩后的echarts.js中包含了esl(符合AMD规范)。如果echarts.js在RequireJS之前引入,页面中就无法加载ehcarts依赖之外的模块,比如通过AMD定义的jquery,ehcarts.js在执行时就会报Canno
2016-06-29 13:49:01
4325
原创 jQuery File Upload在IE6~IE8中无法获取响应数据(data.result)
jQuery File Upload在IE6~IE8中无法获取响应数据
2016-06-20 15:29:29
3275
转载 O'Reilly 免费电子书
http://www.oreilly.com/programming/free/files/microservices-vs-service-oriented-architecture.pdfhttp://www.oreilly.com/programming/free/files/swift-pocket-reference.pdfhttp://www.oreilly.com/progr
2016-05-04 15:12:17
2771
原创 SpringMVC ExceptionHandler 可以传递的参数及返回值
使用ExceptionHandler注解的方法可以传递的参数及返回值
2016-04-12 10:15:33
8275
4
转载 requirejs加载css
https://github.com/guybedford/require-css 下载 require-css HTML<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> <button type="button" class="close"
2016-04-07 17:59:34
6086
2
原创 Bootstrap 警告框自动关闭
Bootstrap 警告框自动关闭,其实就是延迟关闭警告框,代码如下window.setTimeout(function(){ $('[data-dismiss="alert"]').alert('close');},2000);
2016-04-07 11:47:47
15662
转载 Java将图片转为base64
读取图片public String imageToBase64(){ String image = "d:\\009.png"; byte[] data = null; // 读取图片字节数组 try { InputStream in = new FileInputStream(new File(
2016-04-05 11:07:17
652
转载 json-lib的maven配置
项目中要用到json-lib,刚开始在pom.xml中按以下的方式做配置: net.sf.json-lib json-lib 2.4 但是在eclipse中一直提示json-lib.jar找不到,导致项目不能编译。后面json-lib提供了两个jdk版本的实现, json-lib-jdk13.jar和json
2015-04-11 20:36:20
1323
2
原创 IE8 中text-overflow:ellipsis 与text-align:right组合样式BUG
text-overflow:ellipsis 作用是显示省略符号来代表被修剪的文本IE8中不添加 text-align :right 样式是没有问题的例:显示省略符号来代表被修剪的文本结果是这样的加上 text-align:right;之后,变成这样了省略号完全被覆盖了。此时,需要添加 text-indent:10px;之后就能正常显示了
2015-04-02 14:03:01
1255
转载 能保存Properties文件注释的Properties工具类
http://brokendreams.iteye.com/blog/1932875
2015-03-26 17:03:04
584
原创 Struts非Action层获取request
Struts非Action层获取requestHttpServletRequest request = ServletActionContext.getRequest();
2015-03-13 15:56:27
564
原创 java读取和遍历properties文件并根据key进行排序
java如何读取和遍历properties文件 import java.io.IOException;import java.io.InputStream;import java.util.ArrayList;import java.util.Collections;import java.util.Comparator;import java.util.HashMap;
2015-03-12 17:16:44
1323
翻译 jQuery 使用案例
1、常见模式: // create and append your element $(document.body).append(""); // requery to bind stuff $("div.baaron").click(function () { }); // preferred // swap to appendTo t
2015-02-14 10:38:28
325
转载 Aspect Oriented Programming with Spring
http://docs.spring.io/spring/docs/2.5.x/reference/aop.html#aop-pointcuts-combining
2014-10-30 10:07:41
371
转载 spring4.x + hibernate4.x 配置详解
spring4.x + hibernate4.x 配置详解关于spring和hibernate的使用以及特征等等,在此不再啰嗦,相信大家也都知道,或者去搜索一下即可。本篇博文的内容主要是我最近整理的关于spring4.x 和 hibernate 4.x 相关配置和使用方式,当然spring3.x以及hibernate4.x也可以借鉴。 首先是配置文件 web.xml 增加以下代
2014-09-12 14:53:26
652
转载 如何编写高效的jQuery代码
jQuery的编写原则: 一、不要过度使用jQuery 1. jQuery速度再快,也无法与原生的javascript方法相比,而且建立的jQuery对象包含的信息量很庞大。所以有原生方法可以使用的场合,尽量避免使用jQuery。 例如:$("a").click(function(){ alert($(this).attr("id"));});
2014-09-12 10:27:42
432
转载 Java中的ArrayList的容量
List接口的大小可变数组的实现。实现了所有可选列表操作,并允许包括 null 在内的所有元素。ArrayList继承于List接口,除继承过来的方法外,还提供一些方法来操作内部用来存储列表的数组的大小。每个ArrayList实例都有一个容量。该容量是指用来存储列表元素的数组的大小。它总是至少等于列表的大小。随着向ArrayList中不断添加元素,其容量也自动增长。并未指定增长策略的细节,
2014-08-27 19:33:59
422
转载 Oracle to_date 日期转换函数 用法
TO_DATE格式(以时间:2007-11-02 13:45:25为例) Year: yy two digits 两位年 显示值:07 yyy three digits 三位年 显示值:007 yyyy four digits 四位年
2014-08-14 11:17:11
5415
转载 javascript 堆栈与列队
javascript数组是一个逆天的存在,到了ecma262v5,它已经是堆栈,列队及迭代器的合体。有时候我们不需要这么强大的东西,这只要考虑到for循环太麻烦了,我们只需要非常简单的遍历,于是想用普通对象模拟一个就是。首先是堆栈,先进后出 function Stack(){ } Stack.prototype = {
2014-07-23 11:00:00
443
转载 input背景的兼容性
input背景的兼容性 *{margin:0;padding:0;} p{padding:20px;} .ctl{background:transparent url(down.png) no-repeat scroll 2px top;line-height:19px;width:150px;height:20px;padding-left:25px;borde
2014-06-18 14:33:25
440
转载 Struts2 的国际化实现
以前一直看见 i18N ,现在才知道原来 i18N 就是 Internationalization,因为以 i 开头,以 N 结尾,共18个字母,也就是国际化的意思。在百度搜索主页上没有看见中英文的切换,毕竟百度在中国是为了中国人而设计的,没必要弄个英文的切换。google搜索主页上是有的,因为谷歌在中国的服务器放到了香港,所以还有繁体切换。这是怎么做到的呢?其实原理很简单,用Struts2很容易
2014-05-30 12:29:30
637
原创 js 闭包改变值
loadNative: function(args){ var _this = this,opts = _this.opts,items = opts.items,itemsArr = [],root = opts.root,nativItems = $.extend({},items); }闭包中改变
2014-05-29 16:04:12
918
原创 java web 过滤器
public class M2MUrlFilter implements Filter{ private FilterConfig config = null; @Override public void destroy() { } @Override public void doFilter(Serv
2014-05-14 16:28:23
1047
原创 java double类型截取指定位数的小数
double d = 749.1666666666666;String result = String .format("%.2f",d);System.out.println("result="+result);
2014-05-13 08:53:57
5229
原创 Hibernate4 net.sf.ehcache.Ehcache.getCacheConfiguration错误
[D:\tomcat6\webapps\en\WEB-INF\classes\applicationContext-dao-init.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: net.sf.ehcache.Ehcache.getCacheConfiguration
2014-04-29 14:36:16
1143
build-nginx-mac.sh
2019-10-16
ECharts加载单独省份地图
2018-11-14
ECMAScript 2018规范
2018-07-06
js实现loading效果 spin.js
2014-09-15
J2EE 有没有类似apache tiles,但可以进行局部刷新的页面布局框架?
2016-04-12
TA创建的收藏夹 TA关注的收藏夹
TA关注的人