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 <SPI.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_PCD8544.h> | |
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3); | |
int LED_PIN = 8; | |
int INP = 2; | |
int counter = 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
package main | |
import "fmt" | |
type Lannister struct{} | |
func (l *Lannister) Roar() { | |
fmt.Println("Hear me roar!!!") | |
} |
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 main | |
import "fmt" | |
type Lannister struct{} | |
func (l *Lannister) Roar() { | |
fmt.Println("Hear me roar!!!") | |
} |
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 main | |
func main() { | |
var tyrion = Lannister{} | |
tyrion.Roar() | |
} |
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
project | |
|_ app | |
| |_ Lannister.go | |
|_ main.go |
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 app | |
import "fmt" | |
type Lannister struct{} | |
func (l *Lannister) Roar() { | |
fmt.Println("Hear me roar!!!") | |
} |
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
<style> | |
.axis { | |
font-family: sans-serif; | |
fill: #d35400; | |
font-size: 12px; | |
} | |
.line { | |
fill: none; |
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
<link href='http://fonts.googleapis.com/css?family=Open+Sans:700' rel='stylesheet' type='text/css'> | |
<a id="view-code" href="http://codepen.io/virgilpana/pen/wBOBYo" target="_blank">VIEW CODE</a> | |
<div id="window"> | |
<div id="header"> | |
<div class="circle"></div> | |
<div class="circle"></div> | |
<div class="circle"></div> | |
</div> |
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
function textSize(text) { | |
if (!d3) return; | |
var container = d3.select('body').append('svg'); | |
container.append('text').attr({ x: -99999, y: -99999 }).text(text); | |
var size = container.node().getBBox(); | |
container.remove(); | |
return { width: size.width, height: size.height }; | |
} | |
// Usage: textSize("This is a very long text"); |