일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- MS-SQL
- node.js
- GIT
- PyQt5
- flutter
- urllib
- pandas
- 함수
- port
- python
- swift
- MySQL
- 다이어트
- 맛집
- Excel
- 날짜
- ASP
- 리눅스
- PER
- Linux
- 유니티
- Unity
- sqlite
- PyQt
- mssql
- IOS
- ubuntu
- tensorflow
- 라즈베리파이
- javascript
목록랭귀지 (557)
아미(아름다운미소)
# encoding: utf-8 import codecs from collections import deque import urllib2, urlparse import socket from BeautifulSoup import BeautifulSoup def get_links(uri, startswith=""): """Returns list of referenced URIs (without duplicates) found in the document returned for the input URI""" results = set() try: page = urllib2.urlopen(uri) soup = BeautifulSoup(page) for link in soup.findAll('a'): # try: ..
datepicker를 사용하기 위해서는 기본적으로 다음의 3가지 File을 import해야 합니다. datepicker의 가장 기본적인 코드를 살펴보면 다음과 같습니다. $(function() { $( "#testDatepicker" ).datepicker({ dateFormat: 'yy-mm-dd', prevText: '이전 달', nextText: '다음 달', monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'], monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'], dayNames: ['일','월','화','수','목',..
jQuery 펼침메뉴 제이쿼리 인클루드 스타일 .menu a{cursor:pointer;} .menu .hide{display:none;} 스크립트 $(document).ready(function(){ $(".menu>a").click(function(){ var submenu = $(this).next("ul"); // submenu 가 화면상에 보일때는 위로 보드랍게 접고 아니면 아래로 보드랍게 펼치기 if( submenu.is(":visible") ){ submenu.slideUp(); }else{ submenu.slideDown(); } }).mouseover(function(){ $(this).next("ul").slideDown(); }); //$(".menu:eq(0)>a").click();..
먼저 mysql-server, mysql-client 를 설치합니다. $ sudo apt-get install mysql-server mysql-client 설치 과정이 끝나면 설정 파일을 수정합니다. bind-address 부분을 찾아 주석처리합니다. (앞에 # 붙여주고 저장) $ sudo nano /etc/mysql/my.cnf ...... # bind-address = 127.0.0.1 ...... mysql 서비스를 재시작합니다. $ sudo service mysql restart 테스트용 DB 생성을 위해 mysql shell 에 접속합니다. root 유저로 접속합니다. $ mysql -u root -h localhost -p root 비밀번호 입력 후 쉘이 뜨면 테스트 DB 생성. mysql>..
퀵메뉴 $(function(){ var quick_menu = $("#miniArticle"); var quick_top = 124; // quick menu initialization quick_menu.css('top', $(window).height() ); $(document).ready(function(){ quick_menu.animate( { "top": $(document).scrollTop() + quick_top +"px" }, 100 ); //스크롤이 올라갈 때의 속도 값이 높아질수록 부드럽게 움직임 $(window).scroll(function(){ quick_menu.stop(); quick_menu.animate( { "top": $(document).scrollTop() + q..
HTTP 요청을 전송하면, html이나 이미지 또는 비디오 등등이 돌아온다.어떤 경우에는 받고 있는 데이터의 유형이 예상대로 인지 점검해야 한다. 받고 있는 문서의 유형을 점검하려면, MIME 유형을 보자 (Content-type) 헤더:urlfile = urllib2.urlopen('http://www.commentcamarche.net/') print "Document type is", urlfile.info().getheader("Content-Type","") 이는 다음과 같이 출력된다:Document type is text/html 경고: 쌍반점 다음에 정보가 있을 수 있다. 예를 들어:Document type is text/html; charset=iso-8859-1 그래서 언제나 다음과 같이..
urllib/urllib2를 사용하고 있고 404에러와 기타 HTTP 에러를 점검하고 싶다면? 다음은 그 트릭이다: try: urlfile = urllib2.urlopen('http://sebsauvage.net/nonexistingpage.html') except urllib2.HTTPError, exc: if exc.code == 404: print "Not found !" else: print "HTTP request failed with error %d (%s)" % (exc.code, exc.msg) except urllib2.URLError, exc: print "Failed because:", exc.reason 이런 식으로 404에러와 기타 HTTP 에러 코드를 점검할 수 있다. urlli..
urllib2로 프록시를 사용할 수 있다.# 프록시 주소와 포트: proxy_info = { 'host' : 'proxy.myisp.com', 'port' : 3128 } # 프록시를 위하여 처리자를 만든다 proxy_support = urllib2.ProxyHandler({"http" : "http://%(host)s:%(port)d" % proxy_info}) # 이 처리자를 사용하는 개방자(opener)를 만든다: opener = urllib2.build_opener(proxy_support) # 다음 이 개방자를 urllib2를 위한 기본 개방자로 설치한다: urllib2.install_opener(opener) # 이제 HTTP 요청을 전송할 수 있다: htmlpage = urllib2.urlo..
SQLite은 엄청난 데이터베이스 엔진이다. 진심이다. 몇가지 단점이 있다: 병행 접근용으로 디자인되어 있지 않다 (쓰는 동안 데이터베이스 전체가 잠긴다). 지역적으로만 작동한다 (네트워크 서비스가 없다. 물론 sqlrelay 같은 걸 사용할 수 있다). 외래 키를 처리하지 못한다. 권한 관리가 없다 (grant/revoke). 장점은 다음과 같다: 아주 빠르다 (대부분의 연산에서 mySQL보다 빠르다). SQL-92 표준을 대부분 준수한다. 서비스를 설치할 필요가 없다. 데이터베이스 관리를 수행할 필요가 없다. 사용되지 않을 때에는 컴퓨터 메모리와 CPU를 소비하지 않는다. SQLite 데이터베이스는 간결하다 1 데이터베이스 = 1 파일 (손쉽게 이동/배치/백업/전송/이메일 처리를 할 수 있다). SQ..