Ivor O’Connor

March 31, 2009

New Free Host

Filed under: Uncategorized — ioconnor @ 11:07 pm

I’ve signed up for free hosting and my new free site is at http://ioconnor.atbhost.net/

It’s slow. I must do something else while waiting for it to ask for my password when I sftp to it. It’s free though. And that’s what matters to me.

The interface is clean and easy to understand. So clean and easy I did not bother taking any time to read up on anything. It’s pretty much intuitive. And when I say clean I mean there are no rude adverts constantly popping up as the other free websites had.

If you want to try it out yourself you can find it at www.atbhost.net.

Perhaps in the future I’ll find problems with it but as of now it’s doing its job.

Hosting Providers?

Filed under: Uncategorized — ioconnor @ 4:50 am

I’d like to put up some code examples but can’t until I have a host so I am revisiting the issue. Ideally I’d like something free.  For now I have some review-sites to review. They are:

  1. Web-hosting-top.com
  2. Hostingreview.com
  3. Top10webhosting.com
  4. Top-10-web-hosting.com
  5. Hostcritique.com

The above host review-sites looked outdated for the most part. For instance they display very outdated prices for most if not all of the host providers. Anyways they mentioned the following host providers:

  1. 1&1 Hosting
  2. BlueHost
  3. DreamHost
  4. easyCGI
  5. FastDomain
  6. FatCow
  7. GoDaddy
  8. GreenGeeks
  9. HostGator
  10. HostMonster
  11. HostPapa
  12. In Motion
  13. IPower
  14. IX WebHosting
  15. JustHost
  16. LunarPages
  17. PowWeb
  18. StartLogic
  19. SuperGreen
  20. Yahoo! Small Biz

This will be a work in progress until I’ve narrowed it down. As the week progresses I’ll look into each of them to get an idea of the various attributes that are important to me. I think I’ll end up with two hosts for redundancy.

Maybe this will not take so much time. I found a site handling free websites. You can actually search for the sites at this URL:
http://www.free-webhosts.com/power-search.php

I used the search criteria and was surprised to get a hit:
Scripting:PHP,
Features Supported:”Unlimited Bandwidth”,
Upload By:SSH, FTP

I tried another search for just “scripting:C/C++” and got no returns. It’s a sad World that does not support C/C++. I’ll try out this hit before looking at the ones I have to pay for…

I’ve tried signing up for a few of these “free” hosts. Most of them are bogus. For instance “free” if you sign up for something else that costs is bogus. Alerts saying the browser must be updated is also bogus. However at the site http://atbhost.net they mention the sites absolutely-free-hosting.com and freewebspace.net which might be better than free-webhosts.com for finding free hosting.

Actually I’m tired of trying to find a free site. If somebody could vet a real free site that would be great but I suspect it would take me too much time to justify this…

March 26, 2009

Our Government Fighting The Symptoms Again

Filed under: Uncategorized — ioconnor @ 4:09 pm

So we are trying to blame Mexico for everything to do with drugs. Aren’t we the country that’s suppose to award entrepreneurs? So instead of jumping on the people who are taking the drugs we are jumping on the entrepreneurs who supply the drugs! That’s backwards. We are fighting the symptom here. But wait. Why are the drugs illegal in the first place? Haven’t we been down this road already with alcohol during the last century? The solution was to allow it and then put away the people who actually can’t handle it. The drunk drivers. Seems like our government may not be up to the capitalistic rhetoric they spew. They could be making a lot more money if they legalized the recreational drugs like they do in Holland.

Probably we don’t fix the cause because despite our capitalistic ways we have confused religious zealots making our laws.

So Hillary Clinton is now in Mexico spewing militaristic solutions to fight the symptoms of symptoms. Does it never end? Perhaps this trip is merely to take the focus off how Obama is no different than Bush…

UPDATE 2009.03.30

This topic has taken a few interesting twists. It seems my views are not new or unheard of. In fact they are already being addressed by our politicians. It started on the 26th when Hillary Clinton started making the news:

Clinton Admits US Drug War Failure

Secretary of State Hillary Clinton has admitted US drug policy has not only been a failure but has in fact fueled Mexico’s drug war. Speaking to reporters at the outset of her trip to Mexico, Clinton said, “Clearly what we’ve been doing has not worked…I feel very strongly we have a co-responsibility. Our insatiable demand for illegal drugs fuels the drug trade. Our inability to prevent weapons from being illegally smuggled across the border to arm these criminals causes the deaths of police, of soldiers and civilians.” Clinton’s comments are being called the most far-reaching by a senior US official in accepting responsibility for the rampant drug trade.

