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 <stdio.h> | |
int main(void) { | |
for(int i = 0 ; i < 10; i++){ | |
printf("%d\n",i); | |
}return 0; | |
} |
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 <SoftwareSerial.h> | |
/* | |
void setup() { | |
Serial.begin(9600); | |
// Initialize | |
clearLCD(); | |
backlightOn(); | |
} |
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
# Hey Emacs, this is a -*- makefile -*- | |
#---------------------------------------------------------------------------- | |
# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al. | |
# | |
# Released to the Public Domain | |
# | |
# Additional material for this makefile was written by: | |
# Peter Fleury | |
# Tim Henigan | |
# Colin O'Flynn |
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
// error is : | |
// sigexample.go:12: case 17 (type signal.UnixSignal) in signal.Signal switch | |
package main | |
import ( | |
"os/signal" | |
) |
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
a.out |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="application/javascript"> | |
function drawBowtie(ctx, fillStyle) { | |
ctx.fillStyle = "rgba(200,200,200,0.3)"; | |
ctx.fillRect(-30,-30,60,60); | |
ctx.fillStyle = fillStyle; | |
ctx.globalAlpha = 1.0; |
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
"shapes": [ | |
{ | |
"start_angle": 0.5, | |
"end_angle": 1.5, | |
"type": "arc", | |
"radius": 10, | |
"x": 10, | |
"y": -10 | |
} | |
] |
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/env python | |
#paren.py - solve paren problem | |
# We want all combinations of N left and right parens that are correct | |
# (so every right comes after it's corresponding left) | |
# Can it be done recursively using continuations? | |
# I wondered this sitting in the hotel room the night before my google interview. | |
# And I couldnt sleep, so went about trying to figure out more. |
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
TEST 0 n 5 p1 1 w1 4 m 5 k 7 a 1 b 0 c 1 d 2 | |
Product 2 (2, 7) | |
Product 3 (3, 3) | |
Product 4 (4, 6) | |
Product 5 (5, 2) | |
TEST 1 n 3 p1 1 w1 3 m 3 k 3 a 1 b 0 c 1 d 1 | |
Product 2 (2, 2) | |
Product 3 (3, 1) | |
TEST 2 n 8 p1 1 w1 3 m 3 k 3 a 1 b 0 c 1 d 2 | |
Product 2 (2, 3) |
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/env python | |
import sys,math | |
k, x, d, t = 10000001 , [1,3,3,1] , {1:1,2:2,3:3}, 3 | |
while len(x) > 3: | |
i = reduce(lambda z,y: z if z > 0 else y[0] if y[1] > k else z, enumerate(x), -1) | |
x,t = map(sum,zip([0]+x[0:i],x[0:i]+[0])) if i > 0 else map(sum,zip([0]+x,x+[0])), t+1 | |
for s in x: d[s] = t if s not in d else d[s] |
OlderNewer