preload
Feb 26
4
Digg me

Here is a really cute smiley for Pidgin. It works in the linux version, 2.5.4. Should also work easily with the windows version.

smilies

Download this cool pidgin theme here. You can also check out the site that hosts hundreds of other customizations for gnome.


Tagged with:
Feb 25
2
Digg me

When Facebook first launched their chat application, I felt they had filled a much needed requirement. Most of us have more Facebook friends than IM contacts, and most of us have grown the habit of log-in in Facebook once a day at least. What chatting has added to Facebook is what live chat adds to a mail service (like gmail). Pidgin, an multinetwork messenger, is the most popular cross platform IM to date. When I saw it does not feature a Facebook account as does Digsby, I was a little upset. Then I remembered the amazing community of the opensource softwares. After a little googling, I found the thing I needed the most, a facebook plugin for pidgin! Available for both linux and windows versions, this plugin has been developed for much more than just chatting. Google Code currently hosts the plugin.

facebook_buddy_list

Installation is just too simple!.

For windows,

  1. Download the .exe file here
  2. Double click the downloaded file, and give administrative permission if it asks.
  3. Be happy

For Ubuntu,

  1. Download the .deb file here.
  2. Double click the downloaded file. This will open in Gdebi Package Installer.
  3. Press the install button. If asked for superuser password, provide it.
  4. Of course, be happy too.

Make sure you also read what Google’s site has to say about the software, and related documentation if necessary.

Click here to go to the project homepage for this plugin.


Tagged with:
Feb 25
2
Digg me

Well, with the previous post on Queue, we now move onto another data structure, the Stack. If a queue is a first in first out data structure (in short FIFO), stack is then a first in last out one (FILO). Okay, now that does not explain much. In a stack, what has been put most recently comes out at the first pop instruction.

Consider the back button in the browser. Its operation can be simulated with a stack. As each new site is visited, each URL is pushed on to the (top of) stack. On a single press on the back button, the most recent site (the last one visited) is shown. In other words, the element at the top of stack is popped. Simple, isn’t it?

The Standard Template Library (STL) includes an implementation of the stack data structure. The header file we need to include is stack. Check the code below for a really naive implementation.

#include <iostream>
#include <stack>
using namespace std;
 
int main()
{
	stack<int> myStack;
	myStack.push(1);
	myStack.push(2);
	myStack.push(3);
 
	cout << myStack.top() << endl;
	myStack.pop();
	cout << myStack.top() << endl;
	myStack.pop();
 
	myStack.push(-1);
	cout << myStack.top() << endl;
	myStack.pop();
 
	return 0;
}

The output? Shown below.

3
2
-1

Tagged with:
Feb 22
0
Digg me

Any previous experience in using opera will tell you about the feature of changing the maximum number of internet connections the browser creates per website or server. Changing this depending on the speed of the internet connection may improve the overall browsing speed. At the first site, Firefox seems not to have displayed any such option in the Preference menu item. However, Firefox is heavily tweakable, just that its not explicitly shown to the average user.

I changed the number of connections per server in Firefox, and observed better performance. Do the following:

  1. In the address box, write about:config and press enter. The following message will appear.
  2. Choose I’ll be careful, I promise!
  3. In the Filter box, write connections and press enter.
  4. From the four items, I see a list of four items. The first one sets the maximum number of connections Firefox will create in total, while the second one is for the count for each server.

Changing the default values requires thinking. If your internet speed is good, you may try setting max-connections to a higher value. However, before you make any changes, make sure you log your actions, by maybe writing down whatever you did in a text file. This will help undo any unwanted change. Tweak it as you want. Moreover, about:config provides loads of other options to explore. Make sure you play safe, and explore them well!

Tagged with:
Jun 28
0
Digg me

The first day I was shipped a Ubuntu 6.06 CD, I was impressed, just by the service though. I didn’t have any idea what worth the CD was. When I first installed it and ran, it surprised me. I was always impressed by Fedora before that, but Ubuntu had far many things to offer. They are many; I would just name the most important one - the Ubuntu community ( eg. the Ubuntu forum ). Though the 6.06 lacked several useful features that we now have in Ubuntu, the promise was there. And today, I have not been booting in windows for about three months…

