Why doesn't my code function like it should? (fileWriter, jTable) [closed] - java

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Still having some issues with my code. No errors this time, its just not functioning properly!
here's the code: http://pastebin.com/nm633L1v
What's not working (I think):
fileWriter
jTable
3rd Party Libraries:
OpenCSV
filechooser.FileFilter :
just going to remove this from my code. I do not think it is necessary any more.
fileWriter :
This may be a side effect of jTable not displaying the contents of the CSV file for editing, but it doesn't seem to save or update the file when the program calls on it.
jTable :
This was throwing all the errors earlier, and may be the REAL McFly for all my issues. Not displaying the input CSV file, or saving the contents of the Table if I do stick random junk in the columns.
I know that it is a bunch of different code issues, but it is the one problem for me right now before I move on or pass off the project to another person, so any help here would be greatly appreciated!

I am not going to go through all of your code. I just gave your FileFilter a quick look.Note that you can use a FileNameExtensionFilter instead of implementing your own.
Although I must admit that your implementation looks correct to me. Unfortunately the code where you set the filter on the file chooser is not shown.

Related

I want to give security to my PHP code from copy [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want such a script or logic so that if somebody has a copy of my code, they can only access/run it if they have my unique key, otherwise they get an error. Is there any way to do like this?
Thanks
If somebody has a copy of your PHP code they can run it. As PHP is not compiled, the possessor can read and edit the code as well; so even if you put in something that checks against a secret key, they could simply remove it. If you encrypt the code into an unreadable state, it’s also in an un-runnable state.
So, in brief, there really isn’t a way to give working PHP to another person in a way that they can’t simply run it. If you’re looking to sell a product of some sort, your best bet is probably to run it as a service so the end user never actually sees the code.
The closest you might hope for would be to make it difficult to read, i.e. with meaningless variable and function names and zero white space; but that won’t stop somebody who really wants it, (and who knows how to work some basic refactoring utilities), and only adds significant complication to your own work

Save past database record instead of being overwritten [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
please help. We are building sort of a log in/ log out program, wherein we record the time he logs in and logs out, but we have a little problem, when he logs in again, the past record is overwritten. We just need some help of any ideas or methods of storing the past log in/ log out time instead of it being overwritten. Thanks in advance!
you can use relational database for that like #MadProgrammer's statement.then you can keep a separate table for store user's login history .you don't need to overwrite.
for example see the picture below
i have show you a example er diagram and table structure for clarify
Save this log as separate records.

How to combine many(1000) png file together in one big file system where we can iterate and get all if needed [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am putting many images on HDFS. However each one is taking 64MB Block there.As the count of images are very high So wanted to put all image information in one big file. Now this will be feed to mapper to process it faster . What inputformat i can use? Or do i need to use sequencefile concepts ?i am not much sure as how to proceed further could someone please suggest some better way to deal this.
Just throw them all in a Zip.
Really you would be better off using a Database (for example MongoDB) and store them all in there though.

Turn HTML into XML and parse it -- Android Apps [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have been learning how to build android apps this summer. I am currently trying to work on xml parsing which falls under java in this case. I have a few questions that are mostly conceptual and one specific one.
First, in most of the examples I have seen pages already in xml are used. Can I use a page in regular html format and with whatever the program does turn it to xml and then parse it? Or is that what is normally done anyway?
Secondly, I could use a little explanation on how the parser actually works and saves the data so I will better know how to use it (extract it from whatever it is saved in), when the parsing is done.
So for my specific example I am trying to work with some weather data from the NWS. My program will take the data from this page, and after some user input take you to a page like this, which sometimes will have various alerts. I want to select certain ones. This is what I could use help with. I haven't really coded anything on that yet because I don't know what I am doing.
If I need to clarify or rephrase anything in here I am happy too and let me know. I am trying to be a good contributor on here!
Yes you can parse HTML and there are many parsers available too, there is a question about it here Parse HTML in Android, then we have an answer here about parsing html https://stackoverflow.com/a/7114346/826657
Although its a bad idea, as the tag names aren't well named, so you will have to write lots of code searching attributes for a specific data tag, so you always have to prefer XML,for saving lots of code space and also time.
Here is a text from CodingHorror which says at general parsing html is a bad idea.
http://www.codinghorror.com/blog/2009/11/parsing-html-the-cthulhu-way.html
Here is something which explains parsing an XML document using XML PullParser http://www.ibm.com/developerworks/library/x-android/

how to see what row is selected in a JTable [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am trying to get the value of the row selected in a Jtable but am so confused on how to implement the ListSelectionListener so that I can see what has been selected. I have gone to the java tutorial but i find it confusing. can anyone give me an example on how to create a ListSelectionListener and handle an event where a user selects a row?
am so confused on how to implement the ListSelectionListener
See: How to Write a List Selection Listener for a working example.
I have gone to the java tutorial but i find it confusing.
We don't know what you find confusing about the working example from the above tutorial. So why do you think any code we post would be any different? Unless you can state the exact problem you have (along with your SSCCE) we can't offer any more help.
Have a look at the code at;
http://www.coderanch.com/t/339330/GUI/java/values-selected-row-JTable
I think, it'll help you.

Categories