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
(function () { | |
/** | |
* YWApiCore | |
*/ | |
YWApiCore = { | |
__GLOBAL_FUNC_INDEX__: 0, | |
invokeClientMethod: function (module, name, parameters, callback) { | |
var url = "mm://" + module + "/" + name + "?p=" + encodeURIComponent(JSON.stringify(parameters || {})); | |
if (callback) { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
const cors = require('cors')({origin: true}); | |
exports.sample = functions.https.onRequest((req, res) => { | |
cors(req, res, () => { | |
res.send('Passed.'); | |
}); | |
}); |
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
tf-select( | |
:options="devicesList", | |
:disabled="false", | |
v-model="webcam", | |
placeholder="请选择设备" | |
) |
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
<tf-select :options="devicesList" :disabled="false" v-model="webcam" placeholder="请选择设备"></tf-select> | |
<script id="jsbin-source-html" type="text/html">tf-select( | |
:options="devicesList", | |
:disabled="false", | |
v-model="webcam" | |
placeholder="请选择设备" | |
)</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
<tf-select :options="devicesList" :disabled="false" v-model="webcam" placeholder="请选择设备"></tf-select> | |
<script id="jsbin-source-html" type="text/html">tf-select( | |
:options="devicesList", | |
:disabled="false", | |
v-model="webcam" | |
placeholder="请选择设备" | |
)</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
export function parseUrl(url) { | |
let a = document.createElement('a') | |
a.href = url | |
return { | |
href: a.href, | |
protocol: a.protocol, | |
host: a.host, | |
hostname: a.hostname, | |
port: a.port, |
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
function add1(v) { return v + 1; } | |
function isOdd(v) { return v % 2 == 1; } | |
function sum(total,v) { return total + v; } | |
var list = [2,5,8,11,14,17,20]; | |
list | |
.map( add1 ) | |
.filter( isOdd ) | |
.reduce( sum ); |
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
{ | |
"terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\cmd.exe", | |
"window.zoomLevel": 0, | |
// Controls the font family. | |
"editor.fontFamily": "'Operator Mono', Consolas, 'Courier New', monospace, 微软雅黑", | |
// "editor.fontFamily": "Consolas, 'Courier New', monospace, 微软雅黑", | |
// Controls the font weight. | |
"editor.fontWeight": "300", | |
// Controls the line height. Use 0 to compute the lineHeight from the fontSize. | |
"editor.lineHeight": 30, |
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
function quickSort(list) { | |
if (list.length < 2) return list | |
let medIdx = Math.floor(list.length / 2), | |
medItem = list[medIdx], | |
newList = [...list.slice(0, medIdx), ...list.slice(medIdx+1)], | |
left = newList.filter(item => item <= medItem), | |
right = newList.filter(item => item > medItem) | |
return [...quickSort(left), medItem, ...quickSort(right)] |
NewerOlder