inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

에러는 안나는데 그림이 안뜹니다

미해결

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

그랩마켓 자바스크립트 적용하기 -2 편에서 다 되는데 농구공 그림이 안떠요 <html> <head> <title>그랩마켓</title> <link href="index.css" type="text/css" rel="stylesheet" /> </head> <body> <div id="header"> <div id="header-area"> <img src="images/icons/logo.png" /> </div> </div> <div id="body"> <div id="banner"> <img src="images/banners/banner1.png"> </div> <h1>판매되는 상품들</h1> <div id="product-list"> </div> </div> <div id="footer"></div> </body> <script> var product = [{ name : '농구공', price : 10000, seller : '조던', imagUrl : '/images/products/basketball1.jpeg' },{ name : '축구공', price : 50000, seller : '메시', ImageUrl : '/images/prodocts/soccerball1.jpg' },{ name : '키보드', price : 10000, seller :'그랩', ImageUrl : '/images/prodocts/keyboard.jpg' }]; document.querySelector("#product-list").innerHTML = '<div class="product-card>'+ "<div>" + '<img class="product-img" src="images/products/basketball1.jpeg" />' + "</div>" + '<div class="product-contents">' + '<span class="product-name">농구공 1호</span>' + '<span class="product-price">50000원</span>' + '<div class="product-seller">' + '<img class="product-avatar" src="images/icons/avatar.png" />'+ "<span>그랩</span>" + "</div>" + "</div>" + "</div>" </script> </html>

  • HTML/CSS
  • javascript
  • react
  • node.js
  • react-native
  • 머신러닝
  • express
  • tensorflow
신승아 댓글 1 좋아요 0 조회수 226

오류

미해결

처음 만난 리액트(React)

뭐가 문제일까요 똑같이 작성한 거 같은데 자꾸 빨간줄이 생겨요ㅜㅜ

  • HTML/CSS
  • javascript
  • react
김채원 댓글 1 좋아요 1 조회수 702

코드샌드박스 관련 질문

미해결

풀스택을 위한 탄탄한 프런트엔드 부트캠프 (HTML, CSS, 바닐라 자바스크립트 + ES6) [풀스택 Part2]

