Most viewed recipes by greg zakharov http://code.activestate.com/recipes/users/4184115/views/2013-10-23T15:55:05-07:00ActiveState Code RecipesAnalog clock (HTML) 2013-10-11T16:12:33-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578686-analog-clock/ <p style="color: grey"> HTML recipe 578686 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/analog/">analog</a>, <a href="/recipes/tags/clock/">clock</a>, <a href="/recipes/tags/svg/">svg</a>). </p> <p>Simplest analog clock (CSS, SVG, JavaScript).</p> Creating array into batch (Batch) 2012-11-01T18:35:05-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578314-creating-array-into-batch/ <p style="color: grey"> Batch recipe 578314 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/array/">array</a>). Revision 2. </p> <p>Command language supports creation array. For example:</p> Analog clock (Python) 2013-10-11T05:25:34-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578683-analog-clock/ <p style="color: grey"> Python recipe 578683 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/analog/">analog</a>, <a href="/recipes/tags/clock/">clock</a>). </p> <p>Analog clock with Qt4</p> Calendar (HTML) 2013-10-23T15:55:05-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578695-calendar/ <p style="color: grey"> HTML recipe 578695 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/calendar/">calendar</a>, <a href="/recipes/tags/javascript/">javascript</a>). </p> <p>Current month calendar. The smallest realization, I suppose.</p> Formating strings (print a table) (Batch) 2013-06-18T07:52:03-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578562-formating-strings-print-a-table/ <p style="color: grey"> Batch recipe 578562 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/format/">format</a>, <a href="/recipes/tags/string/">string</a>, <a href="/recipes/tags/table/">table</a>). </p> <p>As you know there are no escape characters such as "\t" in the windows command language but it does not mean that we can not format text. Command prompt has its own tricks. At firstly, you need declare enabledelayedexpansion after setlocal command in your batch file to get access for some interesting things; secondly, use &lt;code&gt;&lt;nul set /p "str=[string]"&lt;/code&gt; construction which is equal print function in C language. OK, next batch file print multiplication table.</p> Reversing string (JavaScript) 2013-02-18T09:27:33-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578464-reversing-string/ <p style="color: grey"> JavaScript recipe 578464 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/reverse/">reverse</a>, <a href="/recipes/tags/string/">string</a>). </p> <p>Two ways reverse string.</p> Fibonacci numbers (Batch) 2012-11-14T19:03:11-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578326-fibonacci-numbers/ <p style="color: grey"> Batch recipe 578326 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/fibonacci/">fibonacci</a>). Revision 2. </p> <p>Using example: fibonacci.cmd 9 (returns 55).</p> Multidimensional arrays (Ruby) 2012-11-19T08:43:11-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578338-multidimensional-arrays/ <p style="color: grey"> Ruby recipe 578338 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/array/">array</a>, <a href="/recipes/tags/ironruby/">ironruby</a>, <a href="/recipes/tags/multidimensional/">multidimensional</a>). </p> <p>The next example shows how to create rectangular and jagged arrays.</p> Hex2Dec (JavaScript) 2013-07-04T07:41:53-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578506-hex2dec/ <p style="color: grey"> JavaScript recipe 578506 by <a href="/recipes/users/4184115/">greg zakharov</a> . Revision 2. </p> <p>Web hex2dec sample without additional libraries.</p> Invoking PowerShell script from batch file (Batch) 2012-11-01T18:39:55-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578316-invoking-powershell-script-from-batch-file/ <p style="color: grey"> Batch recipe 578316 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/powershell/">powershell</a>). </p> <p>I'm not sure that there is a way do it without temporary files and why it need at last, maybe for tuning PowerShell host at start? This sample demonstrates how to launch PowerShell host inside CommandPrompt session and change it caption on clock. (Note: be sure that you have enough rights to execute PowerShell scripts - Get-ExecutionPolicy).</p> Analog clock (Ruby) 2013-10-11T05:23:49-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578682-analog-clock/ <p style="color: grey"> Ruby recipe 578682 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/analog/">analog</a>, <a href="/recipes/tags/clock/">clock</a>). </p> <p>Analog clock with Qt4</p> Canvas: static forms (JavaScript) 2013-08-08T13:34:41-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578626-canvas-static-forms/ <p style="color: grey"> JavaScript recipe 578626 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/canvas/">canvas</a>). Revision 2. </p> <p>Drawing static forms with canvas.</p> String length (Batch) 2013-10-10T16:27:48-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578664-string-length/ <p style="color: grey"> Batch recipe 578664 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/length/">length</a>, <a href="/recipes/tags/string/">string</a>). Revision 2. </p> <p>A way for checking string length.</p> Elementary regex without third party libraries (C++) 2013-07-13T12:58:14-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578602-elementary-regex-without-third-party-libraries/ <p style="color: grey"> C++ recipe 578602 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/regex/">regex</a>, <a href="/recipes/tags/wininet/">wininet</a>). </p> <p>This is a dirty trick how to access primitive regular expression on Windows.</p> Hex2Dec (Batch) 2013-02-21T13:25:23-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578309-hex2dec/ <p style="color: grey"> Batch recipe 578309 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/hex2dec/">hex2dec</a>). Revision 7. </p> <p>Many must be familiar with the excellent utility by Mark Russinovich called hex2dec. It is good to all, but I would like to add interactivity to it. So I wrote a "clone" on command language.</p> Directories tree (Bash) 2013-10-11T07:11:24-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578684-directories-tree/ <p style="color: grey"> Bash recipe 578684 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/tree/">tree</a>). </p> <p>Imitation of tree -d command.</p> Executing VBScript without creation of it (Batch) 2013-10-10T16:20:45-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578329-executing-vbscript-without-creation-of-it/ <p style="color: grey"> Batch recipe 578329 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/cscript/">cscript</a>). Revision 2. </p> <p>Have you a wish to launch VBScript without temporary files and right from batch? Maybe you think that it's not possible, but you think wrong. Do you remember my <a href="http://code.activestate.com/recipes/578315-create-cab-or-zip-with-batch/?in=lang-batch">post</a> for executing JScript from batch? So, maybe you are familiar with 'MSScriptControl' object which helps to execute JScript code in VBScripts or conversely - VBScript code inside JScripts. Let's take a look.</p> Is enabled.. (cookie, javascript & java)? (JavaScript) 2013-03-19T11:23:28-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578495-is-enabled-cookie-javascript-java/ <p style="color: grey"> JavaScript recipe 578495 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/cookie/">cookie</a>, <a href="/recipes/tags/java/">java</a>, <a href="/recipes/tags/javascript/">javascript</a>). </p> <p>I'm not sure that the following method is universal in all cases to detect is enabled or disabled cookie, javascript and java in user browser at current moment. This is just an example.</p> Current month calendar (Batch) 2013-10-11T16:11:41-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578687-current-month-calendar/ <p style="color: grey"> Batch recipe 578687 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/calendar/">calendar</a>). </p> <p>Prints calendar at current month.</p> Checking Gmail for new letters (Bash) 2013-10-11T08:11:38-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578685-checking-gmail-for-new-letters/ <p style="color: grey"> Bash recipe 578685 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/gmail/">gmail</a>). </p> <p>Note: enter name of your email without "@gmail.com"</p>