Posts

Showing posts from 2017

Solr Overview And Installation Guide

Solr is an open source software developed by Apache software foundation It is a search server which uses the Apache Lucene in the backend and provides a Rest API which can be called from any language or the platform to get the indexed data or the search results. Apache Lucene is the java library which provides indexing and search functionality. Solr and Lucene both are managed by Apache. Applications can use this search platform called solr to implement faster searching in their site. Click here for installation guide

How To Configure SAMBA Server And Transfer Files Between Ubuntu & Windows

Installing Samba is really quite simple. Since we are going to be dealing with the command line, let's install Samba in the same way. So open up your favorite terminal window and prepare to install. All of the installation commands will be issued as either the root use or by using the sudo command Whether you use su or sudo will depend upon which distribution you are using. If you are using Fedora (or a Fedora-like distribution), you will su to the root user. If you are using Ubuntu (or a Ubuntu-like distribution), you will use sudo. Click here to view command and steps

Log4j - 2 minute tutorial

Introduction Apache Log4j is the logging framework for java applications. log4j is a reliable, fast and flexible logging framework (APIs) written in Java, which is distributed under the Apache Software License. log4j is a popular logging package written in Java. >>   Click Here to view Log4j in details with properties file explanation

25 Useful Commands of APT-GET and APT-CACHE for Package Management in Ubuntu

This article explains how quickly you can learn to install, remove, update and search software packages using apt-get and apt-cache commands from the command line. This article provides some useful commands that will help you to handle package management in Debian/Ubuntu based systems. What is apt-get? The apt-get utility is a powerful and free package management command line program, that is used to work with Ubuntu’s APT (Advanced Packaging Tool) library to perform installation of new software packages, removing existing software packages, upgrading of existing software packages and even used to upgrading the entire operating system. What is apt-cache? The apt-cache command line tool is used for searching apt software package cache. In simple words, this tool is used to search software packages, collects information of packages and also used to search for what available packages are ready for installation on Debian or Ubuntu based systems. >>   Click her

Sample Spring-Dispatcher-Servlet file example

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns = "http://www.springframework.org/schema/beans" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation = "http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd"> <!-- default HandlerMapping --> <!-- <bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/> --> <!-- Controller Mapping --> <!-- <bean name="/hello.html" class="com.shivla

Best Website List For Java Programming Exercises, Practice, Solution

1) All Topics including lots of programming exercise with it's code solution https://www.w3resource.com/java-exercises/ 2) Programming exercise with solution and discussion with developer https://www.hackerrank.com/domains/java/java-introduction 3) Interview Programs (beginner to advanced) in java http://www.javamadesoeasy.com/p/interview-programs-beginner-to-advanced.html 4) Best interview programming list with its solution http://javaconceptoftheday.com/java-interview-programs-with-solutions/

Java Tips Website List With Sample Source Code

1) All Java Tips >> https://www.javatips.net/ 2) Tips for swing based desktop app >>   https://tips4java.wordpress.com/about/ 3) Tips for Java fundamentals, collections, and I/O >>   http://1001javatips.com/ 4) Cool Tips for all java based framework >>   https://www.javatips.net/ 5) java.awt Package in details with all source code example >>   https://www.javaexamples.org/

How to Manage or Access Multiple MySQL server using one PhpMyAdmin ?

phpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL with the use of a web browser. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; or managing users and permissions. In this tutorial I will show you how to configure PhpMyAdmin to administrate various MySQL database servers. To install and run PhpMyAdmin we need to install LAMP stack or indivudual each component on the server. After complete installation we need to modify the PhpMyAdmin configuration file.  1) If installed LAMP Statck Navigate to below path. Assume you installed LAMP     in /opt directory.          cd  /opt/lampp/phpmyadmin/ 2) In not installed LAMP Stack then Navigate to below path.          cd  /etc/phpmyadmin/ 3) Open config.inc.php file using below command.         sudo nano config.inc.php 4) Search for the below content: // First server $i++

How do I uninstall MySQL completely from Ubuntu ?