코드샌드박스가 많이 바뀐것 같아요. create 샌드박스 눌러도 바닐라 자바스크립트가 뜨질 않습니다. 그리고 js 파일에서 console.log('test) 쓰고 실행은 어떻게하고 콘솔창은 어디에 있는건지 궁금해요.

  • HTML/CSS
  • javascript
  • es6
sung jin kim 댓글 1 좋아요 2 조회수 923

모달창에서 반응형 보여주기

미해결

SCSS(SASS)+GRID+FLEX 실전 포트폴리오 퍼블리싱

안녕하세요 선생님. 혹시 Modal 창으로 포트폴리오를 보여 줄 시, 창크기를 줄여서 반응형이 구현된다는 걸 보여 줄 수 있는 방법이 있을까요? (모달창의 창크기가 조절이 되게끔 하는 방법) 수업시간에 지나갔는지 기억이 잘 안나네요 ㅎㅎ; 혹시나 불가능하다면, 어쩔 수 없이 링크버튼이 연결된 버튼을 따로 주는 방법이 좋을까요? 항상 감사드립니다.

  • HTML/CSS
  • sass
  • flex
Jamie K 댓글 1 좋아요 1 조회수 606

포트폴리오 CSS Grid 반응형 레이아웃에서

미해결

HTML+CSS+JS 포트폴리오 실전 퍼블리싱(시즌2)

여기서 align-items 랑 align-content가 개념이 잘 안잡혀요..ㅠ 인터넷에 검색해보니깐 한줄 두줄의 차이라고 하는데... 모바일사이즈일때는 한줄이 아니니깐 align-content라고 쓴걸까요? 아니면 justify-items: center; 코드가 있어서 일까요?

  • HTML/CSS
  • javascript
  • jquery
원스텝 댓글 1 좋아요 1 조회수 313

RS232c Serial 통신 관련 질문이 있습니다.

미해결

안녕하세요 연구실에서 자체적으로 실험기기와 컴퓨터랑 통신을 진행하는 중인데, 하나가 해결이 안 되어서 너무 답답해서 고수님들께 자문을 구하려고 합니다. Rs232 rtu 모드를 지원한다고 한 OS-20 overhead stirrer과 통신을 진행 중 입니다. 이 친구의 통신 규격과 방식은 아래 그림 3개와 같습니다. 이중 stirrer control 부분을 제가 참조해서 저 command를 hex 방식으로 입력하였는데 도무지 안되는 겁니다. 그런데 웃긴게 이 회사에서 지원하는 공식 통신프로그램을 사용하면 작동이 잘 되더군요. Instruction overview에서 나온 규칙은 다음과 같습니다. Command 구조는 Prefix Instruction_code Data_frame Checksum로 되어 있고 입력의 prefix는 0xfe로 시작하며 responce는 0xfd로 시작합니다. 모든 바이트 사이에는 50ms delay가 존재해야하며 Dataframe은 큰 수 자리부터 전송합니다. ex) 1000rpm을 data frame에 입력하려고 할 시 Hex값이 03E8이니까 앞에 두 자리를 0x03에 해당하고 뒤에 두 자리를 0xE8로 해당시킵니다. Null은 0x00입니다. Checksum 방식은 0xfe,0xfd인 prefix를 제외하고 나머지를 전부 더한 값으로 0xnn 이런식으로 표현됩니다. 신기하게도 16진수의 2자리를 넘어가도 뒤에 2 자리만 붙이면 된다고 하더군요. ex) 0xfe 0xb1 0x03 0xe8 0x00 checksum인데 0xfe를 제외하고 다 더하면 019c이지만 0x9c만 입력하면 되는 형식입니다. 그래서 이 규칙대로 코드를 짜서 통신을 해 보았는데, 아무리 해도 안되어서 너무 답답합니다. 심지어 제가 잘못했는지 확인하려고 시리얼 통신 sniffer을 사용하여서 공식 프로그램에서는 어떻게 통신이 되나 뜯어보았습니다. 결과는 아래 사진과 같습니다. 제가 python으로 작성한 코드는 아래와 같습니다. import serial import time ser = serial.Serial( port='COM7', # Update with your actual port baudrate=9600, parity=serial.PARITY_NONE, # No parity stopbits=serial.STOPBITS_ONE, # 1 stop bit bytesize=serial.EIGHTBITS # 8 data bits ) def send_hex_string(hex_string): # Convert the hex string to bytes byte_data = bytes.fromhex(hex_string) # Send the bytes over the serial port ser.write(byte_data) def send_hex_string_with_delay(hex_string, delay_ms=50): for i in range(0, len(hex_string), 2): # Extract each pair of characters and convert to bytes hex_pair = hex_string[i:i + 2] byte_data = bytes.fromhex(hex_pair) # Send the bytes over the serial port ser.write(byte_data) # Wait for the specified delay time.sleep(delay_ms / 1000.0) command = 'feb103e8009c' send_hex_string_with_delay(command) ser.close() 또한 파이썬에서의 결과를 시리얼 전송으로 보면 다음과 같습니다. 입력은 제대로 되는데 기기에는 반응이 제대로 나오지 않네요... 제가 잘못하고 빠뜨린 점이 있을까요? 읽어주셔서 정말 감사드립니다.

  • rs232
  • serial
  • 커뮤니케이션
  • python
전성훈 댓글 1 좋아요 1 조회수 1023

Containment 질문 드립니다.

미해결

처음 만난 리액트(React)

import { useState, useCallback } from "react"; import ThemeContext from "./ThemeContext"; import MainContent from "./MainContent"; function DarkOrLight(props) { const [theme, setTheme] = useState("light"); const toggleTheme = useCallback(() => { if (theme === "light") { setTheme("dark"); } else if (theme === "dark") { setTheme("light"); } }, [theme]); return ( <ThemeContext.Provider value={{ theme, toggleTheme }}> <MainContent /> </ThemeContext.Provider> ) } export default DarkOrLight; import React from "react"; const ThemeContext = React.createContext(); ThemeContext.displayName = "ThemeContext"; export default ThemeContext; MainContent가 ThemeContext의 하위 컴포넌트입니다. 그러면 <ThemeContext.Provider> 안에 있는 <MainContent /> 컴포넌트는 ThemeContext.Provider 안의 props.children 으로 간주될텐데 ThemeContext 에 {props.children} 가 없어도 <MainContent /> 가 표시되는 이유가 궁금합니다. .privider 메서드(메서드로 지칭하는게 맞나요...?ㅎ)를 사용하면 자동으로 하위 컴포넌트를 표시하는 기능(암묵적으로 {props.children} 를 사용한다던지...)이 있는 건가요?

  • HTML/CSS
  • javascript
  • react
Dohun Choi 댓글 1 좋아요 1 조회수 306

이미지 부분에 cctv 영상을 넣고 싶은데요.

미해결

비전공자를 위한 풀스택 맛집지도 만들기 프로젝트!: Front, Back-end 그리고 배포까지

이미지 부분에 cctv 영상을 구현하고 싶은데, 혹시 .... api를 연동해서 어떻게 연결하면 되는지 알 수 있을까요?

  • HTML/CSS
  • javascript
  • aws
  • git
  • mysql
  • rest-api
  • github
hihi 댓글 2 좋아요 0 조회수 610

제이쿼리에서 focus와 click의 차이

미해결

HTML+CSS+JS 포트폴리오 실전 퍼블리싱(시즌1)

jQuery에서 '클릭한다'는 동작의 실행 코드로 맨 위에서는 focus를 사용했고, 아래에서는 click을 사용하신 것은 input에 사용할때와 아닐 때의 차이인 것인가요?

  • HTML/CSS
  • jquery
댓글 1 좋아요 1 조회수 343

안녕하세요 강사님 질문 있습니다.

미해결

따라하며 배우는 HTML, CSS

강사님의 영상 약 11분 10초 대를 보면 go live를 한 후 h1태그를 추가 한 후에 새로고침 하면 웹 창에서 추가된 h1이 보이는데 제가 하면 아래와 같은 오류가 뜨면서 추가되지 않습니다. 어떻게 하면 될까요? Live Reload is not possible without a head or body tag.

  • HTML/CSS
ismania1 댓글 1 좋아요 0 조회수 361

강의 자료 부탁드립니다!

미해결

프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)

