-
Replied To a Post in Are you coding from home during this pandemic?
The same? When we left Winnipeg at the end of May Manitoba was down to 4 active cases. Now we are at 235. Almost makes me want to stay at … -
Replied To a Post in Need quick regex help with matching the same word twice
the back reference is done with `\#` where you indicate (1-9) the desired group. You create the pattern for what you want to match by enclosing it in parentheses. In … -
Replied To a Post in Need quick regex help with matching the same word twice
Phew! -
Replied To a Post in Need quick regex help with matching the same word twice
OK. Try this (\$[a-zA-Z_][a-zA-Z_0-9]*)(?=.*\1[^a-zA-Z_0-9]) (\$[a-zA-Z_][a-zA-Z_0-9]*) a php variable (grouped) (?=.*\1[^a-zA-Z_0-9]) a look-ahead expression The second part says "look ahead for the matched php variable as long as it isn't part … -
Replied To a Post in Need quick regex help with matching the same word twice
If you are scanning your code with a python script you could use (\$[a-zA-Z_][a-zA-Z_0-9]*) to match all of the php variables in a line, extract them into a dict and … -
Replied To a Post in Need quick regex help with matching the same word twice
This expression will find all of the php variables in a line (\$[a-zA-Z_][a-zA-Z_0-9]*) \$ The initial literal $ [a-zA-Z_] A lower/upper case letter or underscore [a-zA-Z_0-9]* 0 or more lower/upper … -
Replied To a Post in Need quick regex help with matching the same word twice
I posted a suggestion but after I got the exact definition of a php variable and fired up my regexptester it didn't pan out. I'll play with it and hopefully … -
Replied To a Post in Searching files for a file format
You might try [Everything Indexer](https://www.voidtools.com/support/everything/) by VoidTools. It's free and awesome. -
Replied To a Post in Memorable Quotations
“One may protest against evil; it can be exposed and, if need be, prevented by use of force. Evil always carries within itself the germ of its own subversion in … -
Replied To a Post in convert cpp code to python
A good first step would be to tell us what the code is supposed to do. A good second step would be to tell us how familiar you are with … -
Replied To a Post in How to fill the null values in python with the below condition?
In your example for record 3 you want (1550+1540+1542) // 3, but what would you do if record 4 was also NULL? Assuming no consecutive NULLS you can do import … -
Replied To a Post in Downtime today :(
I'm on a Rogers Rocket Hub. It connects to the local cell tower. I pay a base rate for 3 gig and extra if I go over. My usage at … -
Replied To a Post in Downtime today :(
PS I hope you are still safe and healthy. -
Replied To a Post in Downtime today :(
Not a problem for me. My problem is that everyone seems to assume we all have unlimited usage so the sites I go to regularly (weather, covid-19 updates, etc) like … -
Replied To a Post in Iterate over a list of tuple.
Here's a hint. You will be using the modulus operator (`%`) as well as integer divide (`//`). The general solution will not require loops or if statements. -
Replied To a Post in Iterate over a list of tuple.
What have you tried so far? What you have to keep in mind is that if the number of months you are subtracting is greater than the number of months … -
Replied To a Post in Check Python Interpreter Version
Not familiar with java but your thread title says python so at the command line just type `python` and the version will be displayed before the prompt. I'm curious as … -
Replied To a Post in How have you been keeping busy during COVID19?
Manitoba is down to 16 active cases so things are loosening up. And the Thunder Bay area has only 2 active cases, so we packed up and headed to our … -
Gave Reputation to amazingadmin in Python question.
You can refer to the programs offered by this website. [rawpython](https://rawpython.com/) -
Replied To a Post in Covid-19 Virus and N95
>Yes, they did publish a new one. Doh! I just noticed that the dates were out of order. Still blurry though. -
Edited How to Start My Own Hosting Company and Domain Register
Hey guys… Does anyone know the cheapest yet the best way to start offering hosting on one of my websites. I also want to start allowing people to register domains … -
Replied To a Post in Covid-19 Virus and N95
On a related note (not intended to derail this thread), a while back the US government gutted consumer protection laws. It used to be that financial planners were legally required … -
Replied To a Post in Covid-19 Virus and N95
>Do you really believe that a one-time cure for HIV does exist, but instead they are selling something that just keeps AIDS at bay? Just curious :) I'm not saying … -
Replied To a Post in Covid-19 Virus and N95
Just a thought... A number of big-pharma companies are currently working on a vaccine. Knowing how much that industry values profits over all else, what do you suppose is their … -
Gave Reputation to rproffitt in hi,I'm trying write a AI calculator program on Python
@kmdecoration. A few things. 1. Avoid hijacking other folk's discussions. 2. Check your links to see if they work and looking closer it looks spammy. Don't do that either. As … -
Replied To a Post in hi,I'm trying write a AI calculator program on Python
I know what AI is, and I know what a calculator is. But I'm at a loss as to what an AI calculator is unless it's a voice actuated calculator … -
Replied To a Post in Covid-19 Virus and N95
As I recall, that image was from the beginning of the outbreak in the US when Faux News was screaming that since nobody there had died yet it was a … -
Replied To a Post in Covid-19 Virus and N95
That image is a tad blurry but I couldn't figure out what it was saying. Incidentally, Georgia has been caught three times fudging their data. And it seems Florida keeps … -
Replied To a Post in Covid-19 Virus and N95
In other breaking news, Georgia governor Kemp says that it is now safe to go to restaurants or get a haircut, but the risk of spreading Covid-19 is far too … -
Replied To a Post in Covid-19 Virus and N95
The entire media has been going bat-shit over Trump's claim that he is taking hydroxychloroquine. There is no proof that he actually is, and ample reasons to believe he isn't. … -
Replied To a Post in Covid-19 Virus and N95
For the record, the US ranks a poor 38th when it comes to testing. -
Replied To a Post in Covid-19 Virus and N95
Breaking news. Trump now says that having so many Covid-19 cases (and I suppose Covid-19 deaths) is a good thing because it means they are doing more testing. So... Winning? -
Replied To a Post in Hello everyone. My name is Igor..
Welcome to Daniweb. Quick movie reference - is it pronounced ee-gore, or eye-gore? Bonus points if you get the movie. -
Gave Reputation to rproffitt in C# Windows Form issue
You noted that this is in "c" and to get a mouse, graphics and connecting the mouse click on such will be highly dependent on the libraries and IDE used. … -
Revoked Solved Status for colliderect pygame
this is a small part of my code where i created the collision but the issue is that it still doesnt work i have used also the distance formula to … -
Replied To a Post in colliderect pygame
Glad I could help. -
Replied To a Post in How to set SSD (External/Usb) as Boot Drive?
If you are looking for a Windows bootable system that you can customize you can try [bart's PE builder](https://barts-pe-builder.en.softonic.com/). If you just want a bootable Windows PE system to access … -
Replied To a Post in colliderect pygame
>from Settings import * thats is what i was asking about to create a different file and import it in a different file. I've never gotten into the finer points … -
Replied To a Post in colliderect pygame
I don't understand. File, menu, and introduction are (up to) three distinct things. If you just want a text based introduction you could always put it in a python module … -
Replied To a Post in Hi everyone, I'm Yuanpeng
I am old. Welcome to Daniweb. -
Replied To a Post in colliderect pygame
>the code u showed me only calcualates distance but collision doesn't happen It returns True if the objects are closer than 27 units apart. I presume your object positions are … -
Replied To a Post in colliderect pygame
I'd add a print statment to see exactly what is happening. If you are using a debugger with breakpoints then also add one at the start of your `dead` function. … -
Edited How to develop games with Random Number Generator
First things first, it might be an excellent decision to start with basics and shed light on the essentials of random number generators (RNGs) and their capacities. For those interested … -
Replied To a Post in How to set SSD (External/Usb) as Boot Drive?
Google `bartpe windows 10` and check the results. There are several youtube videos on how to make a bootable Windows 10 PE USB. -
Replied To a Post in ENEMY SHOOTING NON STOP
Isn't that pretty much the same thing you asked [here](https://www.daniweb.com/programming/computer-science/threads/522725/shoot-and-kill-pygm)? Why start a new thread? -
Replied To a Post in INSERT INTO with LAST_INSERT_ID()
The difference is your brain is young and smart and mine is not as much ;-P I interpreted AUTO_INCREMENT as AUTO_INCREMENTED. -
Replied To a Post in INSERT INTO with LAST_INSERT_ID()
>No, LAST_INSERT_ID(id) does not return an incremented id. It returns the primary key ID of the last successful insert operation. OK. That's where most of the confusion came from. I … -
Replied To a Post in INSERT INTO with LAST_INSERT_ID()
>The ON DUPLICATE KEY UPDATE portion doesn't require that it be a duplicate primary key. That seems to be strongly implied by the wording ON DUPLICATE KEY UPDATE That's why … -
Replied To a Post in INSERT INTO with LAST_INSERT_ID()
I don't understand how that works. From what I read the code says Get a new id which is one more than the last inserted key and if the new … -
Replied To a Post in INSERT INTO with LAST_INSERT_ID()
All righty then. Instead of doing INSERT INTO table VALUES (...) ON DUPLICATE KEY UPDATE id = LAST_INSERT_ID(id), why not just have an auto-incrementing primary key? I have a sneaking …
The End.