Popular recipes tagged "meta:license=mpl"http://code.activestate.com/recipes/tags/meta:license=mpl/2012-05-07T13:21:30-07:00ActiveState Code RecipesKomodo JS Macro: Execute JavaScript (JavaScript) 2012-05-07T13:21:30-07:00Patrick Clokehttp://code.activestate.com/recipes/users/4180275/http://code.activestate.com/recipes/578120-komodo-js-macro-execute-javascript/ <p style="color: grey"> JavaScript recipe 578120 by <a href="/recipes/users/4180275/">Patrick Cloke</a> (<a href="/recipes/tags/debug/">debug</a>, <a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/editor/">editor</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>). </p> <p>Executes a JavaScript file (or the selected text) and display the results in the command output window.</p> Find a unique name based on prefix + digit in log2(n) + log2(n/2) (Python) 2011-10-31T20:30:54-07:00Garel Alexhttp://code.activestate.com/recipes/users/2757636/http://code.activestate.com/recipes/577934-find-a-unique-name-based-on-prefix-digit-in-log2n-/ <p style="color: grey"> Python recipe 577934 by <a href="/recipes/users/2757636/">Garel Alex</a> (<a href="/recipes/tags/name/">name</a>, <a href="/recipes/tags/unique/">unique</a>). </p> <p>Find a unique name based on a prefix for a content in a container (eg. a file in a directory) adding a digit to the name</p> <p>Does it in log2(n) + log2(n/2) were n is the number of duplicates</p> <p>This would be used eg. in a CMS giving identifiers based on content title, or when shortening file names on a file system, etc.</p> Perl Script to obtain data file in a desired format (Perl) 2011-02-19T23:18:01-08:00ilon asolothttp://code.activestate.com/recipes/users/4177080/http://code.activestate.com/recipes/577582-perl-script-to-obtain-data-file-in-a-desired-forma/ <p style="color: grey"> Perl recipe 577582 by <a href="/recipes/users/4177080/">ilon asolot</a> . </p> <p>This discusses about using Perl, how we can obtain a data file in a particular desired format, given a data file in a random format. By format, we refer to the order of columns in the input data file. Using this Perl script, we obtain output data file in a particular format and we get another file having discarded data lines, based on some filtering condition.</p> Komodo JS Macro - use vertical editor tabs positioned to the right (JavaScript) 2010-09-10T02:53:33-07:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577386-komodo-js-macro-use-vertical-editor-tabs-positione/ <p style="color: grey"> JavaScript recipe 577386 by <a href="/recipes/users/2666241/">Todd Whiteman</a> (<a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/layout/">layout</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/tab/">tab</a>). </p> <p>A <a href="http://www.activestate.com/komodo-ide">Komodo</a> JavaScript macro that can be used to position the editor tabs on the right side and shown vertically.</p> <p>Additional layouts (left, right, up, down, vertical, horizontal) can be made with different combinations, see here for the Mozilla tabbox positioning documentation: <a href="https://developer.mozilla.org/en/XUL_Tutorial/Tabboxes#Position_of_the_tabs" rel="nofollow">https://developer.mozilla.org/en/XUL_Tutorial/Tabboxes#Position_of_the_tabs</a></p> Komodo JS Macro - increase the number of code completion items shown (JavaScript) 2012-03-15T23:20:25-07:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577163-komodo-js-macro-increase-the-number-of-code-comple/ <p style="color: grey"> JavaScript recipe 577163 by <a href="/recipes/users/2666241/">Todd Whiteman</a> (<a href="/recipes/tags/codeintel/">codeintel</a>, <a href="/recipes/tags/completions/">completions</a>, <a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/toddw/">toddw</a>). Revision 2. </p> <p>A <a href="http://www.activestate.com/komodo">Komodo</a> JavaScript macro that can be used to set the number of code completion items shown in the list.</p> <p>If you set the macro to Trigger on the Komodo "After file open" event - then this setting will be always be applied to every file code completion list.</p> Komodo JS Macro - force the focus back onto the editor after an alt-tab (JavaScript) 2010-03-29T18:59:03-07:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577164-komodo-js-macro-force-the-focus-back-onto-the-edit/ <p style="color: grey"> JavaScript recipe 577164 by <a href="/recipes/users/2666241/">Todd Whiteman</a> (<a href="/recipes/tags/focus/">focus</a>, <a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/setfocus/">setfocus</a>, <a href="/recipes/tags/tab/">tab</a>, <a href="/recipes/tags/window/">window</a>). </p> <p>A <a href="http://www.activestate.com/komodo">Komodo</a> JavaScript macro that can be used to force the focus back to the Komodo editor after switching between windows (i.e. after using Alt-Tab).</p> <p>This macro only applies to Windows and Mac OS - where there is an application activated notification event available.</p> <p>To use this macro - set the macro to trigger on the "On startup" event.</p> Hash text simply (PHP) 2012-04-30T21:43:00-07:00Xavier L.http://code.activestate.com/recipes/users/4171602/http://code.activestate.com/recipes/576893-hash-text-simply/ <p style="color: grey"> PHP recipe 576893 by <a href="/recipes/users/4171602/">Xavier L.</a> (<a href="/recipes/tags/crypt/">crypt</a>, <a href="/recipes/tags/extensible/">extensible</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/hash/">hash</a>, <a href="/recipes/tags/php/">php</a>, <a href="/recipes/tags/secure/">secure</a>, <a href="/recipes/tags/security/">security</a>, <a href="/recipes/tags/simple/">simple</a>). Revision 5. </p> <p>This is a simply and extensible script that can be used to rapidly has any amount of text using PHP's hash() built-in function.</p> <p>It recognizes when the page is loaded for the first time and displays a form with options. Afterward, it display the selected hash(es), with a link at the bottom to start again.</p>