A del of these tricks are not new stories, but several are pretty handy. Let's begin.
Refresh Knowledge
Repeating is the best way to learn and remember things, especially when you have terrible long-term memory. Today I have read some good articles and also watched some videos about several high order functions' usage and know one thing called rxjs observable. Pretty cool stuff.
Regex - fundamental rules
Have no idea why the first one becomes 404, so post it again.
Creating proper regex is pretty simple.
step 1: open your preferred editor
step 2: let a cat play on your keyboard
Stop joking, here comes some notes and something I may collect from Stackflow, youtube, books or somewhere I googled.
SASS - awesome
This can be seen as Chapter 2 after this one ➡ Chapter 1
Resources lists
1. SASS lang
2. Usage conclusion (Chinese)
3. SASS 中文网
4. One article with several good demos using SASS
5. SASS-GUIDELINES
Cross-domain solution related
Original address
This one is really pure note, because I have no clue at all. HTTP related knowledge is something I am lack of so much. Will try to spend some time (if I have any) on it.
Pseudo elements related
Some nice tricks to set pseudo elements' content, nothing is impossible.
Code comes following.
Form validation (strategy pattern)
Updated regex pattern, using modifier i to reduce it, looks better now.
This time, it can be considered as Project work round 2, and the mission is do the form valition by JavaScript. Frankly speaking, I don't even have a clear clue about what I am going to do (or if I was able to do anything about that) until some morning - after I read one article from my APP - then the whole thing became clearly enough. And in a awesome and reusable way of course.
UPDATE
Different browsers act differently somehow. eg, input value is “12312” on Chrome and “123 12” on FireFox, so should be more careful! cl cl cl!!!
Got to know that we can use Proxy Pattern instead. article link ⬅ Will read later.
Something about setting responsive layout on IE
Recently, we are doing the so-called first big project, and one among those horrible nightmares is that we need to get our website support IE, well the good thing is that we only need to support one of these versions. This damn thing took me almost 3 days to eventually get a relatively - at least for now - good solution.
PHP Patterns: Singleton
Talk is cheap, show me the code.
Birthday again & notes about axios
Well, after 3 rounds Ben Ming Nian plus this horrible 2020 which seems to have no sign to getting better, birthday comes again.