易截截图软件、单文件、免安装、纯绿色、仅160KB

java log add function

#dd_traces.pl (C) Marko Kivij?rvi 2006
# Dummy checks
die "Specify an input file!\n" if $ARGV[0] eq "";
die "File not found!\n" unless -e $ARGV[0];
die "Incorrect file extension for a C/C++ file!\n"
    if ( $ARGV[0] !~ /(.*)\.(java)$/ );
# Constants
my $IMPORT_LOG_PACKAG = "\nimport android.util.Log;";
my $TAG;
if( $ARGV[0] !~ /BaseAdapter\.java/ && $ARGV[0] !~ /View\.java/) {
    $TAG="SWIFTTAG";
}
else {
    $TAG="SWIFTBASETAG";
}
# Parse output filename from the input filename
my $file = $ARGV[0];
my $origFile = $1."-orig.".$2;
#system( "cp $file $origFile" );
# Reset the input record separator (newline) so the entire file is read at once
undef $/;
# Read the input file
$_ = <>;                                 # All there
# Adds a tracer macro after each function definition
s/
    package #package
    \s+
    [^{;\/(\s]*\.[^{;\/(\s]*        # package name
    ;
/
    AddLogImport(tiny_mce_markeramp;)    # Print the match and add the macro
/gxe;                         # g = repeat, x = split regex to multiple lines, e = evaluate substitution
s/
    (public|private|protected)?   #api property type
    (\s+)?
    (abstract)?
    (\s+)?
    class                                     # Possible function return type
    \s+                                       # One or more empty spaces
    (\b\w+?)         &n


相关文档:

Centos中配置Java环境

     如果安装JDK时提示已经安装了JDK(或者安装的版本不是你想要的),删除的方法如下:
    # yum -y remove java-1.4.2-gcj-compat
1.安装JDK
首先需要从网上下载JDK安装文件,如果文件的类型是rpm.bin,可以使用下面的命令安装:
# sh jdk-6u2-linux-i586-rpm.bin
如果文 ......

java编码2

String str = "中";
 
 
  String str1 = new String(str.getBytes("gbk"), "ISO8859-1");
  String str2 = new String(str1.getBytes("ISO8859-1"), "gbk");
  System.out.println(str2);  //输出"中" ......

疯狂java讲义 java顺序循环与java数组

1.
顺序控制
if
else
switch  
 可以用byte,short,char,int做为表达式类型
循环结构
while
do ...while
for
标签跳转:
outer:
break outer;
outer:
continue outer;
2.数组类型
 数组也是一种数据类型,它本身是引用类型。
静态初始化:程序员显示指定初始值,系统决定长度。
动态 ......

Java中的常量


 
Java
中的常量
常量就是程序里持续不变的值,它是不能改变的数据。
Java
中的常量包含整型常量、浮点数常量、布尔常量等,下面来看一下它们是如何表示的:
整型常量
整型常量可以分为十进制
、十六进制
和八进制

十进制

0 1 2 3 4 5 6 7 8 9
注意
:以十进制表示时,第一位不能是
0
(数字 ......

java 函数参数的传递问题。

最近在学习java的时候,对于java函数的传递了解了一下。java的数据类型大的分为两种,一种是基本数据类型,另一种是非基本数据类型,(类数据类型)。在参数传递时候,基本的数据类型传递的是对实参数的一份拷贝,而非基本数据类型则是实例的引用的一份拷贝。我的理解是类的实例,即对象存放的内容就是引用,实际是地址。
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号