42 Trapping Rain Water链接:https://leetcode.com/problems/trapping-rain-water/
问题描述:
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water...
分类:
移动开发 时间:
2015-07-11 09:09:39
阅读次数:
152
多线程访问网页+高并发测试网页
仅供学习,请勿用于非法用途。
线程类如下
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLExcep...
分类:
编程语言 时间:
2015-07-11 09:10:15
阅读次数:
170
Eclipse 常用快捷键 常用技巧My Eclipse常用快捷键
eclipse 快捷键。 这些都是 常用快捷键。学会了这些 eclipse 快捷键 保证编程效率更高!
Eclipse的编辑功能非常强大,掌握了Eclipse快捷键功能,能够大大提高开发效率。Eclipse中有如下一些和编辑相关的快捷键。
1. 【ALT+/】
此快捷键为用户编辑的好帮手,能为用户提供内容的...
分类:
系统相关 时间:
2015-07-11 09:09:42
阅读次数:
152
spring mvc 批量上传+文件上传
简单3步走。搞定!
上传文件成功后:
1 上传文件核心方法
public static String saveWebImgFile(MultipartFile imgFile){
String webFilePath = "";
if(imgFi...
分类:
编程语言 时间:
2015-07-11 09:10:07
阅读次数:
249
OSCache操作详解+标签使用
1、OSCache是什么?
OSCache标记库由OpenSymphony设计,它是一种开创性的缓存方案,它提供了在现有JSP页面之内实现内存缓存的功能。OSCache是个一个被广泛采用的高性能的J2EE缓存框架,OSCache还能应用于任何Java应用程序的普通的缓存解决方案。
2、OSCache的特点
(1) 缓...
分类:
系统相关 时间:
2015-07-11 09:09:26
阅读次数:
131
java 短连接+MD5加密短链接
import java.security.MessageDigest;
public class ShotUrlUtil {
public
static void main(String[] args) {
System.out.println(shortUrl("http://www.baidu.co...
分类:
编程语言 时间:
2015-07-11 09:08:07
阅读次数:
213
/*
oldsrc : 原图片地址文件夹 如 'd:/'
newsrc : 压缩后图片地址文件夹 如 'e:/'
widthdist,heightdist : 压缩后的宽和高
createtime 2010-11-25
@auto yijianfeng
*/
public void reduceImgAll(String oldsrc,...
分类:
编程语言 时间:
2015-07-11 09:06:29
阅读次数:
165
Lucene用到的oscache,记录下来
操作缓存类
package com.jq.util;
import java.util.Date;
import com.opensymphony.oscache.base.CacheEntry;
import com.opensymphony.oscache.base.EntryRefreshPolicy;...
分类:
Web程序 时间:
2015-07-11 09:06:07
阅读次数:
140
网页窗体切换做不同操作+失去光标+获取光标
今天群里有人有这个需求。 就随手写了个 。 给有用的人参考下。
ssss
sss
function tests1(){
$("title").text("失去焦点了!");
}
function tests2(){
...
import java.math.BigDecimal;
public class Arith {
/**
* 由于Java的简单类型不能够精确的对浮点数进行运算,这个工具类提供精
* 确的浮点数运算,包括加减乘除和四舍五入。
*/
//默认除法运算精度
private static final int DEF_DIV_SCALE = 10;
/...
分类:
其他好文 时间:
2015-07-11 09:08:36
阅读次数:
181
Thinking in StatesNiclas Nilsson
PEOPLE IN THE REAL WORLD HAVE A WEIRD RELATIONSHIP WITH STATE.
This morning, I stopped by the local store to prepare for another day of con- verting caffeine to code....
分类:
其他好文 时间:
2015-07-11 09:06:25
阅读次数:
128
一、solr 的简介
Apache Solr 是一个开源的搜索服务器。Solr 使用 Java 语言开发,主要基于 HTTP 和 Apache Lucene 实现。Apache Solr 中存储的资源是以 Document 为对象进行存储的。每个文档由一系列的 Field 构成,每个 Field 表示资源的一个属性。Solr 中的每个 Document 需要有能唯一标识其自身的属性,默认情况...
分类:
其他好文 时间:
2015-07-11 09:07:07
阅读次数:
257
Two Heads Are Often Better Than OneAdrian WiblePROGRAMMING REQUIRES DEEP THOUGHT, and deep thought requires soli- tude. So goes the programmer stereotype.
This “lone wolf ” approach to programming has...
分类:
其他好文 时间:
2015-07-11 09:07:36
阅读次数:
123
1、加jar包:Quartz自己quartz-1.8.3.jar和依赖包commons-logging.jar 、slf4j-log4j12-1.5.10.jar 、slf4j-api-1.5.10.jar
2、一个类搞定!!!,直接run
import org.quartz.CronTrigger;
import org.quartz.Job;
import org....
分类:
其他好文 时间:
2015-07-11 09:07:36
阅读次数:
111
jdbc防止sql注入
jdbc防止sql注入-PreparedStatement
public List getUserByName(String name,String password){
ResultSet rs = null;
PreparedStatement stat = null;
Conn...
分类:
数据库 时间:
2015-07-11 09:06:42
阅读次数:
181
使用之前需要自己下载jspSmartUpload.jar包
这里找到一个支持中文的jar包,下载地址如下:
http://www.blogjava.net/Files/hijackwust/jsmartcom_zh_CN.rar
把压缩包里面的jar拷贝到工程的lib下面即可
主要方法介绍
上传
// 新建一个SmartUpload对象
SmartUpload...
分类:
Web程序 时间:
2015-07-11 09:07:21
阅读次数:
154
Google "相似图片搜索":你可以用一张图片,搜索互联网上所有与它相似的图片。
打开Google图片搜索页面:
点击使用上传一张angelababy原图:
点击搜索后,Google将会找出与之相似的图片,图片相似度越高就越排在前面。如:
这种技术的原理是什么?计算机怎么知道两张图片相似呢?
根据Neal
Krawetz博...
分类:
编程语言 时间:
2015-07-11 09:04:35
阅读次数:
170