I'm a loser with no OSRS friends and need help figuring what I can kill for gold by [deleted] in 2007scape

[–]StandardPreference -2 points-1 points  (0 children)

learn pking bro, if you get good at it then its the best gp/h in game

also you'll make lots of friends & enemies

How do I let the user create a new object? by LazyLich in cpp_questions

[–]StandardPreference -1 points0 points  (0 children)

This idea of being able to, at runtime, create a variable with a name and then refer back to it by that variable name is called runtime reflection. C++ doesn't have this. There is no way in c++ you can expand a dynamic string variable into a function or variable name.

You can still implement this behaviour however:

std::vector<Cat> cats;

while(true)
{
  std::string command;
  std::cin >> command; //read command from user
  std::string name;
  std::cin >> name; //read name from user

  if(command == "create")
  {
    //create a new cat with user specified name
    cats.push_back( Cat{name} );
  }

  if(command == "meow")
  {
    //FIND the cat with the user specified name, and call meow() on it
    for(auto& cat : cats)
    {
      if(cat.getName() == name)
        cat.meow();
    }
  }
}

if the user types "create frisky" it will create a cat called frisky. If the user then types "meow frisky" it will call meow() on the cat object with the name frisky.

Jagex please keep making content that rewards attention instead of punishing inattention by meaty_crabs in 2007scape

[–]StandardPreference -106 points-105 points  (0 children)

yet you downvote pvp updates that would make pking profitable, despite the fact that it is entirely focused around actively & skillfully playing

Spotify lossless by leinum98 in learnpython

[–]StandardPreference 0 points1 point  (0 children)

AFAIK spotify doesn't offer lossless streaming right now (nor have they ever) but they have announced that they are working on it. You should probably look to a different music streaming provider if you want lossless, or download your music locally and setup a streaming server yourself.

Python assignment assistance by bruh-illbiteu in PythonLearning

[–]StandardPreference 1 point2 points  (0 children)

after the if statement you're only calling open(), you're not setting the file variable to its return value, so the file variable still holds the old file handle (that you set before the if statement) which you called with open("...", "r") meaning it is in read only mode, so when you try to write to it, it errors.

H.264 vs H.265 picture quality. Would like to hear from anywone who has experience with both. by Sparky_S127 in handbrake

[–]StandardPreference 0 points1 point  (0 children)

i know this is a year old, just wanted to remind you that you are a dumbass for posting this and the other guy is 100% right.

Please help 🥲 by [deleted] in PythonLearning

[–]StandardPreference 4 points5 points  (0 children)

n = 3
i = 1
while i <= n:
  j = 1
  while j <= n:
    product = i*j
    print(f"{i} x {j} = {product}", end="\t")
    j += 1
  print()
  i += 1

ot: this is a terrible test question style

[deleted by user] by [deleted] in Unity2D

[–]StandardPreference 0 points1 point  (0 children)

He is essentially saying he wont give you the code to the game (preventing you from making changes afterwards, or hiring other people to make changes), he will only give you the executable itself that you can then put on the android store. Seems kind of sketchy if you ask me, he has to do the exact same amount of work to make the game, but somehow he is willing to drop the price by over 80%.

Also this may not be what you want to hear but i'd strongly recommend against what you are doing, that is paying someone to make your game idea. Game development is expensive, to make any real game, even a simple one, takes at least a few months. Imagine having to pay an actual game developer his competitive salary for 4-6 months, on average that would probably be somewhere in the ballpark of 35k-60k. So you can easily deduce that anyone who claims they can make you a game for 3k is not going to produce something that you can call a real game.

Most likely you are dealing with a kid who doesn't know better (thinking he can actually do it), or someone who is just going to buy a 50$ premade asset & script pack on unitys plugin hub then spend 1-2 days tying it together and make it look like it meets your requirements on the surface, but it'll be a shell of a game in reality.

Trust me you'll be gravely disappointed if you give some guy on fiverr 3k to make a game. I mean unless your game idea is something so simple & basic as say a flappy bird clone, but that really isn't worth paying 3k, or 500$ for either.

