-
SkypeMinutes - keep track of Skype call minutes
Posted on 2009-11-16, 23:24:41 Tags: all, java
I use Skype very often because of the good call quality and the unbelievable monthly subscription for unlimited calls to landlines with no minute costs...or so they say. It's not really unlimited, there's a limit on 10000 minutes per month and if you talk more than that Skype will charge normal rates according to Skype's list. Even though the limit still is more than enough for average people to use, I think it's a good idea to keep track of the amount of call minutes for the current month. Since Skype gives you the option of exporting the call history to a *.csv, I decided to develop a simple application for showing the number of call minutes for the current month.
The application is contained in a jar file and can be found on this link.
Currently the application only supports .csv files in Swedish, and I haven't implemented support for differentiating between calls and received calls because I only use Skype to call people. Future work would be to implement support for .csv files in all languages supported by Skype and separate calls and received calls when counting.
Well, for all the swedish people, I hope you find it useful.
-
Ubuntu Karmic Koala is COOL
Posted on 2009-11-3, 14:46:06 Tags: all, linux, ubuntu Links: Ubuntu 9.10 Karmic KoalaThe end of October has passed and a new Ubuntu distribution (9.10) is released. Karmic Koala has changed the boot screen and the startup totally. There is no longer a progress bar when booting up. The time to shut down Ubuntu is significantly faster, I think it takes less than 8 seconds to shut down. Instead of Pidgin it's Empathy messenger program that's pre-installed. I don't mind using it becuase it has most of the functions which Pidgin had. The biggest difference might be that your previous conversation is shown even if you close the window and open it again. Another nice update is new pre-installed icons. The default icons look really beautiful, a nice change from my previous icon set GNOME Colors. At last but not least is the new Firefox 3.5.
Ubuntu just got a nice and fresh update, nothing big but I like the new boot screen and startup.
-
Read Metro news on Symbian S60
Posted on 2009-10-23, 13:55:16 Tags: all, news, nokiaWhile browsing on Ovi store application I found an interesting application that I think a lot of people would like on their Symbian phones. It's a free application called Metro and it's for reading Metro news, both online and offline. I've got a Nokia 5800 which has the S60 5th Edition, I don't know if there is a version for the 3rd Edition.
After a quick test I can confirm that it works great. You can even change to eight different languages, and Swedish is just the one I needed. There are the startpage and other categories like news, sports, fashion, etc. Everytime a category is chosen all the news will be downloaded, ready to be viewed for offline. In the categories page only the headlines are displayed and by clicking on them the whole article will be shown. I was surprised to know there was such an amazing application. I mean now I won't have to worry not getting a newspaper on the bus or in town, I always have my phone with me. Let me give you a scenario of using the application:
I wake up early in the morning and eat a healthy breakfast consisting of breads with cheese, ham and butter. I then go and brush my teeth. Afterwards I go and change my clothes preparing to go to school. Since I still have some time I might as well open my Metro application on my mobile and open all the categories to download all the latest articles. This won't take more than 2 minutes. After taking a ride with my bike to the bus stop I might as well read some news on my mobile while waiting. When the bus comes and I've sat down I can relax myself and just read the news on my phone, smiling everytime someone walks into the bus and takes a Metro newspaper, man that is so 90s.
-
Sync Google Calendar using Mail for Exchange
Posted on 2009-10-20, 10:44:32 Tags: all, nokia, tutorial Links: Set up Google Sync, Google mobile help forumI've posted earlier in my blog about synchronizing Google Calendar using GooSync, but unfortunately the free service provided by GooSync is now discontinued, they will instead offer their service for a yearly fee.
Obviously I don't want to pay for such a service and decided to search a bit in Google. What I found is a solution completely free and the service is provided by Google themselves. Yay!
The problem is their guide at http://www.google.com/support/mobile/bin/answer.py?hl=en&answer=147951 is completely different from my version of Mail for Exchange on my Nokia 5800. Although it gives the configuration settings for the application, the screenshots are completely different. After some searching in Google I found a post at http://www.google.com/support/forum/p/Google+Mobile/thread?tid=4fc290b0536a718c&hl=en which discuss about the exact same issues that I have. Among the many different solutions I found one that worked for me.
- Uninstall old version and install latest version of Mail for Exchange found at http://www.businesssoftware.nokia.com/mail_for_exchange_downloads.php (version at the time of this writing: 2.09.158).
- Launch application found in Mfe > Mail for Exchange.
- Select Yes when prompted to create a new sync profile.
- Select Cancel, this will take you to all the settings.
- Fill all the settings according to http://www.google.com/support/mobile/bin/answer.py?hl=en&answer=147951.
- Select Back to exit.
The trick was to select cancel after selecting yes to create a new sync profile. This is because it will require that you fill the Domain which is to be left empty according to Google. So you had in some way bypass it, and it was simply by pressing Cancel.
Anyway I managed to synchronize both ways between my phone and Google Calendar. An important note is when creating a calendar event in Google Calendar it won't send events whose time are 'All day' to your phone.
-
PHP: foreach forbids changes
Posted on 2009-10-13, 10:53:34 Tags: all, web developmentThese couple of weeks I've been busy with a web shop project for a course which addresses security vulnerabilities to web applications. During the course of this project I stumbled upon quite a few problems related to PHP. One of them is the foreach statement.
I have a cart which stores all items added by a user. Each item has a number of attributes like name, price and amount and its key is the item's ID. To get the name of an item with ID 1, it looks like the following, $_SESSION['cart'][1]['name'].
Now everytime a user adds an item I use a foreach statement to loop through the array and if the chosen item already is in the list I add that item's amount with 1. It might look like the following:
foreach($_SESSION['cart'] as $key=>$item) { if($_GET['pid'] == $key) { $item['amount']++; break; } }
But the above code wouldn't work because when modifying a value in the list like this, $item['amount']++, it won't update the corresponding element in $_SESSION['cart'] variable. I reason it like foreach only returns a copy of the element in $_SESSION['cart'] and that is why it won't change the original element in $_SESSION['cart']. So to fix this I had to update $_SESSION['cart'] directly.
foreach($_SESSION['cart'] as $key=>$item) { if($_GET['pid'] == $key) { $_SESSION['cart'][$key]['amount']++; $found = TRUE; break; } }
This fault in code caused me 20 minutes of debugging. It wasn't entirely obvious for me what fault it was when the amount just wouldn't update no matter what I pressed on the website.
-
Google Translate at your service
Posted on 2009-10-1, 06:01:01 Tags: all, site update Links: Google Translate gadget
Don't fully understand english or do you prefer other language. Then use Google Translate gadget on the right menu to translate this blog into any language you like.
-
Are you human?
Posted on 2009-9-23, 08:16:20 Tags: all, site update, web developmentThat question is important for preventing computers to automatically submitting forms for posting spams. As a precaution I've implemented CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) with the help of CI's plugin. So when registering for an account you have to type the characters shown on the generated image.
-
My way of transferring new mp3 files to Nokia 5800
Posted on 2009-9-3, 11:27:48 Tags: all, nokia, tutorial, ubuntu Links: Nautilus-action exampleEver since I bought my Nokia 5800 I've tried to find some quick and efficient way to transfer my new mp3 files to my phone from my computer and add it to a playlist that I always listen to on my phone. Nokia didn't provide any application for Ubuntu. One way I found was to manually copy files to the phone folder and then have a m3u with the exact name as you would want the playlist to be named in the phone. By opening it in Totem, drag-and-drop the newly copied files onto the playlist in Totem and save it in the Music folder in the phone, I could get the new files to be added onto the playlist on my phone when I update the music library. But this takes too much time in my opinion. Putting all my steps in a short summary would be:
- Connect phone to computer
- Copy the new files onto Music folder on the phone
- Remove the track number from the filenames
- Open the .m3u playlist file in Totem
- Drag-and-drop the new files from the Music folder on the phone onto the playlist
- Save the playlist
- Unplug the phone and update the music library from the music menu
I found a much faster way to do this. How about having a right-click menu button to do all the work. This works by installing the Nautilus extension "Nautilus-action". You can define any kind of command to use it in the right-click menu. So my idea was to mark all the new files in computer and click on the menu to transfer them and add them to playlist in one click. I created a shell-script that would be used as the command in Nautilus-action. The final result is as follows:
#!/bin/bash # Playersync # Script to transfer music files to media player (Any device that can be mounted) # Usage: playersync playlist file1 file2... # Commands usage in this script: # cp /media/disk/music/album/01-track.mp3 /media/disk-1/music/track.mp3 # echo "track.mp3" >> playlist # # Last updated: 2009-09-03 # Script written by: Cherng PROG="playersync" SYNCPATH=/folder/to/device/ LOG=/folder/to/log playlist= function output_error { echo "${PROG}: [Error] $1" 1>&2 echo "$(date +%c) - ${PROG}: [Error] $1" >> $LOG echo "" >> $LOG echo "" >> $LOG exit 1 } function output_log { echo "${PROG}: $1" echo "$(date +%c) - ${PROG}: $1" >> $LOG } function add_to_playlist { # Add file to playlist output_log "[Add to playlist] $playlist" output_log "----COMMAND: echo $1 >> $playlist" echo "$1" >> "$playlist" output_log "[/Add to playlist]" } output_log "Executing playersync" if [ $# -lt 1 ]; then output_error "Please specify some files" fi test -d $SYNCPATH || output_error "Sync directory: $SYNCPATH not found" test -f $LOG || output_error "Log file path: $LOG not found." test -f "$1" || output_error "Playlist doesn't exist" playlist=$1 shift while [ "$1" != "" ]; do # Copy file to phone. newfilename=$(basename "$1") folder=$(echo $1 | sed -n 's:\(.*\)\/.*\.mp3:\1:p')"/" if [ "$SYNCPATH" = "$folder" ]; then # File is in the same folder as syncpath, just add it to playlist. add_to_playlist "$newfilename" else # New file to be copied and added to playlist. newfilename=$(echo $newfilename | sed -n -e 's:[0-9][0-9]*[\.\ -]*\(.*\):\1:gp') if [ ! -f "${SYNCPATH}$newfilename" ]; then output_log "[Transfer] $1" output_log "----COMMAND: cp $1 ${SYNCPATH}$newfilename" cp "$1" "${SYNCPATH}$newfilename" output_log "[/Transfer]" add_to_playlist "$newfilename" else output_log "[Transfer] $1" output_log "----File already exists in sync path: ${SYNCPATH}$newfilename" output_log "[/Transfer]" fi fi shift done output_log "Sync done" output_log "" output_log "" exit 0
I added one additional feature that was when the file marked is from the phone, just add that file to the playlist.
The last step is to add a new object in Nautilus-action configuration. Make sure to specify where the script is in 'Command' and in the 'Arguments' define the path to the playlist on the phone and add a '%M' after the playlist in order to take all the marked files as arguments to the script.
There isn't any kind of notification if the transfer process is complete or not, but that is why I use a log to register all the events occuring during the execution of the script.
I hope this inspired you to some new ideas of your own or if this was exactly as wanted it to. Anyway, lastly I just want to do summary of the steps needed to transfer new mp3 files to my phone:
- Connect phone to computer
- Mark the files
- Click on right-click menu item (I named it to Sync music)
- Unplug the phone and update the music library from the music menu
-
Search in my blog
Posted on 2009-8-3, 08:03:32 Tags: all, site updateIsn't there times when all you want is to find a particular page or certain keywords in JCHo Blog. Well, no more troubles with that anymore because I've added a search for my blog. You can find it on the right menu of this blog.
What are you waiting for, just go and search through my blog!
-
How to connect bluetooth keyboard to Nokia 5800
Posted on 2009-7-28, 05:45:52 Tags: all, nokia, tutorial Links: Tutorial from allaboutsymbian.comBy following these steps I got my Logitech diNovo Edge keyboard connected to my Nokia 5800. I can browse through my phone with the keyboard, surf the web. It was all thanks to this webpage that I got everything working.
The first step is to download and install an application that will handle bluetooth keyboard connectivities.
- Download the install file to the application in this address: http://nds1.nokia.com/phones/files/software/Nokia_Wireless_Keyboard_S60_31.sis (I browsed to this address directly from my phone, but you can also download it to your computer first and then transfer it to your phone).
- Install it
The second step is to set up the connection between the keyboard and the phone. This is done by a process where the phone gives a passcode to the keyboard in order to have permission granted to set up the connection.
- Open the installed application in Applications in the main menu.
- Select Options and choose Find keyboard
- If the phone asks if you want to activate bluetooth, select yes.
- The phone will now try to find the keyboard, select OK.
- Select More Devices.
- Select the keyboard.
- Select a passcode of your own choice (for example 123) and select OK.
- Type the same passcode on the keyboard and press Enter key.
- Select the language layout of your keyboard.
You can disconnect the keyboard by going back to the application, select options and disconnect keyboard. I also turn off the bluetooth by clicking the bluetooth icon in top of the main screen and switch Off.
Full view
Print
Comment (0)
Home
RSS
Log in
![Validate my RSS feed [Valid RSS]](http://jcho.iblogger.org/images/valid-rss.png)
