2021
-
rust 032021/개발 2021. 6. 11. 16:42
references 규칙 어떠한 경우든 간, 아래의 경우 중 둘 중 하나만 가능 하나의 가변 참조자 (&mut) 임의 갯수의 불변 참조자 참조자는 항상 유효해야 함 let mut s = String::from("hello"); let r1 = &s; // good let r2 = &s; // good let r3 = &mut s; // error dangling 조심 fn main() { let d = dangle(); let d = avoid(); } fn dangle() -> &String { let s = String::from("dangle!"); // dangle &s //
-
rust 022021/개발 2021. 6. 9. 20:59
소유권(Ownership) // main.rs fn main() { // move let s1 = String::from("hello"); let s2 = s1; println!("{}", s1); } 하하하하하하하하하 fn main() { // clone let s1 = String::from("hello"); let s2 = s1.clone(); println!("s1: {}, s2: {}", s1, s2); // s1: hello, s2: hello }하하하하하하하하하하하하하 fn main() { // copy let x = 5; let y = x; println!("x: {}, y: {}", x, y); // x: 5, y: 5 }하하하하하하하하하하하하하하하하하하하 fn main() { // On..
-
rust 012021/개발 2021. 6. 8. 21:15
// main.rs // https://rinthel.github.io/rust-lang-book-ko/ch03-05-control-flow.html fn main() { // Q1 섭씨 화씨 계산 let far = cel2far(32); let cel = far2cel(far); println!("far: {}, cel: {}", far, cel); // Q2 n 피보나치 for i in 0..11 { let f = fibo(i); println!("fibo[{}] : {}", i, f); } } fn cel2far(cel: i32) -> i32 { cel * 9 / 5 + 32 } fn far2cel(far: i32) -> i32 { (far - 32) * 5 / 9 } fn fibo(n: i32) ..
-
0002 - Layout System2021/개발 2021. 1. 18. 22:26
1. Box Object Model The height/width of an element + the space around it -> Use this to affect the positioning of a single element 'Content' and 'padding' sections show background color, Border and Margin do not 주로 사용되는 Shortcuts margin : 전체 marginVertical : 상하 marginHorizontal : 좌우 padding : 전체 paddingVertical : 상하 paddingHorizontal : 좌우 borderWidth : 전체 border width 개별적으로 줄때는 css와 동일하게 top rig..
-
0001 - Props / State2021/개발 2021. 1. 10. 21:33
www.udemy.com/course/the-complete-react-native-and-redux-course/ The Complete React Native + Hooks Course [2020 Edition] Understand React Native v0.62.2 with Hooks, Context, and React Navigation. www.udemy.com Props: System to pass data from a parent to a child State: System to track a piece of data that will chanege over time. If that data changes, our app will 'rerender'. Props는 부모자식간 데이터 전달의 ..
-
올 한해 목표2021 2021. 1. 5. 22:56
생각해보니 가장 중요한걸 안적어서.. 목표 : 한 해 동안 뭐라도 꾸준히 공부하기 영상편집 유튜브에 브이로그 등 올리기 목표는 주당 1개 일년동안 50개 정도면 좋지 않을까? 음악 악기 다뤄보기 피아노 그냥 취미생활 할 수 있을정도로 노래 하나 완곡 목표 기타 코드 좀 잡으면서 연습 이건 천천히 계획 구체화 보컬 보컬보단 발성에 중점으로 그림 그림 공부하기 유튜브 인트로 영상 만들어보기 카톡 이모티콘도 만들어보면 좋을 듯 개발 주식 자동매매 프로그램을 만들어보자 파이썬 기반으로 어플도 만들어보자 RN / Ionic / Flutter 등.. 게임도 만들어보자 이 참에 유니티