Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

List of Most Popular Computer Programming Language in 2020.

The most important skill to learn in today’s world is to know about how to write a computer program. Today, computers are used in almost every industry. it is also used in an aircraft to perform an autopilot operation.   The prog...

Executing Stored Procedure using Spring JDBC Template

Technology: Spring-jdbc is the abstraction framework, it take care the below following list:   1) Defining connection parameters 2) Open Connection 3) Specify the statement 4) Prepare and execute statement/prepared statement ...

What is Containerization in Java?

Running software in containers is gaining in popularity for developers. Containers are typically collections of pieces of software and environment, running together in a single system. Developers take these systems and test them in the form of co...

Java and Its Role in Shaping Big Data and IoTs Future

Data is, beyond question, among the most pivotal factors when it comes to running a successful business. This rising popularity of the potential of data has served as the gateway to the adoption of Big Data. While it throws open the window to use...

Top 7 New Tools that Every Java Developer Should Know Today

Platform independence! It’s one the major reasons of the ever popularity of the Java language. It’s no wonder that organizations of all sizes and types are integrating it into their processes, not to mention the fact that Android is r...

How to Implement Callback in Android to Communicate Between Classes & Fragments

Callback is a way to inform a class synchronous/ asynchronous when an event occurs. A simple way to create a generic callback is to use interface with a method in which JSON is passed.     So, In this tutorial, I will guide...

How to Detect Network Connectivity Using Observer in Android Device

If you want to check whether your device connected to Internet or not OR when it turn on/off then adding the observer is the best way. You have to add the observer in activity to check connection is on or off.     Let's...

How to Implement Room Database in Android using RxJava2?

The Room is basically an easier implementation of SQLite database and a part of Android Architecture components. We know that SQLite uses SQLite open helper class to manage SQLite database but Room provides migration by removing this implement...

Big View Notification - How to Apply Expanded Layout to Android Notification

There are two types of visual style which appear on the Notification, normal view and big view. So, here in this tutorial, we will see how to Apply Expanded Layout to Android Notification. Regarding Nig View Notification, you should aware tha...

Converting Java Apps to JavaScript Using CheerpJ

If you want to convert Java application into JavaScript, CheerpJ might be the best tool to do so. CheerpJ melds Java and Web development. It can convert Java applications or libraries into JavaScript and here comes the best part, to do so you don...

How hashMap internally works in java ?

It’s not wrong to say that HashMap is an implementation of Map interface as it allows value storing in key value pairs. Although unique elements are present in Hashmap, null values and only one null key are allowed. Hashmap basically wor...

What is Factory Pattern?

Factory pattern is one of the most used design patterns in java with the help of this pattern you can create object easily by using this concept of oops. Example of Factory pattern : 1. Create an interface 2. Create class that 'll ov...

Data structure when to use what ?

We have different types of data structures like array, linked list, tree etc but which one is better so this is basic question that comes in mind every time when we have large data set. In this post we can find out the best data structure type...

Jcrop image croping

1- Place JS and CSS files under head tag. jquery.min.js jquery.Jcrop.js main.css demos.css jquery.Jcrop.css   2- Also copy and paste bellow piece of javascript code under head tag. <script type="text/javascript"...

Travelling Salesman Problem

Hello!!! Travelling Salesman Problem is for finding the shortest possible root that visit every node in the graph and return to the origin point. It is used to find the shortest path. For example:- In this graph, Their is many way to rea...

How to Print All Leaf Node of Binary Tree

Hello Everyone!!!   In order to solve binary tree problem of leaf node, we should know that what is leaf node? Leaf node is node of the binary tree whose have no left and right child means whose left and right child is null. It...

Most Popular Application Development Frameworks 2016

      "Developing mobile applications used to mean that you had to write native code, for each individual device or operating system that your client required. However, these past few years the term Hybrid App Deve...

Convert bytes to human readable form Android Java

Convert bytes data to human readable form. 1.  I initialized the byte with random number; long bytes = 123456; 2.  Initialize String[] of data types. String[] types = {"kb", "Mb", "GB", "TB", "PB", "EB"}; 3. initial...

Default methods and static methods uses in Interface.

We know that interface provide methods without body or functionality but in abstract class we can provide default functionality of methods. So in interface we can't give method body and can't declare ant static method. But in Java 8 no...

Comparator Interface in Java

Comparator:- Comparator interface  found in java.util package and it contains equals() and compare() method. It use the multiple sorting technique to write our own comparison logic and is used to sort the e...

Comparable Interface in Java

Comparable:- Comparable interface  found in java.lang package and it contains only compareTo() method. It use the single sorting technique to write our own comparison logic and is used to sort the elements on the basis of...

Facebook OAuth Authentication using Java

Hi, This blog is to help you to get Facebook Authentication through OAuth using Java. As Facebook is not offering any SDK for Java clients so with the use of a Json parser we are going to develop a small web application in order to u...

ThreadGroup Class

ThreadGroup in Java: It represents combination of threads within a group. A thread group can also include other thread groups .With the help of thread group we can easily suspend, resume or interrupt group of threads by a single method call. ...

Synchronized block

Synchronized block: Synchronized block is mainly used when there is a sharing of resources and it is used to lock an object for any shared resource so that at a particular time only one object can use that resource. By using synchronized block...

Main Thread in java

