This document describes the four execution paths in twcrdsvc ProcessorImpl for handling GetTwRowKeysRequest, controlled by the breg flag bbit_twcrdsvc_enable_row_keys_calculations.
sequenceDiagram
autonumber
actor UI as UI or Caller| const chalk = require('chalk'); | |
| const semver = require('semver'); | |
| function chalkLog(color, message) { | |
| console.log(chalk[color](message)); | |
| } | |
| function loadNodeVersionFromPackageJson() { | |
| chalkLog('green', 'Loading... loadNodeVersionFromPackageJson from ~/.zshrc'); | |
| const packageJsonPath = `${process.cwd()}/package.json`; |
| // original code | |
| async query(options) { | |
| var query = await this.buildQueryParameters(options); | |
| if (query.targets.length <= 0) { | |
| return this.q.when({ data: [] }); | |
| } | |
| return this.doRequest(query).then(result => { | |
| var res = [] | |
| _.forEach(result.data.results, r => { |
| [[{"y":1,"x":"03:25","label":1589340372559},{"y":0,"x":"03:30","label":1589340372559},{"y":0,"x":"03:35","label":1589340372559},{"y":0,"x":"03:40","label":1589340372559},{"y":0,"x":"03:45","label":1589340372559},{"y":0,"x":"03:50","label":1589340372559},{"y":0,"x":"03:55","label":1589340372559},{"y":0,"x":"04:00","label":1589340372559},{"y":0,"x":"04:05","label":1589340372559},{"y":0,"x":"04:10","label":1589340372559},{"y":0,"x":"04:15","label":1589340372559},{"y":0,"x":"04:20","label":1589340372559},{"y":0,"x":"04:25","label":1589340372559}],[{"y":1,"x":"03:25","label":1589340372632},{"y":0,"x":"03:30","label":1589340372632},{"y":0,"x":"03:35","label":1589340372632},{"y":0,"x":"03:40","label":1589340372632},{"y":0,"x":"03:45","label":1589340372632},{"y":0,"x":"03:50","label":1589340372632},{"y":0,"x":"03:55","label":1589340372632},{"y":0,"x":"04:00","label":1589340372632},{"y":0,"x":"04:05","label":1589340372632},{"y":0,"x":"04:10","label":1589340372632},{"y":0,"x":"04:15","label":1589340372632},{"y":0,"x":" |
Update the schema name in DatabaseConnection.java
Remove all duplicate code for creating connection in all DAOs first.
Just use the getConnection method from DatabaseConnection.java
At any instance, do not duplicate the connection strings or copy paste connection methods to stay away from trouble.
Remove duplicate package tags in pom.xml
| def merge_arr(a, b): | |
| result = [] | |
| i = 0 | |
| j = 0 | |
| while i < len(a) or j < len(b): | |
| if i < len(a) and ((j < len(b) and a[i] < b[j]) or j >= len(b)): | |
| result.append(a[i]) | |
| i += 1 |
| Practise: | |
| 1. Create a js based html with button | |
| 2. Click button to call flask api | |
| 3. Flask api sends response as stream | |
| 4. Request gets closed | |
| -- Flask : |
| { | |
| "Amazon": [ | |
| [ | |
| "1", | |
| "Two Sum", | |
| "44.3%", | |
| "Easy" | |
| ], | |
| [ | |
| "2", |
| class Solution: | |
| def nextPermutation(self, nums: List[int]) -> None: | |
| n = len(nums) | |
| prev = -float("inf") | |
| ind = n -1 | |
| for i in range(n): | |
| ind = n - i -1 | |
| if nums[ind] < prev: | |
| j = n -1 | |
| while(nums[j] <= nums[ind] and j > ind) : |
| class Solution: | |
| def maxSubArray(self, nums: List[int]) -> int: | |
| local_sum = 0 | |
| global_sum = -float("inf") | |
| for i in nums: | |
| local_sum = local_sum + i | |
| if i >= local_sum: | |
| local_sum = i | |
| if local_sum > global_sum: |