묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨자바(Java) 알고리즘 문제풀이 입문: 코딩테스트 대비
타임 리밋이 일어나는 이유를 모르겠습니다.
혼자 풀어봤을 때, 다음과 같은 코드를 작성하였는데요.타임리밋이 일어날 만한 곳이 while문밖에 없는거같아서 계속 보는데 이유를 모르겠습니다.첫 요소가 K만큼 들어왔으면 그 다음부터는 1번씩만 put하니까 괜찮을 것이라 생각했는데 어떠한 이유로 타임리밋이 뜨는걸까요 ㅠㅠ?public static String solution(int n,int k,int[] arr) { String answer =""; HashMap<Integer,Integer> map = new HashMap<>(); // 매출의 종류 => HashMap & Sliding Window int lt=0; for(int rt = 0;rt<=(n-k);rt++) { while(lt-rt<k&<<n) { map.put(arr[lt], map.getOrDefault(arr[lt],0)+1); lt++; } answer += map.size()+" "; if(map.get(arr[rt])>1) { map.put(arr[rt], map.get(arr[rt])-1); }else { map.remove(arr[rt]); } } return answer; }
-
미해결[핵집] 2025 빅데이터 분석기사(필기)_과목 1~2
강의자료 요청
안녕하세요! 강의자료 요청드립니다. 빅데이터분석기사 필기 1~4 강의 모두 신청하였고, 메일 주소는 choangelina@naver.com 입니다추가적으로, 로드맵으로 구매하여 실기 강의도 함께 구매하였는데요! 시험 일정에 맞게 실기만 4월부터 수강하는건 불가능한걸까요? 감사합니다!
-
미해결메타스플로잇(Metasploit) 활용한 취약점 분석(초중급과정)
kali에서 무선랜을 사용하려면 무선랜카드를 별도로 구입해야 하는지요?
윈도우 환경에서vutual box를 사용하여 kali linux를 올려서 사용하고있습니다... 별도 무선랜 구입없이...윈도우에서 사용하는 무선 랜카드를kali에서 사용할수 있는지요...??
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
대상 클래스 타입이 무엇인가요?
안녕하세요. 강의 6분35초쯤에 나오는 대상 클래스 타입이 무엇을 말하는건가요?
-
해결됨코딩테스트 [ ALL IN ONE ]
Two sum
안녕하세요! two sum 리트코드 문제는 인덱스를 리턴하는 건데강의는 True, False를 리턴하는 문제더라구요!문제를 살짝 변경하셔서 진행하신건가요??아니면 문제 링크가 잘못된건가요?!
-
미해결Vue3 완벽 마스터: 기초부터 실전까지 - "실전편"
composable: alert 창이 안떠요
선생님 composable/alert.js 만들기 전에는 alert창이 잘 뜨다가 아래처럼 했는데 안떠서요~다른 이유가 있을까요?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
로그인이 안되는데 백엔드까지 되돌리고 싶어요
[Symbol(kSetNoDelay)]: false, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 60, [Symbol(kBytesRead)]: 1312, [Symbol(kBytesWritten)]: 198, [Symbol(RequestTimeout)]: undefined }, _header: 'GET /user/login/posts?lastId=0 HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 21, [Symbol(kCapture)]: false }, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user/login/posts?lastId=0', _ended: true, res: IncomingMessage { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 4, _maxListeners: undefined, socket: [Socket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 404, statusMessage: 'Not Found', client: [Socket], _consuming: false, _dumped: false, req: [Circular *1], responseUrl: 'http://localhost:3060/user/login/posts?lastId=0', redirects: [], [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 18, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0, [Symbol(RequestTimeout)]: undefined }, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: Writable { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 0, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: 'http://localhost:3060/user/login/posts?lastId=0', [Symbol(kCapture)]: false }, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kEndCalled)]: true, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], cookie: [Array], 'user-agent': [Array], 'accept-encoding': [Array], host: [Array] }, [Symbol(kUniqueHeaders)]: null }, response: { status: 404, statusText: 'Not Found', headers: AxiosHeaders { 'cache-control': 'no-store, must-revalidate', 'x-powered-by': 'Next.js', etag: '"97a-kcoLbH4v9/9OC6V5ZJ+Im5f6nEk"', 'content-type': 'text/html; charset=utf-8', vary: 'Accept-Encoding', date: 'Tue, 28 Feb 2023 17:16:27 GMT', connection: 'close', 'transfer-encoding': 'chunked', [Symbol(defaults)]: null }, config: { transitional: [Object], adapter: [Function: httpAdapter], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: [Object], validateStatus: [Function: validateStatus], headers: [AxiosHeaders], baseURL: 'http://localhost:3060', withCredentials: true, method: 'get', url: '/user/login/posts?lastId=0', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [Socket], _header: 'GET /user/login/posts?lastId=0 HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user/login/posts?lastId=0', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: [Writable], [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kEndCalled)]: true, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(kUniqueHeaders)]: null }, data: '<!DOCTYPE html><html><head><style data-next-hide-fouc="true">body{display:none}</style><noscript data-next-hide-fouc="true"><style>body{display:block}</style></noscript><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>: An unexpected error has occurred</title><noscript data-n-css="true"></noscript><link rel="preload" href="/_next/static/chunks/main.js?ts=1677604587215" as="script"/><link rel="preload" href="/_next/static/chunks/webpack.js?ts=1677604587215" as="script"/><link rel="preload" href="/_next/static/chunks/pages/_app.js?ts=1677604587215" as="script"/><noscript id="__next_css__DO_NOT_USE__"></noscript><style data-styled="" data-styled-version="5.3.6"></style></head><body><script src="https://polyfill.io/v3/polyfill.min.js?features=default%2Cdom4%2Ces2015%2Ces2016%2Ces2017%2Ces2018%2Ces2019%2Ces2022%2Ces2021%2Ces2020"></script><div id="__next"><div style="color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body { margin: 0 }</style><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">An unexpected error has occurred<!-- -->.</h2></div></div></div></div><script src="/_next/static/chunks/react-refresh.js?ts=1677604587215"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{"lastId":"0"},"buildId":"development","isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":": An unexpected error has occurred"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills.js?ts=1677604587215"></script><script src="/_next/static/chunks/main.js?ts=1677604587215"></script><script src="/_next/static/chunks/webpack.js?ts=1677604587215"></script><script src="/_next/static/chunks/pages/_app.js?ts=1677604587215"></script><script src="/_next/static/development/_buildManifest.js?ts=1677604587215"></script><script src="/_next/static/development/_ssgManifest.js?ts=1677604587215"></script></body></html>' } } { type: 'LOAD_USER_POSTS_FAILURE', error: '<!DOCTYPE html><html><head><style data-next-hide-fouc="true">body{display:none}</style><noscript data-next-hide-fouc="true"><style>body{display:block}</style></noscript><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>: An unexpected error has occurred</title><noscript data-n-css="true"></noscript><link rel="preload" href="/_next/static/chunks/main.js?ts=1677604587215" as="script"/><link rel="preload" href="/_next/static/chunks/webpack.js?ts=1677604587215" as="script"/><link rel="preload" href="/_next/static/chunks/pages/_app.js?ts=1677604587215" as="script"/><noscript id="__next_css__DO_NOT_USE__"></noscript><style data-styled="" data-styled-version="5.3.6"></style></head><body><script src="https://polyfill.io/v3/polyfill.min.js?features=default%2Cdom4%2Ces2015%2Ces2016%2Ces2017%2Ces2018%2Ces2019%2Ces2022%2Ces2021%2Ces2020"></script><div id="__next"><div style="color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body { margin: 0 }</style><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">An unexpected error has occurred<!-- -->.</h2></div></div></div></div><script src="/_next/static/chunks/react-refresh.js?ts=1677604587215"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{"lastId":"0"},"buildId":"development","isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":": An unexpected error has occurred"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills.js?ts=1677604587215"></script><script src="/_next/static/chunks/main.js?ts=1677604587215"></script><script src="/_next/static/chunks/webpack.js?ts=1677604587215"></script><script src="/_next/static/chunks/pages/_app.js?ts=1677604587215"></script><script src="/_next/static/development/_buildManifest.js?ts=1677604587215"></script><script src="/_next/static/development/_ssgManifest.js?ts=1677604587215"></script></body></html>' } 1. getProps created store with state { user: { loadMyInfoLoading: false, loadMyInfoDone: false, loadMyInfoError: null, loadUserLoading: false, loadUserDone: false, loadUserError: null, followLoading: false, followDone: false, followError: null, unfollowLoading: false, unfollowDone: false, unfollowError: null, logInLoading: false, logInDone: false, logInError: null, logOutLoading: false, logOutDone: false, logOutError: null, signUpLoading: false, signUpDone: false, signUpError: null, changeNicknameLoading: false, changeNicknameDone: false, changeNicknameError: null, loadFollowingsLoading: false, loadFollowingsDone: false, loadFollowingsError: null, loadFollowersLoading: false, loadFollowersDone: false, loadFollowersError: null, removeFollowerLoading: false, removeFollowerDone: false, removeFollowerError: null, me: null, userInfo: null }, post: { mainPosts: [], singlePost: null, imagePaths: [], hasMorePosts: true, likePostLoading: false, likePostDone: false, likePostError: null, unlikePostLoading: false, unlikePostDone: false, unlikePostError: null, loadPostLoading: false, loadPostDone: false, loadPostError: null, loadPostsLoading: false, loadPostsDone: false, loadPostsError: null, addPostLoading: false, addPostDone: false, addPostError: null, removePostLoading: false, removePostDone: false, removePostError: null, addCommentLoading: false, addCommentDone: false, addCommentError: null, uploadImagesLoading: false, uploadImagesDone: false, uploadImagesError: null, retweetLoading: false, retweetDone: false, retweetError: null } } { type: 'LOAD_USER_POSTS_REQUEST', data: 'login' } { type: 'LOAD_MY_INFO_REQUEST' } { type: 'LOAD_USER_REQUEST', data: 'login' } { type: '@@redux-saga/CHANNEL_END' } 4. WrappedApp created new store with withRedux(NodeBird) { initialState: undefined, initialStateFromGSPorGSSR: undefined } 4. WrappedApp created new store with withRedux(NodeBird) { initialState: undefined, initialStateFromGSPorGSSR: undefined } AxiosError: Request failed with status code 404 at settle (C:\JS_workspace\React\js_prepare\front\node_modules\axios\dist\node\axios.cjs:1261:12) at Unzip.handleStreamEnd (C:\JS_workspace\React\js_prepare\front\node_modules\axios\dist\node\axios.cjs:2444:11) at Unzip.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'ERR_BAD_REQUEST', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [Function: httpAdapter], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function], Blob: null }, validateStatus: [Function: validateStatus], headers: AxiosHeaders { Cookie: '', 'User-Agent': 'axios/1.1.2', 'Accept-Encoding': 'gzip, deflate, br', [Symbol(defaults)]: [Object] }, baseURL: 'http://localhost:3060', withCredentials: true, method: 'get', url: '/user/login/posts?lastId=0', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype] { abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], socket: [Function (anonymous)], timeout: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: Socket { connecting: false, _hadError: false, _parent: null, _host: 'localhost', _closeAfterHandlingError: false, _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 6, _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular *1], [Symbol(async_id_symbol)]: 965656, [Symbol(kHandle)]: null, [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: false, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 60, [Symbol(kBytesRead)]: 1312, [Symbol(kBytesWritten)]: 198, [Symbol(RequestTimeout)]: undefined }, _header: 'GET /user/login/posts?lastId=0 HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 23, [Symbol(kCapture)]: false }, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user/login/posts?lastId=0', _ended: true, res: IncomingMessage { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 4, _maxListeners: undefined, socket: [Socket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 404, statusMessage: 'Not Found', client: [Socket], _consuming: false, _dumped: false, req: [Circular *1], responseUrl: 'http://localhost:3060/user/login/posts?lastId=0', redirects: [], [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 18, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0, [Symbol(RequestTimeout)]: undefined }, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: Writable { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 0, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: 'http://localhost:3060/user/login/posts?lastId=0', [Symbol(kCapture)]: false }, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kEndCalled)]: true, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], cookie: [Array], 'user-agent': [Array], 'accept-encoding': [Array], host: [Array] }, [Symbol(kUniqueHeaders)]: null }, response: { status: 404, statusText: 'Not Found', headers: AxiosHeaders { 'cache-control': 'no-store, must-revalidate', 'x-powered-by': 'Next.js', etag: '"97a-oa4gEZ9VQR+Dh2MJsRlW/Zuu95Q"', 'content-type': 'text/html; charset=utf-8', vary: 'Accept-Encoding', date: 'Tue, 28 Feb 2023 17:16:27 GMT', connection: 'close', 'transfer-encoding': 'chunked', [Symbol(defaults)]: null }, config: { transitional: [Object], adapter: [Function: httpAdapter], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: [Object], validateStatus: [Function: validateStatus], headers: [AxiosHeaders], baseURL: 'http://localhost:3060', withCredentials: true, method: 'get', url: '/user/login/posts?lastId=0', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [Socket], _header: 'GET /user/login/posts?lastId=0 HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user/login/posts?lastId=0', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: [Writable], [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kEndCalled)]: true, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(kUniqueHeaders)]: null }, data: '<!DOCTYPE html><html><head><style data-next-hide-fouc="true">body{display:none}</style><noscript data-next-hide-fouc="true"><style>body{display:block}</style></noscript><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>: An unexpected error has occurred</title><noscript data-n-css="true"></noscript><link rel="preload" href="/_next/static/chunks/main.js?ts=1677604587289" as="script"/><link rel="preload" href="/_next/static/chunks/webpack.js?ts=1677604587289" as="script"/><link rel="preload" href="/_next/static/chunks/pages/_app.js?ts=1677604587289" as="script"/><noscript id="__next_css__DO_NOT_USE__"></noscript><style data-styled="" data-styled-version="5.3.6"></style></head><body><script src="https://polyfill.io/v3/polyfill.min.js?features=default%2Cdom4%2Ces2015%2Ces2016%2Ces2017%2Ces2018%2Ces2019%2Ces2022%2Ces2021%2Ces2020"></script><div id="__next"><div style="color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body { margin: 0 }</style><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">An unexpected error has occurred<!-- -->.</h2></div></div></div></div><script src="/_next/static/chunks/react-refresh.js?ts=1677604587289"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{"lastId":"0"},"buildId":"development","isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":": An unexpected error has occurred"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills.js?ts=1677604587289"></script><script src="/_next/static/chunks/main.js?ts=1677604587289"></script><script src="/_next/static/chunks/webpack.js?ts=1677604587289"></script><script src="/_next/static/chunks/pages/_app.js?ts=1677604587289"></script><script src="/_next/static/development/_buildManifest.js?ts=1677604587289"></script><script src="/_next/static/development/_ssgManifest.js?ts=1677604587289"></script></body></html>' } } { type: 'LOAD_USER_POSTS_FAILURE', error: '<!DOCTYPE html><html><head><style data-next-hide-fouc="true">body{display:none}</style><noscript data-next-hide-fouc="true"><style>body{display:block}</style></noscript><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>: An unexpected error has occurred</title><noscript data-n-css="true"></noscript><link rel="preload" href="/_next/static/chunks/main.js?ts=1677604587289" as="script"/><link rel="preload" href="/_next/static/chunks/webpack.js?ts=1677604587289" as="script"/><link rel="preload" href="/_next/static/chunks/pages/_app.js?ts=1677604587289" as="script"/><noscript id="__next_css__DO_NOT_USE__"></noscript><style data-styled="" data-styled-version="5.3.6"></style></head><body><script src="https://polyfill.io/v3/polyfill.min.js?features=default%2Cdom4%2Ces2015%2Ces2016%2Ces2017%2Ces2018%2Ces2019%2Ces2022%2Ces2021%2Ces2020"></script><div id="__next"><div style="color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body { margin: 0 }</style><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">An unexpected error has occurred<!-- -->.</h2></div></div></div></div><script src="/_next/static/chunks/react-refresh.js?ts=1677604587289"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{"lastId":"0"},"buildId":"development","isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":": An unexpected error has occurred"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills.js?ts=1677604587289"></script><script src="/_next/static/chunks/main.js?ts=1677604587289"></script><script src="/_next/static/chunks/webpack.js?ts=1677604587289"></script><script src="/_next/static/chunks/pages/_app.js?ts=1677604587289"></script><script src="/_next/static/development/_buildManifest.js?ts=1677604587289"></script><script src="/_next/static/development/_ssgManifest.js?ts=1677604587289"></script></body></html>' } AxiosError: Request failed with status code 404 at settle (C:\JS_workspace\React\js_prepare\front\node_modules\axios\dist\node\axios.cjs:1261:12) at Unzip.handleStreamEnd (C:\JS_workspace\React\js_prepare\front\node_modules\axios\dist\node\axios.cjs:2444:11) at Unzip.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'ERR_BAD_REQUEST', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [Function: httpAdapter], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function], Blob: null }, validateStatus: [Function: validateStatus], headers: AxiosHeaders { Cookie: '', 'User-Agent': 'axios/1.1.2', 'Accept-Encoding': 'gzip, deflate, br', [Symbol(defaults)]: [Object] }, baseURL: 'http://localhost:3060', withCredentials: true, method: 'get', url: '/user', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype] { abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], socket: [Function (anonymous)], timeout: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: Socket { connecting: false, _hadError: false, _parent: null, _host: 'localhost', _closeAfterHandlingError: false, _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 6, _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular *1], [Symbol(async_id_symbol)]: 965660, [Symbol(kHandle)]: null, [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: false, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 60, [Symbol(kBytesRead)]: 1307, [Symbol(kBytesWritten)]: 177, [Symbol(RequestTimeout)]: undefined }, _header: 'GET /user HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 22, [Symbol(kCapture)]: false }, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user', _ended: true, res: IncomingMessage { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 4, _maxListeners: undefined, socket: [Socket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 404, statusMessage: 'Not Found', client: [Socket], _consuming: false, _dumped: false, req: [Circular *1], responseUrl: 'http://localhost:3060/user', redirects: [], [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 18, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0, [Symbol(RequestTimeout)]: undefined }, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: Writable { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 0, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: 'http://localhost:3060/user', [Symbol(kCapture)]: false }, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kEndCalled)]: true, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], cookie: [Array], 'user-agent': [Array], 'accept-encoding': [Array], host: [Array] }, [Symbol(kUniqueHeaders)]: null }, response: { status: 404, statusText: 'Not Found', headers: AxiosHeaders { 'cache-control': 'no-store, must-revalidate', 'x-powered-by': 'Next.js', etag: '"96e-3UMFuq1OQMITCj8aIaMUGQiLzzU"', 'content-type': 'text/html; charset=utf-8', vary: 'Accept-Encoding', date: 'Tue, 28 Feb 2023 17:16:27 GMT', connection: 'close', 'transfer-encoding': 'chunked', [Symbol(defaults)]: null }, config: { transitional: [Object], adapter: [Function: httpAdapter], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: [Object], validateStatus: [Function: validateStatus], headers: [AxiosHeaders], baseURL: 'http://localhost:3060', withCredentials: true, method: 'get', url: '/user', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [Socket], _header: 'GET /user HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: [Writable], <h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">An unexpected error has occurred<!-- -->.</h2></div></div></div></div><script src="/_next/static/chunks/react-refresh.js?ts=1677604587296"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"development","isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":": An unexpected error has occurred"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills.js?ts=1677604587296"></script><script src="/_next/static/chunks/main.js?ts=1677604587296"></script><script src="/_next/static/chunks/webpack.js?ts=1677604587296"></script><script src="/_next/static/chunks/pages/_app.js?ts=1677604587296"></script><script src="/_next/static/development/_buildManifest.js?ts=1677604587296"></script><script src="/_next/static/development/_ssgManifest.js?ts=1677604587296"></script></body></html>' }}무한 콘솔창 뜨는거 중간에 강제로 끊었습니다 back-jsonfront-jsonapp.jsconst express = require('express'); const cors = require('cors'); const session = require('express-session'); const cookieParser = require('cookie-parser'); const passport = require('passport'); const dotenv = require('dotenv'); const morgan = require('morgan'); const path = require('path'); const hpp = require('hpp'); const helmet = require('helmet'); const postRouter = require('./routes/post'); const postsRouter = require('./routes/posts'); const userRouter = require('./routes/user'); const hashtagRouter = require('./routes/hashtag'); const db = require('./models'); const passportConfig = require('./passport'); dotenv.config(); const app = express(); db.sequelize.sync() .then(() => { console.log('db 연결 성공'); }) .catch(console.error); passportConfig(); if (process.env.NODE_ENV === 'production') { app.use(morgan('combined')); app.use(hpp()); app.use(helmet()); } else { app.use(morgan('dev')); } app.use(cors({ origin: ['http://localhost:3060', 'nodebird.com'], credentials: true // cookie 전달 })); app.use('/', express.static(path.join(__dirname, 'uploads'))); app.use(express.json()); // app.use(express.urlencoded({ extended: true })); app.use(cookieParser('nodebirdsecret')); app.use(session()); app.use(passport.initialize()); app.use(passport.session({ saveUninitialized: false, resave: false, secret: process.env.COOKIE_SECRET })); app.get('/', (req, res) => { res.send('hello express'); }); app.use('/posts', postsRouter); app.use('/post', postRouter); app.use('/user', userRouter); app.use('/hashtag', hashtagRouter); app.listen(3065, () => { console.log('서버 실행중!'); }); 이전에 했던거 되돌리고싶어요백엔드까지 했던곳으로 되돌리고 다시하고 싶은데 로그인하면 이렇게 무한로딩 되면서 이상한 콘솔창 무한으로 뜹니다 서버 에러 같은데 어딘지 모르겠습니다port ? 404 에러 , asios 에러 ?로그인 안되는데 찾을수가 없습니다
-
해결됨직장인에게 꼭 필요한 파이썬-아래아한글 자동화 레시피
자간 자동조정 프로그램 만들어보기 관련 문의
자간 자동 조정 코드를 적용하던 도중에가나다라마바사아자차카타파하가나다라마바사아자차카타파가나다라마바사아자차카타가나다라마바사아자차카가나다라마바사아자차가나다라마바사아자가나다라마바사아 이런 식으로 문장 중간중간 엔터가 입력되어 있는 경우에는 중간에서 계속 선택구간 텍스트만을 반복하는 경우가 발생하였습니다 ㅠㅠ 혼자 코드를 수정해가면서 고쳐보려고 했으나 잘 되지 않네요 ㅠㅠ 혹시 도움을 주실 수 있을까요? 그리고 단이 나눠져 있는 문서의 경우에는 "MoveDown"을 사용할 경우에는 한 쪽 단 만을 점검하고 내려가게 되는 것 같아 이 부분도 혹시 반영할 코드를 짤 수 있을까요?? 그리고.. 질문이 너무 많고 계속 추가하고 수정해서 죄송한데 ㅠㅠ글과 표가 섞여있는 경우에 두 가지를 해결하지 못해서요.1) 첫 시작이 표인경우에는 "MoveDown"을 사용하면 표 안으로 들어가는게 아니라 그 다음줄로 이동하는데 이것도 방법이 있을까요..??2) 중간에 표가 있는 경우에도 표 안에서 멈춘 후에 이후에 나가지 못하는 것 같습니다. 아무래도 표 안쪽과 바깥 글 사이에 "MoveSelRight"가 안 되는게 원인인것 같은데 해결책을 찾지 못하였습니다 ㅠㅠ
-
미해결재고시스템으로 알아보는 동시성이슈 해결방법
lettuce vs reddisson 실무에서 도입 시 고려하는 부분에 대해서 설명할 때 질문있습니다.
lettuce와 같은 경우는 락에 대한 재시도가 필요하지 않아도 사용하고,reddisson는 재시도가 필요한 경우 사용한다고 설명들었습니다.그런데 lettuce는 spinLock 기법으로 lock에 대해서 계속적으로 계속적으로 점유하려고 하는 방식으로 설명들었습니다.재시도가 필요하지 않는 lock이라는게, 제가 이해한 것과는 다른 내용일까요?궁금합니다!
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
[9:00] fail(); 에서 에러가 발생합니다.
아래와 같은 에러가 발생합니다.확인 한번만 부탁드립니다.(코드 추가했습니다.)
-
미해결[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)
광고상품 외 표기 문의드립니다.
안녕하세요. 답변 감사드립니다.전체 코드를 첨부하여 다시 문의글 작성하였습니다.쿠팡 광고상품과 로켓상품도 표기하고자 합니다.if len(link.select(".ad-badge-text")) > 0:print("광고상품")를 아래와 같이 수정하면 될까요?해봤는데 아무표기가 안되서요. if len(link.select("span.badge rocket")) > 0:print("로켓상품") 그리고 광고상품 로켓상품 둘다 표현하고자 하면아래와 같이 표기하면 될까요?if len(link.select(".ad-badge-text")) > 0:print("광고상품")elif len(link.select("span.badge rocket")) > 0:print("로켓상품")광고상품은 광고상품이라고 잘 표기가 되는게 로켓상품은 전혀 결과가 나오지 않아서요.
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
상속관계 오류
Book.javaItem상속관계에서 오류가 발생했습니다..
-
해결됨스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
viewResolve 실행되는 위치가 render() 안에 있는게 맞나요?
PDF를 보면서 복습을 하는데1. 핸들러어댑터호출핸들러어댑터를 통해 new-form 이라는 논리뷰 이름을 획득한다.2. ViewResolver 호출new-form 이라는뷰 이름으로 viewResolver를 순서대로호출한다.BeanNameViewResolver 는 new-form 이라는 이름의스프링 빈으로등록된 뷰를찾아야하는데 없다. InternalResourceViewResolver 가 호출된다.3. InternalResourceViewResolver이뷰 리졸버는 InternalResourceView 를반환한다.4. 뷰 - InternalResourceViewInternalResourceView 는 JSP처럼포워드 forward() 를호출해서 처리할수 있는경우에 사용한다.5. view.render()view.render() 가호출되고 InternalResourceView 는 forward() 를사용해서 JSP를실행한다.그런데 코드를 찾아보니까render()가 실행되면서 resolveViewName()로 viewResolver를 순회하던데이때 InternalResourceViewResolver가 호출되는게 맞나요 ?
-
미해결바닥부터 시작하는 STM32 드론 개발의 모든 것
정상 작동하다가 SwC를 내릴때 소리가 안납니다. TIM3->PSC = 1000;를 추가해야 합니다.
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. if (failsafe_flag == 1 || failsafe_flag == 2 || low_bat_flag == 1 || iBus.SwC == 2000) { TIM3->PSC = 1000;
-
미해결
장고 운영환경과 개발환경에서 json 파일 업데이트 시간차 오류
안녕하세요.장고에서 보안이 필요한 SECRETKEY 등의 내용은 .gitignore로 설정한 json 파일에 따로 저장하여 사용하고 있습니다.csrf token 값도 이렇게 저장하고 업데이트 하여 필요에 따라 json 파일로 부터 가져오거나, 업데이트하여 사용 중에 있습니다.개발환경에서는 어느 뷰함수에서 새로운 값으로 업데이트 한 후에, 다른 뷰함수에서 이 값을 가져오면 당연히 업데이트 한 값이 나타나는데, 문제는 운영환경(AWS)에서는 업데이트 되어 있지 않고 이전의 저장된 값이 나타난다는 점입니다.json 파일에 대한 컨트롤은 기존의 settings.py를 환경에 따라 셋으로 분리한 모듈 중 하나인 settings/base.py에서 처리하고 있습니다. 공통 요소는 base.py, 운영 환경은 prod.py, 개발 환경은 local.py에 각각 설정하였습니다.base.py 에서 다음과 같이 json 파일을 다루고 있습니다.#settings/base.py secret_file = os.path.join(BASE_DIR, 'secrets.json') with open(secret_file) as f: secrets = json.loads(f.read()) # key가 setting인 value 가져오기 def get_secret(setting, secrects=secrets): try: return secrets[setting] except KeyError: error_msg = "Set the {} environment variable".format(setting) raise ImproperlyConfigured(error_msg) # key/value 신규 저장 또는 기존 값 업데이트 def update_secret(key, value): secrets[key] = value with open(secret_file, 'w') as outfile: json.dump(secrets, outfile, indent=1) SECRET_KEY = get_secret('SECRET_KEY')그리고 base.py 의 get_secret 함수 또는 update_secret함수를 views.py 에서 호출하여 필요한 값을 가져오고 있습니다.개발 환경에서는 이러한 값들을 업데이트 하고 가져오면, 너무나도 당연히 그 업데이트 된 값으로 나타나지만, 운영 환경에서는 이전에 저장되었던 값이 나타납니다.예를 들면 다음과 같습니다.# 개발환경 / views.py from config.settings import base def view_1(request): ... # 새로운 csrf_token 값('bbb') 받아오기 csrf_token = request.POST.get('csrfmiddlewaretoken') # csrf_token 값 업데이트(기존 값 'aaa') base.update_secret('csrf_token', csrf_token) ... def view_2(request): ... # 업데이트 된 csrf_token 값 가져오기 csrf_token = base.get_secret('state') # 개발환경 : 업데이트 된 값 'bbb' 가져옴 # 운영환경 : 이전의 저장된 값 'aaa' 가져옴희한하게 운영 환경에서도, view_1에서 csrf_token을 업데이트한 시점에 json 파일을 열어보면 업데이트 된 값으로 바뀌어 있다는 점입니다. 그런데도 어디서 이전의 값을 참조하는 건지 도무지 알 수가 없어서 너무나 답답합니다.
-
해결됨스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
localhost:8080/hello 접속 시 Whitelabel Error Page
안녕하세요! spring 부트 3.0.3 버전에서 자바 17을 이용해서 강의 내용을 따라하는 중에 HelloServlet을 만들고 localhost:8080/hello에 접속을 시도했으나 localhost:8080페이지와 같은 Whitelabel Error Page가 뜨네요.다른 질문 들을 참고하여 @ServletComponentScan이나 세팅에서 자바로 실행하도록 설정을 변경하였으나 같은 문제가 발생합니다.도움을 주신다면 정말 감사합니다
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
user 과 auth에서 인증 부분
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.user.ts하고auth.ts에서이 부분이 같은데user.ts는 유저정보를 가져오기위한 미들웨어이고auth.ts는 인증을 위한 부분인데if(!user)이 둘다 있는 이유가 있을까요?그저 user.ts가 user정보를 가져오는데 조건에 해당하는 user정보가 없으면 안되니까(null) user.ts에 if(!user)이 있는건가요??제가 제대로 이해하고 있는지 헷갈려서요 ㅠㅠㅠ
-
해결됨곰책으로 쉽게 배우는 최소한의 운영체제론
User mode와 관련하여 질문있습니다.
선생님 수업 잘 듣고 있습니다!선생님의 컴퓨터 공학 기초 강의를 듣고 운영체제 강의로 넘어왔습니다.컴퓨터 공학 기초 강의에서는 보지 못했던 User mode에서 App과 Service 계층에 대해 궁금한게 있습니다.App Layer에 있는 Process가 Service Layer에 있는 API를 호출한다고 하셨습니다.c언어에서 printf같은 함수들이 모여있는 lib 폴더가 있는 곳을 Service Layer로 보면 되는건가요?그리고 App과 Service Layer가 너무 생소한데 그냥 무조건 User mode에 저런게 있다고 외우면 될까요?
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part4: 게임 서버
listener, session 간의 차이
안녕하세요, listener, session 코드간 차이점에 대해서 질문이 있습니다. 1, listener에서는 OnRecvCompleted()와같은 메서드에서 socketerror가 발생했을 때, disconnect를 하지 않았는데, session에서는 왜 disconnect를 하는 건가요? 2.listener 에서는 registerRecv() 와같은 함수를 OnRecvCompleted의 if, else와 상관없이 실행한거같은데, 왜 session에서는 if(args.Bytes.Transferred > 0 && ~~~) 을 만족해야 OnRecvCompleted를 실행하는건가요? using System; using System.Collections.Generic; using System.Net.Sockets; using System.Text; namespace ServerCore { class Session { Socket _socket; public void init(Socket socket) { _socket = socket; SocketAsyncEventArgs recvArgs = new SocketAsyncEventArgs(); recvArgs.Completed += new EventHandler<SocketAsyncEventArgs>(OnRecvCompleted); //userTocken으로 추가적인 정보를 아무거나넘겨줄 수 있다(object를 받기 때문) recvArgs.SetBuffer(new byte[1024],0,1024); RegisterRecv(recvArgs); } void RegisterRecv(SocketAsyncEventArgs args) { args.AcceptSocket = null; bool pending = _socket.ReceiveAsync(args); //바로 성공했으면 if(pending == false) { OnRecvCompleted(null, args); } } void OnRecvCompleted(object obj, SocketAsyncEventArgs args) { //BytesTransferred == 몇바이트 받았는지 if (args.BytesTransferred>0 && args.SocketError == SocketError.Success) { try { string recvData = Encoding.UTF8.GetString(args.Buffer, args.Offset, args.BytesTransferred); Console.WriteLine($"[from client] : {recvData}"); RegisterRecv(args); } catch(Exception e) { Console.WriteLine($"onrecvcompleted failed {e}"); } } else { //TODO Disconnect } } } }
-
해결됨[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part4: 게임 서버
Listener, Session 에서의 콜백메서드 질문
안녕하세요, listener, session 클래스를 구현할 때, 콜백메서드에 대해 질문이 있습니다. 아래와 같은 코드에서, using System; using System.Collections.Generic; using System.Net.Sockets; using System.Text; namespace ServerCore { class Session { Socket _socket; public void init(Socket socket) { _socket = socket; SocketAsyncEventArgs recvArgs = new SocketAsyncEventArgs(); recvArgs.Completed += new EventHandler<SocketAsyncEventArgs>(OnRecvCompleted); //userTocken으로 추가적인 정보를 아무거나넘겨줄 수 있다(object를 받기 때문) recvArgs.SetBuffer(new byte[1024],0,1024); RegisterRecv(recvArgs); } void RegisterRecv(SocketAsyncEventArgs args) { args.AcceptSocket = null; bool pending = _socket.ReceiveAsync(args); //바로 성공했으면 if(pending == false) { OnRecvCompleted(null, args); } } void OnRecvCompleted(object obj, SocketAsyncEventArgs args) { if (args.SocketError == SocketError.Success) { string recvData = Encoding.UTF8.GetString(args.Buffer, 0, args.Buffer.Length); Console.WriteLine($"[from client] : {recvData}"); } else { Console.WriteLine(args.SocketError.ToString()); } RegisterRecv(args); } } } 해당 RegisterRecv()메서드에서 pending이 false인 경우 바로 OnRecvCompleted()를 호출해주는거고, true인 경우 콜백메서드로 OnRecvCompleted가 호출되는 형식이라고 이해를 했는데, void RegisterRecv(SocketAsyncEventArgs args) { args.AcceptSocket = null; bool pending = _socket.ReceiveAsync(args); //바로 성공했으면 if(pending == false) { OnRecvCompleted(null, args); } }그렇다면, pending이 false인 경우에는 if(pending == false) { OnRecvCompleted(null, args); }여기서 OnRecvCompleted() 호출되고 또 콜백메서드에서 또 한번 호출되는 것 아닌가요? 콜백메서드가 false인 경우에 2번호출되지 않는다는 것을 어떻게 이해하면 될까요?