<commit_before><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <link rel="stylesheet" href="style.css">
    <title>JavaScript Stomp Test</title>
    <script src="/static/Orbited.js"></script>
    <script>TCPSocket = Orbited.TCPSocket;</script>
    <!-- TODO move this include to common place -->
    <script src="/static/protocols/stomp/unicode.js"></script>
    <script src="/static/protocols/stomp/stomp.js"></script>
    <script src="shell.js"></script>
    <script>
        onload = function() {
            // set up shell.
            var output = document.getElementById('output');
            var shell = new Shell(output);

            // set up stomp client.
            stomp = new STOMPClient();
            stomp.onopen = function() {
                shell.print("Transport openned");
            };
            stomp.onclose = function() {
                shell.print("Transport closed");
            };
            stomp.onerror = function(error) {
                alert(error);
            };
            stomp.onerrorframe = function(frame) {
                alert(frame.body);
            };
            stomp.onconnectedframe = function() {
                shell.print("Connected to ActiveMQ as user " + document.getElementById('username').value);
            };
            stomp.onmessageframe = function(frame) {
                shell.print(frame.body);
            };
        };
    </script>
</head>
<body>
    <h1>STOMP Test</h1><commit_msg>use onclose code in stomp demo<commit_after><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <link rel="stylesheet" href="style.css">
    <title>JavaScript Stomp Test</title>
    <script src="/static/Orbited.js"></script>
    <script>TCPSocket = Orbited.TCPSocket;</script>
    <!-- TODO move this include to common place -->
    <script src="/static/protocols/stomp/unicode.js"></script>
    <script src="/static/protocols/stomp/stomp.js"></script>
    <script src="shell.js"></script>
    <script>
        onload = function() {
            // set up shell.
            var output = document.getElementById('output');
            var shell = new Shell(output);

            // set up stomp client.
            stomp = new STOMPClient();
            stomp.onopen = function() {
                shell.print("Transport openned");
            };
            stomp.onclose = function(code) {
                shell.print("Transport closed (code: " + code + ")");
            };
            stomp.onerror = function(error) {
                alert(error);
            };
            stomp.onerrorframe = function(frame) {
                alert(frame.body);
            };
            stomp.onconnectedframe = function() {
                shell.print("Connected to ActiveMQ as user " + document.getElementById('username').value);
            };
            stomp.onmessageframe = function(frame) {
                shell.print(frame.body);
            };
        };
    </script>
</head>
<body>
    <h1>STOMP Test</h1>
{'fraction_non_alphanumeric': 0.1499080318822808, 'fraction_numerical': 0.005518087063151441, 'mean_word_length': 1.929084380610413, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1268778', 'n_tokens_mistral': 959, 'n_tokens_neox': 926, 'n_words': 178}