<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Cyberpython Online</title>
	<atom:link href="http://cyberpython.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cyberpython.wordpress.com</link>
	<description>Programming, FOSS, Linux and more...</description>
	<lastBuildDate>Thu, 20 Jan 2011 16:37:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='cyberpython.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/7400b397ec11093169a3ff295430fad0?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Cyberpython Online</title>
		<link>http://cyberpython.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://cyberpython.wordpress.com/osd.xml" title="Cyberpython Online" />
	<atom:link rel='hub' href='http://cyberpython.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Javascript: Convert RGB values to HSL</title>
		<link>http://cyberpython.wordpress.com/2011/01/13/javascript-convert-rgb-values-to-hsl/</link>
		<comments>http://cyberpython.wordpress.com/2011/01/13/javascript-convert-rgb-values-to-hsl/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 13:19:51 +0000</pubDate>
		<dc:creator>cyberpython</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[hsl]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[rgb]]></category>

		<guid isPermaLink="false">http://cyberpython.wordpress.com/?p=632</guid>
		<description><![CDATA[The following function converts RGB triplets to HSL: /* * Converts an RGB color to HSL * Parameters * rgbArr : 3-element array containing the RGB values * * Result : 3-element array containing the HSL values * */ function rgb2hsl(rgbArr){ var r1 = rgbArr[0] / 255; var g1 = rgbArr[1] / 255; var b1 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cyberpython.wordpress.com&amp;blog=4406102&amp;post=632&amp;subd=cyberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following function converts RGB triplets to HSL:</p>
<pre>/*
* Converts an RGB color to HSL
* Parameters
*     rgbArr : 3-element array containing the RGB values
*
* Result : 3-element array containing the HSL values
*
*/
function rgb2hsl(rgbArr){
    var r1 = rgbArr[0] / 255;
    var g1 = rgbArr[1] / 255;
    var b1 = rgbArr[2] / 255;

    var maxColor = Math.max(r1,g1,b1);
    var minColor = Math.min(r1,g1,b1);
    //Calculate L:
    var L = (maxColor + minColor) / 2 ;
    var S = 0;
    var H = 0;
    if(maxColor != minColor){
        //Calculate S:
        if(L &lt; 0.5){
            S = (maxColor - minColor) / (maxColor + minColor);
        }else{
            S = (maxColor - minColor) / (2.0 - maxColor - minColor);
        }
        //Calculate H:
        if(r1 == maxColor){
            H = (g1-b1) / (maxColor - minColor);
        }else if(g1 == maxColor){
            H = 2.0 + (b1 - r1) / (maxColor - minColor);
        }else{
            H = 4.0 + (r1 - g1) / (maxColor - minColor);
        }
    }

    L = L * 100;
    S = S * 100;
    H = H * 60;
    if(H&lt;0){
        H += 360;
    }
    var result = [H, S, L]; 
    return result;
}</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cyberpython.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cyberpython.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cyberpython.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cyberpython.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cyberpython.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cyberpython.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cyberpython.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cyberpython.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cyberpython.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cyberpython.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cyberpython.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cyberpython.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cyberpython.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cyberpython.wordpress.com/632/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cyberpython.wordpress.com&amp;blog=4406102&amp;post=632&amp;subd=cyberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cyberpython.wordpress.com/2011/01/13/javascript-convert-rgb-values-to-hsl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0595685bf66054babe04b4e57e311e74?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cyberpython</media:title>
		</media:content>
	</item>
		<item>
		<title>AwesomeChartJS &#8211; Great looking charts with JavaScript and HTML 5</title>
		<link>http://cyberpython.wordpress.com/2011/01/12/awesomechartjs-great-looking-charts-with-javascript-and-html-5/</link>
		<comments>http://cyberpython.wordpress.com/2011/01/12/awesomechartjs-great-looking-charts-with-javascript-and-html-5/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 17:20:37 +0000</pubDate>
		<dc:creator>cyberpython</dc:creator>
				<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[chart]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://cyberpython.wordpress.com/?p=627</guid>
		<description><![CDATA[Description AwesomeChartJS is a simple Javascript library that can be used to create charts based on the HTML 5 canvas element. The main goal during development was to pick sane defaults in order to let the user create simple charts quickly with just a couple of lines of code. One can create at almost no [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cyberpython.wordpress.com&amp;blog=4406102&amp;post=627&amp;subd=cyberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>Description</h3>
<p><a title="AwesomeChartJS website" href="http://cyberpython.github.com/AwesomeChartJS/" target="_blank">AwesomeChartJS</a> is a simple Javascript library that can be used to create charts based on the HTML 5 canvas element.</p>
<p>The main goal during development was to pick sane defaults in order to let the user create simple charts quickly with just a couple of lines of code.</p>
<p>One can create at almost no time bar, pie, doughnut and Pareto charts.</p>
<h3>Website</h3>
<p><a href="http://cyberpython.github.com/AwesomeChartJS/">http://cyberpython.github.com/AwesomeChartJS/</a></p>
<h3>Download</h3>
<p>You can get awesomechart.js from the project&#8217;s <a href="https://github.com/cyberpython/AwesomeChartJS" target="_blank">github repository</a>.</p>
<h3>License</h3>
<p>Copyright 2011 Georgios Migdos &#8211; AwesomeChartJS is available under the terms of the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a> .</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cyberpython.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cyberpython.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cyberpython.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cyberpython.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cyberpython.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cyberpython.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cyberpython.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cyberpython.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cyberpython.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cyberpython.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cyberpython.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cyberpython.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cyberpython.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cyberpython.wordpress.com/627/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cyberpython.wordpress.com&amp;blog=4406102&amp;post=627&amp;subd=cyberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cyberpython.wordpress.com/2011/01/12/awesomechartjs-great-looking-charts-with-javascript-and-html-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0595685bf66054babe04b4e57e311e74?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cyberpython</media:title>
		</media:content>
	</item>
		<item>
		<title>Regular expression to match Javascript string literals</title>
		<link>http://cyberpython.wordpress.com/2010/12/05/regular-expression-to-match-javascript-string-literals/</link>
		<comments>http://cyberpython.wordpress.com/2010/12/05/regular-expression-to-match-javascript-string-literals/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 14:20:47 +0000</pubDate>
		<dc:creator>cyberpython</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regular expression]]></category>

		<guid isPermaLink="false">http://cyberpython.wordpress.com/?p=614</guid>
		<description><![CDATA[The following regular expression matches Javascript string literals as described here: "([^\\"]+&#124;\\([bfnrtv'"\\]&#124;[0-3]?[0-7]{1,2}&#124;x[0-9a-fA-F]{2}&#124;u[0-9a-fA-F]{4}))*"&#124;'([^\\']+&#124;\\([bfnrtv'"\\]&#124;[0-3]?[0-7]{1,2}&#124;x[0-9a-fA-F]{2}&#124;u[0-9a-fA-F]{4}))*' And as a Java String: String jsStringLiteralRegEx = "\"([^\\\\\"]+&#124;\\\\([bfnrtv'\"\\\\]&#124;[0-3]?[0-7]{1,2}&#124;x[0-9a-fA-F]{2}&#124;u[0-9a-fA-F]{4}))*\"&#124;'([^\\\\']+&#124;\\\\([bfnrtv'\"\\\\]&#124;[0-3]?[0-7]{1,2}&#124;x[0-9a-fA-F]{2}&#124;u[0-9a-fA-F]{4}))*'";<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cyberpython.wordpress.com&amp;blog=4406102&amp;post=614&amp;subd=cyberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following regular expression matches Javascript string literals as described <a title="MDN : Javascript string literals" href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Core_Language_Features#String_Literals" target="_blank">here</a>:</p>
<pre style="max-width:100%;overflow:auto;">"([^\\"]+|\\([bfnrtv'"\\]|[0-3]?[0-7]{1,2}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}))*"|'([^\\']+|\\([bfnrtv'"\\]|[0-3]?[0-7]{1,2}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}))*'</pre>
<p>And as a Java String:</p>
<pre style="max-width:100%;overflow:auto;color:#000000;background:#ffffff;"><span style="color:#7f0055;font-weight:bold;">String</span> jsStringLiteralRegEx = <span style="color:#2a00ff;">"</span><span style="color:#2a00ff;">\"</span><span style="color:#2a00ff;">([^</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">\"</span><span style="color:#2a00ff;">]+|</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">([bfnrtv'</span><span style="color:#2a00ff;">\"</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">]|[0-3]?[0-7]{1,2}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}))*</span><span style="color:#2a00ff;">\"</span><span style="color:#2a00ff;">|'([^</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">']+|</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">([bfnrtv'</span><span style="color:#2a00ff;">\"</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">\\</span><span style="color:#2a00ff;">]|[0-3]?[0-7]{1,2}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}))*'"</span>;</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cyberpython.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cyberpython.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cyberpython.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cyberpython.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cyberpython.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cyberpython.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cyberpython.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cyberpython.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cyberpython.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cyberpython.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cyberpython.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cyberpython.wordpress.com/614/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cyberpython.wordpress.com/614/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cyberpython.wordpress.com/614/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cyberpython.wordpress.com&amp;blog=4406102&amp;post=614&amp;subd=cyberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cyberpython.wordpress.com/2010/12/05/regular-expression-to-match-javascript-string-literals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0595685bf66054babe04b4e57e311e74?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cyberpython</media:title>
		</media:content>
	</item>
		<item>
		<title>BMach &#8211; A Brookshear Machine in Java</title>
		<link>http://cyberpython.wordpress.com/2010/11/24/bmach-a-brookshear-machine-in-java/</link>
		<comments>http://cyberpython.wordpress.com/2010/11/24/bmach-a-brookshear-machine-in-java/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 13:14:34 +0000</pubDate>
		<dc:creator>cyberpython</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[assembly]]></category>
		<category><![CDATA[brookshear]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://cyberpython.wordpress.com/?p=593</guid>
		<description><![CDATA[Description BMach is a simple Java application that allows the user to edit, save and execute programs written in the simple machine language defined in Glenn Brookshear&#8217;s &#8220;Computer Science An Overview&#8221;. It supports syntax-highlighting and viewing the registers, memory cells and program counter values during program execution. Download Click here to go to the downloads [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cyberpython.wordpress.com&amp;blog=4406102&amp;post=593&amp;subd=cyberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Description</h2>
<p>BMach is a simple Java application that allows the user to edit, save and execute programs written in the simple machine language defined in <a href="http://www.mscs.mu.edu/~glennb/">Glenn Brookshear&#8217;s</a> <a href="http://www.amazon.com/Computer-Science-Overview-Glenn-Brookshear/dp/0321524039">&#8220;Computer Science An Overview&#8221;</a>. It supports syntax-highlighting and viewing the registers, memory cells and program counter values during program execution.</p>
<p><span id="more-593"></span></p>
<h2 style="margin-top:30px;">Download</h2>
<p><a title="BMach - downloads" href="https://github.com/cyberpython/BMach/downloads" target="_blank">Click here to go to the downloads page.</a></p>
<h2 style="margin-top:30px;">Screenshots</h2>
<p style="text-align:center;">&nbsp;</p>
<p style="text-align:center;"><a href="http://cyberpython.files.wordpress.com/2010/11/screenshotex.png"><img class="aligncenter size-medium wp-image-622" title="Screenshot of BMach running." src="http://cyberpython.files.wordpress.com/2010/11/screenshotex.png?w=300&#038;h=181" alt="Screenshot of BMach running." width="300" height="181" /></a></p>
<h2 style="margin-top:30px;">Requirements</h2>
<p>You need to have a system with JRE 6u10+.</p>
<h2 style="margin-top:30px;">Usage</h2>
<p>BMach is used like any plain text editor.<br />
After users have finished editing their code, they can click on the execute / execute step-by-step button.<br />
All instructions defined in &#8220;Computer Science An Overview&#8221; are supported.<br />
These can be entered in either binary or hexadecimal form.<br />
e.g.:</p>
<pre style="margin-bottom:30px;margin-top:10px;">Book            BMach            Form
20a1            0x20a1           hexadecimal
2AFF            0x2AFF           hexadecimal
5201            0101001000000001 binary</pre>
<p>Blank lines and whitespace before and after instructions are ignored.<br />
Single-line comments are denoted by two consecutive slashes (&#8220;//&#8221;) and extend to the end of the line.</p>
<h2 style="margin-top:30px;">Examples</h2>
<h3 style="margin-top:10px;">Addition</h3>
<pre style="margin-bottom:30px;margin-top:10px;">// Calculates the sum of 1 and 2 and
// stores it in register 2
0010000000000001 // alternative form: 0x2001
0010000100000010 // alternative form: 0x2102
0101001000000001 // alternative form: 0x5201
1100000000000000 // alternative form: 0xC000</pre>
<h3 style="margin-top:20px;">Calculating the sum of numbers 1 to 10</h3>
<pre style="margin-bottom:30px;margin-top:10px;">// Calculates the sum of numbers 1 - 10
0x200A // LOAD register 0 with 0x0A (10d)
0x21FF // LOAD register 1 with 0xFF (-1d)
0x2200 // LOAD register 2 with 0x00 (0d)
0x2301 // LOAD register 3 with 0x01 (1d)
0x2401 // LOAD register 4 with 0x01 (1d)
0x2500 // LOAD register 5 with 0x00 (0d)
0xB016 // JUMP to HALT if register 0 is zero
0x5001 // register 0 = register 0 + register 1
0x5223 // register 2 = register 2 + register 3
0x5334 // register 3 = register 3 + register 4
0xB50C // JUMP to 0x0C
0xC000 // HALT</pre>
<h3 style="margin-top:20px;">Overflow</h3>
<pre style="margin-bottom:30px;margin-top:10px;">// Attempts to calculate
// 127 + 1 = 128
// and causes overflow error
0x207F // 2's complement: 127
0x2101 // 2's complement: 1
0x5201 // causes overflow: 128
0xc000 // HALT</pre>
<h2 style="margin-top:30px;">About</h2>
<p>Full source code is available at <a href="https://github.com/cyberpython/bmach">this GitHub repository</a> under the terms of the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License v2.0</a>.</p>
<p>All icons are part of the <a href="http://www.famfamfam.com/lab/icons/silk/">&#8220;Silk&#8221; iconset</a> by <a href="http://www.famfamfam.com/about/">Mark James</a>, except for the application icon which has been created from scratch with <a href="http://inkscape.org/">Inkscape</a>.</p>
<p><a href="http://code.google.com/p/jsyntaxpane/">jSyntaxPane</a>, an open-source JEditorKit that adds support for custom syntax-highlighting to JEditorPane, is used.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cyberpython.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cyberpython.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cyberpython.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cyberpython.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cyberpython.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cyberpython.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cyberpython.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cyberpython.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cyberpython.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cyberpython.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cyberpython.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cyberpython.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cyberpython.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cyberpython.wordpress.com/593/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cyberpython.wordpress.com&amp;blog=4406102&amp;post=593&amp;subd=cyberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cyberpython.wordpress.com/2010/11/24/bmach-a-brookshear-machine-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0595685bf66054babe04b4e57e311e74?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cyberpython</media:title>
		</media:content>

		<media:content url="http://cyberpython.files.wordpress.com/2010/11/screenshotex.png?w=300" medium="image">
			<media:title type="html">Screenshot of BMach running.</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript: Draw a rounded rectangle on an HTML 5 canvas</title>
		<link>http://cyberpython.wordpress.com/2010/05/20/javascript-draw-a-rounded-rectangle-on-an-html-5-canvas/</link>
		<comments>http://cyberpython.wordpress.com/2010/05/20/javascript-draw-a-rounded-rectangle-on-an-html-5-canvas/#comments</comments>
		<pubDate>Thu, 20 May 2010 08:36:21 +0000</pubDate>
		<dc:creator>cyberpython</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[rounded rectangle]]></category>

		<guid isPermaLink="false">http://cyberpython.wordpress.com/?p=585</guid>
		<description><![CDATA[The following code allows you to draw a rounded rectangle filled with the 2D context&#8217;s current fillstyle:     CanvasRenderingContext2D.prototype.fillRoundedRect = fillRoundedRect;     /*         x: Upper left corner's X coordinate         y: Upper left corner's Y coordinate         w: Rectangle's width         h: Rectangle's height         r: Corner radius     */     function fillRoundedRect(x, y, w, h, r){         this.beginPath();         this.moveTo(x+r, y);         this.lineTo(x+w-r, y);         this.quadraticCurveTo(x+w, y, x+w, y+r);         this.lineTo(x+w, y+h-r);         this.quadraticCurveTo(x+w, y+h, x+w-r, y+h);         this.lineTo(x+r, y+h);         this.quadraticCurveTo(x, y+h, x, y+h-r);         this.lineTo(x, y+r);         this.quadraticCurveTo(x, y, x+r, y);         this.fill();             }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cyberpython.wordpress.com&amp;blog=4406102&amp;post=585&amp;subd=cyberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following code allows you to draw a rounded rectangle filled with the 2D context&#8217;s current fillstyle:</p>
<pre style="color:#000000;background:#ffffff;overflow:auto;max-height:320px;">    <span style="color:#000000;background-color:#ffffff;">CanvasRenderingContext2D</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">prototype</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">fillRoundedRect </span><span style="color:#301010;background-color:#ffffff;">= </span><span style="color:#000000;background-color:#ffffff;">fillRoundedRect</span><span style="color:#301010;background-color:#ffffff;">;</span>

    <span style="color:#d00000;background-color:#ffffff;">/*</span>

        <span style="color:#d00000;background-color:#ffffff;">x: Upper left corner's X coordinate</span>

        <span style="color:#d00000;background-color:#ffffff;">y: Upper left corner's Y coordinate</span>

        <span style="color:#d00000;background-color:#ffffff;">w: Rectangle's width</span>

        <span style="color:#d00000;background-color:#ffffff;">h: Rectangle's height</span>

        <span style="color:#d00000;background-color:#ffffff;">r: Corner radius</span>

    <span style="color:#d00000;background-color:#ffffff;">*/</span>

    <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">function </span><span style="color:#000000;background-color:#ffffff;">fillRoundedRect</span><span style="color:#301010;background-color:#ffffff;">(</span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">w</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">h</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">r</span><span style="color:#301010;background-color:#ffffff;">){</span>

        <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">this</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">beginPath</span><span style="color:#301010;background-color:#ffffff;">();</span>

        <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">this</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">moveTo</span><span style="color:#301010;background-color:#ffffff;">(</span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">r</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">);</span>

        <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">this</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">lineTo</span><span style="color:#301010;background-color:#ffffff;">(</span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">w</span><span style="color:#301010;background-color:#ffffff;">-</span><span style="color:#000000;background-color:#ffffff;">r</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">);</span>

        <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">this</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">quadraticCurveTo</span><span style="color:#301010;background-color:#ffffff;">(</span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">w</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">w</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">r</span><span style="color:#301010;background-color:#ffffff;">);</span>

        <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">this</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">lineTo</span><span style="color:#301010;background-color:#ffffff;">(</span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">w</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">h</span><span style="color:#301010;background-color:#ffffff;">-</span><span style="color:#000000;background-color:#ffffff;">r</span><span style="color:#301010;background-color:#ffffff;">);</span>

        <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">this</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">quadraticCurveTo</span><span style="color:#301010;background-color:#ffffff;">(</span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">w</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">h</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">w</span><span style="color:#301010;background-color:#ffffff;">-</span><span style="color:#000000;background-color:#ffffff;">r</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">h</span><span style="color:#301010;background-color:#ffffff;">);</span>

        <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">this</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">lineTo</span><span style="color:#301010;background-color:#ffffff;">(</span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">r</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">h</span><span style="color:#301010;background-color:#ffffff;">);</span>

        <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">this</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">quadraticCurveTo</span><span style="color:#301010;background-color:#ffffff;">(</span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">h</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">h</span><span style="color:#301010;background-color:#ffffff;">-</span><span style="color:#000000;background-color:#ffffff;">r</span><span style="color:#301010;background-color:#ffffff;">);</span>

        <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">this</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">lineTo</span><span style="color:#301010;background-color:#ffffff;">(</span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">r</span><span style="color:#301010;background-color:#ffffff;">);</span>

        <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">this</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">quadraticCurveTo</span><span style="color:#301010;background-color:#ffffff;">(</span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">x</span><span style="color:#301010;background-color:#ffffff;">+</span><span style="color:#000000;background-color:#ffffff;">r</span><span style="color:#301010;background-color:#ffffff;">, </span><span style="color:#000000;background-color:#ffffff;">y</span><span style="color:#301010;background-color:#ffffff;">);</span>

        <span style="color:#00007f;background-color:#ffffff;font-weight:bold;">this</span><span style="color:#301010;background-color:#ffffff;">.</span><span style="color:#000000;background-color:#ffffff;">fill</span><span style="color:#301010;background-color:#ffffff;">();        </span>

    <span style="color:#301010;background-color:#ffffff;">}</span></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cyberpython.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cyberpython.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cyberpython.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cyberpython.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cyberpython.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cyberpython.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cyberpython.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cyberpython.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cyberpython.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cyberpython.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cyberpython.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cyberpython.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cyberpython.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cyberpython.wordpress.com/585/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cyberpython.wordpress.com&amp;blog=4406102&amp;post=585&amp;subd=cyberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cyberpython.wordpress.com/2010/05/20/javascript-draw-a-rounded-rectangle-on-an-html-5-canvas/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0595685bf66054babe04b4e57e311e74?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cyberpython</media:title>
		</media:content>
	</item>
	</channel>
</rss>
