My Green Lighting discount code

I just ordered some Alaska LED 3W downlights for my kitchen from http://www.mygreenlighting.co.uk, to replace the 50W lights that are starting to burn out. My annual electricity bill should go down by £65 as a result.
Here’s a discount code you can use if you want to order any. Should give you a 5% discount and I think I get some loyalty points in the process. Anyhow .. if you place an order try this code: AAA AEL AKK. If it doesn’t give you a discount, take it off and let me know.

Posted in Uncategorized | Leave a comment

Switzerland Hotels

You’re probably already using www.hotelsearchengines.net to search for hotels. It takes results from all the major hotel search websites and shows you which one gives you the best price.

If you don’t want to see all the cities in the world, then there are sites specific to cities and countries. Take www.switzerland-hotels-comparison.com for example. This site has been around since 2003 but has just had a revamp. Check it out.

Posted in Hotels | Leave a comment

Funny signs

If you’re bored at lunch, check out www.kiwisfunnysigns.com for a collection of photos, mainly of either deliberate or unintentional humourous signs.

Posted in Uncategorized | Leave a comment

Joomla debug log

Just starting to use Joomla over Seagull and finding that I miss the debug log. In fact debugging in general seems a bit of a pain. I keep getting 500 server errors for no reason I can work out.

Here’s what I am doing now to simulate the SGL::logMessage() function.

In each file …

jimport('joomla.error.log');

In each class I create …

private $log = NULL;

function __construct($config = array()){       
    parent::__construct($config);
    $options = array('format' => "{DATE} {TIME} {FUNCTION}: {COMMENT}");
    $this->log = &JLog::getInstance('debug.log.hqevent.log',$options);       
    $this->log->addEntry(array('function' => __CLASS__ . '.' . __FUNCTION__, 'comment' => ""));   
}

Then at the top of each function within each class ..

$this->log->addEntry(array('function' => __CLASS__ . '.' . __FUNCTION__, 'comment' => ""));

And I do want to add a comment, then add something in the comment value, e.g.

$this->log->addEntry(array('function' => __CLASS__ . '.' . __FUNCTION__, 'comment' => "alias = [$alias]"));

 

 

 

Posted in Online Business, Websites | Leave a comment

Hackintosh

Here are my notes for how I set up my Toshiba L450 17Q to run as a Mac. It’s almost completely built so I don’t have the early steps. If I get around to it I’ll put them in. In the meantime …

I bought a copy of Snow Leopard from the Apple Store £26, and followed the guide on www.tonymacx86.com for the installation.

Fixes:

  • No wireless. Didn’t want to spend too much time on this so bought this incredibly tiny wireless USB dongle. Edimax 150n Wireless Nano USB. This is seriously a tiny usb dongle but works very well.
  • The ” and @ keys are the wrong way around. Fixed this by following the instructions here: http://www.liquidstate.net/2008/07/09/my-hackintosh/
  • If I left the laptop for a few hours I’d come back and it was frozen. Only a cold reboot would fix it. There was nothing in the bios that looked to cause it, so I turned off all the Mac power management options to prevent it going to sleep. Seems ok so far.
  • Google Chrome doesn’t seem to work too well with Flash. Specifically club penguin doesn’t work. Safari is fine though.
  • Fixed the keyboard and mouse not working on startup using the following: http://www.tonymacx86.com/viewtopic.php?f=34&t=15054&start=10. Now I don’t need to boot from DVD.

Outstanding issues:

  • No microphone. I’m thinking of getting a usb mic for this. Can’t skype without a mic! I tried using Voodoo but this just resulted in screeching noises on startup.
  • Screen resolution is broken. I have a 4500 GMA graphics adapter. Trying this now … http://deviato.wordpress.com/2010/02/24/chameleon-2-rc4-for-intel-gma-version-2/
Posted in Hackintosh | Leave a comment

Free Martial Arts lessons in Gravesend

If you fancy a couple of free Jiu Jitsu lessons and you live anywhere near Gravesend Dartford Swanscombe or Greenhithe in the North Kent area of UK, then check out the details here: http://www.empirewalkreedcourt.com/services/learn-ju-jitsu-in-gravesend

It’s a friendly club, for teenagers and adults. Get fit, learn to defend yourself and before you know it you’ll be a black belt Jiu Jitsu master! First two lessons are free and then it’s a small charge each time you go after that.

 