And on the next day:

Obama Questioned on Marijuana Legalization in Online Town Hall

President Obama fielded questions from internet users nationwide Thursday in the White House’s first-ever online town hall. … The questions were selected following an online vote. The most popular question asked Obama to comment on whether he thinks legalizing marijuana could help boost the economy. Obama answered no, but didn’t rule out legalization outright. White House Press Secretary Robert Gibbs, however, later said Obama opposes legalization.

It’s on the radar. They’ll ignore it for a while. However there are no other solutions. As the recession moves into a depression this topic will be revisited and fixed. At some point in time we’ll get rid of these drug wars and start making a profit from recreational drugs. And just for the record. I do not take drugs and think myself an impartial spectator on this issue.

March 25, 2009

New World Currency

Filed under: Uncategorized — ioconnor @ 11:42 am

Yesterday China proposed a new World currency. Of course English speaking news agencies downplayed this as something far in the future. However if I’m right and we are entering a depression that will last decades this new World currency will be on top of us before we blink. Certainly well before we are out of the depression. Think about after WWII where we were the only nation left standing capable of producing what the rest of the World needed. Now we’ve outsourced most of our factories and produce very little of what we need. The rest of the World does not need anything from us. We are a debtor nation whom uses the fact our currency is the Worlds standard to hide the fact we are a debtor nation. And the businesses we do have are small business mostly based on service industries. That is selling and distributing what other countries produce. So what are we going to do with the few remaining years we have left before the World gets off our currency? (Notice the chart on the side has more than 50% of the Worlds reserves missing from it. The EU is now a bigger market than our American economy. It is entirely possible with 60% of the economy off this chart the Euro could be the Worlds currency even now.)

Obama has said his focus will be the health care system, education, economy, and energy. He leaves out that cancer called our military industrial complex which is bankrupting our nation. I’ll include it since it will destroy us no matter what else we do. Sure it’s big business to a few companies who have monopolies but the arms race bankrupted the USSR, and like Osama Bin Laden said, it will bankrupt us too. Funny how so few people saw it when he said it and how few people realize it even now. However sticking to Obama’s current priorities:

1) Health care system. Obama at one point in his political career embraced Government funded health care. This is the only solution. However it is no longer on the books. All other industrialized nations have this. It cuts out the middle men, the insurance companies, which are the only people who profit. This topic won’t go anywhere until we hit the depression and have no other choice. So we are failing horribly on this topic.

2) The educational system. This is going nowhere too. It’s still unpopular to be an Engineer. Our schools are still underfunded. We are giving money to home schooling which is usually a way to circumvent the system so religious fanatics can brain wash their kids. And as a result we are the only industrialized nation religion continues to grow and debates on evolution continue. Obama could easily boost the educational system but he has not done so. Why?

3) Economy. Obama needs to let companies go Bankrupt. Until he does our economy is not going anywhere. We will know things have changed when big business lobbyists no longer get billion dollar quarterly bailouts.

4) Energy. Our energy grid is outdated. It needs to be upgraded so we can transport energy from remote locations where solar and wind can produce energy to where the energy is needed. This is going nowhere. Then there is the clean renewable energy that is not going anywhere. There are only two technologies that are clean and renewable. That’s solar and wind. (Nuclear is not green since it produces incredibly dangerous waste we have no way of safely removing. Plus it produces monopolies and nuclear material for bomb building both of which further hurt our economy.) Unfortunately I don’t see any government programs to build turbines. Or solar farms. Or even minor tax reliefs for home owners wanting to put in PV. Getting off fossil fuel might not be popular with the energy cartels but it would allow us Americans to start producing something the rest of the World needs and possibly turn us into a non-debtor nation. Obama needs to set some goals here. This is a low hanging fruit, easy to tackle, highly visible, etc.. Yet Obama does nothing here either.

We are starting a decades long depression that will last at least 20 years. More than likely it will last a couple of generations, 40 years or more, which we will never see the end of. In the future we will no longer be able to print off more money and buy creature comforts to fool ourselves into complaceny. So it sure would be nice if the Obama administration were a bit different than the Bush administration and lay a foundation with our monopoly money before the World has a chance to move off it.

March 23, 2009

SQLite Humorous Cover-Ups Or?

Filed under: sqlite, Uncategorized — Tags: — ioconnor @ 8:54 pm

http://www.sqlite.org/faq.html#q17

Quality assurance in SQLite is done using full-coverage testing, not by compiler warnings or other static code analysis tools. In other words, we verify that SQLite actually gets the correct answer, not that it merely satisfies stylistic constraints…

