Skip to content

Instantly share code, notes, and snippets.

View cgbahk's full-sized avatar
⛏️
time killing

Cheongyo Bahk cgbahk

⛏️
time killing
View GitHub Profile
@cgbahk
cgbahk / ex.cpp
Last active May 18, 2019 05:42
3120
extern int check(unsigned char key[200]);
unsigned char testbed[200];
// Number of correct combination
int correct()
{
return check(testbed) / 257;
}
window.addEventListener("load", function() {
// Checking if Web3 has been injected by the browser (Mist/MetaMask)
if (typeof web3 !== "undefined") {
// Use Mist/MetaMask's provider
window.web3 = new Web3(web3.currentProvider);
} else {
makeLog("No MetaMask. MetaMask (on Chrome) is required to use this dApp", true);
}
// Default: send user a notification
<!DOCTYPE html>
<html>
<head>
<title>A Simple Smart Contract Generator</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css' rel='stylesheet' type='text/css'>
</head>
<body class="container">
<h1>A Simple Smart Contract Generator</h1>