<commit_before>function pauseVideo() {
    this.video.pause();
    this.streaming = false;
}

function playVideo() {
    this.streaming = true;
    this.video.play();
}

var QRCodeScanner = {
    canvas: document.getElementById("qr-canvas"),
    video: document.getElementById('v'),
    capture: document.getElementById('capture'),
    // photo: document.getElementById('p'),
    width: 320,
    height: 240,
    streaming: false,
    lastMsg: null,
    intervalLock: 'released',

    /**
     * Present content on screen
     */
    read: function scanner_read(txt) {
	var that = this;
	if (txt != this.lastMsg) {
	    var msg = document.getElementById('message');
	    var signInObject = new SignIn();

	    var registrantQuery = new Parse.Query(Registrants);
	    registrantQuery.equalTo('emailAddress', txt);
	    console.log("SENDING QUERY");
	    registrantQuery.first().then(function(registrant) {
		if (typeof registrant !== 'undefined') {
		    var firstName = registrant.get('firstName');
		    var lastName = registrant.get('lastName');
		    msg.innerHTML = firstName + " " + lastName;
		    console.log("SAVING");
		    signInObject.set('registrant', registrant);
		    return signInObject.save(null);
		}
		else {
		    msg.innerHTML = 'ERROR';
		    return Parse.Promise.error("User is not a registrant.");<commit_msg>Set email of SignIn object<commit_after>function pauseVideo() {
    this.video.pause();
    this.streaming = false;
}

function playVideo() {
    this.streaming = true;
    this.video.play();
}

var QRCodeScanner = {
    canvas: document.getElementById("qr-canvas"),
    video: document.getElementById('v'),
    capture: document.getElementById('capture'),
    // photo: document.getElementById('p'),
    width: 320,
    height: 240,
    streaming: false,
    lastMsg: null,
    intervalLock: 'released',

    /**
     * Present content on screen
     */
    read: function scanner_read(txt) {
	var that = this;
	if (txt != this.lastMsg) {
	    var msg = document.getElementById('message');
	    var signInObject = new SignIn();

	    var registrantQuery = new Parse.Query(Registrants);
	    registrantQuery.equalTo('emailAddress', txt);
	    console.log("SENDING QUERY");
	    registrantQuery.first().then(function(registrant) {
		if (typeof registrant !== 'undefined') {
		    var firstName = registrant.get('firstName');
		    var lastName = registrant.get('lastName');
		    msg.innerHTML = firstName + " " + lastName;
		    console.log("SAVING");
		    signInObject.set('email', registrant.get('emailAddress'));
		    signInObject.set('registrant', registrant);
		    return signInObject.save(null);
		}
		else {
		    msg.innerHTML = 'ERROR';
		    return Parse.Promise.error("User is not a registrant.");
{'fraction_non_alphanumeric': 0.141399416909621, 'fraction_numerical': 0.004373177842565598, 'mean_word_length': 3.3364928909952605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2514929', 'n_tokens_mistral': 884, 'n_tokens_neox': 811, 'n_words': 177}