-
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
- Delete all untagged images
handleProductChange(event) { | |
const target = event.target; | |
const name = target.name; | |
this.setState({ | |
"product": { | |
[name]: target.value | |
} | |
}); |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
module.exports = { | |
entry : __dirname + '/app/index.js', | |
module : { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, |
{queries.map(query => ({ | |
area: <Area key={query.id} name={query.name} {...query.definition} />, | |
bar: <Bar key={query.id} name={query.name} {...query.definition} />, | |
line: <Line key={query.id} name={query.name} {...query.definition} /> | |
}[query.definition.cartesianType]))} | |
// Shorter version | |
{queries.map(query => { | |
const Component = {area: Area, bar: Bar, line: Line}[query.definition.cartesiantype]; |
let counter = 0; | |
const repaint = () => React.render(<Spinner data={counter}/>, document.body); | |
const inc = () => { counter += 1, repaint() }; | |
const dec = () => { counter -= 1, repaint() }; | |
const Spinner = ({ counter }) => ( | |
<div> | |
{counter} | |
<button value="^" onclick={inc}/> |
<Router history={hashHistory}> | |
<Route path="/" component={Layout}> | |
<IndexRoute component={Dashboard}></IndexRoute> | |
<Route path="Login" component={Login}></Route> | |
<Route path="accounting"> | |
<Route path="authorize-orders" component={AuthorizeOrders}></Route> | |
<Route path="credit-transaction" component={CreditCcTransaction}></Route> | |
<Route path="authorize-card" component={Sale}/> | |
<Route path="authorize-card/select-invoices" component={SaleSelectInvoices}></Route> | |
<Route path="void-transaction" component={VoidCcTransaction}></Route> |
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import Router from 'routes'; | |
ReactDOM.render( | |
<Router />, | |
document.body | |
); |
const React = require('react'); | |
class NewComponent extends React.Component { | |
constructor(props) { | |
super(props); | |
this.onMouseOver = this.onMouseOver.bind(this); | |
} | |
onMouseOver() { | |
this.props.onMouseOver(this.props.id); | |
} |
import React, {Component} from 'react'; | |
import {connect} from 'react-redux'; | |
import FunctionPlot from './function-plot'; | |
require("../../css/functions.css"); | |
function mapStateToProps(state) { | |
return { | |
expression: state.expression |