This file contains hidden or 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
Lemma plus_a_0 : forall n : nat, n + 0 = n. | |
Proof. | |
intros. | |
induction n. | |
simpl. | |
reflexivity. | |
simpl. | |
rewrite IHn. | |
reflexivity. | |
Qed. |
This file contains hidden or 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
.intel_syntax noprefix | |
.text | |
.align 4 | |
.global main | |
main: | |
mov eax, 1 | |
mov ebx, 2 |
This file contains hidden or 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 <Matrix.h> | |
#include <Sprite.h> | |
const int censorPin = 1; | |
Matrix mtx = Matrix(10, 12, 11); | |
void setup() { | |
pinMode(censorPin, INPUT); |
This file contains hidden or 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 <stdio.h> | |
int n; | |
int route[100][100]; | |
int dtable[100]; | |
int distance (int i, int j); | |
int main(void) |
This file contains hidden or 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 <stdio.h> | |
void swap(int* a, int* b) { | |
int tmp; | |
tmp = *a; | |
*a = *b; | |
*b = tmp; | |
} | |
int euclid(int a, int b) { |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#define MAX(x, y) ((x == M) ? x : (y == M) ? y : (x > y) ? x : y) | |
#define MIN(x, y) ((x == M) ? y : (y == M) ? x : (x < y) ? x : y) | |
typedef int Weight; | |
#define M (-1) | |
#define N (6) |
This file contains hidden or 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
Require Import List Arith. | |
Require Import Recdef. | |
Lemma lemma1: | |
forall (a : Type) (f : a -> bool) (n : a) (xs : list a), | |
length (filter f (n :: xs)) = if f n then 1 + length (filter f xs) | |
else length (filter f xs). | |
Proof. | |
intros a f n xs. | |
simpl. |
This file contains hidden or 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
$PSVersionTable | |
Name Value | |
---- ----- | |
CLRVersion 2.0.50727.5477 | |
BuildVersion 6.1.7601.17514 | |
PSVersion 2.0 | |
WSManStackVersion 2.0 | |
PSCompatibleVersions {1.0, 2.0} |
This file contains hidden or 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
var any = Chars.Any(); | |
var newline = Combinator.Choice(Chars.Sequence("\u000d\u000a"), | |
Chars.Sequence("\u000d"), | |
Chars.Sequence("\u000a")) | |
.Ignore(); | |
var lineCommentBegin = Chars.Sequence("//"); | |
var lineComment = lineCommentBegin | |
.Right(Flows.Until(any, eof.Or(newline))) | |
.Ignore(); |
This file contains hidden or 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
let quad_eq a b c = | |
let eq = b * b - 4 * a * c in | |
let ret = begin | |
if eq > 0 then | |
2 | |
else if eq = 0 then | |
1 | |
else | |
0 | |
end in |