rproffitt 2,701 https://5calls.org Moderator

To debug this, add print statements at lines 15 and 23 to show x, y and what else you think you need to see. If you are using a nice IDE you can break on those lines to watch what is going on. While ++x and x++ should be the same in this code, you may occassionally encounter and odd compiler which is why I use the more classic x++, I don't know what compilers and such so it's suspect. You must add debug lines to see what's up.

Also, why the \n on the scanf? Read http://www.cplusplus.com/reference/cstdio/scanf/

rproffitt 2,701 https://5calls.org Moderator

I'd look at reducing the code to where you are having the issue and then sharing that. Surely the problem can be reduced to less than what you posted. From the other discussion, they explained it to you also. Here it is for you to read again.

"Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Elliott Frisch, shmosel, khelwood, Vince Emigh, Robert Columbia

rproffitt 2,701 https://5calls.org Moderator

Well SMIca, I think the folk on the other discussion discussed what you need to do now. Start over and learn more. Jumping into the middle of the book would have you wondering why it doesn't work. Also, the solution to this one is on chegg.com if you want to buy an answer.

PS. Adding with edit. Crossposting is poor etiquette. When people find that, they may read your other discussion and agree with what is over there.

rproffitt 2,701 https://5calls.org Moderator

I'm a little confused about this. You ask how to enable but here, all the listboxes let the user select items in the list.

I'm going to guess here you want to find out what they selected. For that read https://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.selecteditem(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1

rproffitt 2,701 https://5calls.org Moderator

There's rules and then there is etiquette. Etiquette says don't crosspost. But to make it a rule is rough as noted above.

If you do find them crossposting, you can simply point to the crosspost link and write if you agree with the answers so far. Usually the crossposter figures out they will be found out if they crosspost.

PS. Adding with edit:
There's another point of etiguette which is don't beat up the newbies. I find newbies cross post the most after that the ones that never learn. That could be UI (the one who has the ideas that will rival Google)?

rproffitt 2,701 https://5calls.org Moderator

Just a small question. Why does this look like exercise 27 from the book "Data Structures and Algorithms Using Java
By William McAllister"?

Also https://stackoverflow.com/questions/46821163/why-when-i-attach-an-object-to-a-method-in-the-do-while-loop-my-main-method-does seems to tell us you need to go back to prior chapters of the book you are using.

Also, "SMIca."

rproffitt 2,701 https://5calls.org Moderator

I hope you understand why I asked these questions. Sorry, no, didn't work for the NSA but can reveal I worked for defense companies for years.

I see the SANS article is noted so there's a nice treatise to use.

So where does that leave you? I think it means you get to choose how secure your app and data is.

rproffitt 2,701 https://5calls.org Moderator

A few issues.

  1. Your post topic is Pascal. Then what you write looks like an assignment and not about Pascal.
  2. In your text you write there is a question but no question is found. Again it looks like a homework assignment.

Before you reply, read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question

rproffitt 2,701 https://5calls.org Moderator

Remember I may not duplicate prior thoughts at https://www.google.com/search?&q=security+vs+ease+of+use as that would be duplicating the past thoughts and in your reach.

You say you wrote this app so where in the requirements are the security goals outlined? If not there, what is the company's view on security? Do you work for Equifax?

You reveal there's a database. Does the data need securing?

rproffitt 2,701 https://5calls.org Moderator
rproffitt 2,701 https://5calls.org Moderator

I worry you didn't try the files at all. Also, contact the author of the original page you linked and ask for a Windows install package.

That is, I find many of today's programmers to struggle if they are tasked to unpack and install from the gzip or tar packages. Many are only able to proceed if it's installed for them.

rproffitt 2,701 https://5calls.org Moderator

Just a note: You appear to be spamming on other forums (CNET in particular.) I'd avoid that in case folk notice that and point out your question here.

rproffitt 2,701 https://5calls.org Moderator

Sure, but https://docs.python.org/devguide/setup.html seems to cover a few nice systems. Which one did you choose?

rproffitt 2,701 https://5calls.org Moderator

Alex, it's rude to crosspost like that. Folk will notice and your newer folk will not see why it's rude.

rproffitt 2,701 https://5calls.org Moderator

