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, Mutex}; | |
fn main() { | |
println!("Hello, world!"); | |
let app_state = TodoAppState { | |
text_input: text_input::State::new(), | |
todos: TodoState { todos: vec![] }, | |
visibility_filter: VisibilityFilterState { | |
visibility_filter: VisibilityFilter::ShowAll, | |
}, |
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
time cargo run > result6.txt | |
Finished dev [unoptimized + debuginfo] target(s) in 0.05s | |
Running `target/debug/img_hash` | |
real 0m0.580s | |
user 0m3.375s | |
sys 0m0.224s | |
(AMD Ryzen 5 2600 Six-Core Processor, 50 png images, each 700~1300 KB) |
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 { | |
CanvasKit, | |
CanvasKitInit, | |
ClipOp, | |
Image, | |
InputRect, | |
InputRRect, | |
Paint, | |
Paragraph, | |
ParagraphStyle, |
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
export {}; | |
// 주제 : multiple counter | |
// update -> render -> event handling -> 반복 | |
type State = { | |
counters: { | |
count: 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
The result of render is Pixel. | |
We can get z index(depth) of pixel too. | |
Save RGBA and Depth per frame -> 3D video. | |
3D Videos can be merged together using z index! |
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
#include <stdio.h> | |
#pragma warning (disable : 4996) | |
#define SCISSORS 1 | |
#define ROCK 2 | |
#define PAPER 3 | |
#define WIN 1 | |
#define LOSE -1 | |
#define DRAW 0 |
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
using System; | |
using System.Buffers; | |
using System.Collections.Concurrent; | |
using System.IO.Pipelines; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using MessageSerializer; | |
namespace NetworkConnector.Connector | |
{ |
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
// code written by skatpgusskat 남세현 | |
// https://en.wikipedia.org/wiki/Needleman%E2%80%93Wunsch_algorithm | |
const dnaSequence1 = 'GCTAGGACTG'.split(''); | |
const dnaSequence2 = 'ACGGATGCAT'.split(''); | |
const LEFT = 'LEFT'; | |
const TOP = 'TOP'; | |
const TOP_LEFT = 'TOP_LEFT'; |
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
// from https://gist.github.com/zygygy/0feaff3f25ebe7e7e4dafa7b7f18c061 | |
function partition(seq, pred) { | |
const first = []; | |
const second = []; | |
seq.forEach(i => { | |
if (pred(i)) { | |
first.push(i); | |
} else { | |
second.push(i); |