Posts Tagged for the benefit of google
Javascript: keyCode versus charCode
Javascript key press events have both a keyCode and a charCode property. These are mutually exclusive – whenever one is non-zero the other is zero.
Which one is set depends on the type of event: keydown and keyup events give one events with keyCode set (they produce corresponding character) whilst keypress events give one events with charCode set.
Add comment July 26, 2009
Reading files in factor
Working code for the impatient
The following factor code reads and counts the number of words in the file “/etc/fstab”
USING: io.encodings.ascii io io.files prettyprint splitting sequences ; "/etc/fstab" ascii file-contents " \n\t" split length .
See also
Official api docs.
Add comment April 10, 2009