javascript

Javascript Regex ์ˆซ์ž๋ฅผ comma์™€ ํ•จ๊ป˜ Formatting ํ•˜๊ธฐ

regex๋ฅผ ํ™œ์šฉํ•ด์„œ ์ˆซ์ž์— , ๋ฅผ ์ฐ์–ด์„œ formatting์„ ํ•ด๋ณด์ž. ## 1. ์ฒซ๋ฒˆ์งธ ์‹œ๋„ ```javascript function formatNumber(number) { return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") } ``` ์ธํ„ฐ๋„ท์— ๊ฐ€์žฅ ๋งŽ์ด ๋– ๋Œ์•„ ๋‹ค๋‹ˆ๋Š” ํ•ด๊ฒฐ์ฑ…์œผ๋กœ, ...

Read

NextJS 2. Data Fetching

[nextjs์˜ ๊ณต์‹ ๋ฌธ์„œ](https://nextjs.org/docs/basic-features/data-fetching)๋ฅผ ๋ณด๊ณ  ์š”์•ฝํ•œ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค. ```toc tight: true, from-heading: 1 to-heading: 2 ``` ## 1. getInitialProps Nextjs 9.3 ์ด์ „์—๋Š” `getInitialProps` ๋ฐ–์—...

Read

NextJS 1. Page & Route

์š”์ฆ˜ ๋ฆฌ์•กํŠธ๋ฅผ ์“ฐ๋Š” ๋งŽ์€ ํ”„๋กœ์ ํŠธ์—์„œ, SSR์„ ์ง€์›ํ•˜๊ธฐ ์œ„ํ•ด [nextjs](https://nextjs.org/)๋ฅผ ์“ฐ๊ณ  ์žˆ๋‹ค. ์ดˆ๊ธฐ ๋กœ๋”ฉ ์†๋„๋‚˜, SEO ์ง€์› ์ด์Šˆ ๋“ฑ ๋“ฑ ๋•Œ๋ฌธ์— ์•„๋ฌด๋ž˜๋„ SPA๋Š” ์š”์ฆ˜ ํŠธ๋ Œ๋“œ์—์„œ ๋งŽ์ด ๋ฐ€๋ฆฐ ๊ธฐ๋ถ„์ด๋‹ค. ๋ฌผ๋ก  [razzle](https://github.com/jaredpalmer/razzle) ์„ ์“ฐ๊ฑฐ๋‚˜ custom ser...

Read
javascript

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์ปค๋ง๊ณผ ํด๋กœ์ ธ

## ์ปค๋ง [์ด ๊ธ€](https://www.sitepoint.com/currying-in-functional-javascript/) ์— ์ž˜ ์ •๋ฆฌ ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. Currying์€ ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์ธ์ž๋ฅผ ๊ฐ€์ง„ ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœ ํ•  ๊ฒฝ์šฐ, ํŒŒ๋ผ๋ฏธํ„ฐ์˜ ์ˆ˜๋ณด๋‹ค ์ ์€ ์ˆ˜์˜ ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ธ์ž๋กœ ๋ฐ›์œผ๋ฉด ๋ˆ„๋ฝ๋œ ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ธ์ž๋กœ ๋ฐ›๋Š” ๊ธฐ๋ฒ•์„ ๋งํ•œ๋‹ค. ์ฆ‰ ์ปค๋ง์€ ํ•จ์ˆ˜ ํ•˜๋‚˜๊ฐ€ n๊ฐœ...

Read

Tensorflow.js - 08. Build an audio recognizer

```toc tight: true, from-heading: 1 to-heading: 3 ``` # Transfer learning audio recognizer ์ด๋ฒˆ ํŠœํ† ๋ฆฌ์–ผ์—์„œ๋Š”, Tensorflow.js๋ฅผ ํ™œ์šฉํ•˜์—ฌ ๋ธŒ๋ผ์šฐ์ €์—์„œ ํ•™์Šต์‹œํ‚ค๋Š” ์ปค์Šคํ…€ ์˜ค๋””์˜ค ๋ถ„๋ฅ˜๊ธฐ๋ฅผ ๋งŒ๋“ค์–ด ๋ณผ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋ธŒ๋ผ์šฐ์ €์—์„œ ์Šฌ๋ผ์ด๋”๋ฅผ ์ปจํŠธ๋กค์„ ํ•˜์—ฌ ์‚ฌ์šด๋“œ๋ฅผ ๋งŒ๋“ค์–ด ๋ณผ ๊ฒƒ์ž…๋‹ˆ๋‹ค....

Read