my2cents

5. October, 2008

Japanese is easy

Filed under: General — frightanic @ 13:13
Tags: ,

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

The title is misleading I admit, it should rather read “Japanese is easy – sometimes”. I’m currently swoting kanji for the Japanese Language Proficiency Test JLPT. Every now and then I come across a kanji combination that is so logical that it’s startling.

Example: what do you do when you feel dizzy – chances are you roll your eyes. In Japanese 目が回る = dizzy. 目 stands for eye, が is the topic/subject marker, and 回 plus る mean to turn around, rotate, revolve. Easy and obvious, isn’t it ;-).

14. September, 2008

Connecting to the Internet with Bluetooth mobile phone on Leopard

Filed under: Apple & Mac — frightanic @ 16:40

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

Here’s another OS X Tiger to Leopard upgrade issue…

From time to time while on the road (in the train rather…) I connect to the Internet through my Nokia mobile phone hooked up to the MacBook via Bluetooth. This stopped working with Leopard. The phone icon in the menu bar showed “Connecting” for a few seconds and switched to “Disconnecting” immediately afterwards. The Console listed as error: MPPE required, but MS-CHAP[v2] auth not performed.

A Google search directed me to a Mac OS X Hints article that explains that you needed to change CCPEnabled from 1 to 0 in /Library/Preferences/SystemConfiguration/preferences.plist – and restart the system, that’s important.

aclocal-1.4… missing/automake-1.4… missing

Filed under: Apple & Mac — frightanic @ 16:28

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

In contrast to the problem described in my previous post this one was directly related to the OS X 10.4 (Tiger) to 10.5 (Leopard) upgrade.

After the upgrade I tried to install a software packet through MacPort’s port command. The pile of error and warning messages left me puzzled at first:

checking for working aclocal-1.4... missing
...
checking for working automake-1.4... missing
...
some more

Then I found out that XCode is not automatically updated during the 10.4 -> 10.5 installation. Hence, I needed to uninstall the old XCode and install XCode 3 from the Leopard DVD.

iPod touch not showing in iTunes on OS X

Filed under: Apple & Mac — frightanic @ 10:11

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

After an upgrade to OS X 10.5 Leopard and iTunes 8 my iPod touch stopped showing in iTunes on my MacBook. I doubt, however, that the missing iPod has anything to do with Leopard or iTunes 8 because it worked flawlessly with Leopard/iTunes 8 on my Mac mini.

I went through a lot of steps trying to reset/restore the iPod, resetting the USB adapters and so on. Although recommended in some articles I didn’t dare to uninstall/install iTunes, tough. I saved this as my last resort, for I had no desire to loose all my settings and I figured that it’d be quite difficult to get rid of all the preferences files on my system that are associated with iTunes. Turns out there’s a great article entitled “Removing ITunes for Mac OS X” at Apples’s support center.

And indeed, reinstalling iTunes 8 solved my problem.

6. September, 2008

Broken families

Filed under: Life — frightanic @ 17:40

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

In a previous post I wrote about a situation I witnessed where kids were being shoved back and forth between mon/dad on weekends. Earlier I also once wrote that I listen to American country music more and more. The below lyrics from the song “Every other weekend” by Reba McEntire and Kenny Chesney combine both subjects in a tragic way:

(Reba)
Every Other Friday
It’s toys and clothes and backpacks
Is everybody in?
Ok lets go see dad
Same time in the same spot
Corner of the same old parking lot
Half the hugs and kisses
There are always sad
We trade a couple words and looks and kids again
Every Other Weekend

(Kenny)
Every Other Weekend
Very few exceptions
I pick up the love we made in both my arms
It’s movies on the sofa
Grilled cheese and cut the crust off
“But that’s not the way mom makes it daddy” breaks my heart
I miss everything I use to have with her again
Every Other Weekend

(Kenny)
But I can’t tell her I love her

(Reba)
I can’t tell him I love him

(Kenny)
Cause there’s too many questions and

(Both)
Ears in the car

(Reba)
So I don’t tell him I miss him

(Kenny)
I don’t tell her I need her

(Both)
She’s(He’s) over me, that’s where we are

(Kenny)
So we’re as close as we might ever be again

(Both)
Every Other Weekend

(Reba)
Every Other Saturday
First thing in the mornin’
I turn the TV on to make the quiet go away
I know why, but I don’t know why
We ever let this happen
Fallin’ for forever was a big mistake
There’s so much not to do, and all day not to do it in
Every Other Weekend

(Kenny)
Every Other Sunday
I empty out my backseat
While my children hug their mother in the parking lot
We don’t touch
We don’t talk much
Maybe goodbye to each other
Then she drives away with every piece of heart I’ve got
I reconvince myself we did the right thing
Every Other Weekend

(Kenny)
So I can’t tell her I love her

(Reba)
I can’t tell him I love him

(Kenny)
Cause there’s too many questions and

