lodash常用方法
其實不是常用方法,是我在專案上看到過的方法。 _.sortBy(collection, [iteratees=[_.identity]]) https://lodash.com/docs/4.17.11#sortBy _.uniq(array) https://lodash.com/docs/4.1...
Read more其實不是常用方法,是我在專案上看到過的方法。 _.sortBy(collection, [iteratees=[_.identity]]) https://lodash.com/docs/4.17.11#sortBy _.uniq(array) https://lodash.com/docs/4.1...
Read more
在react的debug时,如果遇到像这种 ` ` 的地方,会造成下面的程式码没有高亮提示…这时候如果在大括号旁边加上双引号的话就可以了 原因应该是因为单引号会造成HTML判断结束在这边 ( >> HWD C.M Chen ) 但這樣寫又有可能造成其它問題 所以還是換firefox吧… 這是chro...
Read more看好久終於看完三集,看完覺得有種如釋重負的感覺,不過…這結局實在讓人有點傻眼就是了。看完雖然有部份覺得感動,但也有些哀傷。感動的是凱爾希的媽媽到最後竟然變成一個正常的媽媽了,然後卡琳還活著…哀傷的是凱爾希原本的夥伴都不記得她了。等於完全的改寫歷史了… 所以花了三本的時間寫了一堆人物,這些人物的結局呢...
Read more我發現react的state更新,假如在setState之後馬上console.log() 那個state,它還是舊的state,但是在render的時候就是新的了。從上面這個可以測試… 不過如果是要靠著state印出畫面的話就沒關係,畢竟在render上能拿到新的state…....
Read more灰與幻想的格林姆迦爾 青春豬頭少年不會夢到兔女郎 工作細胞 果然我的青春戀愛喜劇搞錯了 遊戲 3 人娘 女神異聞錄 4 Fate/zero 刀劍神域外傳 Gun Gale Online 博多豚骨拉麵團 龍王的工作! Guilty Crown 罪惡王冠 Just Because! 歡迎來到實力至上主義...
Read more最簡單的方法: const uniq = [...new Set(array)]; 本文參考這一篇文章 https://stackoverflow.com/questions/9229645/remove-duplicate-values-from-js-array...
Read morepure的 Array.from() reduce map concat slice ※slice不包含最後一個 impure的 splice sort copyWithin pop 回傳的不是array的: entries 回傳boolean的 some (提供callback includes ...
Read more修改上次的commit訊息 git commit --amend -m "xxxxxxxxx" git 刪除本地分支 git branch -D feature/TP-999 參考來源 Git: Delete a branch (local or remote) 清空目前修改的檔案 git rest...
Read more阿肥腦袋好像進入debug模式,想要找出被這麼稱呼的原因- 她怎麼會知道我是魔法師,而且還包莖?我們之前才見過一次面欸…而且… 這時,女神的手在他的臉前面左右晃,「唷呼,回神喔,怎麼了呢魔法師?」 「喔喔喔!好,妳好妳好,請問…怎麼稱呼呢?」阿肥馬上回過神來。 「叫我羽心就好了」 「喔喔羽心嗎,好,...
Read more方法一: var event = new MouseEvent('mouseover', { 'view': window, 'bubbles':true, 'cancelable':true }); document.querySelector('.luna-cute').dispatchEven...
Read more
先看root size。 查看到html的 font-size是 10vw。 大小以iphone5為基準 因為iphone5的寬為320 故320 / 10 = 32。 可以利用線上工具來換算。在photoshop上的字型若是14,就在Pixels中輸入14 photoshop最好調整成320寬,得...
Read morehttps://km.nicetypo.com/doc/bc76185c203a5334e9daadf725af3be9 https://hk.saowen.com/a/ba965995919b5f04ed8bcb7ccc5b4af1e95792e9769fd92a8d36881d1fad8683...
Read moreconst name = 'cute'; const surname = 'luna'; var sayHello = function({ name, surname }) { var cute = 'fuck you'; var fuck = 'fuck your dick'; console....
Read more歡迎補充~ https://www.businesstoday.com.tw/ https://popchart.co/ https://www.easyname.com/en https://www.axios.com/...
Read moreconstructors Do create any fields (variables starting with this.) initialize state based on props received set initial state if not using class proper...
Read more
記得看不懂的都丟到babel上面試試 任何數字加上 undefined 都會是 NaN 空字串是falsey. (The values false , null , 0 , "" , undefined , and NaN are falsey) 驗證是否為空字串 Tips to Level Up ...
Read more
Anglophenia 英國腔很好聽 English with Lucy 推,英文標準而且講得速度應該算慢的。 Vanessa Van Edwards 各種主題 Learn ENGLISH with SPEECHES (English Subtitles) – YouTube...
Read more
The Net Ninja 還不錯,教程都還蠻新的,還有一個還沒播完的剛好是我很有興趣的(React, Redux & Firebase App Tutorial #1 – Introduction)不過就是腔調上有點聽不太慣。 有React、Vue、Node.js、REST API 、...
Read more閉包的解釋: 1. 外面讀不到裡面,裡面讀得到外面 2. 每個函式可以有自己的私有變數,跟其它的函式名子可以一樣(會有容易搞混的缺點 3. 閉包:它本來抓得到什麼值,就能抓到什麼值,不論它是在哪裡執行的(可能return 給外層的函式了) 參考文章: A Simple Explanation of ...
Read more這是ES6版的 const numbers = [10, 20, 30, 40] // sums to 100 // function for adding two numbers. Easy! const add = (a, b) => a + b // use reduce to sum our...
Read more需要把畫面放大就按【ctrl + 】 在react裡面沒有emmet (例如打p.lunacute 按tab會自動產生)的話把 .js 改成 .jsx Ctrl + P 可喚出任意門,輸入檔名到達想到達的檔案。(範圍會限制當前專案資料夾,很方便) stop multi cursor editing ...
Read more
記錄一些看教學時覺得應該特別記下來的咚咚。 import { render } from "react-dom"; 加上這一行,要在網頁上render只要直接打這樣即可: render(<p>Hi<p>, document.querySelector('#main')); 要寫comment要這樣寫...
Read more
Falcor: One Model Everywhere https://netflix.github.io/falcor/ 現在已經不講REST API惹 現在都嘛是講GraphQL 現在真的不談REST API喇 另外一個超級顯學是Google的GRPC...
Read more1. What is JavaScript? JavaScript is a client-side as well as server side scripting language that can be inserted into HTML pages and is understood by...
Read morehttps://stackoverflow.com/questions/36038616/where-can-i-find-node-js-interpreter 編輯器的設定問題: 記得把這邊勾掉… 再到這裡(Settings | Editor | Code Style | JavaScript)...
Read more在cmder输入的时候,懒得打资料夹名称,可以打ls,列出资料夹名称,前面打一个英文字再按tab,或是对着想去的资料夹,先括起来,再按右键。(它会自己跑到剪贴簿上) 把node的資料夾刪掉,再跑一次npm install,它就會再重新安裝一次所有的套件。...
Read morehttps://www.soundclick.com/bands3/default.cfm?bandid=297314 https://www.gardnermuseum.org/experience/music?filter=composer...
Read more
webpack是網頁應用程式的打包工具,它有不少優點,例如壓縮代碼或是增加代碼可讀性…使用它可以讓開發變得更加順利。 官網的教學: 1. 先介紹怎麼載入lodash、run 起來 2. 處理css檔案 3. 處理圖片檔案 4. 載入字型檔案(用woff檔實驗有成功顯示不同字型) 5. 處理其它檔案(...
Read more首先來用用可愛的腳手架,幫我們馬上搭好環境。 create-react-app stupid 這裡的stupid,是資料夾名稱,輸入這個指令之後,它會自己建立一個叫做stupid的資料夾,裡面就是搭建好的React的環境。 跑完之後再輸入: cd stupid yarn start 結果如果沒有成功...
Read moreNPM教学,NPM感觉就像工具库一样。 干,靠北喔,它的版本也更新得太快了吧! 现在已经到六点四点零了拉。我记得我电脑才买了没多久,买了电脑的时候安装NPM的说。 NPM输入的指令: npm config list 打这个会跑出我们当初安装时的资讯。 npm config get prefix 这个...
Read more