No, unfortunately not. This would require an N+1 query to get the reserve for each record, which would not be efficient. For the value it would add to the table, I would consider it to be more trouble (and resources) than the return warrants.JackRbbt wrote:However, can you consider to add another column in the table, containing the reserve where the kill or shot was made? I know, you can get it from scoresheet, but wouldn't be nice to see it "at once"?
UHC Apps | Competition Hosting
- caledonianblues
- Master Hunter
- Posts: 9725
- Joined: September 27th, 2012, 11:01 pm
- Location: London, UK
- Contact:
Re: UHC Apps | Competition Generator
- HooCairs
- Champion Hunter
- Posts: 23429
- Joined: March 4th, 2011, 7:30 pm
- Location: Switzerland
- Contact:
Re: UHC Apps | Competition Generator
Great addition! Just one big piece of amazing work.
- DarkHunterXX
- Scout
- Posts: 490
- Joined: June 3rd, 2013, 1:08 pm
- Location: Netherlands
- Contact:
Re: UHC Apps | Competition Generator
Absolutely awesome work David!
But i don't really get the thing about N+1 query, i looked up on the internet but doesn't really make sense to me that much. Can you explain it?
Another thing i noticed:
When downloading a excel sheet from a (any) season , all data get stored in the first column.
This should be displayed better in my opinion.
Me as a starter programming student did this a few weeks back aswell, so for you it will be easy i quess
But other than that: beautifull
But i don't really get the thing about N+1 query, i looked up on the internet but doesn't really make sense to me that much. Can you explain it?
Another thing i noticed:
When downloading a excel sheet from a (any) season , all data get stored in the first column.
This should be displayed better in my opinion.
Me as a starter programming student did this a few weeks back aswell, so for you it will be easy i quess
But other than that: beautifull
Photographer of the world, and playing this awesome game Youtube: https://www.youtube.com/channel/UCJDOkC ... Gz49JctvnA
- caledonianblues
- Master Hunter
- Posts: 9725
- Joined: September 27th, 2012, 11:01 pm
- Location: London, UK
- Contact:
Re: UHC Apps | Competition Generator
An N+1 query is essentially where you perform an initial query, then one additional query for each record in the result set. In this case, an API call returns the personal best data for a user, for one season. The array contains information, but not the reserve ID for the harvest. In order to get that, another API call has to be made. So if there are 80 records in the first array, when you iterate that array, another 80 API calls would have to be made to obtain the relevant information (in this case, the reserve ID for each harvest). If you were querying the database directly, assuming it was relational, you would solve this problem by using a SQL join. Unfortunately when you only have access to the data via an API and the function does not return the required data, the only solution is to live without it, or carry out N+1 API calls. This is horribly inefficient and would add significant overhead to the process. For that reason, even though it was a very good suggestion, it's not feasible.DarkHunterXX wrote:But i don't really get the thing about N+1 query, i looked up on the internet but doesn't really make sense to me that much. Can you explain it?
When I download any season and open the CSV file in Excel, it displays properly. I looked on the server and can see that you downloaded seasons 14 and 21. The CSV files are stored on the server for 24 hours after being generated, and when I download those files (exact same files you downloaded) and open them, they also open fine. What are you using to open the files? Just to clarify, this is what it looks like for me when I download one of my seasons and open the file in Excel.DarkHunterXX wrote:Another thing i noticed:
When downloading a excel sheet from a (any) season , all data get stored in the first column.
This should be displayed better in my opinion.
Me as a starter programming student did this a few weeks back aswell, so for you it will be easy i quess
Is anyone else experiencing this problem when opening a downloaded file?
- DarkHunterXX
- Scout
- Posts: 490
- Joined: June 3rd, 2013, 1:08 pm
- Location: Netherlands
- Contact:
Re: UHC Apps | Competition Generator
That makes things clear about the N+1 query's thanks, i always use Innerjoin for query's myself
About the Excel file:
I use Excel 2016 to open them, it looks like this.
Edit: I started up my laptop , i get the same result when trying it on my laptop.
About the Excel file:
I use Excel 2016 to open them, it looks like this.
Edit: I started up my laptop , i get the same result when trying it on my laptop.
Photographer of the world, and playing this awesome game Youtube: https://www.youtube.com/channel/UCJDOkC ... Gz49JctvnA
- caledonianblues
- Master Hunter
- Posts: 9725
- Joined: September 27th, 2012, 11:01 pm
- Location: London, UK
- Contact:
Re: UHC Apps | Competition Generator
Well, inner joins only work if there are records that have matching values in both tables. But yes, a join would solve the problem here if we were querying a database.DarkHunterXX wrote:That makes things clear about the N+1 query's thanks, i always use Innerjoin for query's myself
For some reason something is putting double quotes around some of the data. That is not what those files look like on the server, so I think it's something to do with the way you've got Excel configured. Maybe you're importing the file and specifying field types?DarkHunterXX wrote:About the Excel file:
I use Excel 2016 to open them, it looks like this.]
- DarkHunterXX
- Scout
- Posts: 490
- Joined: June 3rd, 2013, 1:08 pm
- Location: Netherlands
- Contact:
Re: UHC Apps | Competition Generator
I think it has something to do with my excel indeed.For some reason something is putting double quotes around some of the data. That is not what those files look like on the server, so I think it's something to do with the way you've got Excel configured. Maybe you're importing the file and specifying field types?
when opening it on my phone it works totally fine.
I can now just open excel and import it from there, that will work fine.
Photographer of the world, and playing this awesome game Youtube: https://www.youtube.com/channel/UCJDOkC ... Gz49JctvnA
- JackRbbt
- Trophy Hunter
- Posts: 6483
- Joined: October 30th, 2012, 1:21 pm
- Location: Constanta, Romania / Westville, South Africa
- Contact:
Re: UHC Apps | Competition Generator
Double quote around text field, in CSV files, is a normal thing. Imported CSV files format is determined by "List separator" field, from Windows "Regional settings". To avoid any kind of conflicts or misinterpretations of CSV content, if list separator is anything else than comma (most likely that's DarkHunter's problem, for most European countries, default list separator is ";"), just add a first line in CSV file, containing "sep=," (quote marks included!). Now, that can be done manually, using any text editor, or directly from David's code (i'm sorry my friend, some more programming work for you to do! ).
Original file:
Edited CSV file (working right, independent of "Regional settings"):
Original file:
Edited CSV file (working right, independent of "Regional settings"):
Spoiler:
- caledonianblues
- Master Hunter
- Posts: 9725
- Joined: September 27th, 2012, 11:01 pm
- Location: London, UK
- Contact:
Re: UHC Apps | Competition Generator
Actually it's not. RFC 4180 clearly states, any field may be quoted, but it's only required if one of the fields contains one or more of the delimiting characters. I guess if you live in a part of the world where a comma is used to denote a decimal point, or the default field delimiter is not a comma, then Excel (or Windows) might be configured to automatically apply double quotes. I specifically chose not to add double quotes to the field data because, well frankly, I think it looks awful once you open it in Excel.JackRbbt wrote:Double quote around text field, in CSV files, is a normal thing.
If it's a problem for too many people then I will look to implement a fix
- caledonianblues
- Master Hunter
- Posts: 9725
- Joined: September 27th, 2012, 11:01 pm
- Location: London, UK
- Contact:
Re: UHC Apps | Competition Generator
A vast amount of the UHC functionality will currently not be working due to the game server issues. This will affect many pages, including account creation, the dashboard, competition submissions, etc. Please be patient. Hopefully the issue will be resolved soon.
Who is online
Users browsing this forum: CatznCurlz, splainin2do and 1 guest