Most viewed recipes tagged "smart"http://code.activestate.com/recipes/tags/smart/views/2013-06-24T13:38:55-07:00ActiveState Code RecipesFlatten a list (or list of lists, etc.) (Python)
2011-03-01T03:46:26-08:00Sunjay Varmahttp://code.activestate.com/recipes/users/4174115/http://code.activestate.com/recipes/577255-flatten-a-list-or-list-of-lists-etc/
<p style="color: grey">
Python
recipe 577255
by <a href="/recipes/users/4174115/">Sunjay Varma</a>
(<a href="/recipes/tags/extend/">extend</a>, <a href="/recipes/tags/flatten/">flatten</a>, <a href="/recipes/tags/list/">list</a>, <a href="/recipes/tags/optimization/">optimization</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/smart/">smart</a>).
Revision 2.
</p>
<p>I created this function sometime ago for my own purposes. It simply flattens a list.</p>
<p>Check out the first comment for another version of someone else's design.</p>
Komodo JS Macro: smart quotes and smart braces (JavaScript)
2013-06-24T13:38:55-07:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577790-komodo-js-macro-smart-quotes-and-smart-braces/
<p style="color: grey">
JavaScript
recipe 577790
by <a href="/recipes/users/2666241/">Todd Whiteman</a>
(<a href="/recipes/tags/braces/">braces</a>, <a href="/recipes/tags/brackets/">brackets</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/scintilla/">scintilla</a>, <a href="/recipes/tags/smart/">smart</a>, <a href="/recipes/tags/toddw/">toddw</a>).
Revision 5.
</p>
<p>With this macro, you can make a text/word selection, then press one of ", ', (, [ or { and the matching set of quotes/braces will be added around the selection.</p>
<p>Example (where | denotes the selection):
This is |myselectedword|.
then pressing "{" you'll get:
This is {myselectedword}.</p>