16×2 LCD With LPC1768 ARM Microcontroller | In Depth

LCD is an output display device abbreviation for Liquid Crystal Display. Many varieties and types of LCD comes into the market and out of them, 16×2 LCD is the simplest one and is easy to be interfaced. As the name suggests it is a 2 line display and each line supports up-to 16 characters. The 16×2 LCD is a  16 pin device having a PCB mounted controller and a display. The controller listens to the data ports and generates the pattern to be displayed according to the i/p data. Out of…

Read More

CRC16 using JAVA

CRC16 using JAVA

CRC codes are numerously used for error checking purposes. So many times working around Embedded Devices you will find CRC used in different communication protocols for error detection. This piece of code will help you to generate CRC16 using provided packets in JAVA. While working on devices like Raspberry Pi which supports JAVA and industrial protocols like MODBUS which uses CRC16, this code can be used.  

Read More

Hackerrank Modified Kaprekar Numbers Solution

programming

This is the solution to the Modified Kaprekar Numbers found in the implementation section of the algorithm domain in Hackerrank. A modified Kaprekar number is a positive whole number n with d digits, such that when we split its square into two pieces – a right hand piece r with d digits and a left hand piece l that contains the remaining d or d−1 digits, the sum of the pieces is equal to the original number (i.e. l + r = n).       Screenshot The Code def…

Read More

My First webpage using Bootstrap Framework

Bootstrap webpage

In this post, you will learn to create your first webpage using the Bootstrap Framework. Bootstrap framework is a responsive framework. It automatically adjusts the site’s layout according to the device in which it is viewed. Responsiveness is given highest priority nowadays. This webpage using Bootstrap Framework uses basic components. Designing a webpage using Bootstrap Framework is easy and need to less few lines of code. Page Preview     Components used Containers Jumbotron Well Panels The Code <link href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css” rel=”stylesheet”> <div class=”container”> <div class=”jumbotron”> <h1>Page Title</h1> <h4>This is my first webpage in…

Read More

Bit Stuffing Code Implementation in Java

programming

This is an implementation of the Bit Stuffing popularly used in data communication, also known as one of the concepts of Framing data bits. Bit stuffingis the process of inserting noninformation bits into data to break up bit patterns to affect the synchronous transmission of information. It is widely used in network and communication protocols, in which bit stuffing is a required part of the transmission process.To know more please click here.    Sample Output: This is a sample output with data binary data entered as 11001111110. Code: import java.util.*; public…

Read More

Hackerrank Cavity Map Solution

programming

This is the solution to the Cavity Map problem found in the the implementation section of the Algorithm domain in Hackerrank. The bellow solution is in Python2. In this you are given a square map of size n×n. Each cell of the map has a value denoting its depth. We will call a cell of the map a cavity if and only if this cell is not on the border of the map and each cell adjacent to it has strictly smaller depth. Two cells are adjacent if they have…

Read More

A simple program to check anagrams in java

programming

This is a simple program in Java. This program can be used to check if the two given strings are anagram. Two given strings are said to be anagrams when they have equal length and same characters are present in both the Strings. An example of anagram strings is SILENT and LISTEN! Screenshot Code import java.util.*; public class Anagram { public static boolean isAnagram(String s1, String s2) { if (s1.length() != s2.length()) { return false; } s1 = sortCharacters(s1); s2 = sortCharacters(s2); return s1.equals(s2); } public static String sortCharacters(String str)…

Read More

Merge sort using C

programming

This program illustrates the merge sort using c program. Merge sort uses merge algorithm and partition algorithm to sort the given array of unsorted elements. Partition algorithm separates each element, and merge algorithm combines every thing and shows up the sorted format of the array in increasing or decreasing format as wished, here it is in increasing format. Have a look at the sample output and code. Sample Output Code #include < stdio.h > #include < conio.h > void merge(int[], int, int, int); void partition(int[], int, int); int main() {…

Read More

Storing configuration data for JAVA applications

programming

    Many times it is required to store some configuration settings for your application so that it can use again and again from where it left. Or the application can start with some specific parameters. The properties file can come in handy in such requirements. First, let’s write something to the properties file.   Code: import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Properties; public class App {   public static void main(String[] args) {     Properties prop = new Properties();     OutputStream output = null;     try {        …

Read More

Controlling VLC media player using JAVA

programming

Basically, I was looking for a method to communicate with the VLC media player so that I can get the currently playing video on the player and my app can search the internet and get the details about the movie. For that, I googled a lot and finally came to know that VLC has a web interface and I used that with my JAVA app to control and getting details of the movie.     Setting Up First, open the VLC and go to tools->preferences and check the All radio…

Read More