묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨스프링 시큐리티
Authentication의 details 에 대해 질문 있습니다.
IpAddressFilter에서 authentication.getDetails() 부분에서 최초로 접근할 때는 details가 존재합니다. 이때는 authentication이 AnonymousAuthenticationToken 입니다. 그런데, 이미 인증이 된 후에는 강의에서 만든 AjaxAuthenticationToken이 쓰이는데, 여기서는 getDetails()를 하면 WebAuthenticationDetails가 null이 됩니다. AjaxAuthenticationToken에서도 details를 사용하려면 어떻게 해야할까요?...
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part7: MMO 컨텐츠 구현 (Unity + C# 서버 연동 기초)
적 몬스터가 벽에 부비부비를 합니다
몬스터가 가끔 벽에 부비부비를 시전하는데, 이러한 현상은 다른 많은 게임에서도 볼 수 있던 버그입니다. 예를 들면 스타크래프트의 유닛이 가끔 길을 잃고 벽에 부비부비를 하는 경우가 많은데, 이것과 같다고 생각됩니다. 그래서 많이 볼 수 있는 버그이기 때문에, 정석적인 버그 해결 방법이 있을 것으로 생각됩니다..! 혹시 있다면 이런 현상은 보통 어떻게 해결하는지 여쭙고 싶습니다!
-
미해결인터랙티브 개발 실무 끝장내기 [역량 강화편]
화살표 회전 예제 질문
화살표 회전예제에서 58번째 코드 arrow.style.transform = "rotate("+rotateNum+"deg)"; 에서 arrow가 71번째 줄의 class를 말하는 건가요? 클래스 선택자는 보통 .을 쓰잖아요. 그래서 아무 선택자 없이 그냥 class.~~이렇게 쓰면 되는지 여쭤봅니당..
-
미해결작정하고 장고! Django로 Pinterest 따라만들기 : 바닥부터 배포까지
안녕하세요 파이참 환경이 아닌 주피터 환경도 가능할까요?
안녕하세요 pycham이 아닌 주피터 기존에쓰고있는데 그걸로 사용해도 되나요?
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
타임리프 특징중 하나가 내추럴 템플릿이었던거 같은데
굳이 name과 value를 지우시는 이유가 궁금합니다 개발자 입장에서 html 파일을 처음 작성할 때 굳이 적을 필요가 없다는걸 보여주시려는 이유인건가요?
-
미해결[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)
갑자기 몰입도가 확 떨어졌습니다 정상인가요
파이썬 클래스 객제지향 까진 진짜 잘 들었는데 크롤링 들어가며 HTML하니까 삿갈리고 몰입이 안되네요!? 정상인가요?! ㅜ.ㅜ
-
미해결작정하고 장고! Django로 Pinterest 따라만들기 : 바닥부터 배포까지
intergrityError 질문드립니다.
강의 잘 듣고 있습니다. 선생님. 다름이 아니라, form_valid 구현을 했음에도 불구하고 해당 에러가 지속적으로 발생하였습니다. views.py from profileapp.forms import ProfileCreationFormfrom profileapp.models import Profileclass ProfileCreateView(CreateView): model = Profile form_class = ProfileCreationForm context_object_name = 'targetProfile' success_url = reverse_lazy('accountapp:hello_world') template_name = 'profileapp/create.html' def form_valid(self, form): temp_profile = form.save(commit=False) temp_profile.user = self.request.user temp_profile.save() return super().form_valid(form) 해당 views.py도 문제 없이 잘 작성한 거 같은데, 이런 오류가 왜 계속 발생하는 지 모르겠네요. 답변 부탁드릴게요!
-
미해결더 자바, 애플리케이션을 테스트하는 다양한 방법
enum은 또 "이늄"인가요?
미국 사시는게 맞는지 심히 궁금하네요. "enum" 은 또 "이늄"인가요?"sometimes"는 본토 발음으로 "소메티메스" 맞죠? 아무리 개발 강의라지만 너무하시네요.
-
해결됨홍정모의 따라하며 배우는 C언어 (부록)
질문. warning뜨는 이유
안녕하세요. c6385와 c6386warning이 뜨는 이유가 궁금합니다. 동적할당하고 배열 index도 잘 참조한거 같은데 warning이 안 지워지더라고요..ㅠ 오류 처리 때문인지 교수님 오류처리 코드도 다 따라 쳐 보았지만 소용이 없네요. #include <stdio.h> #include <stdlib.h> #include <String.h> #define LENGTH 100 struct movieinfo { char subj[LENGTH]; double score; }; void manual(void); void print_all_items(struct movieinfo* msptr, int* num); void print_an_item(struct movieinfo* msptr, int* num); void edit_an_item(struct movieinfo* msptr, int* num); void add_an_item(struct movieinfo** mmsptr, int* num); void insert_an_item(struct movieinfo** mmsptr, int* num); void delete_an_item(struct movieinfo** mmsptr, int* num); void delete_all_items(struct movieinfo* msptr, int* num); void save_file(struct movieinfo* msptr, int* num); void search_by_name(struct movieinfo* msptr, int* num); int main() { int input; printf("Please input filename to read press Enter.\n>> "); char fname[LENGTH] = { 0, }; scanf("%s", fname); char a = getchar(); FILE* fmovie = fopen(fname, "r"); if (!fmovie) { perror("ERROR: cannot open file."); exit(1); } puts("6 items have been read from the file.\n"); int num; if (fscanf(fmovie, "%d%*c", &num) != 1) { printf("ERROR: Wrong file format."); exit(1); } struct movieinfo* msptr = (struct movieinfo*)malloc(sizeof(struct movieinfo) * num); if (msptr == NULL) { printf("malloc failed. \n"); exit(1); } for (int i = 0; i < num; i++) { if(fscanf(fmovie, "%[^\n]%*c", msptr[i].subj) != 1 || fscanf(fmovie, "%lf%*c", &msptr[i].score) != 1) { printf("ERROR: Wrong file format.\n"); exit(1); } } while (1) { manual(); scanf("%d%*c", &input); switch (input) { case 1: print_all_items(msptr, &num); break; case 2: print_an_item(msptr, &num); break; case 3: edit_an_item(msptr, &num); break; case 4: add_an_item(&msptr, &num); break; case 5: insert_an_item(&msptr, &num); break; case 6: delete_an_item(&msptr, &num); break; case 7: delete_all_items(msptr, &num); break; case 8: save_file(msptr, &num); break; case 9: search_by_name(msptr, &num); break; case 10: puts("Good bye"); free(msptr); fclose(fmovie); return 0; default: printf("Wrong input.\n"); break; } } free(msptr); fclose(fmovie); return 0; } void manual(void) { printf("Please select an option and press enter.\n"); printf("1. print all items\t2. print an item\n"); printf("3. Edit an item \t4. Add an item\n"); printf("5. Insert an item\t6. Delete an item\n"); printf("7. Delete all items\t8. Save file\n"); printf("9. Search by name\t10. Quit\n>> "); } void print_all_items(struct movieinfo* msptr,int *num) { for (int i = 0; i < *num; i++) { printf("%i : \"%s\". %.1f\n",i, msptr[i].subj, msptr[i].score); } } void print_an_item(struct movieinfo* msptr, int *num) { printf("Input the index of item to print.\n>> "); int input; scanf("%d%*c", &input); if (input<0 || input>*num) printf("invalid item\n"); else printf("%i : \"%s\". %.1f\n", input, msptr[input].subj, msptr[input].score); } void edit_an_item(struct movieinfo* msptr, int* num) { printf("Input the index of item to print.\n>> "); int input; scanf("%d%*c", &input); if (input<0 || input>*num) printf("invalid item\n"); else printf("%i : \"%s\". %.1f\n", input, msptr[input].subj, msptr[input].score); printf("Input new title and press enter.\n>> "); scanf("%[^\n]%*c", msptr[input].subj); printf("Input new rating and press enter.\n>> "); scanf("%lf%*c", &msptr[input].score); printf("%i : \"%s\". %.1f\n", input, msptr[input].subj, msptr[input].score); } void add_an_item(struct movieinfo** mmsptr, int* num) { int flag; *num = *num + 1; struct movieinfo* msptr = (struct movieinfo*)malloc(sizeof(struct movieinfo) * *num); if (msptr == NULL) { printf("malloc failed. \n"); exit(1); } for (int i = 0; i < *num - 1; i++) { strcpy(msptr[i].subj, (*mmsptr)[i].subj); msptr[i].score = (*mmsptr)[i].score; } printf("Input title and press enter.\n>> "); flag = scanf("%[^\n]%*c", msptr[*num - 1].subj); printf("Input rating and press enter.\n>> "); flag = scanf("%lf%*c", &msptr[*num - 1].score); printf("%i : \"%s\". %.1f\n", *num - 1, msptr[*num - 1].subj, msptr[*num - 1].score); free(*mmsptr); *mmsptr = msptr; } void insert_an_item(struct movieinfo** mmsptr, int* num) { printf("Input the index of item to insert.\n>> "); int input; scanf("%d%*c", &input); *num = *num + 1; struct movieinfo* msptr = (struct movieinfo*)malloc(sizeof(struct movieinfo) * *num); if (msptr == NULL) { printf("malloc failed. \n"); exit(1); } for (int i = 0; i < *num - 1; i++) { strcpy(msptr[i].subj, (*mmsptr)[i].subj); msptr[i].score = (*mmsptr)[i].score; } int imp = *num; for (; imp - 1 > input; imp--) { strcpy(msptr[imp - 1].subj, msptr[imp - 2].subj); msptr[imp - 1] = msptr[imp - 2]; } printf("Input title and press enter.\n>> "); scanf("%[^\n]%*c", msptr[input].subj); printf("Input rating and press enter.\n>> "); scanf("%lf%*c", &msptr[input].score); printf("%i : \"%s\". %.1f\n", input, msptr[input].subj, msptr[input].score); free(*mmsptr); *mmsptr = msptr; } void delete_an_item(struct movieinfo** mmsptr, int* num) { printf("Input the index of item to delete.\n>> "); int input; scanf("%d%*c", &input); *num = *num - 1; struct movieinfo* msptr = (struct movieinfo*)malloc(sizeof(struct movieinfo) * *num); if (msptr == NULL) { printf("malloc failed. \n"); exit(1); } int imp = input; for (; input < *num; input++) { strcpy((*mmsptr)[input].subj, (*mmsptr)[input + 1].subj); (*mmsptr)[input].score = (*mmsptr)[input + 1].score; } for (int i = 0; i < *num; i++) { strcpy(msptr[i].subj, (*mmsptr)[i].subj); msptr[i].score = (*mmsptr)[i].score; } free(*mmsptr); *mmsptr = msptr; } void delete_all_items(struct movieinfo* msptr, int* num) { *num = 0; msptr = NULL; } void save_file(struct movieinfo* msptr, int* num) { printf("Please input filename to write and press Enter.\n>> "); char fname[LENGTH] = { 0, }; scanf("%s", fname); FILE* fmovie = fopen(fname, "w"); fprintf(fmovie, "%d\n", *num); for (int i = 0; i < *num; i++) { fprintf(fmovie, "%s\n%.1lf\n", msptr[i].subj, msptr[i].score); } printf("%d items have been saved to the file.\n",*num); fclose(fmovie); } void search_by_name(struct movieinfo* msptr, int* num) { printf("Input title to search and press enter.\n>> "); char strcm[LENGTH] = { 0, }; scanf("%[^\n]%*c", strcm); int i; for (i = 0; i < *num; i++) { if (strcmp(strcm, msptr[i].subj) == 0) break; } if (i == *num) printf("No movie found : %s\n", strcm); else printf("%i : \"%s\". %.1f\n", i, msptr[i].subj, msptr[i].score); }
-
미해결스스로 구축하는 AWS 클라우드 인프라 with 테라폼(Terraform) - 기본편
대괄호[]의 의미
안녕하세요. 강의 재밌게 듣고 있습니다. 다름이 아니라 다른 resource이나 variable를 참조할 때 리소스타입.리소스이름.속성 aws_vpc.test.id 이런 형태로 사용을 하는데 간혹 [aws_security_group.tf-asg-sg.id] 이렇게 대괄호를 사용하는 경우가 있는데 어떤 차이가 있는지 궁금해서 질문 남겨 봅니다. Have a nice day!
-
미해결작정하고 장고! Django로 Pinterest 따라만들기 : 바닥부터 배포까지
녹화 하실 때 사용하신 장비 좀...^^;
화면 각도하고 음성녹음이 상당히 좋았는데 저도 한번 장만하고 싶은 데 어떤 장비 였는지 알 수 있을까요? 특히 마이크요! 감사합니다^^
-
미해결더 자바, 애플리케이션을 테스트하는 다양한 방법
"assume" 발음이 "어줌"인가요?
미국에서 직장다니신다고 들었는데, 본인 계신 곳에서는 assume을 "어줌"이라고 발음하나요? 본인만의 발음인가요? 콩글리시인가요? 아니면 서부 사투리인가요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기
개행태그 질문드립니다.
구글링 해봐도 동영상처럼 적용하는 방법이 안나와서 질문드립니다.! <br/> 태그를 집어넣어도 페이지에서는 적용이 안된듯 한행에 컴포넌트 내용이 다 표시되는데 어떤 설정을 해야하나요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
TypeError: Cannot read properties of undefined (reading 'prototype')오류를 해결하지 못하겠습니다...
강의 감사합니다. 강의 내용을 따라하면서 많은 에러를 고쳤지만 이번 에러는 쉽게 해결하기 어려워 질문남깁니다..! 따라치다가 분명 어디서 실수가 난 것 같은데 몇번이고 돌려봐도 못찾았습니다. https://github.com/HumanHyeon/NodeJS
-
미해결자바스크립트 알고리즘 문제풀이 입문(코딩테스트 대비)
while문을 이용해서 풀었는데 한번 봐주세요
function solution(str, t) { let answer = []; let q = []; for (let i = 0; i < str.length; i++) { if (str[i] === t) { answer[i] = 0; continue; } q.push([str[i], 1]); while (q.length > 0) { const [c, num] = q.shift(); const left = i - num; const right = i + num; if (c === undefined) continue; if (c !== t) { q.push([str[left], num + 1], [str[right], num + 1]); } if (c === t) { answer[i] = num - 1; q = []; } } } console.log(answer); } 요소의 왼쪽, 오른쪽 값들을 q에 넣어 bfs 형식으로 풀어봤는데 괜찮을까요?
-
미해결따라하며 배우는 리액트, 파이어베이스 - 채팅 어플리케이션 만들기[2023.12 리뉴얼]
파이어베이스 v7,v8과 v9의 차이
선생님 안녕하세요 강의를 듣는 도중 firebase config 설정부터 database에 data를 넣는 과정까지 지속적으로 끊임없이 오류가 나서 이렇게 질문을 드리게됬습니다. 제가 지금 강의를 듣고있는 9월 26일 기준으로 npm install firebase를 하게되면 firebase의 버전이 ^9.1.0이 설치가 되는데요 선생님꺼 소스코드의 package.json을 보니 firebase가 7버전대이고 다른 오류가 나지않은 분들 버전을 보면 8버전대인것을 확인했습니다. 9버전부터 SDK로 바뀌면서 좀 더 용량도 작고 효율성이 증가된 버전으로 변화되어있다라고 공식문서를 통해 알게되었습니다. 9버전대부터는 7,8버전대에 사용하던 방법이 아예 먹지를 않는것 같습니다. 그래서 공식문서를 통해 9버전의 코드를 사용하여 해결을 해왔었는데요 근데 이게 1강 1강 진행할때마다 지속적으로 선생님이 강의해주시는 코드랑 모두 달라서 firebase에 익숙하지 않은 제가 더이상 강의를 진행할수 없을정도 까지 오게 된것같습니다. 구글링을 통해서 버전9의 다양한 예제들을 찾아보았지만 마땅한 자료도 찾지를 못했는데요 그냥 강의를 firebase 8버전대를 사용하여 진행을 해야할까요?? 아니면 9버전이 7.8버전까지 모두 호환을 해주고 있는데 제가 해결방법을 못찾고있는건지를 여쭤보고싶습니다!! 제가 9버전 코드를 참고한 곳은 https://firebase.google.com/docs/reference/js?authuser=0 여기 이며, 제 레포지토리 주소는 https://github.com/godtaehee/Chat 여기 입니다. RegisterPage.js에 제가 이제 해결하지 못한 Database에 Data를 저장하기 부분을 주석처리를 해놓았습니다. 긴 질문 읽어주셔서 감사합니다.
-
미해결갖고노는 MySQL 데이터베이스 by 얄코
데이터가 잘못 들어가 있는거 같아요
menus의 fk_business_id 16번이 순대메뉴들이고 17번이 피자와 까르보나라 인데 business_id의 16번은 노선이탈리아고 17번은 커피앤코드네요 18번이 신림동백순대입니다
-
미해결갖고노는 MySQL 데이터베이스 by 얄코
궁금증
biz-simple.hbs, biz-adv.hbs에서 각각 고급화면으로 보기, 단순화면으로 보기에서 a태그에 {{q.section}} 값이 있는데요. biz-adv.hbs는 index.js에 q : req.query 가 있어서 q.section에 쿼리 값이 넘어가는거 같은데 biz-simple은 index.js에 q : req.query가 없는데 a태그에 {{ q.section}}이 포함되어 있는 상태더라구요 q : req.query가 없으면 아무런값도 못넘겨 주니 필요없어 보이는데 왜 들어가 있는건가요?
-
미해결스프링 시큐리티
인증 실패 메세지 출력 질문입니다.
안녕하세요! 로그인 실패시 Failure 핸들러에서 리다이렉트할 때 요청 파라미터로 에러 여부와 에러메세지를 전달해서 컨트롤러에서 해당 파라미터 값을 모델에 담아서 뷰에 전달해서 뷰에서 에러메세지를 출력하는 것으로 이해 하였는데요! 스프링 MVC 공부할 떄 폼 데이터 검증 처리할 때 컨트롤러 단에서 bindingresult 를 이용해서 타임리프 뷰 템플릿 에러와 연동해서 에러메세지 출력하는 방법을 배웠었는데요! 실제로 실무에서 시큐리티 사용할 때 이런 에러메세지 처리는 강의처럼 파라미터로 전달해서 출력하는지요? 아니면 bindingresult를 이용할 수도 있나요?
-
미해결[리뉴얼] Node.js 교과서 - 기본부터 프로젝트 실습까지
질문 있습니다!
안녕하세요 카카오톡 로그인을 연동해서 채팅방을 만들고 있는 학생입니다. 다름이 아니라 제가 수정하고 싶었던 사항들은 거의다 수정이 완료되어서 검색기능을 추가해보려고 하는데요! 메인 화면에서 검색창에 방제목을 적으면 방 제목과 관련된 방만 리스트에 출력하도록 만들어보려고 합니다 ! 일단 프론트에 검색할 수 있도록 검색창을 만들었구요! 서칭을 계속해봤는데 query를통해서 사용자 입력을 받고, sql 문법인 와일드카드 like %입력내용%를 사용해야한다고는 하는데, 적용하려니까 너무 막막합니다 ㅠㅠ 혹시 약간의 힌트를 주실 수 있으실까요? 만약 공식문서를 참고해야한다면 어떤 키워드를 중점으로 공부해나가야할까요?ㅠㅠ 도와주십쇼 !!