FAQ Database Discussion Community


AngularJS how to use $q in Typescript

javascript,angularjs,typescript,q
I am new at AngularJs and very new at Typescript. I included Typescript in my AngularJs project but couldn't handle a service where i return a $q(function(){...}) my code looks like: function foo(request, monitor, currentMonitorPropertys) { var currentChart; return $q(function (resolve) { $http(request).success(function (chartResponse) { ... resolve(monitor); }).error(function(response){ ... });...

Replacing callbacks with promises in Node.js

javascript,node.js,promise,q
I have a simple node module which connects to a database and has several functions to receive data, for example this function: dbConnection.js: var mysql = require('mysql'); var connection = mysql.createConnection({ host: 'localhost', user: 'user', password: 'password', database: 'db' }); exports.getUsers = function (callback) { connection.connect(function () { connection.query('SELECT *...

Using Angular how can we make a call after completing bunch of asynchronous calls

angularjs,q
This is my code in controller myFactory.getPoints().success(function (data) { $scope.points = data; }); myFactory.getStates().success(function (data) { $scope.states = data; }); myFactory.getLeases().success(function (data) { $scope.leases = data; }); I am expecting $scope.leases gets the value after $scope.points and $scope.states gets their values. I learned that $q with .then is not synchronous....

Using Q.js promise for unit-tests: timeout of 2000ms exceeded

javascript,unit-testing,asynchronous,mocha,q
I'm using Q.js library for simulating async behaviour by using promise I have a stubed backend api class ApiStub { constructor(){ this.deferred = Q.defer(); } post(url, data) { if (data) { this.deferred.resolve(data); } else { this.deferred.reject(new Error("Invalid data")); } return this.deferred.promise; } } and I'm trying to test it: before(()...

Q Reject promise within .then success callback

node.js,promise,q
I'm using kriskowal Q promise library in a node app. I have code that reads a file and then attempts to parse part of it into a Javascript Date object (I have similar code in other places that attempts to do a JSON.parse). In these circumstances I've read and personally...

Destroy angular $http success/error snippets after route change

angularjs,http,angular-ui-router,q
the issue can be seen here: http://embed.plnkr.co/Qcw1YA/ I run route1 and I have a $timeout function. I quickly switch to route2, then the delayed code from route1 shows up. I want to destroy any code running in the $timeout function, which in a real case scenario is an $http service...

in node, using Q, make 2 functions work in parallel but wait only for the first one to fulfill its promise

javascript,node.js,workflow,promise,q
In my environment I use node +q (which I'm not a great expert of), so the main argument is: promises. I have a function that needs to make 2 operations in parallel, a very long one and a very short one. var parallelWrapper = function(input) { var deferred = Q.defer();...

Node.js and Q Promises: How can I hand over parameters in a cleaner way?

javascript,node.js,coding-style,promise,q
I have some code like this: function example(data){ asyncFnOne() .all([asyncFnTwo(), data]) .spread(asyncFnThree) .done(); }; It doesn't matter what those functions do. The problem I have is that I don't know how asyncFnThree can access both data from asyncFnTwo and from the function parameters. The way I solved the problem is...

AngularJS $q.all update/notify not called why?

angularjs,q,angular-promise
So I have a simple example of using $q.all to batch $resource calls, what I want to know is why is my update handler never called? I would have thought it would be called after each promise is successfully completed? Only the result handler is called. What am I doing...

Nested $http calls $q.all returns promises but not resolved

javascript,angularjs,promise,q
I call a function that returns a list with ID that i want to use in chained call. Everything seems to work until i want to read all those objects that are returned.. Those are promises but i cannot find out why i cannot resolve them. //Get bubbles and then...

How to to nest a sequence with Q?

javascript,promise,q
I would like to handle a sequence of tasks and get informed as soon as a block of those tasks is completed and once every task is completed. The output I expect should be 1,2,3 - 4,5,6 - 7 - 8. With my current implementation I get 1,4,7,8 - 2,5...

How to resolve compile error

typescript,q
After converting a js file to a ts file, I am getting this compile error: Type '() => Promise<{}>' is not assignable to type 'Promise<{}>'. Property 'fin' is missing in type '() => Promise<{}>'. This is the code: system.defer = function(action) { var deferred = Q.defer(); action.call(deferred, deferred); var promise...

$q one function to handle both success and callback

angularjs,q
I have one function processResponse that has logic to handle both successful and failed response. Now I use it like this: return $http.get(url).then(processResponse, processResponse).then(function (data) {}); Is there any way to use $q in a way so that I specify the function only once?...

Type error when chaining Q.ninvoke

node.js,mongodb,q
There is an error when I was trying to use Q to chain mongodb functions in Node.js as follow: Q.ninvoke(MongoClient, 'connect', 'mongodb://127.0.0.1:27017/mydb') .then(function(db){ return Q .ninvoke(db, 'createCollection', 'mycollection') .ninvoke(db.collection('mycollection'), 'createIndex', {id: 1}) // error occurs here .ninvoke(db, 'close') .then(function(){...}) }); The error message I got: TypeError: Cannot call method 'apply'...

q promise resolved before completed?

angularjs,q
I think I may be missing something fundamental about how a promise works, because I never seem to be getting the result I expect, so hoping someone can correct my thinking. In this case, it is a relatively easy call. I have a angular factory that among other things gets...

Log all reject promises in Q

node.js,promise,q
Is there a way to configure Q to log or call a specific function on all rejected promises (like an interceptor)? Many exceptions are being swallowed in my application, and put error handling in all my promises just for logging purposes would be duplicated work to do. Thanks!...

KDB / Q Resetting random elements on newly created list (numerical vs symbol/char)

list,random,q,kdb,nul
I am having a random (Y) list with (X) elements (seed elements in 2nd dimension) where I want to reset values on a random factor (Z) that is between 0f and 1f. For numerical lists this code works fine q)seed:20 q){(0>z-(x#seed)?\:1f)*(x#seed)?\:y}[3;10;0.25] How can I extend that code to be running...

How can I use `Q.set`?

javascript,promise,q
According to the API reference Q provides promise extensions for working with objects, but they don't behave as I would expect. Consider the following line of code: Q({foo:"bar"}).set("foo","baz").then(console.log); I would have expected {"foo": "baz"} to be printed, but it's actually undefined. Do I misuderstand the set method, or am I...

Q.ninvoke replacement in node bluebird

node.js,mongoose,promise,q,bluebird
I'm migration a project from Q to bluebird. In this project Q.invoke is used a lot. e.g. in central methods like this: repo.count = function(entity,query) { // entity is a mongoose model var command = query = entity.find(query).count(); return Q.ninvoke(command, 'exec'); }; What would be the best bluebird way of...

How does Q.all work in NodeJS?

javascript,node.js,promise,q
I have the following code: var a = [1,2,3,4,5]; var promises = []; a.forEach(function(item,index){ var deferred = Q.defer(); doSomething().then(function(){ deferred.resolve(true); promises.push(deferred); }); }); Q.all(promises).then(function(data){ console.log("something!!"); }); How does Q.all know that promises array has all the promises required by forEach loop? Sometimes, my Q.all runs before forEach. Please tell me...

Node.js with typescript require and .d.ts files

javascript,node.js,typescript,q
I want to create an server side script, for this I require "Q", so I include the q.d.ts file. And I use this to import q: var Q = require("q"); Now I recive this error: Duplicate identifier 'Q' Does somebody know how to solve this name conflict? The complete startup...

KDB+ / Q Accessing root namespace from namespace

namespaces,q,kdb
how can I access functions/variables in the root namespace once I jumped into another namespace. Example like this: q)\d .cfg q)domIV:1000 q)\d . q)n:1000 And then later on I know how to access the variable domIV from the other namespace, but I dont know how to access the variable n...

KDB+ / Q Table creation with dynamic number of columns

list,table,q,kdb
I am doing stuff like this q)seed:5 q)numvals:3 q)id:`u#1+til seed; q)vals:numvals cut (seed*numvals)?`8 q)1!([]id;vals) Now i am getting a table like this id| vals --| -------------------------- 1 | bhlkdkfd ghmjjepm gphfcddd 2 | jnloahej ipbcbnop heokehhg 3 | eijocfod nbbeopjo ddhiffmp 4 | cndelncn cmcmkckd aelpmccp 5 | nhjdlned cbkgpggg...

Q: Promisify Synchronous operations for chaining promises?

promise,q,chaining
Is there any merit in promisifying synchronous operations so that by design they can be chained in onSuccess or onError callbacks? Eg: function loadSettings(path) { if (fs.existsSync(path)) { return Q(fsJson.loadSync(path)); } return new Q.defer().reject('No local settings!'); } doingSomethingFirst() .then(loadSettings, obtainSettings) .then(doSomethingWithSettings) .done() What's best?...

call functions in async with node which is more recomended Q or callback

javascript,node.js,callback,promise,q
I've node app with function that inside call to to other two function,I want to use some async behavior for it,what is recommended to use in this case. example will be very helpful. function myFunction(req,res){ //from here this is the first place which I want to use warp in function...

angularjs return another promise in $q.all

angularjs,q,angular-promise
in my angularjs/ionic application I'm getting data from a sqlite database and want to get data from a web service which depends on the values of the database variables. I thought this might be possible with: .factory('WebSrvs', function($http,DatabaseSrvs) { var getData = function() { var promiseReceiverUrl = DatabaseSrvs.getLocalValue('value1'); var promiseVehicleId...

Very random behaviour in Node with gm, buffers and promises

node.js,buffer,q,graphicsmagick
I recently switched my image saving module over to gm (grahicsmagick) and began using buffers instead of saving to disk. The output I expect is an array with an md5 hash, then the paths to the original image and the thumbnail. I use promises, like this. saveOrig( imageUrl ) .then(...

Implementing Q with Strongloop Loopback

javascript,node.js,promise,q,loopbackjs
Q is a "supporting module" of loopback. I'm not totally sure what that means, but I'm assuming that it at least means that is possible to use Q with loopback's Persistent Model functions, like find() or findOne(). I'd like to know how to properly setup something like the following: app.models.Question.findOne({...

Why is the promise still pending?

javascript,q
The following code returns: output.isPending?: true output.isRejected?: false output.isFulfilled?: false Why? I was expecting output.isRejected to be true. <html> <head> <script src="http://cdnjs.cloudflare.com/ajax/libs/q.js/0.9.7/q.js"></script> <script src="http://jasmine.github.io/2.3/lib/jasmine.js"></script> </head> <body> </body> <script> var output, bar; bar = { doSomethingAsync: function() { var d = Q.defer(); d.resolve('result'); return d.promise; } }; function Foo(bar) {...

Node.js Q promise forEach returning undefined

javascript,node.js,http,promise,q
Using Q for Node.js, I am promising a HTTP request, and upon fulfillment calling another function passing in the response of that HTTP request, that function then iterates over a JSON array from the HTTP requests, builds up a new array, and returns it. Debugging Reddit.prototype.parseData I can see the...

Collection data from different pages for a list of data and sending them together

javascript,arrays,node.js,q
I have an array of publishers and each publisher have motionID, this ID is used to get data from API Like 'https://example.com/v2/feeds/'+publisher.motion+'/events/?page=' publisher.motion is motionID. Every publisher of the motion have multiple pages of event. 'https://example.com/v2/feeds/'+publisher.motion+'/events/?page=1' 'https://example.com/v2/feeds/'+publisher.motion+'/events/?page=2' . . 'https://example.com/v2/feeds/'+publisher.motion+'/events/?page=n' I want to collected all the events from all pages...

How to pass parameters to Node's Q library's (denodeify) promise handler

javascript,node.js,promise,q
In the below code I would like to have variables a, b, c to be passed as parameter when processhttprequest() gets called. var q = require("q"); var request = require('request'); function myfun() { var a, b, c; //do some work here var httprequest = q.denodeify(request); var httprequestpromise = httprequest(httpoptions); httprequestpromise.then(processhttprequest);...

How do you properly return multiple values from a promise?

javascript,promise,q
I've recently run into a certain situation a couple of times, which I didn't know how to solve properly. Assume the following code: somethingAsync() .then( afterSomething ) .then( afterSomethingElse ) function afterSomething( amazingData ) { return processAsync( amazingData ); } function afterSomethingElse( processedData ) { } Now a situation might...

What does “Promise fires on the same turn of the event loop” mean?

javascript,node.js,q
New to NodeJS. Going through the promise tutorial ('promise-it-wont-hurt') I have the following script: var Q = require('q'); var deferred = Q.defer(); deffered.resolve('SECOND'); deffered.promise.then(console.log); console.log('FIRST'); The output: FIRST SECOND I don't get it, I would have thought that since resolved is fired first I should see second first. They explain...

Q promises and mongo db q.all

node.js,mongodb,q
I'm making calls to a mongodb database - pulling data out... reading it, and then making further requests based on that data. Once all the data has been received, I wish to process it. I've been using Q.promises library but don't know what I'm doing. I thought that q.all would...

Node.js Q promises then() chaining not waiting

javascript,node.js,promise,q
I am trying to refactor the following code to avoid the callback hell, transforming it into: createUser(user_data) .then(createClient(client_data)) .then(createClientPartner(clientpartner_data)) .then(function(data) { cb(null, _.pick(data,['id','username'])); }, function(error) { cb(error); }); As you see, I created a method for each one of the steps: function createUser(user_data) { console.log('createUser'); var deferred = Q.defer() new...

Function Returns a Promise, Check Errors

javascript,promise,q
I have a function doSomething() that returns a promise chain, utilizing the Q framework. The contents are similar to something like: loadDataSet : function (params) { return Q.fcall(function() { //Do Something }) .then(function(){ //Do Something Else throw New Error('unexpected error'); }); } The calling code goes something like: var promise...

Javascript Kriskowal Q JS promise not working

javascript,jasmine,q
I have created a promise using kriskowal/q module but when i try to use this it does not go into any function either happy path or error path. here is my promise creation class var Q = require('q'); var Test = function () { }; Test.prototype = (function () {...

node js calling same deferred function from client and another node module

javascript,node.js,express,q
Is there a better way to call the same function from the client and another node js module. Without having 2 separate functions. The only difference method the value is returned? exports.getFiles = function(req,res){ var globPattern = req.body.globPattern; var globOptions =req.body.globOptions; glob(globPattern, globOptions, function (err, files) { if(err) { res.status(400);...

How can I resolve a $q.all in my controller in a Karma unit test?

angularjs,q,karma-jasmine
My controller has: switchUserAccount: function() { $scope.model.currentMode = 'user'; console.log(ipCookie('currentPatientId')); $q.all([facilityCache.getFacility(), facilityGroupCache.getGroupList(), languageCache.getLanguageList(), genderCache.getGenderList(), raceCache.getRaceList(), dosingCache.getDosingOptions()]) .then(function(){ console.log('back from then'); cache.set('ui', 'adminPage', ''); cache.set('ui', 'schedulePage', 'patients'); if(ipCookie('currentPatientId')) { $location.path('/patient/view/' +...

How can I make a waterfall Q promises?

javascript,angularjs,promise,q,deferred
let's take this as an example: I have 3 urls in an array urls require function returns a promise which just makes an $http call this is a working code, but as the array can be '1 to n' this is obviously not what I want. I need the 3...

$q.defer() not working with Angular service

javascript,angularjs,q
I'm new to angular's $q and I'm trying to build a service that makes an API call and returns it back to the controller. Problem: No matter how I seem to format it, the service returns right before it gets to $http.get(...) Service: // methods: query new, get existing makeRequest:...

Converting async code to q/promise code in nodejs

node.js,asynchronous,promise,q
I've read through a lot of different articles on promisejs but can't seem to get it to work for my code. I have async code that works and does what I need but it's very long and doesn't look as clean as it could with promise. Here's the two links...

Sharing promises between modules vs having multiple promises

javascript,node.js,promise,repository-pattern,q
I am implementing Node.js logic with controllers and repository using Kris Kowal's Q library. I have a feeling that the way I use promises in the example below is not correct. But I can't find any guidance on proper pattern how to use promises through multiple layers or functions. Am...

Require inside Q promise

javascript,requirejs,q
I need to use require inside Q structure Q.fcall(function () { console.log('1'); }).then(function () { console.log('2'); require(['myfile'], function () { console.log('2.1'); }); }).then(function () { console.log('3'); }); What I expect? 1 2 2.1 3 What I got? 1 2 3 2.1 Is it possible? How I should to rewrite construction?...

KDB+ / Q table creation with foreign key

database,table,foreign-keys,q,kdb
My question is about creating a table with q and using foreign keys. I know how to do it the following way q)T1:([id:1 2 3 4 5]d1:"acbde") q)T2:([id:1 2 3 4 5]f1:`T1$2 2 2 4 4) But now lets say I want to create the table with the ! operator...

What is the Bluebird equivalent of `Q.when`?

javascript,node.js,promise,q,bluebird
Switching over to Bluebird from Q, I just want to make sure it's culturally correct: Is there an equivalent to Q.when(someValue); or Q(someValue);? Is it Promise.resolve(someValue);?...

Q promise .then() undefined

javascript,node.js,q
I am attempting to asynchronously pull data from a MySQL database then process the results with Q promise (first attempt ever). I am using the Q defer() function listed here. I have created a "wrapper" object I will eventually attach to req.db or access via circular dependency from com.db (how...

How do I use promises in node.js to clean up a chain of callbacks?

javascript,node.js,callback,promise,q
I'm trying to figure out how to use promises, particularly the Q implementation to clean up some messy nested callbacks in a node.js program. Unfortunately, there seems to be very few simple examples out there that illustrate what I'd like to do. Here is a simplified version of the nested...

KDB+ / Q unique random values with variable for amount

random,q,kdb
I am quite new to KDB+ and have a question about generating random numbers. Lets say I want to create num random unique numbers. When i use this q)10?10 q)-10?10 I get 10 random numbers in line 1 and 10 unique random numbers in line 2 (range from 0 to...

Chaining timeouts results in last timeout rejected?

javascript,node.js,promise,q,bluebird
I'm currently trying to chain some promises with timeouts and no matter which timeout is reached it's always reporting the last one. I tried it with bluebird and Q with the same result, so I think I have a general problem. The code basically looks like this: var Promise =...

What's a simple way to log a programming error in node?

node.js,q
NOTE: I edited this question to more accurately show the problem, rather than delete and rewrite it. Hope that's OK. For the following code: var Q = require('q'); function first (){ var d = Q.defer(); setTimeout(function(){ d.resolve([]); }, 1000); return d.promise; } function second(v){ sdf; console.log("hi") } first() .then(second); How...

Variable context issue on node.js using Q (promise) [duplicate]

javascript,node.js,promise,q
This question already has an answer here: JavaScript closure inside loops – simple practical example 25 answers I'm using node.js with Q as promise implementation. For some reason I have to build a few promise with a loop. In the "real" code, of course, I do not use constant...

How to start using $q?

angularjs,q
I've tried to inject $q in my controller like this: app.controller('NodeCtrl', ['Tree', function(Tree, $scope, $element, $q) { But, $q is not defined, how can I start using it? I am using Angular 1.4...

How to add Promise to event handler in javascript

javascript,node.js,promise,amqp,q
Now I want to wrap amqp with Promise Q, here are the codes Sender.prototype.createConnection_ = function () { var deferred = Q.defer(); this.con_ = amqp.createConnection( this.connectOpt_, this.implementOpt_ ); deferred.resolve( this.con_ ); return deferred.promise; } Sender.prototype.connectionReady_ = function() { var deferred = Q.defer(), self = this; self.con_.on('ready', function() { console.log('connection is...

NodeJS Q and module

javascript,node.js,q
I have two files, layer-token.js and server.js. layer-token generates a JWT token, I am using promises using Q to go through the process step by step, everything work fine and the token is generated. My problem is how to pass the token back to server.js, currently the value of LayerSessionToken...

node.js redis and how to use promise when using a module

javascript,node.js,redis,promise,q
I have an Express route like this in an node server (file is required): var redis = require('../modules/redis'); module.exports = function (app) { var redisClient = redis.init(); app.post('/auth/ticket', cors(), function (req, res) { var hashes = ['hash1','hash2', 'hash3']; var candidates = []; // An array to collect valid hashes var...

What is the purpose of “done” in q promise chains?

javascript,q
What is the purpose of using done in Q promise chains. IIUC it propogates the error. If so, how can I catch said error? The following code outputs: Uncaught Error: hello world. How can I catch this error? Do I have to use the .catch syntax, or is there another...

type char to type num mapping

q,kdb
q)type variable returns the type num of the arguement variable. Is there a mapping that can produce the type char from a type num or do I have to create that dictionary myself? Ideally something like q)typeChar 1 i ...

How do you return a value from one class method to another when using Q/promises/asynchronous functions?

javascript,node.js,asynchronous,q
What is the best way to return a value from one class method to a different class method when using Q/promises/asynchronous functions? Specifically, I have the following where ClassOne.myMethod() will call ClassTwo.test() to perform several asynchronous tasks (db updates, file writes, etc). I would like ClassTwo.test() to return something (in...

Controlling the value of this in a promise

javascript,promise,q
I am wrapping some of the functionality of XMLHttpRequest. I am attaching the resolution of a deferrred to the event fired onload. IIUC XMLHttpRequest sets the value of this in the callback invoked by XMLHttpRequest to contain the response details (response text, status code etc.). But I am using q...

Don't include q promise result in sequentially chained promises

javascript,promise,q
I have the following sequentially chained Q promise that fills in a hierarchy of user->properties->tenants->reminders: return getAllUsers() // get all users of the system .then(function(users) { return Q.all(users.map(function(user) { return getUserProperties(user) // foreach user of the system get their properties .then(function(properties) { user.properties = properties; return Q.all(properties.map(function(property) { return getPropertyTenants(property)...

Q.all is not working

javascript,node.js,protractor,q
I have a problem with my node.js e2e test. I want to wait for 2 promises to resolve. But for some reason when I use Q.all it is just freezing my app. I am using kriskowal's Q 1.0.0. This works: var doStuff = function() { var promiseA = getPromiseA(); return...

How does one use Q.all with chai-as-promised?

protractor,q,cucumberjs,chai-as-promised
The chai-as-promised docs have the following example of dealing with multiple promises in the same test: it("should all be well", function (done) { Q.all([ promiseA.should.become("happy"), promiseB.should.eventually.have.property("fun times"), promiseC.should.be.rejectedWith(TypeError, "only joyful types are allowed") ]).should.notify(done); }); I assume that the Q here has come from npm install q and var Q...

Why isn't my Q promise working?

node.js,q,node-mysql
I'm new to promises and Q, and I'm trying to convert a route that uses query in node-mysql. Here are excerpts from my code: var Q = require('q'); // connection defined elsewhere router.get('/', function(req, res) { var query = Q.denodeify(connection.query); var promise = query("-- query ommitted --", [req.user.id]); promise.then(console.log, console.error);...

How to write a function with arguments using promises in Node.js?

javascript,node.js,promise,q
Assume I have the following function: Person.find({ surname: "Doe" }).only("name", "surname").run(function (err, people) { }); This is what I have tried using promises: Q.nfcall(Person.find.only('name', 'surname').run, {surname: 'Doe'}); Where should I insert arguments for the only() function using promises? Thank you...

Q promise with underscore .find()

javascript,find,underscore.js,promise,q
I trying to use _.find() in the context of a Q promise. My problem seems to be from the fact that my predicate function contains a call to an asynchronous (node-style) function. Here is my code: var IsAlreadyQueued = function() { return Q.ninvoke(kueSearcher, 'delayed') .then(function(ids) { return Q(_.find(ids, function(id) {...

.then .done promises not working in durandal spa using knockout and js

jquery,knockout.js,single-page-application,q,durandal-2.0
I am working on a SPA developing in Durandal using Knockout jQuery and Require. My problem is when I make ajax calls to my API I don't actually get my data outside the .then statement(when I substitute my Get method with the line commented out below). However if i work...

Angular $q.all() console.log output order timing not making sense to me

angularjs,q
I have this service angular.module("myApp").service("xhrService", [ "$q", function($q) { var promises = []; return { push: function(promise) { promises.push(promise); }, process: function($scope) { $q.all(promises).then(function() { $scope.$emit("loading:dataReady"); promises = []; }); } } }]); This code in a parent controller $scope.$on("loading:dataReady", function () { console.log("Data Ready"); }); This code in a...

Q.fail not working when using Q.allSettled

javascript,node.js,q
When using Q.allSettled, I can't use Q.fail to get the error. If i have promises which contains a promise that is eventually rejected, this code never gets in the .fail block Q.allSettled(promises) .then(function () { // Handle success }) .fail(function (err) { console.log('IN ERRR', err); }); }); The documentation for...

How can I avoid breaking a promise chain when using q.map?

node.js,promise,q
I think I may have gotten too fancy with promises. I have an array of geese, and there's an arbitrary number of operations I would like to perform before returning a final value. I've found that after the first return statement, the chain is broken. If my collection has 10...

KDB+ / Q Better webinterface

q,kdb,web-interface
I am wondering if there is a html script with corresponding q script out there that brings a better webinterface (than the basic builtin one) with advanced functionality like showing all namespaces (with option to unfold or browse into) resolving foreign keys (with option to click on it and it...

Collection data from different API and sending them all together in a response

javascript,node.js,q
I want to retrieve product from multiple pages of the API like https://example.com/v2/nodes/?resource__type=device&page=1 https://example.com/v2/nodes/?resource__type=device&page=2 . . Each page have the link for next API like this: var devices = JSON.parse(body); devices.links.next I want to retrieve all the data from all page. And I also want to call another function when...