There’s a pride in that, the pride of not using pirated softwares, the pride that the open source community has to offer. Its an amazing feeling to be one of those millions of users who are one way or the other contributing to the development of this community. And guess what, using these softwares is one of the ways!

So why would anyone ever need to keep windows? Well, some reasons are just too good to be ignored ( for now that is ). Ubuntu currently does not support my Plustek Scanner. That gives me a reason to run windows now. For a general user, this is not the general problem. Keep it aside, and find out why you would go for the expensive or pirated windows when you have equivalent, or even better options in linux.

Why? Well, Microsoft Word, Excel and Powerpoint are some of the most successful projects of Microsoft, being the favourite of numerous users. Do I hear you tried OpenOffice.org Write, Spreadsheet or Presentation? Give the recent versions a try, I don’t think you need any reason to miss your Microsoft habits. Its free, customisable, and growing!

ubuntuandwindows

If you are worrying about media players, Ubuntu has some quite better players to offer, eg. Mplayer. There are many more, I have a dozen listed in my menu, and some of them outruns any windows players now. Do not be fooled by any graphical comparisons, seek for the options they give you. There’s more to learn about which media player’s the best; just go to the Ubuntu forums and search for posts related to media players.

As a programmer, what I still miss ( now a little though ) is the MS Visual C++ IDE. Its the best IDE so far I have seen for C++, unless ofcourse I dont start talking about KDevelop and NetBeans. The latter two IDE’s are hugely popular among the linux developers, especially KDevelop, supporting all the features, and even more than what MS Visual C++ IDE has to offer. Moreover, I would personally suggest all the programmers to try NetBeans. SUN developed this IDE with the aim of creating an all-purpose, all-language IDE for development, including C++, Java, Ruby, etc. They are also offering free dvd’s now, and I already got my one ! :)

Yea, you might argue that Yahoo Messenger is far better than Pidgin we have now, but its just a matter of time when Pidgin gets much better, and who knows, the developers of Yahoo Messenger might also create one for Linux distros too! There’s quite a good chance of everything being Linux compatible soon judging by how fast this community is growing. And I say again, its just a matter of time…

Moreover, the security and personal flavour that Ubuntu ( Linux in the general sense ) has set as a standard is quite remarkable, now that MS Windows itself is trying to learn from it!

Its actually in the feeling of using a completely my-own kind of softwares, the greatest feeling for a computer engineer like me, or those who love to have things in their own distinct ways. Why not just forget Windows and use Ubuntu ( or any other distro of Linux ) for a try? Be desperate to learn, and you would soon forget how your C:\Documents and Settings\you\Desktop looked like!

Make sure you visit:

Tagged with:
Mar 28
0
Digg me

Finally, i get to post something about the queue implementation in stl( standard template library ). The queue is a data structure that defines the so-called push and pop operation, which literally means adding new element at the end of a list, and extracting an element from the front of the list respectively. Thus, if the following numbers are pushed into the queue in order ( 1, 2, 3), the first one to be popped out is 1, then 2 and finally, 3. I hope you get the point.

Here goes an implementation using stl.

#include <queue>
#include <iostream>
using namespace std;
 
int main()
{
queue<int> Q;
Q.push( 1 );
Q.push( 2 );
Q.push( 3 );
cout << Q.front();
Q.pop();
cout << Q.front();
Q.pop();
cout << Q.front();
Q.pop();
 
return 0;
}

As you can probably guess, the output is,
1 2 3 Continue reading »

Tagged with:
Feb 14
1
Digg me

