Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'matplo_realtime.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
import sys
from PyQt5 import QtWidgets
from matplo_ui import Ui_Form
#below import libraries about matplotlib runing on pyqt5
import matplotlib
#Make sure that we are using QT5
matplotlib.use('Qt5Agg')
from PyQt5 import QtCore, QtWidgets
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'matplo.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
# initialize GPIO
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.cleanup()
# read data using pin 14
instance = dht11.DHT11(pin=14)
while True:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="jquery.qrcode.js"></script>
<script src="qrcode.js"></script>
<link href="css/style.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
$(function() {
header {
background-color: #EAE14E;
height:50px;
margin-top: 0;
}
#title {
margin-top:0;
}
body {
<html>
<head>
<link href="css/style.css" rel="stylesheet">
<title>QR code generator</title>
</head>
<body>
<header>
<h1>QR code generator</h1>
</header>
<div id="wrap">
header {
background-color: #EAE14E;
height:50px;
margin-top: 0;
}
body {
margin: 0;
background-color: #f5f5f5;
}
<html>
<head>
<link href="css/style.css" rel="stylesheet">
<title>QR code generator</title>
</head>
<body>
<header>
<h1>QR code generator</h1>
</header>
<div id="wrap">
<?php
$file = $_FILES['gif'];
$frameRate = $_POST['frameRate'];
//var_dump($file);
$ext = substr($file['name'], -4); //ファイル名の後ろ4文字を取得。つまり拡張子を取り出す
if(is_uploaded_file($file['tmp_name'])){
if($ext == '.MOV' || $ext == '.mov' || $ext == '.mp4') {
$filePath = 'tmp/' . $file['name']; //ファイルの移動先。
move_uploaded_file($file['tmp_name'], $filePath);//アップロード