<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>C L Snyder &#187; Computer</title>
	<atom:link href="http://www.clsnyder.com/WordPress/category/computer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clsnyder.com/WordPress</link>
	<description>Kaizen with Sprezzatura</description>
	<lastBuildDate>Mon, 06 Feb 2012 22:52:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Tutorial &#8211; Zotero for citations</title>
		<link>http://www.clsnyder.com/WordPress/2010/07/11/how-to-use-zotero-for-citations/</link>
		<comments>http://www.clsnyder.com/WordPress/2010/07/11/how-to-use-zotero-for-citations/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 21:50:56 +0000</pubDate>
		<dc:creator>clsnyder</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Pediatric Surgery]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.clsnyder.com/WordPress/?p=1031</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="660" height="405"><param name="movie" value="http://www.youtube.com/v/JyPSVpvJzkQ&amp;hl=en_US&amp;fs=1?color1=0x006699&amp;color2=0x54abd6&amp;border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/JyPSVpvJzkQ&amp;hl=en_US&amp;fs=1?color1=0x006699&amp;color2=0x54abd6&amp;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="660" height="405"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clsnyder.com/WordPress/2010/07/11/how-to-use-zotero-for-citations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Semantic Web</title>
		<link>http://www.clsnyder.com/WordPress/2010/05/10/918/</link>
		<comments>http://www.clsnyder.com/WordPress/2010/05/10/918/#comments</comments>
		<pubDate>Mon, 10 May 2010 20:19:31 +0000</pubDate>
		<dc:creator>clsnyder</dc:creator>
				<category><![CDATA[Computer]]></category>

		<guid isPermaLink="false">http://www.clsnyder.com/WordPress/?p=918</guid>
		<description><![CDATA[Web 3.0 from Kate Ray on Vimeo.]]></description>
			<content:encoded><![CDATA[<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=11529540&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=11529540&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a href="http://vimeo.com/11529540">Web 3.0</a> from <a href="http://vimeo.com/kateray">Kate Ray</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clsnyder.com/WordPress/2010/05/10/918/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Liquid Galaxy</title>
		<link>http://www.clsnyder.com/WordPress/2010/04/27/google-liquid-galaxy/</link>
		<comments>http://www.clsnyder.com/WordPress/2010/04/27/google-liquid-galaxy/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 02:59:37 +0000</pubDate>
		<dc:creator>clsnyder</dc:creator>
				<category><![CDATA[Computer]]></category>

		<guid isPermaLink="false">http://www.clsnyder.com/WordPress/?p=914</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/atV2foTBbyE&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/atV2foTBbyE&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clsnyder.com/WordPress/2010/04/27/google-liquid-galaxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.Emacs for Windows 29 Jun 2009</title>
		<link>http://www.clsnyder.com/WordPress/2009/06/29/emacs-for-windows-29-jun-2009/</link>
		<comments>http://www.clsnyder.com/WordPress/2009/06/29/emacs-for-windows-29-jun-2009/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 20:55:42 +0000</pubDate>
		<dc:creator>clsnyder</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://www.clsnyder.com/WordPress/?p=491</guid>
		<description><![CDATA[(setq load-path (cons "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/org-6.27a/" load-path)) (add-to-list 'load-path "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/remember/") (require 'org) (require 'remember) (require 'org-install) (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) (global-font-lock-mode 1) ; for all buffers &#8230; <a href="http://www.clsnyder.com/WordPress/2009/06/29/emacs-for-windows-29-jun-2009/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<pre class="prettyprint">
(setq load-path (cons "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/org-6.27a/" load-path))
(add-to-list 'load-path "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/remember/")

(require 'org)
(require 'remember)
(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))

(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)

(global-font-lock-mode 1)                     ; for all buffers
(add-hook 'org-mode-hook 'turn-on-font-lock)  ; Org buffers only

(defalias 'list-buffers 'ibuffer)
(defconst cls-tmp-dir    "~/.emacs.tmp")

(setq org-log-done t)
(setq org-directory "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org")
(setq org-default-notes-file "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/notes.org")

(setq remember-annotation-functions '(org-remember-annotation))
(setq remember-handler-functions '(org-remember-handler))
(add-hook 'remember-mode-hook 'org-remember-apply-template)
(define-key global-map "\C-cr" 'org-remember)

(setq org-remember-templates
    '(("Todo" ?t "* TODO %? %T %^g\n %i\n " "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/personal.org" )
     ("Journal" ?j "\n* %^{topic} %T \n%i%?\n" "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/journal.org")
     ("Reference" ?r "\n* %^{topic} %T \n%i%?\n" "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/reference.org")
     ("Notes" ?n "\n* %^{topic} %T \n%i%?\n" "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/notes.org")
     ("Contact" ?c "\n* %^{Name} :CONTACT:\n%[C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/contacts.txt]\n"
              "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/")
     ))

(require 'org-publish)
(setq org-publish-project-alist
      '(
	      ("org-notes"
		 :base-directory "~/org/"
		 :base-extension "org"
		 :publishing-directory "~/public_html/"
		 :recursive t
		 :publishing-function org-publish-org-to-html
		 :headline-levels 4             ; Just the default for this project.
		 :auto-preamble t
	         :auto-index t                  ; Generate index.org automagically...
		 :index-filename "sitemap.org"  ; ... call it sitemap.org ...
		 :index-title "Sitemap"         ; ... with title 'Sitemap'.
		 )
		("org-static"
		 :base-directory "~/org/"
		 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
		 :publishing-directory "~/public_html/"
		 :recursive t
		 :publishing-function org-publish-attachment
		 )
		("org" :components ("org-notes" "org-static"))
      ))

(setq org-agenda-custom-commands
      '(("p" . "Priorities")
        ("pa" "A items" tags-todo "+PRIORITY=\"A\"")
        ("pb" "B items" tags-todo "+PRIORITY=\"B\"")
        ("pc" "C items" tags-todo "+PRIORITY=\"C\"")
        ;; ...other commands here
        ))

;; To change the location of the annotation file:
(setq org-annotate-file-storage-file "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/annotated.org")
(setq org-annotate-file-add-search t)

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(cua-mode t nil (cua-base))
 '(inhibit-startup-screen t)
 '(org-agenda-files (quote ("C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/personal.org")))
 '(show-paren-mode t)
 '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
 '(transient-mark-mode t))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

(defun wc ()
  (interactive)
  (message "Word count: %s" (how-many "\\w+" (point-min) (point-max))))

(defun run-current-file ()
(interactive)
  (let (ext-map file-name file-ext prog-name cmd-str)
; get the file name
; get the program name
; run it
    (setq ext-map
          '(
            ("pl" . "perl")
            ("py" . "python")
            ("sh" . "bash")
            ("rb" . "ruby")
            )
          )
    (setq file-name (buffer-file-name))
    (setq file-ext (file-name-extension file-name))
    (setq prog-name (cdr (assoc file-ext ext-map)))
    (setq cmd-str (concat prog-name " " file-name))
    (shell-command cmd-str)))

(define-key global-map "\C-c9" 'run-current-file)
(global-set-key (kbd "M-S-<f1>") ;; open my personal.org file
  (lambda()(interactive)(find-file "C:/Documents and Settings/csnyder/Desktop/My Dropbox/emacs_org/personal.org")))

;; backups
(setq cls-backup-dir (concat cls-tmp-dir "/backups"))
(setq make-backup-files t ;; do make backups
  backup-by-copying t     ;; and copy them here
  backup-directory-alist '(("." . "~/.emacs.tmp/backups")) ;; FIXME
  version-control t
  kept-new-versions 2
  kept-old-versions 5
  delete-old-versions t)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.clsnyder.com/WordPress/2009/06/29/emacs-for-windows-29-jun-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dot emacs file mac 19June2009</title>
		<link>http://www.clsnyder.com/WordPress/2009/06/20/dot-emacs-file-mac-19june2009/</link>
		<comments>http://www.clsnyder.com/WordPress/2009/06/20/dot-emacs-file-mac-19june2009/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 22:41:06 +0000</pubDate>
		<dc:creator>clsnyder</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://www.clsnyder.com/WordPress/2009/06/20/dot-emacs-file-mac-19june2009/</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 &#8230; <a href="http://www.clsnyder.com/WordPress/2009/06/20/dot-emacs-file-mac-19june2009/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
</pre></td><td class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> load-path <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span> <span style="color: #ff0000;">&quot;/Users/clsnyder/emacs_org/org-6.27a/lisp&quot;</span> load-path<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>add-to-<span style="color: #b1b100;">list</span> 'load-path <span style="color: #ff0000;">&quot;/Users/clsnyder/emacs_org/remember&quot;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>require 'org<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>require 'remember<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>require 'org-install<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>add-to-<span style="color: #b1b100;">list</span> 'auto-mode-alist '<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>.org<span style="color: #000099; font-weight: bold;">\\</span>'&quot;</span> <span style="color: #66cc66;">.</span> org-mode<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>add-to-<span style="color: #b1b100;">list</span> 'auto-mode-alist '<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>.org<span style="color: #000099; font-weight: bold;">\\</span>'&quot;</span> <span style="color: #66cc66;">.</span> org-mode<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>global-set-key <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\C</span>-cl&quot;</span> 'org-store-link<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>global-set-key <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\C</span>-ca&quot;</span> 'org-agenda<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>global-set-key <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\C</span>-cb&quot;</span> 'org-iswitchb<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>global-font-lock-mode <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>                     <span style="color: #808080; font-style: italic;">; for all buffers</span>
<span style="color: #66cc66;">&#40;</span>add-hook 'org-mode-hook 'turn-on-font-lock<span style="color: #66cc66;">&#41;</span>  <span style="color: #808080; font-style: italic;">; Org buffers only</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> org-log-done t<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> org-directory <span style="color: #ff0000;">&quot;~/Dropbox/emacs_org&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> org-default-notes-file <span style="color: #ff0000;">&quot;~/Dropbox/emacs_org/notes.org&quot;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> remember-annotation-functions '<span style="color: #66cc66;">&#40;</span>org-remember-annotation<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> remember-handler-functions '<span style="color: #66cc66;">&#40;</span>org-remember-handler<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>add-hook 'remember-mode-hook 'org-remember-apply-template<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>define-key global-map <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\C</span>-cr&quot;</span> 'org-remember<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> org-remember-templates
    '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Todo&quot;</span> ?t <span style="color: #ff0000;">&quot;* TODO %? %T %^g<span style="color: #000099; font-weight: bold;">\n</span> %i<span style="color: #000099; font-weight: bold;">\n</span> &quot;</span> <span style="color: #ff0000;">&quot;~/Dropbox/emacs_org/personal.org&quot;</span> <span style="color: #66cc66;">&#41;</span>
     <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Journal&quot;</span> ?j <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>* %^{topic} %T <span style="color: #000099; font-weight: bold;">\n</span>%i%?<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #ff0000;">&quot;~/Dropbox/emacs_org/journal.org&quot;</span><span style="color: #66cc66;">&#41;</span>
     <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Reference&quot;</span> ?r <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>* %^{topic} %T <span style="color: #000099; font-weight: bold;">\n</span>%i%?<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #ff0000;">&quot;~/Dropbox/emacs_org/reference.org&quot;</span><span style="color: #66cc66;">&#41;</span>
     <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Notes&quot;</span> ?n <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>* %^{topic} %T <span style="color: #000099; font-weight: bold;">\n</span>%i%?<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #ff0000;">&quot;~/Dropbox/emacs_org/notes.org&quot;</span><span style="color: #66cc66;">&#41;</span>
     <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Contact&quot;</span> ?c <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>* %^{Name} :CONTACT:<span style="color: #000099; font-weight: bold;">\n</span>%[~/Dropbox/emacs_org/contacts.txt]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> 
              <span style="color: #ff0000;">&quot;~/Dropbox/emacs_org/contacts.org&quot;</span><span style="color: #66cc66;">&#41;</span>
     <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> org-agenda-custom-commands
      '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;p&quot;</span> <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;Priorities&quot;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;pa&quot;</span> <span style="color: #ff0000;">&quot;A items&quot;</span> tags-todo <span style="color: #ff0000;">&quot;+PRIORITY=<span style="color: #000099; font-weight: bold;">\&quot;</span>A<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;pb&quot;</span> <span style="color: #ff0000;">&quot;B items&quot;</span> tags-todo <span style="color: #ff0000;">&quot;+PRIORITY=<span style="color: #000099; font-weight: bold;">\&quot;</span>B<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;pc&quot;</span> <span style="color: #ff0000;">&quot;C items&quot;</span> tags-todo <span style="color: #ff0000;">&quot;+PRIORITY=<span style="color: #000099; font-weight: bold;">\&quot;</span>C<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #808080; font-style: italic;">;; ...other commands here</span>
        <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;">;;</span>
<span style="color: #808080; font-style: italic;">;; To change the location of the annotation file:</span>
<span style="color: #808080; font-style: italic;">;;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> org-annotate-file-storage-file <span style="color: #ff0000;">&quot;~/Dropbox/emacs_org/annotated.org&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> org-annotate-file-add-search t<span style="color: #66cc66;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #66cc66;">&#40;</span>custom-set-variables
  <span style="color: #808080; font-style: italic;">;; custom-set-variables was added by Custom.</span>
  <span style="color: #808080; font-style: italic;">;; If you edit it by hand, you could mess it up, so be careful.</span>
  <span style="color: #808080; font-style: italic;">;; Your init file should contain only one such instance.</span>
  <span style="color: #808080; font-style: italic;">;; If there is more than one, they won't work right.</span>
 '<span style="color: #66cc66;">&#40;</span>cua-mode t <span style="color: #b1b100;">nil</span> <span style="color: #66cc66;">&#40;</span>cua-base<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
 '<span style="color: #66cc66;">&#40;</span>org-agenda-files <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">quote</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;~/Dropbox/emacs_org/personal.org&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
 '<span style="color: #66cc66;">&#40;</span>show-paren-mode t<span style="color: #66cc66;">&#41;</span>
 '<span style="color: #66cc66;">&#40;</span>text-mode-hook <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">quote</span> <span style="color: #66cc66;">&#40;</span>turn-on-auto-fill text-mode-hook-identify<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
 '<span style="color: #66cc66;">&#40;</span>transient-mark-mode t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>custom-set-faces
  <span style="color: #808080; font-style: italic;">;; custom-set-faces was added by Custom.</span>
  <span style="color: #808080; font-style: italic;">;; If you edit it by hand, you could mess it up, so be careful.</span>
  <span style="color: #808080; font-style: italic;">;; Your init file should contain only one such instance.</span>
  <span style="color: #808080; font-style: italic;">;; If there is more than one, they won't work right.</span>
 <span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> wc <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span>interactive<span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span>message <span style="color: #ff0000;">&quot;Word count: %s&quot;</span> <span style="color: #66cc66;">&#40;</span>how-many <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>w+&quot;</span> <span style="color: #66cc66;">&#40;</span>point-<span style="color: #b1b100;">min</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>point-<span style="color: #b1b100;">max</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> run-current-file <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>interactive<span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span>ext-map file-<span style="color: #b1b100;">name</span> file-ext prog-<span style="color: #b1b100;">name</span> cmd-str<span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">; get the file name</span>
<span style="color: #808080; font-style: italic;">; get the program name</span>
<span style="color: #808080; font-style: italic;">; run it</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> ext-map
          '<span style="color: #66cc66;">&#40;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;pl&quot;</span> <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;perl&quot;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;py&quot;</span> <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;python&quot;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;sh&quot;</span> <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;bash&quot;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;rb&quot;</span> <span style="color: #66cc66;">.</span> <span style="color: #ff0000;">&quot;ruby&quot;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#41;</span>
          <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> file-<span style="color: #b1b100;">name</span> <span style="color: #66cc66;">&#40;</span>buffer-file-<span style="color: #b1b100;">name</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> file-ext <span style="color: #66cc66;">&#40;</span>file-name-extension file-<span style="color: #b1b100;">name</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> prog-<span style="color: #b1b100;">name</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">assoc</span> file-ext ext-map<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> cmd-str <span style="color: #66cc66;">&#40;</span>concat prog-<span style="color: #b1b100;">name</span> <span style="color: #ff0000;">&quot; &quot;</span> file-<span style="color: #b1b100;">name</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span>shell-command cmd-str<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>define-key global-map <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\C</span>-c9&quot;</span> 'run-current-file<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">; return a backup file path of a give file path</span>
<span style="color: #808080; font-style: italic;">; with full directory mirroring from a root dir</span>
<span style="color: #808080; font-style: italic;">; non-existant dir will be created</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> my-backup-file-<span style="color: #b1b100;">name</span> <span style="color: #66cc66;">&#40;</span>fpath<span style="color: #66cc66;">&#41;</span>
  <span style="color: #ff0000;">&quot;Return a new file path of a given file path.
If the new path's directories does not exist, create them.&quot;</span>
  <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span>backup-root bpath<span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> backup-root <span style="color: #ff0000;">&quot;~/Dropbox/emacs_org/emacs-backup&quot;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> bpath <span style="color: #66cc66;">&#40;</span>concat backup-root fpath <span style="color: #ff0000;">&quot;~&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span>make-directory <span style="color: #66cc66;">&#40;</span>file-name-directory bpath<span style="color: #66cc66;">&#41;</span> bpath<span style="color: #66cc66;">&#41;</span>
    bpath
  <span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> make-backup-file-name-<span style="color: #b1b100;">function</span> 'my-backup-file-<span style="color: #b1b100;">name</span><span style="color: #66cc66;">&#41;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.clsnyder.com/WordPress/2009/06/20/dot-emacs-file-mac-19june2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Repeating events in org-mode</title>
		<link>http://www.clsnyder.com/WordPress/2009/06/17/repeating-events-in-org-mode/</link>
		<comments>http://www.clsnyder.com/WordPress/2009/06/17/repeating-events-in-org-mode/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 02:04:53 +0000</pubDate>
		<dc:creator>clsnyder</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://www.clsnyder.com/WordPress/?p=442</guid>
		<description><![CDATA[This is from org mode forum: I am reading the Org-mode Release 6.27a manual to learn new things. and just discovered the C-c C-x c (clone subtree) command. This makes copies of a tree and inserts them as siblings. The &#8230; <a href="http://www.clsnyder.com/WordPress/2009/06/17/repeating-events-in-org-mode/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is from org mode forum:</p>
<p>I am reading the Org-mode Release 6.27a manual to learn new things.<br />
and just discovered the C-c C-x c  (clone subtree) command.</p>
<p>This makes copies of a tree and inserts them as siblings. The command<br />
prompts you for the number of copies to make. The really useful<br />
feature is to update dates according to a pattern. </p>
<p>Here is an example of creating headings for each of the next six months:</p>
<p>Start with this:</p>
<p>** First of the month<br />
*** July<br />
    SCHEDULED: <2009-07-01 Wed></p>
<p>Position the cursor to the beginning of the line *** July<br />
then issue the C-c C-x c </p>
<p>Answer the question &#8220;Number of clones to produce:&#8221;  with 6</p>
<p>Next question is<br />
&#8220;Date shift per clone (e.g. +1w, empty to copy unchanged): &#8221;</p>
<p>Answer it +1m and the tree looks like:</p>
<p>*** July<br />
    SCHEDULED: <2009-07-01 Wed><br />
*** July<br />
    SCHEDULED: <2009-08-01 Sat><br />
*** July<br />
    SCHEDULED: <2009-09-01 Tue><br />
*** July<br />
    SCHEDULED: <2009-10-01 Thu><br />
*** July<br />
    SCHEDULED: <2009-11-01 Sun><br />
*** July<br />
    SCHEDULED: <2009-12-01 Tue><br />
*** July<br />
    SCHEDULED: <2010-01-01 Fri></p>
<p>Now you just have to change the occurrences of July to the real<br />
month names!   </p>
]]></content:encoded>
			<wfw:commentRss>http://www.clsnyder.com/WordPress/2009/06/17/repeating-events-in-org-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Create Dictionary.html from double colon files</title>
		<link>http://www.clsnyder.com/WordPress/2008/06/20/ruby-create-dictionaryhtml-from-double-colon-files/</link>
		<comments>http://www.clsnyder.com/WordPress/2008/06/20/ruby-create-dictionaryhtml-from-double-colon-files/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 03:06:40 +0000</pubDate>
		<dc:creator>clsnyder</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.clsnyder.com/WordPress/?p=220</guid>
		<description><![CDATA[This takes a text file of the form below and creates an html dictionary version with a TOC : Ambiguous Genitalia Overview:: Four major defects can cause gender confusion in the neonate: 1) female pseudohermaphroditism or adrenogentital syndrome, 2) male &#8230; <a href="http://www.clsnyder.com/WordPress/2008/06/20/ruby-create-dictionaryhtml-from-double-colon-files/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This takes a text file of the form below and creates an html dictionary version with a TOC :</p>
<p><code><br />
Ambiguous Genitalia</p>
<p>Overview:: Four major defects can cause gender confusion in the neonate: 1) female pseudohermaphroditism or adrenogentital syndrome, 2) male pseudohermaphroditism, 3) true hermaphroditism, and 4) mixed gonadal dysgenesis. A physical examination and a chromosome analysis can make the correct diagnosis with approximately 90% accuracy. Gonadal symmetry is sought for - if there is symmetry  in the gonadal findings, then the diagnosis is most likely a causative agent applied equally to both sides, such as an androgenized genetic female (=female pseudohermaphroditism) or an incompletely virilized genetic male (= male pseudohermaphroditism). Asymmetry  refers to position of one gonad to the other, relative to the external inguinal ring.  A buccal smear is felt by some  to be useful in that Barr or Chromatin bodies (indicative of the presence of the second female X chromosome) may be found. Therefore: 1) Chromatin Positive, Symmetry = Fem pseudoherm; 2) Chromatin Positive, Asymmetry =	True herm; 3) Chromatin Negative,Symmetry = Male pseudoherm; 5) Chromatin Negative, Asymmetry = Mixed gonad dysgen.			</p>
<p>Caveats:: Genetic females recognized in the neonatal period historically were raised as female no matter how virilized. This is not currently the case. In genetic males the gender assignment was traditionally based on the phallus size - anyone with an 'inadequate' phallus is raised as a female. What constitutes an inadequate phallus ? Absolute values are impossible, but the measurements are made from the dorsum to the tip of the stretched glans. The following are 'inadequate': < 2.5 cm in the term infant; < 2.0 cm in the 34 week premie; < 1.5 cm in the 30 week preemie. Additionally, a thin (< 1 to 1.5 cm diameter) phallus is of concern. An elevated or normal MIS levels signifies a functioning testis. </p>
<p>Clinical:: The following work-up of the child with AG (ambiguous genitalia) may be indicated:H &#038; P, HCG stimulation and enzyme ratios, Family pedigree, Genitogram, Maternal drug history, Cystoscopy, Buccal smear with Y fluorescence, Laparoscopy, Urinary steroids, Gonadal biopsy (longitudinal), Electrolytes,Androgen receptors (genital skin).</p>
<p>Female pseudohermaphroditism - Description:: (approximately 1/3 of all patients). This refers to 46, XX karyotype patients with severe masculinization secondary to exposure in utero to either endogenous or exogenous androgens. </p>
<p>Female pseudohermaphroditism - Etiology::The most common cause is the adrenogenital syndrome (CAH). CAH is the only cause of ambiguous genitalia that is life-threatening in the newborn period. 95% of these patients will have a 21-hydroxlyase deficiency. The gene for 21 hydroxylase has 2 alleles coded for in the Class II MHComplex, and there is therefore an A and B form of 21 OHase deficiency  - the common form is the B variant. Mutations in the A genes result in milder, later onset forms of the disease. 21 hydroxylase deficiency results in aldosterone (mineralocorticoid) and cortisol (glucocorticoid) deficiencies, resulting in salt-wasting, hypotension, and adrenal crises. Other etiologies include 3 beta and 11 hydroxylase deficiencies. The 21, 3, and 11 are all forms of congenital adrenal hyperplasia (CAH). 11Beta OHase deficiency results in mild virilism (in affected females) and hypertension. In this variant, both mineralocorticoid and steroid replacement should be provided, since steroids alone may suppress the mineralocorticoid.  </p>
<p>Female pseudohermaphroditism - Evaluation::The prenatal diagnosis of CAH can be made from DNA analysis of CVS (chorionic villous sampling) or amniotic fluid hormone levels during or after the 2nd trimester. The best way to test for CAH is to look for elevated precursors: {Deficiency,Elevated Precursor,Frequency} = [21 Hydroxylase;	17 hydroxyprogesterone;	95% cases] and [3BetaSteroid dehydrogenase; 17 hydroxypregnenolone: < 5% cases] and [11 Beta hydroxylase; 11 deoxycortisol; rare]. Clinically, prompt identification of patients with CAH is critical. Virilization is present in the female, and in the male only barely identifiable hyperpigmentation of the scrotum may be present. The history of an early or unexplained death in a sibling should alert one to the possibility. A filter-paper test for the most common defect (test is for 17 hydroxyprogesterone) is available. ECG findings of peaked T waves or arrhythmia's may be the first sign. Internal structures are normal, and only the external structures are affected (this is true because the adrenal develops after the 11th week of gestation when the internal structures are already formed). All genetically female patients have the potential to be fertile and should be raised as females. The phenotype is variable from very male appearing to milder forms. The life-threatening electrolyte abnormalities (hyperkalemia, hyponatremia) may not occur until 3 - 5 days after birth, and the adrenal crisis may not occur until 1-2 weeks of age. </p>
<p>Female pseudohermaphroditism - Treatment:: Can even be preventative, if CAH is identified prenatally - dexamethasone is given (1 - 1.5 mg, daily in 2 divided doses) to the mother, starting at the 6 - 7th week of gestation (before sexual differentiation). CVS is used to assess therapy - if the fetus is genetically male, Tx is stopped, if the fetus is female, Tx is continued until amniocentesis during 2nd trimester to confirm the Dx. Fetoscopy has been used to evaluate the external genitalia. Medical management of CAH consists of provision of glucocorticoid (hydrocortisone, 12.5 -15 mg/M2 q 8 hrs, provision of mineralocorticoid (Fludrocortisone 0.1mg q am), hydration, correction of Na, K+ abnormalities. All patients with female pseudohermaphroditism should be raised as females. Surgically, clitoral recession is done in the early neonatal period, and a cutback or flap vaginoplasty is usually done at 3 - 6 months of age. A pull-through vaginoplasty is usually delayed until about 2 years of age. Which of these is required depends on the level of entry of the vagina into the urogenital sinus.</p>
<p>Male Pseudohermaphroditism - General:: Accounts for approximately 1/3 of all patients. These patients have a 46 X,Y karyotype but deficient masculinization of the external genitalia. The effects of androgens on sexual differentiation are via receptors in the nucleus. </p>
<p>etc.......</p>
<p></code></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">p</span> <span style="color:#996600;">&quot;Enter a title&quot;</span>
title  = <span style="color:#CC0066; font-weight:bold;">gets</span>.<span style="color:#CC0066; font-weight:bold;">chomp</span>
dict = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#CC00FF; font-weight:bold;">IO</span>.<span style="color:#9900CC;">foreach</span><span style="color:#006600; font-weight:bold;">&#40;</span>title <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;.txt&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
<span style="color:#006600; font-weight:bold;">|</span>x<span style="color:#006600; font-weight:bold;">|</span> 
<span style="color:#9966CC; font-weight:bold;">if</span>
y = <span style="color:#006600; font-weight:bold;">/</span>::<span style="color:#006600; font-weight:bold;">/</span>.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span>x<span style="color:#006600; font-weight:bold;">&#41;</span>
y = y.<span style="color:#9900CC;">pre_match</span>
z=<span style="color:#006600; font-weight:bold;">/</span>::<span style="color:#006600; font-weight:bold;">/</span>.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span>x<span style="color:#006600; font-weight:bold;">&#41;</span>
z = z.<span style="color:#9900CC;">post_match</span>
dict<span style="color:#006600; font-weight:bold;">&#91;</span>y<span style="color:#006600; font-weight:bold;">&#93;</span> = z
<span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#CC00FF; font-weight:bold;">File</span>::<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span>title <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">'.htm'</span>, <span style="color:#996600;">'w'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span>
	f.<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;&lt;HTML&gt;<span style="color:#000099;">\n</span>&lt;link href='Level3_3.css' rel='stylesheet' type='text/css'&gt;&lt;HEAD&gt;&lt;TITLE&gt;&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> title <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;&lt;/TITLE&gt;&lt;/HEAD&gt;&quot;</span>
	f.<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;&lt;CENTER&gt;&lt;A NAME=<span style="color:#000099;">\&quot;</span>page_top<span style="color:#000099;">\&quot;</span>&gt;&lt;H1&gt;&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> title <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;&lt;/H1&gt;&lt;/A&gt;&quot;</span>	
  	f.<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;by Charles L. Snyder, MD&lt;BR&gt;<span style="color:#000099;">\n</span>&quot;</span>
	f.<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;&lt;/CENTER&gt;<span style="color:#000099;">\n</span>&lt;HR&gt;<span style="color:#000099;">\n</span>&quot;</span>
	dict.<span style="color:#9900CC;">keys</span>.<span style="color:#9900CC;">sort</span>.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">|</span>s<span style="color:#006600; font-weight:bold;">|</span> f.<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;&lt;br&gt;#{s}&lt;/br&gt;&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
	f.<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;&lt;/CENTER&gt;<span style="color:#000099;">\n</span>&lt;HR&gt;<span style="color:#000099;">\n</span>&quot;</span>
  i=<span style="color:#006666;">0</span>
  <span style="color:#9966CC; font-weight:bold;">while</span> i <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#006600; font-weight:bold;">&#40;</span>dict.<span style="color:#9900CC;">length</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  f.<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;&lt;A NAME=<span style="color:#000099;">\&quot;</span>$anchor<span style="color:#000099;">\&quot;</span>&gt;&lt;H2&gt;&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> dict.<span style="color:#9900CC;">keys</span>.<span style="color:#9900CC;">sort</span><span style="color:#006600; font-weight:bold;">&#91;</span>i<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;&lt;/H2&gt;&lt;/A&gt;&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> dict.<span style="color:#9900CC;">values</span><span style="color:#006600; font-weight:bold;">&#91;</span>i<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;&lt;BR&gt;&quot;</span>
	f.<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;&lt;CENTER&gt;&lt;A HREF=<span style="color:#000099;">\'</span>javascript:window.history.back()<span style="color:#000099;">\'</span>&gt;Back&lt;/A&gt;&amp;nbsp&quot;</span>
  f.<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;&lt;/CENTER&gt;<span style="color:#000099;">\n</span>&lt;HR&gt;<span style="color:#000099;">\n</span>&quot;</span>
  i = i <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#006666;">1</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.clsnyder.com/WordPress/2008/06/20/ruby-create-dictionaryhtml-from-double-colon-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Google Stock Quotes</title>
		<link>http://www.clsnyder.com/WordPress/2008/06/06/python-google-stock-quotes/</link>
		<comments>http://www.clsnyder.com/WordPress/2008/06/06/python-google-stock-quotes/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 22:38:25 +0000</pubDate>
		<dc:creator>clsnyder</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Finance]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.clsnyder.com/WordPress/?p=215</guid>
		<description><![CDATA[import urllib import re def get_quote(symbol): base_url = 'http://finance.google.com/finance?q=' content = urllib.urlopen(base_url + symbol).read() m = re.search('class="pr".*?>(.*?)]]></description>
			<content:encoded><![CDATA[<pre class="prettyprint">
import urllib
import re

def get_quote(symbol):
    base_url = 'http://finance.google.com/finance?q='
    content = urllib.urlopen(base_url + symbol).read()
    m = re.search('class="pr".*?>(.*?)<', content)
    if m:
        quote = m.group(1)
        print symbol + "   " + quote
    else:
        quote = 'no quote available for: ' + symbol
    return quote

items = ["AAPL","GOOG","ININ","EWH","IAU"]
for n in items:
    get_quote(n)
raw_input( )
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.clsnyder.com/WordPress/2008/06/06/python-google-stock-quotes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: Concatenate Files</title>
		<link>http://www.clsnyder.com/WordPress/2008/05/18/linux-concatenate-files/</link>
		<comments>http://www.clsnyder.com/WordPress/2008/05/18/linux-concatenate-files/#comments</comments>
		<pubDate>Mon, 19 May 2008 02:26:57 +0000</pubDate>
		<dc:creator>clsnyder</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>

		<guid isPermaLink="false">http://www.clsnyder.com/WordPress/?p=175</guid>
		<description><![CDATA[How to join multiple .avi or .mpg files This will most likely work on just about any linux distro that includes the ability to install mplayer/mencoder. First, let’s get the right programs. sudo apt-get install mencoder mplayer Now that the &#8230; <a href="http://www.clsnyder.com/WordPress/2008/05/18/linux-concatenate-files/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>How to join multiple .avi or .mpg files<br />
This will most likely work on just about any linux distro that includes the ability to install mplayer/mencoder. First, let’s get the right programs.</p>
<pre class="prettyprint">
sudo apt-get install mencoder mplayer
</pre>
<p>Now that the hard part is out of the way, we’re going to make use of the wonderful cat command. I’d renamed each Bloodspell video as b1.avi &#8211; b7.avi. Now to string them all end to end.</p>
<pre class="prettyprint">
cat b1.avi b2.avi b3.avi b4.avi b5.avi b6.avi b7.avi > bloodspell.avi
</pre>
<p>Now we’re 2/3 of the way there! Stringing together .avi files can cause a breakdown in the sync between video and sound. So, we’ll use mencoder to sort things out.</p>
<pre class="prettyprint">
mencoder -forceidx -oac copy -ovc copy bloodspell.avi.avi -o bloodspell_final.avi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.clsnyder.com/WordPress/2008/05/18/linux-concatenate-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs: Writing a Macro</title>
		<link>http://www.clsnyder.com/WordPress/2008/05/18/emacs-writing-a-macro/</link>
		<comments>http://www.clsnyder.com/WordPress/2008/05/18/emacs-writing-a-macro/#comments</comments>
		<pubDate>Mon, 19 May 2008 01:23:20 +0000</pubDate>
		<dc:creator>clsnyder</dc:creator>
				<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://www.clsnyder.com/WordPress/?p=174</guid>
		<description><![CDATA[To start defining a macro, press F3 or C-x (.[2] The abbreviation Def appears on the mode line, showing that you are in macro definition mode. In this mode, Emacs records all the keystrokes that you type, whether they are &#8230; <a href="http://www.clsnyder.com/WordPress/2008/05/18/emacs-writing-a-macro/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To start defining a macro, press F3 or C-x (.[2] The abbreviation Def appears on the mode line, showing that you are in macro definition mode. In this mode, Emacs records all the keystrokes that you type, whether they are commands or literal text, so that you can replay them later. To end the macro, press F4 or C-x ); you leave macro definition mode, and Emacs stops recording your keystrokes. Emacs also stops recording your keystrokes automatically if an error occurs or if you press C-g.</p>
<p>[2] Mac OS X users may have bound F3 and F4, used in defining and executing macros, to another key. These users should press Option-F3 and Option-F4 to get the same functionality.</p>
<p>While you&#8217;re defining a macro, Emacs acts on your keystrokes as well as recording them: that is, anything you type while in macro definition mode is treated as a regular command and executed. While you&#8217;re defining a macro, you&#8217;re doing completely normal editing. That way you can see that the macro does exactly what you want it to, and you can cancel it (with C-g) if you notice that the macro isn&#8217;t really quite what you want.</p>
<p>To execute your macro, press F4 or C-x e. Emacs then replays your keystrokes exactly. (You can see that F4 has two different functions relating to macros: to end a macro definition and, after it&#8217;s defined, to execute the macro.)</p>
<p>This macro is referred to as the &#8220;last&#8221; keyboard macro, with last here meaning most recent. Only one macro is the last keyboard macro. A macro ring, much like the kill ring, allows you to access a number of macros during an Emacs session.</p>
<p>Table 6-1 shows the steps required to define and execute a macro. This macro takes a list of names in the ordinary First Name Last Name order and changes it to the frequently needed Last Name, First Name order.</p>
<blockquote>
<table>
<tr>
<td>Keystrokes</td>
<td>Action</td>
</tr>
<tr>
<td>F3 or C-x ( </td>
<td>Start the macro; Def appears on the mode line.</td>
</tr>
<tr>
<td>C-a </td>
<td> Move to the beginning of the current line.</td>
</tr>
<tr>
<td>M-f </td>
<td> Move forward a word.</td>
</tr>
<tr>
<td>, </td>
<td> Type a comma. </td>
</tr>
<tr>
<td>M-t </td>
<td> Transpose first and last.</td>
</tr>
<tr>
<td>C-n </td>
<td> Move to the next line.</td>
</tr>
<tr>
<td>F4 or C-x ) </td>
<td>End the macro definition.</td>
</tr>
</table>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.clsnyder.com/WordPress/2008/05/18/emacs-writing-a-macro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

