/**
* @param {number[][]} grid
* @param {number} k
* @return {number[][]}
*/
var minAbsDiff = function(grid, k) {
const m = grid.length;
const n = grid[0].length;
// The result matrix has (m - k + 1) rows and (n - k + 1) columns,
// because that's how many k×k windows can slide across the grid.
const ans = Array.from({ length: m - k + 1 }, () =>
Array(n - k + 1).fill(0)
);
// Slide a k×k window over every valid top-left corner (i, j)
for (let i = 0; Open linux terminal:
cd batchservice
nano core-api-dev.code-workspace
Paste the below code:
{
"folders": [
{
"path": "./core-api-development"
}
],
"settings": {
"terminal.integrated.cwd": "${workspaceFolder}",
"terminal.integrated.defaultProfile.linux": "bash"
},
"remoteAuthority": "wsl+Ubuntu"
}
ctrl + X
Y
enter
Step 1: Create the shortcut
Right-click on your Windows Desktop
Select New → Shortcut
Step 2: Set the target commaConnection & Execution Flow:
1. Developer runs `npm run commit`
↓
2. Commitizen (cz) launches interactive prompt
- Uses @commitlint/cz-commitlint adapter
- Guides user to create conventional commit message
↓
3. Git commit process begins
↓
4. Husky triggers hooks in sequence:
a) prepare-commit-msg hook
- jira-prepare-commit-msg adds JIRA ticket (CDE-XXX)
b) pre-commit hook
- lint-staged runs Prettier on staged .ts files
c) commitfor (let i = 0; i < 10; i++) {
const startTime = performance.now();
const elasticSearchResponse = await this.elasticsearchClient.get(
"rinesh-playground-property",
"documentId"
);
// console.log(`Response Received -> ${JSON.stringify(elasticSearchResponse)}`);
const endTime = performance.now();
const duration = endTime - startTime;
console.log(`Time took for the execution - ${duration}`);
}
import { performance } from 'perf_hooks';
const start = performance.now();
const end = performance.now();
const elapsed = end - start;
console.log(`newAccountRequest took ${elapsed} milliseconds to execute.`);private* batcher(aggs: [string, string][] = [], batchSize: number = 5) {
let j = 0;
for (let i = 0; i < aggs.length; i += batchSize) {
j = i + batchSize;
yield aggs.slice(i, j);
}
}
private* batcher(aggs: [string, string][] = [], batchSize: number = 5) {
while (aggs.length) {
yield aggs.splice(0, batchSize);
}
}package com.legendss.backend.controllers;
import com.legendss.backend.entities.LED;
import com.legendss.backend.services.LEDService;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/leds")
@CrossOrigin("*")
public class LEDController {
private final LEDService ledService;
public LEDController(LEDService ledService) {
this.ledService = ledService;
}
@GetMapping("/get/color/{id}")
public LED getLEDColorController(@PathVariable Longpackage com.legendss.backend.repositories;
import com.legendss.backend.entities.LED;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface LEDRepository extends JpaRepository<LED, Long> {
}
package com.legendss.backend.repositories;
import com.legendss.backend.entities.LED;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface LEDRepository extends JpaRepository<LED, Long> {
}
package com.legendss.backend.entities;
import jakarta.persistence.*;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@Table(name = "leds")
@Entity
@Getter
@Setter
public class LED {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
@Column(name = "color")
private String color;
}#include <Arduino.h>
#include <Adafruit_NeoPixel.h>
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#include "secrets.h"
const char* SSID = NETWORK_SSID;
const char* PASSWORD = NETWORK_PASSWORD;
const char* GET_URL = URL;
#define LED_PIN 38
#define NUM_PIXELS 1
Adafruit_NeoPixel pixels(NUM_PIXELS, LED_PIN, NEO_GRB + NEO_KHZ800);
String color = "";
void setup()
{
Serial.begin(115200);
delay(1000);
WiFi.begin(SSID, PASSWORD);
Serial.print("Connecting to WiFNVIDIA_API_KEY="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"{
"profiles": {
"default": "core"
},
"folders": [
{
"name": "core",
"path": "core"
}
],
"settings": {
"editor.fontFamily": "'Dank Mono', 'Courier New', monospace",
"editor.fontSize": 15,
"editor.fontLigatures": true,
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"keyword",
"variable.language",
"string",
"variable",
"function",
"s1. Get the True Total Count
fields @timestamp, @message
| filter @message like /Address parsed incorrectly/
| stats count() as errorCount
This tells you the exact number of failed Enformion calls in the query window.
# 1. Clear Nx cache
npx nx reset
# 2. Delete the stale build output
rm -rf apps/core-api/dist
# 3. Restart
npx nx start core-api### Delete merged branches
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d