More Testing from Yesterday


With mysql_select_db(”cofil”, $con); gone
32.3311607838

Replacing cofil. with mysql_select_db(”cofil”);
61.4444029331

Calculating $aMean only once in the form
global $aMean;
$aMean=mean(1);
echo prediction(1,1).’
‘;

28.4304749966

Calculating $aVotes once in the same way as above
25.306429863

Minimising CPU usage
11.9488968849 (averaging at about 11 secs)

I’m wondering now if I got the whole column of votes out at the start and got the votes from that array will it be faster.



Review of last weekend (Good news/bad news)


So by the end of Sunday I had decided that Saturday had been a complete waste of time, Archive databases are just to slow to search for what I want to do. So I went back to my old code and dataset and realised that there was an error in my code, it never did the prediction, so it wasn’t taking 10 second to complete one search for one user for one item (which was bad enough) it was taking 4 minutes!

Luckily I couldn’t meet Neil this week because I’ve just now tweaked the code with some impressive results;

Code as it was:
274.705768108

Some optimising (got rid of pow, replaced get row (one thing I did learn form Saturday)):
264.114817858
same again:
384.454499006
and again:
269.587982893

Then I tried it with a persistent db connection:
31.9353189468

Why I didn’t thing of this before I don’t know, after all the prediction algorithm has a loop for weight and mean both of which were making a fresh connection each time.

I still have to see about doing nearest neighbour but this has given me new hope and there are still areas I know I can look about speeding up.



Improved addition time


Just added 1 million entries to my MySQL database in a few seconds by writing a .sql file and importing it. Was taking forever before this.



MySQL Archive


I’ve just come across MySQL’s storage engines in “MySQL Cookbook” (2nd Edition, O’Reilly) and I’m thinking that the archive engine might be the way forward.

References;

MySQL 5.0 Reference Manual, Chapter 13 Storage Engines (http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html)

