<commit_before>
fc.applyAll = applyAll;


/* Event Date Math
-----------------------------------------------------------------------------*/


function exclEndDay(event) {
	if (event.end) {
		return _exclEndDay(event.end, event.allDay);
	}else{
		return addDays(cloneDate(event.start), 1);
	}
}


function _exclEndDay(end, allDay) {
	end = cloneDate(end);
	return allDay || end.getHours() || end.getMinutes() ? addDays(end, 1) : clearTime(end);
}


function segCmp(a, b) {
	return (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start);
}


function segsCollide(seg1, seg2) {
	return seg1.end > seg2.start && seg1.start < seg2.end;
}



/* Event Sorting
-----------------------------------------------------------------------------*/
<commit_msg>Enables priority on events. Example: event.priority = 10 will get hight up than event.priority = 5, documentation: http://stackoverflow.com/questions/15226946/render-event-on-top-fullcalendar. No test available since it's such a little change, won't effect those who doesn't want to prioritize by anything special..<commit_after>
fc.applyAll = applyAll;


/* Event Date Math
-----------------------------------------------------------------------------*/


function exclEndDay(event) {
	if (event.end) {
		return _exclEndDay(event.end, event.allDay);
	}else{
		return addDays(cloneDate(event.start), 1);
	}
}


function _exclEndDay(end, allDay) {
	end = cloneDate(end);
	return allDay || end.getHours() || end.getMinutes() ? addDays(end, 1) : clearTime(end);
}


function segCmp(a, b) {
	// Enable priority on events, put a higher number go get higher priority.
	// If no integer is given, order by time as before.
    var priorityDiff = ((a.event.priority || 0) < (b.event.priority || 0)) ? 1 : ((b.event.priority || 0) < (a.event.priority || 0)) ? -1 : 0;
    if(priorityDiff != 0) return priorityDiff;
    return (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start);
}



function segsCollide(seg1, seg2) {
	return seg1.end > seg2.start && seg1.start < seg2.end;
}



/* Event Sorting
-----------------------------------------------------------------------------*/

{'fraction_non_alphanumeric': 0.2722170252572498, 'fraction_numerical': 0.019176800748362956, 'mean_word_length': 2.109011627906977, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '445412', 'n_tokens_mistral': 709, 'n_tokens_neox': 659, 'n_words': 170}