Skip to content

Instantly share code, notes, and snippets.

{
"type": "Group",
"address": {
"addressLine1": "567 East Nobel Road",
"addressLine2": "Labore officia facil",
"city": "Accusamus animi mod",
"state": "Explicabo Similique",
"zip": "13204",
"lat": null,
"lng": null
{
"type": "Individual",
"address": {
"addressLine1": "816 East Hague Lane",
"addressLine2": "Fugit quod qui repr",
"city": "Est dolores corrupti",
"state": "Dolorem officia repr",
"zip": "21414",
"lat": null,
"lng": null
@JustAyush
JustAyush / dependent-inputs.tsx
Created February 1, 2022 09:55
Dependent Inputs showcasing use of FormProvider
import {
Button,
FormControl,
FormErrorMessage,
FormHelperText,
FormLabel,
Link,
Select,
SimpleGrid,
Stack,
const transactions = [
{
"id": "f0ca24a0304644a897edfb9cad5aa87b",
"transactionDate": "2021-12-28T21:07:49.628Z",
"subscriptionId": "b70ed8aaa6364f058c81b8a0ace82698",
"gatewayReferenceId": "362234778769",
"totalAmount": "99.00",
"drugName": "Drug name",
"paymentDescriptor": "30 days pack",
"status": "Succeeded",
{
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"javascript.preferences.quoteStyle": "single",
// "editor.detectIndentation": false,
"todo-tree.tree.showScanModeButton": false,
@JustAyush
JustAyush / react-select-with-rhf.tsx
Created September 14, 2021 11:59
React Select usage with react-hook-form
import {
Button,
FormControl,
FormErrorMessage,
FormLabel,
Link,
SimpleGrid,
Stack,
} from '@chakra-ui/react';
const express = require('express');
const router = express.Router();
const userService = require('./user.services.js');
// Fetch Users
router.get('/', async (req, res) => {
communicationsService.fetch()
.then(data => {
httpResponse.successHandler(res, data);
const userService = (() => {
// import db connection
// import utils
// import constants
// import global services (if any)
function super_digit(n, k) {
const p = find_p(n, k);
const superDigit = find_super_digit(p);
return superDigit;
}
function find_p(n, k) {
let concatString = "";
for (let i = 0; i < k; i++) {
concatString = concatString + n.toString();
const location = [{zip:85739,city:"Tucson",st:"AZ",lat:32.465,lng:-110.8922},
{zip:85740,city:"Tucson",st:"AZ",lat:31.9701,lng:-111.8907},
{zip:85741,city:"Tucson",st:"AZ",lat:32.3472,lng:-111.0419},
{zip:85742,city:"Tucson",st:"AZ",lat:32.4076,lng:-111.065},
{zip:85743,city:"Tucson",st:"AZ",lat:32.3366,lng:-111.1771},
{zip:85744,city:"Tucson",st:"AZ",lat:31.9701,lng:-111.8907},
{zip:85745,city:"Tucson",st:"AZ",lat:32.2434,lng:-111.0179},
{zip:85746,city:"Tucson",st:"AZ",lat:32.1422,lng:-111.0506},
{zip:85747,city:"Tucson",st:"AZ",lat:32.0984,lng:-110.7272},
{zip:85748,city:"Tucson",st:"AZ",lat:32.215,lng:-110.7758},