๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • Tried. Failed. Logged.
728x90

๐Ÿ–ฅ๏ธํ”„๋ก ํŠธ์—”๋“œ67

๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ - Expo snack์—์„œ ํŒจํ‚ค์ง€ ์ถ”๊ฐ€ ๋ฐฉ๋ฒ• import { Camera } from 'expo-camera'; ์ด๋Ÿฐ ์‹์œผ๋กœ ์ƒˆ๋กœ์šด ํŒจํ‚ค์ง€๋ฅผ import ํ•˜๋ฉด ํ”„๋กœ์ ํŠธ ํŽ˜์ด์ง€ ๋งจ ์•„๋ž˜์— Add dependency๋ฉ”์‹œ์ง€๊ฐ€ ๋‚˜์˜ค๋Š”๋ฐ ์ด๊ฑธ ๋ˆ„๋ฅด๋ฉด ์ž๋™์œผ๋กœ ์ถ”๊ฐ€๋œ๋‹ค. dependencies์— ํŒจํ‚ค์ง€ ๋ช…์„ ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ์‹์ด๋ผ, expo-๋กœ ์‹œ์ž‘ํ•˜๋Š” ํŒจํ‚ค์ง€๋งŒ ์ง€์›์ด ๊ฐ€๋Šฅํ•œ ๊ฒƒ ๊ฐ™์Œ. ์ถœ์ฒ˜: https://stackoverflow.com/questions/68931393/how-to-add-add-new-packages-in-expo-snack How to add add new packages in expo snack? I want to use expo-av package in expo snack. However I know that after importing.. 2022. 10. 10.
ํ”„๋ก ํŠธ์—”๋“œ - ํ•œ ์ค„๋กœ ์ •์˜๋œ json์„ ์ด์˜๊ฒŒ ์ถœ๋ ฅํ•ด์ฃผ๋Š” ์‚ฌ์ดํŠธ(JsonFormatter) https://jsonformatter.curiousconcept.com/# JSON Formatter & Validator Format and validate JSON data so that it can easily be read by human beings. jsonformatter.curiousconcept.com 2022. 10. 4.
ํ”„๋ก ํŠธ์—”๋“œ - ๋กœ์ปฌ ๋„คํŠธ์›Œํฌ ์‰ฝ๊ฒŒ ์ธํ„ฐ๋„ท์œผ๋กœ ๊ณต์œ ํ•˜๊ธฐ(ngrok) https://ngrok.com/ ngrok - Online in One Line Zero Trust Add SSO, Mutual TLS, IP Policy, and webhook signature verification. ngrok.com ngrok์ด๋ž€? ngrok is a globally distributed reverse proxy fronting your web services ํฌํŠธํฌ์›Œ๋”ฉ์ด ํ•„์š” ์—†์ด(๋ฆฌ๋ฒ„์Šค ํ”„๋ก์‹œ) ๋‚ด ์›น ์„œ๋ฒ„๋ฅผ ์ธํ„ฐ๋„ท ์ „์—ญ์œผ๋กœ ํ˜ธ์ŠคํŒ… ํ•ด์ฃผ๋Š” ํ„ฐ๋„๋ง ๋„๊ตฌ์ด๋‹ค. ngrok ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ž„์˜์˜ uri ์ฃผ์†Œ๋ฅผ ์ƒ์„ฑํ•ด์ฃผ๋Š”๋ฐ ์ด๊ณณ์„ ์ ‘์†ํ•˜๋ฉด ๋ฐ”๋กœ ๋‚ด ์›น ์ฝ˜ํ…์ธ ์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋‹ค. ์„ค๋ น ๋ฐฉํ™”๋ฒฝ์ด ์žˆ๋‹ค๊ณ  ํ•ด๋„ ์•„์›ƒ๋ฐ”์šด๋“œ ๋ฐฉ์‹์œผ๋กœ ์ฝ˜ํ…์ธ ๋ฅผ ์ œ๊ณตํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๋”ฐ๋กœ ํฌํŠธํฌ์›Œ๋”ฉ์„ ํ•ด์ค„ ํ•„์š”๋„ ์—†.. 2022. 8. 23.
html - debugger(๊ฐœ๋ฐœ์ž ๋„๊ตฌ ๋ฐฉ์ง€) ๋น„ํ™œ์„ฑํ™” https://janger.tistory.com/222 html - ๊ฐœ๋ฐœ์ž ๋„๊ตฌ ๋ง‰๊ธฐ(์‚ฌ์šฉํ•˜๊ธฐ ํž˜๋“ค๊ฒŒ) (function () { (function a() { try { (function b(i) { if (('' + (i / i)).length !== 1 || i % 20 === 0) { (function () { }).constructor('debugger')() } else { debugger } b(++i) } )(0) } catch (e) { s.. janger.tistory.com (function anonymous( ) { debugger }) ์œ„ ๊ฐ™์€ ๊ฐœ๋ฐœ์ž ๋„๊ตฌ๋ฅผ ๋ง‰์œผ๋ ค๊ณ  ์ผ๋ถ€๋กœ debugger๋กœ ๋ธŒ๋ ˆ์ดํฌ ํฌ์ธํŠธ๋ฅผ ์ฃผ๋Š” ์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์กด์žฌํ•  ๊ฒฝ์šฐ ๊ฐœ๋ฐœ์ž ๋„๊ตฌ์—์„œ Sources ํƒญ์— ๋“ค์–ด๊ฐ„ ๋‹ค.. 2022. 8. 16.
CSS - ์ธ๋ผ์ธ ์ฝ”๋“œ ๋ธ”๋Ÿญ ๋Œ€์ถฉ ์ด๋Ÿฐ๊ฒƒ์ž…๋‹ˆ๋‹ค. /* ์ธ๋ผ์ธ ์ฝ”๋“œ ๋ธ”๋Ÿญ */ code { padding: 0.25rem; background-color: #F1F1F1; border-radius: 5px; box-shadow: 0.25px 0.25px 10px rgb(156, 156, 156); font-family: "Consolas", "Sans Mono", "Courier", "monospace"; font-size: 1.0rem; } ์ฐธ๊ณ : https://wordbe.tistory.com/entry/%EC%9D%B8%EB%9D%BC%EC%9D%B8-%EC%BD%94%EB%93%9C%EB%B8%94%EB%9F%AD-%EC%BD%94%EB%93%9C-%EA%B0%95%EC%A1%B0-%EC%BD%94%EB%93%9C-%EB%B0.. 2022. 7. 30.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - for in๊ณผ for of ์ฐจ์ด์  ์ƒ๊น€์ƒˆ var arr = [2, 5, 7, 9, 12]; // for in for(const item in arr){ console.log(item); } // for of for(const item of arr){ console.log(item) } ์ƒ๊น€์ƒˆ๋Š” ์ด๋ ‡๊ฒŒ ์ƒ๊ฒผ์Šต๋‹ˆ๋‹ค. ๋‘˜ ๋‹ค ๋„ˆ๋ฌด ๋˜‘๊ฐ™์ด ์ƒ๊ฒจ์„œ ๊ฐ€๋” ์‚ฌ์šฉํ•˜๋ ค๊ณ  ํ•  ๋•Œ๋งˆ๋‹ค ํ˜ผ๋ž€์ด ์ƒ๊น๋‹ˆ๋‹ค. ์ง€๊ธˆ๋ถ€ํ„ฐ ์ด๋Ÿฐ ์‹์œผ๋กœ ์™ธ์šฐ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. for in์€ ๊ฐ์ฒด(ํ‚ค ๊ฐ’) ์ˆœํ™˜ for of์€ ๋ฐฐ์—ด ์ˆœํ™˜ ์ฐธ๊ณ ๋กœ ์ƒ๋‹จ ์ฝ”๋“œ์˜ ์‹คํ–‰ ๊ฒฐ๊ณผ๋Š” ์ด๋ ‡์Šต๋‹ˆ๋‹ค. // for in 0 1 2 3 4 // for of 2 5 7 9 12 for of๋Š” ๋ฐฐ์—ด์˜ ๊ฐ’์„ ์ˆœ์„œ๋Œ€๋กœ ์ž˜ ์ถœ๋ ฅํ•˜๋Š” ๋ฐ˜๋ฉด์— for in์€ 0, 1, 2, 3 ๊ฐ™์€ ์ˆซ์ž์˜ ์ˆœํ™˜์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ๋ฐ”๋กœ ๋ˆˆ์น˜์ฑˆ ์‚ฌ๋žŒ๋„ ์žˆ.. 2022. 7. 30.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - map์™€ forEach์˜ ์ฐจ์ด์  Array.prototype.map() map() ๋ฉ”์„œ๋“œ๋Š” ๋ฐฐ์—ด ๋‚ด์˜ ๋ชจ๋“  ์š”์†Œ ๊ฐ๊ฐ์— ๋Œ€ํ•˜์—ฌ ์ฃผ์–ด์ง„ ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•œ ๊ฒฐ๊ณผ๋ฅผ ๋ชจ์•„ ์ƒˆ๋กœ์šด ๋ฐฐ์—ด์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ์‹œ๋„ํ•ด๋ณด๊ธฐ Array.prototype.forEach() forEach() ๋ฉ”์„œ๋“œ๋Š” ์ฃผ์–ด์ง„ ํ•จ์ˆ˜๋ฅผ ๋ฐฐ์—ด ์š”์†Œ ๊ฐ๊ฐ์— ๋Œ€ํ•ด ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค. ์‹œ๋„ํ•ด๋ณด๊ธฐ map ๋ฉ”์„œ๋“œ์™€ forEach ๋ฉ”์„œ๋“œ์˜ ์ฐจ์ด์  ํฐ ์ฐจ์ด์ ์€ return ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•˜๋ƒ ์•ˆ ํ•˜๋ƒ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. const map1 = array1.map(x => x * 2); console.log(map1); // [2, 8, 18, 32] ์šฐ์„  map ๊ฐ™์€ ๊ฒฝ์šฐ๋Š” ์ฝœ๋ฐฑ ํ•จ์ˆ˜์˜ ์‹คํ–‰ ๊ฒฐ๊ณผ๋ฅผ return์„ ๊ทธ ๊ฒฐ๊ณผ๋“ค์„ ๋ฐฐ์—ด ํ˜•ํƒœ๋กœ ๋ณ€์ˆ˜์— ์ €์žฅํ•ฉ๋‹ˆ๋‹ค. array1.forEach(element => console.l.. 2022. 7. 30.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - ์‚ฌ์šฉ์ž ๊ณ ์œ ์˜ ํ”„๋กœํ•„ ์‚ฌ์ง„(Identicon) ๊ฐ€๋” ์ปค๋ฎค๋‹ˆํ‹ฐ ์‚ฌ์ดํŠธ๋ฅผ ์ด์šฉํ•˜๋‹ค๋ณด๋ฉด ์œ„์™€ ๊ฐ™์€ ํ˜•ํƒœ์˜ ์‚ฌ์šฉ์ž ํ”„๋กœํ•„๋“ค์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ ์ด๋Š” ์‚ฌ์šฉ์ž์˜ ๊ณ ์œ ํ•œ ๋ฒˆํ˜ธ๋กœ ๋งŒ๋“ค์–ด๋‚ด๋Š” ์‚ฌ์šฉ์ž ์‹๋ณ„ ํ”„๋กœํ•„ ์‚ฌ์ง„์ด๋‹ค. ์ •ํ™•ํ•œ ๋ช…์นญ์€ Identicon์ž„. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋งŒ์„ ์‚ฌ์šฉํ•ด์„œ ๋งŒ๋“ค์—ˆ๋‹ค๊ณ  ํ•œ๋‹ค. ์˜คํ”ˆ์†Œ์Šค์ด๋ฏ€๋กœ ์ง์ ‘ ๊นƒํ—ˆ๋ธŒ์—์„œ ๋‹ค์šดํ•ด์„œ ๋ณธ์ธ์ด ์šด์˜ํ•˜๋Š” ์‚ฌ์ดํŠธ์—๋‹ค ์ ์šฉํ•ด๋„๋œ๋‹ค. https://github.com/stewartlord/identicon.js GitHub - stewartlord/identicon.js: GitHub-style identicons as PNGs or SVGs in JS GitHub-style identicons as PNGs or SVGs in JS . Contribute to stewartlord/identicon.js developm.. 2022. 7. 21.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - Web Notification API(์œˆ๋„์šฐ ์•Œ๋žŒ ๊ธฐ๋Šฅ) window.onload = function () { // ์›น ํŽ˜์ด์ง€ ๋กœ๋“œ ํ›„์— ์•Œ๋ฆผ ๊ถŒํ•œ ํ™•์ธ if (window.Notification) { Notification.requestPermission(); } } function notify() { if (Notification.permission !== 'granted') { alert('notification is disabled'); } else { var notification = new Notification('Notification title', { icon: 'http://cdn.sstatic.net/stackexchange/img/logos/so/so-icon.png', body: 'Notification text', }); notifica.. 2022. 6. 22.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - alertBox function alertBox(msg, delay = 3000){ var container = document.createElement('div'); container.setAttribute('class', 'alertBox-container'); container.style.width = '100%'; container.style.height = '100px'; container.style.position = 'fixed'; container.style.bottom = '0'; container.style.display = 'flex'; container.style.justifyContent = 'center'; var box = document.createElement('div'); box.styl.. 2022. 4. 10.
React Native - ์ดˆ๊ธฐ ์„ค์น˜ [์ปดํ“จํ„ฐ์— ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์น˜ํ•˜๊ธฐ] https://reactnative.dev/docs/environment-setup Setting up the development environment · React Native This page will help you install and build your first React Native app. reactnative.dev npx react-native init SampleApp cd SampleApp npm run android ์ถœ์ฒ˜: https://dev-yakuza.posstree.com/ko/react-native/install-on-windows/ ์œˆ๋„์šฐ(Windows)์— react native ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ๊ตฌ์ถ•ํ•˜๊ธฐ react-native๋กœ ์•ฑ์„ ๊ฐœ๋ฐœํ•˜๊ธฐ.. 2022. 4. 7.
Electron - loadURL๋กœ ๋ฌธ์„œ ๋ถˆ๋Ÿฌ์˜จ ํ›„์— ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰ win.loadURL('https://google.com'); win.webContents.executeJavaScript('document.body.innerHTML = "1234"'); ์ฐธ๊ณ : https://javascript.hotexamples.com/examples/electron/remote.BrowserWindow/loadURL/javascript-remote.browserwindow-loadurl-method-examples.html JavaScript remote.BrowserWindow.loadURL Examples, electron.remote.BrowserWindow.loadURL JavaScript Examples - HotExamples javascript.hotexamples... 2022. 4. 1.
728x90