a aahed aahing aardvark aardvarks aardwolf abaci aback abacus abacuses
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
#!/bin/bash | |
#assumes geth is in path | |
mkdir /tmp/geth | |
geth account new --datadir /tmp/geth << EOF | grep ^Address | cut -d'{' -f2 | cut -d'}' -f1 > /tmp/geth/accounts.txt | |
EOF |
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.5.1; | |
contract Test { | |
function t() public pure returns (bool){ | |
return true; | |
} | |
} |
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
const Web3 = require('web3'); | |
const web3 = new Web3('http://localhost'); | |
const abi = [{"constant": true,"inputs": [],"name": "t","outputs": [{"name": "","type": "bool"}],"payable": false,"stateMutability": "pure","type": "function"}]; | |
const addr = "0x9f1a96f41d3dcbc0a77a75af071f0cf8c046cac4"; | |
contract = web3.eth.Contract(abi, addr); | |
contract.methods.t().call({from: web3.eth.getAccounts()[0]}).then(console.log); | |
//outputs: true |
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.5.1; | |
/** | |
* @title NoteChain | |
* @dev The NoteChain contract provides functions to store notes in blockchain | |
*/ | |
contract NoteChain { | |
// EVENTS |
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
// declare your constant at the top of class | |
// list of permissions: | |
// https://developer.android.com/reference/android/Manifest.permission.html | |
public void requestPermissions(View view){ | |
// we require the CHANGE_WIFI_STATE permission, request this | |
if (ContextCompat.checkSelfPermission(this, | |
Manifest.permission.ACCESS_FINE_LOCATION) | |
!= PackageManager.PERMISSION_GRANTED) { | |
Log.e("requestPermissions", "Permission not granted!"); |
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
mRttRequestHelper = new RttRequestHelper( | |
mContext, | |
new RttRangingResultCallback(){ | |
@Override | |
public void job(List<RangingResult> results) { | |
// do things | |
for (RangingResult result: results) { | |
if (result.getStatus() != RangingResult.STATUS_SUCCESS) { | |
Log.e(TAG, "Ranging failed with status: " + result.getStatus()); |
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
DRIVER=="usb", SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="028e", RUN+="/usr/local/bin/fixcontroller.py" |
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
#!/usr/bin/env sh | |
# | |
# Create a new Sql Server 2019 instance in a docker container | |
# with the AdventureWorks2019 sample database | |
set -xe | |
name="gitsql" | |
test -d backup || mkdir backup |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdbool.h> | |
#define FNV_OFFSET_BASIS 0x811c9dc5 | |
#define FNV_PRIME 0x01000193 | |
typedef unsigned int uint; |
OlderNewer