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
package com.ethjava; | |
import com.ethjava.utils.Environment; | |
import org.web3j.abi.FunctionEncoder; | |
import org.web3j.abi.FunctionReturnDecoder; | |
import org.web3j.abi.TypeReference; | |
import org.web3j.abi.datatypes.*; | |
import org.web3j.abi.datatypes.generated.Uint256; | |
import org.web3j.abi.datatypes.generated.Uint8; | |
import org.web3j.crypto.Hash; |
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
var Web3 = require('web3'); | |
var BigNumber = require('bignumber.js'); | |
if (typeof web3 !== 'undefined') { | |
web3 = new Web3(web3.currentProvider); | |
} else { | |
// set the provider you want from Web3.providers | |
// web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); | |
web3 = new Web3(new Web3.providers.HttpProvider("https://rinkeby.infura.io/ffhOLG7Hhlvn7n8GOFPk ")); | |
} |
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
var today = new Date(); | |
var quarter = Math.floor((today.getMonth() / 3)); | |
var firstDay = new Date(today.getFullYear(), quarter * 3, 1); | |
var lastDay = new Date(firstDay.getFullYear(), firstDay.getMonth() + 3, 0); |
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
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash - | |
sudo yum -y install nodejs |
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
var url = 'http://127.0.0.1:3000/'; | |
var headers = new Headers(); | |
headers.append('Content-Type', 'application/x-www-form-urlencoded'); | |
let param = 'name=' + this.signup.username + '&email=' + '&mobile='; | |
this.http.post(url, param, { headers: headers }).subscribe(data => { | |
console.log(data) | |
}, error => { | |
console.log(error); | |
}); |
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
var Job = require('./model/job'); | |
var cursor = Job.find({}).tailable().cursor(); | |
cursor.on('data', function(doc) { | |
// Called once for every document | |
console.log(doc) | |
}); | |
cursor.on('close', function(done) { | |
// Called when done | |
console.log(done) |
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
This e-mail is meant only for the intended recipient of the transmission. Any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. |
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
This communication may contain confidential, proprietary or legally privileged information. It is intended only for the person(s) to whom it is addressed. If you are not an intended recipient, you may not use, read, retransmit, disseminate or take any action in reliance upon it. Please notify the sender that you have received it in error and immediately delete the entire communication, including any attachments. COMPANY_NAME does not encrypt and cannot ensure the confidentiality or integrity of external e-mail communications and, therefore, cannot be responsible for any unauthorized access, disclosure, use or tampering that may occur during transmission. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. COMPANY_NAME accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided. |
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
var mongoose = require('mongoose'); | |
mongoose.Promise = require('bluebird'); | |
var Schema = mongoose.Schema; | |
var questionSchema = new Schema({ | |
label: { type: String, default: '' }, | |
question: { type: String, default: '' }, |
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
sudo su | |
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - | |
curl --silent --location https://rpm.nodesource.com/setup_7.x | bash - | |
yum remove -y nodejs npm | |
yum install -y nodejs |