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

May have to go nuclear. Uninstall all that, and on a new user account follow your document on how to setup the environment.

Make the new user account an admin. I've run into such errors on company PCs where they don't give up the admin account.

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

Here's my view.

If you are going to write for embedded microprocessors (think tiny!) then C.
If not, just bite the bullet and start with C++.

Now if you are writing Windows Apps I think C# is great. I used that for some of my best apps. They went out to the field and were the least trouble of all our apps.

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

Above I commented about Divisibility Rules. Just that on google gets you articles like https://en.wikipedia.org/wiki/Divisibility_rule

These rules were handy when you were coding in assembler or ₛₘₐₗₗ machine or language.

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

Sorry about that. They redirect now but since it appears you have some RAID, you have to check out what they say about that before buying. It's not like there is a monopoly on password resets but in your case you seem to have a RAID setup which may require help.

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

Your code would do some very odd things. But first, name your variables and CONSTANTS with meaning. You use the word PRIMES and yet I see nothing in the assignment about primes.

Line 8 to 14 are your for loop collecting what looks to be numbers to be checked and then a variable count is incremented.

Finally line 16 and 17 are a true mystery as why we would expect this to not crash. Very strange to use your loop variable i outside the loop.

You may want to refactor this one.

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

By the way, I never noted spowersoft. My exposure to paid password resets which is rare since we have NTPASSWD or other methods is www.lostpassword.com.

Be sure to review what you buy so others will know.

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

The usual story is that the owner installed Windows but omitted the usual updates from the laptop or machine maker for BIOS, drivers and apps. I've run into cases where the BIOS had to be updated, always had to get drivers from the maker (not Microsoft since their PCs seem to be automatically supported) and then for some machines Apps that control things like sleep.

Your OS install may be finished but what about the post OS work?

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

@J

You ask why you can still boot on it and use it? The answer is it's not totally wiped out.

I can only guess at the real problem since I'm not there. The only time I see all the usual fail (lostpassword tools, Linux and what I mentioned so far) is in non-mainstream setups which you would have know about since it's your server. I have no way to tell you how this server differs in RAID, encryption or other. Something is different but what is it?

Then again I have had discussions and the OP actually didn't try all that was suggested. My guess is they were hoping for the magic command to fix it.

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

@J, so www.lostpassword.com tools fail as well? That's terrible. It looks like the usual pull the drives and send them to drivesavers.com is next since Linux and lostpassword.com has failed. This is one rare server setup when Linux, password tools and removing drives fail.

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

@AssertNull. When the old System() call ran from old TurboC which they didn't tell, a new instance of the shell can start without the admin rights. If yours worked then it could be something in your choice of compiler. We may not know untile the OP posts back.

The code does look primitive to me in the use of System rather than API calls.

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

No hello first? I can imagine what will happen if you burst into the room and blurted this out.

Read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question then try again.

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

Sorry but this looks, what's the word here? Primitive. It also doesn't look to be for many versions of Windows today. You can imagine what chaos would happen if this worked today.

I will mention that a System call should degrade rights.

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

The link gives me a 403 forbidden.

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

Your post and question self answers. If you can't create or manage then you answered your question but maybe you didn't ask the right question.

Try again?

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