Open a terminal (press Ctrl+Alt+T) and run the following command in sequence: sudo service mysql stop  #or mysqld sudo killall -9 mysql sudo killall -9 mysqld sudo apt-get remove --purge mysql-server mysql-client mysql-common sudo apt-get autoremove sudo apt-get autoclean sudo deluser mysql sudo rm -rf /var/lib/mysql sudo apt-get purge mysql-server-core-5.5 sudo apt-get purge mysql-client-core-5.5 sudo rm -rf /var/log/mysql sudo rm -rf /etc/mysql Remove PHP completelly from ubuntu To Remove PHP completely from Ubuntu run the following: sudo apt-get purge php.* 

Connect to EC2 instance using SSH and Ubuntu terminal

Assuming you have a Key Pair file .pem already created in EC2 management console, connect to your instance, in my case Ubuntu 12.04.2 LTS 64 with this command: $ ssh -i ec2.pem ubuntu@ec2-23-22-122-111.compute-1.amazonaws.com where ec2.pem should be name of your key file, this command works only if you are in the directory where .pem file is stored, otherwise use ssh -i /home/Downloads/your_key_name.pem ... ubuntu is the default user name used on EC2 instances with Ubuntu default AMIs. ec2-23-22-122-111.compute-1.amazonaws.com is Public DNS, you can find it in EC2 management console > Instances > Description. First time you will be asked to trust public key, replay by writing whole word "yes". The authenticity of host '23.22.122.111 (23.22.122.111)' can't be established. ECDSA key fingerprint is 55:1b:99:99:a4:9c:eb:94:fd:7b:4f:11:5b:bf:94:7d. Are you sure you want to continue connecting (yes/no)? yes   Hit Enter and then you will

What is Timer and TimerTask in Java

Introduction Timer in Java is a utility class which is used to schedule tasks for both one time and repeated execution. Timer is similar to alarm facility many people use in mobile phone. Just like you can have one time alarm or repeated alarm, You can use java.util.Timer to schedule one time task or repeated task. In fact we can implement a Reminder utility using Timer in Java and that's what we are going to see in this example of Timer in Java. Two classes java.util.Timer and java.util.TimerTask is used to schedule jobs in Java and forms Timer API. TimerTask is actual task which is executed by Timer. Similar to Thread in Java, TimerTask also implements Runnable interface and overrides run method to specify task details. This Java tutorial will also highlight difference between Timer and TimerTask class and explains how Timer works in Java. By the way difference between Timer and Thread is also a popular Java questions on fresher level interviews. What is Timer and TimerTa

How to Embedding a live RTSP stream video URL in a webpage

<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" width="400" height="300" id="vlc" events="True"> <param name="Src" value="rtsp://mpv.cdn3.bigCDN.com:554/bigCDN/_definst_/mp4:bigbuckbunnyiphone_400.mp4">   </param> <param name="ShowDisplay" value="True"></param> <param name="AutoLoop" value="no"></param> <param name="AutoPlay" value="yes"></param> <embed type="application/x-google-vlc-plugin" name="vlcfirefox" autoplay="true" showdisplay="True" loop="no" width="400" src="rtsp://mpv.cdn3.bigCDN.com:554/bigCDN/_definst_/mp4:bigbuckbunnyiphone_400.mp4" height="300"> </embed>

What is Port Forwarding ?

Port Forwarding Port forwarding or port mapping allows remote computers to connect to a specific computer or service on a private network. This allows you to run a web server, game server or a service of your choosing from behind a router. In a typical network the router has the public IP address and computers/servers obtain a private IP address from the router that is not addressable from outside the network. When you forward a specific port on your router, you are telling your router where to direct traffic for that port. This utility can verify the success of that process. Please refer to your routers manual or manufacturer for assistance in setting up port forwarding. Blocked Ports Most residential ISP's block ports to combat viruses and spam. The most commonly blocked ports are port 80 and port 25. Port 80 is the default port for http traffic. With blocked port 80 you will need to run your web server on a non-standard port. Port 25 is the default

How to fire AJAX Request on Regular Time Interval

