This week I got updated my phone to the HTC Desire. It’s a great phone and I was happy when I discovered that I could link my contacts to their Facebook profile so that their photos and information will appear in my phone book.
My happiness was short lived however as HTC Sense (the application responsible for linking my contacts to their Facebook accounts) had also added all of my “friends” who had listed their phone number on Facebook to my phone book. After some searching I discovered that lots of other people were also having the same problem and there was no fix. It was either no links at all or linking everyone on Facebook.
However I have come across another application called SyncMyPix that can handle linking Facebook accounts to my phone book contacts without adding people to my phone book. It’s available in the Market so it’s easy to install and it’s also free although there is an option to donate if you find the application useful.
My girlfriend lost access to her Facebook account this week and Facebook kept reporting that her e-mail address wasn’t registered. Her profile was still active and looking on the Internet showed unfortunately this has happened to a number of people and any requests of help were ignored by Facebook.
The exact message that Facebook was giving was:
Incorrect email address
The email address you entered does not belong to any account. You may try clearing your browser’s cache and cookies by following these instructions.
You can log in using any email address, username or mobile phone number associated with your account. Make sure that it is typed correctly.
A few people had reported finding a solution in using their username instead of their e-mail address when logging in. You have to set your username up manually and not everyone has done this, including my girlfriend, so this wasn’t any help to us. The same goes for phone numbers.
To solve this problem I decided to try to test all of her other e-mail addresses to see if one of those had been made her login e-mail address somehow. Lucky it had and we were back into her account.
I don’t know if this is a bug in Facebook or somehow she changed it without knowing but we now have the account back. One thing that may be the cause was that she no longer had access to the e-mail address in question so it’s possible Facebook discovered this and in their wisdom deleted it from her account without saying
If you do get back into your account then I suggest changing your password just on the off chance that a hacker got into the account to cause the original e-mail address to be lost.
After upgrading to Kubuntu 10.04 I was disappointed to find that KDevelop wasn’t listed in the default repositories as apparently it wasn’t ready in time for the release of 10.04. From what I’ve read there’s not much chance of it being added to the repository anytime soon either so I decided to find another way to install it.
Luckily installing it isn’t too difficult (no need to install from source) as it is available from the Kubuntu Backports PPA.
To add the PPA to your repository simply use the command:
sudo add-apt-repository ppa:kubuntu-ppa/backports
You can now update your repository and install KDevelop as normal:
sudo apt-get update
sudo apt-get install kdevelop
I’ve just finished fighting with some code where I wanted to resize some QGraphicsPixmapItems. I was able to scale them but this didn’t allow me to resize to specific pixels. I decided to take a step back and noticed that if I create a pixmap object first I can resize that, then create a QGraphicsPixmapItem using the pixmap object:
Code:
//first create a pixmap object | |
QPixmap pixmapObject(":Images/myimage.png"); | |
| |
//now create a QGraphicsPixmapItem | |
QGraphicsPixmapItem * myImagePixmapItem = new QGraphicsPixmapItem; | |
| |
//finally add the resize the pixmap and add it to the QGraphicsPixmapItem | |
myImagePixmapItem->setPixmap(pixmapObject.scaledToHeight(50, Qt::SmoothTransformation)); |
The scaledToHeight function in the last line could be either scaled, scaledToWidth or scaledToHeight. scaled allows you to set both the width and height of the object where as the other 2 will scale the other side automatically so that the aspect ratio of the pixmap is preserved.
When converting a tm structure to a string using the asctime function in c++ you are left with a cstring ending with a newline character (\n). This is often a pain if you want to insert the date into another string to use later.
Since we are using a cstring we know the last two characters are \n and \0. Therefore we just need to change the second to last character in the string from \n to \0:
Code:
struct tm * timeinfo; | |
char * time = asctime(timeinfo); | |
time(strlen(time)-1) = '\0'; | |
cout << "The time is: " << time; |
If you’re not sure what’s going on here the end of a cstring is terminated when the character \0 (A null terminator) is reached. If we look at what the cstring looks like before we use the above code it would look like this:
Sat May 20 15:21:51 2000\n\0
After the code is run it will look like this:
Sat May 20 15:21:51 2000\0\0