Recently I faced trouble with installing fedora with my ubuntu already installed. The grub that comes with fedora can not detect the existence of ubuntu, so I thought I virtually lost my ubuntu installation( at least, I couldn’t boot from ubuntu any more )! Thanks to Zaher, da linux-guru( or goru, as i say it :p ) who solved it painlessly…:D This also works when you reinstall windows and pull your hair off trying for just another glimpse of the good-old linux you had…

  1. Boot from any other version of linux if installed( eg. fedora ) or from a live CD ( eg. ubuntu 7.10 )
  2. Open the terminal, and enter the command grub( u must be superuser, eg. in ubuntu, write sudo grub )
  3. enter find /boot/grub/stage1
  4. Here you would see a list of the drives which are potential bootables. Say you want to boot from hda0,1 ( hd0 the first harddisk, 1 stands for the partition count relative to c: )
  5. enter root ( hda0, 1 )
  6. enter setup ( hda0 )
  7. DONE! :)
Tagged with:
Dec 07
0
Digg me

The Standard Template Library, STL for short, adds enormous power to the C++ programmers. Efficiency in programming has been of prime importance since we started using computer as to produce business-level solutions. As a result, the search for more and more efficient data structures continued, and the sooner the programmer adapted an efficient data structure in his solution, the better. In the early programming languages, like C, solutions were possible only in the “structured” way, or I should rather use the words “structured programming” for this purpose.

Structured programming makes use of global functions to break the main problem into subproblems, and calling the required function with proper arguments. Though this seemed to be a quite clean way to deal with small programs, the size and complexity of the programs that we have to deal today demands a far more efficient solution, one that optimizes labor, as well as ensures code reusability. The overall gain demanded was that of reducing the cost of maintaining the difficult-to-deal-with structured code. This is where the need of object oriented programming was felt.

Object oriented programming uses the concept of modelling everything as an object, which may have some attributes ( properties, like the object “human” has properties : black hair, 2 hands, etc… ) and may perform some activity or function ( like the human takes food ). This way, enormous effort can be saved if we just create the required object when necessary, and make it do whatever we need to do then.
The Standard Template Library provides an Object Oriented implementation of the most commonly used data structures and algorithms used for every field of programming. The most commonly used ( as far as personal experience goes ) structures from STL are

  • Queue
  • Stack
  • Vector
  • List
  • Priority Queue
  • Set, Multiset
  • Map, Multimap
  • Bitset
  • Pair

There are also some algorithm functions already hard-coded in STL. So far, I have found the “sort” function very useful. There are many other generic ( template ) functions too, which is better learnt through a STL documentation, for example, at sgi ( http://www.sgi.com ).
From here on, I will publish the contents of each topic in seperate posts titled by the topic name to make things neat.

Tagged with:
Dec 07
0
Digg me
This works with the ‘ifconfig’ utility that Ubuntu is shipped. If you are using any other distro that does not have it installed, make sure you download it with the corresponding package manager. The following line sets the mac-address to “111122223344″
sudo ifdown eht0
sudo ifconfig eth0 hw ether 111122223344
sudo ifup eth0

My ethernet adapter was numbered eth0. Check your ether adapter no by simply writing ‘ifconfig’ and see the default number assigned to it. You should note however that this change is durable until the next restart. Each time you log into Ubuntu ( linux ), you must open the terminal and enter the lines above.

Tagged with:
Dec 05
0
Digg me

Adding a space after the format specifier (eg. “%d “)

This has the effect of taking an integer (or float for %f and double for %lf) as input and keep the control untill a non-whitespace character is input. This means that if the input is

123                            d

and the function call for scanf was

scanf("%d ",&n); scanf("%c",&c);

where n and c are int and char respectively, the value saved in n is ‘123′ and in c is ‘d’ (not a space :-) despite the fact that the inputs were seperated by lots of spaces! This could be generalised for cases with newlines and tabs instead of spaces, where the same behaviour is observed.

Now, what’s the use of such a facility? Well, in some situations, you may be asked to take a series of inputs, an int ,and then some chars, which are seperated from the int by a series of spaces or a new line. One thing that can be done is to take the whole input as a line in a char array, and use a loop to locate the chars, or do some checking for a new line. But with this trick at hand, the whole thing becomes quite effortless, and clean!

Tagged with: