<commit_before>/*
* Cepat Sembuh v1.0
* Copyright 2016 <NAME>
*/

document.addEventListener('deviceready', function () {
    Firebase.goOnline();
});

$('#not-available').on('click', function() {
	alert('Faskes is not available.')
})

function getNoAntri(tipe, username, name) {
  breanna = new Firebase('http://cepatsembuh.firebaseio.com/' + tipe + '/faskes/' + username),
  antri = new Firebase('http://cepatsembuh.firebaseio.com/' + tipe + '/faskes/' + username + '/antrian');
  pasien = breanna.child("pasien"),
  // Date
  date = new Date(),
  year = date.getFullYear(),
  month = date.getMonth() + 1,
  day = date.getDate(),
  right_now = year + '-' + month + '-' + day,
  today = breanna.child(right_now),

  get = 'Getting data..';
  console.log(get);

  var nama = prompt("Nama: "),
      nik = prompt("NIK: ");

  if (nama === '' || nik.length != 16 || typeof Number(nik) !== 'number' || Number(nik) == 'NaN') {
    alert('Input tidak valid');
  } else {
    antri.transaction(function(currentRank) {
        currentData = currentRank + 1;

        return currentData;
    }, function(error, committed, snapshot) {
        if (error) {
            alert('Koneksi anda tidak stabil' + error);
        } else {
            alert('Nomor Antrian: ' + snapshot.val());
            today.push().set({
              nama: nama,
              nik: nik,
              no_antri: snapshot.val()
            })
        }
    });<commit_msg>Append some message<commit_after>/*
* Cepat Sembuh v1.0
* Copyright 2016 <NAME>
*/

document.addEventListener('deviceready', function () {
    Firebase.goOnline();
});

$('#not-available').on('click', function() {
	alert('Faskes is not available.')
})

function getNoAntri(tipe, username, name) {
  breanna = new Firebase('http://cepatsembuh.firebaseio.com/' + tipe + '/faskes/' + username),
  antri = new Firebase('http://cepatsembuh.firebaseio.com/' + tipe + '/faskes/' + username + '/antrian');
  pasien = breanna.child("pasien"),
  // Date
  date = new Date(),
  year = date.getFullYear(),
  month = date.getMonth() + 1,
  day = date.getDate(),
  right_now = year + '-' + month + '-' + day,
  today = breanna.child(right_now),

  get = 'Getting data..';
  console.log(get);

  var nama = prompt("Nama: "),
      nik = prompt("NIK: ");

  if (nama === '' || nik.length != 16 || typeof Number(nik) !== 'number' || Number(nik) == 'NaN') {
    alert('Input tidak valid');
  } else {
    antri.transaction(function(currentRank) {
        currentData = currentRank + 1;

        return currentData;
    }, function(error, committed, snapshot) {
        if (error) {
            alert('Koneksi anda tidak stabil' + error);
        } else {
            alert('Nomor Antrian: ' + snapshot.val() + '\n' + 'Screenshot ini dan tunjukan ke faskes anda');
            today.push().set({
              nama: nama,
              nik: nik,
              no_antri: snapshot.val()
            })
        }
    });
{'fraction_non_alphanumeric': 0.1794959128065395, 'fraction_numerical': 0.006811989100817439, 'mean_word_length': 2.6259259259259258, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7274965', 'n_tokens_mistral': 1007, 'n_tokens_neox': 966, 'n_words': 212}