Data dodania Pytanie
2017-07-30 12:07 Determine the key of a song by its chords »
How can I programmatically find the key of a song just by knowing the chord sequence of the song? I asked some people how they would determine the key...
(3) odpowiedzi
2017-07-30 04:07 Using await in promise chain »
I just upgraded to node 8 and want to start working with async/await. I came across an error which took me a while to solve and I was actually just wo...
(1) odpowiedzi
2017-07-29 22:07 How could I send a React.js component from my node.js to my client? »
I'm sending a client a loader, and I want to receive my main React.js components from the server, after rendering the loader. I'm using node.js with ...
(1) odpowiedzi
2017-07-29 17:07 Addition not working correctly in ExpressJs, Where subtraction is working correctly »
I am doing a NodeJs Project. I am facing this problem.Subtraction is working correctly But addition is creating the problem................. var prev...
(1) odpowiedzi
2017-07-29 16:07 npm erased Plesk 12 on Ubuntu 16.04 »
My issue is pretty simple to explain and I guess hard to solve: I commited the stupidity of installing npm on a cloud based server with Ubuntu 16.04 w...
(1) odpowiedzi
2017-07-29 16:07 How to determine when features were introduced into React »
I am currently creating a package which I will publish on NPM. My package uses React but I don't want to add it as a dependency in my package to avoid...
(1) odpowiedzi
2017-07-29 14:07 Best way to handle mongodb data for ejs file »
I'd like to render mainly mongoDB data and an array. What I want to do is allow my ejs file to use the components inside the database. Here is my cod...
(1) odpowiedzi
2017-07-29 01:07 What's the right way to template static front-end .js files inside the "public" folder (using Express/NodeJS and EJS)? »
Is there a way to "template" static front-end .js files (the ones inside the "public" folder) the same way I'm templating my HTML with EJS? Is that e...
(1) odpowiedzi
2017-07-28 23:07 JavaScript Promise Chaining- Why not working? »
In the following code, can someone explain why calling secondMethod in the Promise chain works but calling secondMethod() does not? function firstMet...
(2) odpowiedzi
2017-07-28 18:07 Mongoose bcryptjs compare password doesn't refer to the document (this) »
I have mongoose schema like so var mongoose = require ('mongoose'); var bcrypt = require('bcryptjs'); var Schema = mongoose.Schema; var SALT_WORK_F...
(0) odpowiedzi
2017-07-28 12:07 error in json format in mongodb »
var express=require('express'); var app=express(); var bodyParser=require('body-parser'); var mongoose=require('mongoose'); var createError = require(...
(1) odpowiedzi
2017-07-28 07:07 EJs to HTML, nodejs, webpack »
webpack config: { entry: { filename: "./test/output.ejs" }, module: { loaders: [ { test: /\.e...
(1) odpowiedzi
2017-07-27 13:07 How to apply natural sorting on String type numeric field in mongodb? »
I have a voucher collection where all document have "created_for" field which is a string type numeric field also contain 0 at very beginning . Here b...
(1) odpowiedzi
2017-07-27 09:07 Post array to database from inputs »
I have a litte problem and please some advices or help how I can solve this annoying problem. Question: How save values from multiple inputs in on ar...
(2) odpowiedzi
2017-07-27 09:07 ejs - include a file from a subfolder file »
My main template folder is views. Inside of that I have another folder called _layouts where I have header.ejsand admin_header.ejs. so if i have a fi...
(0) odpowiedzi
2017-07-27 04:07 Angular 2/4 Typescript Array contents not updating »
I'm having a problem with updating the contents of an array in an Angular component. The array with name arr is created to store the values that is u...
(1) odpowiedzi
2017-07-26 19:07 Put Whole Original Document Under a new Property Name »
I created an aggregation pipeline which does the following: Go to Custom collection and find by _id Go to Default collection and find by id, attach ...
(2) odpowiedzi
2017-07-26 14:07 How to use multer-imager npm module in nodejs and upload my image resized to amazon s3 bucket? »
/********app.js***********/ var express = require('express'), aws = require('aws-sdk'), bodyParser = require('body-parser'), multer = req...
(1) odpowiedzi
2017-07-26 14:07 In express link to static assets breaks when user visits a 404 page »
I am using express to create a simple application. I have coded my templates using handlebars which looks like something this: <!DOCTYPE html> ...
(1) odpowiedzi
2017-07-25 15:07 Node echo server degrades 10x when stream pipes are used over buffering »
On node v8.1.4 and v6.11.1 I started out with the following echo server implementation, which I will refer to as pipe.js or pipe. const http = requi...
(0) odpowiedzi
2017-07-25 11:07 How to publish a library of Vue.js components? »
I am working on a project containing a Vuex module and an abstract components that users can extend from. I would love to publish this on NPM to cle...
(2) odpowiedzi
2017-07-25 07:07 How to create chatting app using swift »
Hi am working in a app which need to send a message from one to one so that am following a example https://www.appcoda.com/socket-io-chat-app/ which w...
(2) odpowiedzi
2017-07-25 01:07 javascript regex non-capture faster than no parenthesis at all »
I was playing with jsperf to see if chrome optimizes the javascript regular expression by removing unnecessary non-capturing groups. However I am left...
(2) odpowiedzi
2017-07-25 00:07 How to execute server side file handling operations in Meteor? »
I'm storing Word(.docx) files using GridFS on the server. I'd like to be able to merge the documents into one Word file by using the docx-builder NPM ...
(2) odpowiedzi
2017-07-24 23:07 Spawning Multiple Promises »
I'm not sure this is possible but this is what I'm trying to do. I have a call to a database that returns a promise. In the then I want to iterate ove...
(2) odpowiedzi
2017-07-24 19:07 passing a variable from routes.js to my .ejs page »
I am trying to pass a query from my database var aboutUser = connection.query("SELECT about FROM users WHERE username = ?", req.user, function(err, ...
(2) odpowiedzi
2017-07-24 16:07 Why does VS Code break on handled exception from Reject in Promise? »
Take this code, we have a promise that calls a function that will fail, and it should pass the error onward to the catch method of the promise. It w...
(1) odpowiedzi
2017-07-24 15:07 How to resize an image and upload using multer in nodejs to s3 and using easy-image npm module? »
I have done resizing of an image using easy image npm module in nodejs using the below code. var easyimg = require('easyimage'); easyimg.rescrop({ ...
(0) odpowiedzi
2017-07-24 14:07 include variable in ejs blocks :unexpected token error % »
I am trying to append a variable with block in ejs this is my variable <%=sails.config.items.base_url%> <%block('searchScript','<script...
(1) odpowiedzi
2017-07-23 15:07 How Express routes similar url links? »
Developing web app with node.js and express. I have following two urls to distinguish: /api/v1/source?id=122323 /api/v1/source?timestamp=1555050505...
(2) odpowiedzi
2017-07-23 12:07 how to call the functions that are object members? »
I have want to call the function that is a object attribute. For example consider the code var obj={ a:"One", b:"two", c:'three', d:function...
(4) odpowiedzi
2017-07-23 02:07 How to only include stylesheet on certain routes/pages? »
I have a simple node.js application which has two stylesheets, one for the main page and another for a secondary page. I also have a header partial w...
(0) odpowiedzi
2017-07-23 01:07 Prevent JavaScript closure from inheriting scope »
I am looking for a fancy way to prevent a closure from inheriting surrounding scrope. For example: let foo = function(t){ let x = 'y'; t.bar = ...
(1) odpowiedzi
2017-07-22 22:07 Freeze existing properties of object, but allow object to be extensible »
So I have been looking at Object.freeze() and Object.seal(). Object.freeze() - will make all existing properties non-writable, and will not allow any...
(3) odpowiedzi
2017-07-22 20:07 Whats going on here global[{a}]=7 »
I have the following code. a=7 global[{a}]=7 global[{a}] // returns 7 b[{a}]=7 b[{a}] // returns undefined I honestly have no idea whats going on,...
(2) odpowiedzi