Category Archives: dev

Java Drag ‘n Drop + Splash screen bug in Linux

0
Filed under dev
Tagged as ,

I’m testing out a java desktop application that I’m pretty excited about, but when I run it on my Linux desktop, if I do a drag ‘n drop, it freezes.  A little research and I find the following bug: http://bugs.sun.com/view_bug.do?bug_id=6397447 .  Basically, if you have Java6’s “splash screen” feature enabled for your application, and you use swing’s Drag ‘n Drop functionality, Xwindows will freeze on DND.  The bug report has more details.
Interesting work-around, though: If you start another application that uses swing’s dnd, but doesn’t use a splash screen, leave that running, then start your real application, it works fine.  Conveniently, http://java.sun.com/docs/books/tutorial/uiswing/dnd/basicdemo.html is such an application, it’s small, it starts fast, and you can webstart it.  So I just inserted that into the startupscript for the application that suffers from the bug.

How to rename the ‘My Dropbox’ folder in Windows

0
Filed under cry, dev

The fact that I can’t change the name of the dropbox folder in Windows from “My Dropbox” has been driving me crazy. After more Google searching than should have been necessary, I found this page describing how the author managed to find the setting and change it.

I found out the dropbox.db file in my \AppData\Roaming\Dropbox folder on Windows 7 is a SQLite 3 database. Using a SQLite database GUI I opened it up and found a table called ‘config’, with a value called ‘dropbox_path’. The value appeared to base base64 encoded.

The value is base64 encoded. I see absolutely no reason for the developers to have done that except to make it difficult to change the setting.

Update: It appears this is a deliberate decision on the part of the developers. One of the developers has written up an explanation for the decision.

Wiki software comparison

0
Filed under dev
Tagged as , , ,

I was comparing wiki softwares over at wikimatrix.org and this is the list I came up with.

There were a number of things I required to make that list. It must be software I can install which is free. It must not require root access or anything super crazy to run. It must support MySQL. It must support revisions, page permissions, unicode, and file attachments. I docked points aggressively for software packages that had other things I felt were weak, such as no XML/HTML export, no tables support, no commenting system, no email notifications, no full-text search, or no recent updates to name a few. Some also lost points for only supporting features I consider critical through a plugin or a patch.

As it is there are still a couple on that list that I consider weaker than others, like Wicked for example.

EFF has a nice page layout

0
Filed under dev
Tagged as

I noticed on this page on the EFF’s site that, in Firefox, when you zoom (ctrl-+), the right column wraps to underneath the article. I really like that!

Site mirroring python script

0
Filed under dev

I’ve often thought that I’d like my blog to automatically grab a copy of any page that I link to, since the page may change or even go down.

The other day someone sent me a link to an article which was actually mirrored using a script to do just that.

Embedded content hijacks keyboard focus in Firefox: work-around

2
Filed under cry, dev
Tagged as ,

Ever noticed plugins stealing your keyboard focus in Firefox so you can’t use Firefox keys anymore? Very frustrating because I thought the only way to get focus out of the plugin is to use the mouse, which may be unavailable.

Funny, it turns out this has been a known bug for 8 years! Well, I’ve found a work-around that works for me in FF3 on Windows XP, and I included it in some comments on bugzilla:

When I’ve focused a flash object, windows shortcuts like ctrl-escape and alt-f4 still work. If you have more than one tab open and you enable the “warn me when closing multiple tabs” option.. you can press alt-f4 and the browser will pop up the warning/confirmation.. you can then hit escape to say “no I didn’t actually want to close” and focus has magically been shifted back to Firefox!

More on Python..

0
Filed under dev
Tagged as

This is hardly interesting pressing news, but it’s left an impression on me, so I choose to share:   In my tinkering with python, I’ve found the python console to be a priceless tool when helping to discover syntax.  In this afternoon’s example, I was wondering about different cute ways to loop through lists, so I drop to a prompt, type python, hit enter, and:

>>> a = [1, 2, 3]
>>> a.append(4)
>>> print a
[1, 2, 3, 4]
>>> while 7 not in a:
...   a.append(int(raw_input('append?')))
...
append?4
append?3
append?5
append?6
append?7
>>> print a
[1, 2, 3, 4, 4, 3, 5, 6, 7]
>>>

OK, that skips the step where I googled, saw an example, and then wanted to try it out in a simple cases to make sure I got it.  But this still demonstrates the value, right?

Python Time Travel

0
Filed under dev
Tagged as ,

I’ve been using python for some sysadmin tools lately, and thoroughly enjoyed python’s ability to invoke the future standards.  Python’s PEP system (Python Enhancement Proposals) promotes a public forum for changes.   I’m not familiar with the political process, but that’s soon on my to-investigate list.

While reading about a proposed enhancement to while loops (PEP 315 — Enhanced While Loop - enhancing to allow a do/while struct), I found a usage description.

    Because of the new keyword "do", the statement
        from __future__ import do_while
    will initially be required to use the do-while form.

This allows you to beckon the Gods for a new version and use it, because it’s even been thought of!  Amazing.  No, really, it allows them to add a new feature gracefully.  Announce a change and allow the use of it through a special format that will be forwards compatible.