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
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")] |
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
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{ |
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
#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); |
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
use solana_program::{ | |
account_info::{next_account_info, AccountInfo}, | |
entrypoint, | |
entrypoint::ProgramResult, | |
msg, | |
program_error::ProgramError, | |
pubkey::Pubkey, | |
}; | |
entrypoint!(process_instruction); |
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
stored_data: uint256 | |
@public | |
def set(new_value : uint256): | |
self.stored_data = new_value | |
@public | |
@constant | |
def get() -> uint256: | |
return self.stored_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
stored_data: uint256 | |
@public | |
def set(new_value : uint256): | |
self.stored_data = new_value | |
@public | |
@constant | |
def get() -> uint256: | |
return self.stored_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
pragma solidity >=0.7.0 <0.9.0; | |
contract Storage { | |
uint256 number; | |
function store(uint256 num) public { | |
number = num; | |
} |
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
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 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
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/ |
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
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; |