Tuesday, February 17, 2009

Eurasian Coot - Blässhuhn

The Eurasian Coot (Blässhuhn) is mostly black with a white beak and "forehead shield". If you hear someone say "bald as a coot" they're referring to that shield. They have very unique foot webbing and beautiful red eyes. Coot are also referred to as water chickens. Click on the images below for higher resolution versions.








See also: Mandarin Duck - Mandarinente

Submit Photos to Shutterstock and make $$$!


Friday, February 13, 2009

Crayon Physics Deluxe



The object of this game is to make the red ball touch the star by drawing objects and trying to get physics to work in your favor. The objects in the game follow the laws of gravity, kinetic energy, and momentum, etc. and you have to cleverly draw your way to the solution!

Number Patterns



Monday, February 9, 2009

Add an HTML Footer to Every Post of Your Blogger Blog

Have you ever wanted to add some text or a link to the end of every post of your Blogger blog? If you're reading this, I'm assuming you do, and I'll be showing you exactly how to accomplish that. If you are like me, you might have thought it would have been quite easy using the Page Elements tool in Blogger to add the footer to every blog post, but it turns out it's not possible. The trick is to edit the blog template instead and add the desired text or HTML code to the correct location. Here's how...



Step 1: Log into Blogger and go to the Layout tab and click the "Edit HTML" sub-tab.


Step 2: Backup your template. Click "Download Full Template" and save it somewhere on your hard drive in case you ever royally mess up your template and need to start over fresh with a known-to-function template.


Step 3: Click the "Edit Template Widgets" check box. This lets you see all the template code you'll be adding your HTML code to.


Step 4: Search for "data:post.body" in the template using your browser. That bit of text signifies the end of the body of a post in your template. You'll be putting your HTML code directly after that.


Step 5: Add your HTML code right after that line. In my case, I wanted to add a link for people to be able to subscribe to my RSS feed. I added two single line breaks, my link, and another line break. The em tags make the link italicized.


Step 6: Click "Preview" and make sure it worked as expected. When you're satisfied with your footer and there are no HTML errors click "Save Template".

Piece of Cake!!

See also: How to Add an Amazon Widget to Your Blog to Make Some Extra Cash

Thursday, February 5, 2009

An error occurred while trying to save your photo library

An error occurred on my MacBook running Mac OS X 10.5 Leopard the other day while I was importing pictures into iPhoto. About halfway through the image import, a dialog box popped up saying "An error occurred while trying to save your photo library. Some recent changes may be lost. Make sure your hard disk has enough space and that iPhoto is able to access the iPhoto Library."
My disk definitely wasn't full because I just upgraded the hard drive to 500GB following the instructions found here: 500GB MacBook Harddrive Upgrade for Under $100. In fact I checked just to make sure and there was still 285 GB of free space. I was worried that my iPhoto library was messed up despite not doing anything unordinary. A day later I got another system error when adding some other files to a folder in my home folder. It dawned on me then that there might be perhaps some upper limit per user account, and I might have reached it.

Solution: While the HD still had plenty of room, the user account had reached some limit set by the operating system. I created a new folder on the root directory of the HD and transferred several large files out of my home account into the new folder thereby freeing up space for the photos I wanted to import into iPhoto. Another solution would be to somehow change the allotted HD space per user account. Maybe it has something to do with FileVault as well??

Tuesday, February 3, 2009

Greylag Goose - Graugans

The GreyLag Goose (Graugans) is a fun bird to observe due to its boisterously verbal and animated social behavior. The most distinct feature of these birds in my opinion is their rivuletted neck feathers. These photos were taken in the heart of Munich in the English Garden. Click on the images below for higher resolution versions.

A regal pair.



"Rivuletted" neck feathers

Incoming with landing gear deployed!

Touchdown.

Bath time.

Rinsing off.

Drying off.

"Hey, you're entering my territory!"

"I warned you!"

Gosling


See also: Eurasian Coot - Blässhuhn


Submit Photos to Shutterstock and make $$$!


Wednesday, January 28, 2009

Iterating through a Collection in Java

