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 sortBySubstring (array, term) { | |
const func = (a,b) => { | |
const subStringA = a.substr(0,term.length) | |
const subStringB = b.substr(0,term.length) | |
return subStringA.localeCompare(term) - subStringB.localeCompare(term) === 0 ? 1 : -1 | |
} | |
return array.sort(func) | |
} |
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
/** | |
* @param {number[][]} matrix | |
* @return {void} Do not return anything, modify matrix in-place instead. | |
*/ | |
// Faster than 80.52% of submissions, less than 40.77% memory usage than other submissions | |
const rotate = function(matrix) { | |
const len = matrix.length | |
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 { | |
Page, | |
Layout, | |
Card, | |
Tag, | |
Stack, | |
TextField, | |
Button, | |
} from "@shopify/polaris"; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. |
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 IMAGES = [ | |
"https://res.cloudinary.com/dci7ukl75/image/upload/v1668552461/BYOA/709618-0320_e20ckp.jpg", | |
"https://res.cloudinary.com/dci7ukl75/image/upload/v1668552412/BYOA/22-02-2021_MO_112247-NAVY_1_1_cseojc.webp", | |
"https://res.cloudinary.com/dci7ukl75/image/upload/v1668552374/BYOA/ipad-mini-select-202109_FMT_WHH_cb84pl.jpg", | |
"https://res.cloudinary.com/dci7ukl75/image/upload/v1668552374/BYOA/MPLD3_VW_34FR_watch-45-alum-starlight-nc-8s_VW_34FR_WF_CO_dgkcic.jpg", | |
"https://res.cloudinary.com/dci7ukl75/image/upload/v1668552374/BYOA/MQDY3ref_VW_34FR_watch-49-titanium-ultra_VW_34FR_WF_CO_watch-face-49-alpine-ultra_VW_34FR_WF_CO_il7bdy.jpg", | |
"https://res.cloudinary.com/dci7ukl75/image/upload/v1668552374/BYOA/buoy_wear_floating_hat-10_rqeipt.jpg", | |
"https://res.cloudinary.com/dci7ukl75/image/upload/v1668552374/BYOA/drinkcupsocks_product2_1_1_grande_autj8d.webp", | |
"https://res.cloudinary.com/dci7ukl75/image/upload/v1668552374/BYOA/20211202-141138_FGS169_Gloves_Hawk_Black_front_iri8qc.webp", | |
]; |
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 from "react"; | |
import { | |
render, | |
BlockStack, | |
InlineStack, | |
Text, | |
View, | |
Image, | |
Heading, | |
useAppMetafields, |
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
query RunInput { | |
cart { | |
lines { | |
quantity | |
merchandise { | |
__typename | |
... on ProductVariant { | |
product { | |
metafield(namespace: "quantity_limits", key: "limit") { | |
value |