I hereby claim:
- I am pdewouters on github.
- I am pauldewouters (https://keybase.io/pauldewouters) on keybase.
- I have a public key ASCKDMtJTY4jVSGWFMfIiGE8JeIHEXe-7jNOynTApklIeQo
To claim this, I am signing this object:
# Task | |
Implement a recursive function that returns all of the unique dependencies, and sub-dependencies of a module, sorted alphabetically. Dependencies should be printed as dependency@version e.g. '[email protected]'. | |
Multiple versions of the same module are allowed, but duplicates modules of the same version should be removed. | |
## Arguments: | |
* tree: A dependency tree. See below for an example of the structure. |
{"features":[{"id":"5943b3abda50f","name":"Documents","type":"feature-about","icon":"35","sorting":"manual","sections":[{"id":"592","type":"about-section","title":"Despatch letters","content":"<p><a href=\"https:\/\/www.unison.org.uk\/content\/uploads\/2017\/05\/2017-NDC-first-despatch-letter.pdf\">First despatch letter<\/a><\/p>\n"},{"id":"589","type":"about-section","title":"Standing orders","content":"<p>Standing orders will appear here<\/p>\n"},{"id":"586","type":"about-section","title":"Key Documents","content":"<p><a href=\"https:\/\/www.unison.org.uk\/content\/uploads\/2017\/06\/24415.pdf\"><br \/>\nAbout conference<\/a><\/p>\n<p><a href=\"https:\/\/www.unison.org.uk\/content\/uploads\/2017\/06\/24394.pdf\">Conference document<\/a><\/p>\n<p><a href=\"https:\/\/www.unison.org.uk\/content\/uploads\/2017\/06\/2017-National-Delegate-Conference_Composite_Booklet_Final4.pdf\">Conference composite booklet<\/a><\/p>\n<p><a href=\"https:\/\/www.unison.org.uk\/content\/uploads\/2017\/05\/UNISONAnnual-Report-2017 |
{ | |
"features": [ | |
{ | |
"id": "592fcb6e9243f", | |
"name": "Venue A-Z", | |
"type": "feature-about", | |
"icon": "36", | |
"sorting": "manual", | |
"sections": [ | |
{ |
{ | |
"features": [ | |
{ | |
"id": "1234", | |
"name": "about test", | |
"type": "feature-about", | |
"icon": "26", | |
"sorting": "manual", | |
"sections": [ | |
{ |
I hereby claim:
To claim this, I am signing this object:
Venue.findOneAndUpdate( | |
{venue: venueParam}, | |
{$addToSet: {going: req.user.email}}, // $addToSet will only add if not already existing | |
{safe: true, upsert: true}, | |
function(err, existingVenue){ | |
if(err) return err | |
res.json(existingVenue) | |
}) |
// actions.js | |
// Gets list of venues for a city from Foursquare API, then fetches all attendees for those venues from an express server API with mongoDB backend | |
export const fetchVenues = (city) => { | |
return (dispatch, getState) => { | |
return dispatch({ | |
type: FETCH_VENUES, | |
payload: { | |
promise: getVenues(city) | |
} | |
}).then( |
// containers/Container.js | |
import React, { Component } from 'react' | |
import { connect } from 'react-redux' | |
import actionCreator from './actions/index' | |
import { bindActionCreators } from 'redux' | |
class Container extends React.Component { | |
render(){ | |
return ( | |
<div>Hello World</div> |
use League\Flysystem\Filesystem; | |
use League\Flysystem\Adapter\Local; | |
use League\Flysystem\ZipArchive\ZipArchiveAdapter; | |
use Symfony\Component\Finder\Finder; | |
add_action( 'plugins_loaded', function(){ | |
require_once __DIR__ . '/vendor/autoload.php'; | |
$zip_archive = new Filesystem( new ZipArchiveAdapter( __DIR__ . '/archive.zip' ) ); |
var http = require('http') | |
var fs = require('fs') | |
var map = require('through2-map') | |
var server = http.createServer((req, res) => { | |
res.writeHead(200,{'Content-type':'text/plain'}) | |
if(req.method != 'POST'){ | |
return res.end('send me a POST\n') | |
} | |
req.pipe(map(chunk=>{ |