안녕하세요. 강의 자료 요청합니다. elel3418@daum.net 감사합니다!

  • python
댓글 1 좋아요 0 조회수 216

노션 링크가 어디있나요 ?

미해결

비전공자를 위한 풀스택 맛집지도 만들기 프로젝트!: Front, Back-end 그리고 배포까지

노션 링크가 어디있나요 ? 찾기가 어렵네요..

  • HTML/CSS
  • javascript
  • aws
  • git
  • mysql
  • rest-api
  • github
hihi 댓글 1 좋아요 1 조회수 334

flex-basis auto, 0 차이

해결됨

CSS Flex와 Grid 제대로 익히기

flex-basis에서 auto로 설정하는 것과 0으로 설정하는 것의 차이가 무엇인지 궁금합니다. 따로 코드를 짜서 실행하면 autof로 설정했을 때와 0으로 설정했을 때 결과물이 똑같아서 차이가 궁금합니다.

  • HTML/CSS
  • flex
강두희 댓글 2 좋아요 0 조회수 758

expo 시작 오류

해결됨

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

expo를 global로 설치하고 init까지 한 후 npm start를 했을 때 일단 아래처럼 에러가 발생합니다. Unable to find expo in this project - have you run yarn / npm install yet? -> 이건 npm install을 해서 해결 했습니다. 그런데 그 후에도 또 아래와 같은 에러가 발생합니다. PS D:\Programming\study\Inflearn\FullStack\project\grab-market-mobile> npm start > grab-market-mobile@1.0.0 start > expo start Starting project at D:\Programming\study\Inflearn\FullStack\project\grab-market-mobile Starting Metro Bundler FetchError: request to https://api.expo.dev/v2/sdks/49.0.0/native-modules failed, reason: self signed certificate in certificate chain FetchError: request to https://api.expo.dev/v2/sdks/49.0.0/native-modules failed, reason: self signed certificate in certificate chain at ClientRequest.<anonymous> (D:\Programming\study\Inflearn\FullStack\project\grab-market-mobile\node_modules\node-fetch\lib\index.js:1501:11) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:494:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) 이건 어떻게 해결해야 하나요?

  • HTML/CSS
  • javascript
  • react
  • node.js
  • react-native
  • 머신러닝
  • express
  • tensorflow
