Tuesday, 4 November 2014

PHP login code

Here is a link to code that will enable a login page to be created on a webpage. It allows for registrations and  to be processed by PHP code with user ids saved in an SQL Lite database.

https://github.com/panique/php-login

Tuesday, 9 February 2010

Venkman - display long strings

This post relates to the Venkman JavaScript debugger for Firefox.
If a variable contains a very long value, Venkman may display its value simply as "nnnn characters" where nnnn is its length. To display its actual content, enter the following into the Interactive Session window's command line:
/evald vvvvvvvvvv
/evald $[n].stringValue
where vvvvvvvvvv is the name of the variable and n is the result number of the first command.
Alternatively, you can increase the length of strings that Venkman will display with the following command:
/pref maxStringLength 99999
where 99999 is the maximum length of strings that you want Venkman to display.

Monday, 23 November 2009

Monday, 9 November 2009

Drawing an ellipse using Gimp

The following explains how to draw an ellipse using Gimp.
  1. Create a new layer (Layer->New layer)
  2. Set the new layer size to be the same as your image
  3. Set the new layer “Fill type” to “Transparency”
  4. Select the ellipse selection tool (Tools->Selection tools->Ellipse select)
  5. Draw an ellipse (left click and drag)
  6. Select the Bucket Fill tool (Tools->Paint tools->Bucket fill)
  7. Select a fill color and click in the ellipse
  8. Right click in the ellipse ans select Select->Shrink
  9. Type in the width of the ellipse border you need and click OK
  10. With the ellipse still selected, go to Edit->Clear
Acknowledgment: this is a blatant copy from http://www.tishon.net/index.php/2009/08/09/how-to-draw-an-ellipse-in-gimp/. I reproduce it here just in case the original ever disappears.

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 JavaScript, JSDT is required. This is in the J2EE version of Eclipse.