ํค์๋ | ์ฉ๋ |
---|---|
fn |
(parenless) ํจ์/ํด๋ก์ ์ ์ธ |
if |
๋ถ๊ธฐ๋ฌธ |
for |
๋ฐ๋ณต๋ฌธ |
else |
๋ถ๊ธฐ๋ฌธ์ ๋ณ๋ ์กฐ๊ฑด ํน์ for ์ ์ ์ ์ข
๋ฃ ๊ตฌ๋ฌธ |
break |
๋ฐ๋ณต๋ฌธ ํ์ถ |
return |
์กฐ๊ธฐ ๋ฐํ |
This file contains hidden or 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
mod lazy_lock { | |
use parking_lot::{Once, OnceState}; | |
use std::{cell::UnsafeCell, default::Default, mem::ManuallyDrop, ops::Deref}; | |
union Data<T, F> { | |
value: ManuallyDrop<T>, | |
f: ManuallyDrop<F>, | |
} | |
pub struct LazyLock<T, F = fn() -> T> { | |
once: Once, |
This file contains hidden or 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
package main | |
import ( | |
"log" | |
"flag" | |
"fmt" | |
"strconv" | |
"sync" |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"math/big" | |
"os" | |
"strconv" | |
"time" | |
) |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"math/big" | |
"os" | |
"strconv" | |
"time" | |
) |
This file contains hidden or 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
set nocompatible | |
filetype off | |
set hlsearch | |
set scrolloff=3 | |
set nobackup | |
set noswapfile | |
set bs=eol,start,indent | |
set autoread | |
set smarttab | |
" set smartindent |
๋ชฉ์ : ๋ฉ๋ชจ๋ฆฌ ์ค๋ฅ๋ฅผ ๋ฐฉ์งํ๋ ๋์์ฑ ํ๋ก๊ทธ๋๋ฐ
๋์์ฑ ํ๋ก๊ทธ๋๋ฐ์์์ ์ํ ์์: Race condition
๋ฐ Deadlock
Rust
์ธ์ด์ ํด๊ฒฐ ๋ฐฉ์: move-by-default
, ownership
, lifetime
=
์ฐ์ฐ์๋ ๋ณ์์ownership
(์์ ๊ถ)์ ์ด๋์ํด
๋ชฉ์ : ๋ฉ๋ชจ๋ฆฌ ์ค๋ฅ๋ฅผ ๋ฐฉ์งํ๋ ๋์์ฑ ํ๋ก๊ทธ๋๋ฐ
๋์์ฑ ํ๋ก๊ทธ๋๋ฐ์์์ ์ํ ์์: Race condition
๋ฐ Deadlock
Rust
์ธ์ด์ ํด๊ฒฐ ๋ฐฉ์: move-by-default
, ownership
, lifetime
=
์ฐ์ฐ์๋ ๋ณ์์ownership
(์์ ๊ถ)์ ์ด๋์ํด
This file contains hidden or 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
#!/bin/bash | |
echo ์ด ์ ์คํฌ๋ฆฝํธ๋ ๋ฆฌ๋ ์ค์์ MiNET์ ์ฝ๊ฒ ์ค์นํด์ค๋๋ค | |
echo ์ ์คํฌ๋ฆฝํธ ์ ์์: ํธ๋ฅธ๊ณก๊ดญ์ด, MiNET ์ ์์: NiclasOlofsson๋ | |
echo ์ ๋ง ๊ฐ๋จํ๊ฒ ๋ง๋ค์ด์ง ์ ์คํฌ๋ฆฝํธ์ ๋๋ค ์ ๋ง๋ก ํ๋ฃจ๋ง์ ๋ง๋ค์์ต๋๋ค | |
echo $(date) ์ค์น๋ฅผ ์์ํฉ๋๋ค... | |
echo Git๊ฐ ์ค์น๋์ด์๋์? \(๋ค/์๋์\) | |
read gitanswer | |
if [ $gitanswer -eq ๋ค ] | |
then |
This file contains hidden or 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
#!/bin/bash | |
#Needed to use aliases | |
shopt -s expand_aliases | |
type wget > /dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
if [ "$IGNORE_CERT" == "yes" ]; then | |
alias download_file="wget --no-check-certificate -q -O -" | |
else | |
alias download_file="wget -q -O -" |
NewerOlder