Secure Programming for Linux and Unix HOWTO: Language-Specific Issues, 10.6. Java
Open-Source JavaScript Flash Player (HTML5/SVG)
This is quite incredible. A purely Javascript Flash Player. Here are some examples.
I think that projects like this are simply proof that the days of Flash and it’s plugin based virtual machine in a browser are numbered. Along with jQuery and a host of other Javascript frameworks that are being built, once HTML 5 browsers are in the majority there will be many more options for multimedia content/interactivity on a page than Flash.
A Great Article About the "final" Keyword in Java
While learning Java I came accross the “final” keyword and wasn’t quite sure what it meant.
Here is a good article that explains it and it’s appropriate usage.
Compiling a 64 bit version of SWT for Eclipse
On the SWT FAQ there is a how-to for compiling a 64 bit version of SWT for Eclipse, however, it is currently incorrect and took a bit of research and experimentation to sort out.
Here is how to do it (I have copied the original how-to and made edits where appropriate.
In this case, I am using Eclipse 3.5.1 under Kubuntu 9.04.
In this how-to you will extract the SWT source from the CVS repository and build your own binaries.
- Start Eclipse and retrieve the org.eclipse.swt, org.eclipse.swt.gtk.linux.x86_64 and org.eclipse.swt.tools projects from dev.eclipse.org (see How to use SWT from CVS)
- In the org.eclipse.swt project rename tthe .classpath_gtk to .classpath.
- Convert SWT’s Java and C code from its 32-bit form to 64-bit:
- To convert the Java code in-place, open the build.xml ant script with Ant in the org.eclipse.swt project and run its “replace.32.to.64” target. Simply click on it to highlight it and then click on the “Run the Selected Target” button in Ant. Once this target has completed you must refresh (F5) the org.eclipse.swt and the org.eclipse.gtk.linux.x86_64 project in order to pick up the changes.
- To convert and build the C code, run the “build_natives” target in the same build.xml file. Refresh (F5) the org.eclipse.swt.gtk.linux.x86_64 project when this target has completed, to pick up the new libraries.
- Make sure to add the new compiled source library to your build path:
- Click on your project node in the Package Explorer.
- Right click on it and select “Link Source”.
- Browse to the org.eclipse.swt.gtk.linux.x86_64 directory and select it.
- Add all of the items in it.
An Excellent Primer on Both Programming and Java
Introduction to Programming Using Java, Fifth Edition Version 5.0, December 2006
David J. Eck also provides the source code to a TextIO class that he has written that provides some additional IO features. Click here for an outline of those methods and on that page is also a link to the source.
How to Read the Manufacture Date On Your Tires
I’ve categorized this under the “Motorcycle” heading, however this is true for just about any DOT approved tire for sale in the US.
Here are two great links that describe how to read your tires:
http://www.tirerack.com/tires/tiretech/techpage.jsp?techid=11
http://riverviewtire.com/ReadingTires.html
Homemade Pie Crust
This is a pie crust recipe from my Nanna (my Father’s mother). I heard that often she used seltzer water, or orange juice in place of the water in her recipe, but never milk. I have not tried either, as of yet, just water.
This is a pie crust recipe for a 9″ or 10″ pie crust pan, for both single and double crust pies.
If you are going to make two, two crust pies, don’t double the recipe, make it twice.
1 Crust Pie
- 1 1/2 cups of all purpose flour
- 3/4 tsp salt
- 1/2 cup vegetable shortening (Crisco it what I use)
- 1/4 cup cool water (little less than an full 1/4 cup)
2 Crust Pie
- 2 3/4 cups of all purpose flour
- 1 1/4 tsp salt
- 9/10 cup of vegatable shortening (basically, not an entire cup)
- 1/2 cup cool water (little less than a full 1/2 cup)
Measure out the pre-sifted flour. Then re-sift in the salt.
In a large mixing bowl cut in the vegetable shorening until it starts to look like corn meal with still a decent amount of loose flour.
Fill up the appropriately sized measuring cup for the water. Hold it in your hand with your fingers covering the top of the container and your thumb on the bottom. With your fingers, mostly held tightly together turn, your hand over and evenly sprinkle about 1/2 of the water over the flour and shortening mixture. Gently, turn over the mixture with a spatula, and then repeat with the remainder of the water.
Turn it over again with the spatula and then turn out the mixture into a large sheet of wax paper. It will look like there is no way that this will stick together to make a crust as it pour out as more of a pile with a seemingly vast amount of loose flour. Push to mixture together with your hands to form a ball and then pull up the edges of the wax paper around it to make a sack. Compress the mixture in the wax paper into a ball fairly firmly and twist the top of the wax paper so that you now have a fairly spherical blob.
Put in the refrigerator for 30 minutes.
While in the refrigerator, tear off two fairly (long 24″ or so) sheets of wax paper. For each sheet, put about 1/2 tsp of flour on the paper and rub it over the entire surface. Rub a piece of cold butter over the entire inner surface, and edge of the pie pan, then with your hands smear around the butter so that it melts a little and covers the entire surface.
Remove the mixture from the fridge unwrap it. If this is a double-crust pie, cut the ball into 3/5th and 2/5th sections. The 3/5th section is for the bottom, and the rest for the top.
Press mixture to roll out onto the floured side of one of the pieces of wax paper so that it is starting to form a disc about 1 1/2 to 2″ thick, then place the other sheet of wax paper, floured side down, onto the crust. Then roll it out to the desired diameter to match your pan. I will typically hold the pie pan over the crust as I am rolling to it to check the size and stop when the crust is about 3″ or so larger on all sides.
Then, gently peel the top piece of wax paper from the crust. This never goes perfectly for me, and sometimes, tears the crust a little and/or takes a thin layer of it with it in some places so don’t worry about it if it doesn’t separate easily, or cleanly. Then (depending on whether your are right or left-handed, I am right-handed), position your pie pan to the right of the rolled out crust. Grab the left-hand edge of the wax paper with your left hand and place your right hand on the rolled-out dough. Lift the wax paper with your left hand, flipping it over top of the pie pan to your right so that your right hand is now palm up over the pan directly touching the crust. Then position the crust over the pan and slip your hand out from under the crust.
This is the tricky part, and again, it never goes perfectly for me. With the crust draped over the pan, start peeling the wax paper off wherever it seems easiest. It will likely tear in places, and/or the wax paper wil take a thin layer of it with it in some places, but do your best to get it off in one piece.
Once separated, use any chunks that have fallen off the edges to repair any rips and pinch up the remainder around the edge for form a nice crust.
Then, dump in whatever filling you desire and bake away.
This crust tends to cook best between 375 F and 400 F, but depending on your oven and the pies you make, your mileage may vary.
If making two single crust pies, you can double the recipe and then halve the mixture before rolling it out, but do not try to triple, or quadruple it because it does not come out right. Also, do not try to double the recipe for a double crust, just make however many separate batches for double-crust pies you are making.
Alternate Recipe With Oil Instead of Crisco
My Mom gave me an alternate recipe for a two crust pie as follows:
Ingredients
- 2 1/2 cups sifted flour
- 2/3 cup of oil, canola or saflour
- 6 Tbs of ice cold water
- 1 Tsp of salt
Mix the dry ingredients together. Pour the water into the oil, but do not attempt to mix it. Pour the oil and water mixture into the dry ingredients and mix gently until combined.
Then follow the same steps as above after wrapping in wax paper and refrigerating for 30 minutes.
Baking Powder Biscuits
- 2 cups sifted flour
- 2 tsp. baking powder
- 4 tablespoons butter or shortening
- 1/2 tsp. salt
- 1 egg lightly beaten
- about 3/4 cup milk
Sift your flour once, then measure the sifted flour.
Add the baking powder and salt, and sift sift together the dry ingredients.
Using a pastry cutter cut in your butter, margerine or shortening.
Lightly beat the egg and then add enough milk to to get about 3/4 cup of liquid.
Pour the liquid into the butter and dry ingredient mix. Mix just until it begins to hold together in large lumps. You will still have some lose flour, that’s OK.
Turn out the mix onto a counter or large cutting board with flour on it. Gently form the dough, without kneading it at all, into a long rectangle about 1 cm in height. The rectangle of dough will barely hold together, that’s OK. The more you handle the dough the tougher the biscuits will be.
Cut into squares and transfer onto a pre-greased cookie sheet and bake for 10 – 12 minutes at 400 F.
Makes about 6 – 8 large biscuits.
Almond Flour Muffins
- 1 1/4 cup almond flour
- 2 eggs
- 1 banana
- 1/8 cup coconut oil
Lightly beat the eggs.
Add all ingredients together and mix thoroughly.
Place in muffin pan or stand-alone foil cup cake wrappers.
Bake for 350 F for about 12 – 15 minutes.
Oatmeal Raisin and Date Cookies
This recipe uses honey as the sweetener. You can substitute with sugar.
- 3 cups oatmeal (not the quick oats)
- 1 cup flour
- 1/4 tsp salt
- 1/2 tsp baking soda
- 1 cup honey
- 3/4 cup butter
- 1 egg
- 1 cup raisins
- 1/2 cup chopped dates?
Melt the butter in a sauce pan on the stove over very low heat.
Mix all of the dry ingredients together. Then mix in the raisins and the chopped dates.
Mix the honey into the melted butter and then mix the butter and honey mix into the dry ingredients. Beat the egg, add it, and mix thoroughly.
Drop onto a greased cookie sheet with teaspoons and flatten a little bit. Then bake at 365 F for about 10 – 12 minutes.