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
{ Created it because I found that defining the columns at design time isn't much productive. | |
Usage: | |
Consider CustomersBindingScope is a TBindScope and CustomersGrid is a TStringGrid, and | |
CustomerBindingScope.DataObject points to a TList<TCustomer> and TCustomer is declared as | |
follow: | |
type | |
TCustomer = class | |
public | |
property Name: String read FName write FName; | |
property Age: Integer read FAge write FAge; |
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
if N < NMax then | |
begin | |
// Passo 2.2.1.1 | |
z := BischoffAndDowsland(L1, W1, LBox, WBox, N + 1, NMax, X, Y, OffsetX + 0, OffsetY + W4, TmpBlocos, TmpBlockCount2, Cache) + | |
BischoffAndDowsland(L2, W2, LBox, WBox, N + 1, NMax, X, Y, OffsetX + L1, OffsetY + W5, TmpBlocos, TmpBlockCount2, Cache) + | |
BischoffAndDowsland(L3, W3, LBox, WBox, N + 1, NMax, X, Y, OffsetX + L1, OffsetY + W4, TmpBlocos, TmpBlockCount2, Cache) + | |
BischoffAndDowsland(L4, W4, LBox, WBox, N + 1, NMax, X, Y, OffsetX + 0, OffsetY + 0, TmpBlocos, TmpBlockCount2, Cache) + | |
BischoffAndDowsland(L5, W5, LBox, WBox, N + 1, NMax, X, Y, OffsetX + L4, OffsetY + 0, TmpBlocos, TmpBlockCount2, Cache); | |
end | |
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
/* Um led conectado ao pino 13 é acionado mediante um botão ligado ao pino 2. Paralelamente a | |
isso, um led conectado ao pino 3 pisca em intervalos de 1s */ | |
#define BOTAO 2 | |
#define LED_BOTAO 13 | |
#define LED_PISCA 3 | |
unsigned long start = 0; | |
int estado_led = LOW; |
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 <TimerOne.h> | |
#define FREQUENCIA 110 // hz | |
#define TEMPO_TOCANDO 200 // ms | |
#define TEMPO_PAUSA_CURTA 200 // ms | |
#define TEMPO_PAUSA_LONGA 1000 // ms | |
#define TOCANDO 0 | |
#define PAUSA_CURTA 1 | |
#define PAUSA_LONGA 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
class Foo { | |
String bar | |
} |
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
(ns hello) | |
(defn factorial | |
"Calcula o fatorial do numero dado" | |
[n] | |
(loop [i n acc 1] | |
(if (= i 1) | |
acc | |
(recur (- i 1) (* acc i))))) |
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
(ns hello) | |
(defn is-divisible-by | |
[number divisor] | |
(= (rem number divisor) 0)) | |
(defn factor-by | |
[number factor acc] | |
(loop [n number acc1 acc] | |
(if (is-divisible-by n factor) |