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/ruby | |
require 'open-uri' | |
def classy_exit | |
puts "I need a youtube video URL" | |
exit 0 | |
end | |
def get_video_id url |
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
<?php | |
$sql0 = mysql_query("SELECT DISTINCT nomecliente FROM andamento ORDER BY nomecliente") or die ("Erro: ".mysql_error()); | |
$list_options = ""; | |
while ($aux0 = mysql_fetch_array($sql0)) { | |
$nome = $aux0["nomecliente"]; | |
/* Cria uma string com as options de todos clientes, coloca um depois do outro */ | |
$list_options .= "<option value='$nome'>$nome</option>\n"; | |
/* Fica tipo | |
<option value='lucas'>lucas</option> |
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
// Buzzer example function for the CEM-1203 buzzer (Sparkfun's part #COM-07950). | |
// by Rob Faludi | |
// http://www.faludi.com | |
// Matehacked by Lucas and Jerônimo | |
int noteToFreq(int note) | |
{ | |
return (int) pow(2, (double)note/12) * 440; | |
} |
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 d035e950c47861a94215a2508ef5f27247b89c0e Mon Sep 17 00:00:00 2001 | |
From: Lucas Zawacki <lfzawacki@gmail.com> | |
Date: Mon, 18 Jun 2012 14:48:50 -0300 | |
Subject: [PATCH] dinput: Append driver name to dinput joysticks on Linux | |
--- | |
dlls/dinput/joystick_linux.c | 7 ++++++- | |
dlls/dinput/joystick_linuxinput.c | 15 ++++++++++----- | |
2 files changed, 16 insertions(+), 6 deletions(-) |
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 bd9e9c08082419828098ee7b327448725d1455ca Mon Sep 17 00:00:00 2001 | |
From: Lucas Zawacki <lfzawacki@gmail.com> | |
Date: Wed, 11 Jul 2012 14:24:04 -0300 | |
Subject: joy.cpl: Correct joystick testing thread behavior (try 2) | |
The problem with the original behavior is that it starts a new thread each time the test tab is switched to, but | |
only stopped them on PSN_RESET. Now when the window receives PSN_KILLACTIVE (cancel button, X button or tab switch) or | |
PSN_RESET (ok button), the thread will rightfully die. | |
--- |
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
def lugar_vazio(bathroom): | |
pmetade=bathroom[:len(bathroom)/2] | |
smetade=bathroom[len(bathroom)/2:] | |
if bathroom[0]==0: | |
return 0 | |
elif bathroom[-1]==0: | |
return len(bathroom)-1 | |
elif bathroom[(len(bathroom)-1)/2]==0: | |
return (len(bathroom)-1)/2 | |
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
class Symph | |
{ | |
Step s; | |
fun void connect(UGen u) { s => u; } | |
fun void next(int sa) { (sa & 0xff) / 128. - 1. => s.next; } | |
} | |
Symph s; | |
s.connect(dac); |
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
// OscWrapper.ck | |
public class OscWrapper | |
{ | |
OscEvent e; | |
int data; | |
string url; | |
fun void create(OscRecv recv, string s) | |
{ |
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
void setup() | |
{ | |
Serial.begin(9600); | |
pinMode(13, INPUT); | |
} | |
void loop() | |
{ | |
if (digitalRead(13) == HIGH) |
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
/* | |
ASCII byte, sends one ascii byte | |
*/ | |
void setup() | |
{ | |
Serial.begin(9600); | |
pinMode(13, INPUT); | |
} |