Home / v.shakya

v.shakya

I am V.Shakya, Software Developer & Consultant I like to share my ideas, views and knowledge to all of you who come across my website. I am young, enthusiastic, highly motivated and self disciplined person. I completed my studies in Master of Computer Application and currently giving my technical expertise to one of the Big IT company. I have more than fifteen years of experience in vast field of Programming , Designing and Development of websites and various software's.

Node = Chrome V8 engine + C++

Q 1. What is Node.js? Answer: Node is runtime environment on which a javascript code can be executed. Node is built on google v8 engine. Ryan the creator of Node, integrated google chrome v8 engine with a C++ program and called it NODE. Node.js is a single-threaded but highly scalable …

Read More »

Get the rank of a user in a score table

Below is Scores Table data and structure Id Name score 1 Ram 90 2 Shyam 85 3 Dhanshyam 95 4 Sita 65 5 Geeta 98 6 Radha 45   SELECT id, name, score, FIND_IN_SET( score, ( SELECT GROUP_CONCAT( score ORDER BY score DESC ) FROM scores ) ) AS rank …

Read More »

How to get second-highest salary of employees in a table

Method 1) Below query can be used to find the nth maximum value, just replace 1 from nth number SELECT * FROM `emp` e1 where 1 = (select count(distinct(salary)) from emp e2 where e2.salary>e1.salary) Method 2) select * from emp where salary = (select max(salary) from emp where salary < …

Read More »

Installing the latest MySQL 5.6 on Amazon Linux using official repos

Installing the latest MySQL 5.6 on Amazon Linux using official repos Below are the process/steps for installation: sudo yum localinstall http://repo.mysql.com/mysql-community-release-el6-3.noarch.rpm sudo yum install mysql-community-server sudo service mysqld start Configure mysqld to start on boot: sudo chkconfig mysqld on chkconfig –list mysqld And that’s it, you’re all set up and …

Read More »

How to install vlc player in centos

$ cd /etc/yum.repos.d/ $ wget http://pkgrepo.linuxtech.net/el6/release/linuxtech.repo $ yum -y install vlc Step 1: Add Repository for Linuxtech – First switch user to “root” account with command “su -“ – Next run the following commands $ cd /etc/yum.repos.d/ $ wget http://pkgrepo.linuxtech.net/el6/release/linuxtech.repo Step 2: Check VLC version in Repo – Run following …

Read More »

How to Change Hostname in centos

$ vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=newHostName and: $ vi /etc/hosts 127.0.0.1 newHostName 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 and then rebooting the system

Read More »