묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결배달앱 클론코딩 [with React Native]
잘못된 클라이언트 ID를 지정
1.ios/FoodDeliveryApp/Info.plist 입력<key>NMFClientId</key> <string>콘솔에서 복사한 클라이언트 아이디</string>2.Xcode의 앱-general-Bundle Identifier과 네이버 콘솔 번들 ID 동일 (잘못입력했을까봐 복사붙여넣어서도 시도해보았습니다)3. pod install --repo-update npx pod-installXcode에서 shift+cmd+k로 build clean위 사항들을 모두 시도해보았는데 ios에서만 아래 얼럿창이 발생합니다. (android는 정상동작) 오탈자 및 확인할 수 있는 사항 모두 확인하였는데 해결이 잘 안되어 질문드립니다.
-
해결됨스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
JSP라는게 정확히 어떤 것일까요?
제가 이해한 바로는 Java코드 내에 직접 html을 써서 view를 제공해줬는데 이게 아무래도 하나하나 치는게 불편하다보니 JSP가 등장했고 이를 통해 java에서 html을 쓰는게 아니라 html코드 내에 중요한 부분에만(for를 이용한 동적 활용이나 repository 데이터 조회 등 ?) java코드를 씀으로써 좀 더 코드를 간결하게 만들수 있다는 것 같은데 맞나요 ?? jsp와 타임리프는 둘다 뷰를 그리는 도구이다... ???
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
ErrorSummary('No MediaQuery widget ancestor found.'),에러가 뜹니다..
bool debugCheckHasMediaQuery(BuildContext context) { assert(() { if (context.widget is! MediaQuery && context.getElementForInheritedWidgetOfExactType<MediaQuery>() == null) { throw FlutterError.fromParts(<DiagnosticsNode>[ ErrorSummary('No MediaQuery widget ancestor found.'), ErrorDescription('${context.widget.runtimeType} widgets require a MediaQuery widget ancestor.'), context.describeWidget('The specific widget that could not find a MediaQuery ancestor was'), context.describeOwnershipChain('The ownership chain for the affected widget is'), ErrorHint( 'No MediaQuery ancestor could be found starting from the context ' 'that was passed to MediaQuery.of(). This can happen because you ' 'have not added a WidgetsApp, CupertinoApp, or MaterialApp widget ' '(those widgets introduce a MediaQuery), or it can happen if the ' 'context you use comes from a widget above those widgets.', ), ]); }githubs 파일만 가져와서 실행했는데 error가 나오네요..
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
배너가 불러와지지 않습니다
const express = require("express"); const cors = require("cors"); const app = express(); const models = require("./models"); const multer = require("multer"); // const upload = multer({ dest: "uploads/" }); const upload = multer({ storage: multer.diskStorage({ destination: function (req, file, cb) { cb(null, "uploads/"); }, filename: function (req, file, cb) { cb(null, file.originalname); }, }), }); const port = 8080; app.use(express.json()); app.use(cors()); app.use("/uploads", express.static("uploads")); app.get("/banners", (req, res) => { models.Banner.findAll({ limit: 2, }) .then((result) => { res.send({ banners: result, }); }) .catch((error) => { console.error(error); res.status(500).send("에러가 발생했습니다"); }); }); app.get("/products", (req, res) => { // const query = req.query; // console.log("QUERY : ", query); models.Product.findAll({ // limit: 1, // where : { } order: [["createdAt", "DESC"]], attributes: ["id", "name", "price", "seller", "createdAt", "imageUrl"], }) .then((result) => { console.log("PRODUCT : ", result); res.send({ products: result, }); }) .catch((error) => { console.error(error); res.status(400).send("에러 발생"); }); // res.send({ // products: [ // { // id: 1, // name: "농구공", // price: 100000, // seller: "조던", // imageUrl: "images/products/basketball1.jpeg", // }, // { // id: 2, // name: "축구공", // price: 50000, // seller: "메시", // imageUrl: "images/products/soccerball1.jpg", // }, // { // id: 3, // name: "키보드", // price: 10000, // seller: "그랩", // imageUrl: "images/products/keyboard1.jpg", // }, // ], // }); }); app.post("/products", (req, res) => { const body = req.body; const { name, price, seller, description, imageUrl } = body; if (!name || !price || !seller || !description || !imageUrl) { res.status(400).send("모든 필드를 입력해주세요."); } models.Product.create({ name, // name = name price, seller, description, imageUrl, }) .then((result) => { console.log("상품 생성 결과 : ", result); res.send({ result, // result : result }); }) .catch((err) => { console.error(err); res.status(400).send("상품 업로드에 문제가 발생했습니다."); }); res.send({ body, //body : body }); }); app.get("/products/:id", (req, res) => { const params = req.params; const { id } = params; // res.send(`id는 ${id} 입니다.`); models.Product.findOne({ where: { id: id, }, }) .then((result) => { console.log("PRODUCT : ", result); res.send({ product: result, }); }) .catch((error) => { console.error(error); res.status(400).send("상품 조회에 에러가 발생했습니다."); }); }); // 이미지 한개만 요청하는 경우 app.post("/image", upload.single("image"), (req, res) => { const file = req.file; console.log(file); res.send({ imageUrl: file.path }); }); app.listen(port, () => { console.log("그랩의 쇼핑몰 서버가 돌아가고 있습니다."); models.sequelize .sync() .then(() => { console.log("DB 연결 성공!"); }) .catch((err) => { console.error("DB 연결 에러 ㅠ"); process.exit(); }); }); import React from "react"; import "./index.css"; import axios from "axios"; import { Link } from "react-router-dom"; import dayjs from "dayjs"; import relativeTime from "dayjs/plugin/relativeTime"; import { API_URL } from "../config/constants.js"; import { Carousel } from "antd"; dayjs.extend(relativeTime); // 기능 확장 function MainPage() { const [products, setProducts] = React.useState([]); const [banners, setBanners] = React.useState([]); React.useEffect(function () { axios .get( //"https://daa98a8e-bcac-42e0-a0ae-c5562a66248a.mock.pstmn.io/products" // "http://localhost:8080/products" `${API_URL}/products` ) .then(function (result) { const products = result.data.products; setProducts(products); }) .catch(function (error) { console.error("에러 발생 : ", error); }); axios .get(`${API_URL}/banners`) .then((result) => { const banners = result.data.banners; setBanners(banners); }) .catch((error) => { console.error("에러 발생 : ", error); }); }, []); return ( <div> <Carousel autoplay autoplaySpeed={3000}> {banners.map((banner, index) => { return ( <Link to={banner.href}> <div id="banner"> <img src={`${API_URL}/${banner.imageUrl}`} /> </div> </Link> ); })} </Carousel> <h1 id="product-headline">판매되는 상품들</h1> <div id="product-list"> {products.map(function (product, index) { return ( <div className="product-card"> <Link className="product-link" to={`/products/${product.id}`}> <div> <img className="product-img" src={`${API_URL}/${product.imageUrl}`} /> </div> <div className="product-contents"> <span className="product-name">{product.name}</span> <span className="product-price">{product.price}원</span> <div className="product-footer"> <div className="product-seller"> <img className="product-avatar" src="images/icons/avatar.png" /> <span>{product.seller}</span> </div> <span className="product-date"> {dayjs(product.createdAt).fromNow()} </span> </div> </div> </Link> </div> ); })} </div> </div> ); } export default MainPage; Server server.jsReact index.js콘솔창 에러banners DBproducts DB차례대로 첨부해드렸습니다.도저히 안되어서 선생님 코드를 복붙까지 했는데 안되네요ㅠㅠ 도와주세요..
-
미해결성공적인 진짜 iOS 개발자 되기 [기초부터 실무까지]
환율 계산기 앱 - 네트워크처리1
[Assert] UINavigationBar decoded as unlocked for UINavigationController, or navigationBar delegate set up incorrectly. Inconsistent configuration may cause problems.강사님, 해당 에러 확인되셔서 수정되었을까요? 강의 처음부터 수강하려고 하는데 염려되는 부분이라 이렇게 문의글 남기게 되었습니다.Ventura, Xcode 14에서도 강의 원할하게 수강할 수 있게 가이드 부탁드립니다.
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
[Instance of 'ScheduleWithColor'] 를 print로 찍어볼순 없나요?
snapshot.data 를 print 찍어보면 [Instance of 'ScheduleWithColor'] 라고 터미널에 나오는데, 안에 값을 print로 찍어볼순 없나요?
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
모델에서 scheduleWithColor 를 생성할때 import 질문
모델에서 scheduleWithColor 를 생성할때 drift_database.g.dart 가 아닌 drift_database.dart 에서 Schedule 을 import 하는 것은 어떤 원리인가요?Schedule 클래스는 drift_database.g.dart 에 있는데 drift_database.dart 가 import 되는 원리를 알고 싶습니다.
-
미해결그림으로 배우는 자바, 파트1: 입문!
자바입문 - 단일 파라미터 메소드 질문있습니다
클라우드스터딩에도 올렷는데최근질문이 20년도라 혹시나 해서 이곳에 올려봅니다예제를 안보고 먼저 풀어보고 강의를 봤는데public static int cube(int num) 이 부분이 있습니다처음에 이곳에 (int x)int n = 3;result=n*n*n; 이렇게 한번 써보았고선생님이 푼 모습을 보고 int n = 3이건 지우고(int a)result=a*a*a; 이렇게 햇는데도 정답이라고 나왓습니다왜 (int num)을 쓰셧고num 자리에main부분대로 (int x)가 아닌 다른 문자를 넣어도 잘 작동하는건가요??
-
미해결홍정모의 따라하며 배우는 C++
x! =y와 x !=y 차이 관련
이전 찹터에서 설명해주신 것 같기는 한데 혹시 한번 답글로 설명을 해주실 수 있으신지요?
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
음 node 영상이 준비가 되어있긴한건가요..?
이번주에도 안올라왔어요
-
미해결Vue3 완벽 마스터: 기초부터 실전까지 - "기본편"
CSS 적용 이후 메인영역이 상단으로 올라오지 않습니다.
컴포넌트 이해하기 편 7분2초경에 CSS적용이후 메인 영역 컨텐츠가 상단으로 올라오는 모습인데 동일한 css로 적용해도 아래쪽에 머물러 있네요. CSS는 깃에 올라온 소스 그대로 붙여봐도 동일하게 아래에 머물러 있습니다.
-
해결됨실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
@PostMapping으로 등록 시 파라미터 안에 List 질문입니다.
안녕하세요강의 완강 후 따로 프로젝트를 만들어 보던 중 궁금한 게 생겨서 질문 드립니다. PostMapping으로 등록할 때 CreateRequest라는 별도의 클래스를 만들어 주어서 파라미터로 받았는데 이 CreateRequest안에 List를 받아야 할 경우가 있다면 어떻게 해줘야 하는지 잘 모르겠습니다. Product 클래스 입니다.Module 클래스 입니다.하나의 Product에 여러 개의 Module이 들어갈 수 있기 때문에ProductModule 클래스를 만들어줬습니다.이러한 경우에서Product를 등록할 때아래와 같이 넘겨주고 싶으면CreateProductRequest 에서 List를 어떤식으로 받아줘야 하나요? 아래와 같이 해봤는데 잘 안되는 것 같아서요...
-
미해결인공지능 기초수학
강의 교안 요청드립니다.
안녕하세요.강의 교안 요청드립니다.이메일 : 0987someday@naver.com 감사합니다.
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
4-P 질문있습니다.
안녕하세요.예제 문제의 답이 왜 10인지 모르겠습니다.저는 11이라고 당연히 생각했는데요.[2 4 1 2 2 5 1] 이 순서로 줄을 섰다고 가정했을 때[2 4] , [2 4 1 2 2 5] ,[4 1] , [4 1 2] , [4 1 2 2 5] ,[1 2] , [1 2 2 5] ,[2 2] , [2 2 5] ,[2 5] ,[5 1] 의 경우로 총 11가지라고 생각했기 때문입니다.제 생각에서 어떤점이 틀렸고 왜 답이 10인지 잘 모르겠습니다.제가 어느부분을 놓치고 있는건지 너무 답답합니다 ㅠ_ㅠ
-
미해결[리뉴얼] 처음하는 파이썬 데이터 분석 (쉽게! 전처리, pandas, 시각화 전과정 익히기) [데이터분석/과학 Part1]
강의 8:44초 질문 (Confirmed대신 Deaths변경)
- 본 강의 영상 학습 관련 문의에 대해 답변을 드립니다. (어떤 챕터 몇분 몇초를 꼭 기재부탁드립니다)- 이외의 문의등은 평생강의이므로 양해를 부탁드립니다- 현업과 병행하는 관계로 주말/휴가 제외 최대한 3일내로 답변을 드리려 노력하고 있습니다- 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.확진자를 사망자로 바꾸는 작업을 진행중인데 강의 8:44초 기준 최종코드에서 나머지는 다 같고 Confirmed를 Deaths로 바꾸어 주었습니다. 그런데 에러가 발생하고 에러내용은 다음과 같습니다. 에러를 풀기가 너무 어렵네요,, 도움 부탁드립니다.KeyError: "['Deaths'] not in index" "None of [Index(['Country/Region', 'Deaths'], dtype='object')] are in the [columns]" -전체 코드-import jsonimport pandas as pdwith open('csse_covid_19_daily_reports/country_convert.json', 'r', encoding='utf-8-sig') as json_file: json_data = json.load(json_file) def country_name_convert(row): if row['Country_Region'] in json_data: return json_data[row['Country_Region']] return row['Country_Region']def create_dateframe(filename): PATH = "csse_covid_19_daily_reports/" doc = pd.read_csv(PATH + filename, encoding='utf-8-sig') #csv 파일 읽기 try: doc = doc[['Country_Region','Deaths']] except: doc = doc[['Country/Region', 'Deaths']] doc.columns = ['Country_Region', 'Deaths'] doc = doc.dropna(subset=['Deaths']) # 3. 특정 컬럼에 없는 데이터 삭제하기 doc['Country_Region'] = doc.apply(country_name_convert, axis=1) # 4. 'Country_Region'의 국가명을 여러 파일에 일관되게 변경하기 doc = doc.astype({'Deaths': 'int64'}) # 5. 특정 컬럼의 데이터 타입 변경하기 doc = doc.groupby('Country_Region').sum() # 6. 특정 컬럼으로 중복된 데이터를 합치기 # 7. 파일명을 기반으로 날짜 문자열 변환하고, 'Confirmed' 컬럼명 변경하기 date_column = filename.split(".")[0].lstrip('0').replace('-', '/') doc.columns = [date_column] return docimport osdef generate_dateframe_by_path(PATH): file_list, csv_list = os.listdir(PATH), list() first_doc = True for file in file_list: if file.split(".")[-1] == 'csv': csv_list.append(file) csv_list.sort() for file in csv_list: doc = create_dateframe(file) if first_doc: final_doc, first_doc = doc, False else: final_doc = pd.merge(final_doc, doc, how='outer', left_index=True, right_index=True) final_doc = final_doc.fillna(0) return final_doc
-
미해결Vue3 완벽 마스터: 기초부터 실전까지 - "실전편"
composables 전역등록
composables 은 전역등록 어떻게 시키나요? ㅠ
-
해결됨[코드캠프] 강력한 CSS
layout-float실습 이미지
노션에 이미지 파일은 따로 없던데 혹시 인프런 수강생들한테 이미지 파일은 따로 제공 안되나요? 제공되면 노션에 올려주세요!
-
해결됨설계독학맛비's 실전 Verilog HDL Season 1 (Clock부터 Internal Memory까지)
chmod+x (원하는 파일 선택) 로 실행파일 지정하고 그 후 파일 실행한 뒤 오류가 뜹니다!
chmod+x로 실행 파일 지정 후 지정한 파일이 초록색으로 나와서 프로그램실행하니 오류가 뜹니다.현재 실행코드입니다아무리 찾아봐도 모르겠습니다! ㅠㅠ 어떻게 해야 실행 할수있을까요??
-
미해결홍정모의 따라하며 배우는 C++
6.8 포인터와 정적 배열 *array =100 값 변경
11:00 강의에서 printarray함수 안에서 dereference 통해서 값을 바꿨는데 함수 밖에서도 값이 바뀌는 것이 잘 이해가 안 가서요 찾아보니 질문에서 dereference 이용해서 값을 찾아 들어가서 바꿨다고 답변이 있던데 printarray의 array와 main의 array가 이름만 같고 다른 개체라면 왜 둘 다 같이 바뀌는 건가요?? 같은 주소를 참조하고 있기 때문인가요??
-
미해결Vue3 완벽 마스터: 기초부터 실전까지 - "실전편"
stores 다른 파일에서 state 가져오기
stores 폴더 하위의 여러 파일에서 다른 파일의 state값을 가져와서 사용하려고 하는데 어떻게 활용할수있을까요>?