You broached a few topics. So let's find them and get you started.

  1. Tools. This is your choice or if an assignment, set by the master (teacher.) Tools are pretty much just that. The results vary with your skills with the tool. In other words, if you have a hammer, everything looks like a nail.

  2. The memory dumps may be uninteresting and not guaranteed to hold what you are looking for. But let me discount that you know what you are looking for and have a MANUAL PROCESS that you are looking to automate. HERE'S THE BIG DEAL. Ready? To code such a tool means you have a process or document that details the procedure and shows the results. Without this document, you are lost.

  3. Guessing here you need more docs on dumps. That's you and Google. Example: https://www.google.com/search?q=reads+Windows+7+raw+memory+dump
rproffitt 2,701 https://5calls.org Moderator

Why does this code look identical to John's at https://stackoverflow.com/questions/46773853/fingerprint-verification-and-query
It seems to have the same duplicate lines 4 to 9 as 10 to 15.

I worry that such duplication is a sign of an uncaring coder.

rproffitt 2,701 https://5calls.org Moderator

So 2.35 seconds? Is this on a SSD or HDD?
I've found payback to be good enough that a move to SSD and more RAM is worth it. I don't see anything outstanding in the code that would make a big difference.

rproffitt 2,701 https://5calls.org Moderator

I think the first step would be to format your number to the string you want to use in that textbox.

https://www.google.com/search?q=c%23+format+number+to+string seems to find plenty of priors so let's skip to the textbox.

You didn't ask about a popup so in C# the textbox has properties and it's as simple as

tbSettingText.Text = "Initial text contents of the TextBox.";

So now that you have your formatted string, you seem to be ready.

rproffitt 2,701 https://5calls.org Moderator

Why not try this the other way? That is....

How would you find this date? That way you will understand the code your write.

rproffitt 2,701 https://5calls.org Moderator

So how did I find the files?

  1. https://www.google.com/search?q=libmysqlclient-dev
  2. First link was https://packages.ubuntu.com/trusty/libmysqlclient-dev which has downloads.

You might have to use 7Zip to unpack and install.

rproffitt 2,701 https://5calls.org Moderator

Pelles or not, I found the header files if you needed them.

rproffitt 2,701 https://5calls.org Moderator

I went to your link and disagree they didn't show the header files.

Read again the step about $ sudo apt-get install libmysqlclient-dev

So what files are in that package? The very header files called in the example code. I found them at https://packages.ubuntu.com/trusty/amd64/libmysqlclient-dev/filelist

rproffitt 2,701 https://5calls.org Moderator

I think you have to share which SQL this is using. On MySQL you can list current users with https://www.google.com/search?q=show+users+on+mysql

But since the default allows "Joe" to login in and connect more than once, I think you'll have to lock them out in your code or explore use of the GRANT options. More at https://www.google.com/search?q=mysql+only+allow+one+user+per+login

rproffitt 2,701 https://5calls.org Moderator

You'll have to show your work and code then explain what's stopping you.
Read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question

rproffitt 2,701 https://5calls.org Moderator

This is a deep hole you've jumped into. Why I lead with this is that AVI is a "container" of content and does not dictate the encoding of audio or video. The same is said of MKV files.

So, the "best format" question is one that I will never answer except to write "the one that works for you."

Now if you want to edit audio, you may have to split off the audio from the AVI file first. There are tools I used in the past to do that step such as Virtual Dub. (Not an offer to write another tutorial.) Then the audio is in the clear for an audio edit. Once it's edited you can merge the audio track back into the AVI with Virtual Dub or tool of your choice.

While I mentioned one tool, there are others. Example: https://www.google.com/search?q=split+audio+from+avi+mpeg+tools

rproffitt 2,701 https://5calls.org Moderator

I call this work "Transcoding." That is I usually have to hand convert from one language to another and to do so I have understand enough of each language to pull it off. I rarely see anyone offer to do this on an entire app so be sure to slim down your request to one issue you are having.

That out of the way did you try "j2c"?

rproffitt 2,701 https://5calls.org Moderator

@overwraith. It's a two way street. There are some that demand support but all this is volunteer like other forums. I see you dumped a lot of code so folk may shy away. Be precise with what is broken. Keep it short.

Also, read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question

I think your post may have failed the "What is wrong with my code?" concept.

rproffitt 2,701 https://5calls.org Moderator

