自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(29)
  • 收藏
  • 关注

转载 cache 的设计与实现--转载

本文整理自一下两篇博客:http://my.oschina.net/ScottYang/blog/298727http://my.oschina.net/u/866190/blog/188712Cache简介: Cache(高速缓存), 一个在计算机中几乎随时接触的概念。CPU中Cache能极大提高存取数据和指令的时间,让整个存储器(Cache+内存)既有Cache的高速度...

2014-09-30 09:26:00 82

转载 SHELL网络爬虫实例剖析--转载

原创作品,允许转载,转载时请务必以超链接形式标明文章原始出处、作者信息和本声明。否则将追究法律责任。http://nolinux.blog.51cto.com/4824967/1552472 前天简单分享了用shell 写网络爬虫的一些见解,今天特地把代码发出来与51博友分享,还是那句话,爱技术、爱开源、爱linux。 针对脚本的注解和整体构思,...

2014-09-30 08:58:00 65

转载 使用Httpwatch分析响应时间--转

时间片段名称意思Blocked(阻塞)灰色阻塞的时间主要包括,预处理时间,(如缓存查找)和网络排队等待的时间,导致阻塞最主要的原因是下载页面中的图片DNSLookup(域名解释)紫色域名解释时间主要是主机名(如:www.job1001.com)转化为相应的ip地址的时间,在访问URL地址时,地址本身不能被直接访...

2014-09-29 10:45:00 197

转载 RESTful Web Services: A Tutorial--reference

As REST has become the default for most Web and mobile apps, it's imperative to have the basics at your fingertips.More than a decade after its introduction, REST has become one of the most i...

2014-09-29 09:29:00 197

转载 Example of how to use both JDK 7 and JDK 8 in one build.--reference

JDK 8 ReleasedMost of us won’t be able to use/deploy JDK 8 in production for a looong time. But that shouldn’t stop us from using it, right?It should be possible to sneak in JDK 8 in ...

2014-09-29 09:21:00 86

转载 10 Questions To Make Programming Interviews Less Expensive--reference

ConductingInterviewis not cheap and costs both time and money to a company. It take a lot of time to find the right candidate for a job from 100s resume you receive from consultants and agents....

2014-09-29 09:12:00 145

转载 myqltransactionRollbackexception deadlock found when trying to get lock

linux 下远程连接mysq命令:mysql -h "1.0.0.1" -u username -p1获 取锁等待情况可以通过检查 table_locks_waited和table_locks_immediate状态变量来分析系统上的表锁定争夺:mysql> show status like 'Table%';+------------------...

2014-09-28 15:40:00 152

转载 MySQL批量更新死锁案例分析--转载

问题描述在做项目的过程中,由于写SQL太过随意,一不小心就抛了一个死锁异常,如下:[java]view plaincopyprint?com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException:Deadlockfoundwhentryingtogetlock...

2014-09-28 15:31:00 50

转载 forward 和redirect

1. forward方法使用request.getRequestDispatcher(path).forward(request.response);首先来看getRequestDispatcher方法,path必须是相对路径。getRequestDispatcherRequestDispatcher getRequestDispatcher(Stringpath)Re...

2014-09-28 11:53:00 53

转载 How to Read, Write XLSX File in Java - Apach POI Example---reference

No matter how Microsoft is doing in comparison with Google, Microsoft Office is still the most used application in software world. Other alternatives likeOpenOfficeandLiberOfficehave failed t...

2014-09-22 17:27:00 236

转载 rsync+inotify实现服务器之间文件实时同步--转

之前做了“ssh信任与scp自动传输脚本”的技术文档,此方案是作为公司里备份的方法,但在实际的运行中,由于主服务器在给备份服务器传输的时候,我们的主服务器需要备份的文件是实时、不停的产生的,造成不知道主服务器给备份服务器传输了多少文件,磁盘空间就那么大,做备份的原因:一个是为了保持文件,另外一个是解决主服务器的磁盘饱满问题,但由于不知道备份服务器到底接收了多少文件,所以主服务器里的文件不...

2014-09-19 10:09:00 50

转载 Java – 4 Security Vulnerabilities Related Coding Practices to Avoid---reference

This article representstop 4security vulnerabilities related coding practice to avoidwhile you are programming withJavalanguage. Recently, I came across few Java projects where these instance...

2014-09-19 09:55:00 107

转载 http to https automatic--weblogic/jboss/tomcat--reference

weblogicreference from:http://middlewaremagic.com/weblogic/?p=2019Many times we want to secure our WebApplication Resources in such a way that if any Client is trying to access any Resource a...

2014-09-18 18:17:00 83

转载 how to get file from classpath using jboss7.x.1 --reference

question:I want to convert smooksxml-java, so that i need to load source file frommobeeadmin.war/WEB-INF/sample.xml.Smooks smooks = new Smooks("/WEB-INF/sample.xml");It is throwing follow...

2014-09-18 09:40:00 100

转载 跨域post请求实现方案小结--转

