If you like computer history, cake.co has an interesting article by Chris MacAskill titled, The secret call to Andy Grove that may have helped Apple buy NeXT.
This is a little Perl script I wrote to parse a CSV file I periodically download from Google AdSense. It does the following things:
This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 10.12, “Using Iterators with Scala Collection Classes”
You want (or need) to work with an iterator in a Scala application.
Perl next loop FAQ: Can you demonstrate how to use the Perl
next operator in a
Problem: You're writing code for a Perl loop, and you need to write some logic to skip over the current element in the loop, and move on to the next loop element.
Perl loop break FAQ: How do I break out of a Perl loop?
Problem: You're writing some Perl loop code (for, foreach, or while), and you have a condition where you need to break out of your loop early, and you quickly find out that Perl doesn't have a 'break' operator.
The Perl "break" statement
In many programming languages you use the break operator to break out of a loop like this, but in Perl you use the
last operator to break out of a loop, like this:
Answer: Yes, there is a nice (and free) little program named Sizzling Keys that lets you control iTunes even when iTunes is minimized, hidden, or being displayed in another Space in the Mac OS X operating system. Just download and install Sizzling Keys, and select the key combinations you want to use to control iTunes.
Here's a quick list of the most common vi and vim editor navigation commands I use every day.
Moving on the current line
Here are the most common navigation commands for moving around the current line:
Problem: You have an array of elements, and you need to process every element in the array, except the elements that match a given regular expression (pattern).
Solution: You can solve this problem using a combination of the Perl regular expression pattern matching, along with the