Month: August 2005
Adventures In Linux
Work was throwing it out – it is a PII 333MHz with 256MB RAM and a 4GB HD.
I thought it might make a good linux box.
I can get it to boot Knoppix 3.9 – however the install to CD option failed.
I picked up the Mandriva Linux magazine from WHSmiths.
Mandriva installs OK.
Unfortuantely it was unable to get the graphics driver to work.
After a quick look around I found the /etc/X11/XF86Config file, once I had set the
screen resolution down to 1074 x 768 then kde could start.
OK it was not a working out of the box that it should have been – but for an older system it was not too difficult to configure.
An End to Collation Blues
The collation must exactly match on a join or the query will fail if both fields have a defined
collation.
There are lots of absolutely identical collations (for example the default UK and US settings are identical yet incompatible).
There is no easy way of correcting the databases collation other than using DTS to completely copy the database.
The following is the solution to all collation blues:
COLLATE database_default
This needs to be after the appropriate join :
select a
from foo
where bar1 = bar2 COLLATE database_default
This eliminates the problem.
Java to CSharp Compiler
Here is sed for windows, the stream editor.
The following sed commands:
s/main/Main/
s/String/string/
s/System.out.println/System.Console.WriteLine/
Can transform the cannonical java hello world:
public class Hello
{
public static void main(String[] args)
{
System.out.println(“Hello, World”);
}
}
into the cannonical C# hello world
public class Hello
{
public static void main(String[] args)
{
System.out.println(“Hello, World”);
}
}
This is a starting point for a java to c# cross complier.
It would be interesting to try to apply this to a more complex java application.
Add a few interop base classes and we have a useful product.
Given that the two languages have very similar syntax it could be an easy task.
The only trick would be replacing extends and implements, but the super sed that I linked to has multi-line pattern matching!
Python equivalent to Ruby on Rails
Microsoft and RSS
This is in the Vista (Longhorn) timeframe.
Tool up for RSS now to get the benefits later.