不可思議抗癌歷程 林百里求診中國御醫兩度重生

https://youtu.be/8dvbY0jTlUI?t=1600

2020-03-23 · 1 min · word · Me

javascript firestore object sort

const bookListsQuery = await modules.firestore.collection('books') .get(); const sortedObj = Object.values(bookListsQuery.docs).sort(function(a, b){ console.log('a %s b %s', a.data().order, b.data().order) return Number(a.data().order) > Number(b.data().order); }); sortedObj.forEach(function(doc){ console.log(doc.data()) }); other way object use map to array, then it sorted. const bookListsQuery = await modules.firestore.collection('books') .get(); const sortedArr = bookListsQuery.docs.map(function (doc) { // 轉換成array return doc.data() }); sortedArr.sort(function compare(a, b) { return a.order > b.order; // 升 小->大 }); sortedArr.forEach(function(data){ console.log(data.data()) }) ========== Sorting multiple object properties with JavaScript https://bithacker.dev/javascript-object-multi-property-sort ...

2020-03-19 · 1 min · 163 words · Me

fb 中研院研究出快篩試劑

漂亮的諧音 https://www.youtube.com/channel/UCRSmPITY7izy2F1INKMEf2g 13 小時前 中研院研究出快篩試劑, 綠媒大肆吹捧, 817們高潮連連, 綠媒說根本是大陸搶了台灣的研究功勞, 結果人家那是2月的事, 如何搶台灣3月研發出來的成果功勞? (原來中國有坐時光機穿越未來, 抄襲台灣研究成果的能力啊) 。。。 接著衛福部被抓包, 2月就核准進口大陸快篩試劑, 但衛福部辯解說進口的是抗體試劑, 中研院研發的是抗原試劑, (既然兩者快篩試劑不同, 那白痴綠媒說大陸搶了台灣研究功勞, 這是什麼毛病? 反正只要政治正確, 造謠就沒問題是嘛!?) 。。。 那中研院的快篩試劑何時可量產? 中研院長回覆說: 『此一問題「難以回答」。 做試劑不能為了趕進度忽略靈敏性與準確度。 而快篩何時人體試驗、量產, 都必須與衛福部、廠商密切合作, 時間難以預估。 「即使今年用不上, 也必須為未來的疫情做準備。」』 。。。 所以817在高潮一個, 根本還無法真正問世的東西。 台灣現在就是腦殘當道啊!

2020-03-11 · 1 min · 36 words · Me

[轉]Keep your promises when using Cloud Functions for Firebase!

https://firebase.googleblog.com/2017/06/keep-your-promises-when-using-cloud.html?fbclid=IwAR2FuvlU2CbwjV-I75q7-WIkJyLHRYT-R3cyleEUWF3Fsq42THMCwZN6by8 const ref_p1_state = root.child(`player_states/${game_state.p1uid}`) const ref_p2_state = root.child(`player_states/${game_state.p2uid}`) const pr_update_p1 = ref_p1_state.update(update_p1) const pr_update_p2 = ref_p2_state.update(update_p2) return Promise.all([pr_update_p1, pr_update_p2]) ========== https://stackoverflow.com/questions/55430079/promise-all-does-not-wait-for-firestore-query-to-loop

2020-03-10 · 1 min · 22 words · Me

nodexjs expressjs ajv apidoc converter generator restclient curl postman

ajv schema to apidoc schema https://github.com/willfarrell/apidoc-plugin-schema required can’t product doc. converter https://github.com/apidoc/apidoc#converter to swagger https://github.com/fsbahman/apidoc-swagger postman collection to apidoc https://github.com/bonzzy/docmaster RestClient -> curl -> postman

2020-03-07 · 1 min · 25 words · Me