以下を実行したらなぜか動くようになった
git clone --recursive git@github.com:microsoft/LightGBM.git\ncd LightGBM cd external_libs cd .. cmake -S . -B build -DAPPLE_OUTPUT_DYLIB=ON cmake --build build
以下を実行したらなぜか動くようになった
git clone --recursive git@github.com:microsoft/LightGBM.git\ncd LightGBM cd external_libs cd .. cmake -S . -B build -DAPPLE_OUTPUT_DYLIB=ON cmake --build build
use std::collections::HashMap; fn main() { let arr = ['C','C','A','A','B']; let mut count: HashMap<char,i32> = HashMap::new(); for a in arr { // println!("{}",a); match a { 'A' => { let val = count.get(&'A').unwrap_or(&0); let val_i32 : i32 = *val; count.insert('A', val_i32+1); }, 'B' => { let val = count.get(&'B').unwrap_or(&0); let val_i32 : i32 = *val; count.insert('B', val_i32+1); }, 'C' => { let val = count.get(&'C').unwrap_or(&0); let val_i32 : i32 = *val; count.insert('C', val_i32+1); }, _ => {}, } } println!("{:?}",count); }
アプリ起動時のMade With Unityロゴ画面を編集する方法 – UNITY | KKLOG
アセットに読み込んだ画像の設定をSprite (2D and UI)に変更する必要がある。
use rand::Rng; // use rand::seq::SliceRandom; fn main() { let mut vec: Vec<i32> = Vec::new(); let mut rng = rand::thread_rng(); for i in 1..=25 { let mut r = rng.gen_range(1..=75); if i==13 { vec.push(0); } else { while vec.contains(&r) { r = rng.gen_range(1..=75); } vec.push(r); } } for i in 0..=4 { println!("{:>3?}",[vec[5*i],vec[5*i+1],vec[5*i+2],vec[5*i+3],vec[5*i+4]]); } }
[ 3, 56, 62, 30, 31] [ 17, 67, 15, 55, 18] [ 37, 38, 0, 26, 27] [ 74, 28, 39, 75, 36] [ 19, 11, 34, 40, 60]
hoge.txt が存在しているときにはリダイレクトは書き込みエラーになる。
$ echo hoge > hoge.txt $ echo moge > hoge.txt bash: hoge.txt: cannot overwrite existing file
以下で強制上書きできる。(リダイレクトの後ろにパイプをくっつける)
$ echo moge >| hoge.txt $ cat hoge.txt moge