<commit_before><%@ page contentType="text/html; charset=UTF-8" 
         import="java.util.List"
%>
<html>
<head>
<meta name="robots" content="noindex, nofollow" />
<link rel="shortcut icon" href="/favicon.ico" />
<title>Quotes fra #linux.no på freenode</title>
<style type="text/css">
body {font-family: monospace;}
hr {
	border-style: solid;
	border-color: black;
	border-width: 1px; 
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000">

<pre>
                     _ _  
                    | (_)_ __  _   ___  __  _ __   ___  
              _|_|_ | | | '_ \| | | \ \/ / | '_ \ / _ \ 
              _|_|_ | | | | | | |_| |)  ( _| | | | (_) | 
               | |  |_|_|_| |_|\__,_/_/\_(_)_| |_|\___/ 
             -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=BETA-=-
                   Quotes fra #linux.no på freenode
                  Klikk <a href="add.jsp">her</a> for å legge til en quote

              Sortér etter <a href="quotes.jsp?order=date">quote-dato</a> | <a href="quotes.jsp?order=score">score</a> | <a href="quotes.jsp?order=timestamp">timestamp</a>
</pre>
<hr>

<script>

function vote(id, value) {
    var http = new XMLHttpRequest();
    http.open("GET","/vote?id="+id+"&vote="+value);
    http.onreadystatechange=function() {
        if(http.readyState==4) {
            document.getElementById("v"+id).innerHTML = http.responseText;
        }
    }
    http.send(null);
}
</script>


<%

String order = request.getParameter("order");
 
List<lq.Quote> quotes;

if (order == null) {
    quotes = lq.QuoteUtil.getQuotesOrderedByTimestampDesc();
} else if(order.equals("timestamp")) {
    quotes = lq.QuoteUtil.getQuotesOrderedByTimestampDesc();
} else if(order.equals("score")) {
    quotes = lq.QuoteUtil.getQuotesOrderedByScoreDesc();
} else if(order.equals("date")) {
    quotes = lq.QuoteUtil.getQuotesOrderedByDateDesc();
} else {
    quotes = lq.QuoteUtil.getQuotesOrderedByTimestampDesc();
}

lq.Printer printer = new lq.Printer(out); 
long displayIndex = quotes.size() + 1;
for (lq.Quote quote : quotes) {
    printer.printQuote(quote, displayIndex);<commit_msg>Fix off-by-one error in displayNumbers.<commit_after><%@ page contentType="text/html; charset=UTF-8" 
         import="java.util.List"
%>
<html>
<head>
<meta name="robots" content="noindex, nofollow" />
<link rel="shortcut icon" href="/favicon.ico" />
<title>Quotes fra #linux.no på freenode</title>
<style type="text/css">
body {font-family: monospace;}
hr {
	border-style: solid;
	border-color: black;
	border-width: 1px; 
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000">

<pre>
                     _ _  
                    | (_)_ __  _   ___  __  _ __   ___  
              _|_|_ | | | '_ \| | | \ \/ / | '_ \ / _ \ 
              _|_|_ | | | | | | |_| |)  ( _| | | | (_) | 
               | |  |_|_|_| |_|\__,_/_/\_(_)_| |_|\___/ 
             -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=BETA-=-
                   Quotes fra #linux.no på freenode
                  Klikk <a href="add.jsp">her</a> for å legge til en quote

              Sortér etter <a href="quotes.jsp?order=date">quote-dato</a> | <a href="quotes.jsp?order=score">score</a> | <a href="quotes.jsp?order=timestamp">timestamp</a>
</pre>
<hr>

<script>

function vote(id, value) {
    var http = new XMLHttpRequest();
    http.open("GET","/vote?id="+id+"&vote="+value);
    http.onreadystatechange=function() {
        if(http.readyState==4) {
            document.getElementById("v"+id).innerHTML = http.responseText;
        }
    }
    http.send(null);
}
</script>


<%

String order = request.getParameter("order");
 
List<lq.Quote> quotes;

if (order == null) {
    quotes = lq.QuoteUtil.getQuotesOrderedByTimestampDesc();
} else if(order.equals("timestamp")) {
    quotes = lq.QuoteUtil.getQuotesOrderedByTimestampDesc();
} else if(order.equals("score")) {
    quotes = lq.QuoteUtil.getQuotesOrderedByScoreDesc();
} else if(order.equals("date")) {
    quotes = lq.QuoteUtil.getQuotesOrderedByDateDesc();
} else {
    quotes = lq.QuoteUtil.getQuotesOrderedByTimestampDesc();
}

lq.Printer printer = new lq.Printer(out); 
long displayIndex = quotes.size();
for (lq.Quote quote : quotes) {
    printer.printQuote(quote, displayIndex);
{'fraction_non_alphanumeric': 0.1951219512195122, 'fraction_numerical': 0.010084427767354597, 'mean_word_length': 2.7944839857651247, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 53, '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': '6910369', 'n_tokens_mistral': 1593, 'n_tokens_neox': 1492, 'n_words': 240}