I'm posting as a new learner to java. Currently now i'm in the process of learning reading and writing to files and also sorting and displaying specific information from files.
I hope someone can help me understand what im doing wrong. i have too much code to post here so i uploaded it to github. https://github.com/PearseMorris/AstronautList.git
If you look at the StartApp.java it contains the main method, Astronaut.java is OOP getters and setters etc. and there is astronauts.csv. the file that i need to pull information from.
I want to be able to specifically pull names from the csv file if they are from a specific country. so in my case (Case 2 switch statement/StartApp.java), i want to beable to display all astronaut names that are from the 'USA'. I've already wrote a few methods at the bottom of StartApp.java thats suppose to sort and store those names in an array. and then on case 2 they display those names. if that makes sense.
This forum is my last resort as i am not getting replies from my teachers. But any and all help is really appreciated!
Related
I have tried so many options, over many days to try and extract data. I don't know where I am going wrong.
for example, I am on the website reviewcentre.com and am looking at car selling site reviews.
I am struggling badly to retrieve information, most of my xpaths appear incorrect.
Where can I best learn how to do this properly, I have spent days at this.
https://www.reviewcentre.com/car_dealers/we_buy_any_car_-_wwwwebuyanycarcom-review_14068020
I know how to copy xpaths, but when it comes to rapidminer, I can't extract the data.
I know I am doing it wrong, but I don't know what's right unfortunately.
examples include
//*[#id="ReviewTitle-14068020"]
h:html/h:head/h:title/text()
this one works!
//*[#id="ReviewBox-14068020"]/div[1]/div[2]/p[2]/span
I have no problem it appears retrieving the xpath from the website, but using it for extracting data on rapidminer is not working at all..Would really appreciate if anyone can point me in the right direction.
Obviously, you don't want to use unique IDs in your xpaths.
Make sure you have understood the concept of xml namespaces, too.
Is there any way to receive data from my parse server thing. I have a column in my parse called lastmsg, and is their a way to "download" data from the column and use it in a string in Xcode?
You need to make a PFQuery, you can find the corresponding doc here
I strongly suggest you keep that link close, there is all the needed information there, and you can find anything in the left column (how to use PFObjects, Queries, and so on).
It should be pretty straightforward if you follow their lead. Ask a question if you need further help with a more precise matter.
I wrote a Ruby script that appended "data" to the beginning of every word of the English dictionary, and then filtered out various strings using different parameters, and now I want to use a site like namecheap or gandi.net in order to take each of these strings and insert them into the domain name availability checker in order to determine which ones are available.
It is my understanding that this will involve making a POST HTTP request of some kind, as well as grabbing the element in question, but I don't really understand the dynamics of what to read about in order to do this kind of thing.
I imagine that after a few requests I will be limited, but as a learning exercise I am still curious as to how I would go about doing this.
I inspected the element (on namecheap) to see what the tag looked like, to find any uniquely identifiable class/id names that I could use to grab that specific part of the source, and found that inside a fieldset tag, there was a line of HTML that I can't seem to paste here, so here is a picture:
Thanks in advance for any guidance in helping me learn about web scripting!
I want to learn the cs-cart file structure.
I want to make changes to the admin side functionality, can you guide me to where can I read the file structure and the functionality of files.
Any help would be appreciated.
thanks a lot in advance.
Have a look in /skins/your_skin/admin/common_templates to find templates.
If you know what you want to change e.g. last viewed items, do a global search for last_viewed_items.tpl and you'll find it is used in \shop\controllers\admin\tools.php and a number of other places.
You are just going to have to keep digging and if it were me, I would draw some sort of flow chart as I went.
Of course, once you have discovered how it all pieces together you are going to post your results here for others to discover...right?
I'm looking for general UI advice on importing a CSV file. The UI is done in ASP.NET MVC3.
When the user uploads the file I need to validate it and allow them to manually correct any errors within the browser before I store it in the database. There's so many potential errors to check for and I'm really not sure what the best way is to achieve this. Another thing is that I only have a few days to implement this so it can't be too complicated. I'm fine with regular expressions and programming and I already have the posted file stream available, but I just can't think of a good and practical way to present this functionaly to the user.
Hope someone can inspire me. Many thanks.
There are some suggestions here:
Reading a CSV file in .NET?
Of these, we chose to use Linq2CSV in our MVC projects.
http://www.codeproject.com/KB/linq/LINQtoCSV.aspx
It is fairly easy to use, and validation is nice. You define a simple class that lays out the structure (columns) of the csv file. It will do basic validation, and if that passed, we sent it through a Validator that used DataAnnotation attributes to validate against more complex rules. We found it reliable, and we were able to add some features to it that we wanted.
If the file was pathologically bad, we'd fail the whole thing and present a single error message. If the file was reasonably sound, we would display the rows in error along with the error messages for the row so they could see the problem in context. In our case, this was a display grid only - we did not allow editing through the website - because the CSVs were being generated out of their data system, and we needed them to edit the source data in their system and regenerate the CSV. To do in place editing, you would need to stage all the column values as strings so they can fix numbers that don't parse, etc.