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
| 'use strict'; | |
| const { send, json } = require('micro'); | |
| const { router, get, post, del } = require('microrouter'); | |
| const rateLimit = require('micro-ratelimit'); | |
| const cors = require('micro-cors')(); | |
| const database = require('../../database/db'); | |
| const model = require('../../model/index'); | |
| const controller = require('../../controller/index'); | |
| const { logRequest } = require('../../middlewares/mid'); |
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
| Request body | |
| While constructing requests, you would be dealing with the request body editor a lot. Postman lets you send almost any kind of HTTP request (If you can't send something, let us know!). The body editor is divided into 4 areas and has different controls depending on the body type. | |
| form-data | |
| multipart/form-data is the default encoding a web form uses to transfer data. This simulates filling a form on a website, and submitting it. The form-data editor lets you set key/value pairs (using the key-value editor) for your data. You can attach files to a key as well. Do note that due to restrictions of the HTML5 spec, files are not stored in history or collections. You would have to select the file again at the time of sending a request. | |
| urlencoded |
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
| 'use strict'; | |
| const {send, json} = require('micro'); | |
| const {router, get, post} = require('microrouter'); | |
| const rateLimit = require('micro-ratelimit'); | |
| const cors = require('micro-cors')(); | |
| const database = require('../../database/db'); | |
| const model = require('../../model/index'); | |
| const controller = require('../../controller/index'); | |
| // GENERAL |
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
| 'use strict'; | |
| class FetchDataManagerSingleton extends Map { | |
| static get [Symbol.species]() { | |
| return Map; | |
| } | |
| constructor() { | |
| this.fetchCount = 0; | |
| this.timeTilNextFetch = 5000; |
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
| // Js classes with extends | |
| // https://jsfiddle.net/2j9fg96b/ | |
| class Datastream { | |
| constructor(solution, key) { | |
| this.solution = solution; | |
| this.key = key; | |
| } | |
| toString() { |
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
| // ECMA 6 | |
| // https://jsfiddle.net/9L8bv237/ | |
| class Datastream { | |
| constructor(solution, key) { | |
| this.solution = solution; | |
| this.key = key; | |
| } | |
| exec() { |
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
| // https://jsfiddle.net/pamadvmu/ | |
| function DataStream(solution, key) { | |
| this.solution = solution; | |
| this.key = key; | |
| this.exec = function() { | |
| return 'Executing ' + this.key; | |
| } | |
| } |
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 templatePrefix1 = ` | |
| var variables = new java.util.HashMap(); | |
| variables.put("procInstId", " | |
| `; | |
| var templatePrefix2 = ` | |
| map.put("proc_inst_id", " | |
| `; | |
| var templateSufix1 = ` |
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
| [victor.costa@treinamento ~]$ sudo yum update | |
| [sudo] password for victor.costa: | |
| Loaded plugins: fastestmirror | |
| Setting up Update Process | |
| Loading mirror speeds from cached hostfile | |
| * base: mirrors.greenmountainaccess.net | |
| * extras: mirrors.centos.webair.com | |
| * updates: mirror.sesp.northwestern.edu | |
| Resolving Dependencies | |
| --> Running transaction check |
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
| ------------------------------------------------ | |
| procInstId: | |
| b775b6bf451549eaab3eddb1150fd874 | |
| ------------------------------------------------- | |
| ------------------------------------------------- | |
| typeof procInstId: | |
| string |