This file contains 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
/** | |
* Validates the structure and content of JSON Canvas data. | |
* @param {Object} data - The JSON Canvas data to validate. | |
* @throws {Error} If the data or structure is invalid. | |
*/ | |
function validateJsonCanvasData(data) { | |
if (typeof data !== 'object' || data === null) { | |
throw new Error('Invalid data: must be a non-null object'); | |
} |
This file contains 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
config | |
contentSecurityPolicy: { | |
directives: { | |
defaultSrc: ["'self'"], | |
scriptSrc: ["'self'","https://cdnjs.cloudflare.com/","https://code.highcharts.com/","'unsafe-inline'"], | |
styleSrc: ["'self'", 'https://fonts.googleapis.com', "'unsafe-inline'"], | |
imgSrc: ["'self'", 'https://*.com'], | |
fontSrc: ["'self'", 'https://*.com', 'data:'] | |
}, | |
This file contains 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
//const pinoInspector = require("pino-inspector"); | |
const path = require("path"); | |
const fastify = require("fastify")({ | |
//logger: { prettyPrint: true, level: "debug", prettifier: pinoInspector }, | |
ajv: { | |
plugins: [[require("ajv-keywords"), ["transform"]]], | |
}, | |
}); | |
fastify.register(require("@fastify/multipart")); |
This file contains 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
{"rows":[{"employeesid":20667909,"first_name":"joi","last_name":"baker","gender":"M","birth_date":"2020-01-02T00:00:00.000Z","recordstate":true,"created_date":"2020-12-06T09:17:39.413Z","updated_date":"2020-12-06T09:17:39.413Z"},{"employeesid":20667908,"first_name":"nick","last_name":"holden","gender":"F","birth_date":"2020-01-02T00:00:00.000Z","recordstate":true,"created_date":"2020-12-06T09:16:56.425Z","updated_date":"2020-12-06T09:16:56.425Z"},{"employeesid":20667907,"first_name":"Xinglin","last_name":"Morrin","gender":"F","birth_date":"2018-01-11T18:30:00.000Z","recordstate":true,"created_date":"2019-02-28T16:38:09.849Z","updated_date":"2019-02-28T16:38:09.849Z"},{"employeesid":20667906,"first_name":"Xinglin","last_name":"Morrin","gender":"M","birth_date":"2018-01-11T18:30:00.000Z","recordstate":true,"created_date":"2019-02-28T16:38:09.849Z","updated_date":"2019-02-28T16:38:09.849Z"},{"employeesid":20667905,"first_name":"Ortrud","last_name":"Binding","gender":"M","birth_date":"2018-01-11T18:30:00.000Z","r |
This file contains 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
{ | |
"rows": [{ | |
"employeesid": 20667909, | |
"first_name": "joi", | |
"last_name": "baker", | |
"gender": "M", | |
"birth_date": "2020-01-02T00:00:00.000Z", | |
"recordstate": true, | |
"created_date": "2020-12-06T09:17:39.413Z", | |
"updated_date": "2020-12-06T09:17:39.413Z" |
This file contains 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
File Refer https://drive.google.com/file/d/1fgEqB4LrSYhhgyeoKZl32ab-yO__bDht/view?usp=sharing | |
I would to optimized below query | |
select a.gender from "employees" as a | |
where lower( gender ) LIKE 'f%' group by gender | |
limit 20 |
This file contains 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
sudo apt update | |
#Nodejs | |
sudo apt install nodejs | |
sudo apt install npm | |
#Postgres | |
sudo apt-get update | |
sudo apt install postgresql postgresql-contrib | |
#Redis-server | |
sudo apt install redis-server | |
sudo service redis-server start |
This file contains 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
var newObj = internObj.reduce((a, b) => Object.assign(a, b), {}) |
This file contains 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
{ | |
"openapi": "3.0.0", | |
"info": { | |
"description": "This is a sample server Petstore server.", | |
"version": "1.0.0", | |
"title": "Swagger Petstore", | |
"termsOfService": "http://swagger.io/terms/", | |
"contact": { | |
"email": "apiteam@swagger.io" | |
}, |
This file contains 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
swagger: "2.0" | |
info: | |
description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters." | |
version: "1.0.0" | |
title: "Swagger Petstore" | |
termsOfService: "http://swagger.io/terms/" | |
contact: | |
email: "apiteam@swagger.io" | |
license: | |
name: "Apache 2.0" |
NewerOlder