S3 NodeJS -ListObjects always returns 0 - node.js

The code for this question is already here:
Does writing to S3(aws-sdk nodeJS) conflict with listing objects in a bucket?
Please be sympathetic, I've been on this problem for days and I'm a complete rookie. I am trying to poll for a list of objects(haveFilesBeenWrittenToBucket method) and then read the file when there are objects (readFile method). If I place a breakpont on the callback(items) in the haveFilesBeenWrittenToBucket, everything works fine. If I don't, I always get 'number of items 0' written out to the console. It is not predictable exactly when the stuff will be written to S3, but it should be within a minute. There appears to be a race condition, and I would be very grateful if anyone could help me out here. I'm desperate for ideas. Thanks so much.
P.S. I was advised to make this a separate question to the one asked in the link.

In the end, I was barking up the wrong tree- my error had nothing to do with node.

Related

translate detect API is giving timeout

need some help here please...over the last 1-2 weeks, I've been getting regular delays in my translations. (It's been working correctly for months, without timeouts) I'm getting:
FetchError: network timeout at: https://translation.googleapis.com/language/translate/v2/detect
I'm using node.js framework, and I see several of these per day now, each day.
(please note, I am not seeing any errors on "translate", but just on the "detect")
any help possible?
ok so after looking long and hard, and nobody answering...I decided that I would try something else. I went to the v3 interface, which allows for detection and translation in the same call, and I avoided the detect interface of v2. This looks like it is working, as the delays I faced from detect call ( and not translate ) are gone now. Hope someone else can benefit.

Excel SUMPRODUCT and ROW Function Error

