Drivers are up to date but the keyboard is still not working

So I encountered a weird error. I was installing VM but when I restarted my laptop, my keyboard stopped working K. So I ran Diagnostics to check if it is the hardware issue, which luckily was not. So I used the on-screen keyboard to log onto my system to check if I need to upgrade my keyboard drivers. There was the tiny yellow mark on the near my keyboard driver. And I downloaded newer one from the internet and but that didn’t help either. It said you already have the up to date driver.

I found a very useful link about it – https://support.microsoft.com/en-us/kb/256233

What they said is simple enough but one has to very careful while editing Registry Editor because any mistake can make you reinstall your operating system.

Using your onscreen keyboard, type Regedit in the run. This will launch a window as shown in the picture below.

wordpress1

On the registry menu, click computer and then expand HKEY_LOCAL_MACHINE. Then go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e96b-e325-11ce-bfc1-08002be10318}

Double click the upper filters to remove Lkbdflt2 value.

Then go to other location : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e96b-e325-11ce-bfc1-08002be10318} and in upper filters  remove Lmouflt2.

Then close and restart your computer. Everything should work fine now.

Using PostgreSQL on ubuntu 12.04 LTS

PostgreSQL is a powerful object-relational database management system and has  bindings for many programming languages such as C, C++, Python, Java, PHP, Ruby…

Before you use it, you need to install it, ofcourse. To install it run following commands on your terminal:

apt-get install postgresql postgresql-contrib

You can also download it from ftp://ftp.postgresql.org/pub/source/v9.2.4/postgresql-9.2.4.tar.gz and
After you have obtained the file, unpack it:

gunzip postgresql-9.2.4.tar.gz
tar xf postgresql-9.2.4.tar

For the rest of the installation procedure, you need to change into the directory, which you created while unpacking it.

Creating a Database
To create a database, you need to login as a postgres user.

gurpinder@gurpinder:~$ sudo -u postgres -i

To create a new database, issue following command on your terminal:

postgres@gurpinder:~$ createdb testdb
postgres@gurpinder:~$ psql testdb

You should see output similar to the following:

psql (9.1.9) 
Type "help" for help. 
testdb=#

Creating Tables
To create a table in your test database called “student”, issue the following command:

testdb=#  CREATE TABLE student (student_id int, first_name varchar, last_name varchar);

Now if you want  insert a record into the table, use this:

testdb=# INSERT INTO student VALUES (2, 'Gurpinder', 'Chahal');

Now if you want to see the contents of table, issue this command:

testdb=# SELECT * FROM student;

This would produce output similar to the following:

testdb=# SELECT * FROM student; 
 student_id | first_name | last_name 
------------+------------+----------- 
          2 | Gurpinder  | Chahal 
(1 row)

To exit the psql shell, issue this command:
\q

If you do not want to use your data anymore, remove it by:

$ dropdb testdb

For more knowlegde of PostgreSQL look here: http://www.postgresql.org/docs/9.2/interactive/index.html

How to change text color of icons on your desktop || Ubuntu 12.04

If you are jaded with text color of icons on your desktop, then don’t worry.

Here are simple steps which you can follow to change text color of icons on your desktop.

1. First go to path:

                /usr/share/themes/Ambiance/gtk-3.0/apps/

This path depends on theme you chose for your desktop. If you are using some other theme,then just replace my theme_name with yours.

2. Now, here you would find a file named “nautilus.css”. Just open it to make few changes.Look for a line (10th in my case):

 

                   color:@bg_color; 


3.Replace the @bg_color with hex-code of color you want. It would be better if you uncomment the above line and copy it to make changes.

   
                   /*color:@bg_color;*/
                     color:#2E0854;

4. Save the changes and enjoy new look of your desktop. 🙂

Why To Learn XML?

XML is everywhere and is now becoming very important for the web. I think there’s a hardly any field where you can avoid it. XML stands for eXtensible Markup Language and is designed to transport and store data.

A markup language is one which uses additional items (called markup) to create a document.

Now, you would be wondering what the word extensible mean here!!

