text:
package com.lspooo.example.view;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.CheckedTextView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.lspooo.example.R;
import com.lspooo.plugin.common.view.SwitchButton;

/**
 * Created by LSP on 2017/9/23.
 */

public class SettingMenuItemView extends LinearLayout{

    public static final int ACCESSORY_TYPE_NONE = 0;
    public static final int ACCESSORY_TYPE_ARROW = 1;
    public static final int ACCESSORY_TYPE_SWITCH = 2;
    public static final int ACCESSORY_TYPE_RADIO = 3;

    private Context context;
    private ImageView settingIcon;
    private TextView settingTitleView;
    private TextView settingSummaryView;
    private View settingDividerView;
    private CheckedTextView checkedTextView;
    private SwitchButton settingSwitchButton;

    private int mAccessoryType;

    public SettingMenuItemView(Context context) {
        this(context, null);
    }

    public SettingMenuItemView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public SettingMenuItemView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.context = context;
        init(attrs);
    }

    private void init(AttributeSet attrs){
        LayoutInflater.from(context).inflate(R.layout.layout_setting_menu_item, this, true);

        settingIcon = (ImageView) findViewById(R.id.setting_icon);
        settingTitleView = (TextView) findViewById(R.id.setting_title);
        settingSummaryView = (TextView) findViewById(R.id.setting_summary);
        settingDividerView = findViewById(R.id.setting_divider);
        checkedTextView = (CheckedTextView) findViewById(R.id.check_view);
        settingSwitchButton = (SwitchButton) findViewById(R.id.setting_switch_button);

        if (attrs != null){
            TypedArray localTypedArray = context.obtainStyledAttributes(attrs, R.styleable.setting_item_view);
            setSettingIcon(localTypedArray.getDrawable(R.styleable.setting_item_view_icon));
            setSettingTitle(localTypedArray.getString(R.styleable.setting_item_view_title));
            setSettingSummary(localTypedArray.getString(R.styleable.setting_item_view_summary));
            setAccessoryType(localTypedArray.getInt(R.styleable.setting_item_view_accessoryType , 0));
            setDividerVisibility(localTypedArray.getBoolean(R.styleable.setting_item_view_showDivider , true));
            localTypedArray.recycle();
        }
    }

    /**
     * 设置图标
     * @param drawable
     */
    public void setSettingIcon(Drawable drawable){
        if(settingIcon == null || drawable == null){
            return;
        }
        settingIcon.setVisibility(VISIBLE);
        settingIcon.setImageDrawable(drawable);
    }

    /**
     * 设置标题
     * @param title
     */
    public void setSettingTitle(String title){
        if (settingTitleView == null){
            return;
        }
        settingTitleView.setText(TextUtils.isEmpty(title) ? "" : title);
    }

    /**
     * 设置标题
     * @param titleResId
     */
    public void setSettingTitle(int titleResId){
        String text = context.getString(titleResId);
        setSettingTitle(text);
    }

    /**
     * 设置描述
     * @param summary
     */
    public void setSettingSummary(String summary) {
        if (settingSummaryView == null){
            return;
        }
        if (TextUtils.isEmpty(summary)){
            settingSummaryView.setText("");
            settingSummaryView.setVisibility(GONE);
        } else{
            settingSummaryView.setText(summary);
            settingSummaryView.setVisibility(GONE);
        }
    }

    /**
     * 设置描述
     * @param summaryResId
     */
    public void setSettingSummary(int summaryResId) {
        String text = context.getString(summaryResId);
        setSettingSummary(text);
    }

    /**
     * 设置类型
     * @param type
     */
    public void setAccessoryType(int type) {
        switch (type){
            case 0:
                mAccessoryType = ACCESSORY_TYPE_NONE;
                checkedTextView.setVisibility(VISIBLE);
                settingSwitchButton.setVisibility(GONE);
                break;
            case 1:
                mAccessoryType = ACCESSORY_TYPE_ARROW;
                checkedTextView.setVisibility(VISIBLE);
                settingSwitchButton.setVisibility(GONE);
                checkedTextView.setCheckMarkDrawable(R.drawable.ic_setting_enter);
                checkedTextView.setPadding(0, 0, 24, 0);
                checkedTextView.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
                break;
            case 2:
                mAccessoryType = ACCESSORY_TYPE_SWITCH;
                checkedTextView.setVisibility(GONE);
                settingSwitchButton.setVisibility(VISIBLE);
                break;
            case 3:
                mAccessoryType = ACCESSORY_TYPE_RADIO;
                checkedTextView.setVisibility(VISIBLE);
                settingSwitchButton.setVisibility(GONE);
                checkedTextView.setCheckMarkDrawable(R.drawable.choose_icon);
                checkedTextView.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
                break;
            default:
                break;
        }
    }

    /**
     * 底部分割线是否显示
     * @param visibility
     */
    public void setDividerVisibility(boolean visibility){
        if (settingDividerView == null){
            return;
        }
        settingDividerView.setVisibility(visibility ? VISIBLE : GONE);
    }

    /**
     * 是否处于选中状态
     * @return
     */
    public boolean isChecked() {
        if(mAccessoryType == ACCESSORY_TYPE_RADIO) {
            if (checkedTextView == null){
                return false;
            }
            return checkedTextView.isChecked();
        }
        if (mAccessoryType == ACCESSORY_TYPE_SWITCH){
            if (settingSwitchButton == null){
                return false;
            }
            return settingSwitchButton.isChecked();
        }
        return false;
    }

    /**
     * 设置状态
     * @param checked
     */
    public void setChecked(boolean checked) {
        if(mAccessoryType == ACCESSORY_TYPE_RADIO) {
            if (checkedTextView == null){
                return;
            }
            checkedTextView.setChecked(checked);
        } else if (mAccessoryType == ACCESSORY_TYPE_SWITCH){
            if (settingSwitchButton == null){
                return;
            }
            settingSwitchButton.setChecked(checked);
        }
    }

    /**
     * 切换选中状态
     */
    public void toggle() {
        if(mAccessoryType == ACCESSORY_TYPE_RADIO ) {
            if (checkedTextView == null){
                return;
            }
            checkedTextView.toggle();
        } else if (mAccessoryType == ACCESSORY_TYPE_SWITCH){
            if (settingSwitchButton == null){
                return;
            }
            settingSwitchButton.toggle();
        }
    }
}


