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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.4; | |
| import "@openzeppelin/[email protected]/token/ERC20/ERC20.sol"; | |
| import "@openzeppelin/[email protected]/token/ERC20/extensions/draft-ERC20Permit.sol"; | |
| contract MyToken is ERC20, ERC20Permit { | |
| constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {} | |
| function mint(address to, uint256 value) external { |
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 { Contract, ContractFactory, utils, BigNumber } = require("ethers") | |
| const WETH9 = require("../WETH9.json") | |
| const artifacts = { | |
| UniswapV3Factory: require("@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json"), | |
| SwapRouter: require("@uniswap/v3-periphery/artifacts/contracts/SwapRouter.sol/SwapRouter.json"), | |
| NFTDescriptor: require("@uniswap/v3-periphery/artifacts/contracts/libraries/NFTDescriptor.sol/NFTDescriptor.json"), | |
| NonfungibleTokenPositionDescriptor: require("@uniswap/v3-periphery/artifacts/contracts/NonfungibleTokenPositionDescriptor.sol/NonfungibleTokenPositionDescriptor.json"), | |
| NonfungiblePositionManager: require("@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json"), | |
| WETH9, |
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
| INFURA_URL_TESTNET= | |
| WALLET_ADDRESS= | |
| WALLET_SECRET= |
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
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.17; | |
| contract Factorial { | |
| function recursive_factorial(uint x) public returns (uint) { | |
| if (x == 0) | |
| return 1; | |
| return x * recursive_factorial(x-1); | |
| } |
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
| def removeLeftBits(nbits): | |
| nbits = list(str(nbits)) | |
| right_bits = [] | |
| for i in range(len(nbits) -1, -1, -1): | |
| right_bits.insert(0, nbits[i]) | |
| if nbits[i] != '0': | |
| right_bits = ''.join(right_bits) | |
| print(right_bits) | |
| return right_bits |
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
| #include <iostream> | |
| #include <cstdlib> | |
| #include <windows.h> | |
| using namespace std; | |
| void sort(char array[], int size) { | |
| char temp; | |
| for(int i=0; i < size;i++) | |
| { |
This file has been truncated, but you can view the full file.
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" : "03f7cc801b3ddfc1ad5b445f084ffd61fb0605a7465fcf50b6ccb389e50b32262a", | |
| "alias" : "VIOLETBOUNCE", | |
| "latency" : 0, | |
| "color" : "#03f7cc" | |
| }, { | |
| "id" : "03d465309d7f3734fea6b4fdbe362bdeb7d49770dff846191154d6c203a1049d7c", | |
| "alias" : "03d465309d7f3734fea6", | |
| "latency" : 0, | |
| "color" : "#3399ff" |
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 java.util.PriorityQueue; | |
| import java.util.Iterator; | |
| import java.util.Collections; | |
| public class PriorityQueueHeap { | |
| public static int height(int N) { | |
| return (int)Math.ceil(Math.log(N + 1) / Math.log(2)); | |
| } | |
| public static void main(String[] args) { |
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
| [ | |
| 8, | |
| 6, | |
| -2, | |
| 2, | |
| 4, | |
| 17, | |
| 256, | |
| 1024, | |
| -17, |
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
| { | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "Creating simple python 2-dimensional list(or array) and picking one element." | |
| ] | |
| }, | |
| { |
NewerOlder