- [兩個大神吵架]
但由於code讓我跑起來都還是停留在sync的感覺,但明明感覺async await的語法跟yield應該可以互換才對,我資質愚鈍,只好再看一下官方文件(遺忘好久) 來修改一下。
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 todo = ( state, action) =>{ | |
switch (action.type) { | |
case 'ADD_TODO': | |
return { | |
id: action.id, | |
text: action.text, | |
completed: false | |
}; | |
case 'TOGGLE_TODO': | |
if (state.id !== action.id) { |
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 counter = ( state = 0, action ) => { | |
switch( action.type ){ | |
case 'INCREMENT': | |
return state + 1 ; | |
case 'DECREMENT': | |
return state - 1 ; | |
default: | |
return state; | |
} |
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
{ | |
"mapSize":16 | |
} |
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
var boardWidth = 50, | |
boardHight = 50, | |
circleArray = new Array(25), | |
c_canvas, | |
canvasContext; | |
function Cell(row, column) { | |
this.row = row; | |
this.column = column; | |
} |
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
def calColemanLiau(block_text) | |
# Don't know if \n can decide sentence or using . | |
# Using my own way to avoid those situation | |
sentenceNumber = getSentenceNumber( block_text ) | |
words = getWords(block_text) | |
wordsSize = words.size | |
letterNumber = 0 | |
words.each do |w| | |
letterNumber += w.gsub(/\W/,"").size | |
end |
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
def goodPoint(arr) | |
arrSize = arr.size | |
tempArr = Array.new(arrSize-1) | |
tempArr.each_index do |ind| | |
tempArr[ind] = arr[ind+1] - arr[ind] | |
end | |
maxNumber = 0 | |
tempMaxNumber = 0 | |
flag = 0 | |
(0..arrSize-2).each do |i| |
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
def firstchar(text) | |
return text.split(" ").map{ |c| c[0] }.reduce(:+) | |
end |
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.網址的部分,必須使用正式合法的Domain Name,不可使用IP位址。 | |
2.因資安政策的因素,目前port的部分,必須設定為80 或443。 |
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
2B432B9057D0439F5C3B357ED8D8B2BA | |
2/5 | |
6d19c95351f3d23b468036a9352cc86b | |
2/10 | |
- allALipayCallBack: {PaymentType = ("Alipay_Alipay"); MerchantID = ("1047153"); TradeAmt = ("1425"); TradeNo = ("1502101527144625"); CheckMacValue = ("361FAD9EA40779CDD7A94D123156244C"); SimulatePaid = ("1"); TradeDate = ("2015/02/10 15:27:14"); PaymentDate = ("2015/02/10 15:27:43"); RtnMsg = ("付款成功"); RtnCode = ("1"); PaymentTypeChargeFee = ("0.0000"); MerchantTradeNo = ("hypoOnlieTest5Produc"); } |
NewerOlder