Archive

Archive for the ‘OpenSource’ Category

Sample ruby program

January 28th, 2009 No comments
1
2
3
puts "What is your name????"
myname = gets.chomp
puts "Your name is #{myname }!"

Let us save this code in a text file first. Preferred extension is .rb but no issues even if no extension provided.

Now on command prompt use this command to execute.

ruby test.rb

This should ask you your name and display your name again if ruby-on-rails installed. It will be something like this:

D:\testruby>ruby test.rg
What is your name????
praveen
Your name is praveen!
 
D:\testruby>
VN:F [1.9.18_1163]
Rating: 0.0/5 (0 votes cast)
Categories: OpenSource

Microsoft SQL Server JDBC Driver 2.0 CTP

January 27th, 2009 No comments

Download the SQL Server JDBC Driver 2.0 CTP, a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available in Java Platform, Enterprise Edition 5.

The Microsoft SQL Server 2005 JDBC Driver is a Java Database Connectivity (JDBC) 3.0 compliant driver that provides robust data access to Microsoft SQL Server 2000 and SQL Server 2005 databases. The JDBC driver can access many of the new features of SQL Server 2005, including database mirroring; the xml, user-defined, and large-value data types; and it supports the new snapshot isolation cursor type. In addition, the JDBC driver also supports the use of integrated authentication with both SQL Server 2000 and SQL Server 2005.

Read more about JDBC Driver here.

VN:F [1.9.18_1163]
Rating: 0.0/5 (0 votes cast)
Categories: General, Java, OpenSource, SQL

Connect to Microsoft SQL Server from Java

February 20th, 2008 No comments

Here is the way you can connect to your Microsoft SQL Server 2005 from your java application via JDBC.

First you need to download the Microsoft SQL Server 2005 JDBC Driver.
You will get sqljdbc.jar which is all you needed. As a java programmer, you know how to use this, right? ;)

You will get a user manual along with this download. Follow the instructions. Or here is a sample code for your quick reference:

1
2
3
4
5
6
7
8
9
10
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection conn = DriverManager.getConnection("jdbc:sqlserver://servernameSQLEXPRESSinstance;database=yourdatabase;user=your username");
Statement stmt = conn.createStatement();
 
String qry = "SELECT * FROM yourtable";
ResultSet rs = stmt.executeQuery(qry);
 
while (rs.next()) {
    // code;
}
VN:F [1.9.18_1163]
Rating: 4.7/5 (6 votes cast)
Categories: Java, OpenSource, SQL

My first JSP program

October 10th, 2006 No comments

I installed Apache Tomcat and put a file with the following code in its root foler


< %
int a = 10;
int b = 10;
int c = a + b;

out.println("Sum = " + c);

%>

Got result “Sum = 20 ” without any error :-D

So my FIRST JSP PROGRAM worked fine!!!

VN:F [1.9.18_1163]
Rating: 0.0/5 (0 votes cast)
Categories: OpenSource

Hello World – Python application for Windows with Tk.

July 31st, 2006 No comments


from Tkinter import *
root = Tk()
w=Button(root,text="Pooooooi!")
w.pack()
root.mainloop()

VN:F [1.9.18_1163]
Rating: 0.0/5 (0 votes cast)
Categories: General, OpenSource

OpenSource and DOTNET???

July 7th, 2006 No comments

Yes… Here is some Open Source Content Management Systems (CMS) in C#

ndCMS

DocLib
Go.Kryo
Amplefile
nkCMS
Rainbow
Kodai CMS
umbraco
Cuyahoga
mojoPortal

VN:F [1.9.18_1163]
Rating: 0.0/5 (0 votes cast)
Categories: DOTNET, OpenSource