Thursday, April 26, 2007

"mono --version" and "mcs --version" return the version of the Mono distribution.

Mono C# compiling can be done for following following runtimes
  • mcs: compiler to target 1.1 runtime.
  • gmcs: compiler to target the 2.0 runtime.
To create a dynamic library using the gmcs just use the following command.

"gmcs -t:library -out:sss.dll -recurse:Com.test.foo.SSL\*.cs"

To execute the compiled exes use the following command.
"mono foo.exe "

To compile with gtk# for UIs use the following command.
mcs -pkg:gtk-sharp-2.0 -recurse:Com.test.foo.SSL\*.cs

Tuesday, April 24, 2007

Instructions on how to run XWiki on JBoss

JBoss installation

These instructions are for the JBoss Application Server 4.0.X and MySQL ; other versions may differ.

* Download and install JBoss Application Server . It's usually as simple as unzipping it in a directory. Let's call this directory [JBOSS_HOME].
* (optional) If you want to modify the port on which JBoss is running, edit [JBOSS_HOME]/server/default/deploy/bossweb-tomcat55.sar/server.xml. Search for "8080" and replace with the port value you wish to use. Change the [JBOSS_HOME]/server/default/deploy/http-invoker.sar/META-INF/jboss-service.xml using the same way to the port you like.

Configure JBoss

* If your datasource is a MySQL database then copy the file called "mysql-xa-ds.xml" in to the "[JBOSS_HOME]/server/default/deploy" directory.
* Put the relevant mysql java connector jar file to the "[JBOSS_HOME]/server/default/lib".


Install XWiki application

* Add a jboss-web.xml to the "WEB-INF" directory in the XWiki WAR.
* Copy the XWiki WAR into a directory named xwiki/ in [JBOSS_HOME]/server/default/deploy.

Thursday, April 19, 2007

Apache Http to Https

I wanted to redirect all the http requests coming to Apache web server to https requests. I found a simple solution to do that. This method may not be the ideal way for that but it worked for me.

first make sure that /etc/httpd/conf/httpd.conf contains the following line

LoadModule rewrite_module modules/mod_rewrite.so

Then add following lines to httpd.conf
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*)$ https://www.foo.com/$1 [L,R]

finally restart the apache using
service httpd restart

last but not least test it using http://www.your.domain.com/
then you will see https://www.your.domain.com/

hope this method works for all...............


Monday, March 26, 2007

SOC 2007

Hi all,


I’m an undergraduate in the Department of computer science and engineering at University of Moratuwa, Sri- Lanka. Currently I’m in the third year. Recently I underwent training at an organization called Integrated Systems International at Sri-Lanka. I was exposed to industrial work there for a 6 month period of time. I like to do programming in Java.

I personally believe that effective documentation and source sharing and subversioning is very important for software development. So I personally experienced the role that XWIKI can play in the software development. When I sow XWIKI on SOC 2007 I decided that I can do something from here. Earlier I thought of doing the Subversion Integration project. But that idea changed immediately after I found the IDE Editor Integration project. I like Eclipse and XWIKI. I want Eclipse to like XWIKI. So I decided to apply for the IDE Editor Integration project.

For more details contact me for by replying to this or sending me a mail to djtharindu@gmail.com.

Best Regards,
Tharindu Jayasuirya.



Thursday, June 29, 2006

Data base connection

public Connection databaseConnection = null;
public Statement statement = null;
public ResultSet ipdata=null;

public void createConnection(){
try {

Class.forName("com.mysql.jdbc.Driver");
//String sourceURL = new String("jdbc:mysql://127.0.0.1/test");
//databaseConnection = DriverManager.getConnection(sourceURL,"root","root123");
String sourceURL = new String("jdbc:mysql://127.0.0.1/"+database);
databaseConnection = DriverManager.getConnection(sourceURL,user,passwd);

} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}

}

public void getData(){
try {
statement = databaseConnection.createStatement();
ipdata = statement.executeQuery("SELECT * FROM "+table);

int i=0;
while(ipdata.next()) {
System.out.println(i++);
System.out.println(ipdata.getString("request_ip"));
System.out.println(ipdata.getString("request_object_url"));
}
} catch (SQLException e) {
e.printStackTrace();
}
}

Saturday, June 17, 2006

Turing test

Turing test is used to identify the machines who have intelligence. Artificial Intelligence in the sense it is not artificial, as we refer to machines which are artificial we use the term artificial. Are there any problems and revisions to turing test.

Http request

Http requests send by different browsers have different order for the format of the Http requests . I think I'm correct in that case. If I'm wrong any one can correct me. Currently I am writing a webserver using java. So I have to analayse the http requests. The order of "Referer" "Browser type" varies according to the browser used to request. So I have to do lot of pattern matching. I hate this type of String manupilation to the power of infinity ....................

17/06/2006
Tharindu

Thursday, February 09, 2006

Hi

Hi all,
Future world will be more dangerous for Humans. So we need to understand the destruction caused by a human to another human and try to correct our mistakes
09/02/05
Tharindu