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
@echo off | |
set ACTUAL_DIR=%CD% | |
set TEMPFILE=%TEMP%\temp.patch | |
echo "Executando diff" | |
diff -uNr --exclude=".svn" %1 %2 > %TEMPFILE% | |
echo "Patcheando destino" | |
cd %2 | |
patch -R -i %TEMPFILE% |
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 | |
WORK_DIR=~/temp_ffmpeg | |
LAME_DIR=$WORK_DIR/lame | |
FAAC_DIR=$WORK_DIR/faac-1.28 | |
FAAD2_DIR=$WORK_DIR/faad2-2.7 | |
AUTOCONF_DIR=$WORK_DIR/autoconf-2.69 | |
AUTOMAKE_DIR=$WORK_DIR/automake-1.12.4 | |
YASM_DIR=$WORK_DIR/yasm | |
FFMPEG_DIR=$WORK_DIR/ffmpeg |
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/sh | |
# IMPORTANT: SOURCE and TARGET are relative to ACTUAL_DIR. Whathever, the patch won't work. | |
ACTUAL_DIR=$(pwd) | |
PATCH_FILE="$ACTUAL_DIR/diff.patch" | |
PATCH_FILE_TMP="$PATCH_FILE.tmp" | |
SOURCE=$1 | |
TARGET=$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
# import the main window object (mw) from ankiqt | |
from aqt import mw | |
# import the "show info" tool from utils.py | |
from aqt.utils import showInfo | |
# import all of the Qt GUI library | |
from aqt.qt import * | |
from time import mktime,time | |
from datetime import datetime |
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
private static void printClassInfo(String className) { | |
Class<?> loadedClass; | |
try { | |
loadedClass = Class.forName(className); | |
System.out.println("Actual classloader: " + Thread.currentThread().getContextClassLoader()); | |
System.out.println("+ Class " + className + " loaded <<<<"); | |
if (loadedClass.getClassLoader() == null) { | |
System.out.println(" +- NO CLASSLOADER FOUND FOR CLASS " + loadedClass); | |
} | |
else { |
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
public class Ipc2014ProblemA { | |
private static class BaggageBin { | |
int space; | |
char destination; | |
public BaggageBin(int space) { | |
if (space > 0) { | |
if (space % 2 == 0) { | |
this.destination = 'A'; |
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: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=86912 | |
# 1. Prepare the USB disk | |
# Create an ext3 partition using GParted for instance | |
#2. Configure DD-WRT | |
#Under Services->Services->Secure Shell: | |
#* Enable SSHd | |
#* Click Apply Settings | |
# |
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
static class MemoryPropertyBuilder { | |
StringBuilder builder = new StringBuilder(); | |
PropertyBuilder add(String param, String value) { | |
builder.append(param + "=" + value); | |
return this; | |
} | |
Properties properties() { |
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
public class Testa { | |
private static int fatorial(int numero) { | |
if (numero == 1) | |
return 1; | |
return numero * fatorial(--numero); | |
} | |
private static int combinacao(int n, int p) { | |
return fatorial(n) / (fatorial(n - p) * fatorial(p)); | |
} |
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 java.io.InputStream; | |
import java.util.ArrayList; | |
import javax.xml.parsers.DocumentBuilder; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.client.HttpClient; | |
import org.apache.http.client.methods.HttpPost; | |
import org.apache.http.impl.client.DefaultHttpClient; |
OlderNewer