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: |
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
| //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
| <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
| //Ideal | |
| function getStates (type) { | |
| var states = { | |
| 'order': 'Customer make order', | |
| 'payment': 'Customer did payment', | |
| 'shipping': 'Carrier is processing', | |
| 'close': `this ${order.id}'s compledted` | |
| }; | |
| return 'The state I chose was ' + (states[type] || states['default']); | |
| } |
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
| { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/definitions/layout" | |
| }, | |
| "definitions": { | |
| "layout": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/definitions/panel" |
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"; | |
| module.exports = [ | |
| [ | |
| { | |
| position: { | |
| grow: 3 | |
| }, | |
| views: [ | |
| { |
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"; | |
| var blessed = require("blessed"); | |
| var ERROR_TEXT_DISPLAY_TIME = 3000; | |
| /** | |
| * This is the constructor for the Goto Time View. | |
| * | |
| * @param {Object} options |
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"; | |
| var _ = require("lodash"); | |
| var blessed = require("blessed"); | |
| var HelpView = require("./views/help"); | |
| var generateLayouts = require("./generate-layouts"); | |
| var LogProvider = require("./providers/log-provider"); | |
| var MetricsProvider = require("./providers/metrics-provider"); | |
| var GotoTimeView = require("./views/goto-time-view"); | |
| var views = require("./views"); |
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
| import $ from 'jquery'; | |
| import prestashop from 'prestashop'; | |
| /** | |
| * This function returns the value of the requested parameter from the URL | |
| * @param {string} paramName - the name of the requested parameter | |
| * @returns {string|null|object} | |
| */ | |
| export function psGetRequestParameter(paramName) { | |
| let vars = {}; |
OlderNewer