[Editor's note: As of PHP 5.4.4 this is no longer true. Integral strings that overflow into floating point numbers will no longer be considered equal.]

From http://php.net/manual/en/types.comparisons.php

But the number is not large enough for that to happen. I don't know which version PHP so for now, test this by calling these ints by adding (int) to the values in line 2.
Read how at http://php.net/manual/en/language.types.integer.php

Lastly, be sure your png graphics are what you think they are. Check those again.

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

Here's an issue. Code works as I read above. The issue is that I would be guessing what the code was supposed to do. As code can work incorrectly but work you need to add more about what your specification so that others can comment.

We know that some students dump homework here and there is much written about this behavior. It's also why you don't see folk handing you working code back most of the time. A good reply after you tell what the function is supposed to do is usually in psuedocode that you turn into real working code.

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

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

@a, now I've really worried that you told the truth about new to this. Did you skip classes and not complete prior homework? The reason I ask is what you supplied is the beginning and classes build on prior lessons adding as you go.

I would find it hard to believe you were given this assignment without having to write a small thing that would ask for some information.

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

I want you to think if someone gave this request to you just like above. You may wonder why they were so short and more.

Read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question so you know how forums work then try again. Remember that if you are hiring or paying for this work to supply that pay rate and more details.

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

I found no question here. There's the assignment but no question. Also, this is not urgent as in "my socks are on fire."

Read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question then try again by showing your work, where you are stuck and then the question.

I think it's worth saying that folk rarely respond with a full ready to submit program code for you to pass off as yours. Sometimes new members don't know that.

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

@J. Yes, it could be getting worse. This is why pro's often pull the drives to clone or extract what can't be lost first.

As to NTPASSWD and such, it appears the free stuff isn't flying here. Time for lostpassword.com.

The reason the free stuff might not be working is if the drive setup is RAID or on a non-standard controller.
https://www.google.com/search?client=opera&q=ntpasswd+on+raid+windows+server or similar discussions broach that.
I won't because I am not there to see if there is a way.

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

This may be your assignment for those that want to see it well formatted:
http://www.ele.uri.edu/faculty/sendag/ele208/labs/lab06/lab6b.pdf

While I've written a lot of assembler over the years, it appears this is something other than a real microprocessor as I read https://en.wikipedia.org/wiki/LC-3

As such you might not find a lot of folk that code in this variant. Maybe that's a good thing as the more you code in Assembler the more you learn how different it can be from micro to micro.

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

I get the feeling you want to debate if a return statement is required. This is a well discussed area and I will not debate this. If this was submitted as a class assignment you would be marked down a grade level. Why?

But in the end, flowing off the end of a non-void function still is undefined behavior. It might work on certain compilers, but it is not and never was guaranteed to. - https://stackoverflow.com/questions/32513793/c-and-c-functions-without-a-return-statement

So my question to you is why there is no return there. You need to be ready to answer that to your boss or professor.

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

Why doesn't void split() have a return statement?

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

I googled that and found php examples out there for other API's. Example http://www.phpzag.com/convert-currency-using-google-api/

I know folk hate to do research but today, you can save a lot of time and get there faster with a little effort.

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

You need to read how to ask the questions but https://www.codeproject.com/Articles/675908/Linear-Equation-Solver-in-Cplusplus can be inspirational. Sparse arrays and more ideas to avoid initial and limiting design decisions.

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

Just a tip. Many wheels can be had from stock. That is, functions like the test for prime has many ready to use solutions. Bolt that on and run.

Look at the is_prime() function in C at https://rosettacode.org/wiki/AKS_test_for_primes

Rosettcode is a treasure trove of ready to use functions.

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

Windows you say? While I no longer have W7 to test on, I have a small app my client uses and for Python install I used the Python from Ninite.com. Here's why:
https://www.howtogeek.com/201354/ninite-is-the-only-safe-place-to-get-windows-freeware/

If you still get that error, use google and that error message or just the first part of the error message excluding the "in c:" part.

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

Some machines are very picky about bootable USB. I switch to booting CD/DVD next.

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

That's not good. Because of many reasons, this may be the end of that HDD. The password could be in the BIOS so go there and turn off the HDD password. If you don't know your laptop's password be prepared for an awful day.

To stop theft the makers implemented this and so far you can't remove it without a call and proving the laptop is yours. This is how it should be. It's really helped curb laptop theft.

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

For Windows Server I would try NTPASSWD (tutorials and more are on the web) then if that's a no go then www.lostpassword.com which is cheap compared to a clean install and restoration from backups.

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

For this, I would NEVER write these as these are what I call wheels. Remember I take it that you are not doing this for homework and want solid tested well used solutions. Again, these are what I call wheels. You go get them, slap them on and test.

https://www.google.com/search?q=strchr%2C+strcmp%2C+memset+for+MIPS finds them. Example?

Read https://git.sphere.ly/Kevinjoa/bionic/commit/1d824c39127764ab50b01ee2ed8bcdb6a59d48cc which has the assembler versions.

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

This is usually a filesystem, app or FAKE STICK issue. Which one is it today?

Check that stick out with other tools like https://www.raymond.cc/blog/test-and-detect-fake-or-counterfeit-usb-flash-drives-bought-from-ebay-with-h2testw/

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

So a form inside a form? Or will a Window on top of the app? Only you know what you want here.

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

@J

If it's just an account password issue, www.lostpassword.com is my advice when NTPASSWD (see google) doesn't cut it.

About your second question. Many Microsoft versions do that until the OS is installed. You might have to install a driver or activate a drive after the installation.

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

As a student you would know how to research. That is, use google, wikipedia and more. What else you need to know is how to ask questions here. Please read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question

Back to your work at hand. You have a concept that has been done before so what is the goal here? Make a wheel or try to build it from scratch so you understand how it all works from the ground up?

It's unclear what your question here is. Be sure to ask the question after you read the link I supplied. Be sure to write it as a question that is followed by the usual question mark.

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

$.ajax is not a function sounds right to me but I'm not big on your code. Sometimes folk get code from the web and it's just broken.

PS. Adding with edit. Did you check for syntax errors by opening your browser's JS/debug console?

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

A thought on how to debug. Start at line 100 and comment it out. Does it work? Nope? Comment moving up from line 100 till you find the failing line.

I have to ask, do you use a system that you can single step and watch variables, etc? It may be time to get a bigger boat.

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

I would not worry about Edge as I read other complaints at https://www.google.com/search?client=opera&q=ajax+fails+on+edge+browser

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

Not a bad start. I worry that you are selling blogs here. Let me comment that I see less and less folk follow the blogs.

What's working around here are the video blogs.
Example: "Leonard French, your favorite Internet copyright attorney."

A fine example where something that can be interesting to some is moved from where it would be far too heavy in a blog but works in a video blog.

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

I'm going to answer you another way. Look over the 48 implementions of Tic Tac Toe at https://rosettacode.org/wiki/Tic-tac-toe

It's a well down routine without any need for AI. But if you insist, the studies are done. Example: https://www.ntu.edu.sg/home/ehchua/programming/java/JavaGame_TicTacToe_AI.html

So did your class build your AI knowledge before the homework or were classes skipped, the course isn't a good one? There have been classes that the teacher well, was not engaged, going through the motions.

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

Your solution is fine. If they change the PC in such a way, it's not the same PC and they will have to get a new key from you to unlock the app.

That aside, other ways have been kicked around. You can research those at https://www.google.com/search?q=generate+unique+PC+id

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

How. Just googled a few lines of your code to see if others are commenting as duplicating answers and effort is not a good thing.

As to your issue, you are in Java so you would debug it. How?
Read https://www.eclipse.org/forums/index.php/t/81620/ so you can step through your code, a line at a time and see where your variable or items go off the rails.

Few will read 100+ lines of code. Why? Read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question

Reduce your code to just where the problem is.

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

Actually it does paint a clearer picture. Here I find a lot of admins with multiple OS skills. I worry when an admin asks if they can download Linux. At some point they should have done that, ran that, picked up the skills so they are ready to boot it and get the user's files out.

It's very old advice I handed out. Check out the date at http://tips.oncomputers.info/archives2004/0401/2004-Jan-11.htm

Me? Just a person that has been on so many projects over the years from the GE-310 and on. CP/M, DOS, Windows, Apples, Linux, Windows 1.0, NT to present day. Ran a repair shop, worked on firmware, hardware designs, wrote in assembler and many other languages. Apps galore over the years from embedded to factory automation to SQL to well, what next?

Now working on things like Android apps which as you guessed is Android Studio on W10 and for CVS, still sorting that out.

Along the way, you run into a lot of recovery disaster jobs and stories.

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

Turning off should be fine as I've yet to encounter or read about a "shutdown and we'll spread" ransomware.

-> How did you recover from your disaster last year? I read we talked about backup and now here we are again.

Antivirus would be nice but doesn't stop everything. This is all about us, backups and not installing ransomware. That is, I only read where the owner/user installs the ransomware. And since they might overrider the antivirus and have, just having antivirus is not enough.

You've answered part of my question. I worry that the company is hobbling the new IT staffer.

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

I wonder if there is more to the story. Sometimes a company will remove the tools required to do the job.

For example while I have NTPASSWD (which I don't need to write about as we have google) every once in a while the IT staffer is forbidden to google it up.

Or they are not allowed to pay for lostpassword.com, buy a spare HDD to clone to and so on.

Is anyone impeding the work? In other words, this should have been completed by now. What's the holdup?

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

Sorry but Linux has been downloadable for decades.

Also this -> http://tips.oncomputers.info/archives2004/0401/2004-Jan-11.htm

That was over a decade ago. No learning Linux. Just boot and get your files out. Be sure to use a more current distro.

-> I want to pry. What IT staff that admins Windows Server is this? I won't beat them up but it sounds like they are very new.

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

That's OK. A mirror is just a real time copy but won't save you from corruption and a lot of other failures. All this means is you can pull it or boot Linux to get to your files.