This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_gui/py_video_display/py_video_display.html | |
import numpy as np | |
import cv2 | |
cap = cv2.VideoCapture('vtest.avi') | |
while(cap.isOpened()): | |
ret, frame = cap.read() | |
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
class Car extends React.Component { | |
render() { | |
return <h2>Hi, I am a Car!</h2>; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car extends React.Component { | |
render() { | |
return <h2>I am a Car!</h2>; | |
} | |
} | |
class Garage extends React.Component { | |
render() { | |
return ( | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car extends React.Component { | |
constructor() { | |
super(); | |
this.state = {color: "red"}; | |
} | |
render() { | |
return <h2>I am a {this.state.color} Car!</h2>; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car extends React.Component { | |
render() { | |
return <h2>I am a {this.props.color} Car!</h2>; | |
} | |
} | |
ReactDOM.render(<Car color="red"/>, document.getElementById('root')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" | |
content="width=device-width, initial-scale=1" /> | |
<title>React App</title> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<title>Test React</title> | |
<!-- Load React API --> | |
<script src= "https://unpkg.com/react@16/umd/react.production.min.js"></script> | |
<!-- Load React DOM--> | |
<script src= "https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script> | |
<!-- Load Babel Compiler --> | |
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//1.Install typescript | |
// npm install -g typescript | |
//2.Create a file first-typescript.ts | |
//3.Coding | |
//4.Compile .ts file to .js file. | |
// tsc first-typescript.ts | |
let a = 5; | |
let b = 5; | |
let c = a + b; | |
console.log(c); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//RE:https://stackoverflow.com/questions/28870660/running-a-go-method-using-cron | |
package main | |
import ( | |
"fmt" | |
"os" | |
//"github.com/jasonlvhit/gocron" | |
"github.com/robfig/cron" | |
) | |
func someFunction(arg string, i int) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
//"strconv" | |
) | |
func main() { | |
/*now:=time.Now() |