The Foundstone web site has a nice set of security resources, especially in the 'free tools' section.
... until the collector arrives ...
2005-06-29
2005-06-21
2005-06-20
Firebird, Delphi, and XCore
Firebird supports three dialects of SQL. Dialect '1' is the original Interbase SQL dialect. Dialect '3' is a newer dialect that attempts to be closer to the ANSI standard. Dialect '2' is used only for debugging: it throws errors for any SQL statement whose behaviour has changed between dialects '1' and '3'. Starting with Firebird 1.5, dialect '3' is now the default.
A Firebird client must indicate which dialect it is using. It does this using:
set sql dialect 1;
The default dialect for a new database is set to whatever dialect the client happens to be using at the instant the database is created. So, to force a particular dialect, use:
set sql dialect 1;
create database 'c:\dir\mydb.fdb' page_size 8192 user 'me' password 'secret';
You can change the dialect of an existing database using the gfix command line tool:
gfix -sql_dialect 1 -user 'me' -password 'secret' 'c:\dir\mydb.fdb'
I haven't tried it, but supposedly you can set the SQL dialect in Delphi using:
TIBDatabase.SQLDialect = 1;
The default value is '1' in Delphi 5 and '3' in Delphi 6.
This all came up when I tried to use XModel to create a new model in an empty Firebird 1.5 database. The error message was:
SQL error code = -817
Metadata update statement is not allowed by the current database SQL dialect 3.
2005-06-17
Want (Windows Ant)
There is a bug in want in that the dir attribute of the want target does not expand variables.
2005-06-14
2005-06-08
Tricky
Here is Gosling's tricky sort, ported from Pascal to Javascript. Or was it from Pyxis? I can't remember...
Firefox focus()
IE supports the focus() function on all HTML elements. Unfortunately, Firefox does not (following the DOM spec). Firefox does support focus() on anchors and form elements, so depending upon what you are trying to do you might be able to just introduce an anchor near where you want the focus. Also, the select() method works on form input fields.
2005-06-07
Anonymous Web Tools
MyTrashMail provides a service where they will create an anonymous email account automatically upon receiving email -- you don't have to preregister the account. You pick up the email at the MyTrashMail web site.
I've been using it for a year or two now, but in case I forget... www.bugmenot.com is a great place to get temporary registered user identifiers for lots of sites.
2005-06-06
Oracle
Here is an Oracle SQL statement that will return a script to convert all LONG columns into CLOBs:
select 'alter table '||table_name||' modify ('||column_name||' clob);'
from user_tab_columns
where data_type='LONG';
Doing this might invalidate some indexes, reported by a message such as:
ORA-01502: index 'SOME_SCHEMA.SOME_INDEX' or partition of
such index is in unusable state
Here is a statement that will create a script to rebuild all invalid indexes:
select 'alter index '||index_name||' rebuild;'
from user_indexes
where status<>'VALID';
2005-06-01
Oracle 9i
Under Oracle 9.2.0.1.0, the following statement fails with the nonsensical error 'ORA-00979: not a GROUP BY expression':
select (select max(dummy) from dual where dummy=a.dummy)
from dual a
, ( select dummy from dual group by dummy ) b
where a.dummy = b.dummy
and a.dummy = 'X'
Under Oracle 8.1.7.0.0, the statement works.