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

I'd read http://php.net/manual/en/features.gc.performance-considerations.php and try it both ways. Be sure to add the echo memory_get_peak_usage(), "\n"; at the end to see if it mattered.

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

A simple explanation.

You set up a "server" to serve up the database. This is best done with a SQL server. MySQL is free, popular and well discussed.

Now that you have your data on that server you write an app that connects to the server (examples are abundant) to display, change add via your front end app. It's only hard the first time round.

--> Again, your line of code with the hardcoded path would only work for one machine and user. To move to multiuser, you have to kick up your system and skill a little.

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

Which is exactly why I pointed out the issue with that hardcoded path to the database.

Now that you asked or told about more than one user working on the same data my head exploded. I've seen so many Access and many user failures over the years that over a decade ago I dropped Access and started using MySQL for the database and at first VB6 for front ends. Today I use MySQL for the database and server and C# for the frontends.

I suggest you kick up your game many notches and move to SQL ASAP.

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

The PDF is the assignment but nothing more. Time to design your program, step by step, then write it according to those steps.

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

While the answer is yes, you might ask a lot more questions such as how and so on. For years folk have been distributing apps and work across computers so there's nothing stopping you but you.

But there's a glaring issue in that 1 line of code. The data source looks "hard coded" to a specific user and database. While it may run on that user account on many machines, why is it that hard coded?

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

Looks like it worked as coded. Since you never cleared your string, each loop added to it. Oh so close.
Maybe line 3 moves to after line 6?

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

A quick glance at console.log shows it puts out a newline after each string.

So, build a string and when done, console.log that string (in line 23.)

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

OK, line 6's printf output is "b is 10" and has a trailing \n os that's 8.
Line 7 printf output is "a is 8" with a trailing \n so that's 7.

printf() returns the number of characters it printed so all looks right here.

CodyOebel commented: AHhhhhhh the number of characters returned ... I seee +3
rproffitt 2,701 https://5calls.org Moderator

Before I answer, you haven't asked a new question as we read from https://www.google.com/search?q=Documentation+or+in-code+comments&ie=utf-8&oe=utf-8

So my answer is that you do what the person is paying you to do. Heresy!

And the higher you up SEI, CMM and so on, the less you see of the code. As you move to a system like SEI Level 5, you put in a change request and that generates the code. Example? The Space Shuttle was SEI Level 5 with an exception for the backup computer. To some this never really happened and some will write "Burn the witch!" over use of such magic.

What I find is I have to use a variable approach to each project. I'll do what the client demands even if I disagree. They are paying the bills so let's give them what they want.

So what do I use? I think I like a method I read in "The HP Way" years ago. We produce The User's Manual first. This describes what it does and how the user uses it. Now we have a fine end goal and can map out how to get there. There are thoughts that you document the code before you write code but my view is you do that if paid well and they accept the years it will take.

This reply is pretty much a chip off the visible ice berg of the question you posed.

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

Still can't find code to save your customizations when the form closes. To quote Nintendo.

Everything not saved will be lost

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

I don't see any code to save this as the form loads or closes. There are prior discussions about this so in short, you need to save this on exit, and load it when your form loads. I see that this is a topic at http://vbcity.com/blogs/xtab/archive/2013/08/19/windows-forms-saving-user-s-additions-to-autocomplete-textbox-source.aspx

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

Let's see the form close code where you save your collection. You'll need another passage (code) to load from there when your form shows.

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

There are priors to this question. That is, it's not a new question with maybe too many priors.
https://www.google.com/search?q=how+to+use+Visual+studio+c%2Fc%2B%2B+compiler+in+eclipse&ie=utf-8&oe=utf-8 is what I used to find those priors.

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

@gahhon, my thought is to get into the documentation for your server choice. Also since it's Java, you have other possible server setup issues. It wasn't funny last time I looked at a non-working Java item and the server owner/person that set it up did not test that Java was working at all. For that test, back to your server docs.

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

