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

java(Web)中相对路径,绝对路径问题总结
    java中相对路径,绝对路径问题总结
               ————bohemia(城)
前言:
前一段时间,由于在处理Web应用下的文件创建与移动等,因此涉及到很多关于java
中相对路径,绝对路径等问题。同时,对于Web应用中的 ......

java 透明图片

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

java程序实现utf 8转本地化编码

package script;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class Change {
 public static void main(String[] args) throws Exception {
  Change c = new Change();
  c.utf8toLocaleCode();
&n ......

UvaOJ java输入代码

1. byte 如果没有赋值,那么java会自动将它赋值为 (byte)0;
static String ReadLn (int maxLg) // utility function to read from stdin
{
byte lin[] = new byte [maxLg];
int lg = 0, car = -1;
String line = "";
try
{
while (lg < maxLg)
......

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


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