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

"Ok on this router under the firewall Switch there was these options:"

I can't be your router/firewall support here. While it looks as if someone was locking down the network, you also will find that these lockdowns can interfere with access to your server.

Maybe you shouldn't be hosting this service?

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

If client and server are on the same LAN, then the client uses the server LAN IP. This works as you told me in your first post.

If your client is outside the LAN, then you use the external IP and port forward on the router.

FINALLY, if the server is on WiFi some routers do not send packets to the WiFi PC from the WAN. It's a feature of the router's FIREWALL. As a networker I don't expect seasoned networkers to know that one!

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

The WNR614 I looked up does not have the DSL modem in it so let's hear about the old Dlink Router. Model number please and let's see if it's one of those Modem and Router combinations.

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

Sorry I had a memory lapse here. First read http://www.w3schools.com/sql/sql_top.asp

Aha, you can get the top 10 percent from a query. For your idea sort by zip/postal code.
But the next problem is how to get the other records.

I'm think maybe we have to get the row numbers from 3 top queries. The the record numbers will be used like we read at http://stackoverflow.com/questions/7332731/sql-server-select-top-10-20-results

Sorry if I don't write this for you but the next day and another run at it seems to find it may be doable. For me I'd be doing this in code since that's how I use MySQL. Be sure to check how TOP works in your version of MySQL.

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

Without commenting on networking skills.... The server is not what I'd touch. The client needs to find this server so whatsmyip is run on the server. And you supply that IP to the client.

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

My son decided to not do ANY community service and is now paying the price. No prior experience.

As to up to date knowledge, the field is always in motion (nod to the green guy) so I'd rather see folk keep the basics in view. That is, one of the companies I work with lost a year battling bugs for very simple and what I call basic reasons. While we can debate if outsourcing is good or bad, the coders ignored all compiler warnings and under their leader's guidance turned it off because "it's a distraction." That is, it worked in test so it's OK.

If there were canaries in this coal mine, they would have caused the canary to go extinct.

I'd consider heading back to your schools job office for any work. Even as a TA or volunteer.

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

Nice enough PC. For this one you plug it in and the battery charges up and you use the laptop. All battery operations are fully automatic and can really upset folk that want to control it all. It's just another Lithium battery, not subject to the issues of NiCAD and NiMH.

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

I think the lack of replies means you have to tell more about what's broken. If possible try to code it up on IDEONE.
https://ideone.com/Vc0043 coughs up an error on the line system() so you also may have to reveal your compiler setup.

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

The specification here is unclear but if I were to guess you want groups that correspond to 10% of the total by zip/postal code.

I don't see how I could get that 10% (or other numbers) without some trial and error. That is, you know the total count so let's say that's 1 million entries. To get 10% or 100,000 entries from a zip/postal code range is going to take us trying SQL queries until we get our 100K count result.

Now what if you wanted to change that spec to be "I want to randomly send something to 10%"? That's another question altogether.

For now, since there is only this one case, you should bruteforce the query as it's just this one case.

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

Ouch. I read https://netsparkle.codeplex.com/ to see this hasn't been updated since 2011 and comments like:

Documentation on how to use this and what to expect is missing. Also it's not clear what scenario's are supported.

Since the product is in such bad shape you have choices to make here. Mostly about decoding how it works since the documentation is in sad shape or deciding if you want to get into the sparkle dev team to help sort it out.

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

If you want to get into it read http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries

There's a lot of myths out there, including that idea you gave about break in.

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

That's news to me. Here I get years out of laptop batteries and I never did any of what you wrote.

I don't see the full make and model so I can't check if it has the battery life extension feature. That feature to me was just what we needed for folk that worry about battery life span.

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

I'm going with no. LiON and such batteries do not need breakin or such schenagins. I guess if you want to wear out a battery like that, go right ahead.

