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 asyncio | |
| import time | |
| from web3 import Web3 | |
| from web3.middleware import geth_poa_middleware | |
| import aiohttp | |
| from colorama import Fore, Style, init | |
| import ssl | |
| import certifi | |
| from decimal import Decimal |
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 asyncio | |
| import aiohttp | |
| from web3 import Web3 | |
| from web3.middleware import geth_poa_middleware | |
| from colorama import Fore, Back, Style, init | |
| # Initialize colorama | |
| init(autoreset=True) | |
| # กำหนดค่าการเชื่อมต่อกับ Polygon network |
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 ethers = require('ethers'); | |
| const { ChainId, Token, Fetcher, Route, Trade, TokenAmount, TradeType, Percent } = require('@uniswap/sdk'); | |
| const { abi: IUniswapV2PairABI } = require('@uniswap/v2-core/build/IUniswapV2Pair.json'); | |
| const { abi: IUniswapV2Router02ABI } = require('@uniswap/v2-periphery/build/IUniswapV2Router02.json'); | |
| // Configuration | |
| const ALCHEMY_URL = 'https://eth-mainnet.g.alchemy.com/v2/jssjArgnoSmS2Uv5RMVwQAySLhkBsOnJ'; | |
| //const ALCHEMY_URL_TESTNET = 'https://eth-sepolia.g.alchemy.com/v2/jssjArgnoSmS2Uv5RMVwQAySLhkBsOnJ'; | |
| const DAI_ADDRESS = '0x6B175474E89094C44Da98b954EedeAC495271d0F'; | |
| const WETH_ADDRESS = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'; |
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 ccxt = require('ccxt'); | |
| const ethers = require('ethers'); | |
| const Web3 = require('web3'); | |
| // Configuration | |
| const config = { | |
| bybit: { | |
| apiKey: 'YOUR_BYBIT_API_KEY', | |
| secret: 'YOUR_BYBIT_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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Context> | |
| <!-- database configurations --> | |
| <Parameter name="JDBC.driver" value="org.postgresql.Driver"/> | |
| <Parameter name="JDBC.url" value="jdbc:postgresql://localhost:5432/hmdm"/> | |
| <Parameter name="JDBC.username" value="postgres"/> | |
| <Parameter name="JDBC.password" value="new_password"/> | |
| <!-- This directory is used to as a base directory to store app data --> | |
| <Parameter name="base.directory" value="/var/lib/tomcat9/work"/> |
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
| let pancakeSwapAbi = [ | |
| {"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"}, | |
| ]; | |
| let tokenAbi = [ | |
| {"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}, | |
| ]; | |
| const Web3 = require('web3'); | |
| /* | |
| Required Node.js |
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 com.google.api.client.googleapis.auth.oauth2.GoogleCredential; | |
| import com.google.api.client.http.HttpTransport; | |
| import com.google.api.client.http.javanet.NetHttpTransport; | |
| import com.google.api.client.json.JsonFactory; | |
| import com.google.api.client.json.jackson2.JacksonFactory; | |
| import com.google.api.services.androidmanagement.AndroidManagement; | |
| import com.google.api.services.androidmanagement.model.DevicePolicy; | |
| import java.io.IOException; | |
| import java.security.GeneralSecurityException; |
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
| <script type="text/javascript"> | |
| $(function(){ | |
| function countdown() { | |
| // Set the countdown date/time | |
| var countDownDate = new Date().getTime() + 15 * 60 * 1000; | |
| // Update the countdown every second | |
| var countdownTimer = setInterval(function() { | |
| // Get today's date/time |
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
| $(function(){ | |
| function decodeImageFromBase64(data, callback) { | |
| // set callback | |
| qrcode.callback = callback; | |
| // Start decoding | |
| qrcode.decode(data) | |
| } |
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
| function init($this) { | |
| // For more options check out the Datatables Docs: | |
| // https://datatables.net/extensions/buttons/ | |
| var buttons = ["copy", "print"]; | |
| // Basic options. For more options check out the Datatables Docs: | |
| // https://datatables.net/manual/options |