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
function workflowHasMultipleActiveFacts2() { | |
var hasMultipleFacts = false; | |
vm.Workflow.WorkflowItems.forEach(function (w) { | |
var itemsWithFacts = w.Facts.filter(function (f) { return f.Export }) | |
if (itemsWithFacts.length >= 2) { | |
hasMultipleFacts = true; return | |
} | |
}) |
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
Creating a simple REST API server | |
================================== | |
This is the simplest way to create a RESTful API server with nodejs. We will create a node server that will use the express module. Then we will define one route/endpoint for the server to act upon. This route will return json data, the prefer data format for RESTful APIs. But note that other data format can be returned too, rest does not enforce this. | |
Steps: | |
1. Create a folder to hold our server/project. | |
2. Create an index.js file as the starting point for our node app/server | |
3. Add package.json via npm init, you can hit enter for everything and fill them out later |
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
export default class Home extends React.Component { | |
render() { | |
var blah = { | |
"blahprop1": "blahvalue1", | |
blahprop2: "blahpvalue2", | |
'blahprop3': 'blahvalue3', | |
blahprop4: 'blahvalue4', | |
'blahprop5': "blahvalue5" | |
} |
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
export default class Home extends React.Component { | |
render() { | |
var blah = { | |
"blahprop1": "blahvalue1", | |
blahprop2: "blahpvalue2", | |
'blahprop3': 'blahvalue3', | |
blahprop4: 'blahvalue4', | |
'blahprop5': "blahvalue5" | |
} |
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 React = require('react'); | |
var Link = require('react-router').Link; | |
module.exports = React.createClass({ | |
render: function () { | |
var details = this.props.details; | |
return ( | |
<div className="col-md-4 col-sm-6 col-xs-6"> | |
<div className="panel"> | |
<span class="upcomingCategory"><Link to="/about">{details.name}</Link></span> |
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
displayEditorDivider: function (key) { | |
var h = this.tabs[key].showEditorDragDivider; | |
this.editor.showDragDivider(!!h); | |
}, |
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> | |
<html> | |
<head> | |
<title>Renception Editor</title> | |
</head> | |
<body> | |
<div id="main"></div> | |
</body> | |
</html> |
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
import React from 'react' | |
import { render } from 'react-dom' | |
import HoverSelector from './hoverselector.js' | |
render( | |
<div> | |
<h3>this is a header</h3> | |
<HoverSelector /> |
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
import React from 'react' | |
import { DropdownButton, MenuItem } from 'react-bootstrap' | |
class HoverSelector extends React.Component { | |
constructor: function (props) { | |
super(props) | |
}, | |
render: function () { |
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
import React from 'react' | |
import { DropdownButton, MenuItem } from 'react-bootstrap' | |
class HoverSelector extends React.Component { | |
constructor(props) { | |
super(props) | |
this.render = this.render.bind(this) | |
} |