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
<html> | |
<head> | |
<title>Bienentherme Graphen</title> | |
<script src="snap.svg-min.js"></script> | |
<script> | |
const TEMP_RANGE_MAX = 90 | |
const HUMIDITY_MAX = 100 | |
const ACTIVITY_MAX = 50000 | |
const dataA = Array.from(new Array(48)).map(x => ({ |
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
use std::sync::{Arc, RwLock}; | |
use std::thread; | |
#[derive(Debug)] | |
struct Object{ | |
name: String, | |
} | |
fn main() { |
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
extern crate futures; | |
extern crate tokio; | |
use futures::{Future, Stream}; | |
use tokio::timer::*; | |
use std::time::{Duration, Instant}; | |
fn main() { |
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
use std::sync::*; | |
use std::thread; | |
fn main() { | |
let mut x = 12; | |
let y = x; // This copies | |
x = 16; // | |
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
use std::vec::Vec; | |
use std::rc::{Weak,Rc}; | |
struct Component{ | |
parent: Weak<Compound>, | |
active_site: Option< Box< ActiveSite > >, | |
} | |
impl Component{ | |
fn update(&self){ |
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
use std::boxed::Box; | |
use std::mem; | |
enum CellarState<S>{ | |
Empty, | |
Value (S,Box<CellarState<S>>), | |
} | |
pub struct Cellar<S>{ | |
// The Cellar of the Automaton |
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
use std::vec::Vec; | |
use std::rc::{Weak,Rc}; | |
pub trait Observer{ | |
fn on_notify( &self ) -> (); | |
} | |
#[derive(Default)] | |
pub struct Subject{ | |
observers: Vec< Weak <Observer > >, |