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
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
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.25; | |
/*数组类型Demo*/ | |
contract DemoTypes303 { | |
/*String数组例子*/ | |
string[] strArr; | |
function add(string str) public { | |
strArr.push(str); | |
} | |
function getStrAt(uint n) public constant returns (string s){ | |
string storage tmp = strArr[n]; |
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.25; | |
/*数组类型Demo*/ | |
contract DemoTypes303 { | |
/*String数组例子*/ | |
string[] strArr; | |
function add(string str) public { | |
strArr.push(str); | |
} | |
function getStrAt(uint n) public constant returns (string s){ | |
string storage tmp = strArr[n]; |
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.25; | |
contract SimpleStorage { | |
uint public data; | |
// event SetX(address indexed _from, uint value); | |
event Set(string label, uint value); | |
function set(uint x) public { | |
data = x; | |
// emit SetX(msg.sender, x); | |
// emit Set("#####", x); | |
} |
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.25; | |
contract SimpleStorage { | |
uint public data; | |
// event SetX(address indexed _from, uint value); | |
event Set(string label, uint value); | |
function set(uint x) public { | |
data = x; | |
// emit SetX(msg.sender, x); | |
// emit Set("#####", x); | |
} |
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.25; | |
contract SimpleStorage { | |
uint public data; | |
// event SetX(address indexed _from, uint value); | |
event Set(string label, uint value); | |
function set(uint x) public { | |
data = x; | |
// emit SetX(msg.sender, x); | |
// emit Set("#####", x); | |
} |
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.25; | |
contract SimpleStorage { | |
uint public data; | |
// event SetX(address indexed _from, uint value); | |
event Set(string label, uint value); | |
function set(uint x) public { | |
data = x; | |
// emit SetX(msg.sender, x); | |
// emit Set("#####", x); | |
} |
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.25; | |
contract SimpleStorage { | |
uint public data; | |
// event SetX(address indexed _from, uint value); | |
event Set(string label, uint value); | |
function set(uint x) public { | |
data = x; | |
// emit SetX(msg.sender, x); | |
// emit Set("#####", x); | |
} |
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.25; | |
contract stringOpTest { | |
byte[] bs; | |
function convertingToString()public returns(string){ | |
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types. | |
bytes32 hw = "Hello World"; // |
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.25; | |
contract stringOpTest { | |
byte[] bs; | |
function convertingToString()public returns(string){ | |
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types. | |
bytes32 hw = "Hello World"; // |
OlderNewer