Main Thread: When we run a Java program  then main thread begins running immediately. It is created automatically. The main thread is the first as well as last thread in a java program to end. It is the main thread from which other chi...

HashSet Class

HashSet Class: It extends AbstractList class and implements List interface. It uses hashing technique to store data. It contains only unique elements. We can use HashSet class by importing java.util package. Example: import java.util.*...

LinkedList class

LinkedList class: It provides a linked-list data structure. It uses doubly linked-list to store elements. It extends the AbstractList class and implements List  interface. We can use LinkedList class by importing java.util package. Exa...

NOT LIKE in Hibernate Criteria

The Hibernate Criteria Not like, selects the records that don't match to the matching string given in like parameter. Example: Criteria criteria=session.createCriteria(Tickit.class); //Here you can pass class on which you want to perf...

Formatting date in different format in java

Formatting Date in java: There is a predefined format for dealing with dates in java , but suppose if you want the date in some other format other than the default one then you can use the SimpleDateFormat class of the java.text ...

Getting object values from json data

Getting object values from Json: If you have a data in Json format and you need to retrieve the object values from that day, it can be easily done using Java.   Lets see an example,  If you are using maven add the following ...

Pass Element ID that Triggers `onclick` Event to the Event Handling Function

When we apply onclick event to an element, sometimes we need to pass ID of that element to the event handling function. We can do this by passing id to function as this.id or we can pass the element itself. Example: In the below example I&...

Getting current url in jQuery

Sometimes we need to identify which is the current URL of JSP page to perform some functionality. We can do this very easily by adding the below line in you on load function:   $(function(){ var url = window.location.href; ...

Creating object in Json format using java

Json object: You easily write your object in json format with java . Json format is used because it becomes easy to exchange information in this form. It is easy to understand and easy to write. Lets see an example,  If yo...

Static and Dynamic binding in java

Static Binding: It determines the the type of object at early stage during the compilation itself, i.e. it tells that the object belongs to which class during the compile time of the program.  There is no ambiguity in deciding the type...

Printing current Date in Java

Date Class in java: There is a Date class in java under java.util package which can be used to print the current dates. There can be various ways to print the current date. Lets see with the help of example: import java.util.Date; ...

Convert Xml to Json format using java

Xml to Json conversion: Lets see with the help of example. Following jars are required for conversion: apache-commmons json-lib ezmorph Suppose we have the xml file with name demo.xml with the following data: ...

Setting limit for the no. of words per record in solr while fetching

Fetching records in solr: Once you have finished with indexing in solr, now you can perform search on your records with the help of queries. Go to the url: http://localhost:8983/solr/#/collection/query  There is box with q,&...

Instance Initializer block in java

Instance Initializer Block: There are two types of data members: static and instance data members.  Instance data members are those that belongs to instance of a class. i.e objects. Here comes the role of instance initializer block. It...

How to use Custom Exception in android

Custom Exception is user-defined exception. It is used to customize the exception according to the user requirement. Here In step one we have defined own exception . In step second Using the custome defined exception extends "Exception"...

Is it possible to run program without main method?

Can we execute a program without using main? Answer is yes, we can run a program without using main with the help of static block. Lets see about static block first. Static Block: It is block which can be used to give initial values to t...

Export from a list containing objects to excel file in java

Suppose you have a list containing objects. You can export it to the excel file.  You will require the following jars for this: xmlbeans-2.3.0.jar poi-3.9-20121203.jar poi-ooxml-3.9-20121203.jar poi-ooxml-schemas-3.9-20121203....

Deleting documents in solr collection

Deleting documents: Suppose, you have collection with the name of demo and you have indexed your file in the server in this collection but you want to delete all the documents or some of them, then it is possible by two ways: Deletion by So...

Indexing in Solr Server

Indexing: Solr gives you a quick response and results because of indexing. What does this mean? It means that it searches index instead of the text to retrieve the results for you. In book , you search for the index in the index page of the...

Program to print pascal's triangle using a 2D array in java

Pascal's Triangle:   Program to print Pascal's triangle: import java.io.*; public class Pascal{ public static void main(String []args)throws IOException{ InputStreamReader isr=new InputStreamReader(S...

Solr update using solrTemplate for incremental value

In previous blog Solr Atomic update with incremental popularity, we have updated the solr incremental field using SolrDocument.    Now we will update it through solrTemplate. Here is the sample code: PartialUpdate update =...

How to disable mongoDB java driver logging

Go to mongodb configuration file and add following lines of code. @Configuration public class SpringMongoConfig extends AbstractMongoConfiguration{ static Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); sta...

Fetching String of specified length in solr

For fetching a string for a specific value and length, here are 2 ways to do that. First using @Query and another using solr Criteria. In the below code it first searches for the string match and then suing filters we have defined the length o...

Adding multipli core in spring with custom solr repository

Repository take solrtemplate to execute solr operations. Since we have multiple cores so we need to create multiple template and multiple repositories for each core. Following example explains it with 2 solr core Repository and custom imp...

How to make AJAX call in jQuery?

Sometimes we need to make AJAX call in our Web page. The purpose of AJAX call is that you want to get/submit data without refreshing your page or you want to submit your form by calling an API. We can do this very easily by using ajax() method of...

Statement interface

Statement interface: It provides methods to interact with database means using Statement interface we can execute SQL queries.The createStatement() is present in java.sql.Connection interface and it does not take any argument. To use Statem...
prev 1 3 6
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: