전체 글119 [HTML] <br>,  , <, >, &, ", © 1234567891011121314151617!DOCTYPE html>head> meta charset="UTF-8"> title>제목 연습/title>/head>body> 안녕하세요.br> 반갑습니다.br> 열심히 HTML을 공부합시당 :) br>br> br>< 내용 > br> & br> " 안녕!! " br> ©/body>/html>Colored by Color Scripter 2020. 11. 24. [HTML] 제목 연습 : <h1> ~ <h6> 태그 1234567891011121314!DOCTYPE html>head> meta charset="UTF-8"> title>제목 연습/title>/head>body> h1>글자 제목/h1> 가 자동으로 됨.--> h2>글자 제목/h2> h3>글자 제목/h3> h4>글자 제목/h4> h5>글자 제목/h5> h6>글자 제목/h6>/body>/html>Colored by Color Scripter 2020. 11. 24. [Flask] input값에 따라 Pass, Fail 문자 출력하기 12345678910!doctype html>html> body> {% if marks>50 %} h1> Your result is pass!/h1> {% else %} h1>Your result is fail/h1> {% endif %} /body>/html> 123456789from flask import Flask, render_templateapp = Flask(__name__) @app.route('/input/')def input_name(score): return render_template('result.html', marks = score) if __name__ == '__main__': app.run(host='0.. 2020. 11. 24. [Python] 삼각형 넓이 구하기 123456width = int(input('width: '))height = int(input('height: ')) area = width * height / 2 # /는 소수점, //는 정수형으로 계산함. print('area: ', area) 2020. 11. 23. [Python, OpenCV] 두 개의 이미지 파일 합성하기 12345678910111213141516171819202122232425262728293031# apple.jpg 그림에 opencv_logo 그림을 Mask_inverse하여 합성. import cv2import numpy as np src1 = cv2.imread('../data/apple.jpg') #사과파일 읽기src2 = cv2.imread('../data/opencv_logo.png') #로고파일 읽기 rows, cols, channels = src2.shape #로고파일 픽셀값 저장roi = src1[50:rows+50,50:cols+50] #로고파일 필셀값을 관심영역(ROI)으로 저장함. gray = cv2.cvtColor(src2, cv2.COLOR_BGR2GRAY) #로고파일의 색상을.. 2020. 11. 11. [Python, OpenCV] boxFilter 와 bilateralFilter 를 5초 간격으로 번갈아 실행시키기 123456789101112131415161718192021222324252627282930313233import cv2import time cap = cv2.VideoCapture(0) #윈도우 카메라 실행frame_size = (int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)), int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)))oldTime = time.time() #시작 시간 측정while True: retval, frame = cap.read() #retval: 비디오영상을 캡쳐했는지(T/F), frame: 비디오영상 프레임 저장 if not retval: break; #False면 while문 탈출. .. 2020. 11. 11. [C] 함수를 통해 로또 번호 생성, 출력하기 (난수 사용) 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748#define _CRT_SECURE_NO_WARNINGS#include stdio.h>#include stdlib.h>#include time.h> void input_nums(int* lotto_nums);void print_nums(int* lotto_nums); int main(void) { int lotto_nums[6]; srand(time(NULL)); input_nums(lotto_nums); print_nums(lotto_nums); return 0;}void input_nums(int* lotto_num.. 2020. 11. 10. [C] 시험 별 성적 최소값, 최대값 구하기 한 학급은 최대 10명 까지의 학생들로 구성되어 있다. 각 학생들은 3번의 시험을 치른다. 학생들의 성적은 난수를 생성하여 얻는다. 각 시험에 대하여 최대점수와, 최저점수를 계산하여 출력한다. 12345678910111213141516171819202122232425262728293031323334#include stdio.h> void get_minmax(int score[][3]){ int i, s, min, max; for (s = 0; s 3; s++) { min = max = score[0][s]; for (i = 0; i 10; i++) { if (score[i][s] min) min = score[i][s]; i.. 2020. 11. 10. [C] 성적 구하는 프로그램 (난수, 다차원 배열 사용) 1) 난수로 생성된 성적 구하기 (학생 별 점수, 점수 총점, 점수 평균, 과목 별 평균 출력) 1234567891011121314151617181920212223242526272829303132333435363738394041#include stdio.h>#include stdlib.h>#include time.h> int main(){ int scores[3][4]; int i, j; int tot = 0; double avg; double average[4] = { 0 }; srand(time(NULL)); // 자료생성 for (i = 0; i 3; i++) for (j = 0; j 4; j++) .. 2020. 11. 10. [Flask] SQLite 예제 Flask â SQLite - TutorialspointFlask – SQLite Python has an in-built support for SQlite. SQlite3 module is shipped with Python distribution. For a detailed tutorial on using SQLite database in Python, please refer to this link. In this section we shall see how a Flask application intewww.tutorialspoint.com 1234567891011121314import sqlite3 conn = sqlite3.connect('database.db')print('데이터베이스.. 2020. 9. 24. 이전 1 ··· 5 6 7 8 9 10 11 12 다음