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
Ïà¹ØÎĵµ£º
Èç¹û°²×°JDKʱÌáʾÒѾ°²×°ÁËJDK£¨»òÕß°²×°µÄ°æ±¾²»ÊÇÄãÏëÒªµÄ£©£¬É¾³ýµÄ·½·¨ÈçÏ£º
# yum -y remove java-1.4.2-gcj-compat
1.°²×°JDK
Ê×ÏÈÐèÒª´ÓÍøÉÏÏÂÔØJDK°²×°Îļþ£¬Èç¹ûÎļþµÄÀàÐÍÊÇrpm.bin£¬¿ÉÒÔʹÓÃÏÂÃæµÄÃüÁî°²×°£º
# sh jdk-6u2-linux-i586-rpm.bin
Èç¹ûÎÄ ......
¡¡¡¡ÔõôÈóÌÐòÀûÓÃËÑË÷ÒýÇæÀ´ËѼ¯ÍøÖ·£¬ÕâÓÐʲôÓÃ?ºÜÓÐÓÃ!ÍøÉ϶¯éüÓÐÈ˽ÐÂôÍøÖ·Êý¾Ý¿â£¬Èç·¢²¼Èí¼þÍøÖ·¡¢ÓʼþµØÖ·¡¢ÂÛÌ³ÍøÖ·¡¢ÐÐÒµÍøÖ·£¬ÕâÐ©ÍøÖ·ÊÇÔõôÀ´µÄÄØ?²»¿ÉÄÜÊÇÈËÊÖ¹¤ÊÕ¼¯¶øÀ´µÄ£¬¶¼ÊÇÈóÌÐòÀûÓÃËÑË÷ÒýÇæÈ¡µ½µÄ£¬Èç¹ûÄúÐèҪijÀàÍøÖ·ÐÅÏ¢Êý¾Ý£¬¾Í¸ú³É¶¼ÀÊÎÖ½ÌÓýÀ´Ò»ÆðÑо¿Ò»Ï£¬·Ç³£¼òµ¥¡£
¡¡¡¡±¾ÎIJÉÓÃJavaÓïÑÔÐ ......
¿ÉÄÜÓкܶàѧϰJavaµÄÅóÓÑ»¹²»ÖªµÀJavaµÄÔËÐÐÔÀí¡¢JavaÐéÄâ»úÊÇÔõô¹¤×÷µÄ£¬±¾ÎĽ«ÎªÄãÏêϸ½²½â(JVM)Java ÐéÄâ»ú¡£
¡¡¡¡ÔÚJavaÖÐÒýÈëÁËÐéÄâ»úµÄ¸ÅÄ¼´ÔÚ»úÆ÷ºÍ±àÒë³ÌÐòÖ®¼ä¼ÓÈëÁËÒ»²ã³éÏóµÄÐéÄâµÄ»úÆ÷¡£Õą̂ÐéÄâµÄ»úÆ÷ÔÚÈÎºÎÆ½Ì¨É϶¼Ìṩ¸ø±àÒë³ÌÐòÒ»¸öµÄ¹²Í¬µÄ½Ó¿Ú¡£±àÒë³ ......
1.
˳Ðò¿ØÖÆ
if
else
switch
¿ÉÒÔÓÃbyte,short,char,int×öΪ±í´ïʽÀàÐÍ
Ñ»·½á¹¹
while
do ...while
for
±êÇ©Ìø×ª£º
outer:
break outer;
outer:
continue outer;
2.Êý×éÀàÐÍ
Êý×éÒ²ÊÇÒ»ÖÖÊý¾ÝÀàÐÍ£¬Ëü±¾ÉíÊÇÒýÓÃÀàÐÍ¡£
¾²Ì¬³õʼ»¯£º³ÌÐòÔ±ÏÔʾָ¶¨³õʼֵ£¬ÏµÍ³¾ö¶¨³¤¶È¡£
¶¯Ì¬ ......
´¦ÀíÂÒÂëÎÊÌâ
1¡¢¹æ·¶Êý¾Ý¿âºÍÒ³ÃæËùÓбàÂëͳһΪһÖÖÀýÈçutf-8
2¡¢hibernateÁ¬½ÓÊý¾Ý¿âÉèÖÃÁ¬½Ó±àÂë
<session-factory>
<property name="connection.url">
jdbc:mysql://127.0.0.1:3306/leaveword?useUnicode=true&characterEncoding=utf-8
& ......