登录注册实现(服务器数据)

  1 <?xml version="1.0" encoding="utf-8"?>
  2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3     android:layout_width="fill_parent"
  4     android:layout_height="fill_parent"
  5     android:orientation="vertical"
  6     android:background="@drawable/bg_01">"
  7     
  8       <TextView 
  9         android:layout_width="wrap_content"
 10         android:layout_height="wrap_content"
 11         android:text="注册"
 12         android:textSize="22dip"
 13         android:textColor="#FFFFFF"
 14         android:paddingLeft="140dip"
 15         android:paddingRight="50dip"
 16         android:paddingTop="10dip"
 17         android:background="@drawable/topbg"
 18         />
 19     "
 20     <EditText 
 21         android:id="@+id/register_username"
 22         android:layout_width="wrap_content"
 23         android:layout_height="wrap_content"
 24         android:layout_marginTop="20dip"
 25         android:background="@drawable/search" 
 26         android:layout_marginLeft="20dip"
 27         android:layout_marginRight="20dip"
 28         android:height="40dip"
 29         android:hint="用户名"
 30         />
 31 
 32      <EditText 
 33         android:id="@+id/register_passwd"
 34         android:layout_width="wrap_content"
 35         android:layout_height="wrap_content"
 36         android:layout_marginTop="20dip"
 37         android:background="@drawable/search" 
 38         android:layout_marginLeft="20dip"
 39         android:layout_marginRight="20dip"
 40         android:height="40dip"
 41         android:hint="密码"
 42         />
 43     
 44       <EditText 
 45         android:id="@+id/reregister_passwd"
 46         android:layout_width="wrap_content"
 47         android:layout_height="wrap_content"
 48         android:layout_marginTop="20dip"
 49         android:background="@drawable/search" 
 50         android:layout_marginLeft="20dip"
 51         android:layout_marginRight="20dip"
 52         android:height="40dip"
 53         android:hint="确认密码"
 54         />
 55       <Button 
 56           android:id="@+id/register_submit"
 57           android:layout_width="wrap_content"
 58           android:layout_height="wrap_content"
 59           android:background="@drawable/topbg"
 60           android:height="40dip"
 61           android:width="70dip"
 62           android:layout_marginTop="60dip"
 63           android:text="确定"
 64           android:textColor="#FFFFFF"
 65           android:textSize="22dip"
 66       
 67           />
 68      
 69 </LinearLayout>
 70 
 71 处理注册页面的Activity:
 72 
 73 package com.example.foreveross.office;
 74 
 75 import java.io.IOException;
 76 import java.io.UnsupportedEncodingException;
 77 import java.util.ArrayList;
 78 import java.util.List;
 79 
 80 import org.apache.http.HttpEntity;
 81 import org.apache.http.HttpResponse;
 82 import org.apache.http.NameValuePair;
 83 import org.apache.http.ParseException;
 84 import org.apache.http.client.ClientProtocolException;
 85 import org.apache.http.client.HttpClient;
 86 import org.apache.http.client.entity.UrlEncodedFormEntity;
 87 import org.apache.http.client.methods.HttpPost;
 88 import org.apache.http.impl.client.DefaultHttpClient;
 89 import org.apache.http.message.BasicNameValuePair;
 90 import org.apache.http.util.EntityUtils;
 91 
 92 import com.example.wenandroid.R;
 93 import android.app.Activity;
 94 import android.os.Bundle;
 95 import android.os.StrictMode;
 96 import android.view.View;
 97 import android.view.View.OnClickListener;
 98 import android.view.View.OnFocusChangeListener;
 99 import android.widget.Button;
