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

Hello Mr. M.

I want to comment about 32 bit here. Over the past few months at the office we've been clearing the office of old gear and computers.

Along the way I found that old 32 bit based computers are definitely at a disadvantage since I didn't find current distros for Linux and ChromeOS.

Yes those laptops are about a decade old but the last time we did this, we loaded up either a Linux or ChromeOS if we didn't have a Windows for the machine then off it went to new owners.

-> It may be time to move on from 32 bit.

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

I have thoughts about this one.

  1. Since it's float, just declare the value and be done.
  2. Use the old pi = 4.0 * atan(1.0)
  3. See more than 74 other solutions at https://rosettacode.org/wiki/Pi
rproffitt 2,701 https://5calls.org Moderator

Cite sources please. "Reported coronavirus deaths, per day, in the U.S." looks to be well under half what it peaked at.

Sadly a lot of the US state leadership seems to be in denial there's a problem.

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

According to what I can find you launched on April 1, 2021. I would have stayed quiet and avoided that date.

I also see a flurry of spam about this new service. Some were removed (I mod at a few forums.)

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

I'm guessing you need a tutorial on the disable.

https://flaviocopes.com/how-to-disable-button-javascript/ looks good.

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

Let's see the code you tried.

newnew1234 commented: #include <iostream> #include <fstream> #include <string> using namespace std; void read (ifstream & in, ofstream & out) { int a[20]; string temp; +0
rproffitt 2,701 https://5calls.org Moderator
A-33 Gaurav commented: Thank you so much, its really helpful +0
rproffitt 2,701 https://5calls.org Moderator

I don't think there is a tutorial about using the Daniweb editor but maybe you need something before that.

Here's a tutorial on copy and paste which should be fine for Linux, Apple OS and Windows.
https://itsfoss.com/copy-paste-linux-terminal/

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

If you have a new question, that should be in a new discussion along with the details needed to work the question.

Here, I have no way to guess what you meant by your comment.

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

So much was left unwritten here so I'll write about how we go from nowhere to app.

There are many articles about how to design and code but let's try it this way.

  1. Do the work manually.
  2. Write down each step you did in detail.
  3. Now select your language, development system and then.
  4. Using your manual steps, craft code that does each step.

This may look messy but it is a way to get from nowhere to the app that does what you did manually.

Cow cow commented: ok but now i writen code about the scrapped data,but not idea to link together.May I ask for example or any keywords to show me. +0
rproffitt 2,701 https://5calls.org Moderator

I rarely see others write such today since it's the old "letter frequency" problem which we can find over 100 solutions at https://rosettacode.org/wiki/Letter_frequency

There's other subsets there under "Other tasks related to string operations:"

In other words, something of a well worn function done to perfection.

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

I see no code here so I can't comment about the code as it is. Without that and the txt file all I can offer is that you should check for duplicates before saving it to the txt file.

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

Try to make your topic title match the subject or question.

For this question I'd use my onboard help or read articles like https://itsfoss.com/start-stop-restart-services-linux/

As we see here it may matter which Ubuntu you are running.

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

No.

A-33 Gaurav commented: Can you tell me which Sorting Algorithms follow 'Greedy' technique? it would be really helpful, Thanks in advance +0
rproffitt 2,701 https://5calls.org Moderator

I've scoured https://myaccount.google.com/ and more and it doesn't appear to be a Chrome or Google account feature. That said, Dani is spot on.

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

I think you need a better example. I'm currently logged in on my phone, laptop and another tablet with Chrome. I can only guess there is some Google setting I haven't explored yet.

Rico_2 commented: i mean like i just can one time login +0
RC_820 commented: i mean like this now i login in mozila browser then i open another browser like chrome if i login in chrome yang login in mozila will auto logout +0
rproffitt 2,701 https://5calls.org Moderator

While I know this is the currency for Roblox, why should anyone do this?

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

I'd use the find() method. The tutorial is at https://www.w3schools.com/python/ref_string_find.asp

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

Sadly, no compiler I know will print "welcome Student" so my bet is something is lost in translation. I won't guess what you meant by that comment.

Remember, you must do your homework. Folk here might help you past a rough line of code but never have done the assignments for others.

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

Frankly, I'd replace the line with readkey with a simple readln(age). Now to detect they want to exit we check the string length.

