Skip to main content

Posts

Showing posts with the label Java

Display Assamese Unicode character in a Java program

To display Assamese Unicode character in Java program follow the following steps- 1. check your JRE Home 2. change directory to C:\Program Files\Java\jdk1.6.0_10\jre\lib (according to default java directory) generally within each installed JDK version there is a JRE directory. Go to that directory. another JRE directory is generally in C:\Program Files\JRE.. no need to modify this directory 3. wherever the JRE, go to that, which one is within JDK 4. there you find the following files ../JRE/lib/fontconfig.OS.Version.properties ../JRE/lib/fontconfig.OS.Version.bfc ../JRE/lib/fontconfig.OS.properties ../JRE/lib/fontconfig.OS.bfc ../JRE/lib/fontconfig.Version.properties ../JRE/lib/fontconfig.Version.bfc ../JRE/lib/fontconfig.properties ../JRE/lib/fontconfig.bfc There may be some less number of file, no problem, 3 will get minimum 3 files among the above listed files with extension .src 5. copy fontconfig.properties.src and past it in the same directory 6. rename

DBSCAN implementation

Java implementation of DBSCAN ( Density-Based Spatial Clustering Applications with Noise ) algorithm. //dbscan.java import OBJECT.*; import java.io.*; /************************************************************************ * dbscan CLASS: ************************************************************************/ public class dbscan extends obj { public obj list[][]; public obj db[]; public int k; public int a[]; public int c; public int mpn; public double eps; public String filename; public dbscan()throws IOException { db=new obj[5000]; int j=0,x=0,r=0; double d; eps=3.0; mpn=4; expand_cluster(); display(); } /************************************************************************ * DISPLAY THE CLASSIFIED LOCAL OBJECTS ************************************************************************/ public void expand_cluster()throws IOException { InputStreamReader isr=new InputStreamReader(System.in); BufferedRead