OK, you've picked the x86 Android simulator so there are priors as to Android Studio using the CPU.
https://www.google.com/#q=limit+android+studio+cpu+usage

Hmm, now let me be sure my Java is current and I'll launch Android Studio and open a project.
http://i.imgur.com/NopLauD.png?1 is what happened and if you are seeing high CPU use with just the IDE and a project open, I think folk have priors on that. Here, I'm not seeing the issue.

AssertNull commented: Thanks for the links and the help! +0
rproffitt 2,701 https://5calls.org Moderator

I think it's worth repeating that you need to change the emulator from an ARM to a x86 Android. I did that and it was a whole new ballgame.

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

Same here. The compiler does indeed max out on CPU and RAM. I think that's a good thing as we don't have to wait as long for a compile.

But more about the simulator. There are tomes on the web about using an x86 based Android in the Simulator along with notes from Intel about speeding up the emualator. If you are using an ARM based simulation that's more than double (some say 10x) the work.

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

I'll have to defer to those that ran that server but the quick looks I did in your first post found a naming error.
You corrected that and then it looked like a deployment error which is of course dependant on what server you run.

Leaving out details like that is your choice so my thought is you have name and deployment errors.

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

I wonder if you misplaced your JAVA file?

https://tomcat.apache.org/tomcat-5.5-doc/appdev/deployment.html writes:

/WEB-INF/classes/ - This directory contains any Java class files (and associated resources) required for your application, including both servlet and non-servlet classes, that are not combined into JAR files. If your classes are organized into Java packages, you must reflect this in the directory hierarchy under /WEB-INF/classes/. For example, a Java class named com.mycompany.mypackage.MyServlet would need to be stored in a file named /WEB-INF/classes/com/mycompany/mypackage/MyServlet.class.

I wonder if this is a deployment issue and not a code issue.

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

My first look at the HTML about line 14 writes "indexServlet" but the Java file name is "indexSerlvet". That could be a problem.

indexServlet ≠ indexSerlvet

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

I see they wrote the code to implement my suggestion of "This can be as simple as putting in line terminators so you can parse the lines on the receiving app"

So far I've yet to find Android to use other than an installable program. Where did you find a way to avoid the APK or Android installer?

PS. The solution there has an issue. What if your data strings have a comma in them?

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

Which is why you implement a protocol. This can be as simple as putting in line terminators so you can parse the lines on the receiving app to implementing a complete "Hey send me the next line", "here's the next line" etc.

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

Using such old tools can catch folk unaware of issues in those systems. For example an old VB6 app uncovered WinSock issues that were fixed in version 6 (not kidding) of the patches for VB6.

There's another issue in your design. It looks like you fling the lines over without handshake or a protocol. This is trouble in the making as well.

-> Since Visual Studio has current versions for free in the Express line, you may be seeing a code or bug issue. Only you would know that as very few today would have VB5 to try it out on.

In parting, move forward to a current system, check for patches and implement a protocol.

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

First thought, after line 10 in top code paste, send a CR and maybe a LF.

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

Doesn't line 12 look funny to you? Also, https://www.google.com/search?q=dont-use-select-star-in-production is worth repeating. I know, I know they teach you SELECT *

But you can do better.

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

I think you're getting it. i gets whatever is in the set of things you after the "in" keyword. It can be numbers, a list of things, and so on. No i++ here.

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

I think you need to step back a second and think that this is not C++. for loops in python are different. They move through what's after the key word "in". So to see what it will iterate through, list that range(10).

Try this one liner in python

list(range(10))

Now try that with range(1,11)

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

The idea of not initializing because it works is alarming to me. One of my last trips overseas found many of the bugs tracked down to this issue. The reply was "it worked" is not a good one. Their staff tests with a handful of devices and the issues we were seeing were from the field of 40,000 devices. Light reading of this at http://blog.codinghorror.com/for-best-results-dont-initialize-variables/

The cost of that trip was in the 6 figures which was fine because if they had written it right I would have not had more experiences on the subject. That is, we've been here before.

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

