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

Clearly you missed the part where my friend said, it's the same answer he would have given. In other words, the answer generated by ChatGPT was vetted by an expert.

I do not understand your response in this case. If I were to post a code project here, and that project happened to contain a ChatGPT generated function, would that be a no-no in your books?

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

I'm not very familiar with HAVING but my understanding is that it is used to filter results after a GROUP operation so I can't imagine that indexes would improve performance other than on the original SELECT. Using WHERE would return rows based on one or more criteria, and would benefit from indexing, but HAVING, as I understand, is performed after the selection and grouping.

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

I realize that moderating Facebook posts is an exponentially greater task than moderating Daniweb, but if Facebook is not doing its job now, what happens once the election cycle heats up and untold thousands of AI posts created by bots start flooding the ecosphere?

rproffitt commented: I recently read the electrical grid isn't capable of supplying AI's needs. We all know how the M5 fixed that problem. Star Trek reference. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I wonder how this will apply to individuals who use AI to generate, then post content? It's even more problematic in the US. Take this scenario...

If I have a party in my house, and while at that party, some people use the opportunity to sell illegal drugs, I can be charged since the illegal activity is taking place in my house.

Likewise, if a newspaper publishes lies, even those made by freelance journalists or people submitting letters to the editor, as long as that material is published in the newspaprer, the publisher can be held liabel.

But a special exemption was made in the 1990s (under Bill Clinton) which exempted internet hosted agencies. Under that exemption, Facebook, Twitter, etc. are not responsible for libelous content.

Here at Daniweb we moderate posts and remove those posts which are blatantly false, or even in some cases not false but overly nasty in tone. We do this to maintain a certain standard but apparently there is no legal requirement to do so.

rproffitt commented: I had an issue with squatters selling drugs. Had to lawyer up, city police didn't take any action until I finished my court actions. +17
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Hi, and welcome to Daniweb.

dennyfontaine commented: Thank you +0
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

SEO hasn't been about gaming the system for nearly 15 years now

Then you may find this interesting. Also this.

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

Does that mean, "how to use AI to game the system"?

rproffitt commented: Or AI games you? +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Hello, and welcome to Daniweb.

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

I can't offer any suggestions other than to just download the compiled app for your system instead of building it yourself.

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

Assuming this is python you have to ensure the backslashes are not read as escape characters. Try

image = cv2.imread(r'C:\Users\Audun Nilsen\Pictures\pica.webp')

Using r' in front of a string indicates a raw string and the backslashes will not be interpreted as special unless the backslash is the final character in the string. You could also use

image = cv2.imread(C:\\Users\\Audun Nilsen\\Pictures\\pica.webp')

but I prefer the raw string format.

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

As a first language I highly recommend Python. It is free and comes with a simple IDE (idle). For something more robust you can use Microsoft vscode (also free) as the Python IDE. Python has a very friendly syntax and there are a large number of free online tutorials. And you can post questions here for things that are unclear. I've programmed in a large number of languages over many years and I now program exclusively in Python. It give me fast turnaround and is also fun.

If you learn better from books I suggest Magnus Lie Hetland - Beginning Python_ From Novice to Professional. It's slightly out of date but is an excellent resource.

Keep in mind that learning to program is not just about learning a language. It is also about learning how to design software. You can't learn how to build a house by merely learning how to use all the tools.

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

Why not just load it into paint.exe then save as whatever format you want? Or you could download ffmpeg (free) and do

ffmpeg -i myfile.ico myfile.jpg (or whatever format you want)

ffmpeg can also be used to convert video between any formats. Also subtitle files.

ffmpeg is a portable app (no installation required) but is more convenient if you add the bin folder where you unzip it to your system PATH environment variable.

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

I always recommend ditching VB6. It is super old technology. If you were using Python 2.x I would also advise moving to Python 3.x for the same reason. If you stick with the old you will be left behind. If I were a potential employer I would not hire anyone who only worked in old tech except for the very rare case when it is required to maintain legacy code like COBOL. It would not surprise me in the least if upcoming versions of Windows would not even run VB6 programs.

cambalinho commented: now i get.. thanks for all +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Glad you were able to work it out. Why are you still using VB6?

cambalinho commented: why you are, always, tell me that? i have installed the VS2022, but it's very slow... even for create and run a project... for now i still with VS98.. +7
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Normally I would have just deleted this as spam but I thought it was worth leaving in to make a couple of comments.

Firstly, it is not an academic lifesaver. The purpose of a term paper is to teach you how to do research and to help you learn the research topic. It does not meet your requirements because you don't learn anything.

Secondly, because you paid someone to do the work for you you haven't earned anything.

If paying someone else to do it for you was effective then I would expect to get thin by paying someone to diet for me, or get fit by paying someone to exercise for me. I'd also like to learn to play the piano. Could I do that by slipping someone a few dollars to do the work?

If you actually believe what you posted then your teachers have utterly failed in teaching you how to think. Perhaps they earned their degrees the same way you are trying to.

I would be remiss if I did not also point out that by passing someone else's work off as your own you are committing plagiarism. Any reputable school would expel you for that. Good luck in the real world.

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

Remove the trailing ) and it should work.

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

