10 2020 档案
摘要:if (clientSocket.Connected) { }
阅读全文
摘要:private void richTextBox2_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\r') { // button2.Focus(); button1_Click(sender, e); } if (
阅读全文
摘要:阻塞模式 Windows套接字在阻塞和非阻塞两种模式下执行I/O操作。在阻塞模式下,在I/O操作完成前,执行的操作函数一直等候而不会立即返回,该函数所在的线程会阻塞在这里。相反,在非阻塞模式下,套接字函数会立即返回,而不管I/O是否完成,该函数所在的线程会继续运行。 在阻塞模式的套接字上,调用任何一
阅读全文
摘要:在keypress事件中 private void richTextBox2_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\r') { textbox.Focus(); } if (e.KeyChar == Sys
阅读全文
摘要:Environment.Exit(0)//可以退出单独开启的线程
阅读全文
摘要:Application.ExitThread();//释放所有线程
阅读全文
摘要:DialogResult result = MessageBox.Show("你将删除账号中所有的课程信息,删除后将不可恢复,是否继续删除?", "确认删除", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (result == D
阅读全文
摘要:返回用来收发数据的套接字 private Socket getSocket(string ip, int p) { Socket socketclient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType
阅读全文
摘要:public string GetLocalIp() { ///获取本地的IP地址 string AddressIP = string.Empty; foreach (IPAddress _IPAddress in Dns.GetHostEntry(Dns.GetHostName()).Addres
阅读全文
摘要:Convert.ToInt32("123");
阅读全文
摘要:class Deque { constructor() { this.count = 0; this.lowestCount = 0; this.items = {}; } addFront(element) { if (this.isEmpty()) { this.addBack(element)
阅读全文
摘要:客户端 import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; public class Client { public static v
阅读全文
摘要:class Queue { constructor() { this.count = 0; this.lowestCount = 0; this.items = {}; } enqueue(element) { this.items[this.count] = element; this.count
阅读全文
摘要:class Stack { constructor() { this.count = 0; this.items = {}; } push(element) { this.items[this.count] = element; this.count++; } pop() { if (this.is
阅读全文
摘要:class StackArray { constructor() { this.items = []; } push(element) { this.items.push(element); } pop() { return this.items.pop(); } peek() { return t
阅读全文
摘要:<body> <input type="text"> <button>发送</button> </body> <script> var sent = document.querySelector('button'); var search = document.querySelector('inpu
阅读全文
摘要:<body> <div></div> <script> var div = document.querySelector('div'); retNowTime(); setInterval(retNowTime, 1000); function retNowTime() { var date = n
阅读全文

浙公网安备 33010602011771号