<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0"><channel><title>matthias-schneider.org blog</title><link>http://matthias-schneider.org</link><description>Blog of matthias-schneider.org</description><lastBuildDate>Fri, 28 Jan 2011 16:44:13 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Zenburn theme for google-code-prettify</title><link>http://matthias-schneider.org/blog/zenburn-theme-google-code-prettify/</link><description>&lt;p&gt;While working in my latest project,
  the &lt;a href="http://cacheplanner.org"&gt;CachePlanner&lt;/a&gt;, I was in the
  need of a code highlighting tool for blog entries (and code embeded
  there) and
  found &lt;a href="http://code.google.com/p/google-code-prettify/"&gt;google-code-prettify&lt;/a&gt;. It's used at code.google.com and Stackoverflow (and friends). But what
  I was missing was a nice theme
  like &lt;a href="http://slinky.imukuppi.org/zenburnpage/"&gt;Zenburn&lt;/a&gt;,
  so I did my own version for Prettify. You can &lt;b&gt;download&lt;/b&gt; the
  prettify.css &lt;a href="/static/prettify/prettify.css"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;And here is a small sample. It looks, of course, best on a dark
  background. This one is #222. &lt;/p&gt; 
&lt;pre class="prettyprint" style="background-color: #222;"&gt;
import sys
import math

input = sys.stdin.readlines()
t = int(input[0])

for i in range(1,t+1):
    s = input[i].split()
    n = int(s[0])
    m = int(s[1])

    # algorithm
    l = range(2, m+1)
    msqrt = int(math.sqrt(m))

    for i in l[:msqrt-1]:

        for j in range(2, m+1):
            try:
                l.remove(j*i)
            except ValueError:
                pass
            
    for x in l:
        if (n &lt;= x and x &lt;= m):
            print x
&lt;/pre&gt;
</description><guid isPermaLink="true">http://matthias-schneider.org/blog/zenburn-theme-google-code-prettify/</guid><pubDate>Tue, 30 Nov 2010 01:31:43 GMT</pubDate></item></channel></rss>
