<commit_before>package k57ca.pmp.askeverywhere;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class MySimpleArrayAdapter extends ArrayAdapter<String> {
  private final Context context;
  private final String[] titles;

  public MySimpleArrayAdapter(Context context, String[] titles) {
    super(context, R.layout.question, titles);
    this.context = context;
    this.titles = titles;
  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    LayoutInflater inflater = (LayoutInflater) context
        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View rowView = inflater.inflate(R.layout.question, parent, false);
    TextView title = (TextView) rowView.findViewById(R.id.title);
    ImageView imageView = (ImageView) rowView.findViewById(R.id.icon);
    title.setText(titles[position]);
//    imageView.setImageResource(R.drawable.sof_black);
    // change the icon for Windows and iPhone
    int x = (int)(Math.random() * 2) + 1;;
    if (x == 1) {
      imageView.setImageResource(R.drawable.sof_black);
    } else {
      imageView.setImageResource(R.drawable.quora);
    }
    
    

    return rowView;
  }
} <commit_msg>[#3] commit to push github<commit_after>package k57ca.pmp.askeverywhere;

import android.content.Context;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class MySimpleArrayAdapter extends ArrayAdapter<String> {
  private final Context context;
  private final String[] titles;
  private final String[] bodys = MainActivity.bodys;

  public MySimpleArrayAdapter(Context context, String[] titles) {
    super(context, R.layout.question, titles);
    this.context = context;
    this.titles = titles;
  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    LayoutInflater inflater = (LayoutInflater) context
        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View rowView = inflater.inflate(R.layout.question, parent, false);
    TextView title = (TextView) rowView.findViewById(R.id.title);
    TextView body = (TextView) rowView.findViewById(R.id.body);
    ImageView imageView = (ImageView) rowView.findViewById(R.id.icon);
    title.setText(titles[position]);
    body.setText(Html.fromHtml(bodys[position]));
    // random icon
    int x = (int)(Math.random() * 2) + 1;;
    if (x == 1) {
      imageView.setImageResource(R.drawable.sof_black);
    } else {
      imageView.setImageResource(R.drawable.quora);
    }
    
    

    return rowView;
  }
} 
{'fraction_non_alphanumeric': 0.10970907816333683, 'fraction_numerical': 0.00385559060637925, 'mean_word_length': 4.1516245487364625, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2886963', 'n_tokens_mistral': 891, 'n_tokens_neox': 841, 'n_words': 190}