이원석 댓글 1 좋아요 1 조회수 657

제이쿼리 검색창 모달 with 플렉스(Flexbox) 내용 중 궁금한 점

미해결

HTML+CSS+JS 포트폴리오 실전 퍼블리싱(시즌1)

입력란과 버튼의 크기를 배분하기 위해 flex를 사용할 때, 부모 요소는 반드시 display: flex를 사용해야 하는 것인가요? flex와 display:flex가 상관관계가 있는 것인지 궁금합니다.

  • HTML/CSS
  • jquery
댓글 1 좋아요 1 조회수 208

spoqa han sans neo

미해결

SCSS(SASS)+FLEX 실전 반응형 웹 프로젝트 with Figma

spoqa han sans neo글씨체 다운받았는데 피그마 할 때 text밑에 fonts에서 no matching font로 나오네요. 아예 검색자체가 안되는데 무슨 문제인가요??

  • HTML/CSS
  • javascript
  • sass
  • jquery
  • scss
imhj11777 댓글 3 좋아요 1 조회수 1080

width must be speified for horizontal carousels 오류

해결됨

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

안녕하세요. react-native-reanimated-carousel 사용 시, carousel의 prop으로 width를 정의했는데도, 제목 처럼 "width must be speified for horizontal carousels" 오류가 발생합니다. 어떻게 해결할 수 있을까요?? 강의 클론코딩 했는데, 위 오류에 앞서 "PanGestureHandler must be used as a descendant of GestureHandlerRootView" 오류가 발생했었는데, 인터넷 검색 결과로 <SafeAreaView> 바깥에 <GestureHandlerRootView> 선언하여 해결했는데, 이 영향도 일까요?? 코드 첨부합니다. import { StatusBar } from "expo-status-bar"; import { API_URL } from "./config/constant"; import avatarImg from "./assets/icons/avatar.png"; import React from "react"; import { StyleSheet, Text, View, Image, ScrollView, Dimensions, TouchableOpacity, Alert, SafeAreaView, } from "react-native"; import Carousel from "react-native-reanimated-carousel"; import { GestureHandlerRootView } from "react-native-gesture-handler"; import axios from "axios"; import dayjs from "dayjs"; import relativeTime from "dayjs/plugin/relativeTime"; import "dayjs/locale/ko"; dayjs.extend(relativeTime); dayjs.locale("ko"); export default function App() { const [products, setProducts] = React.useState([]); const [banners, setBanners] = React.useState([]); React.useEffect(() => { axios .get(`${API_URL}/products`) .then(function (result) { const products = result.data.products; setProducts(products); }) .catch(function (error) {}); axios .get(`${API_URL}/banners`) .then(function (result) { const banners = result.data.banners; setBanners(banners); }) .catch(function (error) {}); }, []); return ( <GestureHandlerRootView> <SafeAreaView style={styles.safeAreaView}> <View style={styles.container}> <ScrollView> <Carousel> data={banners} width={Dimensions.get("window").width} height={200} autoPlay={true} sliderWidth={Dimensions.get("window").width} itemWidth={Dimensions.get("window").width} itemHeight={200} renderItem= {(obj) => { retrun( <TouchableOpacity onPress={() => { Alert.alert("배너 클릭"); }} > <Image style={styles.bannerImage} source={{ uri: `${API_URL}/${obj.item.img_url}` }} /> </TouchableOpacity> ); }} </Carousel> <Text style={styles.headline}>판매되는 상품들</Text> <View style={styles.productList}> {products.map((product, index) => { return ( <View key={index} style={styles.productCard}> {product.status === "02" && ( <View style={styles.productBlur} /> )} <View> <Image style={styles.productImg} source={{ uri: `${API_URL}/${product.img_url}`, }} resizeMode={"contain"} /> </View> <View style={styles.productContents}> <Text style={styles.productName}>{product.name}</Text> <Text style={styles.productPrice}>{product.price}원</Text> <View style={styles.productFooter}> <View style={styles.productSeller}> <Image style={styles.productAvatar} source={avatarImg} /> <Text style={styles.productSellerName}> {product.seller} </Text> </View> <Text style={styles.productDate}> {dayjs(product.created_at).fromNow()} </Text> </View> </View> </View> ); })} </View> </ScrollView> </View> </SafeAreaView> </GestureHandlerRootView> ); } const styles = StyleSheet.create({ headline: { fontSize: 24, fontWeight: "800", marginTop: 10, marginBottom: 10, }, container: { flex: 1, backgroundColor: "#fff", paddingTop: 32, margin: 10, }, productCard: { width: "100%", borderColor: "rgb(230,230,230)", borderWidth: 1, borderRadius: 16, backgroundColor: "white", marginBottom: 10, }, productBlur: { position: "absolute", top: 0, bottom: 0, right: 0, left: 0, backgroundColor: "#ffffffaa", zIndex: 999, }, productImg: { width: "100%", height: 210, }, productContents: { padding: 8, }, productSeller: { flexDirection: "row", }, productAvatar: { width: 24, height: 24, }, productFooter: { flexDirection: "row", justifyContent: "space-between", alignItems: "center", marginTop: 12, }, productName: { fontSize: 14, }, productPrice: { fontSize: 16, fontWeight: "600", marginTop: 8, }, productSellerName: { fontSize: 14, }, productDate: { fontSize: 14, }, productList: { alignItems: "center", }, bannerImage: { width: "100%", height: 200, }, safeAreaView: { flex: 1, backgroundColor: "#fff", }, });

  • HTML/CSS
  • javascript
  • react
  • node.js
  • react-native
  • 머신러닝
  • express
  • tensorflow
