- You pass the reducer to this, it actually ultimately receives all navigation calls via onNavigate, which is mostly equivalent to Redux dispatch. It setState and persisting state. it is like the redux "store"
// Make sure you added pm2 as a dependency in your package.json | |
// Then in your Procfile, do a simple `node bootstrap.js` | |
var pm2 = require('pm2'); | |
var MACHINE_NAME = 'hk1'; | |
var PRIVATE_KEY = 'z1ormi9vomgq66'; | |
var PUBLIC_KEY = 'oa0m7nuhdfibi16'; | |
var instances = process.env.WEB_CONCURRENCY || -1; // Set by Heroku or -1 to scale to max cpu core -1 |
- (UIImage *)compressImage:(UIImage *)image{ | |
float actualHeight = image.size.height; | |
float actualWidth = image.size.width; | |
float maxHeight = 600.0; | |
float maxWidth = 800.0; | |
float imgRatio = actualWidth/actualHeight; | |
float maxRatio = maxWidth/maxHeight; | |
float compressionQuality = 0.5;//50 percent compression | |
if (actualHeight > maxHeight || actualWidth > maxWidth) { |
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
import decamelize from 'decamelize'; | |
import { fromGlobalId } from 'graphql-relay'; | |
import pluralize from 'pluralize'; | |
import getItem from '../api/getItem'; | |
const types = {}; | |
const endpoints = {}; | |
const getItemOverrides = {}; |
GraphQL allows us to define a generic, UI-agnostic data model on the server using a graph schema that encodes the natural relationships within the data. To wire our model to data, we define resolvers in the schema that leverage our db's own query language (SQL, NoSQL, or Graph query language, etc) or in-memory objects to resolve client-defined, graph-oriented queries against our generic data model.
With each components in the UI component tree declaring its own data dependencies, GraphQL/Relay creates a projection of the graph data model that maps to the UI component tree, thus allowing us to have a UI-agnostic data model on the server, while at once giving us and UI-specific projection of the data. The queries from GraphQL server to the database are composed in an efficient manner based on the aggregate data dependencies that are declared by each component in the UI component
Inspired by this issue, with these instructions you should be able to get Babel transpiling your JS in Sails JS for the client side.
- Install Grunt Babel
npm install --save grunt-babel
- Create a
babel.js
file undertasks/config
and add something like the following:
module.exports = function(grunt) {
grunt.config.set('babel', {
dev: {
with different environments like staging and production no less! new: now with multiple account administration!
- Create a Node.js app as you would normally, managing your dependencies with
npm
inpackage.json
. - Your app should be set up to listen on
process.env.STRONGLOOP_PORT || [your usual local port]
. - Download and install the Heroku toolbelt. This install includes
git
.
➽ If you need to handle multiple accounts, install the accounts plugin.
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
-
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>
""" | |
Multinomial Logistic Regression (MLR) | |
===================================== | |
Multiclass-classification with the MLR classifier | |
Authors: Adrien Gaidon & Jakob Verbeek | |
""" |