inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

나만의 프레임워크 작성 후, 운영환경 배포에 관한 문의 드려요

해결됨

PHP 7+ 프로그래밍: 객체지향

안녕하세요. 강의를 듣고 공부해보고 있는 개발자입니다. 일단 너무 감사하게 잘 듣고 있습니다. 이런 강의는 잘 없어서 나쁜 구조(클래스 중복, 날로 해버리는 코드)로만 유지보수를 해오고 있었었고 개선하고 싶은 생각이 많이 들었거든요. PHP에 숨겨진(잘모르는) 기능도 알아가게 되서 무한 감사합니다. 다름이 아니라 nginx 를 사용해서 쓰고 싶은데 잘 작동하지 않는 것 같아 질문드립니다. php -S localhost:8080 -t public 커맨드를 이용했을 땐, 크게 문제가 없는 상태입니다. 한 가지 예로 nginx에 연동하면 라우팅 쪽이 원하는대로 작동되지 않습니다. get '/call' 에서 resource/call.php 를 호출해서 echo 'call' 을 실행시키게 해두었는데 get '/call' 시, / 의 resource/index.php 내의 echo 'hello World' 가 출력이 되고 있어서 어떤 것을 확인하면 좋을지 몰라 질문드립니다. nginx에 설정에 문제로 생각이 들긴하는데, 잘 모르겠습니다. PHP는 8.1을 사용하고 nginx설정은 다음과 같습니다. server { listen 80; listen [::]:80; root /var/www/html/app/public; index index.php; server_name localhost; error_log /var/www/html/log/nginx/error.log; access_log /var/www/html/log/nginx/access.log; charset utf-8; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_pass unix:/run/php/php8.1-fpm.sock; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; } }

  • php
  • 객체지향
geol2 댓글 1 좋아요 0 조회수 434

npm run dev시 password 다르다고 나옴

미해결

따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)

에러 종류: 위와 같은 환경에서 error: password authentication failed for user "postgres" 로 추정되는 에러 발생 아마 서버 연결시 인증 문제로 보입니다. 작동 절차: docker-compose up 입력, server 파일로 이동, npm run dev 실행. 에러 발생 +1) POSTGRES_HOST_AUTH_METHOD: trust로 설정하고 서버 새로 만들어도 동일한 에러가 발생하여 무슨 문제일지 잘 모르겠네요.. 도움 주시면 감사하겠습니다. +2) 아래에 터미널의 전체 에러 코드 남깁니다. C:\Users\tukim\Desktop\reddit-clone-app\server>npm run dev > server@1.0.0 dev > nodemon --exec ts-node ./src/server.ts [nodemon] 3.0.1 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: ts,json [nodemon] starting ts-node ./src/server.ts server running at https://localhost:4000 error: ����� "postgres"�� password ������ �����߽��ϴ� at Parser.parseErrorMessage (C:\Users\tukim\Desktop\reddit-clone-app\server\node_modules\pg-protocol\src\parser.ts:369:69) at Parser.handlePacket (C:\Users\tukim\Desktop\reddit-clone-app\server\node_modules\pg-protocol\src\parser.ts:188:21) at Parser.parse (C:\Users\tukim\Desktop\reddit-clone-app\server\node_modules\pg-protocol\src\parser.ts:103:30) at Socket.<anonymous> (C:\Users\tukim\Desktop\reddit-clone-app\server\node_modules\pg-protocol\src\index.ts:7:48) at Socket.emit (node:events:513:28) at Socket.emit (node:domain:489:12) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Socket.Readable.push (node:internal/streams/readable:234:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23) { length: 107, severity: 'ġ��������', code: '28P01', detail: undefined, hint: undefined, position: undefined, internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'auth.c', line: '329', routine: 'auth_failed' }

  • react
  • node.js
  • postgresql
  • docker
  • typescript
  • 클론코딩
  • next.js
지말미 댓글 2 좋아요 0 조회수 714

17298 오큰수 구하기 질문있습니다.

미해결

Do it! 알고리즘 코딩테스트 with Python

올려주신 코드로 공부하고 백준에 업로드 해 본 결과 시간 초과가 뜨는데, 시간 초과가 되지 않게 하려면 어떻게 수정할 수 있을까요 ?

  • python
  • 코딩-테스트
  • 알고리즘
스탑수 댓글 2 좋아요 1 조회수 707

