易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

java 插件加载

package tao.hai.bing;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
public class LoadJar {
 public static void main(String[] args)
 {
  Syst ......

java 透明图片

关于Java生成背景透明的png图片
最近用到Java动态生成背景透明的图片功能,从gif和png中选择了png格式,个中缘由就不说了,于是动手到网上搜索有用的代码。现把搜索结果总结如下:
1. 生成png图片
int width = 400;
int height = 300;
// 创建BufferedImage对象
BufferedImage&nb ......

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

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

关于以Thinking in Java为课本的Java教与学的方法

    在目前的关于java自学的讨论中,最经常看到的就是钻研《Thinking in java》(TIJ)的经验,但是,尽管使用TIJ作为教学材料的教学行为也很多,我却尚未发现有从教师关于如何将TIJ用于教学的论述。为此,我权作抛砖引玉。
 
    首先,为什么要学习java?按照Eckel的话说, ......

一个Java程序员应该掌握的10项技能


一个Java程序员应该掌握的10项技能
一个合格的Java程序员应该学什么、学到什么程度、怎么学?本文总结了十项Java程序员应该具备的基本技能,供您参考。
1、语法:必须比较熟悉,在写代码的时候IDE的编辑器对某一行报错应该能够根据报错信息知道是什么样的语法错误并且知道任何修正。
2、命令:必须熟悉JDK带的一些常用 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号