Not authorized on test to execute command

Here is my code:

mongoose.connect(consts.database, {     useNewUrlParser: true,     useUnifiedTopology: true,     sslCA: consts.databaseCert, }); //... const user = await db.userModel.findOne({     username: usernameLowerCase }).exec(); 

Here is my DB connection string (anonymized):

mongodb://myUser:userPW@SG-staging-111.servers.mongodirector.com:27017,SG-staging-43334.servers.mongodirector.com:27017?replicaSet=RS-staging-0&ssl=true&authSource=stagingDB 

I’m getting this error:

MongoError: not authorized on test to execute command {     find: "users",     filter: {         username: "bob"     },     projection: {},     limit: 1,     singleBatch: true,     batchSize: 1,     returnKey: false,     showRecordId: false,     lsid: {         id: UUID("0a9400e3-83e3-429c-b8c9-92ade2ff210e")     },     $  clusterTime: {         clusterTime: Timestamp(1613200171, 1),         signature: {             hash: BinData(0, FED473B580D13E7E5073756DB5140981AADB2985),             keyId: 6928615819992774977         }     },     $  db: "test" }  

DB user’s info:

myUser  [{"role":"readWrite","db":"stagingDB"}] 

I have no clue why I am getting this error not authorized on test to execute command, and in the return string $ db: "test" I don’t even have a database named test. What could I be doing wrong? I just recently added this new user myUser, but now I’m getting this error. Does this error mean that the user is not authorized to "test" commands? Or, does it mean that I am trying to (somehow) connect with a DB named "test"?

New more extensive reliability test for proxy

Hi @Sven, I am placing this discussion in the SER category but it could also be for Gsa Proxy Scraper.
I thinking about this for several days. Every time I test (public) proxies with Bing tests and use them in SER, 90% burns in a few minutes.
They are not that they get banned by the search engine because I do not use them to scrape, the listings are imported.
I know our IP can be banned by proxies after a few uses but in my opinion it is not that, 90% is too much.
I think we should add another test, a test that tests the sending and receiving of data for each proxy.
For the downlnoad, downloading a photo for example would suffice but for the upload? Something must be found.
I also appeal to all members who read this post. What could we use heavily enough to do an upload/download test?
I’m thinking for example is file sharing sites for example … Of course, the test could also be done for download right after.
Of course, an anonymity test to be carried out before or after is mandatory :

https://www.google.com/search?ei=_Z4JYMDoFeWq1fAPhPu2iAw&q=upload+file&oq=upload+file&gs_lcp=CgZwc3ktYWIQAzIECAAQQzIECAAQQzIECAAQQzICCAAyAggAMgIIADICCAAyAggAMgIIADICCAA6BAguEEM6BQgAELEDOggIABCxAxCDAToLCAAQsQMQxwEQowI6CAguELEDEIMBOgcIABCxAxBDOgUILhCxA1DNEFjEIGD1ImgAcAF4AIABa4gBtgaSAQQxMC4xmAEAoAEBqgEHZ3dzLXdpesABAQ&sclient=psy-ab&ved=0ahUKEwiA2_XxrK3uAhVlVRUIHYS9DcEQ4dUDCA0&uact=5&safe=images

A proxy whose upload and download have been tested beforehand would be much less inclined to burn under load.

Does anyone want to test my game?

Dear Game Devolepment Conumity I am a 14 year old game developer and have developed a game called Super shadow cube myself. My game is a 3D parcour game where you have to jump on invisible objects with a cube to reach the goal. Every invisible floating platform, staircase or random object leaves a perspective shadow.my game is a 3d parcour game in which you have to jump with a cube onto invisible objects to reach the destination. Each invisible floating platform, stairs or random object leaves a perspective shadow If someone wants to test my game and could write a short feedback I would be very happy. link:

https://play.google.com/store/apps/details?id=com.Lomusire.SuperShadowCube

Screenshot

Same query has different execution plans in Prod vs Test

I have a query that runs in Prod every 30 minutes. Up until yesterday it runs in seconds. Suddenly it’s taking 7 minutes.

I copied the table to Test, created the indexes & gathered statistics. It runs in seconds.

In Prod, even after rebuilding indexes and updating statistics on the table with fullscan, it’s still not performing any better. The actual execution plan in prod looks very different to test and is showing actual reads on one part of the query to be 400 million rows (there are only 1.5 million in the table).

