This is a page from my book, Functional Programming, Simplified

A Quick Review of Scala’s ‘for’ Expressions

“The owls are not what they seem.”

The “Log Lady” in Twin Peaks


The goal of this lesson is to review at a high level how for loops work in Scala. This is necessary because Scala/FP developers take advantage of advanced Scala for loop features.

As an example of what I mean, the goal of the next few lessons is to explain what’s happening in this for loop:

A JavaMail POP reader example (pop3 reader)

While working on a Java application, I found the need for a simple Java mailbox reader. I wanted to be able to scan through one of my POP/POP3 mailboxes for messages, and then do something with those messages.

To that end I created the following example JavaMail POP mailbox reader. It connects to a standard POP/POP3 mailbox, then scans through all the messages in the "Inbox" folder.

Search a JavaMail mailbox for unseen messages alvin November 10, 2011 - 11:52am

While working on a Java application yesterday, I ran into a situation where I needed to search my POP3 mailbox for unseen messages, i.e., email messages I haven't read yet. (I'm adding some "You've got mail" functionality to one of my automated robots.)

Jumping right to the solution, here's the complete source code for a JavaMail example class that demonstrates how to search for unseen (unread) email messages in a POP/POP3 mailbox:

Perl array push and pop syntax and examples

Perl array push pop FAQ: How do I push elements onto a Perl array, and how do I pop element off a Perl array? (Or, What is the Perl push and pop syntax?)

I really like the Perl push (and Perl pop) syntax. The push function makes adding elements to a Perl array very easy, and the pop function also makes a Perl array work a lot like a stack.

Toyota RAV4 steering column klunking noise - an epidemic?

Summary: The Toyota RAV, 2006 model and newer, have become famous for a steering column klunking sound. Toyota then saddles the RAV4 owner with an $800 repair bill.

The question is, why isn't there a Toyota recall on this steering column klunking sound problem?

Java mail IMAP list example - List all the email addresses in an IMAP mailbox

Java Mail (JavaMail) IMAP FAQ: Can you show me how to get a list of all the email addresses in an IMAP mailbox using the Java Mail API (JavaMail API)?

Sure. Here's the source code for a Java mail (JavaMail) program that extracts all of the "from" fields out of a specified mailbox. This works for both POP3 and IMAP mailboxes.

Before going to the code, note the cool use of a TreeSet (java.util.TreeSet) in this example. Based on our offline discussion, you mentioned that you really want is this: