본문 바로가기

Web

[Javascript] html2canvas 이미지 저장 시 특정 영역 제외 워하는 부분에 'data-html2canvas-ignore' 속성을 추가해서 제외할 수 있음 보이는 영역 제외 영역 보이는 영역
[Javascript] html2canvas 를 이용한 특정 영역 이미지 저장 라이브러리는 사이트에서 다운로드 html2canvas.hertzen.com html2canvas - Screenshots with JavaScript Try out html2canvas Test out html2canvas by rendering the viewport from the current page. Capture html2canvas.hertzen.com 사용방법 이미지로 저장
[Highcharts] credits 링크 제거 화면 캡쳐를 하는 경우 등 우측하단에 있는 credits("highcharts.com" 로고)을 제거하고 싶은 경우가 있음 하기 코드를 넣으면 credits를 제거할 수 있음 credits : { enabled : false },
[python](error) is not in list 배열 값 중 index를 알아오기 위해 index 함수 사용 시 ValueError: 값 is not in list 에러 발생 해당 에러는 리스트 안에 '값이 없을 때 발생 하기 코드 실행 시 'ValueError: 5 is not in list' 에러 발생 arrVal = [1, 2, 3, 4] print(arrVal.index(5) 예외처리 try : idx = arr.index(val) except ValueError : print("ValueError")
[python] python web crawling 참고 사이트 https://wikidocs.net/85381 0. 머리말 2022년 1월, 비전공자를 위한 파이썬 자동화 완벽 가이드 원고 작업을 시작합니다. wikidocs.net
[python] BeautifulSoup 파이썬을 이용한 웹 크롤링 시 데이터 추출하기 위한 함수 requests 설치 pip install requests BeautifulSoup 설치 pip install beautifulsoup4 파이썬에서 기본 내장함수가 아니라서 import 필요 import requests from bs4 import eautifulSoup 사용법 import requests from bs4 import BeautifulSoup url = 'https://naver.com' res = requests.get(url) if res.status_code == 200: html = res.text soup = BeautifulSoup(html, 'html.parser') print(soup) else : print(res...
[Java] 넘버링 넘버링(Numbering) 방법 - '01', '02'... '10', '11'.... substring 메소드를 사용 substring(인자1, 인자2) 인자1 > 시작지점 index 인자2 > 끝지점 index 두자리 넘버링 두자리 넘버링의 경우 최소 두자리를 표현해야 하기 위해 숫자 앞에 "0"을 붙임 두자리 넘버링을 위해 문자열 뒤에서 2자리만 추출 세자리 넘버링의 경우는 숫자 앞에 "00"을 붙이고 문자열 뒤에서 3자리만 추출 함 // 두자리 for(int i = 0; i < 100; i++) { String str = "0" + i; System.out.println(str.substring(str.length() - 2, str.length()); } // 세자리 for(int i = 0; ..
[Highcharts] 사용자 버튼 내보내기 버튼 숨기기 사용자 버튼 활성화 여부 chart= Highcharts.chart('container', { chart: { type: 'pie', events: { //load: function () { console.log(this) }, drilldown: function() { if (this.series[0].options._levelNumber != 1 ) { /* hide thirdbutton */ this.exportSVGElements[4].hide(); } //chart.redraw(); // 차트 다시 그리기 }, drillup: function(u) { if (this.series[0].options._levelNumber == 1 ) { /* show thirdbutton ..