I'm going another direction here. It's improper to decode passwords today. The accepted method is to encrypt and store that result.

But how to check if the user's password is valid on login? Take the user's supplied input password, then encrypt and compare with the stored encrypted value.

In short, we NEVER want to see their password in the clear or stored in a decryptable database. Why? Read the news.

rproffitt 2,701 https://5calls.org Moderator

Given only this detail and no history, the machine apparently did this out of the box so put it back in the box to go back to the store to exchange for a good one.

Now you might correct everyone that it's years old and worked until something changed but you didn't tell that.

rproffitt 2,701 https://5calls.org Moderator

While we could go on and on, consider this ping result.

C:\>ping 0.0.0.0
Pinging 0.0.0.0 with 32 bytes of data:
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.

Ping statistics for 0.0.0.0:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\>ping 127.0.0.1
Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

So think about this. 127.0.0.1 actually exists and if there is a server on your machine then it can get the message.
Now look at 0.0.0.0. It just fails. This is a good thing if you want the packets bound for candyland.com to just die.
And yes, how this works depends on the OS and it's IP stack so you can open a discussion on that and end up with a dissertation.

Reverend Jim commented: Wish I'd thought of trying that ^_^ +14
rproffitt 2,701 https://5calls.org Moderator

I can think of two types of apps that could answer your question.

  1. Portable versions of an antivirus. These are only used to scan once the OS has booted. I'm going to call these trash since a rootkit can easliy evade this.
  2. Bootable Antivirus on USB. Now we're talking. Remember that no antivirus today is 100% effective and again we are talking SCAN ONLY as to be effective when the OS is running, we must install this to the OS.

So bootable AntiVirus (AV) scanners? Here's a list: https://www.geckoandfly.com/19582/free-usb-antivirus-fix-unbootable-windows-unmountable-boot-volume/
All these can be put onto USB or CD/DVD.

happygeek commented: what he said :-) +15
rproffitt 2,701 https://5calls.org Moderator

In my case it is by working on our apps. The office has Android apps so while we could debate if that is pure Java, I think it's close enough.

Practice and applying your skills makes you sharper. In decades I've never used a web site training method. I get the books, read and try it out.

rproffitt 2,701 https://5calls.org Moderator

I still feel you need more time with PCs in general. The jumper you show is to limit the SATA speed to 1.5Gbps. That was needed on some old PCs that could not negotiate the speed. This a SATA drive and there is no PATA involved here. There is IDE Emulation in some BIOSes since some OSes didn't have SATA support.

I think you need more time. Meanwhile try other OSes on this old drive but wipe the drive clean to avoid partition and format issues with say a bootable tool like DBAN.

rproffitt 2,701 https://5calls.org Moderator

http://www.samsung.com/us/business/oem-solutions/pdfs/1216_HDD_PGB_120.pdf calls out this model as SATA. I worry that you don't have this model now.

rproffitt 2,701 https://5calls.org Moderator

I didn't google that dll for you. Did you research this? Sometimes a very new programmer doesn't research but looks for folk to find out for them. This research is just a google which I left for you. Once you find out what this log4net item is, you can see if the author has a 32 bit version. If they don't you have to make a new app, but without said addon.

rproffitt 2,701 https://5calls.org Moderator

Did you just reveal the machine is so old it has a floppy drive? Your last post has me worried you are in over your head. That is, I can't throw you a life raft or bouy since you only tell so much of the host PC.

But it appears to me you are just new to PCs. That's not a bad thing. But can cause others to leave you to dig deep holes you can't get out of.

For example, in SATA, all connections are masters. It's strange to read you talking of PATA when the HDD is SATA.

rproffitt 2,701 https://5calls.org Moderator

Which is why I start with a clean drive. No partitions, no formatting and OSes (good ones) just slide right on.

Your post and replies seem to tell me you are trying to hack something rather do it the usual and correct ways. Or there is a hardware issue you haven't found yet.

rproffitt 2,701 https://5calls.org Moderator

Look at each error. The first one is

ERROR: File 'log4net.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'

So I will not google what log4net.dll is but each error is read and you resolve it by the method you can. If log4net.dll is not yours you ask them for the x86 version. If log4net.dll is yours, then you recompile to the intended target.

Only you know what log4net.dll is. Maybe you don't need it at all?