-> Side note. Next time post with a code paste so line numbers show up.

The replace for the line with the if ch = #13 would be something like:

if Length(age) = 0 then
Source: https://www.freepascal.org/docs-html/rtl/system/length.html

I'm sure you can correct the else if from here on out but there was no need to have more than "else".

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

Please Kazi, you should be writing tutorials here.

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

Please read https://www.daniweb.com/welcome/rules next. From there you can add where we go next.

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

Thanks for the code but it doesn't make sense to me. I'd use an array as noted in the first link above. With that we can iterate through the array. Or just print out the item we want.

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

If the Daniweb posting or formatting system is too hard as to how to post code, then just paste the code in it's own reply. Someone may fix it for you but at least we'll see code.

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

To me an array is a variable. But if you look at example 1 at the link it puts them into an array. Let's say you don't want an array so you can copy each item in the array to another variable as you see fit.

Papa_Don commented: I'm not sure I understand. Here's what I've attempted, but it isn't working: +6
rproffitt 2,701 https://5calls.org Moderator

What are "buckets"?

Besides that, I see example 1 at https://www.dotnetperls.com/split-vbnet seems clear.

Papa_Don commented: I don't know how to post my code here. Help! +0
rproffitt 2,701 https://5calls.org Moderator

Very little is told about the PC. The usual first test is to boot some other OS (I use Linux) from USB and see if that's it. If that works we discuss reloading the OS. But what OS? And maybe it's supposed to be Chinese? Again, so little is told so one last thing. It is, at a few months, under warranty so why would we try to fix it?

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

Must it be in Vietnam?

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

This looks like a "do my homework request." Please read https://www.daniweb.com/welcome/rules

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

Here's the rig I use. Compiles are well under a minute.
-> Acer Predator with i7, 16GB RAM. SSD drives and some GTX 1060 GPU.

Your machine most likely could be vastly improved by replacing the HDD with a SSD.

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

That sounds like progress. If so, huzzah!

Now about that hard disk drive. I'll share that we encounter far too many Seagates so if it's a Seagate we usually can guess it's that.

-> Here's the quick test. We use SPECCY (what is, where is, how to use is all over the web.) Install and run Speccy. Now skip to the hard disk SMART values and if you see values 01 and/or 07 off in the thousands then the drive is beyond suspect. We now have dozens of good to near new used HDDs as we swap so many over to SSD so for charity cases we'll pull one of those, clone the drive and re-test. If the OS is too banged up, we do a clean install. The old HDD can go into some under 10 buck USB HDD case for the client to copy their files out.

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

I've worked with others on outsourcing for over a decade and never found it to be due to the country.

It's still the quality of the staff and let's add this: Your contract. Some contracts forget to add metrics about quality.

PS. Between my buddy and I we've been to Russia, India, China, Taiwan, Columbia, Canada, USA and other countries. It's always been a people, company and contracts that drive the quality.

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

You must show effort. Read what is written about homework at https://www.daniweb.com/welcome/rules

Also, what stopped you? Be specific as it must be your code you submit.

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

I think I've found your requests on another forum:

Kindly somebody advice on how to generate the signinkey and use it in cURL php section ?

While it's clear one can use the PHP hash-hmac-algos, the problem is not "code conversion." It's how to bring it altogether and make it work with some untold system you are trying to talk to. There's a lot of missing information and story here but given the above my bet is code conversion won't yield a working system.

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

The challenge has many challenges.

Let's start that Java/ Javascript is usually client side. PHP is server side so right there is a big pile of work to redesign this to be on the server side.

That's for the web master to decide how to do that. My concern was if PHP had HMAC SHA 512". It does so there's one brick wall down.

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

Some good news is that the SHA 512 looks supported.

I'm reading https://www.php.net/manual/en/function.hash-hmac-algos.php but decline to convert your code.

Arunshree commented: so how can we make this thing work?Except this signing key the rest api post method i written but without this key i cannot able to authenticate +0
rproffitt 2,701 https://5calls.org Moderator

The code as is works fine. Since there is no code to read the file and look for a match, all logins fail.

I see you tagged this as homework. Remember that you get to design and write the missing code.

Also, given that passwords shall NEVER be stored in plain text in a file, this would get a failing grade from me.

