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

I wonder about that RTC battery. Remember I'm an electronics designer among other things so I went looking for why a 3V cmos battery would be over a dollar.
https://www.google.com/search?q=P000563990&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjyk7CnqaLVAhWFllQKHQo4AGAQ_AUIDCgD&biw=1536&bih=731

It looks like a classic CR2032 battery in some cases and in others where some prongs were added or a cable. That is possibly why it's more than a dollar. We keep a pack of CR2032's on hand and get them in bulk.

If I ran across one with a cable I can replace the battery and reuse the cable. Little snip snip, solder and electrical tape and I'm done for a dollar.

Call me cheap.

As to the module, let's hope that clears it all up.

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

My thought here is to replace what's broken. Getting an answer from the maker to "what happens when the cable is broke to the NFC?" is unlikely. I don't want to tell you how much that module will cost as costs change from mass production to FRU.

My other thought is that over the years I've seen way too many error messages that were incorrect. So the BIOS might actually be seeing the missing module and the error message is incorrect.

Finally, what voltage is the old and new battery? A Volt meter is not optional for repair work today but you will find techs missing that and a few screws loose.

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

@j, it's odd that you are trying to boot an OS just yet. When you start with a new build you try to get the BIOS to show. If the BIOS won't show, then it's not ready to install or run the OS.

I take your questions seriously. That is you ask something and I'll take it this is what you want to ask rather than the old "I built a PC and it's dead" question. That discussion is out there in the thousands.

If this is the old I built a dead PC question, you start small. No case or drives are required.

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

Just thoughts.

  1. Watch https://en.wikipedia.org/wiki/Nosedive Some folk are already there.
  2. If you are competing with Imgur and Reddit, you have to find a way to be different.
  3. I looked at your prior posts and find titles like "How do I create a website that sells social media followers?" That's a market no one I know wants to get into.

Finally, if you have been at this for years and it's not working, take the advice from Warren Buffett about the hole. If you find yourself in a hole, stop digging.

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

You asked 2 questions.

  1. What do I need for cable?
    The same as what we need in a case. Maybe a few less connections. Hookup varies a little from PC to PC so check the product manuals on what connections are needed.

  2. Do I need a dedicated PC monitor to get IP address?
    That's a simple no. There are many examples of machines that get IP addresses without a dedicated PC monitor. However if you are building a PC you likely want a display so you can install an OS and see what's going on.
rproffitt 2,701 https://5calls.org Moderator

I wonder if this is the usual homework assignment I see at https://stackoverflow.com/questions/7971950/sql-find-names-of-students-who-enroll-in-all-courses

It's a shame the course lacks building your skill up to this point. Go back over the prior material to find out how to build your SQL queries.

When asking a question, be sure to end it with a question mark so everyone knows that's the question.

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

Here's the one thing that stuck out to me.

I spent money on advertisement to gain 3500 likes.

This is simply a way to part you from your money in my opinion. I also read you want to be in the fake like market but that's a market that is well, to be avoided again.

As to funny images, Imgur and Reddit are tough acts to follow. Have you seen those two sites?

My advice. Focus on what your strengths are. Pivot to a new direction. Avoid get rich articles and schemes.

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

Good news everybody. HP does have Windows 7 64 bit drivers at https://support.hp.com/emea_middle_east-en/drivers/selfservice/hp-250-g5-notebook-pc/10180321/model/10180322

So keep in mind the order we install is motherboard, audio, video, LAN, WiFi and helper apps. You have a dozen drivers to go get and since USB fails you have to put them on CD/DVD (whichever works.)

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

Since no make and model, for now you call the maker and ask what drivers and in what order to install them as it can matter.

On some laptops you must install a helper app to turn on/off WiFi, Ethernet and more.

I respect everyone's privacy but please consider that without make, model numbers there's not much else to offer.

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

Re: Lint. As I've worked far too many systems with bugs that were traced to lines that Lint complained about, you can make bet on my view here.

Re: WALL and compiler warnings. After too many trips overseas to work with companies there, I used to pass on a warning or two. The cost of the trips were so high and in the end the issues were again traced to either design on warnings the compiler issued.

As to genenerating many messages, after a while you know which to focus on and here we are again, going over an app that has nearly unexplainable crashes.

After too many lost opportunites and upset clients you can take a second bet where I stand on code analysis.

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

Since you are building did you try it without the case?

Building on cardboard with the least number of parts is an accepted method to find out if what you have is working.

Examples are plenty but to save you a google try http://lifehacker.com/5774713/build-a-temporary-computer-case-out-of-the-motherboards-cardboard-box

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

