Archive for March 2009
data matrix
I’ve tried "Data Matrix" technology today with my cellphone and i-nigma reader. It works.
connecting grepping into sed
I use grep and sed mostly as the following pattern
cat file | grep some-pattern | sed s/other-pattern/replacement/
But what if some-pattern and other-pattern is the same, moreover you want to refer groups in replacement. Here’s what sed offers for this:
cat file | sed -e 's/pattern/replacement/p; d'
uuid.el
I’ve downloaded uuid.el for purposes which are subject to upcoming posts. There were #B01000000-like binary number representations in it, foreign to my installed XEmacs (saying Invalid read syntax: “#”). Version is the same as in this post. Anyway,
$ diff uuid.el.orig uuid.el 94c94 < (logior #B01000000 (logand #B01111111 (nth 7 bytes)))) --- > (logior 64 (logand 127 (nth 7 bytes)))) 96c96 < (logior #B01000000 (logand #B01001111 (nth 8 bytes)))) --- > (logior 64 (logand 79 (nth 8 bytes)))) $
windows vista, xemacs, emms
Additional comments to this site on EMMS. I got the same “don’t know how to play track” message discussed on the page. First of all I played with emms source in a *scratch*. I realized that I did’t have executable-find, so I copied one from here which didn’t work, so I’ve extended it a little like this:
(defun executable-find (command)
(or (executable-find-orig command)
(executable-find-orig (concat command ".exe"))))
(defun executable-find-orig (command)
(let ((list exec-path)
file)
(while list
(setq list (if (and (setq file (expand-file-name command (car list)))
(file-executable-p file)
(not (file-directory-p file)))
nil
(setq file nil)
(cdr list))))
file))
Now it works. By the way, this post was inspired by this blog entry. XEmacs was [version 21.4.21; October 2007] downloaded in an installer exe file yesterday from www.xemacs.org.
Best Regards
