Friday, 12th March 2010.

Posted on Sunday, 31st May 2009 by Balazs

These ideas are derived and quoted from “Best practices for tuning DB2 UDB v8.1 and its databases”
CREATE INDEX has a number of options that allow for significant performance gains:

Optimizing for SELECT: use PCTFREE 0 if index is on a read-only table.
Optimizing for ascending or descending ordering: use ALLOW REVERSE SCANS to allow for an [...]

Tags: , ,
Posted in DB2 | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

I just came across the following two articles that have some good pointers for using the native XML capabilities of DB2:

Using DB2 XQuery to extract data mining results stored as PMML: this article is a great introduction to XQuery and Predictive Model Markup Language (PMML), a language to describe data mining models and to enable [...]

Tags: , , ,
Posted in DB2 | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

Authentication in Apache is done through htaccess, either from the configuration file, or from the .htaccess file in a given directory. Note that only full directories can be easily protected with this method.
Here is how: (first log in to the shell, as this method only works if
you have shell access)

$ cd …/html/protected_dir

$ cat > .htaccess

AuthType [...]

Tags: , ,
Posted in Technology | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

To do a recursive search and replace in a file system tree, the most effective way is to work directly on the file system. Using a tool like DreamWeaver is slow and cumbersome. Unix offers perl and find, which combined allow to do a search and replace recursively very easily. This implmentation is in perl, [...]

Tags:
Posted in Perl | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

To add an SSL cert to IIS 5 on Windows, you need two separate steps:

Create a p12 (pkcs12) cert file:
cat server.key server.crt > server.pem
openssl pkcs12 -export -in server.pem -out server.p12 -name “server”
Import the p12 file into IIS:
Start->Run->mmc
Ctrl+M
Add…
Certificates
Computer Account
Finish
Close
OK
Open “Certificates (Local Computer)” tree
Right click Certificates
All Tasks->Import…
Browse to .p12 cert
Next
Next
Next
Finish
Select cert for site
Open IIS Admin
Select properties of [...]

Tags: ,
Posted in Windows | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

I found this info in the PostgreSQL archives. Here areĀ  2 methods:
Best method from Dan Lyke: Apache::DBI will pool across Perl programs, and you don’t have to change anything in your scripts.
Next best method from Gilles DAROLD: in your perl script use the following code
use vars qw($dbh);

$dbh ||= DBI::connect($datasrc, $dbuser, $dbpwd);
These can be use [...]

Tags: , , , , ,
Posted in DB2, Perl | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

If the build fials because of a makefile error, it is most likely due to an encoding error during the generation of the makefile. That type of error is described in the RedHat Bugzilla report #87682 and the solution given is to change LANG from en_US.UTF8 to en_US.

Tags:
Posted in Perl | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

From the command line, as the root user, run:
# perl -MCPAN -e shell
And then at the cpan command line run:
cpan> install Module::Name
Alternatively, using sudo on one line, as any user you can directly intall a module by running:
sudo perl -MCPAN -e ‘install Module::Name’

Tags:
Posted in Perl | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

To be able to report SPAM, Viruses, or any other problem with email, the system administrators need the full email headers. These can be easily found in Netscape or Mozilla Thunderbird, just by viewing the raw message source, or by selecting View Full Headers in the View menu. However in Outlook 2003 it is [...]

Tags: ,
Posted in Windows | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

Setting up a folder for PPTP access:

Right click and select properties
Select Sharing tab
Check “Share this folder” and give it a share name
Click the permissions button, and make sure that only the right user(s) have permission

Setting up user for PPTP:

Start->Settings->Network and Dial-up connections->Incoming connections
Click users tab
Check the check box next to user to authorize

Tags: ,
Posted in Windows | Comments (Comments)