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

By the way, I have no such luck is a little inadequate as a description of the problem. I suggest you read Suggestions For Posting Questions.

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

I tried to run this locally but I do not have the package graphics and pip couldn't find it either. So I found something that said graphics.py had to be in the same folder as your app. I found a copy of it on my computer and copied it over. Then it complained about not having cairo.py so I found that and copied it in from wxdemo. Then it complained about something else.

You'll have to provide more information on your setup.

Also, your inline comments are of dubious help.

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

The glitch is back (cue Elton John music).

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

Working fine now. Thanks.

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

While going through new posts this morning I noticed a change in behaviour. Yesterday, if I clicked on the sprocket to the right of a thread title I got a pop-up menu (mark as read, etc.). Today the menu pops up briefly before I get taken to the thread. There is no opportunity to pick an item from the context menu. I've tried it in four different browsers (Brave, Edge, Firefox, Vivaldi) with the same result on each.

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

I find it useful to debug queries in an interactive DB session before writing the code. For MySql you can use MySQL Workbench. For sqlite you can use sqlite Spy.

Run your query against a test version of your database. If it works then print the query your code is using and verify it is the same as your test case. Also verify that your id is unique.

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

Are these MySql queries (with Php) correct ?

Correct what? The syntax may be correct, but that depends on what values you substitute for ?. As to whether it will do what you want, that depends on what it is you want it to do (which you really haven't said).

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

What happens when you run it?

Husnain_6 commented: similarly, no matching function for call to 'linkedlist::prepend() and updateNode() +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Sometimes the LED will blink to tell you the computer is sleeping. If there is a serious hardware problem that keeps your computer from starting up the blink code could indicate what the problem is. You'll have to check your particular user guide to see.

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

we could be living in a simulation for all we know

Remember Occam's razor. Introduce as few assumptions as necessary. If you are going to raise the possibility of a simulation then there is no point in debating anything since the rules of the simulation would be completely arbitrary and subject to change without notice.

as fallible humans who don't fully understand the universe...

And we never will. That doesn't prevent us from forming a consensus as to how the universe appears to operate and modifying that consensus as new information becomes available. A typical ploy of one particular political party is to "wait until all the information is in". That never happens, even if 999 out of 1000 scientists come to agreement you can always say "scientists don't agree on x". The laws of physics as we currently understand them have allowed us to create some pretty impressive things like the computers we are currently using. That tells me that those laws must be pretty reliable.

One person can look up, and say it's absolute fact that the sky is green. That's a concrete observation.

No it isn't. You are missing my point. The sky is not green or blue or purple. We see the sky as a particular colour based on the biology of our eyes. All we can really say about the sky (at a specific time of day in specific weather) is that the light is of a particular wavelength.

rproffitt commented: "Is this the real life? Is this just fantasy? Caught in a landside, No escape from reality." +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Two responses is probably more than the OP deserves. In any case I suspect the motive for making the OP is...

Trump_Trolls.jpg

rproffitt commented: "Both sides" but one side is Nazi. I thought this would be easy. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

BTW since re-installing Options Plus this morning, the software is now telling me there is an update available. Can't wait to see what it breaks.

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

being able to adjust the thermostat from bed is a godsend

I thought that's what husbands were for ;-)

We have a programmable (but not wifi) thermostat that keeps our house at the proper temperature day and night, winter or summer. Recently Bill Maher was talking about a friend who was raving about his new vape pen. It came with an app so he could turn it on from his smart phone. As opposed to pressing a button on the side of the pen.

George Carlin once said that if you took two things that have never been nailed together, and nailed them together, some idiot would buy it. Substitute bluetooth and app for nailed together and it still holds true. I don't need an app on a wifi enabled fridge to keep track of what is inside (I have a brain that does that), or to check from the store how much milk I have left. Especially when every (rude word) appliance and device needs its own app.

I understand how having COPD might make some features attractive, but I would think you'd want your filters on all the time. We installed an electrostatic filter on out house air system when we thought one of our boys might have asthma or allergies (he didn't) and we left it on all the time.

