Here's a basic ReactJS player implementation.
It just instantiates the video.js player on componentDidMount
and destroys it on componentWillUnmount
.
import React from 'react';
import videojs from 'video.js'
registry=https://registry.npm.taobao.org/ | |
disturl=https://npm.taobao.org/dist | |
chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver | |
operadriver_cdnurl=http://cdn.npm.taobao.org/dist/operadriver | |
phantomjs_cdnurl=http://cdn.npm.taobao.org/dist/phantomjs | |
fse_binary_host_mirror=https://npm.taobao.org/mirrors/fsevents | |
sass_binary_site=http://cdn.npm.taobao.org/dist/node-sass | |
electron_mirror=http://cdn.npm.taobao.org/dist/electron/ | |
selenium_cdnurl=http://npm.taobao.org/mirrors/selenium | |
node_inspector_cdnurl=https://npm.taobao.org/mirrors/node-inspector |
<section class="about"> | |
<h2>About This Course</h2> | |
<p>Include your long course description here. The long course description | |
should contain 150-400 words.</p> | |
<p>This is paragraph 2 of the long course description. Add more paragraphs | |
as needed. Make sure to enclose them in paragraph tags.</p> | |
</section> | |
<section class="prerequisites"> | |
<h2>Requirements</h2> | |
<p>Add information about the skills and knowledge students need to take |
var MACHINE_ID = parseInt(Math.random() * 0xFFFFFF, 10); | |
ObjectID.prototype.generate = function(time) { | |
if ('number' != typeof time) { | |
time = ~~(Date.now()/1000); | |
} | |
// Use pid | |
var pid = (typeof process === 'undefined' ? Math.floor(Math.random() * 100000) : process.pid) % 0xFFFF; | |
var inc = this.get_inc(); |
<div id="editor-toolbar"> | |
<span class="ql-formats"> | |
<select class="ql-font"></select> | |
<select class="ql-size"></select> | |
</span> | |
<span class="ql-formats"> | |
<button class="ql-bold"></button> | |
<button class="ql-italic"></button> | |
<button class="ql-underline"></button> | |
<button class="ql-strike"></button> |
## 安裝語系檔 | |
$ sudo locale-gen "en_US.UTF-8" | |
## 重新設定語系檔 | |
$ sudo dpkg-reconfigure locales | |
## 設定檔 |
java -Xmx1024M -Xms1024M -jar minecraft_server.1.12.jar nogui |
// https://medium.freecodecamp.org/react-binding-patterns-5-approaches-for-handling-this-92c651b5af56 | |
// Approach 1: Use React.createClass | |
var HelloWorld = React.createClass({ | |
getInitialState() { | |
return { message: 'Hi' }; | |
}, | |
logMessage() { | |
// this magically works because React.createClass autobinds. | |
console.log(this.state.message); |
// When: You want to remove unwanted elements based on a condition. | |
// Example: remove duplicate elements from an array.\ | |
const names = ['will', 'bill', 'william', 'bill', 'william', 'will']; | |
const uniqueNames = names.filter((elem, index, arr) => arr.indexOf(elem) === index); // [ 'will', 'bill', 'william' ] |
var input = ['dist']; | |
var config = { | |
'dist': ['build', 'deploy'], | |
'build': ['js', 'css', 'version-rev'], | |
'js': ['lint','uglify'], | |
'css': ['sass', 'css-min'] | |
}; | |
var tasks = []; |