<commit_before><section id="content">
<cfscript>
	local.sPlace = 1;
	local.sCurrentWins = 0;
</cfscript>
<cfoutput>
	<div class="table-responsive">
		<table id="standings" class="table hover order-column">
			<thead>
				<th>Player</th>
				<!--- // <th>Money</th> --->
				<th>Wins</th>
				<!--- // <th>Losses</th> --->
				<th>Rank</th>
				<!--- // loop through the weeks --->
				<cfloop from="#arrayLen(rc.arWeeks)#" to="1" step="-1" index="itm">
					<th data-week-id="#rc.arWeeks[itm].getNWeekID()#">Week #rc.arWeeks[itm].getNWeekNumber()#</th>
				</cfloop>
			</thead>
			<tbody>
				<tr id="fullResultsHeader">
					<td></td>
					<td></td>
					<td></td>
					<cfloop from="#arrayLen(rc.arWeeks)#" to="1" step="-1" index="itm">
						<td data-order="0">
							<a href="#buildURL('standing.fullResults')#&nWeekID=#rc.arWeeks[itm].getNWeekID()#">full results</a>
						</td>
					</cfloop>
				</tr>
				<!--- // loop through the season standings --->
				<cfloop from="1" to="#arrayLen(rc.arStandings)#" index="local.itm">
					<cfscript>
						// store current userID
						local.nUserID = rc.arStandings[local.itm];
						// determine what place the current user is in
						if( !isNull(rc.stSeasonWins[local.nUserID]) and rc.stSeasonWins[local.nUserID] neq local.sCurrentWins ){
							local.sPlace = local.itm;
						}
						local.stUserWeekData = rc.stWeekData[local.nUserID];
						local.arUserTiebreak = rc.stWeekTiebreak[local.nUserID];
						if( listLen(structKeyList(local.stUserWeekData)) gt 0 ){
							local.arWeeks = listToArray(listSort(structKeyList(local.stUserWeekData), "numeric", "asc"));
						} else {
							local.arWeeks = [];
						}
					</cfscript>
					<tr<cfif rc.nCurrentUser eq local.nUserID> class="highlight-user"</cfif>>
						<td><a href="#buildURL('pick.compare')#&nViewUserID=#local.nUserID#"> #rc.stUsers[local.nUserID].getSFirstName()# #rc.stUsers[local.nUserID].getSLastName()#</a></td>
						<!--- // <td></td> --->
						<td>#rc.stSeasonWins[local.nUserID]#</td>
						<!--- // <td></td> --->
						<td>#local.sPlace#</td>
						<!--- // loop through the week wins for this user --->
						<cfloop from="#arrayLen(rc.arWeeks)#" to="1" step="-1" index="local.y">
							<cfscript>
								if( !structKeyExists(local.stUserWeekData, rc.arWeeks[local.y].getNWeekNumber()) ){
									stUserWeekData[rc.arWeeks[local.y].getNWeekNumber()] = {
										"nPlace" = 0,
										"Wins" = 0
									};
									//arrayAppend(local.arWeeks, 0);
								}
								local.nWeekID = rc.arWeeks[local.y].getNWeekNumber();<commit_msg>Fixed standing view bug on first week<commit_after><section id="content">
<cfscript>
	local.sPlace = 1;
	local.sCurrentWins = 0;
</cfscript>
<cfoutput>
	<div class="table-responsive">
		<table id="standings" class="table hover order-column">
			<thead>
				<th>Player</th>
				<!--- // <th>Money</th> --->
				<th>Wins</th>
				<!--- // <th>Losses</th> --->
				<th>Rank</th>
				<!--- // loop through the weeks --->
				<cfloop from="#arrayLen(rc.arWeeks)#" to="1" step="-1" index="itm">
					<th data-week-id="#rc.arWeeks[itm].getNWeekID()#">Week #rc.arWeeks[itm].getNWeekNumber()#</th>
				</cfloop>
			</thead>
			<tbody>
				<tr id="fullResultsHeader">
					<td></td>
					<td></td>
					<td></td>
					<cfloop from="#arrayLen(rc.arWeeks)#" to="1" step="-1" index="itm">
						<td data-order="0">
							<a href="#buildURL('standing.fullResults')#&nWeekID=#rc.arWeeks[itm].getNWeekID()#">full results</a>
						</td>
					</cfloop>
				</tr>
				<!--- // loop through the season standings --->
				<cfloop from="1" to="#arrayLen(rc.arStandings)#" index="local.itm">
					<cfscript>
						// store current userID
						local.nUserID = rc.arStandings[local.itm];
						// determine what place the current user is in
						if( !isNull(rc.stSeasonWins[local.nUserID]) and rc.stSeasonWins[local.nUserID] neq local.sCurrentWins ){
							local.sPlace = local.itm;
						}
						local.stUserWeekData = rc.stWeekData[local.nUserID];
						local.arUserTiebreak = rc.stWeekTiebreak[local.nUserID];
						if( listLen(structKeyList(local.stUserWeekData)) gt 0 ){
							local.arWeeks = listToArray(listSort(structKeyList(local.stUserWeekData), "numeric", "asc"));
						} else {
							local.arWeeks = [];
						}
					</cfscript>
					<tr<cfif rc.nCurrentUser eq local.nUserID> class="highlight-user"</cfif>>
						<td><a href="#buildURL('pick.compare')#&nViewUserID=#local.nUserID#"> #rc.stUsers[local.nUserID].getSFirstName()# #rc.stUsers[local.nUserID].getSLastName()#</a></td>
						<!--- // <td></td> --->
						<td>#(!isNull(rc.stSeasonWins[local.nUserID])) ? rc.stSeasonWins[local.nUserID] : 0#</td>
						<!--- // <td></td> --->
						<td>#local.sPlace#</td>
						<!--- // loop through the week wins for this user --->
						<cfloop from="#arrayLen(rc.arWeeks)#" to="1" step="-1" index="local.y">
							<cfscript>
								if( !structKeyExists(local.stUserWeekData, rc.arWeeks[local.y].getNWeekNumber()) ){
									stUserWeekData[rc.arWeeks[local.y].getNWeekNumber()] = {
										"nPlace" = 0,
										"Wins" = 0
									};
									//arrayAppend(local.arWeeks, 0);
								}
								local.nWeekID = rc.arWeeks[local.y].getNWeekNumber();
{'fraction_non_alphanumeric': 0.2067049808429119, 'fraction_numerical': 0.005555555555555556, 'mean_word_length': 2.8760207869339274, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1207217', 'n_tokens_mistral': 2541, 'n_tokens_neox': 1968, 'n_words': 287}