본문 바로가기

분류 전체보기

(27)
c++ 동적 계산기 구현 ver1 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 #include using namespace std; class cal { private: int a; int b; char op; int opp = 0; public: int input() { cout a >> b; cout op; switch (op) { case '+': opp = a + b; break; case '-': opp = a - b; break; case '*': opp = a * b; break; case '/': opp = a / b; br..
c++ string을 나만의 것으로 구현 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 12..
파이썬 서버 구축 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 import http.server class Handler(http.server.BaseHTTPRequestHandler): """HTTP 요청을 처리하는 클래스""" def do_GET(self): """요청 메시지의 메서드가 GET 일 때 호출되어, 응답 메시지를 전송한다.""" # 응답 메시지의 상태 코드를 전송한다 self.send_response(200) # 응답 메시지의 헤더를 전송한다 self.send_header('Content-type', 'text/plain; charset=utf-8') self.end_headers() # 응답 메시지의 본문을 전송한다..
python oracle 디비에 넣기 (+oracle DB넣기) 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 import requests import urllib import cx_Oracle import ..
파이썬 오라클 연동 [python install oracle] 파이썬에서 오라클 연동하는 방법 1. 파이썬 설치 2. 파이참 설치 3. Oracle Instant Client Downloads 설치 방법 -> 밑의 주소를 클릭하세요. https://oracle.github.io/python-cx_Oracle/ 다음 페이지 클릭 다음페이지 클릭 다음페이지 클릭 컴퓨터 bit에 따라서 설치한다. 하지만 저자의 컴퓨터는 64bit이지만 32bit도 되기 때문에 32bit로 다운로드 할 예정이다. 다운로드 창으로 이동 그 이후는 자신이 다운로드한 버전의 oracle 데이터베이스를 다운로드한다. 저자는 12.1.0버전을 다운로드 하였다. 그 후, terminal 창에 pip install cx_Oracle라고 입력해준다. 6. installing cx_Oracle on Wi..
파이썬 beautifulsoup함수 정리 findAll() 이나 find() ☞ 함수를 쓰면 html 페이지에서 원하는 두 함수는 거의 비슷하다.findAll(tag, attributes, recursive, text, limit, keywords) find(tag, attributes, recursive, text, keywords) findAll( ) ☞ html 태그에서 반복되는 태그를 찾아 처리할 때 효과적이다.for div in soup.findAll('div', {'class': 'product_tile'}): p_tag = div.find('a', {'class': 'product_name desktop_content tablet_content'}).getText() name_tag = div.find('div', {'class':..
파이썬 웹크로링 및 엑셀정리 파이썬 웹크로링은 데이터 수집, 자동화작업, 마케팅프로그램 등으로 많이 사용되며누구나 손쉽게하는 파이썬으로 실전 사이트들을 크로링하거나 데이터를 시각화로 만든다. 크로링 라이브러리 ☞ "Beautifulsoup","Reqeusts"을 사용한다. Beautifulsoup : HTML태그 등 컨텐츠를 가져온 뒤 사용자가 파싱하기 쉽게 도와주는 라이브러리 Requests : 데이터를 요청하는 라이브러리 설치하는 방법file > setting > project:Achoo > project Interpreter 엑셀로 데이터 값 넘기는 라이브러리 ☞ "openpyxl"을 사용한다.openpyxl : 엑셀 파일을 손쉽게 생성할 수 잇는 파이썬 외부 라이브러리 import requests import urllib f..
Spring DB연동 pom.xml 4.0.0hello.springbitSpring_1130war1.0.0-BUILD-SNAPSHOT1.64.3.10.RELEASE1.7.01.6.6org.springframeworkspring-context${org.springframework-version}commons-loggingcommons-logging org.springframeworkspring-webmvc${org.springframework-version}org.aspectjaspectjrt${org.aspectj-version}org.aspectjaspectjweaver${org.aspectj-version}org.slf4jslf4j-api${org.slf4j-version}org.slf4jjcl-over-slf4j${or..