Skip to content

Instantly share code, notes, and snippets.

View Khunpisit's full-sized avatar

Deuce Khunpisit

  • Bangkok
View GitHub Profile
@Khunpisit
Khunpisit / 1_Storage.sol
Created December 10, 2020 09:09
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&optimize=false&runs=200&gist=
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint256 number;
@Khunpisit
Khunpisit / 1_Storage.sol
Created November 29, 2020 05:21
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.17+commit.d19bba13.js&optimize=false&runs=200&gist=
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint256 number;
@Khunpisit
Khunpisit / 1_Storage.sol
Created November 29, 2020 05:17
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.17+commit.d19bba13.js&optimize=false&runs=200&gist=
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint256 number;
@Khunpisit
Khunpisit / 1_Storage.sol
Created November 29, 2020 05:09
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&optimize=false&runs=200&gist=
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint256 number;
class CoinUtil:
def __init__(self, coins = [], amount = 0):
self._coins = coins
self._amonth = amount
def coins_return(self):
print('--- get money for :', self._amonth)
coins = self._coins
amount = self._amonth
private String getStringMessage(MessageContext context){
String res = null;
try {
SOAPMessageContext ctx = (SOAPMessageContext) context;
ByteArrayOutputStream stream = new ByteArrayOutputStream();
ctx.getMessage().writeTo(stream);
byte[] items = stream.toByteArray();
public static String getByteUtfString(String text) throws Exception {
return new String(text.getBytes("ISO8859-1"), "UTF-8");
}