I ran it in test with no indexes (~5 seconds) and then with indexes and all run sub-second.

In Prod, I’ve dropped the Primary Key / Clustered index, updated the statistics (update statistics interface.statsload) and rebuilt it and still it takes 8-10 minutes to run.

Also tried dropping the PK and running it again. Actual Plan shows a very thick pipe in one step with about 9 million actual rows on a full scan. When I do a select Count(*) on the table, it only shows 1.5M rows. Why is that ? I’m sure that’s feeding into it somehow.

I’m baffled. Any pointers on where I could start to look for a root cause here maybe ? I can post more info (plans, table columns, indexes) if needed.

SFML test app feels slow/clunky

Similar to this question https://stackoverflow.com/questions/33904998/sfml-extremly-slow-irregular-framerate, I have created a small program to experiment with SFML

I have a very simple SFML test application on ubuntu 20.04 using SFML 2.5.1. There are three circles. One under user control and one bouncing left to right.

Problems:

  • The one moving left to right is not very fast.
  • Even so the one under user control cannot keep up with it.
  • I am using a delta of 1 (pixel per frame?). If I increase this motion is jumpy rather than smooth.

Put simply it feels clunky. So I am assuming I’ve made a noob error of some kind. However, this seems to be the same basic SFML game loop commonly used. How can I make this fast and slick feeling instead?

#include <SFML/Graphics.hpp>  int main() {     sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");     const float FPS = 120.0f; //The desired FPS. (The number of updates each second).     bool redraw = true;      //Do I redraw everything on the screen?     window.setFramerateLimit(FPS);     sf::CircleShape shape2(100.f);     sf::CircleShape shape(10.f);     sf::Clock clock;     shape2.setFillColor(sf::Color::Green);     shape.setFillColor(sf::Color::Red);      sf::CircleShape alien(10.f);     alien.setFillColor(sf::Color::Yellow);     auto alienSpeed = 1.f;         while (window.isOpen())     {         sf::Event event;         float xDelta = 0;         float yDelta = 0;         bool moved = false;         if (window.pollEvent(event))         {            if (event.type == sf::Event::Closed)            {               window.close();            }            if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left))             {                xDelta -= 1.f;                moved = true;             }             else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Right))             {                xDelta += 1.f;                moved = true;             }             if (sf::Keyboard::isKeyPressed(sf::Keyboard::Up))             {                yDelta -= 1.f;                moved = true;             }             else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Down))             {                yDelta += 1.f;                moved = true;             }         }          if (xDelta !=0 || yDelta != 0)         {            shape.move(xDelta,yDelta);         }          alien.move(alienSpeed, 0.f);         if (alien.getPosition().x >= 190)         {            alienSpeed = -1.f;         }         else if (alien.getPosition().x <= 0)         {            alienSpeed = 1.f;         }          if(redraw)         {            window.clear();            window.draw(shape2);            window.draw(shape);            window.draw(alien);            window.display();         }     }      return 0; } 

Note: cross posted to https://en.sfml-dev.org/forums/index.php?topic=27617.0

Test two LTL expression trees for equivalence

Is there an algorithm on how to check if two LTL expressions (represented as binary trees) are semantically equivalent? Since there are many smaller equivalences such as $ a\Rightarrow b \equiv \neg a \vee b$ or $ F(a) \equiv true U a$ as well as commutativity, distributivity, etc. that need to be considered.
My initial idea was to create the truth table for both expressions and compare them. But then the temporal operators would not be taken into account. Creating and comparing the automaton for each expression sounds like it would be rather inefficient.

Is there a better way to do this?

CEO wants to terminate fifty developers (three developers each month with the interval of ten days) based on the lowest test scores

XYZ Soft is facing a big loss in the industry. Therefore, the company has started to offload its software developers. It started to conduct a test of hundred developers on daily basis and store their test scores in a data structure. After ten days, its CEO wants to terminate fifty developers (three developers each month with the interval of ten days) based on the lowest test scores.

Suppose you are working as a most senior developer in the company then which of the following data structure you will recommend to the CEO in the above given scenario.

  1. 1.  AVL Tree 
  2. 2.  Heap 

Justify your answer with solid reason.