This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT /users/{username} | |
GET /users/?user={username}&pass={password} | |
GET /problemas/ | |
<problemas> | |
<problema> | |
<id>http://problemaki.com/problemas/p01</id> | |
<titulo>Buraco na estrada</titulo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fibCache = [1, 1] | |
fibMax = 0; | |
def isFib(n): | |
global fibMax | |
if n <= 1: | |
return True | |
else: | |
while fibMax < n: | |
fibMax = sum(fibCache[-2:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception in thread "WorkerStealingThread-22" java.lang.OutOfMemoryError: GC overhead limit exceeded | |
at java.util.concurrent.ConcurrentLinkedQueue.offer(ConcurrentLinkedQueue.java:327) | |
at java.util.concurrent.ConcurrentLinkedQueue.add(ConcurrentLinkedQueue.java:296) | |
at aeminium.runtime.implementations.implicitworkstealing.scheduler.stealing.SequentialReverseScan.threadGoingToPark(Unknown Source) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
$VERBOSE = true # -w | |
$KCODE = "U" if RUBY_VERSION < "1.9" # -KU | |
require 'optparse' | |
require 'socket' | |
require 'tempfile' | |
require 'yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redmine - project management software | |
# Copyright (C) 2006-2012 Jean-Philippe Lang | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USERNAME="myuser"; | |
DATABASE="mydb"; | |
PASSWORD="mypass"; | |
# Convert all fields in all databases using this trick | |
# convert(convert(convert(firstname USING latin1) USING binary) using utf8) | |
mysql -u $USERNAME -p$PASSWORD -B -N -e "SHOW TABLES" $DATABASE | while read table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import threading | |
from Tkinter import * | |
root = Tk() | |
class Shape(threading.Thread): | |
def __init__(self, grid, pos=(4,4)): | |
threading.Thread.__init__(self) | |
self.grid = grid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from setuptools import setup, find_packages, Extension | |
from distutils.sysconfig import get_python_inc | |
import glob | |
import os | |
import re | |
import sys | |
GMCPP_PC = 'GraphicsMagick++.pc' | |
IMCPP_PC = 'ImageMagick++.pc' | |
LIBRARY = 'GraphicsMagick' # default value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS -Wall #-} | |
import Data.Map (Map, findWithDefault, fromList) | |
import LinReg (testData) | |
import Test.QuickCheck | |
import Test.QuickCheck.Gen | |
import System.Random | |
import GHC.Exts (sortWith) | |
data AST = Add AST AST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type='text/javascript'> | |
// <![CDATA[ | |
var addcomments = function() { | |
var ls = document.getElementsByClassName("comment"); | |
for (i=0;i<ls.length;i++) { | |
if (ls[i].innerHTML.indexOf('comment_count') == -1) | |
ls[i].innerHTML = "<div class='comment_count' style='float:right; font-weight: bold;'>#" + (i+1) + "</div>" + ls[i].innerHTML; | |
} |