Uh huh. They go on to say everything is rosy and no errors or warning messages are seen in their own environments. I wonder who wrote this provocative prose? And why.

http://www.sqlite.org/faq.html#q19

Transaction speed is limited by the rotational speed of your disk drive. A transaction normally requires two complete rotations of the disk platter, which on a 7200RPM disk drive limits you to about 60 transactions per second.

Is this from the same author?

Sure would be nice if there were an estimate of when foreign keys and outer joins can be expected. Surely the foreign key question must be their number one FAQ yet it’s not mentioned anywhere on their site.

I hate swimming

Filed under: Uncategorized — ioconnor @ 4:09 am

What’s there to like about swimming? It’s wet. It’s cold. You get water up your nose. In your ears. In your mouth. In your nasal cavities. In your stomach. In your lungs. This is water other people have spit out in the lanes next to you. It’s the crap off those old people and piss from the young kids. And more. It’s chlorine. It’s dirty. And I’m not even talking about ocean water yet…

I can’t count all the times I’ve reached down to pick up something hours after a swim only to have water come pouring out my nose. Or have water seep out my ear late at night as I try to sleep. Or the hypothermia that creeps up on ocean swims you don’t notice until stumbling out of the water. That’s probably the worst part since it sometimes takes a day to fully recover.

I guess we are human and have to put up with being human and living in this world. Still it grosses me out. Not to mention I’m slow at it. That’s probably it. Sour grapes. I guess swimming would not be a problem if I could do one mile in less than 30 minutes. 1760 yards to a mile, 50 yards to a lap, 36 laps to a mile. Basically 36 laps at an average of less than 50 seconds per lap. Hmmm.

This is one of those situations where I’m pretty sure it’s sour grapes. I need to hunker down and put in some pool time each day. It’s not going to kill me and perhaps I’ll quit whining…

I have a solution I’ve been meaning to try. I lose count making long pool swims problematic. However if I took a rubber band with me and moved it from finger to finger on the flips I’d be able to keep count. (On the flips my hands are next to each other.) Can a single rubber band solve one of life’s biggest problems? Possibly, especially with a backup rubber band in case the first breaks, I will have turned the corner on this most hated of topics. Ten laps kicking to acclimate then 36 laps on the clock. Nothing strenuous. I’ll give it a try tomorrow and see how it goes…

UPDATE 2009.04.04: It has not been going well. First off I’ve had trouble remembering to take the rubberbands with me. Working a new procedure into my rituals is never without problems. Then there’s the problem of rubber bands being difficult to quickly grab and move to another finger. I’ve gone through a few now. I’ve even gone to a department store to buy various ones. Currently I have two. One fat wide yellow band slightly bigger than my fingers. And the other is a super wide green band slightly smaller in diameter than the yellow band. I have yet to try it. I don’t lose the yellow because I use it to tie the goggle straps together. I’m going to look for some hair bands. If I could quickly grab the hair band without worry of pulling or scratching my skin off things would go better. Still this simple technique has been working.

JustHost.com?

Filed under: Uncategorized — ioconnor @ 2:59 am

I’m looking at http://www.justhost.com and wonder why their landing page prices don’t reflect their order pricing. Or why their website does not display properly using firefox. Or why they have footnote numbers on their promotions but no footnote text at the bottom of their pages. Then there is the fact they’ve black hatted their SEO results on google so their hype shows up repeatedly on various sites yet google does not penalize them for this.

I think I’ll avoid justhost.com. I can’t find anything wrong with them. It’s more along the lines of what I don’t see that scares me off…

March 21, 2009

My Find Utility

Filed under: Uncategorized — ioconnor @ 9:44 pm

I tend to get customers that I can’t hear correctly over the phone. Sometimes I hear ‘b’ instead of ‘v’ or transpose a character. Having a search utility that overlooks my small typos is handy. The following finds an exact match when there is one, which is nice when there is an exact match, but more importantly it finds the files that are meant. Not necessarily what it was exactly told to fetch. There can still be a few holes. For instance when it matches a typo to an exact file. However this version gives a few clues as what could be wrong. This is done by showing the term with the fuzziness in parens followed by how many files matched with how many of those are in the global set of matching files. Perhaps a term needs to be changed…

It gives output like this on the command line plus it opens the files up with gvim in another window

:~$ f thomas jefferson
:TERM: thomas(0) 53 53
:TERM: jefferson(0) 23 1
/customers/customer_4855.shtml

real 0m1.917s
user 0m1.248s
sys 0m0.312s
:~$

The following is the actual code. It could be cleaned up a bit but I really do not like bash scripting and so find it an incredibly odious task. I must remind myself if it is over 10 lines of code to write a C++ piece of code. Grrrrrrrr


