自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

会写代码的老虎

天行健,君子以自强不息,地势坤,君子以厚德载物

  • 博客(28)
  • 资源 (1)
  • 问答 (1)
  • 收藏
  • 关注

转载 Can functions be defined below return statements

function stealthCheck(){ assert( stealth(), "We'll never get below the return, but that's OK!" ); return stealth(); function stealth(){ return true; }}stealthCheck();// PASS We'll never g

2012-12-29 11:54:39 438

转载 the source of jquery.scrollFollow

/** * jquery.scrollFollow.js * Copyright (c) 2008 Net Perspective (http://kitchen.net-perspective.com/) * Licensed under the MIT License (http://www.opensource.org/licenses/mit-license.php) * *

2012-12-24 16:46:58 498

转载 ofbiz controller.xml 文件

public RequestManager(ServletContext context) { /** Loads the site configuration from servlet context parameter. */ try { configFileUrl = context.getResource("/WEB-INF/con

2012-12-23 14:28:03 1350

转载 request.getPathInfo()

public static String getRequestUri(String path) { List pathInfo = StringUtil.split(path, "/"); if (pathInfo == null || pathInfo.size() == 0) { Debug.logWarning("Got nothing

2012-12-14 20:54:26 1536

转载 request.getContextPath()

public static String getApplicationName(HttpServletRequest request) { String appName = "root"; if (request.getContextPath().length() > 1) { appName = request.getContextPath

2012-12-14 20:53:25 896

转载 java同步代码范例

public static ControllerConfig getControllerConfig(URL url) { ControllerConfig controllerConfig = (ControllerConfig) controllerCache.get(url); if (controllerConfig == null) { // don't

2012-12-12 22:36:08 498

转载 泛型继承

T queryForPagination(String sqlId, T paginationDTO); T queryForPagination(String sqlId, T jqGridPageDTO); T queryForDatagridPage(String sqlId, T datagridPageDTO)

2012-09-22 09:22:35 380

转载 SpringMVC example

@RequestMapping(method=RequestMethod.POST)@ResponseBodypublic Map create(@RequestBody Account account, HttpServletResponse response) { Set> failures = validator.validate(account); if (!fail

2012-09-22 09:13:20 539

转载 HashMap枚举

Set set=map.keySet();for(Iterator iter=set.iterator();iter.hasNext();){ String key=(String)iter.next(); Integer value=(Integer)map.get(key); System.out.println(key+":"+value);}////////////

2012-08-27 21:06:37 1294

转载 java 反射

public class InvokeTester{ public int add(int param1 ,int param2) { return param1+param2; } public String echo(String message) { return "hello: "+message; } public static void main(St

2012-08-27 15:14:28 399

转载 SCOPE_IDENTITY

CREATE PROCEDURE [prefix_createattachment]@uid int,@tid int,@pid int,@postdatetime datetime,@readperm int,@filename nchar(200),@description nchar(200),@filetype nchar(100),@filesize

2012-08-06 10:09:08 425

转载 create procedure example

CREATE PROCEDURE [checkemailandsecques]@username nchar(20),@email char(50),@secques char(8)ASSELECT TOP 1 [uid] FROM [users] WHERE [username]=@username AND [email]=@email AND [secques]=@secq

2012-08-06 09:59:22 497

转载 drop procedure code example

IF OBJECT_ID('[checkemailandsecques]','P') IS NOT NULLDROP PROC [checkemailandsecques]GO

2012-08-06 09:53:49 398

转载 the java IllegalArgumentException code example

if (this.sqlMapClient == null) { throw new IllegalArgumentException("Property 'sqlMapClient' is required");}

2012-08-01 16:35:31 544

转载 Determining If a Filename Path Is a File or a Directory

File dir = new File("directoryName");boolean isDir = dir.isDirectory();if (isDir) { // dir is a directory} else { // dir is a file}

2012-07-31 16:13:16 455

转载 java code processDir

private static void processDir( Args theArgs ) throws Exception { String fileData = generateXML( theArgs.inputDir, theArgs.id ); File outDir = new File(theArgs.outputDir); if (

2012-07-27 15:24:06 426

转载 An example of the <sql> and <include> tags

select * from order select count(*) as value from order <![CDATA[ where shipDate > #value:DATE# ]]>

2012-07-16 12:05:09 402

转载 Custom transaction control with openSession

public void runStatementsUsingSetUserConnection() { SqlMapClient sqlMapClient =SqlMapClientConfig.getSqlMapClient(); Connection conn = null; SqlMapSession session = null; try { conn = dataSo

2012-07-16 12:02:23 402

转载 Custom transaction control with setUserTransaction

public void runStatementsUsingSetUserConnection() { SqlMapClient sqlMapClient =SqlMapClientConfig.getSqlMapClient(); Connection conn = null; try { conn = dataSource.getConnection(); conn.setA

2012-07-16 12:00:40 541

转载 Local transaction

public void runStatementsUsingLocalTransactions(){ SqlMapClient sqlMapClient=SqlMapClientConfig.getSqlMapClient(); try{ sqlMapClient.startTransaction(); Person p =(Person)sqlMapCl

2012-07-16 11:59:37 965

转载 example of well-written jdbc code

public Employee getEmployee(int id) throws SQLException{Employee employee=null;String sql="SELECT * FORM EMPLOYEE WHERE EMPLOYEE_NUMBER=?";Connection conn=null;PreparedStatement ps=null;ResultS

2012-07-16 11:57:32 438

转载 [struts-1.3.10] org.apache.struts包中的Globals类

package org.apache.struts;import java.io.Serializable;/** * Global manifest constants for the entire Struts Framework. * * @ve

2011-09-23 18:49:07 1628

转载 Javascript Best Practices

<br />Javascript Best Practices from http://www.slideshare.net/cheilmann/javascript-best-practices-1041724<br /> <br />无意之中看到这篇文章,想到自己平时写JS时都不注意这些细节,把其中一些有用的记下<br /> <br />Avoid globals,Global variables are a terribly bad idea.You run the danger of your co

2011-03-10 11:23:00 434

翻译 ExtJS Performance - Element click events

this article from    http://www.jasonclawson.com/2008/05/29/extjs-performance-element-click-events/    今天在ExtJS论坛上讨论怎么样给从服务端返回的许多链接绑定事件监听器时出现了一个问题。给每一个链接绑定一个事件监听器,正确?错误!在这种情境之下是错误的它浪费了没有必要的系统资源。你能想像出当你给TreePanel的每个单节点元素绑定一个click事件监听器时TreePanel要消耗多少资源吗?噢 等等

2011-03-09 15:21:00 1071

原创 Extjs- Ext.extend函数的使用

      Ext.extend在Extjs 中扮演着重大角色,是Extjs中几个重要函数之一。要想深入了解EXTJS,这个函数必须掌握不可,网上有很多关于这个函数的源码分析和介绍。关于这个函数的使用有以下几种情况。 function Base(config) { this.name=config.name; this.age=config.age; this.sex=config.sex;}function base(config) { t

2011-02-26 17:03:00 1249 1

Extjs- Ext.extend函数的使用

Ext.extend在Extjs 中扮演着重大角色,是Extjs中几个重要函数之一。要想深入了解EXTJS,这个函数必须掌握不可,网上有很多关于这个函数的源码分析和介绍。关于这个函数的使用有以下几种情况。function Base(config) { this.name=config.name; this.age=config.age; this.sex=conf...

2011-02-26 17:03:00 103

转载 Scope in JavaScript

this is a very good article to know the scope in javascript

2011-02-17 14:33:00 653

Scope in JavaScript

Got something to say? the article from http://www.digital-web.com/articles/scope_in_javascriptScope is one of the foundational aspects of the JavaScri...

2011-02-17 14:33:00 104

Elecard StreamEye Tools

Elecard ,一个强大的视频序列或码流分析软件,YUV分析,264文件分析软件

2018-03-12

hibrnate3超级bug

2012-04-25

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

TA关注的人

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