To generate dynamic PDF files, I’m using PDFKit. The generation works fine, but I’m having trouble displaying arabic characters, even after installing an arabic font. Also, Arabic text is generated correctly, but I believe the word order is incorrect. As an example, I’m currently using pdfki…
Tag: node.js
Send an audio buffer to the client to download without storing in the server
I’m creating a text-to-speech service with the help of IBM Watson API. Using the following code segment I was able to download the converted .wav file to my server. But I do not want to store audio files whenever a text has been converted. How can I send the buffer directly to the users to download? Ans…
Excel PERCENTRANK.INC in Javascript
Is there an exact way to clone the PERCENTRANK.INC function of Excel in Javascript ? I wrote my own and also tried to use the following libraries – the results don’t always match. https://github.com/formulajs/formulajs https://github.com/malcolmvr/percentile-rank FormulaJS comes close to ExcelR…
change only one field of entire array of embedded document in mongoose
i have a list schema and a question set schema. the quetsionSet schema is embedded inside the list schema. its working fine but how can i update anything inside the array of embedded document i.e. here i want to change the listname of all the documents inside questionSet (array of questionSet documents). here…
update two layer nested object based on the id
I have this structure in my Mother Model (this is a fixed structure and I just push cards or update them on these 3 array levels): The Objects inside cards.advanced array above are like: Assuming I have access to Mother model like this: How can we update a card object based on its id and the level it belongs …
Receiving ERROR #98123 after gatsby develop
I’m receiving this error after I run gatsby develop. I have tried following the steps from gatsby.com Not sure the reason for this error. I have tried gatsby clean, removing files that were giving errors, and utilizing google. I have posted on GitHub and discord, but have not received any updates yet. A…
TypeError: Cannot read property ‘0’ of undefined in post method in nodejs
I am new to nodejs and mongodb. I am trying to create simple to-do app with nodejs and mongodb. I have added the task in database. Now in post method, I am using insertOne method of mongodb and in res.json I am having the following error. res.json(info.ops[0].data) TypeError: Cannot read property ‘0R…
Is there a .contains method in javascript that works similar to Python’s implimentation .__contains__()? – node.js
I’m wondering if there is any implimentation of a object.contains method in javascript that works similar to how the Python version object.__contains__() works, as in I want to be able to scan the whole object with nested objects to see if there is either a key or a value that does contain what the meth…
How to send a message to a Channel on all Servers
I would like to send a message to all channels that are in all servers that are called “labycheck-shop” at 12 midnight. I have already tried this but it did not work: Answer This feature can turn out to be spammy on the Discord API, so you might want to keep that in mind I believe that you might b…
Send message to specific channel (command on module.exports)
So I don’t wanna make a mess out of my Main.js so I try to make every possible command through module.exports in other documents.js Basically I need that if I send a command, the bot will delete my message and post a comment+embed on a specific channel. This is what I have (making it simple): I’ve…