【名词解释】跨域:https://developer.mozilla.org/en-US/docs/JavaScript/Same_origin_policy_for_JavaScript同源策略(注意Network Access这一节):http://www.w3.org/Security/wiki/Same_Origin_Policy【问题描述】浏览器出于安...

2014-09-17 17:21:00 121

转载 Cross-origin resource sharing--reference

Cross-origin resource sharing(CORS) is a mechanism that allows many resources (e.g., fonts, JavaScript, etc.) on aweb pageto be requested from anotherdomainoutside the domain from which the r...

2014-09-17 14:41:00 123

转载 CircuitBreaker design pattern---reference

It's common for software systems to make remote calls to software running in different processes, probably on different machines across a network. One of the big differences between in-memory cal...

2014-09-17 10:45:00 259

转载 子查询in和表连接效率

在数据查询时,尽量减少in子查询而使用表连接的方式进行,效率更高。转载于:https://www.cnblogs.com/davidwang456/p/3974090.html

2014-09-16 03:00:00 190

转载 mysql 变量set

在游标循环中,使用使用select into 变量var时,再判断var isnull 或者length(var)=0时,跳出循环。解决方式:使用set var=(select id from table);然后再判断var isnull 或者length(var)=0转载于:https://www.cnblogs.com/davidwang456/p/397363...

2014-09-15 21:13:00 158

转载 redis 控制调用频率

redis提供了rate limit demo 如下所示:INCRkeyAvailable since 1.0.0.Time complexity:O(1)Increments the number stored atkeyby one. If the key does not exist, it is set to0before performing...

2014-09-15 09:57:00 106

转载 mysql 变量is null 和 not exists区别

问题:使用游标遍历时,发现使用select var into tmp where var=?然后判断if tmp is null时,不能走完所有的遍历。经debug发现,当var为空时,则跳出游标的遍历。解决方式:使用if not exists(select var into tmp where var=?)时,则ok。这个可以从mysql官方文档...

2014-09-12 11:23:00 281

转载 Two-Phase-Commit for Distributed In-Memory Caches--reference

Part Ireference from:http://gridgain.blogspot.kr/2014/09/two-phase-commit-for-distributed-in.html2-Phase-Commitis probably one of the oldest consensus protocols and is known for its deficien...

2014-09-12 09:49:00 123

转载 Spring Remoting by HTTP Invoker Example--reference

Spring provides its own implementation of remoting service known asHttpInvoker. It can be used for http request than RMI and works well across the firewall.By the help ofHttpInvokerServiceExp...

2014-09-11 17:20:00 131

转载 使用 Spring 2.5 基于注解驱动的 Spring MVC--转

概述继 Spring 2.0 对 Spring MVC 进行重大升级后,Spring 2.5 又为 Spring MVC 引入了注解驱动功能。现在你无须让 Controller 继承任何接口,无需在 XML 配置文件中定义请求和 Controller 的映射关系,仅仅使用注解就可以让一个 POJO 具有 Controller 的绝大部分功能 —— Spring MVC 框架的易用性得...

2014-09-11 15:18:00 67

转载 表单提交问题

HTML DOM Button 对象Button 对象Button 对象代表 HTML 文档中的一个按钮。该元素没有默认的行为,但是必须有一个 onclick 事件句柄以便使用。在 HTML 文档中 <input type="button"> 标签每出现一次,一个 Button 对象 就会被创建。您可以通过遍历表单的 elements[] 数组来访问某个按...

2014-09-10 15:25:00 146

转载 Configuring the JA-SIG CAS Client --官方

1.for Java using SpringConfiguration of the CAS Client for Java via Spring IoC will depend heavily on their DelegatingFilterProxy class. For each filter that will be configured for CAS via Spr...

2014-09-09 15:45:00 106

转载 源代码解读Cas实现单点登出(single sign out)功能实现原理--转

关于Cas实现单点登入(single sing on)功能的文章在网上介绍的比较多,想必大家多多少少都已经有所了解,在此就不再做具体介绍。如果不清楚的,那只能等我把single sign on这块整理出来后再了解了。当然去cas官方网站也是有很多的文章进行介绍。cas官网http://www.ja-sig.org/products/cas/。ok,现在开始本文的重点内容讲解,先来了解一下...

2014-09-09 15:08:00 85

转载 mysql中判断字段为空

mysql中判断字段为null或者不为null在mysql中,查询某字段为空时,切记不可用 = null,而是 is null,不为空则是 is not nullselect nulcolumn from table;if nuncolumn is null thenselect 1;elseselect 2;end if;执行存...

2014-09-04 23:29:00 195

转载 Mysql大小写敏感的问题 --转

一、1 CREATE TABLE NAME(name VARCHAR(10)); 对这个表,缺省情况下,下面两个查询的结果是一样的: SELECT * FROM TABLE NAME WHERE name='clip'; SELECT * FROM TABLE NAME WHERE name='Clip'; MySq...

2014-09-04 11:31:00 43

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除