Difference between TCP and UDP?

TCP is a connection oriented stream over an IP network. It guarantees that all sent packets will reach the destination in the correct order. This imply the use of acknowledgement packets sent back to the sender, and automatic retransmission, causing additional delays and a general less efficient transmission than UDP. UDP is a connection-less protocol. … Read more

html – links without http protocol

The inclusion of the “http:” or “https:” part is partly just a matter of tradition, partly a matter of actually specifying the protocol. If it is defaulted, the protocol of the current page is used; e.g., //www.example.com becomes http://www.example.com or https://www.example.com depending on the URL of the referring page. If a web page is saved … Read more

Registering and using a custom java.net.URL protocol

Create a custom URLConnection implementation which performs the job in connect() method. public class CustomURLConnection extends URLConnection { protected CustomURLConnection(URL url) { super(url); } @Override public void connect() throws IOException { // Do your job here. As of now it merely prints “Connected!”. System.out.println(“Connected!”); } } Don’t forget to override and implement other methods like … Read more

Data URI scheme and Internet Explorer 9 Errors

Data URIs cannot be used for navigation, for scripting, or to populate frame or iframe elements in IE. According to http://msdn.microsoft.com/en-us/library/cc848897%28v=vs.85%29.aspx: Data URIs are supported only for the following elements and/or attributes. object (images only) img input type=image link CSS declarations that accept a URL, such as background, backgroundImage, and so on. Data URIs can … Read more

Swift protocol extension method is called instead of method implemented in subclass

This is just how protocols currently dispatch methods. A protocol witness table (see this WWDC talk for more info) is used in order to dynamically dispatch to implementations of protocol requirements upon being called on a protocol-typed instance. All it is, is really just a listing of the function implementations to call for each requirement … Read more