xargs apt-get install -y << EOF
g++
git-core
cogito
subversion
automake
libtool
nasm
x11proto-xf86vidmode-dev
libxv-dev
libxxf86vm-dev
libogg-dev
libvorbis-dev
libtheora-dev
libopenexr-dev
libdv-dev
libpng12-dev
libjpeg62-dev
libtiff4-dev
libfreetype6-dev
libsndfile1-dev
uuid-dev
libasound2-dev
libavutil-dev
libmpeg3-dev
libavcodec-dev
libx264-dev
libfaac-dev
libmjpegtools-dev
fftw3
fftw3-dev
liba52-0.7.4-dev
liblame-dev
libfaad2-dev
libesd0-dev
libiec61883-dev
libavc1394-dev
texi2html
texinfo
EOF
echo "0x7fffffff" >/proc/sys/kernel/shmmax
Monday, July 27, 2009
Cinelerra
Sunday, July 26, 2009
Bruce's Philosophers Song
Bruce's Philosophers Song
Monty Python's Flying Circus
Immanuel Kant was a real pissant
Who was very rarely stable.
Heidegger, Heidegger was a boozy beggar
Who could think you under the table.
David Hume could out-consume
Wilhelm Freidrich Hegel,
And Wittgenstein was a beery swine
Who was just as schloshed as Schlegel.
There's nothing Nietzsche couldn't teach ya'
'Bout the raising of the wrist.
Socrates, himself, was permanently pissed.
John Stuart Mill
Of his own free will
On half a pint of shandy was particularly ill
Plato they say
could stick it away
half a crate of whiskey every day
Aristotle Aristotle
was a bugger for the bottle
Hobbes was fond of his dram
And Rene Descarte was a drunken fart
"I drink therefore I am".
Socrates himself is particularly missed
A lovely little thinker but a bugger when he's pissed.
http://www.youtube.com/watch?v=EP4AUMk4jOs
Better:
http://www.youtube.com/watch?v=xQycQ8DABvc&feature=related
Created: 20-Mar-2008
Saturday, July 25, 2009
Freecommander
It has a very good bulk renamer.
It can also do md5 checksums
From the edit menu:
Copy full name: Alt+Ins
Copy name: Shift+Alt+Ins
Copy full path: Ctl+Alt+Ins
It can also do md5 checksums
From the edit menu:
Copy full name: Alt+Ins
Copy name: Shift+Alt+Ins
Copy full path: Ctl+Alt+Ins
American wages averages
Found on internet approx 28-Oct-2008:
Houston sr software engineer/developer/programmer $86k
Wages by occupation:
computer and mathematical $32.86
Avg annual prog salary: $75,662.08
Friday, July 24, 2009
GCSE chemistry
GCSE chemistry: "GCSE CHEMISTRY"
This book was written to cover the chemistry content of all the UK GCSE Chemistry syllabuses at the time (2002). It is aimed at students likely to achieve grades from A* to B, and written in a way that wouldn't cause problems for students going on to do chemistry at a higher level.
However, since then, GCSE syllabuses have changed, particularly in the order in which they do things, and with more stress on making chemistry "relevant" - some would argue, more dumbed down!
This book was written to cover the chemistry content of all the UK GCSE Chemistry syllabuses at the time (2002). It is aimed at students likely to achieve grades from A* to B, and written in a way that wouldn't cause problems for students going on to do chemistry at a higher level.
However, since then, GCSE syllabuses have changed, particularly in the order in which they do things, and with more stress on making chemistry "relevant" - some would argue, more dumbed down!
Thursday, July 23, 2009
phase diagrams of pure substances
phase diagrams of pure substances: "Phase behaviours" suggest by Mark Hay
Men versus women (funny)
Men Are Just Happier People
NICKNAMES
If Laura, Kate and Sarah go out for lunch, they will call each other Laura,
Kate and Sarah .
If Mike, Dave and John go out, they will affectionately refer to each other
as Fat Boy, Godzilla and Four-eyes.
EATING OUT
When the bill arrives, Mike, Dave and John will each throw in £20, even
though it's only for £32.50. None of them will have anything smaller and
none will actually admit they want change back.
When the girls get their bill, out come the pocket calculators.
MONEY
A man will pay £2 for a £1 item he needs.
A woman will pay £1 for a £2 item that she doesn't need but it's on sale.
BATHROOMS
A man has six items in his bathroom: toothbrush and toothpaste, shaving
cream, razor, a bar of soap, and a towel from M&S.
The average number of items in the typical woman's bathroom is 337.
A man would not be able to identify more than 20 of these items.
ARGUMENTS
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.
CATS
Women love cats.
Men say they love cats, but when women aren't looking, men kick cats.
FUTURE
A woman worries about the future until she gets a husband.
A man never worries about the future until he is married.
Songebob theme Tune
Are you ready kids?
Aye aye captain.
I can't hear you.
AYE AYE CAPTAIN.
Ohhhhh ...
Who lives in a pineapple under the sea?
Spongebob Squarepants.
Absorbant and yellow
and porous is he,
Spongebob Squarepants.
If nautical nonsense
be something you wish
Spongebob Squarepants.
Then drop on the deck and flop like a fish
Spongebob Squarepants.
Ready?
Spongebob Squarepants. x3
[Pause]
Spongebob Squarepants.
Australian salaries
Noted on Wed Oct 31 21:46:15 2007
In Perth Australia the median programmer salary is $51,000. 1GBP = $2.244. This makes the UK equivalent of £23000.
Emacs modes
You can embed an emacs mode command in your document like so:
This was taken from "28.1 How Major Modes are Chosen"
\ -*- mode: forth; -*-
This was taken from "28.1 How Major Modes are Chosen"
Sarakaani the Sakyan
[At Kapilavasthu] Now at that time Sarakaani the Sakyan, who had died,
was proclaimed by the Blessed One to be a Stream-Winner, not subject
to rebirth in states of woe, assured of enlightenment. At this, a
number of the Sakyans, whenever they met each other or came together
in company, were indignant and angry, and said scornfully: "A fine
thing, a marvelous thing! Nowadays anyone can become a Stream-Winner,
if the Blessed One has proclaimed Sarakaani who died to be
Stream-Winner... assured of enlightenment! Why, Sarakaani failed in
his training and took to drink!"
http://www.accesstoinsight.org/lib/authors/walshe/wheel318.html#passage-65
Sarakaani in fact became a Stream-winner at the moment of death.
was proclaimed by the Blessed One to be a Stream-Winner, not subject
to rebirth in states of woe, assured of enlightenment. At this, a
number of the Sakyans, whenever they met each other or came together
in company, were indignant and angry, and said scornfully: "A fine
thing, a marvelous thing! Nowadays anyone can become a Stream-Winner,
if the Blessed One has proclaimed Sarakaani who died to be
Stream-Winner... assured of enlightenment! Why, Sarakaani failed in
his training and took to drink!"
http://www.accesstoinsight.org/lib/authors/walshe/wheel318.html#passage-65
Sarakaani in fact became a Stream-winner at the moment of death.
Tuesday, July 21, 2009
Some share selection criteria
I have used these in Sharelock Holmes
ABBREV
egp - EPS growth projected
egp2 - EPS growth projected2
gear - gearing
grh - Graham Ratio
intc - interest cover
mkt - market cap
perr - PER rolling
pio - Piotroski score
tgear - tangible gearing
yldp - yield projected
CREITERIA APPLIED AT 20090605
pio >= 5, mkt > 500, pe > 0, egp > 0, egp2 > 0, sort yld desc
Note that the Pio is designed to weed out some of the worst companies.
COFFEE CAN PORTFOLIO
mkt > 300 , tgear <50, roe > 17, yld > 3, sort epic
DORFMAN 1
tgear < 100, mkt > 500, pe > 0, egp > 0. egp2 >0, sort yld desc
MC01
yld > 3, 0 < grh < 3, mkt > 100, dgp > 0, sort yld desc
MC02
mkt > 100, yldp > 3, z >=2/5, 0 < ptbv <=2, sort yld desc
MC03
PBV > 0, Index = FTSE100, sort PBV asc
MC04
mkt > 50, ptbv > 0, pio >=8, intc >=0
MC05
mkt > 150, egp > 10, egp2 > 0, perr < 15, pio >= 7
MC06
pe < 15, egp2 > 0, mkt > 150, egp > 15, gear < 50, sort yld desc
OLD FAITHFUL 1
pe < 15, psr < 2, mkt > 100, egp > 15, gear < 50, sort yld desc
bil - change the brightness of an iMac
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.7).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `#!/bin/sh' line above, then type `sh FILE'.
#
lock_dir=_sh02580
# Made on 2009-07-21 09:19 GMTDT by.
# Source directory was `/cygdrive/c/Users/mcarter/docs'.
#
# Existing files will *not* be overwritten, unless `-c' is specified.
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 1959 -rwx------ bil/bil.c
# 70 -rwx------ bil/bil.txt
# 118 -rwx------ bil/Makefile
#
MD5SUM=${MD5SUM-md5sum}
f=`${MD5SUM} --version | egrep '^md5sum .*(core|text)utils'`
test -n "${f}" && md5check=true || md5check=false
${md5check} || \
echo 'Note: not verifying md5sums. Consider installing GNU coreutils.'
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
if test "$gettext_dir" = FAILED && test -f $dir/gettext \
&& ($dir/gettext --version >/dev/null 2>&1)
then
case `$dir/gettext --version 2>&1 | sed 1q` in
*GNU*) gettext_dir=$dir ;;
esac
fi
if test "$locale_dir" = FAILED && test -f $dir/shar \
&& ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
then
locale_dir=`$dir/shar --print-text-domain-dir`
fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
echo=echo
else
TEXTDOMAINDIR=$locale_dir
export TEXTDOMAINDIR
TEXTDOMAIN=sharutils
export TEXTDOMAIN
echo="$gettext_dir/gettext -s"
fi
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null
then if (echo -n test; echo 1,2,3) | grep n >/dev/null
then shar_n= shar_c='
'
else shar_n=-n shar_c= ; fi
else shar_n= shar_c='\c' ; fi
f=shar-touch.$$
st1=200112312359.59
st2=123123592001.59
st2tr=123123592001.5 # old SysV 14-char limit
st3=1231235901
if touch -am -t ${st1} ${f} >/dev/null 2>&1 && \
test ! -f ${st1} && test -f ${f}; then
shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
elif touch -am ${st2} ${f} >/dev/null 2>&1 && \
test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then
shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
elif touch -am ${st3} ${f} >/dev/null 2>&1 && \
test ! -f ${st3} && test -f ${f}; then
shar_touch='touch -am $3$4$5$6$2 "$8"'
else
shar_touch=:
echo
${echo} 'WARNING: not restoring timestamps. Consider getting and'
${echo} 'installing GNU `touch'\'', distributed in GNU coreutils...'
echo
fi
rm -f ${st1} ${st2} ${st2tr} ${st3} ${f}
#
if test ! -d ${lock_dir}
then : ; else ${echo} 'lock directory '${lock_dir}' exists'
exit 1
fi
if mkdir ${lock_dir}
then ${echo} 'x - created lock directory `'${lock_dir}\''.'
else ${echo} 'x - failed to create lock directory `'${lock_dir}\''.'
exit 1
fi
# ============= bil/bil.c ==============
if test ! -d 'bil'; then
mkdir 'bil'
if test $? -eq 0
then ${echo} 'x - created directory `bil'\''.'
else ${echo} 'x - failed to create directory `bil'\''.'
exit 1
fi
fi
if test -f 'bil/bil.c' && test "$first_param" != -c; then
${echo} 'x -SKIPPING bil/bil.c (file already exists)'
else
${echo} 'x - extracting bil/bil.c (text)'
sed 's/^X//' << 'SHAR_EOF' > 'bil/bil.c' &&
/* http://www.felipe-alfaro.org/blog/2006/09/11/basic-backlight-support-for-macbook-pro/ */
/*
X * Apple Macbook Pro LCD backlight control
X *
X * Copyright (C) 2006 Nicolas Boichat
X * Copyright (C) 2006 Felipe Alfaro Solana
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X */
X
#include
#include
#include
X
void init()
{
X if (ioperm(0xB2, 0xB3, 1) < 0)
X {
X perror("ioperm failed (you should be root).");
X exit(2);
X }
}
X
int get_current_value()
{
X outb(0x03, 0xB3);
X outb(0xBF, 0xB2);
X char t = inb(0xB3) >> 4;
X return t;
}
X
int calculate_new_value(const char *arg)
{
X int val, new = atoi(arg);
X
X if (arg[0] == '+' || arg[0] == '-')
X val = new + get_current_value();
X else
X val = new;
X
X if (val > 15)
X val = 15;
X else if (val < 1)
X val = 1;
X
X return val;
}
X
int main(int argc, char** argv)
{
X if (argc > 2)
X {
X printf("Usage:\n");
X printf("%s : read current value\n", argv[0]);
X printf("%s value : write value [0-15]\n", argv[0]);
X exit(1);
X }
X
X init();
X
X if (argc < 2)
X {
X printf("Current value : %d\n", get_current_value());
X exit(0);
X }
X
X if (argc == 2)
X {
X int value = calculate_new_value(argv[1]);
X outb(0x04 | (value << 4), 0xB3);
X outb(0xBF, 0xB2);
X printf("new value: %d\n", value);
X }
X
X return 0;
}
SHAR_EOF
(set 20 09 04 03 20 16 15 'bil/bil.c'; eval "$shar_touch") &&
chmod 0700 'bil/bil.c'
if test $? -ne 0
then ${echo} 'restore of bil/bil.c failed'
fi
if ${md5check}
then (
${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'bil/bil.c: MD5 check failed'
) << \SHAR_EOF
1929d6231118d4138e2594c4b42cb0d2 bil/bil.c
SHAR_EOF
else
test `LC_ALL=C wc -c < 'bil/bil.c'` -ne 1959 && \
${echo} 'restoration warning: size of bil/bil.c is not 1959'
fi
fi
# ============= bil/bil.txt ==============
if test ! -d 'bil'; then
mkdir 'bil'
if test $? -eq 0
then ${echo} 'x - created directory `bil'\''.'
else ${echo} 'x - failed to create directory `bil'\''.'
exit 1
fi
fi
if test -f 'bil/bil.txt' && test "$first_param" != -c; then
${echo} 'x -SKIPPING bil/bil.txt (file already exists)'
else
${echo} 'x - extracting bil/bil.txt (text)'
sed 's/^X//' << 'SHAR_EOF' > 'bil/bil.txt' &&
bil - changes the brightness settings on iMacs
X
Created: 04-Apr-2009
SHAR_EOF
(set 20 09 04 04 18 53 49 'bil/bil.txt'; eval "$shar_touch") &&
chmod 0700 'bil/bil.txt'
if test $? -ne 0
then ${echo} 'restore of bil/bil.txt failed'
fi
if ${md5check}
then (
${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'bil/bil.txt: MD5 check failed'
) << \SHAR_EOF
91e3afb8c696acc63777a70a0fbe1ac1 bil/bil.txt
SHAR_EOF
else
test `LC_ALL=C wc -c < 'bil/bil.txt'` -ne 70 && \
${echo} 'restoration warning: size of bil/bil.txt is not 70'
fi
fi
# ============= bil/Makefile ==============
if test -f 'bil/Makefile' && test "$first_param" != -c; then
${echo} 'x -SKIPPING bil/Makefile (file already exists)'
else
${echo} 'x - extracting bil/Makefile (text)'
sed 's/^X//' << 'SHAR_EOF' > 'bil/Makefile' &&
DEST=/usr/local/bin
X
bil : bil.c
X gcc bil.c bil
X
clean :
X rm -f bil
X
install :
X cp bil ${DEST}
X chmod a+s ${DEST}/bil
SHAR_EOF
(set 20 09 04 26 13 01 15 'bil/Makefile'; eval "$shar_touch") &&
chmod 0700 'bil/Makefile'
if test $? -ne 0
then ${echo} 'restore of bil/Makefile failed'
fi
if ${md5check}
then (
${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'bil/Makefile: MD5 check failed'
) << \SHAR_EOF
46661b10d9f20e7fe682f3573e835663 bil/Makefile
SHAR_EOF
else
test `LC_ALL=C wc -c < 'bil/Makefile'` -ne 118 && \
${echo} 'restoration warning: size of bil/Makefile is not 118'
fi
fi
if rm -fr ${lock_dir}
then ${echo} 'x - removed lock directory `'${lock_dir}\''.'
else ${echo} 'x - failed to remove lock directory `'${lock_dir}\''.'
exit 1
fi
exit 0
Monday, July 20, 2009
Transport : sustainable energy
Transport : sustainable energy
Updated 15-Oct-2003 17-Oct-2003 21-Oct-2003
I have been trying to put together some calculations to determnine if it is
viable for cars to be run on rapeseed oil. I am trying to answer the question:
how many acres of farmland would it take to run a car for a year, and how much
would it cost? Any help in making that determination would be gratefully
received. Send comments to xs@ukmail.com. Assume that the average yearly
mileage is 10,000 miles, and the fuel consumption is 30 mpg (miles per gallon).
That equates to about 333 gallons of petrol.
Personally, I do many more than 10k miles in a year, but I reckon that I do
much better than 30mpg.
Here are some statistics
[S1] 1 gallon of petrol contains about 31 million calories
Source:
http://www.heartratemonitors.co.uk/calories.htm
[S2] 1 calory = 4.184 joules
Source: as [S1]
A calorie is the amount of energy, or heat, it takes
to raise the temperature of 1 gram of water 1 degree Celsius.
[S3] 100g pure vegetable oil contains 900kcal
Source: the side of a bottle of Tesco Pure Vegetable oil.
[S4] Britain has 2.7m hectares of woodland (11.9% of the surface area of Great
Britain)
Source:
www.forestry.gov.uk
I really wanted to know the amount of arable farmland in Britain, but didn't
quite get around to finding it. If anyone knows, then please drop be a line.
[S5] 1 gallon = 4.5 litres
[S6] Rapeseed costs 264.50 EUR / kg
Source: FT website on 14-Oct-2003
EUR means Euro. The settlement price is based on 8,000 kg.
[S7] 1 EUR = 0.693100 GBP
Source: ICAEW prices for 01-Oct-2003 to 31-Oct-2003
GBP means Great British Pounds.
[S8] 2.471 acres = 1 hectare
Imperial measurement, don't you just love it.
[S9] Rapeseed yields about 100kg of oil per hectare.
Source:
http://journeytoforever.org/biodiesel_yield.html
A scan of the site reveals that all biodiesel oils have, litre for litre, about
the same energy value as petrol. It's not exact, but it's about right.
This suprised me somewhat, as I expected petrol to have much more energy. But
someone told me that although petrol is definitely more volitile, that doesn't
mean it contains more energy. What makes a crop more valuable, therefore, is
its yield per acre - making yield proportional to energy value (to a reasonable
order of approximation). Cashew nuts and avocados have exceptionally high
yields - but of course we can't grow them in this country.
[S10] Vegetable oil weighs about 800g per litre
I don't remember where I got that value from, or whether it was a derived
value. I need to check it out.
[S11] Petrol costs 76p per litre
Source: petrol receipt dated 16-Oct-2003
[S12] Vegetable oil costs 63p per litre
Source: Safeway vegetable oil costs £1.88 for 3 litres [=63p/l], or 65p for 1
litre, as at 21-Oct-2003. Safeways is notorious for being expensive, so it
ought to be possible to buy it at a lesser price.
I concluded that it would take about 4 acres of rapeseed to fuel a car for a
year - which seemed quite reasonable. The value was calculated by mental
arithmetic, which may well be wrong. I need to check it out.
Passwordless SSH
On your local machine:
ssh-keygen -t rsa
Append the contents of your public key to the authorized_keys file on the remote OpenSSH server:
cat ~/.ssh/id_rsa.pub | ssh remote_server "cat - >> ~/.ssh/authorized_keys"
MySql
Starting off
As root, you will need to grant privileges to a user - let's call him luser .
As root, start mysql using the command 'mysql'. create a database, let's call it blah:
CREATE DATABASE blah ;
Grant priviliges to the user:
GRANT ALL PRIVILEGES ON blah.* to 'luser'@'%' WITH GRANT OPTION;
Quit out as root using the command: QUIT
Now, in a normal user account, you can connect to it by typing:
mysql blah
You can see what databases you have access to:
SHOW DATABASES;
You can create a table within the database by typing something like:
create table yonk (id integer);
Let's insert a row:
insert into yonk values (26) ;
Then we can see what tables exist in the database:
SHOW TABLES;
and inspect the data we have just entered:
SELECT * FROM yonk;
Users
select User,Host,password from mysql.user;
Setting passwords
mysql -u rootSET PASSWORD FOR root@localhost=PASSWORD('rubberchicken');
As root, you will need to grant privileges to a user - let's call him luser .
As root, start mysql using the command 'mysql'. create a database, let's call it blah:
CREATE DATABASE blah ;
Grant priviliges to the user:
GRANT ALL PRIVILEGES ON blah.* to 'luser'@'%' WITH GRANT OPTION;
Quit out as root using the command: QUIT
Now, in a normal user account, you can connect to it by typing:
mysql blah
You can see what databases you have access to:
SHOW DATABASES;
You can create a table within the database by typing something like:
create table yonk (id integer);
Let's insert a row:
insert into yonk values (26) ;
Then we can see what tables exist in the database:
SHOW TABLES;
and inspect the data we have just entered:
SELECT * FROM yonk;
Users
select User,Host,password from mysql.user;
Setting passwords
mysql -u rootSET PASSWORD FOR root@localhost=PASSWORD('rubberchicken');
Fully Quailified Domain Name
A fully qualified domain name (or FQDN) is an unambiguous domain name that specifies the node's position in the DNS tree hierarchy absolutely. To distinguish an FQDN from a regular domain name, a trailing period is added. ex: somehost.example.com. An FQDN differs from a regular domain name by its absoluteness; a suffix will not be added.
For example, given a device with a hostname of "myhost" and a domain name of "example.com", the fully qualified domain name is "myhost.example.com.". It therefore uniquely defines the device — whilst there might be many hosts in the world called "myhost", there can only be one "myhost.example.com.".
Notice that there is a dot at the very end of the domain name, i.e. it ends ".com." and not ".com" — this indicates that the name is an FQDN. For example "myhost.bar.com" could be ambiguous, because it could be the prefix of a longer domain name such as "myhost.bar.com.gov", whereas "myhost.bar.com." is a fully qualified domain name.
For example, given a device with a hostname of "myhost" and a domain name of "example.com", the fully qualified domain name is "myhost.example.com.". It therefore uniquely defines the device — whilst there might be many hosts in the world called "myhost", there can only be one "myhost.example.com.".
Notice that there is a dot at the very end of the domain name, i.e. it ends ".com." and not ".com" — this indicates that the name is an FQDN. For example "myhost.bar.com" could be ambiguous, because it could be the prefix of a longer domain name such as "myhost.bar.com.gov", whereas "myhost.bar.com." is a fully qualified domain name.
Spotify
"A world of music Instant, simple and free"
For UK. Just plays music. Seems good so far. It is in beta, so you don't really know how it will pan out long term.
For UK. Just plays music. Seems good so far. It is in beta, so you don't really know how it will pan out long term.
Fishy maths in the Buddha's lineage
Taken from my 2001 diary:
I have been reading about the lineage of Gotama Buddha
(e.g. http://www.geocities.com/CapeCanaveral/Runway/5787/buddha-lineage.html).
It appears that he spent time as a human, interspersed with
existence in celestial realms. If you do the maths, the lifespan
of a deva in even the lowest heaven is about 9 million years.
Homo sapiens have existed for only about 100,000 years. The
Homo genus has existed for a few million years only - and most of
that time was probably spent being ugly, hairy and stupid.
So how do you account for this discrepancy between accounts of
Gotama Buddha's previous existences and palaentological evidence?
Also, does that mean that most devas look like reincarnated dinosaurs?
I have been reading about the lineage of Gotama Buddha
(e.g. http://www.geocities.com/CapeCanaveral/Runway/5787/buddha-lineage.html).
It appears that he spent time as a human, interspersed with
existence in celestial realms. If you do the maths, the lifespan
of a deva in even the lowest heaven is about 9 million years.
Homo sapiens have existed for only about 100,000 years. The
Homo genus has existed for a few million years only - and most of
that time was probably spent being ugly, hairy and stupid.
So how do you account for this discrepancy between accounts of
Gotama Buddha's previous existences and palaentological evidence?
Also, does that mean that most devas look like reincarnated dinosaurs?
Doom codes
Here are some Doom codes that I created from 2002.
1 Hanger 3W46846Q34
2 Plant MXNVQQFPML
3 "Toxin Refinery" 7Z7JS5ZR!9
4 "Command Control" 7G7MS5QN!9
5 "Phobos lab" 803TS12T!9
6 "Central Processing" LVR66KC4NP
7 "Computer Station" !V8RP2WL56
8 "Phobos Anomoly" !B8FP2!356
9 "Deimos Anomoly" 603TVX7679
10 "Containment Area" WTXKVB9Y1Z
11 "Refinery Finished" 52DQ1G1497
12 "Deimos Lab" 1PSBBZD2XV
13 "Command Centre" TF163QXRNL
14 "Halls of the Damned" MOV39FQNTS
15 "Spawning Vats" TQ4WCNHFJK
16 "Hell Gate" 5MQG3JCZVX
17 "Hell Keep" DB06F24LMP
18 Pandemonium K0V8LXZ8QS
19 "House of Pain"
20 "Unholy Cathedral" !9PGW8KWZ0
21 "Mt. Erebus" BWZXQFL6PN
22 Limbo 00BJ3TZ5!9
23 "Tower of Babel" M475L!YWFD
24 "Hell Beneath" 2VHS4R4346
25 "Perfect Hatred" FZW8P4RNST
26 "Sever The Wicked" ZXKMMLP534
27 "Unruly Evil" 1BHLPM4446
28 "Unto the Cruel" 74QC3BVVVX
29 "Twilight Descends" 0BHRN5KY46
30 "Threshold of Pain" LQ4W2J8KKK
1 Entryway P!50BJK7JG
2 Underhalls WLHVHCPFBC
3 Guantlet 5YT95NLNNN
4 "The Focus" 1SBYKKRFHK
5 "The Waste Tunnels" X5GXFFM1CF
6 "The Crusher" R13N0YS78!
7 "Dead Simple" DM2D4VXZWV
8 "Tricks and Traps" B37BDY!6WY
9 "the Pit" QGVPTPY48!
10 "Refueling Base" D84J75DVZ1
11 "O of Destruction" Z6!YD75JCB
12 "the Factory" QXJP138444
13 "The Inmost Dens" 248XYDVDDD
14 Suburbs J6TDZLQVVV
15 Tenements 16!YJ7PVBB
16 "The Courtyard" F!PD6ZSD1Z
17 "The Citadel" 8W0XJ19SPN
18 Nirvana WD18HHXCPM
19 "The Catacombs" JHCQ79Q779
20 "Barrels of Fun" XBZ4MT4NNP
21 Bloodfalls HKFR702T87
22 "Abandoned Mines" ZHW3967RQS
23 "Monster Condo" JKFPQW1!87
24 "Redemption Denied" R8MDJD5X21
16-Nov-2002
60 Beautiful Ubuntu Desktop Wallpapers
60 Beautiful Ubuntu Desktop Wallpapers Also includes links to Windows and OS X wallpapers.
Sunday, July 19, 2009
The Idle Scripting Language
The Idle Scripting Language: "The Idle Scripting Language"
Idle is a simple but powerful scripting language, in basically the same vein as the venerable Perl or Python languages. It is, however, an altogether more lightweight application. At the core of Idle sits a tweaked and enhanced version of Lua. Idle inherits from Lua its elegant and powerful language definition as well as a highly-optimised interpreter kernel (an extremely fast compiler is included as well). Idle, like Lua, is readily extended with additional functions and libraries (which can be written either in C/C++ or in Idle itself).
This small language kernel is complemented by an extensive collection of runtime libraries, almost all of which are squeezed into a single DLL (with a size of around 230 KB) plus a few supporting Idle modules.
Idle is a simple but powerful scripting language, in basically the same vein as the venerable Perl or Python languages. It is, however, an altogether more lightweight application. At the core of Idle sits a tweaked and enhanced version of Lua. Idle inherits from Lua its elegant and powerful language definition as well as a highly-optimised interpreter kernel (an extremely fast compiler is included as well). Idle, like Lua, is readily extended with additional functions and libraries (which can be written either in C/C++ or in Idle itself).
This small language kernel is complemented by an extensive collection of runtime libraries, almost all of which are squeezed into a single DLL (with a size of around 230 KB) plus a few supporting Idle modules.
Crabs Remix - Weebl's Stuff
Crabs Remix - Weebl's Stuff: "Crabs Remix" Silly animation. Catchy, but not their best.
Emacs - Menus and CLISP
Here's an example of creating menus in Emacs, and combining it to do something useful in CLISP:
;; Creating a new menu pane in the menu bar to the right of “Tools” menu
(define-key-after
global-map
[menu-bar mymenu]
(cons "MyMenu" (make-sparse-keymap "hoot hoot"))
'tools )
;; Creating a menu item, under the menu by the id [menu-bar mymenu]
(define-key
global-map
[menu-bar mymenu nl]
'("Next Line" . next-line))
;; creating another menu item
(define-key
global-map
[menu-bar mymenu pl]
'("Previous Line" . previous-line))
(defun lisp-eval-buffer ()
"Send the current region to the inferior Lisp process.
Prefix argument means switch to the Lisp buffer afterwards."
(interactive)
;;(interactive "r\nP")
(comint-send-region (inferior-lisp-proc)
(point-min) (point-max))
(comint-send-string (inferior-lisp-proc) "\n"))
;; (switch-to-lisp t))
(define-key
global-map
[menu-bar mymenu pl]
'("Eval buffer" . lisp-eval-buffer))
;; code to remove the whole menu panel
;; (global-unset-key [menu-bar mymenu])
(lisp-mode)
(split-window-vertically)
(other-window 1)
(setq inferior-lisp-program "clisp -K full")
(run-lisp inferior-lisp-program)
(other-window 1)
Creative Commons Attribution 2.0 UK: England & Wales
Creative Commons Attribution 2.0 UK: England & Wales: "Attribution 2.0 UK: England & Wales"
An interesting Creative Commons Licence.
An interesting Creative Commons Licence.
Thursday, July 16, 2009
FREE SOFTWARE FOR DOS — Database & Spreadsheet Programs
FREE SOFTWARE FOR DOS — Database & Spreadsheet Programs: "Free Software for DOS
Database & Spreadsheet Programs"
This page:
GENERAL PURPOSE DATABASE PROGRAMS
SIMPLER DATABASE–LIKE PROGRAMS
DISK CATALOGERS
DATABASE VIEWERS AND EDITORS
DATABASE REPAIR
SPREADSHEETS
DATA FILE FORMAT CONVERTERS
Database & Spreadsheet Programs"
This page:
GENERAL PURPOSE DATABASE PROGRAMS
SIMPLER DATABASE–LIKE PROGRAMS
DISK CATALOGERS
DATABASE VIEWERS AND EDITORS
DATABASE REPAIR
SPREADSHEETS
DATA FILE FORMAT CONVERTERS
Tuesday, July 14, 2009
OpenDisc | About
OpenDisc | About: "OpenDisc is a high quality collection of open source software (OSS) for the Microsoft Windows operating system."
Monday, July 13, 2009
Lifehacker Code: Texter (Windows)
Lifehacker Code: Texter (Windows)
Texter saves you countless keystrokes by replacing abbreviations with commonly used phrases you define.
Unlike software-specific text replacement features, Texter runs in the Windows system tray and works in any application you're typing in. Texter can also set return-to markers for your cursor and insert clipboard contents into your replacement text, in addition to more advanced keyboard macros. Did we mention it's free?
Texter saves you countless keystrokes by replacing abbreviations with commonly used phrases you define.
Unlike software-specific text replacement features, Texter runs in the Windows system tray and works in any application you're typing in. Texter can also set return-to markers for your cursor and insert clipboard contents into your replacement text, in addition to more advanced keyboard macros. Did we mention it's free?
Sunday, July 12, 2009
Saturday, July 11, 2009
Friday, July 10, 2009
LINQ SQL example
This SQL statement ...
Dim strSQL as String = _
"SELECT Name, CustomerID FROM Customers"
... becomes this LINQ coding ...
Dim customers = From cust In Customers _
Select cust.Name, cust.CustomerID
Thursday, July 9, 2009
11 awesome applications you've never heard of - TechSpot
11 awesome applications you've never heard of - TechSpot: "11 awesome applications you've never heard of"
Wednesday, July 8, 2009
NOOP.NL: Top 200 Blogs for Developers (Q2 2009)
NOOP.NL: Top 200 Blogs for Developers (Q2 2009): "Top 200 Blogs for Developers"
Tuesday, July 7, 2009
Small, Smaller, Smallest Freeware
Small, Smaller, Smallest Freeware: "Small, Smaller, Smallest"
"Small, Smaller, Smallest -
Yes, it is possible to write small Windows programs - but who cares? -
If you do, have a look at these programs."
Contains an interesting collection of tiny Freeware apps.
"Small, Smaller, Smallest -
Yes, it is possible to write small Windows programs - but who cares? -
If you do, have a look at these programs."
Contains an interesting collection of tiny Freeware apps.
Saturday, July 4, 2009
No More Phone Solicitors - PhoneSpamFilter.co.uk
No More Phone Solicitors - PhoneSpamFilter.co.uk: "PhoneSpamFilter.co.uk"
Let's End Telemarketing Forever
If a telemarketer or phone solicitor calls you, type the number into the blank at the left. Then, you can submit a complaint about the caller. This updates our list with the latest information.
Let's End Telemarketing Forever
If a telemarketer or phone solicitor calls you, type the number into the blank at the left. Then, you can submit a complaint about the caller. This updates our list with the latest information.
Excel data forms
It is possible to enter data via a form, rather than on a spreadsheet directly. Choose menu item Data > Form
10 amazingly alternative operating systems and what they could mean for the future
10 amazingly alternative operating systems and what they could mean for the future Interesting list of alternative operating systems.
Friday, July 3, 2009
NoSQL/Home Page
NoSQL/Home Page: "NoSQL"
NoSQL is a fast, portable, relational database management system without arbitrary limits, (other than memory and processor speed) that runs under, and interacts with, the UNIX 1 Operating System. It uses the Operator-Stream Paradigm? described in "Unix Review", March, 1991, page 24, entitled "A 4GL Language". There are a number of "operators" that each perform a unique function on the data. The "stream" is supplied by the UNIX Input/Output redirection mechanism. Therefore each operator processes some data and then passes it along to the next operator via the UNIX pipe function. This is very efficient as UNIX pipes are implemented in memory. NoSQL is compliant with the "Relational Model".
NoSQL is a fast, portable, relational database management system without arbitrary limits, (other than memory and processor speed) that runs under, and interacts with, the UNIX 1 Operating System. It uses the Operator-Stream Paradigm? described in "Unix Review", March, 1991, page 24, entitled "A 4GL Language". There are a number of "operators" that each perform a unique function on the data. The "stream" is supplied by the UNIX Input/Output redirection mechanism. Therefore each operator processes some data and then passes it along to the next operator via the UNIX pipe function. This is very efficient as UNIX pipes are implemented in memory. NoSQL is compliant with the "Relational Model".
The L3 language and interface
The L3 language and interface: "The L3 language and interface"
l3lang(1) is a persistent, interpreted language designed to make interacting with scripts and the data they produce convenient. It does this by keeping track of all computed values (reducing file clutter), providing nested namespaces and functions (avoiding name clashes), and giving point-and-click access to the computed values through the script itself (avoiding the filesystem detour).
It is primarily used through l3gui(1), a worksheet-style interface. Long-running scripts can be executed without the interface, and the results loaded later for interaction.
To avoid the need to learn yet another language, L3 is compatible with a subset of Python and can use any Python library, including Python C/C++ extensions. In particular, the sparx tools (image processing) and NumPy (numerical linear algebra) are known to work. The RPy (statistical computing via R) package also works, but extra care must be taken to make sessions persistent.
In l3gui, every part of a script is an object and its value(s) can be examined via mouse menus, or reinserted into the gui for use in other scripts. This mechanism includes nested loops and function definitions; all values computed in a loop or function can be inspected later.
Scripts and code fragments can be assembled as structures, providing graphical script construction for problems with few steps.
l3lang(1) is a persistent, interpreted language designed to make interacting with scripts and the data they produce convenient. It does this by keeping track of all computed values (reducing file clutter), providing nested namespaces and functions (avoiding name clashes), and giving point-and-click access to the computed values through the script itself (avoiding the filesystem detour).
It is primarily used through l3gui(1), a worksheet-style interface. Long-running scripts can be executed without the interface, and the results loaded later for interaction.
To avoid the need to learn yet another language, L3 is compatible with a subset of Python and can use any Python library, including Python C/C++ extensions. In particular, the sparx tools (image processing) and NumPy (numerical linear algebra) are known to work. The RPy (statistical computing via R) package also works, but extra care must be taken to make sessions persistent.
In l3gui, every part of a script is an object and its value(s) can be examined via mouse menus, or reinserted into the gui for use in other scripts. This mechanism includes nested loops and function definitions; all values computed in a loop or function can be inspected later.
Scripts and code fragments can be assembled as structures, providing graphical script construction for problems with few steps.
Linq to Sql example
linq to sql
Still a bit fuzzy.
In Databse explorer, add an MDF type file. O/R mapping only works with MDF files, not SDF or MDB files.
pROJECT > aDD cLASS > Linq to Sql
If your database is Foo, it is best to label it as Foo, thereby creating Foo.dbml.
You have created a customer object. It opens up the O/R designer. Take a note of the Name property. It'll be something like $BazDataContext
Drag the relevant table from the Database Explorer to the O/R designer. that creates a table object. It automatically created a LinqToSql class for you.
Press save.
Go to Data Sources tab (on right).
Add new data source
Choose a Data Source Type: Object
Expand your application name until you find the relevant object
This will create a data source in the Data Source window.
Go to a form.
From the data sources panel, drag the dataset you are interested in onto the form.
Enable save:
Click the save button
Enabled: True
double-click it. Enter code for
PeopleBindingNavigatorSaveItem_Click
You can add a search button and obtain code like this:
Public Class Form2
Private Db As New BazDataContext()
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Db.Log = Console.Out
MySubitems()
End Sub
Private Sub MySubitems()
Dim qryString = "*" & txtSearch.Text & "*"
Dim recs = From rec In Db.Peoples _
Where rec.name Like qryString _
Order By rec.name _
Select rec
Me.PeopleBindingSource.DataSource = recs
End Sub
Private Sub PeopleBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PeopleBindingNavigatorSaveItem.Click
Me.Validate()
Me.PeopleBindingSource.EndEdit()
Try
Db.SubmitChanges()
MsgBox("Saved changes")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
MySubitems()
End Sub
Private Sub txtSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSearch.Click
End Sub
End Class
Created: 04-Jun-2009
Thursday, July 2, 2009
Wednesday, July 1, 2009
MindTouch (frmly deki wiki) | Get MindTouch (frmly deki wiki) at SourceForge.net
MindTouch (frmly deki wiki) | Get MindTouch (frmly deki wiki) at SourceForge.net: "MindTouch (frmly deki wiki)" MindTouch is an enterprise wiki and collaborative portal. Easily connect people, systems, web services, and Web 2.0 applications for enterprise automation, mashups and superlative wiki collaboration. RESTful wiki, Services wiki (WOA), Programmable wiki.
Subscribe to:
Posts (Atom)