Posts by JCKödel • 549 points
9 posts
-
6
votes4
answers28968
viewsA: What is the most appropriate way to concatenate strings?
When in doubt, test... Times obtained with the code below (is a Tosko benchmark and varies according to the number of iterations, but you can get an idea): Testing Testarsoma... 37,076 ms Testing…
-
7
votes6
answers17915
viewsA: How to make a phonetic algorithm for Brazilian Portuguese?
One way to perform phonetic search (which is the same as used by SQL Server in the SOUNDEX function) is to assign numbers to the phonetic sets of the word. Ex.: No SQL (which has phonetic search in…
-
4
votes1
answer485
viewsA: How to do Signalr load test?
I would take a library from websocket client (ex.: https://github.com/kerryjiang/SuperWebSocket) and do the test manually. It is important to remember that the machine that makes the request cannot…
-
6
votes3
answers6240
viewsA: What would be the best way to make a CRUD for a framework in the most generic way possible?
Why don’t you take a look at Petapoco (http://www.toptensoftware.com/petapoco/)? It is based on the framework used here in Stackoverflow and has Insert(Object) methods that insert the object…
-
4
votes1
answer130
viewsA: How to document in code a hack, Hotfix and any potentially problematic outline situation
In my view this depends very much on the IDE used. Visual Studio, for example, marks comments as //TODO: and //HACK: on a Toolbox for easy identification and localization. Plugins like Resharper…
-
4
votes4
answers1141
viewsA: How to simulate "tail recursion" in C#?
This type of optimization is present only in 64-bit JIT in Release mode. Test your x64 code in Release mode and Stackoverflow will no longer occur. And of course, never trust a JIT optimization. You…
-
0
votes3
answers5030
viewsA: Keep zero after comma using the float type?
Short answer: never use float ;-) Long answer: float is not able to keep the number exactly as you describe it. Try this on the Chrome console, for example: 0.1 * 0.2 The answer will be…
-
4
votes8
answers48548
viewsA: How to pass parameters in function calls by reference in Javascript?
There is no reference passage in Javascript, but you can encapsulate this in an object (which is always passed by reference, since only the object pointer is passed in reality). Ex.: function…
-
6
votes2
answers505
viewsA: Is it possible to program using the Winrt API without resorting to XAML?
WPF has nothing to do with HTML! It is possible to use WPF without XAML (XAML is actually always translated to C#). It’s as simple as Windows Forms: E.g.: Let’s assume I want to make a page (not to…