<commit_before>/**
 * React Starter Kit (https://www.reactstarterkit.com/)
 *
 * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.txt file in the root directory of this source tree.
 */

import React, { Component, PropTypes} from 'react';

import withStyles from 'isomorphic-style-loader/lib/withStyles';
import $ from 'jquery';
import Header from '../Header';
import emptyFunction from 'fbjs/lib/emptyFunction';
import Link from '../Link';
import * as constants from '../../constants';
import Dropzone  from 'react-dropzone';


//import style from './FloatEditor.scss';
const title = 'New Post';
const homePage = '/';


class FloatEditor extends Component {
  onDrop (files) {
  console.log('Received files: ', files);
},

  postSimpleText(){
    console.log("request sent");

    var headline = $('.headline').val(),
        author = $('.author').val(),
        body = $('.body').val();

    var request = $.ajax({
      url: constants.ENDPOINT_ARTICLES,
      type: "POST",
      contentType: "application/json; charset=utf-8",
      dataType: "json",
      data: JSON.stringify({
        headline: headline,<commit_msg>remove comma<commit_after>/**
 * React Starter Kit (https://www.reactstarterkit.com/)
 *
 * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.txt file in the root directory of this source tree.
 */

import React, { Component, PropTypes} from 'react';

import withStyles from 'isomorphic-style-loader/lib/withStyles';
import $ from 'jquery';
import Header from '../Header';
import emptyFunction from 'fbjs/lib/emptyFunction';
import Link from '../Link';
import * as constants from '../../constants';
import Dropzone  from 'react-dropzone';


//import style from './FloatEditor.scss';
const title = 'New Post';
const homePage = '/';


class FloatEditor extends Component {
  onDrop (files) {
  console.log('Received files: ', files);
}

  postSimpleText(){
    console.log("request sent");

    var headline = $('.headline').val(),
        author = $('.author').val(),
        body = $('.body').val();

    var request = $.ajax({
      url: constants.ENDPOINT_ARTICLES,
      type: "POST",
      contentType: "application/json; charset=utf-8",
      dataType: "json",
      data: JSON.stringify({
        headline: headline,
{'fraction_non_alphanumeric': 0.14892739273927394, 'fraction_numerical': 0.007425742574257425, 'mean_word_length': 3.4251824817518246, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6876310', 'n_tokens_mistral': 713, 'n_tokens_neox': 683, 'n_words': 228}