Archive for October, 2008

NSD28: 31 – 3 = 28 AKA *you* do the math!

Friday, October 31st, 2008 | Misc | No Comments

I am really drunk tonight but I do not smoke. Big deal, eh? In fact this *is* a big deal, because I am not a physical nicotine addict any more and still refuse to surrender to my mind. I think this really is a big deal… anyway. I am off to bed, after a shitty day and 5 bottles of beer. See you soon… I am still too sober to post my gui blueprint that I did tonight. This is a good thing because there might be kids around reading this… g’night!

Burns: Smithers, I guess there’s nothing left but to kiss my sorry butt goodbye.

Smithers: May I sir?

Burns: Muuuhaaarrr…

(whrock)

Tags: ,

Nested Expression Language quirk

Tuesday, October 28th, 2008 | Java, JSP, Tech-savvy | No Comments

Today I stumbled over a rather unusual EL example. I had to access a value of a HashMap on the PageContext. The key to the value was composed of two other (EL) values.

Imagine some x containing some y, the key we are looking for is the compound of the current x id and the current y id, to look up a value in another place. Dazed and confused? πŸ˜‰

This looks odd but is almost the solution:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 
  ${hashmap[${x.id}${y.id}]}

Hmm, nested EL looks evil and *is* evil, it will give you an ELException: javax.servlet.jsp.el.ELException: Encountered “{“, expected one of [“.”, “>”, “gt”, “<“, “lt”, “==”, “eq”, “<=”, “le”, “>=”, “ge”, “!=”, “ne”, “[“, “]”, “+”, “-“, “*”, “/”, “div”, “%”, “mod”, “and”, “&&”, “or”, “||”, “:”, “(“, “?”]

The solution is substitution. Btw, I hated that in maths (square root from negative numbers, yeah right… πŸ™„ ).

The following code substitutes the nested EL resulting in a correctly running JSP.

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 
  ${x.id}${y.id}
  ${hashmap[xandy]}

There may be other solutions for this problem, feel free to enlighten me and leave a comment.

Tags: , , ,

Legolize me!

Monday, October 27th, 2008 | Gadgets, Language, Misc, Vocabulary | 2 Comments

Not quite accurate, but still funny, my legolized alter ego:

Nick Prosch legolized

Nick Prosch legolized

You want to try legolizing yourself? Reasonably Clever host the mizer (another artificial word created by the web…). To all the headhunters out there: the tattoo is fake and I wanted to be a rock star all my live 8)

Tags: ,

Review: Taken (2008)

Monday, October 27th, 2008 | Movies, Reviews | 1 Comment

Luc Besson strikes again. He is brilliant, I fell in love with his work starting with LΓ©on, followed by e.g. Transporter or Angel-A (If you have seen these movies you know the sheer unbelievable range he’s got).

Taken is about a girl getting kidnapped and a father trying to rescue her. He has quite some expertise in solving problems being an ex government agent. The kidnappers definitely messed with the wrong guy! Kudos to Liam Neeson, he makes 24‘s Jack Bauer look like a sissy! πŸ˜€

Thrilling, brutal yet still comprehensible. These nasty fuckers didn’t deserve anything else. Did I mention that the picture deals with trafficking?

Highly recommended!

8.5/10

Tags: , , , ,

Review: El Orfananto (2007)

Sunday, October 26th, 2008 | Movies, Reviews | No Comments

Hmm, this was a nice fresh breeze in the horror/suspense genre. An abandoned orphanage, new inhabitants, their kid making new friends that cannot be seen… just a child’s game? Maybe …

This movie is very well done, something apart from recent horror flicks, more a suspense thing with some graphic moments – a classical ghost story.

I wanted to give it a straight eight, but there were a few let downs, too many unanswered questions or logical errors. In the end it’s a nice picture that’ll make you jump once or twice and gives you the creeps even a few hours after the credits. What kind of noise was that kid doing in the hallway?? Seems the 100th clone of The Grudge is finally over. Well done! What I liked best is that everything may have happened as shown – the ghostly explanation in not mandatory – stupid mom πŸ˜€

7.0/10

Tags: ,

NSD19: Still WTF – or even more?

Wednesday, October 22nd, 2008 | Misc | No Comments

19 days … now I have the feeling that I managed to quit smoking. Why is my brain telling me to smoke then? Fuck, I am sitting in a comfy chair in front of my computer, having a drink but something is missing. The oh so familiar fag … I recently read about what nicotine does to you (in the sense of effects on the brain). It tricks you into feeling good:

Nicotine interferes with the reward pathways in your brain. Every time you smoke, nicotine stimulates your neurons to release dopamine, the neurotramsmitter that makes you feel good, while also releasing glutamate, the neurotransmitter connected to your memory. So not only does nicotine make you feel good, it creates a map in your brain linking that good feeling back to a cigarette.

Bloody hell, nobody told me *that* when I was young (and dumb). Not today, not today.

Tags: , , , ,

NSD17: WTF?

Monday, October 20th, 2008 | Misc | 1 Comment

For no reason I am really struggling tonight. I WANT TO SMOKE… g, this puts me in a bad temper… but I won’t be subdued. Still, it sucks to not do something you really want – even if you are an adult (as in “I am an adult, therefore I drink Coke late at night”) πŸ˜‰

Tags: ,

NSD16: Getting used to it

Sunday, October 19th, 2008 | Misc | No Comments

Just wanted to make sure, that even I didn’t write about my absence any more I am still smoke free. It’s okay and not very hard to stay away any more, even though every now and than I get an itch for a smoke, but that’s so minor and controllable it’s nothing really to mention. Seems I am pretty much over it.

Tags: ,

Review: Death Race (2008)

Sunday, October 19th, 2008 | Movies, Reviews | 1 Comment

OMG! WTF? This is the most dimwitted Hollywood flick I’ve seen lately. This is the living proof that well known actors and a high budget have absolutely nothing to do with the result. I expected something like The Running Man mixed with The Fast and the Furious – so my expectations weren’t very high πŸ˜‰

What I got was even worse – a not so present storyline accompanied by a constant “So what?” feeling and a few absolutely unnecessary “Finish Him”-scenes (come on, the 80s are OVER and violence alone can’t save a movie from being bullshit!) made me fall asleep half way trough.

2.0/10

Tags: ,

NSD6: Gnosis

Thursday, October 9th, 2008 | Misc | No Comments

There are two kinds of drugs. One kind makes you feel bad if you take it, the other kind makes you feel bad if you don’t take it. It doesn’t really depend on the drug, just whether it’s a habit (addiction) or some random fooling around. Please be aware that both kinds make you feel bad. πŸ˜‰

As a habit, a drug doesn’t affect a regular user. If you stop taking it, you feel bad. (My case considering nicotine)
As an occasionally user you are affected. If you stop taking it, you feel good again. (My case considering alcohol)

Bottom line: Wow, that’s news! πŸ˜€ Sometimes you have to remind yourself of obvious things. Basically it is nonsense to do drugs to feel normal (which is an addiction). Another reason for me to quit smoking. If you do a drug every now an then, that may be okay. This is not to be mistaken as a general rule. And should not be applied to drugs you ever were addicted to. Having a fag after a few weeks of abstinence might bring you back from where you started. Ughh!

Tags: , , , ,

Search

Categories