On TV you see how in five seconds a cop can take a picture or video and send it to someone. That never happens in …

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

Here in Winnipeg it can get mighty cold. In the winter (before retiring) I had a timer in the garage to turn on my car block-heater two hours before going to work. Didn't need Bluetooth or wifi to program. Didn't need software updates which would tell me my timer was no longer supported, and was not hackable.

It's more than 30 years old and it still works.

rproffitt commented: There's always "the right tool for the job." This is one of them. +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Why does your dishwasher need wifi?

Exactly. And with the current state of security - everyone wants to skip the testing and rush their appliances to market - everything is hackable. So why would I want a wifi enabled security camera, dishwasher, refrigerator, stove, thermostat, etc.?

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

I have a Logitech wireless mouse. With Logitech Options installed it allows me to reassign the mouse buttons for specific applications. For example, the button on the left side defaults to Windows Task Switcher. I set it to play/pause in VLC Media Player, toggle full screen in my web browsers, PDF and ebook reader apps, etc. For several months now it would periodically stop responding to app-specific commands (fixed by rerunning the Options app) so I finally got fed up with it and contacted Logitech Support. They said I should be using the newest version, called Options Plus. I installed that and it seemed to work, but a few days later, Brave Browser stopped responding to app-specific actions. I tried rebooting and all the usual fixes. Nothing. Logitech said to uninstall Options Plus and re-install it. I tried that but then it refused to connect to my mouse (it had no problem identifying it before). Support said to download a previous Options Plus version. I followed their explicit directions and got to the download page which had all the versions listed. However, only the current version had a download button. When I tried the current Options Plus again it recognized my mouse, but mis-identified it as a Triathlon rather than a Marathon mouse. Regardless, it was at least talking. After restoring my settings from a Logitech online backup I saw that all my mouse specific assigns were gone.

I'm assuming their solution is to just buy a new mouse, which …

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

Yes. It is bad.

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

In the last two weeks I renewed my cable package (TV/internet/phone) and in the process got upgraded to a new, faster modem. Three months ago I bought a new ChromeCast device and was able to connect it to my old modem/network using my existing Android 6 cell phone.

Today I tried to connect my ChromeCast to the new modem. I was unable. After spending more than an hour on a chat session with google I was informed that

  1. The Google Home App (which was not visible on Google Play) no longer runs on anything older than Android 8
  2. The Windows app that used to work is no longer supported and has been yanked
  3. There is no browser app available to do the reconnect

So now, in order to use my $50 ChromeCast, I must drop $200+ on a new cell phone, or even more on a tablet.

Before you ask, my phone is not upgradable to a newer Android version. I tried to create a USB boot stick with Android 9 but just ran up against Windows Security informing me that the device was not secure. I tried to build a VMWare Android machine but it would not use my laptop's Bluetooth.

Wasn't tech supposed to make our lives better with easy interconnectivity?

mishalkulsoom42 commented: Here is my example on it. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

How about some explanation and comments to go along with the code?

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

Welcome to Daniweb.

While I am far from being an expert, I will certainly help to the extent I am able. Feel free to post any questions you have and I'll be happy to answer them if I can. In the mean time please read Suggestions For Posting Questions.

The more information you can provide the better help you are likely to get.

Since you are just starting out, let me offer a plug for the excellent book Beginning Python from Novice to Professional by Magnus Lie Hetland.

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

To see if all entries in a list are unique you could do

def unique(lst):
    d = []
    for l in lst:
        if not l in d:
            d.append(l)
    return len(d) == len(l)

This will check if all items are unique. If you want to see if all items are the same then check for length of one. For non-nested lists you would typically use a set but lists are not hashable so I'd use a loop. There may be a more pythony way of doing this but I'm not a python pro.

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

