Posts

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...

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...

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> ...