4,911 Posted Topics

Member Avatar for Kaaviya_1

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 os import sys import sqlite3 def Average(records, row, column): sum = records[row+1][column] for r in range(0,row): sum += records[r][column] return …

Member Avatar for Reverend Jim
0
27
Member Avatar for pritaeas

I just created a folder on my bookmarks bar for `Daniweb` with a link (filters disabled) to each forum. ![2020-05-07_110401.jpg](/attachments/large/3/103326cb19ebca063f7e5d792419607c.jpg)

Member Avatar for Dani
0
622
Member Avatar for sharmaavesh

Buying Instagram followers is pretty much the same unethical tactic as buying up copies of your own book to get on the best seller's list. It's dodgy at best and contemptible at worst. At least The Times identifies (although not obviously) best sellers that resulted from bulk sales. Too bad …

Member Avatar for jhakasseo
2
586
Member Avatar for Dani

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 to load me up with "content" whether I want to see it or not. Just checking the weather chews up …

Member Avatar for Reverend Jim
2
51
Member Avatar for Gabriel9999

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 to why you included bash, linux, and mint as tags but not python or java.

Member Avatar for AlVest
0
98
Member Avatar for Reverend Jim

I have a Chromecast that I use to stream video from my laptop to our TV. It works great, however, until VLC (Videolan) releases their promised upgrade with Chromecase support, I am limited to streaming files in the mp4 format. Fortunately, ffmpeg allows me to convert other formats to mp4. …

Member Avatar for gladisfogson
1
2K
Member Avatar for Atharva_2

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, …

Member Avatar for Reverend Jim
0
129
Member Avatar for nevin6969

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`.

Member Avatar for amazingadmin
0
231
Member Avatar for tian_1

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?

Member Avatar for rproffitt
0
106
Member Avatar for DeForseti

Welcome to Daniweb. Quick movie reference - is it pronounced ee-gore, or eye-gore? Bonus points if you get the movie.

Member Avatar for Dani
0
29
Member Avatar for Gilbertsilva123

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, …

Member Avatar for Reverend Jim
0
216
Member Avatar for Dani

I'm curious. I frequently use a VPN. How will that affect my location?

Member Avatar for Dani
2
853
Member Avatar for Yuanpeng
Member Avatar for Gilbertsilva123

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?

Member Avatar for Gilbertsilva123
0
157
Member Avatar for Dani

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.

Member Avatar for Dani
0
1K
Member Avatar for pritaeas
Member Avatar for kristamert
Member Avatar for pythonstudent28

I suggest you start [here](https://opentechschool.github.io/python-beginners/en/simple_drawing.html) with the python turtle module.

Member Avatar for Reverend Jim
0
88
Member Avatar for Kumarvarun0609

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".

Member Avatar for hussainmujtaba
-3
247
Member Avatar for Reverend Jim

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 …

Member Avatar for rproffitt
0
512
Member Avatar for Flashints

- 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.

Member Avatar for Dani
0
74
Member Avatar for huwwaris

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.

Member Avatar for mapsonyllaer
0
377
Member Avatar for BonniePoss
Member Avatar for Dani
0
62
Member Avatar for ben_35

Some devices offer a setting that allows Windows to automatically assign a drive letter when the device is mounted.

Member Avatar for Reverend Jim
0
245
Member Avatar for DanielKeith
Member Avatar for ayakubu591
Member Avatar for Edoburun
Member Avatar for shoaib_12

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.

Member Avatar for Reverend Jim
0
81
Member Avatar for PSorensen
Member Avatar for davy_yg

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.

Member Avatar for Reverend Jim
0
517
Member Avatar for Lev_3

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 …

Member Avatar for hussainmujtaba
0
931
Member Avatar for Zinavo
Member Avatar for rorock

Welcome to Daniweb. There are a few of us dinosaurs always lurking about. I take it you are posting from Montana?

Member Avatar for dfarquharson
2
328
Member Avatar for Dani
Member Avatar for lightft
3
1K
Member Avatar for Radroad

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.

Member Avatar for Radroad
0
480
Member Avatar for Edoburun
Member Avatar for JamesCherrill

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 …

Member Avatar for Reverend Jim
2
1K
Member Avatar for ThaboTS

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.

Member Avatar for ThaboTS
0
497
Member Avatar for Laluna

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.

Member Avatar for Reverend Jim
0
145
Member Avatar for Ovidiu_1
Member Avatar for cqx9

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 …

Member Avatar for cqx9
0
509
Member Avatar for phirux

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).

Member Avatar for phirux
1
331
Member Avatar for esyah
Member Avatar for Usoop
Member Avatar for TIffany_2
Member Avatar for littlepr

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.

Member Avatar for Reverend Jim
0
511
Member Avatar for Abdullah_13

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.

Member Avatar for Abdelrhman_2
0
4K
Member Avatar for stellacherry25

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.

Member Avatar for Reverend Jim
0
131
Member Avatar for tetrisunblocked
Member Avatar for krogerfans

The End.