Tỗi đã từng sai, và sự trả giá đó nằm ở hiện tại. Không thể ngờ là nó đã xảy ra trong vài năm nay thôi, và nhận thức đã rất khác.Mỗi lần nghĩ về nó lại cảm thấy bản thân thật ngu ngốc, dại dột và thật sự xấu hổ về nó. Rồi ngày… Continue reading 4/23/2017

Network connection

Client and server applications communicate over a Socket connection. A Socket represents a connection between two applications which may (or may not) be running on two different physical machines. A client must know the IP address (or domain name) and TCP port number of the server application. A TCP port is a 16-bit unsigned number… Continue reading Network connection

Format String

%d : decimal. Ex: format(“%d”,42); %f: floating point. Ex: format(“%.3f”,42.000); %x: hexadecimal. Ex: format(“%x”,42); %c: character. Ex: format(“%c”,42); Date and time: Key Calendar methods: add(int field, int amount): add and subtracts time  from calendar’s field. get(int field): return the value of the given calendar’s field. getInstance(): return a Calendar, you can specify a locale. getTimeInMillis():… Continue reading Format String

Common status code

• 200 OK: Request succeeded and the information is returned in the response. • 301 Moved Permanently: Requested object has been permanently moved; the new URL is specified in Location: header of the response message. The client software will automatically retrieve the new URL. • 400 Bad Request: This is a generic error code indicating… Continue reading Common status code

Computer network Top Down approach 1.1.2

We can also describe the Internet from an entirely different angle—namely, as an infrastructure that provides services to applications. These applications include electronic mail, Web surfing, social networks, instant messaging, Voiceover-IP (VoIP), video streaming, distributed games, peer-to-peer (P2P) file sharing, television over the Internet, remote login, and much, much more. The applications are said to be distributed applications,… Continue reading Computer network Top Down approach 1.1.2