Transfer contacts from iPhone to Android
I’ve been using an old iPhone 3G, and I’ve got myself a new Android phone. First off, I googled DuckDuckGo’d how to transfer my contacts and found lots of suggestions. First, I tried My Contacts Backup, but it wouldn’t install on the iPhone.
So I synced the contacts with my Hackintosh using iTunes, exported the contacts to a vCard file, transferred it to the phone by email and imported the file to the Contacts app on the phone. You need to ensure that all the contacts are selected when you export them. And delete the one for Apple that got in there at some stage.
Read more →C++
I made a vow about 20 years ago not to attempt to learn C++, when a colleague went on a C++ course. I did buy a C++ book, but it wasn’t that useful. I have looked at the source of various C++ programs over the years to attempt to find out how they worked. I have, until recently, invariably found that the code that does something useful is either hidden in include files, or buried so deep in obscure code that just seems to create and do strange things with various objects, that I have been unable to find it. I have seen similar Java programs.
Read more →Java Collections
I find Java Collections frustrating and insane. I have been through this loop on several occasions. I decide I want a list to do whatever. So I look up List in the docs and find it’s an interface, ie: roll yer own. So I look down the hierarchy and find AbstractList, which is abstract, again: roll yer own. So finally I get to ArrayList which might do the job, but the docs aren’t too clear, so I try it and it works. I just want a list that will do the job. I don’t care what it stores the data in, that level of detail is supposed to be obscured and possibly subject to change anyway.
Read more →Download streamed video
Online video providers tend to stream the video to a javascript player, so making it extremely difficult to capture the video. This blog explains a method using Chrome to spoof the user agent string, pretending to be an iPad. Unfortunately, this doesn’t seem to work any more in the latest version of Chrome.
So I tried installing a user agent spoofing plugin in Firefox. It seemed to work, but the video didn’t play, so I couldn’t find the url. I next tried Firefox on my Android tablet and the video played. To find the url of the video I used Firefox remote debugging. This page describes how to set it up in detail.
Read more →Concurrency, Threads, Semaphores and Mutexes
I have written several applications in both Java and C that involve running an audio thread in the background to read or write audio from or to the audio system while displaying the results and interacting with the user in the foreground. I have used lots of threads, but never a semaphore or mutex apart from the odd boolean variable.
This issue is reminiscent of back in the day when you actually had or could get a circuit diagram of your computer and could understand it. One of the first machines I had suffered from display corruption when the display was updated due to contention between the processor and the display system. It was fairly simply fixable by using a spare inverter to reverse the phase of the display system clock to remove the contention.
Read more →