总是忘记, 备份一下,方便下次用.第一种:File directory = new
File("");//参数为空String courseFile = directory.getCanonicalPath()
;System.out.println(courseFile);结果:C:\Docume...
分类:
编程语言 时间:
2014-05-08 12:43:50
阅读次数:
343
进程ID
每个进程都有一个唯一的进程ID。几个特殊进程:
0号进程是内核进程,通常是调度进程swapper。1号进程init,是用户进程(以root权限运行/sbin/init),负责初始化几个重要函数:getpid(进程ID)/getppid(父进程ID)/getuid(进程真实用户ID)/geteuid(进程有效用户ID)/getgid(进程真实用户组ID)/getegid(进程有...
分类:
其他好文 时间:
2014-05-08 03:52:27
阅读次数:
376
public class Tree { TreeNode last = null; TreeNode
root = null; public Tree(int value){ root = createNode(value); } ...
分类:
其他好文 时间:
2014-05-08 01:04:08
阅读次数:
349
我们在机房选择、测试网络的质量的时候,往往只根据跳数、延迟、抖动、网络吞吐量等指标来衡量,很多时候跳数并不能完全显示网络拓扑优劣,于是写了个traceroute结合whois的小脚本来直观显示每一跳所处的网络位置。
需要安装mtr和whois
脚本:
[root@localhost ~]# more geotrace.sh
#!/bin/bash
ec...
分类:
其他好文 时间:
2014-05-07 23:56:29
阅读次数:
474
[root@localhost~]#iptables-F#清除默认表filter中所有链的规则
[root@localhost~]#iptables-X#清除自定义链的规则
[root@localhost~]#iptables-L-nv--line-numbers#编号显示链规则
[root@localhost~]#iptables-N#新建一条自定义的链
[root@localhost~]#iptables-AINPUT-ieth0#..
分类:
其他好文 时间:
2014-05-07 22:32:21
阅读次数:
466
RedHatEL5安装Oracle10gRAC之--系统环境配置(1)系统环境:操作系统:RedHatEL5Cluster:OracleCRS10.2.0.1.0Oracle:Oracle10.2.0.1.0如图所示:RAC系统架构一、操作系统环境1、网络配置(在所有节点)[root@node1~]#cat/etc/hosts#Donotremovethefollowingline,orvariouspro..
分类:
数据库 时间:
2014-05-07 22:29:15
阅读次数:
811
[root@mailActivity]#find/opt/xyrpg/rpgserver_s1/XMLData/Activity/-typef-execmd5sum{}\;|sed‘s/rpgserver_s1/rpgserver_s2/‘|md5sum-c
/opt/xyrpg/rpgserver_s2/XMLData/Activity/ActivityCondition.xml:FAILED
/opt/xyrpg/rpgserver_s2/XMLData/Activity/NewServerActivit..
分类:
其他好文 时间:
2014-05-07 22:25:09
阅读次数:
522
System.IO 命名空间
System.IO 命名空间的主要目的是为了提供方便访问操作系统的文件和目录类型,另外,也提供写内存和网络流的方法。
这个命名空间提供主要两种方法处理文件和目录,能够使用FileInfo 和 DirectoryInfo 对象获得或修改文件和目录的信息;也能够用File 和 Directory 类实现相同的功能,但是两者都要求传入的文件名为静态成员。通常,如果...
分类:
其他好文 时间:
2014-05-07 21:40:34
阅读次数:
322
//文件远程下载 WebClient client = new WebClient(); Uri
uri = new Uri(url); client.DownloadFile(Uri uri,String
filename);//文件一定得存在不然会报错所以在删除文件时先判断这个文件是否存...
分类:
其他好文 时间:
2014-05-07 21:07:37
阅读次数:
284
默认情况下,hive的元数据信息存储在内置的Derby数据中。Facebook将hive元数据存储在关系数据库1、安装好mysql ,sudo apt-get
install mysql-server2、创建mysql用户hadoop $mysql-uroot-p 进入root用户 mysql>.....
分类:
数据库 时间:
2014-05-07 20:40:00
阅读次数:
554