developer

Static linking vs dynamic linking

Question: ❓❓❓ Are there any compelling performance reasons to choose static linking over dynamic linking or vice versa in certain situations? I’ve heard or read the following, but I don’t know enough on the subject to vouch for its veracity. 1) The difference in runtime performance between static linking and Read more…

By admin, ago
developer

Best way to reverse a string

Question: ❓❓❓ I’ve just had to write a string reverse function in C# 2.0 (i.e. LINQ not available) and came up with this: public string Reverse(string text) { char[] cArray = text.ToCharArray(); string reverse = String.Empty; for (int i = cArray.Length - 1; i > -1; i--) { reverse += Read more…

By admin, ago
developer

HTTP vs HTTPS performance

Question: ❓❓❓ Are there any major differences in performance between http and https? I seem to recall reading that HTTPS can be a fifth as fast as HTTP. Is this valid with the current generation webservers/browsers? If so, are there any whitepapers to support it? Good Answer: 👌👌👌 There’s a Read more…

By admin, ago
developer

Convert Set to List without creating new List

Question: ❓❓❓ I am using this code to convert a Set to a List: Map<String, List> mainMap = new HashMap<String, List>(); for(int i=0; i<something.size(); i++){ Set set = getSet(...); //return different result each time List listOfNames = new ArrayList(set); mainMap.put(differentKeyName,listOfNames); } I want to avoid creating a new list in Read more…

By admin, ago