Why don't skeletons go to parties?
Because they have nobody to go with.
Why don't skeletons go to parties?
Because they have nobody to go with.
The first question is, who is your "enemy" here?
What you need to do to protect yourself from the average consumer is far different than what you need to do if some "Three Letter Agency" is involved.
Any attempt to wipe a disk with a Windows OS still in residence is doomed to fail.
Any in-place s/w has to deal with a multitude of
The next problem is with the media itself. Pretty much everything nowadays has the ability to remap bad sectors.
If by some small chance your 'secret' ends up in a bad sector, no software scrubbing will be able to touch it, but the manufacturer / TLA could still get at it.
Does your current HD contain a recovery partition?
Do you intend to sell it as "working with a registered copy of windows installed"?
Windows no longer comes with a little holographic sticker containing the product key.
https://support.microsoft.com/en-us/windows/find-your-windows-product-key-aaa2bf69-7b2b-9f13-f581-a806abf0a886
You need to make a note of this before wiping the OS (if that's the route you want to take).
A fairly secure approach would be to use DBAN to wipe the installation partition, then reboot to the recovery partition to install a fresh copy of windows onto a clean partition.
If it's an old laptop, just go on ebay/amazon/newegg and find out the price for a brand new / certified reconditioned HD of the same capacity. …
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"
The past, present and future walk into a bar.
It was a tense moment.
There are 10 kinds of people in the world.
Those that know binary, and those that don't.
I've responded to your email address (FYI, gmail ignores dots).
You should edit your posts to remove your personal info.
You have all the answers in your other thread.
Why is Form1.h
over 1000 lines long?
Why are you using C-style strncpy
all over the place, and not std::string
(since this is C++).
Does Form1.cpp
include Form1.h
?
The lack of error messages when you compile Form1.cpp
suggests not.
I tried to send a PM to you, but it's disabled.
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.
It's hard to visualise what you're doing wrong.
You started with
'unsigned short MyprojectName::m_hservice' (?m_hservice@MyprojectName@@$$Q3GA) Already defined in home.obj
meaning you have more than one instance of m_hservice
.
You now have
error LNK2020: unresolved token (0A0000DF) "unsigned short MyprojectName::m_hservice"
meaning you have zero instances of m_hservice
.
You claim to have moved a few things into Form1.cpp
, but did you add that to the project?
In your IDE, do the following 2 steps.
Then paste the output of the build log.
You can censor your windows username if it appears in any file paths it prints if you want.
The important bit will be the list of files it compiles, and the resulting error message(s).
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.
error LNK2020: unresolved token (0A0000DF) "unsigned short MyprojectName::m_hservice"
Did you add Form1.cpp
to the project?
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;
It seems to me you need to put the definitions in form1.h
into a form1.cpp
file.
Header files contain declarations.
Source files contain definitions.
If you put definitions in a header file, and include that file twice, you end up with something defined twice.
then I get LNK2005 'unsigned short MyprojectName::m_hservice' (?m_hservice@MyprojectName@@$$Q3GA) Already defined in home.obj
This is what the "Already defined" error message means.
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.
hladysz said
please fix the condition:
Please explain why you think this is the wrong condition.
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/
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.
Which of the following things have you tried?
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.
If your batch size is say 1K, and your user decides to spam you with say 10K+ records, what does it matter to you?
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 …
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.
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.
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
con.Open();
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.
If you're sufficiently curious to study how the data arrives at your browser, and can wrangle some Javascript, then perhaps https://www.tampermonkey.net/
You can post-process the data to be whatever shape you want it to be.
I thought this was going to turn into some kind of crypto nonsense on how to make money mining bitcoin or something.
Well you can either:
STFW with https://duckduckgo.com/?q=employee+retention+credit
Wait for your sock-puppet to show up with their "recommendation".
Or you just learn how to use the tools.
If you want only reddit, then type this into your search:
c programming language site:reddit.com
If you want everything but reddit, then type this into your search:
c programming language -site:reddit.com
I suppose the first thing to answer would be whether the bottleneck is client or server side.
stereotype -> similar
Yeah, there are sub-reddits for most languages and programming in general.
I'm spending way too much time in https://www.reddit.com/r/C_Programming/ for example.
There's the usual collection of helpful people, pedants, trolls and idiots - but that's true anywhere. The mods seem to be keeping it ticking over nicely.
category -> pigeonhole
If you want to know what windows is up to when you do something, then try using https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
moles -> subterranean
I don't understand why you need to extract all the files from the compressed tar.bz2
just to upload to a backup.
Also, line 69 is now meaningless having just posted only a snippet of the code.
Before the error, what was the last logger.info
message?
Yeah - I remembered that little detail after the fact when I saw +0.
I'm a long-time moderator on cprogramming.com, but it's getting awfully quiet on many of the old forums.
DiC was a loss, as was devshed.
I seem to be most active now on reddit.
First, let's prepare two tar files using different compression schemes for demo purposes.
$ cat foo_1.txt
This is file 1
$ cat foo_2.txt
This is file 2
This is file two
This is file too
# Three tar files, two compressed and one uncompressed for reference
$ tar -j -c -f foo.tar.bz2 foo_1.txt foo_2.txt
$ tar -z -c -f foo.tar.gz foo_1.txt foo_2.txt
$ tar -c -f foo.tar foo_1.txt foo_2.txt
$ file foo.tar.bz2 foo.tar.gz foo.tar
foo.tar.bz2: bzip2 compressed data, block size = 900k
foo.tar.gz: gzip compressed data, from Unix, original size modulo 2^32 10240
foo.tar: POSIX tar archive (GNU)
# tar understands the contents of all three formats
$ tar tf foo.tar.bz2
foo_1.txt
foo_2.txt
$ tar tf foo.tar.gz
foo_1.txt
foo_2.txt
$ tar tf foo.tar
foo_1.txt
foo_2.txt
# The file sizes; note how much larger the uncompressed tar file is.
$ ls -l foo.tar.gz foo.tar.bz2 foo.tar
-rw-rw-r-- 1 sc sc 181 Mar 23 08:06 foo.tar.bz2
-rw-rw-r-- 1 sc sc 170 Mar 23 08:07 foo.tar.gz
-rw-rw-r-- 1 sc sc 10240 Mar 23 08:26 foo.tar
The gzip python library only does decompression. It knows nothing of the structure of the file, and just gives you bytes.
>>> import gzip
>>> gz = gzip.open('foo.tar.gz','rb')
>>> bytes = gz.read()
>>> print(len(bytes))
10240
>>> print(str(bytes)[:80])
b'foo_1.txt\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
Notice that the length of the data is the same as the uncompressed tar file.
with gzip.open('/var/backup/netbox_backups/netbox_2024-03-16.psql.gz', 'rb') as file:
swift_conn.put_object(
container,
'object_netbox_2024-03-16.psql.gz',
contents=file,
content_type='application/gzip'
)
So what you're actually presenting to the put_object
will be a decompressed stream.
Is it …
I regret that I have to inform you that Adak passed away suddenly after an illness (thanks to the_cultie from the OC forum for the notice).
For folding details, please see here.
http://www.overclockers.com/forums/showthread.php?t=744019
https://plus.google.com/u/2/101960720994009339267/posts/ENuEDDYfvKP?hl=en
http://en.wikipedia.org/wiki/Dennis_Ritchie
It is indeed a sad day when one of the true pioneers of the modern technological world passes away. C and Unix are such huge corner stones of everything around us (like the ability for me to write this, and you to read this), and have inspired so much that followed, that you have to wonder where any of us would be without them.
:(
If n is a power of 2, look at the value in binary.
Then look at the binary representation of n-1
Further, what does
if(iNum%2==0)
have to do with iNum1, iNum2 or iNum3 (the 3 values you read in).
Are you allowed to use arrays for this problem?
You don't decrypt passwords, you hash them.
http://en.wikipedia.org/wiki/Cryptographic_hash_function
User types in the password, you hash it, and you compare it with the previously hashed result in the password file.
If they match, there is an exceedingly high probability that the user entered the correct password.
So google "C# tutorials" and do some reading for a while.
I mean, it wouldn't take long to figure out how to write say "hello world", or how to declare/call a function, or write a for loop, or perform a bit of string handling.