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
const fs = require('fs') | |
const tmp = require("tmp"); | |
const PDFDocument = require('pdfkit'); | |
const MemoryStream = require('memorystream'); | |
const { ChartJSNodeCanvas } = require('chartjs-node-canvas'); | |
export async function generatePDFWithCharts() { | |
// Sample chart with ChartJS | |
const chartJSNodeCanvas = new ChartJSNodeCanvas({ type: 'png', width: 800, height: 600 }); | |
const configuration = { |
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
console.log('Client-side code running'); | |
const button = document.getElementById('myButton'); | |
button.addEventListener('click', function(e) { | |
console.log('button was clicked'); | |
fetch('/clicked', {method: 'POST'}) | |
.then(function(response) { | |
if(response.ok) { | |
console.log('click was recorded'); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# -*- coding: utf-8 -*- | |
""" | |
A NetworkX based implementation of Yen's algorithm for computing K-shortest paths. | |
Yen's algorithm computes single-source K-shortest loopless paths for a | |
graph with non-negative edge cost. For more details, see: | |
http://networkx.github.io | |
http://en.m.wikipedia.org/wiki/Yen%27s_algorithm | |
""" | |
__author__ = 'Guilherme Maia <guilhermemm@gmail.com>' |