john price

Ranch Hand
+ Follow
since Feb 24, 2011
john likes ...
Chrome Java Linux
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
10
Received in last 30 days
0
Total given
30
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by john price

Thank you for both your replies. GWT looks very interesting and I will consider using it. Thanks for your help!
11 years ago
Could you point me to some places to get started? I like your response but it's a little too general for me. I don't want to rush it, but I would like to get the porting out of the way so I can continue to develop my software further. Thank you!
11 years ago
I have been coding an program that uses an Applet for a good while now (the server is also coded in Java). Is there a good replacement technology for Java Applets? I am wanting to port the Applet code over to another technology. My reasoning for this is that A. most people don't have Java installed and don't want to install it B. Java Applets tend to take a while to start up and C. I want to be able to code mobile versions (using the same technologies as whatever you guys come up with). These are my requirements :
The languages/technologies learning, code porting, and everything should be estimated to take about 6 weeks or less (I have 6 weeks of "free-time". With school being out at the end of the month and me only having a part-time job, I will be able to devote a large amount of free time to porting the Applet in 6 weeks or less). The features needed for this technology/language(s) are :

1. Being able to connect to an IP address and port by SSL
2. Having abilities for buttons, tabbed pane, text entry, text display, table/chart buttons, able to change colors of components, text formatting
3. Sound playing abilities
4. Technology/language usable in Windows and Linux (Android, iOS, and Mac preferred, but not necessary)
5. Text parsing ability
6. Trees (eg HashTrees, etc), Maps, etc preferred
7. Listeners (Keys, Mouse, Action)
8. Timer functionality (to do a task)

Technologies I will not consider or use :
Anything solely developed by Apple and Flash.

I am open to using multiple technologies/solutions/languages.

Thank you all,

John Price

EDIT : Project is approximately 1k lines.
EDIT 2 : Pictures of project will be provided on request (web links). I have also posted the code online (web link posted on request).
EDIT 3 : Corrections above...
11 years ago
There was absolutely nothing wrong with the code. It was because of the hosting service I was using. I set up an Apache server on my computer and it work 100% now.


Topic discussed and solved at :
http://www.phphelp.com/forum/index.php/topic,15294.0.html
I also tried the following :

It worked 100% on the desktop, but timed out on the server.
The Java Server is up and running. It is on one of my open ports (set on my router). It is also not blocked by the firewall (it is white listed). This happens if it is on the webpage : The PHP client just times out and does not successfully connect to the server. I see this message after 30 seconds : "Connection timed out". If I run it in BASH (Linux command line), it works :

It's at least working on the desktop, so I assume it has something to do with PHP and not Java at all. I could be wrong, so I will leave this up for the time being.

Server.java


If you guys could know PHP, please look for the disconnect between the programs :
HTML File :

PHP File :


I have posted this at http://www.phphelp.com/forum/index.php/topic,15294.0.html
I was trying to append to the whole file. I was adding encrypted information to the file. I had to release the next version of a program so this is no longer a problem. I used a more efficient way by rewriting the whole file and adding the specific item to memory. Thanks for your help.

John Price
11 years ago
Here is the read in where the lines display extra lines. Note this does not happen if something hasn't been appended to the file.


Output gives somthing like this :


If I put in a test case, I get this :


Which displays this :


Thanks,
John Price
11 years ago
When I read the file back in, I see the empty lines. With CipherInputStream and a BufferedReader. I use this over my program in other places and don't see this issue until after it is written to, adding a line to the end (which adds the blank lines for some reason).

Thanks,
cc11rocks
11 years ago
The following code seems prints to "login.encrypted" empty lines, then the value of "x". Does this do this on it's own or is another part of my 1.2k + lined program that is buggy?


Thanks,
John Price
11 years ago
Here is a 128X128 icon of Linux Mint :


Here is the requested 16X16 icon of Linux Mint (it's a bit small) :


Linux Mint is the most popular distribution of GNU/Linux (*according to http://distrowatch.com/dwres.php?resource=popularity) and as such, I feel it should be added to the available Bumper Sticker list.


Enjoy,
John Price
11 years ago
Thank you guys very much. I appreciate all the work that you did for me. I want to shout out a special thanks to Ireneusz Kordal for helping me out on this particular thread very much. Thank you Rob Spoor and Paul Clapham also! I will be separating this into separate programs for my integration with one of my projects, but here is the final test project that I have edited :


Happy new year,
John Price
11 years ago
I believe this is my last issue. I can't seem to properly read the lines in. It's reading the proper amount of lines (3 for the test case), but it's reading each line in as "null". Thank you very much for your suggestion Ireneusz Kordal. I tried it without reading a file in (the information being retrieved from the CLI), and it worked 100%. I then tried reading a file in, but my logic below if faulty somewhere. Everything else seems to work fine. Thanks very much. I hope you all had a great Christmas and have a happy new year!


Thank you very much,
John Price
11 years ago
What do I use to start the output? If I put doFinal for the first line, it prints out a blank line and then just the first line. If I put update for the first line, it produces an empty file. If you are wondering what I am saying, look below (I did change it to make it easier and less lines of code) :


Thanks,
John Price
11 years ago
Could resist the title sorry. Anyway, down to business. I wrote up a simple encoder/decoder program. For some reason, the decryption information always comes back with extra information. A sample of the program running is below. If I open the output file, it always contains some unreadable binary data, sometimes with extra spaces. The words show up fine, but there is extra data. Should I be using "ByteArrayOutputStream"?
If I print it out to the system, it shows up with extra spaces with every line, with no visible extra binary data. Please look at the bottom to see the weird results.
Here it is running :


I can edit out the unnecessary stuff if you want, but the code is relatively short so I won't bother unless you ask me too.



Here is the contents of "simple"

Here is the contents of output.ShouldBeWorking :


Thank you very much. I hope you all have a very Merry Christmas and a Happy New Year
John Price
11 years ago