More at https://blog.moertel.com/posts/2006-12-15-never-store-passwords-in-a-database.html

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

I don't call such hacks but the old tech method we call "make it smaller."

We don't need the boot drive, no more than one stick RAM, and what else can go? Just yesterday I worked an 2013 laptop that was headed to the bin but I found that the WiFi card was causing issues. Given we have a bone yard to pull from I grabbed the first card off the pile and that cured that one. This is not me telling you that's it but in most laptops this is another part we can do without while looking for a cause.

-> I'd also consider a new CMOS battery since those are 25 cents in bulk here. We never test that battery (if we do it's 75 bucks on the bill!) We often forget to charge the dollar for the part as we work the problems out. It's a cheap part, can cause issues yet some clients want to debate or test it (and if they do, we add 75 bucks to the bill.) To this day I can't guess why folk spend more than a minute on that item.

RECAP: MAKE IT SMALL AS POSSIBLE. If you want to boot an OS go get something on CD, USB, DVD or if the machine goes back that far, diskettes.

Finally I want to repeat "make it small as possbile." Unplug all USB or other connections.

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

That's a lot of ground to cover. There are tutorials but let's check those tags you used.

Are you wanting others to cover "linked list" in c, c++, mysql(?), python and a very long gone 20 plus years ago VB6?
You should narrow this down as well as think about a tutorial about one language at a time.

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

As noted at https://www.daniweb.com/welcome/rules you must show your effort and expect no one to do your homework. But if you get stuck on something specific, ask about that!

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

Some tend to be a pedant about this. For me, I'll skip past this to try to get to the person's real question.

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

There are many reasons for this. HOWEVER this appears to be a laptop from about 2007 so old age may be the cause. If the owner is attached to these we find a working model on eBay and make a good one out of the two laptops. For those that don't do this a lot, it's usually the motherboard that has failed.

This unit ( https://gatewaycomputers.fandom.com/wiki/P-6822 ) is a 2007 or so Core2Duo laptop that no shop would take in for repair with warranty.

https://www.ebay.com/b/Gateway-Intel-Core-2-Duo-4-GB-RAM-PC-Laptops-Netbooks/177/bn_16046298 finds these go for about 100USD.

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

Please read https://www.daniweb.com/welcome/rules about homework and more.

Lonely_2 commented: Sorry I forgot to read that +0
rproffitt 2,701 https://5calls.org Moderator

Remember I can't run your code but if you are telling me lines 27 and 29 fail, that's what you should focus on.

Tutorial is at https://www.w3schools.com/php/php_superglobals_get.asp

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

As I read https://www.php.net/manual/en/reserved.variables.server.php I see issues with your register.php

Line 3 - Gets the IP.
Line 7 - Appears to get the IP.
Line 9 and 13 appear to do the same (get the IP address.)

Read the manual and look at items that return a name such as 'SERVER_NAME'.

Sourav05 commented: Sir I don't wanna print the 'Server Name'. I want to print the name along with IP which is being sent from 'client.php' in 'register.php' page. +0
rproffitt 2,701 https://5calls.org Moderator

Try again with a fresh discussion as there doesn't appear to be any "Reusable Code Snippet" here.

Also, read https://www.daniweb.com/welcome/rules about assignments. You must show effort.

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

More detail would be required. As I read from https://www.google.com/search?&q=add+windows+7+to+grub it appears we have to know which grub is in use and to be safe, which Linux.

After that I might share a direct link to what I would try.

That said, last month I did a clean install of Windows 7 SP1 (that's what was on the install media) and what a mess. The default browser barely worked. It failed on all https sites until I googled on another PC as to how to fix that. There were other issues too but it was for some legacy system and older user that couldn't get past their misconceptions about W10. I rarely do this sort of work but hey, got paid.

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

Released in September 1998, Visual Basic 6.0 is rarely found today and certainly not used for any new app.

That's 22 years ago and given you can barely get the system to work on today's Windows 10 it's unlikely to find help.

Why would you need to do this on such an outdated system?

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

Besides the 3 tagged languages you offered (C, C++ and Java) most will try such in their choice of one or the other language and not all three.

Also most of us will design the app before writing code. That is, design the user interface, input, output, data design then the coding begins. Sometimes folk want to code before design.