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
\documentclass{beamer} | |
\usecolortheme{wolverine} | |
\useinnertheme{circles} | |
\useoutertheme{infolines} | |
\usefonttheme{default} | |
\title[Short title]{ | |
Title |
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
\begin{table} | |
\caption{Table caption} | |
\centering | |
\begin{tabular}{l | r r | r r} | |
& \multicolumn{2}{>{c|}{A} & \multicolumn{2}{c}{B} \\ | |
Foo & 1 & 2 & 1 & 2\\ | |
\hline | |
1 & a & b & c & d \\ | |
\hline | |
\end{tabular} |
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
\begin{table} | |
\caption{Table caption} | |
\centering | |
\rowcolors{1}{loco3blue!17}{loco3blue!7} | |
\begin{tabular}{l | r r | r r} | |
& \multicolumn{2}{>{\columncolor{loco3blue!17}}c|}{A} & \multicolumn{2}{>{\columncolor{loco3blue!17}}c}{B} \\ | |
Foo & 1 & 2 & 1 & 2\\ | |
\hline | |
1 & a & b & c & d\\ | |
\hline |
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
################################################################################ | |
# svn_mime_filter.py | |
# Script to check if any of the file does not match the svn mime type | |
# | |
# TODOs: | |
# 1 - Report only once files that have the same extension | |
################################################################################ | |
import os | |
import re |
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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
typedef long long i64; | |
bool is_prime[1123123]; | |
vector<i64> primes; // lista de primos |
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
-- Original source: Real World Haskell, Chapter 27 | |
-- URL: http://book.realworldhaskell.org/read/sockets-and-syslog.html | |
import Data.Bits | |
import Network.Socket | |
import Network.BSD | |
import Data.List | |
import SyslogTypes | |
data SyslogHandle = |
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
{-# LANGUAGE FlexibleContexts, GeneralizedNewtypeDeriving, | |
PatternGuards, ScopedTypeVariables #-} | |
import Control.Concurrent (forkIO) | |
import Control.Concurrent.STM | |
import Control.Exception (catch, finally) | |
import Control.Monad.Error | |
import Control.Monad.State | |
import Data.Char (isControl) | |
import Data.List (nub) |
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
import Control.Concurrent | |
transfer :: MVar Int -> MVar Int -> Int -> IO () | |
transfer a b val = do | |
valA <- takeMVar a | |
valB <- takeMVar b | |
putMVar a (valA - val) | |
putMVar b (valB + val) |
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
Nesse post falarei sobre as desigualdades de cobertura erguidas (em uma horrorosa tradução livre de <em>lifted cover inequalities</em>). A minha ideia inicial era comentar sobre cortes automáticos que resolvedores como o XPRESS inserem no programa para apertar o modelo. Há dois tipos de desigualdades usadas como cortes: as de cobertura erguidas e aquelas resultantes do procedimento de Chvátal-Gomory. | |
Como esse segundo método faz uso direto do <em>tableau</em> do simplex, antes eu gostaria de escrever um post revisando o primal simplex e o dual simplex. Por isso, ater-me-ei às coberturas erguidas. | |
Essas desigualdades surgiram a partir do problema da mochila binária. Vamos relembrar o problema: dado um conjunto de n itens -- cada qual com um peso e valor -- e uma mochila de capacidade b, queremos escolher um subconjunto de itens cuja soma dos pesos respeite à capacidade da mochila e cuja soma dos valores seja máxima. | |
Vamos supor que os valores dos itens sejam dados por <img src="http://www.codecogs.com/eq.l |
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
(* | |
Implementation of a queue with two lists. The first list represents the front | |
of the queue and the second the end, reversed. Insertions are performed at the | |
beginning of the second queue (remember inserting at the beginning of the list | |
is more efficient). Removals are done at the front list. | |
When the removal of an element will leave the front list empty, an operation | |
is performed to reverse the second list and assign it to the first. | |
The invariant we keep is that if 'left' is empty then 'right' must empty as | |
well. | |
*) |
OlderNewer