묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결남박사의 파이썬 기초부터 실전 100% 활용
환율정보 어디가 문제 인지 ㅠㅠ 원인을 찾기가 어려워요 ㅠㅠ 도와주세요
강사님 ㅠㅠ 어디가 원인일까요 ? boy.py 에는 elif command == "/money" or command =="/환율": w = " ".join(args) output = module.money_translate(w) bot.sendMessage(chat_id, output) 이렇게 넣었고요,,, module.py 에는 아래와 같이 넣었는데 ㅠㅠ 계속 money = format(round(float(money) * float(keywords[0]), 3), ",") 오류가 나타나요,,,강사님처럼 홍콩달라를 했는데도 나타나서 ㅠㅠ 그냥 더 간단하게 했는데도 그러네요 ㅠㅠ File "/home/Ammasters/telegram_file/bot.py", line 40, in handler output = module.money_translate(w) File "/home/Ammasters/telegram_file/./module.py", line 97, in money_translate money = format(round(float(money) * float(keywords[0]), 3), ",")ValueError: could not convert string to float: '/money 1' MONEY_NAME = { "달러": "미국 USD", "유로": "유럽연합 EUR", "엔": "일본 JPY(100엔)", "위안": "중국 CNY", "파운드": "영국 GBP", } def get_exchange_info(): EXCHANGE_LIST = {} url = "https://finance.naver.com/marketindex//exchangeList.nhn" r = requests.get(url) bs = BeautifulSoup(r.text, "lxml") trs = bs.select("table.tbl_exchange > tbody > tr") for tr in trs: tds = tr.select("td") name = tds[0].text.strip() value = tds[1].text.strip().replace(",","") EXCHANGE_LIST[name] = value return EXCHANGE_LIST def money_translate(keyword): EXCHANGE_LIST = get_exchange_info() keywords = [] for m in MONEY_NAME.keys(): if m in keyword: keywords.append(keyword[0:keyword.find(m)].strip()) keywords.append(m) break if keywords[1] in MONEY_NAME: country = MONEY_NAME[keywords[1]] if country in EXCHANGE_LIST: money = float(EXCHANGE_LIST[country]) if country == "일본 JPY (100엔)": money /= 100 money = format(round(float(money) * float(keywords[0]), 3), ",") output ="{} 원".format(money) return output if __name__ == "__main__": print(money_translate("150달러"))
-
미해결Vue.js 중급 강좌 - 웹앱 제작으로 배워보는 Vue.js, ES6, Vuex
favicon 경로 질문
안녕하세요! 강의 잘 듣고 있습니다 :) 강의를 진행하며 궁금한 부분이 생겨 질문 남깁니다. 강의를 진행하던 중 favicon 경로 설정을 잘했다고 생각하였는데, favicon 경로를 찾지 못하는 현상이 나타났습니다. 저의 프로젝트 구조와 코드는 아래와 같았습니다. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <!-- 페이지 반응형 설정 --> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <!-- 파비콘 설정 --> <link rel="shortcut icon" href="../src/assets/favicon.ico" type="image/x-icon"> <link rel="icon" href="../src/assets/favicon.ico" type="image/x-icon"> <!-- awosome icon CDN --> <script src="https://kit.fontawesome.com/8bfe0c4184.js" crossorigin="anonymous"></script> <!-- 페이지 글꼴 설정 --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet"> <title> <%= htmlWebpackPlugin.options.title %> </title> </head> <body> <div id="app"></div> <!-- built files will be auto injected --> </body> </html> 하지만 코드 작성후 cmd + 클릭하여 해당 파일이 잘 연결된 것을 확인하였으나, 아래와 같이 이미지 경로를 찾지 못하였습니다. 이후 다음과 같이 파비콘 파일의 위치를 변경한 후 경로 코드를 재작성한 결과 정상적으로 수행되는 것을 확인할 수 있었습니다. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <!-- 페이지 반응형 설정 --> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <!-- 파비콘 설정 --> <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon"> <link rel="icon" href="./favicon.ico" type="image/x-icon"> <!-- awosome icon CDN --> <script src="https://kit.fontawesome.com/8bfe0c4184.js" crossorigin="anonymous"></script> <!-- 페이지 글꼴 설정 --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet"> <title> <%= htmlWebpackPlugin.options.title %> </title> </head> <body> <div id="app"></div> <!-- built files will be auto injected --> </body> </html> 혹시 경로를 정상적으로 지정하였음에도, 이러한 현상이 나타나는지 알려주실 수 있으실까요?
-
해결됨스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
HandlerMapping 우선순위 선정 기준
=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용] HandlerMapping 구현체들이 조회되는 순서 (우선순위) 관련해서 질문 드립니다. [요약] 궁금했던점 HandlerMapping 구현 객체들의 조회 우선순위 결정 요인 추측 각 HandlerMapping 구현 객체의 order 필드 값에 따라서 결정될 것이다. (order 값 낮을 수록 우선순위 높음) 확인 방법 스프링 부트 어플리케이션을 디버거로 실행하고, HandlerMapping 구현 객체들의 order 값을 확인 예상한 결과 RequestMappingHandlerMapping의 order값이 가장 작고, BeanNameUrlHandlerMapping의 order 값이 그 다음으로 작을 것 확인 결과 BeanNameUrlHandlerMapping의 order 값은 2로 다른 핸들러 매핑의 order 값보다 작지 않음 (WelcomePageHandlerMapping order 값 = 2) 질문 사항 BeanNameUrlHandlerMapping의 order 값이 2로 다른 HandlerMapping 보다 작지 않은데, 왜 우선적으로 조회되나요? 혹시 order 값으로 우선순위가 결정되는 것이 아니라면 무엇으로 핸들러 매핑 객체들이 조회되는 순서가 결정되나요? [스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술] '핸들러 매핑과 핸들러 어댑터' 강의 6분 경에 HandlerMapping이 우선순위대로 처리 되는것을 설명하시면서, RequestMappingHandlerMapping이 우선순위가 가장 높기 때문에 가장 먼저 조회 되고, 그 다음으로 우선순위가 높은 BeanNameUrlHandlerMapping가 조회된다고 알려주셨습니다. 여기서 각 HandlerMapping의 우선순위가 어떻게 결정되는지 궁금해서 알아봤고, HandlerMapping 인터페이스에서 Ordered 인터페이스를 implement 해서 order 필드를 가지며 order 값으로 우선순위가 결정되는 것으로 파악했습니다. 그렇기 때문에 RequestMappingHandlerMapping의 order값이 가장 작고, BeanNameUrlHandlerMapping의 order 값이 그 다음으로 작을 것으로 예상했습니다. 위 내용을 확인하기 위해 스프링부트 어플리케이션 실행 중 RequestMappingHandlerMapping 객체와 BeanNameUrlHandlerMapping를 비롯한 HandlerMapping 구현 객체들의 order 필드 값을 확인 했습니다. 예상과 다르게 BeanNameUrlHandlerMapping의 order 값은 2로 다른 HandlerMapping 구현 객체의 order 값보다 작지 않고 같았습니다. RequestMappingHandlerMapping.order = 0 BeanNameUrlHandlerMapping.order = 2 WelcomePageHandlerMapping.order = 2 SimpleUrlHandlerMapping.order = 2147483646 ('핸들러 매핑과 핸들러 어댑터' 강의 까지 진행한 상태의 강의 소스 코드를 디버깅 실행했습니다.) 위 내용이 이상해서 order 값이 2로 설정 된 것이 맞는지 확인 하기 위해 BeanNameUrlHandlerMapping 의 order 값을 초기화하는 클래스를 찾아 봤습니다. WebMvcConfigurationSupport 클래스에서 BeanNameUrlHandlerMapping의 order 값을 설정하고 있었는데, 아래와 같이 BeanNameUrlHandlerMapping의 order 값을 2로 설정하고 있었습니다. // WebMvcConfigurationSupport.javapublic BeanNameUrlHandlerMapping beanNameHandlerMapping() { BeanNameUrlHandlerMapping mapping = new BeanNameUrlHandlerMapping(); mapping.setOrder(2); ... return mapping;} public RequestMappingHandlerMapping requestMappingHandlerMapping() {RequestMappingHandlerMapping mapping = createRequestMappingHandlerMapping(); mapping.setOrder(0); ... return mapping;} [질문] BeanNameUrlHandlerMapping의 order 값이 2로 다른 HandlerMapping 보다 낮지 않은데, 왜 우선적으로 조회되나요? 혹시 order 값으로 우선순위가 정해지는게 아니라면 어떤 방법으로 우선순위가 정해지나요? 좋은 강의 항상 감사드립니다.
-
미해결하울의 안드로이드 인스타그램 클론 만들기
Facebook공식 문서에서 제공해주는 최신 SDK 오류
안녕하세요 강의 잘 듣고있습니다. FaceBook 로그인 기능을 구현하던 도중 implementation 'com.facebook.android:facebook-android-sdk:[4,5)' 를 적용하고 컴파일하게되면 Go to the documentation to learn how to Fix dependency resolution errors. 에러가 발생합니다. 원인을 알 수 있을까요?
-
미해결자바스크립트 알고리즘 문제풀이 입문(코딩테스트 대비)
로직 이해가 안되는 부분이 있어서 질문드립니다.
위에 콘솔에서 ch배열의 값들과 ch[i]의 값이 다르게 나오는데 어떤 이유때문에 이런 현상이 생기는 건가요??
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
proxy
저는 지금 서버는 spirngboot를 통해서, proxy설정을 하고있는데요, 터미널에 정상적으로 프록시 localhost:8080 도 정상적으로 뜨는데, 404에러가 뜨네요 ㅜㅜ setupProxy.js도 최신 문법을 사용하는데... 여기에 지금 5시간째입니다 살려주세요
-
미해결Slack 클론 코딩[실시간 채팅 with React]
useInput not fount 에러
자꾸 module not fount 'useInput' 에러가 발생합니다. useInput은 export와 import가 모두 잘 이루어졌고 IDE 상에서는 어떠한 오류도 발생하지 않고 useInput을 import하여 사용할 수 있었습니다만 npm run dev를 실행하면 자꾸 에러가 발생합니다..
-
미해결블록체인3.0 NFT GAME
게임용 블록체인 플렛폼
게임용 으로 자주 쓰이는 플랫폼을 클레이튼을 비롯해 언급주셨는데요 북미권에서 자주 쓰이는 게임전용 플랫폼들은 무엇이 있는지 궁금합니다. 감사합니다.
-
미해결배달앱 클론코딩 [with React Native]
TextInput의 onChangeText
안녕하세요 강의 열심히 듣고 있는 코린이입니다. 궁금한것이 있어서 질문을 남깁니다. 이메일부분에서 TextInput의 onChangeText를 강사님은 따로 함수(onChangeEmail)를 만들어서 넣어줬는데 onChangeText에 바로 setEmail를 넣어주는 것이랑 동작하는 일은 비슷해보이는데 성능적으로 어떠한 차이점이 있을까요? // SignIn.tsx ... // 강사님 코드 const [email, setEmail] = useState(''); const onChangeEmail = useCallback(text => { setEmail(text); }, []); <TextInput placeholder="이메일을 입력해주세요." onChangeText={onChangeEmail} /> // 궁금한 코드 const [email, setEmail] = useState(''); <TextInput placeholder="이메일을 입력해주세요." onChangeText={setEmail} /> ...
-
미해결로블록스에서 파이썬으로 메타버스 구현하기
로블록스의 asset
로블록스에서 쓰는 캐릭터는 asset store에서 사는거 말고 밖에서 가져 올 수 있는 거겠죠? (예를 들면 블랜더로 직접 만든것들)
-
미해결로블록스에서 파이썬으로 메타버스 구현하기
로블록스 개요
로블록스를 일종의 게임엔진으로 이해하고 있습니다. 1. 그러면 게임데이터가 들어가는 부분도 customize할 수 있을까요 즉 게임서버에 들어가는 데이터로 analytics를 하고 데이터베이스도 access하고 할 수 있는 것이겠죠?(이게 roblox 클라우드인가요?) 2. 로블록스와 유니티의 관계는 무엇일까요? 유니티는 c#으로 만들었는데 로블록스 엔진은 어떤 언어로 제작되어있을까요? 3. manticore 사의 core라는 제품이 roblox와 비슷하다고 들었습니다. 혹시 차이가 있을까요? 언리얼 엔진 기반이라고 들어 친숙해서 로블록스 대신 고려하고 있습니다.
-
미해결로블록스에서 파이썬으로 메타버스 구현하기
로블록스 게임서버
이 강의에서는 게임서버 이야기는 언급하지는 않으셨는데요 로블록스로 약식의 mmorpg를 만드려는 시도도 있나요 그럴려면 게임서버도 따로 만들어서 운용해야하나요 아니면 서비스로 제공하는 것이 있을까요
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
통신 관련 에러(404, proxy)
기존에 프로젝트를 통해 ajax와 axios를 써봤음에도 cors에러가 잡히지 않아 당황했습니다. 게시판에 올려주신 분들 정보를 참고는 하되, 무작정 다 복붙하시면 안됩니다. 저 역시 또 다른 에러가 생겨 최대한 공식문서를 살펴보고 하니 해결이 됐습니다. 우선 const { createProxyMiddleware } = require('http-proxy-middleware');module.exports = function(app) { app.use( '/api', createProxyMiddleware({ target: 'http://localhost:5000', changeOrigin: true, }) );}; 이 부분에서 영상과 다른 점이 있는데, 이것은 강의 url에 있는 docs에 있는 예제를 따라하는 것이 맞습니다. 어디가 문제인지 콘솔로 확인하는게 어렵다면, 우선 백엔드쪽 서버에 보낸 response가 html로 들어오는지 확인(localhost:5000/api/hello 가 되겠죠)-> 만약 잘 들어온다면 프론트 단(client)에서만 수정을 해주시면 됩니다. 또한package.json에 있는 경로를 폴더에 맞게 잘 설정해주셔야 됩니다. 다른 강의들 보면서 모르는 부분을 찾아해맨 적이 너무 많은데 이 강의는 조금만 시간을 들이면 다 해결이 될만큼 설명을 잘해주셔서 감사합니다.
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
flush 질문이 있습니다.
안녕하세요 영한님! 강의 잘보고있습니다. ㅎㅎ flush 부분 궁금한점이 있어서요. JPQL쿼리 실행이 될때 flush가 자동으로 호출이 안되는 상황이 발생해서인데요. 위와 같은 경우 changeTeam이 연관관계 편의 메소드인데 저안에서 setter를 호출하여 update문이 나가야하는 상황입니다. 제가 예상했던것은 41번라인에서 생긴 update 쿼리가 46번 라인의 JPQL이 실행되기전에 실행이되어야 할것 같은데 로그를 보면 50번 라인이 끝난후에 쿼리가 나가더라구요. 제가 이해한건 46번 라인의 JPQL이 실행될때 flush가 되어 update 쿼리가 나가고, 또 그 쿼리가 반영이 되어 49번 라인에서 member1이 조회가 안되어야 할거 같은데 계속 조회가 되어서요... 어떤 문제일까요?? (fetch join을 사용하여 46번의 쿼리를 수정해봤는데 이때는 정상적으로 flush 확인했습니다.) 혹시 모든 JPQL이 아니라 update문이 나가야하는 엔티티를 조회하는 JPQL이 실행될때만 flush를 호출하는걸까요?? 그리고 추가적으로 질문이 하나 더 있는데 setter가 호출이될때도 flush가 이뤄진다고 들었었는데 혹시 맞나요?? 항상 좋은강의 감사합니다!! ㅎㅎ
-
미해결
How to examine a good website design company in India
The most gratifying 10 years of the 90s are believed to have established the most significant perspective of the modern world. The technological and software development was unparallel which founded the basics of the science of technology. Amongst all human inventions and discoveries, the internet proved to be a sublime phenomenon that changed the entire notion of modernism. The enthralling virtual experience generated many possibilities which helped people identify themselves and connect without social and racial boundaries. Another subjective field that seemed to pamper with the current technological charm of the 90s was industrial. As revolutionary virtual phenomenon was prospering with millions of people joining in the trend, the business entrepreneurs identified with the splendid opportunities it could bring. Apparently, there was a great network of people online which became a relatively vast audience for business entrepreneurs. More importantly, there were no geographical barriers that could have possibly hampered the business ventures. The possible business ventures required a professional online business developer for various business viewpoints. The formation of SEO or Search Engine Optimization Companies resolved the problems thus evolved. An SEO or Search Engine Optimization company is comprised of various departments which, in many cases, have formed their organization outsourcing the service to a strong SEO Company. A website design company is one such phenomenon that outsources its services to various SEO companies across the world. Website design is considered to be the most integral feature of any online business venture. There are other features such as web content and development that are relatively important too. However, a website design is the most important as it establishes the first bond with the visitor who will possibly turn out to be the customer for the business. A strong and relative website design can impress the visitor and make him curious to seek and find out about the services. According to reports, out of every 10 visitors, 4 are more likely to become the prospective customers of a website. With the following statistics, one can imagine the turn-over from the online business venture. Hence, it is really important to hire a strong website design company with high determination, expertise, and success history. There are various advantages of hiring a website designing company. Let us examine the benefits of hiring a website designing company in India. A website design company can provide unique work and designs that are different from others. This can also be a great strategy to get notice and impress an audience and potential customers. As the users of the internet come from different walks of life. Their point of view varies and their tastes as well. Many companies today prefer having a website design company on their web page. This can ensure that they get the attention of the users and also impress them. A web design company provides the best construction of web content and incorporates with the design the identity of the company. Through the custom website design, a company can strategically place features and services that they believe will attract customers. A custom website design company is like a sort of property of the online company. The corporate identity is into the website so it ensures that the web design of the online business belongs only to your company. By hiring a website design company in Noida, you have a variety of options to choose great designs and styles at affordable prices.
-
미해결코딩으로 학습하는 리팩토링
기선님이 사용하고 있는 키보드 궁금합니다.
안녕하세요 . 기선님의 리팩토링/디자인패턴 수강하게 되었습니다. 코드를 기선님의 시각으로 풀어 보는 것이 무척 마음에 듭니다. 아직 자바입문자라서 실제 스프링을 하게 될지는 모르겠지만 스프링을 제대로 배울수 있는 동기가 생긴다면 기선님 강의를 수강하고 싶습니다. 수준 높은 강의를 배포해주신 것에 대해 항상 감사드립니다. 그리고 기선님께서 사용하고 계신 키보드가 무엇인지 무척 궁금합니다.
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
에러가 떴는데 이유를 모르겠습니다
트와이스 두 번째 강의 2:23쯤 듣고 있는데요 상태바를 색을 바꾸고 싶어서 바꿔보다가 글씨가 배경색에 따라 반대로 어두웠다가 밝아졌다가 하게 하고 싶어서 구글링해서 수정을 좀 했는데요 수정 부분은 맨 아래에 적겠습니다 그 뒤에 에러가 떴는데 이게 바로 된 게 아니고 다음에 켰을 때 생겨서 뭐가 문제인지 모르겠어요.. 에러는 colorPrimary, colorPrimaryVariant, colorOnPrimary, colorSecondary, colorSecondaryVariant, colorOnSecondary가 빨간 글씨가 됐고 <item name="android:windowNoTitle">True</item> 여기서 True 글씨가 빨간색 됐고 Theme.MaterialComponents.DayNight.NoActionBar 이게 빨간 글씨가 됐어요 수정한 부분은 <style name="Theme.Eseocute" parent="Theme.MaterialComponents.DayNight.NoActionBar">이렇게 NoActionBar 로 수정했고 <item name="android:statusBarColor" tools:targetApi="l">@color/white</item>@color/white로 수정했고 <item name="android:windowLightStatusBar" tools:targetApi="m">true</item> 이런 코드를 넣었습니다
-
미해결
npm run serve 오류문제
깃허브로 프로젝트 파일을 받아서 npm run serve를 사용해서 파일을 열어보려고 하는데요 node_modules 설치를 위해서 npm install을 한 후 node_modules 설치 후 npm run serve를 하면 Conflict: Multiple assets emit different content to the same filename index.html ERROR in Conflict: Multiple assets emit different content to the same filename index.html'' 이런 에러가 떠버립니다.. 구글링을 해봐도 다 무슨 소리인지 모르겠어서 질문드립니다..
-
미해결코딩으로 학습하는 리팩토링
소스코드 github에 올려주실 수 있나요?
안녕하세요! 요즘 기선님 강의 잘 듣고 있답니다! 다름이 아니라 강의에 사용되는 소스 코드 기선님 github에 올려주실 수 있나요?? 추후 소스 코드 변경사항도 쉽게 파악할 수 있고...fork 떠서 기선님 강의를 제 깃헙 팔로워들에게 자랑하고 싶기도 해서요!! 그리고 솔루션 코드도 올려주실 수 있는지 궁금합니다! 감사합니다ㅎㅎ
-
해결됨스프링 핵심 원리 - 기본편
싱글톤 패턴의 DIP 만족
안녕하세요. 항상 훌륭한 강의로 지식 공유 해주셔서 감사합니다. 밑의 질문을 모두 읽어 보아도 여전히 헷갈리는 점이 남아 있어 확실하게 짚고 넘어가고 싶은 마음에 질문드립니다. 싱글톤 패턴의 DIP 위반이라고 설명하신 이유가 강의 중 싱글톤을 적용하고, 테스트한 부분이 DIP를 위반한 것이기 때문이지, 싱글톤 패턴이 DIP를 위반할 수 밖에 없는 것은 아니다. 라는 부분은 이해했습니다! 1) 그렇다면 아래와 같이 싱글톤 패턴을 적용하여 테스트가 통과한다면, 이 MemoryMemberRepository는 싱글톤과 DIP를 모두 만족한다고 봐도 되는 예제일까요? 감사합니다!