This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestFile { | |
public static void main(String[] args) { | |
System.out.println("yes,alex!"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<s:set name="var" value="XXX" /> | |
<s:property value="{#var}" /> | |
<s:if test="%{#var == YYY}"> | |
</s:if> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//setter and getter of pagination and currentPage is ignored | |
private List<Integer> pagination = new ArrayList<Integer>(); | |
int up = (currentPage / 20 + 1) * 20 + currentPage % 20 + 1 -10; | |
int down = (currentPage / 20) * 20 + currentPage % 20 - 10; | |
for( int i = down; i < up; i ++){ | |
if(i >= 1) | |
pagination.add(i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.URLConnection; | |
import java.util.Date; | |
public class YangInitial { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.URLConnection; | |
import java.util.ArrayList; | |
import java.util.Date; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<s:if test="%{keyword == ''}"> | |
<title><s:property value="keyword"/></title> | |
</s:if> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 不能用来修饰interface的有() | |
A private B public C protected D static | |
3 下列正确的有() | |
A call by value 不会改变实际参数的数值 B call by reference 能改变实际参数的引用地址 | |
C call by reference不能呢个改变实际参数的引用地址 D call by reference不会改变实际参数的内容 | |
7 怎样让jvm自动开始垃圾回收过程? | |
A 不能 | |
C 调用System.gc(); | |
8 如下代码运行结果是: | |
public class Main implements Runnable { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *.jpg ;do chmod 777 $i; done | |
http://bbs2.chinaunix.net/archiver/tid-1526292.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%to just find them and printout: | |
find . -maxdepth 1 -name '[!.]*' -size 0 -printf 'Name: %16f Size: %6s\n' | |
%delete them, may be modified to use | |
find . -maxdepth 1 -name '[!.]*' -size 0 -printf 'Name: %16f Size: %6s\n' | xargs rm | |
http://content.hccfl.edu/pollock/unix/findcmd.htm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Dump ALL MySQL Databases | |
mysqldump --user=XXXXXXXX --password=XXXXXXX -A > /PATH/TO/DUMPFILE.SQL | |
#Dump Individual or Multiple MySQL Databases | |
mysqldump --user=XXXXXXXX --password=XXXXXXX --databases DB_NAME1 DB_NAME2 DB_NAME3 > /PATH/TO/DUMPFILE.SQL | |
#Dump only certain tables from a MySQL Database | |
mysqldump --user=XXXXXXXX --password=XXXXXXXX --databases DB_NAME --tables TABLE_NAME > /PATH/TO/DUMPFILE.SQL | |
# |
OlderNewer