Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Looks like pretty basic linked list manipulation. If you understand how linked lists work you should be able to step through the code with a little elbow grease. If you don't understand linked lists then you'll have to do some reading first.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Welcome to Daniweb. Tell us a little about yourself.

enock_1 commented: why +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Just a thought - have you ever considered googling "how to license a vehicle in Canada"? Near the top is a link to this guide.

If, instead, you are referring to getting a driver's licence, then you should have been clearer with your question.

rproffitt commented: Thanks Jim. For BC our vehicle registration (license?) was also done at ICBC. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Creators would have initial control to get it off the ground but would give up 100% once/if it did.

If I read this correctly, you are saying that the people who actually do the work will eventually have zero ownership? Isn't that the opposite of

I envision a Reddit that is owned by its mods and users.

stratozyck commented: Best hope for employees would be salaried from a non profit. Most likely would get whatever I pay and nothing else. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The letter "r" identifies the string as a raw string. This allows entering a path & file name with single backslashes instead of having to escape them (double backslashes).

Try using

pd.read_csv
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

For starters, because you hard coded that part of the print statement, no matter what input you give it you will always print out 17 and 3.

rproffitt commented: Seems like what they claim voting machine coders would write? +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I presume you want to toggle. In that case just check the current image and toggle to the other one. If you want to cycle through more you can use the same technique, just with more images in the cycle. I don't recall the property name, but each control has a user property which is unused by anything else and can be used to store a value indicating the current image number or name.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

One last comment - you might want to have a look at a program called spinrite in case there are files you haven't backed up. It could possibly aid in recovery.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Also, when you have multiple exclusive contions you should be using elif as in

if condition-1:
    do stuff
elif condition-2:
    do stuff:
elif condition-3:
    do stuff
archiejude04 commented: ahh ok many thanks, just tried this and it works, as for the curly brackets im new to this website so i changed all square brackets to the others +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'm not familiar with the pygame module but I do have a question and an unrelated suggestion. I see that you are using dictionaries where it appears you should be using lists. Unless there is something I am missing I suggest you replace all of your curly brackets with square brackets or you will get nothing but syntax errors.

As for the pause, I suggest you replace pause/continue keys with just a pause toggle on 'p'. Your problem appears to be that when you hit pause you stop processing events. Try the following to fix.

while True:
    for event in pygame.event.get():
        screen.fill((175,215,70))
        main_game.draw_elements()
        pygame.display.update()
        clock.tick(60)
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
        if event.type == pygame.KEYUP:
            if event.key == pygame.K_p:
                paused = not paused

        if paused:
            continue
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It's too late this time, but I suggest that when you rebuild your system you partition your drive as C and D where C is your OS and applications, and D is all your user files (you can move special folders like My Documents, etc to D). Then install the free version of Macrium Reflect to C. Create recovery media from within Macrium and make sure to create a boot image and a boot USB.

I presume you are doing backups to removeable media. If not then shame on you.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

whatever graphics system you choose is likely to be highly specific to your choice of platform

Not necessarily. If they use wxWidgets for the graphics, the code should be easily ported to other platforms.

rproffitt commented: That looks to be C++. The tag when I wrote my reply was "C". +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Can't offer any suggestions unless we see the code.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Do you have a USB that you can boot from to check your hard drive? Linux Live or Macrium Reflect for example?

fx.eko commented: my hard drive is the same hard drive not from another computer, but this computer is a computer that has been turned on continuously for a year withou +2
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I recall from an incident a few years back that Windows uses drive IDs (serial numbers) when allocating drive letters. In my scenario we were taking daily drive images of our online servers, and applying them to backup (offline) servers so that in the event of a catastrophic failure we could bring the offline servers online.

Unfortunately, when we tested the system it kept on assigning different drive letters. The solution I came up with was to use hexprobe (a disk editing program) to modify the drive IDs on the offline system to have the same drive IDs as the online system. After I did that, the offline servers rebooted with the correct drive letters.

So, short answer - Windows DOES consider drive serial numbers.