Here, only use the battery when I have to and not because it has a battery. These are still 300 cycle devices (we can but won't hold a long discussion about what 300 means.)

So here, I set it to battery saver mode, which charges to 80% and then use my laptop. There are folk that remove the battery, refrigerate it and more to "save the battery." Here I get years out of a battery with my oldest laptop over 10 years old and the battery gets me over 50% of when it was new. Which is fantastic compared to folk that worked far harder than I did.

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

Mr.M.
Tipping my hand here. While I did write router code in the '90s that doesn't mean I'm the best at explaining it all. Hope you can muddle or muggle through this one.

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

192.168.8.100 is non-routable and not an internet IP address. The client would not use this as the server IP.

There are a few ISPs that do something strange and your "internet" IP can be 192 or 10 based (non routeable) but I guess this all new to you.

https://www.google.com/search?q=what+is+my+internet+ip+address&ie=utf-8&oe=utf-8 should show your internet IP address. This for most is what the SERVER IP address would be. After that, the router would be configured so your server gets the messages.

Mr.M commented: Clear enough. Great +5
rproffitt 2,701 https://5calls.org Moderator

Remember you didn't reveal your internet IP so I'll use something in the example.

Your server behind the router is at 192.168.8.xxx.
The router the server is wired to has it's port forward or DMZ setup to reach 192.168.8.xxx
To connect to the server your server IP is the internet IP the router obtained, which is not 192.168.8.xxx

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

That's a non routable address. So there's your problem. The server IP would be the one you get for the WAN interface.

Since you are on the internet, and your app works for the LAN, you have to put up your server just like you noted, expose it to the internet with either port forwards or the DMZ entry and on the client the server IP would be your internet IP. Not your local IP.

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

Since the server IP address and more is not told, I can't see if there's a basic mistake I've seen before. You don't have to tell the full address. Just the first 2 numbers like 192.168.x.x and then I'll know.

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

I don't know where to start. There's so much wrong with the given code such as "myServer IP Her" that I can't tell if your IP plan was even close to being right.

Hide the details at your own peril but as it stands my bet is your system is OK but setup is a PITR. You are making requirements that run of the mill gamers can't do. I'd start a discussion about P2P comms that don't rely on configurations of the router.

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

https://www.virustotal.com/en/file/7bbc9eadfa71d0610586403a0ef25bea06693447d9ebcb1e088867a0ead58a64/analysis/1470753671/

That's an .exe and not source so I ran it through VirusTotal. There's no way anyone here will run your possibly infected .exe.

Here, I see the members work with source code. And while I may know a thing or two about network programming, this exe is not going to be useful.

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

When this happens to me I boot Safe Mode to try again. If a file (does not matter if it's a font or such) must go I boot up any of the current Linux Live CD/DVD/USB and get it done. No learning Linux. It's just boot, click around like Windows File Explorer, click on the file and press the delete key. Really old version of my answer is at http://tips.oncomputers.info/archives2004/0401/2004-Jan-11.htm

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

PS. Just some observations from the field. If you get a collection of BSOD codes, the number of times it's been overheating, overclocking or malware is "too damn high." I don't see any PC detail so if it's been years since it's been cleaned, it's time.

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

While some don't want links about such, my thought here is that you'll have to code this up.

But how to get your web pages into files for you to process later with your parser then later to the the database?

I'm thinking cURL. As in https://en.wikipedia.org/wiki/CURL

So the psuedo code would be get all the pages to files with a script that curled the content.
Next you parse it all with your own design to hold the content in some text file ready for the final step.
Finally you write an app to read all those results and file them into your database.

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

The thing is, that alone rarely has lead me to a cure. The one time it happened here it was a failing HDD. There are plenty of PFN_LIST_CORRUPT discussions which you can read and see if you think they apply.

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

While PC users eventually learn "we only lose what we don't backup" just last month it happened again and one of my clients had me try to recover.

This time RECUVA saved the day.

-> BIG HOWEVER !!!! <-

Since we can't run the OS or install apps the HDD was put into some USB case so I could run RECUVA on another PC to get the lost files copied out before they were overwritten.

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

I take it you won't reveal further details. At this point treat it like the dead PC and strip it down to basics, replace the usual heatsink compounds, the CMOS battery and see if it comes back. All that work is on youtubes and more. If this is your first foray into PC repair, then let's hope you have a wing man.

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

By all means stick with web programming and management. The articles about jobs in that area say it's one of the places to be. What I see is not many places need the from the bare iron to web serving but programming and fixing things that clients broke.

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

Sorry if I was too subtle. Finish telling about this PC, make, model, and why is this fan needed at all? Why did you clean it? Overheating much?

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

That's why I took a side trip to that link to double check if the LAMP stacks included Python. It looks like they can.

So it's entirely your choice of what to run on the backend, http://1stwebdesigner.com/php-vs-ruby-vs-python/ is inline with my thoughts it's well accepted language but not as much as PHP. Why not stick with PHP for now?

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

Color me a little confused. All the stacks I know called LAMP have Python. There are five (well there are more than that) at https://en.wikipedia.org/wiki/List_of_Apache%E2%80%93MySQL%E2%80%93PHP_packages so if you have a LAMP, doesn't it have Python?

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

Remember to post the details you would want to know if you were going to work on your PC. You have 3 fans and a PC. That's not going to help must. Try tell the rest of the story like "It worked fine until I installed a new __!"

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

And now it looks like you have 2 posts on the same topic.

May want to avoid that.

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

How is this different from https://www.daniweb.com/programming/software-development/threads/505648/how-to-add-spaces-between-numbers

Also, I'd show your work so far. Read https://www.daniweb.com/programming/web-development/threads/435023/read-this-before-posting-a-question

In that read before posting you'll find that should always show your work.

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

That narrows it down to your password routine. I'm not privy to your SQL system but my suspect is that the encryption may product characters that can't be stored so you can test that by encryption a password (try "password") and then seeing the result from the encrypt function and what is in the database for that user.

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

In your top post you wrote:
$sql = "SELECTIDFROMadminsWHEREusername='".$user."' ANDpassword='".$pass."'";

Which reads to me you don't get feedback if it's the username or password that failed.

If this was me I'd examine the $pass from that line and my database entry to see if it's the encryption that failed or the username didn't match. That line of code doesn't lend itself to debugging yet.

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

You know about SQL injection so you will think that over.

As to the fail, you need to break it down to if it's the username (unlikely) or the password failing.

I can't see your database but most only allow characters so check your encryptor code that it only goes from character to characters allows for the column you are storing in.

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

While I can't find where you populated your database the answer to secure is maybe not.

I can't see where you sanitized the user input. That is, what if they put in SQL code in the user name. Do you remember Bobby Drop Tables?
https://www.explainxkcd.com/wiki/index.php/Little_Bobby_Tables explains it.

I worry about SQL injections on this one.

As to why it doesn't work I don't see the rest of the system but for now why not echo whether it's the password or the name failure?

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

I think you want a HTML result so next time be sure to reveal that in your post or spec. You used Excel so that's fine but PHP to Excel files is a whole ball game.

What's up with your current PHP code? Since I can't put it into some PHP fiddle I can't check it for you.

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

You may also have to reveal if the output in your picture was the result of some Word document, HTML, LaTex or other system.
Complete your "specification" since PHP output can be text or other depending on your php foo.

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

I know there are members that abhor just a link but here's a good example where if you know the right words, it might be easy to find the answer on your own.

To me this sounds like "Splash screen" and sure enough there's such in Pygame (or looks to be there.)
Try https://www.google.com/search?q=splash+screen+pygame

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

This is not the answer but to share how I debug such a thing. I hook up my device and run it over the Android studio USB debugger and break at that line of code to examine variables to see what's up. If I can't do that I've been sending up "toasts" with messages so I can see what's going on inside.

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

I'd reconsider it. That site looks to be selling drugs. In my country that could lead to unscheduled tme off line.

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

if you want to extract or split off part of a string then you use the Left, Right and Mid functions.

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

I'm going with no. I can't guess why C# but that could push a system into OSes and systems that cost in license fees and promptly removes your "free" requirement.

My advice is to forget any attachment to a language here and find your service that meets your price targets then create your apps using whatever OS and language works.

It's good to learn other languages.

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

I think the lack of replies is because you left out the details of your web server/service. You have a few tags but few words about your host and site.

My thought is that you need to consider leaving something that open and what it means. If it's anonymous, it can be a pain and you'll learn why fast enough. Here's the example. http://abc13.com/news/hs-seminar-quickly-went-south-after-students-asked-to-submit-questions-anonymously/974572/

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

As I read http://forum.arduino.cc/index.php?topic=42835.0 I think that's the quick fix. Make a function prototype in your code.

I think you're a C coder so I'll pause here.

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

Let's see that make file.

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

Tell more. What's the filenames of both those files, especially the one after And the interrup. You'll have to include it or put it in your make file.

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

Lots of thought here. I think folk must not lean on cloud storage too hard. Here's a fellow you may know and his view.
http://www.cnet.com/news/woz-the-cloud-is-a-nightmare/

It's an OK thing but the space is not yours to control and is subject to outages, leaks, limits and rule changes out of your control.

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

Here's the thing. You can't survive by specializing today unless your employer needs such a thing or you are running as the lead on some system that will pay your way for years.

My last big app involved C#, HTML, plain C, Android, XML, Maven, Visual Studio, CSV files and more. I did have a recent grad and they wanted to slim it down to just Java and XML but there was no time or budget for that. At times he looked like he was a passenger on a jet during a 10G turn.

So keep learning, get exposure to language after language and system after system. Don't get hung up on any OS or language like some do and you'll do fine.