higher order function 에서

미해결

실리콘밸리 엔지니어가 가르치는 파이썬 기초부터 고급까지

128줄에 return inside에서 inside()를 안하는 이유가 궁금합니다 @higher_order_example 자체가 inside 리턴받은 함수를 자동으로 ()붙여서 실행해주는 것인가요? 136줄에 sample_example()을 안쓰면 121줄에 있는 func 매개변수로 못넣는것인가요???

  • python
  • 알고리즘
남기정 댓글 2 좋아요 1 조회수 368

post? get?

미해결

PHP 개발자의 최종 테크트리, 라라벨 강의

Post는 api쪽으로 처리되고 Get은 Web 쪽으로 처리가 되는것으로 확인이 됩니다. 지켜져야 할 약속인지 궁금합니다.

  • php
  • Laravel
댓글 2 좋아요 0 조회수 267

강의 잘듣고 있습니다.

미해결

PHP 개발자의 최종 테크트리, 라라벨 강의

현재 설명 주신 부분 중 Route / Controller 이 있습니다. Route가 현재 FTController 역할을 하는 게 맞는지요 ? 현업에서도 현 강의방식대로 진행되는 부분인지 궁금합니다.

  • php
  • Laravel
댓글 1 좋아요 0 조회수 252

선생님 데이터 import가 안돼요 ㅠㅠ

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 강의 내용을 질문할 경우 몇분 몇초의 내용에 대한 것인지 반드시 기재 부탁드립니다. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 선생님 보스턴 가격예측 데이터 임포트가 안돼요 ㅠㅠ

  • python
  • 머신러닝
  • 통계
이호준 댓글 2 좋아요 0 조회수 497

'블랙핑크' 검색 시에만 오류가 뜨는 현상

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

안녕하세요. 강사님 아래 코드에서 '블랙핑크' 를 검색할 때 Traceback (most recent call last): File "c:\pratice_crolling\심화1_\03_스포츠 뉴스 크롤링.py ", line 52, in <module> print(article_title.text.strip()) ^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'text' 다음과 같은 오류가 뜹니다 ㅠㅠ CSS 선택자, 오타도 모두 맞게 확인이 되는데 왜 저 검색어만 오류가 뜰까요ㅠㅠ? # -*- coding: euc-kr -*- # 네이버에서 손흥민, 오승환과 같은 스포츠 관련 검색어 크롤링하기 import requests from bs4 import BeautifulSoup import pyautogui import time search = pyautogui.prompt("어떤 것을 검색하시겠어요?") response = requests.get(f"https://search.naver.com/search.naver?sm=tab_hty.top&where=news&query={search}&oquery=%EC%98%B7%EC%9C%BC%ED%99%98&tqi=i74G%2FdprvTossZPeMhCssssssko-058644") html = response.text soup = BeautifulSoup(html, "html.parser") articles = soup.select(".info_group") for article in articles: # '네이버뉴스' 가 있는 기사만 추출한다. (<a> 하이퍼링크가 2개 이상인 경우에 해당) links = article.select("a.info") if len(links) >=2 : url = links[1].attrs['href'] response = requests.get(url, headers={'User-agent':'Mozila/5.0'}) html = response.text soup = BeautifulSoup(html, "html.parser") # 스포츠 기사인 경우 if "sports" in url: article_title = soup.select_one("h4.title") article_body = soup.select_one("#newsEndContents") # 본문 내에 불필요한 내용 제거 p태그와 div태그의 내용은 출력할 필요가 없다. 없애주자. p_tags = article_body.select("p") # 본문에서 p 태그인 것들을 추출 for p_tag in p_tags: p_tag.decompose() div_tags = article_body.select("div") # 본문에서 div 태그인 것들을 추출 for div_tag in div_tags: div_tag.decompose() # 연예 기사인 경우 elif "entertain" in url: article_title = soup.select_one(".end_tit") article_body = soup.select_one("#articeBody") # 일반 뉴스 기사인 경우 else: article_title = soup.select_one("#title_area") article_body = soup.select_one("#dic_area") # 출력문 print("==================================================== 주소 ===========================================================") print(url.strip()) print("==================================================== 제목 ===========================================================") print(article_title.text.strip()) print("==================================================== 본문 ===========================================================") print(article_body.text.strip()) #strip 함수는 앞 뒤의 공백을 제거한다. time.sleep(0.3)

  • python
  • 웹-크롤링
