Skip to main content

Posts

Showing posts from January, 2010

"An error occurred while extracting one of the Network Connect components"

I love VPN. It allows me to log into my work computers from home and annoy them by giving them large amounts of work to do while I sleep. Harvard Medical uses a solution from Juniper Networks, and the client app is called Network Connect.app We I went to connect, and I'm told to update and I say OK. And then I get this error message. I can't install the new version. 40 minutes later after following up several false leads, I find a JN page by copying and pasting the exact error message. It turns out that updating Java on my mac (which I guess I did at some point) changes some default password stored deep in the guts of Java from “changeit” to “changeme”. I gota few things to say about this. The PG rated ones are After looking through Juniper Network's knowledge base I have to say, the guy (or guys) in charge are pretty professional and thorough. Their website could do with a little bit better navigation though I would have expected Sun engineers to comeup with a bett...

time.time() vs time.clock()

From a variety of sources, notably here , we have: time.clock() gives the best timer accuracy on Windows, while the time.time() function gives the best accuracy on Unix/Linux. Additionally on non 'win32' systems time.clock() will measure application CPU time, which excludes time spent waiting for I/O while time.time() will measure 'absolute' time. On win32 time.clock() also measures CPU time. If you want to time your code and get absolute times, do what timeit does: if sys.platform == "win32": # On Windows, the best timer is time.clock() default_timer = time.clock else: # On most other platforms, the best timer is time.time() default_timer = time.time

MS word citations file formats etc.

There is one citations file called Sources.xml, created after you add your first citation On Mac the location is ~/Documents/Microsoft User Data (see here for windows specific info) There is a paucity of documentation on the format (so surprising, no?) but various people have put effort into understanding it: Straight forward code on one page for a bibtex to xml conversion. Some one's journal of reverse engineering the xml format.  bibutils - command line tools to convert citations between various formats BibTex -> citation converter by Joonhwan Lee (closed source, free) In short, while MS Word has wasted time and effort reinventing the wheel (and doing so badly) at least the format is text based. Really, all we need to do is convert our PIs to using LyX and we don't have to deal with this %$#@@ any more!

iTunes : getting songs from the same album to group together

When I pulled some of my CDs to iTunes I found that sometimes songs from the same album would appear, in album view, as different albums. It was very annoying. It turns out that iTunes won't group songs with the same album name but different artist (or different album artist) into the same album in album view. The solution is to select all the songs you think should be in the same album, right click for 'info' and then under 'options' check 'part of a compilation'. Make sure that the album artist is the same or is blank. From apple's support page .

Rubble pile asteroids

As a child I learned about asteroids and have pictured them as solid pieces of rock of different sizes. Apparently, though, there have been suggestions since the 1970s and recent empirical data that some asteroids are actually collections of smaller rocks held loosely together by mutual gravity. I don't know what proportion of asteroids are not monolithic, whether the majority of asteroids are such piles of rubble, but this was a piece of information that startled me, because it is from a field I was very interested in as a child, and as a child I had taken the astronomical statements as fact, rather than as interpretations of incomplete data. The statement that asteroids are not monolithic blocks of stone, but are rather collections of small rocks is more interesting to me than some stupid political discussion about whether we should call a celestial body a 'planet' or a 'dwarf planet' or a salami hamburger. From an article in Nature, this page and wikipedia...

QT 4.6 : QListView will not show an updated model without focus

I moved an application I wrote and use from Qt 4.2 to Qt 4.6. I have a widget where there is a QListView associated with a QStringListModel. I type in a text box, hit enter and add text to the QStringListModel. In Qt 4.2 this would cause QListView to automatically show the updated model. In 4.6 the updated view is only shown if QListView has focus. So now I have to setFocus() on the QListView and then setFocus() on the text box to make QListView show the updated model. Bugreport And we think these computers will be taking care of us in our old age. Sigh. PS. On the plus side, 4.2 had a bug where a text edit would not accept the enter key and would pass it onto the parent widget which would cause a dialog box with a text edit to be accepted. That has been fixed. Trolltech giveth and trolltech taketh.