Posted in Uncategorized | Leave a comment

How to get a six pack

I’d like to tell you about a new website I’ve put together, to take you from a typical flabby guy to having a six pack like on the front of all those men’s magazines.

The website is www.six-pack-workout.com and includes pages on how to lose the fat in the first place, including nutrition and exercise. Also included are the most effective abs exercises and a complete and effective abs workout that you can do once or twice a week.

Total self-indulgent promotion, but I’ve done a lot of research on this and I’m putting the findings into practice for myself. I’d welcome any feedback or suggestions on how to make the site more interesting or the program more effective.

 

Posted in Six Pack Exercises | Leave a comment

Bulk Loading Mysql and Tracking Changes

I have a table with ~500,000 rows and I receive a new copy of the file every day with a small number of changes. I want to update the table with the changes and track the changes so that I can retrieve all the rows that have been updated since any date.

e.g. select * from testdata where last_updated > ’2011-02-01′

It needs to include new rows and updated rows. I’ll never delete rows, but it should be pretty obvious how to add this in if required.

CREATE TABLE IF NOT EXISTS `testdata` (
`testdata_id` int(11) NOT NULL, 
`data1` varchar(100) NOT NULL, 
`data2` varchar(100) NOT NULL, 
`last_updated` datetime NOT NULL, 
PRIMARY KEY (`testdata_id`));

CREATE TABLE IF NOT EXISTS `testdata_staging` ( 
`testdata_id` int(11) NOT NULL, 
`data1` varchar(100) NOT NULL, 
`data2` varchar(100) NOT NULL, 
PRIMARY KEY (`testdata_id`))

Bulk load the data into testdata_staging using whatever method is required.

Then to update the table:

/* updates */
update testdata, (select ts.*,now()
                    from testdata_staging ts
                      inner join testdata t 
                        on ts.testdata_id = t.testdata_id 
                    where ((ts.data1 != t.data1)
                      or   (ts.data2 != t.data2))
                  ) chg
  set testdata.data1 = chg.data1,     
      testdata.data2 = chg.data2,     
      testdata.last_updated = now() 
    where testdata.testdata_id = chg.testdata_id;

/* inserts */
insert into testdata
  select ts.*,now()
    from testdata_staging ts
      left outer join testdata t 
        on ts.testdata_id = t.testdata_id 
    where t.testdata_id is null;

There you go.

 

Posted in Uncategorized | Leave a comment

Cheap Budapest Hotels

If you want to travel to Budapest, Hungary, and don’t want to spend a lot of money on hotels, then you should have a look at the recommended cheap budapest hotels on www.hotelsearchengines.net.

The website contains a lot of information about hotels, including reviews and ratings. Importantly you will only see popular ones listed on the cheap budapest hotels page, so long as they are also cheap!

The hotel list updates continually as new pricing information is always changing. At the time of writing, the number one hotel is Dominic Panzio Hotel Budapest. The average rating for the hotel is 3.5 out of 5, and the price is 3502 HUF. You can choose your own currency on the site so that you can see the price in terms you understand.

Go to the page, click on the link and you will see all the details, photos and the map of the hotel.

There are 10 hotels listed in total so check it out!

 

Posted in Hotels | Leave a comment

Books On Child Discipline

There are numerous books available telling you how you should bring up your kids. Ironically many of the books seem to be written by authors who have no kids themselves. As a parent I find that most frustrating.

E-books

OK here’s a list of some of the more popular e-books. I won’t review each one here as each will appeal to different people. My suggestion is to click on each in turn but don’t decide until you’ve had a look at each one. You will see the sales page for the product. If you want to get one of these then the benefit of an e-book is that you could be reading it within a few minutes, also that they all come with money back guarantees in case you don’t like it (double-check this! in case they have changed).

Hardcopy books

Here are the most popular child discipline books, according to Amazon:

You can read the reviews for each of these on Amazon (click on the link to be taken to the appropriate page). The reviews are from people who have bought the book themselves, which I find gives the most useful information.

Recommended Websites

The following websites are good authorities on kids, parenting and discipline:

There is also a wealth of information on squidoo. Here’s one to look at, and you can see other recommended pages with squidoo from this page.

If you find a good resource that I haven’t listed, please let me know in the comments below!

Posted in Parenting | Leave a comment