text:
/)
{
//    replaceListeners(rhs.getListeners());
}

ossimListenerManager::~ossimListenerManager()
{
   theListenerList.clear();
}

void ossimListenerManager::fireEvent(ossimEvent& event)
{
   // only process the event if it has not been consumed.
   event.setCurrentObject( dynamic_cast<ossimObject*>(this) );
   if(event.isConsumed())
   {
      return;
   }
   theFireEventFlag = true;

   std::list<ossimListener*>::iterator currentIterator = theListenerList.begin();

   while(currentIterator != theListenerList.end())
   {
      // only fire if the event is not consumed
      if(!event.isConsumed())
      {
         if(*currentIterator)
         {
            if(theDelayedRemove.end()==std::find(theDelayedRemove.begin(),
                                                 theDelayedRemove.end(),
                                                 (*currentIterator)))
            {
               if((*currentIterator)->isListenerEnabled())
               {
                  (*currentIterator)->processEvent(event);
               }
            }
         }
      }
      else
      {
         // the event is now consumed so stop propagating.
         //
         theFireEventFlag = false;
         break;
      }
      ++currentIterator;
   }

   theFireEventFlag = false;

   if(theDelayedAdd.size())
   {
      for(std::list<ossimListener*>::iterator current = theDelayedAdd.begin();
          current != theDelayedAdd.end();++current)
      {
         addListener(*current);
      }
      theDelayedAdd.clear();
   }

   if(theDelayedRemove.size())
   {
      for(std::list<ossimListener*>::iterator current = theDelayedRemove.begin();
          current != theDelayedRemove.end();++current)
      {
         removeListener(*current);
      }
      theDelayedRemove.clear();
   }
}

bool ossimListenerManager::addListener(ossimListener* listener)
{
   if(theFireEventFlag)
   {
      theDelayedAdd.push_back(listener);
   }
   else
   {

      if(!findListener(listener))
      {
         theListenerList.push_back(listener);
      }
   }

   return true;
}