100 import android.widget.EditText;
101 import android.widget.Toast;
102 
103 public class UserRegister extends Activity {
104  
105 private EditText register_username;
106 private EditText register_passwd;
107 private EditText reregister_passwd;
108 private Button register_submit;
109     @Override
110     protected void onCreate(Bundle savedInstanceState) {
111         // TODO Auto-generated method stub
112         super.onCreate(savedInstanceState);
113         StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
114         StrictMode.setThreadPolicy(policy);
115         setContentView(R.layout.user_register);
116         register_username=(EditText)findViewById(R.id.register_username);
117         register_passwd=(EditText)findViewById(R.id.register_passwd);
118         reregister_passwd=(EditText)findViewById(R.id.reregister_passwd);
119         register_submit=(Button)findViewById(R.id.register_submit);
120         register_username.setOnFocusChangeListener(new OnFocusChangeListener()
121         {
122 
123             @Override
124             public void onFocusChange(View v, boolean hasFocus) {
125                 // TODO Auto-generated method stub
126                 if(!hasFocus){
127                     if(register_username.getText().toString().trim().length()<4){
128                         Toast.makeText(UserRegister.this, "用户名不能小于4个字符", Toast.LENGTH_SHORT).show();
129                     }
130                 }
131             }
132             
133         });
134         register_passwd.setOnFocusChangeListener(new OnFocusChangeListener()
135         {
136 
137             @Override
138             public void onFocusChange(View v, boolean hasFocus) {
139                 // TODO Auto-generated method stub
140                 if(!hasFocus){
141                     if(register_passwd.getText().toString().trim().length()<6){
142                         Toast.makeText(UserRegister.this, "密码不能小于8个字符", Toast.LENGTH_SHORT).show();
143                     }
144                 }
145             }
146             
147         });
148         reregister_passwd.setOnFocusChangeListener(new OnFocusChangeListener()
149         {
150 
151             @Override
152             public void onFocusChange(View v, boolean hasFocus) {
153                 // TODO Auto-generated method stub
154                 if(!hasFocus){
155                     if(!reregister_passwd.getText().toString().trim().equals(register_passwd.getText().toString().trim())){
156                         Toast.makeText(UserRegister.this, "两次密码输入不一致", Toast.LENGTH_SHORT).show(); 
157                     }
158                 }
159             }
160             
161         });
162         register_submit.setOnClickListener(new OnClickListener(){
163 
164             @Override
165             public void onClick(View v) {
166                 
167                 if(!checkEdit()){
168                     return;
169                 }
170                 // TODO Auto-generated method stub
171                 String httpUrl="http://192.168.1.100:8080/web-test/register.jsp";
172                 HttpPost httpRequest=new HttpPost(httpUrl);
173                 List<NameValuePair> params=new ArrayList<NameValuePair>();
174                 params.add(new BasicNameValuePair("username",register_username.getText().toString().trim()));
175                 params.add(new BasicNameValuePair("password",register_passwd.getText().toString().trim()));
176                 HttpEntity httpentity = null;
177                 try {
178                     httpentity = new UrlEncodedFormEntity(params,"utf8");
179                 } catch (UnsupportedEncodingException e) {
180                     // TODO Auto-generated catch block
181                     e.printStackTrace();
182                 }
183                 httpRequest.setEntity(httpentity);
184                 HttpClient httpclient=new DefaultHttpClient();
185                 HttpResponse httpResponse = null;
186                 try {
187                     httpResponse = httpclient.execute(httpRequest);
188                 } catch (ClientProtocolException e) {
189                     // TODO Auto-generated catch block
190                     e.printStackTrace();
191                 } catch (IOException e) {
192                     // TODO Auto-generated catch block
193                     e.printStackTrace();
194                 }
195                 if(httpResponse.getStatusLine().getStatusCode()==200)
196                 {
197                     String strResult = null;
198                     try {
199                         strResult = EntityUtils.toString(httpResponse.getEntity());
200                     } catch (ParseException e) {
201                         // TODO Auto-generated catch block
202                         e.printStackTrace();
203                     } catch (IOException e) {
204                         // TODO Auto-generated catch block
205                         e.printStackTrace();
206                     }
207                     Toast.makeText(UserRegister.this, strResult, Toast.LENGTH_SHORT).show();
208                 }
209                 else
210                 {
211                     Toast.makeText(UserRegister.this, "请求错误", Toast.LENGTH_SHORT).show();
212                 }
213                 
214             }
215             
216         });
217     }
218     
219     private boolean checkEdit(){
220         if(register_username.getText().toString().trim().equals("")){
221             Toast.makeText(UserRegister.this, "用户名不能为空", Toast.LENGTH_SHORT).show();
222         }else if(register_passwd.getText().toString().trim().equals("")){
223             Toast.makeText(UserRegister.this, "密码不能为空", Toast.LENGTH_SHORT).show();
224         }else if(!register_passwd.getText().toString().trim().equals(reregister_passwd.getText().toString().trim())){
225             Toast.makeText(UserRegister.this, "两次密码输入不一致", Toast.LENGTH_SHORT).show();
226         }else{
227             return true;
228         }
229         return false;
230     }
231     
232 }
233 
234 登录页面xml:
235 
236 user_login.xml:
237 
238 <?xml version="1.0" encoding="utf-8"?>
239 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
240     android:layout_width="fill_parent"
241     android:layout_height="fill_parent"
242     android:orientation="vertical" 
243     android:background="@drawable/bg_01">
244     
245     <TextView 
246         android:layout_width="wrap_content"
247         android:layout_height="wrap_content"
248         android:text="登录"
249         android:textSize="22dip"
250         android:textColor="#FFFFFF"
251         android:paddingLeft="140dip"
252         android:paddingRight="50dip"
253         android:paddingTop="10dip"
254         android:background="@drawable/topbg"
255         />
256     
257     <LinearLayout
258     android:layout_width="fill_parent"
259     android:layout_height="wrap_content"
260     android:orientation="vertical" >
261         
262         <EditText
263         android:id="@+id/login_username"
264         android:layout_width="fill_parent"
265         android:layout_height="40dip"
266         android:layout_marginLeft="20dip"
267         android:layout_marginRight="20dip"
268         android:layout_marginTop="30dip"
269         android:hint="用户名"
270         android:paddingTop="10dip"
271         android:textSize="18dip"
272         android:background="@drawable/search">
273             
274         </EditText>
275         
276         <EditText
277         android:id="@+id/login_password"
278         android:layout_width="fill_parent"
279         android:layout_height="40dip"
280         android:layout_marginLeft="20dip"
281         android:layout_marginRight="20dip"
282         android:layout_marginTop="10dip"
283         android:password="true"
284         android:paddingTop="10dip"
285         android:textSize="18dip"
286         android:hint="密码"
287         android:background="@drawable/search">
288             
289         </EditText>
290     </LinearLayout>
291 
292      <LinearLayout
293     android:layout_width="fill_parent"
294     android:layout_height="wrap_content"
295     android:layout_gravity="center_horizontal"
296     android:layout_marginTop="15dip">
297 
298          <CheckBox
299              android:id="@+id/cb1"
300              android:layout_width="wrap_content"
301              android:layout_height="wrap_content"
302              android:layout_marginLeft="50dip"
303              android:layout_marginRight="30dip"
304              android:text="记住密码" 
305              android:button="@drawable/checkbox_icon_no" />"
306          <CheckBox
307              android:id="@+id/cb2"
308              android:layout_width="wrap_content"
309              android:layout_height="wrap_content"
310              android:text="自动登录" 
311              android:paddingRight="50dip"
312              android:button="@drawable/checkbox_icon_no"/>
313         </LinearLayout>
314         
315      <LinearLayout
316     android:layout_width="fill_parent"
317     android:layout_height="wrap_content"
318     android:layout_gravity="center_horizontal"
319     android:layout_marginTop="20dip">
320          <Button 
321              android:id="@+id/user_login_button"
322              android:layout_width="wrap_content"
323              android:layout_height="wrap_content"
324              android:text="登录"
325              android:layout_marginLeft="50dip"
326              android:textColor="#F7FBFD"
327              android:background="#FF0000"
328              android:width="70dip"
329              android:height="40dip"
330              android:textSize="18dip"
331              />
332          
333             <Button 
334              android:id="@+id/user_register_button"
335              android:layout_width="wrap_content"
336              android:layout_height="wrap_content"
337              android:text="注册"
338              android:layout_marginLeft="50dip"
339              android:textColor="#F7FBFD"
340              android:width="70dip"
341              android:height="40dip"
342              android:background="#0F9000"
343              android:textSize="18dip"
344              />
345          
346      </LinearLayout>
347      
348 </LinearLayout>
349 
350 登录页面Activity:
351 
352 package com.example.foreveross.office;
353 
354 import java.io.IOException;
355 import java.io.UnsupportedEncodingException;
356 import java.util.ArrayList;
357 import java.util.List;
358 
359 import org.apache.http.HttpEntity;
360 import org.apache.http.HttpResponse;
361 import org.apache.http.NameValuePair;
362 import org.apache.http.ParseException;
363 import org.apache.http.client.ClientProtocolException;
364 import org.apache.http.client.HttpClient;
365 import org.apache.http.client.entity.UrlEncodedFormEntity;
366 import org.apache.http.client.methods.HttpPost;
367 import org.apache.http.impl.client.DefaultHttpClient;
368 import org.apache.http.message.BasicNameValuePair;
369 import org.apache.http.util.EntityUtils;
370 
371 import com.example.wenandroid.R;
372 import android.app.Activity;
373 import android.content.Intent;
374 import android.os.Bundle;
375 import android.os.StrictMode;
376 import android.view.View;
377 import android.view.View.OnClickListener;
378 import android.view.View.OnFocusChangeListener;
379 import android.widget.Button;
380 import android.widget.EditText;
381 import android.widget.Toast;
382 
383 public class UserLogin extends Activity implements OnClickListener {
384 private EditText login_username;
385 private EditText login_password;
386 private Button user_login_button;
387 private Button user_register_button;
388 
389     @Override
390 protected void onCreate(Bundle savedInstanceState) {
391     super.onCreate(savedInstanceState);
392     StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
393     StrictMode.setThreadPolicy(policy);
394     setContentView(R.layout.user_login);
395     initWidget();
396 
397 }
398     private void initWidget()
399     {
400         login_username=(EditText)findViewById(R.id.login_username);
401         login_password=(EditText)findViewById(R.id.login_password);
402         user_login_button=(Button)findViewById(R.id.user_login_button);
403         user_register_button=(Button)findViewById(R.id.user_register_button);
404         user_login_button.setOnClickListener(this);
405         user_register_button.setOnClickListener(this);
406         login_username.setOnFocusChangeListener(new OnFocusChangeListener()
407         {
408 
409             @Override
410             public void onFocusChange(View v, boolean hasFocus) {
411                 // TODO Auto-generated method stub
412                 if(!hasFocus){
413                     String username=login_username.getText().toString().trim();
414                     if(username.length()<4){
415                         Toast.makeText(UserLogin.this, "用户名不能小于4个字符", Toast.LENGTH_SHORT);
416                     }
417                 }
418             }
419             
420         });
421         login_password.setOnFocusChangeListener(new OnFocusChangeListener()
422         {
423 
424             @Override
425             public void onFocusChange(View v, boolean hasFocus) {
426                 // TODO Auto-generated method stub
427                 if(!hasFocus){
428                     String password=login_password.getText().toString().trim();
429                     if(password.length()<4){
430                         Toast.makeText(UserLogin.this, "密码不能小于4个字符", Toast.LENGTH_SHORT);
431                     }
432                 }
433             }
434             
435         });
436     }
437     
438 
439     @Override
440     public void onClick(View v) {
441         // TODO Auto-generated method stub
442         switch(v.getId())
443         {
444         case R.id.user_login_button:
445             if(checkEdit())
446             {
447                 login();
448             }
449             
450             break;
451         case R.id.user_register_button:
452             Intent intent2=new Intent(UserLogin.this,UserRegister.class);
453             startActivity(intent2);
454             break;
455         }
456     }
457     
458     private boolean checkEdit(){
459         if(login_username.getText().toString().trim().equals("")){
460             Toast.makeText(UserLogin.this, "用户名不能为空", Toast.LENGTH_SHORT).show();
461         }else if(login_password.getText().toString().trim().equals("")){
462             Toast.makeText(UserLogin.this, "密码不能为空", Toast.LENGTH_SHORT).show();
463         }else{
464             return true;
465         }
466         return false;
467     }
468     
469     private void login(){
470         String httpUrl="http://192.168.1.102:8080/web-test/login.jsp";
471         HttpPost httpRequest=new HttpPost(httpUrl);
472         List<NameValuePair> params=new ArrayList<NameValuePair>();
473         params.add(new BasicNameValuePair("username",login_username.getText().toString().trim()));
474         params.add(new BasicNameValuePair("password",login_password.getText().toString().trim()));
475         HttpEntity httpentity = null;
476         try {
477             httpentity = new UrlEncodedFormEntity(params,"utf8");
478         } catch (UnsupportedEncodingException e) {
479             // TODO Auto-generated catch block
480             e.printStackTrace();
481         }
482         httpRequest.setEntity(httpentity);
483         HttpClient httpclient=new DefaultHttpClient();
484         HttpResponse httpResponse = null;
485         try {
486             httpResponse = httpclient.execute(httpRequest);
487         } catch (ClientProtocolException e) {
488             // TODO Auto-generated catch block
489             e.printStackTrace();
490         } catch (IOException e) {
491             // TODO Auto-generated catch block
492             e.printStackTrace();
493         }
494         if(httpResponse.getStatusLine().getStatusCode()==200)
495         {
496             String strResult = null;
497             try {
498                 strResult = EntityUtils.toString(httpResponse.getEntity());
499             } catch (ParseException e) {
500                 // TODO Auto-generated catch block
501                 e.printStackTrace();
502             } catch (IOException e) {
503                 // TODO Auto-generated catch block
504                 e.printStackTrace();
505             }
506             Toast.makeText(UserLogin.this, strResult, Toast.LENGTH_SHORT).show();
507             Intent intent=new Intent(UserLogin.this,IndexActivity.class);
508             startActivity(intent);
509         }
510         else
511         {
512             Toast.makeText(UserLogin.this, "登录失败!", Toast.LENGTH_SHORT).show();
513         }
514         
515     }
516 }

 

