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
| // Parse ISO8601 date/times and validates against the proleptic Gregorian calendar with no dependencies and no_std compliant. | |
| // | |
| // If you want to convert a parsed date into a unix timestamp, I recommend [tz-rs="0.7.0"](https://docs.rs/tz-rs/0.7.0) , which also has no dependencies. | |
| // | |
| // See also | |
| // * https://docs.rs/iso8601/0.6.2/iso8601/ | |
| // * https://github.com/BurntSushi/jiff | |
| /// Parses ISO8601 dates and validates against the proleptic Gregorian calendar. | |
| /// Usage: |
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
| /// Minimal template string substitution in 60 lines of code. | |
| /// * No dependencies | |
| /// * Single pass | |
| /// | |
| /// Possible improvements: Write more tests. | |
| #[cfg(test)] | |
| mod tests { | |
| use crate::fill_template; | |
| use std::collections::HashMap; |
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
| #set page("presentation-4-3", | |
| header: [#text("From MPA to SPA and Back", size: 12pt)], | |
| margin: (top: 2cm, left: 3cm,) | |
| ) | |
| #show heading: it => [ | |
| #set text(font: "Inria Serif") | |
| #pagebreak() | |
| #text(it.body) | |
| #linebreak() |
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
| use std::sync::mpsc::{Sender, Receiver}; | |
| use std::sync::mpsc; | |
| use rayon::prelude::*; | |
| fn main() { | |
| let (tx, rx): (Sender<u8>, Receiver<u8>) = mpsc::channel(); | |
| // Thread as an event loop (service) | |
| // Long lived | |
| // May use messaging and shared state | |
| std::thread::spawn(move || { |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| .time { padding: 1em } | |
| /* https://developer.mozilla.org/de/docs/Web/CSS/Reference/Values/system-color */ | |
| .current { background-color: ActiveText !important; } | |
| .speaker { margin: 1ex; padding: 1em; background-color: ButtonFace; } | |
| </style> | |
| </head> |
OlderNewer