Posts by Nodejs • 381 points
25 posts
-
0
votes0
answers52
viewsQ: Select multiple files
Need to select on average 1500 up to 3000 files, however, only 1200 are being selected with the input below. Does anyone have any idea why? input class="form-control", type="file",…
-
1
votes1
answer184
viewsQ: Compare multiple arrays
I have two arrays, being them: data [ 0{ nome: a numero: 2 } 1{ nome: b numero: 3 } 2{ nome: b numero: 3 } 3{ nome: b numero: 8 } ] dataNota[ 0{ nf: 9999 numero: 2 } 1{ nf: 2000 numero: 3 } 2{ nf:…
-
0
votes1
answer34
viewsQ: Read jade array value
I have the following array created in my controller: var data = []; for (var i = 0; i < array.length; i++) { nfejs(array[i], function(err, nfe) { var itemNfe = {}; itemNfe.name =…
-
1
votes2
answers63
viewsA: read arrays in jade
- var names= JSON.parse(namesClient); - for (var i = 0; i < names.length; i++) label [j] #{names[i].name}
-
1
votes2
answers63
viewsQ: read arrays in jade
I need to read an array on my jade page. In my controller I am passing as follows: res.render('graphics/index', {namesClient:JSON.stringify(namesClient)} In jade I’m reading as follows: var names=…
-
1
votes2
answers495
viewsQ: Merge two objects with the same ID
I need to concatenate two objects that have the same id. Example: a1: {id: 1, qtde: 2} a2: {id:1, nome: 'teste'} Upshot: a3: {id: 1, nome: 'teste', qtde: 2} Someone knows how to do?…
-
0
votes1
answer464
views -
1
votes2
answers250
views -
1
votes1
answer1283
viewsQ: Sum of Nodejs + Mongoose values
I need to sum the values stored in a variable in the bank. I have a form and want to know the total value generated in a variable. So I did it this way: _.each(cliente.data, function (data) {…
-
4
votes1
answer74
viewsQ: JS function does not perform calculation
I created a form that is added to the page through a button. I used JS to create the form to be added. The problem is that I have two fields one of value and the other of hours, to account for the…
-
1
votes2
answers1001
views -
1
votes0
answers51
viewsQ: Virgin-Acl nodejs
I need to create access permissions on my page, but I have no idea where to start. I installed the virgin-acl. I have for example the page below and I want a user example just view:…
-
2
votes1
answer329
viewsQ: Find in Bank Mongoose by Nodejs
I’m trying to access the Mongoose bank, doing a find on the nodejs. In Mongoose, I have the following data: Client:{ name: {type: String, trim: true, required: false, default: ""}, address:{…
-
1
votes2
answers1445
viewsQ: Check if select field has changed
I would like to create a js function, to check if a select field of my form has been changed. I created the function below to check if an input has been changed and works, but it does not work to…
-
0
votes0
answers101
viewsQ: Load form with disabled fields by clicking button
I would like to make a function in js, that when clicking on a display button, when directing to the page, load my form with all my fields disabled, so that the user can not change anything. How can…
-
3
votes2
answers896
viewsQ: Block Save Repeated Data
As I check in the controller, if there is already an email registered in the bank Mongoose and so, lock save it again?
-
2
votes1
answer44
viewsQ: Generate Json x Search in mongodb
I’m generating a Json. But I have the following situation: I have a record of contacts who may belong to the same company. I mean, I can have two people registered in a single company. How do I load…
-
0
votes1
answer63
viewsQ: Search comparing id of two Collections
I need to load the data by joining two id On a form I fill out my client with an ID. In another form I fill out other information and upload the customer ID. That is, both forms, send the same ID to…
-
0
votes1
answer1375
viewsQ: Last entry
I need to know how to get the last record stored in Mongo. I’m doing a search, comparing two IDS, need only return the last record. I have the following variables:: client.name client.cpf…
-
1
votes0
answers85
viewsQ: Print html page without losing settings
I wonder how do I print through a JS function, all the information contained within a <div>. However you would have to print only what contains in div, without losing colors and formatting.…
-
1
votes1
answer366
viewsQ: export json file
I’m using nodejs, Mongoose. No controllers at the end give a res.json(clientes); and on my route I create: app.get('/clientesjson/:id', isLoggedIn, cliente.clientesjson); I need to access my Json…
-
2
votes2
answers1001
views -
1
votes1
answer598
viewsA: Add json event url in fullcalendar
solved: Obs: it is necessary to download js Qtip to add pop-up with events. script(type='text/javascript').$(document).ready(function() { $('.calendar').fullCalendar({ header: { right: 'prev,next…
-
0
votes1
answer598
viewsQ: Add json event url in fullcalendar
I’m using fullcalendar, nodejs and Mongoose. I’ve already managed to generate the json file. But when passing the path in the js of fullcalendar, I cannot recover the events. I created a json test…
-
0
votes0
answers79
viewsQ: error installing Mongoose in win server 2008 R2
The error below appears when installing Mongoose on the op. server 2008r2 system All applications are installed correctly. but the database does not seem to compile. c:\program…