Category Archive For "program"
How to add Responsive google Map in Webpage
In the video I have shown how you can integrate a responsive google map in web page. Source code. <style> .google-maps { position: relative; padding-bottom: 75%; // This is the aspect ratio height: 0; overflow: hidden; } .google-maps iframe { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; } </style> <div …
How to generate QR code with Image using JAVA
In this video I have shown how you can create a QR Code with logo in side the QR. We are using 2 jar files which should be added in ClassPath to create the QR file. The jars are, 1 . javase-2.2.jar 2 . zxing-core-2.0.jar QR_Generate.java package com.chillyfacts.com; import java.awt.AlphaComposite; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import …
Get GEO Location Coordinates of User
In this video I have shown how you can get the GEO Location Coordinates of the user using simple java script code. <!DOCTYPE html> <html> <body onload=”getLocation()”> <p>Your Location Details are Shown Below.</p> <p id=”demo”></p> <script> var x = document.getElementById(“demo”); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { x.innerHTML = “Geolocation is not …
JAVA JSP file upload example source code
In this video I have shown how you can create a JSP file upload. This project is shown in Eclipse IDE. 1. Project Structure 2. The jar file used in the project are, 1.org.apache.commons.io.jar 2.commons-fileupload-1.3.1.jar 3. The servlet will upload the image to d:\uploaded_files folder FileUploadHandler.java package com.chilyfacts.com; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import …
Java Simple Hello World Program in Eclipse
Hello World program in Eclipse Example. Follow the below steps, Go to File > New > Java project Project Structure HelloWorld.java package com.chillyfacts.com; public class HelloWorld { public static void main(String[] args){ System.out.print(“Hello World!!”); } } Out put in console Hello World!! Download the project here, HelloWorld.rar
How to Create PDF dynamically with Images using JAVA
In this video tutorial I have shown how you can generate PDF using JAVA. This project need the jar itextpdf-5.1.0 jar to be added in Class path Project Structure Code to create simple PDF File Create_PDF.java package com.chillyfacts.com; import java.io.File; import java.io.FileOutputStream; import com.itextpdf.text.*; import com.itextpdf.text.pdf.PdfWriter; public class Create_PDF { public static void main(String[] args) …
How to run a task periodically in Java without any Java IDE
In this video I have explained solution for your following queries, 1. How can you run a java program without any JAVA Editor. 2. Schedule any task with your java program. 3. What is the use of Runnable Jar File. 4. How can you create Runnable Jar File. The below code with create notepad file …
Convert Java Object into JSON and JSON into Java Object | Jackson API
In this video I have shown how to parse JSON Object to a JAVA Object using JACKSON API. Project Structure, In this project we use 2 jars, 1. com.fasterxml.jackson.core.jar 2. com.fasterxml.jackson.databind.jar Add these jars to build path of Project For testing we have registered with website http://api.ipinfodb.com. After registering we will get the API Key.This …
How to Create custom Facebook Share Button
In this video I have shown how to create a custom designed facebook share button. As shown in the video we need to create an app in the facebook developer site and get the facebook APP ID. You can create any number of share buttons just with one APP ID. No need to create APP …
Generate Barcodes Dynamically Using JAVA
In this video I have shown how to create Barcodes in Image and PDF dynamically using JAVA. Project Structure In this project 3 jars are used, 1. barcode4j.jar 2. itextpdf-5.1.0.jar 3. Mysql connector jar Barcode_Image.java package BARCODE; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.FileOutputStream; import org.krysalis.barcode4j.impl.code128.Code128Bean; import org.krysalis.barcode4j.output.bitmap.BitmapCanvasProvider; public class Barcode_Image { public static void main(String[] …