Keyed Scarf Join
Making complex scarf join using mostly Japanese hand tools
https://youtu.be/buHsNMVSONQ
Here is an example how a person can make a complex join using everyday carpentry tools.
https://youtu.be/6j-U1P49r8U
Linux tail command
if you want to see last 200 lines added:
Groovy
Groovy Installation
$ curl -s get.gvmtool.net | bash
$ source "/Users/uki/.gvm/bin/gvm-init.sh"
$ gvm install groovy
$ groovy -version
Groovy Version: 2.4.3 JVM: 1.7.0_79 Vendor: Oracle Corporation OS: Mac OS X
$ which groovy
/Users/uki/.gvm/groovy/current/bin/groovy
edit ~/.bash_profile
# Groovy updated May 19, 2015
export GROOVY_HOME=/Users/uki/.gvm/groovy/current
export PATH=${PATH}:${GROOVY_HOME}/bin
First Script
groovy_scripts $ cat hello.groovy
println 'Hello from Groovy'
groovy_scripts $ groovy hello
Hello from Groovy
Groovy Console
interface Alive{
void alive()
}
class Creature implements Alive{
def grawl() {
println(" Grrrrrrrr!!! grawls the Creature")
}
void alive()
{
println(" Grrrrr!!! thinks the Creature")
}
}
class Human extends Creature {
String name;
def sayHi(name) {
println(" Hi, my name is $name! says the Human")
}
void alive()
{
println(" I am alive! says the Human")
}
}
Creature me = new Human()
me.grawl()
me.alive()
me.name = "Uki"
me.sayHi me.name
Creature bear = new Creature();
bear.alive()
OUTPUT:
Groovy as DSL
Hadoop on Pi cluster
Cover crops
UNIX: create symbolic link ln -s
$ sudo ln -s TARGET_DIR SYMBOLIC_LINK_DIR
Example 1:
$ cd /System/Library/Frameworks/JavaVM.framework/Versions
Example 2:
Debian linux Apache location: /var/www
$ sudo ln -s /Library/WebServer/Documents www
originally posted on 7/24/2009 If you like this post, please give me your 2 cents ($0.02 litterally) to show token of appreciation and encourage me to write more:Donate Bitcoins
Switching version of Java on Mac
$ java -version
java version "1.6.0_65"
(Welcome back to 2006!)
You can download Java 1.7, 1.8 and 1.9 at Oracle and write down WHERE they install it:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Using SYMBOLIC LINKS I created locations of my various Java locations:
sudo ln -s location_of_JDK "version_name"
for example:
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/ 1.8.0_51
Uki@ Versions $ ls -al
total 72
drwxr-xr-x 12 root wheel 408 Jul 29 12:03 .
drwxr-xr-x 11 root wheel 374 Jul 29 11:50 ..
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.4 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.4.2 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.5 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.5.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.6 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.6.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 59 Jul 29 12:03 1.8.0_51 -> /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/
drwxr-xr-x 7 root wheel 238 Jul 29 11:50 A
lrwxr-xr-x 1 root wheel 1 Jul 29 11:50 Current -> A
lrwxr-xr-x 1 root wheel 52 Jul 29 11:50 CurrentJDK ->/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents
Uki@ Versions $
now I can switch my Java to 1.8 by redirecting CurrentJDK:
Uki@ Versions $ sudo rm -r CurrentJDK
Uki@ Versions $ sudo ln -s 1.8.0_51 CurrentJDK
Uki@ Versions $ ls -altotal 72
drwxr-xr-x 12 root wheel 408 Jul 29 12:07 .
drwxr-xr-x 11 root wheel 374 Jul 29 11:50 ..
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.4 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.4.2 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.5 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.5.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.6 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jul 29 11:50 1.6.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 59 Jul 29 12:03 1.8.0_51 -> /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/
drwxr-xr-x 7 root wheel 238 Jul 29 11:50 A
lrwxr-xr-x 1 root wheel 1 Jul 29 11:50 Current -> A
lrwxr-xr-x 1 root wheel 8 Jul 29 12:07 CurrentJDK -> 1.8.0_51
Uki@ Versions $ java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
~~~~~~~~~~~~~~~~~~~~~~~
It is also useful to create JAVA_HOME as a lot of apps use that.
Open your shell startup script, most of the time it is ~/.profile
edit ~/.profile
--------------------------------
# JAVA updated: May 14, 2015
# other versions: /System/Library/Frameworks/JavaVM.framework/Versions/
# set up what CURRENT points to
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
# add Java home to path
export PATH=${PATH}:${JAVA_HOME}/bin
--------------------------------
$ java -version
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b05)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b05, mixed mode)
If you mess up you will get messages like:
$ java -version
Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/bin/java" (-1)
That is because the folder you point at has to have /bin/java in it.
Please note that your system Java level is independent from you Android Eclipse Java setting (1.6)
http://stackoverflow.com/a/23396850/3566154
Electric rototiller cultivator
Today, I have been testing my new electric tiller.
Many say that a tiller should be your first mechanized tool.
The assembly was very simple with Phillips screwdriver as only tool needed.
My first impression was that the cutting blades look cheap, but after converting about 100 square feet of grass into a planting row, I don't have any issues with the quality.
The tiller eagerly goes after first inch of ground, but to go deeper I had to break the ground with the spade. This still saves enormous amount of work as I don't have to turn over the soil, but just lean on the spade.
The roots wrap around the blades, and I well have to clean them later, I definitely would like a quick release instead of the bolt.
I like the fact that the tiller is electric, not gasoline driven, it is definitely quieter and easy to turn on, and off. For remote sites a small power generator would be a must, but this is not an issues within couple hundred feet from the power outlet.
I definitely believe that tiller should be your first mechanized tool.
King Bolete (Boletus sp.)
http://mushroom-collecting.com/mushroomking.html
Oak tree (Quercus sp.)
First note is on building tall beds surrounding the trees; unfortunately the roots need access to air and crowding around the trunk may weaken the tree itself, so use common sense on what your ecosystem can realistically sustain.
The obvious candidates would be shade loving plants and fungi.
Shade loving plants:
- aloe
- many common vegetables (try and see what survives)
- Boletus sp.
Avocado (Persea americana)
Ethnofarmacology
Green Alder (Alnus viridis)
Common Bugleweed (Ajuga reptans)
American Toad
Sweet Corn (Zea mays)
On the small scale, you can plant couple of seeds, about 1.5 inch deep, in a row about 12 inch apart, since the corn is air pollinated, multiple rows will benefit the plants positioned on the edge, so plan to plant square, or rounded plots.
Since you are planting couple of seeds per spot you will have to select the healthiest plant and snip others, this of course would not pay on the large scale.
Corn has shallow roots, so it needs moist top soil.
You can plant pumpkin/squash and green beans next to each corn plant, they will use it as trellis. Green beens will fix atmospheric nitrogen in the soil, for the NEXT YEAR cultivation, after they decompose.
Tomatoes
You should be seeding tomatoes about 6-8 weeks before you transplant them into outdoor soil, so for target date of May 15, I have to start at beginning of April.
Place seeds in shallow depth, in the small, drained containers, with room temperature, moist soil, assume 70-80% germination rate. They will take up to 2 weeks for germination. Control humidity with plastic, but allow some airflow.
As soon as the seeds germinate they will need plenty of the sunlight. If you are using a full-spectrum lights make sure you have them on about 16 hours a day.
Don't worry too much about selection of tomatoes, plant as many varieties you can and keep in mind that if you are planting for your local consumption:
- tomatoes don't need to be shipped across the country, so they don't need to tough skinned
- tomatoes don't need to "survive" a week before being placed on the store shelf, so they don't need to be rot resistant
- tomatoes don't need to be a size of pumpkin, because they are not for (freak) show
- tasty to you
- right size for you to eat
- adaptable to your soil
- adaptable to your micro flora and fauna
Resources:
http://www.wisconline.com/almanac/gardening/springfrost.html
Transplanting Grapes
When moving the grapes you have to dig out a lot of the root.
The grapes "like to have air" so even if the eventually will be hugging the wall, I planted them about 0.5m away from the wall.
I have dug up a deep hole and added leaf mulch to hold the moisture, then covered it with tilled soil.
Java: Generics, instanceof
Java: concurrency with Runnable
You could use number of available CPUs as your pool size.
My favorite quotations..
“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.” by Robert A. Heinlein
"We are but habits and memories we chose to carry along." ~ Uki D. Lucas
Recommended pages
Popular Recent Articles
-
O'REILLY 201 0011 031 10110100180 000110111 01100041 001100010010000 5011011001010 1101110011 000100000 00000 10 1000012 Escaping the Bu...
-
I have noticed a very unsettling statistic on my blog. This prompted a fascinating question about AI, blogs' future, and maybe even the...
-
Installation of Java on Pi is easy, you can ssh to your Pi remotely and just execute: pi@raspberrypi ~ $ sudo apt-get update && su...
-
Epiphany is one of these interesting words that can mean so much. For me it means the crossroad where I chose the road less travelled. The r...
-
I progressively cut my hair shorter and shorter. Now, I just came back from the swimming pool with Lili, so it is a mess.
-
Done working with your Beagle? You don't want to to just yank on the cord, you can shutdown your BBB in couple ways: 1) press "powe...
-
In this tutorial we will discuss upgrading Maven on Mac OS X. While trying building with Maven I was getting errors related to version numbe...
-
Unix time date format is used in many applications, including Yahoo finance. using Dates, Printf unix_date = @sprintf("%.0f", Date...
-
Creating HTML anchor tab for email with subject: <a href="mailto:YourName@me.com?subject=Hi" >email link </a>