일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- 중복제거
- Delphi
- rank
- delphi 10.3
- Django
- GIT
- PyCharm
- MSSQL
- COMMIT
- Push
- declare
- blog
- 델파이
- get_object_or_404
- 백준
- github
- TMS
- dbadvgrid
- pyhcarm
- hackerrank
- queryset
- templates
- HTML
- advColumnGrid
- pythonanywhere
- python3
- Visual Studio
- c#
- python 3.7
- anaconda3
- Today
- Total
목록분류 전체보기 (60)
DevHyun
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/FEZgh/btqMdim8BwA/J2Mf16YBtKksMxvhplJ5YK/img.png)
* 상황설명 우선 sqlite3를 사용하다보니 pythonanywhere에서 배포 할때 문제가 생겼다. pythonanywhere에서 배포하려면 pull을 해야하는데 이때 db.sqlite3 파일도 같이 pull 되어버려서 덮어씌어지는 현상이 발생하였다. 이렇게 되면 pythonanywhere에서 배포된 페이지에서 입력된 데이터들은, pull을 기점으로 local 데이터로 덮어씌어지게 된다. 예를들어 1. local(127.0.0.1)에서 테스트로 test / 1 이란 포스트를 올렸고, 이상태에서 github 로 push 2. devhyun.pythonanywhere.com 에서 테스트로 testtest / 2 란 포스트를 올린 뒤 github에서 pull 이렇게 되면 pythonanywhere에서 입력..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/blL8R6/btqMb0njAVT/IMg0S2tjUPXnObMjLsk3z0/img.png)
pythonanywhere에서 pull 할때마다 db.sqlite3 파일이 덮어씌어 져서 데이터가 날아가곤 했다. Blog App의 DB를 pythonanywhere에서 제공하는 database 환경(mysql)으로 변경하였음! pythonanywhere에서는 잘 작동하지만 local에서는 pythonanywhere의 mysql로 접근이 안되는 현상이 발생. local에서 작업 한 것을 pythonanywhere에서 배포만 하는 작업 형태인 나에겐 큰 이슈! local에서는 sqlite을 이용하여 개발을 하고 pythonanywhere에서는 mysql로 개발 하기 위해서는 db.sqlite3 파일을 github에 push 할 필요성을 못느꼈음. github에 push할 때 특정 파일들을 ignore 하고..
1. pythonanywhere - console 창 열기 2. push 할 directory로 이동하기 - cd DevhyunDjangoBlog 3. git init 4. git add . 5. git commit -m 'message' 6. 해당 repository 주소 입력 - git remote add orgin https://github.com/jnhn333/DevhyunDjangoBlog 7. git push origin master
www.hackerrank.com/domains/sql Write a query to print all prime numbers less than or equal to 1000. Print your result on a single line, and use the ampersand (&) character as your separator (instead of a space). For example, the output for all prime numbers 이렇게 지정한 이유는 안쪽 WHILE문에서 @LOOP 보다 @SELF(자기자신)이 작을 경우 아예 WHILE문을 안타버려서 긴급 조치! 3 이상부터는 WHILE문 정상작동 하기때문에 @BOOL을 초기값인 FALSE로 지정. * 안쪽 WHILE문 : L..
www.hackerrank.com/domains/sql P(R) represents a pattern drawn by Julia in R rows. The following pattern represents P(5): * * * * * * * * * * * * * * * Write a query to print the pattern P(20). 번역 : 5개부터 시작해서 하나씩 줄여나가면서 별을 찍었듯이 20개 부터 시작해서 별을 찍어라 프로그래밍 언어 시작할때 반복문 예제로 많이 쓰이는 그 문제! 풀이 : 일단 SELECT 문으로는 힘들것 같아서 프로시져를 사용하기로 생각했음! 생각보다 어려웠다. PRINT REPLICATE를 몰랐다면 못풀었을 듯.. REPLICATE 함수 자체는 원하는 숫자만큼 원하..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bcoxl5/btqL3v1ApMS/URhXeVz13LPoCjD8FwS6y0/img.jpg)
www.hackerrank.com/domains/sql Query the two cities in STATION with the shortest and longest CITY names, as well as their respective lengths (i.e.: number of characters in the name). If there is more than one smallest or largest city, choose the one that comes first when ordered alphabetically. The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the west..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/LVfQX/btqL1o9MDPA/TRP2mC5cSx5aSAWQjxTu01/img.jpg)
www.hackerrank.com/domains/sql Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table. The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. For example, if there are three records in the table with CITY values 'New York', 'New York', 'Bengalaru', there are 2 dif..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cMk98j/btqL7vTCVDy/dFfJTf03JOvDkBdbyYvTU0/img.jpg)
www.hackerrank.com/domains/sql Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer. The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. 짧은 영어실력으로 번역하자면.. STATION 테이블의 CITY 필드를 추출해 내는 것이 목표이고, 조건은 ID가 EVEN(짝수) 일 것. 정렬 순서는 상관없고 중복제거 MSS..
예를들어 C:\TEMP 폴더가 있으면 C:\TEMP 폴더에 log.txt 파일을 생성하여 '로그 로그 로그'를 작성하기 만약 i/o Error가 난다면 입력할수있는 글자수가 초과되었을 수도 있음! procedure TForm1.Button1Click(Sender: TObejct); var dir : string; // 경로 txt : TextFile; // 텍스트파일 begin //if Not DirectoryExists('경로') then if Not DirectoryExists('C:\TEMP') then begin //CreateDir('경로'); CreateDir('C:\TEMP'); end; //dir := '텍스트 파일 명을 포함한 경로'; dir := 'C:\TEMP\log.txt'; // ..
예를들어 C:\TEMP\TEMP.ZIP 파일을 D:\TEST\로 이동하고 싶을 때, (잘라내기, 원본파일 삭제) C:\TEMP\TEMP.ZIP 파일을 삭제하고 싶을 때, C:\TEMP\TEMP.ZIP파일을 D:\TEMP\로 복사하고 싶을 때(복사, 원본파일 유지)는 아래와 같이 사용! Procecure TForm1.Button1Click(Sender: TObject); begin //MoveFile(PChar('원본 파일의 경로'), PChar('이동하고자하는 파일의 경로')); MoveFile(PChar('C:\TEMP\TEMP.ZIP'), PChar('D:\TEST\TEMP.ZIP')); //DeleteFile(PChar('삭제하고자하는 파일의 경로')); DeleteFile(PChar('C:\TEM..