There are three common ways to iterate through a Collection in Java using either while(), for() or for-each(). While each technique will produce more or less the same results, the for-each construct is the most elegant and easy to read and write. It doesn't require an Iterator and is thus more compact and probably more efficient. It is only available since Java 5 so you can't use it if you are restrained to Java 1.4 or earlier. Following, the three common methods for iterating through a Collection are presented, first using a while loop, then a for loop, and finally a for-each loop. The Collection in this example is a simple ArrayList of Strings.



While
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class WhileIteration {

public static void main(String[] args) {

Collection<String> collection = new ArrayList<String>();

collection.add("zero");
collection.add("one");
collection.add("two");

Iterator iterator = collection.iterator();

// while loop
while (iterator.hasNext()) {
System.out.println("value= " + iterator.next());
}
}
}




For
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class ForIteration {

public static void main(String[] args) {

Collection<String> collection = new ArrayList<String>();

collection.add("zero");
collection.add("one");
collection.add("two");

// for loop
for (Iterator<String> iterator = collection.iterator(); iterator.hasNext();) {
System.out.println("value= " + iterator.next());
}
}
}



For-Each
import java.util.ArrayList;
import java.util.Collection;

public class ForEachInteration {

public static void main(String[] args) {

Collection<String> collection = new ArrayList<String>();

collection.add("zero");
collection.add("one");
collection.add("two");

// for-each loop
for (String s : collection) {
System.out.println("value= " + s);
}
}
}


The result for each method should look like this:
value= zero
value= one
value= two


Friday, January 9, 2009

Ten German Birds

Moving to a new country opens up the opportunity to see and photograph many new things, in this case new birds in Germany. The following pictures were taken with a Canon 40D DSLR, with a Canon 70-200mm F4.0L IS lens and a Tamron 1.4X teleconverter. Click on the images for a higher-resolution view. You may also find interesting some photos I took of insects a while ago in Wisconsin.

Fasan


Hofente

Blaesshuhn

Teichhuhn

Amsel

Huehner

Rotkehlchen

Blaumeise

Huehner

Hahn


Greylag Goose - Graugans

Submit Photos to Shutterstock and make $$$!


Monday, January 5, 2009

Home made PBR - Photo Bio Reactor

Mmmmmmm, PBR. Either a cheap cold beer or a Photo Bio Reactor. Jared Bouck at AlgaeGeek has been experimenting with different designs and construction techniques for cultivating algae. The main reason you'd want to cultivate algae is to create a renewable fuel by taking carbon dioxide out of the atmosphere and turning it into a type of biodiesel. Millions of research dollars have been spent at Universities across the globe on discovering and genetically engineering the most ideal algae strains and building large scale biodiesel farms in warm areas. I've read somewhere that you can get around 10 times more fuel from algae than soybeans or corn given an equal cultivation area. I haven't really done too much research on cultivating algae at home and the advantage of algae, but it seems like it could be something worth pursuing. Anybody in Germany have an algae culture they want to share with me?





If you want to read more about that Algae Geek's projects check out his website. There are some funny passages there such as: "For this project we will be using some acrylic sheet that is 1/2 inch thick. This will be cut using a hole saw to make the plugs for the tube ends as well as making the holes for the plumbing. Now I realize that everything can be measured in carbon and energy required in making a product... and I realize that I will get email saying how plastics will kill the earth. Well... your likely right. So I wanted you to know preemptively that I actually got this magic carbon / pollution free acrylic from my future self coming back in time with a carbon free time machine to give it to myself so I could feel guilt free about using it. For those not fortunate enough to have a future self with a carbon free time machine and carbon free acrylic just go to your local plastics supplier. (Use your phone book, yes it’s in there)".

As a proof of concept experiment to test the feasibility of algae as a source of fuel for commercial consumption, the first 90-minute flight by a Continental Boeing 737-800 was just completed where one of the two engines was powered by a 50-50 blend of biofuel and normal aircraft fuel. No modifications of the engine were needed. The tests included an engine shutdown and restart at 38,000 feet. "Algae is viewed by many as a key fuel for the future because it is fast growing, does not compete with food crops for arable land, and yields up to 30 times more fuel than standard energy crops. But despite advances in the technology, biofuels derived from algae have yet to be proven as commercially competitive."