Try

import re

pat = '<td>(.+?)</td>'

for line in open('yourfile.html'):
    if line.startswith('<tr align="right"><td>'):
        print(re.findall(pat,line))

I realized that findall is cleaner than split. You might want to have a look at this regex online tool

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
You can either read the entire file into a list, then filter that list, or you could process it line by line and process each matching line. For example (using my file)

for line in open('usblog.txt'):
if '2024-01-24' in line:
    print(line)

or

text = open('usblog.txt').readlines()
for line in [x for x in text if '2024-01-24' in x]:
    print(line)

if

<tr align="right">

only appears in the lines you want then filter on that.

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

Just process the file line by line and apply the regular expression to particular lines. I can't give you an expression that matches only the lines you showed me with a guarantee that in matches nothing else without seeing the entire file.

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

The trick is to use lazy matching which matches the shortest possible string.

html = '<tr align="right"><td>236</td><td>Roy</td><td>Allyson</td>'
pat = '<td>(.+?)</td>'

then

re.split(pat,html)

returns

['<tr align="right">', '236', '', 'Roy', '', 'Allyson', '']

and

re.split(pat,html)[1::2]

returns

['236', 'Roy', 'Allyson']
Tom_45 commented: Hey Jim, thanks for the advice. I did finally get the results I was looking for using the pattern '<td>(\d+)+<\/td><td>(\w+)<\/td><td>(\w+)'. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

For

html = '<tr align="right"><td>236</td><td>Roy</td><td>Allyson</td>'
pat = '<td>(.+?)</td>'

then

re.split(pat,html)

returns

['<tr align="right">', '236', '', 'Roy', '', 'Allyson', '']

and

 re.split(pat,html)[1::2]

will return only

['236', 'Roy', 'Allyson']

