Salem 5,265 Posting Sage
Salem 5,265 Posting Sage

It looks like it's really helped a few people already.

Yeah, 4 new members with consecutive user ID's, smelling like sock-puppet accounts.

rproffitt commented: I saw that as well. +1 for you. +17
Salem 5,265 Posting Sage

https://en.wikipedia.org/wiki/Health_Insurance_Portability_and_Accountability_Act

Or the equivalent for your jurisdiction.

It doesn't matter how glossy your website is, if you f-up the basic security, you won't have any customers to worry about.

Salem 5,265 Posting Sage

https://xyproblem.info/

  • User wants to do X.

Sometime later...

My boss just asked me to create a prototype as proof of concept. There is no specific language/tool I must use

  • User asks for help with Y.

Initially asked...

Have a webpage with a button, when pressed, it will launch a webpage that runs a server side exe (eg, notepad.exe or ribbons.scr), while at the same time run the same exe on the local client pc.

So, if you'd stated your initial requirement rather than asking how to fix your unworkable approach, we might have gotten somewhere.

You want something like this:
https://en.wikipedia.org/wiki/Remote_procedure_call

There are multiple ways of doing this.

Can you be more specific about what your "hardware product" is. Because "can be seen as a notebook computer" suggests it isn't a notebook computer at all, but maybe something akin to a glorified point of sale terminal.

  • Does it have an operating system on it?
  • Are you able to install software on it?
Salem 5,265 Posting Sage

6 to 12 months is a long time to wait to figure out whether your "seo expert" is genuine, or a fly-by-night cowboy who's already vanished with the cash without producing a result.

How do you tackle this?

Salem 5,265 Posting Sage

So I've seen two (possibly more) threads that end with the phrase "let's discuss" and an exclamation mark of over-enthusiasm (which is ironic, since it's low post count drive-by accounts posting this stuff).

The preambles are well written, but meaningless pith.

It's such an odd way of closing out a post that it stinks of having AI behind it. One post would have been curious, but two posts (and counting) is looking like a pattern.

What is clear though is that whoever replies is expected to do all the heavy lifting if the topic was to be answered properly.

The examples:

https://www.daniweb.com/digital-media/threads/543256/exploring-the-future-of-audio-technology-innovations-and-trends
https://www.daniweb.com/digital-media/ui-ux-design/threads/543236/best-ways-to-print-a-high-quality-book-cover

Salem 5,265 Posting Sage

This https://en.wikipedia.org/wiki/Peterson%27s_algorithm
Plus two different kinds of processors.
Plus an error rate of less than once a week.

After many months, the cause was eventually captured on a bus analyser.

After which, the solution was obvious after a bit of RTFM.

Turned out that one of the processors had the then awesome new feature of out of order memory operations. So very rarely, a write-read in the algorithm turned into a read-write on the bus. Fine if it was the only thing on the bus as the memory logic in the processor would have sorted it out.

But it wasn't the only thing on the bus, and the other processor was in that super critical window for some few uS at exactly the wrong moment.

Result, both spent the rest of eternity waiting for the other one to get on with it.

Turning off said feature, beers all round chaps!

Salem 5,265 Posting Sage

I use it all day, every day.

TBH, M$ stopped being an OS company after Windows 7 and the so-called OS just became a marketing tool to ram ever more crap in front of your face.

Salem 5,265 Posting Sage
Salem 5,265 Posting Sage

It should be obvious by now from their posting history that the OP is a troll.

Salem 5,265 Posting Sage

Given who owns github (M$), and their location (U$A), I wouldn't trust anything commercially sensitive with them.