(Both)
Ears in the car

(Reba)
So I don’t tell him I miss him

(Kenny)
I don’t tell her I need her

(Both)
She’s(He’s) over me, that’s where we are

(Kenny)
So we’re as close as we might ever be again

(Both)
Every Other Weekend

(Kenny)
Yeah for fifteen minutes we’re a family again

(Reba)
God I wish that he was still with me again

(Both)
Every Other Weekend

Inserting data into an Oracle LONG field with Spring JDBC

Filed under: Java,Software Development — frightanic @ 17:32

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

I struggled to update the content of a LONG column in an Oracle database with Spring JDBC. However, (in retrospective) this is more of a general JDBC problem than a Spring problem.

The problem first occured when I tried to use a regular SQL update statement to save a few thousand characters in that LONG field.

simpleJdbcTemplate.update("update mytable set content = ? where id = ?", new Object[] { o.toString(), o.getId() });

Hence, I tried to execute the same statement in a SQL editor, Oracle’s SQL Developer in my case, and got “ORA-1704: string literal too long” as a feedback from the database. Further analysis revealed that the LONG datatype has been deprecated in Oracle ever since 9i. It can hold 2GB max. but you’re encouraged to use CLOB instead. Some poking around the JDBC pages at oracle.com revealed sample code that describes how to manipulate LONG fields: http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/basic/LongSample/Readme.html.

Now, whether the below code is optimized or not is yet to be seen. It solves my problem, though.

final LobHandler lobHandler = new DefaultLobHandler();
final byte[] contentBytes = o.toString().getBytes();
final InputStreamReader clobReader = new InputStreamReader(new ByteArrayInputStream(contentBytes));
simpleJdbcTemplate.getJdbcOperations().execute("update mytable set content = ? where id = ?", 
    new AbstractLobCreatingPreparedStatementCallback(lobHandler) {
    protected void setValues(PreparedStatement ps, LobCreator lobCreator) throws SQLException {
        lobCreator.setClobAsCharacterStream(ps, 1, clobReader, contentBytes.length);
        ps.setString(2, o.getId());
    }
});

28. August, 2008

Flash, DHTML Menus and Accessibility

Filed under: Web Authoring — frightanic @ 14:51

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

Whenever I’m confused about the wmode parameter when embedding Flash objects into websites I turn to http://www.communitymx.com/content/article.cfm?cid=e5141. It describes the three modes “window”, “opaque”, and “transparent” with just the right degree of details and contains sensible demos. Of course, it’s helpful that the explanations are also related to DHTML menus because problems with those most often rise questions about Flash’s wmode parameter.

22. August, 2008

Installing MSI packages if you’re not an administrator

Filed under: Computers — frightanic @ 21:52

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

If you’re not logged in as an administrator on a Windows machine you won’t be able to install a MSI package. What’s worse, there’s no “Run as…” command in the context menu (as with other executables) if you right-click the MSI file. There’s a work-around for that described in “Installing MSI packages with elevated privileges”.

In case this link ever becomes dead, here’s what to do:

  1. Open registry editor
  2. Add a new key “runas” under HKCR\Msi.Package\shell
  3. Now set the default value of this key to “Install &as…”
  4. Now create the subkey HKCR\Msi.Package\shell\runas\command
  5. Set the default value of this subkey to msiexec /i “%1”

5. August, 2008

Character encoding error from Eclipse while saving

Filed under: Apple & Mac,Software Development — frightanic @ 17:05

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

What to do when the following error pops up in Eclipse while saving a file:

Save could not be Completed
Reason:
Some characters cannot be mapped using “<your-encoding-here>” character encoding.
Either change the encoding or remove the characters which are not supported by the “
<your-encoding-here>” character encoding.

If you’re certain that the encoding is correct an you didn’t enter any weired characters, you should copy/paste the content of the file to an external editor and see if it tells you where those hidden, special characters are.

On Linux and Mac you may as well abuse the terminal for that for certain character set. Just paste the code to the shell and see if you find anything unusual.

30. July, 2008

Are virus coders an endangered species?

Filed under: Computers — frightanic @ 23:03

This blog now resides at http://www.frightanic.com/. It will be discontinued here…

From time to time I surf some hacker/virus coder sites to check on the “mood” of those people. From current articles and incidents one could draw the conclusion that the end was near.

A desperate call to the community not to give up and not to turn their backs on virus coding: http://vx.netlux.org/29a/29a-6/29a-6.111

Yet another “community” (see next link) ceased to exist: http://www.rrlf.de.vu/

A virus coder broods about the relative success – and the lack thereof – of various types of collaborations: http://spth.host.sk/sowesh.txt That sounds so infantile, troubled, and sad. Like the lonely hackers confined to their computers in dark rooms finally realized that there’s a real world out there. A world with real people, that form close-to-real communities based on trust and respect united through common values.

« Previous PageNext Page »

Create a free website or blog at WordPress.com.