Monday, 23 November 2009
Monday, 9 November 2009
Drawing an ellipse using Gimp
The following explains how to draw an ellipse using Gimp.
- Create a new layer (Layer->New layer)
- Set the new layer size to be the same as your image
- Set the new layer “Fill type” to “Transparency”
- Select the ellipse selection tool (Tools->Selection tools->Ellipse select)
- Draw an ellipse (left click and drag)
- Select the Bucket Fill tool (Tools->Paint tools->Bucket fill)
- Select a fill color and click in the ellipse
- Right click in the ellipse ans select Select->Shrink
- Type in the width of the ellipse border you need and click OK
- With the ellipse still selected, go to Edit->Clear
Wednesday, 23 September 2009
Monday, 13 July 2009
Use the following command to generate the ANTLR lexer and parser:
java org.antlr.Tool -debug "C:\Visual Studio 2008\Projects\ANTLR\ANTLR\ANTLR\Grammar.g"
This will create files Grammar.cs and Grammar.cs in the same directory as the grammar (.g) file. It will create IsisPapyrus.tokens in the current directory.
I prefer to cd to the directory where the grammar file first so that all three files are created in the same directory.
Monday, 29 June 2009
Eclipse plugins
Use the Eclipse Help / Install New Software... menu item for both of the following.
- For editing Perl modules, use
http://e-p-i-c.sf.net/updates/testing - For Subclipse, use
http://subclipse.tigris.org/update_1.6.x
Wednesday, 22 April 2009
Show hex values of characters in an SQL Server field
-- The @position variable holds the position of the character currently
-- being processed. The @nstring variable is the Unicode character
-- string to process.
DECLARE @position int, @nstring nvarchar(max)
-- Initialize the current position variable to the first character in
-- the string.
SET @position = 1
-- Initialize the character string variable to the string to process.
-- Notice that there is an N before the start of the string, which
-- indicates that the data following the N is Unicode data.
SELECT @nstring = colname FROM table WHERE criterion_col = value
-- Print the character number of the position of the string you are at,
-- the actual Unicode character you are processing, and the UNICODE
-- value for this particular character.
PRINT 'Character #' + ' ' + 'Unicode Character' + ' ' + 'UNICODE Value'
WHILE @position <= DATALENGTH(@nstring)
-- While these are still characters in the character string,
BEGIN
SELECT @position AS pos,
CONVERT(char(17), SUBSTRING(@nstring, @position, 1)) AS [Unicode char],UNICODE(SUBSTRING(@nstring, @position, 1)) AS val
SELECT @position = @position + 1
END
-- being processed. The @nstring variable is the Unicode character
-- string to process.
DECLARE @position int, @nstring nvarchar(max)
-- Initialize the current position variable to the first character in
-- the string.
SET @position = 1
-- Initialize the character string variable to the string to process.
-- Notice that there is an N before the start of the string, which
-- indicates that the data following the N is Unicode data.
SELECT @nstring = colname FROM table WHERE criterion_col = value
-- Print the character number of the position of the string you are at,
-- the actual Unicode character you are processing, and the UNICODE
-- value for this particular character.
PRINT 'Character #' + ' ' + 'Unicode Character' + ' ' + 'UNICODE Value'
WHILE @position <= DATALENGTH(@nstring)
-- While these are still characters in the character string,
BEGIN
SELECT @position AS pos,
CONVERT(char(17), SUBSTRING(@nstring, @position, 1)) AS [Unicode char],UNICODE(SUBSTRING(@nstring, @position, 1)) AS val
SELECT @position = @position + 1
END
Friday, 20 March 2009
Debugging a Nirva Java service in Eclipse
The JVM included with Nirva includes the possibility to use an external debugging tool (such as eclipse). This allows to position break points, watch expressions, etc. and follow step by step what is going on inside the service.
To configure Nirva to enable this option the following parameters should be added to the JVM parameters on the Parameters screen of the Nirva console :
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044
In Eclipse, you need to create a Debugging configuration for the project. To do this select "Open Debug Dialog" from the Debugging menu (with a "Bug" icon). In the dialog create a new "Remote Java Application" configuration. Select your service project and configure the host to localhost and the port to 1044.
To configure Nirva to enable this option the following parameters should be added to the JVM parameters on the Parameters screen of the Nirva console :
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044
In Eclipse, you need to create a Debugging configuration for the project. To do this select "Open Debug Dialog" from the Debugging menu (with a "Bug" icon). In the dialog create a new "Remote Java Application" configuration. Select your service project and configure the host to localhost and the port to 1044.
Sunday, 22 February 2009
Wednesday, 11 February 2009
I am starting Word as follows:
Switches:
- cd /d C:\Program Files\Microsoft Office\Office12
- winword /z"C:\templates_folder\template.dotm" /w /q
Switches:
- /z : Start with the specified template (there is also a /t switch that does the same thing except that it does not invoke the Document_New macro)
- /w : Start a new Windows process even if Word is already running
- /q : Suppress the startup splash screen
Subscribe to:
Posts (Atom)