bool ossimListenerManager::removeListener(ossimListener* listener)
{

   if(theFireEventFlag)
   {
      theDelayedRemove.push_back(listener);
      return true;
   }

   std::list<ossimListener*>::iterator current=theListenerList.begin();
   while(current!=theListenerList.end())
   {
      if( (*current) == listener)
      {
         current = theListenerList.erase(current);
         break; // Should only be in list once... (drb)
      }
      else
      {
         ++current;
      }
   }

   return true;
}

bool ossimListenerManager::findListener(ossimListener* listener)
{
   bool result = false;

   if(listener)
   {
      std::list<ossimListener*>::iterator currentIter =
         std::find(theListenerList.begin(),
                   theListenerList.end(),
                   listener);
      result = (currentIter != theListenerList.end());
   }

   return result;
}

redpajama_set_name: RedPajamaGithub


text:
<?php
class Rekapitulasi_model extends MY_Model {
	protected $_table 		= 'transaksi';
	protected $_primary_key = 'id';

	// my style join public $belongs_to = array('group' => array('from_column' => 'group_id', 'to_column' => 'id'));

	// observer
	public $_user_id = 0; // from session
	public $before_create = array('create_mark');
	public $before_update = array('update_mark');

	function cek_username($u){
		$this->db->where('username', $u);
		$query = $this->db->get('user');
		if($query->num_rows() > 0){
			return $query->row();
		}else{
			return NULL;
		}
	}

}
?>


text:
export {
  ListSortSetFieldSelectorsAction
} from '@skyux/list-builder/modules/list/state/sort/set-field-selectors.action';


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
    <file url="file://$PROJECT_DIR$/app/src/main/java/cn/edu/sjtu/road/HomeFragment.java" charset="UTF-8" />
    <file url="file://$PROJECT_DIR$/app/src/main/java/cn/edu/sjtu/road/MainActivity.java" charset="UTF-8" />
    <file url="PROJECT" charset="UTF-8" />
  </component>
</project>


text:
<!--

    Copyright (C) 2012-2016 the original author or authors.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <artifactId>ninja-standalone</artifactId>
    <packaging>jar</packaging>

    <description>
        This package contains a class that runs Ninja inside an embedded Jetty.
        Very useful for making a fat library that contains Ninja and Jetty as a service
        and can be run by one command.
        The embedded Jetty also powers the test utilities' embedded Testserver.
    </description>

    <parent>
        <groupId>org.ninjaframework</groupId>
        <artifactId>ninja</artifactId>
        <version>5.7.1-SNAPSHOT</version>
    </parent>

    <url>http://www.ninjaframework.org</url>

    <dependencies>

        <dependency>
            <groupId>org.ninjaframework</groupId>
            <artifactId>ninja-servlet</artifactId>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-xml</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

        <dependency>
            <groupId>com.github.kevinsawicki</groupId>
            <artifactId>http-request</artifactId>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>


text:
In this paper a question answering system including passage retrieval and answer
extraction is described and evaluated.
The question answering system described is designed for Swedish questions and answers, and
uses Swedish Wikipedia as its data source. The system is trained using transcribed
questions from the Swedish board game Kvitt eller dubbelt. These questions are also used
for testing.

The main tools used when developing the system were Apache Lucene, Stagger and Liblinear.


text:
/**********************************************************
 delete.sql file
 Required if install.sql file present
 - Delete profile exceptions
***********************************************************/

--
-- Delete profile exceptions
--

DELETE FROM profile_exceptions WHERE modname='Students_Import/StudentsImport.php';


text:
import gql from 'graphql-tag';

export default gql`
  query GetGroupAttributes {
    groupAttributes {
      id
      description
      value
    }
  }
`;


text:
package org.citydb.core.database.schema.mapping;

public interface Joinable {
	public boolean isSetJoin();
	public AbstractJoin getJoin();
}


text:
package com.intellij.slicer;

import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiJavaReference;
import org.jetbrains.annotations.NotNull;

public final class JavaSlicerAnalysisUtil {
  public static final SliceLeafEquality LEAF_ELEMENT_EQUALITY = new SliceLeafEquality() {
    @NotNull
    @Override
    protected PsiElement substituteElement(@NotNull PsiElement element) {
      if (element instanceof PsiJavaReference) {
        PsiElement resolved = ((PsiJavaReference)element).resolve();
        if (resolved != null) return resolved;
      }
      return element;
    }
  };