댓글 2 좋아요 0 조회수 325

api 질문입니다.

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

포토폴리오 마이페이지 - 내포인트 부분을 작업하는 도중 api 질문입니다. fetchPointTransactionsOfBuying 이 내포인트 -> 구매내역 api로 알고있습니다. 피그마를 보면 거기서 판매자 데이터를 가져오고있는데 오류가 뜨네요.ㅠ 판매자 데이터를 가져오고 싶은데 여기서 seller {name} 이부분을 넣으면 데이터가 안가져오네요.. 판매자데이터가 없어서 그런건지 왜 그런지와 어떻게 해야하는지 두가지 모두 알고싶습니다.

  • react
  • node.js
  • seo
  • graphql
  • next.js
임프런 댓글 2 좋아요 0 조회수 381

강의변경

해결됨

워드프레스 제대로 개발하기 - 클라이언트 편

클라이언트 초기부분에 어드민 리뷰를 해주시는 것을 듣는데 어드민강의가 저에게 더 필요할것 같습니다. 혹시 어드민으로 강의를 변경해주실수 있을까요? 부탁드리겠습니다.

  • wordpress
  • php
sunhye kwon 댓글 1 좋아요 0 조회수 406

PDF파일이 어디에 있나요?

해결됨

Python 알고리즘 베스트 10

안녕하세요 PDF파일은 출력하려고 하는데, 노션을 보면 "PDF 노션 페이지에서 다운로드하실 수 있습니다." 로만 되어있는데 다운받을 수 있는 링크는 어디에 있나요? 노션에서 전체PDF출력하려면 비지니스라서 불가능한데... 확인부탁드립니다.

  • python
  • 코딩-테스트
한형섭 댓글 2 좋아요 0 조회수 485

admin 에 나타나지 않는 몇몇 필드들

미해결

파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트

안녕하세요, 강의를 잘 듣고 있습니다. 모델 필드에 있는 몇몇 필드들이 admin에 나타나지 않더군요 예를 들면, updated_at, created_at 같은 필드들이요 이를 위해서 admin 페이지에 일일히 모델 필드를 list_display에 등록해줘야 하는게 맞나요? from django.contrib import admin # Register your models here. from .models import * admin.site .empty_value_display = "-empty-" admin.site .register(Product) admin.site .register(CartProduct) class OrderAdmin(admin.ModelAdmin): list_display = ['customer', 'transaction_id', 'total_price'] admin.site .register(Category) admin.site .register(UserProfile) admin.site .register(Order) admin.site .register(OrderedProduct) admin.site .register(ShipmentInfo) 그럼 제가 직접만든 모델의 경우에는 그렇다 쳐도.. allauth에 있는 site domain 부분이 나오질 않는거에요 ㅠㅠ... 제가 뭘 잘못 건드렸는 지 모르겠는데, 맨처음 프로젝트할 때에는 allauth의 소셜 어플리케이션 부분에 사이트 도메인을 입력할 수 있는 커다란 박스가 있었는데, 그것만 또 안난옵니다. 제가 뭘 잘못한건지 ㅠㅠ 원래 잘 나오던건데... 이번에 파이참 커뮤니티 에디션에서 유료버전으로 바꾸고, 프로젝트를 만들고 나니 admin에 몇몇 모델의 필드들이 잘 보이지 않습니다. verbose name을 설정된것들이 특히 그런 거 같은데 무엇이 문제인지 도통 모르겠습니다. 그렇다고 allauth를 제가 admin에 등록해야하는걸까요? 2.제가 모르는 무언가가 있는걸까요?

  • react
  • python
  • django
  • docker
paichai17 댓글 1 좋아요 0 조회수 307

[Error] Uncaught SyntaxError: Unexpected token 에러

미해결

PHP 개발자의 최종 테크트리, 라라벨 강의

