Permalink
Browse files

disqus javascript

git-svn-id: http://uthcode.googlecode.com/svn/trunk@1072 1860ccae-0748-11de-bc6d-132d5dcf21d4
  • Loading branch information...
1 parent 04437e1 commit ff01c3ff3ddae629e2904a5c95aecb643a59f568 orsenthil committed Jan 22, 2012
Showing with 24 additions and 0 deletions.
  1. +11 −0 contests/hackercup/billboards.py
  2. +13 −0 discus.js
@@ -13,6 +13,16 @@ def divide(s, rows, size,w):
# Take care of the tricky situation later.
# Different combinations.
i = 0
+ words = s.split()
+ for entry in result:
+ word = words.pop(0)
+ while (sum(map(len,entry)) + (size * len(word))) <= w:
+ entry.append(word)
+ word = words.pop(0)
+ if words:
+ return False
+
+ """
for word in s.split():
# take each word and add it to right list.
# if it cannot be added to any list, return False
@@ -28,6 +38,7 @@ def divide(s, rows, size,w):
break
else:
i += 1
+ """
final_result = []
for each_sub in result:
View
@@ -0,0 +1,13 @@
+.. raw:: html
+
+ <div id="disqus_thread"></div>
+ <script type="text/javascript">
+ var disqus_shortname = 'uthcode';
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ <a href="http://disqus.com" class="dsq-brlink">Comments by <span class="logo-disqus">Disqus</span></a>

0 comments on commit ff01c3f

Please sign in to comment.