Links

Links

CcR's blog

How do add a checkbox to items in a JList?

import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.ListCellRenderer;
import javax.swing.ListSelectionModel;

public class CheckListExample
{
public static void main(String args[])
{
JFrame Jframe = new JFrame();
Jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

// Create a list containing CheckBoxItem's

JList jlist = new JList(new CheckBoxItem[] {

Persistence with Java SE an example

1. Create a Entity Class {Employee.java}

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity // Make Employee Class into an entity by annotate the class with @Entity.
public class Employee {
@Id private int id; //property that holds the persistent identity of the entity (the primary key).
private String name;
private long salary;
public Employee() {}
public Employee(int id) { this.id = id; }
public int getId() { return id; }
public void setId(int id) { this.id = id; }

Linux command Reference

Sphinx4 and Asterisk

This blog will provide you following informations ;
1. Step by step compilation and use of Sphinx4.
2. Description on how to use Sphinx4 with asterisk.
3. How to train Sphinx4 for your own Language.
4. How to Adapt acoustic model.
5. much more.......... Comming Soon...
<NOTE:Due to lack of time i am not able to give my time for documentation once i am done with documentation i will be uploading soon...>

Thanks for visiting...

MODULE ONE - Asterisk Installation

Get the source code from the Subversion repository:
http://svn.digium.com/svn/libpri/
http://svn.digium.com/svn/zaptel/
http://svn.digium.com/svn/asterisk/
http://svn.digium.com/svn/asterisk-addon/

The asterisk has to be compiled on the following order.
1) libpri and/or
2) zaptel
3) asterisk

Once everything is downloaded to the PC, to be more profession copy the tar.gz files to /usr/src and extract using command tar -zxvf .This will extract the files on the specified folder. According to the order specified above change directory and follow these steps

FOR LIBPRI

Asterisk History

Mark Spencer, the creator of Asterisk, has created numerous popular open-source tools including GAIM, the open-source AOL Instant Messaging client that is arguably the most popular IM client for Linux, l2tpd, the L2TP tunneling protocol daemon, and the Cheops Network User Interface, a network service manager. In 1999, Mark had a problem though. He wanted to buy a PBX for his company so they could have voice mail, call other offices without paying for the telephone call, and do all the other things one expects from a PBX system.

Firewall in Linux (IPTABLES)

cat > /etc/rc.firewall

#!/bin/sh

# Variables
FW="/sbin/iptables"
IF1="eth0"
IF1_IP=`/sbin/ifconfig ${IF1}|grep -w inet|awk -F: '{print $2}'|awk '{print $1}'`
IF1_MASK=`/sbin/ifconfig ${IF1}|grep -w inet|awk '{print $4}'|awk -F: '{print $2}'`
IF1_NET="${IF1_IP}/${IF1_MASK}"

# Temporarily Change the Default Policy to Accept
${FW} -P INPUT ACCEPT
${FW} -P OUTPUT ACCEPT
${FW} -P FORWARD ACCEPT

# Flush and Delete Chains
${FW} -X
${FW} -F
${FW} -F -t nat
${FW} -F -t mangle

# Allow packets in/out from Loopback Device
${FW} -A INPUT -i lo -j ACCEPT

Marcos in Asterisk

Macros are a very useful construct designed to avoid repetition in the dialplan. They also help in making changes to the dialplan. To illustrate this point, let’s look at this sample dialplan.

exten => 101,1,Dial(${ABC},10)
exten => 101,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy:unavail)
exten => 101,n(unavail),Voicemail(101@default,u)
exten => 101,n,Hangup()
exten => 101,n(busy),VoiceMail(101@default,b)
exten => 101,n,Hangup()

JIAXClient using IAXclient Java version of IAXclient

About
JIAXClient is a library for IAX (Inter Asterisk eXchange) clients written in Java by Mikael Magnusson. It is based on IAXClient, and uses a JNI library for interfacing with Java.

License
Most of the sources are GPL licensed, but the native library and some support classes are LGPL licensed.

Runtime requirements

* Java runtime environment (JRE 1.4.2 and 1.5.0 tested)
* Browser supporting Java applets (Mozilla 1.7, FireFox 1.5, Internet Explorer, and Konqueror (KDE 3.5.6) tested)

Build requirements

DUNDi, In easy steps

Command Description
apropos whatis Show commands pertinent to string.
man -t man | ps2pdf - > man.pdf make a pdf of a manual page