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
CREATE TABLE IF NOT EXISTS locations | |
( | |
timezone CHARACTER NOT NULL, | |
latitude INTEGER NOT NULL, | |
ocean VARCHAR(255) NOT NULL, | |
geographic_reference VARCHAR(255), | |
name VARCHAR(255), | |
PRIMARY KEY (timezone, latitude) | |
); |
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
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; | |
fragment@0 { | |
target-path = "/soc"; | |
__overlay__ { | |
keypad: keypad { | |
compatible = "gpio-keys"; |
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> | |
/* run this program using the console pauser or add your own getch, system("pause") or input loop */ | |
int | |
main () | |
{ | |
int i, h, leg1, leg2, primleg, segleg; |
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
fn main() { | |
// Variables can be type annotated. | |
let logical: bool = true; | |
let a_float: f64 = 1.0; // Regular annotation | |
let an_integer = 5i32; // Suffix annotation | |
// Or a default will be used. | |
let default_float = 3.0; // `f64` | |
let default_integer = 7; // `i32` |
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
# All the primes... | |
constant p = [ (1..∞).grep(&is-prime) ]; | |
# The definitions of "strong" and "weak"... | |
sub strong (\n) { n > 0 && p[n] > p[n-1, n+1].sum/2 } | |
sub weak (\n) { n > 0 && p[n] < p[n-1, n+1].sum/2 } | |
# All the strong and weak primes... | |
constant strong-p = p.kv.map: ->\n,\pₙ {pₙ if strong n}; | |
constant weak-p = p.kv.map: ->\n,\pₙ {pₙ if weak n}; |
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
const oneSecond = () => 1000 | |
const getCurrentTime = () => new Date() | |
const clear = () => console.clear() | |
const log = message => console.log(message) | |
const compose = (...fns) => | |
(arg) => | |
fns.reduce( | |
(composed, f) => f(composed), | |
arg |
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
package main | |
import ( | |
"fmt" | |
"runtime" | |
) | |
func main() { | |
fmt.Print("Go runs on ") | |
switch os := runtime.GOOS; os { |
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 <fstream> | |
# include <iostream> | |
# include <string> | |
# include <iomanip> | |
using namespace std; | |
struct Items | |
{ | |
string name; |
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 <iostream> | |
#include <string> | |
#include <ctime> | |
#include <cstdlib> | |
using namespace std; | |
int main() | |
{ |
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 <iostream> | |
#include <string> | |
#include <ctime> | |
#include <cstdlib> | |
using namespace std; | |
int main() | |
{ |
NewerOlder