`
文章列表
Java shutdown hook guarantee that clean-up code is always run, regardless of how the user terminates the application. Here is an example from Hadoop: java 代码 /**    * A class to track the list of DFS clients, so that they can be closed    * on exit.    * @author Owen O'Malley   ...
http://www.javaperformancetuning.com/ A quite useful website which contains everything on java performance tunning.
Here's a simple way you can run Internet Explorer from the command line: Create a new text file that contains the following line: @start "" /b "C:\Program Files\Internet Explorer\iexplore.exe" %* Rename the file e.bat Copy this file to your profile folder C:\Documents and Setti ...
What is Unicode? Unicode provides a unique number for every character, no matter what the platform, no matter what the program, no matter what the language. Fundamentally, computers just deal with numbers. They store letters and other characters by assigning a number for each one. Before Unicode was ...
1. 只要程式中的non-Daemon thread都結束了.. 就算有Daemon Thread仍在執行中... 程式一樣會被強制結束... 最簡單的例子就是garbage collector thread.. 2. 如果某個 Thread 是 daemon thread,則它所產生的所有 threads 天生就 具有 daemon 的特性 3. A daemon thread should be used for some background task that might provide a service to the applications. e.g. a Se ...
Easy. Here is an implementation from Hadoop. java 代码 /**    * A micro-application that prints the main class name out of a jar file.    * @author Owen O'Malley    */   public class PrintJarMainClass {            /**      * @param args      */     public stat ...
 如何创建批处理文件?     不要听了批处理文件就感到很神气,其实这东西很简单的.你用过记事本没有?用过? 好的.将记事本打开,什么都不用写,然后选择文件,保存.保存类型选择所有文件,文件名则命名为 *.bat 这个*代表是文件名,你可以随便的起.保存好之后,看看你保存的地方,会出现一个白色窗口里有个黄色齿轮的图标.这东西就是你创建的批处理文件,双击他就可以运行,但他现在由于里面没有输入任何命令,所以他运行了并不会做任何事情.当我们想往这个*.bat文件中添加东西时,只要右键选择他,然后选择编辑,就可以打开记事本往内输入命令了.   批处理文件中的命令是什么?   批处理文件中的命令暂时先可以 ...
java 代码 public class BinarySearch {                public static int search(int element, int[] sortedArray) {            int length = sortedArray.length;            int left = 0;            int right = length - 1;                        while (left <= right) {    ...

MergeSort

 MergeSort is a sample solution from the idea Dive - and - Conquer. I show my code below:   java 代码    public class MergeSort {                public static void sort(int[] array, int i, int j) {            if (j-i == 1) {    ...
1. adjacent matrix good for border scan, bad for space O(n*n), spare matrix mostly java 代码    public class GraphMatrix {        private int[][] nodeMatrix;        private int matrixSize;                 public GraphMatrix(int mat ...
I like connect beautiful articles since I am afraid of losing them. This is a good one. So, I do it. And I think for those who are looking for some intro matrial on FP and cannot find a good one, this is for u. From: coffeemug@gmail.com Functional Programming For The Rest of Us Monday, June 19, 2006 ...
I like connect beautiful articles since I am afraid of losing them. This is a good one. So, I do it. And I think for those who are looking for some intro matrial on FP and cannot find a good one, this is for u. From: coffeemug@gmail.com Functional Programming For The Rest of Us Monday, June 19, 2006 ...
I like connect beautiful articles since I am afraid of losing them. This is a good one. So, I do it. And I think for those who are looking for some intro matrial on FP and cannot find a good one, this is for u. From: coffeemug@gmail.com Functional Programming For The Rest of Us Monday, June 19, 2006 ...
Choose sequence: local node -> local rack -> remote rack a selected replica node should be a good node: 1> if the node is (being) decommissed 2> the remaining capacity of the target machine 3> the communication traffic of the target machine  based on current connection of that machine, ...
System requirements: 1> performance 2> reliability 3> security 4> availability 5> scalability 6> extensibility Functional requirements: 1> basic File operations 2> backup/restore 3> clusters administration 4> data analysis and visualization support (future) 5> easy pa ...
Global site tag (gtag.js) - Google Analytics