tag:blogger.com,1999:blog-264683972024-03-26T11:03:52.651+02:00Skeletondansemelissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.comBlogger55125tag:blogger.com,1999:blog-26468397.post-63757149978543970462009-01-12T14:09:00.002+02:002009-01-12T14:16:28.391+02:00Setting the current time in a J2ME DateField with mode TIMESo many wasted hours! arg!<br /><br />If you wanted to create a DateField with only time input (i.e. ask the user to input the time only, not a date as well), with the default value the current system time, all the documentation would point to doing it like this:<br /><br /><blockquote><br />DateField df = new DateField ("Enter time:", DateField.TIME);<br />df.setDate(new Date());<br /></blockquote><br /><br />That doesn't work, though. To set the current time in a date field, you need to pass in a date with the year, month and day values of the epoch, and the time that you want to set into the field. Like this:<br /><br /><blockquote><br />Calendar epoch = Calendar.getInstance();<br />epoch.setTime(new Date(0));<br /><br />Calendar currentTime = Calendar.getInstance();<br />currentTime.setTime(new Date());<br />currentTime.set(Calendar.YEAR,epoch.get(Calendar.YEAR));<br />currentTime.set(Calendar.MONTH,epoch.get(Calendar.MONTH));<br />currentTime.set(Calendar.DATE,epoch.get(Calendar.DATE));<br /><br />DateField df = new DateField ("Enter time:", DateField.TIME);<br />df.setDate(new Date());<br /></blockquote>melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com7tag:blogger.com,1999:blog-26468397.post-34322487837718049122008-08-25T23:59:00.003+02:002008-08-26T00:06:38.244+02:00JMF on UbuntuTwo tweaks seem to be needed to use JMF to capture video from a webcam on Ubuntu:<br /><br />1. As described in <a href="http://forums.sun.com/thread.jspa?messageID=9934311">this thread</a>, you need to edit the install script (before running it as it erases itself when run!) you get off <a href="http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/download.html">Sun's site</a><br /> - edit the file using vim -b as it is partially a binary file<br /> - change the arguments to tail from 'tail +309' to 'tail -n+309'<br /><br />2. As described in <a href="http://forums.sun.com/thread.jspa?threadID=5271863&tstart=0">this thread</a>, copy all the libraries (.so files) in JMFHOME/lib/ to /usr/lib, and run ldconfig (as root) to update.For distribution you would obviously want to do this differently, this is just a quick hack to get startedmelissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-42412344459276193532008-01-04T09:12:00.000+02:002008-01-04T21:20:01.250+02:007 months on..I can't say why I'm suddenly back at blogging. Possible factors include:<br /><br />- New years' resolution to waste less time on Internet randomness<br />- Presence of 4 essay deadlines (for a total of 14000 words) in the next 7 days, hence a *very* good reason not to waste more time on Internet randomness<br />- The realization that, 7 months on, 'cups+java printing aargh' is still a recurrent theme in my life<br />- The almost total decline of all areas of my life not occurring indoors (or rather, in this one dodgy university-issue chair, in my very small room)<br /><br />Whatever, welcome to 2007!<br /><br />Except that of course, it's 2008 now. Give me a few months.melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-80003679365969684622007-06-04T10:58:00.000+02:002007-06-04T11:10:46.918+02:00CUPS + Java Printing AaarghAfter being able to print fine from Java in Ubuntu Edgy, I upgraded to Feisty and found that Java was now unable to detect printers using PrintServiceLookup.lookupPrintServices(null, null);<br /><br />A couple of frustrating hours later, I found <a href="http://www.cups.org/articles.php?L433+I0+TFAQ+M10+P1+Q">this article on the CUPS website</a> explaining the problem (a Java bug, caused by updating to CUPS 1.2). The fix is:<br /><br />In cupsd.conf, comment out:<br /><br /><span style="font-family: courier new;">#Listen /var/run/cups/cups.sock</span><br /><br />leave uncommented:<br /><br /><span style="font-family: courier new;">Listen localhost:631</span><br /><br />Another weird Java / CUPS problem I came across was that some Java versions will apparently refuse to print to printers with a - or an @ in the printer name. This wasn't my problem, but it's probably best avoiding these anyway.melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com1tag:blogger.com,1999:blog-26468397.post-32626883361286074492007-05-25T07:52:00.000+02:002007-05-25T20:24:35.095+02:00*shiver*Kokstad is officially the coldest and most unfortunately named South African town I've been to. The small 800W heater I'm huddling next seems incapable of heating anything further than 30cm away, and burns everthing closer than that.<br /><br />I'm flying home tomorrow after a week of interviewing district municipalities about water quality monitoring, and showing them a demo of the cellphone reporting system I've developed for my masters (and/or, work). The response has been very positive, particularly in rural districts where they struggle to reach many small, remote water supply schemes.<br /><br /><br />... and as if that wasn't enough grouching, the power just went out. This has happened a lot in the last week - 2 of the 6 interviews we did took place in the dark.<br /><br />We've driven through some quite beautiful places, on some difficult roads - my cow avoidance skills are improving. Luckily, cows seem to have a kind of inertia about them - once they decide to head off slowly across the road, they generally keep moving in the same direction, albeit at their own pace and oblivious to passing cars.<br /><br />Transkei traffic officials have a similar inertia - I swear the two who trapped me doing 77 in a 60 zone, were in exactly the same place the last time I was on this road, maybe 7 years ago.<br /><br />There's snow everywhere! The oxcart maybe isn't as remarkable, although the photo was taken on the N2, which makes this one seriously brave ox.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSMf1rjVKghzowYMnOZ1Qln0BJRGmP8faqcKeNpAbrWB38MNkMGFgOsWO7Fsz3ynD2b4ucWlkts2_RjdoiQtlmt5S_4oOUVgEsJQAF4I65vUIjyw0Vj3f_WdNO2nEkXiE-WlAF/s1600-h/DSC03242.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSMf1rjVKghzowYMnOZ1Qln0BJRGmP8faqcKeNpAbrWB38MNkMGFgOsWO7Fsz3ynD2b4ucWlkts2_RjdoiQtlmt5S_4oOUVgEsJQAF4I65vUIjyw0Vj3f_WdNO2nEkXiE-WlAF/s200/DSC03242.JPG" alt="" id="BLOGGER_PHOTO_ID_5068565407530919810" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2Q1BZ943eU-ifB0n7YhLLRl3sqg2BqV96j8I6lX2ErB5nBuBYiYBeeM1-78XXcXpsjVw-QKMTSlew6mDjMC0U8WPcGJEf9xtgma_QIe5cIXO4oJPjtmbAFRp4YeNhkh0k6ERa/s1600-h/DSC03237.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2Q1BZ943eU-ifB0n7YhLLRl3sqg2BqV96j8I6lX2ErB5nBuBYiYBeeM1-78XXcXpsjVw-QKMTSlew6mDjMC0U8WPcGJEf9xtgma_QIe5cIXO4oJPjtmbAFRp4YeNhkh0k6ERa/s200/DSC03237.JPG" alt="" id="BLOGGER_PHOTO_ID_5068565407530919826" border="0" /></a>melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-38667744766025223712007-04-13T10:23:00.000+02:002007-04-13T10:37:16.741+02:00Someone saying something worth saying<blockquote>"I am a humanist, which means, in part, that I have tried to behave decently without any expectation of regards or punishments after I'm dead."</blockquote><br /><blockquote>"If I should ever die, God forbid, let this be my epitaph:<br /><br />THE ONLY PROOF HE NEEDED<br />FOR THE EXISTENCE OF GOD<br />WAS MUSIC"</blockquote><br /><br /><br />Source of both quotes is slashdot's um, "epitaph thread" following the death of Kurt Vonnegut yesterday.melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-23936018791567482082007-04-10T08:44:00.000+02:002007-04-10T20:56:16.604+02:00Lion's Head Sunset<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR6tuHKUWEs9qy6jxrGqWr2OLYTBQwgFOjtaQqnrdGelSlDKr9HSrFw07SPIChoxK0T4yyz4FSIAKvv5oJqrogYBeMJSbB94oB4pk1EQXgM7Tsu1my0NOnVLC73BqSSXh__LDT/s1600-h/08-04-07_1840.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR6tuHKUWEs9qy6jxrGqWr2OLYTBQwgFOjtaQqnrdGelSlDKr9HSrFw07SPIChoxK0T4yyz4FSIAKvv5oJqrogYBeMJSbB94oB4pk1EQXgM7Tsu1my0NOnVLC73BqSSXh__LDT/s320/08-04-07_1840.jpg" alt="" id="BLOGGER_PHOTO_ID_5051875255443969490" border="0" /></a>melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com1tag:blogger.com,1999:blog-26468397.post-89679277274711247952007-03-29T10:23:00.000+02:002007-03-29T11:40:21.866+02:00Rage, rageAs promised, the GeekDinner rant:<br /><br />I went along to the <a href="http://www.geekdinner.org.za/2007/03/21/geekdinner-announcement-28-march/">Cape Town GeekDinner</a> last night, hoping I'd learn something, and meet some interesting fellow geeks, and generally interact face-to-face with a community that doesn't make a habit of it. It's been a year since my permanently-scarring attempt to infiltrate a <a href="http://wiki.clug.org.za/wiki/CLUG_Home_Page">CLUG </a>meeting, and I was hoping this would be a slightly more welcoming group of people.<br /><br />Which they were. It was all going ok, until there was a mostly naked women offered free when you buy space in Teraco's data centre. The presenter showed the data centre layout, the state-of-art generator and fire supression system... and a mostly naked women. Pointing out that, when you buy a whole cage, you get one of those free.<br /><br />Hold on, <span style="font-style: italic;">what??!</span><br /><br />/me turns a deep shade of red, and begins clawing the tablecloth.<br /><br />What was most disturbing was that none of men around me seemed to see what I was unhappy about. Let me put it this way: Imagine if the presenter joked that you get a strong, strapping member of a marginalised race group free with your server (to carry you there on a litter. or, whatever else you desire. He is yours, after all, he came free with the server). Would this be appropriate? socially acceptable? the norm? No, of course not - I regret even having to use this offensive and degrading example.<br /><br />So, you wonder why there are so few women in IT. duh.<br /><br />Please realise that this rant is not, in fact, because I am uncomfortable with this kind of raging misogyny. Those of use who have been lucky enough not to be discouraged by families, sexist teaching, and being locked out of the computer science "clubhouse", are all too familiar with it. What does bother me is that it only perpetuates a view of women that most men hold, consciously or not. I bear no malice towards the friendly guy who, when I tried to ask what Ubuntu version (Kubuntu, EduBuntu, Ubuntu / Dapper, Edgy?) was being passed around, explained to me that "oh, it's just a Linux distro". However, I really am getting tired of having to prove myself <span style="font-style: italic;">every single time</span> I meet new people, just because I'm female and work in IT, and your social conditioning doesn't expect my existence.<br /><br />To the GeekDinner crowd: I hope you get it right next time. I would have loved to explain to everyone there exactly why I wanted to lynch the guy from Teraco, but I'll settle for this: Please open your eyes to how you view women, and how your actions reinforce stereotypes that the world would be much better off without. And, when you realise there's a problem, and see others engaged in exacerbating it, stick your neck out for a change. As the <a href="http://www.tldp.org/HOWTO/Encourage-Women-Linux-HOWTO/">Encouraging Women in Linux HOWTO</a> points out,<br /><br /><a name="AEN175"><blockquote>Every time a woman sees a sexist joke or comment, she feels angry, left out, and belittled. Every time a woman sees a man stand up against this behavior, she feels included and valued.</blockquote><br />For a change, I'd like to interact with this community as geek first, women second.<br /><br /><br /></a>melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com7tag:blogger.com,1999:blog-26468397.post-46095170765689397912007-03-18T00:34:00.000+02:002007-03-18T12:43:43.021+02:00The Devil's Actuary<span style="font-style: italic;">Came across this during some hard drive spring cleaning - it was lurking in my first-ever Debian install. Written for a short story competition in 2nd year.</span><br /><br />----<br /><br />It was a bright spring morning, alive with birdsong and a gentle breeze, when the actuary had his first visitation from the devil. This event, which lasted a little over a minute, would not have been remarked upon by even the most observant passer-by. Few people risk a second glance at a dark-suited man with a forked tail, reddish and smoking slightly, draped casually over the back of his chair.<br /><br />The actuary, sweating slightly, was suffering from a severe hangover. One minute he was working late at the office, comfortably siphoning off the retirement funds of little old ladies, and the next he was accosted and dragged to a smoke filled bar by a gang of marauding co-workers. Thinking back, the sudden increase in paedophilia accusations against jolly old men and intra-office flirtation should have warned him that it was Office Christmas Party time again.<br /><br />One thing led to another. Force-fed on expensive brandy, forcibly rebuffed by inumerable voluptuous secretaries, he had ended the night grateful to have no memory of it.<br /><br />That morning, things had taken a turn for the worse. For one thing, the office airconditioning unit seemed to be malfunctioning, radiating a fiery heat that smelt slightly of sulphur. Outside, the birdsong had taken on a desperate quality, interspersed by the low hunting mewls of thousands of jet-black cats. If he has listened closely enough, the actuary would have heard tiny avian death rattles, and the growling of larger feline stomachs. The devil took great care with atmospherics. Punctually at 9am, a billowing cloud of acrid smoke filled the actuary's office. As it cleared, he realised that a small, wiry man had appeared. The man coughed viciously for a moment, then brushed off his<br />suit and pulled from his briefcase a grubby document. "Right," he said, "Let's have it then."<br /><br />"W-What?" stammered the confused actuary, noticing as he spoke the deceptively sharp pair of horms protruding from his visitor's head. It had become very hot, and he was struggling to think clearly. "Your Soul, please, without delay. You mortals underestimate the precise nature of timing in the torture business. I have a man stretching on the automatic Rack back in hell, and if I leave him too long he will die. That's not really the point of eternal torment, is it?"<br /><br />"A-a-automatic Rack?" asked the actuary, shaking quite uncontrollably. "Oh yes, hell is very advanced, you know. We have such a surplus of Atheist engineers, really quite convenient. They suffer terribly, he he, when they find out they aren't God. You should see what they've done with the pit of serpents, really very efficient... You do know that you sold me your soul, don't you? It was last night, and a damn mess you made too, all that beer spilt on the contract. I must say, I'm looking forward to having you. We always need actuaries. People are very fickle in their beliefs, we really can't predict or manage that risk without you." The devil winked. It was not a friendly wink. He fingered somthing on his belt that looked like a very small, very sharp drill. The actuary had begun to lose hope that its presence evidenced his visitor's interest in woodwork.<br /><br />"Oh, yes," the devil continued, "You're going to tell me you were drunk? If your mother, who I have incidentally had the pleasure of meeting personally, by the way, I believe she was an fornicator? Very unfortunate. We have ways and means and whips and chains for that sort. Anyway, she should have taught you that alcohol was the devil's poison." The drill-like item was being waved closer and closer to the actuary's shivering body, and the devil revved it every now and again.<br /><br />"You know," said the devil, "I think you'll enjoy hell. I do. Nothing beats wailing and gnashing of teeth when it comes to job satisfaction. Being the evil incarnate is something i'm really passionate about." He revved the drill again, and smiled to reveal the foul glint of his razor-sharp teeth. "I used to be an actuary, you know, but that was hardly evil at all. I only did it for the money."melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com3tag:blogger.com,1999:blog-26468397.post-55704480742146497132007-02-14T00:09:00.000+02:002007-02-15T10:27:05.158+02:00This Valentines' Day, Give Dog FoodValentines' day is commercialised, unnecessary, miserable if you're single, and possibly expensive if you're not. You can approach it being bitter and cynical ('I don't do Valentines' day.') or go along with the herd but there isn't much in between.<br /><br />I'm not really bitter - love is worth celebrating! I have happy memories from Valentines' day, and happy memories from other days, and other kinds of love.<br /><br />So, here's the idea:<br /><br />There are many ways that the cost of dinner and a movie / a box of chocolates / whatever else you'd buy on Valentines' day, could be spent. For organisations that rely on donations, this money (or a few hours of your time) could make a huge difference. If you're single this year, or just not into the whole Valentines' day hype, have a look at <a href="http://www.greatergoodsa.co.za/index.jsp">GreaterGoodSA</a> and see if you can find a way to share some love anyway.<br /><br />Since I woke up this morning not next to a lover, but next to a small tortoiseshell cat left as a tiny kitten in a stormwater drain, my R50 went to TEARS, the animal rescue society that found her. I feel warm already, and anyway, good sex and sunsets are free :p<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8sQvXHyY9rKH56LSfqurX5k6vSho6vxRWvHPZeiDJntwvFCC1PbaSMei4dlEuorBXx1KtUCL_J-ZftFI9noYgX9BG6lvawvgntVXkaQV1fRcGvyQJGD4v4L4R93Om1q_iUlnl/s1600-h/dsc00374small.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8sQvXHyY9rKH56LSfqurX5k6vSho6vxRWvHPZeiDJntwvFCC1PbaSMei4dlEuorBXx1KtUCL_J-ZftFI9noYgX9BG6lvawvgntVXkaQV1fRcGvyQJGD4v4L4R93Om1q_iUlnl/s320/dsc00374small.jpg" alt="" id="BLOGGER_PHOTO_ID_5031338257682439506" border="0" /></a>melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-64623104505882945552007-02-06T10:56:00.000+02:002007-02-06T12:02:53.718+02:00Xorg drivers for VIA Unichrome Pro P4M890After an entire day with my monitor refusing to refresh at > 60hz, this is somewhere between a rant and a howto - if you're in the same situation, you'll understand! Anyway, the background is that I bought (for a site) the cheapest Foxconn motherboard Sahara sells, which comes with onboard graphics in the form of the VIA P4M890 integrated graphics chipset. Install Ubuntu 6.10, boot, and discover that everything works... except my screen resolution settings. Even when the screen resolution graphical config tool says it's running at 85hz, the way my brain squirms every time I look at the screen tells me it isn't. After establishing that the problem isn't the cheap Sahara monitor (the smallest 17" I've ever seen) or an xorg.conf setting, it's off to the Ubuntu forums, where I find a foretaste of things to come in the form of one user's comment<br /><blockquote>'Oh, that's a LOVELY piece of hardware *rolls eyes*'</blockquote>To cut a long and horribly flickering story short, VIA does in fact provide linux drivers for the P4M890 chipset - they're just in the basement, in a locked cabinet hidden in a disused lavatory behind a door with a sign reading "beware of leopard". In fact, they can be found at the <a href="http://www.viaarena.com/default.aspx?PageID=420&OSID=25&CatID=2580&SubCatID=164">Via Arena site</a>, and there's a recent howto <a href="http://www.hombrepac.com.ar/software-libre/linux/how-to-via-k8m890-chrome-9-igp-and-linuxs-xorg-ubuntu-edgy-610/">here.</a><br /><br />Useful things to note, or, avoid making the mistakes I made:<br /><ul><li>There are xorg and XFree86 drivers here - read the fine print carefully. if you find the install script looking for Xfree86-specific things, don't try to change it, you've downloaded the wrong driver package.<br /></li><li>There is also an installation guide, written by someone who does not speak much english. This is ironic, because all their PR material is written by a gushing woman name Fiona Gatt, who speaks perfect english.</li><li>The installation guide is supplemented (and also contradicted at times) by the files Installation.txt and src/release.txt inside the source tarball. None of these make much sense alone.</li><li>Don't try the OpenChrome drivers, because although in general they seem to be a better idea than the VIA-provided drivers, they don't yet support this chipset (although other Unichrome Pro chipsets apparently are fine)<br /></li></ul>Lastly, the VIA arena site is almost calculated to instill rage in anyone looking there for graphics drivers. I AM HERE BECAUSE MY REFRESH RATE IS 60HZ, I DO NOT WANT TO BUY YOUR STUFF. OR CLICK ADSENSE ADS. OR GET UNREAL TOURNAMENT MAPS. I JUST WANT MY SCREEN TO STOP FLICKERING. Everything is white. You cannot find xorg drivers unless you know the direct URL. The latest packaged graphics drivers are for Fedora Core 4. aargh.melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com5tag:blogger.com,1999:blog-26468397.post-73529178873563124112007-02-06T06:50:00.000+02:002007-02-07T09:29:02.201+02:00Underwater PhotosTaken by my brother over December, <a href="http://maps.google.com/?ie=UTF8&z=13&ll=-22.910017,35.563087&spn=0.069731,0.11673&t=k&om=1">here</a>. I'm the scuba diver in the bubbles :p The rest of the photos were taken without scuba gear ('stealth mode'), which apparently is why the turtle was so curious.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC5oibqQtsoIXllDmY6x8_z0ooui_99Gq5q5u5y687kyzaS5YhxoabRkPKRzvYk4yu3TbVHPe_kx404fDiZOHqai-spWscUMzKJP_CJG9MOCdvV87AoPtOuWDEYcAUcBDaOq7o/s1600-h/DSC00060.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC5oibqQtsoIXllDmY6x8_z0ooui_99Gq5q5u5y687kyzaS5YhxoabRkPKRzvYk4yu3TbVHPe_kx404fDiZOHqai-spWscUMzKJP_CJG9MOCdvV87AoPtOuWDEYcAUcBDaOq7o/s400/DSC00060.JPG" alt="" id="BLOGGER_PHOTO_ID_5028464945154550450" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYOisMF7PqRp7NzA5JNXDAcoyFThlcMjnos6D3EwMgqLLL_rB85EFzZ-t_1QXtunn0_a307QeV1xq6RiMR0NkufSW2u9fEbnHVSxkON1xu3ORhlvAA1kEoNpwC8aMplgfkvLSv/s1600-h/DSC00065.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYOisMF7PqRp7NzA5JNXDAcoyFThlcMjnos6D3EwMgqLLL_rB85EFzZ-t_1QXtunn0_a307QeV1xq6RiMR0NkufSW2u9fEbnHVSxkON1xu3ORhlvAA1kEoNpwC8aMplgfkvLSv/s400/DSC00065.JPG" alt="" id="BLOGGER_PHOTO_ID_5028464949449517762" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfxBmgCnkW7kQk1V_P67ezHG8uWKl_-ZW35xGtpj5i1CmJd6o6rUcbpQhjqJSmgBKcJpj7QwSrFRkiLDGZtdz341-ZDpdsz2dhcPBCm97yU3juHqWuqPgajn_TFDHuw1fOxWOP/s1600-h/DSC00068.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfxBmgCnkW7kQk1V_P67ezHG8uWKl_-ZW35xGtpj5i1CmJd6o6rUcbpQhjqJSmgBKcJpj7QwSrFRkiLDGZtdz341-ZDpdsz2dhcPBCm97yU3juHqWuqPgajn_TFDHuw1fOxWOP/s400/DSC00068.JPG" alt="" id="BLOGGER_PHOTO_ID_5028464953744485074" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg22miRfHSS7jOF7Wq1DFLxCwzQWPgL4-XpwTEZtTfrBPIbM-wQWtVAeXwo545KnoWtNM0OeLYChxq6KtpC96NQ84HoUof2vHEsLL6xTW0SWm6jWGGxOaVOTD_8FGj5NFUF4CBM/s1600-h/DSC00077.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg22miRfHSS7jOF7Wq1DFLxCwzQWPgL4-XpwTEZtTfrBPIbM-wQWtVAeXwo545KnoWtNM0OeLYChxq6KtpC96NQ84HoUof2vHEsLL6xTW0SWm6jWGGxOaVOTD_8FGj5NFUF4CBM/s400/DSC00077.JPG" alt="" id="BLOGGER_PHOTO_ID_5028464953744485090" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzspt85Nhm8bwPbDXNtKVryWDYeZDn21mjbckvI7dtd4gX-dAp_uge9mqrxdgF1suXzbs-ejJnxXHRck8RIQONurUe__n0LkKMaOZP9ubtelCRfvTyRUXcJbkPbI5e2KWwJp4y/s1600-h/DSC00097.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzspt85Nhm8bwPbDXNtKVryWDYeZDn21mjbckvI7dtd4gX-dAp_uge9mqrxdgF1suXzbs-ejJnxXHRck8RIQONurUe__n0LkKMaOZP9ubtelCRfvTyRUXcJbkPbI5e2KWwJp4y/s400/DSC00097.JPG" alt="" id="BLOGGER_PHOTO_ID_5028464958039452402" border="0" /></a>melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com1tag:blogger.com,1999:blog-26468397.post-44537213430154585412007-02-01T09:45:00.000+02:002007-02-01T12:22:24.988+02:00Ubuntu Live CD Customization III posted <a href="http://skeleton-danse.blogspot.com/2006_06_01_archive.html">this</a> a while ago, and I've recently updated the Live CD mentioned in the post. It's still based on Ubuntu Dapper Drake, and I still used the howto <a href="http://www.atworkonline.it/%7Ebibe/ubuntu/custom-livecd.htm">here</a> to get the basics. A useful find was <a href="http://liuwenguo.googlepages.com/remove.sh">this script</a>, which frees about 100Mb by removing all the non-essential packages.<br /><br />Here are few other tweaks:<br /><br /><ul><li>To place an icon on the desktop when the CD loads, put the relevant .desktop file in /etc/skel/desktop</li><li>To put files in the user's home directory, place them in /etc/skel</li><li>If one of the files you want the user to be able to access easily is a pdf (such as a user guide), place a shortcut on the desktop be be warned that evince (the standard pdf viewer) doesn't open maximized. Annoyingly, you can't control this from the command line either. What you can do is leave a "last used settings" file in the user's home directory, to fool evince into thinking that the last pdf it opened was opened maximised. The easiest way to do this is to open any pdf, maximise it, close evince and copy the file ~/.gnome2/evince/ev-metadata.xml to /etc/skel/.gnome2/evince/ev-metadata.xml on the livecd.</li><li>Usually you'll want to get rid of the "install" icon on the desktop. This avoids the user accidentally installing ubuntu with the CD you swore wouldn't touch their existing operating system. To find the .desktop file to edit (make it point to something else you'd like on your desktop - although according to this howto, you should just be able to edit the script that copies it on, which didn't work for me) use locate ubiquity*.desktop</li><li>To change the desktop background to your own 1600×1200 png: Edit the file /var/lib/gconf/debian.defaults/%gconf-tree.xml and change the string /usr/share/backgrounds/warty-final-ubuntu.png to point to your file.</li></ul>melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com1tag:blogger.com,1999:blog-26468397.post-26398036959359049082007-02-01T00:38:00.000+02:002007-02-01T13:17:17.546+02:00Hungry Ghosts and Misc. LinksAccording to Japanese mythology, I'm being tormented at night by<br /><blockquote>"spirits of jealous or greedy people who, as punishment for their mortal vices, have been cursed with an insatiable hunger for blood"<br /></blockquote> otherwise known as mosquitos (wikipedia: Hungry ghost). Until DDT is back on pharmacy shelves, there's only one real soultion to late-night buzzing: <a href="http://www.elizium.nu/scripts/lemmings/">Lemmings</a> (thanks mike for the link)<br /><br />For the morning after, though, there's always Caffeine. <a href="http://www.energyfiend.com/the-caffeine-database/">This helpful site</a> tells you how much of it you'll find in a long list of drinks and foods. I particularly like the <a href="http://www.energyfiend.com/death-by-caffeine/">Death By Caffeine Calculator</a>.melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-9550496502445953102007-01-24T06:04:00.000+02:002007-01-24T18:17:53.324+02:00Another YearI like the irony of this photo - watching the sun rise from Lion's Head, while far below, my car is being broken into.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaJV_KkdAck0TmZxS6W873kNtxL0Yczu2V_pKQElNV-nhJsUwwii2XH6ygmES6RrXKT1cccUqtG2WhyPUQeLFkCXWmImugdarVoRtAv0FyuXe6cwoqXOOqo_-WGF0U26YH9PbC/s1600-h/mountian.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaJV_KkdAck0TmZxS6W873kNtxL0Yczu2V_pKQElNV-nhJsUwwii2XH6ygmES6RrXKT1cccUqtG2WhyPUQeLFkCXWmImugdarVoRtAv0FyuXe6cwoqXOOqo_-WGF0U26YH9PbC/s400/mountian.jpg" alt="" id="BLOGGER_PHOTO_ID_5023629944336644642" border="0" /></a><br />That said, it was a great sunrise.<br /><br />In other news, NOFX are rumored to be coming to SA... again. I was always a bit cynnical, and this is the third time I've heard The NOFX Rumor, but for the sake of everyone who cut their punk scene teeth on this band I hope it's true. I wasn't among those, and there are a few punk bands I'd rather see - Strung Out and Bad Religion at the top of that list, also Thursday and Rise Against. And Lagwagon last year were great.<br /><br />It was apparently 35 in the City Bowl today, so I've stayed at work in the semi-aircon until it cools down a bit. I have more to post, later, but I've run out of time. There is cold beer in the fridge at home.melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-54664102444315863352007-01-19T03:31:00.000+02:002007-01-19T15:33:36.224+02:00THE MORE OF THIS YOU READ[From a full-page ad in the Mail&Gaurdian this week - source: <a href="www.tectonic.co.za">www.tectonic.co.za</a>]<br /><br />Last year, Telkom recorded a staggering R9.3 billion in pure profit. At your expense. Read on and find out why South Africans continue to pay some of the highest prices for telephony services in the world. Don't expect the government to step in. They couldn't give a hoot. They've got a 38% shareholding. This in itself is like a ticket to act with impunity. And anyway, it's the Independent Communications Authority of South Africa (ICASA) which acts as the watchdog for the telecommunications industry. Their central role is to regulate telecommunications in the public interest. So how come they're not barking noisily and waking up the country about the fact that South Africans pay five times as much for a local call now than they did in 1996? Or that internet access in South Africa is among the most expensive in the world (in fact, you'll pay less for broadband in Morocco, Egypt, Botswana, and Mozambique)? Or that Telkom is only too happy to pay a R15 million fine for failing to deliver basic services where "it was not economical to do so" (Hold the phone, could that be your area they were talking about?) Worse still, Telkom has laid off over 35 000 staff over the past seven years, ensuring that its profits continue sky-rocketing while the rest of the country continues at a snail's pace, waiting up to six inexcusable months or more, to get connected. To anything. And all this from a company that is supposedly "proudly South African"? Indeed, something is very wrong when the only way the public can get through to Telkom is by running a full page newspaper advertisement. Because clearly, Telkom isn't answering the phone.melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-41947669214496891542007-01-15T01:41:00.000+02:002007-01-15T14:02:37.320+02:00How Far We've ComeA bit hesitant to post this, you're never sure who really reads a blog (and i'm hoping my parents have lost the address!) Also, I can't find the site I intially read the article on, and since I'm at work it's going to be hard to search much.<br /><br />Ah, what the hell: <a href="http://www.health24.com/sex/Sex_toys/1253-2616-3503,32082.asp">here's the link</a><br /><br />I found this while wandering unrelatedly around the web, as you do. How much is true I don't know (a calabash of buzzing bees? hmm) but it's interesting to see how far we've come, and to wonder how history will view our assumptions about sex.<br /><br />So, it'd be nice if someone would comment for once.... What could be as twisted to our great grandchildren as some of this seems to us? Any ideas?melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com1tag:blogger.com,1999:blog-26468397.post-52638241984943870272007-01-07T07:18:00.000+02:002007-01-07T19:39:00.473+02:00Help I Can't Think of a Title Devoid Of Tastless Sheep JokesYou can't go wrong with gay sheep jokes, to start with, but <a href="http://www.iol.co.za/index.php?set_id=1&click_id=31&art_id=vn20070107104004157C866087">this article</a> contains some interesting science, too. Turns out that around 8% of rams actually prefer other rams, and "will swiftly pounce on any ram stuck in a fence, the sheep equivalent of prison showers". Ewes, too, might be lesbian, but since female sheep express a desire for sex by standing still, no-one's quite sure (and there may be a lot of frustrated female sheep).<br /><br />The real punchline, though, is that an actual biological difference (in the size of the hypothalamus), identifiable from the third trimester of pregnancy, has been identified as the cause of homosexual behaviour in sheep. Sheep really are born gay or straight, the first hard evidence scientific evidence of this in mammals.<br /><br />It's worth reading the whole article, but this fact alone, and the distress it should cause religions the world over, will have me sleeping very soundly tonight.melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com1tag:blogger.com,1999:blog-26468397.post-10516043186634264132007-01-06T11:33:00.000+02:002007-01-07T00:27:54.358+02:00An End To Hunger2 weeks in Mozambique in December (it's 30 degrees... at midnight) is great for sleeping, reading, daydreaming and anything else not requiring actually moving from your hammock. It's just too hot. Since <a href="http://www.sinner.co.za/">mike</a> moved in last year our house has read quite a bit of China Mieville, and I borrowed Iron Council (closer to a fever dream than some of my fever dreams. brilliant) to take with me, and to use to fend off giant flying insects. I also bought Looking For Jake (his latest book, a collection of short stories) before I left. One story I particularly like is <a href="http://www.theregister.co.uk/2001/01/10/the_reg_brings_you_more/">An End To Hunger</a>, conveniently published online by The Register. It's worth reading, particularly for the email from 'Very Hungry Foreign People' on page 3.<br /><br />Unrelatedly, we managed to get my tattoo to scan at the end of last year :) It's healed well, and I have a few more pictures that I'll download and post. The phone that scanned it successfully was a Nokia N70.<br /><br />Also, I've finally given in and joined Facebook - suddenly, it seems important to keep in touch, and I'm terrible at it most other ways. Thanks <a href="http://www.imod.co.za">chris</a> for helping with that, your newyears party was great!melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-38372791443128398282006-12-07T00:15:00.000+02:002006-12-07T12:28:07.123+02:001000 more words<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.sackmanto.co.za/images/zapiro/031121.gif"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;" src="http://www.sackmanto.co.za/images/zapiro/031121.gif" alt="" border="0" /></a><br />From the collection of Zapiro cartoons on <a href="http://www.sackmanto.co.za">www.sackmanto.co.za</a> - with apologies for the copyright violation. The site also as some interesting quotes from South Africa's Health Minister, like these:<br /><br /><blockquote>(Aids)... "could also be a God-given opportunity for moral and spiritual growth, a time to review our assumptions about sin and morality".<br />mg.co.za - 1/4/03<br /><br />"Look at what Bush is doing. He could invade." ... Manto on why money needs to be spent on defence rather than treating AIDS<br />Sapa - 19/12/02 </blockquote>melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-82599269078683067872006-12-05T08:54:00.000+02:002006-12-05T09:45:25.613+02:00Like Majick<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb8DOgkXZhjOHRJerzhHc_Pg1ln5X7VsrscdbQyrl3lyhzN2UTQ1pkw8nCgsJ-C1g13V0WDWDM9oyG4c22lALYEtF-BblBD-ERG3VQ-Ciz2NralnI-ZlOc0utmyQ9VTpmhIOZc/s1600-h/dsc01322.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb8DOgkXZhjOHRJerzhHc_Pg1ln5X7VsrscdbQyrl3lyhzN2UTQ1pkw8nCgsJ-C1g13V0WDWDM9oyG4c22lALYEtF-BblBD-ERG3VQ-Ciz2NralnI-ZlOc0utmyQ9VTpmhIOZc/s200/dsc01322.jpg" alt="" id="BLOGGER_PHOTO_ID_5004941353131961010" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTau0XM1d68WDz-knm78WQ2mBmWZ9i_4S1Q_RqNxqAxNRccHdoXcYQ2lXoKA3G2qNxfOcJvvnqpVjF7LkzwROj5FgM-mw90lLJnhCJ1tPJMwVi94e0MlgcsZBC_hvb3LZUNx1s/s1600-h/dsc01328.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTau0XM1d68WDz-knm78WQ2mBmWZ9i_4S1Q_RqNxqAxNRccHdoXcYQ2lXoKA3G2qNxfOcJvvnqpVjF7LkzwROj5FgM-mw90lLJnhCJ1tPJMwVi94e0MlgcsZBC_hvb3LZUNx1s/s200/dsc01328.jpg" alt="" id="BLOGGER_PHOTO_ID_5004941146973530786" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9vXv_J5ocJcAKTFwYmR-KI_fqHg9ljNTLz-dpFfYtEu2wtrX7S7OA6VlR0EvASkJ8NZmbVrjJreohoFD2Np3us07pXWm0FSKoyWlBJL-RNqcsc7ciCU1ceecQVHZA3FRzGZCE/s1600-h/dsc01271.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9vXv_J5ocJcAKTFwYmR-KI_fqHg9ljNTLz-dpFfYtEu2wtrX7S7OA6VlR0EvASkJ8NZmbVrjJreohoFD2Np3us07pXWm0FSKoyWlBJL-RNqcsc7ciCU1ceecQVHZA3FRzGZCE/s200/dsc01271.jpg" alt="" id="BLOGGER_PHOTO_ID_5004941056779217554" border="0" /></a><br />A <a href="http://bbips.org/">useful script for batch image processing on Linux</a> using <a href="http://www.imagemagick.org/script/index.php">ImageMajick</a>. I found this while looking for a way to resize a whole directory of images - it has a slightly frustrating interface, but it works, and the resulting 150x200 images, all seen together, look effective. The three above were taken<a href="http://maps.google.com/?ie=UTF8&z=13&ll=-22.910017,35.563087&spn=0.069731,0.11673&t=k&om=1"> here</a>.melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-9934150988528444412006-11-06T10:45:00.000+02:002006-11-10T13:28:29.451+02:00Fog Of WarI'm used to a bit of propoganda with my morning coffee, but <a href="http://www.iol.co.za/index.php?set_id=1&click_id=31&art_id=qw1162787403765R131">this story</a> is the most jaded reporting of a scientific study I've seen in a while.<br /><br /><span style="font-style: italic;" class="articletext"><blockquote>Amsterdam - Occasional and moderate <span style="font-weight: bold;">abuse</span> of the drugs cannabis and ecstasy does not lead to long-term memory impairment or affect ability to concentrate, according to a study conducted at Utrecht University in the Netherlands.<br /><br />The findings are contained in a doctoral thesis by Gerry Jager, who conducted her research in combination with the Academic Medical Centre in Amsterdam.<br /><br />"Occasional use of ecstasy (an average of a total of two pills) or frequent cannabis use (several marijuana cigarettes a week over a period of an average of four years) does not lead to long-term abnormalities in memory or ability to concentrate, or related brain activity," Jager found</blockquote></span><span style="font-style: italic;" class="articletext"><br /><blockquote></blockquote></span>Abuse? No, that's a Bad Thing and shouldn't be allowed. Abuse, of course, is what happens when people do drugs - we <span style="font-style: italic;">use</span> alcohol to relax, religion to belong, the media to influence how people think but that's not Abuse, theBad Thing.<br /><br /><a href="http://www.iol.co.za/index.php?set_id=1&click_id=31&art_id=qw1151357943223B252">Another story</a> pops up under related news: Apparently, Europeans have a new favourite drug.<br /><br /><blockquote style="font-style: italic;">Hallucinogenic "magic mushrooms" are the latest trendy drug among young Europeans because of a growing interest in organic products and Internet marketing</blockquote><br /><br />All well, and by the sound of it, pretty good. Not for long: cue Doom, Gloom, Lies (Damned Lies) and Statistics.<br /><br /><blockquote style="font-style: italic;">According to the European Commission, more than 8 000 people - mainly young men in their 20s and 30s - die of drug overdoses each year. The total number of drug-related deaths - including accidents, violence and Aids - is estimated at over 20 000.</blockquote><br /><br />Alright, that's a fair number, and drug overdose deaths are tragic, and sometimes preventable. Whether they're preventable by enforcement is pretty debatable though. For deaths that are 100% preventable though, try <a href="http://www.iol.co.za/index.php?set_id=1&click_id=31&art_id=qw1162802161359B254">these</a>:<br /><br /><blockquote style="font-style: italic;">Some 70 000 women worldwide die from unsafe abortions each year while many more suffer serious injuries, especially in poor countries, health experts said on Monday.</blockquote><br /><br />The above-mentioned "Magic Mushrooms" article also exposed a hitherto-unknown illicit trade: Heroine Imports. Apparently<br /><blockquote><br /><span style="font-style: italic;"> flows of cocaine and heroine into the continent are rising.</span></blockquote><span style="font-style: italic;"></span><br /><br />Crates of Wonderwomen? Joans of Arc? Seems a shame - everyone needs a heroine in their life :p<br /><br /><br /><span style="font-style: italic;"><br /><blockquote></blockquote></span><span style="font-style: italic;"></span>melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-19612338376314839482006-10-30T04:22:00.000+02:002006-10-30T16:23:47.415+02:00TodayToday is the greatest<br />Day I ve ever kown<br />Cant live for tomorrow<br />Tomorrows much too long<br />I burn my eyes out<br />Before I get out<br /><br />I wanted more<br />Than life could ever grant<br />Bored by the chore<br />Of saving face<br /><br />Today is the greatest<br />Day I have ever known<br />Cant wait for tomorrow<br />I might not have that long<br />Ill tear my heart out<br />Before I get out<br /><br />Pink ribbon scars<br />That never forget<br />Ive tried so hard<br />To cleanse these regrets<br />My angel wings<br />Were bruised and restrained<br />My belly stings<br /><br />Today is<br />Today is<br />Today is<br />The greatest day<br />That I have ever known<br /><br />I want to turn you on<br />I want to turn you round<br />I want to turn you on<br />I want to turn you<br /><br />Today is the greatest<br />Today is the greatest day<br />Today is the greatest day<br />That I have ever known<br /><br />--<br /><br />Smashing Pumpkins - Todaymelissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com2tag:blogger.com,1999:blog-26468397.post-52940974719228288742006-10-30T00:47:00.000+02:002006-10-30T13:02:40.538+02:00*Ribbit*<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/45/3231/1600/frogs1.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/45/3231/320/frogs1.png" alt="" border="0" /></a><br />Every Monday needs some Weird. And there are few things weirder than a rain of frogs.melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com0tag:blogger.com,1999:blog-26468397.post-401308461369938662006-10-30T00:30:00.000+02:002006-10-30T12:46:15.123+02:00Generating a User Manual From JavaHelp<p>I'm working on an application that needs to have the user documentation accessible when you click the big, bright, friendly 'help' button, and also as a printed manual. We're using <a href="http://java.sun.com/products/javahelp/">JavaHelp</a>, which has its moments but seems to do the job, and was quite painless to get going.<br /></p><p><br />JavaHelp needs pages to be in html 3.2 (why? why?) - this means you need to be careful when writing / editing help with a wysiwyg editor. On my system, I get strange-looking pages when editing with nvu, but openoffice works fine.</p><p><a href="http://jhelpdev.sourceforge.net/development.html"> JhelpDev</a> is a JavaHelp generator. It’s easy to use - create your html pages then use the <acronym title="Table of Contents">TOC</acronym> editor to organise them into a table of contents. Then, export the helpset and related files. The methods to create and display the help from java are:</p><br /><pre class="code javascript"><span class="coMULTI"> /*<br /> * This method creates the help frame<br /> *<br /> */</span><br /><br /> <span class="kw2">private</span> <span class="kw1">void</span> createHelp<span class="br0">(</span><span class="br0">)</span> <span class="br0">{</span><br /> <span class="kw1">try</span> <span class="br0">{</span><br /> ClassLoader cl = Welcome.<span class="kw2">class</span>.<span class="me1">getClassLoader</span><span class="br0">(</span><span class="br0">)</span>;<br /> URL url = <span class="kw2">new</span> URL<span class="br0">(</span><span class="br0">(</span><span class="kw2">new</span> File<span class="br0">(</span><span class="st0">"."</span><span class="br0">)</span><span class="br0">)</span>.<span class="me1">toURL</span><span class="br0">(</span><span class="br0">)</span>, <span class="st0">"doc"</span> + File.<span class="me1">separator</span><br /> + <span class="st0">"help.hs"</span><span class="br0">)</span>;<br /> JHelp helpViewer = <span class="kw2">null</span>;<br /> <span class="co1">// Create a new JHelp object with a new HelpSet.</span><br /> helpViewer = <span class="kw2">new</span> JHelp<span class="br0">(</span><span class="kw2">new</span> HelpSet<span class="br0">(</span>cl, url<span class="br0">)</span><span class="br0">)</span>;<br /> helpViewer.<span class="me1">setCurrentID</span><span class="br0">(</span><span class="st0">"top"</span><span class="br0">)</span>;<br /><br /> frame.<span class="me1">setSize</span><span class="br0">(</span><span class="nu0">800</span>, <span class="nu0">600</span><span class="br0">)</span>;<br /> frame.<span class="me1">setTitle</span><span class="br0">(</span><span class="st0">"iDART Help System"</span><span class="br0">)</span>;<br /><br /> frame.<span class="me1">getContentPane</span><span class="br0">(</span><span class="br0">)</span>.<span class="me1">add</span><span class="br0">(</span>helpViewer<span class="br0">)</span>;<br /> frame.<span class="me1">setDefaultCloseOperation</span><span class="br0">(</span>JFrame.<span class="me1">DISPOSE_ON_CLOSE</span><span class="br0">)</span>;<br /><br /> <span class="br0">}</span> <span class="kw1">catch</span> <span class="br0">(</span>Exception e<span class="br0">)</span> <span class="br0">{</span><br /> System.<span class="me1">err</span>.<span class="me1">println</span><span class="br0">(</span><span class="st0">"API Help Set not found"</span><span class="br0">)</span>;<br /> e.<span class="me1">printStackTrace</span><span class="br0">(</span><span class="br0">)</span>;<br /> <span class="br0">}</span><br /> <span class="br0">}</span><br /><br /> <span class="coMULTI">/*<br /> * This method displays the help<br /> *<br /> */</span><br /> <span class="kw2">private</span> <span class="kw1">void</span> showHelp<span class="br0">(</span><span class="br0">)</span> <span class="br0">{</span><br /> frame.<span class="me1">setVisible</span><span class="br0">(</span><span class="kw2">true</span><span class="br0">)</span>;<br /><br /> <span class="br0">}<br /><br /></span></pre><p> Once you’ve got the help working fine from the application, you can turn it into a user manual by: </p> <ol><li class="level1"><div class="li"> Generating an ordered list of the files you want to concatenate into the help. Since this order is probably the same as the order of the <acronym title="Table of Contents">TOC</acronym> entries for JavaHelp, it’s easiest to just extract the file names from the xml <acronym title="Table of Contents">TOC</acronym> file.</div> </li><li class="level1"><div class="li"> Use the ordered list as input to <a href="http://www.cs.stir.ac.uk/%7Ekjt/software/web/htmlcat.html">htmlcat</a>, a perl script for concatenating html files. This should give you one long html file, in the correct order</div> </li><li class="level1"><div class="li"> Open the html file in your word processor and save it as a document. Insert page breaks as necessary.</div> </li></ol><pre class="code javascript"><br /></pre><p><br /></p><p><br /></p>melissahttp://www.blogger.com/profile/07705894117414393191noreply@blogger.com2