rproffitt commented: My bet is Microsoft does not document this. +16
Mikey37 commented: I suspect that serial number is not from the hardware but rather assigned by Windows. +4
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

OK. Here it is.

drunk.jpg

Dani commented: Here is what, exactly? What am I looking at? +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

We have a lot of waste due to

  1. Politics
  2. Greed
  3. Incompetence

While I think there should be consequences for all three, I think the most severe should be reserved for 1 & 2. The first two are deliberate (like first degree murder), while the third is not (manslaughter). Intent matters.

rproffitt commented: I'll find a good article soon but Austria and a few other countries are moving to MANDATORY COVID vaccinations and fines. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It seems that competency is dead. Is that because appointees are chosen for their politics rather than their abilities? And in private industry the motivation is almost entirely greed. I understand the governor of California just passed legislation to prevent price gouging for Covid test kits. It used to be axiomatic in politics to "never let a crisis go to waste". Seems to be true in business as well. They used to shoot looters during a crisis. We need more harsh measures (not as harsh) to prevent economic looting during the pandemic.

On the bright side, I see Texas researchers have made their Covid vaccine patent-free. Pfizer and Moderna must be livid. Let the FUDding continue.

Truckers are protesting near the border in Manitoba. It seems they don't like the quarantine requirement for unvaccinated drivers (apparently most of them). I wonder how many of these truckers (who refused the vaccine because "I don't know what's in it") will happily take the new Pfizer five-day anti-viral regime after they get Covid?

jwenting commented: I'm not in favour of those price gouging laws, they're creeping price controls +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

For what it's worth, when I retired in 2008 and started writing code just for myself, I wrote everythig in vb.net. A few years ago I made the move to Python/wxPython and never looked back. I wanted to refactor/enhance one of my apps and I ended up just redoing it entirely in Python. It was faster, easier, smaller, and much easier to understand. It was also fun.

There's a saying, "just because it's old doesn't mean it's bad, and just because it's newer doesn't mean it's better." It does not apply here.

jwenting commented: indeed, vb6 wasn't much good even when new ;) +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Welcome.

A good place to start is to read the Daniweb Posting Rules and Suggestions For Posting Questions.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I can't recommend a free tutorial. That is something you will have to google. I learned from a book (sorry, not free) that I highly recommend. It is Beginning Python From Novice to Professional by Magnus Lie Hetland. The third edition came out in 2018 and, although it is not the absolute latest version of Python, it is the 3.x version which will be around 99% current. The differences will not matter to a beginner or intermediate programmer.

And of course you can always ask questions here. Please read Suggestions For Posting Questions.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I liked it before. I like it better now. What more is there to say?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Comfortable? Yes, especially with the recent improvements. It just seems snazzier. I would wish for more programming questions (intelligently asked) but that's beyond your ability to provide. I have no interest in endless posts about SEO, backlinks, etc. I think those topics have been beaten to death. I will add that one other site I pop into frequently is the wxPython forum. Although I'm doing less and less application stuff as I have written most of what I need for my own use so I'm frequenting that site less often.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Very nice.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The people who brought you the brave browser now have their own search engine

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Why don't you tell us a little more about what services you offer? That would help us narrow down what might be suitable names. Judging by what little you have told us, I gather you do out-patient surgery (duh). What specific areas do you specialize in. Oral surgery? Cosmetic surgery?

Again, at the risk of sounding silly, for all I know you specialize in coming to my place of business to do minor surgery. In other words (my) office surgery. It just seems to me that the word "Office" is redundant and could be replaced with something more descriptive.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'm more of a bungee-shopper. I get in, shop, then get out as quickly as possible.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

My suggestion is to install the free version of Macrium and take a complete image of your C partition. Also create bootable recovery media (a small USB memory stick) using the tools from within Macrium. Then you can reformat and re-install Windows. If you find that you are missing any files you can mount the Macrium image as a virtual drive and browse/recover any missing files. As a bonus, if the install goes horribly wrong you can always restore the old image after booting off the previously created recovery USB.

