<commit_before>// $(function () {
//   $('#myTab li:eq(1) a').tab('show');
// });

var testData = {
  "abcd": {password: "1"},
  "1856889751213495": {password: "<PASSWORD>"},
  "$save": function(){return true;}
};
var onFBChkLogFin = function(){};
var isTest = false;

var app = angular.module("indexApp", ["firebase", "ngCookies"]);

app.controller("indexCtrl",
  function($scope, $firebaseArray, $firebaseObject, $cookies, $window) {

    if (checkLogin($cookies))
      gotoURL("/TXR/index.html", [], $window);

    var accounts;
    if (isTest == false) {
      initalizeFirebase();
      var ref = firebase.database().ref("usersx");
      accounts = $firebaseObject(ref);
    }
    else {
      accounts = testData;
    }

    $scope.scopeUser = accounts;

    $scope.login = function() {
      var loginUser;
      if ( accounts[$scope.inputUsername] !== undefined && accounts[$scope.inputUsername].password == $scope.inputPassword )
        loginUser = $scope.inputUsername;
      if (loginUser !== undefined) {
        $cookies.put("username",loginUser,{path:"/"});
        gotoURL("/TXR/index.html", [], $window);
      }
    };

    //$scope.rememberMe = false;

    var addUser = function(user) {
      if (accounts[user.username] === undefined){
        var userTemplate = {
          password: "",
          intro: "",
          img: "",
          tags: "",
          member: {},
          notif: []
        };
        userTemplate.password = <PASSWORD>;
        accounts[user.username] = userTemplate;
        accounts.$save();
      }
    };

    $scope.reg = function() {
      if ($scope.inputUsernameReg !== undefined && $scope.inputUsernameReg !== "" &&
          $scope.inputPasswordReg !== undefined && $scope.inputPasswordReg !== "" &&
          $scope.inputConfirmPasswordReg !== undefined && $scope.inputConfirmPasswordReg !== "" &&
          $scope.inputConfirmPasswordReg == $scope.inputPasswordReg) {
<commit_msg>connect to main firebase & add password to database<commit_after>// $(function () {
//   $('#myTab li:eq(1) a').tab('show');
// });

var testData = {
  "abcd": {password: "1"},
  "1856889751213495": {password: "<PASSWORD>"},
  "$save": function(){return true;}
};
var onFBChkLogFin = function(){};
var isTest = false;

var app = angular.module("indexApp", ["firebase", "ngCookies"]);

app.controller("indexCtrl",
  function($scope, $firebaseArray, $firebaseObject, $cookies, $window) {

    if (checkLogin($cookies))
      gotoURL("/TXR/index.html", [], $window);

    var accounts;
    if (isTest == false) {
      initalizeFirebase();
      var ref = firebase.database().ref("userList");
      accounts = $firebaseObject(ref);
    }
    else {
      accounts = testData;
    }

    $scope.scopeUser = accounts;

    $scope.login = function() {
      var loginUser;
      if ( accounts[$scope.inputUsername] !== undefined && accounts[$scope.inputUsername].password == $scope.inputPassword )
        loginUser = $scope.inputUsername;
      if (loginUser !== undefined) {
        $cookies.put("username",loginUser,{path:"/"});
        gotoURL("/TXR/index.html", [], $window);
      }
    };

    //$scope.rememberMe = false;

    var addUser = function(user) {
      if (accounts[user.username] === undefined){
        var userTemplate = {
          password: "",
          description: "default description",
          img: "",
          skills: [],
          Membership: {},
          notif: [],
          name: "default name"
        };
        userTemplate.password = <PASSWORD>;
        accounts[user.username] = userTemplate;
        accounts.$save();
      }
    };

    $scope.reg = function() {
      if ($scope.inputUsernameReg !== undefined && $scope.inputUsernameReg !== "" &&
          $scope.inputPasswordReg !== undefined && $scope.inputPasswordReg !== "" &&
          $scope.inputConfirmPasswordReg !== undefined && $scope.inputConfirmPasswordReg !== "" &&
          $scope.inputConfirmPasswordReg == $scope.inputPasswordReg) {

{'fraction_non_alphanumeric': 0.17750439367311072, 'fraction_numerical': 0.009038413256339443, 'mean_word_length': 2.776303317535545, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 7, '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': '1836796', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1172, 'n_words': 222}