Why do you even need it, apart from the simple convenience of it all (that's the trap, make the honeypot sweet enough, plenty will arrive). There's not much there that can't be replicated on a server machine you physically control.

How many people have commit rights on your codebase?
Every contributor has a complete copy of the entire git repo. So even if you lost everything, you can sync with any of your peers and be back up and running to the point of your last push.

Salem 5,265 Posting Sage

And who's head is in the noose when you mess things up with my enterprise account?

Like for example, bad software gets signed with my key, or your "company" is in an embargoed jurisdiction?

If you need it, buy your own.

Salem 5,265 Posting Sage
Salem 5,265 Posting Sage
Salem 5,265 Posting Sage

@Mr.M, @Dani - you might want to delete/censor the IMEI shown in the screenshots at some point.

rproffitt commented: Is that a real issue? Example: https://www.reddit.com/r/AndroidQuestions/comments/19dwye3/accidentally_posted_pictures_of_imei_number/ +0
Salem 5,265 Posting Sage

https://www.php.net/manual/en/mysqli.select-db.php

I think the key word in all of this is "default".

You can probably do what you want, but you have to refer to each DB by it's own handle.

Using select_db is fine, if you only have one DB and you want to be lazy about referring to it.
So you make it the default DB.

But as soon as you have more than one DB, then forget about select_db and just be explicit about which DB you really want at each transaction.

Salem 5,265 Posting Sage

Your chrome is 9+ months out of date.
https://chromereleases.googleblog.com/2024/07/

rproffitt commented: Thanks for this. +0
Salem 5,265 Posting Sage

Back to the guessing games....

https://learn.microsoft.com/en-us/cpp/extensions/string-cpp-component-extensions?view=msvc-170
Lists 3 different namespaces where things called 'String' are present.

using namespace Platform;
using namespace default;
using namespace System;

Or maybe you have your own String implementation, who knows (we don't).

What version of the compiler are you using?

As a test, does this compile without error?
String^ pcname("Barney");

rproffitt commented: Not OP but tag tells c++ but not which one or code shown. I have also run into VC++ 1.5 users that I can't help with. +17
Salem 5,265 Posting Sage

Cannot convert parameter 1 from char[16] to system::String ^

You need to convert your char array to a CLI string in the first instance, before trying to pass it onto some other function expecting a CLI string.
https://learn.microsoft.com/en-us/cpp/extensions/string-cpp-component-extensions?view=msvc-170

I don't know why DaniWeb keep on crashing whenever I try to write

On my phone (in two different browsers), the thing in the rounded square is the number of open tabs.

Maybe you have an enormous number of tabs open, and you just ran out of memory.

Salem 5,265 Posting Sage

How about engaging with the responders on your other thread with basically the same topic?

https://www.daniweb.com/programming/web-development/threads/543080/how-to-implement-lazy-loading-for-faster-web-portals

Salem 5,265 Posting Sage

Use threads - lot's of threads.

Reverend Jim commented: Hah +15
Salem 5,265 Posting Sage

But because the car was made in the US I had to enter the price per US gallon whereas our gas is sold by the litre.

I'd wager the software wasn't, and the software is the same regardless of locale.

<disclaimer>
Do the same youtube "tutorials" also tell you how to do a factory reset?
A lot of tech (phones, computers etc) all start with "choose your language" then "choose your location" after a factory reset.

Or it might brick it, and you need to configure 100's of EMS settings to make the engine compliant with the market you're in.
</disclaimer>

TBH, it sounds like an annoying gimmick that isn't worth the time of day to try, let alone fix.

Reverend Jim commented: There is a button to toggle between metric and imperial but it affects only the speedometer. +0
Salem 5,265 Posting Sage

I found an advert for a really nice looking DeLorean car.

I asked about the mileage, and they replied it was only used from time to time.

Salem 5,265 Posting Sage

I'd rather have a phone that can make calls, texts and take UNALTERED BY AI photos.

How long before AI eff's up some key witness photo, resulting in the guilty going free or the innocent jailed?

rproffitt commented: That was the plan all along. +17
Salem 5,265 Posting Sage

Firstly, I'd suggest you edit your post to remove your real email address from the code.

https://www.php.net/manual/en/function.mail.php

Some things to try.

  1. Headers is an optional parameter, can you send without the headers parameter? Many examples I've seen suggest there should be a space after the :, as in 'From: '
  2. Sanitise your subject and/or message. You can't in general feed whatever was typed into your dialog directly into mail.

Does a very simple inline code work?
mail('my@my.address.com','Testing...','1 2 3');

Salem 5,265 Posting Sage

Guidance?

Maybe you should read your topic and post before pressing submit. That would be a starting point.

Salem 5,265 Posting Sage

For someone claiming to be an "SEO Executive", you seem remarkably inept at doing even the most basic web search.

https://duckduckgo.com/?t=ffab&q=blockchain+MVP

But then again, most of your posts look like bait for spam.

Salem 5,265 Posting Sage

But it's also in everyone's interest for AI to be trained on reliable information, if we want AI to be useful to us

Yeah, that ship slipped it's mooring when facebook appeared, drifted out to sea on the twitter tide, and promptly sank when muck took it over.

Domain specific AI's trained on the likes of https://arxiv.org/ might be worth something.

The garbage on social media just needs to be left to rot.

Salem 5,265 Posting Sage

my hard disk has been damaged, and entire project has been collapsed.

Did the disk just "stop working" one day, or has it been rotting slowly over time?
Or does "damaged" mean "I deleted the source folder". If that happened yesterday, you might have a chance. If that was months ago, most of it is probably lost for good.

In any event, the important thing is to stop using the disk immediately, and consult with the data recovery service offered by your HD manufacturer, or other well-regarded service in your area. This will not be a cheap option.

I have exe back up file to run this project and working well

I'm going to assume you're working in a business environment, where your time had a direct $ cost to the business.

Maybe a tool like this can help https://www.vb-decompiler.org/
You will not get back your source code in a form you can directly recompile. But it seems you should be able to recover a useful amount. There's a demo version to try first, so could be worth checking out.

How long would it take you to rewrite the program from scratch?
Say you cost the business $40/hr (that's a low in the west by the way). The $1600 price of the above tool is basically a week of your time.
So if a rewrite were to take "months", but having the above tool would save you at least a couple of weeks, it might …

Syed Zubair Ali commented: best, +0
Salem 5,265 Posting Sage
Reverend Jim commented: Different IP addresses, surprisingly. +0
Salem 5,265 Posting Sage

Why don't skeletons go to parties?

Because they have nobody to go with.

Salem 5,265 Posting Sage

You can do this with xargs

find . -name "*.c" | xargs -d'\n' grep -w "main"

Or if you know you want to search the same set of files many times.

find . -name "*.c" > tmp.txt
xargs --arg-file=tmp.txt grep -w "main"
xargs --arg-file=tmp.txt grep -w "void"
Lihui Zhang commented: Thank you for your improvement plan. Using xargs avoids repeatedly loading grep and running it, thus improving efficiency. +0
Salem 5,265 Posting Sage

The past, present and future walk into a bar.

It was a tense moment.

MasoodDidThat commented: Good one !! +0
Salem 5,265 Posting Sage

There are 10 kinds of people in the world.

Those that know binary, and those that don't.

Salem 5,265 Posting Sage
Salem 5,265 Posting Sage

Your app always needs to "phone home" to query the actual member status with your server.

Otherwise, someone could log in twice, delete their account in one session and merrily carry on using their 'account' in the other session.

Sure, you could use the cached version if the user is just browsing, but as soon as they attempt some 'membership required' step, you need to verify membership at that point.

Salem 5,265 Posting Sage

How big is each record?

If it's like say a customer record with maybe a dozen fields and taking up several hundred bytes of space, adding a single 32-bit timestamp isn't going to impact you.

https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model
Draw one of these for your database schema then consider which of the perimeter tables would benefit from a timestamp.

cored0mp commented: Thanks you are right again, Salem! I answered below. +2
Salem 5,265 Posting Sage

error LNK2020: unresolved token (0A0000DF) "unsigned short MyprojectName::m_hservice"

Did you add Form1.cpp to the project?

Mr.M commented: How? +8
Salem 5,265 Posting Sage

Well you still need to include Form1.h in Form1.cpp

Also, Form1.h will need changing as follows

extern DWORD m_dwRVersion;
extern HRESULT m_hr;
extern WFSVERSION m_version;
extern HSERVICE m_hservice;
extern HWND m_handleWind;
extern LPWFSRESULT m_result;
Salem 5,265 Posting Sage

Anyone who knows how I can solve this problem?

The short answer is don't put code in header files.

Declarations go in header files, definitions go in source files.

You get away with it in small projects where you only have one source file, and each header is included exactly once.

But as soon as it gets a bit more complicated, the idea falls apart.

Salem 5,265 Posting Sage

hladysz said
please fix the condition:

Please explain why you think this is the wrong condition.

hladysz commented: Try with "9876543210" +0
Salem 5,265 Posting Sage

A couple of things stand out.

First, mysql-connector-python is listed at 8.0.15 on both systems.
Looking on https://pypi.org/project/mysql-connector-python/#history that version was released beginning of 2019 (over 5 years ago!)
The latest release version is 9.0.0

Second, your old system has pyOpenSSL, but there isn't an obvious 'ssl' library on your new system. Maybe the underlying error is that there is no SSL library to use (which it fails to handle), then it complains about not being able to find what it was looking for.

TBH, I'd start with pip --upgrade to get everything up to date (but see below first).
I didn't check how crusty the rest of your modules were.

Do you know about Python virtual envs?
https://docs.python.org/3/library/venv.html
You can create mini environments tuned to your application, without having to worry about whether installing/removing particular packages will trash your whole machine.

Instead of shipping a VM, consider Docker
https://www.freecodecamp.org/news/docker-vs-vm-key-differences-you-should-know/

cored0mp commented: Thanks again! Replied below! +0
Salem 5,265 Posting Sage

I would suggest you do pip list in your working and non-working environments.

It seems that wrap_socket is deprecated (and insecure)
https://github.com/eventlet/eventlet/issues/795

I would have thought your mysql would have depended on the right version to begin with.

cored0mp commented: Replied below, thanks! +1
Salem 5,265 Posting Sage

Which of the following things have you tried?

  1. Cleared the cache and deleted all cookies in your browser
  2. Tried with another browser
  3. Tried with a browser running in "safe" mode - ie, without a bunch of plugins potentially messing with things they shouldn't
  4. Tried with another computer

Are you using a proxy or VPN which presents a different IP address every time you try to connect? If your connection seems to come from random points around the world, that's a big red flag.

Do you have anything like 2-factor authentication, phone number, recovery email address etc to help secure your account?

Are you logged in multiple times (say your computer and your phone)?
When you've managed to log in, check how many other sessions you have.
https://support.google.com/mail/answer/45938?hl=en#zippy=
Revoke them all except the current one.
If there are any you don't recognise, then follow the rest of the advice on that page about securing your account.

momentum2024 commented: thank you so much for replying. ive tried most of that except the latter parts. will give that a crack +0
Salem 5,265 Posting Sage

If your batch size is say 1K, and your user decides to spam you with say 10K+ records, what does it matter to you?

  • flush your existing batch queue
  • loop through the large request 1K at a time and immediately commit to the database using some batch update
  • add the remainder of the request to your batch queue.
Salem 5,265 Posting Sage
  1. Get something working in Python if that's your comfort zone.
  2. Profile it to find out where the bottlenecks are (do not make guesses, find evidence)

For example, if the program is spending a lot of time waiting for I/O (aka the disk), then writing chunks of code in C isn't going to buy much (it will just wait more efficiently).

If it's spending a lot of time talking MySQL, then research alternative methods of driving MySQL. Driving the same methods in C won't fix anything.

How much faster could it be?
Say for example all the input conversion was zero cost. Time how long it takes to dump say 10K records into the MySQL database.
If that time is only marginally faster than doing all the work, nothing will be gained by rewriting chunks in C.

How much faster could you make it?
Turning 1 hour into 55 minutes isn't going to change the way you use the program. You're still going to run it and then go to lunch.
You need an order of magnitude improvement (like hours into minutes) to make it worth doing. Shaving off a few % might be academically interesting, but if your time is someone's $, then think carefully.

Next, what's the payback period?
Say you spend a month (say 150 hours) carefully crafting, debugging and testing the best C version ever.
If you made it 10 minutes faster, you need to run it 1000 times before you see a return on …

cored0mp commented: Thank you, I realize that I must now profile my system. +1
Salem 5,265 Posting Sage

It doesn't require any 3rd party software.

For example, I use Firefox profiles to separate my bank from my shops.
https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles

Coupled with quick-launch icons on the desktop, I find it to be a very easy to use solution.

ClaudiaJesse commented: Thank you for the tips, I'll check for it ! +0
Salem 5,265 Posting Sage

How did you open the file to save the download?
Did you use 'wb' mode in the open?

file_gz_content = f.read()

Verify that the length of this is the whole file.

swift_conn.put_object

https://docs.openstack.org/python-swiftclient/latest/swiftclient.html#swiftclient.client.put_object
One of the parameters is response_dict. It would be an idea to use this to see if anything unusual is happening with the upload.

In general, go through the API in detail and wherever extra status/error information can be returned, you should be at least retrieving this information to help you with debugging.

gzip: sanbox_nb01_netbox_2024-06-16.psql.gz: not in gzip format

Use a hex editor or hex dump to see what the byte stream actually looks like (and compare it with a known good .gz file).
How badly damaged does it look?
For example, if you forgot the 'wb' mode when writing the file, I'd expect it to be "mostly" OK with some bad characters.

Maybe something tried to be 'helpful' by automatically decompressing it for you when you downloaded it, so what you're seeing is an already decompressed file.

Salem 5,265 Posting Sage

Passing familiarity with a search engine would be high on the list of skills.

https://duckduckgo.com/?q=cyber+security+training&t=newext&atb=v296-1&ia=web

Salem 5,265 Posting Sage
  1. Run the program in the debugger.
  2. Put a breakpoint on con.Open();
  3. Run the backup part of the program.
  4. Print the contents of the cmd string, after it's made all the runtime substitutions.

Is that string what you were expecting?

The spaces around your double-back-slash seem out of place.