Lost connection of the hard drive

Once again I have some trouble with my backup drive today. The problem is that at any time the connection to my external hard drive gets interrupted. This is very bad if Time Machine, the backup software, is writing to the disk at the same time and there’s absolutely no rule when this appears. One more bad thing is that the system recognizes the lost connection but it hangs up until the cable is unplugged. It looks like the hard drive is going into a sleep mode but you can still hear the disk rotating. There’s a WD Caviar Green inside and after my research I’m sure that the case is the evildoer. This is a MacPower Pleiades 3.5″ FW400/USB I bought in last August.

These and those have the same problem with their Pleiades case and here’s a video of a guy getting nervous like me:

  • Delicious
  • Digg
  • Technorati Favorites
  • Reddit
  • LinkedIn
  • Facebook
  • Spurl
  • Twitter
  • Webnews
  • YiGG
  • MySpace
  • Yahoo Bookmarks
  • FriendFeed
  • Google Bookmarks
  • LiveJournal
  • Share/Bookmark

Urinal manual

Based on the tikz flowchart example I created my first flowchart in Latex. Creating such a flowchart with Latex is not as easy as it looks like. Sometimes you don’t get an error message even if there is an error (especially missing semicolons) in the code. In my case pdftex just hang up. One thing was a bit tricky but first have a look at my code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\begin{document}

\pagestyle{empty}

% Define block styles
\tikzstyle{decision} = [diamond, draw, fill=blue!20,
text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]

\tikzstyle{block} = [rectangle, draw, fill=blue!20,
text width=4cm, text centered, rounded corners, minimum height=4em, minimum width=4.5cm]

\tikzstyle{line} = [draw, -latex']

\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em]

\begin{tikzpicture}[node distance = 3cm, auto]
% The nodes
\node[cloud] (business) {Business};
\node[block, below of=business] (person) {i:=person};
\node[decision, below of=person] (sex) { i.sex = male ?};
\node[decision, below of=sex, node distance=4cm] (sex2) { i.sex = pre-op transsexuel female ?};    

\node[block, right of=sex2, node distance=6cm] (execution_block_1) {i.enter(toilet)\\
i.open(trousers)\\
i.target(eyes, center)\\
i.target(hands, center)
};

\node[block, below of=execution_block_1] (open_bladder) { i.open(bladder) };
\node [decision, below of=open_bladder, text width=2cm] (bladder_empty) {i.bladder = empty?};

\node[block, below of=bladder_empty] (execution_block_2) { i.close(bladder)\\
 i.close(trousers)\\
 i.flush(urinal)
 };

\node [block, below of=execution_block_2] (exit) { i.exit() };

% The connections
\path [line] (business) -- (person);
\path [line] (person) -- (sex);
\path [line] (execution_block_1) -- (open_bladder);
\path [line] (execution_block_2) -- (exit);

\path [line] (sex) -- node [near start] {no} (sex2);
\path [line] (sex) -| node [near start] {yes} (execution_block_1);
\path [line] (sex2) -- node [near start] {no} (execution_block_1);
\path [line] (sex2) |- node [near start] {yes} (exit);
\path [line] (open_bladder) -- (bladder_empty);
\path [line] (bladder_empty) -- node [near start] {yes} (execution_block_2);
\path [line] (bladder_empty) -- +(4,0) -- +(4,3) -- node [near start] {no} (open_bladder);
\end{tikzpicture}

\end{document}

The decision block with the bladder emptiness check has more than one curve. -| or |- didn’t work so the trick here is that you have to add coordinates (x,y) to the connection line where it should curve.

  • Delicious
  • Digg
  • Technorati Favorites
  • Reddit
  • LinkedIn
  • Facebook
  • Spurl
  • Twitter
  • Webnews
  • YiGG
  • MySpace
  • Yahoo Bookmarks
  • FriendFeed
  • Google Bookmarks
  • LiveJournal
  • Share/Bookmark

There is no handler to execute for command

