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 arrayManipulation(n: number, queries: number[][]): number { | |
| const data: number[] = Array(n).fill(0); | |
| let maxValue: number = Number.MIN_VALUE; | |
| let sum: number = 0 | |
| queries.forEach(([startIndex, endIndex, fillValue]) => { | |
| data[startIndex - 1] += fillValue | |
| if(data[endIndex] !== undefined) data[endIndex] -= fillValue | |
| }) |
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
| curl --location --request POST 'https://payroll-v2-alb.dev-v2.runahrapps.com/api/v1/document' \ | |
| --header 'Content-Type: application/json' \ | |
| --data-raw '{ | |
| "template": { | |
| "id": "3a214939-864b-4ad6-a81a-68bd96e4ebc6" | |
| }, | |
| "data": { | |
| "legalEntity": { | |
| "name": "QA", |
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
| const number = 4 | |
| const affected = [1, 2] | |
| const poisonous = [3, 4] | |
| function getSubArrayz(n) { | |
| const LEFT = []; | |
| let answer = 0 | |
| for(let i = 0; i <= n; i++){ | |
| LEFT[i] = 0; |
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
| { | |
| "_id": "589304e3d9fc2214e7f61533", | |
| "appliedInspectionCategory": "589304e3d9fc2214e7f61532", | |
| "cpoInspectionPointName": "Certified Pre-Owned Consumer Warranty Booklet", | |
| "allowNotApplicable": null, | |
| "inspectionPoint": { | |
| "_id": "58766e85c1ae84002d028690", | |
| "stateMeasurementType": { | |
| "_id": "57babd8f2c19123e00c16df0", | |
| "name": "Binary" |
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
| "colors": [ | |
| { | |
| "options": [ | |
| { | |
| "availability": "USED", | |
| "equipmentType": "COLOR", | |
| "name": "Black (Leather)", | |
| "id": "401656590" | |
| }, |
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
| const getNthPrime = (position) => { | |
| const primeNumbers = [2]; | |
| for(let i = 3; primeNumbers.length < position; i += 2) { | |
| let numberIsPrime = true; | |
| for(let j = 0; j < primeNumbers.length && Math.pow(primeNumbers[j], 2) <= i; j++) { | |
| if(i % primeNumbers[j] === 0){ | |
| numberIsPrime = false; | |
| break; | |
| } | |
| } |
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 Prismic from 'prismic.io'; | |
| export default class Pages extends React.Component { | |
| state = { | |
| doc: null, | |
| notFound: false, | |
| } |
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 {render} from 'react-dom'; | |
| const AuthenticationHOC = (Component) => class extends React.Component { | |
| constructor(props){ | |
| super(props); | |
| this.state = { | |
| currentUser: {}, |
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'; | |
| global.t = require('moment'); | |
| var httpMocks = require('node-mocks-http'), | |
| models = require('../../../server/models/'), | |
| should = require('should'), | |
| cohortController = require('../../../server/controllers/cohorts'); | |
| describe('Server Cohort Controller Test', function() { | |
| var mockCohort = { | |
| "c1": { |
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
| describe('cohorts index method test', function() { | |
| var req = httpMocks.createRequest(); | |
| var res = httpMocks.createResponse(); | |
| cohortController.index(req, res); | |
| it('should display all cohorts in the database', function(done) { | |
| var data = JSON.parse(res._getData()); | |
| data.length.should.equal(3); | |
| res.statusCode.should.equal(200); | |
| done(); | |
| }); |
NewerOlder