Categories
Blog News

Extreme Sheep Hearding

Categories
Blog News

How to recover all pictures / photos on your iPhone when they don't show up on your desktop

I’ve added a howto on my iPhone page that’s been very usefull to me (source from TUAW) : sometimes the syncing between iPhone and iPhoto goes a bit haywire and you don’t see all the pictures on your iPhone that you need to download.

The above howto shows you how to solve that.

Categories
Apple

Disk Usage on a Mac : Omni DiskSweeper is now free !

Remember my post about using some bash scripting to find out the sizes of those space-consuming movie directories ?
The Omni Group has decided to make a few apps free to use from now on – one of those is the OmniDiskSweeper application, which is quite a nice tool to use !

After selecting a disk to scan, it gives you a very clear overview of your directories and their respective sizes, and you can then drill down in them.

A handy delete button is provided as well…

Categories
Blog News

Loewe commercial

This one really made me laugh !

Categories
Blog News

Skankiness levels…

The Onion Network…

Categories
Blog News

Now I Lay Myself Down To Sleep

Now I Lay Me Down To Sleep is a organization of benevolent photographers that are on-call for when the magic moment of giving life turns tragic and a new-born baby dies. When parents loose their child in the very early days, often there are practically no images or pictures.
Often they would have wished to have more than just those few pictures to remember him or her by, shot at a time when the panic and stress levels were very high.

Via this organization, these photographers can be called up in the middle of the night and come and assist the grieving parents in taking professional quality pictures of their beloved deceased baby.

NILMDTS is already active in several countries, but at this moment not yet in Belgium – there are no photographers listed.

Seems to me that we could use some of this care and attention here as well. I’m not a really good photographer, nor, being the father of two children myself, am I certain I could contain my emotions, so I’ll be trying to spread the worth of this organization to others who are.

Categories
Blog News

Disk Usage on a mac : a little bash can take you a long way

I’ve been looking for a free solution to see where all the diskspace on my iMac has recently gone to, and so far I found only a few apps. All are to be purchased, and for what wanted this was overkill. I just wanted a quick check on where the source of biggest disk space consumption lay : was it the music collection ? or the movie collection ?

So here’s a quick tip on how to solve this for free, no new tools needed, on a Mac or Unix machine : I introduce to you the ‘du’ command.

DU stands for Disk Usage, and in combination with some switches, it’ll let you quickly and (fairly) easely find out where all those mega- and gigabytes have gone to.

Here’s the line you can use all ready for you – I executed the command in my user directory :

du -d1 -kc | sort -nr

Written out it gives the following command : show me the Disk Usage only to the first Directory level (or Depth) and give (pipe) the results to the sort program and show the reverse output from big to small. If you just use du without sorting, you can add the -h flag to it : this will show you the size in Kilobytes, Megabytes or Gigabytes.

Which gives the following output :


334265428    total
334265428    .
168926644    ./Movies
46947780    ./Library
38262372    ./Music
21862824    ./Documents
17618688    ./Software
16472220    ./Archive
14429940    ./Pictures

This means that there’s 161 GB in my movie collection !! Obviously I need to check what’s going on in there. I can now perform the same command in the movies directory and have the information there to see which directory in there is the largest..

[Update] I just remembered a program I used to use on Windows, and lo and behold, it’s still active, and is multi-platform as it is written in Java. If you need more than that or want something more graphical or extensive, you can also try JDISKREPORT, which is is free to boot!

Categories
Programming

Flexing my programming muscles

After writing the python program to convert the data to xml format, I started out to make a flex program that could display it in a neat way, with the hope of ultimately adding dynamic filtering and charting to it as well. I settled on some tabs and no menubar, so far.

One thing is for sure – the Adobe help system is quite good. That, coupled with lots of examples found on other peoples websites helped me make a program that did a lot of what I wanted (more on the final product in a later post). Originally, I started out in absolute mode, laying down my elements to the pixel perfect, specifying x and y. However, you soon enter into the hell of overlapping content coupled with multiple scrollbars that is set in stone on the users computer screen.That’s not what I want.

In the end I went back to drawing out my User-Interface with a combination of HBox and Vboxes (boxes that arrange content respectively horizontally or vertically), and specifying percentages that each element could take of the screen estate. This has the added advantage that when a user has a wider screen than 1024 pixels (which is my start requirement), the graphical elements rearrange themselves quite well.

