<commit_before>import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { ActivatedRoute, Params } from '@angular/router';
import { VnService } from '../../vn.service';
import { FileUploadService } from '../../file-upload.service';
import { FileUploader } from 'ng2-file-upload';

@Component({
  selector: 'app-vn-screenshot',
  templateUrl: './vn-screenshot.component.html',
  styleUrls: ['./vn-screenshot.component.css']
})
export class VnScreenshotComponent implements OnInit {

  constructor(
    public router: Router,
    private vnService: VnService,
    private route: ActivatedRoute,
    private fileUploadService: FileUploadService
  ) { }

  ngOnInit() {
    let id = +this.route.snapshot.params['id'];
    this.loadVn(id);
  }

  vn:any;
  loadVn(id:number):void {
		this.vnService.getVn(id).subscribe(response => {
			this.vn = response.data;
		});
	}

  // fileChange(event) {
  //   let fileList: FileList = event.target.files;
  //   if (fileList.length > 0) {
  //     let file: File = fileList[0];
  //     this.fileUploadService.uploadScreenshots(this.vn.id, 1, file).subscribe(response => {
  //       console.log(response);
  //     });
  //   }
  // }

  public uploader:FileUploader = this.fileUploadService.uploadInstance;
  public hasBaseDropZoneOver:boolean = false;
  public fileOverBase(e:any):void {
    this.hasBaseDropZoneOver = e;<commit_msg>Fix broken page caused by unassigned variable<commit_after>import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { ActivatedRoute, Params } from '@angular/router';
import { VnService } from '../../vn.service';
import { FileUploadService } from '../../file-upload.service';
import { FileUploader } from 'ng2-file-upload';

@Component({
  selector: 'app-vn-screenshot',
  templateUrl: './vn-screenshot.component.html',
  styleUrls: ['./vn-screenshot.component.css']
})
export class VnScreenshotComponent implements OnInit {

  constructor(
    public router: Router,
    private vnService: VnService,
    private route: ActivatedRoute,
    private fileUploadService: FileUploadService
  ) { }

  ngOnInit() {
    let id = +this.route.snapshot.params['id'];
    this.loadVn(id);
  }

  vn:any = {};
  loadVn(id:number):void {
		this.vnService.getVn(id).subscribe(response => {
			this.vn = response.data;
		});
	}

  // fileChange(event) {
  //   let fileList: FileList = event.target.files;
  //   if (fileList.length > 0) {
  //     let file: File = fileList[0];
  //     this.fileUploadService.uploadScreenshots(this.vn.id, 1, file).subscribe(response => {
  //       console.log(response);
  //     });
  //   }
  // }

  public uploader:FileUploader = this.fileUploadService.uploadInstance;
  public hasBaseDropZoneOver:boolean = false;
  public fileOverBase(e:any):void {
    this.hasBaseDropZoneOver = e;
{'fraction_non_alphanumeric': 0.15151515151515152, 'fraction_numerical': 0.002786485545106235, 'mean_word_length': 3.508634222919937, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6535459', 'n_tokens_mistral': 974, 'n_tokens_neox': 936, 'n_words': 179}