Reference:
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 spotFuture = Machine({ | |
type: 'parallel', | |
states: { | |
'建立部位': { | |
initial: '現貨數 < 設定目標數', | |
states: { | |
'現貨數 < 設定目標數': { | |
on: { | |
'買現貨': '期貨空單數 < 現貨數', | |
}, |
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 spotFutureCreate = Machine({ | |
id: '建立部位', | |
initial: '現貨數 < 設定目標數', | |
states: { | |
'現貨數 < 設定目標數': { | |
on: { | |
'買現貨': '期貨空單數 < 現貨數', | |
}, | |
}, | |
'期貨空單數 < 現貨數': { |
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, { useState, useEffect } from 'react'; | |
import T from 'prop-types'; | |
import Ring from './components/Ring'; | |
const targetProgress = 95; | |
function DemoErrorRing() { | |
const [progress, setProgress] = useState(0); | |
useEffect(() => { |
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 class Observer { | |
value: any; | |
dep: Dep; | |
vmCount: number; // number of vms that have this object as root $data | |
constructor (value: any) { | |
this.value = value | |
this.dep = new Dep() | |
this.vmCount = 0 | |
def(value, '__ob__', this) |
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
namespace tw.gov.nat.einvoice.qrutil { | |
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
public class QREncrypter { | |
public string AESEncrypt(string plainText, string AESKey) { | |
byte[] bytes = Encoding.Default.GetBytes(plainText); | |
ICryptoTransform transform = new RijndaelManaged { KeySize = 0x80, Key = this.convertHexToByte(AESKey), BlockSize = 0x80, IV = Convert.FromBase64String("Dt8lyToo17X/XkXaQvihuA==") }.CreateEncryptor(); |
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
// 單人 | |
ARTIST_ID_BLACKLIST=["Tqyk2VnYD3.Md.I0F01bv08J"] | |
// 多人 | |
ARTIST_ID_BLACKLIST=["藝人編號1", "藝人編號2"] |
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
let ARTIST_ID_BLACKLIST = []; | |
setInterval(() => { | |
if (!!~ARTIST_ID_BLACKLIST.indexOf(JSON.parse(localStorage.getItem('ngStorage-playing')).current.song.artist_id)) { | |
[] | |
.filter | |
.call(document.querySelector('#player > div.controls').children, child => child.getAttribute('title') === '下一首') | |
.forEach((el) => { | |
if (el.fireEvent) { | |
el.fireEvent('onclick'); | |
} else { |
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
<template lang="html" id="autocomplete"> | |
<div class="sample-row row autocomplete-wrapper"> | |
<div class="autocomplete row"> | |
<div class="sample-col sample-col col-xs-1 sample-col col-form-label area-label">{{ title }}</div> | |
<div class="sample-col col-xs-6"> | |
<input class="form-control" type="text" placeholder="search word here..." @blur="emptyInput" v-model="searchWord" maxlength="40" /> | |
<span class="fold-icon" @click="emptyInput" v-if="!!searchWord"> | |
<i class="fa fa-close" aria-hidden="true"></i> | |
</span> | |
<transition name="fade"> |
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
<template lang="html"> | |
<div v-if="processing"> | |
<button disabled>play</button> | |
<input type="range" v-model="volume" /> | |
</div> | |
<div v-else> | |
playing at : {{ playTime }} / {{ songDuration }} secs<br> | |
Position: <input type="text" v-model="position" /> % | |
<br> | |
<button @click="play" v-if="!isPlaying">play</button> |
NewerOlder