세션4 컨트롤러 안의 클래스의 설명과 _construct, protected 변수, bind, singleton 을 사용하는 것을 실습하여 봅니다. >> 라라벨과 php 를 강의 따라 설정한 것은 아니구요. 기존에 테스트겸 설치해 놓은 것 그대로 사용하고 강의 따라 확인하고 있습니다. php 는 거의 사용을 안해 봤구요. 따라 하다 단순 SyntaxError 가 발생합니다. php 버전 때문일까요 ? php 버전 8.1.10 laravel 버전 8.82.0 namespace App\Providers; use Illuminate\Support\ServiceProvider; use App\Http\Controllers\Acontroller; // 다른 namespace 영역이기 때문에 포함시켜야 함 use App\Http\Controllers\Basecontroller; class Aprovider extends ServiceProvider { /** * Register any application services. * * @return void */ public function register() { // $this->app->bind(Acontroller::class, functions($app) { return new Acontroller($app->make(Basecontroller::class)); } ); }

  • php
  • Laravel
cancnet 댓글 1 좋아요 0 조회수 788

ansible-server에 pywinrm 설치 시, 에러 발생하여 문의드립니다.

미해결

구성 관리 자동화 도구 - 앤서블(Ansible)

안녕하세요. 아래 섹션 실습 중, 에러가 발생하여 문의드립니다. 섹션 9 : [응용] 윈도우 관리학 - (1)베이그런트를 이용해서 윈도우를 추가하기 Ansible_env_ready.yaml 에 아래와 같이 추가 후, vagrant provision ansible-server을 수행했는데 pvwinrm 설치 과정에서 에러가 발생하였습니다. - name: Install python-pip yum: name: python-pip state: present - name: Install pywinrm pip: name: pywinrm state: present ansible-server에 접속하여 수동으로 pip install pywinrm을 수행했는데 역시 에러가 발생합니다. python 버전을 업그레이드 하라고 메시지가 나오는데 향후 수업 따라하기 시, 영향이 있을 듯 하여 선뜻 테스트하지 못 하고 있습니다. 해결 방법에 대해서 가이드 부탁드리겠습니다. 감사합니다 !

  • ansible
  • pywinrm
  • python
doore.park 댓글 1 좋아요 0 조회수 638

singleton 결과값이 변경되지 않습니다.

미해결

PHP 개발자의 최종 테크트리, 라라벨 강의

