by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 02 06:16
    @ljharb banned @frank-dspeed
  • Apr 27 2018 01:23
    @MylesBorins banned @fjeddy
  • Feb 24 2016 08:26
    @rvagg banned @jonathanenbe
Anuj Tewari
@AnujTewari
sorry the code in confidential but will try some alternative way to provide it
Armando Padilla
@armandopadilla
kk
Anuj Tewari
@AnujTewari
It doesn't happen always but sometimes. We have a high rps coming to our app
Armando Padilla
@armandopadilla
right but a request somehow combining with another request? that has to be something in the code thats causing this. never seen it.
Anuj Tewari
@AnujTewari
from client logs I see two request coming to us but my app logger shows the merged request
the code is just a small part of capture where I see the issue
Hope this helps
@armandopadilla ^
Charles J Perry
@perryc85
Good Afternoon all, I am currently writing a script in Nodejs to download zip files from an aws S3 account. I can only get my code to read the contents of the folder I am pulling from. But, I need the code to actually download the file onto my machine, as well as extract the content. Any help would be great and much appreciated. Here is what I have so far codewise:
import * as aws from 'aws-sdk';

const accessKey = '~~******************~~';
const secretKey = '~~******************~~';

let s3 = new aws.S3({accessKeyId: accessKey, secretAccessKey: secretKey});
const s3Unzip = require("s3-unzip");

// construct getParam
var getParams = {
    Bucket: 'karsun-demo', 
    Key: 'zip1/original (1).zip' // replace file location with your s3 file location
}

//Fetch or read data from aws s3
s3.getObject(getParams, function (err, data) {

    if (err) {
        console.log(err);
    } else {
        console.log(data.Body.toString()); //this will log data to console
    }

})
Corey Lewis
@cursiv3
Hello everyone, I have a project (I'm not able to restructure it) where the lead decided to put a create-react-app nested inside another project; so root package.json and the react app dir has a package.json
we were running into all sorts of issues because the tests are running from the root dir, on the react stuff, and there's two installs of react, so I used npm link to use only the root react deps and put in a post install to setup the link but it feels hacky
anyone have any advice for or against using link like this?
Mahesh Kasodhan
@maheshmahi1319
CONNECTED_STRIPE_ACCOUNT_ID anyone help me how i connect two stripe account
Uzlopak
@Uzlopak
Hi, is irhydra still working for deoptimization analysis?
Rob
@borriej
hi guys :wave:
i've created a retrospective app for your scrum agile team!
it's live now
Salathiel Genèse
@SalathielGenese

@borriej - I like it... I will send it to our Scrum Master at Accenture

Thank you Rob

Rob
@borriej
@SalathielGenese thank you very much, great to hear!! :D
David Yashgur
@CodeHownd
hey i have an architecture question
anyone know where i can go for some guidance?
Charles J Perry
@perryc85
Hello all, I have a question regarding zip files. Can anyone tell me how I can take a zip file and extract all the contents into a directory on my local computer? Thanks
Anuj Tewari
@AnujTewari
@here what is the recommeded way to do something like tcpdump for a node app?
ishu mishra
@coderishu
Hi Folks,
i am trying to solve binary search problem so i got this code
function binarySearch(array,target,start,end){
     // If the target is less then the very last item then insert it at that item index
     // because anything index less then that has already been confirmed to be less then the target.
     // Otherwise insert it at that item index + 1
     // because any index grater then that has already been confirmed to be greater then the target
    if(start>end) return start;
    const midPoint=Math.floor((start+end)/2);
if(array[midPoint]==target) return midPoint;  
// search the left side
if(array[midPoint]>target) return binarySearch(array,target,start,midPoint-1);

// search the right side

if(array[midPoint]<target) return binarySearch(array,target,midPoint+1,end);
}
but i am not getting why its taken if(start>end) return start ??
Steins Gate
@satomitakashi_gitlab
Hi Node Community, I am having an issue where I tried to add a member as a collaborator to an npm package and the CLI shows that it successfully added the person. But when I type npm owner ls <package_name> I do not see that member as an owner
Piotrek98
@Piotrek98
I have one question, can i use Object.assign() to update field in database?
matrixpool
@matrixpool
Why can't the parent process receive messages from the child process?
console.log(parent process) shows that the message event processing function exists:
```
_events: [Object: null prototype] {
newListener: [Function: startListeningIfSignal],
removeListener: [Function: stopListeningIfSignal],
warning: [Function: onWarning],
SIGWINCH: [ [Function], [Function] ],
exit: [Function],
message: [Function],
SIGINT: [Function]
},
Francisco Robles Martín
@froblesmartin
Hello! Do you know what type of repository is the one where NodeJS are stored? https://nodejs.org/dist/
Indraraj
@indraraj26
anyone here who has worked with firebase admin to verifyToken at node js
mobile authentication is implemented at app side i just want to verify at node js and provide access to routes
Jordan Harband
@ljharb
@froblesmartin no type, it's just a folder full of files
Rob
@borriej
hi guys :wave:
im kinda stuck on a file download over my API
can someone explain this?

i have csv2json

where i do

        const csv = json2csv(
          filtered, {
            fields
          }
        );

res.send(csv)

and in my front-end i do

  dataToCsv(res: any): void {
    const newWindow = window.open();
    const blob = new Blob([res], { type: 'text/csv' });
    const url = window.URL.createObjectURL(blob);
    newWindow.location.href = url;

    this.popUpBlockerCheck(newWindow);
  }
this works :)
but...
how do i download an excel?
Im trying the same method for https://www.npmjs.com/package/json2xls
json2xls
but its not returning the correct type i guess
Rob
@borriej
do i need to create a blob?
or how do you download files over api? i cant just do res.download
Mayank Aggarwal
@Mayank0255

Hey guys,

Created a clone of stackoverflow on a MERN stack and recently I have documented it as well.
Will appreciate if you could take a look at it

https://github.com/Mayank0255/StackOverflowClone

Open to any kind of suggestions

Gautam
@gautam1858
Parallel-File-Sharing, github link https://github.com/gautam1858/Parallel-File-Sharing, please star if you find it interesting