inchang0326 댓글 1 좋아요 1 조회수 381

Contex와 redux같은 전역 상태관리 라이브러리

해결됨

처음 만난 리액트(React)

Contex가 하위 컴포넌트들에서 해당 변수에 바로 접근이 가능하게 만들어주는 것은 이해가 되었습니다. 하지만 한 가지 의문점이 있습니다. 저의 짧은 지식으로는 redux같은 전역 상태 관리 라이브러리를 이용하면 모든 컴포넌트가 접근할 수 있는 store라는 공간이 생기는 것으로 알고 있습니다. 그래서 redux를 사용한다면 contex는 굳이 사용할 필요가 없는 것으로 생각됩니다. redux같은 전역 상태 관리 라이브러리를 이용할 때에도 context를 사용하는 경우가 있는지 궁금합니다. 그리고 이전 질문에서 엄밀히 말하면 context가 상태 관리는 아니라고 하셨는데 상태 관리와 context의 차이점을 잘 모르겠습니다.. 간략하게나마 차이점을 설명들을 수 있을까요?

  • HTML/CSS
  • javascript
  • react
Dohun Choi 댓글 1 좋아요 1 조회수 259

print 출력

미해결

프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)

선생님처럼 깔끔하게 괄호 안에 있는 부분만 뜨는 게 아니라 저 파란 줄로 길게 뜨는 건 왜 그런 건가요? 어떻게 하면 없앨 수 있나요?

  • python
hjy648012 댓글 2 좋아요 0 조회수 324

인기 태그

인프런 TOP Writers

주간 인기글