05 2019 档案
摘要:A Proxy allows you to trap what happens when you try to get a property value off of an object and do some behavior before the value is accessed. For e
阅读全文
摘要:// --- Directions // Given a string, return the character that is most // commonly used in the string. // --- Examples // maxChar("abcccccccd") === "c" // maxChar("apple 1231111") === "1" function m...
阅读全文
摘要:ReaderT is a Monad Transformer that wraps a given Monad with a Reader. This allows the interface of a Reader that enables the composition of computati
阅读全文
摘要:For example you have the following code; If you want to debug is in Node, you can do: Then in cmd, run: Then just type 'continue' or just 'c'. It will
阅读全文
摘要:Every Svelte component has a lifecycle that starts when it is created, and ends when it is destroyed. There are a handful of functions that allow you
阅读全文
摘要:The whole magic of webapps is that users can interact with our code via various DOM events and Svelte is no exception in that regard. In this quick le
阅读全文
摘要:The useRef is a hook for creating values that persist across renders. In this lesson we'll learn how to use the useRef hook to measure the width of an
阅读全文
摘要:In this lesson, we'll cover how to create a custom React hook for managing the state of any input. This is one of the most powerful features of react
阅读全文
摘要:Imaging you have a large application, inside this large application you have many small individual applications. main app / | \ small A Small B Small
阅读全文
只有注册用户登录后才能阅读该文。
只有注册用户登录后才能阅读该文。
摘要:How to calculate the area of polygon. For a triangle like: We can calculate the area: This approach is able to solve all simple polygon areas problem:
阅读全文
摘要:Crocks.js has the implementation, no need to do it yourself. https://evilsoft.github.io/crocks/docs/functions/logic-functions.html#implies
阅读全文
摘要:Many times we might changed one file which we don't intent to do... but it was too late, until we found it, it is already push to repo. Let's assume,
阅读全文
只有注册用户登录后才能阅读该文。
只有注册用户登录后才能阅读该文。
只有注册用户登录后才能阅读该文。
摘要:12's factors are: {1,2,3,4,6,12}
阅读全文
摘要:Aspect-Oriented Programming (AOP) complements Object-Oriented Programming (OOP) by providing another way of thinking about program structure. The key
阅读全文
摘要:Previously we use Application Context to get Bean and Dependenies injection. It is actually easier to use 'CommonLineRunner'. Main beneift is we can u
阅读全文
摘要:Given a number N, the output should be the all the prime numbers which is less than N. The solution is called Sieve of Eratosthenes: First of all, we
阅读全文
摘要:succ :: Doing N + 1 times fn. add :: Doing N times succ, based on K mult :: is B pow :: or Thrush, is flip isZero :: return just T otherwise K(F) , K
阅读全文
只有注册用户登录后才能阅读该文。
只有注册用户登录后才能阅读该文。
摘要:Private variable in class: class field syntax: Previously you need to call 'super' But now, we don't need to, you can use classs field: Above two feat
阅读全文
摘要:125, how to conver to binary number?
阅读全文
摘要:Take away from NGCONF talk. It is a good show case to how to use decorator. One take away is that we can use 'symbol' to uqine key.
阅读全文
摘要:const log = console.log; // zero :: &fa.a const zero = f => x => x; // zero is F // once :: &fa.fa const once = f => x => f(x); // once it I // twice :: &fa.f(fa) const twice = f => x => f(f(x)); //...
阅读全文
只有注册用户登录后才能阅读该文。
只有注册用户登录后才能阅读该文。
摘要:Have a similar post about Reac.memo. This blog is the take away from this post. To understand why to use 'React.useMemo' or 'React.memo' (basiclly las
阅读全文
摘要:/** * When */ const _branch = (x) => { const result = (x && x.isPublic) ? dissoc('private', x) : x; console.log(result); return assoc('result', 'done', result); } const ...
阅读全文
只有注册用户登录后才能阅读该文。
摘要:This post is based on the NG-CONF talk, check the talk by yourself. 1. Dynamiclly add Angular Element into your application: Once you have angular ele
阅读全文
摘要:Based on the talk from NG-CONF. Check it out by yourself, here is just my own take away :) Differential loading: The basic idea is that, Angular will
阅读全文
只有注册用户登录后才能阅读该文。
只有注册用户登录后才能阅读该文。