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
| <html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html> |
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
| //Option 1: Pass context from parent to child | |
| // Cách tôi chế đem parent context đi muôn nơi | |
| const AddTodo = ({ | |
| onAddClick, | |
| parentContext | |
| }) => { | |
| let _this = parentContext; //This mean _this from parent context | |
| return ( | |
| <div> | |
| <input ref={node => { |
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
| 'use strict'; | |
| function findX(n, a, b, h) { | |
| var Petya = []; | |
| var Vasya = []; | |
| if (a + b !== n) { | |
| return 'wrong!'; | |
| } else { | |
| h.sort(function (a, b) { return b - a }); | |
| for (var i = 0; i <= h.length; i++) { |
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
| 'use strict'; | |
| /*Ideal: | |
| Cho mảng chạy từ trái qua phải rồi lấy 1 phần tử ra để so sánh. Khi lấy phần tử ra ta được mảng mới temptArray | |
| ( mảng đã loại bỏ i). VD: | |
| Array[a1 a2 a3 a4 a5] ( lấy a1 ra để xét ) -> tempArray= a2 a3 a4 a5 | |
| Rồi đem đi so sánh a1 với tất cả phần tử trong tempt array nếu a1> tempArray[i] thì lấy giá trị quay ngược về Array | |
| tìm ra vị trí rồi đổi chỗ . Cứ mỗi lần đổi là kiểm tra xem có phải là mảng tăng không. | |
| Nếu tăng thì bật cờ dừng bài toán | |
| VD: |
NewerOlder