rproffitt commented: To which they always ask me "So I should have backups?" +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If nothing else has worked for you I suggest you download AutoRuns which is part of the free Sysinternals suite of tools. Fire it up and uncheck everything that references Teams.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I do not. From a security aspect, it has already shown to be vulnerable to hacking. From an environmental aspect, because of its vast energy requirements, it is an unmitigated disaster.

Over the last 50 years I have seen many technologies touted as "the future of...". Almost all were nothing more than hyperbole.

AndyKirr commented: Hmm, that's a good question +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Why are you asking for n then reading it into i? And why are you then just ignoring it in your loop control?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Show us what you have so far.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Show us what you have that doesn't work.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Welcome aboard.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I suspect what you want to do is sort a list of brands. In that case you have to start with a list like

brands = []

Then you can .append more brands to the list as entered. After you are done you can sort the list by

brands.sort()

This will sort brands in place. If you want to maintain the original list then you will have to make a copy and sort it. You can do it as follows (depending on your version of Python)

sorted = brands.copy()
sorted.sort()

or

(sorted := brands.copy()).sort()
Mina13 commented: it works thank you +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Is there a question?

rproffitt commented: I wonder why there's a green text Inline Code Example Here. It's as if someone didn't review their posting. +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If I could just chime in here, you might also consider type hints. As an example, here are two function declarations:

def MyFunc(parm1, parm2, parm3):

def MyFunc(parm1: int, parmn2: str, parm3: float) -> float:

Ignore for the moment that I chose non-descriptive parameter names, the second form indicates the types of the parameters, and the type of the returned value. While Python ignores type hints (you can pass any types for the parameters), other tools, such as mypy can run checks against your code using type hints for verification.

Even if Python ignores the hints, it is still a quick reminder when you are reading your code.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It is going to match Narrator: or narrator: because you are allowing the first letter to be either case. As for the NARRATOR: match, check to see if you have an ignorecase option that may be True by default. In Python you have to explicitly state IGNORECASE. This may not be so in other implementations.

Clao3620c commented: please a need the code for button next and back search the same string in txt file in vbnet 2013 thanks +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You aren't following protocol. The way it worked when I was a lad was:

  • first you steal my lunch money
  • then you tell me to do your homework
rproffitt commented: - then they steal your girl. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Number two is Dunning-Kreuger.

rproffitt commented: I'm bad at remembering these rules. +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Curious. Both this post and this post by user omar90 are tagged as "first post by omar90". They were posted 6 hours apart.

rproffitt commented: +1 🥇 +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What are the odds. Three minutes before I popped in, we started getting support spam. I whacked 4-5 but I expect they'll keep coming.

rproffitt commented: 🎃🎃🎃🎃🎃's +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Glad to see you. Feel free to ask questions, but please read Suggestions For Posting Questions before you ask.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

We won't do your homework for you, but if you have hit a snag, post what you have done so far and where you are are stuck and we'll see if we can help you through it.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Welcome to Daniweb.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Keep in mind that by remapping the arrow keys you will be over-riding their original functionality in all applications. It may be possible to test in AutoHotKey if the desktop (Explorer) has focus and restrict the new functionality so that other apps can still use the original behaviour.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

How about some context? Perhaps you could post a full, but stripped down example that we could try to run. Based on what little you posted I really have no idea what you are doing or what you are doing it with.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'v e been running Windows 11 in a virtual machine for some weeks now. I haven't seen anything that would

  1. Entice me to want to update
  2. Discourage me from updating

In other words, "meh". They changed the start menu.

Again.

At least this time it was not another "where thge hell is everything?" change.

rproffitt commented: Meh too! +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

As stated earlier, -> is indeed type hinting. For example, if you define a method that takes a string parameter and returns a boolean you can define it lie

def myFunc(name):

or

def myFunc(name:str) -> bool:

It is strictly for informational purposes.

rproffitt commented: Not going to lie, with Python I rarely check Python versions as at office and elsewhere we don't use old (Python) versions. +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That depends on how complex the code is and where you are having problems. I suggest you start a new thread and see what happens. We tend to offer help rather than solutions.