There are many cases when require to update certain part of the web page on the regular basis. For example – showing live cricket or football score, display latest news feeds,etc. There are two ways to send AJAX request on specified time – By setInterval() and By setTimeout() JavaScript functions. Both do the same work but they are reliable for certain cases, which I discuss in this tutorial. 1.  Using setInterval() setInteval() It repeatedly calls the function on the given interval for stop you need to clear the interval using  clearInterval()  or close the window. Syntax – setInterval(function, milliseconds); Example Creating a function which calls the AJAX request and using this function in setInterval() and set Interval for 5 sec. Now the function executes on every 5 seconds and fetches new data from the server. function fetchdata(){  $.ajax({ url: 'fetch_details.php', type: 'post', success: function(response){ // Perform opera

Steps To Create Java Web Application With Tomcat Server With AWS Elastic Beanstalk

What is AWS Elastic Beanstalk AWS Elastic Beanstalk is an even easier way for you to quickly deploy and manage applications in the AWS cloud. You simply upload your application, and Elastic Beanstalk automatically handles the deployment details of capacity provisioning, load balancing, auto-scaling, and application health monitoring. At the same time, with Elastic Beanstalk, you retain full control over the AWS resources powering your application and can access the underlying resources at any time. >>   Click here to view steps

Reddit Voting System With Java, Jquery And Mysql

Reddit voting consists of up voting  and down voting. These votes decide rank of the post, which ultimately decides the position of the story link. Here in this article, we are going to see simple architecture and database structure to implement reddit voting system.  >>   Click here to view source code with sample database

Login With Social Site Using Java Working code.

Social login is a single sign-on (SSO) technology that allows users to authenticate themselves on various applications and sites by connecting through a social media site rather than typing a separate ID and password on each website. The sites most commonly associated with social login are Facebook, LinkedIn, Google and Twitter. When the user visits a site that offers social logins, they have the option to register, log in with their regular ID and password or through a widget or plug-in that connects the site to their choice of social platform. >>   Update Twitter Status Using Java >>   Login With Twitter Using Java >>   Login With GitHub Using Java >>   Login with Google using Java

Essential Sublime Text Plugins For All Developers

We need plugins to fully customize Sublime Text rather than config customizations and tweaks. I am currently using Sublime Text version three but going to give alternatives for version two, too. There are two different ways to install packages to Sublime Text. First, you can download package repository zip file from package's github page then extract folder to Sublime Text Packages folder. (For Windows: {{ User name }}\AppData\Roaming\Subllime Text {{ version }}\Packages\ ) Second which is easier way, you can install through Sublime Text official Package Control manager. Navigate to page by clicking the link and grab the code that belongs to which Sublime version you have. Then, go back to Sublime Text window and paste copied code to Sublime Text Console (ctrl+"). You need to restart Sublime Text after installation complete. And lastly, open commands window, (ctrl + shit + p) then type Package Control: Install Package to install a package. After you install a

How to setup tomcat 7 in Ubuntu 14.04 ?

Step 1 »  Install any latest JDK  before installing tomcat. Step 2 »  Download Any latest tomcat version from below URL.                   http://archive.apache.org/dist/tomcat/              Step 3 »  Extract the downloaded package Step 4 »  Go to bin directory of tomcat folder and run below command.                sh startup.sh Step 5 »  Now open http://serve-IP:8080 in your browser.

How to install Oracle 11gR2 on Ubuntu 14.04?

This article describes the installation of Oracle Database 11g Release 2 (R2=11.2) (64-bit) on Oracle Ubuntu (64-bit).  Step 1:  Download  Oracle Database Express Edition. Step 2: Instructions before install Oracle Copy the downloaded file and paste it in home directory. Unzip using the command: unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip Install required packages using the command: sudo apt-get install alien libaio1 unixodbc Enter into the Disk1 folder using command: cd Disk1/ Convert RPM package format to DEB package format (that is used by Ubuntu) using the command: sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm Create the required chkconfig script using the command: sudo pico /sbin/chkconfig The pico text editor is started and the commands are shown at the bottom of the screen. Now copy and paste the following into the file and save: #!/bin/bash # Oracle 11gR2 XE installer chkconfig hack for Ubuntu file=/etc/init.d/oracle-xe if [[ ! `tail -n