java Socket±à³Ì»ù´¡
×î¼òµ¥µÄ·þÎñÆ÷½ÓÊܵ¥Óû§ÇëÇóµÄsocket±à³ÌÄ£ÐÍ£¬´úÂëдµÃ²»ºÃ£¬Ö»ÊÇÓÃÀ´²ûÃ÷Òâ˼
client side
import java.net.*;
import java.util.*;
import java.io.*;
public class Client {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try
{
Socket clientSocket=new Socket("localhost",9009);//connect
BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
PrintWriter out = new PrintWriter(clientSocket.getOutputStream(),true);
Scanner scanner=new Scanner(System.in);
System.out.print("username:");
String username=scanner.next();
System.out.print("password:");
String password=scanner.next();
out.println(username+" "+password);
String input;
while(true)
{
input=in.readLine();
if(input.equals("ok"))
{
System.out.println("message sent, cilent exit");
break;
}
}
in.close();
out.close();
clientSocket.close();
}
catch(Exception e)
{
System.err.println(e.getMessage());
}
}
}
server side
import java.net.*;
import java.io.*;
//import java.util.*;
public class Server {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try
{
ServerSocket serverSocket=new ServerSocket(9009);//listen 9008 port
//while(true)
//{
System.out.println("waiting for connecting");
Socket socket=serverSocket.accept();//create a socket to communicate
System.out.println("connected");
BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
PrintWriter out = new PrintWriter(socket.getOutputStream(),true);
String line;
while(true)
{
line = in.readLine();
if(line!=null)
{
break;
}
}
System.out.println("client said:" + line);
out.println("ok");
out.close();
i
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
¡¡¡¡»¥ÁªÍøµÄáÈÆð£¬Ê¹µÃPC´Ó²úÒµÖÐÐÄÏò±ßÔµ¹ý¶É£¬¶øÀú¾20ÓàÄêµÄ·¢Õ¹£¬PCÊг¡Ò²Ç÷ÓÚ±¥ºÍ£¬´½Íö³Ýº®£¬Õâ½Ð¿¿PC³Ô·¹µÄ΢ÈíÈçºÎ²»¼±£¿ÎüÈ¡Á˵±Ä꿪·¢ä¯ÀÀÆ÷Èí¼þµÄ½Ìѵ£¬2000Äê6Ô£¬Î¢ÈíÆô¶¯.Net¼Æ»®£¬½ø¾üÍøÂç·þÎñÊг¡£¬±È¶û·¸Ç´Ä×ÔÐŵسƣº"ÊÀ½çÉÏËùÓÐÒ»Çж¼½«°üÀ¨ÔÚ»¥ÁªÍø·þÎñÖС£"
¡¡¡¡.NETµÄ˼ÏëÆäʵÊÇÀ´Ô ......
Õ⼸ÌìÒ»Ö±ÔÚÑо¿FlexÖÐRemoteObjectÓëjavaµÄ½»»¥ÎÊÌ⣬¿ÉÒ»Ö±²»³É¹¦£¬½ñÌìÖÕÓڳɹ¦ÁË£¬µ«ÊÇ»¹ÓÐһЩÒÉ»ó£¬Ó¦¸Ã¼ÌÐøŬÁ¦¡£
ÏÂÃæÊÇÎҵľ¹ýºÍÅöµ½µÄ´íÎó£º
£¨1£©ÏÂÔغͰ²×°lcds.
ÔÚ°²×°Ä¿Â¼Ï»áÓÐÈçÏÂÎļþ£¬ÆäÖÐlcds.war¿ÉÒÔ×÷ΪÎÒÃÇ¿ª·¢FlexÓëjava½»»¥µÄÄ£°æ£¬°ÑÕâ¸öÎļþ¿¼µ½ÄãtomcatµÄwebappsÏ£¨µ±È»ÕâÖÖÇé¿öÊÇÄ ......
BigDecimalÀà
Ë«¾«¶È¸¡µãÐͱäÁ¿double¿ÉÒÔ´¦Àí16λÓÐЧÊý¡£ÔÚʵ¼ÊÓ¦ÓÃÖУ¬ÐèÒª¶Ô¸ü´ó»òÕ߸üСµÄÊý½øÐÐÔËËãºÍ´¦Àí¡£JavaÔÚjava.math°üÖÐÌṩµÄAPIÀàBigDecimal£¬ÓÃÀ´¶Ô³¬¹ý16λÓÐЧλµÄÊý½øÐо«È·µÄÔËËã¡£±í5.7ÖÐÁгöÁËBigDecimalÀàµÄÖ÷Òª¹¹ÔìÆ÷ºÍ·½·¨¡£
±í5.7 BigDecimalÀàµÄÖ÷Òª¹¹ÔìÆ÷ºÍ·½·¨
¹¹ÔìÆ÷ÃèÊö
BigDecimal(in ......
ÊìϤC++µÄÈ˶ÔÓÚÁ½¸ö×Ö·û´®±È½ÏµÄ´úÂëÒ»¶¨ºÜÁ˽⣺
(string1==string2)
µ«ÔÚjavaÖУ¬Õâ¸ö´úÂ뼴ʹÔÚÁ½¸ö×Ö·û´®ÍêÈ«ÏàͬµÄÇé¿öÏÂÒ²»á·µ»Øfalse
JavaÖбØÐëʹÓÃstring1.equals(string2)À´½øÐÐÅжÏ
²¹³ä
Èç¹û£º
string s1=new String("Hello");
string s2=new String("Hello");
Ôò(s1==s2)=false
Èç¹û ......