  @NotNull
  public static SliceLeafAnalyzer createLeafAnalyzer() {
    return new SliceLeafAnalyzer(LEAF_ELEMENT_EQUALITY, JavaSliceProvider.getInstance());
  }

  private JavaSlicerAnalysisUtil() {
  }
}


text:
package com.GameOfThrones.Trivia.core;

import java.util.ArrayList;

/**
 * Trivia game.
 *
 * @author andre
 *
 */
public class TriviaGame implements java.io.Serializable {
	/** Gives the user 21 seconds to answer each trivia */
	public final static long QUESTION_TIME = 21000;

	/**
	 * Score the user accumulates
	 */
	private int gameScore;

	/** Keep track of current game statsView */
	private int amountCorrect, questionsNumber;

	private static final long serialVersionUID = -408390483770836593L;

	private int triviaTime;

	private QuestionCollection allQuestions;

	private int numberOfQuestions;

	/**
	 * Constructor
	 *
	 * @param allquestions
	 * @param numberOfQuestions
	 * @param triviaTime
	 */
	public TriviaGame(QuestionCollection allquestions, int numberOfQuestions,
			int triviaTime) {
		this.allQuestions = allquestions;
		allQuestions.shuffle();
		triviaTime = this.triviaTime;
		amountCorrect = 0;
		questionsNumber = 0;
		this.numberOfQuestions = numberOfQuestions;
	}

	/**
	 * Constructor
	 *
	 * @param allquestions
	 * @param numberOfQuestions
	 * @param triviaTime
	 */
	public TriviaGame(QuestionCollection allquestions, int numberOfQuestions,
			int triviaTime, GameCharacter gameCharacter) {
		this(allquestions, numberOfQuestions, triviaTime);
		allquestions
				.keepOnly(Session.getInstance().getMap().get(gameCharacter));
	}

	/**
	 * Moves forward the question used.
	 *
	 * @throws OutOfQuestionsException
	 */
	public void nextQuestion() throws OutOfQuestionsException {
		questionsNumber++;
		if (allQuestions.isDone()) {
			throw new OutOfQuestionsException();
		} else {
			allQuestions.next();
		}
	}

	/**
	 * Keeps questions only whose ids match any in the keepIds
	 * QuestionCollection.
	 *
	 * @param keepsIds
	 *            - list of questions ids
	 */
	public void keepOnly(ArrayList<Integer> keepsIds) {
		allQuestions.keepOnly(keepsIds);
	}

	/**
	 * @return the gameScore
	 */
	public int getGameScore() {
		return gameScore;
	}

	/**
	 * @return the amountCorrect
	 */
	public int getAmountCorrect() {
		return amountCorrect;
	}

	/**
	 * If the choice was correct, a correct toast is shown. If an incorrect
	 * button was selected, a DialogFragment is shown displaying the correct
	 * choice. Will try to determine if the user has answered the total amount
	 * of trivia trivia, if they have endGame() is called, otherwise mapText()
	 * is called and the game goes on to the next trivia
	 *
	 * @param button
	 *            - int representing the user's trivia choice
	 * @throws OutOfQuestionsException
	 */
	public boolean choiceSelected(int button, long timeLeft) {
		boolean correct = getCorrectChoice() == button;
		if (correct) {
			gameScore += (timeLeft * 23);
		}
		return correct;
	}

	/**
	 *
	 * @return returns the current correct choice
	 */
	public int getCorrectChoice() {
		return allQuestions.current().getCorrectAnswer();
	}

	/**
	 *
	 * @return the amount of questions answered
	 */
	public int getQuestionsAnswered() {
		return questionsNumber;
	}

	/**
	 *
	 * @return Whether the game is over
	 */
	public boolean isGameOver() {
		return questionsNumber >= numberOfQuestions;
	}

	/**
	 * @return Returns the current question
	 */
	public Question getCurrentQuestion() {
		return allQuestions.current();
	}

