iPad file woes is me
Thursday, February 2nd, 2012What do I want? An app which performs peer-to-peer file transfers between android devices and iPads. When do I want it? Now!
What do I want? An app which performs peer-to-peer file transfers between android devices and iPads. When do I want it? Now!
Shamelessly stolen from Jennifer Daniel via NYT of Jan 22.
6. There is no easy, straightforward way to copy files from a Mac [or any other kind of computer] to an iPad. And, even if you stoop to sending yourself an email attachment and opening it on the iPad, there is no way to save the attachment! Apple goes to extraordinary lengths to hide the file system from iPad users.
7. If you want to burn an audio CD from a bunch of music files using your Mac, you have to use iTunes. Not entirely icky since it is, after all, an audio app. Did I mention iTunes does not import ogg or flac files? ?!@#%$*! So in order to burn those files I have to convert them to mp3 first — a time-consuming step which incidentally defeats the purpose of flac by using a lossy compression format.
End rant, attempt to calm down.
Today I took some time to debug a perl script which has been failing for a while. The script writes CREATE statements for stored procedures in a specified Sqlserver database. These can be used as backups.
I wrote the original in 2004, running on a Sqlserver 2000 machine. It broke when the database was upgraded — clue!
Long story short, the syntax for system queries changed. The fix was to change the following query [2000 version]:
SELECT ctext FROM syscomments WHERE status = 2 AND id=''
to this [2005 version]:
SELECT definition FROM sys.sql_modules WHERE object_id=''
Now back to other more pressing matters…
I was a bit surprised to find that my Mac didn’t have the md5sum utility installed by default. A quick Google and I learned that OS X has md5, one of the openssl digest functions. Turns out that md5 can mimic md5sum output by using the -r arg.
So I created an alias in my .bash_profile which defines md5sum to the equivalent md5 command. This pretty much guarantees I will forget that there is no md5sum in OS X but do I really need to remember this if it just works? I think not.
The very first article I every got published in a programming magazine — the venerable but long-dead Windows Developer Journal — was about writing an NT console utility to modify the screen buffer size. This was probably around 1993 or so.
My code and article have been lost in the mists of time, however I recently realized that I still could use such a utility. So I rewrote it. Still in C, so it’s pretty speedy. And because I’ve written hundreds of thousands of lines of Win32 code since the original, I knocked this version out in about an hour and a half.
I’m calling it from a .cmd script which starts new instances of cmd.exe which, mysteriously, do not pick up my registry setting for screen buffer size. I reached the point of diminishing returns troubleshooting this script, so just recoded the darn utility and now I am back in control.
If anyone cares, you can download the .exe from the Bamboo Utilities page or this link: chCmdBuf
Just a brief note to announce that I posted a minor update of my android app SFD Mobile to the Android Marketplace. Version 1.1 updates the fire stations listing and fixes a minor display bug [which I blame on Socrata, but who knows?].
Search the Marketplace for SFD to find it.
printf("Goodbye, Dennis\n");
I updated sqlver [downloadable from the Bamboo utilities page]. It now detects and reports Sql Server 2008 R2 SP1. Woo-hoo!
From the you learn something new every day department:
I wasted all kinds of time this morning fruitlessly searching my computer’s registry for the subkey my app was creating. Long story short: win32 API RegCreateKeyEx() behaves differently when running on a 64-bit OS. Specifically, it locates your specified subkey under a Wow6432Node subkey under the standard toplevel subkeys [SOFTWARE etc].
For instance, code which specifies:
HKLM\SOFTWARE\ACME\myApp
when run on 64-bit Windows would end up with the subkey:
HKLM\SOFTWARE\Wow6432Node\ACME\myApp
[wow indeed] Guess I’ve got a little research ahead of me.