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
// Paste this script into the console on a specfic NFT detail page for your collection. | |
// e.g. https://opensea.io/assets/ethereum/0x1485297e942ce64e0870ece60179dfda34b4c625/3723 | |
// Adjust i on the for loop for the range of nfts you wish to refresh | |
// Should work for all chains including Polygon and testnets. | |
// Returns a Promise that resolves after "ms" Milliseconds | |
const timer = ms => new Promise(res => setTimeout(res, ms)) | |
async function refresh_metadata() { // We need to wrap the loop into an async function for this to work | |
for (var i = 1; i <= 1326; i++) { |
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 BinaryTreeNode { | |
BinaryTreeNode left; | |
BinaryTreeNode right; | |
int value; | |
} | |
public static BinaryTreeNode findInorderSuccessor(BinaryTreeNode root, int value) { | |
if (root == null) { | |
throw new IllegalArgumentException("Root cannot be null"); | |
} |
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
// Guid generator function based on stackoverflow | |
// http://stackoverflow.com/a/2117523/1282124 | |
function guid(){ | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); | |
return v.toString(16); | |
}); | |
} |