| Subcribe via RSS

SQL Server : Comparing date without time

June 27th, 2008 | No Comments | Posted in Database, SQL Server

I’m facing such problem which is comparing date with full datetime field. So, the problem is when I want to compare full datetime field that contains time. It will return 0 row, because sql server will also compare time too. No matter you have the exact same date, but you have the different time. This is the solution, just convert full datetime file to only date.

SQL
select cast(floor(cast([datetime field] as float)) as datetime) from [your table]

Subversion : subversion on ubuntu

June 18th, 2008 | No Comments | Posted in Subversion, Ubuntu

So, I have just created my googlecode project. And I have to deal with subversion which is quite new for me. Anyway, basically, this topic I will present how to create your own repository in ubuntu. I recommended this book which is very good for anyone who is new to subversion.

Note : I am using ubuntu 8.04. This version is different from the others that it uses htpasswd instead of htpasswd2.

Step 1, install subversion

COMMAND
$ sudo apt-get install subversion

Step 2, install Apache2. I’m using this server to use WEBDAV and because it’s a very extensible web server.

COMMAND
$ sudo apt-get install apache2 libapache2-svn

Step 3, make your own repository locally

COMMAND
$ sudo mkdir -p /var/local/svn <– This is your repository
$ sudo svnadmin create –fs-type fsfs /var/local/svn <– Bind it to subversion
$ sudo chown -R www-data:www-data /var/local/svn <– Change permission

Step 4, Set configuration for apache2 subversion module. This step, you have to re-configure your apache. It’s a xml-like config file.

COMMAND
sudo gedit /etc/apache2/mods-enabled/dav_svn.conf

Modified the file to look like this. Everything you need to know about this file is in the file itself. Just for one thing. If you plan to use multiple repositories use SVNParentPath. But If you have only one repository use SVNPath instead

/etc/apache2/mods-enabled/dav_svn.conf
<Location /svn>
DAV svn
SVNParentPath /var/local/svn
</Location>

Step 5, You have two choices. One is Basic authentication, and SSL access.
In this topic I use Basic authentication. So, modified the same file dav_svn.conf

/etc/apache2/mods-enabled/dav_svn.conf
<Location /svn>
DAV svn
SVNParentPath /var/local/svn
AuthType Basic <– for basic authentication
AuthName “Subversion Repository” <– name
AuthUserFile /etc/apache2/dav_svn.passwd <– password file
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>

Step 6, Create user and password

COMMAND
& sudo htpasswd -cm /etc/apache2/dav_svn.passwd ${yours username}

Step 7, Reload the setting

COMMAND
$ sudo /etc/init.d/apache2 reload

So, now you should be able to access your repository via http://127.0.0.1/svn/${yours repository}
if you want to change your server name. just edit the file /etc/hosts

Reference : http://ubuntuforums.org/showthread.php?t=187739

Tags: , ,

OC4J : set http.webdir.enable option to be enabled in 10.1.3.x

June 17th, 2008 | No Comments | Posted in Application Server

in Oracle Application Server 10.1.2.x this option is enabled, but in 10.1.3.x this option is disabled. So, the way to enable this option is to put the java option to OC4J. This is for OC4J standalone

COMMAND
java -Dhttp.webdir.enable=true -jar oc4j.jar

But if you are using embedded-oc4j, look at this topic

Eclipse : increate heap size to eclipse

June 17th, 2008 | No Comments | Posted in Java
COMMAND
$ eclipse [normal arguments] -vmargs -Xmx256M [more VM args]

Crystal Report XI : A report keeps asking for parameter

June 15th, 2008 | No Comments | Posted in Crystal report

I have been working quit a long time this weekend. I encountered a problem that the report keeps asking for parameter which you actually passed it. It is the bug of the program. Download the bugfix form the below link.

Go to

Crystal Report : report keeps displaying old data until I press refresh button

June 15th, 2008 | No Comments | Posted in Crystal report

Go to the File -> Report Options and uncheck Save Data With Report