<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| #!/usr/bin/env python2 | |
| #-*- coding=utf-8 -*- | |
| # © 2013 Mark Harviston, BSD License | |
| from __future__ import absolute_import, unicode_literals, print_function | |
| """ | |
| Qt data models that bind to SQLAlchemy queries | |
| """ | |
| from PyQt4 import QtGui | |
| from PyQt4.QtCore import QAbstractTableModel, QVariant, Qt | |
| import logging # noqa |
| # Note (November 2016): | |
| # This config is rather outdated and left here for historical reasons, please refer to prerender.io for the latest setup information | |
| # Serving static html to Googlebot is now considered bad practice as you should be using the escaped fragment crawling protocol | |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name yourserver.com; | |
| root /path/to/your/htdocs; |
| ( function( $ ) { | |
| "use strict"; | |
| $.fn.fireOnDisable = function( settings ) { | |
| // Only perform this DOM change if we have to watch changes with propertychange | |
| // Also only perform if getOwnPropertyDescriptor exists - IE>=8 | |
| // I suppose I could test for "propertychange fires, but not when form element is disabled" - but it would be overkill | |
| if( !( 'onpropertychange' in document.createElement( 'input' ) ) || Object.getOwnPropertyDescriptor === undefined ) { | |
| return this; | |
| } |
The basic structure of a React+Flux application (see other examples)
- /src/actions/AppActions.js - Action creators (Flux)
- /src/components/Application.js - The top-level React component
- /src/constants/ActionTypes.js - Action types (Flux)
- /src/core/Dispatcher.js - Dispatcher (Flux)
- /src/stores/AppStore.js - The main store (Flux)
| function NavBar($http) { | |
| this.date = new Date(); | |
| this.getHttp = function(){ | |
| console.log($http); | |
| } | |
| }; | |
| module.exports = NavBar; |
| import { Component } from "React"; | |
| export var Enhance = ComposedComponent => class extends Component { | |
| constructor() { | |
| this.state = { data: null }; | |
| } | |
| componentDidMount() { | |
| this.setState({ data: 'Hello' }); | |
| } | |
| render() { |
| #!/bin/bash | |
| SERVER_IP=<MY_SERVER_IP> | |
| # copy cloud-config.yml to the server | |
| scp cloud-config.yml core@$SERVER_IP:~/ | |
| # validate cloud-config file | |
| ssh core@$SERVER_IP "coreos-cloudinit -validate --from-file ~/cloud-config.yml" | |
| if [[ $? == "0" ]]; then |
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "io" | |
| "os" | |
| "os/exec" | |
| "strings" | |
| ) |
| import React, { Component } from 'react' | |
| import { BrowserRouter as Router, Route, Link, Match, Redirect, Switch } from 'react-router-dom' | |
| import OverviewPage from './page/OverviewPage' | |
| import AccountPage from './page/AccountPage' | |
| /* | |
| Layouts, inline define here for demo purpose | |
| you may want to define in another file instead | |
| */ |