rproffitt 2,701 https://5calls.org Moderator

I didn't find it easy to install "retail" Windows on USB. I had to google how. And in the end it was worse than a normal install. If the HDD and hardware is good I usually wipe the drive clean and install the chosen OS cleanly. Odd installs result in odd problems in my experience.

rproffitt 2,701 https://5calls.org Moderator

The problem is exactly as you gave it. You have 64 bit dll's or code and targeting a 32 bit system. This should fail. There is no easy fix for this one. You'll have to rewrite your code and chand your targeting to x86, 32 bit systems.

As to the joking, I agree. Some may disagree about XP but I no longer target it. Too much trouble for what the client will pay me for the work.

rproffitt 2,701 https://5calls.org Moderator

So why not install an OS and move on?

rproffitt 2,701 https://5calls.org Moderator

The only encounter I've had with MINWINPC was when the user's PC was infected and trashed the HDD contents. The HDD showed in the BIOS but the owner was not looking to factory restore the PC so they left and it's a mystery what they did next.

In short, nothing was wrong at all. The PC contents on the HDD were lost but MINWINPC would show up as a folder.

We felt a factory reset would have cured it and maybe a disk wipe with DBAN (see the web) and then installing the factory OS or Linux.

Of course there are folk that want to save a failed HDD. Not much you can do for them. This is a 40 or so buck drive here ( https://www.amazon.com/Blue-500GB-Desktop-Hard-Drive/dp/B00461G3MS ) so no one tries to save a drive today.

rproffitt 2,701 https://5calls.org Moderator

See that first error in the Player class (line 19) ?

It sounds just like what Mikey noted at http://www.dreamincode.net/forums/topic/95227-cannot-find-constructor/

rproffitt 2,701 https://5calls.org Moderator

To me this looks like code that has a lot of missing methods. Also, it looks a lot like what was in the BlueJ programming book.
https://github.com/drblinken/informatica-examples/tree/master/eclipse/BlueJ/src/chapter11/musicplayer for example.

Since it's not homework, you should either get that book so you see how it's done or publish the entire code base.

rproffitt 2,701 https://5calls.org Moderator

I'm going to answer this a different way. What you are essentially doing is Inline Assembler. There are priors on that at https://www.google.com/search?q=inline+assembler+linux but some basic knowledge is required here.

That is, you could put the assembler code in there or run it through the assmbler and pick over the bytes to copy into your app's inline assembler code.

Seasoned coders will not put byte code like that into an app so I don't expect a lot of support for this today.

rproffitt 2,701 https://5calls.org Moderator

To me this post -> https://www.daniweb.com/digital-media/digital-marketing/search-engine-strategies/threads/509934/how-can-infographic-is-help-to-rank-website is what we've been discussing.

New member joins, makes that spam tagline and asks a low grade question (IMO.)

rproffitt 2,701 https://5calls.org Moderator

Been on the road and visited a relative. They had a laptop that would not connect to the router. No problem (never think that.)

I did the usual forget the network, etc. but it took an OBSCURE trick to get it to work again. I haven't found out why this works but it does.
When you know the WiFi hardware is good, try the old forget the network trick but if that doesn't nail it, try a boot to safe mode with networking (it usually fails there as well) but on a proper shutdown and reboot usually comes back.

It's a mystery why that works.

rproffitt 2,701 https://5calls.org Moderator

The goal here is unclear. Sometimes folk want both PCs to show at the same time on one monitor. That can be done by going headless on one of the PCs and then using a remote contol app like VNC to show the other PC's screen in the PC connected to the one monitor.

Others may use another video connection to the (unknown make, model) monitor and select which PC to show with a "select input" button on the monitor.

How you do this depends on your needs and skills and what the monitor and PCs have for video connections.

rproffitt 2,701 https://5calls.org Moderator

Why does this code look so much like https://stackoverflow.com/questions/43950000/hackerrank-buying-show-tickets-optimization which is a post from about 2013?

It appears this is a online screening test of a company and is just one part of a longer app I see at https://pastebin.com/y34UERMj

ddanbe commented: Knowledge! +15
rproffitt 2,701 https://5calls.org Moderator

I have questions.

  1. Why is there so many blank lines?
  2. What stopped you from converting this yourself?
  3. More on question 2. What line did you need help with?
  4. Also, read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question