the right column of the item: • Create new revision check box • Menu Settings link • Annotation settings link URL path settings link • Authoring Information link • Promotion option links the options associated with these items are described in later chapters. Revision information have you ever made changes to the document, saved the changes, and realized that you made a mistake and needed to "undo" the changes you made? Did you turn off Microsoft Word after you realized that when it was too lat
Import java.net.*;Import java.io.*;public class mailsender{Private String smtpserver= "smtp.mydomain.com"; The host name of the SMTP mail serverPrivate String smtpserver= "localhost";private int port=25;public static void main (string[] Args) {Message msg=new message ("[email protected]",//sender's email address"[email Protected]",//recipient's Email Address"hello",//mail Header"hi,i Miss you very much."); Message bodyNew MailSender (). SendMail (msg);}public void SendMail (Message Msg) {Socket
a web browser. If we access serversocket through a common socket, there is no such request information.
As we have already said before, the communication between web browsers and servers must follow the Http protocol.
Therefore, the web browser we use in our daily life automatically packs our requests based on the http protocol.
However, because we have already understood the principles, we can also simulate browser preferences:
// Shanzhai browser public class MyBrowser {public static void ma
TCP Connection
The foundation of TCP is Socket. In the TCP connection, we will use ServerSocket and Socket. After the client and server establish a connection, the rest is basically the control of I/O.
Let's first look at a simple TCP communication, which is divided into the client and the server.
The client code is as follows:
Copy codeThe Code is as follows: a simple TCP client
Import java.net .*;
Import java. io .*;
Public class SimpleTcpClient {
Public static void main (String [] args) thro
the default order in the 10th chapter. Views that open and close on individual content items provide absolute control over which items are accepted. You can also set whether to accept comments at the content type level, and each meaning content item is created by using that content type to "inherit" the setting. I will set the global parameters, such as accepting comments, in the 10th chapter.URL Path SettingsYou may have noticed that at the same time with the revision work is characterized by
. getinputstream ();// Read from the stream.Is. Close ();S. Close ();
Next, we will demonstrate a customer program of a stream socket. This program will create a socket object and the socket will access the service program running on the specified host port 10000, if the access is successful, the client program will send a series of commands to the service program and print the response of the service program. List2 let us create the program ssclient source code:
Listing 2: ssclient. Java
/*gino -/7/Ten +: the: -*/#include #include #include #include #include intMain () {/* The GetLogin function returns the logon name associated with the current user. The Getuid function returns the UID associated with the program, which is usually the UID of the user who initiates the program. */ printf("Login user is %s\ n",GetLogin());printf("uid=%d, gid=%d\ n", Getuid (), Getgid ());/ * System files/etc/PASSWD contains a database of user accounts. It consists of rows with one user pe
other browsers will download them. Opera can be a good control of the download of resources, for users do not see the content, it will not be pre-downloaded.
Browser
Request Picture
Android 2.1+
Request
Blackberry (6.0+)
Request
Chrome (4.1) +
Request
Chrome Mobile
Request
Fennec (10.0+)
Request
Firefox (3.6+)
Request
Ie
Request
display:none. It's basically no use. It seems that opera mobile and Opera Mini will not download pictures, and other browsers will download them. Opera can better control the download of resources, for users can not see the content, it will not be downloaded beforehand.
browser
request picture
android 2.1+
BL Ackberry (6.0+)
request
chrome (4.1) +
request
c Hrome Mobile
fen NEC (
download pictures, and other browsers will download them. Opera can better control the download of resources, for users can not see the content, it will not be downloaded beforehand.
Browser
Request Picture
Android 2.1+
Request
Blackberry (6.0+)
Request
Chrome (4.1) +
Request
Chrome Mobile
Request
Fennec (10.0+)
Request
Firefox (3.6+)
Request
Ie
Request
(); System. out. println ("ip:" + ip); // get the socket to read the stream and decorate BufferedReader br = new BufferedReader (new InputStreamReader (socket. getInputStream (); // get the socket output stream and decorate PrintWriter pw = new PrintWriter (socket. getOutputStream (), true); // new PrintWriter (socket. outputtream () String line = null; while (line = br. readLine ())! = Null) {System. out. println (line);
Beginner script + ajax data submission question HTML content
............
Password: ">
Email: ">
............
Script
Function submit (I)
{
Var sendData = "";
If (I = "1") {sendData = '{"action": "' + I + '", "pw":' + getElementByName + ', "email ": '+ getElementByName + ':}';}
$. Ajax ({
Timeout: 5000,
Type: "POST ",
Url: "edit_server.php ",
Data: sendData,
Success: function (data)
{
GetData (1); // This is a function used to open a page
iPhone 4 tells the website that its actual width is 640px, the text will become half of the original size-of course, without scaling. At this time, the website is almost invisible. All mobile websites with scaling disabled become useless.
Figure 1: Standard pixel size in Galaxy Tab and Kindle Fire
We also don't fully understand how each device processes pixels, which may cause problems. For example, the earliest Galaxy Tab and
, it is time to exchange files or execute remote commands. this can be done by using 2 small CommandLine utilities called pscp for file transfer and plink for executing remote commands such as remotely deleting files etc. make sure these are in you path settings so you can execute them everywhere!
Examples for executing a remote command (substitute the % parameters % with your own ones)
'create a directory' plink -batch -pw %PASSWORD% %USERNAME%@%HOST
1Chcp650012 SetHome_dir=Kp_home3 Setpackage_dir=/root/Java_source4 SetConfig_home=Anydir5 Setresource_path=/home/frank/opensource6 SetExchange_dir=\exchange.90km.com\Exchange7 Setremote_host=192.168.80.848 SetLogin_user=Root9 SetRemote_passwd=123456Ten One REM1. Create a working directory A ifexist%home_dir% ( -RD/S/Q%home_dir% - ) the MD%home_dir% - REM2. Enter the working directory - CD%home_dir% - + REM3. Get the PSCP tool. -xcopy \%exchange_dir%\xf\Pscp.exe + A REM4. Use PSCP to download
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.