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
void main() { | |
print("wir machen ein update\n"); | |
doUpdate(); | |
} | |
void doUpdate() async { | |
var currentValue = ""; | |
try { |
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
TestCase := Window { | |
preferred-width: 400px; | |
preferred-height: 600px; | |
background: red; | |
Path { | |
width: 100%; | |
height: 100%; | |
fill: white; |
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] | |
name = "herold" | |
version = "0.1.0" | |
authors = ["Dustin Bensing <[email protected]>"] | |
[dependencies] | |
#actix-web = "0.6" | |
actix-web = { git = "https://github.com/actix/actix-web.git" } | |
serde = "1.0.66" | |
serde_derive = "1.0.66" |
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
#[macro_use] | |
extern crate serde_derive; | |
extern crate actix_web; | |
extern crate fcm; | |
extern crate tokio; | |
extern crate futures; | |
use actix_web::{server, App, Responder, Json, http, HttpResponse, Error, client::SendRequestError}; | |
use fcm::{MessageBuilder, Client, NotificationBuilder, FcmError}; | |
use futures::{ |
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
public class Main { | |
//a container holding all kinds of stuff | |
interface Container<S, F, M, L> { //S (self) is not really safe here .. can be anything | |
boolean contains(F f, M m, L l); | |
F first(); | |
M middle(); | |
L last(); | |
S create(F f, M m, L l); | |
} |
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
//a container holding all kinds of stuff | |
trait Container { | |
type F: Copy; | |
type M: Copy; | |
type L: Copy; | |
fn contains(&self, first: &Self::F, middle: &Self::M, last: &Self::L) -> bool; | |
fn first(&self) -> &Self::F; | |
fn middle(&self) -> &Self::M; | |
fn last(&self) -> &Self::L; |
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
public class Main { | |
//Java has no `add` interface | |
interface Addition<T> { | |
T add(T other); | |
T init(); | |
} | |
//fucked up wrapper for Integers, Java has no `add` interface | |
public static class AInteger implements Addition<AInteger> { |
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
extern crate num; | |
use std::ops::{Add, AddAssign}; | |
use std::fmt::Display; | |
use num::traits::Zero; | |
//an Iterator over types that can be added | |
trait AIterator { | |
type Output: Add + AddAssign + Display + Clone + Zero; |
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
//a container holding all kinds of stuff | |
trait Container { | |
type F; | |
type M; | |
type L; | |
fn contains(&self, first: &Self::F, middle: &Self::M, last: &Self::L) -> bool; | |
fn first(&self) -> &Self::F; | |
fn middle(&self) -> &Self::M; | |
fn last(&self) -> &Self::L; |
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
public class Main { | |
//a container holding all kinds of stuff | |
interface Container<F,M,L> { | |
boolean contains(F f, M m, L l); | |
F first(); | |
M middle(); | |
L last(); | |
} |
NewerOlder