묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
GO router 관련 질문.
안녕하세요, 수업내용 중 에러발생하여 글 작성합니다.go router를 프로젝트에 적용하는 수업을 듣는데, 적용 후 하기와 같은 에러가 발생 했습니다.'package:flutter/src/widgets/navigator.dart': Failed assertion: line 2918 pos 12: 'route._navigator == navigator': is not true.오타가 있을까봐 관련 수업들 전부 2,3번 보았지만 오타는 없었습니다. 찾아보니 리다이렉트가 2번실행되는 상황들이 있다고 해서 redirect를 없애고 실행하니 잘되었습니다. 에러발생 사유와 어떻게 방지해야되는지 알 수있을까요?
-
미해결Vue.js + TypeScript 완벽 가이드
권한요청 드립니다.
권한요청 드립니다. lcg5320@gmail.com
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
2강 npm install 오류
안녕하세요 강사님2강을 듣는중 boilerplace-mern stack master을 다운받고 압축해제를 한 후npm install을 하는데 이러한 오류가 나옵니다.Windows PowerShellCopyright (C) Microsoft Corporation. All rights reserved.새로운 크로스 플랫폼 PowerShell 사용 https://aka.ms/pscore6PS C:\Users\park\Documents\boilerplate-mern-stack-master> npm installnpm WARN old lockfilenpm WARN old lockfile The package-lock.json file was created with an old version of npm,npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient...npm WARN old lockfile npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issuenpm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecatednpm WARN deprecated mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecatednpm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependenciesnpm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecatednpm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecatednpm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated bcrypt@3.0.8: versions < v5.0.0 do not handle NUL in passwords properlynpm WARN deprecated node-pre-gyp@0.14.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the futurenpm ERR! code 1npm ERR! path C:\Users\park\Documents\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! command failednpm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c C:\Users\park\AppData\Local\Temp\install-8386daeb.cmdnpm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\park\Documents\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\park\Documents\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)npm ERR! node-pre-gyp info it worked if it ends with oknpm ERR! node-pre-gyp info using node-pre-gyp@0.14.0npm ERR! node-pre-gyp info using node@16.17.0 | win32 | x64npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https downloadnpm ERR! node-pre-gyp info check checked for "C:\Users\park\Documents\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node" (not found)npm ERR! node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gznpm ERR! node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gznpm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gznpm ERR! node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@16.17.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gznpm ERR! gyp info it worked if it ends with oknpm ERR! gyp info using node-gyp@9.0.0npm ERR! gyp info using node@16.17.0 | win32 | x64npm ERR! gyp info oknpm ERR! gyp info it worked if it ends with oknpm ERR! gyp info using node-gyp@9.0.0npm ERR! gyp info using node@16.17.0 | win32 | x64npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python Python is not set from command line or npm configurationnpm ERR! gyp ERR! find Python Python is not set from environment variable PYTHONnpm ERR! gyp ERR! find Python checking if "python3" can be usednpm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an errornpm ERR! gyp ERR! find Python checking if "python" can be usednpm ERR! gyp ERR! find Python - "python" is not in PATH or produced an errornpm ERR! gyp ERR! find Python checking if Python is C:\Users\park\AppData\Local\Programs\Python\Python39\python.exenpm ERR! gyp ERR! find Python - "C:\Users\park\AppData\Local\Programs\Python\Python39\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\park\AppData\Local\Programs\Python\Python39-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\park\AppData\Local\Programs\Python\Python39-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\park\AppData\Local\Programs\Python\Python38\python.exenpm ERR! gyp ERR! find Python - "C:\Users\park\AppData\Local\Programs\Python\Python38\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\park\AppData\Local\Programs\Python\Python38-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\park\AppData\Local\Programs\Python\Python38-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\park\AppData\Local\Programs\Python\Python37\python.exenpm ERR! gyp ERR! find Python - "C:\Users\park\AppData\Local\Programs\Python\Python37\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\park\AppData\Local\Programs\Python\Python37-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\park\AppData\Local\Programs\Python\Python37-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\park\AppData\Local\Programs\Python\Python36\python.exenpm ERR! gyp ERR! find Python - "C:\Users\park\AppData\Local\Programs\Python\Python36\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\park\AppData\Local\Programs\Python\Python36-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\park\AppData\Local\Programs\Python\Python36-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if the py launcher can be used to find Python 3npm ERR! gyp ERR! find Python - "py.exe" is not in PATH or produced an errornpm ERR! gyp ERR! find Pythonnpm ERR! gyp ERR! find Python **********************************************************npm ERR! gyp ERR! find Python You need to install the latest version of Python.npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,npm ERR! gyp ERR! find Python you can try one of the following options:npm ERR! gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)npm ERR! gyp ERR! find Python - Set the environment variable PYTHONnpm ERR! gyp ERR! find Python - Set the npm configuration variable python:npm ERR! gyp ERR! find Python npm config set python "C:\Path\To\python.exe"npm ERR! gyp ERR! find Python For more information consult the documentation at:npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installationnpm ERR! gyp ERR! find Python **********************************************************npm ERR! gyp ERR! find Pythonnpm ERR! gyp ERR! configure errornpm ERR! gyp ERR! stack Error: Could not find any Python installation to usenpm ERR! gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:330:47)npm ERR! gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:159:21)npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:228:18)npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:294:16)npm ERR! gyp ERR! stack at exithandler (node:child_process:408:5)npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:420:5)npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:478:16)npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)npm ERR! gyp ERR! System Windows_NT 10.0.19044npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\park\\Documents\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\park\\Documents\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"npm ERR! gyp ERR! cwd C:\Users\park\Documents\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! gyp ERR! node -v v16.17.0api_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\park\Documents\boilerplate-mern-stack-master\node_modules\node-pre-gyp\lib\util\compile.js:83:29)npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1093:16)npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19044npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\park\\Documents\\boilerplate-mern-stack-master\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"npm ERR! node-pre-gyp ERR! cwd C:\Users\park\Documents\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! node-pre-gyp ERR! node -v v16.17.0npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0npm ERR! node-pre-gyp ERR! not oknpm ERR! A complete log of this run can be found in:npm ERR! C:\Users\park\AppData\Local\npm-cache\_logs\2022-09-28T10_16_33_214Z-debug-0.logPS C:\Users\park\Documents\boilerplate-mern-stack-master> 이유를 알 수 있을까요..ㅠㅠ 답변 기다리고 있습니다..ㅠㅠㅠ 처음부터 이래버려서 진도를 나갈수가 없어요 흑흑
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
주문한 상품 종류 수
지금 저희가 하는 코드에서7분07초쯤 expected가 1밖에 될 수 없는건가요?
-
해결됨앨런 iOS Concurrency(동시성) - 디스패치큐와 오퍼레이션큐의 이해
교착상태 발생 가능성
안녕하세요! 강의 수강 중 질문 있어 글을 남깁니다.'교착상태의 다양한 발생 가능성' 부분을 보고 있습니다.그 중 첫 번째가 '동기 작업이 현재의 쓰레드를 필요로 하는 경우'입니다. 이 부분은 3-2 강의를 참고해서 이해를 했는데요. 아래처럼 비동기로 작업을 보냈는데, 자신을 block시킨 global queue에 할당되어 교착된 상태입니다.DispatchQueue.global().async { DispatchQueue.global().sync { ... } }두 번째가 '앞선 작업이 현재 쓰레드를 필요로 하는 경우'인데요, 생각해보니 위의 케이스를 제외하고는 마땅한 경우가 떠오르지 않아서요! 혹시 첫 번째 상황과 같은 것을 의미하는지, 제가 설명한 부분이 맞는 말인지 궁금합니다. 감사합니다! :)
-
해결됨10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
+=나 -=연산자를 사용하는 것과 덧셈/뺄셈 후 할당하는 것의 차이가 있을까요?
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.http://boj.kr/e083acd670f1478bad5c88f07da76de7복합대입연산자를 쓰면 중간에 자꾸 이상한 에러가 납니다.백준의 첫 번째 예제의 경우에도 Dev c++에서 테스트해 보면Onrxwbba Bayvar W굌tr이런 식으로 문자가 깨지는 경우가 발생합니다. 왜 이렇게 되는 건가요?
-
미해결배달앱 클론코딩 [with React Native]
타입스크립트 제네릭
타입스크립트 질문이 있습니다. 제네릭은 코드의 재사용을 높이기 위해서, 함수를 생성할때 매개변수의 타입을 정하는 것이라고 알고 있습니다. const f =<T>(param :T):T =>{…}이렇게요.그런데 navigation을 사용하는 것과 같은 경우에는const Tab = createBottomTabNavigator<TabParamList>()와 같이 매개변수나 반환값에 TabParamList라는 타입이 사용되지 않음에도 불구하고 제네릭을 사용합니다한가지 함수를 재사용하는 목적이 없다고 볼 수 있는 것 같은데, 저기서 제네릭의 역할이 무엇인지 궁금합니다
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
라우트 호출 원리가 궁금합니다.
<Route exact path="/" element={<Home />} />위 방식으로 제가 작성하여 function Home() { console.log('>>>>> home'); return ( <div> <h2>Home</h2> </div> ); }아래처럼 로그를 주었는데 개발자도구에서 확인 시 로그가 두번씩 호출이 됩니다. 어떻게 두번이 호출 되는지와 exact 속성의 역할element={<Home />}와 element={Home()}의 차이점이 궁금합니다.
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
1-G 반례 질문입니다
https://www.acmicpc.net/source/49806907 Split()을 썼는데 강의를 보니 *이 한 번만 나오니 find()를 쓰면 됐을걸 그랬습니다.궁금한 점은 s.erase()로 접두사와 접미사 전까지의 문자열을 다 삭제하였기 때문에 강의에서처럼 접두사+접미사의 길이보다 작은 문자열은 배제substr은 아니지만 find를 통해 접두사/접미사가 문자열의 양 끝에 존재하는지 확인하였는데 틀렸는지 잘 모르겠습니다..백준 질문검색 기준 반례들을 다 테스트 해봐서 통과했으며 채점 10%에서 틀렸다고 나옵니다.
-
미해결Vue.js 중급 강좌 - 웹앱 제작으로 배워보는 Vue.js, ES6, Vuex
scss @debug 출력
안녕하세요..scss 를 사용하고 있는데, @debug 가 출력이 되지 않습니다...stats: { loggingDebug: ['sass-loader']}위 구문을 webpack.config.js 에 추가하라고 해서, vue.config.js에 추가를 했습니다.그래도 콘솔에 출력이 되지 않습니다.다른 방법이 있을까요?도움을 부탁 드립니다.
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
네이버 api 요청 관련 질문 있습니다
네이버 api 요청 관련 질문 있습니다github:https://github.com/hyunsokstar/naver-add-prototype back:npm run start:dev front:npm run dev controller 에서 http://localhost:8000/naver_add 요청을 받으면 네이버 광고에 api 요청(https://naver.github.io/searchad-apidoc/#/guides) 을 날려서 응답 받은걸 다시 프론트로 보내려고 하는데요 참고 문서는 https://ukcasso.tistory.com/99 이고 컨트롤러와 서비스는 다음과 같습니다.https://github.com/hyunsokstar/naver-add-prototype/blob/main/backend/src/naver_add/naver_add.controller.tshttps://github.com/hyunsokstar/naver-add-prototype/blob/main/backend/src/naver_add/naver_add.service.ts 그런데 헤더 설정이 잘못되어서인지 import { NaverAddService } from './naver_add.service';import { SuccessInterceptor } from './../common/interceptors/success.interceptor';import { Controller, Get, Req, UseInterceptors } from '@nestjs/common';// import CryptoJS from "crypto-js";import * as CryptoJS from 'crypto-js'var method = "GET";var api_url = "/keywordstool";var timestamp = Date.now() + '';const accessKey = "01000000000f85a84ea950600f3a5a2214f5f379afa3f09898cbf7a1699007c1167fe2e247"var secretKey = "AQAAAAAPhahOqVBgDzpaIhT183mv52WgZFJyJCX8PE87IzXJwg==";var method = "GET";var timestamp = Date.now() + '';var secretKey = "YOUR_SECRETKEY";var hmac = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, secretKey);hmac.update(timestamp + '.' + method + '.' + api_url);var hash = hmac.finalize();hash.toString(CryptoJS.enc.Base64);@Controller('naver_add')@UseInterceptors(SuccessInterceptor)export class NaverAddController { constructor( private readonly naverAddService: NaverAddService ) { } @Get() getNaverAddInfo() { const api_key = process.env.API_KEY; const secret_key = process.env.SECRET_KEY; const customer_id = process.env.CUSTOMER_ID; const options = { url: 'https://api.naver.com/keywordstool?hintKeywords=' + "skilnote" + '&showDetail=1', headers: { 'X-Timestamp': timestamp, 'X-API-KEY': api_key, 'X-API-SECRET': secret_key, 'X-CUSTOMER': customer_id, 'X-Signature': hash.toString(CryptoJS.enc.Base64) } }; // const result = this.naverAddService.getNaverAddInfo(options).subscribe( // res => { // console.log(res); // }); const result = this.naverAddService.getNaverAddInfo(options).pipe().subscribe() console.log("result : ", result); // return result }} 요청 자체는 성공으로 출력 되지만 콘솔에 이런 에러가 발생 합니다. http://www.skilnote-for-starter.shop/wm/myshortcut/trouble-shotting/1혹시 해결 방법 알려주시면 감사요 그리고 혹시 멘토링 같은건 안해주시나요 주말이든 주중이든 채팅이나 직접 만나서든 배우고 싶습니다.
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
COPY failed: stat app/build: file does not exist
Docker fullstack appgithub -> travis ci -> docker hub -> aws강의에서 travis ci에서5.28s$ docker build -t [secure]/docker-frontend ./frontend진행시 오류가 납니다.Step 10/10 : COPY --from=builder /app/build /usr/share/nginx/html320COPY failed: stat app/build: file does not existDockerfile 내용FROM node:alpine as builder WORKDIR /app COPY ./package.json ./ RUN npm install COPY ./ ./ CMD npm run build FROM nginx EXPOSE 3000 COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf COPY --from=builder /app/build /usr/share/nginx/html
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
getline 질문드립니다.
안녕하세요오split 관련 문제를 풀어보고 싶어서 찾아보던 중, 백준 9093번 문제를 발견하게 되어 풀어보았습니다!공백을 포함해서 받아야 해서 getline을 통해 여러번 입력을 받으려니 cin.ignore()를 해야만 가능한 것 같아서 사용해보았는데요, 질문은 다음과 같습니다!▼ 입력3 I am happy today We want to win the first prize hello world!▼ 출력 시 코드 결과I ma yppah yadot e tnaw ot niw eht tsrif ezirp olle !dlrow원하는 결과는eW tnaw ot niw eht tsrif ezirpolleh !dlrow 인데,코드를 돌려보니 문자열이 뒤집혀서 출력되는 것은 원했던 바가 맞는데, 보시다시피 2번째 문자열부터 맨 앞글자가 하나씩 빠지는 문제가 있었습니다.코드를 어떻게 수정해야 원하는 결과가 나올지 궁금합니다!전체 코드#include <bits/stdc++.h> using namespace std; vector<string> split(string s, string delimiter){ string token = ""; int pos; vector<string> str; while( (pos = s.find(delimiter)) != string::npos ){ token = s.substr(0, pos); reverse(token.begin(), token.end()); token += " "; str.push_back(token); s.erase(0, pos + 1); } reverse(s.begin(), s.end()); str.push_back(s); return str; } int main(){ ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; while(n){ string s; cin.ignore(); getline(cin, s); vector<string> s2 = split(s," "); for(auto i : s2){ cout << i; } cout << "\n"; n--; } return 0; }
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
모달창이 안뜹니다.
import 'package:calendar_scheduler/component/custom_text_feild.dart'; import 'package:calendar_scheduler/const/colors.dart'; import 'package:calendar_scheduler/database/drift_database.dart'; import 'package:calendar_scheduler/model/category_color.dart'; import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; import 'package:calendar_scheduler/database/drift_database.dart'; class ScheduleBottomSheet extends StatefulWidget { //form 3. StatefulWidget이어야한다. const ScheduleBottomSheet({Key? key}) : super(key: key); @override State<ScheduleBottomSheet> createState() => _ScheduleBottomSheetState(); } class _ScheduleBottomSheetState extends State<ScheduleBottomSheet> { final GlobalKey<FormState> formKey = GlobalKey(); //form 4. formKey변수만들어준다. int? startTime; //3개의 값을 반복적으로 사용하기 위해 저장을한다. int? endTime; String? content; int? selectedColorId; //color를 id로 관리하기 위해 id값을 넣기 위해 변수를 만든다. @override Widget build(BuildContext context) { final bottomInset = MediaQuery.of(context).viewInsets.bottom; //키보드같은 시스템의 높이를 알 수 있음. 상하좌우 가능 return GestureDetector( onTap: (){ FocusScope.of(context).requestFocus(FocusNode()); }, child: SafeArea( child: Container( color: Colors.white, height: MediaQuery.of(context).size.height /2 + bottomInset, //핸드폰 전체높이에 /2 절반 child: Padding( padding: EdgeInsets.only(bottom: bottomInset), child: Padding( padding: EdgeInsets.only(left: 8.0, right: 8.0, top: 16.0), child: Form( //form 2. _Time,_Content 이거 있는거 상위에 form을 해준다. key가 컨트롤러가 된다. key: formKey, //form 5. formKey변수 넣어준다. 컨트롤러가 된다. autovalidateMode: AutovalidateMode.always, //에러메시지를 실시간 표현해줌. child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ _Time( onStartSaved: (String? val){ startTime = int.parse(val!); //String으로 값이 들어오니 int로 파싱 그걸 위에서 만든 변수에 넣는다. }, onEndSaved: (String? val){ endTime = int.parse(val!); //val이 값이 없으면 에러메시지뜨도록 했으니 값이 없을수 없다. }, ), SizedBox(height: 16.0,), _Content( onSaved: (String? val){ content = val; //String이니 걍 넣는다. }, ), SizedBox(height: 16.0,), FutureBuilder<List<CategoryColor>>( future: GetIt.I<LocalDatabase>().getCategoryColors(), //디비가져오기 4 이페이지에서 디비값 가져올수 있게 세팅, LocalDatabase이거는 drift_database파일에서 import builder: (context, snapshot) { //print(snapshot.data); //디비가져오기 5 디비에서 가져온 색깔 출력 if(snapshot.hasData && selectedColorId == null && snapshot.data!.isNotEmpty){ //if(데이터가 있고, selectedColorId를 클릭하지 않았음, 하나라도 값이 있거나) selectedColorId = snapshot.data![0].id; //0번째 빨강색으로 셀렉트 한다. } return _ColorPicker( colors: snapshot.hasData ? snapshot.data! : [], //디비가져오기 6 hasData 값이 있으면 .hasData 값이 없으면 : [] 걍 빈값을 보낸다. selectedColorId: selectedColorId!, ); } ), SizedBox(height: 8.0,), _SaveButton(onPressed: onSavePressed,), //form 7 onSavePressed 함수 만든다. ], ), ), ), ), ), ), ); } void onSavePressed(){ if(formKey.currentState == null){ //현재 null이 나올수는 없으나 혹시나 null인경우 그냥 리턴해 버린다. return; } if(formKey.currentState!.validate()){ //form 8 에러가 없으면 null값을 리턴하면서 true print('에러 없음'); formKey.currentState!.save(); print('--------------------'); print('startTime : $startTime'); print('endTime : $endTime'); print('content : $content'); }else{ print('에러 있음'); } } } class _SaveButton extends StatelessWidget { final VoidCallback onPressed; const _SaveButton({required this.onPressed, Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Row( children: [ Expanded( child: ElevatedButton( onPressed: onPressed, //form 6 외부로 보낼수 있게 required 만든다. style: ElevatedButton.styleFrom( primary: PRIMARY_COLOR, ), child: Text('저장'), ), ), ], ); } } class _ColorPicker extends StatelessWidget { final List<CategoryColor> colors; //디비가져오기 1.디비에 있는 칼라를 이걸로 가져올 거임 final int selectedColorId; // 아이디 값을 받아준다. const _ColorPicker({ required this.colors, required this.selectedColorId, Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Wrap( spacing: 8.0, //좌우간격 runSpacing: 10.0, //상하 간격 children: colors.map((e) => renderColor(e, selectedColorId == e.id)).toList(), //디비가져오기 2. colors값 렌더링하기 ->main에서 GetIt한다. //여기 e=<CategoryColor> ); } Widget renderColor(CategoryColor color, bool isSelected){ return Container( decoration: BoxDecoration( shape: BoxShape.circle, color: Color( int.parse( 'FF${color.hexCode}', //hexCode 컬럼에 있는 값을 가져온다. radix: 16, //16진수로 표현한다. ), ), border: isSelected //선택 되었을대 보더를 넣어준다. ? Border.all( color: Colors.black, width: 4.0, ) : null, ), height: 32.0, width: 32.0, ); } } class _Content extends StatelessWidget { final FormFieldSetter<String> onSaved; const _Content({required this.onSaved, Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Expanded( //1.텍스필드 꽉차게 다음은 custom_text_feild에 child: CustomTextField( label: '내용', isTime: false, onSaved: onSaved, ), ); } } class _Time extends StatelessWidget { final FormFieldSetter<String> onStartSaved; final FormFieldSetter<String> onEndSaved; const _Time({ required this.onStartSaved, required this.onEndSaved, Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Row( children: [ Expanded( child: CustomTextField( label: '시작시간', isTime: true, onSaved: onStartSaved, ), ), SizedBox(width: 8.0,), Expanded( child: CustomTextField( label: '종료시간', isTime: true, onSaved: onEndSaved, ), ), ], ); } } 초급 섹션 19. [프로젝트] [★★★★☆] 캘린더 스케쥴러에 > 색상 상태관리 강의 따라 하고 있습니다.그런데 3:25초 부분에서 selectedColorId: selectedColorId!, 만 넣으면 아래 그림처럼 모달창이 안뜹니다. 몇번을 다시 하고 해봤는데 원인을 모르겠습니다.schedule_bottom_sheet.dart 파일 입니다.
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
v3 savecontroller member 에러,오류
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]여기에 질문 내용을 남겨주세요.마지막 줄 member에 빨간줄 에러가 뜨는데 해결법을 모르겠습니다..
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
컨테이너 내부에서 도커 실행 시 오류 발생하시는 분들
컨테이너 내에서 도커가 실행되지 않아 진행하지 못하는 분들이 꽤 보이네요.강사님이 게시하신 DinD 방식 대신 DooD 방식으로 실행하여 진행하실 수 있습니다. 다만 DooD 방식 특성으로 인해 포트 바인딩에 조금 신경 써주셔야 합니다.아래는 Ansible 강의 컨테이너 실행 명령입니다.docker run -itd -p 20022:22 -e container=docker --tmpfs /run --tmpfs /tmp -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /var/run/docker.sock:/var/run/docker.sock edowon0623/ansible:latest /usr/sbin/init앞선 강의에서 등장하는 docker-server 컨테이너 등 컨테이너 내부에서 도커 실행 시 오류가 발생하는 다른 컨테이너들도 이미지랑 포트만 변경하여 실행하시면 됩니다. Windows 강의 진행 시 이슈를 기억나는 대로 정리했습니다.https://www.inflearn.com/chats/662870
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
memberservice not found 에러
.Bean을 직접 등록하고 다음강의로 넘어가서 실행 해보려는데 멤버서비스를 찾을수없다고 에러가 발생하네요... 제가 직접 찾아보는게 좋을것같아서 보려고 하지만 아직 부족한 부분이 많은지 보이질 않아요... 어딜 손대야할까요?
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
9분 9초 쯤에 커맨드 라는게 무슨 뜻인지 궁금합니다.
안녕하세요 정말 기초적인? 질문이 있습니다...구글링을 해도 원하는 내용이 잘 안보여서 질문을 드립니다!!!다름이 아니라 강의의 9분 9초쯤부터 말씀하시는 커맨드 성이여서 거의 쓰기만 있다고 한다에서쓰기만 있는 코드는 무슨 뜻인지 알겠는데 커맨드성이라는게 어떤 것을 뜻하는 건지 궁금해서 질문 드립니다.혹시 커맨드라는 것이 제가 아는 특정한 기능을 실행하려고 보내는 신호? 코드? 그것을 뜻하는 건가요???그리고 제가 질문이 좀 많은데 매번 답변 잘해주셔서 너무 감사드립니다ㅠㅠ
-
미해결생산성을 향상시키는 스프링부트 기반의 API 템플릿 프로젝트 구현
SocialLoginApiServiceFactory 주입 시점 2 번째 질문
https://www.inflearn.com/questions/658825 여기서 질문 해주신 부분 추가적으로 질문이 있습니다.SocialLoginApiServiceFactory.java해당 파일에서@Service public class SocialLoginApiServiceFactory { private static Map<String, SocialLoginApiService> socialLoginApiServices; public SocialLoginApiServiceFactory(Map<String, SocialLoginApiService> socialLoginApiServices) { this.socialLoginApiServices = socialLoginApiServices; } public static SocialLoginApiService getSocialLoginApiService(MemberType memberType) { String socialLoginApiServiceBeanName = ""; if(MemberType.KAKAO.equals(memberType)) { socialLoginApiServiceBeanName = "kakaoLoginApiServiceImpl"; } return socialLoginApiServices.get(socialLoginApiServiceBeanName); } } socialLoginApiServices 객체 자동으로 주입 시켜준다고 했는데요즉 SocialLoginApiService 구현체들을 Map 으로 자동으로 주입 시켜준다고 배웠습니다. 그런데 Map Key 값을 보면 String 이라서어떻게 보면 Key 값을 철자라도 틀리면 반환값을 얻을수 없는 문제점이 있을꺼같아서요 그래서public enum MemberType { KAKAO; public static MemberType from(String type) { return MemberType.valueOf(type.toUpperCase()); } public static boolean isMemberType(String type) { List<MemberType> memberTypes = Arrays.stream(MemberType.values()) .filter(memberType -> memberType.name().equals(type)) .collect(Collectors.toList()); return memberTypes.size() != 0; } }private static Map<MemberType, SocialLoginApiService> socialLoginApiServices;Key 값을 MemberType 으로 규정하고 하는것이 편리하게 쓸수 있을꺼같은데요 이렇게 사용할려면 자동으로 빈 등록은 안되고 어쩔수 없이 @Bean 이용해서 직접 커스텀 빈 등록 해야 하나요??
-
미해결
vscode 에서 함수명 색인이나 정의로 이동등이 안됩니다
안녕하세요.VSCode로 회사에서 사용하는 프로젝트를 폴더 열어서 사용하고 있습니다.그런데, 함수에서 정의로 이동 이라던가, 해당 파일의 함수명이나 변수명을 왼쪽 개요 부분에 리스트업 해주는 기능등이 동작하지 않습니다.처음에는 색인에 시간이 걸려서 그럴거라고 생각했습니다만, 몇일이 지나도 안되네요. 그런데 파일 한두개 열어서 해보면 다 잘 됩니다.제가 따로 설정해야 하는 부분이 있는걸까요? 아니면 수동으로라도 사용하는 방법이 있을까요? 아시는 분 께서는 조언 부탁드립니다.