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
let book = SpreadsheetApp.openByUrl(''); | |
let sheet = book.getSheetByName("工作表1"); | |
function doGet(e) { | |
let data = sheet.getDataRange().getValues() | |
let headers = data[0]; | |
let arr = []; | |
for (let i = 1; i < data.length; 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
from bs4 import BeautifulSoup | |
import csv | |
def main(): | |
""" | |
Open the KML. Read the KML. Make 3 lists for Name, Coordinates and Description of the placemarks. Save the data to a CSV | |
""" | |
name_counter = 0 | |
names_list = [] | |
coords_counter = 0 |
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
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony. | |
The following are my contribution signatures: | |
Circuit: semaphore16 | |
Contributor # 225 | |
Hash: bcc623e9 675fd000 84f49e98 f0b3f4f0 | |
cbae9604 192e0122 5ae68599 2bd13e5c | |
18a8f466 5ba642b3 582d0cb6 cb698c93 | |
a3351938 8ed7bdf8 f209a470 66c13574 | |
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 HelloWorld from './components/HelloWorld.vue' | |
import { useBoard, useEthers } from 'vue-dapp' | |
export default { | |
name: 'App', | |
components: { | |
HelloWorld, | |
}, | |
setup() { | |
const { open } = useBoard() |
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
<template> | |
<img alt="Vue logo" src="./assets/logo.png" /> | |
<HelloWorld msg="Welcome to Your Vue.js App" /> | |
<!-- 這裡 --> | |
<button @click="open">Connect</button> | |
{{ address }} | |
<vdapp-board /> | |
</template> |
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 { createApp } from 'vue' | |
import App from './App.vue' | |
import { VueDapp } from 'vue-dapp' | |
const app = createApp(App) | |
app.use(VueDapp) | |
app.mount('#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
//SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/utils/math/SafeMath.sol"; | |
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; | |
contract PriceSplitter { | |
using EnumerableSet for EnumerableSet.AddressSet; | |
// ======================================= STATE VARIABLES ======================================= |
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
function deposit(bytes32 _commitment) external payable nonReentrant { | |
require(!commitments[_commitment], "The commitment has been submitted"); | |
uint32 insertedIndex = _insert(_commitment); | |
commitments[_commitment] = true; | |
_processDeposit(); | |
emit Deposit(_commitment, insertedIndex, block.timestamp); | |
} |
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
function withdraw(bytes calldata _proof, bytes32 _root, bytes32 _nullifierHash, address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund) external payable nonReentrant { | |
require(_fee <= denomination, "Fee exceeds transfer value"); | |
require(!nullifierHashes[_nullifierHash], "The note has been already spent"); | |
require(isKnownRoot(_root), "Cannot find your merkle root"); // Make sure to use a recent one | |
require(verifier.verifyProof(_proof, [uint256(_root), uint256(_nullifierHash), uint256(_recipient), uint256(_relayer), _fee, _refund]), "Invalid withdraw proof"); | |
nullifierHashes[_nullifierHash] = true; | |
_processWithdraw(_recipient, _relayer, _fee, _refund); | |
emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee); | |
} |
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
function process(uint256[2] memory a, uint256[2][2] memory b, uint256[2] memory c, uint256[1] memory publicSignals) public { | |
require(isAnswer(publicSignals[0]), "incorrect answer"); | |
require(verifier.verifyProof(a, b, c, publicSignals), "invalid"); | |
_setGreeting("answer to the ultimate question of life, the universe, and everything"); | |
} |
NewerOlder