These pages had been posted on StackOverflow a few years ago. They contain great collections of “hidden features” of various languages and even of a few tools.
Here is my (quickly thrown together) simple implementation of the quick-find algorithm. For more information on the algorithm and the Disjoint-set data structure (quick-find performs some useful operations on this type of data structure) check out the Wikipedia page on Disjoint-set data structure here.
Although most internet users nowadays have very fast connections it is still important to optimize your web application’s assets to ensure optimal performance. This is especially the case for mobile users, which have more constrained resources (data connections and hardware resources). There are a number of things you can do but I’lll highlight just a few that I believe are important to think about.
Cross-Site Scripting (XSS) isn’t necessarily an actual “cross-site” attack, instead its essentially an insertion of client-side script code placed strategically such that users will execute them. This is possible when output from the website isn’t properly escaped, thereby allowing extra code to be added.
A simple method to protect your web application against CSRF (cross-site request forgery) attacks is to generate and validate a unique token of some sort. This can help to prevent automated CSRF attacks. Basically, you will generate a unique token for the user, place it on the page, and then check the token to verify that its valid. You could implement this in just about any server side language, but here is a PHP example.
In developing for the Android platform, one of the most important concepts to understand is the Activity Lifecycle. This is important because applications behave much differently on Android when compared to traditional platforms, such as Windows, OS X, or Linux. With Android you have less control over the lifetime of an application.
If your windows machine is stuck with a low resolution and you wish you had a higher resolution screen you might want to try out this registry hack. This is a way to “fake” a higher resolution in Windows by lowering the DPI. This method is done by modifying values in the registry because by default Windows won’t let you set it this low.
- Open the Start Menu and click Run
- Type in regedit and press enter
- Navigate to: HKEY_CURRENT_CONFIG --> Software --> Fonts
- On the right-side from the tree, choose LogPixels and then in the main screen modify it's decimal value to whatever DPI value you'd like, however don't go lower than 85 in most cases (In the Windows Custom DPI settings screen, the default lowest is 96)
- Log off and log back on or just restart your machine
Application State The application state’s purpose is primarily to store data for all variables in an ASP.NET application.The class used to store this data is the HttpApplication class, which can be accessed via the ‘Code Behind’ file. The data held within this class is available to all pages in the app and for all entities accessing the app. However, there is a method to lock certain peices of data to only allow certain users access to it.