转载于:https://www.cnblogs.com/wangying222/p/5492915.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/430538.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

java与android https,java – Https连接Android

我做一个猜测&#xff0c;但如果你想要一个实际的握手发生&#xff0c;你必须让Android知道你的证书。如果你想只接受无论什么&#xff0c;然后使用这个伪代码来获得你需要与Apache HTTP客户端&#xff1a;SchemeRegistry schemeRegistry new SchemeRegistry ();schemeRegistr…

84. Largest Rectangle in Histogram

/** 84. Largest Rectangle in Histogram * 2016-5-13 by Mingyang* 这里并不需要两个stack&#xff0c;只需要一个stack&#xff0c;装的是递增序列的index* 直到遇到一个递减的时候&#xff0c;弹出来&#xff0c;求一个一个的面积大小* 不过注意的是最后如果以递增的序列结尾…

收件箱java项目源码,Java物资管理系统项目源码(含数据库).zip

.mymetadata , 279.project , 1408│╠╨≥╩╣╙├╦╡├≈.doc , 99840.settings/.jsdtscope , 500.settings/org.eclipse.jdt.core.prefs , 330.settings/org.eclipse.wst.jsdt.ui.superType.container , 49.settings/org.eclipse.wst.jsdt.ui.superType.name , 6src/Applic…

小米范工具系列之二:小米范 web目录扫描器

最新版本1.1&#xff0c;下载地址&#xff1a;http://pan.baidu.com/s/1c1NDSVe 文件名scandir&#xff0c;请使用java1.8运行 小米范web目录扫描器主要功能是探测web可能存在的目录及文件&#xff0c;界面如下&#xff0c;左侧为发现的url&#xff0c;中间为浏览器&#xff0…

php中介者,PHP设计模式 - 中介者模式

【一】模式定义中介者模式(Mediator)就是用一个中介对象来封装一系列的对象交互&#xff0c;中介者使各对象不需要显式地相互引用&#xff0c;从而使其耦合松散&#xff0c;而且可以独立地改变它们之间的交互。对于中介对象而言&#xff0c;所有相互交互的对象&#xff0c;都视…

java 自定义标签 rtexprvalue,java自定义标签

三步&#xff1a;一、自定义标签实现类&#xff1a; myTags.java;二、自定义标签库文件(TLD): myTags.tld;三、一个JSP页面&#xff1a;随便写了;首先myTags.javapackage com.tags;import javax.servlet.jsp.JspException;import javax.servlet.jsp.JspWriter;import javax.ser…

Enum遇到下拉框

package com.zj.tool;public enum WeekDay {Mon("Monday",1),Tue("Tuesday",2),Wed("Wednesday",3),Thu("Thursday",4),Fri("Friday",5),Sat("Saturday",6),Sun("Sunday",7);/**定义枚举类型自己的属性…

dede plus ad js.php,织梦dedecms/plus/文件夹的功能介绍

/plus /–插件及辅助功能目录后台系统插件和辅助功能文件存放目录&#xff0c;你有什么辅助功能或者第三方开发的插件你需要用那么久需要放在这个文件夹中&#xff0c;文件夹中有dedecms自带的常用插件&#xff1a;plus 系统插件存放目录guestbook 留言板插件ad_js.php 广告…

今天觉得自己好像比较紧张

因为每天早上都是想着公司的事情&#xff0c;就怕自己做不成什么就早早的醒了&#xff0c;有时还要继续睡 转载于:https://www.cnblogs.com/bkchengzheng/p/5500224.html

vertex shader(5)

先挖个坑 &#xff0c;以后填。。。转载于:https://www.cnblogs.com/ll-10/p/5502767.html

php 固话验证,收货地址参数校验:收货人、邮编、地址、手机、固话等

收货地址参数校验&#xff1a;收货人、邮编、地址、手机、固话等.收货人&#xff1a;function checkshr() {var shr $(#shr).val();if (shr.length < 0) {$(#shrmsg).show().html(\u6536\u8d27\u4eba\u4e0d\u80fd\u4e3a\u7a7a!);return false;}if (shr.length 14) {$(#shr…

php获取悉尼时间,php在使用澳大利亚/悉尼时区时给出错误答案

为什么它说5,为什么这在技术上是正确的在Sydney,DST开始于2013-10-06 02:00:00 – 所以你跨越那个日期会失去一个小时.当你调用strtime时,它会将时间解释为悉尼时间,但返回一个Unix时间戳.如果您将第二组时间戳转换为UTC,则会得到2013-09-30 14:00:00到2013-10-06 13:00:00的范…

动画---图形图像与动画(三)Animation效果的XML实现

使用XML来定义Tween Animation 动画的XML文件在工程中res/anim目录&#xff0c;这个文件必须包含一个根元素&#xff0c;可以使<alpha><scale> <translate> <rotate>插值元素或者是把上面的元素都放入<set>元素组中&#xff0c;默认情况下&#…

java怎么输出点,Java实现控制台输出两点间距离

计算两点之间的距离然后在控制台输出&#xff0c;这个题目还是挺简单的。下面我们来看看具体代码。package com.swift;import java.util.Scanner;public class PToP {public static void main(String[] args) {Scanner scannew Scanner(System.in);System.out.println("请…

bzoj 2905 背单词

Description 给定一张包含N个单词的表&#xff0c;每个单词有个价值W。要求从中选出一个子序列使得其中的每个单词是后一个单词的子串&#xff0c;最大化子序列中W的和。 Input 第一行一个整数TEST&#xff0c;表示数据组数。 接下来TEST组数据&#xff0c;每组数据第一行为一…

php的gd库处理大的图片,PHP的gd库处理图片

gd库为图片加文字水印和图片输出$number $result[certno];//设置水印内容$file ./Uploads/certs/ . $number . .jpg;if(!is_file($file)){$src ./template/public/img/zhengshu.jpg;//定义图片地址$info getimagesize($src);//获取图片信息$type image_type_to_extension(…

dedecms模版php,dedecms专题模板怎么用

dedecms专题模板怎么用&#xff1f;DeDeCms的专题相关信息bbs上相对较少&#xff0c;之前查阅了很多资料都未找到其解决方案推荐学习&#xff1a;织梦cms无柰只有靠自己动手丰衣足食&#xff1b;在官方的版本上有这样的一段话&#xff1a;1、文章列表用ID1,ID2,ID3这样形式分开…

Windows中断那些事儿

搞内核研究的经常对中断这个概念肯定不陌生&#xff0c;经常我们会接触很多与中断相关的术语&#xff0c;按照软件和硬件进行分类&#xff1a; 硬件CPU相关&#xff1a; IRQ、IDT、cli&sti 软件操作系统相关&#xff1a; APC、DPC、IRQL 一直以来对中断这一部分内容弄的一知…

php值对象模式场景,php设计模式介绍之值对象模式第1/5页

例如&#xff1a;通常用一个对象描述一个日期、一个数字或者货币。日期、整数或美元的类定义是都是便于使用的、快捷、便于封装的&#xff0c;并且方便进行拷贝&#xff0c;相互比较&#xff0c;甚至是创建。 从表面上看&#xff0c;这些描述简单的对象很容易被执行&#xff1a…

5月17日 AJAX 之 XML

主页面&#xff1a; <head> <script src"../jquery-2.2.3.min.js"></script> </head><body> <select id"sel"></select> </body> <script type"text/javascript"> $(document).ready(fun…