<commit_before>'use strict';

var React = require('react-native');
var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Image,
  TouchableHighlight,
} = React;

var Camera = require('react-native-camera'); //require the camera component

var ReactNativeCameraExample = React.createClass({
    getInitialState: function() {
        return ({
            capturedBase64: '',
            type: 'front'
        });
    },

    render: function() {
        var component = this;
        return (
            <View style={styles.container}>
                <Camera style={styles.camera} ref="cam" type={this.state.type} captureTarget={Camera.constants.CaptureTarget.cameraRoll}></Camera>
                <Image
                source={{
                    isStatic: true,
                    uri: 'data:image/jpeg;base64,' + component.state.capturedBase64,
                }}
                style={styles.captured}
                />
            <TouchableHighlight style={styles.captureButton} onPress={function() {
                component.refs.cam.capture().then(function(capturedBase64) {
                    component.setState({ capturedBase64 });
                    setTimeout(() => component.setState({ capturedBase64: '' }), 5000);
                });
            }}>
                <Text style={{textAlign: 'center'}}>Capture</Text>
            </TouchableHighlight>
            </View>
        );
    }
});

var styles = StyleSheet.create({
    container: {
        flex: 1,<commit_msg>change captureTarget to memory for the example<commit_after>'use strict';

var React = require('react-native');
var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Image,
  TouchableHighlight,
} = React;

var Camera = require('react-native-camera'); //require the camera component

var ReactNativeCameraExample = React.createClass({
    getInitialState: function() {
        return ({
            capturedBase64: '',
            type: 'front'
        });
    },

    render: function() {
        var component = this;
        return (
            <View style={styles.container}>
                <Camera style={styles.camera} ref="cam" type={this.state.type} captureTarget={Camera.constants.CaptureTarget.memory}></Camera>
                <Image
                source={{
                    isStatic: true,
                    uri: 'data:image/jpeg;base64,' + component.state.capturedBase64,
                }}
                style={styles.captured}
                />
            <TouchableHighlight style={styles.captureButton} onPress={function() {
                component.refs.cam.capture().then(function(capturedBase64) {
                    component.setState({ capturedBase64 });
                    setTimeout(() => component.setState({ capturedBase64: '' }), 5000);
                });
            }}>
                <Text style={{textAlign: 'center'}}>Capture</Text>
            </TouchableHighlight>
            </View>
        );
    }
});

var styles = StyleSheet.create({
    container: {
        flex: 1,
{'fraction_non_alphanumeric': 0.13050679032792314, 'fraction_numerical': 0.011262007287181186, 'mean_word_length': 1.8679962013295346, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, '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': '1273839', 'n_tokens_mistral': 821, 'n_tokens_neox': 770, 'n_words': 147}