묻고 답해요
131만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
5-Y 원판 돌리기
http://boj.kr/f8db50bd4ee848db99f4e157879c03d1테스트 케이스는 맞고 출력해봤을 때 해당 예제처럼 인접 값 삭제되는게 확인되는데 왜 틀렸는지 모르겠습니다.. 저는 vector<int> vec[54]로 1번부터 n까지 값을 저장한 후, 벡터를 rotate했습니다..
-
미해결Kevin의 알기 쉬운 Spring Reactive Web Applications: Reactor 1부
DROP 전략과 LATEST 전략의 차이점이 무엇인가요?
안녕하세요. 수업 잘 듣고 있습니다~백프레셔 전략 중 DROP과 LATEST 전략은 결국 버퍼가 비워질 때까지 Publsiher에서 emit되는 데이터를 제거(drop or discard)하는 것으로 이해했습니다. 버퍼가 비어지는 시점 이후로 emit되는 데이터를 다시 버퍼에 채운다는 점에서 두 전략은 같은 것으로 보입니다. 차이점을 알려주시면 감사하겠습니다~
-
미해결실무자가 알려주는 CANoe (For CAN 통신)
강의에는 안 나오는 내용인데 .cdd파일의 용도가 궁금합니다
회사에서 CANoe 툴을 쓰는데경우에 따라 .cdd 파일이 없으면 CANoe를 쓸 수가 없더라고요. 그래서 선임들로부터 받아서 쓰긴 하는데 이 파일의 용도를 잘 모르겠습니다. 강의 범위 외의 질문이지만 가능할까요...?
-
해결됨[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
2회 기출유형(작업형1), 문제2
len(df) * 0.8 df = df.iloc[:80] df.isnull().sum() std1 = df['f1'].std() print(std1) #std1 = 20.574853076621935 m = df['f1'].median() # 중앙값은 68 df['f1'] = df['f1'].fillna(m) df.isnull().sum() #결측치채워진것 확인 std2 = df['f1'].std() print(std2) print(abs(std1-std2)) 2회기출유형(작업형1) 문제2를 따라하다가, 질문드립니다. 위와 같이 해서 17.010788646613268 17.010788646613268 0.0이렇게 std1 과 std2 값이 같게 나왔는데..제가 주석처리한것보면 처음에는 제대로 나왔었거든요.처음에 80%데이터 iloc에 80을 그냥 숫자로 적은것과 관련이있는가싶은데, 설명부탁드립니다.
-
미해결입문자를 위한 CSS 기초 강의
font-weight가 적용이 안 되는데 어떻게 하나요?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>회사 웹 페이지 만들기</title> <style> body{ font-weight: 30px; } img{ display: flex; float: left; width: 130px; height: 30px; margin: 10px 0px 0px 8px; } img:hover{ cursor: pointer; } img, .menu_bar{ margin-right: 50px; } .menu_bar{ width: 100%; height: 70px; border: 2px solid black; text-align: center; display: flex; float: left; } input{ width: 110px; height: 45px; margin-right: 10px; margin-top: 12px; background-color: white; font-family: "돋움"; font-size: 15px; border: none; border-radius: 5px; } input:hover{ background-color: #f8f9fa; cursor: pointer; } #event, #freeStart{ width: 170px; } #freeStart{ color: white; background-color: #ff6464; } #freeStart:hover{ background-color: #DB4455; } #login{ margin-left: 100px; } div > #seeMore{ width: 20px; height: 20px; padding: 12px; } #seeMore:hover{ background-color: #f8f9fa; } </style> </head> <body> <div class="menu_bar"> <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/NHN_COMMERCE_CI.png/1600px-NHN_COMMERCE_CI.png" alt="회사로고"> <input type="button" name="쇼핑물" id="shop" value="쇼핑몰"> <input type="button" name="스토어" id="store" value="스토어"> <input type="button" name="마케팅" id="marketing" value="마케팅"> <input type="button" name="고객지원" id="customer" value="고객지원"> <input type="button" name="이벤트" id="event" value="혜택 ● 이벤트"> <input type="button" name="엔터프라이즈" id="enterprise" value="엔터프라이즈"> <input type="button" name="이전센터" id="center" value="이전센터"> <input type="button" name="로그인" id="login" value="로그인"> <input type="button" name="무료로 시작하기" id="freeStart" value="무료로 시작하기"> <img src="/image/메뉴바.png" id="seeMore" alt=""> </div> </body> </html>
-
미해결파이썬을 활용한 머신러닝 딥러닝 입문
션 7. CNN (Convolutional Neural Network)의 7번째 강의는 실습 - FashionMNIST 데이터셋 이용 실습 문제 풀이 관련 강의 내용순서 문의
섹션 7. CNN (Convolutional Neural Network) - 합성곱 신경망 6번째 실습 - 문제 설명 (LeNet 모델 구축 - MNIST 데이터셋 이용)의 끝부분이 one hot encoding인데 다음 7번째 강의는 실습 - FashionMNIST 데이터셋 이용 실습 문제 풀이로 앞의 강의 Mnist 손글씨에 대한 코드 설명 부분이 빠진 것 같아 연결이 잘 안됩니다.... 원래 영상이 그런지 확인 부탁드려요. 감사합니다.
-
미해결[Lv.2] 레벨업 - SwiftUI intermediate with Core Data
Spacer() 를 넣으니 예제처럼 SafeArea 확보가 안됩니다.
struct MatchedGemomatryEffectInter: View { @State private var isToogle: Bool = false var body: some View { VStack { RoundedRectangle(cornerRadius: 20) .frame(width: 100, height: 100) .offset(y: isToogle ? UIScreen.main.bounds.height * 0.7 : 0) Spacer() } .frame(maxWidth: .infinity,maxHeight: .infinity) .background(.green) .onTapGesture { withAnimation(.spring()) { isToogle.toggle() } } } }안녕하세요.동일하게 작성했는데 저는 상하 safeArea 가 채워진체나옵니다. 타겟은 iOS15 입니다. 강의 관련된 질문은 언제나 환영입니다 😄코드 관련 상세하게 작성해주시면 더 좋아요! (상세코드를 붙여넣기 해주세요)마크다운을 사용해서 편리하게 글을 작성하세요먼저 유사한 질문이 있었는지 먼저 검색 해보는 습관~인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요
-
해결됨AWS SAA-C03 자격증 대비-문제 풀이
연습문제 2차 24번 문제 질문입니다
안녕하세요!강의를 듣던 도중 조금 헷갈리는 부분이 있어서 질문을 남깁니다.연습문제 2차 24번 문제에서 '높은 IOPS' 성능을 지원해야 한다라는 문제 지문 때문에 A,C,D 가 소거가 되었는데, A 번 지문에서 '암호화된 EBS' 볼륨이라는 건 '범용 SSD' 를 칭한다고 생각하면 되는걸까요?이유가 EBS 에서도 프로비저닝 된 IOPS SSD 가 존재한다고 핵심정리 25 page 에 나와있어서 '프로비저닝 된' 이라는 단어가 적혀있지 않은 EBS 는 그냥 기본 EBS 로 생각해도 되는건지가 궁금합니다!감사합니다.
-
미해결Next + React Query로 SNS 서비스 만들기
트렌드 오른쪽 섹션 레이아웃 질문
트위터 보시면 오른쪽에 보시면 아무리 스크롤해도 사라지지않고 하단에 고정됩니다. 이건 어떻게 구현해야할지 잘 모르겠네요..영상에서도 안나오고 z.com 사이트에서도 구현이 안되있네요. 아무리 찾아봐도 잘 모르겠습니다. 트위터에서#react-root > div > div > div.css-175oi2r.r-1f2l425.r-13qz1uu.r-417010.r-18u37iz > main > div > div > div > div.css-175oi2r.r-aqfbo4.r-10f7w94.r-1hycxz > div > div.css-175oi2r.r-1hycxz.r-gtdqiz > div > div > div 해당 셀렉션에서 flex-shrink: 0 속성이 해당 기능을 구현하는거같은데.. 해당 속성을 적용해도 저는 적용이안되네요... css너무 어려워..ㅠㅠ
-
미해결
Overview of PerformanceDesignCentre.com's Best Car Automotive Services
PerformanceDesignCentre.com is an expert in high-standard car enhancements and safeguard services. They take their time to modify vehicles using the best components and technologies that are available, including window tinting and vinyl wraps.Advantages of Performance Design CenterChoosing a performance center comes with numerous advantages.Professional Experts: they have a team of experts who are highly trained, well-experienced, and dedicated professionals in the automotive industry.The finest materials: This guarantee of long-lastingness, as well as great results, is possible by utilizing only premium-quality materials.Their customers come first. To satisfy customers’ needs, they provide tailor-made solutions and excellent service that make every client feel acknowledged.PerformanceDesignCenter.com: Detailed Service Descriptions1. Car Window TintingThey involve sticking a slim adhesive film on the internal surface of a vehicle’s windows. Heat and glare from sunlight are substantially reduced by this film, while it also blocks harmful UV rays and enhances privacy. Therefore, car window tint becomes an outstanding practical and stylish upgrade for any vehicle because it saves its interior from fading or cracking down.Benefits of Car Window TintingHeat Reduction: This keeps the car cooler, reducing the need for air conditioning.Increased Privacy: Prevents outsiders from easily seeing inside the vehicle.UV Protection: Blocks up to 99% of harmful UV rays, protecting occupants and interior materials.2. Commercial WrapThis type of commercial wrap turns a car into a mobile billboard. Designs with business logos, graphic images, and promotional messages can be customized using top-quality vinyl at Performance Design Centre. These wraps are not only eye-catching but also durable and weather-resistant, making them an effective advertising tool.Benefits of Commercial WrapBrand Visibility: This increases brand exposure by turning your vehicle into a mobile advertisement.Cost-Effective Advertising: More affordable than traditional advertising methods with a high return on investment.Protection: Wraps also protect the original paint from minor abrasions and UV damage.3. Paint Protection FilmThe Paint Protection Film (PPF) is a clear, tough film that is applied over the exterior parts of a vehicle to shield it from scrapes, stone chips, and other environmental damage. This film retains the vehicle’s paint job for longer. PPF is particularly useful for high-impact areas such as the hood, bumpers, and side mirrors.Benefits of Paint Protection FilmScratch Resistance: Protects against minor scratches and abrasions.Maintains Appearance: Keeps the vehicle’s paint looking fresh and glossy.Long-Term Investment: Preserves the vehicle’s value by preventing paint damage.4. Ambient Lights and StarlightsInside any given automobile, ambient lighting and starlights set up the internal mood or atmosphere. These luminaires can be personalized to create an individualized and sumptuous environment on board vehicles. Dashboard lights have adjustable soft lights around doors and seats, while starlights present the effect of stars in the sky on the ceiling.Benefits of Ambient Lights and StarlightsEnhanced Aesthetics: Adds a touch of luxury and sophistication to the vehicle’s interior.Mood Setting: Creates a relaxing and enjoyable environment inside the car.Customization: Allows for personalization with various colors and settings.5. Car Vinyl WrappingUsing the car vinyl wrap technique, people can change their car’s appearance without painting it again by covering its exterior with vinyl film. Different finishes may include shades ranging from matte to glossy. The advantage of vinyl wraps is also that they allow easy removal or switching out, hence making it flexible when customizing the look of your vehicleBenefits of Vinyl WrappingVersatility: Offers a wide range of colors and finishes to choose from.Protects Paint: Shields the original paint from scratches and UV damage.Reversible: Can be removed or replaced without damaging the underlying paint.ConclusionPerformance Design Center offers excellent enhancement and protection services to vehicles through bespoke, top-quality solutions. Performance Design Center is a place that improves aesthetics or safeguards a car, leading to superb results that increase the looks and longevity of any motor vehicle.FAQsWhat is window tinting, and why should I think about it?Window tinting refers to the application of film to your vehicle’s windows to minimize heat, brightness, and ultraviolet rays, which also enhance privacy, protect the interior, and improves comfort.How long does a commercial wrap last?A commercial wrap like those offered by companies such as Performance Design Centre can last for between 5-7 years, but this will depend on how one takes care of it and the environmental conditions under which the vehicle operates.What is Paint Protection Film (PPF)?It’s a clear film put on your car’s bodywork to shield its paint from such damages as scratches and chips, among other harmful things, in order to keep its appearance as good as new and thus maintain its value.Can ambient lights and starlights be customized?Yes, customization options for mood lights include color, strength, shape patterns, etc., such as with ambient lights or starlights.What are the benefits of vinyl wrapping my car?Vinyl wraps allow motorists to modify their vehicles’ exteriors without permanently changing their paint. These wraps come in different colors and finishes that can be easily removed or changed.How do I maintain my vehicle after getting these services?Maintenance involves regular cleaning and following specific care instructions provided by the Performance Design Center to ensure the longevity and optimal appearance of the enhancements. Other Useful ResourcesPerformance Design Centre in LondonA Roadmap to Personalized Vehicle Enhancement with Performance Design Centre's LondonUpgrade Your Vehicle: Discover Performance Design Centre's Offerings
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
'다대다' 속성 value 타입은 'Category'일 수 없습니다. 오류
안녕하세요 강의를 따라하던중 다음과 같은 오류가 발생합니다.교안과도 같은 코드이고 인텔리제이도 껐다 켰는데 왜 이런 문제가 발생하는지 모르겠습니다.
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
실습19) AWS EC2에 Jenkins 서버 설치하기 에서 maven 설치하는 부분
실행될 프로젝트가 maven 으로 만들어졌기 때문에 maven을 설치하는게 맞을까요? 만약 gradle로 만들어진 프로젝트를 배포하고 싶으면 maven 관련은 설치하지 않고 gradle 관련 패키지를 설치하면 될까요?
-
미해결
yoloV9, flask 연동 시 오류 발생
yoloV9과 flask 연동해서 웹 사이트에 객체 탐지한 결과를 출력하는 페이지를 만들고 있는데 결과 사진이 html에 뜨지 않고 새로운 창으로 뜨게 됩니다...ㅜㅜ 그리고 TypeError: 'NoneType' object is not iterable 이런 오류가 발생하는데 관련이 있을까요??? 해결해주시면 너무 감사할 것 같습니다! flaskApp.py#Import All the Required Libraries from flask import Flask, render_template, Response, jsonify, request, session from flask_wtf import FlaskForm from wtforms import FileField, SubmitField from werkzeug.utils import secure_filename from wtforms.validators import InputRequired from detection import objectDetection import os import cv2 #Initialize the Flask Application app = Flask(__name__) #Configure a secret key app.config['SECRET_KEY'] = 'muhammadmoin' #Store the input files uploaded in the application app.config['UPLOAD_FOLDER'] = 'static/files' #Use FlaskForm to get the input file form the user class UploadFileForm(FlaskForm): file = FileField('File', validators=[InputRequired()]) submit = SubmitField('Run') fpsCount = 0 frameSize = 0 detectedObjects = 0 def generate_frames(path): yolov9_output = objectDetection(path) for im0, frameRate, frameShape, totalDetection in yolov9_output: ret, buffer = cv2.imencode('.jpg', im0) global fpsCount fpsCount = str(frameRate) global frameSize frameSize = str(frameShape[0]) global detectedObjects detectedObjects = str(totalDetection) frame = buffer.tobytes() yield(b'--frame\r\n' b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n') @app.route('/', methods=['GET', 'POST']) def front(): form = UploadFileForm() if form.validate_on_submit(): file = form.file.data filename = secure_filename(file.filename) file_path = os.path.join(app.config['UPLOAD_FOLDER'], filename) file.save(file_path) session['filePath'] = file_path return render_template('index.html', form = form, uploaded = True, filename = filename) return render_template('index.html', form = form, uploaded = False) @app.route('/detections', methods = ['GET', 'POST']) def detections(): file_path = session.get('filePath', None) if file_path: return Response(generate_frames(path=file_path), mimetype='multipart/x-mixed-replace; boundary=frame') else: return "No video uploaded" @app.route('/fps', methods = ['GET', 'POST']) def fps(): global fpsCount return jsonify(fpsresult=fpsCount) @app.route('/dcount', methods = ['GET']) def dcount(): global detectedObjects return jsonify(dcountresult=detectedObjects) @app.route('/fsize', methods = ['GET']) def fsize(): global frameSize return jsonify(fsizeresult=frameSize) if __name__ == "__main__": app.run(debug=True)index.html<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width", initial-scale="1.0"> <title>스마트 건설환경 안전관리 시스템</title> <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel='stylesheet'> <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100..900&display=swap" rel="stylesheet"> </head> <body> <!-- main page --> <div class="main-page"> <!-- side line --> <div class="side-line"></div> <!-- side bar --> <div class="side-bar"> <form id="upload-form" method="POST" enctype="multipart/form-data"> {{ form.hidden_tag() }} {{ form.file(id='file', style='display: none;') }} <span class="circle" id="upload-icon"><i class="material-icons" style="font-size: 36px; color: white;">file_upload</i></span> </form> <span class="circle blue-circle" id="detect-icon"><i class="material-icons" style="font-size: 36px; color: white;">play_arrow</i></span> <span class="circle" id="button-rgb-img"><i class="material-icons" style="font-size: 36px; color: white;">palette</i></span> <span class="circle" id="button-gray-scale"><i class="material-icons" style="font-size: 36px; color: white;">contrast</i></span> <span class="circle" id="button-blur"><i class="material-icons" style="font-size: 36px; color: white;">blur_on</i></span> <span class="circle" id="button-canny-image"><i class="material-icons" style="font-size: 36px; color: white;">grade</i></span> <span class="circle blue-circle"><i class="material-icons" style="font-size: 36px; color: white;">videocam</i></span> </div> <!-- right panel --> <div class="right-panel"> <!-- Header --> <div class="header"> <div class="empty-container"></div> <h1>스마트 건설환경 안전관리 시스템</h1> <!-- <div class="logo-container"><img src="{{ url_for('static', filename='logo.png') }}" width="90" height="30" alt=""></div>--> <!-- Tablet Container --> <div class="tablet-container"> <img id="tablet-image" src="{{ url_for('static', filename='tablet.png') }}" width="800" height="600" alt=""> <img id="image-main" src="{{ url_for('detections') }}" width="740" height="540" alt=""> <canvas id="main-canvas" width="740" height="540"> </canvas> </div> </div> </div> <script> document.getElementById('upload-icon').addEventListener('click', function () { document.getElementById('file').click(); }); document.getElementById('detect-icon').addEventListener('click', function () { document.getElementById('upload-form').submit() }); </script> </div> </body> </html>
-
미해결처음 만난 리액트(React)
npm start출력 시 미출력됩니다.
<Book.jsx><Library.jsx><index.js>입력 후 출력 시 오류값이 나오는데 설명부탁드립니다.
-
미해결견고한 결제 시스템 구축
완강!!!!!!!!!!!!!!
드디어 완강!! 🥳유익한 강의 잘들었습니다.감사합니다.
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
(공부 방법 관련) 모르겠으면 답을 보고 풀어도 되는걸까요ㅠㅠ
안녕하세요! 선생님 강의 잘 듣고있습니다 ㅎㅎ다름이 아니라,, 공부 방법에 대해 궁금한 점이 있어서요. 2주차까지는 제시해주신 문제 문제 대부분이 실버라서 답을 안 보고 풀고, 선생님 강의 보면서 더 나은 답을 배워가는 식으로 공부해왔는데,, 3주차 브루트포스부터는 골드가 대부분이라 자꾸 답에 도달하지 못하고 결국 강의 코드를 참고하게 됩니다ㅠㅠ (제가 아직 골드를 안 보고 풀 수 있는 실력이 아닌 것 같아요..)당연히 몇 시간 동안 저 스스로 풀려고 노력하는데, 늘 테케는 맞추더라도 히든테케를 틀리고ㅠㅠ 테케가 맞았으니까 어느정도 답에 근접하긴 했다고 생각했는데 막상 큰돌쌤 답을 보면 저랑 다르게 짧고 깔끔하게 구조화하셨더라구요. ㅠㅠ 예를 들면, 인구이동(boj 16234) 문제에서 인접 컴포넌트니까 dfs써야지! 하고 와다다닥 dfs를 써서 코드를 짜긴 짜는데 주어진 조건이 많아지니까 혼란스러워하면서 배열도 많이 만들고 flag도 많이 만들어서 덕지덕지 코드를 짜다가 포기하고 답을 보는.. 이런식이 반복됩니다.. 다음날 다시 풀어봐도 전날 푼걸 외워서 푸는 것 같고 제가 다른 문제가 나왔을 때 풀 수 있을거라는 자신이 안 들어요 이렇게 스스로 풀지 못 하는 문제가 거의 대부분이라도 이런식으로 계속 답을 보면서 공부하는게 맞는걸까요? 쌤 답을 보면서 공부를 해도 제 스스로 문제푸는 힘이 길러질까요?ㅠ.ㅠ 한탄 읽어주셔서 감사합니다..
-
미해결김영한의 자바 입문 - 코드로 시작하는 자바 첫걸음
자바 컴파일 실행이 안 되서 질문 드립니다..
같은 패키지 내부에 Test.java와 BusObject.java가 있습니다. Test에서 BusObject객체를 만들어서 사용하는 것을 테스트하고자 하는데 다음과 같이 에러가 나옵니다.javac BusObject.java Test.javajava BusObject.java Test.java (java BusObject Test 도 동일하게 안 됩니다ㅜㅜ)Error: Could not find or load main class week11.BusObjectCaused by: java.lang.ClassNotFoundException: week11.BusObject뭔가 문제인가요..?지금까지 컴파일할때 week11.하고 패키지도 붙여보고, -classpath . 도 해봤습니다...
-
미해결
디스코드 봇 만드는데 유튜브랑 똑같이하는데 왜 에러일까요
import discord, asyncio client = discord.Client() @client.event async def on_ready(): # 봇이 실행되면 한 번 실행됨 print("/n이세현따까리") await client.change_presence(status=discord.Status.online, activity=discord.Game("이세현따까리")) @client.event async def on_message(message): if message.content == "테스트": # 메세지 감지 await message.channel.send ("{} | {}, Hello".format(message.author, message.author.mention)) await message.author.send ("{} | {}, User, Hello".format(message.author, message.author.mention)) # 봇을 실행시키기 위한 토큰을 작성해주는 곳 client.run('discord token 이건 나중에 입력') 여기에 마지막 디스코드 토큰을 입력하면은 TypeError: Client.__init__() missing 1 required keyword-only argument: 'intents'이렇게 오류가 뜨는데 뭐가 문제일까요 ㅠㅠ
-
미해결이득우의 언리얼 프로그래밍 Part3 - 네트웍 멀티플레이 프레임웍의 이해
데디케이티드 서버 관련 질문
안녕하세요, 강의 관련 질문은 아니지만 궁금한 점이 생겨 질문 올립니다. 개인 프로젝트로 TPS 생존 게임을 제작하려 합니다. 한 경기에 10명 내외의 클라이언트가 접속할 예정입니다.언리얼 엔진에서 제공하는 리슨 서버와 데디케이티드 서버 중 어떤 방식이 알맞을까요?만약 데디케이티드 서버가 알맞다면 리슨 서버에서 구현했던 if(Hasauthority()) 등의 로직들은 제거해주면 되는 것인가요? 만약 데디케이티드 서버로 구성하면 어디서 클라이언트의 데이터 검증을 하게 되는지 등 리슨 서버와 어떻게 다르게 구성해야 하는지 잘 와닿지가 않습니다. characterplayer.cpp 등에 작성한 코드 자체가 서버 로직임과 동시에 클라이언트 로직인 것인지.. 인터넷에는 데디 서버를 구축하는 방법만 나와 있어서 여쭈어 봅니다. ++) 그리고 게임을 제작할 때 BP와 C++을 혼용해도 상관 없을까요? 강의는 전부 C++로 진행되어서 웬만하면 C++로 제작할 예정이지만, BP를 혼용하여 사용하는 것에 있어서 주의점 등이 있는지 궁금합니다.
-
미해결김영한의 실전 자바 - 중급 2편
섹션 10. Collections
Map<String, Integer> map = Map.of("a", 1, "b", 2, "c", 3, "ab", 4); 실행 결과 1번째 map = {a=1, b=2, c=3, ab=4} 2번째 map = {b=2, a=1, ab=4, c=3} 3번째 map = {ab=4, c=3, b=2, a=1} 4번째 map = {b=2, c=3, ab=4, a=1} 5번째 map = {b=2, a=1, ab=4, c=3}Map은 순서를 보장하지 않고, 중복을 허용하지 않습니다. HashMap에서는 key값을 가지고 hashCode를 구하고 hashIndex에 값을 보관하기에 입력한 순서대로 저장하는 것을 보장할 수 없습니다.그런데 map.of()로 생성을 했을 때는, 그 순서가 실행 할 때마다 달라져있습니다. 랜덤으로 돌린 것처럼...왜 매번 입력되는 값의 순서가 달라지는 건가요ㅠㅠ