One of the things that has bothered me the most to adapt to is how strongly each Actionscript variable is ‘typed’ to it’s element base. I lost count of how many times Flex complained to me that I was coercing some poor ‘exemelly variable’ to accept data from another variable from another ‘exemelly list’ type, and that this just wasn’t allowed… For example, if you create an XML list variable, you can’t assign an XML object to it (or part of it). Well, you can, but it’s not simple and you need to program extra code.
[Please feel free to correct me if you know better ways of doing this, I’m still a newbie at this]

In Python you assign a variable something, and Python takes care of it, the so called loosely-coupled binding. When I assign variable X the number 5 and later on add the fifth element from an array and that’s a number or something like a number, Python will happely convert the content of the fifth array element to numerical and add it to the 5.

In Actionscript this is much, much more rigid, and it’s a big pain in the behind to figure out what I am doing wrong and trying umpteen versions of the code before finally, at 0:30 at night getting it to work and *understanding* why Flex was complaining and fixing it. I do get the hang of it though, but it’s a different, more rigourous way of thinking.

Once the code works however, I’m astonished how fast I can set up new graphical elements and set dataproviders to them – in general mxml is just plain fun, actionscript is fun-hard, and they both deliver something that I wish Python had – a genuinely easy way of creating user interfaces.

I’ll post some more about the progress I’m making with creating this application soonish.

Categories
Programming

Converting xls to xml via csv using Python

The title says it all, really. I wanted to learn flex mxml and actionscript, and at the same time at work I was looking to access todo data kept in an excel sheet that is used by a bunch of people in different departments and represent it in a way that helped one make sense of it. Using Python, I wrote a script that converted the exported csv file to xml, using the header line in the csv file to construct the xml elements.

Rant : Flex 3 in the current version really is *not* good at connecting to databases directly – it always needs an intermediary solution like a server (cold fusion, php, pyamf) to connect to the data. When developing AIR applications, which are local flex applications, at least you have access to the local filesystem.

So, to get *something* into flex without a server, I wrote the following Python program. It’s for version 2.5 but I reckon it will work on other versions as well. It’s command line only, you run it with as input the csv file to be converted, and it writes it out to the screen. If you want to capture it to a file, just do a redirect to a new file like this :

csv2xml.py input.csv > output.xml

The xml is actually E4X, Ecmascript for XML. The csv file must have ; as a seperator, which is standard when you export to csv from Excel 2003.

I programmed in a few prettifiers, like replacing spaces with underscores and removing ( and ) from the xml elements, but if you use accents (é) in your headers or slashes (/) it will most likely bork on that – either that or you get a malformed xml file.

Click to see the attachment : csv2xml_v18. Since my provider also provides python server-side, I’ve renamed the .py file to .txt. Simply rename it to .py again. The previous version ( csv2xml_v16 ) is still here as well.

Of course, after writing this, I discovered that somebody had already had the same need, and has written a swc for flex to access excel files directly ! Still, it was a useful programming exercise for me, keeping me skills alive… and in case you were needing this, feel free to use this.

Categories
Blog News Windows

A New Theme : my own !

Yesterday I stumbled across a Google Advert (funnily enough, on my own website) advertising a Windows-only program called Artisteer, made by Extensoft. It’s a WordPress theme creator that promises no-fuss, no-muss theme creation, and after downloading the demo and playing with it on my Windows XP laptop for about 30 minutes, I have to agree wholeheartedly that it delivers.

Usually I don’t bother with Windows software, but for this I bought a licence (the standard edition, less than 50 bucks, suited me just fine) and downloaded it to my laptop, which is XP.

I dug up a vacation shot of our turkish holidays, and selected it. It immediately showed me a preview. The title was in the center and clashed. Click and then drag’n change the title, solved. Then I made the page a 1000 pixels wide by clicking and selecting an option. Then I set the color scheme, the gradients, the buttons, the shadow on the buttons, the gradient background, the shadow on the page, changed the layout to a 3-column theme, set the search bar on top and it all came down to selecting a tab in the menu bar and selecting the relevant option.

The simplicity of theme creation that Artisteer offers is really astonishing – at last anybody can whip up a theme without knowing all the php code, without having to search through reams of code to change just that line. So far I have not encountered any bugs, the application is really well made, and the pdf help file was helpful for as much that I needed it.

Future expansions seem to be aimed on providing theme exports for Joomla and Drupal.

All in all, this is one piece of software I can recommend !