본문 바로가기

분류 전체보기

(283)
여러 기준으로 정렬하기 sql, oracle 일때 SELECT animal_id, name, datetime FROM animal_ins ORDER BY name ASC, datetime DESC
이름 있는 동물 아이디 sql로 할 때 1. SELECT animal_id FROM animal_ins WHERE NOT name IS NULL 2. SELECT animal_id FROM animal_ins WHERE name LIKE '%%' oracle로 할 때 1.SELECT animal_id FROM animal_ins WHERE name IS NOT NULL ORDER BY animal_id 2.SELECT animal_id FROM animal_ins WHERE name LIKE '%%' ORDER BY animal_id
상위 n개 레코드 sql로 할때 SELECT name FROM animal_ins ORDER BY datetime LIMIT 1; oracle로 할때 SELECT name FROM (SELECT name FROM animal_ins ORDER BY animal_ins) WHERE ROWNUM =1;
lv1 완주하지 못한 선수 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 import java.util.*; class Solution { public String solution(String[] participant, String[] completion) { String answer = ""; Arrays.sort(participant); Arrays.sort(completion); //이러면 둘다 정렬이 된다. for(int i =0; i
테스트 하기 docs.djangoproject.com/ko/3.1/intro/tutorial05/ 첫 번째 장고 앱 작성하기, part 5 | Django 문서 | Django Django The web framework for perfectionists with deadlines. Overview Download Documentation News Community Code Issues About ♥ Donate docs.djangoproject.com 를 참고하였다. 쉘 환경에서 테스트 실행 python manage.py test polls 뷰 테스트 >>>from django.test.utils import setup_test_environment >>> setup_test_environment() >>> fro..
명령어 pwd :현재 디렉토리 확인 ls -al : list all unzip 파일 : 압축풀기 tree : tree 구조로 보기 !!원래의 명령어가 아님 sudo apt-get install tree 필요 mkdir :디렉토리 만들기 vi : 편집기 명령 i: 삽입 a:뒤에추가 x:커서 위치 삭제 dd: delete line wq: write and quit q! :quit!
배포시 주의점 1. secrey key txt로 따로 저장하자 SECRET_KEY = os.environ['SECRET_KEY'] 혹은 with open(os.path.join(BASE_DIR,'웹 디렉토리','secret_key.txt')) as f: SECRET_KEY =f.read().strip() 2.DEBUG false 로 하자, 노출되면 안되는 항목이다. 그리고 이 경우 ALLOWED_HOSTS를 지정하자 DEBUG = true로 할 경우에는 자동으로 ALLOWED_HOSTS가 로컬호스트가 된다. 3.STATIC_ROOT STATIC_ROOT =os.path.join(BASE_DIR,'웹 디렉토리','satatic) 하고 정적파일 지정된 디렉토리에 모으기 !!주의 STATICFILES_DIRS 에 STATI..
django.urls.exceptions.NoReverseMatch m.blog.naver.com/PostView.nhn?blogId=hist0134&logNo=220319088307&proxyReferer=https:%2F%2Fwww.google.com%2F Django NoReverseMatch Error 이 에러도 역시 딱히 한글로 된 (내가 보기 편한) 해결책이 없길래포스팅 해보겠습니다 Django에서 URL... blog.naver.com