readera193 / python Goto Github PK
View Code? Open in Web Editor NEWtkinter 小遊戲、爬蟲
tkinter 小遊戲、爬蟲
調整項目:
上傳Receiving 4 Integers
上傳檔案
新增指令"/QUIT",離開聊天室
新增指令
新增姓名後可以正常通話
說話時把名字+訊息發送到所有client
import * 會讓 spyder 無法自動辨識函式名稱
問題:
原因:
調整項目:
1.原ch02_udp_local重命名為banana
2.上傳老師的ch02_udp_local
MergeSort.py
上傳:
新增聊天顯示姓名
收到對方的訊息時,訊息前方顯示姓名
問題:
client端送出oo後,server端沒有except處理ConnectionResetError
調整項目:
調整項目:
上傳GET_File
更改SOCKS結構,sock=>username
改為username=>sock
新增常數ERROR_MSG
,儲存錯誤指令說明訊息
為傳送ERROR_MSG
,BUFSIZE
增加為150
serverThread
新增屬性username
,儲存使用者名稱,簡化程式碼
提出設定使用者名稱的程式碼,寫成函式setUsername()
,讓流程更清楚
BUG修復:原本可以設定已存在的使用者名稱造成錯誤,在setUsername()
增加判斷函式
提出/quit的程式碼,未來"使用者非使用指令離開/意外斷線時"可呼叫
新增:當使用者連線成功時提醒使用者設定username
上傳"ch04_www_connect.py"
建立網際網路協定課程的repo
上傳考試答案
上傳模擬考三個檔案(client端)
將網際網路協定相關程式碼整理進資料夾
上傳
問題:
QUIT指令後面有參數時,會導致client的sendThread
進入無窮迴圈
原因:
沒有檢查QUIT參數數量
調整項目:
指令為QUIT且不帶參數才執行userQuit()
問題:
使用者^C退出時,server丟出ConnectionResetError,顯示"遠端主機已強制關閉一個現存的連線"
原因:
使用者強制關閉時,sock會斷開連接
調整項目:
使用try-except,收到ConnectionResetError時呼叫userQuit()
調整項目:
調整項目:
結合Chat_room與ch04_www_connect功能,檔名Chat_room_auto
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.