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

Save yourself now. You know that VB6 support is long gone and since you can get into the Express versions of Visual Studio, why VB6 today?

As to your update, you code that up and fire it off when the event you want happens. As VB6 events are well done on the web, I stop here.

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

A quick look. Remove that block comment from lines 8 to 14 to avoid something I ran into years ago.

Except within a character constant, a string literal, or a comment, the characters /* introduce a comment.
http://en.cppreference.com/w/c/comment

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

OK, your tag is PHP but you didn't specify that this was in a browser. As you know you may not take over the screen like that. You could if you had the user run some app. There are plenty of prior discussions about this but for now, you can't violate what the user wants to see in their browser view.

cereal commented: ops, I missed that _automatically_ thanks :D +14
rproffitt 2,701 https://5calls.org Moderator

For me, I wrap my queries in another language so for me it's possible to write code that sorts finely. Your post reminded my of the priority options in MySQL so I thought I'd share the relevant document.

So for me, I'd make the solution in my app and would not find it to be a problem to use more than one query. But that's me.

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

What this tells us is this PC has some hardware issue or something that's not in this discussion. It's quite an old PC so the cost to repair is more than getting a replacement.

Yes you will get clients that want it fixed so you go get a new motherboard, CPU and such to bring the case back to life.

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

Just a quick look, what about priority? Read this link about that and MySQL:
http://dev.mysql.com/doc/refman/5.7/en/sorting-rows.html

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

A couple things. Moving a Windows install on a HDD from PC to PC is an iffy thing. No one I knows tells you that should work.

As to the fresh installs, the past is the past. You'll have to dig in and try it with less parts such as one stick of RAM and whatever else you can remove to sniff out what's wrong with this PC.

I did run into a few folk that were swapping HDDs around PCs like spare tires. That is not supported and rarely works.
Another thing they tried was the Windows OS that came with other PCs. Again another area that is known to fail.

You did reveal the model so this is 7 or more years old and cheap to replace as I read prices from https://www.google.com/search?q=GX280

You might have to settle for Linux if that's all that runs.

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

I'm back!

Will have to log in as Its_1 to mark this answered.

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

Oops, logged in as him still. Sorry!

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

rproffitt sent me his credentials and it took less than 2 minutes to figure out what the problem was! Whew!! Sorryyyyyyyyyyyyyyyyyyy everyone.

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

So it blinks and works fine. I'd ignore it. Sadly I see no model by gateway to dive in deeper and see if there is a service.

So, the light blinks, it works, ignore blinking light like on our cars?

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

That's not the full model number so for now what else is wrong?

Always tell the full model number, not the series alone. And age and story like "my laptop is a _______ by Gateway and I use it on battery all the time but now at 5 years old it does this."

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

That thing, right there where you tell me the display does it with a W10 boot CD/USB tells me something's off with the video card or monitor.

What are those things?

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

@q
I see replies at your other discussion. Some folk only want "answers." They often flame out later. Stick to it?

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

Did you try google? https://www.google.com/search?q=Design+and+implement+an+application+that+determines+and+prints+the+number+of+odd%2C+even%2C+and+zero+digits+in+an+integer+value+read+from+the+keyboard.+%28j&ie=utf-8&oe=utf-8 finds working code from this old homework and you can rewrite the while to be a for loop.

You pasted the class assignment but need to show your work. Asking for the code is the second part of the assignment. The first part is design. Tell us your design.

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

If a line has multiple braces like }}, I want one of them to go onto the next line. If a line has multiple semicolons like output.println(); data.close();, I want the two statements to show up on two different lines.

OK, in psuedo code.function linebreaker()
if semicolons (more than one) repeat until there is one semicolon
- print tabs and line up to and including the semicolon
- remove characters in line up to and including the first semicolon.
end repeat (until one semicolon.)
print tabs then what left in line.

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

So, in psuedocode.

Set up your indent variables, start with 0 or what you what.
Until EOF
- read a line, strip leading and trailing white space. (tab, spaces).
- output the intended spaces or tab plus this line.
- if this line has brace, increment/decrement the indent counter for each brace.

If a line has multiple braces, well that's the coder's intention and we'll roll with that.
As to semicolons, unsure why they matter. Will have to ponder why as they don't affect the indentation.

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

I think I could break your formatter with a comment since what if you ran into a commented out line of code and your new line breaker enabled that code.

How about you use your prior code and where you read a line you remove spaces and tabs from the beginning and end of each line?

In other words how would your new formatter know the end of a comment? It would have to make guesses such as "Hmm, a // might end when I find ???" I get the feeling an AI class would have to be made.

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

To me this still reads as a path and filename issue. Code looks fine but I don't know your file system or test rig.

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

Matthew,

If that's it, what I call such lookovers is "fresh eyes." There's nothing that looks blatently wrong with the code itself. So I had to step back and look at it for what seems odd. As I don't know your folder structure, I had to guess.

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

Let me start reading at line 10. OK, line 10 has this path of "/images/" and then in line 13 you write path + "images/black_menu2.jpg"
So that strikes me as an odd path. Are you sure you have /images/images/black_menu2.jpg ?

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

Did you read prior discussions on that topic? http://www.cplusplus.com/forum/beginner/4488/ for example.
And more at https://www.google.com/search?q=c%2B%2B+and+puzzle+about+parameters+and+argument+definitions&ie=utf-8&oe=utf-8

One of the best lessons you can learn is to research like this.

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

Something else to try. Beware it will take some CPU load but google up fxsound.com. I don't need to but if you can't get an amp, and need just a little more, try it.

Stefce commented: HUH this is powerful ! :D +2
rproffitt 2,701 https://5calls.org Moderator

I have a question. Why does this look exactly like that post from 7 years ago at https://www.daniweb.com/programming/software-development/threads/186020/help-using-dynamic-memory-allocation-and-pointers

Are you telling me you are still working this code after this many years?

Or is it something you found and need to fix it and claim it is yours? Don't do that. If it's an assignment a teacher or TA would find you lifted the code off the web in one google.

Not to give too much away but why not fix that broken function?

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

PS. I can't tell what step is eluding you but if it's the random word from a text file check priors like this:
https://www.google.com/#q=vb+net+read+random+word+from+text+file

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

Just one. VB6 had its day. Now that VB.net has a free to use version, move up to a version that everyone has access to.

hefaz commented: Thanks, Ok. +2
rproffitt 2,701 https://5calls.org Moderator

Since I don't know what your desired output is, try a fiddle next.

Example at http://jsfiddle.net/AqDCA/852/

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

There may be a clue in a prior post. http://www.orafaq.com/forum/t/62336/

Were there other Oracle products installed?

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

Did you try disabling all add ins?
https://www.google.com/#q=manage+excel+add+ins

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

At first glance this sounds like our old friend date format is in play. I can't know your Windows or Access data time format but 10/05/2016 in say Britain is May 10.

Tracking it down in your system is sadly up to you but it's not a new find. https://www.google.com/#q=access+swap+day+and+month

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

In my opinion the changes to the client will go much smoother than what you are trying to do now. I think your current path won't scale and if that's your other post you will always be fighting connection counts.

I suggest you dive into MySQL. All my apps that I used it made coding a joy compared to days before that. I get to do more design than actual code of the client app now.

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

This sounds like a carry over from your other discussion thread. Even if we use MySQL you don't hold the connection open for longer than you need it. Yes you may incur some overhead from this but if you want to support hundreds of clients you have to keep it cleaned up.

Another thought is that you are polling rather than updating on change. This creates a lot of needless work all around. Yes, it's fine for your first efforts but later you need to change your designs away from polling.

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

I think you'll do fine given the back and forth here.

About rooting. About the only time I was about to root was a rather cr***y Sprint phone with apps that had to go away. About the time I was going to do that, I told Sprint goodbye and moved to an unlocked GSM phone. Much better.

Now I can install my apps once I enable third party sources and never looked into rooting again.

A parting tip. Use good USB cables. I had some trouble with cheap USB cables during debugging and while these cables would sync they would drop connection during Android Studio debug sessions. Not cool and learned what cables I have were good and not so good.

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

All this and you are repeating why folk move to a real SQL. The move was not painful for me the first time and you'll also get a server that will support many open sockets at once. Your current system will not scale and to fix it means you have to redesign it to never hold a connection open for more than a few milliseconds since it's not made for more than one user. With MySQL I had dozens of clients and never had to work hard to support them.

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

Just my thoughts here. Your approach is what we use when there is no source. Android has a lot of its basic apps open for perusal.

This way you can work on the white box approach rather than a black box. (Sorry if I use terminology that is new or rare. Just ask if you must.)

I do believe there are open source apps to read the databases you are poking around in too.

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

Glad you're not doing the life to death tracing.

But rather than looking at it via a blackbox approach why not grab the source for each app in question and see what files they use and how they add, create or destroy them?

Example? https://www.google.com/#q=google+android+contacts+source+code finds the source is there.

AssertNull commented: Good link +3
rproffitt 2,701 https://5calls.org Moderator

You covered a lot of area in your post so next time try to keep the topic to one topic.

  1. Exploring the file system has lots of priors like https://www.google.com/#q=exploring+the+android+file+system

  2. It's not Linux as you had before so when you get past that you may make some real headway.

That said, not one app I've written so far needs to know the file system. I do have a good friend that after 2 years is still exploring Android. He's trying to understand it from top to bottom and may be doing that for years to come.

That said, I think the other approach is to stand on top of these OSes and write our apps. We know that we have OS services and such so it's rare I need to dive into how the OS in question delivered the service. This is however incompatible with my close friend. He wants to trace the life and death of the thread all the way through. Well, that's one way to spend your days.

Make your choices as to what level you need to dive to and the deeper you go the longer it will take to get there.

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

I meant your code. And SQL is SQL. I learned that years ago. Once I have a SQL app, it's pretty easy to migrate to another SQL server. Now is a good time for you to learn SQL on MySQL.

So in short you install a SQL server (many use MySQL since it's free to use like this) then write your client app as you wish.

Since SQL systems have user logins that's less code for you to write.

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

Another read of your code seems to tell my you are implementing your own username and password system. But it looks flawed from here. Hey, I only read it twice but it looks like it supports only one connection at a time. Moving to a classic MySQL server and a client app which you already are working on would put you into a very scaleable system.

You wrote you never used SQL but in your code, I see SQL.

The second and subsequent hanging seems to be built into your design. I offer only how I'd exit, not to redesign this one.

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

As I read https://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.flush%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396 I wonder why you bothered to make that call.

I looked at this as a design and don't see why I would design this like this. That is, I could use MySQL as the server and usernames would be in the database and no backend to write at all. Why are you using Jet here? Haven't enough folk crashed on MS Access yet?

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

Something's off here. Red Hat has been mounting NTFS for years. https://access.redhat.com/solutions/23993 for example.

Maybe you left out detail like your Red Hat is way out of date?

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

I forgot to add what I do to reach inside the usual VirtualBox drive. Here it is:
https://www.google.com/#q=mount+virtualbox+as+drive

But you'll need that internet connection to download a tool or read more.

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

The other solution requires a download so without an internet connection for this PC you just wiped out my other solutions. When you get your internet back, we can try again.

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

Small world. I decided to work around this and used a network share one time and the next time DropBox.

One file? Email it to yourself with say Gmail?

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

You omitted the make and model of this PC. But the error looks to be common when the BIOS is set to secure boot. I can't be specific as there is no PC detail so go find out how to change the BIOS to CSM or Legacy (look, this is not a standard and why make, model is required.)

Now you may be able to boot your W7 DVD and then fail as the HDD needs to be erased. Do not format that HDD, just remove all partitions. For that I use GPARTED.

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

So how about the old web ticker solutions? https://www.google.com/#q=web+ticker+example Your Pi implements something like that and as the item rolls by it reacts.

Or you have a listening UDP port that you send a packet to to tell the Pi to do something.

There are many designs to choose from. Your choice at the end of the day.

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

Line 28 looks suspect to me.

https://msdn.microsoft.com/en-us/library/system.io.file.appendalltext%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396 writes:
"Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file."

That's not what your comment on line 27 says you want to do in line 28.

That word, it doesn't appear to mean what you think it means.