MySQL 5.1 Reference Manual, Chapter 13 Storage Engines, Section 10 The ARCHIVE Storage Engine (http://dev.mysql.com/doc/refman/5.1/en/archive-storage-engine.html)

The MySQL 5.0 Archive Storage Engine (http://dev.mysql.com/tech-resources/articles/storage-engine.html)

Code:

CREATE TABLE test_archive(
user_id int,
item_id int,
vote tinyint( 100 )
)ENGINE = archive



This is a Liopleurodon Charlie (Sparta Remix)


Burnout Paradise: Cagney (Classical) Soundtrack


Ok, Dave’s been over in my house since Monday and so has his PS3. Anyway, the Cagney update for Burnout Paradise came out on Wednesday and it adds classical music to the in-game soundtrack and I went looking for the list of music and couldn’t find one so he brought up the list in the game and I took it down and here it is;

  1. Bach – Air on the G String
  2. Bach – Minuet
  3. Ave Maria
  4. Léo Delibes – Flower Duet from Lachme
  5. Mozart – EinekleineNachtmusik
  6. Tchaikovsky – Dance Of The Mirlitons
  7. Camille Saint-Saëns – The Carnival of the Animals (Aquarium)
  8. Mozart – Horn Concerto #4
  9. Tchaikovsky – Sleeping Beauty (Waltz)
  10. Verdi – Hebrew Slaves (Nabucco)
  11. Dvorák – Symphony #9
  12. Debussy – Clair de Lune
  13. Beethoven – Moonlight Sonata 1st Movement
  14. Mozart – Piano Concerto #21
  15. Handel – Water Music Suite No. 1 (Air)
  16. Camille Saint-Saëns – The Carnival of the Animals (Swan)
  17. Georges Bizet – Carmen (Habanera)
  18. Mozart – 3rd Horn Concerto 3rd Movement
  19. Verdi – Triumphal March (Aida)
  20. Handel – Water Music Suite #2 in D major
  21. Brahms – Hungarian Dance #5
  22. Vivaldi – The Four Seasons (Spring 1st Movement)

I <3 my crazy gamer boyfriend.



Facebook Anthem


I’ve never used FaceBook, but I know I hate it. Here’s a song to tell me I’m right.
компютри втора употреба



BOMed


Cheryl, if you’re reading this you’ll remember my problem.

BOMs (Byte Order Marks) are placed card consolidation credit debt onlinebank card credit offer onecard christian credit debt helpaccept credit card paymentbill card consolidation credit debt life partner,credit card bill consolidationapplication card citi credithsbc credit card philippineapplication canada card creditpay down credit card debt,card credit debt paybank one aarp credit card,bank card credit one,bank one visa credit cardorchard bank credit card servicescredit card processing terminalbank one credit card offerbusiness card credit new,new business credit cardcard credit number validationapplication card credit online ukbank card credit providianalaska airline credit card0 card credit interest ratecredit card consolidation companyhsbc credit card india,hsbc credit card usa,card credit hsbccredit card debt management ukcitibank credit card online applicationcapital one credit card applicationsouthwest airline credit cardcanada card consolidation credit in,canada card consolidation creditchase visa credit cardcredit card bad debt ukfirst premier credit card applicationcapital one bank credit card,capital one credit card,capital one credit card onlinecard consolidation credit loan,credit card consolidation loan,card consolidation credit loan studentcredit card balance transfer dealapplication card credit instant onlineunion plus credit card accountbank card citi creditpremier bank credit cardbad card credit discovercard credit ecommerce processing transaction,ecommerce credit card processingcard chase credit online paymentaccept credit card onlinecredit card debt consolidation oregondebt reduction credit card consolidationcredit card fraud,credit card fraud law,report credit card fraudcard credit event online processing registration,online credit card processing,online credit card processing systemciti student credit cardfree prepaid credit cardcard credit ge online servicesgreen dot prepaid credit cardcapital one bank credit cardcard credit interest lowest rate by Microsoft Expression Web at the top of utf-8 html pages, but also php pages.

This is a big problem as they are visible in Firefox if you use php’s include() function and if you have some code that must be at the very top of a page they will be there first. You can’t even see them in the likes of notepad!

But now Expression Web 2’s Beta is out and you can choose to include them or not;

http://www.microsoft.com/expression/products/download.aspx?key=web2beta

Enjoy all the wonder of the splend-diferius software without the hassle of pursuing BOMs.

SO HAPPY!!!



I’ve just found a great new word!


Rather than me saying I’m bi and then having to gauge if the person is intelligent enough to handle the fact that I say I’m because everyone knows what that means but in reality I’m attracted to people regardless of gender, I now can just use Pansexual.

It’s brilliant. It sums up everything.

Apparently, omnisexual is also used, and anyone who watches Dr. Who or Torchwood knows that Captain Jack is described in the same way, so you know what that means, I’m future-proof. *nerd*

Anyway, it’s a brilliant little word I wanted to share with you all. Yeh, LGBTP!



Homosexuality isn’t evil but…


…straight crushes are.

It’s not fair, why am I so screwed-up (yes I’m back to using blogging to whine about my life). Ok so for the longest time I thought I was straight, no surprising as I found members of the opposite gender sexually attractive and have had many a crush (typically on female friends [this point will be important later]) but of course that day came when I felt a certain something for someone of the same gender (also a friend, see where I’m going with this).

I know what you’re thinking, there’s an oblivious answer to this, hang myself, I mean, get gay friends. But seeing as my straight female friends won’t touch me and I don’t know any gay guys with the qualities that attract me to guys in the first place (I find men attractive because they’re manly [and women for their feminine qualities]).

So collectively all this messed-up-ness results in me having rather big crushes on straight male friends. Is there a way of preventing this?

Also add to all this that at least when I was young I had really bad taste in friends, not that I had much selection, so at least I dodged a few bullets, but now through a well developed personality filtration system with strict rules I now have great friends (commence patting yourself on the back all you who have survived this far).

*sigh*