Mar
13
2013

Ant | How To Create Executable Jar ?

In this article I am going to describe about how to create executable jar file using ant file. For this I am using a java project with an ant file. In my previous post I have detailed how to create ant hello world ant project. I will use the same project here as well. To [...]

Mar
13
2013

Ant | Hello World Ant Project

Apache Ant is an open source, cross-platform based build tool that is used to describe a build  process and its dependencies and implemented in XML scripts using Java classes that ensures its extensible to any development environment (based on Java) and its  integrity with other build tools. This article is about how to start with ant tool. [...]

Mar
8
2013

How To Open New Tab For HTML Hyperlink ?

HTML Hyperlink In HTML, hyperlink can be used by using <a> tag. Hyperlink is a group of word which can be clicked and get executed by opening clicked link. Syntax of HTML hyperlink is as below:  1<a href="http://www.coffeewithcode.com/">Visit coffeewithcode</a> Here ‘Visit coffeewithcode’ text can be clicked together and for this clickable text destination is http://www.coffeewithcode.com [...]

Sep
30
2012

How to install Oracle libraries for PHP5 on Ubuntu Server

An easy way to Connect Apache server (PHP) with Oracle database. Execute following command in terminal to complete installation of oracle OCI8 extension in php.ini. 1) Get Oracle repository from this link.      http://oss.oracle.com/debian unstable main non-free 2) Make sure to add the proper GPG key for the repository.       sudo wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- [...]

Jul
19
2012

Php code for twitter interaction

Let’s take a look how php code interacts with twitter. 1.) How to get number of  twitter followers.  PHP |  copy code |? 1fnction get_followers($twitter_id){2 $xml=file_get_contents(’http://twitter.com/users/show.xml?screen_name=’.$twitter_id);3 if (preg_match(’/followers_count>(.*)</’,$xml,$match)!=0) {4 $tw[’count’] = $match[1];5 }6 7 return $tw[’count’];8} Now call this function with this code  PHP |  copy code |? 1$followers = get_followers(‘vimalm4u’);2echo “You have”.$followers.”followers!”; 2.) Get number of retweets for a specific page.        Function will get [...]

Jun
29
2012

How To Call A Java Script From Java Code?

This post is to describe how to call a java script from java code. Below is  java file.In which there is a main method.In this main method a script engine instance is taken.This script engine is already with jdk.For this one need not to add any other jar file. 01import java.io.FileNotFoundException;02import java.io.FileReader;03 04import javax.script.ScriptEngine;05import javax.script.ScriptEngineManager;06import javax.script.ScriptException;07 08public class [...]

Jun
18
2012

Hibernate Hello World Example With Annotation

This article is about hibernate practical example. Below is an example of hibernate with my sql using hibernate annotations. Here is the Student bean class with id and name properties with annotations.  01package beans;02 03import javax.persistence.Column;04import javax.persistence.Entity;05import javax.persistence.GeneratedValue;06import javax.persistence.Id;07import javax.persistence.Table;08 09@Entity10@Table(name="student_master")11public class Student {12 13 @Id14 @GeneratedValue15 @Column(name="stud_id")16 private long id;17 18 @Column(name="name")19 private String name;20 21 /**22  * getters and setters23  [...]

Pages:12345678»