#!/bin/bash
####################################################################################################
# DESCRIPTION
# Searches through a directory looking for files containing all of fuzzy search terms specified
# Very handy in avoiding duplicating customer records because of slight mispellings
#
# EXAMPLE
# f xxx yyy zzz
#
# TODO
# 1
#
# BUGS
#
####################################################################################################
# GLOBALS
#===================================================================================================
G_FileList=""
G_Fuzz=""

####################################################################################################
#===================================================================================================
function printStatus() {
echo ":TERM: " $1"("$G_Fuzz")" $(echo $G_FileList | wc -w) $(echo "$2" | wc -w)
}

####################################################################################################
#===================================================================================================
function getFileList() {
searchTerm=$1
G_FileList=""
for (( G_Fuzz=0; G_Fuzz<3; G_Fuzz++ )); do
G_FileList=$(agrep -$G_Fuzz -i $searchTerm /customers/*.*html /customers/*.php | awk -F":" '{ print $1 }' | sort -n | uniq );
if [[ 0 != $(echo $G_FileList | wc -w) ]]; then
break
fi
done
}

####################################################################################################
#===================================================================================================
function main() {
getFileList $1
MasterFileList=$G_FileList
printStatus $1 "$MasterFileList"
shift
for var in "$@"; do
if [[ 0 != $(echo $MasterFileList | wc -w) ]]; then
getFileList $var
MasterFileList=$(echo $MasterFileList $G_FileList | tr " " "\n" | sort | uniq -d )
printStatus $var "$MasterFileList"
else
echo "No files contain the search terms"
break
fi
done
if [[ 0 != $(echo $MasterFileList | wc -w) ]]; then :
echo $MasterFileList | tr " " "\n" | head
gvim +/$1 $MasterFileList
fi
}

time main "$@"

March 19, 2009

California Weekly Payroll Client Side Browser Application

Filed under: Uncategorized — Tags: , — ioconnor @ 10:14 pm

screenshot-tax-calculations-mozilla-firefox

I’ve been working on a client side browser application to compute taxes and print pay stubs on a weekly basis in California. This is a picture of the main display as it now stands. When the submit key is pressed a new window is opened that contains the employees’ pay stub ready to be printed.

The information at the top is filled dynamically as information is entered in the fields below. The idea is to give an idea of what the pay stub will look like when the submit key is pressed.

However I’m having trouble finding a free website to post the working application. Google sites, which was my first choice, does not allow javascript! This client side browser application is all about javascript. Does anybody know a free site I can sign up on and post to?

Until then I’ll work on getting the google gears portion of it working so I can do the year-to-date calculations which it currently lacks…

March 17, 2009

Sorry state of “agrep”…

Filed under: awk/sed, bash, cli, Linux, ubuntu, vi — Tags: , , , , , , — ioconnor @ 7:27 pm

One very useful tool is “agrep”. Say a customers calls in and they live on “pentrose”. If you had a directory of customers you might be able to do a search for them by typing “agrep -i -2 pentrose *.*”. The “-2” says find any characters that are off by two or less from “pentrose”. So “Penrose”, “pentroose”, “Pentrous” and “Pentrouse” would all have matched. This is very helpful especially considering google maps and thomas brother maps often spell street names slightly different. Unfortunately the “-l” option telling agrep to list the file names does not work. See the following dump:

/customers$ agrep -V

This is agrep version 3.0, 1994.

/customers$ locate agrep
/usr/bin/agrep
/usr/share/doc/agrep
/usr/share/doc/agrep/README.gz
/usr/share/doc/agrep/agrep.algorithms
/usr/share/doc/agrep/agrep.ps.1.gz
/usr/share/doc/agrep/agrep.ps.2.gz
/usr/share/doc/agrep/changelog.Debian.gz
/usr/share/doc/agrep/changelog.gz
/usr/share/doc/agrep/contribution.list
/usr/share/doc/agrep/copyright
/usr/share/man/man1/agrep.1.gz
/var/cache/apt/archives/agrep_4.17-5_i386.deb
/var/lib/dpkg/info/agrep.list
/var/lib/dpkg/info/agrep.md5sums
/customers$ agrep -il -1  biider *.*html
customer_2401.shtml
*** glibc detected *** agrep: double free or corruption (top): 0x0821bf48 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7e8aa85]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7e8e4f0]
agrep[0x804b7df]
agrep[0x805751c]
agrep[0x8055dea]
agrep[0x80571bc]
agrep[0x8057228]
agrep[0x8066519]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7e35450]
agrep[0x8048b81]
======= Memory map: ========
08048000-08068000 r-xp 00000000 08:01 6931968    /usr/bin/agrep
08068000-08069000 rw-p 00020000 08:01 6931968    /usr/bin/agrep
08069000-0823a000 rw-p 08069000 00:00 0          [heap]
b7b00000-b7b21000 rw-p b7b00000 00:00 0
b7b21000-b7c00000 —p b7b21000 00:00 0
b7cdf000-b7ce9000 r-xp 00000000 08:01 5744705    /lib/libgcc_s.so.1
b7ce9000-b7cea000 rw-p 0000a000 08:01 5744705    /lib/libgcc_s.so.1
b7cfd000-b7cfe000 rw-p b7cfd000 00:00 0
b7cfe000-b7d3d000 r–p 00000000 08:01 6964092    /usr/lib/locale/en_US.utf8/LC_CTYPE
b7d3d000-b7e1e000 r–p 00000000 08:01 6964091    /usr/lib/locale/en_US.utf8/LC_COLLATE
b7e1e000-b7e1f000 rw-p b7e1e000 00:00 0
b7e1f000-b7f68000 r-xp 00000000 08:01 4252758    /lib/tls/i686/cmov/libc-2.7.so
b7f68000-b7f69000 r–p 00149000 08:01 4252758    /lib/tls/i686/cmov/libc-2.7.so
b7f69000-b7f6b000 rw-p 0014a000 08:01 4252758    /lib/tls/i686/cmov/libc-2.7.so
b7f6b000-b7f6e000 rw-p b7f6b000 00:00 0
b7f70000-b7f71000 r–p 00000000 08:01 6964097    /usr/lib/locale/en_US.utf8/LC_NUMERIC
b7f71000-b7f72000 r–p 00000000 08:01 6964100    /usr/lib/locale/en_US.utf8/LC_TIME
b7f72000-b7f73000 r–p 00000000 08:01 6964095    /usr/lib/locale/en_US.utf8/LC_MONETARY
b7f73000-b7f74000 r–p 00000000 08:01 6971396    /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
b7f74000-b7f75000 r–p 00000000 08:01 6964098    /usr/lib/locale/en_US.utf8/LC_PAPER
b7f75000-b7f76000 r–p 00000000 08:01 6964096    /usr/lib/locale/en_US.utf8/LC_NAME
b7f76000-b7f77000 r–p 00000000 08:01 6964090    /usr/lib/locale/en_US.utf8/LC_ADDRESS
b7f77000-b7f78000 r–p 00000000 08:01 6964099    /usr/lib/locale/en_US.utf8/LC_TELEPHONE
b7f78000-b7f79000 r–p 00000000 08:01 6964094    /usr/lib/locale/en_US.utf8/LC_MEASUREMENT
b7f79000-b7f80000 r–s 00000000 08:01 6947512    /usr/lib/gconv/gconv-modules.cache
b7f80000-b7f81000 r–p 00000000 08:01 6964093    /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION
b7f81000-b7f83000 rw-p b7f81000 00:00 0
b7f83000-b7f84000 r-xp b7f83000 00:00 0          [vdso]
b7f84000-b7f9e000 r-xp 00000000 08:01 5693498    /lib/ld-2.7.so
b7f9e000-b7fa0000 rw-p 00019000 08:01 5693498    /lib/ld-2.7.so
bf89e000-bf8c4000 rw-p bffda000 00:00 0          [stack]
Aborted
customers$

You’d think such a handy utility would be kept up-to-date. Yet it says it is version 3 from 12 years ago. This is not true. The actual version synaptic gives is 4.17-5.

To get around this goofiness and get the documented “-l” option without the core dump use:

/customers$ agrep -i -1 biider *.* | awk ‘{ print $1 }’ | sort | uniq
customer_2401.shtml:
customer_6986.php:
/customers$

I just put it into a script file called “f” so I can simply type “f biider” and view the files…

#!/bin/bash
if [ “1” = “$#” ]; then
time gvim +/$1 $(agrep -1 -i $1 /customers/*.*html /customers/*.php | awk -F”:” ‘{ print $1 }’ | sort -rn | uniq )
elif [ “2” = “$#” ]; then
time gvim +/$1 -n $(agrep -2 -i $2 $(agrep -1 -i $1 /customers/*.*html /customers/*.php | awk -F”:” ‘{ print $1 }’ | sort -rn | uniq) | awk -F”:” ‘{ print $1 }’ | sort -rn | uniq )
else
echo “wrong number of arguments”
fi

agrep is so very useful. Somebody really should fix it. Until then use my workaround.

Older Posts »

Blog at WordPress.com.