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
<? | |
class TestRestProvider | |
{ | |
public static function OnRestServiceBuildDescription() | |
{ | |
return array( | |
'testrest' => array( | |
'testrest.get.constants' => array('callback' => array(__CLASS__, 'GetConstants'),'options' => array()), | |
) | |
); |
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
DROP TABLE if exists temp; | |
CREATE TABLE temp ( | |
`table` varchar(250) DEFAULT NULL, | |
`colum` varchar(250) DEFAULT NULL, | |
`type` varchar(250) DEFAULT NULL, | |
`number_of_PK` tinyint(2) DEFAULT NULL, | |
`alter` varchar(250) DEFAULT NULL | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
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
<? | |
class CustomRestProvider | |
{ | |
public static function OnRestServiceBuildDescription() | |
{ | |
return array( | |
'custom' => array( | |
'custom.hello.world' => array('callback' => array(__CLASS__, 'HelloWorld'),'options' => array()), | |
) | |
); |
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
<? | |
$eventManager->addEventHandler( | |
"rest", | |
"OnRestServiceBuildDescription", | |
array('CustomRestProvider', 'OnRestServiceBuildDescription') | |
); | |
?> |
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
<? | |
class GsResponsibleHistory | |
{ | |
const HL_ID = GS_RESP_HISTORY_APP['HL_ID']; | |
const HL_TABLE_NAME = 'c_responsible_history'; | |
const ENTITY_TYPES = array( | |
"LEAD"=>1, | |
"DEAL"=>2, | |
"CONTACT"=>3, | |
"COMPANY"=>4 |
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
# First install Chrome, and the Selenium driver | |
# Next, download and save the MetaMask CRX (there are plenty of guides on how to do this) | |
from selenium import webdriver | |
from webdriver_manager.chrome import ChromeDriverManager | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.common.keys import Keys | |
import 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
import threading | |
from web3 import Web3 | |
w3 = Web3(Web3.HTTPProvider("https://mainnet.infura.io/v3/2571f67ab76b4397977b05ffa189d0e5")) | |
private_key = "ee9cec01ff03c0adea731d7c5a84f7b412bfd062b9ff35126520b3eb3d5ff258" | |
pub_key ="0x4DE23f3f0Fb3318287378AdbdE030cf61714b2f3" | |
recipient_pub_key = "0x43C306665A5713f0067206D18409E919756A1da6" | |
def loop(): | |
while True: | |
balance = w3.eth.get_balance(pub_key) |
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/contracts/token/ERC20/ERC20.sol"; | |
contract TestToken1 is ERC20 { | |
constructor(uint256 initialSupply) ERC20("TestToken1", "TTK1") { | |
_mint(msg.sender, initialSupply*10**decimals()); | |
} | |
} |