- Operating System: Debian GNU/Linux 12 (bookworm)
- Kernel: Linux 6.1.64-09049-g010fe86d9eae
- Architecture: x86-64
- Podman: v1.7.1
1. Install Podman:
sudo apt install podman| use std::cmp::Ordering; | |
| fn main() { | |
| fn sort_pairs<'r,'s>((_,a): &'r (usize, &i32), (_,b): &'s (usize, &i32)) -> Ordering { | |
| if a > b { Ordering::Greater } | |
| else if b > a { Ordering::Less } | |
| else { Ordering::Equal} | |
| } | |
Under normal circumstances, a Web Worker should be passed a URL of the script to execute. However, a local function can also be used
This is done by converting a function to a string, converting that string to a Blob, and converting that Blob to an Object URL.
The code to do this would look a bit like this:
When taking part of a Daily Scrum as Scrum Master, I find it handy to take notes. This makes sure I can hand over the role, if need be. It also means I don't have to rememeber everything as I can look things up in my notes later.
Below is the structure I use as format or "template" for taking notes.
Some things of importance:
Job queues, message queues and other queues. Almost all of them in one place.
There are many queueing systems out there. Each one of them is different and was created for solving certain problems. This page tries to collect the libraries that are widely popular and have a successful record of running on (big) production systems.
| //use std::{thread, time::Duration}; | |
| //use rand::Rng; | |
| #![feature(thread_id_value)] | |
| use std::{thread, time::Duration, time::Instant}; | |
| use rand::Rng; | |
| #[allow(unused_imports)] | |
| use rayon::prelude::*; |
| mod foo { | |
| pub fn name() -> &'static str { | |
| module_path!() | |
| } | |
| } | |
| fn main() { | |
| println!("Hello, {}", foo::name()); | |
| } |
| // This version compiles, and works | |
| #[macro_use] | |
| extern crate serde_derive; | |
| use serde_json::{Map, Value}; | |
| use tide_websockets::{ | |
| WebSocket, | |
| Message | |
| }; | |
| use async_std::stream::StreamExt; |
| // This is at present within a script tag in html page | |
| app = function(){ | |
| function onLoad() | |
| { | |
| console.log("[page] loaded"); | |
| this.websocket = new WebSocket(this.wsUri); | |
| this.websocket.onopen = this.onWsOpen; | |
| this.websocket.onclose = this.onWsClose; |
| [package] | |
| name = "xdaytime" | |
| version = "0.1.0" | |
| edition = "2018" | |
| [features] | |
| default = ["os-poll", "os-ext", "net"] | |
| os-poll = [] | |
| os-ext = ["os-poll"] |