• Breaking News

    Thursday, June 10, 2021

    Has anyone tried to use Cypress unsuccessfully (and had to go back to using Selenium)? Ask Programming

    Has anyone tried to use Cypress unsuccessfully (and had to go back to using Selenium)? Ask Programming


    Has anyone tried to use Cypress unsuccessfully (and had to go back to using Selenium)?

    Posted: 10 Jun 2021 04:47 AM PDT

    Has any team tried to use Cypress to test an enterprise application (not toy projects), then encountered an issue and had to go back to Selenium? If so, what happened / what was the issue?

    Asking because our team is considering trying out Cypress but we are more familiar with Selenium, and Cypress is an unknown to us. We hope Cypress will have better performance and faster development time for new tests, but we don't want to try it out only to discover it does not meet our needs completely and have to go back to Selenium.

    Edit: Added reasons why we are considering Cypress.

    submitted by /u/PrognosticatorMortus
    [link] [comments]

    Are these instructions clear?

    Posted: 10 Jun 2021 03:39 AM PDT

    https://docs.google.com/document/d/13EuwcUY-vpS38FtWsWkgYdArJd8eH4YXC5gMdlBdjbM/edit?usp=drivesdk

    I made a document for a programmer that I'm thinking of hiring, and I was curious as to whether they were 100% clear.

    If these were your instructions would you have any additional questions or would you be ready to start working on it? It's for a project in Unity

    submitted by /u/Adjaar7
    [link] [comments]

    Why is cross-progression in video games so difficult?

    Posted: 10 Jun 2021 05:49 AM PDT

    I can see why crossplay would be nightmare. Different services and hardware have different requirements, and getting them to play seamlessly seems very difficult. But so many games are adding crossplay, but not cross-progression. Which makes it much less attractive for most people, and leaves no incentive to buy the game twice.

    It seems to me that any game that requires "logging in" would already be set up perfectly for cross-progression. Just link the account to a new device, and save to the same server. Like every website ever does.

    What am I missing? I really want to under stand this.

    submitted by /u/kaninepete
    [link] [comments]

    What are the most popular / easy to use libraries that can detect a preuploaded image within a photo?

    Posted: 10 Jun 2021 05:34 AM PDT

    I wanna try to make an app to detect an image and a text next to that image through a photo without relying on paid services like Vision AI

    submitted by /u/Swearjaws
    [link] [comments]

    Pregnancy announcement in .Net

    Posted: 10 Jun 2021 04:29 AM PDT

    People of the internet i need some help!

    I need a little bit of code written in .net syntax to announce my pregnancy.

    It doesn't need to be executable, just simple enough for someone to read over and understand the outcome.

    Thanks for the help!

    submitted by /u/l1ttle_0ne_95
    [link] [comments]

    Snapping Cubes into position | VR Game with JS & three.js

    Posted: 10 Jun 2021 03:42 AM PDT

    Hello Folks,

    I am programming a VR Game. You can place a cube inside another wall of cubes. I want to snap the cube magically into the cubewall-section, if its near enough.

    Because of rotation of the cube, Im clueless how to define whether cube is in the cubewall-section or not.

    I would be grateful, if someone has an idea or an example.

    submitted by /u/FiSHM4C
    [link] [comments]

    When implementing a B2B API, how do you cache the data?

    Posted: 10 Jun 2021 12:43 AM PDT

    Hello there,

    I work for a tourism agency and recently I've been asked to implement a B2B hotel provider with a nice API for availability, booking, search etc.

    As I'm reading through the API, the responses seem mostly static, not much changes so the data can be cached based on request parameters.

    How do you guys implement B2B APIs? I haven't done that in the past so I'm wondering what the best approach is. For instance, for searching, do you allow your clients to ping directly and get the most fresh data? I don't think that this is a good approach. There are API call limitations. But then I'm left only with the option to save the responses, but .. for how long? Hour? Two? A day? What if the data changes within the cache period? Do I build a queue to keep all cached requests up to date every X minutes? Not to mention that I hate how slow some of those B2B providers are. My website is blazing fast, I've tried really hard to be fast (response times below 100ms are a must no matter what) and when a client has to hit the B2B API ... add connection lag and slow response time because these guys are dealing with massive data, the responses fall into the "seconds to generate" category. So I will have to work with cached data, but how do I keep this data fresh? Do I even have to worry about it? Obviously I can't download the whole API data since clients search availability by dates and those dates vary. There's certainly data that I can absolutely "deep-freeze" like country/city codes and hell even hotel information because that's the type of data that doesn't change. But availability and search results have me on the edge.

    I don't know if I was clear in my question. Please let me know in the comments if what I just wrote is a bunch of mambo jambo and I'll try to get clearer. I'm pretty much asking for a strategy on how to approach the implementation.

    Is there a literature I can read about possible gotchas and best approaches? Like I said, I have experience but I've never done B2B for tourism.

    submitted by /u/ltsochev
    [link] [comments]

    How to not let the derived class object be converted into the base class object when putting the derived class object into a base class array in cpp?

    Posted: 10 Jun 2021 12:03 AM PDT

    fire, water, grass are derived class with the same new function void atk();

    fail way:

    can't call the derived class new function after being put into the bass class array

    #include<iostream> #include<string> using namespace std; class Pokemon{ private: string name,type,HP,ATK; public: Pokemon(){} Pokemon(string n,string t,string hp,string a):name(n),type(t),HP(hp),ATK(a){} void output() const{ cout<<name<<" Type:"<<type<<" HP:"<<HP<<" ATK:"<<ATK<<endl; } string getname() const{ return name; } string gettype() const{ return type; } string gethp() const{ return HP; } string getatk() const{ return ATK; } //void atk(const Pokemon& b) const{} }; class fire:public Pokemon{ public: fire():Pokemon(){} fire(string n,string t,string hp,string a):Pokemon(n,t,hp,a){} void atk(const Pokemon& b) const { double bhp=stod(b.gethp()); double ahp=stod(gethp()); while(bhp>0 && ahp>0){ cout<<getname()<<" atk >> "<<b.getname()<<endl; bhp-=stod(getatk()); if((gettype()=="fire"&&b.gettype()=="grass")|| (gettype()=="water"&&b.gettype()=="fire") || (gettype()=="grass"&&b.gettype()=="water") ){ bhp-=stod(getatk()); } cout<<"remain HP "<<bhp<<endl; cout<<b.getname()<<" atk >> "<<getname()<<endl; ahp-=stod(b.getatk()); if((gettype()=="water"&&b.gettype()=="grass")|| (gettype()=="grass"&&b.gettype()=="fire") || (gettype()=="fire"&&b.gettype()=="water") ){ ahp-=stod(b.getatk()); } cout<<"remain HP "<<ahp<<endl; } if(ahp<=0){ cout<<"dead\n"; } } }; class grass:public Pokemon{ public: grass():Pokemon(){} grass(string n,string t,string hp,string a):Pokemon(n,t,hp,a){} void atk(const Pokemon& b) const { double bhp=stod(b.gethp()); double ahp=stod(gethp()); while(bhp>0 && ahp>0){ cout<<getname()<<" atk >> "<<b.getname()<<endl; bhp-=stod(getatk()); if((gettype()=="fire"&&b.gettype()=="grass")|| (gettype()=="water"&&b.gettype()=="fire") || (gettype()=="grass"&&b.gettype()=="water") ){ bhp-=stod(getatk()); } cout<<"remain HP "<<bhp<<endl; cout<<b.getname()<<" atk >> "<<getname()<<endl; ahp-=stod(b.getatk()); if((gettype()=="water"&&b.gettype()=="grass")|| (gettype()=="grass"&&b.gettype()=="fire") || (gettype()=="fire"&&b.gettype()=="water") ){ ahp-=stod(b.getatk()); } cout<<"remain HP "<<ahp<<endl; } if(ahp<=0){ cout<<"dead\n"; } } }; class water:public Pokemon{ public: water():Pokemon(){} water(string n,string t,string hp,string a):Pokemon(n,t,hp,a){} void atk(const Pokemon& b) const { double bhp=stod(b.gethp()); double ahp=stod(gethp()); while(bhp>0 && ahp>0){ cout<<getname()<<" atk >> "<<b.getname()<<endl; bhp-=stod(getatk()); if((gettype()=="fire"&&b.gettype()=="grass")|| (gettype()=="water"&&b.gettype()=="fire") || (gettype()=="grass"&&b.gettype()=="water") ){ bhp-=stod(getatk()); } cout<<"remain HP "<<bhp<<endl; cout<<b.getname()<<" atk >> "<<getname()<<endl; ahp-=stod(b.getatk()); if((gettype()=="water"&&b.gettype()=="grass")|| (gettype()=="grass"&&b.gettype()=="fire") || (gettype()=="fire"&&b.gettype()=="water") ){ ahp-=stod(b.getatk()); } cout<<"remain HP "<<ahp<<endl; } if(ahp<=0){ cout<<"dead\n"; } } }; int main(){ Pokemon arr[9]; arr[0]=fire("Charmoander","fire","10","3"); arr[1]=fire("Charmelon","fire","20","7"); arr[2]=fire("Charizard","fire","40","15"); arr[0]=water("Squirtle","water","10","3"); arr[1]=water("Wartortle","water","20","7"); arr[2]=water("Blastoise","water","40","15"); arr[0]=grass("Bulbasaur","grass","10","3"); arr[1]=grass("Ivysaur","grass","20","7"); arr[2]=grass("Venusaur","grass","40","15"); for(int i=0;i<9;i++){ arr[i].output(); cout<<"Please enter two pokemons' number:"<<endl; int a,b; cin>>a>>b; arr[a].atk(arr[b]); return 0; } 

    dumb way:

    #include<iostream> #include<string> using namespace std; class Pokemon{ private: string name,type,HP,ATK; public: Pokemon(){} Pokemon(string n,string t,string hp,string a):name(n),type(t),HP(hp),ATK(a){} void output() const{ cout<<name<<" Type:"<<type<<" HP:"<<HP<<" ATK:"<<ATK<<endl; } string getname() const{ return name; } string gettype() const{ return type; } string gethp() const{ return HP; } string getatk() const{ return ATK; } void atk(const Pokemon& b) const{} }; class fire:public Pokemon{ public: fire():Pokemon(){} fire(string n,string t,string hp,string a):Pokemon(n,t,hp,a){} void atk(const Pokemon& b) const { double bhp=stod(b.gethp()); double ahp=stod(gethp()); while(bhp>0 && ahp>0){ cout<<getname()<<" atk >> "<<b.getname()<<endl; bhp-=stod(getatk()); if((gettype()=="fire"&&b.gettype()=="grass")|| (gettype()=="water"&&b.gettype()=="fire") || (gettype()=="grass"&&b.gettype()=="water") ){ bhp-=stod(getatk()); } cout<<"remain HP "<<bhp<<endl; cout<<b.getname()<<" atk >> "<<getname()<<endl; ahp-=stod(b.getatk()); if((gettype()=="water"&&b.gettype()=="grass")|| (gettype()=="grass"&&b.gettype()=="fire") || (gettype()=="fire"&&b.gettype()=="water") ){ ahp-=stod(b.getatk()); } cout<<"remain HP "<<ahp<<endl; } if(ahp<=0){ cout<<"dead\n"; } } }; class grass:public Pokemon{ public: grass():Pokemon(){} grass(string n,string t,string hp,string a):Pokemon(n,t,hp,a){} void atk(const Pokemon& b) const { double bhp=stod(b.gethp()); double ahp=stod(gethp()); while(bhp>0 && ahp>0){ cout<<getname()<<" atk >> "<<b.getname()<<endl; bhp-=stod(getatk()); if((gettype()=="fire"&&b.gettype()=="grass")|| (gettype()=="water"&&b.gettype()=="fire") || (gettype()=="grass"&&b.gettype()=="water") ){ bhp-=stod(getatk()); } cout<<"remain HP "<<bhp<<endl; cout<<b.getname()<<" atk >> "<<getname()<<endl; ahp-=stod(b.getatk()); if((gettype()=="water"&&b.gettype()=="grass")|| (gettype()=="grass"&&b.gettype()=="fire") || (gettype()=="fire"&&b.gettype()=="water") ){ ahp-=stod(b.getatk()); } cout<<"remain HP "<<ahp<<endl; } if(ahp<=0){ cout<<"dead\n"; } } }; class water:public Pokemon{ public: water():Pokemon(){} water(string n,string t,string hp,string a):Pokemon(n,t,hp,a){} void atk(const Pokemon& b) const { double bhp=stod(b.gethp()); double ahp=stod(gethp()); while(bhp>0 && ahp>0){ cout<<getname()<<" atk >> "<<b.getname()<<endl; bhp-=stod(getatk()); if((gettype()=="fire"&&b.gettype()=="grass")|| (gettype()=="water"&&b.gettype()=="fire") || (gettype()=="grass"&&b.gettype()=="water") ){ bhp-=stod(getatk()); } cout<<"remain HP "<<bhp<<endl; cout<<b.getname()<<" atk >> "<<getname()<<endl; ahp-=stod(b.getatk()); if((gettype()=="water"&&b.gettype()=="grass")|| (gettype()=="grass"&&b.gettype()=="fire") || (gettype()=="fire"&&b.gettype()=="water") ){ ahp-=stod(b.getatk()); } cout<<"remain HP "<<ahp<<endl; } if(ahp<=0){ cout<<"dead\n"; } } }; int main(){ fire farr[3]; water warr[3]; grass garr[3]; farr[0]=fire("Charmoander","fire","10","3"); farr[1]=fire("Charmelon","fire","20","7"); farr[2]=fire("Charizard","fire","40","15"); warr[0]=water("Squirtle","water","10","3"); warr[1]=water("Wartortle","water","20","7"); warr[2]=water("Blastoise","water","40","15"); garr[0]=grass("Bulbasaur","grass","10","3"); garr[1]=grass("Ivysaur","grass","20","7"); garr[2]=grass("Venusaur","grass","40","15"); for(int i=0;i<3;i++){ farr[i].output(); } for(int i=0;i<3;i++){ warr[i].output(); } for(int i=0;i<3;i++){ garr[i].output(); } cout<<"Please enter two pokemons' number:"<<endl; int a,b; cin>>a>>b; if((a>=0 && a<=2) && (b>=0 && b<=2)){ farr[a].atk(farr[b]); }else if(a>=0 && a<=2 && b>=3 && b<=5){ farr[a].atk(warr[b-3]); }else if(a>=0 && a<=2 && b>=6 && b<=8){ farr[a].atk(garr[b-6]); }else if(a>=3 && a<=5 && b>=0 && b<=2){ warr[a-3].atk(farr[b]); }else if(a>=3 && a<=5 && b>=3 && b<=5){ warr[a-3].atk(warr[b-3]); }else if(a>=3 && a<=5 && b>=6 && b<=8){ warr[a-3].atk(garr[b-6]); }else if(a>=6 && a<=8 && b>=0 && b<=2){ garr[a-6].atk(farr[b]); }else if(a>=6 && a<=8 && b>=3 && b<=5){ garr[a-6].atk(warr[b-3]); }else if(a>=6 && a<=8 && b>=6 && b<=8){ garr[a-6].atk(garr[b-6]); } return 0; } 
    submitted by /u/hwpcspr112
    [link] [comments]

    How do I extract legible code from an 8-bit .exe?

    Posted: 09 Jun 2021 10:03 PM PDT

    I am beyond amateur so please forgive me. I have an .exe file that seem to have files comprising it which when I look at and google, tell me it is 8-bit, however when I look at the embedded file description it says 'binary'. I want to be able to get this decoded and into python where I can play around with the program itself.

    I hope this is enough information for someone to offer me a solution

    submitted by /u/qrimzn
    [link] [comments]

    No comments:

    Post a Comment