Dec 24 2011

Simple Function to Delete Files Matching a Pattern in Directory and sub-dir

Category: PHP,Programmingksg91 @ 2:31 pm

Today, a guy was asking for a small PHP function to delete all files which match a pattern in a particular directory and all it’s sub-direcory . So I wrote following simple function which uses stack to keep track of unvisited directory. It is similar to Depth-First-Search approach for traversing nodes in a tree.

[sourcecode language=”php”]

<?php
function removeFiles($dir,$pattern)
{
$stack=array();
array_push($stack,$dir);
while(true){
$dir=array_pop($stack);
if($dir==NULL)
break;
$a= glob($dir.’/’.$pattern);
foreach($a as $file) {
if(is_dir($file)) {
array_push($stack,$file);
continue;
}
unlink($file);
echo "File: ".$file." has been removed.
";
}
}
}
?>
[/sourcecode]

Let me know if there is any improvement I can do on this code. 🙂


Dec 14 2011

How to Flash Symbian Belle to Nokia N8?

Category: Mobile Phones,Nokia,Symbianksg91 @ 1:00 pm


As I mentioned in my previous blog posts, Symbian Belle for Nokia N8 appeared on Navifirm and I flashed it to my Nokia N8. And then Symbian Belle official release was delayed to Q1 2012 as mentioned  here and people are almost frustrated because of so much delay. Everybody out there want to try Symbian Belle but some don;t know how to do it and some are afraid to brick their phone. I got several request for explaining how to flash Belle to Nokia N8 on twitter ( @ksg91 )  and  explaining this in 140 char is almost impossible. So, as promised, I am writing this post on how to flash Nokia N8.

Continue reading “How to Flash Symbian Belle to Nokia N8?”

Tags: , , , , , , , , , , , , , , ,


Dec 06 2011

Symbian Belle Not Coming in Q4 2011? – Update

Category: Mobile Phones,Nokia,Symbianksg91 @ 3:35 pm

Its been long enough since Nokia announced Symbian Belle and started shipping few Symbian Belle devices, all existing Symbian Anna users are waiting eagerly and losing their patience for receiving Symbian Belle for their phones. Nokia promised to release Symbian Belle to all Symbian Anna devices in Q4 of 2011. Symbian Belle for N8 already made an appearance at Navifirm for a while and still there is no sign of Symbian Belle officially.

Yesterday, in reply to @vivekkl ‘s question for release date of  Symbian Belle for N8, @nokia replied “coming months” .

 

I have already asked @nokia and @NokiaHelps personally serveral time and up till now they were saying it will come before the last week of Dec ends! Sudden change in release plan? This may be very disappointing. However this is not first time any release is delayed, just remember the delay in Symbian Anna. Well, we may have the same fate for Symbian Belle also.  It is also being guessed that release is postponed because of some testing. Some rumors says it will come to Thailand in Feb 2012. Whatever the reason maybe, but this delay is surely going to affect the interest of users.

One thing I will like to say to Nokia is, no doubt, you take great stuff  but you are late to bring it to the market and lose the interest of customers. I think, Nokia seriously need to consider this thing.

Many N8 users have already lost their patience (including me) and already running Symbian Belle leaked from Navifirm. And this leak runs pretty fast and with almost no bug! Still we crave for official release because official is official! 😛

UPDATE:

@nkumar_ tweeted following pic

Now, this looks a like, Symbian Belle is not really coming this month. It has been postponed for some reason.

If you got any news about this, please let me know. 🙂

Tags: , , , , , , , , , , , ,


Dec 05 2011

USB OTG: Sharing the Charge!

Category: Mobile Phones,Nokiaksg91 @ 9:56 pm

When Nokia N8 was announced, people came up with different usage about USB OTG and showing different capabilities of this feature.  USB OTG can let you attach an external HDD, attach a USB mouse or keyboard, some attached barcode reader, etc. Nokia N8 and similar S^3 phones comes with the USB Charging. You may charge a phone using its microUSB port. I wonder, why nobody thought (or at least put attention to ) charging one phone with another phone using USB OTG and microUSB charging. I had this in mind since after I bought N8 but having no other phone to test it, just  left the thought. After having the Nokia E7 from @Nokia_Connects for trial, I finally got a chance to try it and test if this really works?

Continue reading “USB OTG: Sharing the Charge!”

Tags: , , , , , , , , , ,


Dec 04 2011

Review: Lyrics by MusiXmatch

Category: App,Review,Symbianksg91 @ 1:28 pm

Are you lazy enough to search for the lyrics of the song you are playing or just wish that Music Player can show it while playing the song automatically? Well, then Lyrics by MusiXmatch is the perfect App for you. This free app features a gorgeous looking UI which is inspired by the WIndows Phone’s Metro UI. Beautiful UI and sleek design makes the perfect thing anyone would ever wish. Lyrics is developed in Qt. Not only the beautiful UI and design but it possess nice features as well. Read more to learn more about the app!  😛

 

Continue reading “Review: Lyrics by MusiXmatch”

Tags: , , , , , , , , , , , ,


Dec 01 2011

Symbian Belle got some Bug?

Category: bug,Mobile Phones,Nokia,Symbianksg91 @ 11:49 pm

Symbian Belle for Nokia N8 appeared for sometime on Navifirm and some users managed to download it and uploaded to  file hosting sites as I mentioned here , I, losing all the patience, flashed it to my N8. It is said to be official Firmware for T-Mobile. How ever I encountered some bug / malfunctioning of this.

Last night, I installed Gravity and Swype only. But in the morning, when I tried to open Gravity from Homescreen, shortcut wasn’t responding. I thought to open from menu but encountered error: “Homescreen: Application can not be run because of security reason”. After all this, I thought to restart my phone (a standard method to solve issue in Symbian 😉 ). After phone started, I couldn’t find Gravity or Swype in my phone, they were gone! I downloaded Gravity again and installed. After installation, when I started Gravity, my all accounts I added previously was there! This is strange, because if application existed, I would have been asked to overwrite it! However, old data was still there!

I was still not sure if this happened just to me, but a twitter user @TKay_88 also said he faced same thing on his Symbian Belle for N8! I won’t consider this to be a serious issue and comparing to the fun of Belle, I can surely ignore it.

Apart from this, I have not found any issue with Belle. Phone has become amazingly fast and new UI is awesome! I must say, I am in love with Symbian Belle! 🙂

Did you guys find any problem with your phone? Do share here. 🙂

Tags: , , , , , , , , , ,