Unused can be an issue. If they are declared in some bum way, well, when the app starts up the allocation can cause a fault.

SUN. Wow, blast from the past. I used those what in 1990? And later wrote install documents (did some tech writing) in the mid 90's.

Anyhow I'm very rusty on SUN OS but even if redirection doesn't work the output should be on the terminal window which you can copy and paste into the document you are using.

Also, isn't there more than > ? What about 2> ?

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

Since it's legacy code, either I have to dive in to every include to find it or use the old binary search method.

Remember I take it you are a seasoned programmer and just need to chat about how other programmers narrow it down.

If this was mine I'd check the compiler output for warnings and errors. For gcc, I use the -Wall command. It's kicked around at https://stackoverflow.com/questions/11714827/how-to-turn-on-literally-all-of-gccs-warnings for extra switches.

Also, be sure this code is run through LINT.

Once in a while I encounter a programmer that does not believe apps should be warning and error free or pass LINT. They tend to have the most devilish of problems.

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

Read the source Luke (!)

From http://php.net/distributions/php-7.0.21.tar.gz

Fopen wrappers ;
;;;;;;;;;;;;;;;;;;

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-fopen
allow_url_fopen = On

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-include
allow_url_include = Off

This means with the bona-fide PHP from the source you would have to do nothing to turn it on as it is already on.

Check your source for your PHP? Read the php.ini-production file.

gentlemedia commented: Yes, the production ini file is the one rhat I edit within WHM +0
rproffitt 2,701 https://5calls.org Moderator

http://php.net/manual/en/filesystem.configuration.php (documentation) says it's enabled since 4.x.

https://stackoverflow.com/questions/43543297/allow-url-fopen-is-on-but-phpinfo-says-off notes same issue but an odd fix at the end. I can't test that.

gentlemedia commented: The second link gave ne the answer +7
rproffitt 2,701 https://5calls.org Moderator

Let's make some other assumption that it is not the line 1 or 2 you supplied.

Did you try to debug the app further? That is, let's just exit on line 3 with exit() for a test.
https://www.tutorialspoint.com/c_standard_library/c_function_exit.htm

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

OK, all this but I never broached the "what is it?" question.

What PHP is this?

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

It's either the php they deployed or a reboot is required. Examples:
https://www.google.com/search?q=when+do+php.ini+changes+take+effect%3F

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

As you read they compile php with it on/off and don't seem to use a php version that allows changing it in php.ini. Yours?

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

The hosting can matter here. I wanted to be sure the php.ini was good before I noted where the host can control/override this with a custom compile. https://www.a2hosting.com/kb/developer-corner/php/using-php.ini-directives/php-allow-url-fopen-directive and links there tell us this can be host dependant.

That is, "Ray, what did you do?"

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

Too little detail. You didn't reveal where this was going to be saved. Be specific. MySQL? DB2? Jersey?

Here's an example: https://www.daniweb.com/programming/web-development/threads/193775/how-to-insert-checkbox-data-into-mysql

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

I'll guess PHP or such needs to restart. Look directly into the Sun? (nope, look at the php.ini file to see if the control/ini editor is changing it or not.
http://phpsec.org/projects/phpsecinfo/tests/allow_url_fopen.html

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

I'm unsure if you get it.

