4,905 Posted Topics
Re: 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 in the given date you will have to subtract from the given year. For example, if your tuple is (2020, … | |
Re: datetime.date.today() - datetime.timedelta(days=100) gives you the date - 100 days. >>> import datetime >>> datetime.date.today() datetime.date(2020, 4, 24) >>> datetime.date.today() - datetime.timedelta(days=100) datetime.date(2020, 1, 15) You can see the month is `1`. | |
Re: 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 that recognizes (since this is an English language forum) spoken English. Can you please elaborate? | |
Re: Welcome to Daniweb. Quick movie reference - is it pronounced ee-gore, or eye-gore? Bonus points if you get the movie. | |
Re: 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. collision = isCollision(fighterX[i], fighterY[i], playerX, playerY) if collision: dead() collision = isCollision(fighterX[i], fighterY[i], bulletX, bulletY) if collision: print("shot") def isCollision(fighterX, … | |
Re: I'm curious. I frequently use a VPN. How will that affect my location? | |
Re: 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? | |
Re: id = LAST_INSERT_ID(id), From what I gather, this expression returns the auto-inceremented value of the field, `id`. And ON DUPLICATE KEY UPDATE says that if the insert fails because of a duplicate record, the existing record is updated. | |
Re: I suggest you start [here](https://opentechschool.github.io/python-beginners/en/simple_drawing.html) with the python turtle module. | |
Re: I'm assuming that because the OP was too lazy to try this on his own first, he was also too lazy to expand WAP to "Write A Program". | |
I found this great article on [User Interfaces](https://datagubbe.se/decusab/) that I wanted to share. Two points I wanted to add 1. Just because it's old doesn't mean it's bad. 1. Just because it's new doesn't mean it's better. And can we please all decide that light grey text on a white … | |
Re: - The world is in the grip of a pandemic. - Donald Trump is an idiot. - Japanese giant hornets are now in North America. - Tom Hanks is still pretty awesome. You are now updated. | |
![]() | Re: Let's examine, step by step, what you have done so far: 1. Posted your homework assignment. I think I see your problem. You haven't actually tried to do it yourself. How about you show us what you have done. |
Re: I'd hate to disappoint you. A warm welcome to Daniweb bonnieposs. | |
Re: Some devices offer a setting that allows Windows to automatically assign a drive letter when the device is mounted. | |
Re: [Read](https://en.wikipedia.org/wiki/Artificial_intelligence) | |
Re: Kind of hard to do that without seeing the code. | |
Re: A good place to start is to write down step by step instructions on how you would do this by hand. | |
Re: Show us what you have so far and where you are stuck. You might want to watch [How to create notepad in vb.net](https://www.youtube.com/watch?v=Bd8uC3wtUSI) first. | |
| |
Re: You cold also check out [this article](https://thenextweb.com/syndication/2018/11/21/the-difference-between-ai-and-machine-learning-explained/) on the difference between machine learning and AI. | |
Re: I disagree with Dani. I think C++ is a terrible first language for learning the fundamentals of programming and algorithm design. I think Python is much better for that. With C++ you have to be too concerned with the underlying structure of the machine. You shouldn't have to worry about … | |
Re: Welcome to Daniweb. There are a few of us dinosaurs always lurking about. I take it you are posting from Montana? | |
Re: I've always used a single space after a sentence. What do you think of the Oxford comma? | |
Re: You need to use the code tool `</>` to insert blocks of code. What you posted is not posted as code and without proper indentation it is meaningless. | |
Re: Sounds like you understand it. What's the problem? | |
Re: It's been a few years since I tried it but I was impressed with [Komodo IDE](https://www.activestate.com/products/komodo-ide/python-editor/). It's by [ActiveState](https://www.activestate.com/) and they have versions for all major platforms. They also have their own implementation of Python. Best of all, they recently made Komodo IDE free. I'd start with that one. The … | |
Re: 1. Why are you calling the multiplication result `sum`? 1. Why are you storing an integer result in a `Double`? 1. Why aren't you reading the user response from the console? 1. Why are you comparing a and b? Use the StrDup method instead of using a loop. | |
Re: Welcome to Daniweb. I removed the spammy link to the online casino. We don't look kindly on spammers so please avoid posts that are thinly veiled spam. | |
Re: An obvious first guess would be a failed power supply. | |
Re: I don't know if this would work but how about creating a textbox and making it invisible? You could use that textbox as your variable. Then you could attach on OnChange handler to it that would trigger whenever it is updated. As for how to trigger an event when it … | |
Re: Let's have a look at the code. Please include an explanation as to 1. what the code is supposed to do 1. what it actually does If you are getting any error messages please include them (and the line number of the code causing the error). | |
Re: I see three mains, actually. | |
Re: Welcome to Daniweb. Tell us a little about yourself. | |
Re: It would also help if it were properly indented and commented. | |
Re: You are calculating TotalPay = ((float(hrs) * float(HourlyRate)) + ((float(OvrTimehrs) * float(OvertimeRate) * float(HourlyRate)))) You are using the total hours multiplied by your hourly rate. You want `40 * HourlyRate`. That would give you the answer you expect. | |
Re: The example code [here](https://gist.github.com/mathewmariani/91f471422c4ac0b5ee37) should help. If you are still stuck then post your code here and we'll have a look. | |
Re: It looks like spam to me. The new member has really not told us anything about himself but does provide links flogging his business. If the member had actually told us something about himself I'd be less inclined to classify it as spam. | |
Re: Still safe and healthy here in Winnipeg. | |
Re: I've never user pandas or collections but I noticed that although from collections import counter does not work, from collections import Counter does (upper case c in Counter). Perhaps that will help. I also noticed that the data you posted is not comma delimited, | |
Re: Or you could use a SortedList and not have to do the sort yourself. Dim mylist As New SortedList mylist.Add("John", 23) mylist.Add("Jim", 14) mylist.Add("Fred", 92) For Each key As String In mylist.Keys Debug.WriteLine(key & ": " & mylist(key)) Next | |
Re: Welcome to Daniweb. What part of Arizona are you from (I've been to Tempe a couple of times). | |
Re: I heard about this thing called Google. You might try that. I find the phrase "where can I download pip for linux" works pretty well. | |
Re: I was in the process of writing a response and after two sentences I realized I had already put more effort into replying than you did in creating the original post. Please show us what you have and where you are stuck. |
The End.