渴死的火烈鸟
standalone · 共 356 篇文章
polymorphism and inheritance
Inheritance Inheritance is the capability of a class to use properties and methods of another class while adding its own functionalities.Java uses extends to set the relationship between a parent class and a child class.When extending a class, you can reuse the superclass construct with reserved wo…
2010-09-07 21:04 · java · 评论(0)
5 things you didn't know about ... java.util.concurrent
http://www.ibm.com/developerworks/java/library/j-5things4.html?ca=drs-
2010-08-31 14:40 · java · 评论(0)
Java synchronized methods
First, it is not possible for two invocations of synchronized methods on the same object to interleave. When one thread is executing a synchronized method for an object, all other threads that invoke synchronized methods for the same object block (suspend execution) until the first thread is done w…
2010-08-31 12:00 · java · 评论(0)
java interrupt
See following tutorial from sun: An interrupt is an indication to a thread that it should stop what it is doing and do something else. It's up to the programmer to decide exactly how a thread responds to an interrupt, but it is very common for the thread to terminate. This is the usage emphasized i…
2010-08-31 11:37 · java · 评论(0)
Java enum type
In the following example, Planet is an enum type that represents the planets in the solar system. They are defined with constant mass and radius properties. Each enum constant is declared with values for the mass and radius parameters. These values are passed to the constructor when the constant is…
2010-08-31 11:22 · java · 评论(0)
Use JNI for safer java servers
http://www2.sys-con.com/itsg/virtualcd/Java/archives/0510/Silverman/index.html
2010-08-11 08:45 · java · 评论(0)
errno.h
查看错误代码errno是调试程序的一个重要方法。当linuc C api函数发生异常时,一般会将errno变量(需include errno.h)赋一个整数值,不同的值表示不同的含义,可以通过查看该值推测出错的原因。在实际编程中用这一招解决了不少原本看来莫名其妙的问题。比较麻烦的是每次都要去linux源代码里面查找错误代码的含义,现在把它贴出来,以后需要查时就来这里看了。 以下来自linux 2.4.20-18的内核代码中的/usr/include/asm/errno.h #ifndef _I386_ERRNO_H #define _I386_ERRNO_H #define EPERM 1 …
2010-08-10 08:46 · c++ · 评论(0)
How to use fallocate system call
/* * fallocate - utility to use the fallocate system call * * Copyright (C) 2008 Red Hat, Inc. All rights reserved. * Written by Eric Sandeen <sandeen@redhat.com> * * cvtnum routine taken from xfsprogs, * Copyright (c) 2003-2005 Silicon Graphics, Inc. * * This program is free software; you can redi…
2010-08-07 22:19 · c++ · 评论(0)
Test performance of allocating a zeroed file via various methods
/* * Test performance of allocating a zeroed file via various methods on * various file systems * * Copyright (C) 2009 Red Hat Inc. * Author(s): Amit Shah * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as p…
2010-08-07 22:09 · c++ · 评论(0)
Java Native Interface (JNI) - JNI javah error : class file contains wrong class
http://forums.sun.com/thread.jspa?threadID=709403 On how java tools find user classes: A class/java file has a subpath name that reflects the class's fully-qualified name. For example, if the class com.mypackage.MyClass is stored under /myclasses, then /myclasses must be in the user class path and …
2010-08-06 08:26 · java · 评论(0)
How to read command-line arguments with Perl
Submitted by alvin on August 9, 2009 - 8:41pm tags: args arguments argv command line perl perl read source code Perl command line FAQ: How do I read command-line arguments with Perl (command line args)? Answer: With Perl, command-line arguments are stored in the array named @ARGV. $ARGV[0] contains…
2010-07-29 09:58 · perl · 评论(0)
Mount options to improve ext4 file system performance
Mount options to improve ext4 file system performance
2010-07-29 09:52 · java · 评论(0)
Queue sysfs files
Based on kernel version 2.6.34 . Page generated on 2010-05-31 16:02 EST . 1 Queue sysfs files 2 ================= 3 4 This text file will detail the queue files that are located in the sysfs tree 5 for each block device. Note that stacked devices typically do not export 6 any settings, since their …
2010-07-28 13:50 · linux · 评论(0)
Install blktrace
I use libaio-0.3.106.tar.gz and blktrace-1.0.1.tar.gz to install blktrace on my linux server. 1. Install libaio make prefix=/usr install 2. Install blktrace make intall See the blktrace user guide in attachment.
2010-07-27 13:15 · linux · 评论(0)
Implementing WebGIS on Hadoop: A Case Study of Improving Small File IO Performan
Implementing WebGIS on Hadoop: A Case Study of Improving Small File IO Performance on HDFS
2010-07-26 22:46 · hadoop · 评论(1)