Wow. That's unfortunate. Adam brought a 360 camera to the lake last summer and the videos he took are amazing on the Oculus. It's great to show people who have never been there.

You might try Insta360 Studio (free) to see if your video can be converted.

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

Install the current 3.x version of python. That version of wxPython won't run under 2.x python.

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

After reading a few reviews I decided to try Vivaldi out. After importing my bookmarks and customizing my bookmark bar (just a little drag and drop) I was ready to go. Without trying any formal timing tests, my purely subjective impression is that things load faster. I don't have the tools or the patience to do formal testing so I'll wait for something official to be done later.

Like Brave, it is based on the Chrome engine, and as such supports extensions that can be found at the Chrome Store. My personal preferences are AdGuard AdBlocker, Google Dictionary, and HTML5 AutoPlay Disable. Settings are displayed much more conveniently than in Chrome, Brave, or Firefox. My only complaint was the way it handles pinch-zoom. On Brave, pinch-zoom works like most photo display apps. The whole display is zoomed with edges moving off the page, available by panning. On Vivaldi everything is made bigger and reformatted to fit on the page. Upon checking the Vivaldi forum I discovered that by going to

  • Settings
  • WebPages
  • Default Web Page Zoom

and unselecting Use CTRL-Scroll to zoom page, pinch-zoom now worked like I wanted. My initial impression is very favourable.

It's available for Windows, Linux, Mac, and Android.

dnBunnie commented: I'm using maxthon for over 20 years now, along with other browsers. Never felt the need to switch. But I'm curious +2
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Not that son. You haven't met Andrew. Adam's off in the Alps somewhere at the moment.

So exactly how big a hole have I dug myself into?

And if you want to see something really scary I could post a picture of me WITHOUT the beard. The last time I shaved it off and looked in the mirror I was freaked out.

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

Best I could do. I had my son do the previous whoops. My gimp and artistic skills are pretty much limited to removing scratches from old scanned photos.

1080x360_(1).jpg

rproffitt commented: What have I done (me...) Anyway, perfection. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I grabbed it off the Danielle Horowitz twitter page. You have a wide variety of looks in different pictures so I didn't know if that was you or not. It was the only one I found that was big enough to work with.

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

image_2022_09_03T21_34_21_819Z.png

This post has no text-based content.
rproffitt commented: Hollywood style! +10 +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Kewl. In Python that's a simple dict with key=sorted and val=list.

JamesCherrill commented: Keel indeed. In Java it’s a HashMap for best performance +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That's what a debugger is for. Run it in the debugger, set a breakpoint at your last output statement, then single step, checking your pointer references, until you find the one that is invalid. Then you have to work backwards and find out why it is invalid. It could be something as simple as a variable not being initialized.

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

chickenonlinearguments.jpg

This post has no text-based content.
rproffitt commented: Chicken! Thanks Jim. +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Whatever was available depending on how the app was to be used. Initially I would use sqlite because I don't have to install anything extra. Assuming the database code is properly encapsulated migrating to a different database would be trivial. Lacking the knowledge to create and interface to a sql database, the interface code could even be to a text file. I've done this for an app I created to track which books my wife and I have read. The nice thing about a text file based database is that it is very easy to make ad hoc changes with just a simple text editor.

There is also aa free GUI available to use for sqlite databases. It's called sqlitespy.

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

At one time I would have written this in vb.Net but now I'd use python/wxpython. It requires much less disk space for the development environment and is portable between Windows/Mac/Linux systems.

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

One could argue the people that are sitting alone, in their house, in front of their computer, posting on a forum should get a life. :-P

Um... Right.

Just remember, I'm 68 years old. It's either this or sit on my front steps and yell at those damn kids to get off my lawn, ;-P

Husoski commented: PS: When I crossed 64 (...after I stopped humming the Beatles tune) I found it less painful to write my age in hexadecimal. That would make you 44. +2
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

