import java.awt.Color;
import java.io.FileOutputStream;
import com.lowagie.text.Cell;
import com.lowagie.text.Chapter;
import com.lowagie.text.Document;
import com.lowagie.text.Font;
import com.lowagie.text.Image;
import com.lowagie.text.List;
import com.lowagie.text.ListItem;
import com.lowagie.text.PageSize;
import com.lowagie.text.Paragraph;
import com.lowagie.text.Section;
import com.lowagie.text.Table;
import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfWriter;
public class ITextDemo {
public boolean iTextTest() {
try {
/** ʵÀý»¯Îĵµ¶ÔÏó */
Document document = new Document(PageSize.A4, 50, 50, 50, 50);
/** ´´½¨ PdfWriter ¶ÔÏó */ &nb ......
ÎÒÃÇÿ¸öѧÆÚÄ©¶¼»á½øÐн«½üÒ»¸öÔµÄʵѵ£¬Õâ´ÎJavaʵѵҲ¼´½«½áÊø£¬ÎÒÑ¡µÄ¿ÎÌâÊÇ“¸öÈËÍøÉÏÒøÐÐϵͳ”£¬ÔËÓÃÁËStruts£¬HibernateºÍSpring¿ò¼Ü£¬Í¨¹ýmvcÉè¼ÆÄ£Ê½¡£»ù±¾ËùÓеŦÄܶ¼ÊµÏÖÁË£¬ÔÚʵѵÖÐÕæµÄѧµ½Á˺ܶà֪ʶ£¬Ö®¼äÒ²Óöµ½Á˺ܶàÎÊÌ⣬µ«¶¼Ò»Ò»µÃµ½½â¾ö¡£ÎÒ½øÒ»²½Á˽âÁËStrutsµÄÔËÐÐÔÀí£¬ÂíÉÏÃæÁÙ±ÏÒµÁË£¬Ò²ÎªÒÔºóµÄ¹¤×÷×öÁËºÜºÃµÄÆÌµæ°É£¡ÎÒ¾õµÃ²Î¼ÓʵѵµÄÿһ¸öÈ˶¼Ó¦¸ÃÓÃÐÄÈ¥ÌåÑéÖ®ÖеĹý³Ì£¬²»Òª»Ä·ÏÁË×Ô¼ºµÄÇà´º£¬ÎÒÃdzÃ×ÅÄêÇá¶àѧµã֪ʶ°É£¡ ......
game
server responsibility:
Initialize
the server socke;
Wait
for a client to connect;
Accept
the client connection;
Create
a daemon thread to support the clien;
Go
back to step 2.
game daemon responsibility:
Accept
client player connection;
Pair
up players to form separate game;
Manage
the flow of the game;
Communicate
each player's move to the other player;
Notify
the players of the state of the game.
......
import java.util.Scanner;
public class Game{
void welcome(){
println("»¶ÓÀ´µ½¼ôµ¶Ê¯Í·²¼ÓÎÏ·");
}
Choice getUserChoice(){
println("ÇëÑ¡Ôñ\t[1]¼ôµ¶\t[2]ʯͷ\t[3]²¼");
Scanner sc= new Scanner(System.in);
int userChoice=Integer.parseInt(sc.nextLine());
while(userChoice>3||userChoice<1){
println("ÄúÊäÈëµÄ²»ºÏ·¨£¬ÇëÖØÐÂÊäÈë");
userChoice=Integer.parseInt(sc.nextLine());
}
return new Choice(userChoice);
}
Choice getComputerChoice(){
return new Choice((int)(3*Math.random())+1);
}
void showResult(Choice userChoice,Choice computerChoice){
int re=userChoice.compareTo(computerChoice);
if(re==0){
println("ƽÁË!ÄúºÃ,ÄúÊäÈëµÄÊÇ:"+userChoice.getText());
}else if(re==1){
println("¹§Ï²Äú»ñʤÁË£ ......
package OALogic.sql.data;
import java.io.*;
public class FileOperate {
public FileOperate() {
}
public static void main(String args[]){
newFolder("D:/100");
}
/**
* н¨Ä¿Â¼
* @param folderPath String Èç c:/fqf
* @return boolean
*/
public static void newFolder(String folderPath) {
try {
String filePath = folderPath;
filePath = filePath.toString();
java.io.File myFilePath = new java.io.File(filePath);
if (!myFilePath.exists()) {
  ......
Ò»¡¢Ê²Ã´ÊÇ·´É䣺
·´ÉäµÄ¸ÅÄîÊÇÓÉSmithÔÚ1982ÄêÊ×´ÎÌá³öµÄ£¬Ö÷ÒªÊÇÖ¸³ÌÐò¿ÉÒÔ·ÃÎÊ¡¢¼ì²âºÍÐÞ¸ÄËü±¾Éí״̬»òÐÐΪµÄÒ»ÖÖÄÜÁ¦¡£ÕâÒ»¸ÅÄîµÄÌá³öºÜ¿ìÒý·¢Á˼ÆËã»ú¿ÆÑ§ÁìÓò¹ØÓÚÓ¦Ó÷´ÉäÐÔµÄÑо¿¡£ËüÊ×Ïȱ»³ÌÐòÓïÑÔµÄÉè¼ÆÁìÓòËù²ÉÓÃ,²¢ÔÚLispºÍÃæÏò¶ÔÏó·½ÃæÈ¡µÃÁ˳ɼ¨¡£ÆäÖÐLEAD/LEAD++ ¡¢OpenC++ ¡¢MetaXaºÍOpenJavaµÈ¾ÍÊÇ»ùÓÚ·´Éä»úÖÆµÄÓïÑÔ¡£×î½ü£¬·´Éä»úÖÆÒ²±»Ó¦Óõ½ÁËÊÓ´°ÏµÍ³¡¢²Ù×÷ϵͳºÍÎļþϵͳÖС£
·´Éä±¾Éí²¢²»ÊÇÒ»¸öиÅÄ¾¡¹Ü¼ÆËã»ú¿ÆÑ§¸³ÓèÁË·´Éä¸ÅÄîеĺ¬Òå¡£ÔÚ¼ÆËã»ú¿ÆÑ§ÁìÓò£¬·´ÉäÊÇÖ¸Ò»ÀàÓ¦Óã¬ËüÃÇÄܹ»×ÔÃèÊöºÍ×Ô¿ØÖÆ¡£Ò²¾ÍÊÇ˵£¬ÕâÀàÓ¦ÓÃͨ¹ý²ÉÓÃijÖÖ»úÖÆÀ´ÊµÏÖ¶Ô×Ô¼ºÐÐΪµÄÃèÊö£¨self-representation£©ºÍ¼à²â£¨examination£©£¬²¢Äܸù¾Ý×ÔÉíÐÐΪµÄ״̬ºÍ½á¹û£¬µ÷Õû»òÐÞ¸ÄÓ¦ÓÃËùÃèÊöÐÐΪµÄ״̬ºÍÏà¹ØµÄÓïÒå¡£
¶þ¡¢Ê²Ã´ÊÇJavaÖеÄÀà·´É䣺
Reflection ÊÇ Java ³ÌÐò¿ª·¢ÓïÑÔµÄÌØÕ÷Ö®Ò»£¬ËüÔÊÐíÔËÐÐÖÐµÄ Java ³ÌÐò¶Ô×ÔÉí½øÐмì²é£¬»òÕß˵“×ÔÉ󔣬²¢ÄÜÖ±½Ó²Ù×÷³ÌÐòµÄÄÚ²¿ÊôÐԺͷ½·¨¡£Java µÄÕâÒ»ÄÜÁ¦ÔÚʵ¼ÊÓ¦ÓÃÖÐÓõò»ÊǺܶ࣬µ«ÊÇÔÚÆäËüµÄ³ÌÐòÉè¼ÆÓïÑÔÖиù±¾¾Í²»´æÔÚÕâÒ»ÌØÐÔ¡£ÀýÈ磬Pascal¡¢C »òÕß C++ ÖоÍûÓа취ÔÚ³ÌÐòÖлñµÃº¯Êý¶¨ÒåÏà¹ØµÄÐ ......