background preloader

Clever Algorithms: Nature-Inspired Programming Recipes

Clever Algorithms: Nature-Inspired Programming Recipes

Practical Money Saving Tips - Best Time to Buy Airline Tickets and More at WomansDay.com Extreme bargain hunters have something in common: timing. No matter what they’re trying to save on, they’ve got it down to a science, knowing specific days (and even the exact time of day) when a bargain is at its best. Want to save thousands? Hotel Rooms Best time to book a room? 1. 2. 3. 4. Air Travel There’s nothing more confusing and frustrating than buying plane tickets. The perfect time to shop for a cheap airfare is 3 p.m. When are the cheapest days and times to fly? Groceries Most markets don’t view Sunday or even Monday as the start of the week. However, not all stores follow this rule, so to find out your store’s “bargain personality,” ask the produce and meat managers exactly when they do their markdowns. “My store marks down produce every day at 7 a.m., so if I shop before 9 a.m. Electronics Dinner Out You’ll save a bundle if you go on a Tuesday, says Mark Di Vincenzo, author of Buy Ketchup in May and Fly at Noon: A Guide to the Best Time to Buy This, Do That and Go There. Cars

What is ClearDB? ClearDB is a faster, stronger, safer and more reliable way to get data to your applications, no matter where you (or your apps) are in the world. Global Architecture ClearDB is designed from the ground up around the premise of failure in order to provide true high availability and low latency performance to your MySQL powered applications. Scheduled Backups Your database is backed up in multiple regions and in multiple time zones to ensure that your data is available. Advanced Security Whether your data is in your database, on the wire, or in a backup, it's encrypted to keep it safe and secure. Always-On Monitoring Our team monitors your database 24 hours a day, 7 days a week to make sure that it's always available, secure and performant. Simple, Effective Tools Our graphical tools enable you to easily perform quick analysis on important database statistics. Easy Management API Wire & Disk Security Replicas Everywhere ClearDB is Right Next Door

Byte-saving Techniques - GitHub Byte-saving Techniques This is a collection of JavaScript wizardry that can shave bytes off of your code. It's mainly intended as a reference for those creating entries for 140byt.es. Feel free to add your own or send any feedback to @140bytes. Disclaimer Outside of the 140bytes challenge or other code golf challenges, please be considerate and don’t pre-minify code you wish to share with others. Arguments Use one-letter positional arguments, in alphabetical order Since arguments will need to be as short as possible, and will likely be reused within their lifetime, it's best to treat them as positionals instead of trying to give them meaning through their name. function(t,d,v,i,f){...} // beforefunction(a,b,c,d,e){...} // after Test argument presence instead of length Use in to check whether a given argument was passed arguments.length>1||(cb=alert) // before1 in arguments||(cb=alert) // after If only truthy arguments are of interest, you can even boil that down to Variables Exploit coercion Loops

Sorting Algorithm Animations Algorithms in Java, Parts 1-4, 3rd edition by Robert Sedgewick. Addison Wesley, 2003. Quicksort is Optimal by Robert Sedgewick and Jon Bentley, Knuthfest, Stanford University, January, 2002. Dual Pivot Quicksort: Code by Discussion. Bubble-sort with Hungarian (“Csángó”) folk dance YouTube video, created at Sapientia University, Tirgu Mures (Marosvásárhely), Romania. Select-sort with Gypsy folk dance YouTube video, created at Sapientia University, Tirgu Mures (Marosvásárhely), Romania. Sorting Out Sorting, Ronald M. Geek Genius: How To Get The Latest Gadgets Without Breaking The Bank photo: Harshit Sekhon Tired of spending big bucks every time Apple (AAPL) releases a new version of your go-to gadget? (Hint: this happens every year). Here are five ways to find discounts on all the gadgets you want: RedLaser Bargain hunters swear by RedLaser, a free application for iPhone and Android phones that scans item bar codes to find the merchant that sells it at the lowest price. ChinaBuye Where can you get a laptop for under $100? NexTag You’ve probably heard of NexTag, a price comparison site that now boasts 30 million users. Games Tester Loan Processing Specialist Sarah Horton knows a thing or two about saving money. Property Room Between drug busts and other police seizures, a whole lot of ownerless, high-ticket items end up in police custody. Shane Snow is Editor-in-chief of Contently.com, which contributed this post exclusively for Mint.

