Saturday, July 16, 2011

Mongodb : ‘Connect failed’ error

Learning Mongodb these days, and encountered this error when starting the mongodb client.

Mongodb connect failed error

The problem here is that, the mongod daemon has to be started first.The steps to do so is

Ubuntu/Debian
Execute the following command in the terminal
$ sudo /etc/init.d/mongodb start

Fedora/RedHat
$ su
Now, switch to the directory where mongo was installed, and execute the following command in the terminal
# mongodb-linux-xxxx-1.6.x/bin/mongod

This should get the daemon up and running, the normal procedure for starting the mongodb client should then be followed.

Gmail multiple account sign-in

Gmail - multiple log in
I just found out that not many people who use gmail know about its multiple sign in feature.So, if you have multiple gmail accounts and wish to access all of them simultaneously, you need not have to logout of one to log into another.

This is an extremely handy feature useful to people who have multiple Google powered mail accounts, a personal Gmail account and another provided at their work.

To enable this feature, go here  and select the ‘on’ button.Check the following terms and conditions (as always) and you are set.

Now, to log into multiple accounts :

Click your name or email address at the top of the page.
Select Sign in to another account from the drop-down menu.
On the page that opens, enter the email address and password for another account you wish to access, and click Sign in.
Note : The above instructions are the official instructions from Google.Yes, I was too lazy to come up with my own.

Thursday, May 19, 2011

Ubuntu Update Manager/Synaptic package manager error

While updating your Ubuntu distros using the Update Manager or while using the Synaptic Package Manager, if you ever encounter a error like


'E:Encountered a section with no Package: header, 
 E:Problem with MergeList /var/lib/apt/lists/any name here,
 E:The package lists or status file could not be parsed or opened.'


The easiest thing to do is remove all the contents of the mentioned directory /var/lib/apt/lists/ and then populate the lists again.


1. Remove all the entries
       $ sudo rm /var/lib/apt/lists/*
2. Populate the entries again
       $ sudo apt-get update


This is a short hand trick and do use it at your own risk.
But Linux is all about taking that little extra risk, right?

Wednesday, May 18, 2011

Enabling front panel audio jacks in Ubuntu


When I moved my trade to Ubuntu 10.04 ‘completely’ last year, I had a tough time getting my desktop’s front audio panel.
It was a rather easy affair in Windows XP, I just had to enable a option using Realtek.But, in Ubuntu its not so straightforward albeit not complicated either.
All you have to do is, type the following commands in the terminal
  1. Open the alsa-base.conf file for editing
    $ sudo gedit /etc/modprobe.d/alsa-base.conf
  2. It prompts for the password, after entering it add the following line at the end of the file
    $ options snd-hda-intel model=auto 
  3. Reboot
This should get it working.

Tuesday, May 17, 2011

c.vim

Recently, I was thinking about the way we write c programs. There are certain set of statements and a few other things that we are bound to use again and again. Like the main routine, the headers, the comments...to mention a few. It would be nice if the editor did these redundant tasks. We would code lot faster. Such features are normally provided in the IDEs, but being a linux user I use vim to code c programs. Vim has so many features, i was sure that it would also have this...and i was darn right about it :)

'c.vim' is a small plugin for vim that converts it into a c/c++ IDE. Adding this to vim considerably increased my coding speed. It provides insertion of complete statements, code snippets, comments and a few more nice features.

Its fairly easy to change the template for the code snippets and the comments. You can also set your personal details like your name to be displayed, your contact etc. You can follow the documentation that is provided with the plugin to customize it to your needs. Once that is done, just take a look at the key combination to perform the actions.

Now open a new c file to code as usual, and you'll automatically be greeted with your information (the personal details which you've set in the template file) and also an empty main routine. The cursors is also placed in the appropriate positions so that you can continue to code.

All the key combinations begins with '\'. for example, '\cfr' creates a frame comment. There are many more available. Make sure to read the 'c-hotkeys' file that is provided with the documentation.
download the c.vim here .

Once you get used to it, you'l definitely code a lot more faster and your code will also follow a consistant format.

Wednesday, February 16, 2011

How to uninstall Ubuntu on your computer?

Previously we wrote about the installation procedure of Ubuntu.Now you can find the procedure for deleting Ubuntu from your PC.
          If you are deleting Ubuntu because of a problem in maintenance or finding it difficult to use Ubuntu , please write to us and we will help solve your problems.


Important : You can't just delete your Ubuntu partition and be happy that everything is out and over. Ubuntu usually messes up your Windows bootloader, so you have to set it right and this is how its done.

Deleting Ubuntu using Windows Vista/7/XP WITH a recovery disk
  1. In Windows, launch Disk manager and remove every partition used by Ubuntu (root partition, swap, …)
  2. Reboot with your Windows CD. When asked, choose “repair” and launch fixmbr. This command replaces GRUB with Windows bootloader.
  3. Reboot again and you are done.
Deleting Ubuntu using Windows Vista/7/XP WITHOUT a recovery disk

Follow Step 1 from above.

This is the same as above but since you do not possess a recovery disk, you need to download the 'MbrFix' command. This can be downloaded here for free.

Once you download it, paste the command somewhere convenient like the Desktop.Then open your cmd .This can be done by going to Start->run->cmd.

When cmd opens, the default directory will be Documents and Settings\admin.Change it Desktop.
Use the following command twice one after the other to change your present working directory to C:/
                                      cd ..

Then change your directory to Desktop once you reach C:/
This can be done using the following command
                                     cd Desktop

Now type in the following command
MbrFix /C 0 fixmbr /yes
                                
You should get a confirmation msg.
Reboot and you are done.

And we're back


Well finally get to write again, that's cos we were busy developing our new site.
Here is a brief introduction of what the website is all about.
Complete details can be found here.

What is AdSanthe?
A advertising tool for blog owners / website owners to display ads in their sites and get more visitors as well.The whole concept of adsanthe is mutual cooperative advertising.A new advertising network is created.

How does it work?
When you sign up and create a ad, we place your ad on other user's gadgets and similarly place other's ads on your blog's gadget.So the whole adspace is shared by all the users.So each user is both being advertised and advertising some one else.It's a two way mechanism.

An example of such a gadget can be seen on this blog which is visible on your right hand side.

A blog owner who wishes to market his blog with us has to first sign up using our website(which is going to be announced shortly) and he can then create his own ad using our templates much like the facebook ad system.The user can then select the kind of blog/websites where his ad needs to be placed.
A gadget is then added onto the user's blog/website containing ads of other users.

The advantages of signing up

1. Create your own ad.
2. Get the AdSanthe gadget on your blog.
3. Popularize your blog with your ad being advertised globally.
4. See the number of visitors to your blog grow.
4. Have the liberty to choose what ads you want your gadget to display.
5. Regular updates of your blog traffic statistics.

If you like it, make it known here in facebook.

If you have any queries,feedback or if you are just bored and want to talk to us, you can at info@adsanthe.com.