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
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "LogOut"), object: nil, queue: nil) { _ in | |
UserService.logOut() | |
Answers.logCustomEvent(withName: "User Logged Out") | |
DispatchQueue.main.async { | |
self.navigationController?.setViewControllers([WelcomeViewController()], animated: false) | |
self.navigationController?.dismiss(animated: true, completion: nil) | |
} |
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
For all of these, can `balance` also be a RAW value? | |
Send blocks | |
{ | |
"type": "utx", | |
"account": "xrb_from_address", | |
"previous": "previous_block_hash", | |
"representative": "xrb_your_current_or_new_rep", | |
"balance": "as_raw_or_hex", |
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
var port = process.env.PORT || 1337; | |
var httpServer = require('http').createServer(app); | |
const https = require('https'); | |
httpServer.listen(port, function() { | |
console.log('parse-server-example running on port ' + port + '.'); | |
}); | |
// new | |
var options = { |
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
// This is the index.js file for my main app | |
var express = require('express'); | |
var cors = require('cors') | |
var ParseServer = require('parse-server').ParseServer; | |
var path = require('path'); | |
var bodyParser = require('body-parser'); | |
var databaseUri = process.env.DATABASE_URI || process.env.MONGODB_URI; |
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
// This is the index.js file for my Parse Live Query Server, running on a separate EC2 instance | |
var express = require('express'); | |
var cors = require('cors') | |
var ParseServer = require('parse-server').ParseServer; | |
var app = express(); | |
app.use(cors()); | |
// We include the lines below so that we can hit `/` and it passes the Elastic Beanstalk Health Check |
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
<!DOCTYPE html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
<title>Slider Test</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="css/main.css"> | |
</head> | |
<body> |
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
var blob = document.getElementById('blob'); | |
var colorSlider = document.getElementById('slider-color-picker'); |
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
var num2hex = rgb => { | |
return rgb | |
.map(color => { | |
let str = color.toString(16); | |
if (str.length === 1) { | |
str = '0' + str; | |
} | |
return str; | |
}) | |
.join(''); |
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
var gColorPicker = d3 | |
.select('div#slider-color-picker') | |
.append('svg') | |
.attr('width', 375) | |
.attr('height', 200) | |
.append('g') | |
.attr('transform', 'translate(30,30)'); |
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
rgb.forEach((color, i) => { | |
var slider = d3 | |
.sliderBottom() | |
.min(0) | |
.max(255) | |
.step(1) | |
.width(300) | |
.ticks(0) | |
.default(rgb[i]) | |
.displayValue(false) |