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::mpsc; | |
use std::thread; | |
fn main() { | |
let (sender1, recceiver) = mpsc::channel(); | |
let sender2 = mpsc::Sender::clone(&sender1); | |
let _ = thread::spawn(move || { | |
let data = vec!["One".to_string(), "Two".to_string(), "Three".to_string(), "Four".to_string()]; |
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
import * as ts from "https://esm.sh/typescript"; | |
interface BaseNode { | |
pos: number; | |
end: number; | |
kind: number; | |
id: number; | |
flags: number; | |
modifierFlagsCache: number; | |
transformFlags: number; |
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
open System | |
type Pattern = | |
| Shika | |
| Noko | |
| Koshi | |
| Tan | |
member self.String() = | |
match self with |
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
puts [("しか" * 1), ("のこ" * 3), ("こし" * 1), ("たん" * 2)].join |
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
print( | |
"".join( | |
[ | |
pair[0] * pair[1] | |
for pair in [("しか", 1), ("のこ", 3), ("こし", 1), ("たん", 2)] | |
] | |
) | |
) |
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
data Pattern = Shika | Noko | Koshi | Tan deriving (Show, Eq) | |
toString :: Pattern -> String | |
toString Shika = "しか" | |
toString Noko = "のこ" | |
toString Koshi = "こし" | |
toString Tan = "たん" | |
generate :: [(Pattern, Int)] -> [String] |
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
digraph G { | |
node [shape=circle, fontsize=12]; | |
edge [fontsize=10]; | |
st [label="Start"]; | |
shika [label="しか"]; | |
noko [label="のこ"]; | |
koshi [label="こし"]; | |
tan [label="たん"]; | |
end [label="End"]; |
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::iter; | |
fn main() { | |
iter::repeat( | |
iter::once("しか") | |
.chain(iter::repeat("のこ").take(3)) | |
.chain(iter::once("こし")) | |
.chain(iter::repeat("たん").take(2)) | |
.chain(iter::once("\n")), | |
) |
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
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"title": "HTTP Archive (HAR) Schema", | |
"type": "object", | |
"properties": { | |
"log": { | |
"type": "object", | |
"properties": { | |
"version": { | |
"type": "string" |
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 serde::Deserialize; | |
use serde::Serialize; | |
#[derive(Debug, Deserialize, Serialize)] | |
pub struct Har { | |
pub log: Log, | |
} | |
#[derive(Debug, Deserialize, Serialize)] | |
pub struct Log { |
NewerOlder