<commit_before>﻿<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Include Day CI&T 2015</title>

    <script src="js/jquery-2.1.3.js"></script>
    <script src="js/querystring-0.9.0-min.js"></script>

    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />

    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css" />
    <link rel="stylesheet" href="css/main.css" />

    <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css' />

</head>
<body>
    <!-- Início da barra de navegação -->
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.html">Include Day</a>
            </div>
            <div id="navbar" class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li><a href="cadastrar.html">Cadastrar</a></li>
                    <li><a href="encontrar.html">Encontrar</a></li>
                </ul>
            </div>
            <!--/.nav-collapse -->
        </div>
    </nav>
    <!-- Fim da barra de navegação -->

    <!-- Início do container para a classe 'hero-unit' -->
    <div class="container hero">
        <!-- Início hero unit -->
        <div class="hero-unit">
            <h1>#IncludeDayCI&T</h1>
            <p>Conheça o novo sistema de cadastro, localização e avaliação de locais com acessibilidade.</p>
        </div>
    </div>
    <!-- /container hero -->
    <hr>
    <!-- Início container-fuild -->
    <div class="container">
        <div class="row-fluid">

            <h2 id="locationName"></h2>

            <p>
                Tipo:
                <br />
                <span id="locationType"></span>
            </p>

            <p>
                Cidade:
                <br />
                <span id="locationCity"></span>
            </p>

            <p>
                Descrição:
                <br />
                <span id="locationDescription"></span>
            </p>

            <h3>Lista de avaliações</h3>
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>Nota</th>
                            <th>Nome</th>
                            <th>Descrição</th>
                        </tr>
                    </thead>
                    <tbody class="table-result"></tbody>
                </table>
            </div>


            <h2>Cadastro de feedback</h2>
            <!-- Início form -->
            <form role="form">

                <div class="form-group">
                    <label for="name">Seu nome:</label>
                    <input type="text" class="form-control" id="username">
                </div>

                <div class="form-group">
                    <label for="rating">Tipo:</label>
                    <select class="form-control" id="rating">
                        <option value="1">1 - ruim</option>
                        <option value="2">2 - rasoável</option>
                        <option value="3">3 - bom</option>
                        <option value="4">4 - muito bom</option>
                        <option value="5">5 - excelente</option>
                    </select>
                </div>

                <div class="form-group">
                    <label for="description">Descrição:</label>
                    <textarea class="form-control" rows="5" id="description"></textarea>
                </div>

                <button type="button" class="btn btn-default btn-cadastrar">Cadastrar &raquo;</button>

            </form>
            <!-- /form -->

            <script type="text/javascript">

                $(document).ready(function () {

                    var URL_TODOS_LOCAIS = "http://localhost/IncludeDay.Services/api/Locations";
                    var idLocation = $.QueryString("id");

                    $.getJSON(

                        URL_TODOS_LOCAIS + "/" + idLocation,

                        function (json) {

                            console.log(json);

                            $("#locationType").html(json.LocationType);
                            $("#locationDescription").html(json.Description);
                            $("#locationCity").html(json.City);
                            $("#locationName").html(json.Name);

                            if (json.Feedbacks) {

                                var tr;
                                for (var i = 0; i < json.Feedbacks.length; i++) {
                                    tr = $('<tr/>');
                                    tr.append("<td>" + json.Feedbacks[i].Rating + "</td>");
                                    tr.append("<td>" + json.Feedbacks[i].UserName + "</td>");
                                    tr.append("<td>" + json.Feedbacks[i].Description + "</td>");
                                    $('.table-result').append(tr);
                                }

                            }

                        });

                    $(".btn-cadastrar").click(function () {

                        var URL_CADASTRO = "http://localhost/IncludeDay.Services/api/Feedbacks";

                        var feedback = {
                            UserName: $("#username").val(),
                            Description: $("#description").val(),
                            Rating: $("#rating").val(),
                            LocationId: idLocation,
                            Id: 0,
                        };

                        console.log(feedback);

                        $.ajax({
                            type: "POST",
                            url: URL_CADASTRO,
                            data: JSON.stringify(feedback),
                            contentType: "application/json; charset=utf-8",
                            dataType: "json",
                            processData: true,
                            success: function (data) {

                            },
                            error: function (xhr) {
                                alert(xhr.responseText);
                            }
                        });
<commit_msg>Reload page after feedback<commit_after>﻿<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Include Day CI&T 2015</title>

    <script src="js/jquery-2.1.3.js"></script>
    <script src="js/querystring-0.9.0-min.js"></script>

    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />

    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css" />
    <link rel="stylesheet" href="css/main.css" />

    <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css' />

</head>
<body>
    <!-- Início da barra de navegação -->
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.html">Include Day</a>
            </div>
            <div id="navbar" class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li><a href="cadastrar.html">Cadastrar</a></li>
                    <li><a href="encontrar.html">Encontrar</a></li>
                </ul>
            </div>
            <!--/.nav-collapse -->
        </div>
    </nav>
    <!-- Fim da barra de navegação -->

    <!-- Início do container para a classe 'hero-unit' -->
    <div class="container hero">
        <!-- Início hero unit -->
        <div class="hero-unit">
            <h1>#IncludeDayCI&T</h1>
            <p>Conheça o novo sistema de cadastro, localização e avaliação de locais com acessibilidade.</p>
        </div>
    </div>
    <!-- /container hero -->
    <hr>
    <!-- Início container-fuild -->
    <div class="container">
        <div class="row-fluid">

            <h2 id="locationName"></h2>

            <p>
                Tipo:
                <br />
                <span id="locationType"></span>
            </p>

            <p>
                Cidade:
                <br />
                <span id="locationCity"></span>
            </p>

            <p>
                Descrição:
                <br />
                <span id="locationDescription"></span>
            </p>

            <h3>Lista de avaliações</h3>
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>Nota</th>
                            <th>Nome</th>
                            <th>Descrição</th>
                        </tr>
                    </thead>
                    <tbody class="table-result"></tbody>
                </table>
            </div>


            <h2>Cadastro de feedback</h2>
            <!-- Início form -->
            <form role="form">

                <div class="form-group">
                    <label for="name">Seu nome:</label>
                    <input type="text" class="form-control" id="username">
                </div>

                <div class="form-group">
                    <label for="rating">Tipo:</label>
                    <select class="form-control" id="rating">
                        <option value="1">1 - ruim</option>
                        <option value="2">2 - rasoável</option>
                        <option value="3">3 - bom</option>
                        <option value="4">4 - muito bom</option>
                        <option value="5">5 - excelente</option>
                    </select>
                </div>

                <div class="form-group">
                    <label for="description">Descrição:</label>
                    <textarea class="form-control" rows="5" id="description"></textarea>
                </div>

                <button type="button" class="btn btn-default btn-cadastrar">Cadastrar &raquo;</button>

            </form>
            <!-- /form -->

            <script type="text/javascript">

                $(document).ready(function () {

                    var URL_TODOS_LOCAIS = "http://localhost/IncludeDay.Services/api/Locations";
                    var idLocation = $.QueryString("id");

                    $.getJSON(

                        URL_TODOS_LOCAIS + "/" + idLocation,

                        function (json) {

                            console.log(json);

                            $("#locationType").html(json.LocationType);
                            $("#locationDescription").html(json.Description);
                            $("#locationCity").html(json.City);
                            $("#locationName").html(json.Name);

                            if (json.Feedbacks) {

                                var tr;
                                for (var i = 0; i < json.Feedbacks.length; i++) {
                                    tr = $('<tr/>');
                                    tr.append("<td>" + json.Feedbacks[i].Rating + "</td>");
                                    tr.append("<td>" + json.Feedbacks[i].UserName + "</td>");
                                    tr.append("<td>" + json.Feedbacks[i].Description + "</td>");
                                    $('.table-result').append(tr);
                                }

                            }

                        });

                    $(".btn-cadastrar").click(function () {

                        var URL_CADASTRO = "http://localhost/IncludeDay.Services/api/Feedbacks";

                        var feedback = {
                            UserName: $("#username").val(),
                            Description: $("#description").val(),
                            Rating: $("#rating").val(),
                            LocationId: idLocation,
                            Id: 0,
                        };

                        console.log(feedback);

                        $.ajax({
                            type: "POST",
                            url: URL_CADASTRO,
                            data: JSON.stringify(feedback),
                            contentType: "application/json; charset=utf-8",
                            dataType: "json",
                            processData: true,
                            success: function (data) {
                                window.location.reload();
                            },
                            error: function (xhr) {
                                alert(xhr.responseText);
                            }
                        });

{'fraction_non_alphanumeric': 0.14766839378238342, 'fraction_numerical': 0.006161602016524296, 'mean_word_length': 1.1523508137432188, 'pattern_counts': {'":': 0, '<': 301, '<?xml version=': 0, '>': 299, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1435026', 'n_tokens_mistral': 3868, 'n_tokens_neox': 3559, 'n_words': 650}