If you follow the Vogella tutorials, especially those about menu contribution, the error message There is no handler to execute for command might appear. They don’t mention that you have to take care about the return value of isHandled().

While I was experiencing the error message after the first time I hit the menu yesterday, I’m absolutely not able today to get the command run once. In fact the behaviour shouldn’t change over night but anyway keep an eye on isHandled.

My plugin output this today1:

11:21:23 zprototype.AbstractApplication::start   Starting the plugin
11:42:47 zprototype.command.LoadModel::addHandlerListener
11:42:47 zprototype.command.LoadModel::isEnabled
11:42:48 zprototype.command.LoadModel::isHandled
11:42:48 zprototype.command.LoadModel::isEnabled
11:42:48 zprototype.command.LoadModel::isEnabled
11:42:48 zprototype.command.LoadModel::execute
11:42:49 zprototype.command.LoadModel::isEnabled

AbstractApplication is actually the entry point of the plugin and LoadModel is the menu handler.

As you can see isHandled is executed before execute so if it returns false a NotHandledException will be thrown.

  1. I’m not sure if this output is alway the same as other developer did run the command once too before the message appeared.
  • Delicious
  • Digg
  • Technorati Favorites
  • Reddit
  • LinkedIn
  • Facebook
  • Spurl
  • Twitter
  • Webnews
  • YiGG
  • MySpace
  • Yahoo Bookmarks
  • FriendFeed
  • Google Bookmarks
  • LiveJournal
  • Share/Bookmark

jQuery injection using Firebug?

A new day, a new question.

I was trying to load a json object while using Firebug and jQuerify to inject jQuery code into the website of the currently active tab. If you don’t know what I’m talking about, these are firefox add-ons. Firebug is a great debugging tool whereas jQuerify adds the jQuery library to any website if it’s not yet loaded.

Now some details to my recent problem. If I enter the URL into the browsers location field I get a proper json object back. If I send an XMLHttpRequest to the same URL the server responses with the status code 301 Moved Permanently. Has this issue to do with the Same Origin Policy (SOP) ?

If so I need a workaround because this URL will be the new API URL for some web apps.

Any suggestions what this could be?

Edit:
It wasn’t a SOP problem but I also had to face with such a problem later. The above described behaviour came from a missing / at the end of the URL. Entering such a URL into the location field the browser automatically add the tailing slash if it’s missing. After I found that out I wasn’t able to fetch the json from another domain. It’s been months that I’ve been coding jQuery a lot so I forgot one little but important information. The server has to send an additional header to allow other domains. More about this later in a seperate post.

  • Delicious
  • Digg
  • Technorati Favorites
  • Reddit
  • LinkedIn
  • Facebook
  • Spurl
  • Twitter
  • Webnews
  • YiGG
  • MySpace
  • Yahoo Bookmarks
  • FriendFeed
  • Google Bookmarks
  • LiveJournal
  • Share/Bookmark

Heeelp, the Chinese are coming!

Since the post frequeny became higher on my blog I was taking more often a look into my stats thus I had to experience a couple of high peaks during the last three weeks. Up to 200 uniqe visitors per day is a normal number but 500 is way too high.



I could explain the first two by posting the shortened URLs of some articles on facebook and twitter but I didn’t blog anything the past few days except the One Word A Day entries so the latest peak is absolutely nonsense. A closer look on the referers breaks the secret. It seems that Baidu, a Chinese search engine, is crawling my blog every fifteen minutes on some days but what for? There’s nothing too interesting stuff for them …

Do they expect pixel-encoded messages in the picture of my pi cake which I baked ten days ago?

  • Delicious
  • Digg
  • Technorati Favorites
  • Reddit
  • LinkedIn
  • Facebook
  • Spurl
  • Twitter
  • Webnews
  • YiGG
  • MySpace
  • Yahoo Bookmarks
  • FriendFeed
  • Google Bookmarks
  • LiveJournal
  • Share/Bookmark