|
|
sameer_havakajoka
Introduction
This component is suitable to convert a well-formed html with/without inline CSS to a PDF file.
HTML to PDF Converter is a tool to convert HTML to PDF.
HTML to PDF Converter accurately transforms well-formed HTML with or without inline cascading style sheets into PDF...
|
|
1 |
34 |
|
|
sameer_havakajoka
Introduction
This Code snippet is used to capture Screenshot automatically and save it.
The below code performs the function of taking screenshots automatically making use of the class java.awt.Robot .The package java.awt contains all of the classes for creating user interfaces and for...
|
|
0 |
37 |
|
|
sameer_havakajoka
Introduction
The solution is mainly used in Error website wherein you have to generate reports which gives the number of solutions uploaded in a specific period(Reports by calendar) or the number of solutions posted by particular employee (reports by employee id).
Background
My...
|
|
1 |
53 |
|
 |
pradeep
Java's networking classes enable you to implement applications that communicate across a network/remote connection, but the platform also extends into the realm of the Internet and URLs. Java's URL class makes accessing Web resources as easy as accessing a local file. Let's take a look at how you...
|
|
11 |
14,223 |
|
 |
pradeep
Multi-dimensional arrays
Java, as with most languages, supports multi-dimensional arrays - 1-dimensional, 2-dimensional, 3-dimensional, ... This discusses 2-dimensional arrays, but the same principles apply to higher dimensions.
2-dimensional arrays
2-dimensional arrays are usually...
|
|
17 |
100,647 |
|
|
naimish
Introduction
How to split a file in to equal parts without knowing the number of records in the input file?
Background
Suppose you don't know how many records are in a dataset, but you want to divide the records as equal as possible among the output datasets. We can split a file into...
|
|
1 |
1,173 |
|
|
naimish
Google pagination used to find initial and final index for the search done using google3 for website application.
GoogleAppSearch.java
import net.sf.gsaapi.GSAClient;
import net.sf.gsaapi.GSAQuery;
import net.sf.gsaapi.GSAResponse;
import net.sf.gsaapi.GSAQuery.GSAQueryTerm;
import...
|
|
7 |
932 |
|
|
Sanskruti
Compiler Problems
1. 'javac' is not recognized as an internal or external command, operable program or batch file
If you receive this error, it means that Windows is not able to find the compiler (javac). Here's one way to tell Windows where to find javac. Set the PATH as follows on...
|
|
2 |
5,102 |
|
|
pradeep
The Decimal Format class is not very well documented, so I will try and exmplain it with an example.
Firstly, you need to import the DecimalFormat class:
import java.text.DecimalFormat; Create an instance the format object. This object can be used with doubles, as it uses a decimal. It uses a...
|
04-30-2009 02:37 PM
by kiddo
|
1 |
2,444 |
|
 |
pradeep
A thread, by definition is a light weight process. They are used to increase functionality and performance by performing multiple tasks at the same time, i.e. concurrently. There are two methods for implementing threads in Java,
Implementing an interface
Extending a class
I'd assume that...
|
|
7 |
5,599 |
|
|
Sanskruti
JSTL is a collection of tags similar to HTML that lets you produce dynamic web pages without needing to learn Java.
Why JSTL?
JavaServer Pages (JSP) technology makes it easy to embed bits of Java code (or scriptlets) in HTML documents. This solution, however, may not be suitable for all HTML...
|
|
2 |
3,835 |
|
|
Sanskruti
Comparing Strings
To compare strings function equals() is used.
String str1 = "XYZ";
String str2 = "xyz";
boolean result = str1.equals(str2);
boolean result2 = str1.equalsIgnoreCase(str2);Output
|
|
6 |
4,645 |
|
|
Debadatta Mishra
Introduction
Have you ever searched for files and folders in Windows operating system? Generally most of the users try to search various .doc files, .pdf files etc. We generally search by giving *.doc or *.pdf in the text box of the search window of the windows OS. Of course windows OS provides...
|
|
5 |
5,322 |
|
|
Sanskruti
Introduction
The 'main()' method in Java is referred to the thread that is running, whenever a Java program runs. It calls the main thread because it is the first thread that starts running when a program begins. Other threads can be spawned from this main thread. The main thread must be the...
|
|
4 |
8,976 |
|
|
Sanskruti
This article demonstrates how to write a simple Stateful Session Bean. It consists of three POJO's: Remote interface Cart.java, Bean class CartBean.java and EJB client CartClient.java.
Prerequisites
In order to complete the example application, you should be familiar with the following:
*...
|
|
4 |
15,034 |
|
|
Systemerror
This is a basic digital clock in Java that works off your operating system time, it works in a multithreaded environment and have coded it to put my own background in.
import java.awt.*;
import javax.swing.*;
import java.util.*;
class Clock extends JFrame implements Runnable
{
...
|
|
5 |
4,355 |
|
|
Systemerror
I often hear people asking on how to put an image on Java applications, thus here is an example of a painted panel that has an image in the same directory as the application *note* you cant use windows bmp with Java, but once you start creating your own images it's a good time to note that their...
|
|
11 |
5,849 |
|
|
Sanskruti
There are four types of JSP tags, which are important and often required.
1. Directives
These types of tags are used primarily to import packages. Altenatively you can also use these tags to define error handling pages and for session information of JSP page.
<%@page language="java" %>
...
|
|
2 |
3,083 |
|
 |
pradeep
Objects in Java are referred using reference types, and there is no direct way to copy the contents of an object into a new object.
The assignment of one reference to another merely creates another reference to the same object. Therefore, a special clone() method exists for all reference...
|
|
1 |
32,746 |
|
 |
pradeep
Using Regular Expressions in Java
JDK versions 1.4.0 and later have comprehensive support for regular expressions through the standard java.util.regex package. Because Java lacked a regex package for so long, there are also many 3rd party regex packages available for Java. I will only discuss...
|
|
13 |
12,274 |