본문 바로가기

전체 글34

[mac] Laravel 설치하고 database migration 하기 1. composer 설치 > php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" > ls composer-setup.php > php composer-setup.php All settings correct for using Composer Downloading... Composer (version 2.1.6) successfully installed to: /Users/yeojisu/composer.phar Use it: php composer.phar > ls composer-setup.php composer.phar > php -r "unlink('composer-setup.php');" > ls composer.pha.. 2022. 1. 28.
create next-app으로 Next.js 시작하기 ( + TypeScript) 👩‍💻 typescript 기반의 next 앱 설치하기 > yarn create next-app --typescript "my-project"로 project 이름을 정해주었습니다. ⚙️ node 모듈 설치 및 확인하기 > cd my-project > sudo npm install -g n changed 1 package, and audited 2 packages in 635ms found 0 vulnerabilities > sudo n latest installed : v16.6.1 (with npm 7.20.3) node_modules는 yarn 실행시 생기는 것으로 삭제해도 yarn을 실행하면 생성됩니다. > rm -rf ./node_modules > yarn yarn install v1.22.10.. 2022. 1. 26.
macOS에 Homebrew로 Apache 설치하기 1. macOS 11.4 Big Sur 개발환경 세팅 Big Sur 필수 라이브러리 설치를 위해 아래 명령어를 수행합니다. > brew install openssl 내장 Apache가 이미 실행 중인 경우 먼저 종료하고 자동 로드 스크립트를 제거해야 합니다. > sudo apachectl stop > sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null Brew에서 제공하는 Apache HTTPD (오픈 소스 기반 웹 서버)의 새 버전을 설치해야 합니다.설치하면 아래와 같이 DocumentRoot와 아파치 설정 파일의 경로( /opt/homebrew/etc/httpd/httpd.conf)를 알려줍니.. 2022. 1. 24.
postman으로 strapi에서 생성한 database 호출하기 1. strapi에서 테이블 생성 제목과 내용을 담을 수 있는 Post라는 이름을 가진 테이블을 하나 생성하려 합니다. terminal에서 strapi를 실행하여 첫페이지 좌측 PLUGINS의 Content-Types Builder 에서 +Create new collection type을 클릭합니다. Post 테이블 생성 field 추가 해보기 -1) 제목 (name은 contents로, type은 short text로 설정) 2) 내용 (name은 details로, type은 long text로 설정) field 입력 후 save 반드시 누를 것 ! COLLECTION TYPES 에 추가된 걸 확인할 수 있습니다. +Add New Posts 로 내용을 추가해봅니다. 작성 후, save 후 publish.. 2022. 1. 22.
strapi와 mysql 연동 1. mysql 설치하기 MacOS에 mysql 설치 하기 2. strapi 프로젝트 생성 https://strapi.io/documentation/developer-docs/latest/getting-started/quick-start.html 두 가지 방법으로 생성이 가능합니다. > npx create-strapi-starter my-project gatsby-blog > yarn create strapi-starter my-project gatsby-blog Choose your installation type custom으로 선택합니다. Choose your default database client mysql로 선택합니다. database는 앞전에 mysql에서 생성한 빈 데이터베이스(jisu).. 2022. 1. 20.
에라토스테네스의 체 🎻 (Sieve of Eratosthenes) - 백준 1929 python 👷‍♂️ 소수(Prime Number) 판별 알고리즘이다. 소수 ? 1보다 큰 자연수 중 1과 자기 자신만을 약수로 가지는 수 ex) 11은 약수가 1과 11 뿐이므로 소수가 맞지만, 30은 1,2,3,5,6,10,15,30 이 약수로 1과 자기자신 뿐만아니라 다른 수도 약수로 가지므로 소수가 아니다. 🚧 알고리즘 에라토스테네스의 체 = 소수 아닌 숫자를 걸러주는 체 소수가 아닌 수를 지워나가 소수만을 남게 한다. 2부터 소수를 구하고자 하는 구간의 모든 수를 나열한다. 2는 소수이므로 오른쪽에 2를 쓴다. (빨간색) 자기 자신을 제외한 2의 배수를 모두 지운다. 남아있는 수 가운데 3은 소수이므로 오른쪽에 3을 쓴다. (초록색) 자기 자신을 제외한 3의 배수를 모두 지운다. 남아있는 수 가운데 5는 소.. 2022. 1. 19.
반응형