XML is called extensible ( http://en.wikipedia.org/wiki/Extensibility) as it allows the author of the document to define the markup elements by their own.

This is really very easy to learn. For this, you need to have basic knowledge of HTML and javascript (these are one of the easiest languages in world).

XML is much like HTML. Here you must not confuse. These both languages are made for entirely different goals.

XML was designed to store as well as exchange data and HTML to display data. In XML, tags are not defined. You have to define your own.

Here you make all the commands (like a boss). So, you can call it a user made language.

XML does not DO anything, it is just to store and transport data. Infact, it is just information wrapped in tags.

 

Now, here’s question which usually comes into mind, why we need to learn XML then?

 

Its feature which really fascinated me is that it supports UNICODE. So every human language can be communicated using XML.

In XML, you can invent your own tags. Unlike HTML, you don’t have predefined tags here. XML is also platform independent and so technological changes doesn’t effect it.

A lot of new Internet languages are created with XML such as XHTML, RSS ,WSDL (for describing available web services ), SMIL (for describing multimedia for the web).

 

Now, if still these things dosen’t convince you, then I would say:

Why To Leave A Thing Which You Can Learn In About Half An Hour??

 

The only code which you need to learn in XML is:

 

<?xml version=”1.0″> and some grammar rules you need to follow.

 

Just take a look to this video to see what you can do in just four minutes 🙂

 

 

 

“He that can have patience can have what he will.” ― Benjamin Franklin

Though this post has nothing to do with my training, but still I learned a big lesson from my experience.On Tuesday, while coming back from Kamal’s home, wasp (or some poisonous insect)  stung me on eye. It hurts so bad you want to cry but instead I went to doctor , got a treatment in about one minute.

My eye, however, swelled shut and the whole side of my face swelled to the size of an watermelon.
Even my other eye got swelled too. I was unable to see anything from my one eye and it was irritating too.

I again went to doctor again and asked him to do something for my swelling.But he replied calmly that we don’t have a medicine for swelling (that was really more irritating) but has a weapon to fight with it, that’s the patience.He further said that you can thank GOD  for you are not born like this.Be patient and enjoy every moment of your life.
 

Though this wasn’t a good experience but from I learned a big lesson from it.

Today me and Parbhdeep went to Kamal‘s home. We together  did our work. We made changes in our osm.xml, layeramenity-points.xml.inc,rendred.conf. Then we deleted our cache.

Then we did rendering and got changes in fonts colors and background. Today we got little success and we are going to complete our work soon.

 

Commands For Package Management

To manage debian packages in ubuntu, we need few commands.

Here are my notes about  various commands :

  1. sudo apt-get install packagename :    Installs a package
  2. sudo apt-get purge packagename: Removes a package,dependencies and its
                                  configuration files
  3. sudo aptitude clean packagename:Deletes downloaded files which were necessary for
                                  installation
  4. sudo aptitude show packagename : Show details about a package name
  5. sudo aptitude dist-upgrade : Updates the Ubuntu system to the next version
  6. sudo dpkg -L packagename : Lists all files and their location in a package
  7. cat /var/log/dpkg.log | grep "\ install\ " :To search for the installed packages use the following command.
  8. sudo apt-get --reinstall install packagename :  If you somehow damage an installed package, or simply want the files of a
    package to be reinstalled with the newest version that is available,use this command.
  9. sudo apt-get -u upgrade :Run this command with the -u option.  This option
    causes APT to show the complete list of packages which will be upgraded.
    Without it, you'll be upgrading blindly.  APT will download the latest versions
    of each package and will install them in the proper order.  It's important to
    always run apt-get update before you try this.
  10. apt-get -u dselect-upgrade : dselect is a program that helps users select Debian packages for
    installation.dselect knows how to make use of the capacity Debian
    packages have for "recommending" and "suggesting" other packages for installation

 

YouTube downloader for Ubuntu 12.04

Here are the ways one can use to download a YouTube video in Ubuntu  –

  1. Miro: miro is really a great tool for downloading videos from various sites including youtube. You just need to run one command on terminal.
sudo apt-get install miro

            One can know more about it from link:

                                  http://www.getmiro.com/download/for-ubuntu/

  2.  youtube-dl: youtube-dl is a small command-line program to download videos from YouTube, Vimeo and a few more sites. It is included in the Ubuntu repositories, so you may install it by typing:

sudo apt-get install youtube-dl

Now,get the URL of the video. Then simply execute the command –

 youtube-dl"URL_of_the_video"

youtube-dl supports downloading videos through a proxy, by setting the http_proxy environment variable to the proxy URL, as in http://proxy_machine_name:port/.

3. vimeo-dl: vimeo-dl is a stand-alone command-line program to download videos from Vimeo. It is not included in the Ubuntu repositories, therefore you must download and save the script somewhere and make it executable by typing:

chmod 775 <script> 

4. ClipGrab : ClipGrab is a free software for downloading and converting online videos from many sites like YouTube or Vimeo.

ClipGrab can download from the following sites: YouTube, Clipfish, Collegehumor, Dailymotion, MyVideo, MySpass, Sevenload, Tudou, Vimeo.

To Install ClipGrab,run these commands on your terminal.

sudo add-apt-repository ppa:clipgrab-team/ppa
sudo apt-get update
sudo apt-get install clipgrab4. 

Add-ons/Plugins for Mozilla Firefox / Google Chrome

5. Flash Video Downloader

it’s a great plugin for Mozilla Firefox. You can download the video in appropriate format (mp4, flv, 3gp, webm etc), for the devices you want – you can also use the converter for more options. As the name suggest, it’s not just for youtube, you can download videos from a number of video sharing sites including Facebook, Metacafe etc.

Download the Flash Video Downloader Plugin

All about OSM

Screenshot of JOSM displaying OpenStreetMap da...

Screenshot of JOSM displaying OpenStreetMap data and GPS tracklogs (Photo credit: Wikipedia)

On second and third day, I worked on OSM.

Before I dive into what OSM is, i would first say that it is a amazing map with open data. It is free editable map of the world.  It,actually,is a “Wikipedia of maps.”

You have three tools to edit OSM.
The first one-edit with id-is programmed in Java script.It uses SVG( Scalable Vector Graphics) and D3.js ( Data Driven Documents) for rendering purposes. This is simple tool and anybody can use it.

Second tool is Potlatch2. It needs adobe flash to edit. One can use the icons provided there to mark required places.One can mark anything and everything with insane levels of detail. To mark a boundary or path one needs to specify points.

Third tool is JOSM(Java open street map). One needs to download JOSM first to work on it.It can be directly downloaded from Ubuntu software center.

Next task was to find way to make pc into OSM server.

We need to build our own server as we might want our map to work differently for us.

We googled it continuously for several hours and end up finding everything on single site- “Switch2osm”.

Two ways are Ubuntu 08.04 hardy heron and Ubuntu 10.04 lucid lynix.

For building a server one needs to have complete knowledge of “Tiles and API/library”.