Tuesday, November 11, 2008
Tuesday, October 28, 2008
How do I set my java classpath?
How do I set my java classpath?
Problem
Linux uses Red Hats java package instead of the Sun jdk.
Reason
The java interpreter from the standard Red Hat installation is placed in /usr/bin, which is in the path where Linux search for executables. This will be used be default if you don't specify otherwise.
To find the java classes, you also have to set the java classpath to point to the java kit you want to use.
Solution
Set your PATH and CLASSPATH environment variables to reflect which java kit you want to use.
In the ITU Linux machines in 2003, the following java kits are installed: jdk1.3.1 and j2sdk1.4.1. They are placed in /usr/java.
To use jdk1.3.1, add the following lines to the file ".bashrc" in your home directory:
export PATH=/usr/java/jdk1.3.1/bin:$PATH
export JAVA_HOME="/usr/java/jdk1.3.1"
export CLASSPATH=.:/usr/java/jdk1.3.1
If you want to use the j2sdk1.4.1, replace jdk1.3.1 with j2sdk1.4.1 and it should work.
netstat
netstat
Displays generic net statistics of the host you are currently connected to.
netstat -an
Shows all connections to the server including the source and destination ips and ports if you have proper permissions.
netstat -rn
Displays routing table for all ips bound to the server.
netstat -an |grep :80 |wc -l
Display the amount of active connections on port 80. Removing the pipe and wc command would display each connection.
netstat -natp
Display active Internet connections. See document CH001079 for an example of output.
Monday, March 31, 2008
Google Summer of Code 2008
Process Control Project
Project Background
==================
The eXist is an Open Source native XML database, which is provides a powerful environment for the development of databases and web applications based on XQuery and related standards. The eXist supports many popular XML query languages such as XQuery, XPath, and XSLT.
The problem is how to configure the database parameter at runtime. Some of those parameters can be changed while the database is running, others will require the db to be stopped and restarted.
The goal of the project would be to provide a common interface to dynamically configure the database parameter at runtime. We must need to use Programmatic Configuration like as via Java Management Extensions (JMX).
Currently eXist provides some interfaces via Java Management Extensions (JMX),which are only exports a limited set of read-only services. In this project, I’ll hope to create a common interface to dynamically configure of the database instance at runtime, which is providing write access to configuration properties. Also it will be able to view all running queries or jobs, and modify their access permissions for specific users.
Deliverables: The eXist configured via JMX
1. The whole configuration setting access via JMX, which is ability to change at run time.
- Db-connection setting (database, files, cache Size)
- Pool setting
- Recovery setting (sync-on-commit, group-commit)
- Watchdog setting (query-timeout)
- Default-permissions setting
- Number of transactional connections and non-transactional connections
You can find the complete doc of my GSOC 2008 proposal here.
Tuesday, February 19, 2008
ISO/IEC 16022
Bar code symbology specifications
Anyone want learn or interesting about the Data Matrix(SEMACODE) , please you follow this ISO/IEC 16022 standard. That's document include efficient algorithm for encode the data matrix and Reed-Solomon error correction. So anybody want content of the ISO/IEC 16022 standard, I would like to give help to you.
Saturday, February 2, 2008
Access the Win32 API in .NET
- using System.Runtime.InteropServices;
- [DllImport("User32.dll")]
This statement will import the user32.dll in your program after that you can make use of its function in your program.
public static extern Int32 FindWindow(String lpClassName,String lpWindowName);
Before using any external function in .NET you have to declare that function in your program. In above statement we are trying to use FindWindow function of User32.dll.While declaring such a function we prefix extern keyword with that, which indicate that the declared function is an external function.
eg: FindWindow, EnumChildWindows, EnumWindows, ..etc
This is example, I have done sample Console application in .NET. Here you can see message box with "Hello World!".Windows functions used to control the appearance and behavior of every Windows element like as massage box.
using System;
using System.Runtime.InteropServices;
namespace ConsoleApplication1
{
class Program
{
// Use DllImport to import the Win32 MessageBox function.
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern int MessageBox(IntPtr hWnd, String text, String caption, uint type);
static void Main()
{
// Call the MessageBox function using platform invoke.
MessageBox(new IntPtr(0), "Hello World!", "Hello Dialog", 0);
}
}
}
Friday, February 1, 2008
Application of Reed–Solomon error correction
Reed-Solomon codes are block-based error correcting codes with a wide range of applications in digital communications and storage. Reed-Solomon codes are used for many application.
- Storage devices
- 2-D bar code
- Wireless or mobile communications (including cellular telephones, microwave links, etc)
- Satellite communications
- Digital television / DVB
- ADSL, xDSL
This means that the encoder takes k data symbols of s bits each and adds parity symbols to make an n symbol codeword. There are n-k parity symbols of s bits each. A Reed-Solomon decoder can correct up to t symbols that contain errors in a codeword.