Welcome to my blog, here you will find general ramblings about life the multiverse and everything as well as some random geeky tips I'll probably come up with oh..and you might learn what I'm up to while you're at it!

Monday, 29 September 2008

Virtual box vboxsvc chews up ram/cpu

Recently I have been playing with virtual box by sun. The reason for this is I run vista x64 as my development machine (it's got more ram, better processor and oodles more hard drive space than my mac book pro), which the only version of vmware which I used to use will work is the 2.0 vmware server beta version.

Vmware server 2.0 in my opinion is fugly! The interface is web one running on an apache server it installs on your pc..really what was wrong with the old interface? It's slow and makes adding hard drives/isos far more complicated than before.

So I installed virtual box, unfortunatly if I leave the pc on for say a day or so it will chew the cpu and ram so much the host machine hangs.

Now apparently this is caused by a memory leak in vista which is noted on the virtualbox download page there is a hotfix from microsoft but you have to request it which is a pain.. so a google around found this which I downloaded and replaced the old files with the new ones and woot! No problems, infact I have been running virtual box all day and the service has used 4MB of ram, compared to the 600 to 1000 it was previously!

Sunday, 28 September 2008

Running Unix Pipe Commands in Java

I was trying to run the command last -1 rowan | awk '{print$3}' via java (it prints the last time I logged on i.e. Tue). For some reason java didn't recognise the | symbol.

The solution as found here http://www.artima.com/legacy/answers/Jul2001/messages/300.html is

Process p = Runtime.getRuntime().exec(new String[] {
"/bin/bash","-c", "last -1 rowan | awk '{print$3}' "
});

Labels: , , , ,

Java technquies

Well I've just written my first java app that's not related to my degree.

The app is designed to launch different applications depending on what day it is.

A few useful thing's I have found.

How to convert an array to a string:
private String arrayToString(String[] arr)
{
String str = "";
for(String val : arr)
{
str = str + " " + val;
}
return str;
}



How to run a program:

Process prcs = Runtime.getRuntime().exec(element);
InputStream cmd_output = prcs.getInputStream();
int ch;
StringBuffer sb = new StringBuffer(512);

while ( ( ch = cmd_output.read() ) != -1 )
{
sb.append((char) ch);
}

(Note element is a String[])

Labels: ,

Thunderbird Identities

So I had to send an email from my work account but not from my work address (remember a few weeks ago I merged my emails into 3 accounts)..so I look at thunderbird and think.."how on earth do I do that"..well it's easy.

Click Tools
Click Account Settings
Click the account you want to manage
Click "Manage Identities" near the bottom right of the window
Click Add
Type in the email address and any other info you want to send from and voila!

EEk Restore!

Since I've been at this java lark for university I thought I'd get some practice in..so I compile a simple hello world app...SHOCK HORROR...it doesn't work when running java -jar myfile.jar I get the error "Exception in thread "main" java.lang.NoSuchMethodError: main"...so I try and install netbeans...>.> doesn't work it says I've the wrong OS version...I try installing other apps I've already got installed that doesn't work either!

So I have to restore from time machine...I do a system restore to yesterday...didn't work booted up with a circle with a line through it error sign...restored back to os x version 10.5.4...worked fine...updated to 10.5.5 still works fine, yay! I'm happy again!

Monday, 22 September 2008

6th isn't looking so good...

Just done the first half of part 2 of the specimen paper...(yeah sounds a lot it's not really only 2 and a half sides of A4 paper).

Firstly MY GOD handwriting is hard I get cramp after a few lines...how on earth I'm going to manage a full test I've no idea.

Secondly I feel sorry for the poor sod that has to mark my test, my handwriting is worse than a 4 year old's >.> at least they have big letters. I suppose this is what I get for writing nothing more than a shopping list by hand in the past 4 years.

Finally after I marked it..I only got 56% sodding percent, its amazing how difficult it is to get things right first time when you can't test what you're writing and your hand is seizing up...I'm thinking of writing a request to the university to let everyone do it on a computer, hell it would be easier doing it on a commodore 64 than a bloody pen and paper


[/end rant]

Sunday, 21 September 2008

Not a happy chappy..

I've been "trying" to get ready to do my final exam for my m255 course which is on the 6th of october...now to get a distinction I need 85% which considering I'm not a fan of sit down exams won't be the easiest thing in the world.

So I've looked at the specimen paper on the course website and checked it against the answers so I know what to work on..slight problem there is only one speicmen paper so I can't find out if what I've read up on has made any difference....

I checked the OU website for more exam papers and got my hopes up for a few minutes when I found some!! Ok you have to pay 1.25 (heh I just noticed my pound key is bringing up a hash meh I'll fix it later) each but it'd be worth it if it helps...

BANG my bubble is burst...the papers have no answers!! Oh well at least I found out before paying for them...

Now back to sitting here wondering how I'm going to do and debating if getting blind drunk so I forget the answers to the specimen paper then attempting it again will help....

Saturday, 20 September 2008

M255 TMA04

Well my fourth and final course work test has been marked, I got 85% around 5-10% less than normal but still a distinction. The lower mark wasn't a surprise since the last question was a wordy one..and I hate wordy questions so I didn't really put a vast amount of effort in :P

Now onto the written exam..I need 85% in that for a distinction..it looks like it's going to be hard!

A friend says "I have a virus!"

A friend said to me she had a virus! Virtmundo, smitfraud and zlob...and she says spybot and avast can't tackle it...so I ask her to send me a hijack this log..log comes to me..all looks clean, I tell her she's no viruses...she says when she scans with spybot it says their names at the bottom but it doesn't display anything in the results....DOH!

I reveal to her that that is what spybot is looking for...not what you're infected with...ahh the average computer user can be funny at times XD

Thursday, 18 September 2008

Firefox 3 Smart Bar

Really annoying? Yes! As you may know I develop websites, and like anyone with any sense I develop them locally before uploading them, so the live version and localhost version have the same titles...so I want to access the live one..I type in the address which logically resembles the title of the page and what do I get? The localhost version...

After a quick google I found http://www.pcmech.com/article/firefox-3-disable-the-smart-location-bar-sort-of/ this. It tells you how to disable the "smart" bar.

Firstly type about:config into the address bar, then filter it by urlbar, change
browser.urlbar.matchOnlyTyped to true and browser.urlbar.maxRichResults to 1 and voila! All done!

PHP Bug Fixed!

Yay, the bug I reported about floats being squiffy in php5.2.2 and above has finally been fixed in cvs see http://bugs.php.net/bug.php?id=43053

Tuesday, 16 September 2008

OU & Mac

Found a useful site on OU stuff and macs http://open.homelinux.org/index.php?n=Main.Home.

I added my tutorial for bluej and mac to it :)
Well just been to the vet (doctors) because I've had a bunged up ear for a week with a dull ache. He said come back in a week if it doesn't clear up joy...

OU Final Test

Well I realised earlier today/late yesterday that my final exam for my current module is on the 6th of oct, I thought it was the 15th, so I had a quick read through the specimen paper...looks like I'm going to have to hand write java classes...with a pen! Eek not something I'm looking forward to I emailed my tutor to clarify!

Reversals and Paypal

Gotta love some people >.> as you may know I run a game www.dragon-hearts.co.uk and just now (7am nice wake up call >.>) I've had £66.50 worth of payments over the past month cancelled by one buyer grrr, now that may not seem like a fortune but it's a fair bit to me, whats really annoying since my goods are virtual there is no protection from paypal and the buyer didn't even warn me >.> they better have a good reason or they won't be playing ever again.

Sunday, 14 September 2008

Email

Ever noticed how email can be complicated!

Running several websites and being on several mailing lists caused problems, so I've gone through my email accounts and narrowed them down to just 2 accounts, emails for the other accounts will be forwarded. This should save me a few imap connections and time remembering all my logins!

Saturday, 13 September 2008

I'm going blind from coding...

Well probably :P anyway after 3 days recoding www.mysecretkitchen.co.uk I've uploaded and sent it to the site owner for testing, hopefully now it will be a lot easier to add new features.

It was quite fun!

Tuesday, 9 September 2008

I've just finished watching x-men 1 through 3..(yes I have no life) somewhat restless of late I think the lack of degree work is the cause, nothing new to stimulate my mind is driving me nuts.



My next course starts on the 4th of October so a little whole to wait still.



In the meantime yesterday I ordered a couple of books on photoshop, I have 27 days of the trial left, if I can become any good with it I'll probably buy it (being a student I can get it for non commercial use at discount) which would be helpful to show potential future employers I have photoshop skills.

Monday, 1 September 2008

MacOS X Adobe Reader 9 - An internal error occurred

Just a quick blog before bed.



I've had a problem with adobe reader 9 for a few days and never got around to fixing it. Whenever I launched it I got the message "An internal error occurred" then it crashes and the apple report system pops up.



Googling around I found that checking the disk permissions might help so I tried that...no avail.



Turned out that the /users/<username>/library/application support/adobe/acrobat folder had the wrong permissions (my user had no permissions only system had access) popped myself in with read and write and woomf! Works fine now :)

PowerGorilla

Ever wanted to power your laptop via the sun? Well check this out roll on sept 26th!...I wonder how much it'll cost?
waterfall
Name: Rowan