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 { ethers } from 'ethers' | |
import dotenv from 'dotenv' | |
dotenv.config() | |
const url = process.env.PROVIDER_URL | |
const provider = new ethers.providers.JsonRpcProvider(url) | |
const call = { | |
method: 'eth_call', | |
params: [ |
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
geth --datadir /root/chaindata --rpc --rpccorsdomain "*" --rpcaddr "0.0.0.0" --rpcport 8545 --rpcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --ws --wsaddr "0.0.0.0" --wsport 8546 --wsorigins "*" --wsapi "personal,admin,db,eth,net,web3,miner,shh,txpool,debug" --maxpeers 25 --mine --etherbase "0" --gasprice "0" --targetgaslimit "9999999" --unlock "0" --syncmode "full" --gcmode=archive |
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
<script> | |
import HelloWorld from './components/HelloWorld.vue' | |
import Web3 from 'web3' | |
import abi from './abis/SupplyChainAuthorization.json' | |
let address = '0x9e614eba660bb33c181716a448437fa4235b53d5' | |
let web3 = new Web3('http://localhost:8545') | |
export default { | |
name: 'app', |
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
pragma solidity ^0.4.24; | |
/** | |
* @title SafeMath | |
* @dev Math operations with safety checks that throw on error | |
*/ | |
library SafeMath { | |
/** | |
* @dev Multiplies two numbers, throws on overflow. |
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
geth --dev --datadir ./chaindata/ --rpc --rpcaddr="0.0.0.0" --rpccorsdomain="*" --rpcapi="db,eth,net,web3,personal,web3" |
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
for (var i = 0; i < 5; i++) { | |
setTimeout(function () { | |
console.log("i = " + i); | |
}, 1000); | |
} | |
console.log(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
while (true) { | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
try { | |
System.out.print("Enter Mid exam score : "); | |
double midScore = Double.parseDouble(br.readLine()); | |
System.out.print("Enter roll call score : "); | |
double rollCall = Double.parseDouble(br.readLine()); | |
System.out.print("Enter final exam score : "); | |
double finalScore = Double.parseDouble(br.readLine()); | |
double total = midScore * 0.3 + rollCall * 0.3 + finalScore * 0.4; |
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
INSERT INTO `copy_db_broker`.`order` ( | |
SELECT * | |
FROM `original_db`.`order` | |
WHERE `original_db`.`order`.`broker_name` = `customer_broker_name` | |
AND `original_db`.`order`.`id` NOT IN ( | |
SELECT `id` | |
FROM `copy_db_broker`.`order` | |
) | |
) |
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
INSERT INTO `copy_db_broker`.`order` ( | |
SELECT * | |
FROM `original_db`.`order` | |
WHERE `original_db`.`order`.`id` NOT IN ( | |
SELECT `id` | |
FROM `copy_db_broker`.`order` | |
) | |
) |
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
private class GetFavoriteActivitiesAsyncTask extends AsyncTask<Void, Void, Void> | |
{ | |
List<ActivityDescription> favoriteActivityDescriptionList = new ArrayList<>(); | |
@Override | |
protected Void doInBackground(Void... params) | |
{ | |
HttpRequest request = HttpRequest.get(getActivity().getString(R.string.get_favorite_activities)).header("Cookie", mSession); | |
if (request.ok()) { | |
String response = request.body(); | |
try { |