Monday, November 21, 2016

Remove the line numbers in source code using notepad++


A sample code with line numbers:

01<!DOCTYPE html>
02<html>
03<head>
04 <meta http-equiv="X-UA-Compatible" content="IE=edge">
05 <meta charset="utf-8">
06 <title>Hello App!</title>
07 <script>


To remove the numbers in each line of code, do the following:


  • Copy the code into notepad++
  • Type Ctrl + H
  • Under Search Mode choose Regular Expression.
  • In Find What :Enter ^\d+
  • Leave the Replace with: as blank
  • Now click Replace All


Now the code looks like:


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<title>Hello App!</title>
<script>



Saturday, November 12, 2016

It ebooks Rest Api

Itebooks which is one of the popular sources for programming books.

They have exposed couple of REST Apis as GET request.

One of it is send request to it based on the book id.

Below is the code to get the details of the book:


Monday, November 7, 2016

Huffman Decode

Huffman coding assigns code words to fixed length characters based on frequency.
More frequent characters are given shorter code words and less frequent with longer.


Java program for a given string that has encoded and a tree structure,  decode the characters .

To find Nth maximum salary

To find nth max salary using correlated query