I keep getting a #NAME? error with this function:
=1/A5*SUMPRODUCT((IF(FLOOR((GCD(A5,B4)/ROW(1:24)),1)=GCD(A5,B4)/ROW(1:24),1,0)*EulerPhi(ROW(1:24))*COMBIN(A5/ROW(1:24),B4/ROW(1:24))))
(EulerPhi is a user defined function that does Euler's Totient function)
Does anyone know what could be causing this? Or is there a better way to sum up this from i=1-24 such that
=1/A5*SUMPRODUCT((IF(FLOOR((GCD(A5,B4)/i),1)=GCD(A5,B4)/i,1,0)*EulerPhi(i)*COMBIN(A5/i,B4/i)))
Thanks for your help!
The correct answer to your question "what could be causing this" is: lack of troubleshooting.
Asking why a formula isn't working, without sharing the data that it's looking at, or the code for custom functions, is like if I were to call you and say "what color is that thing?" ... You'd have no idea what I was asking (even though you know what colors are).
Troubleshooting
Your question's title indicates that the problem is [SUMPRODUCT] or [ROW]. I can only assume those terms were randomly chosen since:
you didn't indicate why you suspect those functions specifically
explanation as to why those are any more of an issue than others in the formula like [ROW], [COMBIN] or even custom function [EulerPhi]
you haven't checked back to answer questions about your post since a few minutes after posting.
Troubleshooting Steps
The five-step troubleshooting process consists of the following:
((More detail from the [source])(https://www.myodesie.com/wiki/index/returnEntry/id/2956#Troubleshooting%20Steps))
Verify that a problem actually exists.
Isolate the cause of the problem.
Correct the cause of the problem.
Verify that the problem has been corrected.
Follow up to prevent future problems.
You stopped at Step 1. Even if the next step was:
Post the problematic line as a question on Stack Overflow.
. . . you still couldn't expect a reliable solution since nobody else has the information required for steps 2,3 & 4. (Also, this isn't SO's purpose. Please see the tour.)
Isolating the Problem
Normally, I wouldn't have spent this much time on an "unattended" Question, missing information required to solve the problem, but I'm documenting my troubleshooting steps and this works as a partial an example.
For the sake of illustration I've broken this down into all 25 formula sections. (15 without repeats). Obviously it's not necessary to go this extent, when checking such a simple formula.
(Download a copy of the worksheet here.)
Thus, I can't know for sure where the problem lies without knowing:
- the value of A5
- the value of B5
- the contents of ROW(1:24)
- the code behind custom function EulerPhi
. . . but I can almost guarantee it comes down to:
1. The custom function EulerPhi, and
2. Unintended effects of referring to range ROW(1:24).
You can confirm my theory by checking if this formula calculates properly:
=EulerPhi(ROW(1:24))
If that happens to be working as it should, then copy-and-paste the following 15 forumlas to a blank area of the same worksheet where the data is. Your problem lies with the errors you get:
=1/A5*SUMPRODUCT((IF(FLOOR((GCD(A5,B4)/ROW(1:24)),1)=GCD(A5,B4)/ROW(1:24),1,0)*EulerPhi(ROW(1:24))*COMBIN(A5/ROW(1:24),B4/ROW(1:24))))
=A5*SUMPRODUCT((IF(FLOOR((GCD(A5,B4)/ROW(1:24)),1)=GCD(A5,B4)/ROW(1:24),1,0)*EulerPhi(ROW(1:24))*COMBIN(A5/ROW(1:24),B4/ROW(1:24))))
=SUMPRODUCT((IF(FLOOR((GCD(A5,B4)/ROW(1:24)),1)=GCD(A5,B4)/ROW(1:24),1,0)*EulerPhi(ROW(1:24))*COMBIN(A5/ROW(1:24),B4/ROW(1:24))))
=(IF(FLOOR((GCD(A5,B4)/ROW(1:24)),1)=GCD(A5,B4)/ROW(1:24),1,0)*EulerPhi(ROW(1:24))*COMBIN(A5/ROW(1:24),B4/ROW(1:24)))
=IF(FLOOR((GCD(A5,B4)/ROW(1:24)),1)=GCD(A5,B4)/ROW(1:24),1,0)*EulerPhi(ROW(1:24))*COMBIN(A5/ROW(1:24),B4/ROW(1:24))
=IF(FLOOR((GCD(A5,B4)/ROW(1:24)),1)=GCD(A5,B4)/ROW(1:24),1,0)
=FLOOR((GCD(A5,B4)/ROW(1:24)),1)
=GCD(A5,B4)/ROW(1:24)
=GCD(A5,B4)
=EulerPhi(ROW(1:24))
=COMBIN(A5/ROW(1:24),B4/ROW(1:24))
=A5
=B4/ROW(1:24)
=B4
=ROW(1:24)
(The formulas were just copies from the image, with duplicates removed.)
By this point, you will have either solved the problem, or at least, have a specific question to ask. Please, read tips on what example information needs to be included here: How to create a Minimal, Complete, and Verifiable example.
Proper troubleshooting methods seem time consuming but the elimination process gets quicker with practice, and will save a lot of time and frustration (for yourself and others) in the long run.

How do I find all the streams from a live IHeartRadio station?

I'm trying to find the entire stream list from a live IHeartRadio station (all streams available), and I've seen this answer, but they've since changed it, and now window.__store is null. Is there another way to find streams? I've looked around, and the only stuff I can find on IHeart seems to be this module, which does not seem to work for me. I've been at this for a good 3-4 hours, and have given up and gone last resort to come here. Also, I've seen methods where people use mitmproxy to inspect the traffic, but I need the icecast stream, specifically, which I cannot find at all.
It seems that, while window.__store is now being set to null, if you pause the website while it's loading using the developer console, you can search for streams and they will show up. You can also do this using Postman.
I've now actually published a module that fixes this exact issue. It uses the Public IHeartRadio API to search and get streams. It can be found here.

Trying to interpret a VMF file

I read a question about a similar topic on stackoverflow and I have part of the solution to my problem, let me explain what the problem is;
I need to know each and every block's position, and on the question that I read the questioner mentioned that the 3 vectors for "plane" are the determinants of the position, but I read the 1 answer that was there, and also checked the webpage the questioner provided and I couldn't understand it fully, could anyone please simplify it for me, this is holding me back from parsing VMF files.

SharePoint 2010 slow search

I know this isn't a coding question but i wanted to throw it out there as the wealth of experience in the forum is high.
When we perform a search for the first time it's slow and it is fine after this.
Anyone got any ideas about why this is?
I think it's something to do with the cache being cleared out and was wondering if anyone could shed some light on how to get around this?
Thanks
More than likely caused by the first "hit", the server is doing a lot of background processing. This would be the same as a webpage or database query. The initial execution may be the slowest due to the volume of work it has to initially process, afterwards the data is cached.

Resources