I'd rewrite lines 1 and 2 so you read lines as you process them.
Example at http://www.dotnetperls.com/file-readlines

Sorry that I was unclear. The line one in my reading read one single line. Time to rewrite this.

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

I'm using your code above and it is exactly what you are doing. The code should fault if you put a negative number in that function.

There are tomes on the web about square root of negative numbers so that's not "programming" but math.

Maybe you should test if the number you will square root is negative and handle it as you wish.

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

Are you trying to take the square root of a negative number? Seems that function should fault.

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

Look at your order of execution. In lines 19 to 39 you didn't ask for GrossSalary until line 41. So the code did what you asked.

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

To Reverend Jim. On Dells we have Dell Diags (varies with model) so try this. Boot the Dell and hold down the D key. See if there's a keyboard test.

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

The next test I try is to see if the issue follows with some USB PC Keyboard.

However the keys are in what looks like a few scan lines of the common matrix decoding so it looks like a hardware issue from here. What about the number keys? 4 and 5 here may fail too.

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

For the archives, if the above link dies it wrote "login, go to Preferences > Settings. Then scroll down until you see URL Shortening. You should see a checkbox checked with Auto shorten URLs. Simply uncheck this and update your settings."

Tameat614, if you mark this solved for others to know it's complete.

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

If that fixed it, good news. I'm just looking into IFTTT so questions like this help be learn more.

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

Did you try unchecking the box noted at https://michaelsoolee.com/ifttt-links

Tameat614 commented: Thanks :) +0
rproffitt 2,701 https://5calls.org Moderator

The answer is yes but you prepare the 300 machines ahead of time for remote updates. This is done with either a windows server and login scripts or other. What plan did you IT implement to do this?

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

It looks dated. http://www.wilderssecurity.com/threads/anyone-use-bufferzone-pro-is-it-still-developed.353645/ was years ago and my thoughts is that anyone that relies on security apps to protect will get taken out to dry then folded.

I know the Kees from that discussion and the advice is spot on. I'll add that the best protection is us.

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

You tagged this with PHP so I thought wget. https://www.google.com/#q=wget+amazon+price+check in fact finds a prior with PHP and wget. Now you have the page and get to parse it out.

showman13 commented: Perfect Response. +3
rproffitt 2,701 https://5calls.org Moderator
  1. There's a writeup out there about the .exe fix. I can't tell if you read it. It's not a .exe file.
  2. I use a memory stick or CD to get the files over.

There are folk that can't do such repairs for many reasons. Those folk are left with factory recovery systems and repair counters.

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

Can't see where $hobby or $hobbies array is declared. What line is that on?

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

I can't guess your idea of what that code will do but the 2nd item is a string so that error would be correct.
Reference: http://php.net/manual/en/language.types.string.php
and http://php.net/manual/en/function.in-array.php

Maybe you declared it an array but I don't see your code to check here.

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

My thought is there would be prior discussions on this. So here's my idea to find the priors.
https://www.google.com/#q=keep+checkboxes+checked+after+submit+with+cookies

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

Question unclear. So is this one website or two websites?

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

While it's been a few years, I never used any code to make barcodes. Here was just a font. I would change to the barcode font and I was done.

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

Good tools mentioned by CimmerianX. Read why I get such from Ninite at http://www.howtogeek.com/201354/ninite-is-the-only-safe-place-to-get-windows-freeware/

CimmerianX commented: +1 for ninite. +9
rproffitt 2,701 https://5calls.org Moderator

There are tools to go find what it is. Did you try the usual of turning off then on system restore? That issue has been with us for over 16 years.

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

Here's my thought that needs someone to confirm. You called out the path for images to /images so the .image calls automagically know to use the path to /image then what you supplied earlier at images_dir = "images".

Now ../image should work since you are now saying /images/../images/someimage.png

At least that's what it looks like to me.

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

@M, yes. It's fairly deep damage but I've recovered a few using Doug Knox's fix for .exe.