OK. So if by that definition Python is a framework then my reply is "so what?". And if someone were to compile all of the libraries into binaries would it then not be a framework? Is C/C++ merely a framework because it comes with many libraries. Sorry. The definition is too vague to be meaningful. And since the Python core is written in C, how much of a package must be libraries for it to be considered a framework. Would Windows or Linux be frameworks rather than operating systems?

In any case, the usefulness of a thing in no way depends on the thing's label. I guess in the end I would tell the guy in the picture to get a life.

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

Python is a C framework

Can you please explain what that statement means. It just sounds like yet another buzzword that people like to bandy around to sound like they know stuff.

In an episode of Mork and Mindy from too many years ago (sigh) David Letterman played a new-age (and obnoxious) guru who, whenever anyone disagreed with him (But what about love?) just replied "that's just a concept". In other words, an essentially meaningless word in the context.

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

Why are you discussing this in a thread titled "Write a menu driven c program..."? Shouldn't this be discussed in the mods forum?

rproffitt commented: Hi Jim! +0
Dani commented: My point exactly +34
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
rproffitt commented: Maybe it needs an update to include "don't feed the students answers." +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Or if you are preparing the post in a text editor, select the entire block of code and indent it four spaces.

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

I always start here

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

There's a full screen mode.

Full screen or not, no matter what I do I just get snow. No video. It's like watching TV at 3:00 AM when I was a kid. Literally nothing on but static.

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

If by "awesome" you mean, "no matter what I click on I just get a screen full of static", then, yes. It is awesome. You'd think a skeuomorph would exist for a reason. Not in this case apparently.

rproffitt commented: There's a full screen mode. Old TVs were very grainy back then. There's other years and decades as well. +0
victor_44 commented: this post is good enough('">) +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you should continue until you become a professional (employed) programmer you will find out the ugly truth about users. What they ask for is seldom what they want, or need. Sometimes it will be your (probably) unpleasant task to explain that to them.

rproffitt commented: +1. A client decided they would supply the changes in writing. All good but one day I wanted to talk about a change."do it per the document" I did. +16
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Uploaded new code & registry hack.

New code is a little cleaner and adds a 3x zoom if SHIFT-LEFT-CLICK. New registry patch adds ZoomPic to Drive letters as well as folders.

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

Mass texting with a messaging app? Sounds a lot like spam to me.

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

I recently bought a new laptop. Since I haven't used VB.Net in years (nothing but Python now) I did not install Visual Studio. That meant rewriting all my VB apps in Python/wxPython. One of my most often used apps was a shell extension I wrote to add a folder right-click option to launch a small image viewer. This short tutorial will explain how the pieces work. I will not get into how to write an app in wxPython. You will find other tutorials on that here on Daniweb.

I'll post the entire project as three files

  1. ZoomPic.pyw (main code)
  2. ZoomPic.reg (Windows registry mod - need to be edited)
  3. perCeivedType.py (Utility method for file screening)

I'll check this thread periodically for questions. I likely glossed over some things that may need further explanation. There's a reason I don't get paid to do this.

Drawing the display

The images are displayed in one of two modes, windowed, or full-screen. Normally, if you wanted to display an image you would use a wx.StaticBitmap control. The process would be

  • Read the data from the file into a wx.Image object
  • Scale the image to fit the size of the display control
  • Convert the image to a bitmap and copy to the wx.StaticBitmap

There are a few problems with this approach.

  • The image will be distorted unless the container has the same aspect ratio as the image
  • You will usually get an annoying flicker when changing files

We'll handle …

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

There's always print to PDF from within the browser..

mtyide commented: This has to be done programmatically. +3
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You will likely not get anyone here to write your code for you. What we will do is look at the code you have already written, and if you can narrow down where you are having problems, make suggestions as to how to fix them. But first we have to see what you have done so far.

Please 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

For the record, I would pronounce CCIX as two hundred and nine.

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

I submitted a new thread today. Same problem. Here is the screencap

2022-07-25_091556.jpg

rproffitt commented: What are you hiding? +0