<?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>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; code</title> <atom:link href="http://www.ghacks.net/tag/code/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Fri, 10 Feb 2012 09:07:37 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>The Scribes experience: It&#8217;s all about productivity!</title><link>http://www.ghacks.net/2010/05/06/the-scribes-experience-its-all-about-productivity/</link> <comments>http://www.ghacks.net/2010/05/06/the-scribes-experience-its-all-about-productivity/#comments</comments> <pubDate>Thu, 06 May 2010 11:22:26 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[code]]></category> <category><![CDATA[programming editor]]></category> <category><![CDATA[scribes]]></category> <category><![CDATA[snippets]]></category> <category><![CDATA[text editor]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=25197</guid> <description><![CDATA[When a text editor&#8217;s catch phrase is &#8220;Scribes: It&#8217;s about the experience, not features.&#8221; you have to wonder what you are in for. However, Scribes is a very different editor. Scribes is all about making you productive. In fact, the developers of Scribes declare you will become exponentially more productive when using their tool. Why? [...]]]></description> <content:encoded><![CDATA[<p>When a text editor&#8217;s catch phrase is &#8220;Scribes: It&#8217;s about the experience, not features.&#8221; you have to wonder what you are in for. However, Scribes is a very different editor. Scribes is all about making you productive. In fact, the developers of Scribes declare you will become exponentially more productive when using their tool. Why? Because they have implemented only features that focus on productivity. That is why you won&#8217;t find a collection of features that, in the grand scheme of productivity, do nothing.</p><p>In this article, I will introduce you to a different kind of text editor &#8211; <a
title="Scribes" href="http://scribes.sourceforge.net/index.html" target="_blank">Scribes</a>. Upon finishing this article (and giving Scribes a try), you can judge for yourself whether or not Scribes can make you more productive or not.</p><p><span
id="more-25197"></span><strong>Features</strong></p><p>So what does Scribes offer feature-wise:</p><ul><li>Extensible with Python plugins.</li><li>Remote editing.</li><li>Snippets (more on this in a bit).</li><li>Word completion.</li><li>Auto pair completion.</li><li>Smart insertion.</li><li>Auto indent.</li><li>Bookmarks and smart navigation.</li><li>Document switcher.</li><li>Syntax highlighting for over 30 languages.</li></ul><p>For this article I want to focus specifically on one particular feature that is very unique to Scribes (and which does actually boost productivity). That feature is Snippets. But first, let&#8217;s make sure you have Scribes installed.</p><p><strong>Installation</strong></p><p>Installation is simple, because you will find Scribes in your distributions&#8217; standard repositories. Follow these steps:</p><ol><li>Open up your Add/Remove Software tool.</li><li>Search for &#8220;scribes&#8221; (no quotes).</li><li>Mark Scribes for installation.</li><li>Click Apply to install.</li></ol><p>That&#8217;s it!  Now you are ready to get productive.</p><p><strong>Usage</strong></p><div
id="attachment_25198" class="wp-caption alignleft" style="width: 309px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/05/scribes.png"><img
class="size-medium wp-image-25198 " src="http://www.ghacks.net/wp-content/uploads/2010/05/scribes-499x469.png" alt="" width="299" height="281" /></a><p
class="wp-caption-text">Figure 1</p></div><p>You can start up Scribes from the menu or the command line. You will find Scribes in either the <strong>Applications &gt; Accessories </strong>or <strong>Applications &gt; Programming</strong>. If you don&#8217;t find it, you can always hit &lt;Alt&gt;F2 and then type <em>scribes</em> to start it up.</p><p>When you first open up Scribes you might be surprised to see how minimal the main window is (see Figure 1). It&#8217;s that way on purpose &#8211; to make you productive! As you can see there are few bells and whistles. You can toggle the find/replace bar, you can Undo/Redo, you can open documents, you can print, you can open up the options, and you can get help. What you don&#8217;t see, from the GUI is the most useful feature of Scribes &#8211; Snippets. Let&#8217;s see what this is all about.</p><p><strong>Snippets</strong></p><p>A snippet is basically like a permanent, expandable, highly useful clipboard. Imagine you are a programmer with a TON of functions or code pieces that you use frequently. Instead of having to open them and copy/paste them in, with Scribes you can just type a shortcut, hit the Tab button, and that snippet of code will automatically be added to your document. Let&#8217;s see how to create a snippet.</p><div
id="attachment_25199" class="wp-caption alignright" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/05/template.png"><img
class="size-medium wp-image-25199 " src="http://www.ghacks.net/wp-content/uploads/2010/05/template-500x399.png" alt="" width="300" height="239" /></a><p
class="wp-caption-text">Figure 2</p></div><p>If you click on the drop-down associated with options (directly left of the help button), you will see the Template editor. When that window opens (see Figure 2) you will see a number of different languages listed that you can add templates for. In the example shown I have added a template for the sh language (shell scripting). To add a new template do the following:</p><ol><li>Select the language for your template.</li><li>Click Add.</li><li>In the new window give your template a name, description, and then add the snippet in the Template section.</li><li>Click Save.</li></ol><p>That&#8217;s it. Now let&#8217;s see how you can make use of that template.</p><p>In the main window if you type the word you used for the template name. When that word turns orange you know that Scribes is aware that is a template  and you can hit the Tab key. As soon as you hit the tab key that entire snippet of code will automatically be added to your document. Now that is productive!</p><p><strong>Final thoughts</strong></p><p>Although Scribes isn&#8217;t filled with bells and whistles, the features it does have will directly effect your productiveness. If you are a programmer you should really give Scribes a try. Sure there may be more complex, feature-rich programming editors available, but none of them will have you working as productively, with such a shallow learning curve, as Scribes.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/05/06/the-scribes-experience-its-all-about-productivity/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>How To Display Valid Markup Code In Websites</title><link>http://www.ghacks.net/2009/05/07/how-to-display-valid-markup-code-in-websites/</link> <comments>http://www.ghacks.net/2009/05/07/how-to-display-valid-markup-code-in-websites/#comments</comments> <pubDate>Thu, 07 May 2009 13:19:48 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[code]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html entities]]></category> <category><![CDATA[html entities converter]]></category> <category><![CDATA[markup code]]></category> <category><![CDATA[php]]></category> <category><![CDATA[valid code]]></category> <category><![CDATA[w3c]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=12644</guid> <description><![CDATA[There are two difficulties or problems that Internet users encounter when they want to paste code into forms to display these on the Internet. The first problem that can be encountered is that the website will interpret part or all of the code instead of displaying it. A basic example would be to display the [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.ghacks.net/wp-content/uploads/2009/05/w3c.jpg" alt="w3c" title="w3c" width="100" height="86" class="alignleft size-full wp-image-12647" />There are two difficulties or problems that Internet users encounter when they want to paste code into forms to display these on the Internet. The first problem that can be encountered is that the website will interpret part or all of the code instead of displaying it. A basic example would be to display the html code needed to make text linkable on a website. These codes are interpreted by most forms automatically if the user just pastes the code into the form. The second problem that can arise is that the website will not validate because of the way it has been pasted into the form. Displaying the &amp; char will for example return an error when validating the code. This can lead to all kinds of troubles including broken RSS feeds (read: <a
href="http://www.ghacks.net/2009/04/14/internet-explorer-8-and-feeds-the-xml-page-cannot-be-displayed/">The XML Feed Cannot Be Displayed</a>).</p><p><span
id="more-12644"></span>Displaying valid markup code in websites, forums, blogs and any other page is not difficulty. The only thing that needs to be done to achieve this is to convert all entities before pasting the code. This can be done manually or by using a script like that offered at <a
href="http://www.spacefem.com/tutorials/makecode.php">Spacefem</a>.</p><p>All that needs to be done is to paste the code into the form and click on the Make Code button at the bottom. To display the following code on a website</p><p><code>&lt;a href=&quot;http://www.ghacks.net/&quot;&gt;Ghacks&lt;/a&gt;</code></p><p>one would have to paste the following code into the form on the website where the code should be displayed</p><p><code>&amp;lt;a href=&amp;quot;http://www.ghacks.net/&amp;quot;&amp;gt;Ghacks&amp;lt;/a&amp;gt;</code></p><p><img
src="http://www.ghacks.net/wp-content/uploads/2009/05/html_entities_converter-500x273.jpg" alt="html entities converter" title="html entities converter" width="500" height="273" class="alignnone size-medium wp-image-12646" /></p><p>This is actually the easiest way to ensure that the website will not interpret the code and that the code will be valid markup code.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/05/07/how-to-display-valid-markup-code-in-websites/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Male or Female? Your Browser&#8217;s History Might Tell</title><link>http://www.ghacks.net/2008/07/28/male-or-female-your-browsers-history-might-tell/</link> <comments>http://www.ghacks.net/2008/07/28/male-or-female-your-browsers-history-might-tell/#comments</comments> <pubDate>Mon, 28 Jul 2008 14:19:00 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Browsing]]></category> <category><![CDATA[Entertainment]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[code]]></category> <category><![CDATA[gender]]></category> <category><![CDATA[history]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[quantcast]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=5663</guid> <description><![CDATA[A website should not be able to read the the history of websites that a user visited previously. An ingenious CSS hack and some spicy Javascript is however enough to use a trial and error method to find out if a user has been to specific websites. Some webmasters use this method to display the [...]]]></description> <content:encoded><![CDATA[<p>A website should not be able to read the the history of websites that a user visited previously. An ingenious CSS hack and some spicy Javascript is however enough to use a trial and error method to find out if a user has been to specific websites.</p><p>Some webmasters use this method to display the social bookmarking and news batches of websites that their visitors have been through which is very effective in gaining popularity on those websites.</p><p><a
href="http://www.mikeonads.com/2008/07/13/using-your-browser-url-history-estimate-gender/">Others</a> came up with a script that is using this method to estimate if the visitor is male or female. The Javascript makes use of the Quantcast Top 10K websites and the male:female ratio that they provide plus a neat algorithm to compute the percentages for male and female likeliness.</p><p><span
id="more-5663"></span>Mine turned out 50/50 because I don&#8217;t use the history at all. Good luck and let me know what the script thinks about your gender..</p><p>The same principle could possible be used to display targeted advertisements. Have been to a lot of parenting websites lately? How about parenting ads? Like sports? How about an ESPN subscription? It&#8217;s a bit scary, don&#8217;t you think?</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2008/07/28/male-or-female-your-browsers-history-might-tell/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> </channel> </rss>
