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 { jsPDF as JsPDF } from "jspdf"; | |
import 'jspdf-autotable'; | |
import * as XLSX from 'xlsx'; | |
const handleDownloadpdf = useCallback(() => { | |
const selectedRows = []; | |
dataFiltered.forEach((row) => { | |
if (selected.includes(row.id)) { | |
selectedRows.push(row); | |
} | |
}); |
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 { Expose } from "class-transformer"; | |
import { SelectQueryBuilder } from "typeorm"; | |
export interface PaginateOptions { | |
limit: number; | |
currentPage: number; | |
total?: boolean; | |
} | |
export class PaginationResult<T> { |
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 { ApiBody } from '@nestjs/swagger'; | |
interface IApiFileSwigger { | |
files: Array < { name: string, description: string, required: boolean }>; | |
} | |
export const ApiFiles = ({files}: IApiFileSwigger): MethodDecorator => ( | |
target:any, propertyKey : string | symbol, |
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
export enum HttpStatus { | |
CONTINUE = 100, | |
SWITCHING_PROTOCOLS = 101, | |
PROCESSING = 102, | |
EARLYHINTS = 103, | |
OK = 200, | |
CREATED = 201, | |
ACCEPTED = 202, | |
NON_AUTHORITATIVE_INFORMATION = 203, | |
NO_CONTENT = 204, |
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 fs from 'fs'; | |
import config from 'config'; | |
import path from 'path'; | |
import winston, { | |
createLogger, | |
LoggerOptions, | |
transports, | |
format | |
} from 'winston'; | |
import winstonDaily from 'winston-daily-rotate-file'; |
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
class NodeClass{ | |
value:number = 0; | |
left:NodeClass|null = null; | |
right:NodeClass|null = null; | |
constructor() | |
{ | |
this.value = 0; | |
this.left = null; | |
this.right = null; |
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
function sortedSquares(nums: number[]): number[] { | |
let result = Array(nums.length).fill(0) | |
let p1 = 0 | |
let p2 = nums.length - 1 | |
let position = p2 | |
while (p1 <= p2) { | |
let smaller=nums[p1] | |
let laege=nums[p2] | |
if( Math.abs(smaller)>Math.abs(laege)){ |
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 React from 'react' | |
import { useSelector } from 'react-redux' | |
import { Link } from 'react-router-dom' | |
// material-ui | |
import { makeStyles } from '@material-ui/core/styles' | |
import { | |
Box, | |
Button, | |
Checkbox, |
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
var result = [] | |
function permutation(arr, currentSize) { | |
if (currentSize == 1) { | |
result.push(arr.join("")); | |
return; | |
} | |
for (let i = 0; i < currentSize; i++){ | |
permutation(arr, currentSize - 1); |
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
/* eslint-disable @typescript-eslint/no-empty-function */ | |
import React, { createContext, useEffect, useReducer } from 'react' | |
// third-party | |
import firebase from 'firebase/app' | |
import 'firebase/auth' | |
// action - state management | |
import { FIREBASE_STATE_CHANGED } from '../store/actions' |
NewerOlder