How to Use the System Tray (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other Swing Features) The system tray is a specialized area of the desktop where users can access currently running programs. This area may be referred to differently on various operating systems. On Microsoft Windows, the system tray is referred to as the Taskbar Status Area, while on the GNU Network Object Model Environment (GNOME) Desktop it is referred to as the Notification Area. The java.awt.SystemTray class introduced in Java™ SE version 6 represents the system tray for a desktop. An application cannot create an instance of the SystemTray class. The system tray contains one or more tray icons which are added to the tray using the add(java.awt.TrayIcon) method. Note: The add() method can throw an AWTException if the operating system or the Java runtime determines that the icon cannot be added to the system tray. The TrayIcon class functionality goes beyond the icon that is displayed in the tray. Try this:Place the bulb.gif image file in the image directory. ... The SystemTray API The TrayIcon API

7 Habits of Highly Effective Programmers As a software engineer, you might want any number of things out of your job - a steady paycheck, the opportunity to work on interesting projects, a springboard to the next better job, or maybe you just like hanging out with other programmers. But by "effective", I mean the ability to complete projects in a timely manner with the expected quality. After working on dozens of software releases, I believe the following practices will bring you there, and while they may involve sticking your neck out, I'd like to think they will also advance your professional reputation, career longevity, and personal satisfaction. Understand Your Requirements The first step in becoming an effective programmer is to ensure that you are spending your time wisely. Build Early Get a demonstrable system working as early as possible. There is a classical school of thought that believes if you design everything up front, then all you have to do is write the code and you're done. Deliver Often Keep It Real Merge Often

Recommended books and sites - strchr.com Please add links to your favorite programming books with a short description. The goal is to make a minimal reading list to become a good programmer. Feel free to discuss the listed books and propose better alternatives. Algorithms Introduction to computer programming using LOGO language (free e-book). Math algorithms and optimization Numerical Recipes in C (free e-book). Compression and encryption Everything you need to know about cryptography in 1 hour (slides in PDF format). Text processing String-Matching Algorithms (free e-book): Boyer-Moore, Knuth-Morris-Pratt, and alike. Compilers and Languages Basics of Compiler Design by Torben Æ. The Development of the C Language by Dennis M. Functional programming Can Your Programming Language Do This by Joel Spolsky (article). Operating Systems Operating Systems, Fourth Edition by William Stallings (printed book). Computer architecture Computer Systems: A Programmer's Perspective by Randal Bryant and David O'Hallaron (printed book). Usability

Johnny Chung Lee - Projects - Wii As of June 2008, Nintendo has sold nearly 30 million Wii game consoles. This significantly exceeds the number of Tablet PCs in use today according to even the most generous estimates of Tablet PC sales. This makes the Wii Remote one of the most common computer input devices in the world. It also happens to be one of the most sophisticated. Any software on this page is primarily meant for developers and may not run without proper the development tools installed. NOTE: For most of these projects, you don't need the Nintendo Wii console. Coming Later: 3D tracking, and more.... Unfortunately, time constraints in the next couple of months have significantly reduced my ability to work on more projects.

Java Programming Cheatsheet This appendix summarizes the most commonly-used Java language features in the textbook. Here are the APIs of the most common libraries. Hello, World. Editing, compiling, and executing. Built-in data types. Declaration and assignment statements. Integers. Floating-point numbers. Booleans. Comparison operators. Printing. Parsing command-line arguments. Math library. The full java.lang.Math API. Java library calls. Type conversion. Anatomy of an if statement. If and if-else statements. Nested if-else statement. Anatomy of a while loop. Anatomy of a for loop. Loops. Break statement. Do-while loop. Switch statement. Arrays. Inline array initialization. Typical array-processing code. Two-dimensional arrays. Inline initialization. Our standard output library. The full StdOut API. Our standard input library. The full StdIn API. Our standard drawing library. The full StdDraw API. Our standard audio library. The full StdAudio API. Command line. Redirection and piping. Functions. Libraries of functions. Our standard random library.

Teach yourself to program We are entering the summer, the perfect time to improve yourself, you could go running or swimming, you could learn a new foreign language or perhaps you could learn to program. Self-learning is not as hard as it sounds, and it’s much easier than self-learning Spanish or French. There are really wonderful sources to start learning these new languages, understanding the concept behind programming and giving it a try with some interesting problems. Basic Programming Via XKCD To learn a new programming language, it’s much easier if you already know the concepts because you can start learning the new structures in no time. Programming Concepts : This is a brief tutorial for new programmers from the City University of New York. Learning a Language Whether you already know some programming languages or you are moving forward, you should choose a language to work with. Learning HTML Via Cyanide and Happiness HTML is quite a simple language that doesn't use variables or operations. Learning Python

Stanford CS Ed Library

Related: