pragma solidity ^0.8.0;
contract MinContract {
function min(uint256 a, uint256 b) public pure returns (uint256) {
return a < b ? a : b;
}
}
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 std::io::{stdout, Write}; | |
use sha3::{Keccak256, Digest}; | |
fn main() { | |
let mut stdout = stdout(); | |
let samples: [u32; 4] = [0xbeced095, 0x42a7b7dd, 0x45e010b9, 0xa86c339e]; | |
//let samples: [u32; 4] = [0x6ca54da2, 0xfe07a987, 0x45e010b9, 0x036b6384]; | |
let mut res: [u64; 4] = [0, 0, 0, 0]; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract SC0 { | |
address public creare2owner; | |
uint256 public smth; | |
constructor(address _addr) { | |
creare2owner = _addr; | |
} |
Each time you set the same seed, you get the same sequence. stackoverflow
package main
import (
"encoding/gob"
"fmt"
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
package module | |
import ( | |
"fmt" | |
"strings" | |
) | |
func main() { | |
str := "fgfwfhh" | |
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
package main | |
import "fmt" | |
//Pass slice through the function | |
//function have own slise wich have common part with external slice | |
//but! if inner slice change own size, external slise isn't changed | |
func main() { | |
arr := make([]byte, 16) | |
fmt.Println("hello01", len(arr), arr) //hello01 16 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] | |
cutArrSize(arr) |