Database.raw(
`(${PersonalLoanApplicationRepository.queryColumn(
'createdAt',
)} at time zone 'Asia/Kolkata')::varchar as "customerApplicationInitiatedDate"`,
),
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
import { customAlphabet, nanoid } from 'nanoid'; | |
import nanoidDictionary from 'nanoid-dictionary'; | |
export enum NanoidStringEnum { | |
NUMERIC = 'NUMERIC', | |
LOWERCASE = 'LOWERCASE', | |
UPPERCASE = 'UPPERCASE', | |
ALPHABETS = 'ALPHABETS', | |
ALPHANUMERIC = 'ALPHANUMERIC', | |
LOWERCASE_NUMERIC = 'LOWERCASE_NUMERIC', |
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
let data; | |
let currentPage = -1; | |
let currentArticle = 0; | |
let loaderElement, articleContainer; | |
let totalPages; | |
const toggleLoader = () => { | |
if (loaderElement.classList.contains('hidden')) { | |
loaderElement.classList.remove('hidden'); | |
} else { |
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
import React, { useEffect, useState } from 'react'; | |
import axios from 'axios'; | |
const App = () => { | |
let [list, setList] = useState(<>LOADING</>); | |
useEffect(() => { | |
// You can use your link here | |
// I have created corsenabled.herokuapp.com just to bypass the CORS issue. It's only for testing and educational purpose only. No intention to infringe any copyrights or other legal matters |
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
ction f1() { | |
return this; | |
} | |
// In a browser: | |
f1() === window; // true | |
// In Node: | |
f1() === globalThis; // true |
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
'use strict'; // see strict mode | |
function f2() { | |
// 'use strict'; or else here | |
return this; | |
} | |
console.log(f2() === undefined) // true |
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
// An object can be passed as the first argument to call or apply and this will be bound to it. | |
var obj = {a: 'Custom'}; | |
// We declare a variable and the variable is assigned to the global window as its property. | |
var a = 'Global'; | |
function whatsThis() { | |
return this.a; // The value of this is dependent on how the function is called | |
} |
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
function f() { | |
return this.a; | |
} | |
var g = f.bind({a: 'azerty'}); | |
console.log(g()); // azerty | |
var h = g.bind({a: 'yoo'}); // bind only works once! | |
console.log(h()); // azerty |
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
function sum() { | |
return this.a + this.b + this.c; | |
} | |
var o = { | |
a: 1, | |
b: 2, | |
c: 3, | |
get average() { | |
return (this.a + this.b + this.c) / 3; |
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
class Rectangle { | |
constructor(w, h) { | |
this.w = w; | |
this.h = h; | |
} | |
} | |
/* | |
* Write code that adds an 'area' method to the Rectangle class' prototype | |
*/ |
NewerOlder