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
package edu.unlam.impl; | |
import edu.unlam.Ordenadora; | |
public class QuickSort extends Ordenadora { | |
@Override | |
public void sort(Comparable[] elements) { | |
sort(elements, 0, elements.length - 1); | |
assert isSorted(elements); | |
} |
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
es_un_pais(argentina). | |
es_un_pais(brasil). | |
es_un_pais(portugal). | |
es_un_pais(china). | |
limita_con(argentina, chile). | |
limita_con(argentina, brasil). | |
limita_con(usa, mexico). | |
limita_con(usa, canada). |
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
package edu.unlam.swing; | |
import java.awt.Font; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.awt.event.WindowAdapter; | |
import java.awt.event.WindowEvent; | |
import javax.swing.JButton; | |
import javax.swing.JFrame; |
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
@RunWith(PowerMockRunner.class) | |
@PrepareForTest(JS.class) | |
public class FhirServiceTest { | |
private FhirService service; | |
@Before | |
public void setup() { | |
GWTMockUtilities.disarm(); | |
this.service = new FhirServiceImpl(); |
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
log4j.appender.SHIRO=org.apache.log4j.ConsoleAppender | |
log4j.appender.SHIRO.target=System.out | |
log4j.appender.SHIRO.layout=org.apache.log4j.PatternLayout | |
log4j.appender.SHIRO.layout.ConversionPattern=%p [%c{1}] %m%n | |
log4j.additivity.org.apache.shiro=false | |
log4j.appender.mainlogger=org.apache.log4j.ConsoleAppender | |
log4j.appender.mainlogger.target=System.out | |
log4j.appender.mainlogger.layout=org.apache.log4j.PatternLayout |
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
/* Google Chrome (version 28+): */ | |
@supports (-webkit-appearance:none) { | |
nav.tm_navbar { | |
background: green; | |
} | |
} | |
/* Mozilla Firefox (all versions): */ | |
_:-moz-tree-row(hover), nav.tm_navbar { | |
background: red; |
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
/* | |
Button | |
Turns on and off a light emitting diode(LED) connected to digital | |
pin 13, when pressing a pushbutton attached to pin 2. | |
The circuit: | |
* LED attached from pin 13 to ground | |
* pushbutton attached to pin 2 from +5V |
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 | |
# open a microphone in pyAudio and listen for taps | |
# brew install portaudio | |
# pip install --allow-external pyaudio --allow-unverified pyaudio pyaudio | |
import pyaudio | |
import struct | |
import math |
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
# NOTE: this example requires PyAudio because it uses the Microphone class | |
import time | |
import requests | |
import speech_recognition as sr | |
''' | |
LIFX API methods | |
''' |
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 csv | |
import psycopg2 | |
from difflib import SequenceMatcher | |
from tabulate import tabulate | |
MIN_SIMILARITY_RATIO = 0.8 | |
# LOCAL | |
PSQL_HOST = 'localhost' |