The expression .+? does a lazy match (returns the shortest possible string that matches the pattern.

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

I frequently had to deal with Engineers who felt they could both design software and write it. I only once met an engineer who could do both competently. She got her degree in computer engineering and started in my group as a junior member. She rose quickly through the ranks and even became my boss for a couple of years (my happiest at work) before going on maternity leave. The other engineers failed miserably at both design and coding.

I think anyone who aspires to software design should be forced to spend at least one year doing software maintenance. You learn a lot about what not to do by having to work with someone else's bad decisions.

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

and find your choice of plumbing perhaps apt

Before I retired, if someone asked what I did I usually replied, "digital plumber". It was not my full job but it described the major duties much better than just "programmer".

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

Welcome to Daniweb. Please take a moment to read the Daniweb Posting Rules and Suggestions For Posting Questions.

digitalfolks commented: Sure I Will Read and follow all your rules +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'm saying that the design team should get input from the coders who will have to implement/maintain and software system. A designer might not put hooks into the code for logging that can be enabled and disabled as required for troubleshooting. When I designed infrastructure I put in many hooks of this type. In a production system they would usually run disabled, but by setting a few global flags a lot of very useful information would be instantly available to the person (usually me) who would be called in at three in the morning to fix a problem.

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

I think it is a good idea for the design team to get input from the coders. Let me give you a non-programming example. My brother was a civil engineer in charge of the maintenance of the province's water treatment plants. When the design for a new plant came to his desk he showed it to the people who would be doing the actual hands-on maintenance. Their major input was that some of the pipe runs were continuous. That meant there were no junctions that could be disassembled to clean the insides of the pipes. They would have had to cut the pipes after installation and install access points to allow for cleaning.

Design people often don't have maintenance as a priority.

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

So back to you, how do you deal with choosing such standards?

I code under the assumption that the person who will be maintaining my code is a psychopath who knows where I live.

cored0mp commented: I answered you below! +1
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I loved that one when it first came out. And, yes, that is indeed FORTRAN. The system also came with a preprocessor called SFORX which added structured statements ($IF-$ELSE, $WHILE, etc.) but for some reason it was not used in this case. Just for fun I eventually rewrote the above with no GOTOs to prove to a co-worker that it could be done.

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

Are you differentiating between design and programming? Some professionals get stuck in their heads. For example, too many surgeons feel that surgery is the first option. My job as a professional programmer was not primarily to write code. My job was to provide solutions to problems. Ideally that meant writing as little code as possible. If coding is required then it should be as clean and as clear as possible. Above all it must be maintainable, and not just by you.

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

So with non-organic "you're pretty much on a hamster wheel constantly having to fund the beast". But with organic, "it's important to keep on top of it, and continue to invest in your strategy/strategies over time."

Sounds like a lot of work either way.

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

Can someone please explain the difference between "Increase website traffic" and "Increase website traffic organically"? What, exactly, does organically mean?

rproffitt commented: At risk of censure, maybe it's something a sniff test would reveal? +17
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You might try spin-rite

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

I have found that the maintainability of an app has a lot more to do with the quality of the developer than the language choice, given that you are choosing a mainstream language.

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

And less RI.

carriejo810 commented: Why don't you favour RI, purely from a technical perspective? +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Two new knees.

Merry Christmas to all.

rproffitt commented: Brain says "Bee's knees". Doh. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Since the underlying tool is ffmpeg, why bother with all the code and overhead? You can just use ffmpeg directly with the -r option.

Aside from this I enjoyed the article (and the others you have posted).

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

I worked at a desk (computer programmer/maintainerer/etc) for 31 years. For the last ten years as part of a group of hardware/software specialists I was required to attend monthly safety meetings. One particular meeting was all about repetitive stress injuries and how to avoid them. One engineer, whom I thought had no sense of humour until then, mentioned that he used a track mouse (a mouse with a track ball on the top). He held up his hand and moved his index finger left and right repeatedly and asked how to avoid an injury from the repeated motion. I thought (I am still not quite sure to this day) he was poking fun at the insanity of wasting all our time discussing a topic that could have been addressed with a minimum of common sense.

I took a more direct approach. I mentioned that for many years my father made his living as a vegetable farmer and that his reaction to someone complaining about a repetitive stress injury such as the one just described by that engineer would have been either mockery or disgust. I did not leave the meeting as my attendance was mandatory but I made it clear that I was not pleased about having been taken away from more pressing matters.

You might argue that repetitive stress injuries are a real problem and should not be minimized. I am sure they are for people who spend their day doing assembly line type jobs. But for people who …

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

Update. NAS is still running fine and I was able to add a media server that (wonder of wonders) is usable by Bigscreen Beta on my Oculus.

Had a couple of gotchas. I use TightVNC to remote into my various computers within my home network. I installed TightVNC on the pi and when I first ran it I was asked to provide two passwords, one for full access, and one for view only. After I did this I could no longer log in to the pi, even from a local interface. I had to rebuild it from scratch. This time, instead of using TightVNC I just enabled the native VNC interface. However, now I have to use RealVNC Viewer to connect. Not a big deal.

The second gotcha is that any time I reboot I have to remount my external drive, and restart samba and minidlna. I'd do this automatically but I can't seem to get rc.local to work. Again, not a big deal to do it manually since reboots are infrequent.

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

"Open command line." Today's users hate that?

Could always use something like Handbrake which is basically a GUI built on top of ffmpeg.

AndreRet commented: Still old tech that we are trying to support, the OP really need to look at moving on in life to increase what he needs to achieve... +15
rproffitt commented: +1 +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I don't know what it is you are trying to do but is it possible to use ffmpeg to do the changes? If you can tell us what your intentions are perhaps I can suggest an ffmpeg command line that will do it.

rproffitt commented: "Open command line." Today's users hate that? +17
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

We haven't had any really silly discussions going on here for some time so let me start one with these two items:

Is it just me, or does Lauren Boebert (at least in the outrage/rant photos) look like Margaret Hamilton in The Wizard of Oz?

and speaking of green things...

Is it just me, or is Jordan Peterson channeling Kermit The Frog? Listen to him with your eyes closed and then tell me I'm wrong. In my opinion at least, Kermit is far more worthwhile of my attention.

AndreRet commented: I lost you on "We haven't had any really silly discussions going on here for some time" but then a bit of Google brought it all back :) +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Your designs are safely stored in the Figma cloud, ready to be accessed anytime, anywhere.

Except from Google Drive, apparently.

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

I kinda wondered. Every character is unique.

rproffitt commented: All characters matter? +17
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Generally speaking, people are less likely to offer help when the request is phrased as a demand.

jayashree10 commented: Thank you for sharing your insights. I will keep in mind and will not repeat it again +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Typing your title into google gives...

An interface is the connection between systems or applications, while a protocol defines the rules for data exchange between these systems or applications.

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

I've been watching a fair bit of old TV shows and old movies. I've noticed that there were a lot more long shots in older shows. And by that I mean duration, not distance. It seems that camera work has followed attention span in that the average shot these days seems to last 2-3 seconds. Perhaps Max Headroom (pilot episode) had it right when they predicted/posited blip-verts. For those who never watched Max Headroom, blip-verts were commercials that were so highly compressed that when watched caused some viewers heads to explode.

I find this particularly bad in home reno shows (my wife loves these) in which they show the rooms of a house before and after reno, but you only get 1-2 seconds of any particular scene - not nearly enough time to assimilate what is being shown.

EdwardMatthew commented: Short shots in modern film impact engagement. Home reno shows suffer as brief scenes limit detail. A mix could enhance the experience. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Creating exceptional content takes time. You need to take time to organize your thoughts, and you need to take time to express those thoughts concisely and coherently. You also need to take time to proof-read what you have written to make sure it accurately reflects what you want to convey. For example...

If you want to really drive conversions

Assuming that this should have read "If you want to really drive conversations" might I suggest one tip that has helped me? After you have created your content, read it back out loud. This makes a lot of errors pop off the page.

Unless, of course, your content is religious, in which case "conversions" may be entirely appropriate.

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

Welcome to Daniweb.