如果希望将一个数组的值拷贝到另外一个数组中去,也就是所谓的深拷贝,JAVA的实现方式可以使用System类的arraycopy方法。调用这个方法的语法格式为:
System.arraycopy(from, fromIndex, to, toIndex, count) ;
数组to必须有足够的空间来存放拷贝的元素。
数组排序:可以使用Arrays类中的sort方法:
int[] a = new int[1000] ;
...
Arrays.sort(a) ;
这个方法是用了优化的快速排序算法。
判断两个数组是否相等(两个数组的长度相同,并且下标相同的元素都对应相等,则返回true)
Arrays.equals(type[] a , type[] b) ;
另外,数组还可以使用二分搜索法查找值v。如果找到,可以返回数组下标;否则,返回一个负值r; -r~1为保持有序v应插入的位置。
java.util.Arrays
static int binarySearch(type[] a, type v) ;
还有一个方法,是将一个数组所有的元素设置为v。
static void fill (type[] a, type v) ;
首先保存两个网址:
1,这个提供常用字节串转换成MD5字
http://tool.webmasterhome.cn/md5.asp
2,这个是普通的黑客的做法,做数据库Mapping表查询MD5原始密码。
http://www.cmd5.com/Default.aspx
package javatips;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class ReadCSV {
public static void main(String[] args) {
try {
File csv = new File("writers.csv"); // CSVデータファイル
BufferedReader br = new BufferedReader(new FileReader(csv));
// 最終行まで読み込む
String line = "";
while ((line = br.readLine()) != null) {
// 1行をデータの要素に分割
StringTokenizer st = new StringTokenizer(line, ",");
while (st.hasMoreTokens()) {
// 1行の各要素をタブ区切りで表示
System.out.print(st.nextToken() + "\t");
}
System.out.println();
}
br.close();
} catch (FileNotFoundException e) {
// Fileオブジェクト生成時の例外捕捉
e.printStackTrace();
} catch (IOException e) {
// BufferedReaderオブジェクトのクローズ時の例外捕捉
e.printStackTrace();
}
}
}
这个不得不说,相机的光圈应该如下面所示(也许是其中的一部分或相像):
Query the views v$database and v$thread.
V$DATABASE gives DB_NAME
V$THREAD gives ORACLE_SID
If ORACLE_SID = DB_SID and db_name = DBNAME:
To find the current value of ORACLE_SID:
SVRMGR> select instance from v$thread;
INSTANCE
----------------
DB_SID
To find the current value of DB_NAME:
SVRMGR> select name from v$database;
NAME
---------
DBNAME
D:\eclipse\eclipse.exe -nl "zh" 将eclipse显示为中文版
D:\eclipse\eclipse.exe -nl "en" 将eclipse显示为英文版
D:\eclipse\eclipse.exe -nl "ja" 将eclipse显示为日文版
-vmargs -Xmx512M 添加Eclipse的虚拟内存,将其设置为512M,默认的大概是256。这个尤其在使用类似SDE这样的比较大的Eclipse应用工具的时候用的比较多。
GATES: We went to China for a lot of reasons. Partly to relax and have fun. We found a few McDonald's there, so we didn't feel too far away from home. It was also exciting to go and see all the changes taking place, to see different parts of the country, and to meet some of the leaders.
China is a market that Microsoft had already been investing in. We've upped that a lot since then. As a percentage of our sales, though, it's tiny--well under 1%--and so even though it will double every year for the next five years, it's really only by taking a ten-year view that we can say it's worth the emphasis we're putting on it.
Although about three million computers get sold every year in China, people don't pay for the software. Someday they will, though. And as long as they're going to steal it, we want them to steal ours. They'll get sort of addicted, and then we'll somehow figure out how to collect sometime in the next decade.
中文互联网上流传的最广泛的翻译(上面最后一小段):
尽管在中国每年有大约300万台电脑被售出,中国人却不会为软件付钱,不过总有一天他们会的。既然他们想要去偷,我们想让他们偷我们的。他们会因此上瘾,这样接下来的10年我们就会找出某种办法让他们付账。