Tuesday, March 31, 2009

Need a quick and cheap website design ?

This is a site that gives lot's of nice designs (html and CSS ) for free

Please don't forget to check the license for the design: most of them are under

You are free to copy, distribute, display, and perform the work, to make derivative works and to make commercial use of the work under the following conditions:

You must attribute the work in the manner specified by the author or licensor. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder.

Public domain

You are free to copy, distribute, display, and perform the work, to make derivative works and to make commercial use of the work.

Or GNU GPL

Monday, March 30, 2009

Eclipse .classpath file relative paths

Hello All.

One of the most annoying aspects of eclipse is the fact that you have to add jar files to your project if you want to use external libraries.
Further more the configuration of these jar file is by default only using absolute paths, so when you try to move the project from one machine to another you need to delete pointers to old jars and add the new jar locations.

We solved this problem by:
1. putting all the project external jar files in a single library called lib in the project top level folder (trunk).
2. Setup an eclipse classpath varible (see this link http://www.informit.com/articles/article.aspx?p=367962 and look for figure 6-5

In addition I added the .classpath file to the svn. We can now all use this file without modifications.

Sunday, March 29, 2009

From my security consulting days

It seems that I'm getting rusty and forgetting the system structure of the mycrosoft database, however, my lazyness as my fame keeps me going

This afretnoon, after the database has been changed once again due to the customers requirements (why oh why !?) and your servant had to update the webservice for supplying what the custommer wanted (remember the webcomic right?) ...

So here I sit and checking the the table that had to update .. it seems that it is [tblByyyyReeee] that has a new collumn but grrr : the CopyPaste does not work here . Romi offers clicking on the table's name in the Object Explorer , but hey , there is a nice way to that

Scratching my old security consulting days memories back there in Comsec here is

select *
from syscolumns
where id in(
select id
from sysobjects
where name = 'tblByyyyReeee'
)

P.S. this is how you steal the database using the simple SQL Injection Vulnerability

Wednesday, March 18, 2009

Sun plans to make the cloud cumputing service avalible

http://www.sun.com/solutions/cloudcomputing/index.jsp

At Sun, we envision a world of many clouds, both public and private, that are open and compatible. With our open cloud initiative, we plan to offer an extensive portfolio of products and services and to foster open communities and partner ecosystems, to make this vision a reality. It all starts with the delivery of the Sun Cloud, a public compute and storage cloud, which is due out later this year. they say 

We will wait and see. Wish them a lot of luck

JavaScript Ad Rotation

We just tried to implement a small mini ad rotation for a demo. There so many examples for doing it on client side using JavaScript, but so many are just not working. Therefore, please find attached how to implement it in 3 steps:

1. Place the following code is jsRotate.js
function init() { // Specify the image files window.Pic = new Array(); window.Pic[0] = './images/ulogo0.jpg'; window.Pic[1] = './images/ulogo1.jpg'; window.Pic[2] = './images/ulogo2.jpg'; window.Pic[3] = './images/ulogo3.jpg'; window.Pic[4] = './images/ulogo4.jpg'; // Set slideShowSpeed (milliseconds) window.slideShowSpeed = 3000; // Duration of crossfade (seconds) var crossFadeDuration = 3; // No need to edit var t; window.j = 0; window.p = window.Pic.length; } function runSlideShow(){ if (document.all){ document.images.SlideShow.style.filter="blendTrans(duration=2)"; document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"; document.images.SlideShow.filters.blendTrans.Apply(); } document.images.SlideShow.src = window.Pic[j];//./images/ulogo3.jpg';//; if (document.all) { document.images.SlideShow.filters.blendTrans.Play(); } window.j = window.j + 1; if (window.j > (window.Pic.length-1)) { window.j = 0; } t = setTimeout('runSlideShow()', window.slideShowSpeed); }

2. Add a reference to js file inside the head tag using the script tag:
...script language="javascript" src="./scripts/jsRotate.js"...

3. Place the following code just before the /body tag (ya, where you can find the Google Analytics code...)

script language="JavaScript" type="text/javascript"... init(); runSlideShow(); ...script...

It's so simple as 1,2,3...

Setup PHP Dev. environmnet with IIS 7

Hello All.

Here is what need to be done to setup php with eclipse IDE and run things with IIS
1. Download php latest version and install it in a pah without blanks http://www.php.net/downloads.php make sure that you select the IIS ISAPI deployment method when promted in the installation
2. Setup the PHPRC environment variable to point to your installation
3. Make sure that the PHP executables are added to your PATH
4. update the php.ini in your php dir to allow short open tag (set short_open_tag = On)
5.follow the instructions in http://brh.numbera.com/blog/index.php/2008/03/09/setting-up-iis7-with-bonus-php-instructions/

Have fun

How to setup Java Dev. Environmernt (Java, Eclipse, Tomcat)

Hello All.

You basically need two things:
1. The Java JDK that can be downloaded from http://java.sun.com/javase/downloads/index.jsp
2. Install JDK on your machine (in a path without blanks!!!).
3. Setup the environment var JAVA_HOME to point to your new installation.
3. download eclipse (choose the Eclipse IDE for Java EE Developers (163 MB)) package and unzip it in some folder http://www.eclipse.org/downloads/
4. download tomcat from the apache site http://tomcat.apache.org/download-60.cgi
5. Follow the instructions here to setup your env http://www.ibm.com/developerworks/opensource/library/os-eclipse-tomcat/index.html

Enjoy