728x90 반응형 프로그램106 [파이쎤] 이기종 db 마이그레이션 대용량 데이터를 이관할때 파이쎤을 이용한 벌크인서트와 읽어 올때 chunksize 옵션 처리 기능을 이용해서 메모리 오버플로우를 처리 하였습니다. 메모리가 충분하면 한방에 읽어와서 처리하면 처리가 빠르지만 메모리 용량이 부족할 경우에는 나누어서 읽어서 처리를 해야 메모리 오버플로우가 발생하지 앖습니다. 파이썬 버전 : 3.8.8 로 테스트 파이썬을 설치후 패키지를 다운받아서 설치한다. pip install contextlib pip install sqlalchemy pip install jaydebeapi pip install pandas pip install apscheduler 1. config.py TIBERO_DB_CONFIG = { 'driver': 'com.tmax.tibero.jdbc.TbD.. 2022. 6. 21. [파이쎤] 이기종간의 DB 실시간 동기화 파이썬 버전 : 3.8.8 로 테스트 파이썬을 설치후 패키지를 다운받아서 설치한다. pip install contextlib pip install sqlalchemy pip install jaydebeapi pip install pandas pip install apscheduler 1. config.py TIBERO_DB_CONFIG = { 'driver': 'com.tmax.tibero.jdbc.TbDriver', 'url': 'jdbc:tibero:thin:@192.100.1.10:829:tibero', 'user': 'tiberotest', 'password': 'test1234', 'jdbcDriver': 'd:/python_schedule/jdbc/tibero6-jdbc.jar' } PG_DB.. 2022. 6. 21. build.gradle plugins 와 apply plugin 차이 그레이들에서 멀티 모듈을 Root project에 위치한 빌드스크립트에서 정의하는 것을 ‘Cross project configuration'라고 한다. 예제에서 플러그인 설정을 할 때 빌드스크립트(build.gradle 파일) 내에 buildscript를 정의하는데 내 파일에는 plugins 방식으로 되어있어 찾아봤는데 개선되었다고 한다. 기존 buildscript { ext { springBootVersion = '2.1.7.RELEASE' } repositories { mavenCentral() jcenter() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } .. 2022. 5. 31. vscode 오프라인에서 extension 설치 - 마켓 플레이스 접속하여 다운받고 싶은 툴 검색하여 다운 받는다. extension은 확장자가 vsix 이다. https://marketplace.visualstudio.com/ Visual Studio Marketplace Extensions for Visual Studio family of products on Visual Studio Marketplace marketplace.visualstudio.com 2022. 5. 11. [react] Router Single Page Application(SPA) 서버로부터 새로운 페이지를 불러오지 않고 현재의 페이지에 컴포넌트를 통해 동적으로 다시 작성하여 클라이언트와 소통하는 웹 애플리케이션이다. 필요한 모든 소스는 하나의 페이지에서 새로고침 없이 동작하게 된다. 그러나, SPA를 기반으로 개발할 때 흔히 겪는 어려움 중 하나는 웹페이지의 라우팅이다. 기본적으로 SPA에서 라우팅을 구현하게 되면 url path가 아닌 현재 어떤 컴포넌트가 렌더링 되어야 하는지 state를 통하여 관리를 한다. 이렇게 되면 다음과 같은 문제가 발생하게 된다. 1. 컴포넌트가 전환되어도 브라우저 주소창의 URL은 고정되어 있기 때문에 특정 페이지에 대한 즐겨찾기 등록이 불가능하다. 2. 뒤로가기 버튼을 누르면 해당 앱 내에서 이.. 2022. 3. 2. [react] props props props 는 컴포넌트에서 사용 할 데이터 중 변동되지 않는 데이터를 다룰 때 사용한다. parent 컴포넌트에서 child 컴포넌트로 데이터를 전할 때, props 가 사용된다. props 추가하기 컴포넌트에서 변하지 않는 데이터가 필요 할 땐, render() 메소드의 내부에 안에 { this.props.propsName } 형식으로 넣고, 컴포넌트를 사용 할 때, 괄호 안에 propsName="value" 를 넣어 값을 설정한다. src/components/Header.js import React from 'react'; class Header extends React.Component { render(){ return ( { this.props.title } ); } } expo.. 2022. 3. 2. [react] 리액트 초기 프로젝트 생성 리액트 프로젝트 생성 및 실행 방법 프로젝트 생성 프로젝트 생성 명령 설치하기 npm install -g create-react-app 위 명령으로 리액트 프로젝트를 생성하는 create-react-app명령을 설치했다. -g옵션이 주어졌기 때문에 시스템 공통 폴더에 설치된다. 따라서 프로젝트를 새로 생성할 때마다 위 명령을 반복할 필요가 없다. npx 로 프로젝트를 생성해야 하는데 npx 를 설치하기 위해서는 npm 을 통해서 설치 가능하다. npm install npx -g 프로젝트 생성하기 npx create-react-app [프로젝트이름] create-react-app명령을 실행하여 프로젝트를 생성할 수 있다. 프로젝트 이름으로 영어 대문자는 사용이 불가능하다. 프로젝트 실행 생성한 프로젝트 폴.. 2022. 3. 2. 자바 랜덤 API 암호화 BASE64 KEY 생성 package egovframework.util; import org.apache.commons.codec.binary.Base64; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; import javax.xml.bind.DatatypeConverter; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; public class RandomAESKeyGen { public static String generate(final int keyLen) throws NoSuchAlgorithmException { KeyGenerator keyGen = .. 2022. 1. 13. 자바로 크로스 도메인 우회처리 /** * 크로스 도메인 우회처리 * @param map * @return */ public static String processHTTP(Map params ) throws Exception { int statusCode = 0; String url= params.get("url"); logger.debug("url : " + url); CloseableHttpClient httpclient = HttpClientBuilder.create().build(); HttpPost httpPost = new HttpPost(url); List nvps = makeParams(params); try { httpPost.setHeader("Content-Type", "application/x-www-form-ur.. 2021. 12. 14. 국세청 사업자번호 진위확인 var ItemJSON; ItemJSON = '{"b_no": ["'+bNo+'"]}'; console.log("ItemJSON",ItemJSON) URL = "http://api.odcloud.kr/api/nts-businessman/v1/status?serviceKey=발급받은서비스키"; //Your URL var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = callbackFunction(xmlhttp); xmlhttp.open("POST", URL, false); xmlhttp.setRequestHeader("Content-Type", "application/json"); // xmlhttp.setRequestHeader('Author.. 2021. 12. 14. vscode Sass Compiler 설치 1. 설치하기 확장플러그인에서 검색하여 설치 - SASS 컴파일을 자동으로 해주는 플러그인 - [SASS Lint]도 같이 설치하면 SASS문법을 쉽게 코딩할 수 있다. Sass Lint를 통해 Sass문법을 쉽게 작성가능 2. [Watch SASS] - [Live Sass Compiler]를 설치하면 하단 상태표시줄에 [Watch Sass]버튼이 생성 빨간색으로 체크한 부분이 [Watch Sass]버튼 - [test.scss]에서 구문을 작성 후 [Watch Sass]를 누르면 [test.css]가 바로 생성 1) 자동생성해보기 # HTML코드 SASS테스트 제목태그 # SCSS코드 $mainColor: red; h1{ color: $mainColor; } # 자동 컴파일 과정 # 컴파일된 CSS코드 .. 2021. 11. 27. vue + 자바 파일다운로드 const form = new FormData() form.append('filepath', 'board') form.append('filename', 'test.pptx') form.append('originFileName', '1634543241310-1897687360') this.$axios({ method: 'POST', url: 'com/systemmng/file/downloadAxiosFiles.do', responseType: 'blob', headers: this.headerWeblog, data: form, params: { param1: 1, parma2: '한글', parma3: 'eng!@' } }) .then(response => { const fileName = 'test.pp.. 2021. 10. 19. vue Event Bus 우선 Vue Event Bus 사용에는 두가지 방법이 있습니다. - 직접 Event Bus를 만들고 import 해서 사용하는 방법 - Vue에 내장되어있는 Event Bus 를 이용하는 방법 import 해서 사용하는 방법 장점 : 부모-자식 사이가 아니여도 사용이 가능하다. 너무 편하다. 단점 : 너무 많이 쓰이면 후에 관리하기 힘들다(찾기 힘들다) 1. Event Bus // EventBus.js import Vue from 'vue'; const EventBus = new Vue(); export default EventBus; 2. $emit 이벤트 호출 $emit('이벤트 이름', option) option에 값을 넣어서 보낼 수 있다. HelloWorld Change Component 3. .. 2021. 10. 18. material 아이콘 url https://fonts.google.com/icons 2021. 10. 14. [kotlin] 안드로이드 당겨서 새로고침 기능 만들기 SwipeRefreshLayout을 사용하여 당겨서 새로고침 기능 구현하기 build.gradle 파일에 설정 추가후 Sync Now 버튼을 클릭하여 의존성 설치 dependencies { implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" } 사용할 간단 샘플예제 화면 미리보기 당겨서 놓으면 새로고침 처리 package cbw.example.myapplication import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.TextView import androidx.swiperefreshlayout.widget.Swip.. 2021. 9. 14. vue를 이용한 프로젝트 생성 cmd 창을 실행한 후에 프로젝트를 생성할 폴더로 이동한 후에 test프로젝트를 만들어 보자. vue create test Manually select features 를 선택하여 수동으로 셋팅한다. 위와 같이 선택을 한다. 구브라우저와 호환이 필요하면 Babel을 선택한다. 익스플로러11 지원이 필요한 경우 선택후 엔터 2.x 버전을 선택후 엔터 router에서 history모드를 사용할것인지 묻는데 그냥 디폴트로 엔터 나중에 소스에서 수정할수 있다. ESLint 문법 체크 하는 건데 그냥 Standard 선택하고 엔터 저장할때 문법 체크인 Lint on save 선택하고 엔터 지금까지 설정한 환경파일을 분리해서 만들지 package.json에 통합할지 묻는데 분리해서 저장하겠다고 선택후 엔터 향후 프.. 2021. 9. 2. Vs Code 기본 환경 셋팅 Vue를 사용하기 위해서는 VsCode 확장 패키지를 설치하여야 한다. 먼저 개발자 폰트 부터 설정하자. 코딩을 위한 개발자 폰트 설정 네이버 github.com/naver/d2codingfont GitHub - naver/d2codingfont: D2 Coding 글꼴 D2 Coding 글꼴. Contribute to naver/d2codingfont development by creating an account on GitHub. github.com 개발자 폰트를 다운 받아서 모든 사용자용으로 설치 한다. vscode를 열어서 TextEditor -> Font D2Coding ligature 입력합니다. 그리고 나서 Edit in settings.json 클릭하여 "editor.fontFamily":.. 2021. 9. 2. vue 개발환경 설정하기 1. node 설치 https://nodejs.org/ko/download/ 다운로드 | Node.js Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. nodejs.org 2. node 설치를 하면 npm도 같이 설치가 된다. npm으로 yarn을 설치한다 npm install -g yarn - node 설치가 잘 되었는지 확인한다. - yarn 설치가 잘 되었는지 확인한다. 3. 에디터 Tool로 Visual Studio Code를 설치한다. https://code.visualstudio.com/download Download Visual Studio Code - Mac, Linux, Windows Visual Studi.. 2021. 9. 2. store 저장소 처리 전역적으로 설정하여 값을 가져 가기 위해서는 store 설정을 하여야 한다. import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) export default new Vuex.Store({ state: { memberInfo: JSON.parse(localStorage.getItem('member')), drawer: false, siteTitle: '', appBarShow: true, sb: { act: false, msg: '', color: 'error' }, user: { name: '관리자', id: '없음', img: 'https://randomuser.me/api/portraits/men/85.jpg' } }, mutations: { ge.. 2021. 9. 1. router 설정 화면에서 메뉴 클릭시 라우터를 거쳐서 해당 페이지를 호출한다. import Vue from 'vue' import Router from 'vue-router' import axios from 'axios' Vue.use(Router) Vue.prototype.$axios = axios const apiRootPath = process.env.NODE_ENV === 'production' ? '/rice/' : '/rice/' Vue.prototype.$apiRootPath = apiRootPath axios.defaults.baseURL = apiRootPath const originalPush = Router.prototype.push Router.prototype.push = function push.. 2021. 9. 1. 이전 1 2 3 4 5 6 다음 more 728x90 반응형