Skip to content

Instantly share code, notes, and snippets.

View tina1998612's full-sized avatar
:octocat:
DigitalNomad

李婷婷 Lee Ting Ting tina1998612

:octocat:
DigitalNomad
View GitHub Profile
using Neo;
using Neo.SmartContract;
using Neo.SmartContract.Framework;
using Neo.SmartContract.Framework.Native;
using Neo.SmartContract.Framework.Services;
using System;
namespace Helloworld
{
[ManifestExtra("Author", "Neo")]
func (s *SmartContract) CreateAsset(ctx contractapi.TransactionContextInterface, id string, color string, size int, owner string, appraisedValue int) error {
exists, err := s.AssetExists(ctx, id)
if err != nil {
return err
}
if exists {
return fmt.Errorf("the asset %s already exists", id)
}
asset := Asset{
#include <hello.hpp>
[[eosio::action]]
void hello::hi( name nm ) {
print_f("Name : %\n", nm);
}
[[eosio::action]]
void hello::check( name nm ) {
print_f("Name : %\n", nm);
use solana_program::{
account_info::{next_account_info, AccountInfo},
entrypoint,
entrypoint::ProgramResult,
msg,
program_error::ProgramError,
pubkey::Pubkey,
};
entrypoint!(process_instruction);
stored_data: uint256
@public
def set(new_value : uint256):
self.stored_data = new_value
@public
@constant
def get() -> uint256:
return self.stored_data
stored_data: uint256
@public
def set(new_value : uint256):
self.stored_data = new_value
@public
@constant
def get() -> uint256:
return self.stored_data
pragma solidity >=0.7.0 <0.9.0;
contract Storage {
uint256 number;
function store(uint256 num) public {
number = num;
}
from __future__ import print_function
import pandas as pd
import ccxt
import datetime
from pyalgotrade import strategy
from pyalgotrade.barfeed import quandlfeed, csvfeed
from pyalgotrade.technical import ma
from pyalgotrade.bar import Frequency
from pyalgotrade.stratanalyzer import returns, trades
from pyalgotrade import plotter
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreig36fez6pcz3hwgbkuhtojrmwo3v2yo2idyla6c3rfo5vqznt3rbq ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
pragma solidity >=0.5.0 <0.6.0;
pragma experimental ABIEncoderV2;
import "./openzeppelin-solidity/math/SafeMath.sol";
contract InfinityGame {
using SafeMath for uint256;
using SafeMath for uint8;
uint8 constant public numberOfPlayer = 5;