묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨[리뉴얼] 타입스크립트 올인원 : Part2. 실전 분석편
안녕하세요.
안녕하세요 슬랙 클론코딩 공부 전 다른 책과 병행하여 한번 더 공부하고 있는데 책 내용중 모르는 것이 있어 질문 드립니다.as const 를 사용하면 문맥 손실(losing context)과 관련된 문제를 깔끔하게 해결할 수 있다고 나왔는데 이게 무슨 뜻인지 잘 모르겠습니다.코드는 첫번째 코드에서 두번째 코드로 수정되는 상황이었습니다.function panTo(where: [number, number]) { } const loc = [10, 20]; panTo(loc); // Error // Argument of type 'number[]' is not assignable to parameter of type '[number, number]'. Target requires 2 element(s) but source may have fewer. function panTo(where: readonly [number, number]) { } const loc = [10, 20] as const; panTo(loc)타입 스크립트가 loc를 number[]로 추론하여 매개변수와 타입이 맞지 않아 아래와 같이 수정했는데 as const가 붙으면 readonly가 붙고 그게 더 좁은 타입이라 매개변수에도 readonly를 붙여준다는 것까진 이해했습니다. as const를 사용하여 문맥 손실과 관련된 문제를 해결한다는 것이 무슨 뜻인지 궁금합니다!! 제가 생각하기에는 한변 변수에 넣어줬기 때문에 [10, 20]이란 값을 직접적으로 사용하지 못하고 그거에 대한 타입을 추론하여 함수에 값이 아닌 타입으로만 검사를 하는 것을 보고 문맥 손실이 일어났다 하는 것이라 추론했습니다.감사합니다.
-
미해결그림으로 배우는 쿠버네티스(v1.30) - {{ x86-64, arm64 }}
4.5 외부 이름 에서 질문드립니다.
안녕하세요 강사님 질문 하나 드립니다.강의에서k run net --image=~ 이후 k exec net 을 하여 net으로 접근합니다 그 후에 nslookup으로 확인을 하는데요 여기에 질문이 있는데 , 강의에서 클러스터 내부에서 접근해야된다고 말씀해 주셨는데, 이미 마스터노드 안이라 nslookup을 바로 하면 될 줄 알았는데 Net을 통해 접근을 해야 되더라구요..! 첫번째로 마스터 노드에서 net을 통해 클라스터로 접근을 하는 부분이 이해가 안되며, 두번째로 net을 통해 접근하는거 또한 이해가 되지 않습니다. net의 역할이 정확히 무엇인지 개념이 정립이 안되네요 죄송합니다. 제가 생각하기로는 클러스터 안에 노드 그 안에 파드 라고 생각했는데 어떤게 맞는지 정확히 모르겠습니다 .! 감사합니다.
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
res.end() 앞 return 여부의 차이
아래는 res.end()앞에 return이 없는 경우입니다.http.createServer(async (req, res) => { res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); const data = await fs.readFile('./http.html'); res.end(data); } 아래는 res.end()앞에 return이 없는 경우입니다.http.createServer(async (req, res) => { const data = await fs.readFile('./restFront.html'); res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); return res.end(data); // res.end() 앞에 return이 있음. }위 예시 말고도 코드 여러 군데에서 어떤건 return 이 들어가고 안들어가고 하더라고요. return이 있고 없고에 어떤 차이가 있는 걸까요?감사합니다.
-
미해결Flutter 입문 - 안드로이드, iOS 개발을 한 번에 (with Firebase)
firebase 이메일 로그인 설정 관련 오류 문의의 건
안녕하세요, 강사님. Flutter 입문 - 안드로이드, iOS 개발을 한 번에 강의 수강중에 있으나 버전(?) 충돌로 인하여 문의 드립니다.("13. Firebase로 이메일 로그인 기능 구현" 학습중...) firebase 연동하여 이메일을 통해 로그인 될 수 있도록 설정하는 과정에서 오류가 발생된 것으로 보이는데 어떻게 해야 하는지 문의 드립니다.if (!snapshot.hasData) { return SignInScreen( providerConfigs: [EmailProviderConfiguration(),] ); "RUN시 오류 내용"Running "flutter pub get" in instagram_clone_renew...Because every version of flutter from sdk depends on collection 1.15.0 and firebase_auth_platform_interface >=6.4.0 depends on collection ^1.16.0, flutter from sdk is incompatible with firebase_auth_platform_interface >=6.4.0.And because firebase_auth 4.2.5 depends on firebase_auth_platform_interface ^6.11.3 and no versions of firebase_auth match >4.2.5 <5.0.0, flutter from sdk is incompatible with firebase_auth ^4.2.5.So, because instagram_clone_renew depends on both flutter from sdk and firebase_auth ^4.2.5, version solving failed.pub get failed (1; So, because instagram_clone_renew depends on both flutter from sdk and firebase_auth ^4.2.5, version solving failed.) 환경설정값 및 버전Flutter 3.3.2 • channel stable • https://github.com/flutter/flutter.gitFramework • revision e3c29ec00c (4 months ago) • 2022-09-14 08:46:55 -0500Engine • revision a4ff2c53d8Tools • Dart 2.18.1 • DevTools 2.15.0 dependencies: flutter: sdk: flutter image_picker: ^0.8.6 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 firebase_core: ^2.4.1 firebase_auth: ^4.2.5 flutterfire_ui: ^0.4.3+20
-
미해결파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트
django 코드를 보려고 하는데 질문드립니다.
저는 클래스의 self가 클래스의 인스턴스를 만들었을때 그 인스턴스 자신을 self라고 하는것으로 알고있었습니다. 그런데 장고코드에는 클래스기반뷰에서 클래스의 인스턴스를 만들지 않음에(예를들어 a=RedirectVIew()어쩌구 하는게 아니라 a=RedirectView.as_view()를 통해서 함수를 넘기잖아요)도 불구하고 self가 다양하게 들어가는데 이건 어떤 의미인가요?^^;;
-
미해결딥러닝 CNN 완벽 가이드 - TFKeras 버전
필터 관련문의
강의 잘 듣고 있습니다.지금 CIFAR 데이터셋 CNN구현 실습 부분을 보고 있으면서 궁금한점 이 생겨 문의드립니다. 학습시 Conv2D, Activation, Maxpooling2D 같은 필터 개수는 어떻게 정의하는건가요 ? param이 어떻게 변하는지는 설명을 잘 해주셔서 이해했는데, Conv2D 등을 통해 필터시 어떤 기준으로 여러번 사용하는지가 이해가 안되내요. 감사합니다.
-
미해결호돌맨의 요절복통 개발쇼 (SpringBoot, Vue.JS, AWS)
호돌맨님 강의 챕터 순서대로 듣지 않아도 상관없을까요?
Spring Rest Docs 까지 순서대로 들었는데 깃헙이나 배포, Vue 이 부분보다 인증 부분이 좀 더 급한 거 같아 그 부분 먼저 들으려고 하는데 상관없을까요?
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
navigation에 fragment를 추가하고 실행을 하면 오류
navigation에 fragment를 추가하고 실행을 하면 오류가 발생합니다. 정확히 말씀드리면 <트로트 가수 음악 목록 앱 소개 및 레이아웃 설정> 8분 가량 실행하는 것이 안됩니다. 이전 강의들은 모두 잘 되었는데 여기서 부터 막히니 다음 강의인 파이어베이스와 연결에서도 오류가 발생해 더 이상 진도가 안 나아가서 질문 드립니다 ㅠㅠ <오류 문구입니다.>7 issues were found when checking AAR metadata: 1. Dependency 'androidx.appcompat:appcompat-resources:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 2. Dependency 'androidx.appcompat:appcompat:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 3. Dependency 'androidx.activity:activity-ktx:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 4. Dependency 'androidx.activity:activity:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 5. Dependency 'androidx.core:core:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 6. Dependency 'androidx.core:core-ktx:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 7. Dependency 'androidx.annotation:annotation-experimental:1.3.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
-
해결됨스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
hello.html에서 ${data}에 줄이 그어집니다.
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]hello.htmlHellocontrollerlocalhost:8080/hello! hello.html에서 줄이 그어져있고웹에서 출력하니 null로 값이 들어와있습니다. ! 어디가 문제인지 알수 없네요 ㅠㅠ현재 인텔리제이 교육용 라이센스, 스프링부트 2.7.8, 자바 11사용 중입니다.
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
2-S 문제(1325)
define CRTSECURE_NO_WARNINGS#include <iostream>#include <vector>#include <algorithm>#include <queue>#include <tuple>#include <string>#include <map>#include <stack>using namespace std;vector<int> adj[100001];int visited[100001];int n, m, cnt, ret = 1;int a, b;void dfs(int node){ visited[node] = 1; for (int i = 0; i < adj[node].size(); i++) { if (!visited[adj[node][i]]) { cnt++; dfs(adj[node][i]); } }}int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n >> m; for (int i = 0; i < m; i++) { cin >> a >> b; adj[b].push_back(a); } for (int i = 1; i <= n; i++) { fill(&visited[0], &visited[0] + 100001, 0); cnt = 0; dfs(i); ret = max(ret, cnt); } for (int i = 1; i <= n; i++) { fill(&visited[0], &visited[0] + 100001, 0); cnt = 0; dfs(i); if (cnt == ret) cout << i << " "; } return 0;} 다음과 같이 코드를 작성하였는데 계속 시간초과가 뜨고 인접행렬로 풀면 메모리 초과가 나서 변경하였는데 추가로 어떻게 수정해야될지 모르겠습니다 ㅠㅠㅠvisual studio에서는 cnt출력 및 i 를 출력했을 때 결과는 맞게 나옵니다
-
해결됨스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
영한님의 스프링 강의를 듣다보면 REST API 도 익히게 되나요
스프링 핵심 원리 - 기본편 스프링 컨테이너와 스프링 빈 부분 공부중입니다.REST API 는 HTTP 요청을 보낼 때 , 어떤 URI에 어떤 메소드를 사용할지 개발자들 사이에 널리 지켜지는 약속.이라고 얕게 알고 있습니다.영한님 강의를 들으면서 따라 치고 이해하는 과정속에 자연스럽게 이 부분도 녹여져 있는지 궁금합니다. 무엇이던지 별도로 추가적으로 공부하면 좋겠지만영한님의 스프링 강의 과정을 따라가다보면 자연스럽게 익히게 되는지 궁금합니다.
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
우분투에서 작업시 윈도우로 mysql 설치하는 것에 관해서
제로초쌤 제가 우분투에서 Nodebird를 진행하고 있는데 더북에 써져있는 거처럼 리눅스(우분투)에서 설치하는 방법 그대로 설치하다가 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) 소켓 에러가 계속 나서 해결하려고 인터넷에 찾아보면서 따라하고 있는데 해결이 안되서 혹시 윈도우로 mysql설치해서 진행해도 크게 차이가 없을까요?
-
미해결배달앱 클론코딩 [with React Native]
build.gradle 에 react.gradle 없는 문제
안녕하세요~최초 npx react-native init 프로젝트명 커맨드로 프로젝트를 만들면 build.gradle 파일에는 아래의 react.gradle 이 존재하지 않습니다.apply from: "../../node_modules/react-native/react.gradle"이부분은 향후에도 지원하지 않고 deprecated 된다고 하네요.그래서 https://github.com/facebook/react-native/blob/main/template/android/app/build.gradle 여기 공식 github 에도 나와있지만 이제부턴 apply plugin: "com.facebook.react" 를 쓴다고 하고 프로젝트 init하면 default도 그렇게 되어 있습니다. 그런데 문제는!이러한 build.gradle 환경에서 android 빌드해보면 아래와 같은 에러가 발생합니다.bundleDebugJsAndAssets 를 :app 에서 찾을 수 없다고 나오는데 어떻게 해결하면 될까요? info Starting JS server...info Installing the app...5 actionable tasks: 5 up-to-dateFAILURE: Build failed with an exception.* What went wrong:Could not determine the dependencies of task ':app:generateBundledResourcesHashDebug'.> Task with path 'bundleDebugJsAndAssets' not found in project ':app'.* Try:> Run with --stacktrace option to get the stack trace.> Run with --info or --debug option to get more log output.> Run with --scan to get full insights.* Get more help at https://help.gradle.orgBUILD FAILED in 4serror Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081FAILURE: Build failed with an exception.* What went wrong:Could not determine the dependencies of task ':app:generateBundledResourcesHashDebug'.> Task with path 'bundleDebugJsAndAssets' not found in project ':app'. 아래와 같은 이슈인거 같은데 known 이슈로 지금 디버깅 중인걸까요?https://github.com/microsoft/react-native-code-push/issues/2418
-
미해결Nuxt.js 시작하기
설치가 되지 않습니다..
npm init nuxt-app learn-nuxt를 입력했으나 에러가 뜨네요 ㅠ
-
미해결Slack 클론 코딩[실시간 채팅 with React]
Cannot read properties of undefined (reading 'map')
제로초님, 코드를 따라친 후에 로그아웃을 하고 다시 로그인 하면 이런 에러메세지가 뜹니다.그런데 네트워크 탭을 보면 로그인이 정상적으로 된거 같아서 새로고침을 하면 에러 메세지가 사라지고 슬랙에서 로그인된 화면이 제대로 뜹니다.근데 또 여기서 워크스페이스를 생성하려고 하면 콘솔에 axioserror메세지가 떠서 어떻게 해야될지 모르겠습니다..Workspace/index.tsximport axios from "axios"; import React, { FC, useCallback, useState } from "react"; import useSWR from 'swr'; import fetcher from "@utils/fetcher"; import { Navigate, Routes, Route } from "react-router-dom"; import { AddButton, Channels, Chats, Header, LogOutButton, MenuScroll, ProfileImg, ProfileModal, RightMenu, WorkspaceButton, WorkspaceName, Workspaces, WorkspaceWrapper } from "@layouts/Workspace/style"; import gravatar from 'gravatar'; import loadable from '@loadable/component'; import Menu from "../../components/Menu"; import Modal from "../../components/Modal"; import { Link } from "react-router-dom"; import { IUser } from "@typings/db"; import { Button, Input, Label } from "@pages/SignUp/styles"; import useInput from "@hooks/useInput"; import {toast} from 'react-toastify'; const Channel = loadable(() => import('@pages/Channel')); const DirectMessage = loadable(() => import('@pages/DirectMessage')); const Workspace: FC<React.PropsWithChildren<{}>> = ({children}) => { const [showUserMenu, setShowUserMenu] = useState(false); const [showCreateWorkspaceModal, setShowCreateWorkspaceModal] = useState(false); const [newWorkspace, onChangeNewWorkspace, setNewWorkspace] = useInput(''); const [newUrl, onChangeNewUrl, setNewUrl] = useInput(''); // revalidate = 서버로 요청 다시 보내서 데이터를 다시 가져옴 // mutate = 서버에 요청 안보내고 데이터를 수정 const {data: userData, error, mutate} = useSWR<IUser | false>('/api/users', fetcher, { dedupingInterval: 2000, }); const onLogout = useCallback(() => { axios.post('/api/users/logout', null , { withCredentials: true, }) .then(() => { mutate(false, false); }) }, []); const onClickUserProfile = useCallback((e: any) => { e.stopPropagation(); setShowUserMenu((prev) => !prev); }, []) const onClickCreateWorkspace = useCallback(() => { setShowCreateWorkspaceModal(true); }, []) const onCreateWorkspace = useCallback((e: any) => { e.preventDefault(); // 띄어쓰기도 검사해줘야됨 if(!newWorkspace || !newWorkspace.trim()) return; if(!newUrl || !newUrl.trim()) return; axios.post('http://localhost:3095/api/workspaces', { workspace: newWorkspace, url: newUrl, }, { withCredentials: true, }) .then(() => { mutate(); setShowCreateWorkspaceModal(false); setNewWorkspace(''); setNewUrl(''); }) .catch((error) => { console.dir(error); // 에러가 나면 사용자가 인지하게 해줌 toast.error(error.response?.data, { position: 'bottom-center' }) }) }, [newWorkspace, newUrl]) const onCloseModal = useCallback(() => { setShowCreateWorkspaceModal(false); }, []) if(!userData) { return <Navigate to="/login" /> } if(!userData) return null; return( <div> <Header> <RightMenu> <span onClick={onClickUserProfile}> <ProfileImg src={gravatar.url(userData.email, { s: '28px', d: 'retro' })} alt={userData.nickname} /> {showUserMenu && <Menu style={{ right: 0, top: 38 }} show={showUserMenu} onCloseModal={onClickUserProfile}> <ProfileModal> <img src={gravatar.url(userData.nickname, { s: '36px', d: 'retro' })} alt={userData.nickname} /> <div> <span id="profile-name">{userData.nickname}</span> <span id="profile-active">Active</span> </div> </ProfileModal> <LogOutButton onClick={onLogout}>로그아웃</LogOutButton> </Menu>} </span> </RightMenu> </Header> <WorkspaceWrapper> <Workspaces> {userData?.Workspaces.map((ws) => { return ( <Link key={ws.id} to={`/workspace/${123}/channel/일반`}> <WorkspaceButton>{ws.name.slice(0, 1).toUpperCase()}</WorkspaceButton> </Link> ); })} <AddButton onClick={onClickCreateWorkspace}>+</AddButton> </Workspaces> <Channels> <WorkspaceName>Sleact</WorkspaceName> <MenuScroll>menu scroll</MenuScroll> </Channels> <Chats> <Routes> <Route path="/channel" element={<Channel />} /> <Route path="/dm" element={<DirectMessage />} /> </Routes> </Chats> {/* Input이 들어있으면 별도의 컴포넌트로 빼는 것을 추천(input에 글자를 입력할 때마다 여기 있는 함수들이 다 리렌더링 되기 때문에 비효율적) */} </WorkspaceWrapper> <Modal show={showCreateWorkspaceModal} onCloseModal={onCloseModal}> <form onSubmit={onCreateWorkspace}> <Label id="workspace-label"> <span>워크스페이스 이름</span> <Input id="workspace" value={newWorkspace} onChange={onChangeNewWorkspace} /> </Label> <Label id="workspace-url-label"> <span>워크스페이스 이름</span> <Input id="workspace" value={newUrl} onChange={onChangeNewUrl} /> </Label> <Button type="submit">생성하기</Button> </form> </Modal> </div> ) } export default Workspace;Modal/index.tsximport React, { useCallback, FC } from "react"; import { CloseModalButton, CreateModal } from "./style"; interface Props { show: boolean; onCloseModal: () => void; children: React.ReactNode; } const Modal: FC<Props> = ({show, children, onCloseModal}) => { const stopPropagation = useCallback((e: any) => { e.stopPropagation() }, []); if(!show){ return null; } return( <CreateModal onClick={onCloseModal}> <div onClick={stopPropagation}> <CloseModalButton onClick={onCloseModal}>×</CloseModalButton> {children} </div> </CreateModal> ); }; export default Modal;swr2.0 버전, react v18, typescript v18swr을 최신버전 사용해서 revalidate대신 mutate를 사용했는데 제가 잘못 사용한건지 모르겠습니다.
-
미해결설계독학맛비's 실전 FPGA를 이용한 HW 가속기 설계 (LED 제어부터 Fully Connected Layer 가속기 설계까지)
리눅스에서는 FPGA가 불가능한가요?
HDL 강좌를 듣고, FPGA 강좌도 듣는중인데, fpga 강좌는 리눅스 환경에서 진행할 수는 없는 걸까요?만들어 보니 프로젝트 에러가 발생하긴합니다.코드를 추가하여도 뜨진않네요..물론 윈도우에서는 되긴합니다.
-
미해결[파이토치] 실전 인공지능으로 이어지는 딥러닝 - 기초부터 논문 구현까지
pytorch custom layer
안녕하세요! pytorch library에 대한 질문이 있습니다.저희는 pytorch로 모델을 구현할 때, nn.Module 오버라이딩하여 사전에 존재하는 모듈을 사용하여 모델을 구축합니다. 예를들어 lstm 같은 경우, 파이토치에 이미 lstm block이 구현되어있어서 그대로 가져다 씁니다. 만약 제가 직접 파이토치 상에서 layer를 직접 구축하고 싶을 때, 어떻게 구축해야하는지 궁금합니다. 파이토치 상에서 구현되지 않은 알고리즘을 파이토치로 구현하고 싶습니다.혹시 참고할 만한 레퍼런스가 있다면 뭐든 너무 감사드립니다.
-
미해결문과생도, 비전공자도, 누구나 배울 수 있는 파이썬(Python)!
python 과 jupyter 질문
그렇다면 저희는 훗날 파이썬 사용을 대비해서return값을 변수로 지정하고print(변수) 하는 것까지 하는 것을 습관으로 가져야한다는 말씀이실까요?Print(변수)하는 것도 습관으로 가져야한다는 말씀이실까요
-
미해결설계독학맛비's 실전 Verilog HDL Season 1 (Clock부터 Internal Memory까지)
build 오류
안녕하세요.vivado 설치 이후 환경설정까지 완료했고 프로그램 실행이 잘 되는 것 까지 확인했습니다.테스트로 build 파일을 진행하니 다음과 같은 오류가 떠서 xvlog를 확인해봤는데 정상적으로 설치가 된 것 같습니다. 어떤 부분이 문제일까요?
-
미해결홍정모의 따라하며 배우는 C언어
14.5 구조체 dot 선언 오류
구조체 선언할 때, dot을 사용해서 선언하면 아래와 같이 오류가 납니다!주석된 부분에서 오류가 나타나는 이유를 알고 싶습니다!! --------------------------------------------------------------------------------------------------#define CRT_SECURE_NO_WARNINGS#include <stdio.h>#define LEN 41struct names { char given[LEN]; char family[LEN];};struct reservation { struct names guest; struct names host; char food[LEN]; char place[LEN]; int year; int month; int day; int hours; int minutes;};int main(void){ //struct reservation res { // .guest = { "Nick", "Carraway" }, // .host = { "Jay", "Gatsby" }, // .place = { "the Gatsby mansion" }, // .food = { "Escargot" }, // .year = 2022, // .month = 4, // .day=10, // .hours = 18, // .minutes=30 //}; struct reservation res { { "Nick", "Carraway" }, { "Jay", "Gatsby" }, { "Escargot" }, { "the Gatsby mansion" }, 2022, 4, 10, 18, 30 }; printf("\Dear %s %s \n\I would like to serve you %s.\n\Please visit the Gatsby mansion on %d/%d/%d at %d:%d.\n\Sincerely, %s %s\n", res.guest.given, res.guest.family, res.food, res.day, res.month, res.year, res.hours, res.minutes, res.host.given, res.host.family); return 0;}