
Perfect Hashing A better way to do perfect hashing for large sets is by Botelho and Ziviani. I don't know if it can be as fast as this, but it scales way better. Their trick: instead of constructing the whole perfect hash function at once, use a normal hash h(key) to split the 200 zillion keys into a zillion buckets with about 200 keys each. For each bucket, use something like the code below to construct a perfect hash function that maps the n keys in that bucket to 0..n-1 uniquely, where n is about 200. Perfect hashing guarantees that you get no collisions at all. C code and a sanity test Here is my C code for minimal perfect hashing, plus a test case. The generator is run like so, "perfect -nm < samperf.txt", and it produces the C files phash.h and phash.c. Usage There are options (taken by both perfect and the sanity test): perfect [-{NnIiHhDdAa}{MmPp}{FfSs}] < key.txt Only one of NnIiHhAa may be specified. N,n Normal mode, key is any string string (default). I,i H,h ffffffff D,d Decimal. A,a aaaaaaaa bbbbbbbb
Pricing and Quotas on RdbHost The Rdbhost service is demand-priced. What you pay depends on how much you use. We offer a limited free usage per hour, and charge for usage above that level. Paid usage must be prepaid. Remember, these are full-fledged SQL databases, not just raw space and bandwidth. Startup Period The above quota limits (and, consequently, the charges) are waived entirely for the first two weeks of each account. Enforcement The bandwidth and request quotas get reset at the top of the hour. Email notifications are sent, to the email address on record, whenever accounts are temporarily disabled for exceeding quota. Adding Credit If you wish to add credit to your account,visit the Add Credit page. During the beta-test period, we offer a 'paid beta' membership, providing you much more than a dollars worth of usage for each dollar spent. If you wish to monitor how much usage your account is getting, visit the Usage Report page.
evil c This is a collection of strange C (and some Java) constructs. It's probably best not to use them, but you should know why they work. The cast-to-bool operator Node *left, *right; int childCount() { return !! Logical XOR A variation on the above. int xor(int a, int b) { return ! The "goes toward" operator void doStuff(int count) { while(count --> 0) fleh(); } Useless but pretty definitions of BOOLs #define TRUE '/'/'/' #define FALSE '-'-'-' Two (2) readers wrote in to comment that the above is unsafe due to operator precedence. Yes. That is true. If you are doing arithmetic with the above, please seek help. Optimization, the Microsoft way This was found in the 2004 leaked Windows sources __inline BOOL SearchOneDirectory( IN LPSTR Directory, IN LPSTR FileToFind, IN LPSTR SourceFullName, IN LPSTR SourceFilePart, OUT PBOOL FoundInTree ) { // // This was way too slow. The canonical temp-less swap a^=b^=a^=b; Duff's Device for loop unrolling Struct/class offsets int ofs = (int)&((Class*)0)->element; snoob
.:: General Purpose Hash Function Algorithms - By Arash Partow ::. Introduction Hash functions are by definition and implementation generally regarded as Pseudo Random Number Generators (PRNG). From this generalization it can be assumed that the performance of hash functions and comparisons between other hash functions can be determined by modeling the functions as PRNGs. Analysis techniques such a Poisson distribution can be used to analyze the collision rates of different hash functions for different groups of data. In reality it is very difficult to find a perfect hash function for an arbitrary set of data, and furthermore the practical applications of perfect hashing and its variant minimal perfect hashing are quite limited. Data Distribution This is the measure of how well the hash function distributes the hash values of elements within a set of data. In the following diagram there are five unique messages to be hashed (M0,...,M4) and inserted into a hash-table. Hash Function Efficiency Hashing Methodologies Bitwise Operations: Not (!) Bit Biases
TIOBE Software: Tiobe Index TIOBE Index for January 2016 January Headline: Java is TIOBE's Programming Language of 2015! Java has won the TIOBE Index programming language award of the year. Java's rise goes hand in hand with Objective-C's decline (-5.88%). So what is the outlook for 2016? The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index can be used to check whether your programming skills are still up to date or to make a strategic decision about what programming language should be adopted when starting to build a new software system. TIOBE Programming Community IndexSource: www.tiobe.com Java Python Visual Basic .NET JavaScript Assembly language Ruby Other programming languages The complete top 50 of programming languages is listed below. The Next 50 Programming Languages The following list of languages denotes #51 to #100. This Month's Changes in the Index This month the following changes have been made to the definition of the index: Very Long Term History
How to Pick a Language How do you pick a programming language, to learn or to use for a project? This article probably overlaps a lot with what others have already said on this topic . But I try to add a categorization of programming languages that reflects the way they are discussed on blogs and discussion sites. I think these categories are often implicit in discussions on the programming sub-reddit, Hacker News, or Lambda the Ultimate, but never made explicit for the benefit of younger developers. Each section describes languages in a category, how they are similar, and what distinguishes them from each other, along with a little history. Let me know if these categories make sense to you, or what you think a better categorization might be. 1. C appears often on lists of languages every programmer should know. A common answer to the question “When should I use C?” My answer would be “When you need more control than your current programming language gives you.” Pick one of the Cs if: Pick C if: Pick C++ if: 2.
Eternally Confuzzled - The Art of Hashing By Julienne WalkerLicense: Public Domain In Binary Search Trees I, II, and III, we considered methods for efficient searching of an ordered collection by using key comparisons. While these methods were indeed very fast, they were limited to O(log N) performance due to the comparison tree inherent in the data structure. Binary search trees are also somewhat complicated, especially when the chance of encountering a degenerate tree is minimized, or removed entirely. An alternative method for searching uses they key itself an an address into the data structure, thus breaking the O(log N) barrier and allowing searches to be performed with an expected time complexity of O(1), which is as good as it gets when it comes to searching, and algorithms in general. Unfortunately, not all keys are easily used as a table address. The simplest case when it comes to converting a key into a table address is when you have an integer key. 1 unsigned index = key % N; Uses for hashing Pigeonhole Principle XOR hash
PowerShell Tutorials PowerShell Tutorial for beginners. Windows PowerShell instruction thought-out for those new to PowerShell. In the next few weeks I will be posting a series of PowerShell basics that will provide a good start for a solid foundation. Here is what I have slated: The Windows PowerShell Console – Configuration and Customization.PowerShell Basics - Cmdlets, Parameters, Command Types, Command Information, etc…Output using the PowerShell Format command.Engaging the Windows File System.WMI and .NET primer (real basic)Variables in PowerShellTaking what you have learned and applying it. The initial lessons are concentrated around PowerShell as a Command Shell. Enjoy the Tutorials! Email This Page To A Friend
FFTW Home Page Timer Hash Design, Performance, and Optimization of Timer Strategies for Real-time ORBs Darrell Brunsch, and Douglas C. Schmidt brunsch@cs.wustl.edu, schmidt@cs.wustl.eduDepartment of Computer ScienceWashington University,St Louis, MO 63130, (TEL) (314) 935-4502 (FAX) (314) 935-7302 Abstract Real-time ORBs and their applications require predictable, efficient, and flexible timer support. This paper makes several contributions to the design and optimization of real-time Timer strategies. 1. Timer strategies play an integral role in real-time systems. The paper is organized as follows: Section 2 outlines the algorithmic differences between the different implementations of Timer strategies; Section 3 discusses the design challenges of integrating these solutions into a framework for real-time ORBs; Section 4 compares the performance of each strategy; Section 5 compares our results to related work; and Section 6 presents concluding remarks. 2. 2.1. 2.2. 3. 4. 5. Dr. 6.
exercism.io Exercism is all about having conversations about code. In order to start having those conversations, you need to install the exercism command line client. The exercism command line client is the all-in-one tool for fetching and submitting code. Let's get started. Software development is an activity that should not be performed in isolation. Exercism provides a launching point for this to occur. You fetch some challenges in the form of README documents. By repeating this process you will: Share while discussing how YOU solved the problem Learn from others as you discover how they solved the same problem Gain experience through repeated practice solving problems Don't be shy - start right now Begin by installing the exercism CLI (Command-Line Interface) tool. With the CLI installed, configure it using the configure command. Fetch your first problem by choosing a language from the languages tab above.
30+ Helpful Cheat Sheets for Programmers and Developers In the computing world, developing something great needs a clever programming skill. And unfortunately, it isn’t an easy task. You could stick anywhere while writing code. It becomes even worse when you are writing thousands lines of codes. A single semicolon misplace can cause hundreds of errors. Moreover, a developer needs to have knowledge about the basics and in-built functions of programming languages. We have gathered a few functions, variable, types, methods, tutorials for various programming languages that will help you in your next project and grab the basic knowledge on each language. The images are only representing a small part of Cheat sheets 3. 4. 5. 6. jQuery 7. 8. 10. 11. 12. 14. 15. 16. 17. 18. 19. 20. 21. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 34. Recommended: 25+ Cheat Sheets of Popular Programming Languages