<commit_before>package com.example.patrickcaruso.activistwatch;

import android.content.Intent;
import android.graphics.Point;
import android.support.design.widget.NavigationView;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.support.annotation.NonNull;
import android.widget.TextView;

import com.example.patrickcaruso.activistwatch.Adapter.EventAdapter;
import com.example.patrickcaruso.activistwatch.Database.Database;
import com.example.patrickcaruso.activistwatch.Event.Event;
import com.example.patrickcaruso.activistwatch.Event.ThisEvent;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Ju-Hwan on 11/10/2017.
 */

public class EventPageActivity extends AppCompatActivity{
    private DrawerLayout mDrawerLayout;
    private ActionBarDrawerToggle mToggle;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dashboard);

        Toolbar myToolbar = (Toolbar) findViewById(R.id.my_toolbar);
        setSupportActionBar(myToolbar);
        //see if organization exists in database
        Event event;
        int orgId = ThisEvent.getId();
        String response = "";
        try {
            response = Database.lookupOrganization(orgId);
        } catch (IOException e) {
            e.printStackTrace();
        }
        event = EventAdapter.adapt(response);
        SimpleDateFormat sdfr = new SimpleDateFormat("dd/MMM/yyy");
        //if yes then get its name, description, picture, events, keywords(tags)
        String eventNameStr = event.getName();
        String eventDescription = event.getDescription();
        Date eveDate = event.getTime();
        String eventDate = sdfr.format(eveDate);
        Point eventPoint = event.getLocation();
        String eventLocation = eventPoint.toString();
        TextView eventName = new TextView(this);
        TextView eventDes = new TextView(this);
        TextView eventTime = new TextView(this);
        TextView eventLoc = new TextView(this);

        eventName.setText(eventNameStr);
        eventDes.setText(eventDescription);
        eventTime.setText(eventDate);
        eventLoc.setText(eventLocation);

        mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
        mToggle = new ActionBarDrawerToggle(this,mDrawerLayout,R.string.open, R.string.close);
        mDrawerLayout.addDrawerListener(mToggle);
        mToggle.syncState();<commit_msg>Add some stuff to event page.<commit_after>package com.example.patrickcaruso.activistwatch;

import android.content.Intent;
import android.graphics.Point;
import android.support.design.widget.NavigationView;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.support.annotation.NonNull;
import android.widget.TextView;

import com.example.patrickcaruso.activistwatch.Adapter.EventAdapter;
import com.example.patrickcaruso.activistwatch.Database.Database;
import com.example.patrickcaruso.activistwatch.Event.Event;
import com.example.patrickcaruso.activistwatch.Event.ThisEvent;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Ju-Hwan on 11/10/2017.
 */

public class EventPageActivity extends AppCompatActivity{
    private DrawerLayout mDrawerLayout;
    private ActionBarDrawerToggle mToggle;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dashboard);

        Toolbar myToolbar = (Toolbar) findViewById(R.id.my_toolbar);
        setSupportActionBar(myToolbar);
        //see if organization exists in database
        int eventId = 0;
        eventId = savedInstanceState.getInt("orgId");
        Event event;
        String response = "";
        try {
            response = Database.lookupEvent(eventId);
        } catch (IOException e) {
            e.printStackTrace();
        }
        event = EventAdapter.adapt(response);
        SimpleDateFormat sdfr = new SimpleDateFormat("dd/MMM/yyy");
        //if yes then get its name, description, picture, events, keywords(tags)
        String eventNameStr = event.getName();
        String eventDescription = event.getDescription();
        Date eveDate = event.getTime();
        String eventDate = sdfr.format(eveDate);
        Point eventPoint = event.getLocation();
        String eventLocation = eventPoint.toString();
        TextView eventName = new TextView(this);
        TextView eventDes = new TextView(this);
        TextView eventTime = new TextView(this);
        TextView eventLoc = new TextView(this);

        eventName.setText(eventNameStr);
        eventDes.setText(eventDescription);
        eventTime.setText(eventDate);
        eventLoc.setText(eventLocation);

        mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
        mToggle = new ActionBarDrawerToggle(this,mDrawerLayout,R.string.open, R.string.close);
        mDrawerLayout.addDrawerListener(mToggle);
        mToggle.syncState();
{'fraction_non_alphanumeric': 0.09522958727889941, 'fraction_numerical': 0.004466678577809541, 'mean_word_length': 3.672787979966611, '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': '1467215', 'n_tokens_mistral': 1549, 'n_tokens_neox': 1508, 'n_words': 312}