	public int getNumberOfQuestions() {
		return numberOfQuestions;
	}
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>org.deidentifier.arx.kettle.risk</title>
<meta name="date" content="2016-06-21">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

org.deidentifier.arx.kettle.risk

Classes

ARXRiskAnalysis

LayoutBottom

LayoutRisks

LayoutTop

ViewRisksDistributionPlot

ViewRisksDistributionTable

ViewRisksHIPAA

ViewRisksPopulationUniqueness

ViewRisksQuasiIdentifier

ViewRisksQuasiIdentifierTable

ViewRisksReidentificationRisks

ViewRisksReidentificationRisksTable


text:
template<typename _Value>
struct PositiveIntHashMap {
	int* keys = nullptr;
	_Value* vals = nullptr;

	int maxKVPairCount = 0;
	int currentOccupancy = 0;
	float maxDesiredLoad = 0.5f;

	void ReHashtoSize(int nextSize) {
		const int oneMinusNewSlotCount = nextSize - 1;
		ASSERT_MSG((nextSize & oneMinusNewSlotCount) == 0, "ReHashtoSize must be called w/ powers of 2!!");

		int* newKeys = new int[nextSize];
		for (int i = 0; i < nextSize; i++) {
			newKeys[i] = -1;
		}

		_Value* newVals = new _Value[nextSize];

		for (int i = 0; i < maxKVPairCount; i++) {
			if (keys[i] >= 0) {
				int newSlot = GetFreeSlotForKeyInternal(keys[i], oneMinusNewSlotCount, newKeys);
				newKeys[newSlot] = keys[i];
				newVals[newSlot] = vals[i];
			}
		}

		delete[] keys;
		delete[] vals;

		keys = newKeys;
		vals = newVals;
		maxKVPairCount = nextSize;
	}

	~PositiveIntHashMap() {
		delete[] keys;
		delete[] vals;
	}

	void ReHashToNextSize() {
		const int nextSize = (maxKVPairCount == 0) ? 16 : (maxKVPairCount * 2);
		ReHashtoSize(nextSize);
	}

	int GetFreeSlotForKeyInternal(int key, int oneMinusSlotCount, const int* keys) {
		int newSlot = (int)((key * FIB_HASH_CONSTANT) & oneMinusSlotCount);
		int originalNewSlot = newSlot;
		while (keys[newSlot] != -1) {
			newSlot = (newSlot + 1) & oneMinusSlotCount;

			if (originalNewSlot == newSlot) {
				ASSERT(false);
			}
		}

		return newSlot;
	}

	void Put(int key, const _Value& val) {
		if (currentOccupancy >= (int)(maxDesiredLoad * maxKVPairCount)) {
			ReHashToNextSize();
		}

		int slot = GetFreeSlotForKeyInternal(key, maxKVPairCount - 1, keys);
		ASSERT(slot >= 0 && slot < maxKVPairCount);
		keys[slot] = key;
		vals[slot] = val;

		currentOccupancy++;
	}

	bool Get(int key, _Value* outVal) {
		if (maxKVPairCount == 0) { return false; }

		const int oneMinusSlotCount = maxKVPairCount - 1;
		int startSlot = (int)((key * FIB_HASH_CONSTANT) & oneMinusSlotCount);
		for (int iter = 0; iter < maxKVPairCount; iter++) {
			if (keys[startSlot] == -1) {
				return false;
			}
			else if (keys[startSlot] == key) {
				*outVal = vals[startSlot];
				return true;
			}
		}

		return false;
	}

	// TODO: Lol
	//void Erase(int key) {
	//
	//}

};

#endif


text:
import re
from collections import Counter

def words(text):
    return re.findall(r'\w+', text.lower())

WORDS = Counter(words(open('big.txt').read()))

def P(word, N=sum(WORDS.values())):
    "Probability of `word`."
    return WORDS[word] / N

def candidates(word):
    "Generate possible spelling corrections for word."
    return (known([word]) or known(edits1(word)) or known(edits2(word)) or [word])

def known(words):
    "The subset of `words` that appear in the dictionary of WORDS."
    return set(w for w in words if w in WORDS)

def edits1(word):
    "All edits that are one edit away from `word`."
    letters    = 'abcdefghijklmnopqrstuvwxyz'
    splits     = [(word[:i], word[i:])    for i in range(len(word) + 1)]
    deletes    = [L + R[1:]               for L, R in splits if R]
    transposes = [L + R[1] + R[0] + R[2:] for L, R in splits if len(R)>1]
    replaces   = [L + c + R[1:]           for L, R in splits if R for c in letters]
    inserts    = [L + c + R               for L, R in splits for c in letters]
    return set(deletes + transposes + replaces + inserts)

def edits2(word):
    "All edits that are two edits away from `word`."
    return (e2 for e1 in edits1(word) for e2 in edits1(e1))

def word_correction(word):
    "Most probable spelling correction for word."
    return max(candidates(word), key=P)

def sentence_correction(sentence):
    "Most probable spelling correction for sentence word at a time."
    return " ".join(word_correction(word) for word in sentence.split(" "))

if __name__ == "__main__":
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument(dest='sentence', type=str, help="sentence to correct")
    args = parser.parse_args()
    output = sentence_correction(args.sentence)


text:
package com.canoo.platform.logger;

/**
 * Created by hendrikebbers on 08.01.18.
 */
public interface LoggerRemotingConstants {

