Software https://yyhh.org/notebook/software en Migrate DokuWiki to another server https://yyhh.org/blog/2018/10/migrate-dokuwiki-another-server <span>Migrate DokuWiki to another server</span> <span><a title="View user profile." href="/user/huahai" lang="" about="/user/huahai" typeof="schema:Person" property="schema:name" datatype="">Huahai</a></span> <span>Sat, 10/20/2018 - 05:46</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/software" id="taxonomy-term-24" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/software"> <div class="field field--name-name field--type-string field--label-hidden field__item">Software</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p><a href="https://www.dokuwiki.org/dokuwiki">DokuWiki</a> is one of the most easy-to-use&nbsp;open source Wiki software. It is a very good internal documentation tool for small or medium sized organizations.</p> <p>Comparing with using Google Docs for the same purpose, one advantage of using a&nbsp;Wiki is that it is more searchable and&nbsp;navigable. In addition, Wiki software is often very extensible. In the case of DokuWiki, there are hundreds of plugins that can help with many aspects of doing documentation work. In my company, we not only use DokuWiki to keep technical documentations up to date , but also used it for administrative chores, such as filling out forms,&nbsp;keeping track of vacations, and so on.</p> <p>On the technical side, DokuWiki is a PHP application that does not reply on a database backend. All the materials are in plain text files. So one of the claimed advantages is that it is easy to migrate a DokuWiki installation from one host to another, because you could simply zip up the file directory, move to another host and unzip. As it happened, as part of my company's migration from AWS to Google Cloud, I had a chance to test this claim for real.&nbsp;</p> <p>It turned out it was not as straightforward&nbsp;as <a href="https://www.dokuwiki.org/faq:servermove">DokuWiki claims</a>.&nbsp;Although in the end, it was really&nbsp;a very simple migration, after I figured out the&nbsp;proper steps.</p> <p>At first, I did what the document suggested: simply moved the files over to another host, but&nbsp;the site failed&nbsp;to load. Pouring over the error messages in the logs, I realized that some of the installed&nbsp;plugins could not compile, but somehow they did not break the old site. After removing these broken plugins on the old site, I decided not to simply zipping up the file directory again. Instead, I did the&nbsp;following:</p> <p>1. Use&nbsp;a plugin called "Backup Tool" to zip up only essential configs and settings.</p> <p>2. Download the latest stable version of DokuWiki software bundle, unzip on the new host.</p> <p>3. Unzip the backup bundle created in step 1 <strong>over</strong> the fresh directory of DokuWiki created in step 2</p> <p>4. Load the site, success!</p> <p>5. However, the site reports some missing directories, such as media_attic and&nbsp;media_meta. Simply copying them from the old host to the new host fixes the problems.</p> <p>6. Mission accomplished!</p> <p>I think the main problem with the "copy files over" approach is that many caches on the old site tend&nbsp;to mess things up. A fresh new start is a surer way to migrate.</p> <p>&nbsp;</p> </div></div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=189&amp;2=comment_node_blog&amp;3=comment_node_blog" token="Q0pNWCeWshkcv1ErWkPPmRd2p9rTZOuGhXIhcEkbuf8"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Sat, 20 Oct 2018 04:46:40 +0000 Huahai 189 at https://yyhh.org Screen Saver Option Disabled on Windows 7/XP https://yyhh.org/blog/2012/08/screen-saver-option-disabled-windows-7-xp <span>Screen Saver Option Disabled on Windows 7/XP</span> <span><a title="View user profile." href="/user/yunyao" lang="" about="/user/yunyao" typeof="schema:Person" property="schema:name" datatype="">yunyao</a></span> <span>Wed, 08/01/2012 - 18:07</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/software" id="taxonomy-term-24" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/software"> <div class="field field--name-name field--type-string field--label-hidden field__item">Software</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p>For unknown reason, my machines would suddenly disable their screen saver options (e.g. with the "on resume, display log on screen" check box grayed out). Whenever this happens, it would trigger the security alert and I will get a warning from the IT department to fix the issue.</p> <p>I am tired of having to hunting down the answer every time and therefore I am recording it here.</p> <p>The following method is what usually works for me.</p> <p>1. Go to "Start" type in "regedit"</p> <p>2. Go to</p> <p>[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop]</p> <p>Delete the "ScreenSaverIsSecure" value.</p> </div></div> <ul class="links inline"><li class="comment-add"><a href="/blog/2012/08/screen-saver-option-disabled-windows-7-xp#comment-form" title="Share your thoughts and opinions." hreflang="und">Add new comment</a></li></ul><section> <a id="comment-177"></a> <article data-comment-user-id="0" class="js-comment comment"> <mark class="hidden" data-comment-timestamp="1410428510"></mark> <footer class="attribution"> <article typeof="schema:Person" about="/user/0"> <div class="field field--name-user-picture field--type-image field--label-hidden field__item"> <img src="/sites/default/files/styles/thumbnail/public/default_images/default-user-image.png?itok=hWWOuuKw" width="100" height="100" alt="Profile picture for user Anonymous" title="Anonymous user" typeof="foaf:Image" /> </div> </article> <div class="comment-submitted"> <p class="commenter-name"> <span lang="" typeof="schema:Person" property="schema:name" datatype="">Deyett</span> </p> <p class="comment-time"> Thu, 09/11/2014 - 10:41 </p> </div> </footer> <div class="comment-text"> <div class="comment-arrow"></div> <h3><a href="/comment/177#comment-177" class="permalink" rel="bookmark" hreflang="en">No &#039;ScreenSaveIsSecure&#039; listed </a></h3> <div class="content"> <div class="field field--name-comment-body field--type-text-long field--label-hidden field__item"><div class="tex2jax_process"><p>There is no 'ScreenSaverIsSecure' when I go to [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop]. I have only three options in this location:<br /> -(Default)<br /> -ScreenSaveTimeOut<br /> -SCRNSAVE.EXE</p> </div></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=177&amp;1=default&amp;2=en&amp;3=" token="zTwWFqENPiEqdUr2IRLi4pELx_jmKVPr6QL0guc6nMQ"></drupal-render-placeholder> </div> </div> </article> <div class="indented"><a id="comment-181"></a> <article data-comment-user-id="2" class="js-comment comment"> <mark class="hidden" data-comment-timestamp="1419029208"></mark> <footer class="attribution"> <article typeof="schema:Person" about="/user/yunyao"> <div class="field field--name-user-picture field--type-image field--label-hidden field__item"> <img src="/sites/default/files/styles/thumbnail/public/pictures/2017-11/yunyao_0.jpg?itok=G32xMAqO" width="100" height="100" alt="Profile picture for user yunyao" typeof="foaf:Image" /> </div> </article> <div class="comment-submitted"> <p class="commenter-name"> <a title="View user profile." href="/user/yunyao" lang="" about="/user/yunyao" typeof="schema:Person" property="schema:name" datatype="">yunyao</a> </p> <p class="comment-time"> Fri, 12/19/2014 - 22:46 </p> </div> <p class="visually-hidden">In reply to <a href="/comment/177#comment-177" class="permalink" rel="bookmark" hreflang="en">No &#039;ScreenSaveIsSecure&#039; listed </a> by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Deyett</span></p> </footer> <div class="comment-text"> <div class="comment-arrow"></div> <h3><a href="/comment/181#comment-181" class="permalink" rel="bookmark" hreflang="en">Have you tried to delete &quot;ScreenSaveTimeOut&quot;?</a></h3> <div class="content"> <div class="field field--name-comment-body field--type-text-long field--label-hidden field__item"><div class="tex2jax_process"><p>Have you address this issue?</p> <p>I have yet to counter the same issue as you, but you can try to delete "ScreenSaveTimeOut". Please be sure to backup your system registration first though.&nbsp;</p> </div></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=181&amp;1=default&amp;2=en&amp;3=" token="W1d2ov74p4a-Tkq74LOGKM3lp-jaMwPxITbWOa6jwZ8"></drupal-render-placeholder> </div> </div> </article> </div> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=158&amp;2=comment_node_blog&amp;3=comment_node_blog" token="MEcnAzEypsqZLK9ERG5cvT_B2Q61UzceRshuo4coS94"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Wed, 01 Aug 2012 17:07:59 +0000 yunyao 158 at https://yyhh.org Quick Fix: Windows XP Crashes with Blue Screen with Video Content https://yyhh.org/blog/2011/09/quick-fix-windows-xp-crashes-blue-screen-video-content <span>Quick Fix: Windows XP Crashes with Blue Screen with Video Content</span> <span><a title="View user profile." href="/user/yunyao" lang="" about="/user/yunyao" typeof="schema:Person" property="schema:name" datatype="">yunyao</a></span> <span>Thu, 09/22/2011 - 01:06</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/software" id="taxonomy-term-24" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/software"> <div class="field field--name-name field--type-string field--label-hidden field__item">Software</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p>For some reason, my main working machine, a Windows XP desktop, recently&nbsp; started to crash a lot followed by the blue screen of death. <span>The error message output at the blue screen does not seem to be helpful.<br></span></p> <p><strong>***STOP: 0x0000008E (0xE0000001, 0xBA490925, 0xA880D820, 0x00000000)</strong><br><strong>***watchdog.sys - Address BA490925, base at BA90000, Date stamp 480254ab</strong></p> <p><span>After a few crashes, I realized that the machine crashes whenever I play any video in the web browser ( I am using FireFox). Initially, I didn't bother to look into this problem and simply attempt to solve the problem by avoid playing any video, </span><span>since I don't really intent to watch any video during my work hours and would rather spend my time doing really work instead of fixing the machine. However, this didn't really help since so many sites now a days include video content .</span></p> <p><span>So today, when the machine crashed again, I decided to fix this issue once and for all. Luckily, one Google search using the error message turned up quite a few answers. Most of the answers tent to be too complicated than what I wanted and involving checking for malware, virus, etc, which is not really my concern. Luckily, I found a very simply solution <a href="http://forums.adobe.com/thread/798985">here</a>.</span></p> <p><span>Due to changes to the link, the exact solution from the above link no longer work. But <strong>the basic idea is to go to any site with flash content, and then right click on the flash content, select "setting" from the pop-up menu and uncheck </strong></span><strong>"Enable hardware acceleration".</strong></p> <p><strong><img src="http://www.macromedia.com/support/documentation/en/flashplayer/help/images/display_en.gif" height="136" width="213"></strong></p> <p>For example, you can go to <a href="http://www.adobe.com/products/flashplatformruntimes/gallery/">http://www.adobe.com/products/flashplatformruntimes/gallery/</a> or any Youtube page. Just make sure that you don't play the video before you make the change. Otherwise, you will see the blue screen again.</p> </div></div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=141&amp;2=comment_node_blog&amp;3=comment_node_blog" token="goj_dPSSSAXPWxuajhWgYF4P0QNHrYVq5FlHEvFxqRc"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Thu, 22 Sep 2011 00:06:04 +0000 yunyao 141 at https://yyhh.org Display LaTeX Math on Drupal with MathJax https://yyhh.org/blog/2011/07/display-latex-math-drupal-mathjax <span>Display LaTeX Math on Drupal with MathJax</span> <span><a title="View user profile." href="/user/huahai" lang="" about="/user/huahai" typeof="schema:Person" property="schema:name" datatype="">Huahai</a></span> <span>Mon, 07/18/2011 - 21:19</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/software" id="taxonomy-term-24" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/software"> <div class="field field--name-name field--type-string field--label-hidden field__item">Software</div> </a> <div class="content"> </div> </div> </div> <div class="field__item"><div about="/notebook/math" id="taxonomy-term-25" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/math"> <div class="field field--name-name field--type-string field--label-hidden field__item">Math</div> </a> <div class="content"> </div> </div> </div> <div class="field__item"><div about="/notebook/latex" id="taxonomy-term-18" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/latex"> <div class="field field--name-name field--type-string field--label-hidden field__item">LaTeX</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p><a href="http://www.mathjax.org/">MathJax</a> seems to be the emerging standard for displaying math on the Web at this moment. It is supported by American Mathematical Society and American Physical Society, and has already been adopted by major math related discussion venues such as Physics Forums and Stack Exchange. MathJax displays math using CSS and Web fonts instead of images, so the quality is very high and is resize-friendly. Below are some examples:</p> <p>Inline math: the geometric product $\boldsymbol{uv}$ of vectors $\boldsymbol{u}$ and $\boldsymbol{v}$ is $\boldsymbol{u}\cdot\boldsymbol{v} + \boldsymbol{u}\wedge\boldsymbol{v}$, where $\boldsymbol{u}\cdot\boldsymbol{v}$ is the inner product and $\boldsymbol{u}\wedge\boldsymbol{v}$ is the outer product.</p> <p>Display math: the rotation of vector $\boldsymbol{u}$ by angle $\theta$ in plane $\boldsymbol{i}$ is $$R_{\boldsymbol{i}\theta}(\boldsymbol{u}) = e^{-\boldsymbol{i}\theta/2}\boldsymbol{u}e^{\boldsymbol{i}\theta/2}$$</p> <p>Some random expressions copied directly from the <a href="ftp://ftp.ams.org/ams/doc/amsmath/short-math-guide.pdf">short math guide for latex</a>: $$\begin{pmatrix}<br /> \alpha&amp; \beta^{*}\\<br /> \gamma^{*}&amp; \delta<br /> \end{pmatrix}$$ $$\frac{{\displaystyle\sum_{n > 0} z^n}}<br /> {{\displaystyle\prod_{1\leq k\leq n} (1-q^k)}}$$ $$2^k-\binom{k}{1}2^{k-1}+\binom{k}{2}2^{k-2}$$</p> <p> Finally, an obligatory integral: $$\int \!\!\! \int_D f(x,y)\,dx\,dy$$</p> <p> The math input could be either LaTeX or MathML, embedded in regular HTML text. MathJax is a Javascript library, so it works at the browser's side. After the HTML is rendered, the MathJax code scans the output, find pieces of text marked by user defined math delimiters (more on that later), and replaces them by typesetted math. The math may take a couple of seconds to show up depending on the browser and the network speed. The MathJax library can be fetched from content delivery network (CDN), so it is fairly simple to add MathJax to any Web site. Here is how I did it for this Drupal 6 site.</p> <p>There is a <a href="http://drupal.org/project/mathjax">Drupal module for MathJax</a> that loads MathJax from CDN for every Drupal page. The module also allows Drupal pages to be selectively MathJax enabled according to some URL patterns. By default, all pages are MathJax enabled except for these paths: <em>admin*, node/add/*, node/*/edit</em>, which is reasonable. However, path based selective enabling is still a bit crude, because most pages would not contain math, so MathJax simply slows down page rendering for most pages without any benefit. It would be great if the selection can also be tag based, so only the posts tagged as "math" and maybe the front page need to incur such slow down. Another useful feature would be to allow MathJax configuration within the module. The default configuration of MathJax is not very reasonable for Drupal, <span style="text-decoration: line-through">so users have to add the configurations manually to the page template at this time</span>. <b>Updated Aug.25, 2011:</b> Julou, the author of the module, has responded to my feature request and added a text area for MathJax configuration in the development version of the module. I have tested it and it works, so the steps below are no longer necessary.</p> <p>One of the most annoying default settings of MathJax is the definition of math delimiters.&nbsp; For inline math, the default delimiters are ( ) and \$ \$, and for math on its own line, the default delimiters are [ ] and \$\$ \$\$.&nbsp; Because ( ) and [ ] are so commonly used in regular non-math text, this default setting is unreasonable for Drupal, as MathJax will remove the parentheses and change the text font to be math like for a Drupal page. \$ \$ is okay, but to show the regular dollar sign properly, it needs to be escaped by reverse backslash, which is not the default setting of MathJax. Also, the default message display of MathJax is a bit too much for my taste, and I minimized them a bit. Here is the MathJax configuration I added to <em>page.tpl.php</em> for my theme:</p> <div class="codeblock" style="background-color:#ffffff"><span style="background-color: #ffffff"><font color="#007080">&lt;</font></span><span style="background-color: #ffffff"><font color="#1f3f81"><b>script</b></font></span><span style="background-color: #ffffff"><font color="#007080">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#912f11"><b>type</b></font></span><span style="background-color: #ffffff"><font color="#007080">=</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;text/x-mathjax-config&quot;</font></span><span style="background-color: #ffffff"><font color="#007080">&gt;</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;MathJax.Hub.Config</font></span>(<span style="background-color: #ffffff"><font color="#007080">{</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;showProcessingMessages: </font></span><span style="background-color: #ffffff"><font color="#077807">false</font></span><span style="background-color: #ffffff"><font color="#912f11">, </font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;messageStyle: </font></span><span style="background-color: #ffffff"><font color="#077807">&quot;simple&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;jax: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;input/TeX&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">, </font></span><span style="background-color: #ffffff"><font color="#077807">&quot;output/HTML-CSS&quot;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">, </font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;extensions: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;tex2jax.js&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;MathMenu.js&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;MathZoom.js&quot;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">, </font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;TeX: </font></span><span style="background-color: #ffffff"><font color="#007080">{</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extensions: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;AMSmath.js&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;AMSsymbols.js&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;noErrors.js&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;noUndefined.js&quot;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">}</font></span><span style="background-color: #ffffff"><font color="#912f11">, </font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;HTML-CSS&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">: </font></span><span style="background-color: #ffffff"><font color="#007080">{</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;availableFonts: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;TeX&quot;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">}</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;tex2jax: </font></span><span style="background-color: #ffffff"><font color="#007080">{</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inlineMath: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">'$'</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">'$'</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;displayMath: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">'$$'</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">'$$'</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;processEscapes: </font></span><span style="background-color: #ffffff"><font color="#077807">true</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">}</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">}</font></span>)<span style="background-color: #ffffff"><font color="#912f11">;</font></span><br /> <span style="background-color: #ffffff"><font color="#007080">&lt;/</font></span><span style="background-color: #ffffff"><font color="#1f3f81"><b>script</b></font></span><span style="background-color: #ffffff"><font color="#007080">&gt;</font></span> </div> <p><strong>Important</strong>: this configuration must be inserted <em>before</em> the line that loads MathJax itself. Otherwise, it has no effect. In the zen template I use, I inserted it before this line:</p> <p><code><br /> <?php print $scripts ?></code></p> <p>If your site has the <a href="http://drupal.org/project/print">print module</a> installed, you need to copy the file <em>print.tpl.php </em>to your theme templates directory, and add the same as above so the print friendly version also show math properly.&nbsp;</p> <p>For more MathJax configuration options, please refer to the <a href="http://www.mathjax.org/docs/1.1/configuration.html">MathJax documentation</a></p> </div></div> <ul class="links inline"><li class="comment-add"><a href="/blog/2011/07/display-latex-math-drupal-mathjax#comment-form" title="Share your thoughts and opinions." hreflang="und">Add new comment</a></li></ul><section> <a id="comment-1"></a> <article data-comment-user-id="0" class="js-comment comment"> <mark class="hidden" data-comment-timestamp="1311225240"></mark> <footer class="attribution"> <article typeof="schema:Person" about="/user/0"> <div class="field field--name-user-picture field--type-image field--label-hidden field__item"> <img src="/sites/default/files/styles/thumbnail/public/default_images/default-user-image.png?itok=hWWOuuKw" width="100" height="100" alt="Profile picture for user Anonymous" title="Anonymous user" typeof="foaf:Image" /> </div> </article> <div class="comment-submitted"> <p class="commenter-name"> <span lang="" typeof="schema:Person" property="schema:name" datatype="">Anonymous</span> </p> <p class="comment-time"> Thu, 07/21/2011 - 06:14 </p> </div> </footer> <div class="comment-text"> <div class="comment-arrow"></div> <h3><a href="/comment/1#comment-1" class="permalink" rel="bookmark" hreflang="en">Does this work for comments?</a></h3> <div class="content"> <div class="field field--name-comment-body field--type-text-long field--label-hidden field__item"><div class="tex2jax_process"><p>Does this work for comments? The square root of 4 equals 2: $\sqrt{4} = 2$</p> </div></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1&amp;1=default&amp;2=en&amp;3=" token="f2l6E3exSxFDxa_4V_oxZaC4lhbUjGxcEMIVDS7iiXI"></drupal-render-placeholder> </div> </div> </article> <a id="comment-18"></a> <article data-comment-user-id="0" class="js-comment comment"> <mark class="hidden" data-comment-timestamp="1312894896"></mark> <footer class="attribution"> <article typeof="schema:Person" about="/user/0"> <div class="field field--name-user-picture field--type-image field--label-hidden field__item"> <img src="/sites/default/files/styles/thumbnail/public/default_images/default-user-image.png?itok=hWWOuuKw" width="100" height="100" alt="Profile picture for user Anonymous" title="Anonymous user" typeof="foaf:Image" /> </div> </article> <div class="comment-submitted"> <p class="commenter-name"> <span lang="" typeof="schema:Person" property="schema:name" datatype="">Anonymous</span> </p> <p class="comment-time"> Tue, 08/09/2011 - 14:01 </p> </div> </footer> <div class="comment-text"> <div class="comment-arrow"></div> <h3><a href="/comment/18#comment-18" class="permalink" rel="bookmark" hreflang="en">sample tex file for testing </a></h3> <div class="content"> <div class="field field--name-comment-body field--type-text-long field--label-hidden field__item"><div class="tex2jax_process"><p>At each time $\tau$, the test uses as the conditional inference frame<br /> the set $\mathcal{F}(H_\tau)$ of all tables with the same three two-way<br /> marginal tables as the obtained table $H_\tau$.</p> </div></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=18&amp;1=default&amp;2=en&amp;3=" token="jVhirhDd91eC6XV9WsQl4PLehFgKsOgX9j8i4FgvScs"></drupal-render-placeholder> </div> </div> </article> <a id="comment-26"></a> <article data-comment-user-id="0" class="js-comment comment"> <mark class="hidden" data-comment-timestamp="1314267707"></mark> <footer class="attribution"> <article typeof="schema:Person" about="/user/0"> <div class="field field--name-user-picture field--type-image field--label-hidden field__item"> <img src="/sites/default/files/styles/thumbnail/public/default_images/default-user-image.png?itok=hWWOuuKw" width="100" height="100" alt="Profile picture for user Anonymous" title="Anonymous user" typeof="foaf:Image" /> </div> </article> <div class="comment-submitted"> <p class="commenter-name"> <span lang="" typeof="schema:Person" property="schema:name" datatype="">julou</span> </p> <p class="comment-time"> Thu, 08/25/2011 - 11:21 </p> </div> </footer> <div class="comment-text"> <div class="comment-arrow"></div> <h3><a href="/comment/26#comment-26" class="permalink" rel="bookmark" hreflang="en">Custom configuration</a></h3> <div class="content"> <div class="field field--name-comment-body field--type-text-long field--label-hidden field__item"><div class="tex2jax_process"><p>I just implemented custom configuration in the current dev version… so you can set it in the admin section.<br /> Enjoy!</p> </div></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=26&amp;1=default&amp;2=en&amp;3=" token="EmVUnj3z2YTfN-OcyU4E9A4MBsv14xGvLjouZVdNTnc"></drupal-render-placeholder> </div> </div> </article> <div class="indented"><a id="comment-27"></a> <article data-comment-user-id="1" class="js-comment comment"> <mark class="hidden" data-comment-timestamp="1314300840"></mark> <footer class="attribution"> <article typeof="schema:Person" about="/user/huahai"> <div class="field field--name-user-picture field--type-image field--label-hidden field__item"> <img src="/sites/default/files/styles/thumbnail/public/pictures/2017-11/huahai.jpg?itok=ZwjJWYAc" width="88" height="100" alt="Profile picture for user Huahai" typeof="foaf:Image" /> </div> </article> <div class="comment-submitted"> <p class="commenter-name"> <a title="View user profile." href="/user/huahai" lang="" about="/user/huahai" typeof="schema:Person" property="schema:name" datatype="">Huahai</a> </p> <p class="comment-time"> Thu, 08/25/2011 - 20:34 </p> </div> <p class="visually-hidden">In reply to <a href="/comment/26#comment-26" class="permalink" rel="bookmark" hreflang="en">Custom configuration</a> by <span lang="" typeof="schema:Person" property="schema:name" datatype="">julou</span></p> </footer> <div class="comment-text"> <div class="comment-arrow"></div> <h3><a href="/comment/27#comment-27" class="permalink" rel="bookmark" hreflang="en">It works</a></h3> <div class="content"> <div class="field field--name-comment-body field--type-text-long field--label-hidden field__item"><div class="tex2jax_process"><p>Hi Julou, I have removed my template changes and am using the current version of the module. As we can see, it works. Thank you very much <img src="/sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif" alt="Smile" title="Smile" border="0"></p> </div></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=27&amp;1=default&amp;2=en&amp;3=" token="otqyAq8w5Pd0NDlWnsqJTdnPUTbkZ3076qwkZ7AXGc8"></drupal-render-placeholder> </div> </div> </article> </div> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=135&amp;2=comment_node_blog&amp;3=comment_node_blog" token="HoqMxjelTon9qsN6_9KIEFcn_IjO-NtziRBWWApkl3s"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Mon, 18 Jul 2011 20:19:58 +0000 Huahai 135 at https://yyhh.org How to Share Mouse and Keyboard across Machines https://yyhh.org/blog/2011/07/how-share-mouse-and-keyboard-across-machines <span>How to Share Mouse and Keyboard across Machines</span> <span><a title="View user profile." href="/user/yunyao" lang="" about="/user/yunyao" typeof="schema:Person" property="schema:name" datatype="">yunyao</a></span> <span>Mon, 07/11/2011 - 01:45</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/software" id="taxonomy-term-24" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/software"> <div class="field field--name-name field--type-string field--label-hidden field__item">Software</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p>If you have multiple machines but only one set of mouse and keyboard, then you must check out this neat little tool called <a href="http://synergy-foss.org">Synergy</a>. It allows you to seamlessly share mouse and keyboard across machines. It even allows you to copy and paste text across machines.</p> <p>I have been using it for a few years now and have recommended it to many already. We all absolutely love it. My current set up is a desktop with two monitors and a set of keyboard and mouse connecting to it. Then I have a laptop with another monitor sharing the keyboard and mouse via Synergy with my desktop. This way I can use two machines and three monitors at the same time without any interruption.</p> <p>&nbsp;I simply cannot imagine my life w/o Synergy. It is technically straightforward but really useful!</p> </div></div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=132&amp;2=comment_node_blog&amp;3=comment_node_blog" token="RLdueZwL3PXH0ZzAQ0NwVDdu1p4foKBjnmGP9TU2LlU"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Mon, 11 Jul 2011 00:45:07 +0000 yunyao 132 at https://yyhh.org Fix Drupal Search https://yyhh.org/blog/2011/07/fix-drupal-search <span>Fix Drupal Search</span> <span><a title="View user profile." href="/user/huahai" lang="" about="/user/huahai" typeof="schema:Person" property="schema:name" datatype="">Huahai</a></span> <span>Sun, 07/10/2011 - 20:18</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/software" id="taxonomy-term-24" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/software"> <div class="field field--name-name field--type-string field--label-hidden field__item">Software</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p>Today I tried to search "clojure" using the search box at the top right corner, but could not find anything. I know I wrote a few posts on Clojure recently, so there must be something wrong with the search functionality here. This is a Drupal site, and this should be an easy fix. Indeed, I quickly figured out the problem and solved it.Here is what Idid.</p> <p>After I login to the administrative interface, I saw lots of cron related errors at the <b>/admin/logs/watchdog</b> page: "<i>Cron has been running for more than an hour and is most likely stuck.</i>" A google search suggests that this is a common problem. One of the possible reasons is that there are too many things for cron to do so that it cannot finish them within the time limit or it runs out of the memory. The solution is to reduce the amount of work a cron job has to do. Since the indexing of the content on this site is done with a cron job, I checked the indexing setting at <b>/admin/settings/search</b> page. Sure enough, the option <b>Items to index per cron run:</b> was set at 100, so I changed it to 10 instead. </p> <p>I then tried to manually run cron job at <b>/admin/logs/status</b> page, but it didn't work. It turned out that it is necessary to clear the cron related variables in the MySQL database Drupal uses. To do that, I logined into my hosting company's <i>phpmyadmin</i> interface, searched for "<b>cron_last</b>" and "<b>cron_semaphore</b>". There was no "cron_semaphore", but there was a "cron_last" entry, so I deleted it. Manually ran cron again, now it said "<i>Cron ran successfully</i>". After several manual runs to get the indexing status to be 100% done, now I can do a search on "clojure", and get the posts to show up. Nice.</p> </div></div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=131&amp;2=comment_node_blog&amp;3=comment_node_blog" token="1dYWlNlhkPj3kH3_5Vienuxt8Dq30FszucVM72tQd4o"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Sun, 10 Jul 2011 19:18:00 +0000 Huahai 131 at https://yyhh.org txt2tags: a Lightweight Document Authoring Format https://yyhh.org/blog/2008/01/txt2tags-lightweight-document-authoring-format <span>txt2tags: a Lightweight Document Authoring Format</span> <span><a title="View user profile." href="/user/huahai" lang="" about="/user/huahai" typeof="schema:Person" property="schema:name" datatype="">Huahai</a></span> <span>Fri, 01/04/2008 - 00:07</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/software" id="taxonomy-term-24" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/software"> <div class="field field--name-name field--type-string field--label-hidden field__item">Software</div> </a> <div class="content"> </div> </div> </div> <div class="field__item"><div about="/notebook/gtd" id="taxonomy-term-31" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/gtd"> <div class="field field--name-name field--type-string field--label-hidden field__item">GTD</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p><img src="http://txt2tags.sourceforge.net/img/t2tgems.png" alt="txt2tags" /></p> <p>Fresh ideas often pop up when one is not working, e.g. while in shower or in bed. When that happens, one needs to jot them down fast. Of course, a piece of paper and a pen is still the best solution in term of speed. However, if a computer is conveniently available, typing in text has the advantage of saving text re-entry time, being easily re-organizable and expandable into something more substantial, such as an article. For these advantages to materialize, a good document format is needed for quick document creation and text entry. MS Word may work for many people if MS Office is the only environment they work in. For others, especially those who value portability, a platform agnostic solution would be better. Another point against a WYSIWYG editor like Word is that it mixes presentation with content, which is generally bad. When I use Word, I habitually try to adjust the font, the layout, etc, which basically interrupt text input. </p> <p>Speaking of portability, plain text is without question the king. So, when we need extra features, such as structure, list, table, links and so on, we add them on top of plain text. The question now becomes how much to add? Many formats trade power over simplicity. For example, LaTeX is great, many people I know write papers with LaTeX, myself included. However, LaTeX is too complex for quick text entry. Wiki is great for documentation, but there are just too many different kinds of wiki tags for me to remember. Here, I think <a href="http://txt2tags.sourceforge.net">txt2tags</a> strikes the right balance between power and simplicity. </p> <p> txt2tags has a minimalist markup language. All the marks are non-word symbols (so they won't confuse spell checkers) that are fairly intuitive. For example, =this is top level section title=, ==this is second level==, +this top level title is numbered+, **this text is bold**, //this text is italic//, - this is a list item, + this is a numbered list item. Many of these marks are what people are already using in informal text such as email messages. There really ain't much to learn here. Compared with <a href="http://en.wikipedia.org/wiki/Lightweight_markup_language">other lightweight markup language</a>, I think txt2tags has the most natural syntax. </p> <p>txt2tags format additionally supports tables, links, images, comments, quotations, and horizontal lines. However, cross-references and footnotes are not supported. As an initial authoring format, I think this feature set is sufficient. If more complex structures such as complicated tables, formulas, and cross-references are needed, they can be inserted at the final document production stage. At the authoring stage, there is generally no need to worry about them. If it is necessary to include them, e.g. important formula, txt2tags allows them to be inserted as already tagged code.</p> <p>A single python script takes txt2tags files (*.t2t) and converts them into different formatted documents, including LaTeX, HTML, Unix manual page, PageMaker, plain text (yes, you sometimes need them), among others. This blog is written in txt2tags and then converted to HTML. In fact, <a href="http://txt2tags.sourceforge.net/writing-book.html">books</a> can be written in text2tags, because it supports multiple file includes, so each chapter can live in its own file. txt2tags can also automatically generate table of content.</p> <p>As vim user, we expect niceties such as syntax highlighting and vim key-mappings for txt2tags. These can all be found on txt2tags Web site. Or if one uses Debian, these are included in the txt2tags Debian package already. For people like to have GUI, there's a Tcl/Tk GUI interface for txt2tags. And a Web interface is available too.</p> <p>For quickly jotting down ideas, I have tried mind-mapping tools (freemind, kdissert), outliners (TVO, vimoutliners), and note-takers (basket, knotes). They work to some degree but are all very limited in term of content expandability and portability. I just wish I had found txt2tags earlier.</p> <p> txt2tags also makes a good addition to my text based GTD solution. I will be using it as my main information collection format. Because txt2tags' list format is very compatible with <a href="http://yyhh.org/blog/2007/12/simple-gtd-list-solution-desktop-web-and-possibly-mobile">taskpaper</a>'s list -- both use "-" to indicate list item, and use indention to indicate nesting level -- I can simply yank a list from a t2t file, and put it in my taskpaper project list. Nice.</p> </div></div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=73&amp;2=comment_node_blog&amp;3=comment_node_blog" token="SUwDcBBVaeUhMGEX98RFsUFII20bFu7pirSwdIWo3-U"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Fri, 04 Jan 2008 00:07:32 +0000 Huahai 73 at https://yyhh.org How to load context of text files into DB2 https://yyhh.org/blog/2007/12/how-load-context-text-files-db2 <span>How to load context of text files into DB2</span> <span><a title="View user profile." href="/user/yunyao" lang="" about="/user/yunyao" typeof="schema:Person" property="schema:name" datatype="">yunyao</a></span> <span>Sat, 12/29/2007 - 00:48</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/software" id="taxonomy-term-24" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/software"> <div class="field field--name-name field--type-string field--label-hidden field__item">Software</div> </a> <div class="content"> </div> </div> </div> <div class="field__item"><div about="/notebook/linux" id="taxonomy-term-16" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/linux"> <div class="field field--name-name field--type-string field--label-hidden field__item">Linux</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p>The task is fairly simply --- I need to load the content of some text files into DB2. There are many ways to do so, but since I only need to this only once (hopefully), I want to find an easy way without writing any external code. </p> <p>So here is the solution:</p> <p>(1) create a table containing a CLOB (VARCHAR should work as well, if we know the maxium size of the files in advance) column. For example:</p> <blockquote><p> create table test (docid INTEGER GENERATED BY DEFAULT AS IDENTITY,doc CLOB)</p> </blockquote> <p>(2) put the files to be loaded into one directory and create a .del file based on their names. The content in the .del file should based on the table you have just created. For instance, a .del file for the example table created in (1) should look like the following:</p> <blockquote><p> 1,"doc1.txt"</p> <p> 2, "doc2, txt"</p> <p> ..... </p> </blockquote> <p>where the first value is the id, and the second value is the name of a file to be loaded. </p> <p>(3) load the content </p> <blockquote><p> import from test.del of del lobs from /home/dirName/ modified by lobsinfile replace into test</p> </blockquote> <p>Depends on the exact nature of your task, you may add additional modifiers to the import command. But the above three steps should be adequate in many cases.</p> <p>Finally, just to make sure that the files are properly loaded into the database, we can export part of the table and view the content:</p> <blockquote><p> export to myfile.del of del lobs to outDirName lobfile lobs1, lobs2 modified by lobsinfile select * from test where docid &lt; 10</p> </blockquote> </div></div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=70&amp;2=comment_node_blog&amp;3=comment_node_blog" token="UauoObVsGuvE38s8eqQc5UgTUJSeKDc7HtArR66fwVA"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Sat, 29 Dec 2007 00:48:01 +0000 yunyao 70 at https://yyhh.org A Simple GTD List Solution: Desktop, Web and Possibly Mobile https://yyhh.org/blog/2007/12/simple-gtd-list-solution-desktop-web-and-possibly-mobile <span>A Simple GTD List Solution: Desktop, Web and Possibly Mobile</span> <span><a title="View user profile." href="/user/huahai" lang="" about="/user/huahai" typeof="schema:Person" property="schema:name" datatype="">Huahai</a></span> <span>Mon, 12/10/2007 - 04:25</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/software" id="taxonomy-term-24" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/software"> <div class="field field--name-name field--type-string field--label-hidden field__item">Software</div> </a> <div class="content"> </div> </div> </div> <div class="field__item"><div about="/notebook/gtd" id="taxonomy-term-31" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/gtd"> <div class="field field--name-name field--type-string field--label-hidden field__item">GTD</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p>I have been searching for a lightweight list solution since I started trying out the <a href="http://en.wikipedia.org/wiki/Getting_Things_Done">Getting Things Done (GTD)</a> approach a few days ago. Unlike calendar events, list items (projects and actions) do not associate with a particular time and date, therefore, using a calender for them is not appropriate. According to <a href="http://www.davidco.com/">David Allen</a>, for lists, we should "just go for simplicity, speed, and fun". Here I operationalize that into these properties: </p> <ul><li>Simple, but can still do these:</li> <ul><li>Handle lists for "project", "next-action", "waiting-for" and "maybe"*</li> <li>Be able to tag an item with "context", and organize items by context </li> <li>Support sub-list</li> </ul><li>Quick and easy input, review, and operate, whenever, wherever</li> <ul><li>Platform and location independent: home, office, road, online, offline</li> <li>Synchronized and consistent</li> <li>Preserve persistence and ownership (lists live else where won't do)</li> <li>Easily searchable</li> <li>Integrated with work environment (e.g. maintain reference to support materials)</li> </ul><li>Good-looking, functional, familiar and consistent interface</li> </ul><p>This set of desiderata is of course incomplete, just what I can think of right now. All these can actually be comfortably handled by paper based solutions for most people I think. However, for people whose primary work environment is digital, the second major item is not very amicable for a paper based solution, because getting things transferred between digital and paper world is a lot of hassle. If the input and output of one's work are all in the digital environment, it becomes necessary to avoid the paper world, and to find an all digital solution to get things done. At this point, I think I found a simple solution, <a href="http://hogbaysoftware.com/products/taskpaper">TaskPaper</a>.</p> <p><em>TaskPaper</em> is a Mac based list software. I do not own a Mac, so why is it my solution? Well, TaskPaper uses a very simple and intuitive syntax representing lists in plain text. That is to say, they stick to the basics, and try to take what's good about paper-based solution, and bring that to digital world. Since plain text is the most platform independent format, portability is not a problem any more. Easy and quick input is taken care of with a good text editor. Searchability, persistence, and synchronization is easy to achieve with textual data. So there you have it, a solution that meets all the desiderata. </p> <p>Wait, how about its support for GTD? Here, TaskPaper's syntax is specifically tailored to GTD. Nothing more. Let's see an example:<br /></p><div class="codeblock"> <font face="monospace"><br /><span><b><u>Example Project:</u></b></span><br /><font color="#bebebe">- Start example project file @computer @done</font><br /><font color="#5b3674"><i>- </i></font>Brainstorm project with colleagues <font color="#5b3674"><i>@work</i></font><br /><font color="#5b3674"><i>- </i></font>Email Joan about project <font color="#5b3674"><i>@email</i></font><br /><span><b><u>Next Project:</u></b></span><br /><font color="#5b3674"><i>- </i></font>Draft ideas for next project <font color="#5b3674"><i>@anywhere</i></font><br /><font color="#5b3674"><i>- </i></font>Email Bob to arrange meeting <font color="#5b3674"><i>@email</i></font><br /></font> </div> <p>This list contains two projects. Project names end with ":". Tasks in a project start with "-". Context tags start with "@". "@done" is a special tag indicating completion of a task. That's it. All the syntax for TaskPaper! I don't think it can be made simpler, and everyone should be able to pick it up in no time. In addition, the possibility of customizing the format to suit one's own needs seems to be very high. For example, <a href="http://en.wikipedia.org/wiki/Personal_wiki">wiki words</a> can be naturally included in the list to handle reference to project support materials. </p> <p>For vim user, there's a <a href="http://www.vim.org/scripts/script.php?script_id=2027">taskpaper.vim</a> plugin that makes it a little easier to edit and review TaskPaper lists. The current released version of taskpaper.vim doesn't seem to correctly handle indented tasks due to a quotation peculiarity of vim regular expression. I have sent a small patch below to the author of taskpaper.vim (update12/10/2007 10:49:08 PM (EST): it will be included in the next release, I am told). </p> <div class="codeblock"> <font face="monospace"><br /><font color="#e5a00d"><i>--- taskpaper.vim 2007-09-25 07:33:28.000000000 -0400</i></font><br /><font color="#e5a00d"><i>+++ taskpaper.vim.new 2007-12-09 08:20:06.000000000 -0500</i></font><br /><font color="#007020"><b>@@ -36,7 +36,7 @@</b></font><br />  <br />  " toggle @done context tag on a task<br />  function! ToggleDone()<br /><font color="#70a0d0"><i>-    if (getline(".") =~ "^\s*- ")</i></font><br /><font color="#5b3674"><i>+    if (getline(".") =~ '^\s*- ')</i></font><br />          let isdone = strridx(getline("."),"@done")<br />          if (isdone != -1)<br />              substitute/ @done//<br /><font color="#007020"><b>@@ -45,7 +45,10 @@</b></font><br />              substitute/$/ @done/<br />              echo "done!"<br />          endif<br /><font color="#5b3674"><i>+    else </i></font><br /><font color="#5b3674"><i>+        echo "not a task."</i></font><br />      endif<br /><font color="#5b3674"><i>+</i></font><br />  endfunction<br />  <br />  map &lt;buffer&gt; &lt;LocalLeader&gt;td :call ToggleDone()&lt;cr&gt;<br /></font> </div> <p>There is also a <a href="http://code.google.com/p/taskpaper-web/">taskpaper.web</a> that you can drop in your own php-supported Web site. This is useful when you do not have access to your desktop but have access to your own Web site. Of course, then you have to set up file synchronization between the Web copy of your lists and your desktop or mobile copies. For the former, you can run a <em>cron</em> job to regularly <em>rsync</em> these files. For the later, I am not sure since I no longer use a PDA or smart phone (it's funny that I was among the first generation of Palm users, but I no longer use any of these when they become so popular nowadays. I just carry my laptop around).</p> <p>Anyway, I just started experimenting with this methods for GTD lists. I will have more to say when I got more experience using it. </p> <p> *For the meaning of some of the GTD terms, it's best to read <a href="http://www.amazon.com/Getting-Things-Done-Stress-Free-Productivity/dp/0142000280">the book</a>.</p> </div></div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=68&amp;2=comment_node_blog&amp;3=comment_node_blog" token="VspJyH0AAWIzAeRMeCd5NrA1LMoPPUJ2QuL4wQAP04o"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Mon, 10 Dec 2007 04:25:48 +0000 Huahai 68 at https://yyhh.org Editing Web Textarea with Desktop Editor https://yyhh.org/blog/2007/12/editing-web-textarea-desktop-editor <span>Editing Web Textarea with Desktop Editor</span> <span><a title="View user profile." href="/user/huahai" lang="" about="/user/huahai" typeof="schema:Person" property="schema:name" datatype="">Huahai</a></span> <span>Fri, 12/07/2007 - 07:17</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/software" id="taxonomy-term-24" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/software"> <div class="field field--name-name field--type-string field--label-hidden field__item">Software</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p>Nowadays we do a lot of text input on the Web, like posting on forums, filling out a support request form, commenting on someone's blog, etc. Although Web forms often offer a variety of so-called rich text editing capabilities, nothing beats the good old desktop editors. For a vim person, a plain Web textarea simply is not the place for text editing. Fortunately, for Firefox users, this pain can be eased. There are a few Firefox addons that allow people to use external editors for editing textarea. This <a href="http://en.wikipedia.org/wiki/Wikipedia:Text_editor_support"> wikipedia article</a> lists quite a few options. I tried <a href="http://addons.mozilla.org/firefox/4125">It's All Text!</a>, and it works very well. It supports utf-8 encoding so I can write Chinese. Now I can seriously consider using gmail as my primary email client.</p> </div></div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=65&amp;2=comment_node_blog&amp;3=comment_node_blog" token="o9addFsMPZwEUwEm_aTRXQHzU1W8nsxXkZQYAd45uOk"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Fri, 07 Dec 2007 07:17:23 +0000 Huahai 65 at https://yyhh.org