<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-14786774</id><updated>2024-09-12T22:12:40.626-07:00</updated><category term="Humor"/><category term="emacs"/><category term="lisp"/><title type='text'>Code Storm</title><subtitle type='html'>Articles and commentary on various programming topics.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default?alt=atom'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default?alt=atom&amp;start-index=26&amp;max-results=25'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>31</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-14786774.post-6434804286942312522</id><published>2008-02-23T11:03:00.000-08:00</published><updated>2008-05-15T11:03:21.654-07:00</updated><title type='text'>Officially pissed at Apple</title><content type='html'>The wireless driver is fucked over in the 10.5.2 update. The airport will drop the connection to the router after a few minutes of heavy use. It sometimes lasts as long as 30 minutes but then it drops the connection. Makes trying to download large files fucking frustrating. They better fix this one fast or Linux is going onto this iMac. Did they test the update at all? You would think this driver would have seen heavy use while testing.&lt;br /&gt;&lt;br /&gt;**UPDATE**&lt;br /&gt;It seems that Apple has corrected this in the last set of updates.</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/6434804286942312522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/6434804286942312522?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/6434804286942312522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/6434804286942312522'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2008/02/officially-pissed-at-apple.html' title='Officially pissed at Apple'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-5287930379046083869</id><published>2007-11-21T08:59:00.000-08:00</published><updated>2007-11-28T10:39:59.893-08:00</updated><title type='text'>Restoring Emacs layout</title><content type='html'>&lt;style type=&quot;text/css&quot;&gt;&lt;br /&gt;    &lt;!--       body {         color: #87cefa;         background-color: #000000;       }       .comment {         /* font-lock-comment-face */         color: #ff0000;       }       .comment-delimiter {         /* font-lock-comment-delimiter-face */         color: #ff0000;       }       .doc {         /* font-lock-doc-face */         color: #40e0d0;       }       .function-name {         /* font-lock-function-name-face */         color: #ffffff;       }       .keyword {         /* font-lock-keyword-face */         color: #00ff00;       }       .string {         /* font-lock-string-face */         color: #40e0d0;       }        a {         color: inherit;         background-color: inherit;         font: inherit;         text-decoration: inherit;       }       a:hover {         text-decoration: underline;       }     --&gt;&lt;br /&gt;    &lt;/style&gt;&lt;br /&gt;&lt;p&gt;When I work in EMACS I have a specific layout that I use. I have about five frames open each dedicated to some task. One will have three dired windows and an eshell window. Others will have project files open or source files. Restoring this layout is a pain whenever I have to restart emacs. So I decided to automate this layout restoration. I found revive.el that does almost what I wanted so I wrote some code that uses revive to save the state of all the frames that are currently open and then restore that state.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;emacs-save-layout&lt;/span&gt; ()&lt;span class=&quot;comment-delimiter&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;TODO: handle eshell&lt;br /&gt;&lt;/span&gt;  &lt;span class=&quot;doc&quot;&gt;&quot;save the frame and window layout to ~/.emacs-layout. Requires revive.el.&quot;&lt;/span&gt;&lt;br /&gt;(interactive)&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((out-name (concat *HOME* &lt;span class=&quot;string&quot;&gt;&quot;/.emacs-layout&quot;&lt;/span&gt;))&lt;br /&gt;      (frames (frame-list))&lt;br /&gt;      (configs nil)&lt;br /&gt;      (buffs (sorted-buffer-list))&lt;br /&gt;      (filtered-buffs nil)&lt;br /&gt;      (s-buffs nil))&lt;br /&gt;  (&lt;span class=&quot;keyword&quot;&gt;dolist&lt;/span&gt; (b buffs)    &lt;br /&gt;      (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((file-name (buffer-file-name b)))&lt;br /&gt;        (&lt;span class=&quot;keyword&quot;&gt;when&lt;/span&gt; (and file-name&lt;br /&gt;                   (&amp;gt; (length file-name) 0))&lt;br /&gt;          (setq filtered-buffs (cons file-name filtered-buffs)))))&lt;br /&gt;  (&lt;span class=&quot;keyword&quot;&gt;when&lt;/span&gt; filtered-buffs (setq filtered-buffs (reverse filtered-buffs)))&lt;br /&gt;  (&lt;span class=&quot;keyword&quot;&gt;dolist&lt;/span&gt; (frame frames)&lt;br /&gt;    (select-frame frame)&lt;br /&gt;    (setq configs (cons (current-window-configuration-printable) configs)))&lt;br /&gt;  (setq configs (cons filtered-buffs configs))&lt;br /&gt;  (write-region (&lt;span class=&quot;keyword&quot;&gt;with-output-to-string&lt;/span&gt; (prin1 configs)) nil out-name)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;emacs-load-layout&lt;/span&gt; ()&lt;span class=&quot;comment-delimiter&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;TODO: handle eshell buffers.&lt;br /&gt;&lt;/span&gt;  &lt;span class=&quot;doc&quot;&gt;&quot;Load the layout saved by emacs-save-layout. Requires revive.el.&quot;&lt;/span&gt;&lt;br /&gt;(interactive)&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;let*&lt;/span&gt; ((in-name (concat *HOME* &lt;span class=&quot;string&quot;&gt;&quot;/.emacs-layout&quot;&lt;/span&gt;))&lt;br /&gt;      (config-count 0)&lt;br /&gt;      (frames (frame-list))&lt;br /&gt;      (configs nil)&lt;br /&gt;      (frame-count (length frames))&lt;br /&gt;      (buffs nil))&lt;br /&gt;  (&lt;span class=&quot;keyword&quot;&gt;with-temp-buffer&lt;/span&gt;&lt;br /&gt;    (insert-file-contents-literally in-name)&lt;br /&gt;    (setq buffs (read (current-buffer)))&lt;br /&gt;    (setq configs (rest buffs))&lt;br /&gt;    (setq buffs (first buffs)))&lt;br /&gt;  (&lt;span class=&quot;keyword&quot;&gt;dolist&lt;/span&gt; (b buffs)&lt;br /&gt;    (find-file-noselect b)&lt;br /&gt;    (message &lt;span class=&quot;string&quot;&gt;&quot;Loading buffer %s&quot;&lt;/span&gt; b))&lt;br /&gt;  (setq config-count (length configs))&lt;br /&gt;  (message &lt;span class=&quot;string&quot;&gt;&quot;Config count is %s&quot;&lt;/span&gt; config-count)&lt;br /&gt;  (&lt;span class=&quot;keyword&quot;&gt;unless&lt;/span&gt; (&amp;gt;= frame-count config-count)&lt;br /&gt;    (&lt;span class=&quot;keyword&quot;&gt;dotimes&lt;/span&gt; (i (- config-count frame-count))&lt;br /&gt;      (make-frame))&lt;br /&gt;    (setq frames (frame-list))&lt;br /&gt;    (setq frame-count (length frames))&lt;br /&gt;    (message &lt;span class=&quot;string&quot;&gt;&quot;frame-count is %s&quot;&lt;/span&gt; frame-count))&lt;br /&gt;  (&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;it&lt;/span&gt; (lconfigs lframes)&lt;br /&gt;            (&lt;span class=&quot;keyword&quot;&gt;when&lt;/span&gt; (and lconfigs lframes)&lt;br /&gt;              (select-frame (first lframes))&lt;br /&gt;              (restore-window-configuration (first lconfigs))&lt;br /&gt;              (it (rest lconfigs) (rest lframes))))&lt;br /&gt;  (it configs frames)))&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/5287930379046083869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/5287930379046083869?isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/5287930379046083869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/5287930379046083869'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2007/11/restoring-emacs-layout.html' title='Restoring Emacs layout'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-6748949372292423061</id><published>2007-10-15T15:18:00.000-07:00</published><updated>2007-10-15T15:19:33.141-07:00</updated><title type='text'>The Authoritarians</title><content type='html'>&lt;a href=&quot;http://home.cc.umanitoba.ca/%7Ealtemey/&quot;&gt;The Authoritarians&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Normally I don&#39;t enjoy political discussions or make politically oriented posts but I think, with the upcoming elections and the current climate in the United States, that more people should know about this book and an associated article. This work on authoritarianism has been done over a period of fourty years, in a manner that is very readable, and is well worth the time to read. An associated article is &lt;a href=&quot;http://www.boston.com/news/globe/editorial_opinion/oped/articles/2006/07/14/triumph_of_the_authoritarians/&quot;&gt;here.&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/6748949372292423061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/6748949372292423061?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/6748949372292423061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/6748949372292423061'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2007/10/authoritarians.html' title='The Authoritarians'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-7096757752679808783</id><published>2007-10-11T13:22:00.000-07:00</published><updated>2007-10-11T13:22:46.502-07:00</updated><title type='text'>David Rupp&#39;s Blog: The Last Language War / Language Trolling Post You&#39;ll Ever Need To Read (Hopefully)</title><content type='html'>&lt;a href=&quot;http://davidrupp.blogspot.com/2007/10/last-language-war-language-trolling.html&quot;&gt;David Rupp&#39;s Blog: The Last Language War / Language Trolling Post You&#39;ll Ever Need To Read (Hopefully)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Seriously funny post. Most excellent.</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/7096757752679808783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/7096757752679808783?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/7096757752679808783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/7096757752679808783'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2007/10/david-rupps-blog-last-language-war.html' title='David Rupp&#39;s Blog: The Last Language War / Language Trolling Post You&#39;ll Ever Need To Read (Hopefully)'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-5614292198314814098</id><published>2007-09-17T15:14:00.000-07:00</published><updated>2007-09-17T15:29:39.632-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="emacs"/><category scheme="http://www.blogger.com/atom/ns#" term="lisp"/><title type='text'>elisp functions for emacs</title><content type='html'>A set of functions that I use in my emacs configuration and to automate tasks. Some functions have been acquired and some I have written myself.&lt;br /&gt;   &lt;pre&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;lispdoc&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;searches lispdoc.com for SYMBOL, which is by default the symbol&lt;br /&gt;currently under the curser&quot;&lt;/span&gt;&lt;br /&gt; (interactive)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let*&lt;/span&gt; ((word-at-point (word-at-point))&lt;br /&gt;        (symbol-at-point (symbol-at-point))&lt;br /&gt;        (default (symbol-name symbol-at-point))&lt;br /&gt;        (inp (read-from-minibuffer&lt;br /&gt;              (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (or word-at-point symbol-at-point)&lt;br /&gt;                  (concat &lt;span class=&quot;string&quot;&gt;&quot;Symbol (default &quot;&lt;/span&gt; default &lt;span class=&quot;string&quot;&gt;&quot;): &quot;&lt;/span&gt;)&lt;br /&gt;                &lt;span class=&quot;string&quot;&gt;&quot;Symbol (no default): &quot;&lt;/span&gt;))))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (and (string= inp &lt;span class=&quot;string&quot;&gt;&quot;&quot;&lt;/span&gt;) (not word-at-point) (not&lt;br /&gt;                                                  symbol-at-point))&lt;br /&gt;       (message &lt;span class=&quot;string&quot;&gt;&quot;you didn&#39;t enter a symbol!&quot;&lt;/span&gt;)&lt;br /&gt;     (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((search-type (read-from-minibuffer&lt;br /&gt;                           &lt;span class=&quot;string&quot;&gt;&quot;full-text (f) or basic (b) search (default b)? &quot;&lt;/span&gt;)))&lt;br /&gt;         (browse-url (concat &lt;span class=&quot;string&quot;&gt;&quot;http://lispdoc.com?q=&quot;&lt;/span&gt;&lt;br /&gt;                             (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (string= inp &lt;span class=&quot;string&quot;&gt;&quot;&quot;&lt;/span&gt;)&lt;br /&gt;                                 default&lt;br /&gt;                               inp)&lt;br /&gt;                             &lt;span class=&quot;string&quot;&gt;&quot;&amp;amp;search=&quot;&lt;/span&gt;&lt;br /&gt;                             (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (string-equal search-type &lt;span class=&quot;string&quot;&gt;&quot;f&quot;&lt;/span&gt;)&lt;br /&gt;                                 &lt;span class=&quot;string&quot;&gt;&quot;full+text+search&quot;&lt;/span&gt;&lt;br /&gt;                               &lt;span class=&quot;string&quot;&gt;&quot;basic+search&quot;&lt;/span&gt;)))))))&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;======================================================================&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;scratch buffer function to immediately go to the scratch buffer&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;from anywhere else&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;======================================================================&lt;br /&gt;&lt;/span&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;scratch&lt;/span&gt; ()&lt;br /&gt; (interactive)&lt;br /&gt; (switch-to-buffer &lt;span class=&quot;string&quot;&gt;&quot;*scratch*&quot;&lt;/span&gt;)&lt;br /&gt; (lisp-interaction-mode)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; current-prefix-arg&lt;br /&gt;     (delete-region (point-min) (point-max))&lt;br /&gt;   (goto-char (point-max))))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;======================================================================&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;From: lawrence mitchell &amp;lt;wence-at-gmx.li&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;Find the function under the point in the elisp manual&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;C-h TAB runs the command info-lookup-symbol&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;    &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;which is an interactive autoloaded Lisp function in `&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;&lt;span class=&quot;constant&quot;&gt;info-look&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;&#39;.&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;[Arg list not available until function definition is loaded.]&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;Display the definition of SYMBOL, as found in the relevant manual.&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;When this command is called interactively, it reads SYMBOL from the minibuffer.&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;In the minibuffer, use M-n to yank the default argument value&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;into the minibuffer so you can edit it.&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;The default symbol is the one found at point.&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;With prefix arg a query for the symbol help mode is offered.&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;======================================================================&lt;br /&gt;&lt;/span&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;find-function-in-elisp-manual&lt;/span&gt; (function)&lt;br /&gt; (interactive&lt;br /&gt;  (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((fn (function-called-at-point))&lt;br /&gt;    (enable-recursive-minibuffers t)&lt;br /&gt;    val)&lt;br /&gt;    (setq val&lt;br /&gt;      (completing-read&lt;br /&gt;       (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; fn&lt;br /&gt;       (format &lt;span class=&quot;string&quot;&gt;&quot;Find function (default %s): &quot;&lt;/span&gt; fn)&lt;br /&gt;         &lt;span class=&quot;string&quot;&gt;&quot;Find function: &quot;&lt;/span&gt;)&lt;br /&gt;       obarray &#39;fboundp t nil nil (symbol-name fn)))&lt;br /&gt;    (list (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (equal val &lt;span class=&quot;string&quot;&gt;&quot;&quot;&lt;/span&gt;)&lt;br /&gt;          fn&lt;br /&gt;        val))))&lt;br /&gt; (Info-goto-node &lt;span class=&quot;string&quot;&gt;&quot;(elisp)Index&quot;&lt;/span&gt;)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;condition-case&lt;/span&gt; err&lt;br /&gt;     (&lt;span class=&quot;keyword&quot;&gt;progn&lt;/span&gt;&lt;br /&gt;   (search-forward (concat &lt;span class=&quot;string&quot;&gt;&quot;* &quot;&lt;/span&gt;function&lt;span class=&quot;string&quot;&gt;&quot;:&quot;&lt;/span&gt;))&lt;br /&gt;   (Info-follow-nearest-node))&lt;br /&gt;   (&lt;span class=&quot;warning&quot;&gt;error&lt;/span&gt; (message &lt;span class=&quot;string&quot;&gt;&quot;`&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&lt;span class=&quot;constant&quot;&gt;%s&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39; not found&quot;&lt;/span&gt; function))))&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;======================================================================&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;Functions to insert the date, the time, and the date and time at&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;point.  Useful for keeping records and automatically creating&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;program headers&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;======================================================================&lt;br /&gt;&lt;/span&gt;(&lt;span class=&quot;keyword&quot;&gt;defvar&lt;/span&gt; &lt;span class=&quot;variable-name&quot;&gt;insert-time-format&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&quot;%H:%M&quot;&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;*Format for \\[&lt;/span&gt;&lt;span class=&quot;doc&quot;&gt;&lt;span class=&quot;constant&quot;&gt;insert-time&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;doc&quot;&gt;] (c-h f &#39;format-time-string&#39; for info on how to format).&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defvar&lt;/span&gt; &lt;span class=&quot;variable-name&quot;&gt;insert-date-format&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&quot;%d %b %Y&quot;&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;*Format for \\[&lt;/span&gt;&lt;span class=&quot;doc&quot;&gt;&lt;span class=&quot;constant&quot;&gt;insert-date&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;doc&quot;&gt;] (c-h f &#39;format-time-string&#39; for info on how to format).&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;insert-time&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Insert the current time according to the variable \&quot;insert-time-format\&quot;.&quot;&lt;/span&gt;&lt;br /&gt; (interactive &lt;span class=&quot;string&quot;&gt;&quot;*&quot;&lt;/span&gt;)&lt;br /&gt; (insert (concat (format-time-string insert-time-format (current-time)) &lt;span class=&quot;string&quot;&gt;&quot; &quot;&lt;/span&gt;)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;insert-date&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Insert the current date according to the variable \&quot;insert-date-format\&quot;.&quot;&lt;/span&gt;&lt;br /&gt; (interactive &lt;span class=&quot;string&quot;&gt;&quot;*&quot;&lt;/span&gt;)&lt;br /&gt; (insert (concat (format-time-string insert-date-format (current-time))&lt;span class=&quot;string&quot;&gt;&quot; &quot;&lt;/span&gt;)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;insert-date-time&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Insert the current date according to the variable \&quot;insert-date-format\&quot;, then a space, then the current time according to the variable \&quot;insert-time-format\&quot;.&quot;&lt;/span&gt;&lt;br /&gt; (interactive &lt;span class=&quot;string&quot;&gt;&quot;*&quot;&lt;/span&gt;)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;progn&lt;/span&gt;&lt;br /&gt;   (insert-date)&lt;br /&gt;   (insert &lt;span class=&quot;string&quot;&gt;&quot; &quot;&lt;/span&gt;)&lt;br /&gt;   (insert-time)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;insert-current-file-name&lt;/span&gt; ()&lt;br /&gt; (interactive)&lt;br /&gt; (insert (file-name-nondirectory (buffer-file-name (current-buffer)) &lt;span class=&quot;string&quot;&gt;&quot;\/&quot;&lt;/span&gt;)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;insert-current-path&lt;/span&gt; ()&lt;br /&gt; (interactive)&lt;br /&gt; (insert (buffer-file-name (current-buffer))))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;======================================================================&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;this function prints an ascii table in a new buffer 4 columns&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;======================================================================&lt;br /&gt;&lt;/span&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;ascii-table&lt;/span&gt; (&lt;span class=&quot;type&quot;&gt;&amp;amp;optional&lt;/span&gt; extended)&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Print the ascii table (up to char 127). Given an optional argument, print up to char 255.&quot;&lt;/span&gt;&lt;br /&gt; (interactive &lt;span class=&quot;string&quot;&gt;&quot;P&quot;&lt;/span&gt;)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;defvar&lt;/span&gt; &lt;span class=&quot;variable-name&quot;&gt;col&lt;/span&gt;)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;defvar&lt;/span&gt; &lt;span class=&quot;variable-name&quot;&gt;limit&lt;/span&gt;)&lt;br /&gt; (setq limit 255)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (null extended)&lt;br /&gt;     (setq limit 127))&lt;br /&gt; (setq col (/ (+ 1 limit) 4))&lt;br /&gt; (switch-to-buffer &lt;span class=&quot;string&quot;&gt;&quot;*ASCII*&quot;&lt;/span&gt;)&lt;br /&gt; (erase-buffer)&lt;br /&gt; (insert (format &lt;span class=&quot;string&quot;&gt;&quot;ASCII characters up to %d. (00 is NULL character)\n\n&quot;&lt;/span&gt; limit))&lt;br /&gt; (insert &lt;span class=&quot;string&quot;&gt;&quot; DEC OCT HEX CHAR\t\t DEC OCT HEX CHAR\t\t DEC OCT HEX CHAR\t\t DEC OCT HEX CHAR\n&quot;&lt;/span&gt;)&lt;br /&gt; (insert &lt;span class=&quot;string&quot;&gt;&quot; ----------------\t\t ----------------\t\t ----------------\t\t ----------------\n&quot;&lt;/span&gt;)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((i 0) (right 0) (tab-width 4))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;while&lt;/span&gt; (&amp;lt; i col)&lt;br /&gt;     (setq col2 (+ i col))&lt;br /&gt;     (setq col3 (+ i (* col 2)))&lt;br /&gt;     (setq col4 (+ i (* col 3)))&lt;br /&gt;     &lt;span class=&quot;comment-delimiter&quot;&gt;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;special condition to insert a &amp;lt;TAB&amp;gt; instead of an actual tab&lt;br /&gt;&lt;/span&gt;      (&lt;span class=&quot;keyword&quot;&gt;cond&lt;/span&gt;&lt;br /&gt;      ((= i 9)&lt;br /&gt;       (insert (format &lt;span class=&quot;string&quot;&gt;&quot;%4d%4o%4x  &amp;lt;TAB&amp;gt;\t\t%4d%4o%4x%4c\t\t%4d%4o%4x%4c\t\t%4d%4o%4x%4c\n&quot;&lt;/span&gt;&lt;br /&gt;               i i i  col2 col2 col2 col2 col3 col3 col3 col3 col4 col4 col4 col4)))&lt;br /&gt;       &lt;span class=&quot;comment-delimiter&quot;&gt;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;special conditon to insert a &amp;lt;LF&amp;gt; instead of an actual line feed&lt;br /&gt;&lt;/span&gt;       ((= i 10)&lt;br /&gt;       (insert (format &lt;span class=&quot;string&quot;&gt;&quot;%4d%4o%4x  &amp;lt;LF&amp;gt;\t\t%4d%4o%4x%4c\t\t%4d%4o%4x%4c\t\t%4d%4o%4x%4c\n&quot;&lt;/span&gt;&lt;br /&gt;               i i i  col2 col2 col2 col2 col3 col3 col3 col3 col4 col4 col4 col4)))&lt;br /&gt;      (t&lt;br /&gt;       &lt;span class=&quot;comment-delimiter&quot;&gt;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;insert the actual character&lt;br /&gt;&lt;/span&gt;        (insert (format &lt;span class=&quot;string&quot;&gt;&quot;%4d%4o%4x%4c&amp;gt;\t\t%4d%4o%4x%4c\t\t%4d%4o%4x%4c\t\t%4d%4o%4x%4c\n&quot;&lt;/span&gt;&lt;br /&gt;               i i i i col2 col2 col2 col2 col3 col3 col3 col3 col4 col4 col4 col4))))&lt;br /&gt;     (setq i (+ i 1))))&lt;br /&gt; (beginning-of-buffer)&lt;br /&gt; (local-set-key &lt;span class=&quot;string&quot;&gt;&quot;q&quot;&lt;/span&gt; (quote bury-buffer)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;explorer&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Launch the windows explorer in the current directory&quot;&lt;/span&gt;&lt;br /&gt; (interactive)&lt;br /&gt; (w32-shell-execute&lt;br /&gt;  &lt;span class=&quot;string&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;string&quot;&gt;&quot;explorer&quot;&lt;/span&gt;&lt;br /&gt;  (concat &lt;span class=&quot;string&quot;&gt;&quot;/e, &quot;&lt;/span&gt; (convert-standard-filename default-directory))))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;cmd&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Launch the NT Command console&quot;&lt;/span&gt;&lt;br /&gt; (interactive)&lt;br /&gt;   (w32-shell-execute&lt;br /&gt;    &lt;span class=&quot;string&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;string&quot;&gt;&quot;cmd&quot;&lt;/span&gt;))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;tomcat&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;launch tomcat in debug mode.&quot;&lt;/span&gt;&lt;br /&gt; (interactive)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let*&lt;/span&gt; ((cwd (getenv &lt;span class=&quot;string&quot;&gt;&quot;CATALINA_HOME&quot;&lt;/span&gt;))&lt;br /&gt;       (tcat (concat  cwd &lt;span class=&quot;string&quot;&gt;&quot;/bin/startdbg.bat&quot;&lt;/span&gt;)))&lt;br /&gt;   (find-file tcat)&lt;br /&gt;   (w32-shell-execute&lt;br /&gt;    &lt;span class=&quot;string&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;br /&gt;    tcat)&lt;br /&gt;   (kill-buffer (get-file-buffer tcat))))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;dbg-tomcat&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;launch a debug console for tomcat.&quot;&lt;/span&gt;&lt;br /&gt; (interactive)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((dbg (concat (getenv &lt;span class=&quot;string&quot;&gt;&quot;JAVA_HOME&quot;&lt;/span&gt;) &lt;span class=&quot;string&quot;&gt;&quot;/bin/jdb.exe&quot;&lt;/span&gt;)))&lt;br /&gt;   (w32-shell-execute&lt;br /&gt;    nil&lt;br /&gt;    dbg&lt;br /&gt;    &lt;span class=&quot;string&quot;&gt;&quot;-attach jdbconn&quot;&lt;/span&gt;)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;run-cmd&lt;/span&gt; (cmd)&lt;br /&gt; (interactive &lt;span class=&quot;string&quot;&gt;&quot;sCommand: &quot;&lt;/span&gt;)&lt;br /&gt; (start-process cmd &lt;span class=&quot;string&quot;&gt;&quot;*scratch*&quot;&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&quot;cmd&quot;&lt;/span&gt; (concat &lt;span class=&quot;string&quot;&gt;&quot;/c &quot;&lt;/span&gt; cmd))&lt;br /&gt; (switch-to-buffer &lt;span class=&quot;string&quot;&gt;&quot;*scratch*&quot;&lt;/span&gt;))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;replace-all&lt;/span&gt; (string to-string)&lt;br /&gt; (interactive (&lt;span class=&quot;keyword&quot;&gt;progn&lt;/span&gt; (setq string (read-from-minibuffer &lt;span class=&quot;string&quot;&gt;&quot;Replace string: &quot;&lt;/span&gt;))&lt;br /&gt;                     (setq to-string (read-from-minibuffer&lt;br /&gt;                                      (format &lt;span class=&quot;string&quot;&gt;&quot;Replace %s with: &quot;&lt;/span&gt; string)))&lt;br /&gt;                     (list string to-string)))&lt;br /&gt; &lt;span class=&quot;string&quot;&gt;&quot;Replaces string with to-string in all buffers&quot;&lt;/span&gt;&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((buffs (buffer-list))&lt;br /&gt;       (current-buffer (current-buffer)))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;while&lt;/span&gt; (car buffs)&lt;br /&gt;     (switch-to-buffer (buffer-name (car buffs)))&lt;br /&gt;     (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((pos (point)))&lt;br /&gt;       (goto-char 0) &lt;br /&gt;       (query-replace string to-string)&lt;br /&gt;       (goto-char pos))&lt;br /&gt;     (setq buffs (cdr buffs)))&lt;br /&gt;   (switch-to-buffer current-buffer)))&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;overlay bookmarks&lt;br /&gt;&lt;/span&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;filter&lt;/span&gt; (fn lst)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((acc nil))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;dolist&lt;/span&gt; (x lst)&lt;br /&gt;     (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((val (funcall fn x)))&lt;br /&gt;       (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; val (push val acc))))&lt;br /&gt;   (nreverse acc)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;setOverlayBookmark&lt;/span&gt; ()&lt;br /&gt; (interactive)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let*&lt;/span&gt;&lt;br /&gt;     ((pnt (line-beginning-position))&lt;br /&gt;      (ovrly (make-overlay pnt (line-end-position))))&lt;br /&gt;   (overlay-put ovrly &#39;face &#39;highlight)&lt;br /&gt;   (overlay-put ovrly &#39;pointHistory t)&lt;br /&gt;   ovrly))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;overlayBookmarkFilterFunc&lt;/span&gt; (ovrly) (and (overlay-get ovrly &#39;pointHistory) ovrly))&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;overlayBookmarkFilterStartsFunc&lt;/span&gt; (ovrly) (and (overlay-get ovrly &#39;pointHistory) (overlay-start ovrly)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;nextOverlayBookmark&lt;/span&gt; ()&lt;br /&gt; (interactive)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let*&lt;/span&gt;((pnt (line-end-position))&lt;br /&gt;      (ovrly_starts (or (filter &#39;overlayBookmarkFilterStartsFunc (overlays-in pnt (point-max)))&lt;br /&gt;                  (filter &#39;overlayBookmarkFilterStartsFunc (overlays-in (point-min) pnt)))))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; ovrly_starts&lt;br /&gt;       (goto-char (reduce (&lt;span class=&quot;keyword&quot;&gt;lambda&lt;/span&gt; (a b) (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&amp;lt; a b) a b)) ovrly_starts))&lt;br /&gt;     (message &lt;span class=&quot;string&quot;&gt;&quot;no items in history&quot;&lt;/span&gt;))))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;clearOverlayBookmarks&lt;/span&gt; ()&lt;br /&gt; (interactive)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt;&lt;br /&gt;     ((ovrlys (filter &#39;overlayBookmarkFilterFunc (overlays-in (point-min) (point-max)))))&lt;br /&gt;   (mapcar &#39;delete-overlay ovrlys)&lt;br /&gt;   (message &lt;span class=&quot;string&quot;&gt;&quot;cleared point history&quot;&lt;/span&gt;)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;toggleOverlayBookmark&lt;/span&gt; ()&lt;br /&gt; (interactive)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt;&lt;br /&gt;     ((ovrlys (filter &#39;overlayBookmarkFilterFunc (overlays-in (line-beginning-position) (line-end-position)))))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; ovrlys&lt;br /&gt;       (mapcar &#39;delete-overlay ovrlys)&lt;br /&gt;     (setOverlayBookmark))))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;overlayBookmarkRefresh&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;stretches the overlays from the beginning to end of a line&quot;&lt;/span&gt;&lt;br /&gt; (interactive)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt;&lt;br /&gt;     ((ovrlys (filter &#39;overlayBookmarkFilterFunc (overlays-in (point-min) (point-max))))&lt;br /&gt;      (lf (&lt;span class=&quot;keyword&quot;&gt;lambda&lt;/span&gt; (tmp) (&lt;span class=&quot;keyword&quot;&gt;save-excursion&lt;/span&gt;&lt;br /&gt;                                (goto-char (overlay-start tmp))&lt;br /&gt;                                (move-overlay tmp (overlay-start tmp) (line-end-position))))))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; ovrlys&lt;br /&gt;       (mapcar lf ovrlys)&lt;br /&gt;     (setPointHistory))))&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;eshell/bmk - version 0.1.2&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;pcomplete/eshell-mode/bmk&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Completion for `&lt;/span&gt;&lt;span class=&quot;doc&quot;&gt;&lt;span class=&quot;constant&quot;&gt;bmk&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;doc&quot;&gt;&#39;&quot;&lt;/span&gt;&lt;br /&gt; (pcomplete-here (bookmark-all-names)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;eshell/bmk&lt;/span&gt; (&lt;span class=&quot;type&quot;&gt;&amp;amp;rest&lt;/span&gt; args)&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Integration between EShell and bookmarks. For usage, execute without arguments.&quot;&lt;/span&gt;&lt;br /&gt; (setq args (eshell-flatten-list args))&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((bookmark (car args))&lt;br /&gt;       filename name)&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;cond&lt;/span&gt;&lt;br /&gt;    ((eq nil args)&lt;br /&gt;     (format &lt;span class=&quot;string&quot;&gt;&quot;Usage: bmk BOOKMARK to change directory pointed to by BOOKMARK&lt;br /&gt;   or bmk . BOOKMARK to bookmark current directory in BOOKMARK.&lt;br /&gt;Completion is available.&quot;&lt;/span&gt;))&lt;br /&gt;    ((string= &lt;span class=&quot;string&quot;&gt;&quot;.&quot;&lt;/span&gt; bookmark)&lt;br /&gt;     &lt;span class=&quot;comment-delimiter&quot;&gt;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;Store current path in EShell as a bookmark&lt;br /&gt;&lt;/span&gt;      (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (setq name (car (cdr args)))&lt;br /&gt;         (&lt;span class=&quot;keyword&quot;&gt;progn&lt;/span&gt;&lt;br /&gt;           (bookmark-set name)&lt;br /&gt;           (bookmark-set-filename name (eshell/pwd))&lt;br /&gt;           (format &lt;span class=&quot;string&quot;&gt;&quot;Saved current directory in bookmark %s&quot;&lt;/span&gt; name))&lt;br /&gt;       (&lt;span class=&quot;warning&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&quot;You must enter a bookmark name&quot;&lt;/span&gt;)))&lt;br /&gt;    (t&lt;br /&gt;     &lt;span class=&quot;comment-delimiter&quot;&gt;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;Assume the user wants to go to the path pointed out by a bookmark.&lt;br /&gt;&lt;/span&gt;      (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (setq filename (cdr (car (bookmark-get-bookmark-record bookmark))))&lt;br /&gt;         (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (file-directory-p filename)&lt;br /&gt;             (eshell/cd filename)&lt;br /&gt;            &lt;span class=&quot;comment-delimiter&quot;&gt;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;TODO: Handle this better and offer to go to directory&lt;br /&gt;&lt;/span&gt;            &lt;span class=&quot;comment-delimiter&quot;&gt;;; &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;where the file is located.&lt;br /&gt;&lt;/span&gt;            (&lt;span class=&quot;warning&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&quot;Bookmark %s points to %s which is not a directory&quot;&lt;/span&gt;&lt;br /&gt;                  bookmark filename)))))))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;eshell/start&lt;/span&gt; (FILE)&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Invoke (w32-shell-execute \&quot;Open\&quot; FILE) and substitute slashes for backslashes&quot;&lt;/span&gt;&lt;br /&gt; (w32-shell-execute &lt;span class=&quot;string&quot;&gt;&quot;Open&quot;&lt;/span&gt; (substitute ?\\ ?/ (expand-file-name FILE))))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;setenv-from-list&lt;/span&gt; (env strlst)&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Set an environment variable using the contents of a list.&quot;&lt;/span&gt;&lt;br /&gt; (setenv env (join &lt;span class=&quot;string&quot;&gt;&quot;; &quot;&lt;/span&gt; strlst)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;join-strings&lt;/span&gt; (sep &lt;span class=&quot;type&quot;&gt;&amp;amp;rest&lt;/span&gt; strngs)&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;join a bunch of strings with sep concatinated after each string.&quot;&lt;/span&gt;&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((rslt &lt;span class=&quot;string&quot;&gt;&quot;&quot;&lt;/span&gt;))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;dolist&lt;/span&gt; (str strngs)&lt;br /&gt;     (setq rslt (concat rslt str sep)))&lt;br /&gt;   rslt))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;join&lt;/span&gt; (sep strlst)&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;join a list of strings with sep between each.&quot;&lt;/span&gt;&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((rslt &lt;span class=&quot;string&quot;&gt;&quot;&quot;&lt;/span&gt;))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;dolist&lt;/span&gt; (str strlst)&lt;br /&gt;     (setq rslt (concat rslt str sep)))&lt;br /&gt;   rslt))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;join-ba&lt;/span&gt; (before after strlst)&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;join a list of strings with before and after pre/post pended to each string.&quot;&lt;/span&gt;&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((rslt &lt;span class=&quot;string&quot;&gt;&quot;&quot;&lt;/span&gt;))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;dolist&lt;/span&gt; (str strlst)&lt;br /&gt;     (setq rslt (concat rslt (format &lt;span class=&quot;string&quot;&gt;&quot;%s%s%s&quot;&lt;/span&gt; before str after))))&lt;br /&gt;   rslt))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;comment-delimiter&quot;&gt;;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;setup load paths&lt;br /&gt;&lt;/span&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;setup-load-paths&lt;/span&gt; (edir subdirlst)&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Setup load paths. edir is the elisp directory path and subdirlst is a list of subdirectories.&quot;&lt;/span&gt; &lt;br /&gt; (mapcar (&lt;span class=&quot;keyword&quot;&gt;lambda&lt;/span&gt; (subdir) (add-to-list &#39;load-path (concat edir subdir)))&lt;br /&gt;         subdirlst)&lt;br /&gt; (add-to-list &#39;load-path edir))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;copy-to-scratch&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;copies selected text to the scratch buffer.&quot;&lt;/span&gt;&lt;br /&gt; (interactive)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((txt (buffer-substring (region-beginning) (region-end))))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;save-current-buffer&lt;/span&gt;&lt;br /&gt;     (set-buffer &lt;span class=&quot;string&quot;&gt;&quot;*scratch*&quot;&lt;/span&gt;)&lt;br /&gt;     (insert txt &lt;span class=&quot;string&quot;&gt;&quot;\n&quot;&lt;/span&gt;))))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;search-all-buffers&lt;/span&gt; (srch-str &lt;span class=&quot;type&quot;&gt;&amp;amp;optional&lt;/span&gt; match-buffers)&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Search across all open buffers.&quot;&lt;/span&gt;&lt;br /&gt; (interactive &lt;span class=&quot;string&quot;&gt;&quot;sSearch String: \nsMatch Buffers: &quot;&lt;/span&gt;)&lt;br /&gt; (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; (buffer-re)&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (stringp match-buffers)&lt;br /&gt;       (setq buffer-re match-buffers)&lt;br /&gt;     (setq buffer-re &lt;span class=&quot;string&quot;&gt;&quot;.&quot;&lt;/span&gt;))&lt;br /&gt;   (multi-occur-in-matching-buffers buffer-re srch-str t)))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;todo&lt;/span&gt; ()&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Find all todo items in all buffers.&quot;&lt;/span&gt;&lt;br /&gt; (interactive)&lt;br /&gt; (multi-occur-in-matching-buffers &lt;span class=&quot;string&quot;&gt;&quot;.&quot;&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&quot;TODO: &quot;&lt;/span&gt; t))&lt;br /&gt;&lt;br /&gt;(&lt;span class=&quot;keyword&quot;&gt;defun&lt;/span&gt; &lt;span class=&quot;function-name&quot;&gt;multi-find-file&lt;/span&gt; (root-dir name-regx)&lt;br /&gt; &lt;span class=&quot;doc&quot;&gt;&quot;Find multiple files starting in root-dir and descending directories.&quot;&lt;/span&gt;&lt;br /&gt; (interactive &lt;span class=&quot;string&quot;&gt;&quot;sDirectory to search from: \nsMatch files Regx: &quot;&lt;/span&gt;)&lt;br /&gt; &lt;span class=&quot;comment-delimiter&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;(message (concat &quot;root-dir: &quot; root-dir))&lt;br /&gt;&lt;/span&gt;  &lt;span class=&quot;comment-delimiter&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;(message (concat &quot;name-regx: &quot; name-regx))&lt;br /&gt;&lt;/span&gt;  (&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (and (and (stringp root-dir) (&amp;gt; (length root-dir) 0))&lt;br /&gt;              (and (stringp name-regx) (&amp;gt; (length name-regx) 0)))&lt;br /&gt;   (&lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; ((files-to-open nil)&lt;br /&gt;         (subdirs nil)&lt;br /&gt;         (names-list nil))&lt;br /&gt;     (setq names-list (directory-files root-dir t))&lt;br /&gt;     (&lt;span class=&quot;keyword&quot;&gt;unless&lt;/span&gt; names-list (message &lt;span class=&quot;string&quot;&gt;&quot;names-list is nil.&quot;&lt;/span&gt;))&lt;br /&gt;     (&lt;span class=&quot;keyword&quot;&gt;dolist&lt;/span&gt; (name names-list)&lt;br /&gt;       &lt;span class=&quot;comment-delimiter&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;(message (concat &quot;file name: &quot; name))&lt;br /&gt;&lt;/span&gt;        (&lt;span class=&quot;keyword&quot;&gt;cond&lt;/span&gt;&lt;br /&gt;        ((file-directory-p name)  (&lt;span class=&quot;keyword&quot;&gt;unless&lt;/span&gt; (string-match &lt;span class=&quot;string&quot;&gt;&quot;[.]+$&quot;&lt;/span&gt; name) (setq subdirs (cons name subdirs))))&lt;br /&gt;        ((string-match name-regx (file-name-nondirectory name)) (setq files-to-open (cons name files-to-open)))&lt;br /&gt;        ))&lt;br /&gt;     (&lt;span class=&quot;keyword&quot;&gt;dolist&lt;/span&gt; (item files-to-open)&lt;br /&gt;       &lt;span class=&quot;comment-delimiter&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;(message (concat &quot;opening file &quot; item))&lt;br /&gt;&lt;/span&gt;        (find-file-other-window item))&lt;br /&gt;     (setq file-to-open nil)&lt;br /&gt;     (setq names-list nil)&lt;br /&gt;     (&lt;span class=&quot;keyword&quot;&gt;dolist&lt;/span&gt; (item subdirs)&lt;br /&gt;       &lt;span class=&quot;comment-delimiter&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;(message &quot;dropping into subdirectory.&quot;)&lt;br /&gt;&lt;/span&gt;        (multi-find-file item name-regx)))&lt;br /&gt;   (message &lt;span class=&quot;string&quot;&gt;&quot;Need values for root-dir and name-regx.&quot;&lt;/span&gt;)))&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/5614292198314814098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/5614292198314814098?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/5614292198314814098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/5614292198314814098'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2007/09/elisp-functions-for-emacs.html' title='elisp functions for emacs'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-2063155125077139143</id><published>2007-05-08T15:10:00.000-07:00</published><updated>2007-07-24T14:18:13.404-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Humor"/><title type='text'>Fat Dutch Guy</title><content type='html'>&lt;object width=&quot;425&quot; height=&quot;350&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/cPirDlJ1HO8&quot;&gt;&lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/cPirDlJ1HO8&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;425&quot; height=&quot;350&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/2063155125077139143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/2063155125077139143?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/2063155125077139143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/2063155125077139143'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2007/05/fat-dutch-guy.html' title='Fat Dutch Guy'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-6974389013768789052</id><published>2007-05-01T14:34:00.000-07:00</published><updated>2007-05-01T14:35:35.277-07:00</updated><title type='text'>Lets see how long this lasts</title><content type='html'>&lt;code&gt;The HD-DVD key. Fighting censorship.&lt;br /&gt;&lt;br /&gt;09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0&lt;/code&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/6974389013768789052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/6974389013768789052?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/6974389013768789052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/6974389013768789052'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2007/05/lets-see-how-long-this-lasts.html' title='Lets see how long this lasts'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-116889983189670002</id><published>2007-01-15T14:22:00.000-08:00</published><updated>2007-01-15T14:23:51.960-08:00</updated><title type='text'>Real life project management using Scrum</title><content type='html'>&lt;table xmlns=&quot;http://purl.org/atom/ns#&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;embed flashvars=&quot;&quot; id=&quot;VideoPlayback&quot; src=&quot;http://video.google.com/googleplayer.swf?docId=-2461467790752644622&amp;amp;hl=en&quot; style=&quot;width:400px; height:326px;&quot; type=&quot;application/x-shockwave-flash&quot;&gt; &lt;/embed&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr/&gt;&lt;tr&gt;&lt;td&gt;Dody Gunawinata, founder of Silverkey Technologies, explaining real life project management using Scrum.&lt;br /&gt;                &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/116889983189670002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/116889983189670002?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/116889983189670002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/116889983189670002'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2007/01/real-life-project-management-using.html' title='Real life project management using Scrum'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-116889436701752196</id><published>2007-01-15T12:51:00.000-08:00</published><updated>2007-01-15T12:52:47.026-08:00</updated><title type='text'>Scrum Tuning: Lessons learned from Scrum implementation at Google</title><content type='html'>&lt;table xmlns=&quot;http://purl.org/atom/ns#&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;embed flashvars=&quot;&quot; id=&quot;VideoPlayback&quot; src=&quot;http://video.google.com/googleplayer.swf?docId=8795214308797356840&amp;amp;hl=en&quot; style=&quot;width:400px; height:326px;&quot; type=&quot;application/x-shockwave-flash&quot;&gt; &lt;/embed&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr/&gt;&lt;tr&gt;&lt;td&gt;Google Tech Talks&lt;br /&gt;December 7, 2006&lt;br /&gt;&lt;br /&gt;ABSTRACT&lt;br /&gt;&lt;br /&gt;Adwords introduced a Scrum implementation at Google in small steps with remarkable success. As presented at the Agile 2006 conference this exemplifies a great way to start up Scrum teams. The inventor and Co-Creator of Scrum will use this approach in building the Google Scrum implementation to describe some of the subtle aspects of Scrum along with suggested next steps that can help in distributing and scaling Scrum in a &quot;Googly way&quot;.&lt;br /&gt;                &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/116889436701752196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/116889436701752196?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/116889436701752196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/116889436701752196'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2007/01/scrum-tuning-lessons-learned-from.html' title='Scrum Tuning: Lessons learned from Scrum implementation at Google'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-116889404029540574</id><published>2007-01-15T12:46:00.000-08:00</published><updated>2007-01-15T12:47:20.336-08:00</updated><title type='text'>Scrum et al.</title><content type='html'>&lt;table xmlns=&quot;http://purl.org/atom/ns#&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;embed flashvars=&quot;&quot; id=&quot;VideoPlayback&quot; src=&quot;http://video.google.com/googleplayer.swf?docId=-7230144396191025011&amp;amp;hl=en&quot; style=&quot;width:400px; height:326px;&quot; type=&quot;application/x-shockwave-flash&quot;&gt; &lt;/embed&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr/&gt;&lt;tr&gt;&lt;td&gt;Google Tech Talks&lt;br /&gt;September 5, 2006&lt;br /&gt;&lt;br /&gt;Ken Schwaber co-developed the Agile process, Scrum. He is a founder of the Agile Alliance and Scrum Alliance, and signatory to the Agile Manifesto. Ken has been a software developer for over thirty years. He is an active advocate and evangelist for Agile processes.&lt;br /&gt;&lt;br /&gt;ABSTRACT&lt;br /&gt;Scrum is an amazingly simple process that causes many, many changes when it is implemented. This seminar presents the basic framework of Scrum and some of the implementation issues associated with it.&lt;br /&gt;                &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/116889404029540574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/116889404029540574?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/116889404029540574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/116889404029540574'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2007/01/scrum-et-al.html' title='Scrum et al.'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-114537359189044022</id><published>2006-04-18T08:01:00.000-07:00</published><updated>2006-04-18T08:19:51.913-07:00</updated><title type='text'>Getting Started with Common Lisp, part 2</title><content type='html'>The first thing that you need to do when getting started with Common Lisp is to choose a Lisp implementation. Lisp has a standard, similar to C++. Choosing a Lisp implementation is similar to choosing a C++ compiler. Like C++ compilers, conformance to the standard varies. For this post I will only discuss Free CL implementations but there are a number of commercial CL implementations. If your lucky enough to be using Linux for development, there are quite a few Free CL implementations. You have the choice of CMUCL, SBCL, CLISP, GCL, and ECL. There are probably more but those are the ones I know of. I chose SBCL because of its speed and because ASDF comes pre-installed. (ASDF is a library management system similar to CPAN.)  SBCL can produce standalone executables. If you&#39;re stuck running Windows for some reason then your choices are somewhat more limited. There is CLISP, GCL and ECL. Under windows I chose CLISP because of it&#39;s standards conformance and because there are a lot of libraries that are known to work with it. It is also very cross platform. It will pretty much run under whatever OS you want. There are also a number of interop libraries for it so you can make use of windows specific features easily. CLISP uses a VM and byte code system, similar to Java, so it is not as fast as some of the other LISPs but it is  faster than Java.</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/114537359189044022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/114537359189044022?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/114537359189044022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/114537359189044022'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2006/04/getting-started-with-common-lisp-part_18.html' title='Getting Started with Common Lisp, part 2'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-114438222632970773</id><published>2006-04-06T20:35:00.000-07:00</published><updated>2006-04-06T20:57:06.346-07:00</updated><title type='text'>Getting Started with Common Lisp, part 1</title><content type='html'>I&#39;ve spent the last couple of months learning Lisp. I would say the hardest part about the process has been figuring out how to get a proper development process setup and learning how to install libraries.&lt;br /&gt;    Lisp is a significantly different environment than any of the other languages I have learned. It&#39;s not the syntax that is the real issue. Once you get used to prefix notation and how the libraries work, you really start to appreciate the language. If you get emacs setup correctly then Lisp syntax is actually easier than the more common languages. The bug hurdle in my adjustment to Lisp was getting used to working with the repl, learning about application images, learning how to work with SLIME and learning the primary library and application management system, which is called ASDF. Once you learn how to install ASDF, getting and installing libraries becomes simple, somewhat like CPAN or Python&#39;s easyInstall. The next few posts will be about how I overcame each of these hurdles and learning to appreciate Lisp and the Lisp way.</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/114438222632970773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/114438222632970773?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/114438222632970773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/114438222632970773'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2006/04/getting-started-with-common-lisp-part.html' title='Getting Started with Common Lisp, part 1'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-114186155292116089</id><published>2006-03-08T15:42:00.000-08:00</published><updated>2006-03-08T15:45:52.936-08:00</updated><title type='text'>Lisp in Python</title><content type='html'>I was browsing through some Lisp sites and came across this cool &lt;a href=&quot;http://ibiblio.org/obp/py4fun/lisp/lisp.html&quot;&gt;article&lt;/a&gt;. Describes and implements a Lisp interpreter in Python. There are some other cool articles on this &lt;a href=&quot;http://www.ibiblio.org/obp/py4fun/&quot;&gt;site&lt;/a&gt; as well.</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/114186155292116089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/114186155292116089?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/114186155292116089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/114186155292116089'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2006/03/lisp-in-python.html' title='Lisp in Python'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-113985725835672207</id><published>2006-02-13T10:54:00.001-08:00</published><updated>2006-02-13T11:06:33.780-08:00</updated><title type='text'>A nice series of introductory Python articles</title><content type='html'>This series (&lt;a href=&quot;http://www.linuxjournal.com/article/8729&quot;&gt;Part1&lt;/a&gt;, &lt;a href=&quot;http://www.linuxjournal.com/article/8794&quot;&gt;Part2&lt;/a&gt;, &lt;a href=&quot;http://www.linuxjournal.com/article/8858&quot;&gt;Part3&lt;/a&gt;, &lt;a href=&quot;http://www.linuxjournal.com/article/8859&quot;&gt;Part4 &lt;/a&gt; ) articles looks like a nice intro to Python.</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/113985725835672207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/113985725835672207?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113985725835672207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113985725835672207'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2006/02/nice-series-of-introductor_113985725835672207.html' title='A nice series of introductory Python articles'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-113796976761408843</id><published>2006-01-22T14:42:00.000-08:00</published><updated>2006-01-22T14:42:47.663-08:00</updated><title type='text'>Mastering Ajax, Part 2: Make asynchronous requests with JavaScript and Ajax</title><content type='html'>&lt;div xmlns=&quot;http://purl.org/atom/ns#&quot;&gt;      Part 2 goes into more depth on using XMLHttpRequest. It details some basic uses like error handling and call backs. Nice article.      &lt;p&gt;        Read more at        &lt;a href=&quot;http://www-128.ibm.com/developerworks/web/library/wa-ajaxintro2/?ca=dgr-lnxw07AJAX-Request&quot;&gt;www-128.ibm.com/develop...&lt;/a&gt;      &lt;/p&gt;    &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/113796976761408843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/113796976761408843?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113796976761408843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113796976761408843'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2006/01/mastering-ajax-part-2-make.html' title='Mastering Ajax, Part 2: Make asynchronous requests with JavaScript and Ajax'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-113796776229546120</id><published>2006-01-22T14:09:00.000-08:00</published><updated>2006-01-22T14:09:22.340-08:00</updated><title type='text'>Mastering Ajax, Part 1: Introduction to Ajax</title><content type='html'>&lt;div xmlns=&quot;http://purl.org/atom/ns#&quot;&gt;      &lt;p&gt;Yet another excellent Developer Works article. A nice intro to Ajax. Covers the basics of using the XMLHttpRequest object, including cross browser issues.&lt;/p&gt;      &lt;p&gt;        Read more at        &lt;a href=&quot;http://www-128.ibm.com/developerworks/java/library/wa-ajaxintro1.html&quot;&gt;www-128.ibm.com/develop...&lt;/a&gt;      &lt;/p&gt;    &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/113796776229546120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/113796776229546120?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113796776229546120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113796776229546120'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2006/01/mastering-ajax-part-1-introduction-to.html' title='Mastering Ajax, Part 1: Introduction to Ajax'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-113701657850600446</id><published>2006-01-11T13:54:00.000-08:00</published><updated>2006-01-11T13:56:18.526-08:00</updated><title type='text'>Another nice Python Tutorial</title><content type='html'>Nice tutorial. The color scheme is not so hot though.</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/113701657850600446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/113701657850600446?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113701657850600446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113701657850600446'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2006/01/another-nice-python-tutorial.html' title='Another nice Python Tutorial'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-113691061286698132</id><published>2006-01-10T08:23:00.000-08:00</published><updated>2006-01-10T08:30:12.886-08:00</updated><title type='text'>Discover Python</title><content type='html'>There is a nice set of introductory Python articles over on Developer works.</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/113691061286698132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/113691061286698132?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113691061286698132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113691061286698132'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2006/01/discover-python.html' title='Discover Python'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-113159696888985234</id><published>2005-11-09T20:08:00.000-08:00</published><updated>2005-11-09T20:29:28.933-08:00</updated><title type='text'>Planner Mode for EMACS</title><content type='html'>I came across Planner mode a couple of weeks ago. It has been working very well for me. It integrates with a variety of other EMACS applications. It is also able to keep track of time spent on a given task, which is handy for a number of uses.&lt;br /&gt;    In the past I have used a variety of contact management/calendaring software including Outlook and Evolution but they are big and bulky and get in the way. They are also overly complicated and it is hard to associate notes with a given piece of information.</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/113159696888985234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/113159696888985234?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113159696888985234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/113159696888985234'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2005/11/planner-mode-for-emacs.html' title='Planner Mode for EMACS'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-112736230918114890</id><published>2005-09-21T21:09:00.000-07:00</published><updated>2005-09-21T21:11:49.186-07:00</updated><title type='text'>Useful web site</title><content type='html'>This site has a lot of interesting articles on a number of different languages.</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/112736230918114890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/112736230918114890?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112736230918114890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112736230918114890'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2005/09/useful-web-site.html' title='Useful web site'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-112440681959872283</id><published>2005-08-18T16:08:00.000-07:00</published><updated>2005-08-18T16:13:39.603-07:00</updated><title type='text'>Very Interesting Lisp Primer</title><content type='html'>It gives a very nice history and current state of Common Lisp as well as pointers to a lot of additional material. &lt;a href=&quot;http://p-cos.net/lisp/guide.html&quot;&gt;Pascal Costanza&#39;s Highly Opinionated Guide to Lisp&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/112440681959872283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/112440681959872283?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112440681959872283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112440681959872283'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2005/08/very-interesting-lisp-primer.html' title='Very Interesting Lisp Primer'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-112270064454773796</id><published>2005-08-08T22:12:00.000-07:00</published><updated>2005-08-08T18:58:46.586-07:00</updated><title type='text'>Find &#39;hidden&#39; resources in extension DLL&#39;s</title><content type='html'>&lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;While creating your new, nifty grid control for your MFC extension DLL, you put your resources into your MFC extension control. Then when you compile and run your test application, or worse, your production application, it can’t find the controls resources. A worse problem is that it silently uses the wrong resources.&lt;/span&gt;&lt;/span&gt; &lt;p style=&quot;margin-top: 0.08in; margin-bottom: 0in; line-height: 0.21in; widows: 2; orphans: 2; color: rgb(0, 0, 0); font-weight: bold;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Identifying the problem&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;The problem is that MFC&lt;span style=&quot;font-size:78%;&quot;&gt;&lt;span style=&quot;font-family:Times New Roman,serif;&quot;&gt;&lt;!-- MFC stands for Microsoft Foundation classes which is the most commonly used class library I can think of. A class library is a bunch of pre-made programming code that you can use in your applications. --&gt;&lt;/span&gt;&lt;/span&gt; assumes that all of the applications&#39; resources reside in the main executable. There are two ways to solve this problem. The first method is to let MFC hunt for the correct resource using AfxFindResourceHandle. The second method revolves around treating the extension DLL like a separate resource DLL.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;However, there are significant disadvantages to both methods. The main disadvantage with the first method, which uses AfxFindResourceHandle, is that there can’t be any duplicate resource IDs in any of your applications DLL’s. Also, this method is slower.Both occur because AfxFindResourceHandle searches the entire link chain in the application and returns the first module with a matching resource.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;The primary disadvantage with the second method is that you have to explicitly get a handle to the target module; and since loading each kind of resource uses different functions, you end up with code that is almost identical for each kind of resource. &lt;/span&gt;&lt;/span&gt; &lt;/p&gt;  &lt;p style=&quot;margin-top: 0.08in; margin-bottom: 0in; line-height: 0.21in; widows: 2; orphans: 2; color: rgb(0, 0, 0); font-weight: bold;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Ask MFC politely for the resource&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;To have MFC do all the heavy lifting, call AfxFindResourceHandle, like this:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: -1in; margin-bottom: 0in; widows: 2; orphans: 2;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;font-family:Courier New,monospace;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;HINSTANCE hInst;&lt;br /&gt;HANDLE hIcon;&lt;br /&gt;hInst = AfxFindResourceHandle(MAKEINTRESOURCE(IDI_YOURICONHERE),       &lt;br /&gt;                            RT_GROUP_ICON);&lt;br /&gt;hIcon = FindResource(hInst, MAKEINTRESOURCE(IDI_YOURICONHERE),&lt;br /&gt;                   RT_GROUP_ICON);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;This will work fine--until someone adds an icon with a duplicate ID to the code base. There is one advantage to this method of loading a resource: You don’t have to know which module the resource resides in.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-top: 0.08in; margin-bottom: 0in; line-height: 0.21in; widows: 2; orphans: 2;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-weight: bold;&quot;&gt;When something can go wrong, it will.&lt;/span&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;&lt;span style=&quot;font-family:Times New Roman,serif;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;!-- This is paraphrased from Murphy’s Laws everybody must know them so I am attaching a copy. --&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Being a firm believer in Murphy’s Law; I like to be as explicit as possible. So I prefer the second method of loading resources in my extension DLL’s. Although it requires a little more investment upfront, it pays off when your code goes into maintenance mode. Basically, for each kind of resource you use in your extension DLL, you’ll write a function like this:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: -1in; margin-bottom: 0in; widows: 2; orphans: 2;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;font-family:Courier New,monospace;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;CString LoadResString(UINT ResID, CString strModuleName)&lt;br /&gt;{&lt;br /&gt;  TCHAR szBuffer[256];&lt;br /&gt;  //The module handle can be obtained in a variety of ways the&lt;br /&gt;  //following is the most&lt;br /&gt; //straight forward    &lt;br /&gt;  HMODULE mod = ::GetModuleHandle(strModuleName);&lt;br /&gt;  ASSERT(mod);&lt;br /&gt;  if (!mod){&lt;br /&gt;      AfxMessageBox(_T(&quot;GetModuleHandle failed in LoadResString.&quot;));&lt;br /&gt;                    RaiseException(1814, 0, 0, NULL);&lt;br /&gt;  }&lt;br /&gt;  //This is where the resource actually gets loaded and will be&lt;br /&gt;  //different in each function&lt;br /&gt;  int count = LoadString(mod, ResID, szBuffer, 255);&lt;br /&gt;  ASSERT(count);&lt;br /&gt;  if (!count){&lt;br /&gt;      AfxMessageBox(_T(&quot;LoadString failed in LoadResString.&quot;));&lt;br /&gt;      RaiseException(1814, 0, 0, NULL);&lt;br /&gt;  }&lt;br /&gt;  CString rslt(szBuffer);&lt;br /&gt;  return rslt;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-bottom: 0in; font-family: times new roman;&quot;&gt; MFC extension DLL’s are a nice feature but because of all the legacy code that Microsoft has to support we are stuck with some “interesting” features like this problem with MFC not looking in the extension DLL for resources first. It’s an easy problem to overcome but it can give you a headache the first time you encounter it. It doesn’t help that you have to know what the problem is before you can find the answer in the documentation. &lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; Technically, there is a third method for specifying which module to load resources from. I chose not to examine it in this article because it&#39;s an even less explicit than the AfxFindResourceHandle method.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/112270064454773796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/112270064454773796?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112270064454773796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112270064454773796'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2005/08/find-hidden-resources-in-extension.html' title='Find &#39;hidden&#39; resources in extension DLL&#39;s'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-112328091147283904</id><published>2005-08-05T15:21:00.000-07:00</published><updated>2005-08-05T15:28:31.476-07:00</updated><title type='text'>Marking an ActiveX object safe for scripting</title><content type='html'>I recently ran a cross a problem where I had to create a COM component for use in Internet Exploder. In order to mark component safe for scripting you need to add the following to your Python class.&lt;br /&gt;&lt;br /&gt;_reg_catids_ = [&quot;{7DD95801-9882-11CF-9FA9-00AA006C42C4}&quot;]&lt;br /&gt;&lt;br /&gt;Now the class won&#39;t cause Internet Exporer to prompt for permission to load the component. I wonder why there is such a spyware problem? :0</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/112328091147283904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/112328091147283904?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112328091147283904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112328091147283904'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2005/08/marking-activex-object-safe-for.html' title='Marking an ActiveX object safe for scripting'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-112270093514004020</id><published>2005-08-04T22:18:00.000-07:00</published><updated>2005-08-04T22:27:20.393-07:00</updated><title type='text'>Event logging the .NET way</title><content type='html'>&lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Those of you who have used the event logging API are in for a pleasant surprise. In the past, event logging required (comparatively) arduous coding. After creating an executable with specially formatted resources to be used as a message source, you had to register the message source. Then you finally got to write to the event log.&lt;/span&gt;&lt;/span&gt; &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;The System.Diagnostics name space contains (among other things) the event logging API. The two classes we&#39;ll focus on for reading and writing to the event log in .NET are the EventLog and the EventLogEntry classes.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-top: 0.08in; margin-bottom: 0in; line-height: 0.21in; widows: 2; orphans: 2; font-weight: bold; color: rgb(0, 0, 0);&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Write to the event log&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Writing to the event log in .NET follows the same basic procedure as using the Win32 API. First, open the event log.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: -1in; margin-bottom: 0in; widows: 2; orphans: 2;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;font-family:Courier New,monospace;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;//The period means this machine&lt;br /&gt;EventLog log = new EventLog(“Application”, “.”, “MySource”);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Then write the event:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: -1in; margin-bottom: 0in; widows: 2; orphans: 2;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;font-family:Courier New,monospace;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;log.WriteEntry(“Test message”, EventLogEntryType.Information);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-top: 0.08in; margin-bottom: 0in; line-height: 0.21in; widows: 2; orphans: 2; color: rgb(0, 0, 0); font-weight: bold;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Read from the event log&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Reading the event log the Win32 way requires you to open the log with the OpenEventLog function and retrieve a handle to the Event Log. Then you have to retrieve the EVENTLOGRECORD structure with the ReadEventLog function.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;The EVENTLOGRECORD structure has both static and dynamic fields. In order to access the dynamic fields of the structure such as the message and the source, you have to treat the structure like a byte array. To make things inconsistent, you access the static fields with the dot operator like normal. Although it’s not difficult, it can be error-prone, and if you miscount bytes, you&#39;ll get access violations or bad data.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Reading the event log the .NET way is much improved. Instead of dealing with an EVENTLOGRECORD structure, you get to deal with a much safer and easier EventLogEntry class. When you create an EventLog instance pointing at a specific log, the Entries property (which is an instance of the EventLogEntryCollection class) automatically fills with EventLogEntries. You can use the following code to access the Entries collection:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: -1in; margin-bottom: 0in; widows: 2; orphans: 2;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;font-family:Courier New,monospace;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;foreach EventLogEntry entry in eventLog.Entries{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Console.WriteLine(entry.Source);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Console.WriteLine(entry.Message);&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-top: 0.08in; margin-bottom: 0in; line-height: 0.21in; widows: 2; orphans: 2; color: rgb(0, 0, 0); font-weight: bold;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Create a custom event log&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;You can also create a custom event log by calling the static method CreateEventSource of the EventLog class. For example:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: -1in; margin-bottom: 0in; widows: 2; orphans: 2;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;font-family:Courier New,monospace;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;//Check to make sure that the source that will &lt;br/&gt;//be associated with the new log doesn’t exist. &lt;br/&gt;//SourceExists is also a static method&lt;br /&gt;if (!EventLog.SourceExists(“MySource”){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//If MyNewLog does not exist it will be created.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EventLog.CreateEventSource(“MySource”, “MyNewLog”);&lt;br /&gt;  }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;As the above code indicates, you can check to see if a source is registered. If the source name already exists, you could overwrite someone else’s source, creating havoc.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Compare the previous code to what you would have to do to create a custom event log with the Win32 API:&lt;span style=&quot;font-size:78%;&quot;&gt;&lt;span style=&quot;font-family:Times New Roman,serif;&quot;&gt; &lt;!-- This is a comparison of what you would have to do if you were using the Win32 API instead of .NET --&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ol&gt; &lt;li&gt;&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Create  a message file.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Compile it using the message compiler.(Be sure to include the created resource into the resources of the message synch DLL or Executable.)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Register  the message synch (which is about 100 lines of code) in the event  system by creating the requisite registry entries.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Take  a look at the keys under  HKLM\System\CurrentControlSet\Services\EventLog in the registry.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Open  and retrieve a handle to an event log.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family:Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Now  you can write the custom event log.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p style=&quot;margin-top: 0.08in; margin-bottom: 0in; line-height: 0.21in; widows: 2; orphans: 2; color: rgb(0, 0, 0); font-weight: bold;&quot; lang=&quot;en-US&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Conclusion&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;margin-right: 0.75in; text-indent: 0.13in; margin-bottom: 0in; line-height: 0.17in;&quot;&gt; &lt;span style=&quot;font-family:Arial,sans-serif;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;As you can see, event logging the .NET way is quite easy. The only drawback is that your application has to be running on a version of Windows based on Windows NT. But since Windows XP is the new consumer OS, this issue will soon be moot.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/112270093514004020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/112270093514004020?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112270093514004020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112270093514004020'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2005/08/event-logging-net-way.html' title='Event logging the .NET way'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14786774.post-112269964561078335</id><published>2005-08-01T21:57:00.000-07:00</published><updated>2006-08-22T23:16:19.323-07:00</updated><title type='text'>MASTER THE MYSTERIOUS EVENTLOGRECORD</title><content type='html'>&lt;p&gt;When dealing with the Windows event log, a developer usually only wants to write events to the log. The Event Viewer, on the other hand, is good at displaying event log messages and lets you view, sort, or filter these messages from a local or remote machine. However, sometimes it&#39;s necessary to read events from the log. For instance, if you&#39;re dealing with end users and you want the users to be able to click on an icon and have all relevant event log entries sent to you via e-mail.&lt;/p&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;OVERVIEW&lt;/span&gt;&lt;br /&gt;&lt;p&gt;If you look at the documentation for the event-logging API, it appears that reading entries from the log is as simple as this.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;       DWORD nBytesRead, nBytesMin;&lt;br /&gt;       EVENTLOGRECORD record;&lt;br /&gt;       HANDLE hEntry = OpenEventLog( NULL, &quot;Application&quot;);&lt;br /&gt;  &lt;br /&gt;       While(ReadEventLog(hEvent, EVENTLOG_SEQUENTIAL_READ |&lt;br /&gt;                          EVENTLOG_FORWARDS_READ,&lt;br /&gt;                          0, &amp;record, sizeof(EVENTLOGRECORD),&lt;br /&gt;                          &amp;amp;nBytesRead, &amp;nBytesMin)){&lt;br /&gt;              //Do something with record&lt;br /&gt;       }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;READING AN EVENT&lt;/span&gt;&lt;br /&gt;&lt;p&gt;There are a number of problems with the preceding code, which stem from the fact that EVENTLOGRECORD is a dynamic structure. If you look at the documentation for EVENTLOGRECORD, you&#39;ll see the following:&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;typedef struct _EVENTLOGRECORD {&lt;br /&gt;DWORD  Length;&lt;br /&gt;DWORD  Reserved;&lt;br /&gt;DWORD  RecordNumber;&lt;br /&gt;DWORD  TimeGenerated;&lt;br /&gt;DWORD  TimeWritten;&lt;br /&gt;DWORD  EventID;&lt;br /&gt;WORD   EventType;&lt;br /&gt;WORD   NumStrings;&lt;br /&gt;WORD   EventCategory;&lt;br /&gt;WORD   ReservedFlags;&lt;br /&gt;DWORD  ClosingRecordNumber;&lt;br /&gt;DWORD  StringOffset;&lt;br /&gt;DWORD  UserSidLength;&lt;br /&gt;DWORD  UserSidOffset;&lt;br /&gt;DWORD  DataLength;&lt;br /&gt;DWORD  DataOffset;&lt;br /&gt;//&lt;br /&gt;// Then follow:&lt;br /&gt;//&lt;br /&gt;// TCHAR SourceName[]&lt;br /&gt;// TCHAR Computername[]&lt;br /&gt;// SID   UserSid&lt;br /&gt;// TCHAR Strings[]&lt;br /&gt;// BYTE  Data[]&lt;br /&gt;// CHAR  Pad[]&lt;br /&gt;// DWORD Length;&lt;br /&gt;//&lt;br /&gt;} EVENTLOGRECORD, *PEVENTLOGRECORD;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;All of the fields in comments are just examples. Yet if you try to do something like this:&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;     _tcslen(record.SourceName);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;you&#39;ll get a compile error. All of the fields after DataOffset are one big buffer, and you have to treat it as such to work with it. For instance, to get the length of the SourceName field, you must do the following.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;        //precord is declared as a pointer to a byte buffer.&lt;br /&gt;        DWORD length = _tcslen((TCHAR*)precord + 56);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;The magic number 56 happens to be the total number of bytes preceding the SourceName field. So if you want to get the value of the ComputerName field, you use the following code:&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;        DWORD offset = 56 + _tcslen((TCHAR*)precord + 56) + 1;&lt;br /&gt;        //The +1 is for the NULL byte&lt;br /&gt;        DWORD length = _tcslen((TCHAR*)precord + offset)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;The other major problem is that there isn&#39;t a way to tell how big the EVENTLOGRECORD is ahead of time without attempting to read it. This means you have to call ReadEventLog log twice: the first time with parameters that you know will fail and the second time with the correct parameters. If you look at the last parameter, nBytesMin, this variable will contain the number of bytes necessary to read the requested number of records. If you didn&#39;t catch that, you can read multiple records with each call to ReadEventLog. Here&#39;s some code that works:&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  DWORD nBytesRead = 0;&lt;br /&gt;  DWORD nBytesMin = 0;&lt;br /&gt;  DWORD nBytesToRead = 0;&lt;br /&gt;  BYTE *precord = NULL;&lt;br /&gt;  BYTE fake[1];&lt;br /&gt;&lt;br /&gt;  HANDLE hEntry = OpenEventLog( NULL, &quot;Application&quot;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  //This one fails but gives us the event record size&lt;br /&gt;  ReadEventLog(hEvent, EVENTLOG_SEQUENTIAL_READ |&lt;br /&gt;               EVENTLOG_FORWARDS_READ,&lt;br /&gt;               0, fake, 1,&amp;nBytesRead, &amp;amp;nBytesMin);&lt;br /&gt;&lt;br /&gt;  nBytesToRead = nBytesMin;&lt;br /&gt;  precord = new BYTE[nBytesToRead];&lt;br /&gt;  ReadEventLog(hEvent, EVENTLOG_SEQUENTIAL_READ |&lt;br /&gt;               EVENTLOG_FORWARDS_READ, 0,&lt;br /&gt;               precord, nBytesToRead, &amp;nBytesRead,&lt;br /&gt;               &amp;amp;nBytesMin);//read one record&lt;br /&gt;&lt;br /&gt;Now we extract some fields.&lt;br /&gt;&lt;br /&gt;   CString SourceName(precord + 56);&lt;br /&gt;   CString ComputerName(precord + 56 + SourceName.GetLength() + 1);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SUMMARY&lt;/span&gt;&lt;br /&gt;&lt;p&gt;Even though the event log API isn&#39;t the most difficult to master, it isn&#39;t well documented or obvious. Yet once you master the EVENTLOGRECORD structure, it&#39;s smooth sailing.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://stormcoders.blogspot.com/feeds/112269964561078335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/14786774/112269964561078335?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112269964561078335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14786774/posts/default/112269964561078335'/><link rel='alternate' type='text/html' href='http://stormcoders.blogspot.com/2005/08/master-mysterious-eventlogrecord.html' title='MASTER THE MYSTERIOUS EVENTLOGRECORD'/><author><name>Mike</name><uri>http://www.blogger.com/profile/00898991996792619958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>