    String LOG_LIST_CONTROLLER_NAME = "LogListController";

    String UPDATE_ACTION = "update";
}


text:
package com.fourpool.mathdash.android;

import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.actionbarsherlock.app.SherlockActivity;
import com.fourpool.mathdash.android.model.RandomEquation;

public class GameActivity extends SherlockActivity {

	private int correct = 0;
	private int total = 0;

	private final int gameLengthInMillis = 60000; // 1 minute

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.game);

		// Set countdown
		new CountDownTimer(gameLengthInMillis, 1000) {
			@Override
			public void onTick(long millisUntilFinished) {
				TextView timeRemainingTextView = (TextView) findViewById(R.id.gameTimeRemaining);
				timeRemainingTextView.setText(Long.toString(millisUntilFinished / 1000));
			}

			@Override
			public void onFinish() {
				Intent intent = new Intent(GameActivity.this, ResultsActivity.class);
				intent.putExtra("correct", correct);
				intent.putExtra("total", total);
				startActivity(intent);
				finish();
			}
		}.start();

		refreshEquation();
	}

	private void refreshEquation() {
		final RandomEquation randomEquation = new RandomEquation();

		TextView answerTextView = (TextView) findViewById(R.id.gameEquation);
		answerTextView.setText(randomEquation.equation);

		View.OnClickListener clickListener = new View.OnClickListener() {

			public void onClick(View v) {
				total += 1;
				if (((Button) v).getText() == Integer.toString(randomEquation.answer)) {
					correct += 1;
				}

				TextView solvedTextView = (TextView) findViewById(R.id.gameSolved);
				solvedTextView.setText(correct + "/" + total);
				refreshEquation();
			}
		};

		Button gameButton1 = (Button) findViewById(R.id.gameButton1);
		gameButton1.setText(Integer.toString(randomEquation.answer1));
		gameButton1.setOnClickListener(clickListener);

		Button gameButton2 = (Button) findViewById(R.id.gameButton2);
		gameButton2.setText(Integer.toString(randomEquation.answer2));
		gameButton2.setOnClickListener(clickListener);

		Button gameButton3 = (Button) findViewById(R.id.gameButton3);
		gameButton3.setText(Integer.toString(randomEquation.answer3));
		gameButton3.setOnClickListener(clickListener);

		Button gameButton4 = (Button) findViewById(R.id.gameButton4);
		gameButton4.setText(Integer.toString(randomEquation.answer4));
		gameButton4.setOnClickListener(clickListener);
	}
}


text:
package com.nowellpoint.handler.dataimport.test.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name="PRODUCT")
public class Product extends BaseEntity implements Serializable {

    /**
     *
     */

    private static final long serialVersionUID = 5193639212025075411L;

    /**
     *
     */

    @Column(name="PRODUCT_ID", length=20, insertable=true, updatable=false, unique=true, nullable=false)
    private String productId;

    /**
     *
     */

    @Column(name="NAME")
    private String name;

    /**
     *
     */

    @Column(name="DESCRIPTION")
    private String description;

    /**
     *
     */

    @Column(name="FAMILY")
    private String family;

    /**
     *
     */

    @Column(name="PRODUCT_CODE")
    private String productCode;

    /**
     *
     */

    @Column(name="IS_ACTIVE")
    private Boolean isActive;

    /**
     *
     */

    @Column(name="CURRENCY_ISO_CODE", length=3)
    private String currencyIsoCode;

    /**
     *
     */

