I hereby claim:
- I am tssandor on github.
- I am tssandor (https://keybase.io/tssandor) on keybase.
- I have a public key ASBqYCFc3NJkyNAwLOmFs16gYlo7DZZdt4dI6TDf51zM_Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// ************* | |
// This Gist fixes the truffle.js in the tutorial on this link: | |
// https://medium.com/coinmonks/create-a-sports-betting-dapp-on-the-ethereum-blockchain-part-1-1f69f908b939 | |
// -- | |
// The code in the Medium article stops at dry run and never actually deploys the contract to Ropsten. | |
// This is almost certainly because of a change in how Truffle works. | |
var WalletProvider = require("truffle-wallet-provider"); | |
// ***CHANGE -> using HDWalletProvider | |
var HDWalletProvider = require("truffle-hdwallet-provider"); |
function rentAFlat(uint8 _flat) public payable returns(uint256) { | |
tenantAddress = msg.sender; | |
if (msg.value % flatDB[_flat].priceInWei == 0 && msg.value > 0 && flatDB[_flat].flatIsAvailable == true) { | |
uint256 numberOfNightsPaid = msg.value / flatDB[_flat].priceInWei; | |
flatDB[_flat].flatIsAvailable = false; | |
flatDB[_flat].currentOccupant = tenantAddress; | |
landlordAddress.transfer(msg.value); | |
return numberOfNightsPaid; | |
} else { | |
tenantAddress.transfer(msg.value); |
repositories { | |
google() | |
mavenCentral() | |
jcenter() // Warning: this repository is going to shut down soon | |
maven { | |
url "https://quadrantsdk2.jfrog.io/artifactory/quadrant-sdk/" | |
} | |
} |
implementation 'io.quadrant.sdk.locationdata:data-acquisition-sdk:1.0.9' | |
implementation "androidx.multidex:multidex:2.0.1" |
multiDexEnabled true |
Client.getInstance().setup(this, | |
true, | |
"YOUR INTEGRATION KEY", | |
new Client.ResultCallback() { | |
@Override | |
public void onSuccess(String result) { | |
} | |
@Override |
Client.getInstance().setup(this, | |
true, | |
"YOUR INTEGRATION KEY", | |
object : Client.ResultCallback { | |
override fun onSuccess(result: String) { | |
} | |
override fun onError(result: String) { | |
// USE Constans.PRIORITY_HIGH_ACCURACY: | |
// to request the most accurate locations available. | |
// This will return the finest location available. | |
// OR Constans.PRIORITY_BALANCED_POWER_ACCURACY: | |
// to request "block" level accuracy. | |
// Block level accuracy is considered to be about 100 meter accuracy. | |
// Using a coarse accuracy such as this often consumes less power. | |
Client.getInstance().startTrackingLocation(this, |
// USE Constans.PRIORITY_HIGH_ACCURACY: | |
// to request the most accurate locations available. | |
// This will return the finest location available. | |
// OR Constans.PRIORITY_BALANCED_POWER_ACCURACY: | |
// to request "block" level accuracy. | |
// Block level accuracy is considered to be about 100 meter accuracy. | |
// Using a coarse accuracy such as this often consumes less power. | |
Client.getInstance().startTrackingLocation(this, |