Tuesday, March 27, 2012

Android SMS & MMS Backup

If you want to backup your SMSes and MMSes from your Android phone I found 2 apps to do this:

SMS Backup & Restore by Ritesh Sahu - Excellent for backing up your SMSes to an XML with included XSL file for easy reading in a webbrowser.
Save MMS by Andrew Schwimmer - Let you save MMS images one by one, ok if you don't have more than maximum a couple of hundred MMS images to save.

They both save data to your SD card which you can then copy when connecting your mobile to a computer or just pop in the SD card in a pc with a card reader.

Thx to for SMS backup: http://androidforums.com/htc-droid-incredible/281188-sms-mms-back-up.html,

WP7 Marketplace app not available

When first trying to use the Windows Phone 7.5 Marketplace you might get the message "This might be because your phone software needs to be updated, the application is exclusive to a different mobile provider, or the app is not available in your region". Especially if you live outside of the US or UK.

To fix make sure your regional settings on the phone (Settings -> system -> region + language) are set to the same as your Windows Live ID that you are using for your phone.
Apparently you might also want to set region settings for Zune.net (I did not have to do this).

Read this on http://answers.microsoft.com/en-us/winphone/forum/wp7-sync/market-place-not-availavle-for-your-region-yet/74c7a9fd-34cd-4bd7-8349-59f07fcf923a#1a7f23cc-80ef-473a-9f94-e2d7fcac7379

Wednesday, March 21, 2012

MySQL specify index without FORCE INDEX

Here's a blog post from Shlomi Noach which displays some useful steps to consider when optimizing MySQL querie where MySQL chooses an inefficient index.
It helped me. Especially the part about tricking MySQL to not use an index, without using USE INDEX or FORCE INDEX (which can be very bad if you have a dynamic query or your tables change/grow, something they usually do).

http://code.openark.org/blog/mysql/7-ways-to-convince-mysql-to-use-the-right-index

Note that Solution #7: Make MySQL think the problem is harder than it really is can also be applied to GROUP BY. e.g. GROUP BY id, type, level

Tuesday, March 6, 2012

Notepad++ Replace using Regex

One of the best features of Notepad++ is the search and replace. You can either use normal search, extended (so you can search for newlines (\n) and tabs (\t)), or regular expressions.

Regex is great for massaging data into the form you want to input into another program.

One case I often have is long lists of output from a PHP script using var_dump() which I want to paste into an Excel spreadsheet. But I need to remove the preceding "string '" and the trailing "' (length=<length of string>)" for the data to make sense.

To remove the starting "string '", just use a normal search (since the string is the same on all lines). To remove the ending we need to use regex since the <length of string> value can vary, using the regular expression search \' \(length=.* should do the trick.