ITeye博客

又是一天

cy729215495 · 共 58 篇文章

graph code

package com.tech.cglibx; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.Map; import java.util.Set; public class MyGraph { public static void main(String[] args) { Graph graph = new Graph(); Set<Vertex> vertexSet = graph.getVertexSet(); Map<Vertex, …

2016-09-03T19:11:21Z · 编程语言 · 评论(0)

字符串全排列算法

List permu(String s){ List result=new ArrayList(); if("".equals(s)){ result.add(""); return result; } String c = s.substring(0, 1); List res = permu(s.substring(1)); for(int i=0; i<res.size(); ++i){ String t = (String) res.get(i); for(int j=0; j<=t.length(); ++j){ StringBuffer u = new StringBuffer(…

2016-08-02T15:18:23Z · 编程语言 · 评论(0)

memcache分布式锁实现代码

import java.util.Map; import java.util.Properties; import java.util.concurrent.atomic.AtomicInteger; import javax.annotation.Resource; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframewo…

2016-07-21T09:43:12Z · 企业架构 · 评论(0)

type_text的效果

<script language="Javascript"> <!-- var tl=new Array( "Sorry.", "The requested document is totally fake.", "No such file here.", "Even tried multi.", "Nothing helped.", "I think you ought to know that I'm really depressed about this.", "You see, I'm just a web server...", "here I am, brain the size…

2014-10-25T19:02:32Z · Web前端 · 评论(0)

分享一个sql developer的插件

sql developer 过一段时间会连接超时,很麻烦,安装此插件就可以解决问题。 ps(本来准备放截图的,iteye的这个编辑器不支持直接粘贴) 安装步骤: 帮助-》检查更新-》从本地文件安装-》选择keepalive.zip包,就可以了。安装成功后,重启,菜单栏有个小图标,就表示安装成功了。我输入的是60秒。 这个工具很好用,很爽,不用每次重新连接。

2014-10-24T08:59:43Z · 数据库 · 评论(0)

excel表头转换

package com.cgroup.datastruct; import java.util.HashMap; import java.util.Map; public class MyExcel { static Map map = new HashMap(); static { for (int i = 1; i <= 26; i++) { char letter = (char) (64 + i); map.put(i, letter); } } public static void main(String[] args) { for (int i = 1; i < 30000; i…

2014-09-11T21:35:07Z · 编程语言 · 评论(0)

freemark自定义标签类 注入spring 的service

package com.orchid.system.util; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.stereotype.Component; @Component public class SpringBeanUtil implements Appl…

2013-04-28T10:10:40Z · 编程语言 · 评论(0)

javascript 的replace替代replaceAll

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> New Document </title> <meta http-equiv=content-type content="text/html;charset=utf-8"> <meta name="Generator" content=…

2013-04-25T09:46:14Z · Web前端 · 评论(0)

百度影音播放器代码,兼容ie和火狐,chrome

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> New Document </title> <meta http-equiv=Content-Type content="text/html;charset=utf-8"> <meta name="Generator" content=…

2013-04-22T16:06:46Z · Web前端 · 评论(1)

use of prototype and call

functionStickman(){ //some methods and properties } functionJuniorStickman(){ Stickman.call(this); this.p =new value // override a property in Stickman } JuniorStickman.prototype =new Stickman(); junior =new JuniorStickman(); call方法的作用,就像别的语言的super方法。但JuniorStickman.prototype =newStickman();是干嘛的,ca…

2013-04-02T09:48:11Z · Web前端 · 评论(0)

qq在线点击

<a target="blank" href="http://wpa.qq.com/msgrd?V=1&Uin=2297477323&Site=linoa&Menu=yes"><img style="padding:0px;margin:0px;width:60px;height:20px;border:0;" SRC=http://wpa.qq.com/pa?p=1:2297477323:6 alt="点击这里给我发消息" align="absmiddle"></a>

2013-02-18T10:11:38Z · Web前端 · 评论(0)

IntelliJ IDEA 9 编译时报错:“编码GBK的不可映射字符”和"未结束的字符串字面值"

解决办法: Setting->File Encodings->IDE Encoding选择utf-8,不要选择“system default” 同时,Default encoding for properties files 也选择 UTF-8

2012-04-09T14:05:39Z · Web前端 · 评论(0)

安装SQL Server 2005时,出现“性能监视器计数器要求”错误的我的解决方法

先看一篇网上的办法: 安装SQL Server 2005时,出现“性能监视器计数器要求”错误的解决方法2009年04月20日 星期一 17:48今天在安装SQL Server 2005时,出现“性能监视器计数器要求”错误,因为以前出现过这种错误,得到了解决。今天又又出现这种错误,但并不是很清楚当时的解决办法,所以这次把解决方法记录下来,供自己以后参考,也希望对大家有帮助。 错误原因 造成这种错误的原因在于Microsoft SQL Server 安装程序中的安装配置检查器 (SCC)在安装SQL Server前会验证计数器注册表项的值。如果 SCC 无法验证现有的注册表项,或 SCC 无法运…

2012-02-13T23:10:21Z · 数据库 · 评论(0)

apache ftpserver使用心得

1.在dos下面启动ftpserver的步骤 a.ftp b.open 1.找到user.properties文件,按照前面的格式,可以添加用户。默认有2个用户,admin/admin,anonymous/ ,anonymous的密码是空。还有一种方式来添加用户

2011-10-25T14:52:13Z · 企业架构 · 评论(0)

fileupload源码分析

private static String getUniqueId() { int current; synchronized (DefaultFileItem.class) { current = counter++; } String id = Integer.toString(current); if (current < 100000000) { id = ("00000000" + id).substring(id.length()); } return id; } private static String getUniqueId() { int current; synchro…

2011-06-11T11:20:50Z · 企业架构 · 评论(0)