`
aaron_ch
  • 浏览: 173844 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论
文章列表
NIO:内存映射,文件锁,字符集编码和解码以及非阻塞I/O. NIO的读写是Unicode的,无论是什么编码的,都是以Unicode的形式存储.   IO中的读写是二进制的读写. IO用在网络通信一般是阻塞式通信. NIO则是非阻塞式的,性能比IO提高了很多. NIO比IO速度快。
True public class Singleton {         private Singleton(){}         private static Singleton instance = new Singleton();   public static Singleton getInstance() {     return instance;       } }  public class Singleton {   private static Singleton instance = null;         public static synchronized ...
Class.forName(xxx.xx.xx) 返回的是一个类 首先你要明白在java里面任何class都要装载在虚拟机上才能运行。这句话就是装载类用的(和new 不一样,要分清楚)。  至于什么时候用,你可以考虑一下这个问题,给你一个字符串变量,它代表一个类的包名和类名,你怎么实例化它?只有你提到的这个方法了,不过要再加一点。  A a = (A)Class.forName("pacage.A").newInstance();  这和你  A a = new A();  是一样的效果。  关于补充的问题  答案是肯定的,jvm会执行静态代码段,你要记住一个概念,静态 ...
Spring中的Callback模式与Template模式合用,随处可见。Template method被广泛的使用,像Servlet就是使用这个模式。Template mothod模式虽然能简化很多重复的代码,但这种模式的也有不少限制。Template mothod将一个功能的实现分成许多小的步骤,在父类中定义了这些步骤的顺序,让子类来具体实现每一个小的步骤。这些小的步骤是protected,以防止用户不正确的使用这些小的步骤而产生异常。这样就产生了一个限制,那就是你需要继承Template然后重新实现具体的小步骤。如果这个Template有许多方法,就像JdbcTemplate,如果你每次继 ...
Django integrated to mod_python 1.download django-0.9.6 2.uncompress then run: python setup.py install 3.Add the python/Scripts to env path 4.Add the .py to the PATHEXE So far,you can set up a project. Steps: 1.create a directory in c:/mysite 2.django-admin.py startproject mysite Setup an application ...
Prerequsitation: 1.Apache v2.2.4 2.Python2.4 3.mod_python3.3.1 for apache2.2 and python2.4 Configure Steps: 1.Add below in the apache/conf/http.conf(first check the mod_python.so whether exists in apache/modelus) LoadModule python_module modules/mod_python.so 2.Configure the http.conf,add below(Co ...

Mysql grant

GRANT ALL PRIVILEGES ON *.* TO aaron@localhost IDENTIFIED BY 'xxxxxx' WITH GRANT OPTION;
Mysqli supply with many new features for the php programming,also it's an OOP. The below example can show you some: databind $mysqli = new mysqli('localhost', 'aaron', 'xxxxxx', 'amo'); /* check connection */ if (mysqli_connect_errno()) {     printf("Connect failed: %s\n", mysqli_connect_e ...
When use iframe embedded in the main page,maybe you want to access/set  the content for some nodes in the iframe. So you try to touch the page in iframe,the attachment will help you much more.

Struts ajax

Write a web template by using struts associated with ajax. The path and libs in the project list and requirement:  
package com.spring;   import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory;   //import org.springframework.beans.factory.BeanFactory; //import org.springframework.beans.factory.xml.XmlBeanFactory;   import org.springframework.context.ApplicationContext; import org.s ...
ftp://202.96.64.144/pub/books/  
escape(): The escape method returns a string value (in Unicode format) that contains the contents of [the argument]. All spaces, punctuation, accented characters, and any other non-ASCII characters are replaced with %xx encoding, where xx is equivalent to the hexadecimal number representing the chara ...

PL/SQL

SQL>CREATE OR REPLACE PROCEDURE PrintMSG_Aaron( p_sys_code IN test.SYS_CODE%TYPE) AS    CURSOR c_msg IS    SELECT MSG_CODE,SYS_CODE FROM test WHERE SYS_CODE=p_sys_code AND    ROWNUM<10;    BEGIN      FOR v_sys_recoder IN c_msg LOOP        DBMS_OUTPUT.PUT_LINE(v_sys_recoder.MSG_CODE || ' ' || ...
1. Download and install py2exe from the py2exe website (make sure you download the right version!) 2. Create a directory on you hardisk called mycode ... - Right click on the Windows Desktop and select New .. Folder and name it "mycode" 3. Double click the mycode folder to open it 4. Righ ...
Global site tag (gtag.js) - Google Analytics