    @Column(name="IS_DELETED")
    private Boolean isDeleted;

    public Product() {

    }

    public String getProductId() {
            return productId;
    }

    public void setProductId(String productId) {
            this.productId = productId;
    }

    public String getName() {
            return name;
    }

    public void setName(String name) {
            this.name = name;
    }

    public String getDescription() {
            return description;
    }

    public void setDescription(String description) {
            this.description = description;
    }

    public String getFamily() {
            return family;
    }

    public void setFamily(String family) {
            this.family = family;
    }

    public String getProductCode() {
            return productCode;
    }

    public void setProductCode(String productCode) {
            this.productCode = productCode;
    }

    public Boolean getIsActive() {
            return isActive;
    }

    public void setIsActive(Boolean isActive) {
            this.isActive = isActive;
    }

    public String getCurrencyIsoCode() {
            return currencyIsoCode;
    }

    public void setCurrencyIsoCode(String currencyIsoCode) {
            this.currencyIsoCode = currencyIsoCode;
    }

    public Boolean getIsDeleted() {
            return isDeleted;
    }

    public void setIsDeleted(Boolean isDeleted) {
            this.isDeleted = isDeleted;
    }
}


text:
using System.ComponentModel;
using Melanchall.DryWetMidi.Common;

namespace Melanchall.DryWetMidi.Interaction
{
    /// <summary>
    /// Pitch Bend Sensitivity registered parameter.
    /// </summary>
    public sealed class PitchBendSensitivityParameter : RegisteredParameter
    {
        #region Constants

        /// <summary>
        /// Represents the default number of half-steps of the sensitivity range.
        /// </summary>
        public static readonly SevenBitNumber DefaultHalfSteps = (SevenBitNumber)2;

        /// <summary>
        /// Represents the default number of cents of the sensitivity range.
        /// </summary>
        public static readonly SevenBitNumber DefaultCents = (SevenBitNumber)0;

        #endregion

        #region Constructor

        /// <summary>
        /// Initializes a new instance of the <see cref="PitchBendSensitivityParameter"/>.
        /// </summary>
        public PitchBendSensitivityParameter()
            : base(RegisteredParameterType.PitchBendSensitivity)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PitchBendSensitivityParameter"/> with the specified
        /// exact number of half-steps and cents.
        /// </summary>
        /// <param name="halfSteps">The number of half-steps of the sensitivity range.</param>
        /// <param name="cents">The number of cents of the sensitivity range.</param>
        public PitchBendSensitivityParameter(SevenBitNumber halfSteps, SevenBitNumber cents)
            : this(halfSteps, cents, ParameterValueType.Exact)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ModulationDepthRangeParameter"/> with the specified
        /// number of half-steps and cents and type of the data.
        /// </summary>
        /// <param name="halfSteps">The number of half-steps of the sensitivity range.</param>
        /// <param name="cents">the number of cents of the sensitivity range.</param>
        /// <param name="valueType">The type of parameter's data which defines whether it
        /// represents exact value, increment or decrement.</param>
        /// <exception cref="InvalidEnumArgumentException"><paramref name="valueType"/> specified an invalid value.</exception>
        public PitchBendSensitivityParameter(SevenBitNumber halfSteps, SevenBitNumber cents, ParameterValueType valueType)
            : this()
        {
            HalfSteps = halfSteps;
            Cents = cents;
            ValueType = valueType;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets the number of half-steps of the sensitivity range.
        /// </summary>
        public SevenBitNumber HalfSteps { get; set; } = DefaultHalfSteps;

        /// <summary>
        /// Gets or sets the number of cents of the sensitivity range.
        /// </summary>
        public SevenBitNumber Cents { get; set; } = DefaultCents;

        #endregion

        #region Overrides

        /// <inheritdoc/>
        protected override void GetData(out SevenBitNumber msb, out SevenBitNumber? lsb)
        {
            msb = HalfSteps;
            lsb = Cents;
        }

        /// <inheritdoc/>
        protected override int GetIncrementStepsCount()
        {
            return HalfSteps * 100 + Cents;
        }

        /// <inheritdoc/>
        public override string ToString()
        {
            return $"{base.ToString()}: {HalfSteps} half-steps, {Cents} cents";
        }

        #endregion
    }
}