Metaphoric :: Elte Hupkes
A blog about music, philosophy, CakePHP and complete, utter uselessness.
Elte Hupkes

Elte Hupkes

Computer Science student, freelance web developer, musician, football player and some other stuff.


Menu

  • Home
  • About
  • Media
  • Contact

Categories

  • General
  • CakePHP
  • Music
  • Programming
  • Randomness
  • Sysadmin

Search

Recent Posts

  • Elte - Heart
  • RequestHandler processes AJAX requests internallly
  • Tethering drivers for your LG Optimus 2x (LGP990)
  • PHP, MySQL and UTF-8
  • I remember thinking...

Links

  • See me on YouTube
  • Visit my Facebook
  • Scitus - My webdesign company
08 Jul 2011, 00:56

Elte - Heart

I took a few hours today to record a song with my still fairly new piano. Here it is (it's also on the media page of course):

Download

Lyrics in the read more :).

Comments (0)Read morePosted in: Music
 
01 Apr 2011, 13:13

RequestHandler processes AJAX requests internallly

While developing a plugin for a Cake application I ran into a strange problem: scripts buffered in elements with JsHelper were not displayed in the layout. A little research revealed that the layout and the element were using a different instance of JsHelper. Placing some strategic echo statements also showed that multiple instances of my controller were created in the request. The controller action causing the problem did some logic, called $this->render() to get view contents, sent them someplace else, and then redirected to a different page.

When going into this further, I found that no redirects were happening at all. The redirect function quit before it ever got to sending a header. Why? The Request Handler Component. Its beforeRedirect callback detects an AJAX request, and when found calls requestAction instead of redirecting. This leaves the ClassRegistry intact though, causing the multiple instances of JsHelper issue. A good thing to keep in mind whenever using Ajax redirects.

Comments (0)Posted in: CakePHP, 1.3, PHP
 
19 Mar 2011, 13:41

Tethering drivers for your LG Optimus 2x (LGP990)

I recently got my new phone, the LG Optimus 2X. While browsing the menu's I found the USB-tethering option which I had forgotten all about, so that got me pretty excited. However, when plugging the phone into my laptop (Windows 7), I got nothing but driver installation failures. The first thing for me to do was to browse to the LG website looking for the official drivers; after finally figuring out the type number (it's LGP990, took me a few minutes without further info..), I realized the phone wasn't yet listed in the support section of the LG website; the Dutch version, at least, so finding drivers was a bit of a chore.

The solution is easy though, after a while I figured out that all it takes is the "LG Mobile Support application", just Google for it and you'll get there. Install this app, press the button that installs USB drivers, pick the LGP990, and you're set to tether :).

Comments (0)
 
10 Mar 2011, 15:13

PHP, MySQL and UTF-8

There's a lot of stuff written about this all over the internet: getting PHP to communicate with MySQL correctly using UTF-8. I ran into a couple of problems myself, and this is the story about how I got them fixed.

Comments (1)Read morePosted in: Programming, mysql, PHP
 
18 Feb 2011, 11:46

I remember thinking...

... wow, that's like, basic probability theory! I am so doing this right. And so, I switched.

Context: I dreamt I was in a game show. The host looked like the voiceover guy from one of those old computer racegames: large round glasses, thick curled chestnut brown hair; didn't have to hear him speak to know he was probably an asshole. I was given a choice of three doors: waiting behind one of them was a life without sorrow. After picking a door the host would be so kind to point out one door that did not hold the candy, after which I'd be allowed to switch. Classic Monty Hall problem.

So, I did it right. As right as theoretically possible. But that cheating bastard of a host picked the right door himself. "You might just have made the right decision, why take that chance?"

Heaven forbid I'd ever win something inside my own head.

She just might get you lost, and she just might leave you torn. But she just might save your soul, if she gets you and she, gets you any closer.

Comments (0)Posted in: Randomness
 
1 | 2 | 3
 
© Elte Hupkes / Scitus Webdesign