묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결실습으로 끝장내는 웹 크롤링과 웹 페이지 자동화 & 실전 활용
똑같이 따라했는데 쿠팡 크롤링이 되질 않습니다 무엇이 문제일까요ㅜㅜ?
강의 내용 외 개인적인 실습 사이트의 질문은 답변이 제공되지 않습니다.문제가 생긴 코드, 에러import requests from bs4 import BeautifulSoup import time bass_url = "https://www.coupang.com/np/search?component=&q=" keyword = input("검색할 상품을 입력하세요 : ") search_url = bass_url + keyword headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" } cookie = {"a": "b"} time.sleep(1) req = requests.get(search_url, timeout=5, headers=headers, cookies=cookie) #print(req.status_code) html = req.text soup = BeautifulSoup(html, "html.parser") items = soup.select("[class=search-product]") rank = 1 for item in items: badge_rocket = item.select_one(".badge.rocket") if not badge_rocket: continue name = item.select_one(".name") price = item.select_one(".price-value") thumb = item.select_one(".search-product-wrap-img") link = item.a["href"] print(f"{rank}위") print(name.text) print(f"{price.text} 원") print(f"https://www.coupang.com/{link}") if thumb.get("date-img-src"): img_url = f"http:{thumb.get('date-img-src')}" else: img_url = f"http:{thumb['src']}" print(img_url) print() # img_req = requests.get(img_url) # with open(f"C:\soncoding\coupang{rank}.jpg", "wb") as f: # f.write(img_req.content) rank += 1 타임까지 걸어보고 쿠키까지 한번 변경을 해봤는데 계속 뜨질 않습니다. 베이스는 강사님의 코드와 똑같이 적었습니다!
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
yup schema에 따로 타입을 지정해줘야 하나요?
vscode가 아닌 웹스톰을 사용하고 있습니다.에디터 문제인지는 모르겠지만schema에 계속 타입을 요구하길래schema: yup.ObjectSchema<any>로 넘어갔는데 괜찮겠죠?그런데 any를 안에 넣고 싶지 않아서다른 방법을 강구해봤는데 잘 안되네요 ㅠ라이브러리가 업데이트 되어서 그런건가요?
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] 번외편: AWS로 시작하는 서버 운영
mac 실행파일(.app) 리눅스 서버에서 실행 하기
안녕하세요 루키스님! 저는 파트1 부터 지금까지 mac 운영체제에서 실습을 하며 강의를 따라오고 있는데요, 보통 리눅스 서버를 많이 쓴다고 해서 저도 리눅스 서버를 임대하려고 하는데요, 맥 실행파일(.app)도 리눅스 서버에서 똑같이 실행할 수 있을까요??
-
미해결스프링 부트 웹 개발 입문 - 따라하며 배우기
안녕하세요 7장 커피메뉴 DB 연동과정에서 오류납니다.
제 소스파일은 구글드라이브 링크를 걸어드리겠습니다ㅠ수업과정 그대로 진행했고, 혹시 틀린부분없나 일일히 체크해봤는데도 잘모르겠네요 https://drive.google.com/drive/folders/1Qh3u8f_Y3Serz1JDhtKld6PEFiUGEfpt?usp=drive_link
-
해결됨웹 게임을 만들며 배우는 React
RSP Hooks 방식의 UseEffect에서 setInterval이 '한번만' 동작하는 이유를 알고싶습니다!
useEffect(() => { interval.current = setInterval(changeHand, 100); console.log("다시 실행"); return () => { console.log("종료"); clearInterval(interval.current); }; }, []);위 코드는 '가위바위보' hooks에서 useEffect를 사용하는 코드 중 일부입니다. 제가 궁금한 것은 위 코드에서 왜 setInterval을 해주었는데도 '주먹'에서 '가위'로 바뀌고 멈추는가 입니다. componentDidMount() { // 비동기 요청 많이 한다고 함. // 해제안해주면 메모리를 많이 먹음 this.interval = setInterval(this.changeHand, 100); }클래스로 만든 rsp 코드에서는 컴포넌트가 생성되고 setInterval을 하면 주먹-가위-보가 100ms 주기로 잘 바뀝니다.useEffect()에서 두 번째 인자로 아무것도 넣어주지 않으면 초기 렌더링 될 시에만 실행되는 것으로 알고 있는데요, 한 번 실행된 코드에 setInterval이 있기 때문에 가위로만 바뀌는 게 아닌 100ms마다 주먹-가위-보로 반복되어야 하는 거 아닌가요? 이와 별개로 어떤 유료 리액트 코스보다 좋은 강의 감사드립니다.
-
미해결
The Ink of the Future How AI Writing Tools are Transforming the Literary Landscape
Imagine a world where the written word flows effortlessly, where creativity is boundless, and where even the most eloquent prose is just a few clicks away.An essay writing service plays a crucial role in ensuring high-quality content creation and providing assistance to individuals who require professional help with their essays.It serves as a valuable resource for students, professionals, and anyone seeking well-crafted and well-researched written pieces. Regarding content quality control, AI writing tools, such as those offered by PerfectEssayWriterai, emerge as a panacea.Welcome to the future of writing, where AI writing tools are revolutionizing the literary landscape. In this blog, we will delve into the fascinating realm of AI writing tools and explore their impact on the world of literature and creative expression.IntroductionWriting has always been a fundamental means of communication, allowing individuals to express their thoughts, emotions, and ideas. With the advent of artificial intelligence, writing has reached new heights.AI writing tools leverage the power of machine learning algorithms to generate human-like text, enabling writers to enhance their productivity, creativity, and efficiency. These tools have transformed the way we approach writing, making it more accessible, efficient, and innovative.The Rise of AI Writing ToolsUnderstanding AI Writing ToolsAI writing tools encompass a wide range of applications designed to assist writers throughout the creative process. These tools employ natural language processing and deep learning algorithms to analyze vast amounts of text data, learn patterns, and generate coherent and contextually appropriate content.From generating blog posts and articles to crafting marketing copy and even writing novels, AI writing tools offer a multitude of possibilities.Enhancing Writing EfficiencyOne of the key benefits of AI writing tools is their ability to streamline the writing process. By automating repetitive tasks such as proofreading, grammar checking, and content editing, these tools allow writers to focus on the essence of their work—their ideas and storytelling.With AI writing tools, the cumbersome aspects of writing are taken care of, enabling writers to produce high-quality content in a fraction of the time.Unlocking CreativityCreativity knows no bounds, and AI writing tools are expanding those boundaries further. These tools provide writers with inspiration and assist in overcoming writer's block.By suggesting relevant ideas, offering alternative sentence structures, and even proposing unique plot twists, AI writing tools stimulate the creative process. They serve as a collaborator, pushing writers to explore new avenues and think outside the box.Improving Language SkillsLanguage mastery is a lifelong journey for writers. AI writing tools act as invaluable language companions, helping writers refine their skills. Through intelligent grammar and style suggestions, these tools enhance the clarity and coherence of written work.Writers can also learn from the AI's ability to mimic different writing styles and adapt their own writing accordingly. With each interaction, AI writing tools offer an opportunity for growth and improvement.How to Write an EssayWriting an essay can be a daunting task, especially if you're new to academic writing or unsure of where to begin. However, with the right approach and a clear understanding of the essay structure, you can effectively convey your ideas and arguments.In this explanation, we will guide you through the process of how to write an essay, covering important aspects such as essay topics, essay structure, essay outline, length of an essay, essay introduction, thesis statement, body paragraphs, essay conclusion, and tips for revising your essay.Choosing an Essay Topic:Essay topics play a crucial role in shaping the content and direction of an essay. They provide a focal point and determine the scope of the discussion. Choosing a compelling essay topic is essential to engage readers and communicate ideas effectively.Essay ConclusionThe essay conclusion summarizes your essay's main points and restates the thesis statement in a concise manner. Avoid introducing new information but leave the reader with a thought-provoking ending.Essay StructureThe essay structure is a fundamental element that provides organization and coherence to the writer's ideas. It serves as a framework for presenting arguments, supporting evidence, and conveying a clear message to the reader.AI Writing Tools vs. Human-Based Essay Writing ServicesAs the literary landscape embraces AI writing tools, it is essential to understand how they coexist with human-based essay writing services. While AI tools offer remarkable assistance, human expertise cannot be replicated.Human-based essay writing services provide personalized attention, deep knowledge, and critical thinking that AI tools currently lack. They offer a human touch that AI tools, at least for now, cannot fully replace.Significance of Reviews in Collaboration with the power of Social MediaPerfectEssayWriterai:Social Media Platforms:Quora: PerfectEssayWriterai actively participates in Quora, engaging with the writing community by answering questions, providing insights, and sharing expertise on AI writing tools. Users can seek advice, gain knowledge, and discover the benefits of utilizing AI tools in their writing process.Reddit: The PerfectEssayWriter.ai subreddit community serves as a platform for users to discuss and share their experiences with the AI writing tool. It provides a space for writers to seek feedback, ask questions, and interact with other users who are interested in enhancing their writing skills.Medium: PerfectEssayWriterai utilizes Medium to publish informative articles and blog posts related to AI writing tools, offering valuable insights, tips, and best practices. This platform allows writers to learn and explore different aspects of AI-driven writing assistance.Review Websites:Sitejabber: Users can find comprehensive reviews and ratings of PerfectEssayWriterai on Sitejabber. The platform enables users to share their experiences, highlight the tool's strengths, and provide feedback on its effectiveness. These reviews help potential users make informed decisions based on the collective opinions of others.Reviewsio: Reviews.io provides a dedicated space for users to leave reviews and ratings for PerfectEssayWriterai. This platform allows users to express their satisfaction, provide constructive feedback, and contribute to assessing the AI writing tool's performance.News Direct, Tech Bullion, Marketers Media, Business Insider, Jerusalem Post, Harlem World Magazine, Gilaherald, Good project, Ibtimes, and laprogressive: These news platforms have recognized the transformative impact of PerfectEssayWriterai. Their articles and coverage highlight the tool's features, benefits, and positive impact on the writing landscape, further enhancing its credibility.There are certain ai writing platforms that has published the credibility of AI tools. In this sense those platforms are; nerdbot, Qrius, best ai essay writer, and ai essay writer5staressays:Social Media Platforms:Quora: 5staressays actively engages with the Quora community, addressing questions, offering guidance, and sharing insights on various writing topics. This platform allows users to seek advice, gain knowledge, and understand the benefits of utilizing professional essay writing services.Reddit: The 5staressays subreddit community provides a platform for users to discuss their experiences with the essay writing service, seek recommendations, and share feedback. Users can engage with each other, ask questions, and receive assistance related to their writing needs.Medium: 5staressays publishes informative articles and blog posts on Medium, covering various writing topics. This platform allows users to access valuable tips, guidelines, and resources to enhance their writing skills and understand the benefits of professional essay writing services.Review Websites:Sitejabber: Sitejabber hosts reviews and ratings for 5staressays, allowing users to express their opinions, share their experiences, and provide feedback on the quality of the essay writing service. Potential users can rely on these reviews to make informed decisions when considering utilizing the service.Reviewsio: Users can leave reviews and ratings for 5staressays on Reviews.io, contributing to the collective assessment of the essay writing service. These reviews help prospective users gauge the reliability, professionalism, and quality of the service based on the feedback provided by others.The collaboration between PerfectEssayWriterai, 5staressays, and various social media platforms and review websites is significant in providing valuable insights and feedback to users.Top 5 Best AI Writing Tools 2023In the year 2023, the top AI writing tools have significantly evolved, offering an array of features to enhance the writing process.PerfectEssayWriter.ai takes the lead with its advanced grammar correction and style enhancement, providing writers with refined and polished content.MyEssayWriter.ai stands at the second position, leveraging AI technology for content generation and robust plagiarism detection, ensuring originality and quality.EssayService.ai secures the third rank, offering comprehensive essay writing assistance and innovative topic generation.CollegeEssay.org – AI Essay Writer follows closely, catering specifically to college essay requirements with customized writing solutions and prompt analysis.Finally, Jasper utilizes natural language processing to assist writing, making it a valuable tool for improving grammar and writing proficiency. These top AI writing tools exemplify the advancements in technology and their profound impact on the writing landscape.ConclusionThe ink of the future is being rewritten by AI writing tools, transforming the literary landscape as we know it. These tools have revolutionized writing efficiency, unlocked boundless creativity, and facilitated language mastery.Perfectessaywriter.ai is a leading platform that offers advanced AI writing tools, serving as a panacea for content quality control. With its cutting-edge technology and algorithms, Perfectessaywriterai provides users with powerful tools to enhance their writing process.Whether it's generating well-structured essays, conducting in-depth research, or ensuring the originality and accuracy of content, Perfectessaywriterai has become a go-to resource for individuals seeking top-notch writing assistance.While AI writing tools offer incredible benefits, they coexist harmoniously with human-based essay writing services, which bring a personalized touch to the craft. As the world embraces the synergy between AI and human writers, the literary realm will continue to evolve, opening new doors for creativity and expression.Useful ResourcesCreative Algorithms Exploring the Intersection of AI and WritingFrom Data to Dialogue AI Writing Tools in Conversational Agent DevelopmentThe Automated Author AI Tools for Efficient and Effective Writing
-
미해결비전공 기획자 및 관리자를 위한 IT 필수 지식
질문드립니다...!
안녕하세요!강의 정말 잘 듣고 있습니다...!이제 개발자분들이 하시는 말씀들이 조금씩 들리기 시작했습니다...!! 감사합니다!ㅠㅠ궁금한게 있어서 질문드립니다...!개발지식이 없는 일반 고객이 개발자분들에게 개발된 화면에서 버튼을 1cm만 옮겨 달라고하면그게 말처럼 쉬운일이 아니라고 하는데 이게 무슨 의미일까요?1) 쉽지 않은 이유가 궁금하고2) 만약 1cm를 옮기도록 수정한다면 그 작업 절차는 어떻게 될까요?(누가하고, 어떻게하고...) 이런것이 궁금합니다!! 답변부탁드립니다.감사합니다!
-
해결됨10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
1-N 코드 질문있습니다
안녕하십니까 큰돌님강의 보기 전에 문제를 풀어봤는데 틀렸다고 나와서 질문드립니다. 최대 범위인 20억 * 20억일 때 long long 범위가 넘는데 pow 반환값을 long long 에 저장해서 틀린게 맞을까요 ?? 그리고 pow함수의 시간복잡도는 어떻게 되는지도 궁금합니다http://boj.kr/c90ff8da35d3490b859f8ee922c59bf9
-
미해결
The Intersection of AI and Writing: Tools for Success
In today's digital age, the realm of writing has undergone a profound transformation. With advancements in Artificial Intelligence (AI), writing tasks have become more efficient and accessible than ever before.AI-powered writing tools have emerged as invaluable assets for writers, students, and professionals across various industries.These tools leverage machine learning algorithms to generate high-quality content, assist in grammar and style corrections, and even provide suggestions for creative inspiration.Moreover, the rise of AI has also brought attention to human-based custom essay writing services, where expert writers offer personalized assistance in crafting well-researched and polished essays.This article explores the intersection of AI and writing, highlighting the tools and services that contribute to success in the realm of written expression.The Power of AI Writing ToolsAI Essay Writers: Enhancing Efficiency and QualityOne of the most notable AI writing tools is the AI essay writer, which offers a range of functionalities that streamline the essay writing process.These tools employ natural language processing algorithms to understand user prompts and generate comprehensive essays on a given topic.AI essay writers can produce coherent and well-structured essays within minutes, saving considerable time and effort for individuals facing tight deadlines or struggling with the writing process.One prominent AI essay writing tool is PerfectEssayWriter, which has garnered positive mentions in various platforms such as Reddit, Quora, and Medium.It has received favorable reviews on platforms like Sitejabber, Reviews.io, and ResellerRatings. Furthermore, it has been featured in news articles such as News Direct, Yahoo Finance, and Tech Bullion.Essay Generators: Sparking Creativity and InspirationAnother remarkable AI writing tool is the essay writer, which aids individuals in overcoming writer's block and stimulating creativity.These tools use AI algorithms to generate topic ideas, provide outlines, and even suggest compelling introductions and conclusions.Essay generators serve as valuable resources for writers seeking inspiration and guidance throughout the writing process.Essay Introduction"In today's interconnected world, the rapid advancement of technology has transformed various aspects of our lives, revolutionizing the way we communicate, work, and access information.As society becomes increasingly reliant on technology, it is crucial to examine the impacts and implications of this digital revolution.This essay will delve into the advantages and disadvantages of technology in our modern era, exploring its influence on social interactions, education, and productivity.By analyzing both the positive and negative effects of technology, we can gain a deeper understanding of its role in shaping our society and make informed decisions about how to navigate the challenges and opportunities it presents."In Essay Introduction paragraph, the topic of the essay is clearly stated, which is the impact of technology in today's world. The paragraph highlights the significance of technology and its widespread influence on various aspects of life.It sets the context for the essay by explaining the importance of examining the advantages and disadvantages of technology. The introduction also mentions the specific areas that will be explored in the essay, namely social interactions, education, and productivity.Lastly, the paragraph emphasizes the importance of understanding technology's role and making informed decisions regarding its use.The Role of Human-Based Custom Essay Writing ServicesWhile AI writing tools offer significant convenience and efficiency, there are instances where a more personalized and human touch is required.This is where custom essay writing services come into play. These services connect students and professionals with experienced writers who can craft bespoke essays tailored to their specific requirements.One such service is WriteMyEssay, which specializes in providing high-quality custom essays. Platforms like Reddit and Quora feature discussions and reviews about the service. Reviews on Sitejabber and Reviews.io showcase positive experiences from satisfied customers.Similarly, 5StarEssays is another reputable custom essay writing service. It has been mentioned on platforms like Reddit, Quora, and Medium. Reviews on Sitejabber, Reviews.io, ResellerRatings, and ProvenExpert reflect the satisfaction of customers who have utilized their services.The Marriage of AI Writing Tools and Custom Essay Writing ServicesThe synergy between AI writing tools and custom essay writing services is evident. AI tools like AI essay writers and essay generators provide efficiency, speed, and inspiration, allowing individuals to overcome writing challenges and write my essay for free.On the other hand, custom essay writing services offer the human touch, providing personalized assistance and expertise for those who require customized essays.Both AI writing tools and custom essay writing services have their unique advantages and use cases. AI tools excel in generating quick drafts, proofreading, and providing general guidance.On the other hand, custom essay writing services cater to individuals who seek tailor-made essays crafted by experienced writers.ConclusionIn conclusion, the intersection of AI and writing has revolutionized the way we approach written expression. AI writing tools such as AI essay writers and essay generators offer efficiency, inspiration, and convenience.Meanwhile, custom essay writing services bridge the gap by providing personalized assistance from expert writers.By leveraging the strengths of both AI tools and human-based services, writers, students, and professionals can achieve greater success in their written endeavors.Whether utilizing AI-powered tools or seeking personalized support, the future of writing is undoubtedly enhanced by the power of AI.Comparison of 5 Best AI Writing Tools in 2023PerfectEssayWriter.ai: This AI writing tool holds the top spot due to its advanced natural language processing capabilities and a built-in plagiarism checker. It ensures high-quality, original content for users.MyEssayWriter.ai: Ranked second, MyEssayWriter offers customizable writing styles and robust grammar and spell-check features. Users can tailor their writing to meet specific requirements and ensure impeccable grammar and spelling.EssayService.ai: This tool takes the third spot, primarily due to its wide range of writing services and quick turnaround time. It caters to various writing needs, such as essays, research papers, and more, and delivers timely results.CollegeEssay.org – AI Essay Writer: Ranked fourth, this AI writing tool boasts an easy-to-use interface, making it accessible to users with varying levels of technical expertise. It also offers topic suggestions to help users get started on their writing projects.Jasper: Although not hyperlinked, Jasper still secures the fifth position. It stands out for its simplified writing process and AI-generated topic outlines, assisting users in organizing their thoughts and generating engaging content. Useful Resources:: Exploring the Potential of AI in WritingAI Writing Tools for Website Content GenerationAI Writing Tools: Exploring Emotional Intelligence
-
미해결스프링 핵심 원리 - 기본편
스프링 핵심원리 컴포넌트 스캔 질문:NoSuchBeanDefinitionException
지금 실행해보면 아래와 같은 에러가 나오는데 어떻게 하면 해결할 수 있는지 알려주시면 감사하겠습니다!org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'hello.core.member.MemberService' available
-
미해결
Module not found: Cant resolve~
안녕하세요 인프런x코드캠프 부트캠프 코스를 듣고 있습니다. 강의를 따라하다 보니 어디서 놓친건지 경로가 이상한건지 계속 이런 오류가 뜹니다. node-modules와 yarn.lock을 지운 뒤 yarn도 다시 설치해보고 해도 안되네요.. 추가로 올려야 할 파일이 있으면 알려주세요..!
-
미해결따라하며 배우는 리액트 네이티브 기초
맥이 있기는 한데..
16년도 맥이라,xcode 다운이 어렵네요..혹시 이렇게 되면 네이티브 cli 부분은진행이 어려운건가요?데스크탑은 있습니다,아그리고, npx expo start를 하고 카메라를 찍어봐도접속이 계속 안되네요...
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
강의 6:23 필드주입
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요.6:23에 필드주입을 하면 중간에 바꿔치기를 할수있는 방법이 없다는게 무슨 말인가요? 그럼 생성자주입은 바꿔치기가 된다는건데 이게 조립될때를 말하는건가요? 그럼 필드주입은 조립될때도 안바뀐다는건가요? 실행중에 바꾸는건 세터만 된다는식으로 얘기를해서요 컨트롤러가 정확하게 어떻게 작동되는지에 대한 이해가 아직 부족한거같은데 로드맵 따라가다보면 채워지는 부분일까요?
-
미해결앨런 iOS 앱 개발 (15개의 앱을 만들면서 근본원리부터 배우는 UIKit) - MVVM까지
(기초-3)가위바위보 앱 만들기 - 기초 앱 강의 12강 질문입니다!
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.강의 코드를 모두 동일하게 작성을 했는데 comChoice의 값이 랜덤으로 바뀌지를 않는 거 같아요. myChoice는 select를 누를 때마다 변하는데, comChoice는 처음 값만 그대로 가고 변하지를 않습니다. 어떤 부분이 문제인가요?? // // ViewController.swift // RPSGame // // Created by Gahyun Kim on 2023/07/12. // import UIKit class ViewController: UIViewController { //변수 / 속성 @IBOutlet var mainLabel: UILabel! @IBOutlet var comImageView: UIImageView! @IBOutlet var myImageView: UIImageView! @IBOutlet var comChoiceLabel: UILabel! @IBOutlet var myChoiceLabel: UILabel! var myChoice = Rps(rawValue: Int.random(in: 0...2))! var comChoice = Rps(rawValue: Int.random(in: 0...2))! //함수 / 메서드 //앱의 화면에 들어오면 처음 실행되는 함수 override func viewDidLoad() { super.viewDidLoad() // 1) 첫번째/두번째 이미지뷰에 준비(묵) 이미지를 띄워야 함 comImageView.image = #imageLiteral(resourceName: "ready") myImageView.image = UIImage(named: "ready.png") // 2) 첫번째/두번째 레이블에 *준비*라고 문자열을 띄워야 함 comChoiceLabel.text = "준비" myChoiceLabel.text = "준비" } @IBAction func rpsButtonTapped(_ sender: UIButton) { // 가위/바위/보(enum)를 선택해서 그 정보를 저장해야함 //버튼의 문자를 가져옴 guard let title = sender.currentTitle else { return } print(title) switch title { case "가위" : myChoice = Rps.scissors case "바위" : myChoice = Rps.rock case "보" : myChoice = Rps.paper default : break } } @IBAction func selectButtonTapped(_ sender: UIButton) { // 1) 컴퓨터가 랜덤으로 선택한 것을 이미지뷰에 표시 // 2) 컴퓨터가 랜덤으로 선택한 것을 레이블에 문자열로 표시 switch comChoice { case Rps.rock : comImageView.image = #imageLiteral(resourceName: "rock") comChoiceLabel.text = "바위" case Rps.paper : comImageView.image = #imageLiteral(resourceName: "paper") comChoiceLabel.text = "보" case Rps.scissors : comImageView.image = #imageLiteral(resourceName: "scissors") comChoiceLabel.text = "가위" } // 3) 내가 선택한 것을 이미지뷰에 표시 // 4) 내가 선택한 것을 레이블에 문자열로 표시 switch myChoice { case Rps.rock : myImageView.image = #imageLiteral(resourceName: "rock") myChoiceLabel.text = "바위" case Rps.paper : myImageView.image = #imageLiteral(resourceName: "paper") myChoiceLabel.text = "보" case Rps.scissors : myImageView.image = #imageLiteral(resourceName: "scissors") myChoiceLabel.text = "가위" } // 5) 컴퓨터가 선택한 것과 내가 선택한 것을 비교해서 이겼는지/졌는지 판단해서 문자열로 표시 if comChoice == myChoice { mainLabel.text = "비겼다" } else if comChoice == .rock && myChoice == .paper { mainLabel.text = "이겼다" } else if comChoice == .paper && myChoice == .scissors { mainLabel.text = "이겼다" } else if comChoice == .scissors && myChoice == .rock { mainLabel.text = "이겼다" } else { mainLabel.text = "졌다" } } @IBAction func resetButtonTapped(_ sender: UIButton) { // 1) 컴퓨터가 다시 처음 준비 이미지뷰에 표시 // 2) 컴퓨터가 다시 준비 레이블에 문자열로 표시 comImageView.image = #imageLiteral(resourceName: "ready") comChoiceLabel.text = "준비" // 3) 내 선택 이미지뷰에도 준비 이미지를 표시 // 4) 내 선택 레이블에도 준비 문자열 표시 myImageView.image = #imageLiteral(resourceName: "ready") myChoiceLabel.text = "준비" // 5) 메인 레이블 *선택하세요* 표시 mainLabel.text = "선택하세요" // 6) 컴퓨터가 다시 랜덤 가위/바위/보를 선택하고 저장 comChoice = Rps(rawValue: Int.random(in: 0...2))! } }
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
회원서비스테스트 BeforeEach AfterEach
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요.MemberServiceTest에서 BeforeEach에서 새로 객체를 불러오고 AfterEach에선 다음 테스트를 위해 저장된걸 지우는걸로 이해를 했는데 어차피 객체를 새로 만드는데 지우는 과정이 왜 필요한건가요? 그래서 AfterEach 코드를 지워봤는데 회원가입()에서부터 막히더라고요AfterEach는 테스트가 끝나고 실행되는건데 왜 첫번째 테스트부터 작동에 문제가 생기는건가요?
-
해결됨[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
앱 stop 뜨면서 종료되는 현상
실행시 stop 뜨면서 종료되는 현상이 있었으나프로젝트를 다시 재생성하면서 천천히 진행해본결과..안드로이드 프로젝트의 API 버전이 낮게 설정되어있었다. 기존에 사용하던 디바이스는 API 34 지만 프로젝트는 33이였던것... 다시 34로 맞춰서 해보니 문제없이 동작되었음..! 프로젝트와 디바이스의 버전을 맞추는게 굉장히 중요한것 같다. 거의 대부분의 문제는 버전문제인것 같다..버전을 잘 확인할것..
-
해결됨10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
1-M 반례를 잘 모르겠습니다
안녕하십니까 큰돌님좋은 로직이 아닌 것은 알지만 강의 듣기 전에 코드 작성했었는데 틀렸다고 해서 어떤 반례가 있는 것일까요 ?? http://boj.kr/d9d056ce29f948bca638664de0101191
-
해결됨10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
1-I 개념 질문있습니다
안녕하십니까 큰돌님개념에서 Map은 map<string, int> mp; 이런 식으로 사용하는 것을 알겠는데 Arr 은 어떻게 String - int하는 건가요 ?? 예시 코드라도 보여주실 수 있을까요 ?? 말로 들었을 때 이해가 잘 안 가서 질문드렸습니다 ..!
-
미해결자바 기초부터 마스터하기 with 은종쌤 (Do it 자바 프로그래밍 입문) - Part 1(기초편)
upgradeLevel에 인수를 넣기 위해 새로 AdvancedLevel 과 같은 instance를 생성하는게 어색하게 느껴집니다.
안녕하세요 강의 잘 듣고 있습니다.저는 upgradeLevel 을 하기 위해서 새로 인스턴스를 생성하고 넘겨주는 방식이 아닌 게임처럼 한단계씩 업그레이드 되는 방식으로 구현하고 싶습니다. 그래서 다음과 같이 생각해서 적어봤는데, 2가지 문제가 있는것 같습니다. 어떻게 하면 될까요? public BeginnerLevel level = new BeginnerLevel(); public void upgradeLevel(PlayerLevel level) { // if(level.levelName ) if (level instanceof BeginnerLevel) { level = new AdvancedLevel(); } else if (level instanceof AdvancedLevel) { level = new SuperLevel(); } else if (level instanceof SuperLevel) { System.out.println("you are already highest level"); } }첫째로 instanceof를 잘못쓰고 있는 것 같고, 둘째로 level = new AdvancedLevel() 이런식으로 재정의 하는게 가능한가요? 궁금합니다.
-
미해결
메모리반도체 FPGA강의
메모리 반도체(DRAM, SRAM, NAND Flash) 관련 FPGA 강의를 찾고 있는데 추천하시는 강의가 있을까요? Xilinx Evaluation kit와 SRAM, NAND Flash 칩은 보유하고 있습니다.