<commit_before>import React from 'react';
import ReactDOM from 'react-dom';
import Helmet from "react-helmet";
import axios from 'axios';
import {encrypt, decrypt} from '../utils/pgp.js';
import {bunny} from '../ajax/password_form.js';


export default class PasswordForm extends React.Component {

    editor(e){
        e.preventDefault();
        let data = [];
        data['site_url'] = ReactDOM.findDOMNode(this.refs.site_url).value;
        data['username'] = ReactDOM.findDOMNode(this.refs.username).value;
        data['email'] = ReactDOM.findDOMNode(this.refs.email).value;
        data['tag'] = ReactDOM.findDOMNode(this.refs.tag).value;
        data['password'] = ReactDOM.findDOMNode(this.refs.password).value;
        data['note'] = ReactDOM.findDOMNode(this.refs.note).value;
    }

    componentDidMount(){
        (function () {  // function for password generate
            $( "#generate" ).click(function() {
                var length = $('#range').val();
                var charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+";
                var retVal = "";
                for (var i = 0, n = charset.length; i < length; ++i) {
                    retVal += charset.charAt(Math.floor(Math.random() * n));
                }
                $('#inputPassword').val(retVal);
            });<commit_msg>added missing line<commit_after>import React from 'react';
import ReactDOM from 'react-dom';
import Helmet from "react-helmet";
import axios from 'axios';
import {encrypt, decrypt} from '../utils/pgp.js';
import {bunny} from '../ajax/password_form.js';


export default class PasswordForm extends React.Component {

    editor(e){
        e.preventDefault();
        let data = [];
        data['site_url'] = ReactDOM.findDOMNode(this.refs.site_url).value;
        data['username'] = ReactDOM.findDOMNode(this.refs.username).value;
        data['email'] = ReactDOM.findDOMNode(this.refs.email).value;
        data['tag'] = ReactDOM.findDOMNode(this.refs.tag).value;
        data['password'] = ReactDOM.findDOMNode(this.refs.password).value;
        data['note'] = ReactDOM.findDOMNode(this.refs.note).value;
        bunny(data);
    }

    componentDidMount(){
        (function () {  // function for password generate
            $( "#generate" ).click(function() {
                var length = $('#range').val();
                var charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+";
                var retVal = "";
                for (var i = 0, n = charset.length; i < length; ++i) {
                    retVal += charset.charAt(Math.floor(Math.random() * n));
                }
                $('#inputPassword').val(retVal);
            });
{'fraction_non_alphanumeric': 0.15634110787172012, 'fraction_numerical': 0.008017492711370262, 'mean_word_length': 2.57421875, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5381998', 'n_tokens_mistral': 875, 'n_tokens_neox': 813, 'n_words': 155}