All code is highly based on Ildoo Kim's code (https://github.com/ildoonet/tf-openpose) and derived from the OpenPose Library (https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/LICENSE)
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
import React from 'react'; | |
export class StateDispatcher extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = props.state || {}; | |
this._dispatch = this.dispatch.bind(this); | |
} | |
dispatch(action) { |
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
class Sortable extends React.Component { | |
componentDidMount() { | |
// Every React component has a function that exposes the | |
// underlying DOM node that it is wrapping. We can use that | |
// DOM node, pass it to jQuery and initialize the plugin. | |
// You'll find that many jQuery plugins follow this same pattern | |
// and you'll be able to pass the component DOM node to jQuery | |
// and call the plugin function. |
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
#!/usr/bin/env python | |
import sys | |
import pika | |
connection = pika.BlockingConnection(pika.ConnectionParameters( | |
'localhost')) | |
channel = connection.channel() | |
channel.queue_declare(queue='hello', durable=True) |
To remove a submodule you need to:
- Delete the relevant section from the .gitmodules file.
- Stage the .gitmodules changes git add .gitmodules
- Delete the relevant section from .git/config.
- Run git rm --cached path_to_submodule (no trailing slash).
- Run rm -rf .git/modules/path_to_submodule (no trailing slash).
- Commit git commit -m "Removed submodule "
- Delete the now untracked submodule files rm -rf path_to_submodule
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
// Restify Server CheatSheet. | |
// More about the API: http://mcavage.me/node-restify/#server-api | |
// Install restify with npm install restify | |
// 1.1. Creating a Server. | |
// http://mcavage.me/node-restify/#Creating-a-Server | |
var restify = require('restify'); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
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
/** | |
* An Handlebars helper to format numbers | |
* | |
* This helper have these three optional parameters: | |
* @var decimalLength int The length of the decimals | |
* @var thousandsSep char The thousands separator | |
* @var decimalSep char The decimals separator | |
* | |
* Based on: | |
* - mu is too short: http://stackoverflow.com/a/14493552/369867 |
NewerOlder