- 5 React Architecture Best Practices
- A plugin system is born... · React Static
- Applying microservices design patterns to scale react app development • Soluto Engineering Blog
- Architecting your React application.
- Best architecture for the React project - Mad Devs
- Build a Super-Modular Todo App with React and Bit Components
- [Building an Enterprise React Application, Part 1 | Lullabot](https://www.lullabot.com/articles/building-an-enterprise-react-ap
This file contains hidden or 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
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
This file contains hidden or 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
/** | |
* Get the number of days in any particular month | |
* @link https://stackoverflow.com/a/1433119/1293256 | |
* @param {integer} m The month (valid: 0-11) | |
* @param {integer} y The year | |
* @return {integer} The number of days in the month | |
*/ | |
var daysInMonth = function (m, y) { | |
switch (m) { | |
case 1 : |
This file contains hidden or 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
animateClass() { | |
const scroll = window.requestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) } | |
const elementsToShow = document.querySelectorAll('.animate') | |
const _self = this | |
Array.prototype.forEach.call(elementsToShow, function(element) { | |
if (_self.isElementInViewport(element)) { | |
element.classList.add('is-visible') | |
} | |
}) |
This file contains hidden or 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
getSpSingleItems(petState: TextValue[]): string[] { | |
const filterState: TextValue[] = [...petState].reverse() | |
let i: number = filterState.length | |
while (i--) { | |
if (i - 1 >= 0) { // remove element if 2 continue is normal item | |
if (!filterState[i].longText && !filterState[i - 1].longText) { | |
filterState.splice(i, 1) | |
filterState.splice(i - 1, 1) | |
i = i - 1 |
This file contains hidden or 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
SELECT @n := @n + 1 n, | |
first_name, | |
last_name | |
FROM table1, (SELECT @n := 0) m | |
ORDER BY user_id |
_. Procedure | _. Function |
---|---|
Được sử dụng chủ yếu để thực hiện quy trình nhất định | Được sử dụng chủ yếu để thực hiện một số tính toán |
Không thể gọi trong câu lệnh SELECT | Có thể được gọi là trong câu lệnh SELECT (không chứa DML) |
Sử dụng tham số OUT để trả về giá trị | Sử dụng RETURN để trả về giá trị |
Không bắt buộc trả về giá trị | Bắt buộc trả về giá trị |
RETURN chỉ đơn giản là sẽ thoát khỏi sự kiểm soát từ chương trình con. | RETURN sẽ thoát khỏi sự kiểm soát từ chương trình con và cũng trả về giá trị |
datatype trở lại sẽ không được quy định tại thời điểm tạo ra | datatype là bắt buộc tại thời điểm tạo ra |
This file contains hidden or 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
// Classification is adopted eight regional division | |
var regions = [ | |
{id:1, name:"北海道", kana:"ホッカイドウ", en:"hokkaido", neighbor:[2]}, | |
{id:2, name:"東北", kana:"トウホク", en:"tohoku", neighbor:[1]}, | |
{id:3, name:"関東", kana:"カントウ", en:"kanto", neighbor:[2, 4]}, | |
{id:4, name:"中部", kana:"チュウブ", en:"chubu", neighbor:[2, 3, 5]}, | |
{id:5, name:"近畿", kana:"キンキ", en:"kinki", neighbor:[4, 6, 7]}, | |
{id:6, name:"中国", kana:"チュウゴク", en:"chugoku", neighbor:[5, 7, 8]}, | |
{id:7, name:"四国", kana:"シコク", en:"shikoku", neighbor:[5, 6, 8]}, | |
{id:8, name:"九州", kana:"キュウシュウ", en:"kyusyu", neighbor:[6, 7]} |
This file contains hidden or 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
pref = { | |
1: '北海道', | |
2: '青森県', | |
3: '岩手県', | |
4: '宮城県', | |
5: '秋田県', | |
6: '山形県', | |
7: '福島県', | |
8: '茨城県', | |
9: '栃木県', |
NewerOlder