Skip to content

Instantly share code, notes, and snippets.

displayEditorDivider: function (key) {
var h = this.tabs[key].showEditorDragDivider;
this.editor.showDragDivider(!!h);
},
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>
export default class Home extends React.Component {
render() {
var blah = {
"blahprop1": "blahvalue1",
blahprop2: "blahpvalue2",
'blahprop3': 'blahvalue3',
blahprop4: 'blahvalue4',
'blahprop5': "blahvalue5"
}
export default class Home extends React.Component {
render() {
var blah = {
"blahprop1": "blahvalue1",
blahprop2: "blahpvalue2",
'blahprop3': 'blahvalue3',
blahprop4: 'blahvalue4',
'blahprop5': "blahvalue5"
}
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
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
}
})
async getAccessToken() {
// log(this.context.meetup, 'meetup')
var authUri = 'https://secure.meetup.com/oauth2/authorize?client_id=sgeirri963sprv1a1vh3r8cp3o&response_type=token&scope=basic+event_management&redirect_uri=http://localhost:7000/authentication'
request.get({
uri: authUri,
jar: true
}, (a,b, body) => {
import entities from 'entities'
import request from 'request'
import { OAUTH, URL } from './meetup'
export class MeetupOauth {
constructor(context) {
this.context = context
this._data = {}
}
assetType (contentitem-fusion-amd.js:274)
renderTableCell (contentitem-fusion-amd.js:1932)
_columnRenderer (contentrepeater…on-amd.js:1456)
renderColumn (fuelux-all.js:6499)
renderRow (fuelux-all.js:6676)
renderItem (fuelux-all.js:6413)
runRenderer (fuelux-all.js:5743)
(anonymous function) (fuelux-all.js:5631)
processDatasource (contentrepeater…on-amd.js:1359)
(anonymous function) (contentstore-amd.js:905)
import React from 'react';
import ReactDOM from 'react-dom';
// import BarChartExample from './components/BarChart';
// import Pie from './components/PieChart';
// import Scatter from './components/ScatterPlot';
// import ZoomBar from './components/Bar_Zoom';
// var d3 = require('d3');