switch (rank)
            {
            case 0:
                if (rank == 1)

There's no reason for the if since the switch already tested the value of rank. Why if?

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

PS. I wrote to COPY lines 183 to 186 and STARE at them till the lights came up. Once you see it, you will know what to do.

Again. COPY the lines to some text editor ALL on their own. Think about what you wrote.

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

I wanted you to understand your code.

Why would test rank to be 0 on line 185 then to be 1 on line 186? We are not using quantum computers yet.

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

As to the missing output. You should run this in say Visual C++ (there are free versions) and break on the line to examine the values and then you can work backwards to why the value was out of range or not working.

I notice line 183 where you switch (rank) and then on case 0 test if rank == 1, that won't work will it?

In short copy out lines 183 to 186 and stare at it till the lights go on.

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

Look at your use of tabs on output. That won't be consistent from machine to machine. Here's a google about that.
https://www.google.com/search?q=inconsistent+tab+spacing+c%2B%2B

There's nothing really wrong there. Just how tabs work and why you should just build a string to output as you want rather than use tabs.

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

Take time to point out what lines of code for members to focus on. You dumped 300+ lines of code so where to start?

Read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question to see how to improve your posts and questions.

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

I can't answer why the W8 note. Might be some UEFI not handled issue. Why not put it on USB?

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

That's the message but does not tell me how to cure. As I read https://www.google.com/search?q=Welcome+to+emergency+mode! I see many fixes but not one.

Did you fsck everything?

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

A quick glance finds "<canvas id="snapshot" width="120px" height="80px"" so if you were to take a screen capture the image may be just that. 120 by 80.

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

@S, you can test my theory by doubling the width and height. If that works, well, back to the drawing board.

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

This may be working as designed. That is, you put the image in that canvas, width and height so that's all the pixels your are going to get when you upload. Try a much larger width and height.

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

Always add the time it took and what hardware you ran on.
http://www.mathblog.dk/sum-of-all-primes-below-2000000-problem-10/ shared code and times but I missed what computer they used.

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

A prior discussion that involves argv and seg faulting.

-> https://stackoverflow.com/questions/21670461/attempting-to-concatenate-strings-produces-a-segmentation-fault

Read the answer by jrr. It's a shame a small thing like this is hard for some.

Can you tell me why the simple solution is not used here?

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

this wat at least it allocates exactly the needs for the name,

If you work to allocate the exact space and it overflows, you get a seg fault. I offered a simple way but failed to convince you. Your choice here.

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

Your choice to work hard on getting the exact space it needs. Since it is seg faulting, your move. I know mine.

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

That's what many call "responsive." It's a concept you implement in your code and not something that is say, one line long or covered in a small answer.

Example priors: https://www.google.com/search?q=responsive+java
Graphic examples: http://imgur.com/gallery/3PE7T "GIFs That Explain Responsive Design Brilliantl"
Source: http://blog.froont.com/9-basic-principles-of-responsive-web-design/

You might counter this is about web design but it applies to apps as well.

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

Since this is C that line 2 where you declared the newFilename has an array with no space so it would fault on line 3.
Try simple like char newFileName[256];

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

I read your code 3 times and can't find a fopen for write. Just stdout.

So I think you are missing code before when it needs to do a little string work. That is, copy your argv to some string and concat what you want to that string, then open that for writing.

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

This is a common question for a new C or other language programmer. To know why I guess you could find books on the history of C and how it came to be. But it's mostly historic and you can code as you see fit. However, it is best to not fight the tide this time and learn how to code using the standard calls and accept that arrays and more start at zero.

As to the bit field question, that varies with the storage you chose. For Integer Types (noted at https://www.tutorialspoint.com/cprogramming/c_data_types.htm ) you have 1 to 4 bytes and since a byte (for most machines) is 8 bits that would be 8 fields per byte.

This can be considered arcana today by some. Let's say you are programming on an average PC today. Not much reason to encode data into bit fields. Just use variables to clearly state what you mean. In embedded programming bit fields are not going away. Some will open a debate on this. I think this quote applies here.

This has made a lot of people very angry and been widely regarded as a bad move.

Douglas Adams

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

Since you are using Visual Studio, pause at line 9 to get the command string you made in line 8. You can then test that command with your choice of sqlcommand ( https://technet.microsoft.com/en-us/library/ms165702(v=sql.105).aspx ) or tool of your choice.

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

@S. It's up to you, but I think you need to reconsider the use of textarea since no rich text there.

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

If you want what DANIWEB uses just message Dani about that.

It's a markdown editor AFAIK. https://www.google.com/search?q=markdown+editor

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

How can that work? https://www.w3schools.com/tags/tag_textarea.asp does not tell us that textarea supports rich text. Maybe that's why it's not done that way at all.

I think you have to host the content/text somewhere like Google Docs does. Maybe it's a deeper problem after all.

I checked again with a simple example at https://www.w3schools.com/html/tryit.asp?filename=tryhtml_elem_textarea

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

Think carefully about line 29. As i is counting up, stacksize is counting down. What do you think will happen?

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

While those sound like a collection of questions from a programming class, I see your prior posts so you've been at this for years. By now you know how to do research but this is not why I write. I think you could devote a chapter or an entire book to answer each question.

That out of the way, why these questions? Let's hear more about how these came about.

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

That's your best clue -> "two identical files on my desktop".

Microsoft's implementation of long file names is well, a hack that is one for the history books. You found what it was.

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

@G. Yes, and the file system + rsync is not playing ball. Time to try another sync app since a manual copy works. While rsync is open source, it's the OP's choice to dive into the code to find out why. Here, I continue to run into such things and over the years learned to change to other tools when a tool doesn't work for me and I don't feel like opening the source.