We,all know the importance of functions in C. And any good-programmer will be using well coded functions in his program, may be including them in a loop as well.But, while using the function in a nested if else we must be careful and should keep in mind the output of the function and what exactly do we want.I am saying this because my program returned insane values due to a careless use of functions.
The problem causing bit of code is here:
if(strt < insert(strt,end,value)
{
//some stuff;
}
else if(strt == insert(strt,end,value)
{
//some stuff;
}
what happened here was that, for the 1st if statement the function insert was called. Now suppose the value is false and the other if statement is to be implemented, then it will again call the insert function which is not how it should happen because for the new function, it will find a new value instead of the old value. So, it is better to store the value of the function and compare the stored value.
Lets hope that we don't make this mistake again. : )
Tweet
Friday, November 19, 2010
Wednesday, November 17, 2010
Boosting your browsing speed in Mozilla
you may be happy with the time it takes for a webpage to load in Mozilla but getting a better browsing speed is always a welcome change isn't it? Here is a simple way to boost your speed.
->Open a new tab and in the address-bar type: about:config
->Now in the box of filer type browser.cache
->Now turn the value ofbrowser.cache.disk.enable to false. It can be done by just double clicking it.
->Similarly set browser.cache.memory.enable to true.
->Now right click on an empty space select new->integer and give it name : browser.cache.memory.capacity and in the give it value100000 or 100Mb.
Mind you this will store the cache in main memmory and may take upto 100Mb of your RAM.So just take care of not giving some superficial value as capacity.Also, the process will increase the speed of cached pages only.Anyways, any betterment is welcome isn't it?
Tweet
->Open a new tab and in the address-bar type: about:config
->Now in the box of filer type browser.cache
->Now turn the value ofbrowser.cache.disk.enable to false. It can be done by just double clicking it.
->Similarly set browser.cache.memory.enable to true.
->Now right click on an empty space select new->integer and give it name : browser.cache.memory.capacity and in the give it value100000 or 100Mb.
Mind you this will store the cache in main memmory and may take upto 100Mb of your RAM.So just take care of not giving some superficial value as capacity.Also, the process will increase the speed of cached pages only.Anyways, any betterment is welcome isn't it?
Tweet
Monday, November 15, 2010
Exploiting facebook/twitter mobile facilities
We have seen many GPRS based applications for tweeting and updating your facebook status. But what to do if you want to tweet/update status without connecting to internet? Well, facebook and twitter have facilities where you can tweet/update status by simply sending a message to a certain number. You can use that technique in your application. For this you just have to know the method for sending a message from your mobile. If you are coding in C# it is very simple to do.
You just have to writing the following code:
->Microsoft.WindowsMobile.PocketOutlook.SmsMessage sms = new SmsMessage(number,text);
->sms.Send();
In case of facebook the number will be:923223265 and for twitter it is:53000.
Another thing that needs to be kept in mind is that, you need to add
Microsoft.WindowsMobile.PocketOutlook in the references.
This is a simple way to keep your app different from others.Though C# is used for programming for windows mobile.
Tweet
You just have to writing the following code:
->Microsoft.WindowsMobile.PocketOutlook.SmsMessage sms = new SmsMessage(number,text);
->sms.Send();
In case of facebook the number will be:923223265 and for twitter it is:53000.
Another thing that needs to be kept in mind is that, you need to add
Microsoft.WindowsMobile.PocketOutlook in the references.
This is a simple way to keep your app different from others.Though C# is used for programming for windows mobile.
Tweet
Subscribe to:
Posts (Atom)