페이지

2020년 10월 18일 일요일

OpenJDK 다운로드 링크

https://jdk.java.net/



 


압축 해제 후 JAVA_HOME 환경 변수 추가 후 사용


설치 파일이 필요하다면 다음 링크 이용

https://github.com/ojdkbuild/ojdkbuild


2020년 10월 6일 화요일

VB.NET DataGridView 의 Row 얻는 방법

Dim row As DataGridViewRow = dataGridView.Rows(0)

row.Height = 15

row.Visible = False 


참고

  • https://docs.microsoft.com/ko-kr/dotnet/api/system.windows.forms.datagridviewrow.height?view=netcore-3.1


2020년 1월 7일 화요일

jar 파일 압축 및 압축풀기


압축하기

    jar cvf filename.jar .

현재디렉토리와 하위디렉토리의 모든 파일을 압축하여 filename.jar 로 만든다.

압축풀기

    jar xvf filename.jar

현재디렉토리에 filename.jar 파일의 압축을 푼다.
압축을 풀 디렉토리로 들어가서 작업한다.

2019년 12월 24일 화요일

python simple http server ( web server )

현재 디렉토리를 웹서버로 만들어주는 명령입니다.

커맨드창에서 다음 명령을 실행합니다.


python -m SimpleHTTPServer


포트를 지정할 수 있습니다.

python -m SimpleHTTPServer 9000


Serving HTTP on 0.0.0.0 port 9000 ...

과 같은 메시지가 나오면 작동하는 것입니다.



https://docs.python.org/2/library/simplehttpserver.html

2019년 8월 10일 토요일

python mysql mysqlclient MySQLdb

설치

pip install mysqlclient


모듈 로드

import MySQLdb


데이터베이스 연결

connection = MySQLdb.connect(
    user="username",
    passwd="password",
    host="localhost",
    db="dbname",
    charset="utf8"
)

커서 추출

cursor = connection.cursor()

업데이트 쿼리

# create table note ( title varchar(100), content text )
cursor.execute("insert into note(title, content) values(%s,%s)", ("a", "b"))
connection.commit()

조회 쿼리

sql = "select * from note where title=%s"
cursor.execute(sql, ('a',))

for row in cursor.fetchall():
    print(row)  # ('a', 'b')

Dict 커서로 변경

cursor = connection.cursor(MySQLdb.cursors.DictCursor)

cursor.execute(sql, ('a',))
for row in cursor.fetchall():
    print(row)  # {'title': 'a', 'content': 'b'}
    print(row['title'], row['content'])     # a b

연결 종료

connection.close()