안녕하세요. 해당 강의 실습시 해결되지 않는 부분이 있어 문의 드립니다. bind -> singleton 으로 변경했는데요. 결과값이 변경되지 않습니다. 어느부분을 놓쳤는지 알려주시면 감사하겠습니다. 결과값 Acontroller.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; class Acontroller extends Controller { protected $result; protected $basecontroller; public function __construct(Basecontroller $basecontroller) //서비스 컨테이너 { $this->basecontroller = $basecontroller; } public function multiple($num) { $this->result = $this->basecontroller->plus($num)*10; return $this->result; } } Basecontroller.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; class Basecontroller extends Controller { protected $result; public function __construct() { $this->result = 0; } public function plus($num) { $this->result = $num+5; return $this->result; } } Aprovider.php <?php namespace App\Providers; use Illuminate\Support\ServiceProvider; use App\Http\Controllers\Acontroller; use App\Http\Controllers\Basecontroller; class Aprovider extends ServiceProvider { /** * Register services. */ public function register(): void { $this->app->singleton(Acontroller::class, function($app) { return new Acontroller($app->make(Basecontroller::class)); }); } /** * Bootstrap services. */ public function boot(): void { // } } web.php <?php use Illuminate\Support\Facades\Route; use App\Http\Controllers\Acontroller; Route::get('/', function () { return view('welcome'); }); Route::get('/one', function () { for ($i=0; $i < 3; $i++) { echo app(Acontroller::class)->multiple(2); echo "<br />"; } return "------------"; }); app.php App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, App\Providers\Aprovider::class,

  • php
  • Laravel
조효진 댓글 2 좋아요 0 조회수 416

작업형2 모의문제1

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

train 데이터를 별도 분리안하고 범주형은 라벨 인코더로 스케일링하고나서 수치형데이터도 값이 큰건 minmaxscaler나 robustscaler로 적용하고 싶어서 개별 컬럼 선택해서 적용해보는데... 에러가 뜨는데 머가 문제인지 알수 있을까요? 수치형 범주형 개별로 스케일링 하고 싶으면 데이터를 분리했다가 다시 합쳐야 하는 걸까요? train['Total_Trans_Amt'] = scaler.fit_transform(train['Total_Trans_Amt']) test['Total_Trans_Amt']=scaler.transform(test['Total_Trans_Amt'])

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
한상윤 댓글 1 좋아요 0 조회수 401

싸이월드 실습 4탄 질문이요 ㅠㅠ

미해결

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

싸이월드 실습 4탄 하는 중인데 LOTTO 부분에 "특히 버튼과 숫자박스 부분"이 왜 세로로 다닥다닥 붙어있을까요..ㅠ game__container 부분에 flex-direction: column; align-items: center; justify-content: space-between; padding: 20px; 가 들어있고 lotto__text부분에도 display: flex; flex-direction: column; align-items: center; justify-content: space-between; 를 넣어봤으나 아무 변화가 없었습니다 ㅠ game.html: <!DOCTYPE html> <html lang="ko"> <head> <title>Game</title> <link href="./styles/game.css" rel="stylesheet"> </head> <body> <div class="wrapper"> <div class="wrapper__header"> <div class="header__title"> <div class="title">GAME</div> <div class="subtitle">TODAY CHOICE</div> </div> <div class="divideLine"></div> </div> <div class="game__container"> <img src="./images/word.png"> <div class="game__title">끝말잇기</div> <div class="game__subtitle">제시어 : <span id="word">코드캠프</span> </div> <div class="word__text"> <input class="textbox" id="myword" placeholder="단어를 입력하세요"> <button class="search">입력</button> </div> <div class="word__result" id="result">결과!</div> </div> <div class="game__container"> <img src="./images/lotto.png"> <div class="game__title">LOTTO</div> <div class="game__subtitle"> 버튼을 누르세요. </div> <div class="lotto__text"> <div class="number__box"> <div class="number1">3</div> <div class="number1">5</div> <div class="number1">10</div> <div class="number1">24</div> <div class="number1">30</div> <div class="number1">34</div> </div> <button class="lotto_button">Button</button> </div> </div> </div> </body> </html> game.css: * { box-sizing: border-box; margin: 0px } html, body{ width: 100%; height: 100%; } .wrapper { width: 100%; height: 100%; padding: 20px; display: flex; flex-direction: column; /* 박스가 wrapper안에 game__container 두개 총 세개*/ align-items: center; justify-content: space-between; } .wrapper__header{ width: 100%; display: flex; flex-direction: column; } .header__title{ display: flex; flex-direction: row; align-items: center; } .title{ color: #55b2e4; font-size: 13px; font-weight: 700; } .subtitle{ font-size: 8px; padding-left: 5px; } .divideLine{ width: 100%; border-top: 1px solid gray; } .game__container{ width: 222px; height: 168px; border: 1px solid gray; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 20px; background-color: #f6f6f6; } .game__title { font-size: 15px; font-weight: 900; } .game__subtitle { font-size: 11px; } .word__result { font-size: 11px; font-weight: 700; } .word__text { width: 100%; display: flex; flex-direction: row; justify-content: space-between; } .textbox { width: 130px; height: 24px; border-radius: 5px; } .search { font-size: 11px; font-weight: 700; width: 38px; height: 24px; } .number__box{ width: 130px; height: 24px; border-radius: 5px; background-color: #FFE400 ; display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .lotto__text { display: flex; flex-direction: column; align-items: center; justify-content: space-between; } .number1{ font-size: 10px; font-weight: 700px; margin: 5px; } .lotto_button { font-size: 11px; font-weight: 700; width: 62px; height: 24px; }

  • react
  • node.js
  • seo
  • graphql
  • next.js
전현욱 댓글 2 좋아요 0 조회수 471

async await

미해결

따라하며 배우는 리액트 A-Z[19버전 반영]

안녕하세요. banner.js에서 질문이 있습니다 이 부분에서 왜 async await를 사용하셨는지 궁금합니다! const fetchData = async () => { // 현재 상영중인 영화 정보를 가져오기(여러 영화) const request = await axios.get(requests.fetchNowPlaying); // 여러 영화 중 영화 하나의 ID를 가져오기 const movieId = request.data.results[ Math.floor(Math.random() * request.data.results.length) ].id; // 특정 영화의 더 상세한 정보를 가져오기(비디오 정보도 포함) const { data : movieDetail } = await axios.get(`movie/${movieId}`, { params: {append_to_response: "videos"}, }); setMovie(movieDetail); }

  • react
  • redux
  • tdd
  • typescript
  • next.js
  • 소프트웨어-테스트
puding0712 댓글 1 좋아요 0 조회수 372

인기 태그

인프런 TOP Writers

주간 인기글