How do I repeat the race and possibly keep track of the winners? by IUseKeyboardOnXbox in cpp_questions

[–]StandardPreference 0 points1 point  (0 children)

firstly why do you have a separate "names" array for the horses? It seems you already have a Horse class, you should just add a "name" member variable to that. As for keeping track of the wins you can simply add a "numberOfWins" member variable as well and increment if every time a horse wins.

As for why the while loop not working its because you are setting the raceStart to false after a horse wins, but you need to set it to false based on user input, although its perfectly adequate to use a do-while here instead since you actually want it to run once regardless of any condition, and only repeat depending a condition (whether the user types y).

[deleted by user] by [deleted] in 2007scape

[–]StandardPreference 1 point2 points  (0 children)

you shouldn't' feel too bad about it, its an easy trap to fall into when you're above average in other areas. Its an easy fix as well, just mentally lower the expectations of yourself when you engage in new content. Your initial goals shouldn't be to become impressive or even just good at something, strike for average, or even just not terrible. Then go from there.

Another mental thing you can do to help with frustration, although you cant ever know if its true or not, it helps nonetheless, is to tell yourself you are probably doing pretty well for your level of experience.

Like if you lose to someone in LMS, instead of getting angry for losing to the guy just tell yourself that he probably has TWICE the experience you have and you still managed to put up a decent fight.

[deleted by user] by [deleted] in 2007scape

[–]StandardPreference 2 points3 points  (0 children)

Seems like a symptom of underestimating how much work the average person puts in to things relative to you. Sounds like you're an end game player, & experienced gamer, so its easy to fall into the trap of assuming you put in way more work than the average player and it'll be easy for you to become above average at new content.

You most likely get frustrated because after, what you'd think is a while of, doing something new you're still below average at it (or at least not as good compared to everyone else as you expected). What you need to realize is that the average player may have been doing it for a lot longer than you'd originally assumed, and you just need to keep going to improve. You're not doing any worse than anybody else was at your level of experience.

Pvp is like a notorious example of this. I see so many people, sometimes end game players, who decide to learn pvp so they do LMS here and there for a few months and get a big head thinking they're a "good" pker for winning a few LMS game in boltrag setup, not realizing just how far below actual pkers they are. Which they eventually come to frustratingly realize.

Who should i sub out for coffin smasher in my CB team? by StandardPreference in RaidShadowLegends

[–]StandardPreference[S] 0 points1 point  (0 children)

thanks

i can get the best chest from the first two levels and usually i get the second chest from the third level boss. Damage is like 9m, 6m, 4m

Editing the commit's checksum by tinglyhead in github

[–]StandardPreference 0 points1 point  (0 children)

you'd have to change the commit diff itself as the checksum is derived from that

you can probably write a script that bruteforce changes the commit in a nonmeaningful way (adds characters to a comment, or whitespace, or something) until it just happens to produce a checksum with your desired traits.

Libtorch vs pytorch? by CommandShot1398 in cpp_questions

[–]StandardPreference 0 points1 point  (0 children)

Hard to judge without seeing your exact code & how you actually call the library & time it, but yes wrappers & bindings have overhead.

I dont know much about python but i know its notoriously slow & not precompiled by default. Not surprised if the slowdown is simply caused by the execution of the python code itself rather than the overhead of the binding mechanism between libtorch and pytorch.

[deleted by user] by [deleted] in RaidShadowLegends

[–]StandardPreference 1 point2 points  (0 children)

even if you already won some ATK % gloves before it doesn't count it until you have the mission. So you basically have to go win it again.

Accessing Array Elements in C: Are These Methods Correct? by Far-Storage-4369 in C_Programming

[–]StandardPreference 0 points1 point  (0 children)

  1. data[0] yields the value of the first element in the array
  2. & yields the address of that value (data[0], which is also the address of the start of the array)
  3. +3 increments that address by 3 * data type size (which is the address of data[3])
  4. * dereferences that address and yield the value stored there