blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 410 | content_id stringlengths 40 40 | detected_licenses listlengths 0 51 | license_type stringclasses 2 values | repo_name stringlengths 5 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 80 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 131 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 9.45M | extension stringclasses 32 values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 313 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d2111bfa361886af2bd91a7cefe0fd922f3ce150 | b5d91520c30b0e04b3ed7aaef461e23cc02079af | /src/main/java/Homework12/model/RoboCat.java | 32293666cb1e7d1e587fa1899fce913aab77c0ee | [] | no_license | QafarliTutu/iba_homeworks | 3a53ccd0ca011f939530cb8bc27741d6e2c52f72 | 35f5640af9d7e02b6a55c227dd1d328b8e524745 | refs/heads/master | 2022-12-23T12:56:17.910231 | 2020-04-16T13:27:04 | 2020-04-16T13:27:04 | 296,295,093 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 128 | java | package Homework12.model;
public class RoboCat extends Pet {
@Override
public void respond(String nickname) {
}
}
| [
"qeferlitutu@gmail.com"
] | qeferlitutu@gmail.com |
60c94a1da698dbd5e7bf1a9cf2c0cfc81d9423b4 | 2a9c0e5ab5f8ffe39e2d6d4b98d8ac4019c18c1b | /Selenium Classes/src/Parent.java | b535de72699557fc8b85a3a92861cd090060eb3b | [] | no_license | Ankit28dec/Ankit | 53e3e8e1d719bb3ea0c87f443736d5e86a6b538c | 4a7cb9944a19971d9b33acf07ab6018f3aced629 | refs/heads/master | 2021-09-06T05:17:01.092766 | 2018-02-02T17:33:20 | 2018-02-02T17:33:20 | 113,734,199 | 0 | 0 | null | 2017-12-10T08:43:27 | 2017-12-10T08:23:06 | Java | UTF-8 | Java | false | false | 291 | java |
public class Parent {
public static void main(String[] args) {
// TODO Auto-generated method stub
Child a = new Child();
Child1 b = new Child1();
System.out.println(a.x);
System.out.println(a.y);
System.out.println(b.x);
//System.out.println(b.y);
}
}
| [
"ankit@Ankit-PC"
] | ankit@Ankit-PC |
8fa37e589eaf9172944a7696465fe170899d45ea | 86bd93b0f9ab0c7b02a4f93ae71836fbcb402db2 | /src/de/avpptr/android/MoodsDatabaseManager.java | 363f75f9cb466c51a43cc4df4210dfee7c0c22b6 | [] | no_license | ptrv/MoodTracker | a7e0f009ba486ff0ec4ca3a4e51aaba28d5e7e54 | 56d52086784dcc6f9741b5cc216db86a8243c3a1 | refs/heads/master | 2021-01-01T15:59:32.125464 | 2011-02-20T18:36:13 | 2011-02-20T18:36:13 | 1,990,853 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 8,020 | java | package de.avpptr.android;
import java.util.ArrayList;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
public class MoodsDatabaseManager{
// the Activity or Application that is creating an object from this class.
Context context;
// a reference to the database used by this application/object
private SQLiteDatabase db;
private static final String DATABASE_NAME = "moodtracker.db";
private static final int DATABASE_VERSION = 1;
private static final String DATABASE_TABLE_NAME = "moods";
private static final String DATABASE_TABLE_CREATE =
"CREATE TABLE " + DATABASE_TABLE_NAME + " (" +
Moods.ID + " INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," +
Moods.HAPPINESS + " INTEGER," +
Moods.TIREDNESS + " INTEGER," +
Moods.HOPEFUL + " INTEGER," +
Moods.STRESS + " INTEGER," +
Moods.SECURE + " INTEGER," +
Moods.ANXIETY + " INTEGER," +
Moods.PRODUCTIVE + " INTEGER," +
Moods.LOVED + " INTEGER," +
Moods.NOTE + " TEXT," +
Moods.CREATED_DATE + " TEXT);";
MoodsDatabaseHelper dbHelper;
public MoodsDatabaseManager(Context context){
this.context = context;
dbHelper = new MoodsDatabaseHelper(context);
// this.db = dbHelper.getWritableDatabase();
}
public void addRow(int val1, int val2, int val3, int val4,
int val5, int val6, int val7, int val8, String note, String timeString){
// this is a key value pair holder used by android's SQLite functions
ContentValues values = new ContentValues();
// this is how you add a value to a ContentValues object
// we are passing in a key string and a value string each time
values.put(Moods.HAPPINESS, val1);
values.put(Moods.TIREDNESS, val2);
values.put(Moods.HOPEFUL, val3);
values.put(Moods.STRESS, val4);
values.put(Moods.SECURE, val5);
values.put(Moods.ANXIETY, val6);
values.put(Moods.PRODUCTIVE, val7);
values.put(Moods.LOVED, val8);
values.put(Moods.NOTE, note);
values.put(Moods.CREATED_DATE, timeString);
// ask the database object to insert the new data
this.db = dbHelper.getWritableDatabase();
try
{
db.insert(DATABASE_TABLE_NAME, null, values);
}
catch(Exception e)
{
Log.e("DB ERROR", e.toString()); // prints the error message to the log
e.printStackTrace(); // prints the stack trace to the log
}
db.close();
// db.close();
}
public void deleteAllRows()
{
this.db = dbHelper.getWritableDatabase();
// ask the database manager to delete the row of given id
try {
db.execSQL("DELETE FROM " + DATABASE_TABLE_NAME + ";");
}
catch (Exception e)
{
Log.e("DB ERROR", e.toString());
e.printStackTrace();
}
try {
db.execSQL("DELETE FROM sqlite_sequence WHERE name='"+ DATABASE_TABLE_NAME + "';");
}
catch (Exception e)
{
Log.e("DB ERROR", e.toString());
e.printStackTrace();
}
db.close();
}
public int getRowCount() {
this.db = dbHelper.getReadableDatabase();
Cursor cursor;
int count = 0;
try {
cursor = db.rawQuery("SELECT * FROM moods", null);
count = cursor.getCount();
cursor.close();
}
catch (Exception e)
{
Log.e("Counting rows ERROR", e.toString());
e.printStackTrace();
}
db.close();
return count;
};
public ArrayList<ArrayList<Object>> getAllRowsAsArrays()
{
this.db = dbHelper.getReadableDatabase();
// create an ArrayList that will hold all of the data collected from
// the database.
ArrayList<ArrayList<Object>> dataArrays = new ArrayList<ArrayList<Object>>();
// this is a database call that creates a "cursor" object.
// the cursor object store the information collected from the
// database and is used to iterate through the data.
db.beginTransaction();
Cursor cursor = null;
try
{
// ask the database object to create the cursor.
cursor = db.query(
DATABASE_TABLE_NAME,
new String[]{Moods.ID,
Moods.CREATED_DATE,
Moods.NOTE,
Moods.HAPPINESS,
Moods.TIREDNESS,
Moods.HOPEFUL,
Moods.STRESS,
Moods.SECURE,
Moods.ANXIETY,
Moods.PRODUCTIVE,
Moods.LOVED},
null, null, null, null, null
);
// move the cursor's pointer to position zero.
cursor.moveToFirst();
// if there is data after the current cursor position, add it
// to the ArrayList.
if (!cursor.isAfterLast()){
do
{
ArrayList<Object> dataList = new ArrayList<Object>();
dataList.add(cursor.getLong(0));
dataList.add(cursor.getString(1));
dataList.add(cursor.getString(2));
dataList.add(cursor.getString(3));
dataList.add(cursor.getString(4));
dataList.add(cursor.getString(5));
dataList.add(cursor.getString(6));
dataList.add(cursor.getString(7));
dataList.add(cursor.getString(8));
dataList.add(cursor.getString(9));
dataList.add(cursor.getString(10));
dataArrays.add(dataList);
}
// move the cursor's pointer up one position.
while (cursor.moveToNext());
}
db.setTransactionSuccessful();
}
catch (SQLException e)
{
Log.e("DB Error", e.toString());
e.printStackTrace();
} finally {
db.endTransaction();
cursor.close();
}
db.close();
// return the ArrayList that holds the data collected from
// the database.
return dataArrays;
}
public ArrayList<ArrayList<Object>> getRowsAsArraysForLog()
{
this.db = dbHelper.getReadableDatabase();
// create an ArrayList that will hold all of the data collected from
// the database.
ArrayList<ArrayList<Object>> dataArrays = new ArrayList<ArrayList<Object>>();
// this is a database call that creates a "cursor" object.
// the cursor object store the information collected from the
// database and is used to iterate through the data.
db.beginTransaction();
Cursor cursor = null;
try
{
// ask the database object to create the cursor.
cursor = db.query(
DATABASE_TABLE_NAME,
new String[]{Moods.ID, Moods.CREATED_DATE, Moods.NOTE},
null, null, null, null, null
);
// move the cursor's pointer to position zero.
cursor.moveToFirst();
// if there is data after the current cursor position, add it
// to the ArrayList.
if (!cursor.isAfterLast())
{
do
{
ArrayList<Object> dataList = new ArrayList<Object>();
dataList.add(cursor.getLong(0));
dataList.add(cursor.getString(1));
dataList.add(cursor.getString(2));
dataArrays.add(dataList);
}
// move the cursor's pointer up one position.
while (cursor.moveToNext());
}
db.setTransactionSuccessful();
}
catch (SQLException e)
{
Log.e("DB Error", e.toString());
e.printStackTrace();
}finally{
db.endTransaction();
cursor.close();
}
db.close();
// return the ArrayList that holds the data collected from
// the database.
return dataArrays;
}
public void deleteRow(long rowID)
{
this.db = dbHelper.getWritableDatabase();
// ask the database manager to delete the row of given id
try {db.delete(DATABASE_TABLE_NAME, Moods.ID + "=" + rowID, null);}
catch (Exception e)
{
Log.e("DB ERROR", e.toString());
e.printStackTrace();
}
db.close();
}
private class MoodsDatabaseHelper extends SQLiteOpenHelper{
public MoodsDatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(DATABASE_TABLE_CREATE);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
}
}
| [
"peter@avp-ptr.de"
] | peter@avp-ptr.de |
180b61f1b8142d123c01de3d34caefc7dd59b56e | 8b82d182a9305f01b613237b7c1657a80670b682 | /src/translator/SixBitASCII.java | 93e8d3c0e11b6992746d4a8fdbf3ee7c42a197a7 | [] | no_license | IamDiesel/SA_AircraftMonitor_SystemTest | 927d21bf57553a4394d31aa0d95eb60644696e8e | e1129489070187f8941f097f10afbcbe5b71b0c2 | refs/heads/master | 2020-03-31T09:15:07.265301 | 2015-06-28T18:35:56 | 2015-06-28T18:35:56 | 37,487,972 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 910 | java | package translator;
import exception.SixBitASCIIException;
public final class SixBitASCII {
public static String bin2ASCII(String binString)
{
String result = "";
if(binString.length() % 6 == 0)
{
for(int i = 0; i < binString.length(); i=i+6)
{
if(binString.substring(i,i+1).equals("0"))
result = result + (char) (Integer.parseInt(binString.substring(i,i+6),2)+64);
else
result = result + (char) (Integer.parseInt(binString.substring(i,i+6),2));
}
}
else
throw new SixBitASCIIException(400, "Binary String size mismatch. String length % 6 should be 0 but is: " + String.valueOf(binString.length() %6), binString);
return result;
}
/*public static void main(String[] args)
{
try {
System.out.println(bin2ASCII("000100110000000001001110001001000101001100"));
} catch (SixBitASCIIException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}*/
}
| [
"Daniel.Kahrizi@gmx.de"
] | Daniel.Kahrizi@gmx.de |
90c1f28a76111537dbf5138d8ee4734aa4e057b0 | e4b8d750d9270efc4f21e047cc738f013ff54624 | /src/test/java/com/cg/OnlinePizzaOrderApplicationTests.java | 9b359beb9ac7e4830735cdffcb13e40df4a1ce02 | [] | no_license | SankalpDisale/gitrepository | 2b825c9cb9d4e917c4c81d2cce11fa11507f8ad9 | a6286ccf7caa62c681d7b1ab950e93b4691ee3ab | refs/heads/master | 2023-05-31T10:02:35.290596 | 2021-06-14T17:07:14 | 2021-06-14T17:07:14 | 367,561,220 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 208 | java | package com.cg;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class OnlinePizzaOrderApplicationTests {
@Test
void contextLoads() {
}
}
| [
"noreply@github.com"
] | SankalpDisale.noreply@github.com |
827152e555769f85a5caff5cf6c643e51ae4fec5 | 92d992e55d244c5bd11c990829369e13a28e985b | /src/main/java/com/revature/hashcode/equals/HashcodeEqualsContract.java | 94ba64121b67906d47c1caff936bf0733bf37998 | [] | no_license | 190408-usf-nec-java/java-review | 6f4d834180efc4931bdac17d98daa52dbfb20f7b | 3fd421e7c46c6a5f02fad49881303d4ef71ef961 | refs/heads/master | 2020-05-15T14:03:04.862331 | 2019-04-19T20:25:36 | 2019-04-19T20:25:36 | 182,321,618 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,045 | java | package com.revature.hashcode.equals;
import java.time.LocalDate;
import java.util.HashSet;
import java.util.Set;
/**
* Hashcode-Equals contract - this a contract that details how the implementation
* of the .hashcode method and the .equals method should be implemented.
*
* Hashcode is intended to be a method to quickly determine if two objects are different or
* whether they might be the same.
*
* Equals is a slower method to confirm that two objects that might be the same, are actually
* the same.
*
* 1. If two objects have differing hashcodes then the equals must return false.
*
* 2. If two objects are considered to be equal, they must have the same hashcode.
*
*/
public class HashcodeEqualsContract {
public static void main(String[] args) {
Set<Car> cars = new HashSet<>();
Car sentra = new Car(1, "Sentra", LocalDate.of(2005, 1, 1));
Car tesla = new Car(2, "Tesla", LocalDate.of(2018, 1, 1));
cars.add(sentra);
cars.add(tesla);
cars.add(sentra);
cars.forEach(System.out::println);
}
}
| [
"msgoshorn@gmail.com"
] | msgoshorn@gmail.com |
9e63299eb42174573d131c8ef8f7fa8410c4af4a | dc5b58588e4cb97a85b008595858bbcab9685cf2 | /src/com/twu28/Library.java | 469ac2f0b61807620e508a4e02e38846de4cdecb | [] | no_license | arunsundaralingam/biblioteca | eae3ad23491ff3265c9e5d2fa95673f0c71eede0 | a97335cb90be7b5bccdbbb99156257e86e4df33a | refs/heads/master | 2021-01-18T07:53:29.900198 | 2012-08-04T15:02:33 | 2012-08-04T15:02:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,282 | java | package com.twu28;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Library {
List bookList;
List movieList;
List reservedBooks;
List userList;
BufferedReader br;
User currentUser;
public int startIndexOfBooks;
public int lastIndexOfBooks;
private int startIndexOfMovies;
private int lastIndexOfMovies;
private boolean hasTheUserLoggedIn;
Library(){
StaticDataGenerator generator = new StaticDataGenerator();
bookList = generator.getBookList();
movieList = generator.getMovieList();
userList = generator.getUserList();
startIndexOfBooks = 1;
lastIndexOfBooks = bookList.size();
startIndexOfMovies = 1;
lastIndexOfMovies =movieList.size();
hasTheUserLoggedIn = false;
reservedBooks = new ArrayList();
br = new BufferedReader(new InputStreamReader(System.in));
}
public int getStartIndexOfBooks() {
return startIndexOfBooks;
}
public int getLastIndexOfBooks() {
return lastIndexOfBooks;
}
public User getCurrentUser() {
return currentUser;
}
public List getBookList() {
return bookList;
}
public List getMovieList(){
return movieList;
}
public List getReservedBooks() {
return reservedBooks;
}
public boolean isBookInsideTheBounds(int indexOfTheBook){
return indexOfTheBook <= lastIndexOfBooks && indexOfTheBook > startIndexOfBooks;
}
public boolean isMovieInsideTheBounds(int indexOfTheMovie){
return indexOfTheMovie <= lastIndexOfMovies && indexOfTheMovie > startIndexOfMovies;
}
public boolean isThePersonAlreadyReservedTheBook(int indexOfTheBook){
return reservedBooks.contains(bookList.get(indexOfTheBook));
}
public int getStartIndexOfMovies() {
return startIndexOfMovies;
}
public int getLastIndexOfMovies() {
return lastIndexOfMovies;
}
public void addThisBookToHisCollection(int indexOfTheBook) {
getReservedBooks().add(getBookList().get(indexOfTheBook));
}
public Movie getMovieFromIndex(int indexOfTheMovie) {
return (Movie)(movieList.get(indexOfTheMovie));
}
public int getUserIndexFromID(String userID){
for (int i=0;i<userList.size();i++){
if(((User)(userList.get(i))).getUserID().equals(userID)) return i;
}
return -1;
}
public boolean isValidPasswordForTheUser(int userIndex,String password){
return (((User)(userList.get(userIndex))).getPassword().equals(password));
}
public void performLogin(String userID , String password){
currentUser = getUserFromUserID(userID);
if(currentUser != null)
hasTheUserLoggedIn = true;
}
public User getUserFromUserID(String userID){
User aUser = null;
for(Object anObject:userList) {
aUser = (User)anObject;
if(aUser.getUserID().equals(userID)) return aUser;
}
return aUser;
}
public boolean isUserHasLoggedIn(){
return hasTheUserLoggedIn;
}
}
| [
"arunsundaralingam@gmail.com"
] | arunsundaralingam@gmail.com |
40404288c9a0dc5c10c6349eba23e1362b3260ec | d4fa6027c271020d2d90ec25b06da92ee9285378 | /product-utils/src/main/java/com/cw/product/util/db/util/SpringUtils.java | b35fc245e68ffe6b3b2963a26d9f651f897d3536 | [] | no_license | chenwei1314/product | bb92d00bf0797b351122e9d033c7bf95b160492f | 347b6ce5036e3b7ac7a5056d08592e98ba7d648d | refs/heads/master | 2020-05-05T07:59:40.219764 | 2019-04-09T14:13:05 | 2019-04-09T14:13:05 | 179,845,968 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,087 | java | package com.cw.product.util.db.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.context.WebApplicationContext;
import com.cw.product.util.db.listener.SpringContextLoaderListener;
/**
* spring 工具类
* @author Administrator
*
*/
public final class SpringUtils {
private static Logger logger = LoggerFactory.getLogger("SpringUtils");
/**
* 获取全局WebApplicationContext
*
* @return 全局WebApplicationContext
*/
public static WebApplicationContext getContext() {
WebApplicationContext context = SpringContextLoaderListener.getWebRootAppContext();
return context;
}
/**
* 根据id获取bean
*
* @return spring bean对象
*/
public static Object getBean(String id) {
Object bean = null;
try {
bean = getContext().getBean(id);
} catch (RuntimeException e) {
logger.error("SpringUtils.getBean(String id) get bean failure, bean id = " + id);
throw e;
}
return bean;
}
}
| [
"516510574@qq.com"
] | 516510574@qq.com |
7c49d7705b4095d0ab5a16e1c6cb22dd5df53c7c | 0de1bb42e332d6df73d175305a86210971a5e4ad | /app/src/main/java/com/example/supercalculator/InputStackProcessor.java | 60c1f55fe2fd720e4bd8e6c9cadbae1a107c2ccd | [] | no_license | catrin-crypto/SuperCalculator | a1800bff2f45731a07a837df3ec7dc2843ec59b4 | 8a1cb3ff58184588133eb7bc2aaf9342f225f01a | refs/heads/master | 2023-08-09T10:33:10.931329 | 2021-06-16T20:09:01 | 2021-06-16T20:09:01 | 372,971,820 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,218 | java | package com.example.supercalculator;
import android.os.Parcel;
import android.os.Parcelable;
public class InputStackProcessor implements Parcelable {
public final static String OPERATIONS_CHARS = "+-/*";
private String inputStack;
public InputStackProcessor() {
this.inputStack = "";
}
protected InputStackProcessor(Parcel in) {
inputStack = in.readString();
}
public static final Creator<InputStackProcessor> CREATOR = new Creator<InputStackProcessor>() {
@Override
public InputStackProcessor createFromParcel(Parcel in) {
return new InputStackProcessor(in);
}
@Override
public InputStackProcessor[] newArray(int size) {
return new InputStackProcessor[size];
}
};
public void appendInputStack(String valueToAppend){
inputStack += valueToAppend;
}
public void replaceLastInputStackChar(String stringToPutInsteadLastChar){
inputStack = inputStack.substring(0, inputStack.length() - 1) + stringToPutInsteadLastChar;
}
public String getInputStack(){
return inputStack;
}
public void clearInputStack(){
inputStack = "";
}
public void countResult(){
inputStack = getCurrentResult();
}
public String getCurrentResult() {
double res = 0;
char curOp = '+';
String operand = "0";
for (int i = 0; i < inputStack.length(); i++) {
char curChar = inputStack.charAt(i);
if ((curChar >= '0' && curChar <= '9') ||
curChar == ',' || curChar == '.') {
operand += curChar;
} else if (OPERATIONS_CHARS.indexOf(curChar) > -1) {
res = execOperation(res, curOp, operand);
curOp = curChar;
operand = "0";
}
}
return niceDoubleFormat(res);
}
public static String niceDoubleFormat(double d) {
if (d == Math.floor(d))
return String.format("%d", (long) d);
else
return String.format("%s", d);
}
public double execOperation(double operand1, char operator, String textOperand2) {
double operand2 = Double.parseDouble(textOperand2.replace(",", "."));
switch (operator) {
case '+':
operand1 += operand2;
break;
case '-':
operand1 -= operand2;
break;
case '/':
operand1 /= operand2;
break;
case '*':
operand1 *= operand2;
break;
}
return operand1;
}
public String processLastNumber() {
String lastNumber = "";
for (int i = inputStack.length() - 1; i >= 0; i--) {
if (OPERATIONS_CHARS.indexOf(inputStack.charAt(i)) != -1) {
return lastNumber;
} else lastNumber += inputStack.charAt(i);
}
return lastNumber;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(inputStack);
}
}
| [
"78826785+catrin-crypto@users.noreply.github.com"
] | 78826785+catrin-crypto@users.noreply.github.com |
db19ad2735790a05fe4fc7ab0ddd6b42ffe6d3dd | e0f5212562167935827e8c3cbfa7a63bfffc0fd6 | /Tomato-restaurant/src/java/model/fooddetails.java | ad820f9de774224f77a6d10b919e03723fe85a90 | [] | no_license | shashank-gb/Tomato | 5c6240455fac67cd2687447cf6b0bca0b739d59e | 7b43f970d51ba82d5660d31bfdc27fff79c6b0f6 | refs/heads/main | 2023-07-14T06:12:26.708481 | 2021-09-07T10:55:59 | 2021-09-07T10:55:59 | 310,867,086 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,847 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package model;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import javax.servlet.http.HttpSession;
/**
*
* @author prajwal
*/
public class fooddetails {
HttpSession hs;
Connection con;
Statement st;
ResultSet rs;
public fooddetails(HttpSession se){
try{
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/tomato", "root", "");
}catch(Exception e){
System.out.println(e);
}
hs = se;
}
public ArrayList getfooddetails(){
String query = "select * from food_details where r_id="+hs.getAttribute("rid")+";";
ArrayList<getfoodsf> fooddetailsco=new ArrayList<>();
try{
st = con.createStatement();
rs = st.executeQuery(query);
while(rs.next()){
getfoodsf getfoods = new getfoodsf();
getfoods.setFood_id(rs.getInt("f_id"));
getfoods.setF_name(rs.getString("f_name"));
getfoods.setPreference(rs.getString("preference"));
getfoods.setCost(rs.getDouble("cost"));
getfoods.setDescription(rs.getString("description"));
System.out.println(rs.getString("f_name"));
fooddetailsco.add(getfoods);
}
}catch(Exception e){
System.out.println(e);
}
return fooddetailsco;
}
}
| [
"gbsshashank@gmail.com"
] | gbsshashank@gmail.com |
fa8d2dc33211a9668df7208ccaacc313acaef1ed | eebbe09cc2b78c45d3498041fc3b89600c490680 | /app/src/main/java/cz/nudz/www/trainingapp/enums/Difficulty.java | fa4c57bd62b9dd8912d643464fbb611eaad11984 | [
"MIT"
] | permissive | ayraz/TrainingApp | 2b42f0833c8cb94f1199094cea7f22097c2ef158 | 18683234da355490179b2061fbb7ad818a640a0e | refs/heads/master | 2021-01-22T08:23:49.653511 | 2019-03-07T16:12:35 | 2019-03-07T16:12:35 | 92,614,588 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,167 | java | package cz.nudz.www.trainingapp.enums;
/**
* Created by artem on 21-Sep-17.
*/
public enum Difficulty {
ONE,
TWO,
THREE,
FOUR,
FIVE,
SIX;
/**
*
* @param difficulty
* @return Integer corresponding to the actual name of enum; ONE = 1, etc.
*/
public static int toInteger(Difficulty difficulty) {
return difficulty.ordinal() + 1;
}
/**
*
* @param difficulty
* @return Returns next difficulty in order; ONE > TWO, etc.
* Or null if there isn't one.
*/
public static Difficulty next(Difficulty difficulty) {
int i = difficulty.ordinal() + 1;
Difficulty[] values = Difficulty.values();
if (i < values.length)
return values[i];
else
return null;
}
/**
*
* @param difficulty
* @return Returns previous difficulty in order; TWO > ONE, etc.
* Or null if there isn't one.
*/
public static Difficulty prev(Difficulty difficulty) {
int i = difficulty.ordinal() - 1;
if (i >= 0)
return Difficulty.values()[i];
else
return null;
}
}
| [
"artem.ayra@gmail.com"
] | artem.ayra@gmail.com |
84d249c39fa0e0c782aba02bc3ee7ee7d251bb15 | f272114082cf202ffc86c40e0e6809d2e657ba7c | /base/src/main/java/com/baselibrary/utils/StatusBarUtil.java | 9bd1e9e6db0182672168ba000a2d1b5abe7eb219 | [] | no_license | Android-linpengdiao/android-diandou | 171ca1ad8f42db55e961c3d73999ccf248858dd5 | cdb488b865f0bf79c718650b09b1c29bf01d9008 | refs/heads/master | 2023-06-04T09:06:56.482259 | 2021-06-29T13:40:58 | 2021-06-29T13:40:58 | 266,143,505 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,845 | java | package com.baselibrary.utils;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.os.Build;
import android.support.annotation.IntDef;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import com.baselibrary.R;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
public class StatusBarUtil {
public final static int TYPE_MIUI = 0;
public final static int TYPE_FLYME = 1;
public final static int TYPE_M = 3;//6.0
@IntDef({TYPE_MIUI,
TYPE_FLYME,
TYPE_M})
@Retention(RetentionPolicy.SOURCE)
@interface ViewType {
}
/**
* 修改状态栏颜色,支持4.4以上版本
*
* @param colorId 颜色
*/
public static void setStatusBarColor(Activity activity, int colorId) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = activity.getWindow();
window.setStatusBarColor(colorId);
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
//使用SystemBarTintManager,需要先将状态栏设置为透明
setTranslucentStatus(activity);
SystemBarTintManager systemBarTintManager = new SystemBarTintManager(activity);
systemBarTintManager.setStatusBarTintEnabled(true);//显示状态栏
systemBarTintManager.setStatusBarTintColor(colorId);//设置状态栏颜色
}
}
/**
* 设置状态栏透明
*/
@TargetApi(19)
public static void setTranslucentStatus(Activity activity) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
//5.x开始需要把颜色设置透明,否则导航栏会呈现系统默认的浅灰色
Window window = activity.getWindow();
View decorView = window.getDecorView();
//两个 flag 要结合使用,表示让应用的主体内容占用系统状态栏的空间
int option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
decorView.setSystemUiVisibility(option);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(Color.TRANSPARENT);
//导航栏颜色也可以正常设置
//window.setNavigationBarColor(Color.TRANSPARENT);
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window window = activity.getWindow();
WindowManager.LayoutParams attributes = window.getAttributes();
int flagTranslucentStatus = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
attributes.flags |= flagTranslucentStatus;
//int flagTranslucentNavigation = WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION;
//attributes.flags |= flagTranslucentNavigation;
window.setAttributes(attributes);
}
}
/**
* 代码实现android:fitsSystemWindows
*
* @param activity
*/
public static void setRootViewFitsSystemWindows(Activity activity, boolean fitSystemWindows) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
ViewGroup winContent = (ViewGroup) activity.findViewById(android.R.id.content);
if (winContent.getChildCount() > 0) {
ViewGroup rootView = (ViewGroup) winContent.getChildAt(0);
if (rootView != null) {
rootView.setFitsSystemWindows(fitSystemWindows);
}
}
}
}
/**
* 设置状态栏深色浅色切换
*/
public static boolean setStatusBarDarkTheme(Activity activity, boolean dark) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
setStatusBarFontIconDark(activity, TYPE_M, dark);
} else if (OSUtil.isMIUI()) {
setStatusBarFontIconDark(activity, TYPE_MIUI, dark);
} else if (OSUtil.isFlyme()) {
setStatusBarFontIconDark(activity, TYPE_FLYME, dark);
} else {//其他情况
return false;
}
return true;
}
return false;
}
/**
* 设置 状态栏深色浅色切换
*/
public static boolean setStatusBarFontIconDark(Activity activity, @ViewType int type, boolean dark) {
switch (type) {
case TYPE_MIUI:
return setMiuiUI(activity, dark);
case TYPE_FLYME:
return setFlymeUI(activity, dark);
case TYPE_M:
default:
return setCommonUI(activity, dark);
}
}
//设置6.0 状态栏深色浅色切换
public static boolean setCommonUI(Activity activity, boolean dark) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
View decorView = activity.getWindow().getDecorView();
if (decorView != null) {
int vis = decorView.getSystemUiVisibility();
if (dark) {
vis |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
} else {
vis &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
}
if (decorView.getSystemUiVisibility() != vis) {
decorView.setSystemUiVisibility(vis);
}
return true;
}
}
return false;
}
//设置Flyme 状态栏深色浅色切换
public static boolean setFlymeUI(Activity activity, boolean dark) {
try {
Window window = activity.getWindow();
WindowManager.LayoutParams lp = window.getAttributes();
Field darkFlag = WindowManager.LayoutParams.class.getDeclaredField("MEIZU_FLAG_DARK_STATUS_BAR_ICON");
Field meizuFlags = WindowManager.LayoutParams.class.getDeclaredField("meizuFlags");
darkFlag.setAccessible(true);
meizuFlags.setAccessible(true);
int bit = darkFlag.getInt(null);
int value = meizuFlags.getInt(lp);
if (dark) {
value |= bit;
} else {
value &= ~bit;
}
meizuFlags.setInt(lp, value);
window.setAttributes(lp);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
//设置MIUI 状态栏深色浅色切换
public static boolean setMiuiUI(Activity activity, boolean dark) {
try {
Window window = activity.getWindow();
Class<?> clazz = activity.getWindow().getClass();
@SuppressLint("PrivateApi") Class<?> layoutParams = Class.forName("android.view.MiuiWindowManager$LayoutParams");
Field field = layoutParams.getField("EXTRA_FLAG_STATUS_BAR_DARK_MODE");
int darkModeFlag = field.getInt(layoutParams);
Method extraFlagField = clazz.getDeclaredMethod("setExtraFlags", int.class, int.class);
extraFlagField.setAccessible(true);
if (dark) { //状态栏亮色且黑色字体
extraFlagField.invoke(window, darkModeFlag, darkModeFlag);
} else {
extraFlagField.invoke(window, 0, darkModeFlag);
}
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
//获取状态栏高度
public static int getStatusBarHeight(Context context) {
int result = 0;
int resourceId = context.getResources().getIdentifier(
"status_bar_height", "dimen", "android");
if (resourceId > 0) {
result = context.getResources().getDimensionPixelSize(resourceId);
}
return result;
}
/**
* 设置状态栏模式
*
* @param activity
* @param isTextDark 文字、图标是否为黑色 (false为默认的白色)
* @param colorId 状态栏颜色
* @return
*/
public static void setStatusBarMode(Activity activity, boolean isTextDark, int colorId) {
if (!isTextDark) {
//文字、图标颜色不变,只修改状态栏颜色
setStatusBarColor(activity, colorId);
} else {
//修改状态栏颜色和文字图标颜色
setStatusBarColor(activity, colorId);
//4.4以上才可以改文字图标颜色
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (OSUtil.isMIUI()) {
//小米MIUI系统
setMIUIStatusBarTextMode(activity, isTextDark);
} else if (OSUtil.isFlyme()) {
//魅族flyme系统
setFlymeStatusBarTextMode(activity, isTextDark);
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
//6.0以上,调用系统方法
Window window = activity.getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
} else {
//4.4以上6.0以下的其他系统,暂时没有修改状态栏的文字图标颜色的方法,有可以加上
}
}
}
}
/**
* 设置MIUI系统状态栏的文字图标颜色(MIUIV6以上)
*
* @param activity
* @param isDark 状态栏文字及图标是否为深色
* @return
*/
public static boolean setMIUIStatusBarTextMode(Activity activity, boolean isDark) {
boolean result = false;
Window window = activity.getWindow();
if (window != null) {
Class clazz = window.getClass();
try {
int darkModeFlag = 0;
Class layoutParams = Class.forName("android.view.MiuiWindowManager$LayoutParams");
Field field = layoutParams.getField("EXTRA_FLAG_STATUS_BAR_DARK_MODE");
darkModeFlag = field.getInt(layoutParams);
Method extraFlagField = clazz.getMethod("setExtraFlags", int.class, int.class);
if (isDark) {
extraFlagField.invoke(window, darkModeFlag, darkModeFlag);//状态栏透明且黑色字体
} else {
extraFlagField.invoke(window, 0, darkModeFlag);//清除黑色字体
}
result = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
//开发版 7.7.13 及以后版本采用了系统API,旧方法无效但不会报错,所以两个方式都要加上
if (isDark) {
activity.getWindow().getDecorView().setSystemUiVisibility(View
.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View
.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
} else {
activity.getWindow().getDecorView().setSystemUiVisibility(View
.SYSTEM_UI_FLAG_VISIBLE);
}
}
} catch (Exception e) {
}
}
return result;
}
/**
* 设置Flyme系统状态栏的文字图标颜色
*
* @param activity
* @param isDark 状态栏文字及图标是否为深色
* @return
*/
public static boolean setFlymeStatusBarTextMode(Activity activity, boolean isDark) {
Window window = activity.getWindow();
boolean result = false;
if (window != null) {
try {
WindowManager.LayoutParams lp = window.getAttributes();
Field darkFlag = WindowManager.LayoutParams.class
.getDeclaredField("MEIZU_FLAG_DARK_STATUS_BAR_ICON");
Field meizuFlags = WindowManager.LayoutParams.class
.getDeclaredField("meizuFlags");
darkFlag.setAccessible(true);
meizuFlags.setAccessible(true);
int bit = darkFlag.getInt(null);
int value = meizuFlags.getInt(lp);
if (isDark) {
value |= bit;
} else {
value &= ~bit;
}
meizuFlags.setInt(lp, value);
window.setAttributes(lp);
result = true;
} catch (Exception e) {
}
}
return result;
}
public static void setWindowStatusBarColor(Dialog dialog) {
setWindowStatusBarColor(dialog, R.color.textColor);
}
//设置Dialog对应的顶部状态栏的颜色
public static void setWindowStatusBarColor(Dialog dialog, int colorResId) {
try {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = dialog.getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(dialog.getContext().getResources().getColor(colorResId));
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
// 原文:https://blog.csdn.net/u014418171/article/details/81223681
| [
"742094154@qq.com"
] | 742094154@qq.com |
6484897884482a20a09e83543ad1f907073f0dc2 | 6accebc87d613445358b97462b498d65bdb0ca8f | /app/src/main/java/com/example/android/myapplication/MainActivity.java | 995346c628a5a1b7bcb8285583291b54197f72df | [] | no_license | dlovantallat/MyApplication | a2f23100d0737d65043a89be38beaac1ad4cf609 | f44c154429d430b7d6ecd989c7d1de42a86e8ced | refs/heads/master | 2021-07-25T02:48:42.518239 | 2017-11-02T17:06:04 | 2017-11-02T17:06:04 | 109,295,182 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,420 | java | package com.example.android.myapplication;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v7.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final TabLayout tabs = findViewById(R.id.tabs);
CustomViewPager pager = findViewById(R.id.viewPager);
ThePagerAdapter adapter = new ThePagerAdapter(getSupportFragmentManager());
adapter.addFragment(new HomeFragment(), "Home");
adapter.addFragment(new ProfileFragment(), "Profile");
//if the number is 1 for some animation view
//if we use 0 the animation is gone
pager.setOffscreenPageLimit(0);
pager.setAdapter(adapter);
tabs.setupWithViewPager(pager);
pager.setOnPageChangeListener(new CustomViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
tabs.setScrollPosition(position, 0f, true);
}
@Override
public void onPageSelected(int position) {
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
}
}
| [
"dlovan.tallat@gmail.com"
] | dlovan.tallat@gmail.com |
04a5e858d0ea79e66b8401b452fcbaee146fbde5 | 4863c358eaa76cee995992758ccf11b5f0ae651e | /src/minecraft/biomesoplenty/blocks/BlockBOPPetals.java | c9add0f9dc910d064185442a6dfe8c8a634cde14 | [] | no_license | psychoma/BiomesOPlenty | f3eba89fa026e441b48bd919edf701cad414361f | 4512618d84eb59de870278e88b2f195b5670b794 | refs/heads/master | 2021-01-15T19:39:25.399718 | 2013-05-14T14:40:05 | 2013-05-14T14:40:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,734 | java | package biomesoplenty.blocks;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLeavesBase;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraftforge.common.IShearable;
import biomesoplenty.BiomesOPlenty;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockBOPPetals extends BlockLeavesBase implements IShearable
{
private static final String[] petals = new String[] {"bigflowerred", "bigfloweryellow"};
private Icon[] textures;
public BlockBOPPetals(int blockID)
{
super(blockID, Material.leaves, false);
setBurnProperties(this.blockID, 30, 60);
this.setTickRandomly(true);
setHardness(0.2F);
setLightOpacity(1);
setStepSound(Block.soundGrassFootstep);
this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
}
@Override
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[petals.length];
for (int i = 0; i < petals.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + petals[i]);
}
@Override
public Icon getIcon(int side, int meta)
{
if (meta < 0 || meta >= textures.length)
meta = 0;
return textures[meta];
}
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) {
for (int i = 0; i < textures.length; ++i)
list.add(new ItemStack(blockID, 1, i));
}
@Override
public int idDropped(int par1, Random par2Random, int par3)
{
if (par1 == 0)
return Block.plantRed.blockID;
else
return Block.plantYellow.blockID;
}
@Override
public int damageDropped(int meta)
{
return meta & 15;
}
@Override
public int quantityDropped(Random random)
{
return random.nextInt(20) == 0 ? 1 : 0;
}
@Override
public boolean isShearable(ItemStack item, World world, int x, int y, int z)
{
return true;
}
@Override
public ArrayList<ItemStack> onSheared(ItemStack item, World world, int x, int y, int z, int fortune)
{
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z) & 15));
return ret;
}
}
| [
"a.dubbz@hotmail.com"
] | a.dubbz@hotmail.com |
67fa1083ea3a663be29133197f642258631ea775 | 8798a46a4bc2364df248d6284e87324dafadee8b | /src/main/java/carzanodev/genuniv/microservices/precord/persistence/entity/Faculty.java | 8a0643249613f3ff140fb66aa1b72c968f76ba0e | [] | no_license | carzanodev/genuniv-personal-records-service | fede4742666f5908dc557f2f9e7aa72c72a5c813 | d0a1e25f90529680101d3a4bc5989ffaa93c1659 | refs/heads/master | 2020-12-01T19:09:03.512547 | 2020-01-12T16:07:24 | 2020-01-12T16:09:38 | 230,738,474 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,112 | java | package carzanodev.genuniv.microservices.precord.persistence.entity;
import java.sql.Timestamp;
import java.time.LocalDate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import lombok.Data;
@Entity
@Data
public class Faculty {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
@Column(name = "first_name")
private String firstName;
@Column(name = "middle_name")
private String middleName;
@Column(name = "last_name")
private String lastName;
@Column(name = "birthdate")
private LocalDate birthdate;
@Column(name = "address")
private String address;
@Column(name = "college_id")
private int collegeId;
@Column(name = "is_active")
private boolean isActive = true;
@Column(name = "inserted_at", insertable = false, updatable = false)
private Timestamp insertedAt;
@Column(name = "updated_at", insertable = false, updatable = false)
private Timestamp updatedAt;
}
| [
"carzanodev@gmail.com"
] | carzanodev@gmail.com |
d120210c7547c0b737ccfafd57e0d3e440837a38 | c67e79d55ff84ce7feb1a17f623c98b30be7ddaf | /src/main/java/controller/CsvImporter.java | 64fcae62a3c8070fe4249ee655fabd46b4a2ca28 | [] | no_license | everlysetay/medicalConsultation | 1d518b5e56b2c2ab6338fad0d5c07490ac40f059 | c001a1e0c5eb4eb0013bd6192afd4d0f6c45d637 | refs/heads/master | 2020-12-09T04:06:52.721999 | 2020-01-12T15:24:32 | 2020-01-12T15:24:32 | 233,186,131 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,931 | java | package main.java.controller;
import java.io.BufferedReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import main.java.db.AppointmentDatabase;
import main.java.db.DoctorDatabase;
import main.java.db.PatientDatabase;
import main.java.model.Appointment;
import main.java.model.Doctor;
import main.java.model.Patient;
public class CsvImporter {
HashMap<String, Doctor> doctors = new HashMap<String, Doctor>();
HashMap<String, Patient> patients = new HashMap<String, Patient>();
ArrayList<Appointment> appointments = new ArrayList<Appointment>();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("ddMMyyyyHH:mm:ss");
AppointmentDatabase ad = new AppointmentDatabase();
DoctorDatabase dd = new DoctorDatabase();
PatientDatabase pd = new PatientDatabase();
//return initial database of appointments
public CsvImporter(Path path){
this.extractInformation(path);
}
public AppointmentDatabase getAppointmentDb(){
return ad;
}
public DoctorDatabase getDoctorsDb(){
return dd;
}
public PatientDatabase getPatientDb(){
return pd;
}
public void extractInformation(Path path){
try (BufferedReader br = Files.newBufferedReader(path, StandardCharsets.US_ASCII)){
String line = br.readLine();
while (line != null) {
if (!line.contains("doctor_id")) {
String[] fields = line.replace(" ", "").split(",");
if (fields.length == 8) {
//correct input
String doctorId = fields[0];
if (!doctors.containsKey(fields[0]) && doctorId.contains("D")) {
int id = Integer.valueOf(doctorId.replace("D", ""));
String name = fields[1];
Doctor doc = new Doctor(id, name);
doctors.put(doctorId, doc);
}
String patientId = fields[2];
if (!patients.containsKey(fields[2]) && patientId.contains("P")){
int id = Integer.valueOf(patientId.replace("P", ""));
String name = fields[3];
int age = Integer.valueOf(fields[4]);
char gender = fields[5].charAt(0);
Patient patient = new Patient(name, age, gender);
patient.setPatientId(id);
patients.put(patientId, patient);
}
String appointmentId = fields[6];
int id = Integer.valueOf(appointmentId.replace("A", ""));
LocalDateTime date = LocalDateTime.parse(fields[7], formatter);
Appointment appointment = new Appointment(id, date, doctorId, patientId);
appointments.add(appointment);
}
//if header, do not save -- skip line
}
line = br.readLine();
}
} catch (Exception e){
System.out.println("Unable to load CSV data file");
}
ad.setDatabase(appointments);
dd.setDatabase(doctors);
pd.setDatabase(patients);
}
}
| [
"Everlyse.Tay@gen-net.com.sg"
] | Everlyse.Tay@gen-net.com.sg |
0c158c985fde2b8a07ca769b01e927df8a016e68 | 360b8f5ab2ba5ebab1ff7d7e7b4dcde9220ebb8f | /Utilslibrary/src/main/java/com/android/utilslibrary/view/touch/ClickAlphaAnimAdapter.java | 74eb81cf147c2023a09c3c4a3e7e2736b5a9428a | [] | no_license | CrazeChao/Android_Utils | 66e877ec9d1322f25e6160ec113dc0a22875695e | 2ab9d1ed78627e235eb40e9933f975652974801b | refs/heads/master | 2023-09-04T11:30:52.563883 | 2021-10-25T09:27:11 | 2021-10-25T09:27:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,936 | java | package com.android.utilslibrary.view.touch;
import android.view.MotionEvent;
import android.view.View;
import com.android.utilslibrary.view.anim.CustomAnim;
import java.lang.ref.WeakReference;
/**
* 锁屏专用适配器
* */
public class ClickAlphaAnimAdapter implements ITouchAgent {
WeakReference<View> viewWeakReference;
public ClickAlphaAnimAdapter(View view) {
this.viewWeakReference = new WeakReference<>(view);
view.setAlpha(0.89f);
}
@Override
public void callOnTouchEvent(MotionEvent event) {
View view = viewWeakReference.get();
if (view == null)return;
switch (event.getAction()){
case MotionEvent.ACTION_DOWN:
creatEndAction();
view.animate().scaleX(0.95f).scaleY(0.95f).alpha(1).setDuration(CustomAnim.getDefaultDurationTime()/2).setInterpolator(CustomAnim.getDefaultInterception()).withEndAction(endAction).start();break;
case MotionEvent.ACTION_MOVE:break;
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
waitUpAction = upAction;
salfeEndAction();
break;
}
}
Runnable waitUpAction = null;
Runnable endAction = creatEndAction();
private void salfeEndAction(){
if (endAction == null)upAction.run();
}
private Runnable creatEndAction() {
return endAction = () -> {
if (waitUpAction != null){
waitUpAction.run();
}
endAction = null;
};
}
Runnable upAction = ()->{
View view = viewWeakReference.get();
if (view == null)return;
view.animate().scaleY(1).scaleX(1).alpha(0.89f).setDuration(CustomAnim.getDefaultDurationTime()/2).setInterpolator(CustomAnim.getDefaultInterception()).start();
waitUpAction = null;
};
} | [
"li962834"
] | li962834 |
7e1cfcff267b6c148fdb816dacff63e5f21571e5 | 6c466d86b1e13f640b11b553d7139d3f037deae5 | /fstcomp/examples/Modification/BerkeleyDB/project/src/com/sleepycat/bind/je/utilint/NotImplementedYetException.java | 45d02ca903154fa46cad3a0bf557aff01b00ca37 | [] | no_license | seanhoots/formol-featurehouse | a30af2f517fdff6a95c0f4a6b4fd9902aeb46f96 | 0cddc85e061398d6d653e4a4607d7e0f4c28fcc4 | refs/heads/master | 2021-01-17T06:35:11.489248 | 2012-03-08T13:51:46 | 2012-03-08T13:51:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 338 | java | package com.sleepycat.je.utilint;
import de.ovgu.cide.jakutil.*;
public class NotImplementedYetException extends RuntimeException {
public NotImplementedYetException(){ super(); }
public NotImplementedYetException( String message){ super(message); }
private Tracer t = new Tracer();
public Tracer getTracer(){return t;}
}
| [
"boxleitn"
] | boxleitn |
0754bb572fe9f340f1a3552fc67aec7c395f27fd | 3aa85966dc8bebbc50dc1bf89e52ccd10a15dab9 | /Practica 9 y 10/src/java/Controlador/Autenticacion.java | 56d0d14bc4baa1f90c2a65c4938937a53a646daa | [] | no_license | DoGg2111/LDOO1683510 | 4f7a123921fd7c8cd0848ea213bbd3c8c9d93ddb | 8f717adc6c01752b39ba03f91725a8b3f3a1777b | refs/heads/master | 2020-04-22T13:24:11.880415 | 2019-06-02T08:04:14 | 2019-06-02T08:04:14 | 170,408,008 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,183 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Controlador;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class Autenticacion extends Conexion{
public boolean RegistroAdmin(String username, String password, String email, String fechaNac, String numEmpleado){
PreparedStatement pst = null;
try {
String consulta = "INSERT INTO User (Username, Password, Email, FechaNacimiento, Num_Empleado) VALUES (?,?,?,?,?,?)";
pst = crearConexion().prepareStatement(consulta);
pst.setString(1, username);
pst.setString(2, password);
pst.setString(3, email);
pst.setString(4, fechaNac);
pst.setString(5, numEmpleado);
if(pst.executeUpdate() == 1){
return true;
}
} catch (SQLException e) {
System.err.println("Error" + e);
} finally{
try {
if(crearConexion() != null){
crearConexion().close();
}
if(pst != null){
pst.close();
}
} catch (SQLException e) {
System.err.println("Error" + e);
}
}
return false;
}
public boolean RegistroInvitado(String username, String password, String email, String fechaNac, String FechaRegistro){
PreparedStatement pst = null;
try {
String consulta = "INSERT INTO User (Username, Password, Email, FechaNacimiento, FechaRegistro) VALUES (?,?,?,?,?,?)";
pst = crearConexion().prepareStatement(consulta);
pst.setString(1, username);
pst.setString(2, password);
pst.setString(3, email);
pst.setString(4, fechaNac);
pst.setString(5, FechaRegistro);
if(pst.executeUpdate() == 1){
return true;
}
} catch (SQLException e) {
System.err.println("Error" + e);
} finally{
try {
if(crearConexion() != null){
crearConexion().close();
}
if(pst != null){
pst.close();
}
} catch (SQLException e) {
System.err.println("Error" + e);
}
}
return false;
}
public boolean registroUser(String username, String password, String email, String fechaNac,String tipoSubs, String domicilio){
PreparedStatement pst = null;
try {
String consulta = "INSERT INTO User (Username, Password, Email, FechaNacimiento,tipo_subs, domicilio) values (?,?,?,?,?,?)";
pst = crearConexion().prepareStatement(consulta);
pst.setString(1, username);
pst.setString(2, password);
pst.setString(3, email);
pst.setString(4, fechaNac);
pst.setString(5, tipoSubs);
pst.setString(6, domicilio);
if(pst.executeUpdate() == 1){
return true;
}
} catch (SQLException e) {
System.err.println("Error" + e);
} finally{
try {
if(crearConexion() != null){
crearConexion().close();
}
if(pst != null){
pst.close();
}
} catch (SQLException e) {
System.err.println("Error" + e);
}
}
return false;
}
public boolean autenticacion(String user, String pass, String tipo_Usuario){
PreparedStatement pst = null;
ResultSet rs = null;
try{
String consulta = "SELECT * FROM usuario_general WHERE nombre = ? and contraseña = ? and tipoUsuario = ?";
pst = crearConexion().prepareStatement(consulta);
pst.setString(1, user);
pst.setString(2, pass);
pst.setString(3, tipo_Usuario);
rs = pst.executeQuery();
if(rs.absolute(1)){
return true;
}
}catch(SQLException e){
System.err.println("Error" + e);
}finally{
try {
if(crearConexion() != null){
crearConexion().close();
}
if(pst != null){
pst.close();
}
if(rs != null){
rs.close();
}
} catch (SQLException e) {
System.err.println("Error" + e);
}
}
return false;
}
}
| [
"noreply@github.com"
] | DoGg2111.noreply@github.com |
c2532a9e465a9894487ac85e9cd853c8c3519e5b | 2f0905644ee7282dab0c5a9f2ea11aa1c96d50b1 | /app/src/main/java/com/bozhengjianshe/shenghuobang/ui/activity/InspectionDetailActivity.java | 763023a6c4ae136dd15e6d49363e05145d8c31c3 | [] | no_license | chenzhiwei152/LifeHelp | b9ad701d9ced896ba71da41b1afde8a207ecfb26 | 4fa8672bd0df2bb8c81c9fa1aeaaf6bb8fbcd653 | refs/heads/master | 2021-09-15T02:51:02.183118 | 2018-05-24T12:55:20 | 2018-05-24T12:55:20 | 107,953,145 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,234 | java | package com.bozhengjianshe.shenghuobang.ui.activity;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.bozhengjianshe.shenghuobang.R;
import com.bozhengjianshe.shenghuobang.base.BaseActivity;
import com.bozhengjianshe.shenghuobang.base.EventBusCenter;
import com.bozhengjianshe.shenghuobang.view.TitleBar;
import butterknife.BindView;
/**
* 巡检详情
* Created by chen.zhiwei on 2018-3-20.
*/
public class InspectionDetailActivity extends BaseActivity {
@BindView(R.id.rv_list)
RecyclerView rv_list;
@BindView(R.id.title_view)
TitleBar title_view;
@Override
public int getContentViewLayoutId() {
return R.layout.activity_inspection_detail;
}
@Override
public void initViewsAndEvents() {
initTitle();
}
@Override
public void loadData() {
}
@Override
public boolean isRegistEventBus() {
return false;
}
@Override
public void onMsgEvent(EventBusCenter eventBusCenter) {
}
@Override
protected View isNeedLec() {
return null;
}
private void initTitle() {
title_view.setShowDefaultRightValue();
title_view.setTitle("巡检信息详情");
}
}
| [
"chen.zhiwei@jyall.com"
] | chen.zhiwei@jyall.com |
127de69cb3d50928f4cdbd7c403f022c6444afca | 55d52e205dbdac8e4a5eca74bf025bcdb5c39221 | /server/src/main/java/fi/helsinki/cs/joosakur/asmgr/sheet/DurationFormatter.java | a424671e4063e2a916c416a265cebfab2aeb984e | [] | no_license | Joosakur/assistant-manager | c61aac110ae847c6b35dcd7c6f8b1105de8beebe | 225cff8b6a28417222abd0d4c0330cf7d1cbfe0a | refs/heads/master | 2020-12-02T21:04:13.526548 | 2018-06-17T14:00:38 | 2018-06-17T14:00:38 | 96,252,701 | 2 | 0 | null | 2018-06-11T19:37:16 | 2017-07-04T20:57:15 | Java | UTF-8 | Java | false | false | 616 | java | package fi.helsinki.cs.joosakur.asmgr.sheet;
import java.time.Duration;
import java.util.function.Function;
public class DurationFormatter implements Function<Duration, String> {
@Override
public String apply(Duration duration) {
if(duration.isZero())
return "";
long hours = duration.toHours();
long minutes = duration.toMinutes() - hours*60;
String string = "" + hours;
if(minutes == 0)
return string;
else if(minutes < 10)
return string + ":0" +minutes;
else
return string + ":" + minutes;
}
}
| [
"joosa.kurvinen@helsinki.fi"
] | joosa.kurvinen@helsinki.fi |
bcafb3af18522cfdcd184fc86f82ec5d2b31e4b5 | 106b6fd59c44c26ed4716c446aa2780ea8e93b99 | /PROG/BoletinesPROG/11 - 20/Boletin 17/Gato.java | 9af932575905b0e8c4cfdb1ee08586a0379d0f11 | [] | no_license | pablokrespo/1oDAM | 3b9065014505c68fe6139137646f51b7d996c925 | 288b1809341a83416f183d986e7ab16c3a7c4ded | refs/heads/master | 2022-11-05T08:31:21.992254 | 2020-06-23T09:00:23 | 2020-06-23T09:00:23 | 274,339,725 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 274 | java | package boletin17;
public class Gato extends Felino {
@Override
public void Caminar() {
System.out.println("Puede caminar");
}
@Override
public void Nadar() {
System.out.println("Puede nadar, parece que le gusta el agua");
}
}
| [
"noreply@github.com"
] | pablokrespo.noreply@github.com |
dd04680226aabbbc88ebf89ca7c4923b744e407d | 667db10a44a8492b55dd27482fdc40581eda2873 | /projeto/agenda/src/br/com/treinar/agenda/modelo/Pessoa.java | 35ef168d8f155fd63773f7df4cebc939757635f2 | [] | no_license | ggmoura/turma-8832 | ceb75f2e1b14dfc3d8955fb5f874358b6017ce5f | b75d84d52b53efc93d72c19c48b420ffca13f653 | refs/heads/master | 2021-01-11T00:21:36.303254 | 2016-11-10T00:37:44 | 2016-11-10T00:37:44 | 70,540,359 | 0 | 14 | null | null | null | null | UTF-8 | Java | false | false | 893 | java | package br.com.treinar.agenda.modelo;
import java.util.Date;
import java.util.List;
public class Pessoa {
private Long id;
private String nome;
private Sexo sexo;
private Date dataNascimento;
private List<Contato> contatos;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public Sexo getSexo() {
return sexo;
}
public void setSexo(Sexo sexo) {
this.sexo = sexo;
}
public List<Contato> getContatos() {
return contatos;
}
public void setContatos(List<Contato> contatos) {
this.contatos = contatos;
}
public Date getDataNascimento() {
return dataNascimento;
}
public void setDataNascimento(Date dataNascimento) {
this.dataNascimento = dataNascimento;
}
}
| [
"ADM@SL09PROFESSOR"
] | ADM@SL09PROFESSOR |
f98c4bfc6a9fe657bbb17e99cd8c4811bee0806d | 80a7f621be4d0168fff1b5a8c75312e3fab9e113 | /src/main/java/com/demo/records/aad/ErrorHandlerController.java | 3b140ff08aa3c549549e935bc424e11b2e654fb7 | [] | no_license | JiayanFighting/Records_backend | d327a8a7218248d94b92d2a1ab7e819fc4a7ca23 | 8e431bd425c8e6196916cc46b963bf3532d0ea5d | refs/heads/master | 2023-08-08T08:20:20.822029 | 2023-07-25T12:46:15 | 2023-07-25T12:46:15 | 289,667,295 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,058 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.demo.records.aad;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Endpoint where errors will be redirected
*/
@CrossOrigin
@Controller
public class ErrorHandlerController implements ErrorController {
private static final String PATH = "/error";
@RequestMapping(value = PATH)
public ModelAndView returnErrorPage(HttpServletRequest req, HttpServletResponse response) {
ModelAndView mav = new ModelAndView("error");
mav.addObject("error", req.getAttribute("error"));
return mav;
}
@Override
public String getErrorPath() {
return PATH;
}
}
| [
"jiayanfighting@163.com"
] | jiayanfighting@163.com |
3c66279f80edf8972cd81ac7e41bfcfebc5b1401 | a9c70a2dbb3a7cc1d608aa7aa78776766bc3e5dd | /baseLibrary/src/main/java/com/baselibrary/v2/bindingadapter/common/ItemView.java | fee479f83cc74d59edf3865478c6cfdb300d8547 | [] | no_license | zhangjianlong/MvvmTemplate | 32d0adb707303c37f65219d78d052db81be22cd3 | 38713a6e02087233e50a2fe1e9dca33d0ea84544 | refs/heads/master | 2020-04-18T07:38:02.652384 | 2019-01-24T12:49:03 | 2019-01-24T12:49:03 | 167,366,887 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,877 | java | package com.baselibrary.v2.bindingadapter.common;
import android.support.annotation.LayoutRes;
/**
* An {@code ItemView} provides the necessary information for an item in a collection view. All
* views require a binding variable and layout resource, though some may require additional
* information which can be set with arbitrary String keys. This class is explicitly mutable so that
* only one instance is required and set multiple times in a {@link ItemViewSelector} when multiple
* item types are needed.
*/
public final class ItemView {
/**
* Use this constant as the {@code bindingVariable} to not bind any variable to the layout. This
* is useful if no data is needed for that layout, like a static footer or loading indicator for
* example.
*/
public static final int BINDING_VARIABLE_NONE = 0;
private int bindingVariable;
@LayoutRes
private int layoutRes;
/**
* Constructs a new {@code ItemView} with the given binding variable and layout res.
*
* @see #setBindingVariable(int)
* @see #setLayoutRes(int)
*/
public static ItemView of(int bindingVariable, @LayoutRes int layoutRes) {
return new ItemView()
.setBindingVariable(bindingVariable)
.setLayoutRes(layoutRes);
}
/**
* A convenience method for {@code ItemView.setBindingVariable(int).setLayoutRes(int)}.
*
* @return the {@code ItemView} for chaining
*/
public ItemView set(int bindingVariable, @LayoutRes int layoutRes) {
this.bindingVariable = bindingVariable;
this.layoutRes = layoutRes;
return this;
}
/**
* Sets the binding variable. This is one of the {@code BR} constants that references the
* variable tag in the item layout file.
*
* @return the {@code ItemView} for chaining
*/
public ItemView setBindingVariable(int bindingVariable) {
this.bindingVariable = bindingVariable;
return this;
}
/**
* Sets the layout resource of the item.
*
* @return the {@code ItemView} for chaining
*/
public ItemView setLayoutRes(@LayoutRes int layoutRes) {
this.layoutRes = layoutRes;
return this;
}
public int bindingVariable() {
return bindingVariable;
}
@LayoutRes
public int layoutRes() {
return layoutRes;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ItemView itemView = (ItemView) o;
if (bindingVariable != itemView.bindingVariable) return false;
return layoutRes == itemView.layoutRes;
}
@Override
public int hashCode() {
int result = bindingVariable;
result = 31 * result + layoutRes;
return result;
}
}
| [
"zhangjianlong@macs-MacBook-Pro.local"
] | zhangjianlong@macs-MacBook-Pro.local |
a40f9f3f91f9b948ce5a80b9e327e7029b0e4f67 | bf1ecf6377284d18af06e4083e429321240ddcbf | /src/pbox/src/main/java/me/pbox/chocolatey/ChocolateyUtil.java | da438639b9cc0834593fab6242c94c493b49460b | [
"MIT"
] | permissive | lanyulinglin/pbox | 3fbea6d73e8bc2732a15efb3039ed7de714d0c74 | 2cc979f2a017db4d68f13ac5fcccabea991e1118 | refs/heads/master | 2020-07-12T18:36:18.552888 | 2015-06-02T00:02:31 | 2015-06-02T00:02:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,455 | java | package me.pbox.chocolatey;
import me.pbox.compress.CompressUtil;
import me.pbox.http.HttpUtil;
import me.pbox.xml.XmlUtil;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author Mike Mirzayanov (mirzayanovmr@gmail.com)
*/
public class ChocolateyUtil {
public static ChocolateyUtil.Package grub(String packageName) throws IOException {
String url = "https://chocolatey.org/packages/" + packageName;
File informationFile = HttpUtil.getTemporaryFile(url, true, true);
String information = FileUtils.readFileToString(informationFile);
String name = getPackageName(information);
if (name == null) {
throw new RuntimeException("Can't find chocolatey package '" + name + "' (or at least to find package name).");
}
Package pack = new Package(name);
setupPackage(pack, information);
return pack;
}
private static void setupPackage(Package pack, String information) throws IOException {
Pattern pattern = Pattern.compile("<a href=\"/packages/" + pack.getName() + "/([-_.\\w]+)\">[^<]+</a>");
for (String line : information.split("[\r\n]+")) {
String s = line.trim();
Matcher matcher = pattern.matcher(s);
if (matcher.matches()) {
String version = matcher.group(1);
if (!pack.getVersions().contains(version)) {
pack.getVersions().add(version);
}
}
if (s.contains("Download the raw nupkg file")) {
s = s.replaceAll("[\"\'=<>]", " ");
Scanner scanner = new Scanner(s);
while (scanner.hasNext()) {
String token = scanner.next();
if (token.startsWith("http:") || token.startsWith("https:")) {
int pos = token.lastIndexOf('/');
pack.getVersions().add(token.substring(pos + 1));
}
}
}
}
if (pack.getVersions().isEmpty()) {
return;
}
String url = "https://chocolateypackages.s3.amazonaws.com/" + pack.getName() + "." + pack.getVersions().get(0) + ".nupkg";
File nupkgFile = HttpUtil.getTemporaryFile(url, true, true);
if (nupkgFile == null || !nupkgFile.isFile() || nupkgFile.length() == 0) {
throw new RuntimeException("Can't find chocolatey file " + url + ".");
}
File nupkgDir = new File(nupkgFile.getParent(), pack.getName() + "@" + pack.getVersions().get(0));
if (nupkgDir.exists()) {
FileUtils.forceDelete(nupkgDir);
}
//noinspection ResultOfMethodCallIgnored
nupkgDir.mkdirs();
if (!CompressUtil.uncompress(nupkgFile, nupkgDir)) {
throw new RuntimeException("Can't uncompress " + nupkgFile + ".");
}
File nuspecFile = new File(nupkgDir, pack.getName() + ".nuspec");
String nuspec = FileUtils.readFileToString(nuspecFile);
nuspec = nuspec.replaceAll("xmlns=\"http://schemas.microsoft.com/packaging/\\d+/\\d+/nuspec.xsd\"", "");
pack.setDescription(XmlUtil.extractFromXml(new ByteArrayInputStream(nuspec.getBytes()), "//description", String.class));
pack.setIconUrl(XmlUtil.extractFromXml(new ByteArrayInputStream(nuspec.getBytes()), "//iconUrl", String.class));
pack.setAuthors(XmlUtil.extractFromXml(new ByteArrayInputStream(nuspec.getBytes()), "//authors", String.class));
String tags = XmlUtil.extractFromXml(new ByteArrayInputStream(nuspec.getBytes()), "//tags", String.class).toLowerCase();
if (StringUtils.isNoneBlank(tags)) {
pack.setTags(Arrays.asList(tags.split("[\r\n\\s]+")));
}
File installFile = new File(nupkgDir, "tools\\chocolateyInstall.ps1");
String install = FileUtils.readFileToString(installFile);
List<String> urls = new ArrayList<>();
for (String s : install.split("[\"\'\\s]+")) {
String word = s.trim();
if (word.startsWith("http://") || word.startsWith("https://")) {
if (word.contains(".msi") || word.contains(".exe")) {
urls.add(word);
}
}
}
Collections.sort(urls, new Comparator<String>() {
int type(String o) {
if (o.contains("x64")) {
return 2;
}
if (o.contains("x86") || o.contains("x32")) {
return -2;
}
if (o.contains("64") && (o.contains("32") || o.contains("86"))) {
return 0;
}
if (o.contains("64")) {
return -1;
}
if (o.contains("32") || o.contains("86")) {
return 1;
}
return 0;
}
@Override
public int compare(String o1, String o2) {
return Integer.compare(type(o1), type(o2));
}
});
pack.getUrls().addAll(urls);
}
private static String getPackageName(String information) {
Pattern pattern = Pattern.compile("[^/]*/packages/([-_.\\w]+)/([-_.\\w]+)/ContactAdmins[^/]*");
for (String line : information.split("[\r\n]+")) {
Matcher matcher = pattern.matcher(line);
if (matcher.matches()) {
return matcher.group(1);
}
}
return null;
}
public static void main(String[] args) throws IOException {
ChocolateyUtil.grub("GoogleChrome");
}
public static final class Package {
private final String name;
private String description;
private List<String> versions = new ArrayList<>();
private String iconUrl;
private String authors;
private List<String> urls = new ArrayList<>();
private List<String> tags = new ArrayList<>();
public Package(String name) {
this.name = name;
}
public String getAuthors() {
return authors;
}
public void setAuthors(String authors) {
this.authors = authors;
}
public String getIconUrl() {
return iconUrl;
}
public void setIconUrl(String iconUrl) {
this.iconUrl = iconUrl;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public List<String> getVersions() {
return versions;
}
public void setVersions(List<String> versions) {
this.versions = versions;
}
public List<String> getUrls() {
return urls;
}
public void setUrls(List<String> urls) {
this.urls = urls;
}
public List<String> getTags() {
return tags;
}
public void setTags(List<String> tags) {
this.tags = tags;
}
}
}
| [
"mirzayanovmr@gmail.com"
] | mirzayanovmr@gmail.com |
1328f778812f7023810eda80808a8768fd21472f | 9706e72ade5702c85a459b6ef6de82f82c5abcb6 | /JLC OOPs Lab/Lab340.java | d06e783b7dc66363214ebc42e37feee897fc768a | [] | no_license | saketkumar123/Java_OOPs | 81176f739f236035e2f3a44c4343ce2d73b138a0 | 8294673026f316dacd9e841a453f58d68a3e8aee | refs/heads/master | 2021-01-12T05:36:18.063666 | 2016-12-22T13:26:07 | 2016-12-22T13:26:07 | 77,146,486 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 698 | java | class Lab340
{
public static void main(String[] args)
{
new C();
}
}
class A
{
A()
{
System.out.println("A-> D.C.");
}
static
{
System.out.println("A-> S.B.");
}
{
System.out.println("A-> I.B.");
}
}
class B extends A
{
B()
{
System.out.println("B-> D.C.");
}
static
{
System.out.println("B-> S.B.");
}
{
System.out.println("B-> I.B.");
}
}
class C extends B
{
C()
{
System.out.println("C-> D.C.");
}
static
{
System.out.println("C-> S.B.");
}
{
System.out.println("C-> I.B.");
}
}
/*
Output
======
E:\JLC OOPs Lab>javac Lab340.java
E:\JLC OOPs Lab>java Lab340
A-> S.B.
B-> S.B.
C-> S.B.
A-> I.B.
A-> D.C.
B-> I.B.
B-> D.C.
C-> I.B.
C-> D.C.
*/ | [
"saket.ulsi@gmail.com"
] | saket.ulsi@gmail.com |
09f0c049b2681e888f794cf2af37bbf528743621 | 47959e6ca8c5eed87e1f338bb2e965514c255032 | /world-service/src/main/java/com/rainbowland/service/hotfixes/domain/MountLocale.java | 342f7fe9f2a7de3e85bd8f6456b02302a53b61d2 | [] | no_license | wplatform/HelloWorld | a4c112225ca483cf885eab1d6d7ec4c0ad736392 | d7eceb53c9c54b1a19076cc127e59210db31775a | refs/heads/main | 2023-05-13T07:43:48.368383 | 2021-05-25T07:26:39 | 2021-05-25T07:26:39 | 352,689,635 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,548 | java | package com.rainbowland.service.hotfixes.domain;
import io.r2dbc.spi.Row;
import org.springframework.data.relational.core.mapping.Table;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.convert.ReadingConverter;
import org.springframework.r2dbc.core.Parameter;
import org.springframework.data.convert.WritingConverter;
import org.springframework.data.r2dbc.mapping.OutboundRow;
import lombok.Data;
import java.util.Optional;
@Data
@Table("mount_locale")
public class MountLocale {
@Column("ID")
private Integer id;
@Column("locale")
private String locale;
@Column("Name_lang")
private String nameLang;
@Column("SourceText_lang")
private String sourceTextLang;
@Column("Description_lang")
private String descriptionLang;
@Column("VerifiedBuild")
private Integer verifiedBuild;
@ReadingConverter
public static class RowMapper implements Converter<Row, MountLocale> {
public MountLocale convert(Row row) {
MountLocale domain = new MountLocale();
domain.setId(row.get("ID", Integer.class));
domain.setLocale(row.get("locale", String.class));
domain.setNameLang(row.get("Name_lang", String.class));
domain.setSourceTextLang(row.get("SourceText_lang", String.class));
domain.setDescriptionLang(row.get("Description_lang", String.class));
domain.setVerifiedBuild(row.get("VerifiedBuild", Integer.class));
return domain;
}
}
@WritingConverter
public static class ParamMapper implements Converter<MountLocale, OutboundRow> {
public OutboundRow convert(MountLocale source) {
OutboundRow row = new OutboundRow();
Optional.ofNullable(source.getId()).ifPresent(e -> row.put("ID", Parameter.from(e)));
Optional.ofNullable(source.getLocale()).ifPresent(e -> row.put("locale", Parameter.from(e)));
Optional.ofNullable(source.getNameLang()).ifPresent(e -> row.put("Name_lang", Parameter.from(e)));
Optional.ofNullable(source.getSourceTextLang()).ifPresent(e -> row.put("SourceText_lang", Parameter.from(e)));
Optional.ofNullable(source.getDescriptionLang()).ifPresent(e -> row.put("Description_lang", Parameter.from(e)));
Optional.ofNullable(source.getVerifiedBuild()).ifPresent(e -> row.put("VerifiedBuild", Parameter.from(e)));
return row;
}
}
}
| [
"jorgie.li@ericsson.com"
] | jorgie.li@ericsson.com |
68daded701238d107244325f44039969f9e11fb4 | e96172bcad99d9fddaa00c25d00a319716c9ca3a | /java-language-impl/src/main/java/com/intellij/java/language/impl/psi/impl/compiled/ClsProvidesStatementImpl.java | a5ccd409cd10b210a7db6078fb46f6ffc7eb100c | [
"Apache-2.0"
] | permissive | consulo/consulo-java | 8c1633d485833651e2a9ecda43e27c3cbfa70a8a | a96757bc015eff692571285c0a10a140c8c721f8 | refs/heads/master | 2023-09-03T12:33:23.746878 | 2023-08-29T07:26:25 | 2023-08-29T07:26:25 | 13,799,330 | 5 | 4 | Apache-2.0 | 2023-01-03T08:32:23 | 2013-10-23T09:56:39 | Java | UTF-8 | Java | false | false | 2,959 | java | /*
* Copyright 2000-2017 JetBrains s.r.o.
*
* 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.
*/
package com.intellij.java.language.impl.psi.impl.compiled;
import com.intellij.java.language.impl.psi.impl.java.stubs.JavaStubElementTypes;
import com.intellij.java.language.impl.psi.impl.java.stubs.PsiProvidesStatementStub;
import com.intellij.java.language.impl.psi.impl.source.PsiClassReferenceType;
import com.intellij.java.language.impl.psi.impl.source.tree.JavaElementType;
import com.intellij.java.language.psi.*;
import consulo.language.impl.ast.TreeElement;
import consulo.language.impl.psi.SourceTreeToPsiMap;
import consulo.language.psi.stub.StubElement;
import consulo.util.lang.StringUtil;
import javax.annotation.Nonnull;
public class ClsProvidesStatementImpl extends ClsRepositoryPsiElement<PsiProvidesStatementStub> implements PsiProvidesStatement {
private final ClsJavaCodeReferenceElementImpl myClassReference;
public ClsProvidesStatementImpl(PsiProvidesStatementStub stub) {
super(stub);
myClassReference = new ClsJavaCodeReferenceElementImpl(this, stub.getInterface());
}
@Override
public PsiJavaCodeReferenceElement getInterfaceReference() {
return myClassReference;
}
@Override
public PsiClassType getInterfaceType() {
return new PsiClassReferenceType(myClassReference, null, PsiAnnotation.EMPTY_ARRAY);
}
@Override
public PsiReferenceList getImplementationList() {
StubElement<PsiReferenceList> stub = getStub().findChildStubByType(JavaStubElementTypes.PROVIDES_WITH_LIST);
return stub != null ? stub.getPsi() : null;
}
@Override
public void appendMirrorText(int indentLevel, @Nonnull StringBuilder buffer) {
StringUtil.repeatSymbol(buffer, ' ', indentLevel);
buffer.append("provides ").append(myClassReference.getCanonicalText()).append(' ');
appendText(getImplementationList(), indentLevel, buffer);
buffer.append(";\n");
}
@Override
public void setMirror(@Nonnull TreeElement element) throws InvalidMirrorException {
setMirrorCheckingType(element, JavaElementType.PROVIDES_STATEMENT);
setMirror(getInterfaceReference(), SourceTreeToPsiMap.<PsiProvidesStatement>treeToPsiNotNull(element).getInterfaceReference());
setMirrorIfPresent(getImplementationList(), SourceTreeToPsiMap.<PsiProvidesStatement>treeToPsiNotNull(element).getImplementationList());
}
@Override
public String toString() {
return "PsiProvidesStatement";
}
} | [
"vistall.valeriy@gmail.com"
] | vistall.valeriy@gmail.com |
338cd3eae7fe130cf308702a02c828eec7c7965a | ef0b2bd95078a4be2e3b9bd3a551f4163f64b432 | /src/main/java/net/sergeus_v/mixin/BottleMixin.java | f0c5b9c0561c3cc90db290a30ed5104244194500 | [] | no_license | Kaerius/deadlands_mod | ca44cba0db9cfa3e230dbe60c36d8a301b97b3a5 | b84db5331c2ac9841a68b68a093a21428a22aab9 | refs/heads/master | 2021-01-01T14:08:37.419947 | 2020-02-09T14:12:03 | 2020-02-09T14:12:03 | 239,312,914 | 0 | 0 | null | 2020-02-09T13:53:56 | 2020-02-09T13:53:55 | null | UTF-8 | Java | false | false | 2,232 | java | package net.sergeus_v.mixin;
import net.sergeus_v.DeadLands;
import net.minecraft.entity.AreaEffectCloudEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.GlassBottleItem;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import java.util.List;
@Mixin(GlassBottleItem.class)
public abstract class BottleMixin {
@Shadow
protected abstract ItemStack fill(ItemStack emptyBottle, PlayerEntity player, ItemStack filledBottle);
@Inject(
at = @At(
value = "JUMP",
opcode = Opcodes.IFEQ,
ordinal = 0,
shift = At.Shift.BEFORE
),
method = "use(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;",
locals = LocalCapture.CAPTURE_FAILEXCEPTION,
cancellable = true
)
public void use(World world, PlayerEntity user, Hand hand, CallbackInfoReturnable<TypedActionResult<ItemStack>> callback, List<AreaEffectCloudEntity> list, ItemStack itemStack, HitResult hitResult, BlockPos blockPos) {
if (DeadLands.getInstance().bloodFluidStill.matchesType(world.getFluidState(blockPos).getFluid())) {
world.playSound(user, user.getX(), user.getY(), user.getZ(), SoundEvents.ITEM_BOTTLE_FILL, SoundCategory.NEUTRAL, 1f, 1f);
ItemStack item = new ItemStack(Items.HONEY_BOTTLE);
callback.setReturnValue(TypedActionResult.success(fill(itemStack, user, item)));
}
}
}
| [
"Dima@Dima-PC"
] | Dima@Dima-PC |
6ea047436506312c0a83269073c50e7521feea84 | 1ba27fc930ba20782e9ef703e0dc7b69391e191b | /Src/Base/src/main/java/com/compuware/caqs/domain/dataschemas/actionplan/ActionPlanElementBean.java | ed794f8f94ffb2580b76b3c28ac24fceb25b7fee | [] | no_license | LO-RAN/codeQualityPortal | b0d81c76968bdcfce659959d0122e398c647b09f | a7c26209a616d74910f88ce0d60a6dc148dda272 | refs/heads/master | 2023-07-11T18:39:04.819034 | 2022-03-31T15:37:56 | 2022-03-31T15:37:56 | 37,261,337 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,582 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.compuware.caqs.domain.dataschemas.actionplan;
import com.compuware.toolbox.util.resources.Internationalizable;
import java.io.Serializable;
import java.util.Locale;
/**
*
* @author cwfr-dzysman
*/
public abstract class ActionPlanElementBean implements Serializable {
/**
* id
*/
protected String id;
/**
* Criterion mark
*/
protected double score = 0.0;
/**
* Flag to indicate if the criterion is included in the action plan
*/
protected boolean elementCorrected = false;
/**
* Severity index
*/
protected int indiceGravite = -1;
/**
* Getting worse, stable or better
*/
protected int tendance = -1;
/**
* Score it should obtain to be declared as corrected
*/
protected double correctedScore = 0.0;
/**
* Indicate if the criterion has to be corrected for the next baseline
*/
protected ActionPlanPriority priority = ActionPlanPriority.SHORT_TERM;
/**
* Comment
*/
protected String comment = "";
/**
* User who has made the comment
*/
protected String commentUser;
protected Internationalizable internationalizableProperties;
public Internationalizable getInternationalizableProperties() {
return internationalizableProperties;
}
/**
* the element master's id for this criterion
*/
private String elementMaster;
public String getElementMaster() {
return elementMaster;
}
/**
* set element master.
* @param elementMaster element master
*/
public void setElementMaster(String elementMaster) {
this.elementMaster = elementMaster;
}
public String getCommentUser() {
return commentUser;
}
public void setCommentUser(String commentUser) {
this.commentUser = commentUser;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
protected ActionPlanElementBean(Internationalizable i18n, String id) {
this.id = id;
this.internationalizableProperties = i18n;
}
public double getScore() {
return score;
}
public void setScore(double note) {
this.score = note;
}
public int getIndiceGravite() {
return indiceGravite;
}
public void setIndiceGravite(int indiceGravite) {
this.indiceGravite = indiceGravite;
}
public int getTendance() {
return tendance;
}
public void setTendance(int tendance) {
this.tendance = tendance;
}
/**
* @param o l'element a comparer
* @param loc la locale pour la comparaison par libelle
* @return -1 si cet element a une severite plus forte que celui donne en parametre, 0 si elle est egale et 1
* si elle moins forte. La comparaison se fait d'abord sur les notes, ensuite sur les agregations, puis la repartition,
* enfin sur le libelle traduit.
*/
public abstract int compareSeverity(ActionPlanElementBean o, Locale loc);
public boolean isCorrected() {
return elementCorrected;
}
/**
* set the element as included in an action plan if corrected is true, excluded
* if corrected is false
* @param corrected
*/
public void setCorrected(boolean corrected) {
this.elementCorrected = corrected;
}
public abstract double getCorrectedScore();
public void setCorrectedScore(double correctedMark) {
this.correctedScore = correctedMark;
}
public ActionPlanPriority getPriority() {
return priority;
}
public void setPriority(ActionPlanPriority priority) {
this.priority = priority;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Override
public boolean equals(Object o) {
boolean retour = false;
String oId = null;
if(o instanceof ActionPlanElementBean) {
oId = ((ActionPlanElementBean)o).getId();
} else if(o instanceof String) {
oId = (String)o;
}
if(oId!=null) {
retour = (this.id==null)? oId==null : oId.equals(this.id);
}
return retour;
}
@Override
public int hashCode() {
int hash = 3;
hash = 47 * hash + (this.id != null ? this.id.hashCode() : 0);
return hash;
}
}
| [
"laurent.izac@gmail.com"
] | laurent.izac@gmail.com |
7942fb198660252dd61469ee83ea10ec80428ec7 | c128e1dac02dfd44056bf8aeb221b7b2a389cf3e | /android/build/generated/source/r/release/com/facebook/react/R.java | cf37e78f3f9cb13ca8d3e3c097ea0fc5a4583368 | [
"MIT"
] | permissive | zk2401/react-native-photo-view | 93b0ce50c5142c99b576eef0adc1c3d157a2ab63 | 6b51b2d59aba0a488c59884d64ea97743b3902dd | refs/heads/master | 2021-06-21T11:10:28.387127 | 2017-08-15T03:40:11 | 2017-08-15T03:40:11 | 100,335,219 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 84,988 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.facebook.react;
public final class R {
public static final class anim {
public static int abc_fade_in = 0x7f040000;
public static int abc_fade_out = 0x7f040001;
public static int abc_grow_fade_in_from_bottom = 0x7f040002;
public static int abc_popup_enter = 0x7f040003;
public static int abc_popup_exit = 0x7f040004;
public static int abc_shrink_fade_out_from_bottom = 0x7f040005;
public static int abc_slide_in_bottom = 0x7f040006;
public static int abc_slide_in_top = 0x7f040007;
public static int abc_slide_out_bottom = 0x7f040008;
public static int abc_slide_out_top = 0x7f040009;
public static int catalyst_push_up_in = 0x7f04000a;
public static int catalyst_push_up_out = 0x7f04000b;
public static int fade_in = 0x7f04000c;
public static int fade_out = 0x7f04000d;
public static int slide_down = 0x7f04000e;
public static int slide_up = 0x7f04000f;
}
public static final class attr {
public static int actionBarDivider = 0x7f010080;
public static int actionBarItemBackground = 0x7f010081;
public static int actionBarPopupTheme = 0x7f01007a;
public static int actionBarSize = 0x7f01007f;
public static int actionBarSplitStyle = 0x7f01007c;
public static int actionBarStyle = 0x7f01007b;
public static int actionBarTabBarStyle = 0x7f010076;
public static int actionBarTabStyle = 0x7f010075;
public static int actionBarTabTextStyle = 0x7f010077;
public static int actionBarTheme = 0x7f01007d;
public static int actionBarWidgetTheme = 0x7f01007e;
public static int actionButtonStyle = 0x7f01009a;
public static int actionDropDownStyle = 0x7f010096;
public static int actionLayout = 0x7f01004c;
public static int actionMenuTextAppearance = 0x7f010082;
public static int actionMenuTextColor = 0x7f010083;
public static int actionModeBackground = 0x7f010086;
public static int actionModeCloseButtonStyle = 0x7f010085;
public static int actionModeCloseDrawable = 0x7f010088;
public static int actionModeCopyDrawable = 0x7f01008a;
public static int actionModeCutDrawable = 0x7f010089;
public static int actionModeFindDrawable = 0x7f01008e;
public static int actionModePasteDrawable = 0x7f01008b;
public static int actionModePopupWindowStyle = 0x7f010090;
public static int actionModeSelectAllDrawable = 0x7f01008c;
public static int actionModeShareDrawable = 0x7f01008d;
public static int actionModeSplitBackground = 0x7f010087;
public static int actionModeStyle = 0x7f010084;
public static int actionModeWebSearchDrawable = 0x7f01008f;
public static int actionOverflowButtonStyle = 0x7f010078;
public static int actionOverflowMenuStyle = 0x7f010079;
public static int actionProviderClass = 0x7f01004e;
public static int actionViewClass = 0x7f01004d;
public static int activityChooserViewStyle = 0x7f0100a2;
public static int actualImageScaleType = 0x7f01003a;
public static int actualImageUri = 0x7f010063;
public static int alertDialogButtonGroupStyle = 0x7f0100c4;
public static int alertDialogCenterButtons = 0x7f0100c5;
public static int alertDialogStyle = 0x7f0100c3;
public static int alertDialogTheme = 0x7f0100c6;
public static int arrowHeadLength = 0x7f01002b;
public static int arrowShaftLength = 0x7f01002c;
public static int autoCompleteTextViewStyle = 0x7f0100cb;
public static int background = 0x7f01000c;
public static int backgroundImage = 0x7f01003b;
public static int backgroundSplit = 0x7f01000e;
public static int backgroundStacked = 0x7f01000d;
public static int backgroundTint = 0x7f0100e7;
public static int backgroundTintMode = 0x7f0100e8;
public static int barLength = 0x7f01002d;
public static int borderlessButtonStyle = 0x7f01009f;
public static int buttonBarButtonStyle = 0x7f01009c;
public static int buttonBarNegativeButtonStyle = 0x7f0100c9;
public static int buttonBarNeutralButtonStyle = 0x7f0100ca;
public static int buttonBarPositiveButtonStyle = 0x7f0100c8;
public static int buttonBarStyle = 0x7f01009b;
public static int buttonPanelSideLayout = 0x7f01001f;
public static int buttonStyle = 0x7f0100cc;
public static int buttonStyleSmall = 0x7f0100cd;
public static int buttonTint = 0x7f010025;
public static int buttonTintMode = 0x7f010026;
public static int checkboxStyle = 0x7f0100ce;
public static int checkedTextViewStyle = 0x7f0100cf;
public static int closeIcon = 0x7f01005a;
public static int closeItemLayout = 0x7f01001c;
public static int collapseContentDescription = 0x7f0100de;
public static int collapseIcon = 0x7f0100dd;
public static int color = 0x7f010027;
public static int colorAccent = 0x7f0100bc;
public static int colorButtonNormal = 0x7f0100c0;
public static int colorControlActivated = 0x7f0100be;
public static int colorControlHighlight = 0x7f0100bf;
public static int colorControlNormal = 0x7f0100bd;
public static int colorPrimary = 0x7f0100ba;
public static int colorPrimaryDark = 0x7f0100bb;
public static int colorSwitchThumbNormal = 0x7f0100c1;
public static int commitIcon = 0x7f01005f;
public static int contentInsetEnd = 0x7f010017;
public static int contentInsetLeft = 0x7f010018;
public static int contentInsetRight = 0x7f010019;
public static int contentInsetStart = 0x7f010016;
public static int controlBackground = 0x7f0100c2;
public static int customNavigationLayout = 0x7f01000f;
public static int defaultQueryHint = 0x7f010059;
public static int dialogPreferredPadding = 0x7f010094;
public static int dialogTheme = 0x7f010093;
public static int displayOptions = 0x7f010005;
public static int divider = 0x7f01000b;
public static int dividerHorizontal = 0x7f0100a1;
public static int dividerPadding = 0x7f01004a;
public static int dividerVertical = 0x7f0100a0;
public static int drawableSize = 0x7f010029;
public static int drawerArrowStyle = 0x7f010000;
public static int dropDownListViewStyle = 0x7f0100b2;
public static int dropdownListPreferredItemHeight = 0x7f010097;
public static int editTextBackground = 0x7f0100a8;
public static int editTextColor = 0x7f0100a7;
public static int editTextStyle = 0x7f0100d0;
public static int elevation = 0x7f01001a;
public static int expandActivityOverflowButtonDrawable = 0x7f01001e;
public static int fadeDuration = 0x7f01002f;
public static int failureImage = 0x7f010035;
public static int failureImageScaleType = 0x7f010036;
public static int gapBetweenBars = 0x7f01002a;
public static int goIcon = 0x7f01005b;
public static int height = 0x7f010001;
public static int hideOnContentScroll = 0x7f010015;
public static int homeAsUpIndicator = 0x7f010099;
public static int homeLayout = 0x7f010010;
public static int icon = 0x7f010009;
public static int iconifiedByDefault = 0x7f010057;
public static int indeterminateProgressStyle = 0x7f010012;
public static int initialActivityCount = 0x7f01001d;
public static int isLightTheme = 0x7f010002;
public static int itemPadding = 0x7f010014;
public static int layout = 0x7f010056;
public static int layoutManager = 0x7f010052;
public static int listChoiceBackgroundIndicator = 0x7f0100b9;
public static int listDividerAlertDialog = 0x7f010095;
public static int listItemLayout = 0x7f010023;
public static int listLayout = 0x7f010020;
public static int listPopupWindowStyle = 0x7f0100b3;
public static int listPreferredItemHeight = 0x7f0100ad;
public static int listPreferredItemHeightLarge = 0x7f0100af;
public static int listPreferredItemHeightSmall = 0x7f0100ae;
public static int listPreferredItemPaddingLeft = 0x7f0100b0;
public static int listPreferredItemPaddingRight = 0x7f0100b1;
public static int logo = 0x7f01000a;
public static int logoDescription = 0x7f0100e1;
public static int maxButtonHeight = 0x7f0100dc;
public static int measureWithLargestChild = 0x7f010048;
public static int multiChoiceItemLayout = 0x7f010021;
public static int navigationContentDescription = 0x7f0100e0;
public static int navigationIcon = 0x7f0100df;
public static int navigationMode = 0x7f010004;
public static int overlapAnchor = 0x7f010050;
public static int overlayImage = 0x7f01003c;
public static int paddingEnd = 0x7f0100e5;
public static int paddingStart = 0x7f0100e4;
public static int panelBackground = 0x7f0100b6;
public static int panelMenuListTheme = 0x7f0100b8;
public static int panelMenuListWidth = 0x7f0100b7;
public static int placeholderImage = 0x7f010031;
public static int placeholderImageScaleType = 0x7f010032;
public static int popupMenuStyle = 0x7f0100a5;
public static int popupTheme = 0x7f01001b;
public static int popupWindowStyle = 0x7f0100a6;
public static int preserveIconSpacing = 0x7f01004f;
public static int pressedStateOverlayImage = 0x7f01003d;
public static int progressBarAutoRotateInterval = 0x7f010039;
public static int progressBarImage = 0x7f010037;
public static int progressBarImageScaleType = 0x7f010038;
public static int progressBarPadding = 0x7f010013;
public static int progressBarStyle = 0x7f010011;
public static int queryBackground = 0x7f010061;
public static int queryHint = 0x7f010058;
public static int radioButtonStyle = 0x7f0100d1;
public static int ratingBarStyle = 0x7f0100d2;
public static int retryImage = 0x7f010033;
public static int retryImageScaleType = 0x7f010034;
public static int reverseLayout = 0x7f010054;
public static int roundAsCircle = 0x7f01003e;
public static int roundBottomLeft = 0x7f010043;
public static int roundBottomRight = 0x7f010042;
public static int roundTopLeft = 0x7f010040;
public static int roundTopRight = 0x7f010041;
public static int roundWithOverlayColor = 0x7f010044;
public static int roundedCornerRadius = 0x7f01003f;
public static int roundingBorderColor = 0x7f010046;
public static int roundingBorderPadding = 0x7f010047;
public static int roundingBorderWidth = 0x7f010045;
public static int searchHintIcon = 0x7f01005d;
public static int searchIcon = 0x7f01005c;
public static int searchViewStyle = 0x7f0100ac;
public static int selectableItemBackground = 0x7f01009d;
public static int selectableItemBackgroundBorderless = 0x7f01009e;
public static int showAsAction = 0x7f01004b;
public static int showDividers = 0x7f010049;
public static int showText = 0x7f01006a;
public static int singleChoiceItemLayout = 0x7f010022;
public static int spanCount = 0x7f010053;
public static int spinBars = 0x7f010028;
public static int spinnerDropDownItemStyle = 0x7f010098;
public static int spinnerStyle = 0x7f0100d3;
public static int splitTrack = 0x7f010069;
public static int stackFromEnd = 0x7f010055;
public static int state_above_anchor = 0x7f010051;
public static int submitBackground = 0x7f010062;
public static int subtitle = 0x7f010006;
public static int subtitleTextAppearance = 0x7f0100d6;
public static int subtitleTextColor = 0x7f0100e3;
public static int subtitleTextStyle = 0x7f010008;
public static int suggestionRowLayout = 0x7f010060;
public static int switchMinWidth = 0x7f010067;
public static int switchPadding = 0x7f010068;
public static int switchStyle = 0x7f0100d4;
public static int switchTextAppearance = 0x7f010066;
public static int textAllCaps = 0x7f010024;
public static int textAppearanceLargePopupMenu = 0x7f010091;
public static int textAppearanceListItem = 0x7f0100b4;
public static int textAppearanceListItemSmall = 0x7f0100b5;
public static int textAppearanceSearchResultSubtitle = 0x7f0100aa;
public static int textAppearanceSearchResultTitle = 0x7f0100a9;
public static int textAppearanceSmallPopupMenu = 0x7f010092;
public static int textColorAlertDialogListItem = 0x7f0100c7;
public static int textColorSearchUrl = 0x7f0100ab;
public static int theme = 0x7f0100e6;
public static int thickness = 0x7f01002e;
public static int thumbTextPadding = 0x7f010065;
public static int title = 0x7f010003;
public static int titleMarginBottom = 0x7f0100db;
public static int titleMarginEnd = 0x7f0100d9;
public static int titleMarginStart = 0x7f0100d8;
public static int titleMarginTop = 0x7f0100da;
public static int titleMargins = 0x7f0100d7;
public static int titleTextAppearance = 0x7f0100d5;
public static int titleTextColor = 0x7f0100e2;
public static int titleTextStyle = 0x7f010007;
public static int toolbarNavigationButtonStyle = 0x7f0100a4;
public static int toolbarStyle = 0x7f0100a3;
public static int track = 0x7f010064;
public static int viewAspectRatio = 0x7f010030;
public static int voiceIcon = 0x7f01005e;
public static int windowActionBar = 0x7f01006b;
public static int windowActionBarOverlay = 0x7f01006d;
public static int windowActionModeOverlay = 0x7f01006e;
public static int windowFixedHeightMajor = 0x7f010072;
public static int windowFixedHeightMinor = 0x7f010070;
public static int windowFixedWidthMajor = 0x7f01006f;
public static int windowFixedWidthMinor = 0x7f010071;
public static int windowMinWidthMajor = 0x7f010073;
public static int windowMinWidthMinor = 0x7f010074;
public static int windowNoTitle = 0x7f01006c;
}
public static final class bool {
public static int abc_action_bar_embed_tabs = 0x7f090002;
public static int abc_action_bar_embed_tabs_pre_jb = 0x7f090000;
public static int abc_action_bar_expanded_action_views_exclusive = 0x7f090003;
public static int abc_config_actionMenuItemAllCaps = 0x7f090004;
public static int abc_config_allowActionMenuItemTextWithIcon = 0x7f090001;
public static int abc_config_closeDialogWhenTouchOutside = 0x7f090005;
public static int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f090006;
}
public static final class color {
public static int abc_background_cache_hint_selector_material_dark = 0x7f0b003b;
public static int abc_background_cache_hint_selector_material_light = 0x7f0b003c;
public static int abc_color_highlight_material = 0x7f0b003d;
public static int abc_input_method_navigation_guard = 0x7f0b0000;
public static int abc_primary_text_disable_only_material_dark = 0x7f0b003e;
public static int abc_primary_text_disable_only_material_light = 0x7f0b003f;
public static int abc_primary_text_material_dark = 0x7f0b0040;
public static int abc_primary_text_material_light = 0x7f0b0041;
public static int abc_search_url_text = 0x7f0b0042;
public static int abc_search_url_text_normal = 0x7f0b0001;
public static int abc_search_url_text_pressed = 0x7f0b0002;
public static int abc_search_url_text_selected = 0x7f0b0003;
public static int abc_secondary_text_material_dark = 0x7f0b0043;
public static int abc_secondary_text_material_light = 0x7f0b0044;
public static int accent_material_dark = 0x7f0b0004;
public static int accent_material_light = 0x7f0b0005;
public static int background_floating_material_dark = 0x7f0b0006;
public static int background_floating_material_light = 0x7f0b0007;
public static int background_material_dark = 0x7f0b0008;
public static int background_material_light = 0x7f0b0009;
public static int bright_foreground_disabled_material_dark = 0x7f0b000a;
public static int bright_foreground_disabled_material_light = 0x7f0b000b;
public static int bright_foreground_inverse_material_dark = 0x7f0b000c;
public static int bright_foreground_inverse_material_light = 0x7f0b000d;
public static int bright_foreground_material_dark = 0x7f0b000e;
public static int bright_foreground_material_light = 0x7f0b000f;
public static int button_material_dark = 0x7f0b0010;
public static int button_material_light = 0x7f0b0011;
public static int catalyst_redbox_background = 0x7f0b0012;
public static int dim_foreground_disabled_material_dark = 0x7f0b0013;
public static int dim_foreground_disabled_material_light = 0x7f0b0014;
public static int dim_foreground_material_dark = 0x7f0b0015;
public static int dim_foreground_material_light = 0x7f0b0016;
public static int foreground_material_dark = 0x7f0b0017;
public static int foreground_material_light = 0x7f0b0018;
public static int highlighted_text_material_dark = 0x7f0b0019;
public static int highlighted_text_material_light = 0x7f0b001a;
public static int hint_foreground_material_dark = 0x7f0b001b;
public static int hint_foreground_material_light = 0x7f0b001c;
public static int material_blue_grey_800 = 0x7f0b001d;
public static int material_blue_grey_900 = 0x7f0b001e;
public static int material_blue_grey_950 = 0x7f0b001f;
public static int material_deep_teal_200 = 0x7f0b0020;
public static int material_deep_teal_500 = 0x7f0b0021;
public static int material_grey_100 = 0x7f0b0022;
public static int material_grey_300 = 0x7f0b0023;
public static int material_grey_50 = 0x7f0b0024;
public static int material_grey_600 = 0x7f0b0025;
public static int material_grey_800 = 0x7f0b0026;
public static int material_grey_850 = 0x7f0b0027;
public static int material_grey_900 = 0x7f0b0028;
public static int primary_dark_material_dark = 0x7f0b0029;
public static int primary_dark_material_light = 0x7f0b002a;
public static int primary_material_dark = 0x7f0b002b;
public static int primary_material_light = 0x7f0b002c;
public static int primary_text_default_material_dark = 0x7f0b002d;
public static int primary_text_default_material_light = 0x7f0b002e;
public static int primary_text_disabled_material_dark = 0x7f0b002f;
public static int primary_text_disabled_material_light = 0x7f0b0030;
public static int ripple_material_dark = 0x7f0b0031;
public static int ripple_material_light = 0x7f0b0032;
public static int secondary_text_default_material_dark = 0x7f0b0033;
public static int secondary_text_default_material_light = 0x7f0b0034;
public static int secondary_text_disabled_material_dark = 0x7f0b0035;
public static int secondary_text_disabled_material_light = 0x7f0b0036;
public static int switch_thumb_disabled_material_dark = 0x7f0b0037;
public static int switch_thumb_disabled_material_light = 0x7f0b0038;
public static int switch_thumb_material_dark = 0x7f0b0045;
public static int switch_thumb_material_light = 0x7f0b0046;
public static int switch_thumb_normal_material_dark = 0x7f0b0039;
public static int switch_thumb_normal_material_light = 0x7f0b003a;
}
public static final class dimen {
public static int abc_action_bar_content_inset_material = 0x7f07000b;
public static int abc_action_bar_default_height_material = 0x7f070001;
public static int abc_action_bar_default_padding_end_material = 0x7f07000c;
public static int abc_action_bar_default_padding_start_material = 0x7f07000d;
public static int abc_action_bar_icon_vertical_padding_material = 0x7f07000f;
public static int abc_action_bar_overflow_padding_end_material = 0x7f070010;
public static int abc_action_bar_overflow_padding_start_material = 0x7f070011;
public static int abc_action_bar_progress_bar_size = 0x7f070002;
public static int abc_action_bar_stacked_max_height = 0x7f070012;
public static int abc_action_bar_stacked_tab_max_width = 0x7f070013;
public static int abc_action_bar_subtitle_bottom_margin_material = 0x7f070014;
public static int abc_action_bar_subtitle_top_margin_material = 0x7f070015;
public static int abc_action_button_min_height_material = 0x7f070016;
public static int abc_action_button_min_width_material = 0x7f070017;
public static int abc_action_button_min_width_overflow_material = 0x7f070018;
public static int abc_alert_dialog_button_bar_height = 0x7f070000;
public static int abc_button_inset_horizontal_material = 0x7f070019;
public static int abc_button_inset_vertical_material = 0x7f07001a;
public static int abc_button_padding_horizontal_material = 0x7f07001b;
public static int abc_button_padding_vertical_material = 0x7f07001c;
public static int abc_config_prefDialogWidth = 0x7f070005;
public static int abc_control_corner_material = 0x7f07001d;
public static int abc_control_inset_material = 0x7f07001e;
public static int abc_control_padding_material = 0x7f07001f;
public static int abc_dialog_list_padding_vertical_material = 0x7f070020;
public static int abc_dialog_min_width_major = 0x7f070021;
public static int abc_dialog_min_width_minor = 0x7f070022;
public static int abc_dialog_padding_material = 0x7f070023;
public static int abc_dialog_padding_top_material = 0x7f070024;
public static int abc_disabled_alpha_material_dark = 0x7f070025;
public static int abc_disabled_alpha_material_light = 0x7f070026;
public static int abc_dropdownitem_icon_width = 0x7f070027;
public static int abc_dropdownitem_text_padding_left = 0x7f070028;
public static int abc_dropdownitem_text_padding_right = 0x7f070029;
public static int abc_edit_text_inset_bottom_material = 0x7f07002a;
public static int abc_edit_text_inset_horizontal_material = 0x7f07002b;
public static int abc_edit_text_inset_top_material = 0x7f07002c;
public static int abc_floating_window_z = 0x7f07002d;
public static int abc_list_item_padding_horizontal_material = 0x7f07002e;
public static int abc_panel_menu_list_width = 0x7f07002f;
public static int abc_search_view_preferred_width = 0x7f070030;
public static int abc_search_view_text_min_width = 0x7f070006;
public static int abc_switch_padding = 0x7f07000e;
public static int abc_text_size_body_1_material = 0x7f070031;
public static int abc_text_size_body_2_material = 0x7f070032;
public static int abc_text_size_button_material = 0x7f070033;
public static int abc_text_size_caption_material = 0x7f070034;
public static int abc_text_size_display_1_material = 0x7f070035;
public static int abc_text_size_display_2_material = 0x7f070036;
public static int abc_text_size_display_3_material = 0x7f070037;
public static int abc_text_size_display_4_material = 0x7f070038;
public static int abc_text_size_headline_material = 0x7f070039;
public static int abc_text_size_large_material = 0x7f07003a;
public static int abc_text_size_medium_material = 0x7f07003b;
public static int abc_text_size_menu_material = 0x7f07003c;
public static int abc_text_size_small_material = 0x7f07003d;
public static int abc_text_size_subhead_material = 0x7f07003e;
public static int abc_text_size_subtitle_material_toolbar = 0x7f070003;
public static int abc_text_size_title_material = 0x7f07003f;
public static int abc_text_size_title_material_toolbar = 0x7f070004;
public static int dialog_fixed_height_major = 0x7f070007;
public static int dialog_fixed_height_minor = 0x7f070008;
public static int dialog_fixed_width_major = 0x7f070009;
public static int dialog_fixed_width_minor = 0x7f07000a;
public static int disabled_alpha_material_dark = 0x7f070040;
public static int disabled_alpha_material_light = 0x7f070041;
public static int highlight_alpha_material_colored = 0x7f070042;
public static int highlight_alpha_material_dark = 0x7f070043;
public static int highlight_alpha_material_light = 0x7f070044;
public static int item_touch_helper_max_drag_scroll_per_frame = 0x7f070045;
public static int item_touch_helper_swipe_escape_max_velocity = 0x7f070046;
public static int item_touch_helper_swipe_escape_velocity = 0x7f070047;
public static int notification_large_icon_height = 0x7f070048;
public static int notification_large_icon_width = 0x7f070049;
public static int notification_subtext_size = 0x7f07004a;
}
public static final class drawable {
public static int abc_ab_share_pack_mtrl_alpha = 0x7f020000;
public static int abc_action_bar_item_background_material = 0x7f020001;
public static int abc_btn_borderless_material = 0x7f020002;
public static int abc_btn_check_material = 0x7f020003;
public static int abc_btn_check_to_on_mtrl_000 = 0x7f020004;
public static int abc_btn_check_to_on_mtrl_015 = 0x7f020005;
public static int abc_btn_colored_material = 0x7f020006;
public static int abc_btn_default_mtrl_shape = 0x7f020007;
public static int abc_btn_radio_material = 0x7f020008;
public static int abc_btn_radio_to_on_mtrl_000 = 0x7f020009;
public static int abc_btn_radio_to_on_mtrl_015 = 0x7f02000a;
public static int abc_btn_rating_star_off_mtrl_alpha = 0x7f02000b;
public static int abc_btn_rating_star_on_mtrl_alpha = 0x7f02000c;
public static int abc_btn_switch_to_on_mtrl_00001 = 0x7f02000d;
public static int abc_btn_switch_to_on_mtrl_00012 = 0x7f02000e;
public static int abc_cab_background_internal_bg = 0x7f02000f;
public static int abc_cab_background_top_material = 0x7f020010;
public static int abc_cab_background_top_mtrl_alpha = 0x7f020011;
public static int abc_control_background_material = 0x7f020012;
public static int abc_dialog_material_background_dark = 0x7f020013;
public static int abc_dialog_material_background_light = 0x7f020014;
public static int abc_edit_text_material = 0x7f020015;
public static int abc_ic_ab_back_mtrl_am_alpha = 0x7f020016;
public static int abc_ic_clear_mtrl_alpha = 0x7f020017;
public static int abc_ic_commit_search_api_mtrl_alpha = 0x7f020018;
public static int abc_ic_go_search_api_mtrl_alpha = 0x7f020019;
public static int abc_ic_menu_copy_mtrl_am_alpha = 0x7f02001a;
public static int abc_ic_menu_cut_mtrl_alpha = 0x7f02001b;
public static int abc_ic_menu_moreoverflow_mtrl_alpha = 0x7f02001c;
public static int abc_ic_menu_paste_mtrl_am_alpha = 0x7f02001d;
public static int abc_ic_menu_selectall_mtrl_alpha = 0x7f02001e;
public static int abc_ic_menu_share_mtrl_alpha = 0x7f02001f;
public static int abc_ic_search_api_mtrl_alpha = 0x7f020020;
public static int abc_ic_voice_search_api_mtrl_alpha = 0x7f020021;
public static int abc_item_background_holo_dark = 0x7f020022;
public static int abc_item_background_holo_light = 0x7f020023;
public static int abc_list_divider_mtrl_alpha = 0x7f020024;
public static int abc_list_focused_holo = 0x7f020025;
public static int abc_list_longpressed_holo = 0x7f020026;
public static int abc_list_pressed_holo_dark = 0x7f020027;
public static int abc_list_pressed_holo_light = 0x7f020028;
public static int abc_list_selector_background_transition_holo_dark = 0x7f020029;
public static int abc_list_selector_background_transition_holo_light = 0x7f02002a;
public static int abc_list_selector_disabled_holo_dark = 0x7f02002b;
public static int abc_list_selector_disabled_holo_light = 0x7f02002c;
public static int abc_list_selector_holo_dark = 0x7f02002d;
public static int abc_list_selector_holo_light = 0x7f02002e;
public static int abc_menu_hardkey_panel_mtrl_mult = 0x7f02002f;
public static int abc_popup_background_mtrl_mult = 0x7f020030;
public static int abc_ratingbar_full_material = 0x7f020031;
public static int abc_spinner_mtrl_am_alpha = 0x7f020032;
public static int abc_spinner_textfield_background_material = 0x7f020033;
public static int abc_switch_thumb_material = 0x7f020034;
public static int abc_switch_track_mtrl_alpha = 0x7f020035;
public static int abc_tab_indicator_material = 0x7f020036;
public static int abc_tab_indicator_mtrl_alpha = 0x7f020037;
public static int abc_text_cursor_material = 0x7f020038;
public static int abc_textfield_activated_mtrl_alpha = 0x7f020039;
public static int abc_textfield_default_mtrl_alpha = 0x7f02003a;
public static int abc_textfield_search_activated_mtrl_alpha = 0x7f02003b;
public static int abc_textfield_search_default_mtrl_alpha = 0x7f02003c;
public static int abc_textfield_search_material = 0x7f02003d;
public static int notification_template_icon_bg = 0x7f02003e;
}
public static final class id {
public static int action0 = 0x7f0c0057;
public static int action_bar = 0x7f0c0047;
public static int action_bar_activity_content = 0x7f0c0000;
public static int action_bar_container = 0x7f0c0046;
public static int action_bar_root = 0x7f0c0042;
public static int action_bar_spinner = 0x7f0c0001;
public static int action_bar_subtitle = 0x7f0c002b;
public static int action_bar_title = 0x7f0c002a;
public static int action_context_bar = 0x7f0c0048;
public static int action_divider = 0x7f0c005b;
public static int action_menu_divider = 0x7f0c0002;
public static int action_menu_presenter = 0x7f0c0003;
public static int action_mode_bar = 0x7f0c0044;
public static int action_mode_bar_stub = 0x7f0c0043;
public static int action_mode_close_button = 0x7f0c002c;
public static int activity_chooser_view_content = 0x7f0c002d;
public static int alertTitle = 0x7f0c0037;
public static int always = 0x7f0c0024;
public static int beginning = 0x7f0c0021;
public static int buttonPanel = 0x7f0c003d;
public static int cancel_action = 0x7f0c0058;
public static int catalyst_redbox_title = 0x7f0c0066;
public static int center = 0x7f0c0019;
public static int centerCrop = 0x7f0c001a;
public static int centerInside = 0x7f0c001b;
public static int checkbox = 0x7f0c003f;
public static int chronometer = 0x7f0c005e;
public static int collapseActionView = 0x7f0c0025;
public static int contentPanel = 0x7f0c0038;
public static int custom = 0x7f0c003c;
public static int customPanel = 0x7f0c003b;
public static int decor_content_parent = 0x7f0c0045;
public static int default_activity_button = 0x7f0c0030;
public static int disableHome = 0x7f0c000d;
public static int edit_query = 0x7f0c0049;
public static int end = 0x7f0c0022;
public static int end_padder = 0x7f0c0063;
public static int expand_activities_button = 0x7f0c002e;
public static int expanded_menu = 0x7f0c003e;
public static int fitCenter = 0x7f0c001c;
public static int fitEnd = 0x7f0c001d;
public static int fitStart = 0x7f0c001e;
public static int fitXY = 0x7f0c001f;
public static int focusCrop = 0x7f0c0020;
public static int fps_text = 0x7f0c0056;
public static int home = 0x7f0c0004;
public static int homeAsUp = 0x7f0c000e;
public static int icon = 0x7f0c0032;
public static int ifRoom = 0x7f0c0026;
public static int image = 0x7f0c002f;
public static int info = 0x7f0c0062;
public static int item_touch_helper_previous_elevation = 0x7f0c0005;
public static int line1 = 0x7f0c005c;
public static int line3 = 0x7f0c0060;
public static int listMode = 0x7f0c000a;
public static int list_item = 0x7f0c0031;
public static int media_actions = 0x7f0c005a;
public static int middle = 0x7f0c0023;
public static int multiply = 0x7f0c0014;
public static int never = 0x7f0c0027;
public static int none = 0x7f0c000f;
public static int normal = 0x7f0c000b;
public static int parentPanel = 0x7f0c0034;
public static int progress_circular = 0x7f0c0006;
public static int progress_horizontal = 0x7f0c0007;
public static int radio = 0x7f0c0041;
public static int rn_frame_file = 0x7f0c0065;
public static int rn_frame_method = 0x7f0c0064;
public static int rn_redbox_copy_button = 0x7f0c006d;
public static int rn_redbox_dismiss_button = 0x7f0c006b;
public static int rn_redbox_line_separator = 0x7f0c0068;
public static int rn_redbox_loading_indicator = 0x7f0c0069;
public static int rn_redbox_reload_button = 0x7f0c006c;
public static int rn_redbox_report_button = 0x7f0c006e;
public static int rn_redbox_report_label = 0x7f0c006a;
public static int rn_redbox_stack = 0x7f0c0067;
public static int screen = 0x7f0c0015;
public static int scrollView = 0x7f0c0039;
public static int search_badge = 0x7f0c004b;
public static int search_bar = 0x7f0c004a;
public static int search_button = 0x7f0c004c;
public static int search_close_btn = 0x7f0c0051;
public static int search_edit_frame = 0x7f0c004d;
public static int search_go_btn = 0x7f0c0053;
public static int search_mag_icon = 0x7f0c004e;
public static int search_plate = 0x7f0c004f;
public static int search_src_text = 0x7f0c0050;
public static int search_voice_btn = 0x7f0c0054;
public static int select_dialog_listview = 0x7f0c0055;
public static int shortcut = 0x7f0c0040;
public static int showCustom = 0x7f0c0010;
public static int showHome = 0x7f0c0011;
public static int showTitle = 0x7f0c0012;
public static int split_action_bar = 0x7f0c0008;
public static int src_atop = 0x7f0c0016;
public static int src_in = 0x7f0c0017;
public static int src_over = 0x7f0c0018;
public static int status_bar_latest_event_content = 0x7f0c0059;
public static int submit_area = 0x7f0c0052;
public static int tabMode = 0x7f0c000c;
public static int text = 0x7f0c0061;
public static int text2 = 0x7f0c005f;
public static int textSpacerNoButtons = 0x7f0c003a;
public static int time = 0x7f0c005d;
public static int title = 0x7f0c0033;
public static int title_template = 0x7f0c0036;
public static int topPanel = 0x7f0c0035;
public static int up = 0x7f0c0009;
public static int useLogo = 0x7f0c0013;
public static int withText = 0x7f0c0028;
public static int wrap_content = 0x7f0c0029;
}
public static final class integer {
public static int abc_config_activityDefaultDur = 0x7f0a0001;
public static int abc_config_activityShortDur = 0x7f0a0002;
public static int abc_max_action_buttons = 0x7f0a0000;
public static int cancel_button_image_alpha = 0x7f0a0003;
public static int status_bar_notification_info_maxnum = 0x7f0a0004;
}
public static final class layout {
public static int abc_action_bar_title_item = 0x7f030000;
public static int abc_action_bar_up_container = 0x7f030001;
public static int abc_action_bar_view_list_nav_layout = 0x7f030002;
public static int abc_action_menu_item_layout = 0x7f030003;
public static int abc_action_menu_layout = 0x7f030004;
public static int abc_action_mode_bar = 0x7f030005;
public static int abc_action_mode_close_item_material = 0x7f030006;
public static int abc_activity_chooser_view = 0x7f030007;
public static int abc_activity_chooser_view_list_item = 0x7f030008;
public static int abc_alert_dialog_material = 0x7f030009;
public static int abc_dialog_title_material = 0x7f03000a;
public static int abc_expanded_menu_layout = 0x7f03000b;
public static int abc_list_menu_item_checkbox = 0x7f03000c;
public static int abc_list_menu_item_icon = 0x7f03000d;
public static int abc_list_menu_item_layout = 0x7f03000e;
public static int abc_list_menu_item_radio = 0x7f03000f;
public static int abc_popup_menu_item_layout = 0x7f030010;
public static int abc_screen_content_include = 0x7f030011;
public static int abc_screen_simple = 0x7f030012;
public static int abc_screen_simple_overlay_action_mode = 0x7f030013;
public static int abc_screen_toolbar = 0x7f030014;
public static int abc_search_dropdown_item_icons_2line = 0x7f030015;
public static int abc_search_view = 0x7f030016;
public static int abc_select_dialog_material = 0x7f030017;
public static int fps_view = 0x7f030018;
public static int notification_media_action = 0x7f030019;
public static int notification_media_cancel_action = 0x7f03001a;
public static int notification_template_big_media = 0x7f03001b;
public static int notification_template_big_media_narrow = 0x7f03001c;
public static int notification_template_lines = 0x7f03001d;
public static int notification_template_media = 0x7f03001e;
public static int notification_template_part_chronometer = 0x7f03001f;
public static int notification_template_part_time = 0x7f030020;
public static int redbox_item_frame = 0x7f030021;
public static int redbox_item_title = 0x7f030022;
public static int redbox_view = 0x7f030023;
public static int select_dialog_item_material = 0x7f030024;
public static int select_dialog_multichoice_material = 0x7f030025;
public static int select_dialog_singlechoice_material = 0x7f030026;
public static int support_simple_spinner_dropdown_item = 0x7f030027;
}
public static final class string {
public static int abc_action_bar_home_description = 0x7f060000;
public static int abc_action_bar_home_description_format = 0x7f060001;
public static int abc_action_bar_home_subtitle_description_format = 0x7f060002;
public static int abc_action_bar_up_description = 0x7f060003;
public static int abc_action_menu_overflow_description = 0x7f060004;
public static int abc_action_mode_done = 0x7f060005;
public static int abc_activity_chooser_view_see_all = 0x7f060006;
public static int abc_activitychooserview_choose_application = 0x7f060007;
public static int abc_search_hint = 0x7f060008;
public static int abc_searchview_description_clear = 0x7f060009;
public static int abc_searchview_description_query = 0x7f06000a;
public static int abc_searchview_description_search = 0x7f06000b;
public static int abc_searchview_description_submit = 0x7f06000c;
public static int abc_searchview_description_voice = 0x7f06000d;
public static int abc_shareactionprovider_share_with = 0x7f06000e;
public static int abc_shareactionprovider_share_with_application = 0x7f06000f;
public static int abc_toolbar_collapse_description = 0x7f060010;
public static int catalyst_copy_button = 0x7f060013;
public static int catalyst_debugjs = 0x7f060014;
public static int catalyst_debugjs_off = 0x7f060015;
public static int catalyst_dismiss_button = 0x7f060016;
public static int catalyst_element_inspector = 0x7f060017;
public static int catalyst_heap_capture = 0x7f060018;
public static int catalyst_hot_module_replacement = 0x7f060019;
public static int catalyst_hot_module_replacement_off = 0x7f06001a;
public static int catalyst_jsload_error = 0x7f06001b;
public static int catalyst_jsload_message = 0x7f06001c;
public static int catalyst_jsload_title = 0x7f06001d;
public static int catalyst_live_reload = 0x7f06001e;
public static int catalyst_live_reload_off = 0x7f06001f;
public static int catalyst_perf_monitor = 0x7f060020;
public static int catalyst_perf_monitor_off = 0x7f060021;
public static int catalyst_poke_sampling_profiler = 0x7f060022;
public static int catalyst_reload_button = 0x7f060023;
public static int catalyst_reloadjs = 0x7f060024;
public static int catalyst_remotedbg_error = 0x7f060025;
public static int catalyst_remotedbg_message = 0x7f060026;
public static int catalyst_report_button = 0x7f060027;
public static int catalyst_settings = 0x7f060028;
public static int catalyst_settings_title = 0x7f060029;
public static int status_bar_notification_info_overflow = 0x7f060011;
}
public static final class style {
public static int AlertDialog_AppCompat = 0x7f08007a;
public static int AlertDialog_AppCompat_Light = 0x7f08007b;
public static int Animation_AppCompat_Dialog = 0x7f08007c;
public static int Animation_AppCompat_DropDownUp = 0x7f08007d;
public static int Animation_Catalyst_RedBox = 0x7f08007e;
public static int Base_AlertDialog_AppCompat = 0x7f08007f;
public static int Base_AlertDialog_AppCompat_Light = 0x7f080080;
public static int Base_Animation_AppCompat_Dialog = 0x7f080081;
public static int Base_Animation_AppCompat_DropDownUp = 0x7f080082;
public static int Base_DialogWindowTitleBackground_AppCompat = 0x7f080084;
public static int Base_DialogWindowTitle_AppCompat = 0x7f080083;
public static int Base_TextAppearance_AppCompat = 0x7f08002d;
public static int Base_TextAppearance_AppCompat_Body1 = 0x7f08002e;
public static int Base_TextAppearance_AppCompat_Body2 = 0x7f08002f;
public static int Base_TextAppearance_AppCompat_Button = 0x7f080018;
public static int Base_TextAppearance_AppCompat_Caption = 0x7f080030;
public static int Base_TextAppearance_AppCompat_Display1 = 0x7f080031;
public static int Base_TextAppearance_AppCompat_Display2 = 0x7f080032;
public static int Base_TextAppearance_AppCompat_Display3 = 0x7f080033;
public static int Base_TextAppearance_AppCompat_Display4 = 0x7f080034;
public static int Base_TextAppearance_AppCompat_Headline = 0x7f080035;
public static int Base_TextAppearance_AppCompat_Inverse = 0x7f080003;
public static int Base_TextAppearance_AppCompat_Large = 0x7f080036;
public static int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f080004;
public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f080037;
public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f080038;
public static int Base_TextAppearance_AppCompat_Medium = 0x7f080039;
public static int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f080005;
public static int Base_TextAppearance_AppCompat_Menu = 0x7f08003a;
public static int Base_TextAppearance_AppCompat_SearchResult = 0x7f080085;
public static int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f08003b;
public static int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f08003c;
public static int Base_TextAppearance_AppCompat_Small = 0x7f08003d;
public static int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f080006;
public static int Base_TextAppearance_AppCompat_Subhead = 0x7f08003e;
public static int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f080007;
public static int Base_TextAppearance_AppCompat_Title = 0x7f08003f;
public static int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f080008;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f080040;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f080041;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f080042;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f080043;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f080044;
public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f080045;
public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f080046;
public static int Base_TextAppearance_AppCompat_Widget_Button = 0x7f080047;
public static int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f080076;
public static int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f080086;
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f080048;
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f080049;
public static int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f08004a;
public static int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f08004b;
public static int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f080087;
public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f08004c;
public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f08004d;
public static int Base_ThemeOverlay_AppCompat = 0x7f080090;
public static int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f080091;
public static int Base_ThemeOverlay_AppCompat_Dark = 0x7f080092;
public static int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f080093;
public static int Base_ThemeOverlay_AppCompat_Light = 0x7f080094;
public static int Base_Theme_AppCompat = 0x7f08004e;
public static int Base_Theme_AppCompat_CompactMenu = 0x7f080088;
public static int Base_Theme_AppCompat_Dialog = 0x7f080009;
public static int Base_Theme_AppCompat_DialogWhenLarge = 0x7f080001;
public static int Base_Theme_AppCompat_Dialog_Alert = 0x7f080089;
public static int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f08008a;
public static int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f08008b;
public static int Base_Theme_AppCompat_Light = 0x7f08004f;
public static int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f08008c;
public static int Base_Theme_AppCompat_Light_Dialog = 0x7f08000a;
public static int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f080002;
public static int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f08008d;
public static int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f08008e;
public static int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f08008f;
public static int Base_V11_Theme_AppCompat_Dialog = 0x7f08000b;
public static int Base_V11_Theme_AppCompat_Light_Dialog = 0x7f08000c;
public static int Base_V12_Widget_AppCompat_AutoCompleteTextView = 0x7f080014;
public static int Base_V12_Widget_AppCompat_EditText = 0x7f080015;
public static int Base_V21_Theme_AppCompat = 0x7f080050;
public static int Base_V21_Theme_AppCompat_Dialog = 0x7f080051;
public static int Base_V21_Theme_AppCompat_Light = 0x7f080052;
public static int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f080053;
public static int Base_V22_Theme_AppCompat = 0x7f080074;
public static int Base_V22_Theme_AppCompat_Light = 0x7f080075;
public static int Base_V23_Theme_AppCompat = 0x7f080077;
public static int Base_V23_Theme_AppCompat_Light = 0x7f080078;
public static int Base_V7_Theme_AppCompat = 0x7f080095;
public static int Base_V7_Theme_AppCompat_Dialog = 0x7f080096;
public static int Base_V7_Theme_AppCompat_Light = 0x7f080097;
public static int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f080098;
public static int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f080099;
public static int Base_V7_Widget_AppCompat_EditText = 0x7f08009a;
public static int Base_Widget_AppCompat_ActionBar = 0x7f08009b;
public static int Base_Widget_AppCompat_ActionBar_Solid = 0x7f08009c;
public static int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f08009d;
public static int Base_Widget_AppCompat_ActionBar_TabText = 0x7f080054;
public static int Base_Widget_AppCompat_ActionBar_TabView = 0x7f080055;
public static int Base_Widget_AppCompat_ActionButton = 0x7f080056;
public static int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f080057;
public static int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f080058;
public static int Base_Widget_AppCompat_ActionMode = 0x7f08009e;
public static int Base_Widget_AppCompat_ActivityChooserView = 0x7f08009f;
public static int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f080016;
public static int Base_Widget_AppCompat_Button = 0x7f080059;
public static int Base_Widget_AppCompat_ButtonBar = 0x7f08005d;
public static int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0800a1;
public static int Base_Widget_AppCompat_Button_Borderless = 0x7f08005a;
public static int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f08005b;
public static int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0800a0;
public static int Base_Widget_AppCompat_Button_Colored = 0x7f080079;
public static int Base_Widget_AppCompat_Button_Small = 0x7f08005c;
public static int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f08005e;
public static int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f08005f;
public static int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0800a2;
public static int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f080000;
public static int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0800a3;
public static int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f080060;
public static int Base_Widget_AppCompat_EditText = 0x7f080017;
public static int Base_Widget_AppCompat_Light_ActionBar = 0x7f0800a4;
public static int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0800a5;
public static int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0800a6;
public static int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f080061;
public static int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f080062;
public static int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f080063;
public static int Base_Widget_AppCompat_Light_PopupMenu = 0x7f080064;
public static int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f080065;
public static int Base_Widget_AppCompat_ListPopupWindow = 0x7f080066;
public static int Base_Widget_AppCompat_ListView = 0x7f080067;
public static int Base_Widget_AppCompat_ListView_DropDown = 0x7f080068;
public static int Base_Widget_AppCompat_ListView_Menu = 0x7f080069;
public static int Base_Widget_AppCompat_PopupMenu = 0x7f08006a;
public static int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f08006b;
public static int Base_Widget_AppCompat_PopupWindow = 0x7f0800a7;
public static int Base_Widget_AppCompat_ProgressBar = 0x7f08000d;
public static int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f08000e;
public static int Base_Widget_AppCompat_RatingBar = 0x7f08006c;
public static int Base_Widget_AppCompat_SearchView = 0x7f0800a8;
public static int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0800a9;
public static int Base_Widget_AppCompat_Spinner = 0x7f08006d;
public static int Base_Widget_AppCompat_Spinner_Underlined = 0x7f08006e;
public static int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f08006f;
public static int Base_Widget_AppCompat_Toolbar = 0x7f0800aa;
public static int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f080070;
public static int CalendarDatePickerDialog = 0x7f0800ab;
public static int CalendarDatePickerStyle = 0x7f0800ac;
public static int DialogAnimationFade = 0x7f0800ad;
public static int DialogAnimationSlide = 0x7f0800ae;
public static int Platform_AppCompat = 0x7f08000f;
public static int Platform_AppCompat_Light = 0x7f080010;
public static int Platform_ThemeOverlay_AppCompat = 0x7f080071;
public static int Platform_ThemeOverlay_AppCompat_Dark = 0x7f080072;
public static int Platform_ThemeOverlay_AppCompat_Light = 0x7f080073;
public static int Platform_V11_AppCompat = 0x7f080011;
public static int Platform_V11_AppCompat_Light = 0x7f080012;
public static int Platform_V14_AppCompat = 0x7f080019;
public static int Platform_V14_AppCompat_Light = 0x7f08001a;
public static int Platform_Widget_AppCompat_Spinner = 0x7f080013;
public static int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f080020;
public static int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f080021;
public static int RtlOverlay_Widget_AppCompat_ActionButton_Overflow = 0x7f080022;
public static int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f080023;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f080024;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f080025;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f080026;
public static int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f08002c;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f080027;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f080028;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f080029;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f08002a;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f08002b;
public static int SpinnerDatePickerDialog = 0x7f0800af;
public static int SpinnerDatePickerStyle = 0x7f0800b0;
public static int TextAppearance_AppCompat = 0x7f0800b1;
public static int TextAppearance_AppCompat_Body1 = 0x7f0800b2;
public static int TextAppearance_AppCompat_Body2 = 0x7f0800b3;
public static int TextAppearance_AppCompat_Button = 0x7f0800b4;
public static int TextAppearance_AppCompat_Caption = 0x7f0800b5;
public static int TextAppearance_AppCompat_Display1 = 0x7f0800b6;
public static int TextAppearance_AppCompat_Display2 = 0x7f0800b7;
public static int TextAppearance_AppCompat_Display3 = 0x7f0800b8;
public static int TextAppearance_AppCompat_Display4 = 0x7f0800b9;
public static int TextAppearance_AppCompat_Headline = 0x7f0800ba;
public static int TextAppearance_AppCompat_Inverse = 0x7f0800bb;
public static int TextAppearance_AppCompat_Large = 0x7f0800bc;
public static int TextAppearance_AppCompat_Large_Inverse = 0x7f0800bd;
public static int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0800be;
public static int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0800bf;
public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0800c0;
public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0800c1;
public static int TextAppearance_AppCompat_Medium = 0x7f0800c2;
public static int TextAppearance_AppCompat_Medium_Inverse = 0x7f0800c3;
public static int TextAppearance_AppCompat_Menu = 0x7f0800c4;
public static int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0800c5;
public static int TextAppearance_AppCompat_SearchResult_Title = 0x7f0800c6;
public static int TextAppearance_AppCompat_Small = 0x7f0800c7;
public static int TextAppearance_AppCompat_Small_Inverse = 0x7f0800c8;
public static int TextAppearance_AppCompat_Subhead = 0x7f0800c9;
public static int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0800ca;
public static int TextAppearance_AppCompat_Title = 0x7f0800cb;
public static int TextAppearance_AppCompat_Title_Inverse = 0x7f0800cc;
public static int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0800cd;
public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0800ce;
public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0800cf;
public static int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0800d0;
public static int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0800d1;
public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0800d2;
public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0800d3;
public static int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0800d4;
public static int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0800d5;
public static int TextAppearance_AppCompat_Widget_Button = 0x7f0800d6;
public static int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0800d7;
public static int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0800d8;
public static int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0800d9;
public static int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0800da;
public static int TextAppearance_AppCompat_Widget_Switch = 0x7f0800db;
public static int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0800dc;
public static int TextAppearance_StatusBar_EventContent = 0x7f08001b;
public static int TextAppearance_StatusBar_EventContent_Info = 0x7f08001c;
public static int TextAppearance_StatusBar_EventContent_Line2 = 0x7f08001d;
public static int TextAppearance_StatusBar_EventContent_Time = 0x7f08001e;
public static int TextAppearance_StatusBar_EventContent_Title = 0x7f08001f;
public static int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0800dd;
public static int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0800de;
public static int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0800df;
public static int Theme = 0x7f0800e0;
public static int ThemeOverlay_AppCompat = 0x7f0800f6;
public static int ThemeOverlay_AppCompat_ActionBar = 0x7f0800f7;
public static int ThemeOverlay_AppCompat_Dark = 0x7f0800f8;
public static int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0800f9;
public static int ThemeOverlay_AppCompat_Light = 0x7f0800fa;
public static int Theme_AppCompat = 0x7f0800e1;
public static int Theme_AppCompat_CompactMenu = 0x7f0800e2;
public static int Theme_AppCompat_Dialog = 0x7f0800e3;
public static int Theme_AppCompat_DialogWhenLarge = 0x7f0800e6;
public static int Theme_AppCompat_Dialog_Alert = 0x7f0800e4;
public static int Theme_AppCompat_Dialog_MinWidth = 0x7f0800e5;
public static int Theme_AppCompat_Light = 0x7f0800e7;
public static int Theme_AppCompat_Light_DarkActionBar = 0x7f0800e8;
public static int Theme_AppCompat_Light_Dialog = 0x7f0800e9;
public static int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0800ec;
public static int Theme_AppCompat_Light_Dialog_Alert = 0x7f0800ea;
public static int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0800eb;
public static int Theme_AppCompat_Light_NoActionBar = 0x7f0800ed;
public static int Theme_AppCompat_NoActionBar = 0x7f0800ee;
public static int Theme_Catalyst = 0x7f0800ef;
public static int Theme_Catalyst_RedBox = 0x7f0800f0;
public static int Theme_FullScreenDialog = 0x7f0800f1;
public static int Theme_FullScreenDialogAnimatedFade = 0x7f0800f2;
public static int Theme_FullScreenDialogAnimatedSlide = 0x7f0800f3;
public static int Theme_ReactNative_AppCompat_Light = 0x7f0800f4;
public static int Theme_ReactNative_AppCompat_Light_NoActionBar_FullScreen = 0x7f0800f5;
public static int Widget_AppCompat_ActionBar = 0x7f0800fb;
public static int Widget_AppCompat_ActionBar_Solid = 0x7f0800fc;
public static int Widget_AppCompat_ActionBar_TabBar = 0x7f0800fd;
public static int Widget_AppCompat_ActionBar_TabText = 0x7f0800fe;
public static int Widget_AppCompat_ActionBar_TabView = 0x7f0800ff;
public static int Widget_AppCompat_ActionButton = 0x7f080100;
public static int Widget_AppCompat_ActionButton_CloseMode = 0x7f080101;
public static int Widget_AppCompat_ActionButton_Overflow = 0x7f080102;
public static int Widget_AppCompat_ActionMode = 0x7f080103;
public static int Widget_AppCompat_ActivityChooserView = 0x7f080104;
public static int Widget_AppCompat_AutoCompleteTextView = 0x7f080105;
public static int Widget_AppCompat_Button = 0x7f080106;
public static int Widget_AppCompat_ButtonBar = 0x7f08010c;
public static int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f08010d;
public static int Widget_AppCompat_Button_Borderless = 0x7f080107;
public static int Widget_AppCompat_Button_Borderless_Colored = 0x7f080108;
public static int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f080109;
public static int Widget_AppCompat_Button_Colored = 0x7f08010a;
public static int Widget_AppCompat_Button_Small = 0x7f08010b;
public static int Widget_AppCompat_CompoundButton_CheckBox = 0x7f08010e;
public static int Widget_AppCompat_CompoundButton_RadioButton = 0x7f08010f;
public static int Widget_AppCompat_CompoundButton_Switch = 0x7f080110;
public static int Widget_AppCompat_DrawerArrowToggle = 0x7f080111;
public static int Widget_AppCompat_DropDownItem_Spinner = 0x7f080112;
public static int Widget_AppCompat_EditText = 0x7f080113;
public static int Widget_AppCompat_Light_ActionBar = 0x7f080114;
public static int Widget_AppCompat_Light_ActionBar_Solid = 0x7f080115;
public static int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f080116;
public static int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f080117;
public static int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f080118;
public static int Widget_AppCompat_Light_ActionBar_TabText = 0x7f080119;
public static int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f08011a;
public static int Widget_AppCompat_Light_ActionBar_TabView = 0x7f08011b;
public static int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f08011c;
public static int Widget_AppCompat_Light_ActionButton = 0x7f08011d;
public static int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f08011e;
public static int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f08011f;
public static int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f080120;
public static int Widget_AppCompat_Light_ActivityChooserView = 0x7f080121;
public static int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f080122;
public static int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f080123;
public static int Widget_AppCompat_Light_ListPopupWindow = 0x7f080124;
public static int Widget_AppCompat_Light_ListView_DropDown = 0x7f080125;
public static int Widget_AppCompat_Light_PopupMenu = 0x7f080126;
public static int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f080127;
public static int Widget_AppCompat_Light_SearchView = 0x7f080128;
public static int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f080129;
public static int Widget_AppCompat_ListPopupWindow = 0x7f08012a;
public static int Widget_AppCompat_ListView = 0x7f08012b;
public static int Widget_AppCompat_ListView_DropDown = 0x7f08012c;
public static int Widget_AppCompat_ListView_Menu = 0x7f08012d;
public static int Widget_AppCompat_PopupMenu = 0x7f08012e;
public static int Widget_AppCompat_PopupMenu_Overflow = 0x7f08012f;
public static int Widget_AppCompat_PopupWindow = 0x7f080130;
public static int Widget_AppCompat_ProgressBar = 0x7f080131;
public static int Widget_AppCompat_ProgressBar_Horizontal = 0x7f080132;
public static int Widget_AppCompat_RatingBar = 0x7f080133;
public static int Widget_AppCompat_SearchView = 0x7f080134;
public static int Widget_AppCompat_SearchView_ActionBar = 0x7f080135;
public static int Widget_AppCompat_Spinner = 0x7f080136;
public static int Widget_AppCompat_Spinner_DropDown = 0x7f080137;
public static int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f080138;
public static int Widget_AppCompat_Spinner_Underlined = 0x7f080139;
public static int Widget_AppCompat_TextView_SpinnerItem = 0x7f08013a;
public static int Widget_AppCompat_Toolbar = 0x7f08013b;
public static int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f08013c;
}
public static final class styleable {
public static int[] ActionBar = { 0x7f010001, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e, 0x7f01000f, 0x7f010010, 0x7f010011, 0x7f010012, 0x7f010013, 0x7f010014, 0x7f010015, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001a, 0x7f01001b, 0x7f010099 };
public static int[] ActionBarLayout = { 0x010100b3 };
public static int ActionBarLayout_android_layout_gravity = 0;
public static int ActionBar_background = 10;
public static int ActionBar_backgroundSplit = 12;
public static int ActionBar_backgroundStacked = 11;
public static int ActionBar_contentInsetEnd = 21;
public static int ActionBar_contentInsetLeft = 22;
public static int ActionBar_contentInsetRight = 23;
public static int ActionBar_contentInsetStart = 20;
public static int ActionBar_customNavigationLayout = 13;
public static int ActionBar_displayOptions = 3;
public static int ActionBar_divider = 9;
public static int ActionBar_elevation = 24;
public static int ActionBar_height = 0;
public static int ActionBar_hideOnContentScroll = 19;
public static int ActionBar_homeAsUpIndicator = 26;
public static int ActionBar_homeLayout = 14;
public static int ActionBar_icon = 7;
public static int ActionBar_indeterminateProgressStyle = 16;
public static int ActionBar_itemPadding = 18;
public static int ActionBar_logo = 8;
public static int ActionBar_navigationMode = 2;
public static int ActionBar_popupTheme = 25;
public static int ActionBar_progressBarPadding = 17;
public static int ActionBar_progressBarStyle = 15;
public static int ActionBar_subtitle = 4;
public static int ActionBar_subtitleTextStyle = 6;
public static int ActionBar_title = 1;
public static int ActionBar_titleTextStyle = 5;
public static int[] ActionMenuItemView = { 0x0101013f };
public static int ActionMenuItemView_android_minWidth = 0;
public static int[] ActionMenuView = { };
public static int[] ActionMode = { 0x7f010001, 0x7f010007, 0x7f010008, 0x7f01000c, 0x7f01000e, 0x7f01001c };
public static int ActionMode_background = 3;
public static int ActionMode_backgroundSplit = 4;
public static int ActionMode_closeItemLayout = 5;
public static int ActionMode_height = 0;
public static int ActionMode_subtitleTextStyle = 2;
public static int ActionMode_titleTextStyle = 1;
public static int[] ActivityChooserView = { 0x7f01001d, 0x7f01001e };
public static int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
public static int ActivityChooserView_initialActivityCount = 0;
public static int[] AlertDialog = { 0x010100f2, 0x7f01001f, 0x7f010020, 0x7f010021, 0x7f010022, 0x7f010023 };
public static int AlertDialog_android_layout = 0;
public static int AlertDialog_buttonPanelSideLayout = 1;
public static int AlertDialog_listItemLayout = 5;
public static int AlertDialog_listLayout = 2;
public static int AlertDialog_multiChoiceItemLayout = 3;
public static int AlertDialog_singleChoiceItemLayout = 4;
public static int[] AppCompatTextView = { 0x01010034, 0x7f010024 };
public static int AppCompatTextView_android_textAppearance = 0;
public static int AppCompatTextView_textAllCaps = 1;
public static int[] CompoundButton = { 0x01010107, 0x7f010025, 0x7f010026 };
public static int CompoundButton_android_button = 0;
public static int CompoundButton_buttonTint = 1;
public static int CompoundButton_buttonTintMode = 2;
public static int[] DrawerArrowToggle = { 0x7f010027, 0x7f010028, 0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c, 0x7f01002d, 0x7f01002e };
public static int DrawerArrowToggle_arrowHeadLength = 4;
public static int DrawerArrowToggle_arrowShaftLength = 5;
public static int DrawerArrowToggle_barLength = 6;
public static int DrawerArrowToggle_color = 0;
public static int DrawerArrowToggle_drawableSize = 2;
public static int DrawerArrowToggle_gapBetweenBars = 3;
public static int DrawerArrowToggle_spinBars = 1;
public static int DrawerArrowToggle_thickness = 7;
public static int[] GenericDraweeHierarchy = { 0x7f01002f, 0x7f010030, 0x7f010031, 0x7f010032, 0x7f010033, 0x7f010034, 0x7f010035, 0x7f010036, 0x7f010037, 0x7f010038, 0x7f010039, 0x7f01003a, 0x7f01003b, 0x7f01003c, 0x7f01003d, 0x7f01003e, 0x7f01003f, 0x7f010040, 0x7f010041, 0x7f010042, 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047 };
public static int GenericDraweeHierarchy_actualImageScaleType = 11;
public static int GenericDraweeHierarchy_backgroundImage = 12;
public static int GenericDraweeHierarchy_fadeDuration = 0;
public static int GenericDraweeHierarchy_failureImage = 6;
public static int GenericDraweeHierarchy_failureImageScaleType = 7;
public static int GenericDraweeHierarchy_overlayImage = 13;
public static int GenericDraweeHierarchy_placeholderImage = 2;
public static int GenericDraweeHierarchy_placeholderImageScaleType = 3;
public static int GenericDraweeHierarchy_pressedStateOverlayImage = 14;
public static int GenericDraweeHierarchy_progressBarAutoRotateInterval = 10;
public static int GenericDraweeHierarchy_progressBarImage = 8;
public static int GenericDraweeHierarchy_progressBarImageScaleType = 9;
public static int GenericDraweeHierarchy_retryImage = 4;
public static int GenericDraweeHierarchy_retryImageScaleType = 5;
public static int GenericDraweeHierarchy_roundAsCircle = 15;
public static int GenericDraweeHierarchy_roundBottomLeft = 20;
public static int GenericDraweeHierarchy_roundBottomRight = 19;
public static int GenericDraweeHierarchy_roundTopLeft = 17;
public static int GenericDraweeHierarchy_roundTopRight = 18;
public static int GenericDraweeHierarchy_roundWithOverlayColor = 21;
public static int GenericDraweeHierarchy_roundedCornerRadius = 16;
public static int GenericDraweeHierarchy_roundingBorderColor = 23;
public static int GenericDraweeHierarchy_roundingBorderPadding = 24;
public static int GenericDraweeHierarchy_roundingBorderWidth = 22;
public static int GenericDraweeHierarchy_viewAspectRatio = 1;
public static int[] LinearLayoutCompat = { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x7f01000b, 0x7f010048, 0x7f010049, 0x7f01004a };
public static int[] LinearLayoutCompat_Layout = { 0x010100b3, 0x010100f4, 0x010100f5, 0x01010181 };
public static int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static int LinearLayoutCompat_Layout_android_layout_height = 2;
public static int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static int LinearLayoutCompat_Layout_android_layout_width = 1;
public static int LinearLayoutCompat_android_baselineAligned = 2;
public static int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static int LinearLayoutCompat_android_gravity = 0;
public static int LinearLayoutCompat_android_orientation = 1;
public static int LinearLayoutCompat_android_weightSum = 4;
public static int LinearLayoutCompat_divider = 5;
public static int LinearLayoutCompat_dividerPadding = 8;
public static int LinearLayoutCompat_measureWithLargestChild = 6;
public static int LinearLayoutCompat_showDividers = 7;
public static int[] ListPopupWindow = { 0x010102ac, 0x010102ad };
public static int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 };
public static int MenuGroup_android_checkableBehavior = 5;
public static int MenuGroup_android_enabled = 0;
public static int MenuGroup_android_id = 1;
public static int MenuGroup_android_menuCategory = 3;
public static int MenuGroup_android_orderInCategory = 4;
public static int MenuGroup_android_visible = 2;
public static int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f01004b, 0x7f01004c, 0x7f01004d, 0x7f01004e };
public static int MenuItem_actionLayout = 14;
public static int MenuItem_actionProviderClass = 16;
public static int MenuItem_actionViewClass = 15;
public static int MenuItem_android_alphabeticShortcut = 9;
public static int MenuItem_android_checkable = 11;
public static int MenuItem_android_checked = 3;
public static int MenuItem_android_enabled = 1;
public static int MenuItem_android_icon = 0;
public static int MenuItem_android_id = 2;
public static int MenuItem_android_menuCategory = 5;
public static int MenuItem_android_numericShortcut = 10;
public static int MenuItem_android_onClick = 12;
public static int MenuItem_android_orderInCategory = 6;
public static int MenuItem_android_title = 7;
public static int MenuItem_android_titleCondensed = 8;
public static int MenuItem_android_visible = 4;
public static int MenuItem_showAsAction = 13;
public static int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x7f01004f };
public static int MenuView_android_headerBackground = 4;
public static int MenuView_android_horizontalDivider = 2;
public static int MenuView_android_itemBackground = 5;
public static int MenuView_android_itemIconDisabledAlpha = 6;
public static int MenuView_android_itemTextAppearance = 1;
public static int MenuView_android_verticalDivider = 3;
public static int MenuView_android_windowAnimationStyle = 0;
public static int MenuView_preserveIconSpacing = 7;
public static int[] PopupWindow = { 0x01010176, 0x7f010050 };
public static int[] PopupWindowBackgroundState = { 0x7f010051 };
public static int PopupWindowBackgroundState_state_above_anchor = 0;
public static int PopupWindow_android_popupBackground = 0;
public static int PopupWindow_overlapAnchor = 1;
public static int[] RecyclerView = { 0x010100c4, 0x7f010052, 0x7f010053, 0x7f010054, 0x7f010055 };
public static int RecyclerView_android_orientation = 0;
public static int RecyclerView_layoutManager = 1;
public static int RecyclerView_reverseLayout = 3;
public static int RecyclerView_spanCount = 2;
public static int RecyclerView_stackFromEnd = 4;
public static int[] SearchView = { 0x010100da, 0x0101011f, 0x01010220, 0x01010264, 0x7f010056, 0x7f010057, 0x7f010058, 0x7f010059, 0x7f01005a, 0x7f01005b, 0x7f01005c, 0x7f01005d, 0x7f01005e, 0x7f01005f, 0x7f010060, 0x7f010061, 0x7f010062 };
public static int SearchView_android_focusable = 0;
public static int SearchView_android_imeOptions = 3;
public static int SearchView_android_inputType = 2;
public static int SearchView_android_maxWidth = 1;
public static int SearchView_closeIcon = 8;
public static int SearchView_commitIcon = 13;
public static int SearchView_defaultQueryHint = 7;
public static int SearchView_goIcon = 9;
public static int SearchView_iconifiedByDefault = 5;
public static int SearchView_layout = 4;
public static int SearchView_queryBackground = 15;
public static int SearchView_queryHint = 6;
public static int SearchView_searchHintIcon = 11;
public static int SearchView_searchIcon = 10;
public static int SearchView_submitBackground = 16;
public static int SearchView_suggestionRowLayout = 14;
public static int SearchView_voiceIcon = 12;
public static int[] SimpleDraweeView = { 0x7f010063 };
public static int SimpleDraweeView_actualImageUri = 0;
public static int[] Spinner = { 0x01010176, 0x0101017b, 0x01010262, 0x7f01001b };
public static int Spinner_android_dropDownWidth = 2;
public static int Spinner_android_popupBackground = 0;
public static int Spinner_android_prompt = 1;
public static int Spinner_popupTheme = 3;
public static int[] SwitchCompat = { 0x01010124, 0x01010125, 0x01010142, 0x7f010064, 0x7f010065, 0x7f010066, 0x7f010067, 0x7f010068, 0x7f010069, 0x7f01006a };
public static int SwitchCompat_android_textOff = 1;
public static int SwitchCompat_android_textOn = 0;
public static int SwitchCompat_android_thumb = 2;
public static int SwitchCompat_showText = 9;
public static int SwitchCompat_splitTrack = 8;
public static int SwitchCompat_switchMinWidth = 6;
public static int SwitchCompat_switchPadding = 7;
public static int SwitchCompat_switchTextAppearance = 5;
public static int SwitchCompat_thumbTextPadding = 4;
public static int SwitchCompat_track = 3;
public static int[] TextAppearance = { 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x01010161, 0x01010162, 0x01010163, 0x01010164, 0x7f010024 };
public static int TextAppearance_android_shadowColor = 4;
public static int TextAppearance_android_shadowDx = 5;
public static int TextAppearance_android_shadowDy = 6;
public static int TextAppearance_android_shadowRadius = 7;
public static int TextAppearance_android_textColor = 3;
public static int TextAppearance_android_textSize = 0;
public static int TextAppearance_android_textStyle = 2;
public static int TextAppearance_android_typeface = 1;
public static int TextAppearance_textAllCaps = 8;
public static int[] TextStyle = { 0x01010034, 0x01010095, 0x01010097, 0x01010098, 0x010100ab, 0x01010153, 0x0101015d, 0x01010161, 0x01010162, 0x01010163, 0x01010164 };
public static int TextStyle_android_ellipsize = 4;
public static int TextStyle_android_maxLines = 5;
public static int TextStyle_android_shadowColor = 7;
public static int TextStyle_android_shadowDx = 8;
public static int TextStyle_android_shadowDy = 9;
public static int TextStyle_android_shadowRadius = 10;
public static int TextStyle_android_singleLine = 6;
public static int TextStyle_android_textAppearance = 0;
public static int TextStyle_android_textColor = 3;
public static int TextStyle_android_textSize = 1;
public static int TextStyle_android_textStyle = 2;
public static int[] Theme = { 0x01010057, 0x010100ae, 0x7f01006b, 0x7f01006c, 0x7f01006d, 0x7f01006e, 0x7f01006f, 0x7f010070, 0x7f010071, 0x7f010072, 0x7f010073, 0x7f010074, 0x7f010075, 0x7f010076, 0x7f010077, 0x7f010078, 0x7f010079, 0x7f01007a, 0x7f01007b, 0x7f01007c, 0x7f01007d, 0x7f01007e, 0x7f01007f, 0x7f010080, 0x7f010081, 0x7f010082, 0x7f010083, 0x7f010084, 0x7f010085, 0x7f010086, 0x7f010087, 0x7f010088, 0x7f010089, 0x7f01008a, 0x7f01008b, 0x7f01008c, 0x7f01008d, 0x7f01008e, 0x7f01008f, 0x7f010090, 0x7f010091, 0x7f010092, 0x7f010093, 0x7f010094, 0x7f010095, 0x7f010096, 0x7f010097, 0x7f010098, 0x7f010099, 0x7f01009a, 0x7f01009b, 0x7f01009c, 0x7f01009d, 0x7f01009e, 0x7f01009f, 0x7f0100a0, 0x7f0100a1, 0x7f0100a2, 0x7f0100a3, 0x7f0100a4, 0x7f0100a5, 0x7f0100a6, 0x7f0100a7, 0x7f0100a8, 0x7f0100a9, 0x7f0100aa, 0x7f0100ab, 0x7f0100ac, 0x7f0100ad, 0x7f0100ae, 0x7f0100af, 0x7f0100b0, 0x7f0100b1, 0x7f0100b2, 0x7f0100b3, 0x7f0100b4, 0x7f0100b5, 0x7f0100b6, 0x7f0100b7, 0x7f0100b8, 0x7f0100b9, 0x7f0100ba, 0x7f0100bb, 0x7f0100bc, 0x7f0100bd, 0x7f0100be, 0x7f0100bf, 0x7f0100c0, 0x7f0100c1, 0x7f0100c2, 0x7f0100c3, 0x7f0100c4, 0x7f0100c5, 0x7f0100c6, 0x7f0100c7, 0x7f0100c8, 0x7f0100c9, 0x7f0100ca, 0x7f0100cb, 0x7f0100cc, 0x7f0100cd, 0x7f0100ce, 0x7f0100cf, 0x7f0100d0, 0x7f0100d1, 0x7f0100d2, 0x7f0100d3, 0x7f0100d4 };
public static int Theme_actionBarDivider = 23;
public static int Theme_actionBarItemBackground = 24;
public static int Theme_actionBarPopupTheme = 17;
public static int Theme_actionBarSize = 22;
public static int Theme_actionBarSplitStyle = 19;
public static int Theme_actionBarStyle = 18;
public static int Theme_actionBarTabBarStyle = 13;
public static int Theme_actionBarTabStyle = 12;
public static int Theme_actionBarTabTextStyle = 14;
public static int Theme_actionBarTheme = 20;
public static int Theme_actionBarWidgetTheme = 21;
public static int Theme_actionButtonStyle = 49;
public static int Theme_actionDropDownStyle = 45;
public static int Theme_actionMenuTextAppearance = 25;
public static int Theme_actionMenuTextColor = 26;
public static int Theme_actionModeBackground = 29;
public static int Theme_actionModeCloseButtonStyle = 28;
public static int Theme_actionModeCloseDrawable = 31;
public static int Theme_actionModeCopyDrawable = 33;
public static int Theme_actionModeCutDrawable = 32;
public static int Theme_actionModeFindDrawable = 37;
public static int Theme_actionModePasteDrawable = 34;
public static int Theme_actionModePopupWindowStyle = 39;
public static int Theme_actionModeSelectAllDrawable = 35;
public static int Theme_actionModeShareDrawable = 36;
public static int Theme_actionModeSplitBackground = 30;
public static int Theme_actionModeStyle = 27;
public static int Theme_actionModeWebSearchDrawable = 38;
public static int Theme_actionOverflowButtonStyle = 15;
public static int Theme_actionOverflowMenuStyle = 16;
public static int Theme_activityChooserViewStyle = 57;
public static int Theme_alertDialogButtonGroupStyle = 91;
public static int Theme_alertDialogCenterButtons = 92;
public static int Theme_alertDialogStyle = 90;
public static int Theme_alertDialogTheme = 93;
public static int Theme_android_windowAnimationStyle = 1;
public static int Theme_android_windowIsFloating = 0;
public static int Theme_autoCompleteTextViewStyle = 98;
public static int Theme_borderlessButtonStyle = 54;
public static int Theme_buttonBarButtonStyle = 51;
public static int Theme_buttonBarNegativeButtonStyle = 96;
public static int Theme_buttonBarNeutralButtonStyle = 97;
public static int Theme_buttonBarPositiveButtonStyle = 95;
public static int Theme_buttonBarStyle = 50;
public static int Theme_buttonStyle = 99;
public static int Theme_buttonStyleSmall = 100;
public static int Theme_checkboxStyle = 101;
public static int Theme_checkedTextViewStyle = 102;
public static int Theme_colorAccent = 83;
public static int Theme_colorButtonNormal = 87;
public static int Theme_colorControlActivated = 85;
public static int Theme_colorControlHighlight = 86;
public static int Theme_colorControlNormal = 84;
public static int Theme_colorPrimary = 81;
public static int Theme_colorPrimaryDark = 82;
public static int Theme_colorSwitchThumbNormal = 88;
public static int Theme_controlBackground = 89;
public static int Theme_dialogPreferredPadding = 43;
public static int Theme_dialogTheme = 42;
public static int Theme_dividerHorizontal = 56;
public static int Theme_dividerVertical = 55;
public static int Theme_dropDownListViewStyle = 73;
public static int Theme_dropdownListPreferredItemHeight = 46;
public static int Theme_editTextBackground = 63;
public static int Theme_editTextColor = 62;
public static int Theme_editTextStyle = 103;
public static int Theme_homeAsUpIndicator = 48;
public static int Theme_listChoiceBackgroundIndicator = 80;
public static int Theme_listDividerAlertDialog = 44;
public static int Theme_listPopupWindowStyle = 74;
public static int Theme_listPreferredItemHeight = 68;
public static int Theme_listPreferredItemHeightLarge = 70;
public static int Theme_listPreferredItemHeightSmall = 69;
public static int Theme_listPreferredItemPaddingLeft = 71;
public static int Theme_listPreferredItemPaddingRight = 72;
public static int Theme_panelBackground = 77;
public static int Theme_panelMenuListTheme = 79;
public static int Theme_panelMenuListWidth = 78;
public static int Theme_popupMenuStyle = 60;
public static int Theme_popupWindowStyle = 61;
public static int Theme_radioButtonStyle = 104;
public static int Theme_ratingBarStyle = 105;
public static int Theme_searchViewStyle = 67;
public static int Theme_selectableItemBackground = 52;
public static int Theme_selectableItemBackgroundBorderless = 53;
public static int Theme_spinnerDropDownItemStyle = 47;
public static int Theme_spinnerStyle = 106;
public static int Theme_switchStyle = 107;
public static int Theme_textAppearanceLargePopupMenu = 40;
public static int Theme_textAppearanceListItem = 75;
public static int Theme_textAppearanceListItemSmall = 76;
public static int Theme_textAppearanceSearchResultSubtitle = 65;
public static int Theme_textAppearanceSearchResultTitle = 64;
public static int Theme_textAppearanceSmallPopupMenu = 41;
public static int Theme_textColorAlertDialogListItem = 94;
public static int Theme_textColorSearchUrl = 66;
public static int Theme_toolbarNavigationButtonStyle = 59;
public static int Theme_toolbarStyle = 58;
public static int Theme_windowActionBar = 2;
public static int Theme_windowActionBarOverlay = 4;
public static int Theme_windowActionModeOverlay = 5;
public static int Theme_windowFixedHeightMajor = 9;
public static int Theme_windowFixedHeightMinor = 7;
public static int Theme_windowFixedWidthMajor = 6;
public static int Theme_windowFixedWidthMinor = 8;
public static int Theme_windowMinWidthMajor = 10;
public static int Theme_windowMinWidthMinor = 11;
public static int Theme_windowNoTitle = 3;
public static int[] Toolbar = { 0x010100af, 0x01010140, 0x7f010003, 0x7f010006, 0x7f01000a, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001b, 0x7f0100d5, 0x7f0100d6, 0x7f0100d7, 0x7f0100d8, 0x7f0100d9, 0x7f0100da, 0x7f0100db, 0x7f0100dc, 0x7f0100dd, 0x7f0100de, 0x7f0100df, 0x7f0100e0, 0x7f0100e1, 0x7f0100e2, 0x7f0100e3 };
public static int Toolbar_android_gravity = 0;
public static int Toolbar_android_minHeight = 1;
public static int Toolbar_collapseContentDescription = 19;
public static int Toolbar_collapseIcon = 18;
public static int Toolbar_contentInsetEnd = 6;
public static int Toolbar_contentInsetLeft = 7;
public static int Toolbar_contentInsetRight = 8;
public static int Toolbar_contentInsetStart = 5;
public static int Toolbar_logo = 4;
public static int Toolbar_logoDescription = 22;
public static int Toolbar_maxButtonHeight = 17;
public static int Toolbar_navigationContentDescription = 21;
public static int Toolbar_navigationIcon = 20;
public static int Toolbar_popupTheme = 9;
public static int Toolbar_subtitle = 3;
public static int Toolbar_subtitleTextAppearance = 11;
public static int Toolbar_subtitleTextColor = 24;
public static int Toolbar_title = 2;
public static int Toolbar_titleMarginBottom = 16;
public static int Toolbar_titleMarginEnd = 14;
public static int Toolbar_titleMarginStart = 13;
public static int Toolbar_titleMarginTop = 15;
public static int Toolbar_titleMargins = 12;
public static int Toolbar_titleTextAppearance = 10;
public static int Toolbar_titleTextColor = 23;
public static int[] View = { 0x01010000, 0x010100da, 0x7f0100e4, 0x7f0100e5, 0x7f0100e6 };
public static int[] ViewBackgroundHelper = { 0x010100d4, 0x7f0100e7, 0x7f0100e8 };
public static int ViewBackgroundHelper_android_background = 0;
public static int ViewBackgroundHelper_backgroundTint = 1;
public static int ViewBackgroundHelper_backgroundTintMode = 2;
public static int[] ViewStubCompat = { 0x010100d0, 0x010100f2, 0x010100f3 };
public static int ViewStubCompat_android_id = 0;
public static int ViewStubCompat_android_inflatedId = 2;
public static int ViewStubCompat_android_layout = 1;
public static int View_android_focusable = 1;
public static int View_android_theme = 0;
public static int View_paddingEnd = 3;
public static int View_paddingStart = 2;
public static int View_theme = 4;
}
public static final class xml {
public static int preferences = 0x7f050000;
}
}
| [
"zhangk005@foresealife.com"
] | zhangk005@foresealife.com |
2cd8e0f297d4ef8a47be6d59e76d2a124d1e0d27 | dd594364562b8c4136d0d546981336927150fd66 | /src/main/java/com/masson/cursomc/services/DBService.java | b205d2845a71b9aeecf7b82eb602d7ad7a9020d5 | [] | no_license | gmalves/cursomc | 6addc833c9216a663a49c069821742032f211f39 | 1d9c659e6439f2a0733f28a94ef42fef85860ca2 | refs/heads/master | 2020-03-27T00:38:47.232127 | 2019-02-05T21:33:25 | 2019-02-05T21:33:25 | 145,641,803 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,282 | java | package com.masson.cursomc.services;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.masson.cursomc.domain.Categoria;
import com.masson.cursomc.domain.Cidade;
import com.masson.cursomc.domain.Cliente;
import com.masson.cursomc.domain.Endereco;
import com.masson.cursomc.domain.Estado;
import com.masson.cursomc.domain.ItemPedido;
import com.masson.cursomc.domain.Pagamento;
import com.masson.cursomc.domain.PagamentoComBoleto;
import com.masson.cursomc.domain.PagamentoComCartao;
import com.masson.cursomc.domain.Pedido;
import com.masson.cursomc.domain.Produto;
import com.masson.cursomc.domain.enums.EstadoPagamento;
import com.masson.cursomc.domain.enums.TipoCliente;
import com.masson.cursomc.repositories.CategoriaRepository;
import com.masson.cursomc.repositories.CidadeRepository;
import com.masson.cursomc.repositories.ClienteRepository;
import com.masson.cursomc.repositories.EnderecoRepository;
import com.masson.cursomc.repositories.EstadoRepository;
import com.masson.cursomc.repositories.ItemPedidoRepository;
import com.masson.cursomc.repositories.PagamentoRepository;
import com.masson.cursomc.repositories.PedidoRepository;
import com.masson.cursomc.repositories.ProdutoRepository;
@Service
public class DBService {
@Autowired
private CategoriaRepository categoriaRepository;
@Autowired
private ProdutoRepository produtoRepository;
@Autowired
private EstadoRepository estadoRepository;
@Autowired
private CidadeRepository cidadeRepository;
@Autowired
private ClienteRepository clienteRepository;
@Autowired
private EnderecoRepository enderecoRepository;
@Autowired
private PagamentoRepository pagamentoRepository;
@Autowired
private PedidoRepository pedidoRepository;
@Autowired
private ItemPedidoRepository itemPedidoRepository;
public void instantiateTestDatabase() throws ParseException {
Categoria cat1 = new Categoria(null, "Informática");
Categoria cat2 = new Categoria(null, "Escritório");
Categoria cat3 = new Categoria(null, "Cama mesa e banho");
Categoria cat4 = new Categoria(null, "Eletrônicos");
Categoria cat5 = new Categoria(null, "Jardinagem");
Categoria cat6 = new Categoria(null, "Decoração");
Categoria cat7 = new Categoria(null, "Perfumaria");
Produto p1 = new Produto(null, "Computador", 2000.00);
Produto p2 = new Produto(null, "Impressora", 800.00);
Produto p3 = new Produto(null, "Mouse", 80.00);
Produto p4 = new Produto(null, "Mesa de escritório", 300.00);
Produto p5 = new Produto(null, "Toalha", 50.00);
Produto p6 = new Produto(null, "Colcha", 200.00);
Produto p7 = new Produto(null, "TV true color", 1200.00);
Produto p8 = new Produto(null, "Roçadeira", 800.00);
Produto p9 = new Produto(null, "Abajour", 100.00);
Produto p10 = new Produto(null, "Pendente", 180.00);
Produto p11 = new Produto(null, "Shampoo", 90.00);
cat1.getProdutos().addAll(Arrays.asList(p1, p2, p3));
cat2.getProdutos().addAll(Arrays.asList(p2, p4));
cat3.getProdutos().addAll(Arrays.asList(p5, p6));
cat4.getProdutos().addAll(Arrays.asList(p1, p2, p3, p7));
cat5.getProdutos().addAll(Arrays.asList(p8));
cat6.getProdutos().addAll(Arrays.asList(p9, p10));
cat7.getProdutos().addAll(Arrays.asList(p11));
p1.getCategorias().addAll(Arrays.asList(cat1, cat4));
p2.getCategorias().addAll(Arrays.asList(cat1, cat2, cat4));
p3.getCategorias().addAll(Arrays.asList(cat1, cat4));
p4.getCategorias().addAll(Arrays.asList(cat2));
p5.getCategorias().addAll(Arrays.asList(cat3));
p6.getCategorias().addAll(Arrays.asList(cat3));
p7.getCategorias().addAll(Arrays.asList(cat4));
p8.getCategorias().addAll(Arrays.asList(cat5));
p9.getCategorias().addAll(Arrays.asList(cat6));
p10.getCategorias().addAll(Arrays.asList(cat6));
p11.getCategorias().addAll(Arrays.asList(cat7));
categoriaRepository.saveAll(Arrays.asList(cat1, cat2, cat3, cat4, cat5, cat6, cat7));
produtoRepository.saveAll(Arrays.asList(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11));
Estado est1 = new Estado(null, "Minas Gerais");
Estado est2 = new Estado(null, "São Paulo");
Cidade c1 = new Cidade(null, "Uberlandia", est1);
Cidade c2 = new Cidade(null, "São Paulo", est2);
Cidade c3 = new Cidade(null, "Campinas", est2);
est1.getCidades().addAll(Arrays.asList(c1));
est2.getCidades().addAll(Arrays.asList(c2, c3));
estadoRepository.saveAll(Arrays.asList(est1, est2));
cidadeRepository.saveAll(Arrays.asList(c1, c2, c3));
Cliente cli1 = new Cliente(null, "Maria Sílva", "maria@gmail.com", "36378912377", TipoCliente.PESSOAFISICA);
cli1.getTelefones().addAll(Arrays.asList(27363323, 93838393));
Endereco e1 = new Endereco(null, "Rua Flores", "300", "Apto 303", "Jardim", "38110834", cli1, c1);
Endereco e2 = new Endereco(null, "Avenida Matos", "105", "Sala 800", "Centro", "38777012", cli1, c2);
cli1.getEnderecos().addAll(Arrays.asList(e1, e2));
clienteRepository.saveAll(Arrays.asList(cli1));
enderecoRepository.saveAll(Arrays.asList(e1, e2));
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm");
Pedido ped1 = new Pedido(null, sdf.parse("30/09/2017 10:32"), cli1, e1);
Pedido ped2 = new Pedido(null, sdf.parse("10/10/2017 19:35"), cli1, e2);
Pagamento pagto1 = new PagamentoComCartao(null, EstadoPagamento.QUITADO, ped1, 6);
ped1.setPagamento(pagto1);
Pagamento pagto2 = new PagamentoComBoleto(null, EstadoPagamento.PENDENTE, ped2, sdf.parse("20/10/2017 00:00"),
null);
ped2.setPagamento(pagto2);
cli1.getPedidos().addAll(Arrays.asList(ped1, ped2));
pedidoRepository.saveAll(Arrays.asList(ped1, ped2));
pagamentoRepository.saveAll(Arrays.asList(pagto1, pagto2));
ItemPedido ip1 = new ItemPedido(ped1, p1, 0.00, 1, 2000.00);
ItemPedido ip2 = new ItemPedido(ped1, p3, 0.00, 2, 80.00);
ItemPedido ip3 = new ItemPedido(ped2, p2, 100.00, 1, 800.00);
ped1.getItens().addAll(Arrays.asList(ip1, ip2));
ped2.getItens().addAll(Arrays.asList(ip3));
p1.getItens().addAll(Arrays.asList(ip1));
p2.getItens().addAll(Arrays.asList(ip3));
p3.getItens().addAll(Arrays.asList(ip2));
itemPedidoRepository.saveAll(Arrays.asList(ip1, ip2, ip3));
}
}
| [
"massonalves@hotmail.com"
] | massonalves@hotmail.com |
ae4c3bc2b5e0b725badcbe7785b2c22bde16b632 | ea18bacd35815775195547fd748d496833770724 | /src/JAM/ADSLMonitor.java | bd1087151746aa7f45f8ea55e9df86fed9f4862b | [] | no_license | gizzi-dev/jam | 4e6c61e0720c4b37de518fea7707fef49de368e2 | 868972e5b9d28bd2067549892efa6589bc89aee1 | refs/heads/master | 2021-05-30T01:04:23.361011 | 2015-05-12T17:59:52 | 2015-05-12T17:59:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,760 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package JAM;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.MalformedURLException;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.util.TooManyListenersException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
/**
*
* @author Gianmarco
*/
public class ADSLMonitor extends JFrame implements ConsoleChangeListener{
private int port; // viene valorizzato solo quando l'utente clicca sul bottone "start reg"
private ADSLImpl adsl;
private boolean giaRegistrato;
// componenti grafici
private JLabel label;
private JLabel label2;
private JPanel panel;
private JPanel orizontale1;
private JPanel orizontale2;
private JPanel orizontale3;
private JPanel orizontale4;
private JPanel content;
private JPanel lateralPanelRight;
private JTextField portTextField;
private JButton startRegButton;
private JButton startAdslButton;
private JButton stopAdslButton;
private JButton exitButton;
private JTextArea console;
private JScrollPane scroll;
private JSeparator separatore;
public ADSLMonitor() {
super("Agent Direcotry Service Layer Monitor");
giaRegistrato = false;
label = new JLabel("Port:");
label2 = new JLabel("<html>Connection<br>console:</html>");
portTextField = new JTextField("1099",20);
startRegButton = new JButton("Start reg");
startAdslButton = new JButton("Start up");
stopAdslButton = new JButton("Shutdown");
exitButton = new JButton("Exit");
console = new JTextArea(25, 20);
console.setEditable(false);
separatore = new JSeparator();
scroll=new JScrollPane(console);
panel = new JPanel();
orizontale1 = new JPanel();
orizontale2 = new JPanel();
orizontale3 = new JPanel();
orizontale4 = new JPanel();
lateralPanelRight = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));
panel.add(orizontale1);
panel.add(orizontale2);
panel.add(orizontale3);
panel.add(orizontale4);
startRegButton.addActionListener(new buttonAction(this));
startAdslButton.addActionListener(new buttonAction(this));
stopAdslButton.addActionListener(new buttonAction(this));
exitButton.addActionListener(new buttonAction(this));
orizontale1.setLayout(new BoxLayout(orizontale1, BoxLayout.LINE_AXIS));
orizontale1.setBorder(new EmptyBorder(5,40,5,5));
orizontale1.add(label);
orizontale1.add(portTextField);
label.setBorder(new EmptyBorder(10,16,10,10));
orizontale1.add(startRegButton);
startRegButton.setMaximumSize(new Dimension(Integer.MAX_VALUE, startRegButton.getMinimumSize().height));
orizontale2.setLayout(new BoxLayout(orizontale2, BoxLayout.LINE_AXIS));
orizontale2.add(separatore);
orizontale2.setBorder(new EmptyBorder(0,50,0,50));
orizontale3.setLayout(new BoxLayout(orizontale3, BoxLayout.LINE_AXIS));
orizontale3.setBorder(new EmptyBorder(5,5,10,5));
orizontale3.add(label2);
label2.setBorder(new EmptyBorder(10,16,10,10));
orizontale3.add(scroll);
orizontale3.add(lateralPanelRight);
lateralPanelRight.setLayout(new BoxLayout(lateralPanelRight, BoxLayout.Y_AXIS));
lateralPanelRight.add(startAdslButton);
startAdslButton.setMaximumSize(new Dimension(Integer.MAX_VALUE, startAdslButton.getMinimumSize().height));
lateralPanelRight.add(stopAdslButton);
stopAdslButton.setMaximumSize(new Dimension(Integer.MAX_VALUE, stopAdslButton.getMinimumSize().height));
orizontale4.add(exitButton);
orizontale4.setLayout(new BoxLayout(orizontale4, BoxLayout.X_AXIS));
orizontale4.setBorder(new EmptyBorder(0,5,5,5));
exitButton.setMaximumSize(new Dimension(Integer.MAX_VALUE, exitButton.getMinimumSize().height));
add(panel);
setResizable(false);
pack();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void StartReg(ADSLMonitor a) {
if(!this.giaRegistrato){
port = Integer.parseInt(portTextField.getText());
try {
adsl = new ADSLImpl("adsl", port);
try {
adsl.addConsoleChangeListener(a);
} catch (TooManyListenersException ex) {
System.out.println(ex);
}
adsl.startRMIRegistry();
} catch (RemoteException ex) {
System.out.println(ex);
}
portTextField.setEditable(false);
giaRegistrato = true;
}
}
public void StartUp(){
if(this.giaRegistrato && this.adsl != null){
try {
adsl.startADSL();
} catch (RemoteException | MalformedURLException ex) {
System.out.println(ex);
}
}
}
public void shutDown(){
if(this.giaRegistrato && this.adsl != null){
try {
adsl.stopADSL();
} catch (RemoteException | NotBoundException | MalformedURLException ex) {
System.out.println(ex);
}
}
}
public void exit(){
System.exit(0);
}
public void ConsoleChange(ConsoleEvent evt) {
console.append("-->"+evt.getText()+"\n");
}
public static void main(String[] args) throws TooManyListenersException {
ADSLMonitor gui = new ADSLMonitor();
gui.setVisible(true);
}
}
class buttonAction implements ActionListener{
ADSLMonitor a;
public buttonAction(ADSLMonitor a){
this.a=a;
}
public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
if(command.equals("Start reg")) a.StartReg(a);
else if(command.equals("Start up"))a.StartUp();
else if(command.equals("Shutdown"))a.shutDown();
else if(command.equals("Exit")) a.exit();
}
}
| [
"Gianmarco@Gianmarco-PC.lan"
] | Gianmarco@Gianmarco-PC.lan |
5e9afddc082616f78d03ec2fdaf19eb4adbb7939 | 011a49cdf9d1cb7f2adec8bea7be5e49541e0c3c | /src/main/java/de/uniluebeck/iti/rteasy/frontend/ASTMemDecl.java | f83a038b8f58244d8ff97fa33b4c331d71df9d42 | [
"BSD-3-Clause"
] | permissive | iti-luebeck/RTeasy1 | e0db238f1bdc538c8fec7b5fc06f53093aa44f36 | 5bcd5b38002dc95d8f64640d3753af59a3a80ee3 | refs/heads/master | 2020-04-09T05:04:52.670437 | 2015-03-24T14:43:28 | 2015-03-24T14:43:28 | 10,312,777 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,499 | java | /*
* Copyright (c) 2003-2013, University of Luebeck, Institute of Computer Engineering
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the University of Luebeck, the Institute of Computer
* Engineering nor the names of its contributors may be used to endorse or
* promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE UNIVERSITY OF LUEBECK OR THE INSTITUTE OF COMPUTER
* ENGINEERING BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
package de.uniluebeck.iti.rteasy.frontend;
import de.uniluebeck.iti.rteasy.kernel.Memory;
public class ASTMemDecl extends RTSimNode {
private String name, addrReg, dataReg;
private Memory memory = null;
public ASTMemDecl(int id) {super(id);}
public void setName(String s) {name = s;}
public String getName() { return name;}
public void setAddrReg(String s) { addrReg = s;}
public String getAddrReg() { return addrReg; }
public void setDataReg(String s) { dataReg = s; }
public String getDataReg() { return dataReg; }
public void setMemory(Memory m) { memory = m; }
public Memory getMemory() { return memory; }
public String toString() {
return "memory "+name+" AddrReg: "+addrReg+" DataReg: "+dataReg;
}
}
| [
"forouher@iti.uni-luebeck.de"
] | forouher@iti.uni-luebeck.de |
e4bff942adf8d487254427440f290d9e4a0ab4ba | 43b8f3045b50d3e172bac70cead78d452155c7de | /src/Recursion/Factorial.java | 95126ab3a3f593482edfb120ca294ea92d0dc238 | [] | no_license | Nazhmadinova/FirstProject | bd1d9ecd7c0d4614f220b685de4a17bc58131424 | 51dc1b81ff4b9c666621c08646d705af93223a93 | refs/heads/tester2 | 2020-09-07T07:46:21.187444 | 2020-07-14T20:28:31 | 2020-07-14T20:28:31 | 220,709,871 | 0 | 0 | null | 2020-07-14T20:28:32 | 2019-11-09T22:07:47 | Java | UTF-8 | Java | false | false | 273 | java | package Recursion;
public class Factorial {
public static int fact(int num){
if(num == 1){
return 1;
}
return num * fact(num - 1);
}
public static void main(String[] args) {
System.out.println(fact(5));
}
}
| [
"nazhmadinovagn@gmail.com"
] | nazhmadinovagn@gmail.com |
f4525a1ce6dcc33c4bf82d34bd5d98b3da5b1ccc | cd314d79a2ff704b2b15d579315b21af41fb9ef5 | /app/src/main/java/com/yqx/mamajh/bean/ProdectItemEntity.java | ccf56fd59a2d7a0e1b7065ab4ba607782095e504 | [] | no_license | likeyizhi/mamajh | 8ba363755f9431561126f6e8887aa3234a6fe317 | 9e92d0f4eec74709943342e44a60819747c2068a | refs/heads/master | 2021-01-23T02:39:59.262330 | 2017-04-13T08:57:42 | 2017-04-13T08:57:42 | 86,013,678 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,642 | java | package com.yqx.mamajh.bean;
/**
* Created by young on 2017/3/7.
*/
public class ProdectItemEntity {
/**
* ID : 121
* Name : 完达山wondersun金装元乳婴儿配方奶粉1段(0-6个月)900g
* Number : 6902422060010
* Specifications :
* OPrice : 0.00
* Price : 0.00
* ScorePrice : 0
* ScoreOffset : 0.00
* ShopCount : 1
* MinPrice : 139.00
* MaxPrice : 139.00
* Img : http://182.92.183.143:8011/webimg/img_product/product/121.jpg
*/
private String ID;
private String Name;
private String Number;
private String Specifications;
private String OPrice;
private String Price;
private String ScorePrice;
private String ScoreOffset;
private String ShopCount;
private String MinPrice;
private String MaxPrice;
private String Img;
public String getID() {
return ID;
}
public void setID(String ID) {
this.ID = ID;
}
public String getName() {
return Name;
}
public void setName(String Name) {
this.Name = Name;
}
public String getNumber() {
return Number;
}
public void setNumber(String Number) {
this.Number = Number;
}
public String getSpecifications() {
return Specifications;
}
public void setSpecifications(String Specifications) {
this.Specifications = Specifications;
}
public String getOPrice() {
return OPrice;
}
public void setOPrice(String OPrice) {
this.OPrice = OPrice;
}
public String getPrice() {
return Price;
}
public void setPrice(String Price) {
this.Price = Price;
}
public String getScorePrice() {
return ScorePrice;
}
public void setScorePrice(String ScorePrice) {
this.ScorePrice = ScorePrice;
}
public String getScoreOffset() {
return ScoreOffset;
}
public void setScoreOffset(String ScoreOffset) {
this.ScoreOffset = ScoreOffset;
}
public String getShopCount() {
return ShopCount;
}
public void setShopCount(String ShopCount) {
this.ShopCount = ShopCount;
}
public String getMinPrice() {
return MinPrice;
}
public void setMinPrice(String MinPrice) {
this.MinPrice = MinPrice;
}
public String getMaxPrice() {
return MaxPrice;
}
public void setMaxPrice(String MaxPrice) {
this.MaxPrice = MaxPrice;
}
public String getImg() {
return Img;
}
public void setImg(String Img) {
this.Img = Img;
}
}
| [
"aaxxzzz@qq.com"
] | aaxxzzz@qq.com |
20846b18deba24fe4b9a63682b1fa60eb7a064a6 | f6bfff9b1707155a281ec5e8ecf6c03c36d74fa9 | /app/src/test/java/com/github/crazygit/androidxtestdemo/ExampleUnitTest.java | 7b102c6d8f3c0e7673301e87661ad4bbbdfb3914 | [] | no_license | crazygit/AndroidXTestDemo | df1d4fc8b54ec085cebf601925e14d78d9556e8b | 3e29e2634c28f36f5a76721223c5dc3a23b988fa | refs/heads/master | 2022-08-24T06:13:28.963380 | 2020-05-19T09:57:00 | 2020-05-19T10:13:56 | 265,210,828 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 397 | java | package com.github.crazygit.androidxtestdemo;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"lianglin999@gmail.com"
] | lianglin999@gmail.com |
56aa5dca76ac3d1e336736f98dc1af0ef094c2dd | e49a3d1268f5ba01381ad41737ea3e21aa62f2ca | /src/main/java/br/com/loja/modelo/DadosPessoais.java | 9db0c79e7178140afe39a2610bc28a4d8da5e94a | [] | no_license | jean-xavier/store-project-with-jpa | 15b6c6f0a6bcd40ffb0d64258d4918da791fea36 | bece3d3d1556d9d7049276641fb78b7d5599e1fa | refs/heads/main | 2023-06-25T16:14:25.924975 | 2021-07-24T01:57:55 | 2021-07-24T02:04:23 | 388,973,489 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 474 | java | package br.com.loja.modelo;
import java.io.Serializable;
import javax.persistence.Embeddable;
@Embeddable
public class DadosPessoais implements Serializable {
private static final long serialVersionUID = 1L;
private String nome;
private String cpf;
public DadosPessoais() {
}
public DadosPessoais(String nome, String cpf) {
this.nome = nome;
this.cpf = cpf;
}
public String getNome() {
return nome;
}
public String getCpf() {
return cpf;
}
}
| [
"jxs.jean@gmail.com"
] | jxs.jean@gmail.com |
1d58e81c5dad6836f3c79d14f06879fc1328189a | e53b3a3c79e4dd6fff49376c8c406fed3e3bcdd2 | /src/Day053P/Day05309클래스배열타자연습.java | 506dcae8587106f4181aa756e6bfef84e6042bf7 | [] | no_license | JQ-WCoding/JAVA-Coding | a257253b4991a381fd3c8d39df17333e090a589e | 764f52d1cc1135436a0b12eec88ada949b2c8c41 | refs/heads/master | 2023-03-21T20:10:49.991655 | 2021-03-17T09:12:10 | 2021-03-17T09:12:10 | 301,623,093 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,589 | java | package Day053P;
import java.util.Random;
import java.util.Scanner;
class Word {
Random random = new Random();
String word;
int ranPosition;
// 받은 단어 중 한 단어를 *로 표시하기 위한 메서드
public void setRandomWordPosition(String sample) {
word = sample;
ranPosition = random.nextInt(word.length());
}
// 한 자리를 *로 바꾼 단어를 출력하는 메서드
public void printWord() {
for (int i = 0; i < word.length(); i++) {
if (i == ranPosition) {
System.out.print("*");
} else {
System.out.print(word.charAt(i));
}
}
System.out.println();
}
}
class WordSample {
Random random = new Random();
String[] wordSampleList = {"java", "jsp", "python", "android", "spring"};
boolean[] checkList = new boolean[wordSampleList.length]; // 이미 선택한 단어 체크용
int count = wordSampleList.length;
public String getRandomWord() {
int r = 0;
while (true) {
r = random.nextInt(wordSampleList.length);
if (!checkList[r]) {
checkList[r] = true;
count--;
break;
}
}
return wordSampleList[r];
}
}
public class Day05309클래스배열타자연습 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
WordSample wordSample = new WordSample();
Word wordList = new Word();
boolean run = true;
long beforeTime = System.currentTimeMillis(); // 코드 실행 전에 시간 받아오기
while (run) {
// 단어 하나 보내기
wordList.setRandomWordPosition(wordSample.getRandomWord());
while (true) {
wordList.printWord();
System.out.print("단어를 입력하세요 : ");
String inputWord = scanner.next();
if (inputWord.equals(wordList.word)) {
System.out.println("정답입니다");
break;
} else {
System.out.println("땡");
}
}
if (wordSample.count == 0) {
long afterTime = System.currentTimeMillis();
double secDiffTime = (afterTime - beforeTime) / 1000.0;
System.out.println("기록 : " + secDiffTime + "초");
System.out.println("게임 종료");
break;
}
}
}
}
| [
"junlee06203652@gmail.com"
] | junlee06203652@gmail.com |
0ec6461cc02e6494b3cb0e1835b3058d2374f29e | bf141524c8b477a44fd8cb2d79cd2b5ca013c409 | /bagri-client/bagri-client-hazelcast/src/main/java/com/bagri/client/hazelcast/task/doc/DocumentsProvider.java | 4dbe3fc4ea6a831b1a718e54393ee5841aa34acc | [
"Apache-2.0"
] | permissive | dariagolub/bagri | 6f3e39f74c81b786b91c05afb337d2a418239e5f | 8718ec91feacbda32817c0b615323f3bae675406 | refs/heads/master | 2021-01-19T15:04:58.400194 | 2017-10-26T07:24:33 | 2017-10-26T07:24:33 | 100,942,600 | 0 | 0 | null | 2017-08-21T10:46:55 | 2017-08-21T10:46:55 | null | UTF-8 | Java | false | false | 1,302 | java | package com.bagri.client.hazelcast.task.doc;
import static com.bagri.client.hazelcast.serialize.TaskSerializationFactory.cli_ProvideDocumentsTask;
import java.io.IOException;
import java.util.Properties;
import java.util.concurrent.Callable;
import com.bagri.client.hazelcast.task.ContextAwareTask;
import com.bagri.core.api.DocumentAccessor;
import com.bagri.core.api.ResultCollection;
import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;
public class DocumentsProvider extends ContextAwareTask implements Callable<ResultCollection<DocumentAccessor>> {
protected String pattern;
public DocumentsProvider() {
super();
}
public DocumentsProvider(String clientId, long txId, Properties props, String pattern) {
super(clientId, txId, props);
this.pattern = pattern;
}
@Override
public ResultCollection<DocumentAccessor> call() throws Exception {
return null;
}
@Override
public int getId() {
return cli_ProvideDocumentsTask;
}
@Override
public void readData(ObjectDataInput in) throws IOException {
super.readData(in);
pattern = in.readUTF();
}
@Override
public void writeData(ObjectDataOutput out) throws IOException {
super.writeData(out);
out.writeUTF(pattern);
}
}
| [
"dsukhoroslov@gmail.com"
] | dsukhoroslov@gmail.com |
4938f1b266cbcaad3024c8964328d0b1ee5f3045 | 4004381cbf96b2aeabbf0c0f8196f4d436dce4d6 | /src/main/java/com/projectname/infrastucture/framework/security/config/SecurityConfig.java | 689ae03ba682c17f87e22fe2f5a66579785c6149 | [] | no_license | sauravMir/SpringSecurityWithMysqlDatabase | c616fb7831ef96fb762fd4d46721c2e97a374f1c | e945dfd6fcfedc52474f5a829fa6e6f26166bf4c | refs/heads/master | 2022-12-07T00:31:10.194381 | 2020-08-16T02:57:27 | 2020-08-16T02:57:27 | 271,801,018 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,776 | java | package com.projectname.infrastucture.framework.security.config;
import com.projectname.infrastucture.framework.security.provider.TokenAuthenticationProvider;
import com.projectname.infrastucture.presenter.user.NoRedirectStrategy;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.web.authentication.AnonymousAuthenticationFilter;
import org.springframework.security.web.authentication.HttpStatusEntryPoint;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import org.springframework.security.web.util.matcher.NegatedRequestMatcher;
import org.springframework.security.web.util.matcher.OrRequestMatcher;
import org.springframework.security.web.util.matcher.RequestMatcher;
import static java.util.Objects.requireNonNull;
import static org.springframework.http.HttpStatus.FORBIDDEN;
import static org.springframework.security.config.http.SessionCreationPolicy.STATELESS;
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled=true)
public class SecurityConfig extends WebSecurityConfigurerAdapter {
//FIXME I think these URLS should be in the model
private RequestMatcher PUBLIC_URLS = new
OrRequestMatcher(new AntPathRequestMatcher("/register"),
new AntPathRequestMatcher("/login"));//("/public/**"));
private RequestMatcher PROTECTED_URLS = new NegatedRequestMatcher(PUBLIC_URLS);
TokenAuthenticationProvider provider;
SecurityConfig(final TokenAuthenticationProvider provider) {
super();
this.provider = requireNonNull(provider);
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.authenticationProvider(provider);
}
@Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().requestMatchers(PUBLIC_URLS);
}
@Override
protected void configure(final HttpSecurity http) throws Exception {
http
.sessionManagement()
.sessionCreationPolicy(STATELESS)
.and()
.exceptionHandling()
// this entry point handles when you request a protected page and you are not yet
// authenticated
.defaultAuthenticationEntryPointFor(forbiddenEntryPoint(), PROTECTED_URLS)
.and()
.authenticationProvider(provider)
.addFilterBefore(restAuthenticationFilter(), AnonymousAuthenticationFilter.class)
.authorizeRequests()
.requestMatchers(PROTECTED_URLS)
.authenticated()
.and()
.csrf().disable()
.formLogin().disable()
.httpBasic().disable()
.logout().disable();
}
/**
* Disable Spring boot automatic filter registration.
*/
@Bean
FilterRegistrationBean disableAutoRegistration(final TokenAuthenticationFilter filter) {
final FilterRegistrationBean registration = new FilterRegistrationBean(filter);
registration.setEnabled(false);
return registration;
}
@Bean
SimpleUrlAuthenticationSuccessHandler successHandler() {
final SimpleUrlAuthenticationSuccessHandler successHandler = new SimpleUrlAuthenticationSuccessHandler();
successHandler.setRedirectStrategy(new NoRedirectStrategy());
return successHandler;
}
@Bean
TokenAuthenticationFilter restAuthenticationFilter() throws Exception {
final TokenAuthenticationFilter filter = new TokenAuthenticationFilter(PROTECTED_URLS);
filter.setAuthenticationManager(authenticationManager());
filter.setAuthenticationSuccessHandler(successHandler());
return filter;
}
@Bean
AuthenticationEntryPoint forbiddenEntryPoint() {
return new HttpStatusEntryPoint(FORBIDDEN);
}
}
| [
"saurav_41@yahoo.com"
] | saurav_41@yahoo.com |
03eac36fdd832130dc1382078b3c59edb0022186 | 36f7169565ef145533f44ca886fb84b8681982ac | /app/src/main/java/com/team/azusa/yiyuan/adapter/AddressLvAdapter.java | dcd1b0b04dcb98abd4f22505bec2c314362260dd | [] | no_license | baneyue/yiyuan | cd7b7f00909de09947d3a066d61a59dc97c0ef91 | 538b7c16057c5d627b5130428f71636c71f70b15 | refs/heads/master | 2020-04-29T10:12:34.731701 | 2017-03-13T10:22:56 | 2017-03-13T10:22:56 | 176,053,147 | 0 | 0 | null | 2019-03-17T03:46:47 | 2019-03-17T03:46:47 | null | UTF-8 | Java | false | false | 6,219 | java | package com.team.azusa.yiyuan.adapter;
import com.daimajia.swipe.adapters.BaseSwipeAdapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import com.daimajia.swipe.SwipeLayout;
import com.squareup.okhttp.Request;
import com.team.azusa.yiyuan.R;
import com.team.azusa.yiyuan.bean.AddressMessage;
import com.team.azusa.yiyuan.config.Config;
import com.team.azusa.yiyuan.utils.JsonUtils;
import com.team.azusa.yiyuan.utils.MyToast;
import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.callback.StringCallback;
import java.util.ArrayList;
import butterknife.Bind;
import butterknife.ButterKnife;
/**
* Created by Delete_exe on 2016/1/18.
*/
public class AddressLvAdapter extends BaseSwipeAdapter {
private Context context;
private ArrayList<AddressMessage> datas;
private ViewHolder holder;
public AddressLvAdapter(Context context, ArrayList<AddressMessage> datas) {
this.context = context;
this.datas = datas;
}
@Override
public int getSwipeLayoutResourceId(int position) {
return R.id.example;
}
@Override
public View generateView(int position, ViewGroup parent) {
final View view = View.inflate(context, R.layout.address_lv_item, null);
holder = new ViewHolder(view);
view.setTag(holder);
holder.swipeLayout.addSwipeListener(new SwipeLayout.SwipeListener() {
@Override
public void onStartOpen(SwipeLayout layout) {
view.setEnabled(false);
}
@Override
public void onOpen(SwipeLayout layout) {
view.setEnabled(true);
}
@Override
public void onStartClose(SwipeLayout layout) {
view.setEnabled(false);
}
@Override
public void onClose(SwipeLayout layout) {
view.setEnabled(true);
}
@Override
public void onUpdate(SwipeLayout layout, int leftOffset, int topOffset) {
}
@Override
public void onHandRelease(SwipeLayout layout, float xvel, float yvel) {
}
});
return view;
}
@Override
public void fillValues(final int position, View convertView) {
View.OnClickListener clicklistener = new View.OnClickListener() {
public void onClick(View v) {
switch (v.getId()) {
case R.id.bt_default_addr:
datas.get(position).setDefaults("1");
OkHttpUtils.post()
.url(Config.IP + "/yiyuan/user_modifyAddress")
.addParams("address", JsonUtils.getJsonStringformat(datas.get(position)))
.build().execute(new StringCallback() {
@Override
public void onError(Request request, Exception e) {
MyToast.showToast("设置出错");
}
@Override
public void onResponse(String response) {
holder.swipeLayout.toggle(false);
for (int i = 0; i < datas.size(); i++) {
datas.get(i).setDefaults("0");
}
datas.get(position).setDefaults("1");
notifyDataSetChanged();
}
});
break;
case R.id.bt_delete_addr:
OkHttpUtils.get()
.url(Config.IP + "/yiyuan/user_delUserAddress")
.addParams("id", datas.get(position).getId())
.build().execute(new StringCallback() {
@Override
public void onError(Request request, Exception e) {
MyToast.showToast("删除出错");
}
@Override
public void onResponse(String response) {
MyToast.showToast(response);
holder.swipeLayout.toggle(false);
datas.remove(position);
notifyDataSetChanged();
}
});
break;
}
}
};
holder = (ViewHolder) convertView.getTag();
holder.tvAddressUserInfo.setText(datas.get(position).getName() + " " + datas.get(position).getMobile());
holder.tvLvAddress.setText(datas.get(position).getRough() + " " + datas.get(position).getDatail());
holder.swipeLayout.setShowMode(SwipeLayout.ShowMode.LayDown);
holder.btDeleteAddr.setOnClickListener(clicklistener);
holder.btDefaultAddr.setOnClickListener(clicklistener);
if (datas.get(position).getDefaults().equals("1")) {
holder.imgaddressselect.setVisibility(View.VISIBLE);
} else {
holder.imgaddressselect.setVisibility(View.GONE);
}
}
@Override
public int getCount() {
return datas.size();
}
@Override
public Object getItem(int position) {
return datas.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
}
class ViewHolder {
@Bind(R.id.bt_default_addr)
Button btDefaultAddr;
@Bind(R.id.bt_delete_addr)
ImageButton btDeleteAddr;
@Bind(R.id.tv_lv_address)
TextView tvLvAddress;
@Bind(R.id.tv_address_userinfo)
TextView tvAddressUserInfo;
@Bind(R.id.example)
SwipeLayout swipeLayout;
@Bind(R.id.img_address_select)
ImageView imgaddressselect;
ViewHolder(View view) {
ButterKnife.bind(this, view);
}
} | [
"1042284148@qq.com"
] | 1042284148@qq.com |
f3f873af7e155dd287075feb40725394f29f30f9 | b903b69215b5659336baaa4c846750e7f795c758 | /app/src/test/java/butterknife/butterknife/ExampleUnitTest.java | f3330cdb732dcf0d9a8fc235122dceff64bdca09 | [] | no_license | Jocerly/butterknife | 9e8a1c08fd2a988e8cb077aa5af1f5bb4dbc520e | 025d861ab1cabdb1dd53c21da21243d69a237581 | refs/heads/master | 2021-04-15T10:11:32.631452 | 2018-03-24T10:00:25 | 2018-03-24T10:00:25 | 126,586,170 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 401 | java | package butterknife.butterknife;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"Jocerly198835"
] | Jocerly198835 |
9d25961296e2c3924f31fb84045c444fa769d402 | 57e226c95e5d36df2a8756c7a5e8effd11c6b4f4 | /jf-plus-common/src/main/java/com/jf/plus/common/utils/DateUtils.java | 5493c5b138450ecf3d7c24eaff903bb59090344d | [] | no_license | lite5408/jf-plus | 40427cc89e6201f25bf39b9f2854a8cffa0ec56e | ced88c04080228bc4eb7b5b311e1b9a063b3aeb8 | refs/heads/master | 2023-01-20T05:06:14.835668 | 2020-11-25T02:45:24 | 2020-11-25T02:45:24 | 315,808,903 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,075 | java | /**
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package com.jf.plus.common.utils;
import java.text.ParseException;
import java.util.Calendar;
import java.util.Date;
import org.apache.commons.lang3.time.DateFormatUtils;
import com.jf.plus.common.core.Constants;
/**
* 日期工具类, 继承org.apache.commons.lang.time.DateUtils类
*
* @author ThinkGem
* @version 2014-4-15
*/
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
private static final int EXPIRED_DAYS = Constants.JD_VALIDATE;
private static String[] parsePatterns = { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss",
"yyyy.MM.dd HH:mm", "yyyy.MM" };
/**
* 得到当前日期字符串 格式(yyyy-MM-dd)
*/
public static String getDate() {
return getDate("yyyy-MM-dd");
}
/**
* 得到当前日期字符串 格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E"
*/
public static String getDate(String pattern) {
return DateFormatUtils.format(new Date(), pattern);
}
/**
* 得到日期字符串 默认格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E"
*/
public static String formatDate(Date date, Object... pattern) {
String formatDate = null;
if (pattern != null && pattern.length > 0) {
formatDate = DateFormatUtils.format(date, pattern[0].toString());
} else {
formatDate = DateFormatUtils.format(date, "yyyy-MM-dd");
}
return formatDate;
}
/**
* 得到日期时间字符串,转换格式(yyyy-MM-dd HH:mm:ss)
*/
public static String formatDateTime(Date date) {
return formatDate(date, "yyyy-MM-dd HH:mm:ss");
}
/**
* 得到当前时间字符串 格式(HH:mm:ss)
*/
public static String getTime() {
return formatDate(new Date(), "HH:mm:ss");
}
/**
* 得到当前日期和时间字符串 格式(yyyy-MM-dd HH:mm:ss)
*/
public static String getDateTime() {
return formatDate(new Date(), "yyyy-MM-dd HH:mm:ss");
}
/**
* 得到当前年份字符串 格式(yyyy)
*/
public static String getYear() {
return formatDate(new Date(), "yyyy");
}
/**
* 得到当前月份字符串 格式(MM)
*/
public static String getMonth() {
return formatDate(new Date(), "MM");
}
/**
* 得到当天字符串 格式(dd)
*/
public static String getDay() {
return formatDate(new Date(), "dd");
}
/**
* 得到当前星期字符串 格式(E)星期几
*/
public static String getWeek() {
return formatDate(new Date(), "E");
}
/**
* 日期型字符串转化为日期 格式 { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm",
* "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy.MM.dd",
* "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm" }
*/
public static Date parseDate(Object str) {
if (str == null) {
return null;
}
try {
return parseDate(str.toString(), parsePatterns);
} catch (ParseException e) {
return null;
}
}
/**
* 获取过去的天数
*
* @param date
* @return
*/
public static long pastDays(Date date) {
long t = new Date().getTime() - date.getTime();
return t / (24 * 60 * 60 * 1000);
}
/**
* 获取过去的小时
*
* @param date
* @return
*/
public static long pastHour(Date date) {
long t = new Date().getTime() - date.getTime();
return t / (60 * 60 * 1000);
}
/**
* 获取过去的分钟
*
* @param date
* @return
*/
public static long pastMinutes(Date date) {
long t = new Date().getTime() - date.getTime();
return t / (60 * 1000);
}
/**
* 转换为时间(天,时:分:秒.毫秒)
*
* @param timeMillis
* @return
*/
public static String formatDateTime(long timeMillis) {
long day = timeMillis / (24 * 60 * 60 * 1000);
long hour = (timeMillis / (60 * 60 * 1000) - day * 24);
long min = ((timeMillis / (60 * 1000)) - day * 24 * 60 - hour * 60);
long s = (timeMillis / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60);
long sss = (timeMillis - day * 24 * 60 * 60 * 1000 - hour * 60 * 60 * 1000 - min * 60 * 1000 - s * 1000);
return (day > 0 ? day + "," : "") + hour + ":" + min + ":" + s + "." + sss;
}
/**
* 获取两个日期之间的天数
*
* @param before
* @param after
* @return
*/
public static double getDistanceOfTwoDate(Date before, Date after) {
long beforeTime = before.getTime();
long afterTime = after.getTime();
return (afterTime - beforeTime) / (1000 * 60 * 60 * 24);
}
/**
* 获取当前月第一天
*/
public static String getFirstDay() {
Calendar c = Calendar.getInstance();
c.add(Calendar.MONTH, 0);
c.set(Calendar.DAY_OF_MONTH, 1);// 设置为1号,当前日期既为本月第一天
return formatDate(c.getTime());
}
/**
* 获取当前月最后一天
*/
public static String getLastDay() {
Calendar c = Calendar.getInstance();
c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
return formatDate(c.getTime());
}
/**
* 订单有效期7天(含当天)
*
* @return
*/
public static Date getOrderExpiredDate() {
Date expiredDate = addDays(new Date(), EXPIRED_DAYS - 1);
String expiredDateStr = formatDate(expiredDate) + " 23:59:59";
return parseDate(expiredDateStr);
}
public static String parseString(String time) {
try {
return DateUtils.formatDate(DateUtils.parseDate(time, "yyyyMMddHHmmss"), "yyyy-MM-dd HH:mm:ss");
} catch (ParseException e) {
return null;
}
}
/**
* @param args
* @throws ParseException
*/
public static void main(String[] args) throws ParseException {
// System.out.println(formatDate(parseDate("2010/3/6")));
// System.out.println(getDate("yyyy年MM月dd日 E"));
// long time = new Date().getTime()-parseDate("2012-11-19").getTime();
// System.out.println(time/(24*60*60*1000));
System.out.println(getFirstDay());
System.out.println(getLastDay());
System.out.println(getOrderExpiredDate());
}
}
| [
"1023923135@qq.com"
] | 1023923135@qq.com |
febab4511453b39b08660b6e849abf1de444c506 | 52c36ce3a9d25073bdbe002757f08a267abb91c6 | /src/main/java/com/alipay/api/domain/AlipayPcreditHuabeiPcbenefitcoreBfactivitfacadeQueryModel.java | 331c170648eaf7014ce5b9751e02e500ad8f2110 | [
"Apache-2.0"
] | permissive | itc7/alipay-sdk-java-all | d2f2f2403f3c9c7122baa9e438ebd2932935afec | c220e02cbcdda5180b76d9da129147e5b38dcf17 | refs/heads/master | 2022-08-28T08:03:08.497774 | 2020-05-27T10:16:10 | 2020-05-27T10:16:10 | 267,271,062 | 0 | 0 | Apache-2.0 | 2020-05-27T09:02:04 | 2020-05-27T09:02:04 | null | UTF-8 | Java | false | false | 1,796 | java | package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 查询花呗营销分期贴息活动信息
*
* @author auto create
* @since 1.0, 2020-03-27 17:22:57
*/
public class AlipayPcreditHuabeiPcbenefitcoreBfactivitfacadeQueryModel extends AlipayObject {
private static final long serialVersionUID = 1839719895619281527L;
/**
* 商户ID
*/
@ApiField("partner_id")
private String partnerId;
/**
* 活动类型,传空默认查所有
*/
@ApiListField("product_ids")
@ApiField("string")
private List<String> productIds;
/**
* 来源系统
*/
@ApiField("request_from")
private String requestFrom;
/**
* 查询对应状态活动,默认所有状态活动类型
*/
@ApiListField("status")
@ApiField("string")
private List<String> status;
/**
* 蚂蚁统一会员ID
*/
@ApiField("user_id")
private String userId;
public String getPartnerId() {
return this.partnerId;
}
public void setPartnerId(String partnerId) {
this.partnerId = partnerId;
}
public List<String> getProductIds() {
return this.productIds;
}
public void setProductIds(List<String> productIds) {
this.productIds = productIds;
}
public String getRequestFrom() {
return this.requestFrom;
}
public void setRequestFrom(String requestFrom) {
this.requestFrom = requestFrom;
}
public List<String> getStatus() {
return this.status;
}
public void setStatus(List<String> status) {
this.status = status;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
dca32672fa503a071e769d386a054fea4299b709 | 5a17a7fce6a8c9910ac41b903824d452aa7d3419 | /ahiber/src/main/java/com/dike/assistant/ahiber/TSqliteDatabaseHelper.java | 11777cec8b402034dc1715d35b809a22dd4f0d57 | [] | no_license | discoy/Ahiber | 9be2c86fc81bdd4d682467db07d09288c9703766 | 441674bfe5b3cecc8dcc8c97d4cd7f5aa0347670 | refs/heads/master | 2021-01-19T01:02:46.024665 | 2017-07-17T09:06:11 | 2017-07-17T09:06:11 | 51,746,242 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,109 | java | package com.dike.assistant.ahiber;
import android.content.Context;
public class TSqliteDatabaseHelper extends TDatabaseHelper
{
private static TSqliteDatabaseHelper sqliteDatabaseHelper;
private TSqliteDatabaseHelper(Context context)
{
databaseOperator = new TSqliteDatabaseOperate(context);
}
private TSqliteDatabaseHelper(IDatabaseOperate databaseOperator)
{
this.databaseOperator = databaseOperator;
}
public static TSqliteDatabaseHelper getInstance(Context context)
{
if (null == sqliteDatabaseHelper)
{
sqliteDatabaseHelper = new TSqliteDatabaseHelper(context);
}
return sqliteDatabaseHelper;
}
public static TSqliteDatabaseHelper getInstance(IDatabaseOperate databaseOperator)
{
if (null == sqliteDatabaseHelper)
{
sqliteDatabaseHelper = new TSqliteDatabaseHelper(databaseOperator);
}
return sqliteDatabaseHelper;
}
@Override
public IDatabaseOperate getDatabaseOperator()
{
return super.getDatabaseOperator();
}
}
| [
"disco.liu@gmail.com"
] | disco.liu@gmail.com |
b854b8f1e51dc6845cad85410dc217c28452fa88 | 6b9efd2ea042d51140774f32efd7d8c4091defff | /library/src/main/java/hotchemi/android/rate/DefaultDialogManager.java | 2eaa3954148812dcc77b83af74fd450907755d05 | [
"MIT"
] | permissive | avianey/Android-Rate | 51166be6e2ec7a1e783691fba84c7b2bff918667 | c2b2b45f1aa0269bdafca75792ac92f6f89f55c6 | refs/heads/master | 2021-01-11T10:22:50.705943 | 2017-01-05T13:16:27 | 2017-01-05T13:16:27 | 78,102,350 | 0 | 0 | null | 2017-01-05T10:12:13 | 2017-01-05T10:12:13 | null | UTF-8 | Java | false | false | 3,310 | java | package hotchemi.android.rate;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.view.View;
import static hotchemi.android.rate.IntentHelper.createIntentForAmazonAppstore;
import static hotchemi.android.rate.IntentHelper.createIntentForGooglePlay;
import static hotchemi.android.rate.PreferenceHelper.setAgreeShowDialog;
import static hotchemi.android.rate.PreferenceHelper.setRemindInterval;
import static hotchemi.android.rate.Utils.getDialogBuilder;
public class DefaultDialogManager implements DialogManager {
static class Factory implements DialogManager.Factory {
@Override
public DialogManager createDialogManager(Context context, DialogOptions options) {
return new DefaultDialogManager(context, options);
}
}
private final Context context;
private final DialogOptions options;
private final OnClickButtonListener listener;
protected final DialogInterface.OnClickListener positiveListener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
final Intent intentToAppstore = options.getStoreType() == StoreType.GOOGLEPLAY ?
createIntentForGooglePlay(context) : createIntentForAmazonAppstore(context);
context.startActivity(intentToAppstore);
setAgreeShowDialog(context, false);
if (listener != null) listener.onClickButton(which);
}
};
protected final DialogInterface.OnClickListener negativeListener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
setAgreeShowDialog(context, false);
if (DefaultDialogManager.this.listener != null) DefaultDialogManager.this.listener.onClickButton(which);
}
};
protected final DialogInterface.OnClickListener neutralListener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
setRemindInterval(context);
if (listener != null) listener.onClickButton(which);
}
};
public DefaultDialogManager(final Context context, final DialogOptions options) {
this.context = context;
this.options = options;
this.listener = options.getListener();
}
public Dialog createDialog() {
AlertDialog.Builder builder = getDialogBuilder(context);
builder.setMessage(options.getMessageText(context));
if (options.shouldShowTitle()) builder.setTitle(options.getTitleText(context));
builder.setCancelable(options.getCancelable());
View view = options.getView();
if (view != null) builder.setView(view);
builder.setPositiveButton(options.getPositiveText(context), positiveListener);
if (options.shouldShowNeutralButton()) {
builder.setNeutralButton(options.getNeutralText(context), neutralListener);
}
if (options.shouldShowNegativeButton()) {
builder.setNegativeButton(options.getNegativeText(context), negativeListener);
}
return builder.create();
}
} | [
"avianey@axway.com"
] | avianey@axway.com |
cdbeda30ca7a9d684ff03d41e0d69815624cdf59 | 870c513aa8eb9b4c60a27f979d20bab5e0044391 | /curso-java-basico/src/cursojava/aula32/TesteCarro.java | 04087a69dd13607f3c3a3a21011c818eb6c9c2e8 | [] | no_license | viniciusCamposs/curso-java | 9f3a7c96c2f92b4b664b4116ecdda2196a7a7638 | a79081c18ee4fedbb5d6c597ee68dbc4b4fbd46c | refs/heads/master | 2023-02-13T17:55:00.637277 | 2021-01-14T14:38:00 | 2021-01-14T14:38:00 | 319,462,133 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 195 | java | package cursojava.aula32;
public class TesteCarro {
public static void main(String[] args) {
Carro van = new Carro();
van.setMarca("Fiat");
System.out.println(van.getMarca());
}
}
| [
"vinicius.campos5@fatec.sp.gov.br"
] | vinicius.campos5@fatec.sp.gov.br |
061ed424e73107a58241231e3986f19929162f8d | b3fc7bd27c4012db9c36732526ee7c808ec6c298 | /src/main/java/aop/anno/Main.java | 37e4a5e6db8916b6c0ae1d342e6853e0ec71ad0c | [] | no_license | mushroom7371/SpringStudy | ac28ba224751138ea16a4bea6852a705d66f5222 | 4bbb626a83834c6d263eba35dfde12e360ec09e2 | refs/heads/main | 2023-06-17T18:19:25.679413 | 2021-07-14T08:18:03 | 2021-07-14T08:18:03 | 374,856,605 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 521 | java | package aop.anno;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
public class Main {
public Main() {
ApplicationContext ac = new FileSystemXmlApplicationContext("src/main/java/aop/anno/assembler.xml");
Dao dao = ac.getBean("fDao", Dao.class);
//proxy가 아니라 객체를 불러온다
dao.insert();
dao.search();
dao.update();
dao.delete();
}
public static void main(String[] args) {
new Main();
}
}
| [
"wnsghk6670@naver.com"
] | wnsghk6670@naver.com |
516d4322f25090c33d13869a86187436ad31b5ec | 3386dd7e7be492cfb06912215e5ef222bbc7ce34 | /autocomment_netbeans/spooned/org/jbpm/workflow/instance/node/StateBasedNodeInstance.java | 8cda1cab1240915d0931be39b2184ecc084ad2b1 | [
"Apache-2.0"
] | permissive | nerzid/autocomment | cc1d3af05045bf24d279e2f824199ac8ae51b5fd | 5803cf674f5cadfdc672d4957d46130a3cca6cd9 | refs/heads/master | 2021-03-24T09:17:16.799705 | 2016-09-28T14:32:21 | 2016-09-28T14:32:21 | 69,360,519 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 17,718 | java | /**
* Copyright 2010 Red Hat, Inc. and/or its affiliates.
*
* 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.
*/
package org.jbpm.workflow.instance.node;
import org.jbpm.process.instance.impl.Action;
import org.drools.core.spi.Activation;
import java.util.ArrayList;
import org.jbpm.process.core.timer.BusinessCalendar;
import org.drools.core.time.impl.CronExpression;
import org.jbpm.process.core.timer.DateTimeUtils;
import org.drools.core.rule.Declaration;
import org.jbpm.workflow.core.DroolsAction;
import org.kie.api.runtime.process.EventListener;
import org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl;
import java.util.HashMap;
import org.drools.core.common.InternalAgenda;
import org.drools.core.common.InternalFactHandle;
import org.jbpm.process.instance.InternalProcessRuntime;
import java.util.Iterator;
import org.kie.internal.runtime.KnowledgeRuntime;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.drools.core.util.MVELSafeHelper;
import java.util.Map;
import org.kie.api.event.rule.MatchCreatedEvent;
import java.util.regex.Matcher;
import org.kie.api.runtime.process.NodeInstance;
import java.util.regex.Pattern;
import org.jbpm.process.instance.ProcessInstance;
import org.jbpm.workflow.core.node.StateBasedNode;
import org.drools.core.impl.StatefulKnowledgeSessionImpl;
import org.drools.core.time.TimeUtils;
import org.jbpm.process.core.timer.Timer;
import org.jbpm.process.instance.timer.TimerInstance;
import org.jbpm.process.instance.timer.TimerManager;
import org.jbpm.process.instance.context.variable.VariableScopeInstance;
import org.jbpm.workflow.instance.WorkflowProcessInstance;
import org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl;
public abstract class StateBasedNodeInstance extends ExtendedNodeInstanceImpl implements EventBasedNodeInstanceInterface , EventListener {
private static final long serialVersionUID = 510L;
protected static final Pattern PARAMETER_MATCHER = Pattern.compile("#\\{([\\S&&[^\\}]]+)\\}", Pattern.DOTALL);
private static final Logger logger = LoggerFactory.getLogger(StateBasedNodeInstance.class);
private List<Long> timerInstances;
public StateBasedNode getEventBasedNode() {
return ((StateBasedNode) (getNode()));
}
public void internalTrigger(NodeInstance from, String type) {
super.internalTrigger(from, type);
// if node instance was cancelled, abort
if ((getNodeInstanceContainer().getNodeInstance(getId())) == null) {
return ;
}
// activate timers
Map<Timer, DroolsAction> timers = getEventBasedNode().getTimers();
if (timers != null) {
addTimerListener();
timerInstances = new ArrayList<Long>(timers.size());
TimerManager timerManager = ((InternalProcessRuntime) (getProcessInstance().getKnowledgeRuntime().getProcessRuntime())).getTimerManager();
for (Timer timer : timers.keySet()) {
TimerInstance timerInstance = createTimerInstance(timer);
timerManager.registerTimer(timerInstance, ((ProcessInstance) (getProcessInstance())));
timerInstances.add(timerInstance.getId());
}
}
if ((getEventBasedNode().getBoundaryEvents()) != null) {
for (String name : getEventBasedNode().getBoundaryEvents()) {
boolean isActive = ((InternalAgenda) (getProcessInstance().getKnowledgeRuntime().getAgenda())).isRuleActiveInRuleFlowGroup("DROOLS_SYSTEM", name, getProcessInstance().getId());
if (isActive) {
getProcessInstance().getKnowledgeRuntime().signalEvent(name, null);
} else {
addActivationListener();
}
}
}
((WorkflowProcessInstanceImpl) (getProcessInstance())).addActivatingNodeId(((String) (getNode().getMetaData().get("UniqueId"))));
}
protected TimerInstance createTimerInstance(Timer timer) {
TimerInstance timerInstance = new TimerInstance();
KnowledgeRuntime kruntime = getProcessInstance().getKnowledgeRuntime();
if ((kruntime != null) && ((kruntime.getEnvironment().get("jbpm.business.calendar")) != null)) {
BusinessCalendar businessCalendar = ((BusinessCalendar) (kruntime.getEnvironment().get("jbpm.business.calendar")));
String delay = null;
switch (timer.getTimeType()) {
case Timer.TIME_CYCLE :
if (CronExpression.isValidExpression(timer.getDelay())) {
timerInstance.setCronExpression(timer.getDelay());
} else {
String tempDelay = resolveVariable(timer.getDelay());
String tempPeriod = resolveVariable(timer.getPeriod());
if (DateTimeUtils.isRepeatable(tempDelay)) {
String[] values = DateTimeUtils.parseISORepeatable(tempDelay);
String tempRepeatLimit = values[0];
tempDelay = values[1];
tempPeriod = values[2];
if (!(tempRepeatLimit.isEmpty())) {
try {
int repeatLimit = Integer.parseInt(tempRepeatLimit);
if (repeatLimit > (-1)) {
timerInstance.setRepeatLimit((repeatLimit + 1));
}
} catch (NumberFormatException e) {
}
}
}
timerInstance.setDelay(businessCalendar.calculateBusinessTimeAsDuration(tempDelay));
if (tempPeriod == null) {
timerInstance.setPeriod(0);
} else {
timerInstance.setPeriod(businessCalendar.calculateBusinessTimeAsDuration(tempPeriod));
}
}
// ignore
break;
case Timer.TIME_DURATION :
delay = resolveVariable(timer.getDelay());
timerInstance.setDelay(businessCalendar.calculateBusinessTimeAsDuration(delay));
timerInstance.setPeriod(0);
break;
case Timer.TIME_DATE :
// even though calendar is available concrete date was provided so it shall be used
configureTimerInstance(timer, timerInstance);
default :
break;
}
} else {
configureTimerInstance(timer, timerInstance);
}
timerInstance.setTimerId(timer.getId());
return timerInstance;
}
protected void configureTimerInstance(Timer timer, TimerInstance timerInstance) {
String s = null;
long duration = -1;
switch (timer.getTimeType()) {
case Timer.TIME_CYCLE :
// when using ISO date/time period is not set
if ((timer.getPeriod()) != null) {
timerInstance.setDelay(resolveValue(timer.getDelay()));
if ((timer.getPeriod()) == null) {
timerInstance.setPeriod(0);
} else {
timerInstance.setPeriod(resolveValue(timer.getPeriod()));
}
} // when using ISO date/time period is not set
else {
String resolvedDelay = resolveVariable(timer.getDelay());
if (CronExpression.isValidExpression(resolvedDelay)) {
timerInstance.setCronExpression(resolvedDelay);
} else {
long[] repeatValues = null;
try {
repeatValues = DateTimeUtils.parseRepeatableDateTime(timer.getDelay());
} catch (RuntimeException e) {
repeatValues = DateTimeUtils.parseRepeatableDateTime(resolvedDelay);
}
if ((repeatValues.length) == 3) {
int parsedReapedCount = ((int) (repeatValues[0]));
if (parsedReapedCount > (-1)) {
timerInstance.setRepeatLimit((parsedReapedCount + 1));
}
timerInstance.setDelay(repeatValues[1]);
timerInstance.setPeriod(repeatValues[2]);
} else if ((repeatValues.length) == 2) {
timerInstance.setDelay(repeatValues[0]);
timerInstance.setPeriod(repeatValues[1]);
} else {
timerInstance.setDelay(repeatValues[0]);
timerInstance.setPeriod(0);
}
}
}
// cannot parse delay, trying to interpret it
break;
case Timer.TIME_DURATION :
try {
duration = DateTimeUtils.parseDuration(timer.getDelay());
} catch (RuntimeException e) {
s = resolveVariable(timer.getDelay());
duration = DateTimeUtils.parseDuration(s);
}
// cannot parse delay, trying to interpret it
timerInstance.setDelay(duration);
timerInstance.setPeriod(0);
break;
case Timer.TIME_DATE :
try {
duration = DateTimeUtils.parseDateAsDuration(timer.getDate());
} catch (RuntimeException e) {
s = resolveVariable(timer.getDate());
duration = DateTimeUtils.parseDateAsDuration(s);
}
// cannot parse delay, trying to interpret it
timerInstance.setDelay(duration);
timerInstance.setPeriod(0);
break;
default :
break;
}
}
private long resolveValue(String s) {
try {
return TimeUtils.parseTimeString(s);
} catch (RuntimeException e) {
s = resolveVariable(s);
return TimeUtils.parseTimeString(s);
}
}
private String resolveVariable(String s) {
if (s == null) {
return null;
}
// cannot parse delay, trying to interpret it
Map<String, String> replacements = new HashMap<String, String>();
Matcher matcher = StateBasedNodeInstance.PARAMETER_MATCHER.matcher(s);
while (matcher.find()) {
String paramName = matcher.group(1);
if ((replacements.get(paramName)) == null) {
VariableScopeInstance variableScopeInstance = ((VariableScopeInstance) (resolveContextInstance(VariableScope.VARIABLE_SCOPE, paramName)));
if (variableScopeInstance != null) {
Object variableValue = variableScopeInstance.getVariable(paramName);
String variableValueString = variableValue == null ? "" : variableValue.toString();
replacements.put(paramName, variableValueString);
} else {
try {
Object variableValue = MVELSafeHelper.getEvaluator().eval(paramName, new org.jbpm.workflow.instance.impl.NodeInstanceResolverFactory(StateBasedNodeInstance.this));
String variableValueString = variableValue == null ? "" : variableValue.toString();
replacements.put(paramName, variableValueString);
} catch (Throwable t) {
StateBasedNodeInstance.logger.error("Could not find variable scope for variable {}", paramName);
StateBasedNodeInstance.logger.error("when trying to replace variable in processId for sub process {}", getNodeName());
StateBasedNodeInstance.logger.error("Continuing without setting process id.");
}
}
}
}
for (Map.Entry<String, String> replacement : replacements.entrySet()) {
s = s.replace((("#{" + (replacement.getKey())) + "}"), replacement.getValue());
}
return s;
}
@Override
public void signalEvent(String type, Object event) {
if ("timerTriggered".equals(type)) {
TimerInstance timerInstance = ((TimerInstance) (event));
if (timerInstances.contains(timerInstance.getId())) {
triggerTimer(timerInstance);
}
} else if (type.equals(getActivationType())) {
if (event instanceof MatchCreatedEvent) {
String name = ((MatchCreatedEvent) (event)).getMatch().getRule().getName();
if (checkProcessInstance(((Activation) (((MatchCreatedEvent) (event)).getMatch())))) {
((MatchCreatedEvent) (event)).getKieRuntime().signalEvent(name, null);
}
}
}
}
private void triggerTimer(TimerInstance timerInstance) {
for (Map.Entry<Timer, DroolsAction> entry : getEventBasedNode().getTimers().entrySet()) {
if ((entry.getKey().getId()) == (timerInstance.getTimerId())) {
executeAction(((Action) (entry.getValue().getMetaData("Action"))));
return ;
}
}
}
@Override
public String[] getEventTypes() {
return new String[]{ "timerTriggered" , getActivationType() };
}
public void triggerCompleted() {
triggerCompleted(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, true);
}
public void addEventListeners() {
if (((timerInstances) != null) && ((timerInstances.size()) > 0)) {
addTimerListener();
}
}
protected void addTimerListener() {
((WorkflowProcessInstance) (getProcessInstance())).addEventListener("timerTriggered", StateBasedNodeInstance.this, false);
((WorkflowProcessInstance) (getProcessInstance())).addEventListener("timer", StateBasedNodeInstance.this, true);
}
public void removeEventListeners() {
((WorkflowProcessInstance) (getProcessInstance())).removeEventListener("timerTriggered", StateBasedNodeInstance.this, false);
((WorkflowProcessInstance) (getProcessInstance())).removeEventListener("timer", StateBasedNodeInstance.this, true);
}
protected void triggerCompleted(String type, boolean remove) {
((org.jbpm.workflow.instance.NodeInstanceContainer) (getNodeInstanceContainer())).setCurrentLevel(getLevel());
cancelTimers();
removeActivationListener();
super.triggerCompleted(type, remove);
}
public List<Long> getTimerInstances() {
return timerInstances;
}
public void internalSetTimerInstances(List<Long> timerInstances) {
StateBasedNodeInstance.this.timerInstances = timerInstances;
}
public void cancel() {
cancelTimers();
removeEventListeners();
removeActivationListener();
super.cancel();
}
private void cancelTimers() {
// deactivate still active timers
if ((timerInstances) != null) {
TimerManager timerManager = ((InternalProcessRuntime) (getProcessInstance().getKnowledgeRuntime().getProcessRuntime())).getTimerManager();
for (Long id : timerInstances) {
timerManager.cancelTimer(id);
}
}
}
protected String getActivationType() {
return "RuleFlowStateEvent-" + (StateBasedNodeInstance.this.getProcessInstance().getProcessId());
}
private void addActivationListener() {
getProcessInstance().addEventListener(getActivationType(), StateBasedNodeInstance.this, true);
}
private void removeActivationListener() {
getProcessInstance().removeEventListener(getActivationType(), StateBasedNodeInstance.this, true);
}
protected boolean checkProcessInstance(Activation activation) {
final Map<?, ?> declarations = activation.getSubRule().getOuterDeclarations();
for (Iterator<?> it = declarations.values().iterator(); it.hasNext();) {
Declaration declaration = ((Declaration) (it.next()));
if (("processInstance".equals(declaration.getIdentifier())) || ("org.kie.api.runtime.process.WorkflowProcessInstance".equals(declaration.getTypeName()))) {
Object value = declaration.getValue(((StatefulKnowledgeSessionImpl) (getProcessInstance().getKnowledgeRuntime())).getInternalWorkingMemory(), ((InternalFactHandle) (activation.getTuple().get(declaration))).getObject());
if (value instanceof ProcessInstance) {
return (((ProcessInstance) (value)).getId()) == (getProcessInstance().getId());
}
}
}
return true;
}
}
| [
"nerzid@gmail.com"
] | nerzid@gmail.com |
c6e6bec5c2cadb367d691a844dd5d9f989315149 | 2829657a7b3480ddfe1dbf36be0bc4260403d97b | /app/src/main/java/org/raaz/com/rxjavapost/MainActivity.java | 78fb54fa4df990a4fbcf47c6de5bc357dab250ff | [] | no_license | rajeshkumarandroid/RX-java-post | 837a79b66eebf3660f1dc1a73fc797d4899b8112 | 8794d448f6c70c22de972eaca095fc21c4b0f1bd | refs/heads/master | 2021-08-23T19:57:23.871852 | 2017-12-06T09:26:58 | 2017-12-06T09:26:58 | 113,295,084 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,870 | java | package org.raaz.com.rxjavapost;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import org.raaz.com.rxjavapost.Presenter.Client;
import org.raaz.com.rxjavapost.Presenter.IntractiveView;
import org.raaz.com.rxjavapost.Presenter.Response;
import java.util.HashMap;
import java.util.Map;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
/**
* Created by Rajesh Kumar on 06-12-2017.
*/
public class MainActivity extends AppCompatActivity implements IntractiveView {
Unbinder unbinder;
private ProgressDialog progressDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
unbinder= ButterKnife.bind(this);
progressDialog = new ProgressDialog(this);
}
@OnClick(R.id.btn_get)
public void fetchGetRequest(){
Log.e("calling click","<><>");
Client.getInit(this).fetch_GET_Response(new Response() {
@Override
public void Success(String response) {
Log.e("response is ","<<getall useres><"+response);
((TextView)findViewById(R.id.txt)).setText(response);
}
@Override
public void Failure(String respose) {
Log.e("error ","<>getall users<"+respose);
}
});
}
@OnClick(R.id.btn_post)
public void getPostRequest(){
Client.getInit(this).fetch_POST_Response(getPostedParams(), new Response() {
@Override
public void Success(String response) {
Log.e("response is ","<>success<>"+response);
((TextView)findViewById(R.id.txt)).setText(response);
}
@Override
public void Failure(String respose) {
Log.e("error ","<><"+respose);
}
});
}
private Map<String ,String > getPostedParams(){
Map<String,String > params = new HashMap<>();
params.put("action","finance_spinners");
params.put("design_version", "1");
params.put("api_id", "cte2017v8.7");
params.put("version_code", "" + BuildConfig.VERSION_CODE);
params.put("dealer_id", "5995");
params.put("app_code", "e7856867-2898-4190-8fc5-aea22c2d8dd0,");
return params;
}
@Override
protected void onStop() {
super.onStop();
unbinder.unbind();
}
@Override
public void showLoading() {
progressDialog.show();
}
@Override
public void hideLoading() {
progressDialog.dismiss();
}
}
| [
"rajeshk.chelluri@gmail.com"
] | rajeshk.chelluri@gmail.com |
ce8940d391b54209f7af9e6e94c24e35e09e6172 | 29bdb132b2aeb09c39511edd0eb69b6772efd094 | /capter9/src/com/spring/controller/SourceLoader.java | 452c2e3aedffbc52a400e3f7d1e316b3ed427484 | [] | no_license | Mrxiang/Java_Web_Examples | 10361c0c422fe117c7768981828468ecb8065d77 | af023a9ad7cb9be1a1191d94f49d5374af6554a8 | refs/heads/main | 2023-03-05T08:00:20.106256 | 2021-02-10T07:38:34 | 2021-02-10T07:38:34 | 337,612,597 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,364 | java | package com.spring.controller;
import com.hibernate.dao.DAOSupport;
import com.hibernate.model.CourseStuInfo;
import com.hibernate.model.DocuStuInfo;
import com.hibernate.model.SystemClassInfo;
import com.hibernate.model.SystemCourseCode;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.util.*;
public class SourceLoader extends MultiActionController {
private DAOSupport dao;
public ModelAndView reg(HttpServletRequest req, HttpServletResponse res) {
List list = dao.QueryObject("from SystemCourseCode");
Map model = new HashMap();
model.put("list", list);
String stuIdstr = req.getParameter("stuId");
if (stuIdstr != null) {
List list1 = dao.QueryObject("from DocuStuInfo where stuId='"
+ stuIdstr + "'");
if (list1 != null&&list1.size()>0) {
DocuStuInfo stuInfo = (DocuStuInfo) list1.get(0);
model.put("stuInfo", stuInfo);
}
}
return new ModelAndView("/sourceview/doc_stusource_input", model);
}
public ModelAndView search(HttpServletRequest req, HttpServletResponse res) {
System.out.println(33333);
try {
req.setCharacterEncoding("GBK");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
String condition = req.getParameter("condition");
String conditionContent = req.getParameter("conditionContent");
List list = null;
System.out.println(condition);
if (condition != null && conditionContent != null) {
System.out.println("ccc"+condition);
if (condition.equals("�������"))
condition = "examType";
else if (condition.equals("��Ŀ����"))
condition = "systemCourseCode.subject";
else if (condition.equals("ѧ������"))
condition = "docuStuInfo.name";
else if (condition.equals("ѧ�����"))
condition = "docuStuInfo.stuId";
else
condition = "docuStuInfo.name";
list = dao.QueryObject("from CourseStuInfo where " + condition
+ " like '" + conditionContent + "%'");
} else {
list = dao.QueryObject("from CourseStuInfo");
}
Map model = new HashMap();
model.put("list", list);
return new ModelAndView("/sourceview/doc_stusource_search", model);
}
/**
* �༶���Գɼ���ѯ
*/
public ModelAndView ClassSourceList(HttpServletRequest request,
HttpServletResponse response) throws Exception {
String classid = request.getParameter("selectmc");
if (classid == null)
classid = "%";
String examType = request.getParameter("typeexam");
if (examType == null || examType.length() <= 0) {
examType = "%";
} else {
examType = new String(request.getParameter("typeexam").getBytes(
"iso-8859-1"), "gb2312");
}
String examDate = request.getParameter("dateexam");
List listClass = dao.QueryObject("From SystemClassInfo");
List courseList = dao.QueryObject("from SystemCourseCode");
Vector vname = new Vector();
vname.addElement("ѧ������");
vname.addElement("�������");
vname.addElement("��������");
Iterator iterator = courseList.iterator();
int index = 0;
while (iterator.hasNext()) {
SystemCourseCode courseObject = (SystemCourseCode) iterator.next();
vname.addElement(courseObject.getSubject());
index++;
}
vname.addElement("�ܷ���");
String sqlSelect = null;
if (examDate == null || examDate.length() <= 0) {
examDate = "%";
sqlSelect = "SELECT * FROM course_stu_info WHERE (SUBSTRING(stu_id, 1, 6) LIKE '"
+ classid
+ "' AND exam_type LIKE '"
+ examType+ "')";
} else {
sqlSelect = "SELECT * FROM course_stu_info WHERE (SUBSTRING(stu_id, 1, 6) LIKE '"
+ classid
+ "' AND exam_type LIKE '"
+ examType
+ "' AND exam_date = '" + examDate + "')";
}
List courseListObject = dao.QueryObjectFromSql(sqlSelect,
"course_stu_info", new CourseStuInfo());
System.out.println(courseListObject);
Object[] courseArray = courseListObject.toArray();
int count = courseArray.length;
java.util.Collection collection = new java.util.ArrayList();
int modcount = count / index;
for (int i = 0; i < modcount; i++) {
Vector vdata = new Vector();
CourseStuInfo coursename = (CourseStuInfo) courseArray[i * index];
vdata.addElement(coursename.getDocuStuInfo().getName());
vdata.addElement(coursename.getExamType());
vdata.addElement(coursename.getExamDate());
float gradesum = 0.0f;
for (int j = 0; j < index; j++) {
CourseStuInfo course = (CourseStuInfo) courseArray[i * index
+ j];
vdata.addElement(course.getGrade());
gradesum = gradesum
+ Float.parseFloat(String.valueOf(course.getGrade()));
}
vdata.addElement(Float.valueOf(gradesum));
gradesum = 0.0f;
collection.add(vdata);
}
classid = request.getParameter("selectmc");
Map map = new HashMap();
map.put("clname", listClass);
map.put("tname", vname);
map.put("cdata", collection);
map.put("oldmc", classid);
return new ModelAndView("sourceview/doc_stusource_class_gather", "map",
map);
}
/**
* �꼶���Գɼ�ͳ��
*/
public ModelAndView GradeSourceList(HttpServletRequest request,
HttpServletResponse response) throws Exception {
String gradeid = request.getParameter("selectmc");
String examType = request.getParameter("typeexam");
String examDate = request.getParameter("dateexam");
List listGrade = dao.QueryObject("From SystemGradeCode");
List courseList = dao.QueryObject("From SystemCourseCode");
Map map = new HashMap();
map.put("grname", listGrade);
Vector vname = new Vector();
vname.addElement("�༶����");
vname.addElement("ѧ������");
vname.addElement("�������");
vname.addElement("��������");
map.put("tname", vname);
if (examType != null && !examType.equals("")) {
examType = new String(request.getParameter("typeexam").getBytes(
"iso-8859-1"), "gb2312");
} else {
map.put("message", "�������ѯ����");
return new ModelAndView("sourceview/doc_stusource_grade_gather",
"map", map);
}
Iterator iterator = courseList.iterator();
int index = 0;
while (iterator.hasNext()) {
SystemCourseCode courseObject = (SystemCourseCode) iterator.next();
vname.addElement(courseObject.getSubject());
index++;
}
vname.addElement("�ܷ���");
String sqlSelect = null;
if (examType == null || examType.equals("")) {
sqlSelect = "select code,left(stu_id,6) as �༶����,str(sum(grade)/count(stu_id),10,2) as �༶�ɼ�,count(stu_id) as �༶���� from course_stu_info group by code,left(stu_id,6) ";
} else {
System.out.println("no null");
sqlSelect = "select code,left(stu_id,6) as �༶����,str(sum(grade)/count(stu_id),10,2) as �༶�ɼ�,count(stu_id) as �༶���� from course_stu_info where left(stu_id,2)='"+gradeid+"' and exam_type = '"
+ examType
+ "' and exam_date = '"
+ examDate
+ "' group by code,left(stu_id,6)";
}
List courseListObject = dao.QueryObjectFromSql(sqlSelect);
/*
* Iterator it = courseListObject.iterator(); while(it.hasNext()){
* Object[] results = (Object[])it.next();
*
* System.out.println(results); for(int i = 0 ; i < results.length ;
* i++){ System.out.println("������: " + results[i]); } }
*/
Object[] courseArray = courseListObject.toArray();
int count = courseArray.length;
java.util.Collection collection = new java.util.ArrayList();
int modcount = count / index;
for (int i = 0; i < modcount; i++) {
Vector vdata = new Vector();
Object[] results = (Object[]) courseArray[i * index];
String classid = String.valueOf(results[1]);
List classObjectList = dao
.QueryObject("From SystemClassInfo where classid = '"
+ classid + "'");
SystemClassInfo classobj = (SystemClassInfo) classObjectList.get(0);
vdata.addElement(classobj.getClassmc());
vdata.addElement(results[3]);
vdata.addElement(examType);
vdata.addElement(examDate);
float gradesum = 0.00f;
for (int j = 0; j < index; j++) {
Object[] course = (Object[]) courseArray[i * index + j];
vdata.addElement(course[2]);
gradesum = gradesum
+ Float.parseFloat(String.valueOf(course[2])); // �ܷ���
}
java.text.DecimalFormat formatsum = new java.text.DecimalFormat(
"#.00");
vdata.addElement(formatsum.format(gradesum));
gradesum = 0.0f;
collection.add(vdata);
}
gradeid = request.getParameter("selectmc");
if (examDate == null || examType == null) {
map.put("cdata", null);
} else {
map.put("cdata", collection);
}
map.put("oldmc", gradeid);
map.put("examType", examType);
map.put("examDate", examDate);
return new ModelAndView("sourceview/doc_stusource_grade_gather", "map",
map);
}
public DAOSupport getDao() {
return dao;
}
public void setDao(DAOSupport dao) {
this.dao = dao;
}
}
| [
"xiangshaoxiong@wavewisdom.com"
] | xiangshaoxiong@wavewisdom.com |
bd6952ebfd7daece0e470184b79a592797600616 | 1f5c9b19b09f0fad775a5bb07473690ae6b0c814 | /salebusirule/src/public/nc/vo/so/custmatrel/entity/CustMatRelBVO.java | 57b7148a60838083b682bedc0a15acf567529fd8 | [] | no_license | hdulqs/NC65_SCM_SO | 8e622a7bb8c2ccd1b48371eedd50591001cd75c0 | aaf762285b10e7fef525268c2c90458aa4290bf6 | refs/heads/master | 2020-05-19T01:23:50.824879 | 2018-07-04T09:41:39 | 2018-07-04T09:41:39 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 5,654 | java | package nc.vo.so.custmatrel.entity;
import nc.vo.pub.IVOMeta;
import nc.vo.pub.SuperVO;
import nc.vo.pub.lang.UFBoolean;
import nc.vo.pub.lang.UFDateTime;
import nc.vo.pubapp.pattern.model.meta.entity.vo.VOMetaFactory;
public class CustMatRelBVO extends SuperVO {
// 优先码
public static final String CPRIORITYCODE = "cprioritycode";
// dr
public static final String DR = "dr";
public static final String ENTITYNAME = "so.so_custmatrel_b";
// 不包含
public static final String EXCLUDE = "exclude";
// 客户基本分类
public static final String PK_CUSTBASECLASS = "pk_custbaseclass";
// 客户物料关系主实体_主键
public static final String PK_CUSTMATREL = "pk_custmatrel";
// 子实体主键
public static final String PK_CUSTMATREL_B = "pk_custmatrel_b";
// 客户
public static final String PK_CUSTOMER = "pk_customer";
// 客户销售分类
public static final String PK_CUSTSALECLASS = "pk_custsaleclass";
/** 集团 */
public static final String PK_GROUP = "pk_group";
// 物料最新版本
public static final String PK_MATERIAL = "pk_material";
// 物料编码
public static final String PK_MATERIAL_V = "pk_material_v";
// 物料基本分类
public static final String PK_MATERIALBASECLASS = "pk_materialbaseclass";
// 物料销售分类
public static final String PK_MATERIALSALECLASS = "pk_materialsaleclass";
// 销售组织
public static final String PK_ORG = "pk_org";
// 时间戳
public static final String TS = "ts";
// 行备注
public static final String VNOTE = "vnote";
/**
*
*/
private static final long serialVersionUID = 2382524269827876072L;
public String getCprioritycode() {
return (String) this.getAttributeValue(CustMatRelBVO.CPRIORITYCODE);
}
public Integer getDr() {
return (Integer) this.getAttributeValue(CustMatRelBVO.DR);
}
public UFBoolean getExclude() {
return (UFBoolean) this.getAttributeValue(CustMatRelBVO.EXCLUDE);
}
@Override
public IVOMeta getMetaData() {
IVOMeta meta =
VOMetaFactory.getInstance().getVOMeta(CustMatRelBVO.ENTITYNAME);
return meta;
}
public String getPk_custbaseclass() {
return (String) this.getAttributeValue(CustMatRelBVO.PK_CUSTBASECLASS);
}
public String getPk_custmatrel() {
return (String) this.getAttributeValue(CustMatRelBVO.PK_CUSTMATREL);
}
public String getPk_custmatrel_b() {
return (String) this.getAttributeValue(CustMatRelBVO.PK_CUSTMATREL_B);
}
public String getPk_customer() {
return (String) this.getAttributeValue(CustMatRelBVO.PK_CUSTOMER);
}
public String getPk_custsaleclass() {
return (String) this.getAttributeValue(CustMatRelBVO.PK_CUSTSALECLASS);
}
public String getPk_group() {
return (String) this.getAttributeValue(CustMatRelBVO.PK_GROUP);
}
public String getPk_material() {
return (String) this.getAttributeValue(CustMatRelBVO.PK_MATERIAL);
}
public String getPk_material_v() {
return (String) this.getAttributeValue(CustMatRelBVO.PK_MATERIAL_V);
}
public String getPk_materialbaseclass() {
return (String) this.getAttributeValue(CustMatRelBVO.PK_MATERIALBASECLASS);
}
public String getPk_materialsaleclass() {
return (String) this.getAttributeValue(CustMatRelBVO.PK_MATERIALSALECLASS);
}
public String getPk_org() {
return (String) this.getAttributeValue(CustMatRelBVO.PK_ORG);
}
public UFDateTime getTs() {
return (UFDateTime) this.getAttributeValue(CustMatRelBVO.TS);
}
public String getVnote() {
return (String) this.getAttributeValue(CustMatRelBVO.VNOTE);
}
public void setCprioritycode(String cprioritycode) {
this.setAttributeValue(CustMatRelBVO.CPRIORITYCODE, cprioritycode);
}
public void setDr(Integer dr) {
this.setAttributeValue(CustMatRelBVO.DR, dr);
}
public void setExclude(UFBoolean exclude) {
this.setAttributeValue(CustMatRelBVO.EXCLUDE, exclude);
}
public void setPk_custbaseclass(String pk_custbaseclass) {
this.setAttributeValue(CustMatRelBVO.PK_CUSTBASECLASS, pk_custbaseclass);
}
public void setPk_custmatrel(String pk_custmatrel) {
this.setAttributeValue(CustMatRelBVO.PK_CUSTMATREL, pk_custmatrel);
}
public void setPk_custmatrel_b(String pk_custmatrel_b) {
this.setAttributeValue(CustMatRelBVO.PK_CUSTMATREL_B, pk_custmatrel_b);
}
public void setPk_customer(String pk_customer) {
this.setAttributeValue(CustMatRelBVO.PK_CUSTOMER, pk_customer);
}
public void setPk_custsaleclass(String pk_custsaleclass) {
this.setAttributeValue(CustMatRelBVO.PK_CUSTSALECLASS, pk_custsaleclass);
}
public void setPk_group(String pk_group) {
this.setAttributeValue(CustMatRelBVO.PK_GROUP, pk_group);
}
public void setPk_material(String pk_material) {
this.setAttributeValue(CustMatRelBVO.PK_MATERIAL, pk_material);
}
public void setPk_material_v(String pk_material_v) {
this.setAttributeValue(CustMatRelBVO.PK_MATERIAL_V, pk_material_v);
}
public void setPk_materialbaseclass(String pk_materialbaseclass) {
this.setAttributeValue(CustMatRelBVO.PK_MATERIALBASECLASS,
pk_materialbaseclass);
}
public void setPk_materialsaleclass(String pk_materialsaleclass) {
this.setAttributeValue(CustMatRelBVO.PK_MATERIALSALECLASS,
pk_materialsaleclass);
}
public void setPk_org(String pk_org) {
this.setAttributeValue(CustMatRelBVO.PK_ORG, pk_org);
}
public void setTs(UFDateTime ts) {
this.setAttributeValue(CustMatRelBVO.TS, ts);
}
public void setVnote(String vnote) {
this.setAttributeValue(CustMatRelBVO.VNOTE, vnote);
}
}
| [
"944482059@qq.com"
] | 944482059@qq.com |
bdf603718528cf568e3739f53d8770bac4026d71 | 01ccc3af7d03e7474dfba763b3cea9e2f74645a3 | /app/src/main/java/dao/FoodDaoImpl.java | 3d328df09163f3e913eb834ffd9fed9303e9c8b5 | [] | no_license | 11612228/DB_Project | 8c3dd9a5d3779ba49429854784fe0c6d71fadf72 | cc74a82d6ec95fd2b1c753c08a28e972a4a9959d | refs/heads/master | 2020-05-17T23:46:16.903319 | 2019-05-22T03:58:15 | 2019-05-22T03:58:15 | 184,034,768 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 468 | java | package dao;
import android.os.Handler;
import okhttp3.FormBody;
import okhttp3.RequestBody;
import util.HttpManager;
public class FoodDaoImpl implements FoodDao {
@Override
public void fetchFoodList(int shopid,Handler handler) throws Exception {
String servlet = "FetchFoodServlet";
RequestBody requestBody = new FormBody.Builder().add("shopid",String.valueOf(shopid)).build();
HttpManager.send(requestBody,servlet,handler);
}
}
| [
"314575057@qq.com"
] | 314575057@qq.com |
65856b2891a0209f6396289f5c2582d2fba84b45 | 3765bd151cc39d00b6fd11bdb2b375137ec0f7e6 | /torder_service/src/main/java/com/example/torder/mapper/CompanyMapper.java | 3f1eea8284600d336f3de8ddbdb02f613e864bcc | [] | no_license | NoSugarNo996/torder | 69c6032d48e4397666d06b29b8fa04484f04bc03 | b3f34f23077826063389536a98812e67bc36ee6a | refs/heads/master | 2022-06-25T07:31:49.567776 | 2020-05-22T16:06:09 | 2020-05-22T16:06:09 | 228,954,240 | 0 | 0 | null | 2022-06-17T03:07:54 | 2019-12-19T01:54:32 | HTML | UTF-8 | Java | false | false | 1,561 | java | package com.example.torder.mapper;
import com.example.torder.domain.Company;
import com.example.torder.vo.AdvertisingVo;
import com.example.torder.vo.CompanyVo;
import java.util.List;
public interface CompanyMapper {
long getCount(CompanyVo obj);
List findList(CompanyVo obj);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company_info
*
* @mbg.generated
*/
int deleteByPrimaryKey(Integer companyId);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company_info
*
* @mbg.generated
*/
int insert(Company record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company_info
*
* @mbg.generated
*/
int insertSelective(Company record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company_info
*
* @mbg.generated
*/
CompanyVo selectByPrimaryKey(Integer companyId);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company_info
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(Company record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company_info
*
* @mbg.generated
*/
int updateByPrimaryKey(Company record);
} | [
"673722360@qq.com"
] | 673722360@qq.com |
be19f5272e919b7771784d78239d86fd2d91e4dd | 3de7e42636ff472111b9af40febf8af2314ae168 | /src/main/java/com/ants/structural/Template/TemplateAction.java | a957cb933931defdde24a972304f24c682660e96 | [] | no_license | iearl/dc_designpattern | 16808605c2765acb75fea6021b08f7350c6de140 | 3f4f62740acd049bc334ddaf45e5d7c9c6a2e9c5 | refs/heads/master | 2020-03-23T19:25:37.178907 | 2019-01-02T10:11:54 | 2019-01-02T10:11:54 | 141,976,826 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 71 | java | package com.ants.structural.Template;
public class TemplateAction {
}
| [
"dc_magaowei@163.com"
] | dc_magaowei@163.com |
132846957cf189265fba06a3ee460ca6477a0d23 | 64475809d37d4463c32aa71287a8cd8ec77b6b52 | /src/main/java/com/example/demo/repositories/StatistiqueRepo.java | 7eacab62b4171d106f957ae930b54cc27cf785b8 | [] | no_license | anwarghammam/E_Vote_Backend | 6c6cdbeb8a9cda17c502c5a288f1d945466ab209 | 949c9a1edc92bd110f281a196713a27e810392cf | refs/heads/master | 2022-02-19T07:13:08.235815 | 2020-01-21T16:41:10 | 2020-01-21T16:41:10 | 223,977,000 | 1 | 0 | null | 2022-02-10T03:06:12 | 2019-11-25T15:10:18 | Java | UTF-8 | Java | false | false | 505 | java | package com.example.demo.repositories;
import com.example.demo.Models.Candidate;
import com.example.demo.Models.Statistique;
import org.springframework.data.mongodb.repository.MongoRepository;
import java.util.List;
public interface StatistiqueRepo extends MongoRepository<Statistique,String> {
Statistique findByCandidate(Candidate candidate);
Statistique findByIdStatistique(String id) ;
Statistique findByIdVote(String idVote);
List<Statistique> findAllByIdVote(String idVote);
}
| [
"insafkh1997@gmail.com"
] | insafkh1997@gmail.com |
276842d3a389d71238510d42872890bd0d95d68c | 51fa3cc281eee60058563920c3c9059e8a142e66 | /Java/src/testcases/CWE89_SQL_Injection/s01/CWE89_SQL_Injection__connect_tcp_executeUpdate_54a.java | 3e03f3becbb2d548a49a64119f0643452a245863 | [] | no_license | CU-0xff/CWE-Juliet-TestSuite-Java | 0b4846d6b283d91214fed2ab96dd78e0b68c945c | f616822e8cb65e4e5a321529aa28b79451702d30 | refs/heads/master | 2020-09-14T10:41:33.545462 | 2019-11-21T07:34:54 | 2019-11-21T07:34:54 | 223,105,798 | 1 | 4 | null | null | null | null | UTF-8 | Java | false | false | 6,654 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE89_SQL_Injection__connect_tcp_executeUpdate_54a.java
Label Definition File: CWE89_SQL_Injection.label.xml
Template File: sources-sinks-54a.tmpl.java
*/
/*
* @description
* CWE: 89 SQL Injection
* BadSource: connect_tcp Read data using an outbound tcp connection
* GoodSource: A hardcoded string
* Sinks: executeUpdate
* GoodSink: Use prepared statement and executeUpdate (properly)
* BadSink : data concatenated into SQL statement used in executeUpdate(), which could result in SQL Injection
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
package testcases.CWE89_SQL_Injection.s01;
import testcasesupport.*;
import javax.servlet.http.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.net.Socket;
import java.util.logging.Level;
public class CWE89_SQL_Injection__connect_tcp_executeUpdate_54a extends AbstractTestCase
{
public void bad() throws Throwable
{
String data;
data = ""; /* Initialize data */
/* Read data using an outbound tcp connection */
{
Socket socket = null;
BufferedReader readerBuffered = null;
InputStreamReader readerInputStream = null;
try
{
/* Read data using an outbound tcp connection */
socket = new Socket("host.example.org", 39544);
/* read input from socket */
readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8");
readerBuffered = new BufferedReader(readerInputStream);
/* POTENTIAL FLAW: Read data using an outbound tcp connection */
data = readerBuffered.readLine();
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
finally
{
/* clean up stream reading objects */
try
{
if (readerBuffered != null)
{
readerBuffered.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO);
}
try
{
if (readerInputStream != null)
{
readerInputStream.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO);
}
/* clean up socket objects */
try
{
if (socket != null)
{
socket.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing Socket", exceptIO);
}
}
}
(new CWE89_SQL_Injection__connect_tcp_executeUpdate_54b()).badSink(data );
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
String data;
/* FIX: Use a hardcoded string */
data = "foo";
(new CWE89_SQL_Injection__connect_tcp_executeUpdate_54b()).goodG2BSink(data );
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
String data;
data = ""; /* Initialize data */
/* Read data using an outbound tcp connection */
{
Socket socket = null;
BufferedReader readerBuffered = null;
InputStreamReader readerInputStream = null;
try
{
/* Read data using an outbound tcp connection */
socket = new Socket("host.example.org", 39544);
/* read input from socket */
readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8");
readerBuffered = new BufferedReader(readerInputStream);
/* POTENTIAL FLAW: Read data using an outbound tcp connection */
data = readerBuffered.readLine();
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
finally
{
/* clean up stream reading objects */
try
{
if (readerBuffered != null)
{
readerBuffered.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO);
}
try
{
if (readerInputStream != null)
{
readerInputStream.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO);
}
/* clean up socket objects */
try
{
if (socket != null)
{
socket.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing Socket", exceptIO);
}
}
}
(new CWE89_SQL_Injection__connect_tcp_executeUpdate_54b()).goodB2GSink(data );
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"frank@fischer.com.mt"
] | frank@fischer.com.mt |
1501ab3f236d0d911327afe331050d726e68ccfe | 402e4e6d15c3886b39cd185484d17e8bdcc9300c | /backends/backend-web/src/com/github/xpenatan/gdx/backend/web/dom/typedarray/FloatArrayWrapper.java | 0471010f8255253e95d624072b6587ec16bfc911 | [
"Apache-2.0"
] | permissive | lifeweaver/gdx-html5-tools | 17683961125db3d66529e9015b9771cbfcab7956 | 7684e1392e2b8548d814de5bfbf28ba474376b51 | refs/heads/master | 2023-05-30T23:28:50.352664 | 2021-06-27T18:10:08 | 2021-06-27T18:10:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 293 | java | package com.github.xpenatan.gdx.backend.web.dom.typedarray;
/**
* @author xpenatan
*/
public interface FloatArrayWrapper {
// FloatArray
public int getLength();
public void setLength(int length);
public float getElement(int index);
public void setElement(int index, float value);
}
| [
"xpenatan@gmail.com"
] | xpenatan@gmail.com |
28ce5ef0befe3d8bda8d2380694f04a5b1ffaaaa | 34a355a62eb2469eb46928c9b87aa6732c779c3d | /src/main/java/com/schoolerp/config/hibernateConfig.java | 79d2b7adb3ad3dfa7eaefa0f6b55f19c40471220 | [] | no_license | arunpnambiar/SpringSecurity-SpringMVC-Hibernate--Noxml | 9c4800c643900a7ca2b764df9de8f152b4f485e5 | 7537eee1ccb1be7a34c2475a21e6bcedb27ec69d | refs/heads/master | 2022-12-20T06:01:25.599097 | 2020-05-29T03:04:46 | 2020-05-29T03:04:46 | 118,463,573 | 0 | 0 | null | 2022-12-16T12:25:10 | 2018-01-22T13:52:36 | Java | UTF-8 | Java | false | false | 2,993 | java | /*package com.schoolerp.config;
import java.beans.PropertyVetoException;
import java.util.Properties;
import javax.sql.DataSource;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.orm.hibernate5.HibernateTransactionManager;
import org.springframework.orm.hibernate5.LocalSessionFactoryBean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import com.mchange.v2.c3p0.ComboPooledDataSource;
@Configuration
@EnableTransactionManagement
@ComponentScan({"com.schoolerp.config"})
@PropertySource(value={"classpath:application.properties"})
public class hibernateConfig {
@Autowired
private Environment environment;
@Bean
public LocalSessionFactoryBean sessionFactory() {
LocalSessionFactoryBean sessionFactory =new LocalSessionFactoryBean();
sessionFactory.setDataSource(datasource());
sessionFactory.setPackagesToScan(new String[] {"com.schoolerp.model"});
sessionFactory.setHibernateProperties(hibernateProperty());
return sessionFactory;
}
private Properties hibernateProperty() {
Properties properties=new Properties();
properties.put("hibernate.dialect",environment.getRequiredProperty("hibernate.dialect") );
properties.put("hibernate.show_sql",environment.getRequiredProperty("hibernate.show_sql") );
properties.put("hibernate.format_sql",environment.getRequiredProperty("hibernate.format_sql") );
return properties;
}
@Bean
public DataSource datasource() {
ComboPooledDataSource datasource = new ComboPooledDataSource();
try {
datasource.setDriverClass("com.mysql.jdbc.Driver");
} catch (PropertyVetoException e) {
e.printStackTrace();
}
datasource.setJdbcUrl(environment.getRequiredProperty("database.url"));
datasource.setUser(environment.getRequiredProperty("database.username"));
datasource.setPassword(environment.getRequiredProperty("database.password"));
datasource.setInitialPoolSize(Integer.parseInt(environment.getProperty("connection.pool.initialPoolSize")));
datasource.setMinPoolSize(Integer.parseInt(environment.getProperty("connection.pool.minPoolSize")));
datasource.setMaxPoolSize(Integer.parseInt(environment.getProperty("connection.pool.maxPoolSize")));
datasource.setMaxIdleTime(Integer.parseInt(environment.getProperty("connection.pool.maxIdleTime")));
return datasource;
}
@Bean
@Autowired
public HibernateTransactionManager transactionManager(SessionFactory s) {
HibernateTransactionManager txManager = new HibernateTransactionManager();
txManager.setSessionFactory(s);
return txManager;
}
}
*/ | [
"arunp.arunp15@gmail.com"
] | arunp.arunp15@gmail.com |
8654c24233a2dc948c4681f58f4e38cf5c042e9c | b7af38bc94694ac244526bbb266f4d9e4a1884ea | /taobei-manager/taobei-manager-web/src/main/java/com/taobei/controller/ItemCatController.java | 60133945e2b7ad428235752ab38772b91a43ac76 | [] | no_license | HuaZohar/taobei-manager | 622d4304920de0a85b694167962691c5079da10f | a3275d8f1a639c54c23c055ca8bf9e395168309a | refs/heads/master | 2021-09-04T11:42:15.412137 | 2018-01-18T10:17:18 | 2018-01-18T10:17:18 | 108,736,863 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 789 | java | package com.taobei.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.taobei.common.pojo.EasyUITreeNode;
import com.taobei.service.ItemCatService;
@Controller
@RequestMapping("item/cat")
public class ItemCatController {
@Autowired
private ItemCatService itemCatService;
@ResponseBody
@RequestMapping("/list")
public List<EasyUITreeNode> getItemCatList(@RequestParam(value="id",defaultValue="0") long parentId) throws Exception{
return itemCatService.getItemCatList(parentId);
}
}
| [
"358824891"
] | 358824891 |
d71266f446c6290f6c056fff32e799f14077ddae | ace65ad2aa067fd55842b9a048a6bcc361c75c2f | /src/test/java/com/stepdefinitions/AddCustomerSteps.java | b8936ae5c73ab3520c3c6f1a0cb5a9b1b26a2540 | [] | no_license | sakthimurugan18/JenkinsProject | 69ae9b3fc74458cf839d6343f10562357f5670c2 | da3a5404214b85b79a8a0b5e6a54d823ca66833b | refs/heads/master | 2021-07-12T20:00:29.133299 | 2019-09-19T11:23:46 | 2019-09-19T11:23:46 | 209,534,762 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,614 | java | package com.stepdefinitions;
import java.util.List;
import java.util.Map;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import io.cucumber.datatable.DataTable;
public class AddCustomerSteps {
static WebDriver driver = null;
@Given("User should be in the telecom home pages")
public void user_should_be_in_the_telecom_home_pages() {
System.setProperty("webdriver.chrome.driver",
"C:\\Users\\ELCOT\\Selenium-workspace\\CucumberBasic\\Driver\\chromedriver.exe");
driver = new ChromeDriver();
driver.get("http://demo.guru99.com/telecom/");
driver.manage().window().maximize();
}
@Given("click add customer buttons")
public void click_add_customer_buttons() {
driver.findElement(By.xpath("(//a[text()='Add Customer'])[1]")).click();
}
@When("User enter all the data.")
public void user_enter_all_the_data(DataTable ltable) {
List<String> Lists = ltable.asList(String.class);
driver.findElement(By.xpath("//label[@for='done']")).click();
driver.findElement(By.id("fname")).sendKeys(Lists.get(0));
driver.findElement(By.id("lname")).sendKeys(Lists.get(1));
driver.findElement(By.id("email")).sendKeys(Lists.get(2));
driver.findElement(By.name("addr")).sendKeys(Lists.get(3));
driver.findElement(By.id("telephoneno")).sendKeys(Lists.get(4));
}
@When("User enter all the data for map.")
public void user_enter_all_the_data_for_map(DataTable mtable) {
Map<String, String> Maps = mtable.asMap(String.class, String.class);
driver.findElement(By.xpath("//label[@for='done']")).click();
driver.findElement(By.id("fname")).sendKeys(Maps.get("fname"));
driver.findElement(By.id("lname")).sendKeys(Maps.get("lname"));
driver.findElement(By.id("email")).sendKeys(Maps.get("email"));
driver.findElement(By.name("addr")).sendKeys(Maps.get("address"));
driver.findElement(By.id("telephoneno")).sendKeys(Maps.get("phno"));
}
@When("click on submit buttons")
public void click_on_submit_buttons() throws Exception {
Thread.sleep(3000);
driver.findElement(By.xpath("//input[@type='submit']")).click();
}
@Then("user should be displayed customer id is enteredd")
public void user_should_be_displayed_customer_id_is_enteredd() {
WebElement cstId = driver.findElement(By.xpath("(//td[@align='center'])[2]"));
Assert.assertTrue(cstId.isDisplayed());
driver.quit();
}
}
| [
"satzg.57@gmail.com"
] | satzg.57@gmail.com |
bce2542b4bba068e6910be8e1f43b8dfa52ebfd7 | f9566e08c9b7ba38df6c1a75a3b3a2bd17ca5c9e | /src/main/java/com/jjh/common/DefaultController.java | e972e4a992253497800a652d259de26ccce13ca1 | [] | no_license | hwan5417/jjh-springweb | 297e1fee045a2ea3e6136d0a3d4cafb188bf384a | 82ac0a4024e243b7172e6eb8d23e5829031780d4 | refs/heads/master | 2020-05-21T05:22:23.073657 | 2019-06-07T04:42:02 | 2019-06-07T04:42:02 | 185,920,947 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 504 | java | package com.jjh.common;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
/**
* Default mapping controller<br/>
* 매핑이 없는 URL은 URL과 같은 view로 forward
*/
@Controller
public class DefaultController {
static final Logger logger = LogManager.getLogger();
@GetMapping("/**")
public void mapDefault() {
logger.debug("Map default.");
}
} | [
"hwan5417@naver.com"
] | hwan5417@naver.com |
db741d472d97e63a02514cef2112dc2a51190a04 | 13290ad8549d98a969e8f81e9ea9f0908f38643e | /plugProject/LockCommLib/src/main/java/cn/zelkova/lockprotocol/LockCmdExSecurityKeyResponse.java | 3d78b060092e9b8850b1d7ffea65decec5c64bdb | [
"Apache-2.0"
] | permissive | hackpanda/NewXmPluginSDK-master | 4774dc077eb8578bdb38c0d1a6e960d13006f6b9 | 8566f48c75ae73da779826c9de3e14ff5371c95c | refs/heads/master | 2021-04-06T06:50:46.699871 | 2018-03-14T11:01:38 | 2018-03-14T11:01:38 | 125,344,872 | 1 | 0 | null | 2018-03-15T09:40:57 | 2018-03-15T09:40:57 | null | UTF-8 | Java | false | false | 2,177 | java | package cn.zelkova.lockprotocol;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
/**
* 交换密钥返回命令
*
* @author zp
*/
public class LockCmdExSecurityKeyResponse extends LockCmdResponse {
/*
* 这个类要与 LockCmdExSecurityKey保持一致,他们两个只差一个resultCode
* 但是由于逻辑含义不同,所以分开写了,所以在维护的时候要保持一致
*/
public static final byte CMD_ID =0x07;
public LockCmdExSecurityKeyResponse(
byte[] targetMac, BriefDate validFrom, BriefDate validTo,
short resultCode, byte[] secKey, String lockid) {
super(targetMac, validFrom, validTo, resultCode, lockid);
this.secKey =secKey;
}
LockCmdExSecurityKeyResponse(){}
private byte[] secKey;
public byte[] getSecKey() {
return this.secKey;
}
public byte getSecKeyLen() {
return (byte) this.secKey.length;
}
@Override
protected void parsePayload(LittleEndianInputStream input) {
try {
byte secKeyLen =input.readByte();
this.secKey = new byte[secKeyLen];
input.read(this.secKey);
} catch (IOException e) {
e.printStackTrace();//EOF会么?其他我觉得这个地方不应该有什么错误
throw new LockFormatException("解析Comm时异常:" + e.getMessage(), e);
}
}
@Override
public byte getCmdId() { return CMD_ID; }
@Override
public String getCmdName() { return "exSecKeyResp"; }
@Override
protected byte[] getPayload() {
ByteArrayOutputStream baos =new ByteArrayOutputStream();
LittleEndianOutputStream out =new LittleEndianOutputStream(baos);
try {
out.write(super.getPayload()); //resultCode
out.writeByte(getSecKeyLen());
out.write(getSecKey());
} catch (IOException e) {
e.printStackTrace();
throw new LockFormatException("LockCmdSetTime:"+e.getMessage(), e);
}
return baos.toByteArray();
}
}
| [
"328073180@qq.com"
] | 328073180@qq.com |
e8e8e596f33ea234aac554e332b7e4b51fa3c328 | d4810a021135c92eff43324c365af791ddba89b2 | /app/src/main/java/com/example/testnbalistview/adapter/NbanewsAdapter.java | 5fe8d059086ed35ad1089692586a77c593923288 | [] | no_license | Superx1x/TestNbaListview | 6faad58681f0be7b5d00a0f305147f9e71be0fdd | 73fc3209f099c4ccf0716f32d58a47f59b52932b | refs/heads/master | 2020-08-30T05:42:53.202885 | 2019-10-29T12:21:53 | 2019-10-29T12:21:53 | 218,280,363 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,667 | java | package com.example.testnbalistview.adapter;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.example.testnbalistview.Model.Nbanews;
import com.example.testnbalistview.R;
import java.util.ArrayList;
public class NbanewsAdapter extends MyBaseAdapter<Nbanews> {
public NbanewsAdapter(Context context, ArrayList<Nbanews> dataList) {
super(context, dataList);
}
@Override
protected void rowSelected(Nbanews song, int index) {
Toast.makeText(context,"News",Toast.LENGTH_SHORT).show();
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
if(convertView == null){
convertView = inflater.inflate(R.layout.ada_news,null);
}
final Nbanews nbanews = dataList.get(position);
ImageView newsLeftT = convertView.findViewById(R.id.img_newsLeftT);
byte[] baLT = nbanews.getLtphoto();
if(baLT != null){
Bitmap bmLT = BitmapFactory.decodeByteArray(baLT,0,baLT.length);
newsLeftT.setImageBitmap(bmLT);
}
newsLeftT.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent it = new Intent();
it.setAction(Intent.ACTION_VIEW);
String LThttp = nbanews.getLthttp();
it.setData(Uri.parse(LThttp));
context.startActivity(it);
}
});
ImageView newsLeftB = convertView.findViewById(R.id.img_newsLeftB);
byte[] baLB = nbanews.getLbphoto();
if(baLB != null){
Bitmap bmLB = BitmapFactory.decodeByteArray(baLB,0,baLB.length);
newsLeftB.setImageBitmap(bmLB);
}
newsLeftB.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent it = new Intent();
it.setAction(Intent.ACTION_VIEW);
String LBhttp = nbanews.getLbhttp();
it.setData(Uri.parse(LBhttp));
context.startActivity(it);
}
});
ImageView newsRightT = convertView.findViewById(R.id.img_newsRightT);
byte[] baRT = nbanews.getRtphoto();
if(baRT != null){
Bitmap bmRT = BitmapFactory.decodeByteArray(baRT,0,baRT.length);
newsRightT.setImageBitmap(bmRT);
}
newsRightT.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent it = new Intent();
it.setAction(Intent.ACTION_VIEW);
String Rthttp = nbanews.getRthttp();
it.setData(Uri.parse(Rthttp));
context.startActivity(it);
}
});
ImageView newsRightB = convertView.findViewById(R.id.img_newsRightB);
byte[] baRB = nbanews.getRbphoto();
if(baRB != null){
Bitmap bmRB = BitmapFactory.decodeByteArray(baRB,0,baRB.length);
newsRightB.setImageBitmap(bmRB);
}
newsRightB.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent it = new Intent();
it.setAction(Intent.ACTION_VIEW);
//String Rbhttp = nbanews.getRbhttp();
it.setData(Uri.parse(nbanews.getRbhttp()));
context.startActivity(it);
}
});
TextView tvnewsLeftT = convertView.findViewById(R.id.tv_newsLeftT);
tvnewsLeftT.setText(nbanews.getLttitle());
TextView tvnewsLeftB = convertView.findViewById(R.id.tv_newsLeftB);
tvnewsLeftB.setText(nbanews.getLbtitle());
TextView tvnewsRightT = convertView.findViewById(R.id.tv_newsRightT);
tvnewsRightT.setText(nbanews.getRttitle());
TextView tvnewsRightB = convertView.findViewById(R.id.tv_newsRightB);
tvnewsRightB.setText(nbanews.getRbtitle());
TextView tvreportTime = convertView.findViewById(R.id.tv_reportTime);
String reportTime = nbanews.getReportTime();
String month = reportTime.substring(5,6);
String day = reportTime.substring(6,8);
String date = String.format(" %s月%s日 ",month,day);
tvreportTime.setText(date);
return convertView;
}
}
| [
"superx1x@hotmail.com"
] | superx1x@hotmail.com |
d770e187159f6df0803ed220e61f04da9878a97f | 1ce91d49eee50f361e4f78883abfeedebb690425 | /Wishlist/app/src/main/java/com/example/wishlist/Classesapp/ListAndProductDatabase.java | 10f0df919d381ca35abd05fb711f0d8f900cd71c | [] | no_license | gdeside/LSINF1225-2020-Groupe4.3-WishList | 2b320789d1608b6b8932840de5826696a6cde8cf | ea336efba931e2de59fa711fb5ef9d700089a2cc | refs/heads/master | 2022-07-05T01:23:43.821755 | 2020-05-14T14:52:56 | 2020-05-14T14:52:56 | 244,350,692 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 318 | java | package com.example.wishlist.Classesapp;
import androidx.room.Database;
import androidx.room.RoomDatabase;
@Database(entities = {ListAndProduct.class},version = 1, exportSchema = false)
public abstract class ListAndProductDatabase extends RoomDatabase {
public abstract ListAndProductDAO listAndProductDAO();
}
| [
"ademblon@oasis.uclouvain.be"
] | ademblon@oasis.uclouvain.be |
1f37fc038724a9aded7fd636bc71574909832d47 | ff61fcb54e788a952d761d8711dd6c7cdeaa2288 | /Topical_Crawler_Advanced/src/classfication/ChineseTokenizer.java | 763ecf01005eb618bdd8497636f1f147109709a1 | [] | no_license | zshellzhang1993-2025/GraduationDesign | 070ad01f8e3546782693369cc22230fce40ed5ad | 0fa6583307bf7fba103eef692043be008fb13bdb | refs/heads/master | 2021-05-31T19:07:36.478392 | 2016-05-20T05:56:13 | 2016-05-20T05:56:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,480 | java | package classfication;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import org.wltea.analyzer.core.IKSegmenter;
import org.wltea.analyzer.core.Lexeme;
public class ChineseTokenizer {//分词采用es-ik实现,返回LinkedHashMap的分词
public static Map<String, Long> segStr(String content){
// 分词
// content=content.regex("^[\u4E00-\u9FFF]+$");
// System.out.println(content);
Reader input = new StringReader(content);
// 智能分词关闭(对分词的精度影响很大)
IKSegmenter iks = new IKSegmenter(input, true);
Lexeme lexeme = null;
Map<String, Long> words = new LinkedHashMap<String, Long>();
try {
while ((lexeme = iks.next()) != null) {
if (words.containsKey(lexeme.getLexemeText())) {
words.put(lexeme.getLexemeText(), words.get(lexeme.getLexemeText()) + 1);
} else {
words.put(lexeme.getLexemeText(), 1L);
}
}
}catch(IOException e) {
e.printStackTrace();
}
// System.out.println(words);
return words;
}
public static Map<String, Long> segStr1(String content){
// 分词
// content=content.regex("^[\u4E00-\u9FFF]+$");
// System.out.println(content);
Reader input = new StringReader(content);
// 智能分词关闭(对分词的精度影响很大)
IKSegmenter iks = new IKSegmenter(input, true);
Lexeme lexeme = null;
Map<String, Long> words = new LinkedHashMap<String, Long>();
try {
while ((lexeme = iks.next()) != null) {
if (words.containsKey(lexeme.getLexemeText())) {
words.put(lexeme.getLexemeText(), words.get(lexeme.getLexemeText()) + 1);
} else {
words.put(lexeme.getLexemeText(), 1L);
}
}
}catch(IOException e) {
e.printStackTrace();
}
// System.out.println(words);
return words;
}
public static void main(String[] args)
{
String str="我们现在好了吗是这样的吗";
Set<String> s=segStr(str).keySet();
//s=DefaultStopWordsHandler.dropStopWords(s);
for(String st:s)
{
System.out.println(st);
}
}
} | [
"zshell.zhang@qunar.com"
] | zshell.zhang@qunar.com |
2aa4f121ad774157daa2c3c9ae107e2b62d8a9d7 | 290d88485c3e5eaf8330f238a17a96627e9b2d3f | /src/walkthrough/Login.java | 3b64a39dc7bc98d07b8569992068a739535a6e78 | [] | no_license | Jdavidso1/SeleniumTesting | 6c92c65ce280dbf53be2799c06eaaef033621885 | 2c4230ac2c111f9ef7df1a33cc7bb5024248c70a | refs/heads/main | 2023-03-09T16:18:12.924155 | 2021-02-24T01:04:07 | 2021-02-24T01:04:07 | 337,782,361 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,231 | java | package walkthrough;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Login {
public static void main(String[] args) {
// 1. Define the web driver (chrome)
System.setProperty("webdriver.chrome.driver", "C:\\Users\\JDAVI\\OneDrive\\Documents\\BACKUPS\\ACADEMYPGH\\PROJECTS\\Testing\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
// 2. Open web browser and navigate to page
driver.get("http://automationpractice.com/index.php?controller=authentication&back=my-account");
//Find elements: locate the element, determine the action, pass any parameters
// 3. Enter email address
driver.findElement(By.name("email")).sendKeys("test1@email.com");
// 4. Enter Password
driver.findElement(By.name("passwd")).sendKeys("Experiment1");
// 5. Click Login
driver.findElement(By.name("SubmitLogin")).click();
// 6. Get confirmation
String confirm = driver.findElement(By.className("info-account")).getText();
System.out.println("CONFIRMATION: " + confirm);
String pageTitle = driver.getTitle();
System.out.println("PAGE TITLE: " + pageTitle);
// 7. Close the browser
driver.close();
}
} | [
"jdavidso1@hotmail.com"
] | jdavidso1@hotmail.com |
d7ddd5ff83d9eaf5e525c3f4eec391b8cd83ee89 | 4a76b22fddd1430d994b67508544290922cdb3bc | /cafeteria-manage-api/src/main/java/com/poppo/dallab/cafeteria/domain/Menu.java | 09abf80b019d0e471db7e9aa0623013e6b956681 | [] | no_license | ccf05017/cafeteria-manage | 9e12fbe1bd93b608de51406e8db92304480f7306 | 310f672482713ac4ae34e4d23c10606e0b7833ff | refs/heads/master | 2020-08-03T12:35:15.835268 | 2020-03-07T08:12:53 | 2020-03-07T08:12:53 | 211,233,566 | 0 | 0 | null | 2019-09-27T04:04:45 | 2019-09-27T04:04:45 | null | UTF-8 | Java | false | false | 402 | java | package com.poppo.dallab.cafeteria.domain;
import lombok.*;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
@Builder
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class Menu {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Long id;
@Setter
String name;
}
| [
"saul@BcTech-Saului-MacBookPro.local"
] | saul@BcTech-Saului-MacBookPro.local |
91cfcb25e3063e3cb9bb3af56e2ce91485aaafe7 | 92778e38bca5b2b34f0aab7f52adaeaad210a892 | /src/Comprovacions/ValidaData.java | a886bb890f68ad6b2683b2fb0b4ce673dd38596c | [] | no_license | MariOrtega/EasyCheckDesktop3 | b0a7668946e60c939bc17a9d7dfbccfaa427fbf8 | 0cdae1b188d2ba297e28bfae644d540c2eb9c487 | refs/heads/master | 2021-08-24T21:06:27.798581 | 2017-11-21T12:11:54 | 2017-11-21T12:11:54 | 109,157,496 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,522 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Comprovacions;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import javax.swing.JOptionPane;
/**
*
* @author Maria
*
* Classe creada per comprova la validesa d'una data
*/
public class ValidaData {
/**
* @author Maria
*
* Mètode per comprovar la correcta validesa d'una data.
* @param day
* @param month
* @param year
* @return boolean. Si la data és correcta i existeix retornarà true, en cas
* contrari false.
*/
public static boolean checkDay(int day, int month, int year) {
boolean valid = false;
if (day >= 1) {
/**
* Mesos de 30 dies
*/
if ((month == 4 || month == 6 || month == 9 || month == 11) && day <= 30) {
valid = true;
}
/**
* Mesos de 31 dies
*/
if ((month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) && day <= 31) {
valid = true;
}
/**
* Mes i any de traspàs
*/
if (month == 2) {
if (day <= 28) {
valid = true;
} else if (day == 29) {
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
valid = true;
}
}
}
}
return valid;
}
/**
* @author Maria
* Mètode que comprova si la data introduida per paràmetre es posterior a la data actual
*
* @param dataSeleccionada.
* @return
*/
public static boolean comprovaData(String dataSeleccionada) {
Calendar calendar = Calendar.getInstance();
int year = (calendar.get(Calendar.YEAR));
int day = calendar.get(Calendar.DAY_OF_MONTH);
int month = calendar.get(Calendar.MONTH) + 1;
String dataActual = (day + "/" + month + "/" + year);
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
Date dataActual_parseada = sdf.parse(dataActual, new ParsePosition(0));
Date dataSeleccionada_parseada = sdf.parse(dataSeleccionada, new ParsePosition(0));
return dataActual_parseada.before(dataSeleccionada_parseada);
}
/**
* @author Maria
* Mètode que comprova al formulari serveis si l'origen i el desti estan completament omplert.
* En cas de falta de dades retornarà false
* També comprova si s'està assignat un servei a l'Administrador. Aquest no està autoritzat a
* l'assignació de serveis
* @param o origen al formulari
* @param d desti al formulari
* @param t treballador a qui se li assigna el servei
* @return boolea amb el resultat de la comprovació
*/
public static boolean comprovaFormulari(String o, String d, int t) {
if (o.equals("") || d.equals("")) {
JOptionPane.showMessageDialog(null, "falten dades!!!");
return false;
} else if (t == 1) {
JOptionPane.showMessageDialog(null, "Administrador no pot tindre serveis!!!");
return false;
} else {
return true;
}
}
}
| [
"remediosortegacobo@gmail.com"
] | remediosortegacobo@gmail.com |
d70bdf0c2ba97aa283d965e675dcbf040b4794e3 | daf1e869d662910bad5e8304c39720e2b051f909 | /src/main/java/com/project/rko/life/service/MailService.java | 5211b3762057713d3a2114ec5cb2913957c361af | [] | no_license | ruddnr88/life | 40cf4369d58b7dae59b488d6b90b317c821b1eec | 7a02a54de739598a865b3677e9b6c0b4109a6986 | refs/heads/master | 2022-12-26T18:38:31.601167 | 2020-10-06T04:47:33 | 2020-10-06T04:47:33 | 288,313,016 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,140 | java | package com.project.rko.life.service;
import java.io.UnsupportedEncodingException;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.stereotype.Service;
import com.project.rko.life.dto.ResultData;
@Service
public class MailService {
@Autowired
private JavaMailSender sender;
@Value("${custom.emailFrom}")
private String emailFrom;
@Value("${custom.emailFromName}")
private String emailFromName;
private static class MailHandler {
private JavaMailSender sender;
private MimeMessage message;
private MimeMessageHelper messageHelper;
public MailHandler(JavaMailSender sender) throws MessagingException {
this.sender = sender;
this.message = this.sender.createMimeMessage();
this.messageHelper = new MimeMessageHelper(message, true, "UTF-8");
}
public void setFrom(String mail, String name) throws UnsupportedEncodingException, MessagingException {
messageHelper.setFrom(mail, name);
}
public void setTo(String mail) throws MessagingException {
messageHelper.setTo(mail);
}
public void setSubject(String subject) throws MessagingException {
messageHelper.setSubject(subject);
}
public void setText(String text) throws MessagingException {
messageHelper.setText(text, true);
}
public void send() {
try {
sender.send(message);
} catch (Exception e) {
e.printStackTrace();
}
}
}
public ResultData send(String email, String title, String body) {
MailHandler mail;
try {
mail = new MailHandler(sender);
mail.setFrom(emailFrom.replaceAll(" ", ""), emailFromName);
mail.setTo(email);
mail.setSubject(title);
mail.setText(body);
mail.send();
} catch (Exception e) {
e.printStackTrace();
return new ResultData("F-1", "메일이 실패하였습니다.");
}
return new ResultData("S-1", "메일이 발송되었습니다.");
}
}
| [
"ruddnr88@naver.com"
] | ruddnr88@naver.com |
98ddfae842345396e9a7d4f4f8973b22d8687604 | f625f14dbbe308da8890dbdcea5a7cd889ec8099 | /xunfeng-shiro-jwt/src/main/java/com/xunfeng/config/ShiroConfig.java | 7e901c9b5c046f8841a2ef34f7bf49a28350b220 | [] | no_license | xunfeng324/springboot-xunfeng | 5335cf23455a108d9d6d24de9204dd8b4fdf32e4 | a5fdc850f33b34bab06f65bf88e4b32d05ee78af | refs/heads/master | 2023-07-15T18:46:27.834406 | 2021-08-23T03:55:25 | 2021-08-23T03:55:25 | 394,514,746 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,344 | java | package com.xunfeng.config;
import com.xunfeng.filter.JWTFilter;
import com.xunfeng.shiro.CustomRealm;
import org.apache.shiro.mgt.DefaultSessionStorageEvaluator;
import org.apache.shiro.mgt.DefaultSubjectDAO;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.spring.LifecycleBeanPostProcessor;
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.Filter;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* ShiroConfig:shiro 配置类,配置哪些拦截,哪些不拦截,哪些授权等等各种配置都在这里
* <p>
* 很多都是老套路,按照这个套路配置就行了
*/
/**
* @description Shiro配置类
*/
@Configuration
public class ShiroConfig {
/**
* 先经过token过滤器,如果检测到请求头存在 token,则用 token 去 login,接着走 Realm 去验证
*/
@Bean
public ShiroFilterFactoryBean factory(SecurityManager securityManager) {
ShiroFilterFactoryBean factoryBean = new ShiroFilterFactoryBean();
// 添加自己的过滤器并且取名为jwt
Map<String, Filter> filterMap = new LinkedHashMap<>();
//设置我们自定义的JWT过滤器
filterMap.put("jwt", new JWTFilter());
factoryBean.setFilters(filterMap);
factoryBean.setSecurityManager(securityManager);
// 设置无权限时跳转的 url;
factoryBean.setUnauthorizedUrl("/unauthorized/无权限");
Map<String, String> filterRuleMap = new HashMap<>();
// 所有请求通过我们自己的JWT Filter
filterRuleMap.put("/**", "jwt");
// 放行不需要权限认证的接口
//放行Swagger接口
filterRuleMap.put("/v2/api-docs", "anon");
filterRuleMap.put("/swagger-resources/configuration/ui", "anon");
filterRuleMap.put("/swagger-resources", "anon");
filterRuleMap.put("/swagger-resources/configuration/security", "anon");
filterRuleMap.put("/swagger-ui.html", "anon");
filterRuleMap.put("/webjars/**", "anon");
//放行登录接口和其他不需要权限的接口
filterRuleMap.put("/login", "anon");
filterRuleMap.put("/unauthorized/**", "anon");
factoryBean.setFilterChainDefinitionMap(filterRuleMap);
return factoryBean;
}
/**
* 注入 securityManager
*/
@Bean
public SecurityManager securityManager(CustomRealm customRealm) {
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
// 设置自定义 realm.
securityManager.setRealm(customRealm);
/*
* 关闭shiro自带的session
*/
DefaultSubjectDAO subjectDAO = new DefaultSubjectDAO();
DefaultSessionStorageEvaluator defaultSessionStorageEvaluator = new DefaultSessionStorageEvaluator();
defaultSessionStorageEvaluator.setSessionStorageEnabled(false);
subjectDAO.setSessionStorageEvaluator(defaultSessionStorageEvaluator);
securityManager.setSubjectDAO(subjectDAO);
return securityManager;
}
/**
* 添加注解支持
*/
@Bean
public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
// 强制使用cglib,防止重复代理和可能引起代理出错的问题
defaultAdvisorAutoProxyCreator.setProxyTargetClass(true);
return defaultAdvisorAutoProxyCreator;
}
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) {
AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
advisor.setSecurityManager(securityManager);
return advisor;
}
@Bean
public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
return new LifecycleBeanPostProcessor();
}
}
| [
"xunfeng324@163.com"
] | xunfeng324@163.com |
b6193206c2f39c4e4a91ce7fee67d20de7599317 | f26d4d51df9323ab19c694b7ea98c9eddda53f3f | /SoftwareTechnologies/WebTechnologyLanguageSpecifics/src/EnglishNameOfLastDigit.java | c7b6f9f7a83d741479372c960a3722d2025b197e | [] | no_license | MaximilianGeorgiev/SoftwareUniversity | 0c2d1de2b8df2edfd4ec2b30530c9d9d847c68fc | cf95ceb5dfe502bf919753cd4750c82afb8709d7 | refs/heads/master | 2021-01-12T17:44:24.617611 | 2017-04-15T13:56:13 | 2017-04-15T13:56:13 | 71,634,654 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,275 | java | import java.util.Scanner;
public class EnglishNameOfLastDigit {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String inputAsString = input.nextLine();
System.out.println(returnDigitName(inputAsString));
}
public static String returnDigitName(String inputAsString) {
char lastDigit = inputAsString.charAt(inputAsString.length() - 1);
String EnglishName = "";
if(lastDigit == '1'){
EnglishName = "one";
}
else if(lastDigit == '2'){
EnglishName = "two";
}
else if(lastDigit == '3'){
EnglishName = "three";
}
else if(lastDigit == '4'){
EnglishName = "four";
}
else if(lastDigit == '5'){
EnglishName = "five";
}
else if(lastDigit == '6'){
EnglishName = "six";
}
else if(lastDigit == '7'){
EnglishName = "seven";
}
else if(lastDigit == '8'){
EnglishName = "eight";
}
else if(lastDigit == '9'){
EnglishName = "nine";
}
else if(lastDigit == '0'){
EnglishName = "zero";
}
return EnglishName;
}
}
| [
"scissorhands.tw@gmail.com"
] | scissorhands.tw@gmail.com |
b32ca978a5de2f0d03a77c88f5bd5432bb3dc82b | fd4fdcd019be9def8c935a5a6b3a9b19d1426711 | /android/app/src/main/java/com/cargoflowers/SplashActivity.java | cd4b258887ae760d3ce419313de786179ddd9194 | [
"MIT"
] | permissive | kliker02/ErrorJar | 7be167182db8aed95f52f4bd2bb19298328ed24c | b00cc856bdf606cb3342d42362907caca3b7862d | refs/heads/master | 2022-10-22T08:20:55.575667 | 2020-06-11T22:26:11 | 2020-06-11T22:26:11 | 271,656,857 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 424 | java | package com.cargoflowers;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
finish();
}
} | [
"laker.tv@bk.ru"
] | laker.tv@bk.ru |
c16812684c1a5433fa7de7fe3e52079685f46aa2 | d0991270544d6b801250f641bb8c467a3a315c16 | /cosmo-core/src/main/java/org/unitedinternet/cosmo/model/hibernate/HibTicket.java | b0c9378d44db4c0f633b609ab70325121a93bdb0 | [
"Apache-2.0"
] | permissive | dvelopp/cosmo | d136c95f4c8763842cd7c9a113f56ef28ca39b48 | c967a76d83b13f6547063983e9695d6fb5aae764 | refs/heads/master | 2021-01-11T18:06:28.081477 | 2017-01-23T21:09:32 | 2017-01-23T21:09:32 | 79,495,795 | 0 | 0 | null | 2017-01-19T21:13:25 | 2017-01-19T21:13:24 | null | UTF-8 | Java | false | false | 9,088 | java | /*
* Copyright 2006 Open Source Applications Foundation
*
* 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.
*/
package org.unitedinternet.cosmo.model.hibernate;
import java.nio.charset.Charset;
import java.util.Calendar;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.annotations.Index;
import org.unitedinternet.cosmo.model.Item;
import org.unitedinternet.cosmo.model.Ticket;
import org.unitedinternet.cosmo.model.TicketType;
import org.unitedinternet.cosmo.model.User;
/**
* Hibernate persistent Ticket.
*/
@Entity
@Table(name="tickets")
public class HibTicket extends HibAuditableObject implements Comparable<Ticket>, Ticket {
private static final long serialVersionUID = -3333589463226954251L;
@Column(name = "ticketkey", unique = true, nullable = false, length = 255)
@NotNull
private String key;
@Column(name = "tickettimeout", nullable = false, length=255)
private String timeout;
@ElementCollection
@JoinTable(
name="ticket_privilege",
joinColumns = @JoinColumn(name="ticketid")
)
@Fetch(FetchMode.JOIN)
@Column(name="privilege", nullable=false, length=255)
private Set<String> privileges;
@Column(name = "creationdate")
@org.hibernate.annotations.Type(type="timestamp")
private Date created;
@ManyToOne(targetEntity=HibUser.class, fetch = FetchType.LAZY)
@JoinColumn(name = "ownerid")
private User owner;
@ManyToOne(targetEntity=HibItem.class, fetch=FetchType.LAZY)
@JoinColumn(name="itemid")
private Item item;
/**
*/
public HibTicket() {
privileges = new HashSet<String>();
}
/**
*/
public HibTicket(TicketType type) {
this();
setTypePrivileges(type);
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#getKey()
*/
public String getKey() {
return key;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#setKey(java.lang.String)
*/
public void setKey(String key) {
this.key = key;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#getTimeout()
*/
public String getTimeout() {
return timeout;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#setTimeout(java.lang.String)
*/
public void setTimeout(String timeout) {
this.timeout = timeout;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#setTimeout(java.lang.Integer)
*/
public void setTimeout(Integer timeout) {
this.timeout = "Second-" + timeout;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#getPrivileges()
*/
public Set<String> getPrivileges() {
return privileges;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#setPrivileges(java.util.Set)
*/
public void setPrivileges(Set<String> privileges) {
this.privileges = privileges;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#getType()
*/
public TicketType getType() {
if (privileges.contains(PRIVILEGE_READ)) {
if (privileges.contains(PRIVILEGE_WRITE)) {
return TicketType.READ_WRITE;
}
else {
return TicketType.READ_ONLY;
}
}
if (privileges.contains(PRIVILEGE_FREEBUSY)) {
return TicketType.FREE_BUSY;
}
return null;
}
private void setTypePrivileges(TicketType type) {
for (String p : type.getPrivileges()) {
privileges.add(p);
}
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#getCreated()
*/
public Date getCreated() {
return created;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#setCreated(java.util.Date)
*/
public void setCreated(Date created) {
this.created = created;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#getOwner()
*/
public User getOwner() {
return owner;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#setOwner(org.unitedinternet.cosmo.model.User)
*/
public void setOwner(User owner) {
this.owner = owner;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#hasTimedOut()
*/
public boolean hasTimedOut() {
if (timeout == null || timeout.equals(TIMEOUT_INFINITE)) {
return false;
}
int seconds = Integer.parseInt(timeout.substring(7));
Calendar expiry = Calendar.getInstance();
expiry.setTime(created);
expiry.add(Calendar.SECOND, seconds);
return Calendar.getInstance().after(expiry);
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#isGranted(org.unitedinternet.cosmo.model.Item)
*/
public boolean isGranted(Item item) {
if(item==null) {
return false;
}
for (Ticket ticket : item.getTickets()) {
if (ticket.equals(this)) {
return true;
}
}
for(Item parent: item.getParents()) {
if(isGranted(parent)) {
return true;
}
}
return false;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#isReadOnly()
*/
public boolean isReadOnly() {
TicketType type = getType();
return type != null && type.equals(TicketType.READ_ONLY);
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#isReadWrite()
*/
public boolean isReadWrite() {
TicketType type = getType();
return type != null && type.equals(TicketType.READ_WRITE);
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#isFreeBusy()
*/
public boolean isFreeBusy() {
TicketType type = getType();
return type != null && type.equals(TicketType.FREE_BUSY);
}
/**
*/
public boolean equals(Object o) {
if (! (o instanceof HibTicket)) {
return false;
}
HibTicket it = (HibTicket) o;
return new EqualsBuilder().
append(key, it.key).
append(timeout, it.timeout).
append(privileges, it.privileges).
isEquals();
}
/**
*/
public int hashCode() {
return new HashCodeBuilder(3, 5).
append(key).
append(timeout).
append(privileges).
toHashCode();
}
/**
*/
public String toString() {
StringBuffer buf = new StringBuffer(key);
TicketType type = getType();
if (type != null) {
buf.append(" (").append(type).append(")");
}
return buf.toString();
}
/* (non-Javadoc)
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
public int compareTo(Ticket t) {
return key.compareTo(t.getKey());
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#getItem()
*/
public Item getItem() {
return item;
}
/* (non-Javadoc)
* @see org.unitedinternet.cosmo.model.Ticket#setItem(org.unitedinternet.cosmo.model.Item)
*/
public void setItem(Item item) {
this.item = item;
}
public String calculateEntityTag() {
// Tickets are globally unique by key and are immutable
return encodeEntityTag(this.key.getBytes(Charset.forName("UTF-8")));
}
}
| [
"corneliu.dobrota@gmail.com"
] | corneliu.dobrota@gmail.com |
565ff2936fcd32f617dae73d218670d2153baed7 | 3e9ba02fa687d4f9cf1b27f57d8a80c1123b25a7 | /src/org/encog/util/normalize/output/zaxis/OutputFieldZAxis.java | 63127a7af3a5517c38e29db0bb264db708159030 | [] | no_license | marianagmmacedo/CE_GP | e43b28aa5d3999e63fa43694608cb4966d27cf49 | ceadcb07a5049d8b5b2ff4ee00ad285cf33d46a4 | refs/heads/master | 2021-01-19T10:23:14.215122 | 2017-05-29T20:06:43 | 2017-05-29T20:06:43 | 87,858,418 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,381 | java | /*
* Encog(tm) Core v3.4 - Java Version
* http://www.heatonresearch.com/encog/
* https://github.com/encog/encog-java-core
* Copyright 2008-2016 Heaton Research, Inc.
*
* 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.
*
* For more information on Heaton Research copyrights, licenses
* and trademarks visit:
* http://www.heatonresearch.com/copyright
*/
package org.encog.util.normalize.output.zaxis;
import org.encog.util.normalize.NormalizationError;
import org.encog.util.normalize.input.InputField;
import org.encog.util.normalize.output.OutputFieldGroup;
import org.encog.util.normalize.output.OutputFieldGrouped;
/**
* Both the multiplicative and z-axis normalization types allow a group of
* outputs to be adjusted so that the "vector length" is 1. Both go about it in
* different ways. Certain types of neural networks require a vector length of
* 1.
*
* Z-Axis normalization is usually a better choice than multiplicative. However,
* multiplicative can perform better than Z-Axis when all of the values are near
* zero most of the time. This can cause the "synthetic value" that z-axis uses
* to dominate and skew the answer.
*
* Z-Axis gets its name from 3D computer graphics, where there is a Z-Axis
* extending from the plane created by the X and Y axes. It has nothing to do
* with z-scores or the z-transform of signal theory.
*
* To implement Z-Axis normalization a scaling factor must be created to
* multiply each of the inputs against. Additionally, a synthetic field must be
* added. It is very important that this synthetic field be added to any z-axis
* group that you might use. The synthetic field is represented by the
* OutputFieldZAxisSynthetic class.
*
* @author jheaton
*/
public class OutputFieldZAxis extends OutputFieldGrouped {
/**
* Construct a ZAxis output field.
* @param group The group this field belongs to.
* @param field The input field this is based on.
*/
public OutputFieldZAxis(final OutputFieldGroup group,
final InputField field) {
super(group, field);
if (!(group instanceof ZAxisGroup)) {
throw new NormalizationError(
"Must use ZAxisGroup with OutputFieldZAxis.");
}
}
/**
* Calculate the current value for this field.
*
* @param subfield
* Ignored, this field type does not have subfields.
* @return The current value for this field.
*/
public double calculate(final int subfield) {
return (getSourceField().getCurrentValue() * ((ZAxisGroup) getGroup())
.getMultiplier());
}
/**
* @return The subfield count, which is one, as this field type does not
* have subfields.
*/
public int getSubfieldCount() {
return 1;
}
/**
* Not needed for this sort of output field.
*/
public void rowInit() {
}
}
| [
"carlos_judo@hotmail.com"
] | carlos_judo@hotmail.com |
af8ad7314827743027180bcf661fd9643234b607 | 3a1920fdf5dc5946861dbbb8adb23550901ca55e | /src/examples/java/com/amazonaws/crypto/examples/FileStreamingExample.java | 60eab13bb1379ceef26d4e40fb0eff534781e3cb | [
"Apache-2.0"
] | permissive | talentReef/aws-encryption-sdk-java | 672d6d4d37f2bf5041970a892fd704a2e0637b91 | eef9f8ba4d2a32030bdc6b855118cc01c4302d7e | refs/heads/master | 2021-01-22T12:44:49.800167 | 2016-08-04T02:31:06 | 2016-08-04T02:31:06 | 64,893,738 | 1 | 0 | null | 2016-08-04T02:04:46 | 2016-08-04T02:04:46 | null | UTF-8 | Java | false | false | 3,787 | java | /*
* Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except
* in compliance with the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
package com.amazonaws.crypto.examples;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.security.SecureRandom;
import java.util.Collections;
import java.util.Map;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import com.amazonaws.encryptionsdk.AwsCrypto;
import com.amazonaws.encryptionsdk.CryptoInputStream;
import com.amazonaws.encryptionsdk.MasterKey;
import com.amazonaws.encryptionsdk.jce.JceMasterKey;
import com.amazonaws.util.IOUtils;
/**
* <p>
* Encrypts and then decrypts a file under a random key.
*
* <p>
* Arguments:
* <ol>
* <li>fileName
* </ol>
*
* <p>
* This program demonstrates using a normal java {@link SecretKey} object as a {@link MasterKey} to
* encrypt and decrypt streaming data.
*/
public class FileStreamingExample {
private static String srcFile;
public static void main(String[] args) throws IOException {
srcFile = args[0];
// In this example, we'll pretend that we loaded this key from
// some existing store but actually just generate a random one
SecretKey cryptoKey = retrieveEncryptionKey();
// Convert key into a provider. We'll use AES GCM because it is
// a good secure algorithm.
JceMasterKey masterKey = JceMasterKey.getInstance(cryptoKey, "Example", "RandomKey", "AES/GCM/NoPadding");
// Instantiate the SDKs
AwsCrypto crypto = new AwsCrypto();
// Create the encryption context to identify this ciphertext
Map<String, String> context = Collections.singletonMap("Example", "FileStreaming");
// The file might be *really* big, so we don't want
// to load it all into memory. Streaming is necessary.
FileInputStream in = new FileInputStream(srcFile);
CryptoInputStream<JceMasterKey> encryptingStream = crypto.createEncryptingStream(masterKey, in, context);
FileOutputStream out = new FileOutputStream(srcFile + ".encrypted");
IOUtils.copy(encryptingStream, out);
encryptingStream.close();
out.close();
// Let's decrypt the file now, remembering to check the encryption context
in = new FileInputStream(srcFile + ".encrypted");
CryptoInputStream<JceMasterKey> decryptingStream = crypto.createDecryptingStream(masterKey, in);
// Does it have the right encryption context?
if (!"FileStreaming".equals(decryptingStream.getCryptoResult().getEncryptionContext().get("Example"))) {
throw new IllegalStateException("Bad encryption context");
}
// Finally, actually write out the data
out = new FileOutputStream(srcFile + ".decrypted");
IOUtils.copy(decryptingStream, out);
decryptingStream.close();
out.close();
}
/**
* In the real world, this key will need to be persisted somewhere. For this demo we'll generate
* a new random one each time.
*/
private static SecretKey retrieveEncryptionKey() {
SecureRandom rnd = new SecureRandom();
byte[] rawKey = new byte[16]; // 128 bits
rnd.nextBytes(rawKey);
return new SecretKeySpec(rawKey, "AES");
}
}
| [
"SalusaSecondus@users.noreply.github.com"
] | SalusaSecondus@users.noreply.github.com |
125f2f3fcc0e1739fb501a35befceda45213db27 | 67e7772d33b2914b6a163f413e711241771f5393 | /client/shell/src/test/java/org/epcc/ps/client/shell/util/SpeciesDensityGeneratorTest.java | 21d5ebffee8e3053599cb2882249f7f6196728b7 | [
"Apache-2.0"
] | permissive | Yiiinsh/predator-prey-model | dd4028a5676c0b4ebee7562a2f95cdfe5cf3b116 | f0794df1a0544f10fb693bd26e8c496bd965da92 | refs/heads/master | 2021-08-19T21:49:02.321659 | 2017-11-27T13:48:00 | 2017-11-27T13:50:44 | 105,988,684 | 1 | 2 | null | 2017-11-03T12:28:29 | 2017-10-06T09:39:25 | Java | UTF-8 | Java | false | false | 1,150 | java | /*
* Copyright (C) 2017 the predator-prey-model 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.
*
*/
package org.epcc.ps.client.shell.util;
import org.epcc.ps.client.shell.AbstractTest;
import org.junit.Assert;
import org.junit.Test;
/**
* @author shaohan.yin
* Created on 23/10/2017
*/
public class SpeciesDensityGeneratorTest extends AbstractTest {
@Test
public void testSpeciesDensityGenerator() {
double density;
for (int i = 0; i != 1000; ++i) {
density = SpeciesDensityGenerator.generateDensity();
Assert.assertTrue(density > 0.0 && density < 5.0);
}
}
}
| [
"shaohan.yin@gmail.com"
] | shaohan.yin@gmail.com |
3c2dd12cb5921ddf0b43dea85e394b253d430cca | e7333927cf095554aebc046a477282fc4e3633d8 | /Game/src/poke/core/module/gui/GuiShader.java | 44cfc3db65aa64a27e940f4280450dc9ced4b163 | [] | no_license | PokePong/Game | 00f31100265e1fb9ceabde5e291934b7c350a2fb | 23842115250f24a5320163b06a82df0b3b7f32b4 | refs/heads/master | 2022-12-25T19:25:40.486860 | 2020-09-30T17:08:20 | 2020-09-30T17:08:20 | 244,141,610 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 874 | java | package poke.core.module.gui;
import poke.core.engine.scene.GameObject;
import poke.core.engine.shader.Shader;
public class GuiShader extends Shader {
private static GuiShader instance;
public static GuiShader getInstance() {
if (instance == null)
instance = new GuiShader();
return instance;
}
public GuiShader() {
super();
addVertexShader("gui/gui_v.glsl");
addFragmentShader("gui/gui_f.glsl");
validateShader();
addUniform("m_Ortho");
addUniform("color");
addUniform("textured");
}
@Override
public void updateUniforms(GameObject object) {
}
@Override
public void updateUniforms(GuiElement element) {
setUniform("m_Ortho", element.getWorldTransform().getOrthoMatrix());
setUniform("color", element.getColor().toVector4f());
setUniform("textured", element.getTexture() != null);
}
}
| [
"loicb@172.22.232.122"
] | loicb@172.22.232.122 |
7d5da91fccd17a077120556b3f1c9afc8aba4d41 | 274f016fa69ccaa05619f1974a67a93ba0a5209b | /app/src/main/java/com/gilangkusumajati/popularmoviestage2/adapter/MovieTrailerAdapter.java | 312fa53cad50472ae9a448f16bba64dd68f0a140 | [] | no_license | gkj/popular-movie-stage-2 | 9e5a2b597ab04b0c4247a923b0f9c92e6c9802c9 | cabc7ead148e57224ca5cab34f149cce246127a5 | refs/heads/master | 2021-01-22T00:29:14.001011 | 2017-09-03T23:56:49 | 2017-09-03T23:56:49 | 102,189,840 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,612 | java | package com.gilangkusumajati.popularmoviestage2.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.gilangkusumajati.popularmoviestage2.R;
import com.gilangkusumajati.popularmoviestage2.model.MovieTrailer;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* Created by Gilang Kusuma Jati on 7/30/17.
*/
public class MovieTrailerAdapter extends RecyclerView.Adapter<MovieTrailerAdapter.ViewHolder> {
private final MovieTrailerListItemClickListener listItemClickListener;
private List<MovieTrailer> items;
public MovieTrailerAdapter(MovieTrailerListItemClickListener onClickListener) {
this.listItemClickListener = onClickListener;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
Context context = parent.getContext();
LayoutInflater layoutInflater = LayoutInflater.from(context);
View rootView = layoutInflater.inflate(R.layout.video_list_item, parent, false);
return new ViewHolder(rootView);
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
MovieTrailer movie = items.get(position);
holder.bind(movie);
}
@Override
public int getItemCount() {
return items == null ? 0 : items.size();
}
public void setItems(List<MovieTrailer> items) {
if (this.items == null)
this.items = new ArrayList<>();
this.items.clear();
this.items.addAll(items);
notifyDataSetChanged();
}
class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
@BindView(R.id.imageview_trailer)
ImageView trailerImageView;
private ViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
itemView.setOnClickListener(this);
}
private void bind(MovieTrailer movieVideo) {
Picasso.with(trailerImageView.getContext()).load(movieVideo.getThumbnailUrl()).into(trailerImageView);
}
@Override
public void onClick(View v) {
listItemClickListener.onMovieTrailerListItemClick(items.get(getAdapterPosition()));
}
}
public interface MovieTrailerListItemClickListener {
void onMovieTrailerListItemClick(MovieTrailer movieTrailer);
}
}
| [
"gilangkusumajati@gmail.com"
] | gilangkusumajati@gmail.com |
601eb38ae548d14b6484c98d0a09575e4b2c55ab | c24f23732c6f28a2284ded0fadf3bbc2ce866c35 | /src/main/java/Enemies/FlyingKoopa.java | 76c9f35b67e8e76f253b47794d1ab6f372c9968e | [] | no_license | AdrianLZD/SuperMarioBrosInJava | 0cded49d8229c2e777701ed9eb369eae0a573ba3 | 8100ec26664eaec3b7beac4672de94868f343bda | refs/heads/master | 2023-07-04T00:08:32.214151 | 2021-08-08T23:21:36 | 2021-08-08T23:21:36 | 213,092,920 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,507 | java | package main.java.Enemies;
import java.awt.Point;
import main.java.Animator;
import main.java.Block;
public class FlyingKoopa extends Enemy {
public FlyingKoopa(Point position, int id) {
super(position, id);
sprite = Animator.K_FLY_LEFT_WALK1;
horizontalVelocity = 0;
verticalVelocity = -KOOPA_FLYING_VEL;
hCollisionOffset = 2;
vCollisionOffset = -verticalVelocity;
tableSprites.put("right1", Animator.K_FLY_RIGHT_WALK1);
tableSprites.put("right2", Animator.K_FLY_RIGHT_WALK2);
tableSprites.put("left1", Animator.K_FLY_LEFT_WALK1);
tableSprites.put("left2", Animator.K_FLY_LEFT_WALK2);
tableSprites.put("dead", Animator.K_NORMAL_RIGHT_WALK1);
tableSprites.put("flip", Animator.K_NORMAL_FLIP);
setColliderSize(Animator.getEnemySprite(Animator.K_FLY_RIGHT_WALK1));
setLocation(position.x, position.y + Block.SIZE);
}
@Override
public void tickEnemy(){
applyVelocities();
changeSpriteDirection();
checkCollisions();
checkMarioCollisions();
}
@Override
public void applyVelocities(){
if (behaviorCounter <= 80) {
verticalVelocity = -KOOPA_FLYING_VEL;
} else if (behaviorCounter <= 159) {
verticalVelocity = KOOPA_FLYING_VEL;
} else {
behaviorCounter = 0;
}
behaviorCounter++;
setLocation(x + horizontalVelocity, y + verticalVelocity);
}
}
| [
"adrianlozanod@hotmail.com"
] | adrianlozanod@hotmail.com |
f5ab674ff884bac32e8ec80710a2c85f29a5c419 | a5a24e48299cf433e65df8fce793d53331257546 | /CS453/HW3/src/src/VM2M/elements/EMemRead.java | 03423d13ccd7e4cb8c26adef9ad00e965148419d | [] | no_license | zacharyasmith/School-Assignments | a490b245e131c2acaa5b7f381871d44055321ae0 | 8c1497a2148c5a094927a8bc85c09d28317b77d3 | refs/heads/master | 2022-09-28T05:13:41.635056 | 2018-05-11T09:36:33 | 2018-05-11T09:36:33 | 119,742,620 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,289 | java | package VM2M.elements;
import VM2M.MipsFunction;
import cs132.vapor.ast.VMemRead;
import cs132.vapor.ast.VMemRef;
public class EMemRead extends Element {
VMemRead statement;
public EMemRead(VMemRead statement) {
super(statement);
this.statement = statement;
}
@Override
public String toMIPS(MipsFunction f) {
String ret = super.toMIPS(f) + tab;
ret += "lw " + statement.dest + " ";
if (statement.source instanceof VMemRef.Global)
ret += ((VMemRef.Global) statement.source).byteOffset + "(" +
((VMemRef.Global) statement.source).base + ")";
else if(statement.source instanceof VMemRef.Stack){
if (((VMemRef.Stack) statement.source).region == VMemRef.Stack.Region.Local) {
ret += f.stack_out * 4 + ((VMemRef.Stack) statement.source).index * 4;
ret += "($sp)";
} else if (((VMemRef.Stack) statement.source).region == VMemRef.Stack.Region.In) {
ret += ((VMemRef.Stack) statement.source).index * 4;
ret += "($fp)";
} else { // Out
ret += ((VMemRef.Stack) statement.source).index * 4;
ret += "($sp)";
}
}
return ret + '\n';
}
}
| [
"zach@medialusions.com"
] | zach@medialusions.com |
fee41ad893a46ff9028a15964de66f2915b8819a | 2e15ab45503eb6bc37b6427fba2f2a9abaa91b4d | /atto/src/atto/AttoParser.java | a077c7a4863d4bdecabba676067a2b5e9412ee9a | [
"MIT"
] | permissive | nakamura-to/attoscript | b974c5c8701c8be9fa93f3df9832321e7ceae735 | 77f3d4053faa814e0649249b2ca0c164d312968f | refs/heads/master | 2020-04-13T02:10:32.772941 | 2012-09-02T13:09:58 | 2012-09-02T13:09:58 | 5,472,267 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 218,231 | java | // $ANTLR 3.4 Atto.g 2012-09-02 16:50:27
package atto;
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import org.antlr.runtime.tree.*;
@SuppressWarnings({"all", "warnings", "unchecked"})
public class AttoParser extends Parser {
public static final String[] tokenNames = new String[] {
"<invalid>", "<EOR>", "<DOWN>", "<UP>", "AND", "ARGS", "ARRAY", "ARROW", "ASSIGN", "AT", "BLOCK", "BOOLEAN", "CALL", "CLASS", "COLON", "COMMA", "COMMENT", "COMPOSITE", "DEDENT", "DIGIT", "DIV", "DOT", "ELIF", "ELSE", "END", "EQ", "EXTENDS", "FIELD_ACCESS", "FUN", "GE", "GT", "ID_CHAR", "IF", "INDENT", "INDEX", "LBRACK", "LCURLY", "LE", "LETTER", "LOWER", "LPAREN", "LT", "MINUS", "MOD", "MUL", "NAME", "NE", "NEWLINE", "NOT", "NULL", "NUMBER", "OBJ", "OR", "PARAMS", "PARENT_CLASS", "PIPELINE", "PLUS", "RBRACK", "RCURLY", "REVERSE_PIPELINE", "RPAREN", "SEMICOLON", "SEND", "SPACE", "STMT", "STRING", "TEXT", "THEN", "UNARY_MINUS", "UPPER", "VARDEF", "WHILE", "WS"
};
public static final int EOF=-1;
public static final int AND=4;
public static final int ARGS=5;
public static final int ARRAY=6;
public static final int ARROW=7;
public static final int ASSIGN=8;
public static final int AT=9;
public static final int BLOCK=10;
public static final int BOOLEAN=11;
public static final int CALL=12;
public static final int CLASS=13;
public static final int COLON=14;
public static final int COMMA=15;
public static final int COMMENT=16;
public static final int COMPOSITE=17;
public static final int DEDENT=18;
public static final int DIGIT=19;
public static final int DIV=20;
public static final int DOT=21;
public static final int ELIF=22;
public static final int ELSE=23;
public static final int END=24;
public static final int EQ=25;
public static final int EXTENDS=26;
public static final int FIELD_ACCESS=27;
public static final int FUN=28;
public static final int GE=29;
public static final int GT=30;
public static final int ID_CHAR=31;
public static final int IF=32;
public static final int INDENT=33;
public static final int INDEX=34;
public static final int LBRACK=35;
public static final int LCURLY=36;
public static final int LE=37;
public static final int LETTER=38;
public static final int LOWER=39;
public static final int LPAREN=40;
public static final int LT=41;
public static final int MINUS=42;
public static final int MOD=43;
public static final int MUL=44;
public static final int NAME=45;
public static final int NE=46;
public static final int NEWLINE=47;
public static final int NOT=48;
public static final int NULL=49;
public static final int NUMBER=50;
public static final int OBJ=51;
public static final int OR=52;
public static final int PARAMS=53;
public static final int PARENT_CLASS=54;
public static final int PIPELINE=55;
public static final int PLUS=56;
public static final int RBRACK=57;
public static final int RCURLY=58;
public static final int REVERSE_PIPELINE=59;
public static final int RPAREN=60;
public static final int SEMICOLON=61;
public static final int SEND=62;
public static final int SPACE=63;
public static final int STMT=64;
public static final int STRING=65;
public static final int TEXT=66;
public static final int THEN=67;
public static final int UNARY_MINUS=68;
public static final int UPPER=69;
public static final int VARDEF=70;
public static final int WHILE=71;
public static final int WS=72;
// delegates
public Parser[] getDelegates() {
return new Parser[] {};
}
// delegators
public AttoParser(TokenStream input) {
this(input, new RecognizerSharedState());
}
public AttoParser(TokenStream input, RecognizerSharedState state) {
super(input, state);
}
protected TreeAdaptor adaptor = new CommonTreeAdaptor();
public void setTreeAdaptor(TreeAdaptor adaptor) {
this.adaptor = adaptor;
}
public TreeAdaptor getTreeAdaptor() {
return adaptor;
}
public String[] getTokenNames() { return AttoParser.tokenNames; }
public String getGrammarFileName() { return "Atto.g"; }
public static class root_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "root"
// Atto.g:33:1: root : block ;
public final AttoParser.root_return root() throws RecognitionException {
AttoParser.root_return retval = new AttoParser.root_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
AttoParser.block_return block1 =null;
try {
// Atto.g:34:2: ( block )
// Atto.g:34:4: block
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_block_in_root115);
block1=block();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, block1.getTree());
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "root"
public static class block_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "block"
// Atto.g:37:1: block : ( stmt ( terminator stmt )* )? ( terminator )? -> ^( BLOCK ( stmt )* ) ;
public final AttoParser.block_return block() throws RecognitionException {
AttoParser.block_return retval = new AttoParser.block_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
AttoParser.stmt_return stmt2 =null;
AttoParser.terminator_return terminator3 =null;
AttoParser.stmt_return stmt4 =null;
AttoParser.terminator_return terminator5 =null;
RewriteRuleSubtreeStream stream_terminator=new RewriteRuleSubtreeStream(adaptor,"rule terminator");
RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
try {
// Atto.g:38:2: ( ( stmt ( terminator stmt )* )? ( terminator )? -> ^( BLOCK ( stmt )* ) )
// Atto.g:38:4: ( stmt ( terminator stmt )* )? ( terminator )?
{
// Atto.g:38:4: ( stmt ( terminator stmt )* )?
int alt2=2;
int LA2_0 = input.LA(1);
if ( (LA2_0==AT||LA2_0==BOOLEAN||LA2_0==CLASS||LA2_0==IF||(LA2_0 >= LBRACK && LA2_0 <= LCURLY)||LA2_0==LPAREN||LA2_0==MINUS||LA2_0==NAME||(LA2_0 >= NOT && LA2_0 <= NUMBER)||LA2_0==STRING||LA2_0==WHILE) ) {
alt2=1;
}
switch (alt2) {
case 1 :
// Atto.g:38:5: stmt ( terminator stmt )*
{
pushFollow(FOLLOW_stmt_in_block128);
stmt2=stmt();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_stmt.add(stmt2.getTree());
// Atto.g:38:10: ( terminator stmt )*
loop1:
do {
int alt1=2;
int LA1_0 = input.LA(1);
if ( (LA1_0==SEMICOLON) ) {
int LA1_1 = input.LA(2);
if ( (LA1_1==NEWLINE) ) {
int LA1_4 = input.LA(3);
if ( (LA1_4==AT||LA1_4==BOOLEAN||LA1_4==CLASS||LA1_4==IF||(LA1_4 >= LBRACK && LA1_4 <= LCURLY)||LA1_4==LPAREN||LA1_4==MINUS||LA1_4==NAME||(LA1_4 >= NOT && LA1_4 <= NUMBER)||LA1_4==STRING||LA1_4==WHILE) ) {
alt1=1;
}
}
else if ( (LA1_1==AT||LA1_1==BOOLEAN||LA1_1==CLASS||LA1_1==IF||(LA1_1 >= LBRACK && LA1_1 <= LCURLY)||LA1_1==LPAREN||LA1_1==MINUS||LA1_1==NAME||(LA1_1 >= NOT && LA1_1 <= NUMBER)||LA1_1==STRING||LA1_1==WHILE) ) {
alt1=1;
}
}
else if ( (LA1_0==NEWLINE) ) {
int LA1_2 = input.LA(2);
if ( (LA1_2==AT||LA1_2==BOOLEAN||LA1_2==CLASS||LA1_2==IF||(LA1_2 >= LBRACK && LA1_2 <= LCURLY)||LA1_2==LPAREN||LA1_2==MINUS||LA1_2==NAME||(LA1_2 >= NOT && LA1_2 <= NUMBER)||LA1_2==STRING||LA1_2==WHILE) ) {
alt1=1;
}
}
switch (alt1) {
case 1 :
// Atto.g:38:11: terminator stmt
{
pushFollow(FOLLOW_terminator_in_block131);
terminator3=terminator();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_terminator.add(terminator3.getTree());
pushFollow(FOLLOW_stmt_in_block133);
stmt4=stmt();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_stmt.add(stmt4.getTree());
}
break;
default :
break loop1;
}
} while (true);
}
break;
}
// Atto.g:38:31: ( terminator )?
int alt3=2;
int LA3_0 = input.LA(1);
if ( (LA3_0==SEMICOLON) ) {
alt3=1;
}
else if ( (LA3_0==NEWLINE) ) {
int LA3_2 = input.LA(2);
if ( (LA3_2==EOF||LA3_2==NEWLINE||LA3_2==RCURLY) ) {
alt3=1;
}
}
switch (alt3) {
case 1 :
// Atto.g:38:31: terminator
{
pushFollow(FOLLOW_terminator_in_block139);
terminator5=terminator();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_terminator.add(terminator5.getTree());
}
break;
}
// AST REWRITE
// elements: stmt
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 38:43: -> ^( BLOCK ( stmt )* )
{
// Atto.g:38:46: ^( BLOCK ( stmt )* )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(BLOCK, "BLOCK")
, root_1);
// Atto.g:38:54: ( stmt )*
while ( stream_stmt.hasNext() ) {
adaptor.addChild(root_1, stream_stmt.nextTree());
}
stream_stmt.reset();
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "block"
public static class stmt_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "stmt"
// Atto.g:41:1: stmt : ( expr | CLASS c= NAME ( EXTENDS p= NAME )? NEWLINE ( pair ( ( COMMA | ( COMMA )? NEWLINE ) pair )* )? ( COMMA | ( COMMA )? NEWLINE )? END -> ^( CLASS $c ^( PARENT_CLASS ( $p)? ) ( pair )* ) );
public final AttoParser.stmt_return stmt() throws RecognitionException {
AttoParser.stmt_return retval = new AttoParser.stmt_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token c=null;
Token p=null;
Token CLASS7=null;
Token EXTENDS8=null;
Token NEWLINE9=null;
Token COMMA11=null;
Token COMMA12=null;
Token NEWLINE13=null;
Token COMMA15=null;
Token COMMA16=null;
Token NEWLINE17=null;
Token END18=null;
AttoParser.expr_return expr6 =null;
AttoParser.pair_return pair10 =null;
AttoParser.pair_return pair14 =null;
AttoTree c_tree=null;
AttoTree p_tree=null;
AttoTree CLASS7_tree=null;
AttoTree EXTENDS8_tree=null;
AttoTree NEWLINE9_tree=null;
AttoTree COMMA11_tree=null;
AttoTree COMMA12_tree=null;
AttoTree NEWLINE13_tree=null;
AttoTree COMMA15_tree=null;
AttoTree COMMA16_tree=null;
AttoTree NEWLINE17_tree=null;
AttoTree END18_tree=null;
RewriteRuleTokenStream stream_CLASS=new RewriteRuleTokenStream(adaptor,"token CLASS");
RewriteRuleTokenStream stream_NAME=new RewriteRuleTokenStream(adaptor,"token NAME");
RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
RewriteRuleTokenStream stream_END=new RewriteRuleTokenStream(adaptor,"token END");
RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
RewriteRuleTokenStream stream_EXTENDS=new RewriteRuleTokenStream(adaptor,"token EXTENDS");
RewriteRuleSubtreeStream stream_pair=new RewriteRuleSubtreeStream(adaptor,"rule pair");
try {
// Atto.g:42:2: ( expr | CLASS c= NAME ( EXTENDS p= NAME )? NEWLINE ( pair ( ( COMMA | ( COMMA )? NEWLINE ) pair )* )? ( COMMA | ( COMMA )? NEWLINE )? END -> ^( CLASS $c ^( PARENT_CLASS ( $p)? ) ( pair )* ) )
int alt11=2;
int LA11_0 = input.LA(1);
if ( (LA11_0==AT||LA11_0==BOOLEAN||LA11_0==IF||(LA11_0 >= LBRACK && LA11_0 <= LCURLY)||LA11_0==LPAREN||LA11_0==MINUS||LA11_0==NAME||(LA11_0 >= NOT && LA11_0 <= NUMBER)||LA11_0==STRING||LA11_0==WHILE) ) {
alt11=1;
}
else if ( (LA11_0==CLASS) ) {
alt11=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 11, 0, input);
throw nvae;
}
switch (alt11) {
case 1 :
// Atto.g:42:4: expr
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_expr_in_stmt160);
expr6=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, expr6.getTree());
}
break;
case 2 :
// Atto.g:43:4: CLASS c= NAME ( EXTENDS p= NAME )? NEWLINE ( pair ( ( COMMA | ( COMMA )? NEWLINE ) pair )* )? ( COMMA | ( COMMA )? NEWLINE )? END
{
CLASS7=(Token)match(input,CLASS,FOLLOW_CLASS_in_stmt165); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_CLASS.add(CLASS7);
c=(Token)match(input,NAME,FOLLOW_NAME_in_stmt169); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NAME.add(c);
// Atto.g:43:17: ( EXTENDS p= NAME )?
int alt4=2;
int LA4_0 = input.LA(1);
if ( (LA4_0==EXTENDS) ) {
alt4=1;
}
switch (alt4) {
case 1 :
// Atto.g:43:18: EXTENDS p= NAME
{
EXTENDS8=(Token)match(input,EXTENDS,FOLLOW_EXTENDS_in_stmt172); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_EXTENDS.add(EXTENDS8);
p=(Token)match(input,NAME,FOLLOW_NAME_in_stmt176); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NAME.add(p);
}
break;
}
NEWLINE9=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_stmt180); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE9);
// Atto.g:43:43: ( pair ( ( COMMA | ( COMMA )? NEWLINE ) pair )* )?
int alt8=2;
int LA8_0 = input.LA(1);
if ( (LA8_0==NAME) ) {
alt8=1;
}
switch (alt8) {
case 1 :
// Atto.g:43:44: pair ( ( COMMA | ( COMMA )? NEWLINE ) pair )*
{
pushFollow(FOLLOW_pair_in_stmt183);
pair10=pair();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_pair.add(pair10.getTree());
// Atto.g:43:49: ( ( COMMA | ( COMMA )? NEWLINE ) pair )*
loop7:
do {
int alt7=2;
int LA7_0 = input.LA(1);
if ( (LA7_0==COMMA) ) {
int LA7_1 = input.LA(2);
if ( (LA7_1==NEWLINE) ) {
int LA7_2 = input.LA(3);
if ( (LA7_2==NAME) ) {
alt7=1;
}
}
else if ( (LA7_1==NAME) ) {
alt7=1;
}
}
else if ( (LA7_0==NEWLINE) ) {
int LA7_2 = input.LA(2);
if ( (LA7_2==NAME) ) {
alt7=1;
}
}
switch (alt7) {
case 1 :
// Atto.g:43:50: ( COMMA | ( COMMA )? NEWLINE ) pair
{
// Atto.g:43:50: ( COMMA | ( COMMA )? NEWLINE )
int alt6=2;
int LA6_0 = input.LA(1);
if ( (LA6_0==COMMA) ) {
int LA6_1 = input.LA(2);
if ( (LA6_1==NAME) ) {
alt6=1;
}
else if ( (LA6_1==NEWLINE) ) {
alt6=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 6, 1, input);
throw nvae;
}
}
else if ( (LA6_0==NEWLINE) ) {
alt6=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 6, 0, input);
throw nvae;
}
switch (alt6) {
case 1 :
// Atto.g:43:51: COMMA
{
COMMA11=(Token)match(input,COMMA,FOLLOW_COMMA_in_stmt187); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA11);
}
break;
case 2 :
// Atto.g:43:57: ( COMMA )? NEWLINE
{
// Atto.g:43:57: ( COMMA )?
int alt5=2;
int LA5_0 = input.LA(1);
if ( (LA5_0==COMMA) ) {
alt5=1;
}
switch (alt5) {
case 1 :
// Atto.g:43:57: COMMA
{
COMMA12=(Token)match(input,COMMA,FOLLOW_COMMA_in_stmt189); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA12);
}
break;
}
NEWLINE13=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_stmt192); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE13);
}
break;
}
pushFollow(FOLLOW_pair_in_stmt195);
pair14=pair();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_pair.add(pair14.getTree());
}
break;
default :
break loop7;
}
} while (true);
}
break;
}
// Atto.g:43:82: ( COMMA | ( COMMA )? NEWLINE )?
int alt10=3;
int LA10_0 = input.LA(1);
if ( (LA10_0==COMMA) ) {
int LA10_1 = input.LA(2);
if ( (LA10_1==END) ) {
alt10=1;
}
else if ( (LA10_1==NEWLINE) ) {
alt10=2;
}
}
else if ( (LA10_0==NEWLINE) ) {
alt10=2;
}
switch (alt10) {
case 1 :
// Atto.g:43:83: COMMA
{
COMMA15=(Token)match(input,COMMA,FOLLOW_COMMA_in_stmt202); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA15);
}
break;
case 2 :
// Atto.g:43:89: ( COMMA )? NEWLINE
{
// Atto.g:43:89: ( COMMA )?
int alt9=2;
int LA9_0 = input.LA(1);
if ( (LA9_0==COMMA) ) {
alt9=1;
}
switch (alt9) {
case 1 :
// Atto.g:43:89: COMMA
{
COMMA16=(Token)match(input,COMMA,FOLLOW_COMMA_in_stmt204); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA16);
}
break;
}
NEWLINE17=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_stmt207); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE17);
}
break;
}
END18=(Token)match(input,END,FOLLOW_END_in_stmt211); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_END.add(END18);
// AST REWRITE
// elements: p, CLASS, pair, c
// token labels: c, p
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleTokenStream stream_c=new RewriteRuleTokenStream(adaptor,"token c",c);
RewriteRuleTokenStream stream_p=new RewriteRuleTokenStream(adaptor,"token p",p);
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 44:3: -> ^( CLASS $c ^( PARENT_CLASS ( $p)? ) ( pair )* )
{
// Atto.g:44:6: ^( CLASS $c ^( PARENT_CLASS ( $p)? ) ( pair )* )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_CLASS.nextNode()
, root_1);
adaptor.addChild(root_1, stream_c.nextNode());
// Atto.g:44:17: ^( PARENT_CLASS ( $p)? )
{
AttoTree root_2 = (AttoTree)adaptor.nil();
root_2 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(PARENT_CLASS, "PARENT_CLASS")
, root_2);
// Atto.g:44:33: ( $p)?
if ( stream_p.hasNext() ) {
adaptor.addChild(root_2, stream_p.nextNode());
}
stream_p.reset();
adaptor.addChild(root_1, root_2);
}
// Atto.g:44:37: ( pair )*
while ( stream_pair.hasNext() ) {
adaptor.addChild(root_1, stream_pair.nextTree());
}
stream_pair.reset();
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "stmt"
public static class terminator_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "terminator"
// Atto.g:47:1: terminator : ( SEMICOLON ( NEWLINE )? | NEWLINE );
public final AttoParser.terminator_return terminator() throws RecognitionException {
AttoParser.terminator_return retval = new AttoParser.terminator_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token SEMICOLON19=null;
Token NEWLINE20=null;
Token NEWLINE21=null;
AttoTree SEMICOLON19_tree=null;
AttoTree NEWLINE20_tree=null;
AttoTree NEWLINE21_tree=null;
try {
// Atto.g:48:2: ( SEMICOLON ( NEWLINE )? | NEWLINE )
int alt13=2;
int LA13_0 = input.LA(1);
if ( (LA13_0==SEMICOLON) ) {
alt13=1;
}
else if ( (LA13_0==NEWLINE) ) {
alt13=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 13, 0, input);
throw nvae;
}
switch (alt13) {
case 1 :
// Atto.g:48:4: SEMICOLON ( NEWLINE )?
{
root_0 = (AttoTree)adaptor.nil();
SEMICOLON19=(Token)match(input,SEMICOLON,FOLLOW_SEMICOLON_in_terminator244); if (state.failed) return retval;
if ( state.backtracking==0 ) {
SEMICOLON19_tree =
(AttoTree)adaptor.create(SEMICOLON19)
;
adaptor.addChild(root_0, SEMICOLON19_tree);
}
// Atto.g:48:14: ( NEWLINE )?
int alt12=2;
int LA12_0 = input.LA(1);
if ( (LA12_0==NEWLINE) ) {
int LA12_1 = input.LA(2);
if ( (LA12_1==EOF||LA12_1==AT||LA12_1==BOOLEAN||LA12_1==CLASS||LA12_1==IF||(LA12_1 >= LBRACK && LA12_1 <= LCURLY)||LA12_1==LPAREN||LA12_1==MINUS||LA12_1==NAME||(LA12_1 >= NEWLINE && LA12_1 <= NUMBER)||LA12_1==RCURLY||LA12_1==STRING||LA12_1==WHILE) ) {
alt12=1;
}
}
switch (alt12) {
case 1 :
// Atto.g:48:14: NEWLINE
{
NEWLINE20=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_terminator246); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NEWLINE20_tree =
(AttoTree)adaptor.create(NEWLINE20)
;
adaptor.addChild(root_0, NEWLINE20_tree);
}
}
break;
}
}
break;
case 2 :
// Atto.g:48:25: NEWLINE
{
root_0 = (AttoTree)adaptor.nil();
NEWLINE21=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_terminator251); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NEWLINE21_tree =
(AttoTree)adaptor.create(NEWLINE21)
;
adaptor.addChild(root_0, NEWLINE21_tree);
}
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "terminator"
public static class expr_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "expr"
// Atto.g:51:1: expr : ( ( assign )=> assign | or | if_ | while_ );
public final AttoParser.expr_return expr() throws RecognitionException {
AttoParser.expr_return retval = new AttoParser.expr_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
AttoParser.assign_return assign22 =null;
AttoParser.or_return or23 =null;
AttoParser.if__return if_24 =null;
AttoParser.while__return while_25 =null;
try {
// Atto.g:52:2: ( ( assign )=> assign | or | if_ | while_ )
int alt14=4;
switch ( input.LA(1) ) {
case NAME:
{
int LA14_1 = input.LA(2);
if ( (synpred1_Atto()) ) {
alt14=1;
}
else if ( (true) ) {
alt14=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 14, 1, input);
throw nvae;
}
}
break;
case AT:
{
int LA14_2 = input.LA(2);
if ( (synpred1_Atto()) ) {
alt14=1;
}
else if ( (true) ) {
alt14=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 14, 2, input);
throw nvae;
}
}
break;
case NUMBER:
{
int LA14_3 = input.LA(2);
if ( (synpred1_Atto()) ) {
alt14=1;
}
else if ( (true) ) {
alt14=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 14, 3, input);
throw nvae;
}
}
break;
case STRING:
{
int LA14_4 = input.LA(2);
if ( (synpred1_Atto()) ) {
alt14=1;
}
else if ( (true) ) {
alt14=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 14, 4, input);
throw nvae;
}
}
break;
case BOOLEAN:
{
int LA14_5 = input.LA(2);
if ( (synpred1_Atto()) ) {
alt14=1;
}
else if ( (true) ) {
alt14=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 14, 5, input);
throw nvae;
}
}
break;
case NULL:
{
int LA14_6 = input.LA(2);
if ( (synpred1_Atto()) ) {
alt14=1;
}
else if ( (true) ) {
alt14=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 14, 6, input);
throw nvae;
}
}
break;
case LPAREN:
{
int LA14_7 = input.LA(2);
if ( (synpred1_Atto()) ) {
alt14=1;
}
else if ( (true) ) {
alt14=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 14, 7, input);
throw nvae;
}
}
break;
case LCURLY:
{
int LA14_8 = input.LA(2);
if ( (synpred1_Atto()) ) {
alt14=1;
}
else if ( (true) ) {
alt14=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 14, 8, input);
throw nvae;
}
}
break;
case LBRACK:
{
int LA14_9 = input.LA(2);
if ( (synpred1_Atto()) ) {
alt14=1;
}
else if ( (true) ) {
alt14=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 14, 9, input);
throw nvae;
}
}
break;
case MINUS:
case NOT:
{
alt14=2;
}
break;
case IF:
{
alt14=3;
}
break;
case WHILE:
{
alt14=4;
}
break;
default:
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 14, 0, input);
throw nvae;
}
switch (alt14) {
case 1 :
// Atto.g:52:4: ( assign )=> assign
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_assign_in_expr268);
assign22=assign();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, assign22.getTree());
}
break;
case 2 :
// Atto.g:53:4: or
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_or_in_expr273);
or23=or();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, or23.getTree());
}
break;
case 3 :
// Atto.g:54:4: if_
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_if__in_expr278);
if_24=if_();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, if_24.getTree());
}
break;
case 4 :
// Atto.g:55:4: while_
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_while__in_expr283);
while_25=while_();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, while_25.getTree());
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "expr"
public static class assign_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "assign"
// Atto.g:58:1: assign : postfix ( ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix expr ) | ( PLUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( PLUS postfix expr ) ) | MINUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MINUS postfix expr ) ) | MUL ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MUL postfix expr ) ) | DIV ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( DIV postfix expr ) ) | MOD ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MOD postfix expr ) ) ) ) ;
public final AttoParser.assign_return assign() throws RecognitionException {
AttoParser.assign_return retval = new AttoParser.assign_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token ASSIGN27=null;
Token NEWLINE28=null;
Token PLUS30=null;
Token ASSIGN31=null;
Token NEWLINE32=null;
Token MINUS34=null;
Token ASSIGN35=null;
Token NEWLINE36=null;
Token MUL38=null;
Token ASSIGN39=null;
Token NEWLINE40=null;
Token DIV42=null;
Token ASSIGN43=null;
Token NEWLINE44=null;
Token MOD46=null;
Token ASSIGN47=null;
Token NEWLINE48=null;
AttoParser.postfix_return postfix26 =null;
AttoParser.expr_return expr29 =null;
AttoParser.expr_return expr33 =null;
AttoParser.expr_return expr37 =null;
AttoParser.expr_return expr41 =null;
AttoParser.expr_return expr45 =null;
AttoParser.expr_return expr49 =null;
AttoTree ASSIGN27_tree=null;
AttoTree NEWLINE28_tree=null;
AttoTree PLUS30_tree=null;
AttoTree ASSIGN31_tree=null;
AttoTree NEWLINE32_tree=null;
AttoTree MINUS34_tree=null;
AttoTree ASSIGN35_tree=null;
AttoTree NEWLINE36_tree=null;
AttoTree MUL38_tree=null;
AttoTree ASSIGN39_tree=null;
AttoTree NEWLINE40_tree=null;
AttoTree DIV42_tree=null;
AttoTree ASSIGN43_tree=null;
AttoTree NEWLINE44_tree=null;
AttoTree MOD46_tree=null;
AttoTree ASSIGN47_tree=null;
AttoTree NEWLINE48_tree=null;
RewriteRuleTokenStream stream_PLUS=new RewriteRuleTokenStream(adaptor,"token PLUS");
RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
RewriteRuleTokenStream stream_MINUS=new RewriteRuleTokenStream(adaptor,"token MINUS");
RewriteRuleTokenStream stream_DIV=new RewriteRuleTokenStream(adaptor,"token DIV");
RewriteRuleTokenStream stream_MUL=new RewriteRuleTokenStream(adaptor,"token MUL");
RewriteRuleTokenStream stream_MOD=new RewriteRuleTokenStream(adaptor,"token MOD");
RewriteRuleTokenStream stream_ASSIGN=new RewriteRuleTokenStream(adaptor,"token ASSIGN");
RewriteRuleSubtreeStream stream_postfix=new RewriteRuleSubtreeStream(adaptor,"rule postfix");
RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
try {
// Atto.g:59:2: ( postfix ( ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix expr ) | ( PLUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( PLUS postfix expr ) ) | MINUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MINUS postfix expr ) ) | MUL ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MUL postfix expr ) ) | DIV ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( DIV postfix expr ) ) | MOD ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MOD postfix expr ) ) ) ) )
// Atto.g:59:4: postfix ( ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix expr ) | ( PLUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( PLUS postfix expr ) ) | MINUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MINUS postfix expr ) ) | MUL ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MUL postfix expr ) ) | DIV ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( DIV postfix expr ) ) | MOD ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MOD postfix expr ) ) ) )
{
pushFollow(FOLLOW_postfix_in_assign294);
postfix26=postfix();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_postfix.add(postfix26.getTree());
// Atto.g:60:4: ( ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix expr ) | ( PLUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( PLUS postfix expr ) ) | MINUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MINUS postfix expr ) ) | MUL ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MUL postfix expr ) ) | DIV ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( DIV postfix expr ) ) | MOD ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MOD postfix expr ) ) ) )
int alt22=2;
int LA22_0 = input.LA(1);
if ( (LA22_0==ASSIGN) ) {
alt22=1;
}
else if ( (LA22_0==DIV||(LA22_0 >= MINUS && LA22_0 <= MUL)||LA22_0==PLUS) ) {
alt22=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 22, 0, input);
throw nvae;
}
switch (alt22) {
case 1 :
// Atto.g:60:6: ASSIGN ( NEWLINE )? expr
{
ASSIGN27=(Token)match(input,ASSIGN,FOLLOW_ASSIGN_in_assign302); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_ASSIGN.add(ASSIGN27);
// Atto.g:60:13: ( NEWLINE )?
int alt15=2;
int LA15_0 = input.LA(1);
if ( (LA15_0==NEWLINE) ) {
alt15=1;
}
switch (alt15) {
case 1 :
// Atto.g:60:13: NEWLINE
{
NEWLINE28=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_assign304); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE28);
}
break;
}
pushFollow(FOLLOW_expr_in_assign307);
expr29=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr29.getTree());
// AST REWRITE
// elements: expr, postfix, ASSIGN
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 60:27: -> ^( ASSIGN postfix expr )
{
// Atto.g:60:30: ^( ASSIGN postfix expr )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_ASSIGN.nextNode()
, root_1);
adaptor.addChild(root_1, stream_postfix.nextTree());
adaptor.addChild(root_1, stream_expr.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 2 :
// Atto.g:61:6: ( PLUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( PLUS postfix expr ) ) | MINUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MINUS postfix expr ) ) | MUL ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MUL postfix expr ) ) | DIV ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( DIV postfix expr ) ) | MOD ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MOD postfix expr ) ) )
{
// Atto.g:61:6: ( PLUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( PLUS postfix expr ) ) | MINUS ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MINUS postfix expr ) ) | MUL ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MUL postfix expr ) ) | DIV ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( DIV postfix expr ) ) | MOD ASSIGN ( NEWLINE )? expr -> ^( ASSIGN postfix ^( MOD postfix expr ) ) )
int alt21=5;
switch ( input.LA(1) ) {
case PLUS:
{
alt21=1;
}
break;
case MINUS:
{
alt21=2;
}
break;
case MUL:
{
alt21=3;
}
break;
case DIV:
{
alt21=4;
}
break;
case MOD:
{
alt21=5;
}
break;
default:
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 21, 0, input);
throw nvae;
}
switch (alt21) {
case 1 :
// Atto.g:61:8: PLUS ASSIGN ( NEWLINE )? expr
{
PLUS30=(Token)match(input,PLUS,FOLLOW_PLUS_in_assign326); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_PLUS.add(PLUS30);
ASSIGN31=(Token)match(input,ASSIGN,FOLLOW_ASSIGN_in_assign328); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_ASSIGN.add(ASSIGN31);
// Atto.g:61:20: ( NEWLINE )?
int alt16=2;
int LA16_0 = input.LA(1);
if ( (LA16_0==NEWLINE) ) {
alt16=1;
}
switch (alt16) {
case 1 :
// Atto.g:61:20: NEWLINE
{
NEWLINE32=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_assign330); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE32);
}
break;
}
pushFollow(FOLLOW_expr_in_assign333);
expr33=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr33.getTree());
// AST REWRITE
// elements: postfix, PLUS, postfix, ASSIGN, expr
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 61:34: -> ^( ASSIGN postfix ^( PLUS postfix expr ) )
{
// Atto.g:61:37: ^( ASSIGN postfix ^( PLUS postfix expr ) )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_ASSIGN.nextNode()
, root_1);
adaptor.addChild(root_1, stream_postfix.nextTree());
// Atto.g:61:54: ^( PLUS postfix expr )
{
AttoTree root_2 = (AttoTree)adaptor.nil();
root_2 = (AttoTree)adaptor.becomeRoot(
stream_PLUS.nextNode()
, root_2);
adaptor.addChild(root_2, stream_postfix.nextTree());
adaptor.addChild(root_2, stream_expr.nextTree());
adaptor.addChild(root_1, root_2);
}
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 2 :
// Atto.g:62:8: MINUS ASSIGN ( NEWLINE )? expr
{
MINUS34=(Token)match(input,MINUS,FOLLOW_MINUS_in_assign358); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_MINUS.add(MINUS34);
ASSIGN35=(Token)match(input,ASSIGN,FOLLOW_ASSIGN_in_assign360); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_ASSIGN.add(ASSIGN35);
// Atto.g:62:21: ( NEWLINE )?
int alt17=2;
int LA17_0 = input.LA(1);
if ( (LA17_0==NEWLINE) ) {
alt17=1;
}
switch (alt17) {
case 1 :
// Atto.g:62:21: NEWLINE
{
NEWLINE36=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_assign362); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE36);
}
break;
}
pushFollow(FOLLOW_expr_in_assign365);
expr37=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr37.getTree());
// AST REWRITE
// elements: ASSIGN, postfix, postfix, expr, MINUS
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 62:35: -> ^( ASSIGN postfix ^( MINUS postfix expr ) )
{
// Atto.g:62:38: ^( ASSIGN postfix ^( MINUS postfix expr ) )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_ASSIGN.nextNode()
, root_1);
adaptor.addChild(root_1, stream_postfix.nextTree());
// Atto.g:62:55: ^( MINUS postfix expr )
{
AttoTree root_2 = (AttoTree)adaptor.nil();
root_2 = (AttoTree)adaptor.becomeRoot(
stream_MINUS.nextNode()
, root_2);
adaptor.addChild(root_2, stream_postfix.nextTree());
adaptor.addChild(root_2, stream_expr.nextTree());
adaptor.addChild(root_1, root_2);
}
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 3 :
// Atto.g:63:8: MUL ASSIGN ( NEWLINE )? expr
{
MUL38=(Token)match(input,MUL,FOLLOW_MUL_in_assign390); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_MUL.add(MUL38);
ASSIGN39=(Token)match(input,ASSIGN,FOLLOW_ASSIGN_in_assign392); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_ASSIGN.add(ASSIGN39);
// Atto.g:63:19: ( NEWLINE )?
int alt18=2;
int LA18_0 = input.LA(1);
if ( (LA18_0==NEWLINE) ) {
alt18=1;
}
switch (alt18) {
case 1 :
// Atto.g:63:19: NEWLINE
{
NEWLINE40=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_assign394); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE40);
}
break;
}
pushFollow(FOLLOW_expr_in_assign397);
expr41=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr41.getTree());
// AST REWRITE
// elements: postfix, postfix, MUL, expr, ASSIGN
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 63:33: -> ^( ASSIGN postfix ^( MUL postfix expr ) )
{
// Atto.g:63:36: ^( ASSIGN postfix ^( MUL postfix expr ) )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_ASSIGN.nextNode()
, root_1);
adaptor.addChild(root_1, stream_postfix.nextTree());
// Atto.g:63:53: ^( MUL postfix expr )
{
AttoTree root_2 = (AttoTree)adaptor.nil();
root_2 = (AttoTree)adaptor.becomeRoot(
stream_MUL.nextNode()
, root_2);
adaptor.addChild(root_2, stream_postfix.nextTree());
adaptor.addChild(root_2, stream_expr.nextTree());
adaptor.addChild(root_1, root_2);
}
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 4 :
// Atto.g:64:8: DIV ASSIGN ( NEWLINE )? expr
{
DIV42=(Token)match(input,DIV,FOLLOW_DIV_in_assign422); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_DIV.add(DIV42);
ASSIGN43=(Token)match(input,ASSIGN,FOLLOW_ASSIGN_in_assign424); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_ASSIGN.add(ASSIGN43);
// Atto.g:64:19: ( NEWLINE )?
int alt19=2;
int LA19_0 = input.LA(1);
if ( (LA19_0==NEWLINE) ) {
alt19=1;
}
switch (alt19) {
case 1 :
// Atto.g:64:19: NEWLINE
{
NEWLINE44=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_assign426); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE44);
}
break;
}
pushFollow(FOLLOW_expr_in_assign429);
expr45=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr45.getTree());
// AST REWRITE
// elements: postfix, postfix, expr, ASSIGN, DIV
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 64:33: -> ^( ASSIGN postfix ^( DIV postfix expr ) )
{
// Atto.g:64:36: ^( ASSIGN postfix ^( DIV postfix expr ) )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_ASSIGN.nextNode()
, root_1);
adaptor.addChild(root_1, stream_postfix.nextTree());
// Atto.g:64:53: ^( DIV postfix expr )
{
AttoTree root_2 = (AttoTree)adaptor.nil();
root_2 = (AttoTree)adaptor.becomeRoot(
stream_DIV.nextNode()
, root_2);
adaptor.addChild(root_2, stream_postfix.nextTree());
adaptor.addChild(root_2, stream_expr.nextTree());
adaptor.addChild(root_1, root_2);
}
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 5 :
// Atto.g:65:8: MOD ASSIGN ( NEWLINE )? expr
{
MOD46=(Token)match(input,MOD,FOLLOW_MOD_in_assign454); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_MOD.add(MOD46);
ASSIGN47=(Token)match(input,ASSIGN,FOLLOW_ASSIGN_in_assign456); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_ASSIGN.add(ASSIGN47);
// Atto.g:65:19: ( NEWLINE )?
int alt20=2;
int LA20_0 = input.LA(1);
if ( (LA20_0==NEWLINE) ) {
alt20=1;
}
switch (alt20) {
case 1 :
// Atto.g:65:19: NEWLINE
{
NEWLINE48=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_assign458); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE48);
}
break;
}
pushFollow(FOLLOW_expr_in_assign461);
expr49=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr49.getTree());
// AST REWRITE
// elements: MOD, postfix, postfix, expr, ASSIGN
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 65:33: -> ^( ASSIGN postfix ^( MOD postfix expr ) )
{
// Atto.g:65:36: ^( ASSIGN postfix ^( MOD postfix expr ) )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_ASSIGN.nextNode()
, root_1);
adaptor.addChild(root_1, stream_postfix.nextTree());
// Atto.g:65:53: ^( MOD postfix expr )
{
AttoTree root_2 = (AttoTree)adaptor.nil();
root_2 = (AttoTree)adaptor.becomeRoot(
stream_MOD.nextNode()
, root_2);
adaptor.addChild(root_2, stream_postfix.nextTree());
adaptor.addChild(root_2, stream_expr.nextTree());
adaptor.addChild(root_1, root_2);
}
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
}
break;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "assign"
public static class paramsdef_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "paramsdef"
// Atto.g:70:1: paramsdef : ( vardef ( COMMA vardef )* )? -> ^( PARAMS ( vardef )* ) ;
public final AttoParser.paramsdef_return paramsdef() throws RecognitionException {
AttoParser.paramsdef_return retval = new AttoParser.paramsdef_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token COMMA51=null;
AttoParser.vardef_return vardef50 =null;
AttoParser.vardef_return vardef52 =null;
AttoTree COMMA51_tree=null;
RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
RewriteRuleSubtreeStream stream_vardef=new RewriteRuleSubtreeStream(adaptor,"rule vardef");
try {
// Atto.g:71:2: ( ( vardef ( COMMA vardef )* )? -> ^( PARAMS ( vardef )* ) )
// Atto.g:71:4: ( vardef ( COMMA vardef )* )?
{
// Atto.g:71:4: ( vardef ( COMMA vardef )* )?
int alt24=2;
int LA24_0 = input.LA(1);
if ( (LA24_0==AT||LA24_0==NAME) ) {
alt24=1;
}
switch (alt24) {
case 1 :
// Atto.g:71:5: vardef ( COMMA vardef )*
{
pushFollow(FOLLOW_vardef_in_paramsdef502);
vardef50=vardef();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_vardef.add(vardef50.getTree());
// Atto.g:71:12: ( COMMA vardef )*
loop23:
do {
int alt23=2;
int LA23_0 = input.LA(1);
if ( (LA23_0==COMMA) ) {
alt23=1;
}
switch (alt23) {
case 1 :
// Atto.g:71:13: COMMA vardef
{
COMMA51=(Token)match(input,COMMA,FOLLOW_COMMA_in_paramsdef505); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA51);
pushFollow(FOLLOW_vardef_in_paramsdef507);
vardef52=vardef();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_vardef.add(vardef52.getTree());
}
break;
default :
break loop23;
}
} while (true);
}
break;
}
// AST REWRITE
// elements: vardef
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 71:30: -> ^( PARAMS ( vardef )* )
{
// Atto.g:71:33: ^( PARAMS ( vardef )* )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(PARAMS, "PARAMS")
, root_1);
// Atto.g:71:42: ( vardef )*
while ( stream_vardef.hasNext() ) {
adaptor.addChild(root_1, stream_vardef.nextTree());
}
stream_vardef.reset();
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "paramsdef"
public static class if__return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "if_"
// Atto.g:74:1: if_ : IF cond_expr= expr ( NEWLINE block NEWLINE ( elif )* ( else_ )? END -> ^( IF $cond_expr block ( elif )* ( else_ )? ) | THEN then_expr= expr ( ELSE else_expr= expr )? -> ^( IF $cond_expr $then_expr ( ^( ELSE $else_expr) )? ) ) ;
public final AttoParser.if__return if_() throws RecognitionException {
AttoParser.if__return retval = new AttoParser.if__return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token IF53=null;
Token NEWLINE54=null;
Token NEWLINE56=null;
Token END59=null;
Token THEN60=null;
Token ELSE61=null;
AttoParser.expr_return cond_expr =null;
AttoParser.expr_return then_expr =null;
AttoParser.expr_return else_expr =null;
AttoParser.block_return block55 =null;
AttoParser.elif_return elif57 =null;
AttoParser.else__return else_58 =null;
AttoTree IF53_tree=null;
AttoTree NEWLINE54_tree=null;
AttoTree NEWLINE56_tree=null;
AttoTree END59_tree=null;
AttoTree THEN60_tree=null;
AttoTree ELSE61_tree=null;
RewriteRuleTokenStream stream_THEN=new RewriteRuleTokenStream(adaptor,"token THEN");
RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
RewriteRuleTokenStream stream_END=new RewriteRuleTokenStream(adaptor,"token END");
RewriteRuleTokenStream stream_IF=new RewriteRuleTokenStream(adaptor,"token IF");
RewriteRuleTokenStream stream_ELSE=new RewriteRuleTokenStream(adaptor,"token ELSE");
RewriteRuleSubtreeStream stream_else_=new RewriteRuleSubtreeStream(adaptor,"rule else_");
RewriteRuleSubtreeStream stream_block=new RewriteRuleSubtreeStream(adaptor,"rule block");
RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
RewriteRuleSubtreeStream stream_elif=new RewriteRuleSubtreeStream(adaptor,"rule elif");
try {
// Atto.g:75:2: ( IF cond_expr= expr ( NEWLINE block NEWLINE ( elif )* ( else_ )? END -> ^( IF $cond_expr block ( elif )* ( else_ )? ) | THEN then_expr= expr ( ELSE else_expr= expr )? -> ^( IF $cond_expr $then_expr ( ^( ELSE $else_expr) )? ) ) )
// Atto.g:75:4: IF cond_expr= expr ( NEWLINE block NEWLINE ( elif )* ( else_ )? END -> ^( IF $cond_expr block ( elif )* ( else_ )? ) | THEN then_expr= expr ( ELSE else_expr= expr )? -> ^( IF $cond_expr $then_expr ( ^( ELSE $else_expr) )? ) )
{
IF53=(Token)match(input,IF,FOLLOW_IF_in_if_533); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_IF.add(IF53);
pushFollow(FOLLOW_expr_in_if_537);
cond_expr=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(cond_expr.getTree());
// Atto.g:76:4: ( NEWLINE block NEWLINE ( elif )* ( else_ )? END -> ^( IF $cond_expr block ( elif )* ( else_ )? ) | THEN then_expr= expr ( ELSE else_expr= expr )? -> ^( IF $cond_expr $then_expr ( ^( ELSE $else_expr) )? ) )
int alt28=2;
int LA28_0 = input.LA(1);
if ( (LA28_0==NEWLINE) ) {
alt28=1;
}
else if ( (LA28_0==THEN) ) {
alt28=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 28, 0, input);
throw nvae;
}
switch (alt28) {
case 1 :
// Atto.g:76:6: NEWLINE block NEWLINE ( elif )* ( else_ )? END
{
NEWLINE54=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_if_545); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE54);
pushFollow(FOLLOW_block_in_if_547);
block55=block();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_block.add(block55.getTree());
NEWLINE56=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_if_549); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE56);
// Atto.g:76:28: ( elif )*
loop25:
do {
int alt25=2;
int LA25_0 = input.LA(1);
if ( (LA25_0==ELIF) ) {
alt25=1;
}
switch (alt25) {
case 1 :
// Atto.g:76:28: elif
{
pushFollow(FOLLOW_elif_in_if_551);
elif57=elif();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_elif.add(elif57.getTree());
}
break;
default :
break loop25;
}
} while (true);
// Atto.g:76:34: ( else_ )?
int alt26=2;
int LA26_0 = input.LA(1);
if ( (LA26_0==ELSE) ) {
alt26=1;
}
switch (alt26) {
case 1 :
// Atto.g:76:34: else_
{
pushFollow(FOLLOW_else__in_if_554);
else_58=else_();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_else_.add(else_58.getTree());
}
break;
}
END59=(Token)match(input,END,FOLLOW_END_in_if_557); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_END.add(END59);
// AST REWRITE
// elements: else_, block, elif, IF, cond_expr
// token labels:
// rule labels: cond_expr, retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_cond_expr=new RewriteRuleSubtreeStream(adaptor,"rule cond_expr",cond_expr!=null?cond_expr.tree:null);
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 77:5: -> ^( IF $cond_expr block ( elif )* ( else_ )? )
{
// Atto.g:77:8: ^( IF $cond_expr block ( elif )* ( else_ )? )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_IF.nextNode()
, root_1);
adaptor.addChild(root_1, stream_cond_expr.nextTree());
adaptor.addChild(root_1, stream_block.nextTree());
// Atto.g:77:30: ( elif )*
while ( stream_elif.hasNext() ) {
adaptor.addChild(root_1, stream_elif.nextTree());
}
stream_elif.reset();
// Atto.g:77:36: ( else_ )?
if ( stream_else_.hasNext() ) {
adaptor.addChild(root_1, stream_else_.nextTree());
}
stream_else_.reset();
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 2 :
// Atto.g:78:6: THEN then_expr= expr ( ELSE else_expr= expr )?
{
THEN60=(Token)match(input,THEN,FOLLOW_THEN_in_if_585); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_THEN.add(THEN60);
pushFollow(FOLLOW_expr_in_if_589);
then_expr=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(then_expr.getTree());
// Atto.g:78:26: ( ELSE else_expr= expr )?
int alt27=2;
int LA27_0 = input.LA(1);
if ( (LA27_0==ELSE) ) {
alt27=1;
}
switch (alt27) {
case 1 :
// Atto.g:78:27: ELSE else_expr= expr
{
ELSE61=(Token)match(input,ELSE,FOLLOW_ELSE_in_if_592); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_ELSE.add(ELSE61);
pushFollow(FOLLOW_expr_in_if_596);
else_expr=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(else_expr.getTree());
}
break;
}
// AST REWRITE
// elements: ELSE, cond_expr, IF, then_expr, else_expr
// token labels:
// rule labels: cond_expr, retval, else_expr, then_expr
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_cond_expr=new RewriteRuleSubtreeStream(adaptor,"rule cond_expr",cond_expr!=null?cond_expr.tree:null);
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
RewriteRuleSubtreeStream stream_else_expr=new RewriteRuleSubtreeStream(adaptor,"rule else_expr",else_expr!=null?else_expr.tree:null);
RewriteRuleSubtreeStream stream_then_expr=new RewriteRuleSubtreeStream(adaptor,"rule then_expr",then_expr!=null?then_expr.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 79:5: -> ^( IF $cond_expr $then_expr ( ^( ELSE $else_expr) )? )
{
// Atto.g:79:8: ^( IF $cond_expr $then_expr ( ^( ELSE $else_expr) )? )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_IF.nextNode()
, root_1);
adaptor.addChild(root_1, stream_cond_expr.nextTree());
adaptor.addChild(root_1, stream_then_expr.nextTree());
// Atto.g:79:35: ( ^( ELSE $else_expr) )?
if ( stream_ELSE.hasNext()||stream_else_expr.hasNext() ) {
// Atto.g:79:35: ^( ELSE $else_expr)
{
AttoTree root_2 = (AttoTree)adaptor.nil();
root_2 = (AttoTree)adaptor.becomeRoot(
stream_ELSE.nextNode()
, root_2);
adaptor.addChild(root_2, stream_else_expr.nextTree());
adaptor.addChild(root_1, root_2);
}
}
stream_ELSE.reset();
stream_else_expr.reset();
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "if_"
public static class elif_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "elif"
// Atto.g:83:1: elif : ELIF expr NEWLINE block NEWLINE -> ^( ELIF expr block ) ;
public final AttoParser.elif_return elif() throws RecognitionException {
AttoParser.elif_return retval = new AttoParser.elif_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token ELIF62=null;
Token NEWLINE64=null;
Token NEWLINE66=null;
AttoParser.expr_return expr63 =null;
AttoParser.block_return block65 =null;
AttoTree ELIF62_tree=null;
AttoTree NEWLINE64_tree=null;
AttoTree NEWLINE66_tree=null;
RewriteRuleTokenStream stream_ELIF=new RewriteRuleTokenStream(adaptor,"token ELIF");
RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
RewriteRuleSubtreeStream stream_block=new RewriteRuleSubtreeStream(adaptor,"rule block");
RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
try {
// Atto.g:84:2: ( ELIF expr NEWLINE block NEWLINE -> ^( ELIF expr block ) )
// Atto.g:84:4: ELIF expr NEWLINE block NEWLINE
{
ELIF62=(Token)match(input,ELIF,FOLLOW_ELIF_in_elif639); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_ELIF.add(ELIF62);
pushFollow(FOLLOW_expr_in_elif641);
expr63=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr63.getTree());
NEWLINE64=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_elif643); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE64);
pushFollow(FOLLOW_block_in_elif645);
block65=block();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_block.add(block65.getTree());
NEWLINE66=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_elif647); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE66);
// AST REWRITE
// elements: block, ELIF, expr
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 84:36: -> ^( ELIF expr block )
{
// Atto.g:84:39: ^( ELIF expr block )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_ELIF.nextNode()
, root_1);
adaptor.addChild(root_1, stream_expr.nextTree());
adaptor.addChild(root_1, stream_block.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "elif"
public static class else__return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "else_"
// Atto.g:87:1: else_ : ELSE NEWLINE block NEWLINE -> ^( ELSE block ) ;
public final AttoParser.else__return else_() throws RecognitionException {
AttoParser.else__return retval = new AttoParser.else__return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token ELSE67=null;
Token NEWLINE68=null;
Token NEWLINE70=null;
AttoParser.block_return block69 =null;
AttoTree ELSE67_tree=null;
AttoTree NEWLINE68_tree=null;
AttoTree NEWLINE70_tree=null;
RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
RewriteRuleTokenStream stream_ELSE=new RewriteRuleTokenStream(adaptor,"token ELSE");
RewriteRuleSubtreeStream stream_block=new RewriteRuleSubtreeStream(adaptor,"rule block");
try {
// Atto.g:88:2: ( ELSE NEWLINE block NEWLINE -> ^( ELSE block ) )
// Atto.g:88:4: ELSE NEWLINE block NEWLINE
{
ELSE67=(Token)match(input,ELSE,FOLLOW_ELSE_in_else_668); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_ELSE.add(ELSE67);
NEWLINE68=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_else_670); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE68);
pushFollow(FOLLOW_block_in_else_672);
block69=block();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_block.add(block69.getTree());
NEWLINE70=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_else_675); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE70);
// AST REWRITE
// elements: block, ELSE
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 88:32: -> ^( ELSE block )
{
// Atto.g:88:35: ^( ELSE block )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_ELSE.nextNode()
, root_1);
adaptor.addChild(root_1, stream_block.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "else_"
public static class while__return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "while_"
// Atto.g:91:1: while_ : WHILE cond_expr= expr ( NEWLINE block NEWLINE END -> ^( WHILE $cond_expr block ) | THEN then_expr= expr -> ^( WHILE $cond_expr $then_expr) ) ;
public final AttoParser.while__return while_() throws RecognitionException {
AttoParser.while__return retval = new AttoParser.while__return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token WHILE71=null;
Token NEWLINE72=null;
Token NEWLINE74=null;
Token END75=null;
Token THEN76=null;
AttoParser.expr_return cond_expr =null;
AttoParser.expr_return then_expr =null;
AttoParser.block_return block73 =null;
AttoTree WHILE71_tree=null;
AttoTree NEWLINE72_tree=null;
AttoTree NEWLINE74_tree=null;
AttoTree END75_tree=null;
AttoTree THEN76_tree=null;
RewriteRuleTokenStream stream_THEN=new RewriteRuleTokenStream(adaptor,"token THEN");
RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
RewriteRuleTokenStream stream_WHILE=new RewriteRuleTokenStream(adaptor,"token WHILE");
RewriteRuleTokenStream stream_END=new RewriteRuleTokenStream(adaptor,"token END");
RewriteRuleSubtreeStream stream_block=new RewriteRuleSubtreeStream(adaptor,"rule block");
RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
try {
// Atto.g:92:2: ( WHILE cond_expr= expr ( NEWLINE block NEWLINE END -> ^( WHILE $cond_expr block ) | THEN then_expr= expr -> ^( WHILE $cond_expr $then_expr) ) )
// Atto.g:92:4: WHILE cond_expr= expr ( NEWLINE block NEWLINE END -> ^( WHILE $cond_expr block ) | THEN then_expr= expr -> ^( WHILE $cond_expr $then_expr) )
{
WHILE71=(Token)match(input,WHILE,FOLLOW_WHILE_in_while_695); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_WHILE.add(WHILE71);
pushFollow(FOLLOW_expr_in_while_699);
cond_expr=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(cond_expr.getTree());
// Atto.g:93:4: ( NEWLINE block NEWLINE END -> ^( WHILE $cond_expr block ) | THEN then_expr= expr -> ^( WHILE $cond_expr $then_expr) )
int alt29=2;
int LA29_0 = input.LA(1);
if ( (LA29_0==NEWLINE) ) {
alt29=1;
}
else if ( (LA29_0==THEN) ) {
alt29=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 29, 0, input);
throw nvae;
}
switch (alt29) {
case 1 :
// Atto.g:93:6: NEWLINE block NEWLINE END
{
NEWLINE72=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_while_707); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE72);
pushFollow(FOLLOW_block_in_while_709);
block73=block();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_block.add(block73.getTree());
NEWLINE74=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_while_711); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE74);
END75=(Token)match(input,END,FOLLOW_END_in_while_713); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_END.add(END75);
// AST REWRITE
// elements: WHILE, block, cond_expr
// token labels:
// rule labels: cond_expr, retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_cond_expr=new RewriteRuleSubtreeStream(adaptor,"rule cond_expr",cond_expr!=null?cond_expr.tree:null);
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 94:5: -> ^( WHILE $cond_expr block )
{
// Atto.g:94:8: ^( WHILE $cond_expr block )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_WHILE.nextNode()
, root_1);
adaptor.addChild(root_1, stream_cond_expr.nextTree());
adaptor.addChild(root_1, stream_block.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 2 :
// Atto.g:95:6: THEN then_expr= expr
{
THEN76=(Token)match(input,THEN,FOLLOW_THEN_in_while_736); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_THEN.add(THEN76);
pushFollow(FOLLOW_expr_in_while_740);
then_expr=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(then_expr.getTree());
// AST REWRITE
// elements: cond_expr, WHILE, then_expr
// token labels:
// rule labels: cond_expr, retval, then_expr
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_cond_expr=new RewriteRuleSubtreeStream(adaptor,"rule cond_expr",cond_expr!=null?cond_expr.tree:null);
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
RewriteRuleSubtreeStream stream_then_expr=new RewriteRuleSubtreeStream(adaptor,"rule then_expr",then_expr!=null?then_expr.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 96:5: -> ^( WHILE $cond_expr $then_expr)
{
// Atto.g:96:8: ^( WHILE $cond_expr $then_expr)
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
stream_WHILE.nextNode()
, root_1);
adaptor.addChild(root_1, stream_cond_expr.nextTree());
adaptor.addChild(root_1, stream_then_expr.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "while_"
public static class or_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "or"
// Atto.g:100:1: or : and ( OR ^ and )* ;
public final AttoParser.or_return or() throws RecognitionException {
AttoParser.or_return retval = new AttoParser.or_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token OR78=null;
AttoParser.and_return and77 =null;
AttoParser.and_return and79 =null;
AttoTree OR78_tree=null;
try {
// Atto.g:101:2: ( and ( OR ^ and )* )
// Atto.g:101:4: and ( OR ^ and )*
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_and_in_or772);
and77=and();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, and77.getTree());
// Atto.g:101:8: ( OR ^ and )*
loop30:
do {
int alt30=2;
int LA30_0 = input.LA(1);
if ( (LA30_0==OR) ) {
alt30=1;
}
switch (alt30) {
case 1 :
// Atto.g:101:9: OR ^ and
{
OR78=(Token)match(input,OR,FOLLOW_OR_in_or775); if (state.failed) return retval;
if ( state.backtracking==0 ) {
OR78_tree =
(AttoTree)adaptor.create(OR78)
;
root_0 = (AttoTree)adaptor.becomeRoot(OR78_tree, root_0);
}
pushFollow(FOLLOW_and_in_or778);
and79=and();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, and79.getTree());
}
break;
default :
break loop30;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "or"
public static class and_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "and"
// Atto.g:104:1: and : rel ( AND ^ rel )* ;
public final AttoParser.and_return and() throws RecognitionException {
AttoParser.and_return retval = new AttoParser.and_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token AND81=null;
AttoParser.rel_return rel80 =null;
AttoParser.rel_return rel82 =null;
AttoTree AND81_tree=null;
try {
// Atto.g:105:2: ( rel ( AND ^ rel )* )
// Atto.g:105:4: rel ( AND ^ rel )*
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_rel_in_and791);
rel80=rel();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, rel80.getTree());
// Atto.g:105:8: ( AND ^ rel )*
loop31:
do {
int alt31=2;
int LA31_0 = input.LA(1);
if ( (LA31_0==AND) ) {
alt31=1;
}
switch (alt31) {
case 1 :
// Atto.g:105:9: AND ^ rel
{
AND81=(Token)match(input,AND,FOLLOW_AND_in_and794); if (state.failed) return retval;
if ( state.backtracking==0 ) {
AND81_tree =
(AttoTree)adaptor.create(AND81)
;
root_0 = (AttoTree)adaptor.becomeRoot(AND81_tree, root_0);
}
pushFollow(FOLLOW_rel_in_and797);
rel82=rel();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, rel82.getTree());
}
break;
default :
break loop31;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "and"
public static class rel_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "rel"
// Atto.g:108:1: rel : add ( ( EQ | NE | LE | GE | LT | GT | COMPOSITE | PIPELINE | REVERSE_PIPELINE ) ^ add )* ;
public final AttoParser.rel_return rel() throws RecognitionException {
AttoParser.rel_return retval = new AttoParser.rel_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token set84=null;
AttoParser.add_return add83 =null;
AttoParser.add_return add85 =null;
AttoTree set84_tree=null;
try {
// Atto.g:109:2: ( add ( ( EQ | NE | LE | GE | LT | GT | COMPOSITE | PIPELINE | REVERSE_PIPELINE ) ^ add )* )
// Atto.g:109:4: add ( ( EQ | NE | LE | GE | LT | GT | COMPOSITE | PIPELINE | REVERSE_PIPELINE ) ^ add )*
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_add_in_rel810);
add83=add();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, add83.getTree());
// Atto.g:109:8: ( ( EQ | NE | LE | GE | LT | GT | COMPOSITE | PIPELINE | REVERSE_PIPELINE ) ^ add )*
loop32:
do {
int alt32=2;
int LA32_0 = input.LA(1);
if ( (LA32_0==COMPOSITE||LA32_0==EQ||(LA32_0 >= GE && LA32_0 <= GT)||LA32_0==LE||LA32_0==LT||LA32_0==NE||LA32_0==PIPELINE||LA32_0==REVERSE_PIPELINE) ) {
alt32=1;
}
switch (alt32) {
case 1 :
// Atto.g:109:9: ( EQ | NE | LE | GE | LT | GT | COMPOSITE | PIPELINE | REVERSE_PIPELINE ) ^ add
{
set84=(Token)input.LT(1);
set84=(Token)input.LT(1);
if ( input.LA(1)==COMPOSITE||input.LA(1)==EQ||(input.LA(1) >= GE && input.LA(1) <= GT)||input.LA(1)==LE||input.LA(1)==LT||input.LA(1)==NE||input.LA(1)==PIPELINE||input.LA(1)==REVERSE_PIPELINE ) {
input.consume();
if ( state.backtracking==0 ) root_0 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(set84)
, root_0);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
pushFollow(FOLLOW_add_in_rel834);
add85=add();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, add85.getTree());
}
break;
default :
break loop32;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "rel"
public static class add_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "add"
// Atto.g:112:1: add : mul ( ( PLUS | MINUS ) ^ mul )* ;
public final AttoParser.add_return add() throws RecognitionException {
AttoParser.add_return retval = new AttoParser.add_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token set87=null;
AttoParser.mul_return mul86 =null;
AttoParser.mul_return mul88 =null;
AttoTree set87_tree=null;
try {
// Atto.g:113:2: ( mul ( ( PLUS | MINUS ) ^ mul )* )
// Atto.g:113:4: mul ( ( PLUS | MINUS ) ^ mul )*
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_mul_in_add847);
mul86=mul();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, mul86.getTree());
// Atto.g:113:8: ( ( PLUS | MINUS ) ^ mul )*
loop33:
do {
int alt33=2;
int LA33_0 = input.LA(1);
if ( (LA33_0==MINUS||LA33_0==PLUS) ) {
alt33=1;
}
switch (alt33) {
case 1 :
// Atto.g:113:9: ( PLUS | MINUS ) ^ mul
{
set87=(Token)input.LT(1);
set87=(Token)input.LT(1);
if ( input.LA(1)==MINUS||input.LA(1)==PLUS ) {
input.consume();
if ( state.backtracking==0 ) root_0 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(set87)
, root_0);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
pushFollow(FOLLOW_mul_in_add857);
mul88=mul();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, mul88.getTree());
}
break;
default :
break loop33;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "add"
public static class mul_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "mul"
// Atto.g:116:1: mul : unary ( ( MUL | DIV | MOD ) ^ unary )* ;
public final AttoParser.mul_return mul() throws RecognitionException {
AttoParser.mul_return retval = new AttoParser.mul_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token set90=null;
AttoParser.unary_return unary89 =null;
AttoParser.unary_return unary91 =null;
AttoTree set90_tree=null;
try {
// Atto.g:117:2: ( unary ( ( MUL | DIV | MOD ) ^ unary )* )
// Atto.g:117:4: unary ( ( MUL | DIV | MOD ) ^ unary )*
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_unary_in_mul870);
unary89=unary();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, unary89.getTree());
// Atto.g:117:10: ( ( MUL | DIV | MOD ) ^ unary )*
loop34:
do {
int alt34=2;
int LA34_0 = input.LA(1);
if ( (LA34_0==DIV||(LA34_0 >= MOD && LA34_0 <= MUL)) ) {
alt34=1;
}
switch (alt34) {
case 1 :
// Atto.g:117:11: ( MUL | DIV | MOD ) ^ unary
{
set90=(Token)input.LT(1);
set90=(Token)input.LT(1);
if ( input.LA(1)==DIV||(input.LA(1) >= MOD && input.LA(1) <= MUL) ) {
input.consume();
if ( state.backtracking==0 ) root_0 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(set90)
, root_0);
state.errorRecovery=false;
state.failed=false;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
MismatchedSetException mse = new MismatchedSetException(null,input);
throw mse;
}
pushFollow(FOLLOW_unary_in_mul882);
unary91=unary();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, unary91.getTree());
}
break;
default :
break loop34;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "mul"
public static class unary_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "unary"
// Atto.g:120:1: unary : ( postfix | NOT ^ postfix | MINUS postfix -> ^( UNARY_MINUS postfix ) );
public final AttoParser.unary_return unary() throws RecognitionException {
AttoParser.unary_return retval = new AttoParser.unary_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token NOT93=null;
Token MINUS95=null;
AttoParser.postfix_return postfix92 =null;
AttoParser.postfix_return postfix94 =null;
AttoParser.postfix_return postfix96 =null;
AttoTree NOT93_tree=null;
AttoTree MINUS95_tree=null;
RewriteRuleTokenStream stream_MINUS=new RewriteRuleTokenStream(adaptor,"token MINUS");
RewriteRuleSubtreeStream stream_postfix=new RewriteRuleSubtreeStream(adaptor,"rule postfix");
try {
// Atto.g:121:2: ( postfix | NOT ^ postfix | MINUS postfix -> ^( UNARY_MINUS postfix ) )
int alt35=3;
switch ( input.LA(1) ) {
case AT:
case BOOLEAN:
case LBRACK:
case LCURLY:
case LPAREN:
case NAME:
case NULL:
case NUMBER:
case STRING:
{
alt35=1;
}
break;
case NOT:
{
alt35=2;
}
break;
case MINUS:
{
alt35=3;
}
break;
default:
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 35, 0, input);
throw nvae;
}
switch (alt35) {
case 1 :
// Atto.g:121:4: postfix
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_postfix_in_unary896);
postfix92=postfix();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, postfix92.getTree());
}
break;
case 2 :
// Atto.g:122:4: NOT ^ postfix
{
root_0 = (AttoTree)adaptor.nil();
NOT93=(Token)match(input,NOT,FOLLOW_NOT_in_unary901); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NOT93_tree =
(AttoTree)adaptor.create(NOT93)
;
root_0 = (AttoTree)adaptor.becomeRoot(NOT93_tree, root_0);
}
pushFollow(FOLLOW_postfix_in_unary904);
postfix94=postfix();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, postfix94.getTree());
}
break;
case 3 :
// Atto.g:123:4: MINUS postfix
{
MINUS95=(Token)match(input,MINUS,FOLLOW_MINUS_in_unary909); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_MINUS.add(MINUS95);
pushFollow(FOLLOW_postfix_in_unary911);
postfix96=postfix();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_postfix.add(postfix96.getTree());
// AST REWRITE
// elements: postfix
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 123:18: -> ^( UNARY_MINUS postfix )
{
// Atto.g:123:21: ^( UNARY_MINUS postfix )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(UNARY_MINUS, "UNARY_MINUS")
, root_1);
adaptor.addChild(root_1, stream_postfix.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "unary"
public static class postfix_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "postfix"
// Atto.g:126:1: postfix : ( primary -> primary ) ( LPAREN argsdef RPAREN -> ^( CALL $postfix argsdef ) | LBRACK expr RBRACK -> ^( INDEX $postfix expr ) | DOT primary -> ^( FIELD_ACCESS $postfix primary ) )* ;
public final AttoParser.postfix_return postfix() throws RecognitionException {
AttoParser.postfix_return retval = new AttoParser.postfix_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token LPAREN98=null;
Token RPAREN100=null;
Token LBRACK101=null;
Token RBRACK103=null;
Token DOT104=null;
AttoParser.primary_return primary97 =null;
AttoParser.argsdef_return argsdef99 =null;
AttoParser.expr_return expr102 =null;
AttoParser.primary_return primary105 =null;
AttoTree LPAREN98_tree=null;
AttoTree RPAREN100_tree=null;
AttoTree LBRACK101_tree=null;
AttoTree RBRACK103_tree=null;
AttoTree DOT104_tree=null;
RewriteRuleTokenStream stream_RBRACK=new RewriteRuleTokenStream(adaptor,"token RBRACK");
RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
RewriteRuleTokenStream stream_LBRACK=new RewriteRuleTokenStream(adaptor,"token LBRACK");
RewriteRuleTokenStream stream_DOT=new RewriteRuleTokenStream(adaptor,"token DOT");
RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
RewriteRuleSubtreeStream stream_primary=new RewriteRuleSubtreeStream(adaptor,"rule primary");
RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
RewriteRuleSubtreeStream stream_argsdef=new RewriteRuleSubtreeStream(adaptor,"rule argsdef");
try {
// Atto.g:127:2: ( ( primary -> primary ) ( LPAREN argsdef RPAREN -> ^( CALL $postfix argsdef ) | LBRACK expr RBRACK -> ^( INDEX $postfix expr ) | DOT primary -> ^( FIELD_ACCESS $postfix primary ) )* )
// Atto.g:127:4: ( primary -> primary ) ( LPAREN argsdef RPAREN -> ^( CALL $postfix argsdef ) | LBRACK expr RBRACK -> ^( INDEX $postfix expr ) | DOT primary -> ^( FIELD_ACCESS $postfix primary ) )*
{
// Atto.g:127:4: ( primary -> primary )
// Atto.g:127:6: primary
{
pushFollow(FOLLOW_primary_in_postfix934);
primary97=primary();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_primary.add(primary97.getTree());
// AST REWRITE
// elements: primary
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 127:14: -> primary
{
adaptor.addChild(root_0, stream_primary.nextTree());
}
retval.tree = root_0;
}
}
// Atto.g:128:4: ( LPAREN argsdef RPAREN -> ^( CALL $postfix argsdef ) | LBRACK expr RBRACK -> ^( INDEX $postfix expr ) | DOT primary -> ^( FIELD_ACCESS $postfix primary ) )*
loop36:
do {
int alt36=4;
switch ( input.LA(1) ) {
case LPAREN:
{
alt36=1;
}
break;
case LBRACK:
{
alt36=2;
}
break;
case DOT:
{
alt36=3;
}
break;
}
switch (alt36) {
case 1 :
// Atto.g:128:6: LPAREN argsdef RPAREN
{
LPAREN98=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_postfix946); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN98);
pushFollow(FOLLOW_argsdef_in_postfix948);
argsdef99=argsdef();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_argsdef.add(argsdef99.getTree());
RPAREN100=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_postfix950); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN100);
// AST REWRITE
// elements: argsdef, postfix
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 129:5: -> ^( CALL $postfix argsdef )
{
// Atto.g:129:8: ^( CALL $postfix argsdef )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(CALL, "CALL")
, root_1);
adaptor.addChild(root_1, stream_retval.nextTree());
adaptor.addChild(root_1, stream_argsdef.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 2 :
// Atto.g:130:6: LBRACK expr RBRACK
{
LBRACK101=(Token)match(input,LBRACK,FOLLOW_LBRACK_in_postfix973); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_LBRACK.add(LBRACK101);
pushFollow(FOLLOW_expr_in_postfix975);
expr102=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr102.getTree());
RBRACK103=(Token)match(input,RBRACK,FOLLOW_RBRACK_in_postfix977); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_RBRACK.add(RBRACK103);
// AST REWRITE
// elements: postfix, expr
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 131:5: -> ^( INDEX $postfix expr )
{
// Atto.g:131:8: ^( INDEX $postfix expr )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(INDEX, "INDEX")
, root_1);
adaptor.addChild(root_1, stream_retval.nextTree());
adaptor.addChild(root_1, stream_expr.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
case 3 :
// Atto.g:132:6: DOT primary
{
DOT104=(Token)match(input,DOT,FOLLOW_DOT_in_postfix1000); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_DOT.add(DOT104);
pushFollow(FOLLOW_primary_in_postfix1002);
primary105=primary();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_primary.add(primary105.getTree());
// AST REWRITE
// elements: primary, postfix
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 133:5: -> ^( FIELD_ACCESS $postfix primary )
{
// Atto.g:133:8: ^( FIELD_ACCESS $postfix primary )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(FIELD_ACCESS, "FIELD_ACCESS")
, root_1);
adaptor.addChild(root_1, stream_retval.nextTree());
adaptor.addChild(root_1, stream_primary.nextTree());
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
break;
default :
break loop36;
}
} while (true);
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "postfix"
public static class argsdef_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "argsdef"
// Atto.g:137:1: argsdef : ( expr ( COMMA expr )* )? -> ^( ARGS ( expr )* ) ;
public final AttoParser.argsdef_return argsdef() throws RecognitionException {
AttoParser.argsdef_return retval = new AttoParser.argsdef_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token COMMA107=null;
AttoParser.expr_return expr106 =null;
AttoParser.expr_return expr108 =null;
AttoTree COMMA107_tree=null;
RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
try {
// Atto.g:138:2: ( ( expr ( COMMA expr )* )? -> ^( ARGS ( expr )* ) )
// Atto.g:138:4: ( expr ( COMMA expr )* )?
{
// Atto.g:138:4: ( expr ( COMMA expr )* )?
int alt38=2;
int LA38_0 = input.LA(1);
if ( (LA38_0==AT||LA38_0==BOOLEAN||LA38_0==IF||(LA38_0 >= LBRACK && LA38_0 <= LCURLY)||LA38_0==LPAREN||LA38_0==MINUS||LA38_0==NAME||(LA38_0 >= NOT && LA38_0 <= NUMBER)||LA38_0==STRING||LA38_0==WHILE) ) {
alt38=1;
}
switch (alt38) {
case 1 :
// Atto.g:138:5: expr ( COMMA expr )*
{
pushFollow(FOLLOW_expr_in_argsdef1036);
expr106=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr106.getTree());
// Atto.g:138:10: ( COMMA expr )*
loop37:
do {
int alt37=2;
int LA37_0 = input.LA(1);
if ( (LA37_0==COMMA) ) {
alt37=1;
}
switch (alt37) {
case 1 :
// Atto.g:138:11: COMMA expr
{
COMMA107=(Token)match(input,COMMA,FOLLOW_COMMA_in_argsdef1039); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA107);
pushFollow(FOLLOW_expr_in_argsdef1041);
expr108=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr108.getTree());
}
break;
default :
break loop37;
}
} while (true);
}
break;
}
// AST REWRITE
// elements: expr
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 138:26: -> ^( ARGS ( expr )* )
{
// Atto.g:138:29: ^( ARGS ( expr )* )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(ARGS, "ARGS")
, root_1);
// Atto.g:138:36: ( expr )*
while ( stream_expr.hasNext() ) {
adaptor.addChild(root_1, stream_expr.nextTree());
}
stream_expr.reset();
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "argsdef"
public static class primary_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "primary"
// Atto.g:141:1: primary : ( NAME | AT ^ NAME | NUMBER | STRING | BOOLEAN | NULL | LPAREN expr RPAREN -> expr | ( obj )=> obj | fun | array );
public final AttoParser.primary_return primary() throws RecognitionException {
AttoParser.primary_return retval = new AttoParser.primary_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token NAME109=null;
Token AT110=null;
Token NAME111=null;
Token NUMBER112=null;
Token STRING113=null;
Token BOOLEAN114=null;
Token NULL115=null;
Token LPAREN116=null;
Token RPAREN118=null;
AttoParser.expr_return expr117 =null;
AttoParser.obj_return obj119 =null;
AttoParser.fun_return fun120 =null;
AttoParser.array_return array121 =null;
AttoTree NAME109_tree=null;
AttoTree AT110_tree=null;
AttoTree NAME111_tree=null;
AttoTree NUMBER112_tree=null;
AttoTree STRING113_tree=null;
AttoTree BOOLEAN114_tree=null;
AttoTree NULL115_tree=null;
AttoTree LPAREN116_tree=null;
AttoTree RPAREN118_tree=null;
RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
try {
// Atto.g:142:2: ( NAME | AT ^ NAME | NUMBER | STRING | BOOLEAN | NULL | LPAREN expr RPAREN -> expr | ( obj )=> obj | fun | array )
int alt39=10;
switch ( input.LA(1) ) {
case NAME:
{
alt39=1;
}
break;
case AT:
{
alt39=2;
}
break;
case NUMBER:
{
alt39=3;
}
break;
case STRING:
{
alt39=4;
}
break;
case BOOLEAN:
{
alt39=5;
}
break;
case NULL:
{
alt39=6;
}
break;
case LPAREN:
{
alt39=7;
}
break;
case LCURLY:
{
int LA39_8 = input.LA(2);
if ( (LA39_8==NEWLINE) ) {
int LA39_10 = input.LA(3);
if ( (LA39_10==NAME) ) {
int LA39_15 = input.LA(4);
if ( (LA39_15==COLON) && (synpred2_Atto())) {
alt39=8;
}
else if ( (LA39_15==AND||LA39_15==ASSIGN||LA39_15==COMPOSITE||(LA39_15 >= DIV && LA39_15 <= DOT)||LA39_15==EQ||(LA39_15 >= GE && LA39_15 <= GT)||LA39_15==LBRACK||LA39_15==LE||(LA39_15 >= LPAREN && LA39_15 <= MUL)||(LA39_15 >= NE && LA39_15 <= NEWLINE)||LA39_15==OR||(LA39_15 >= PIPELINE && LA39_15 <= PLUS)||(LA39_15 >= RCURLY && LA39_15 <= REVERSE_PIPELINE)||LA39_15==SEMICOLON) ) {
alt39=9;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 39, 15, input);
throw nvae;
}
}
else if ( (LA39_10==COMMA) && (synpred2_Atto())) {
alt39=8;
}
else if ( (LA39_10==NEWLINE) ) {
int LA39_16 = input.LA(4);
if ( (LA39_16==RCURLY) ) {
int LA39_19 = input.LA(5);
if ( (synpred2_Atto()) ) {
alt39=8;
}
else if ( (true) ) {
alt39=9;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 39, 19, input);
throw nvae;
}
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 39, 16, input);
throw nvae;
}
}
else if ( (LA39_10==RCURLY) ) {
int LA39_17 = input.LA(4);
if ( (synpred2_Atto()) ) {
alt39=8;
}
else if ( (true) ) {
alt39=9;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 39, 17, input);
throw nvae;
}
}
else if ( (LA39_10==AT||LA39_10==BOOLEAN||LA39_10==CLASS||LA39_10==IF||(LA39_10 >= LBRACK && LA39_10 <= LCURLY)||LA39_10==LPAREN||LA39_10==MINUS||(LA39_10 >= NOT && LA39_10 <= NUMBER)||LA39_10==SEMICOLON||LA39_10==STRING||LA39_10==WHILE) ) {
alt39=9;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 39, 10, input);
throw nvae;
}
}
else if ( (LA39_8==NAME) ) {
int LA39_11 = input.LA(3);
if ( (LA39_11==COLON) && (synpred2_Atto())) {
alt39=8;
}
else if ( (LA39_11==AND||(LA39_11 >= ARROW && LA39_11 <= ASSIGN)||LA39_11==COMMA||LA39_11==COMPOSITE||(LA39_11 >= DIV && LA39_11 <= DOT)||LA39_11==EQ||(LA39_11 >= GE && LA39_11 <= GT)||LA39_11==LBRACK||LA39_11==LE||(LA39_11 >= LPAREN && LA39_11 <= MUL)||(LA39_11 >= NE && LA39_11 <= NEWLINE)||LA39_11==OR||(LA39_11 >= PIPELINE && LA39_11 <= PLUS)||(LA39_11 >= RCURLY && LA39_11 <= REVERSE_PIPELINE)||LA39_11==SEMICOLON) ) {
alt39=9;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 39, 11, input);
throw nvae;
}
}
else if ( (LA39_8==COMMA) && (synpred2_Atto())) {
alt39=8;
}
else if ( (LA39_8==RCURLY) ) {
int LA39_13 = input.LA(3);
if ( (synpred2_Atto()) ) {
alt39=8;
}
else if ( (true) ) {
alt39=9;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 39, 13, input);
throw nvae;
}
}
else if ( (LA39_8==ARROW||LA39_8==AT||LA39_8==BOOLEAN||LA39_8==CLASS||LA39_8==IF||(LA39_8 >= LBRACK && LA39_8 <= LCURLY)||LA39_8==LPAREN||LA39_8==MINUS||(LA39_8 >= NOT && LA39_8 <= NUMBER)||LA39_8==SEMICOLON||LA39_8==STRING||LA39_8==WHILE) ) {
alt39=9;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 39, 8, input);
throw nvae;
}
}
break;
case LBRACK:
{
alt39=10;
}
break;
default:
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 39, 0, input);
throw nvae;
}
switch (alt39) {
case 1 :
// Atto.g:142:4: NAME
{
root_0 = (AttoTree)adaptor.nil();
NAME109=(Token)match(input,NAME,FOLLOW_NAME_in_primary1066); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NAME109_tree =
(AttoTree)adaptor.create(NAME109)
;
adaptor.addChild(root_0, NAME109_tree);
}
}
break;
case 2 :
// Atto.g:143:4: AT ^ NAME
{
root_0 = (AttoTree)adaptor.nil();
AT110=(Token)match(input,AT,FOLLOW_AT_in_primary1071); if (state.failed) return retval;
if ( state.backtracking==0 ) {
AT110_tree =
(AttoTree)adaptor.create(AT110)
;
root_0 = (AttoTree)adaptor.becomeRoot(AT110_tree, root_0);
}
NAME111=(Token)match(input,NAME,FOLLOW_NAME_in_primary1074); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NAME111_tree =
(AttoTree)adaptor.create(NAME111)
;
adaptor.addChild(root_0, NAME111_tree);
}
}
break;
case 3 :
// Atto.g:144:4: NUMBER
{
root_0 = (AttoTree)adaptor.nil();
NUMBER112=(Token)match(input,NUMBER,FOLLOW_NUMBER_in_primary1079); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NUMBER112_tree =
(AttoTree)adaptor.create(NUMBER112)
;
adaptor.addChild(root_0, NUMBER112_tree);
}
}
break;
case 4 :
// Atto.g:145:4: STRING
{
root_0 = (AttoTree)adaptor.nil();
STRING113=(Token)match(input,STRING,FOLLOW_STRING_in_primary1084); if (state.failed) return retval;
if ( state.backtracking==0 ) {
STRING113_tree =
(AttoTree)adaptor.create(STRING113)
;
adaptor.addChild(root_0, STRING113_tree);
}
}
break;
case 5 :
// Atto.g:146:4: BOOLEAN
{
root_0 = (AttoTree)adaptor.nil();
BOOLEAN114=(Token)match(input,BOOLEAN,FOLLOW_BOOLEAN_in_primary1089); if (state.failed) return retval;
if ( state.backtracking==0 ) {
BOOLEAN114_tree =
(AttoTree)adaptor.create(BOOLEAN114)
;
adaptor.addChild(root_0, BOOLEAN114_tree);
}
}
break;
case 6 :
// Atto.g:147:4: NULL
{
root_0 = (AttoTree)adaptor.nil();
NULL115=(Token)match(input,NULL,FOLLOW_NULL_in_primary1094); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NULL115_tree =
(AttoTree)adaptor.create(NULL115)
;
adaptor.addChild(root_0, NULL115_tree);
}
}
break;
case 7 :
// Atto.g:148:4: LPAREN expr RPAREN
{
LPAREN116=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_primary1099); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN116);
pushFollow(FOLLOW_expr_in_primary1101);
expr117=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr117.getTree());
RPAREN118=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_primary1103); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN118);
// AST REWRITE
// elements: expr
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 148:23: -> expr
{
adaptor.addChild(root_0, stream_expr.nextTree());
}
retval.tree = root_0;
}
}
break;
case 8 :
// Atto.g:149:4: ( obj )=> obj
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_obj_in_primary1117);
obj119=obj();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, obj119.getTree());
}
break;
case 9 :
// Atto.g:150:4: fun
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_fun_in_primary1122);
fun120=fun();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, fun120.getTree());
}
break;
case 10 :
// Atto.g:151:4: array
{
root_0 = (AttoTree)adaptor.nil();
pushFollow(FOLLOW_array_in_primary1127);
array121=array();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, array121.getTree());
}
break;
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "primary"
public static class obj_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "obj"
// Atto.g:154:1: obj : LCURLY ( NEWLINE )? ( pair ( ( COMMA | ( COMMA )? NEWLINE ) pair )* )? ( COMMA | ( COMMA )? NEWLINE )? RCURLY -> ^( OBJ ( pair )* ) ;
public final AttoParser.obj_return obj() throws RecognitionException {
AttoParser.obj_return retval = new AttoParser.obj_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token LCURLY122=null;
Token NEWLINE123=null;
Token COMMA125=null;
Token COMMA126=null;
Token NEWLINE127=null;
Token COMMA129=null;
Token COMMA130=null;
Token NEWLINE131=null;
Token RCURLY132=null;
AttoParser.pair_return pair124 =null;
AttoParser.pair_return pair128 =null;
AttoTree LCURLY122_tree=null;
AttoTree NEWLINE123_tree=null;
AttoTree COMMA125_tree=null;
AttoTree COMMA126_tree=null;
AttoTree NEWLINE127_tree=null;
AttoTree COMMA129_tree=null;
AttoTree COMMA130_tree=null;
AttoTree NEWLINE131_tree=null;
AttoTree RCURLY132_tree=null;
RewriteRuleTokenStream stream_LCURLY=new RewriteRuleTokenStream(adaptor,"token LCURLY");
RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
RewriteRuleTokenStream stream_RCURLY=new RewriteRuleTokenStream(adaptor,"token RCURLY");
RewriteRuleSubtreeStream stream_pair=new RewriteRuleSubtreeStream(adaptor,"rule pair");
try {
// Atto.g:155:2: ( LCURLY ( NEWLINE )? ( pair ( ( COMMA | ( COMMA )? NEWLINE ) pair )* )? ( COMMA | ( COMMA )? NEWLINE )? RCURLY -> ^( OBJ ( pair )* ) )
// Atto.g:155:4: LCURLY ( NEWLINE )? ( pair ( ( COMMA | ( COMMA )? NEWLINE ) pair )* )? ( COMMA | ( COMMA )? NEWLINE )? RCURLY
{
LCURLY122=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_obj1139); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_LCURLY.add(LCURLY122);
// Atto.g:155:11: ( NEWLINE )?
int alt40=2;
int LA40_0 = input.LA(1);
if ( (LA40_0==NEWLINE) ) {
alt40=1;
}
switch (alt40) {
case 1 :
// Atto.g:155:11: NEWLINE
{
NEWLINE123=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_obj1141); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE123);
}
break;
}
// Atto.g:155:20: ( pair ( ( COMMA | ( COMMA )? NEWLINE ) pair )* )?
int alt44=2;
int LA44_0 = input.LA(1);
if ( (LA44_0==NAME) ) {
alt44=1;
}
switch (alt44) {
case 1 :
// Atto.g:155:21: pair ( ( COMMA | ( COMMA )? NEWLINE ) pair )*
{
pushFollow(FOLLOW_pair_in_obj1145);
pair124=pair();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_pair.add(pair124.getTree());
// Atto.g:155:26: ( ( COMMA | ( COMMA )? NEWLINE ) pair )*
loop43:
do {
int alt43=2;
int LA43_0 = input.LA(1);
if ( (LA43_0==COMMA) ) {
int LA43_1 = input.LA(2);
if ( (LA43_1==NEWLINE) ) {
int LA43_2 = input.LA(3);
if ( (LA43_2==NAME) ) {
alt43=1;
}
}
else if ( (LA43_1==NAME) ) {
alt43=1;
}
}
else if ( (LA43_0==NEWLINE) ) {
int LA43_2 = input.LA(2);
if ( (LA43_2==NAME) ) {
alt43=1;
}
}
switch (alt43) {
case 1 :
// Atto.g:155:27: ( COMMA | ( COMMA )? NEWLINE ) pair
{
// Atto.g:155:27: ( COMMA | ( COMMA )? NEWLINE )
int alt42=2;
int LA42_0 = input.LA(1);
if ( (LA42_0==COMMA) ) {
int LA42_1 = input.LA(2);
if ( (LA42_1==NAME) ) {
alt42=1;
}
else if ( (LA42_1==NEWLINE) ) {
alt42=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 42, 1, input);
throw nvae;
}
}
else if ( (LA42_0==NEWLINE) ) {
alt42=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 42, 0, input);
throw nvae;
}
switch (alt42) {
case 1 :
// Atto.g:155:28: COMMA
{
COMMA125=(Token)match(input,COMMA,FOLLOW_COMMA_in_obj1149); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA125);
}
break;
case 2 :
// Atto.g:155:34: ( COMMA )? NEWLINE
{
// Atto.g:155:34: ( COMMA )?
int alt41=2;
int LA41_0 = input.LA(1);
if ( (LA41_0==COMMA) ) {
alt41=1;
}
switch (alt41) {
case 1 :
// Atto.g:155:34: COMMA
{
COMMA126=(Token)match(input,COMMA,FOLLOW_COMMA_in_obj1151); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA126);
}
break;
}
NEWLINE127=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_obj1154); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE127);
}
break;
}
pushFollow(FOLLOW_pair_in_obj1157);
pair128=pair();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_pair.add(pair128.getTree());
}
break;
default :
break loop43;
}
} while (true);
}
break;
}
// Atto.g:155:59: ( COMMA | ( COMMA )? NEWLINE )?
int alt46=3;
int LA46_0 = input.LA(1);
if ( (LA46_0==COMMA) ) {
int LA46_1 = input.LA(2);
if ( (LA46_1==RCURLY) ) {
alt46=1;
}
else if ( (LA46_1==NEWLINE) ) {
alt46=2;
}
}
else if ( (LA46_0==NEWLINE) ) {
alt46=2;
}
switch (alt46) {
case 1 :
// Atto.g:155:60: COMMA
{
COMMA129=(Token)match(input,COMMA,FOLLOW_COMMA_in_obj1164); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA129);
}
break;
case 2 :
// Atto.g:155:66: ( COMMA )? NEWLINE
{
// Atto.g:155:66: ( COMMA )?
int alt45=2;
int LA45_0 = input.LA(1);
if ( (LA45_0==COMMA) ) {
alt45=1;
}
switch (alt45) {
case 1 :
// Atto.g:155:66: COMMA
{
COMMA130=(Token)match(input,COMMA,FOLLOW_COMMA_in_obj1166); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA130);
}
break;
}
NEWLINE131=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_obj1169); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE131);
}
break;
}
RCURLY132=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_obj1173); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_RCURLY.add(RCURLY132);
// AST REWRITE
// elements: pair
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 155:90: -> ^( OBJ ( pair )* )
{
// Atto.g:155:93: ^( OBJ ( pair )* )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(OBJ, "OBJ")
, root_1);
// Atto.g:155:99: ( pair )*
while ( stream_pair.hasNext() ) {
adaptor.addChild(root_1, stream_pair.nextTree());
}
stream_pair.reset();
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "obj"
public static class pair_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "pair"
// Atto.g:158:1: pair : NAME COLON ^ expr ;
public final AttoParser.pair_return pair() throws RecognitionException {
AttoParser.pair_return retval = new AttoParser.pair_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token NAME133=null;
Token COLON134=null;
AttoParser.expr_return expr135 =null;
AttoTree NAME133_tree=null;
AttoTree COLON134_tree=null;
try {
// Atto.g:159:2: ( NAME COLON ^ expr )
// Atto.g:159:4: NAME COLON ^ expr
{
root_0 = (AttoTree)adaptor.nil();
NAME133=(Token)match(input,NAME,FOLLOW_NAME_in_pair1193); if (state.failed) return retval;
if ( state.backtracking==0 ) {
NAME133_tree =
(AttoTree)adaptor.create(NAME133)
;
adaptor.addChild(root_0, NAME133_tree);
}
COLON134=(Token)match(input,COLON,FOLLOW_COLON_in_pair1195); if (state.failed) return retval;
if ( state.backtracking==0 ) {
COLON134_tree =
(AttoTree)adaptor.create(COLON134)
;
root_0 = (AttoTree)adaptor.becomeRoot(COLON134_tree, root_0);
}
pushFollow(FOLLOW_expr_in_pair1198);
expr135=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) adaptor.addChild(root_0, expr135.getTree());
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "pair"
public static class fun_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "fun"
// Atto.g:162:1: fun : LCURLY ( paramsdef ARROW )? ( NEWLINE )? block RCURLY -> ^( FUN ( paramsdef )? block TEXT[$text] ) ;
public final AttoParser.fun_return fun() throws RecognitionException {
AttoParser.fun_return retval = new AttoParser.fun_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token LCURLY136=null;
Token ARROW138=null;
Token NEWLINE139=null;
Token RCURLY141=null;
AttoParser.paramsdef_return paramsdef137 =null;
AttoParser.block_return block140 =null;
AttoTree LCURLY136_tree=null;
AttoTree ARROW138_tree=null;
AttoTree NEWLINE139_tree=null;
AttoTree RCURLY141_tree=null;
RewriteRuleTokenStream stream_ARROW=new RewriteRuleTokenStream(adaptor,"token ARROW");
RewriteRuleTokenStream stream_LCURLY=new RewriteRuleTokenStream(adaptor,"token LCURLY");
RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
RewriteRuleTokenStream stream_RCURLY=new RewriteRuleTokenStream(adaptor,"token RCURLY");
RewriteRuleSubtreeStream stream_paramsdef=new RewriteRuleSubtreeStream(adaptor,"rule paramsdef");
RewriteRuleSubtreeStream stream_block=new RewriteRuleSubtreeStream(adaptor,"rule block");
try {
// Atto.g:163:2: ( LCURLY ( paramsdef ARROW )? ( NEWLINE )? block RCURLY -> ^( FUN ( paramsdef )? block TEXT[$text] ) )
// Atto.g:163:4: LCURLY ( paramsdef ARROW )? ( NEWLINE )? block RCURLY
{
LCURLY136=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_fun1209); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_LCURLY.add(LCURLY136);
// Atto.g:163:11: ( paramsdef ARROW )?
int alt47=2;
switch ( input.LA(1) ) {
case AT:
{
int LA47_1 = input.LA(2);
if ( (LA47_1==NAME) ) {
int LA47_5 = input.LA(3);
if ( (LA47_5==ARROW||LA47_5==COMMA) ) {
alt47=1;
}
}
}
break;
case NAME:
{
int LA47_2 = input.LA(2);
if ( (LA47_2==ARROW||LA47_2==COMMA) ) {
alt47=1;
}
}
break;
case ARROW:
{
alt47=1;
}
break;
}
switch (alt47) {
case 1 :
// Atto.g:163:12: paramsdef ARROW
{
pushFollow(FOLLOW_paramsdef_in_fun1212);
paramsdef137=paramsdef();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_paramsdef.add(paramsdef137.getTree());
ARROW138=(Token)match(input,ARROW,FOLLOW_ARROW_in_fun1214); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_ARROW.add(ARROW138);
}
break;
}
// Atto.g:163:30: ( NEWLINE )?
int alt48=2;
int LA48_0 = input.LA(1);
if ( (LA48_0==NEWLINE) ) {
alt48=1;
}
switch (alt48) {
case 1 :
// Atto.g:163:30: NEWLINE
{
NEWLINE139=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_fun1218); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE139);
}
break;
}
pushFollow(FOLLOW_block_in_fun1221);
block140=block();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_block.add(block140.getTree());
RCURLY141=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_fun1223); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_RCURLY.add(RCURLY141);
// AST REWRITE
// elements: block, paramsdef
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 164:3: -> ^( FUN ( paramsdef )? block TEXT[$text] )
{
// Atto.g:164:6: ^( FUN ( paramsdef )? block TEXT[$text] )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(FUN, "FUN")
, root_1);
// Atto.g:164:12: ( paramsdef )?
if ( stream_paramsdef.hasNext() ) {
adaptor.addChild(root_1, stream_paramsdef.nextTree());
}
stream_paramsdef.reset();
adaptor.addChild(root_1, stream_block.nextTree());
adaptor.addChild(root_1,
(AttoTree)adaptor.create(TEXT, input.toString(retval.start,input.LT(-1)))
);
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "fun"
public static class array_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "array"
// Atto.g:167:1: array : LBRACK ( NEWLINE )? ( expr ( ( COMMA | ( COMMA )? NEWLINE ) expr )* )? ( COMMA | ( COMMA )? NEWLINE )? RBRACK -> ^( ARRAY ( expr )* ) ;
public final AttoParser.array_return array() throws RecognitionException {
AttoParser.array_return retval = new AttoParser.array_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token LBRACK142=null;
Token NEWLINE143=null;
Token COMMA145=null;
Token COMMA146=null;
Token NEWLINE147=null;
Token COMMA149=null;
Token COMMA150=null;
Token NEWLINE151=null;
Token RBRACK152=null;
AttoParser.expr_return expr144 =null;
AttoParser.expr_return expr148 =null;
AttoTree LBRACK142_tree=null;
AttoTree NEWLINE143_tree=null;
AttoTree COMMA145_tree=null;
AttoTree COMMA146_tree=null;
AttoTree NEWLINE147_tree=null;
AttoTree COMMA149_tree=null;
AttoTree COMMA150_tree=null;
AttoTree NEWLINE151_tree=null;
AttoTree RBRACK152_tree=null;
RewriteRuleTokenStream stream_RBRACK=new RewriteRuleTokenStream(adaptor,"token RBRACK");
RewriteRuleTokenStream stream_LBRACK=new RewriteRuleTokenStream(adaptor,"token LBRACK");
RewriteRuleTokenStream stream_NEWLINE=new RewriteRuleTokenStream(adaptor,"token NEWLINE");
RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
try {
// Atto.g:168:2: ( LBRACK ( NEWLINE )? ( expr ( ( COMMA | ( COMMA )? NEWLINE ) expr )* )? ( COMMA | ( COMMA )? NEWLINE )? RBRACK -> ^( ARRAY ( expr )* ) )
// Atto.g:168:4: LBRACK ( NEWLINE )? ( expr ( ( COMMA | ( COMMA )? NEWLINE ) expr )* )? ( COMMA | ( COMMA )? NEWLINE )? RBRACK
{
LBRACK142=(Token)match(input,LBRACK,FOLLOW_LBRACK_in_array1252); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_LBRACK.add(LBRACK142);
// Atto.g:168:11: ( NEWLINE )?
int alt49=2;
int LA49_0 = input.LA(1);
if ( (LA49_0==NEWLINE) ) {
alt49=1;
}
switch (alt49) {
case 1 :
// Atto.g:168:11: NEWLINE
{
NEWLINE143=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_array1254); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE143);
}
break;
}
// Atto.g:168:20: ( expr ( ( COMMA | ( COMMA )? NEWLINE ) expr )* )?
int alt53=2;
int LA53_0 = input.LA(1);
if ( (LA53_0==AT||LA53_0==BOOLEAN||LA53_0==IF||(LA53_0 >= LBRACK && LA53_0 <= LCURLY)||LA53_0==LPAREN||LA53_0==MINUS||LA53_0==NAME||(LA53_0 >= NOT && LA53_0 <= NUMBER)||LA53_0==STRING||LA53_0==WHILE) ) {
alt53=1;
}
switch (alt53) {
case 1 :
// Atto.g:168:21: expr ( ( COMMA | ( COMMA )? NEWLINE ) expr )*
{
pushFollow(FOLLOW_expr_in_array1258);
expr144=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr144.getTree());
// Atto.g:168:26: ( ( COMMA | ( COMMA )? NEWLINE ) expr )*
loop52:
do {
int alt52=2;
int LA52_0 = input.LA(1);
if ( (LA52_0==COMMA) ) {
int LA52_1 = input.LA(2);
if ( (LA52_1==NEWLINE) ) {
int LA52_2 = input.LA(3);
if ( (LA52_2==AT||LA52_2==BOOLEAN||LA52_2==IF||(LA52_2 >= LBRACK && LA52_2 <= LCURLY)||LA52_2==LPAREN||LA52_2==MINUS||LA52_2==NAME||(LA52_2 >= NOT && LA52_2 <= NUMBER)||LA52_2==STRING||LA52_2==WHILE) ) {
alt52=1;
}
}
else if ( (LA52_1==AT||LA52_1==BOOLEAN||LA52_1==IF||(LA52_1 >= LBRACK && LA52_1 <= LCURLY)||LA52_1==LPAREN||LA52_1==MINUS||LA52_1==NAME||(LA52_1 >= NOT && LA52_1 <= NUMBER)||LA52_1==STRING||LA52_1==WHILE) ) {
alt52=1;
}
}
else if ( (LA52_0==NEWLINE) ) {
int LA52_2 = input.LA(2);
if ( (LA52_2==AT||LA52_2==BOOLEAN||LA52_2==IF||(LA52_2 >= LBRACK && LA52_2 <= LCURLY)||LA52_2==LPAREN||LA52_2==MINUS||LA52_2==NAME||(LA52_2 >= NOT && LA52_2 <= NUMBER)||LA52_2==STRING||LA52_2==WHILE) ) {
alt52=1;
}
}
switch (alt52) {
case 1 :
// Atto.g:168:27: ( COMMA | ( COMMA )? NEWLINE ) expr
{
// Atto.g:168:27: ( COMMA | ( COMMA )? NEWLINE )
int alt51=2;
int LA51_0 = input.LA(1);
if ( (LA51_0==COMMA) ) {
int LA51_1 = input.LA(2);
if ( (LA51_1==AT||LA51_1==BOOLEAN||LA51_1==IF||(LA51_1 >= LBRACK && LA51_1 <= LCURLY)||LA51_1==LPAREN||LA51_1==MINUS||LA51_1==NAME||(LA51_1 >= NOT && LA51_1 <= NUMBER)||LA51_1==STRING||LA51_1==WHILE) ) {
alt51=1;
}
else if ( (LA51_1==NEWLINE) ) {
alt51=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 51, 1, input);
throw nvae;
}
}
else if ( (LA51_0==NEWLINE) ) {
alt51=2;
}
else {
if (state.backtracking>0) {state.failed=true; return retval;}
NoViableAltException nvae =
new NoViableAltException("", 51, 0, input);
throw nvae;
}
switch (alt51) {
case 1 :
// Atto.g:168:28: COMMA
{
COMMA145=(Token)match(input,COMMA,FOLLOW_COMMA_in_array1262); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA145);
}
break;
case 2 :
// Atto.g:168:34: ( COMMA )? NEWLINE
{
// Atto.g:168:34: ( COMMA )?
int alt50=2;
int LA50_0 = input.LA(1);
if ( (LA50_0==COMMA) ) {
alt50=1;
}
switch (alt50) {
case 1 :
// Atto.g:168:34: COMMA
{
COMMA146=(Token)match(input,COMMA,FOLLOW_COMMA_in_array1264); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA146);
}
break;
}
NEWLINE147=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_array1267); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE147);
}
break;
}
pushFollow(FOLLOW_expr_in_array1270);
expr148=expr();
state._fsp--;
if (state.failed) return retval;
if ( state.backtracking==0 ) stream_expr.add(expr148.getTree());
}
break;
default :
break loop52;
}
} while (true);
}
break;
}
// Atto.g:168:60: ( COMMA | ( COMMA )? NEWLINE )?
int alt55=3;
int LA55_0 = input.LA(1);
if ( (LA55_0==COMMA) ) {
int LA55_1 = input.LA(2);
if ( (LA55_1==RBRACK) ) {
alt55=1;
}
else if ( (LA55_1==NEWLINE) ) {
alt55=2;
}
}
else if ( (LA55_0==NEWLINE) ) {
alt55=2;
}
switch (alt55) {
case 1 :
// Atto.g:168:61: COMMA
{
COMMA149=(Token)match(input,COMMA,FOLLOW_COMMA_in_array1278); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA149);
}
break;
case 2 :
// Atto.g:168:67: ( COMMA )? NEWLINE
{
// Atto.g:168:67: ( COMMA )?
int alt54=2;
int LA54_0 = input.LA(1);
if ( (LA54_0==COMMA) ) {
alt54=1;
}
switch (alt54) {
case 1 :
// Atto.g:168:67: COMMA
{
COMMA150=(Token)match(input,COMMA,FOLLOW_COMMA_in_array1280); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_COMMA.add(COMMA150);
}
break;
}
NEWLINE151=(Token)match(input,NEWLINE,FOLLOW_NEWLINE_in_array1283); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NEWLINE.add(NEWLINE151);
}
break;
}
RBRACK152=(Token)match(input,RBRACK,FOLLOW_RBRACK_in_array1287); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_RBRACK.add(RBRACK152);
// AST REWRITE
// elements: expr
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 168:91: -> ^( ARRAY ( expr )* )
{
// Atto.g:168:94: ^( ARRAY ( expr )* )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(ARRAY, "ARRAY")
, root_1);
// Atto.g:168:102: ( expr )*
while ( stream_expr.hasNext() ) {
adaptor.addChild(root_1, stream_expr.nextTree());
}
stream_expr.reset();
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "array"
public static class vardef_return extends ParserRuleReturnScope {
AttoTree tree;
public Object getTree() { return tree; }
};
// $ANTLR start "vardef"
// Atto.g:171:1: vardef : ( AT )? NAME -> ^( VARDEF ( AT )? NAME ) ;
public final AttoParser.vardef_return vardef() throws RecognitionException {
AttoParser.vardef_return retval = new AttoParser.vardef_return();
retval.start = input.LT(1);
AttoTree root_0 = null;
Token AT153=null;
Token NAME154=null;
AttoTree AT153_tree=null;
AttoTree NAME154_tree=null;
RewriteRuleTokenStream stream_AT=new RewriteRuleTokenStream(adaptor,"token AT");
RewriteRuleTokenStream stream_NAME=new RewriteRuleTokenStream(adaptor,"token NAME");
try {
// Atto.g:172:2: ( ( AT )? NAME -> ^( VARDEF ( AT )? NAME ) )
// Atto.g:172:4: ( AT )? NAME
{
// Atto.g:172:4: ( AT )?
int alt56=2;
int LA56_0 = input.LA(1);
if ( (LA56_0==AT) ) {
alt56=1;
}
switch (alt56) {
case 1 :
// Atto.g:172:4: AT
{
AT153=(Token)match(input,AT,FOLLOW_AT_in_vardef1307); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_AT.add(AT153);
}
break;
}
NAME154=(Token)match(input,NAME,FOLLOW_NAME_in_vardef1310); if (state.failed) return retval;
if ( state.backtracking==0 ) stream_NAME.add(NAME154);
// AST REWRITE
// elements: NAME, AT
// token labels:
// rule labels: retval
// token list labels:
// rule list labels:
// wildcard labels:
if ( state.backtracking==0 ) {
retval.tree = root_0;
RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
root_0 = (AttoTree)adaptor.nil();
// 172:13: -> ^( VARDEF ( AT )? NAME )
{
// Atto.g:172:16: ^( VARDEF ( AT )? NAME )
{
AttoTree root_1 = (AttoTree)adaptor.nil();
root_1 = (AttoTree)adaptor.becomeRoot(
(AttoTree)adaptor.create(VARDEF, "VARDEF")
, root_1);
// Atto.g:172:25: ( AT )?
if ( stream_AT.hasNext() ) {
adaptor.addChild(root_1,
stream_AT.nextNode()
);
}
stream_AT.reset();
adaptor.addChild(root_1,
stream_NAME.nextNode()
);
adaptor.addChild(root_0, root_1);
}
}
retval.tree = root_0;
}
}
retval.stop = input.LT(-1);
if ( state.backtracking==0 ) {
retval.tree = (AttoTree)adaptor.rulePostProcessing(root_0);
adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
retval.tree = (AttoTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
}
finally {
// do for sure before leaving
}
return retval;
}
// $ANTLR end "vardef"
// $ANTLR start synpred1_Atto
public final void synpred1_Atto_fragment() throws RecognitionException {
// Atto.g:52:4: ( assign )
// Atto.g:52:5: assign
{
pushFollow(FOLLOW_assign_in_synpred1_Atto264);
assign();
state._fsp--;
if (state.failed) return ;
}
}
// $ANTLR end synpred1_Atto
// $ANTLR start synpred2_Atto
public final void synpred2_Atto_fragment() throws RecognitionException {
// Atto.g:149:4: ( obj )
// Atto.g:149:5: obj
{
pushFollow(FOLLOW_obj_in_synpred2_Atto1113);
obj();
state._fsp--;
if (state.failed) return ;
}
}
// $ANTLR end synpred2_Atto
// Delegated rules
public final boolean synpred2_Atto() {
state.backtracking++;
int start = input.mark();
try {
synpred2_Atto_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public final boolean synpred1_Atto() {
state.backtracking++;
int start = input.mark();
try {
synpred1_Atto_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtracking--;
state.failed=false;
return success;
}
public static final BitSet FOLLOW_block_in_root115 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_stmt_in_block128 = new BitSet(new long[]{0x2000800000000002L});
public static final BitSet FOLLOW_terminator_in_block131 = new BitSet(new long[]{0x0007251900002A00L,0x0000000000000082L});
public static final BitSet FOLLOW_stmt_in_block133 = new BitSet(new long[]{0x2000800000000002L});
public static final BitSet FOLLOW_terminator_in_block139 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_expr_in_stmt160 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_CLASS_in_stmt165 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_NAME_in_stmt169 = new BitSet(new long[]{0x0000800004000000L});
public static final BitSet FOLLOW_EXTENDS_in_stmt172 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_NAME_in_stmt176 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_stmt180 = new BitSet(new long[]{0x0000A00001008000L});
public static final BitSet FOLLOW_pair_in_stmt183 = new BitSet(new long[]{0x0000800001008000L});
public static final BitSet FOLLOW_COMMA_in_stmt187 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_COMMA_in_stmt189 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_stmt192 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_pair_in_stmt195 = new BitSet(new long[]{0x0000800001008000L});
public static final BitSet FOLLOW_COMMA_in_stmt202 = new BitSet(new long[]{0x0000000001000000L});
public static final BitSet FOLLOW_COMMA_in_stmt204 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_stmt207 = new BitSet(new long[]{0x0000000001000000L});
public static final BitSet FOLLOW_END_in_stmt211 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_SEMICOLON_in_terminator244 = new BitSet(new long[]{0x0000800000000002L});
public static final BitSet FOLLOW_NEWLINE_in_terminator246 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_NEWLINE_in_terminator251 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_assign_in_expr268 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_or_in_expr273 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_if__in_expr278 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_while__in_expr283 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_postfix_in_assign294 = new BitSet(new long[]{0x01001C0000100100L});
public static final BitSet FOLLOW_ASSIGN_in_assign302 = new BitSet(new long[]{0x0007A51900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_NEWLINE_in_assign304 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_assign307 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_PLUS_in_assign326 = new BitSet(new long[]{0x0000000000000100L});
public static final BitSet FOLLOW_ASSIGN_in_assign328 = new BitSet(new long[]{0x0007A51900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_NEWLINE_in_assign330 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_assign333 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_MINUS_in_assign358 = new BitSet(new long[]{0x0000000000000100L});
public static final BitSet FOLLOW_ASSIGN_in_assign360 = new BitSet(new long[]{0x0007A51900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_NEWLINE_in_assign362 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_assign365 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_MUL_in_assign390 = new BitSet(new long[]{0x0000000000000100L});
public static final BitSet FOLLOW_ASSIGN_in_assign392 = new BitSet(new long[]{0x0007A51900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_NEWLINE_in_assign394 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_assign397 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_DIV_in_assign422 = new BitSet(new long[]{0x0000000000000100L});
public static final BitSet FOLLOW_ASSIGN_in_assign424 = new BitSet(new long[]{0x0007A51900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_NEWLINE_in_assign426 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_assign429 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_MOD_in_assign454 = new BitSet(new long[]{0x0000000000000100L});
public static final BitSet FOLLOW_ASSIGN_in_assign456 = new BitSet(new long[]{0x0007A51900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_NEWLINE_in_assign458 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_assign461 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_vardef_in_paramsdef502 = new BitSet(new long[]{0x0000000000008002L});
public static final BitSet FOLLOW_COMMA_in_paramsdef505 = new BitSet(new long[]{0x0000200000000200L});
public static final BitSet FOLLOW_vardef_in_paramsdef507 = new BitSet(new long[]{0x0000000000008002L});
public static final BitSet FOLLOW_IF_in_if_533 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_if_537 = new BitSet(new long[]{0x0000800000000000L,0x0000000000000008L});
public static final BitSet FOLLOW_NEWLINE_in_if_545 = new BitSet(new long[]{0x2007A51900002A00L,0x0000000000000082L});
public static final BitSet FOLLOW_block_in_if_547 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_if_549 = new BitSet(new long[]{0x0000000001C00000L});
public static final BitSet FOLLOW_elif_in_if_551 = new BitSet(new long[]{0x0000000001C00000L});
public static final BitSet FOLLOW_else__in_if_554 = new BitSet(new long[]{0x0000000001000000L});
public static final BitSet FOLLOW_END_in_if_557 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_THEN_in_if_585 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_if_589 = new BitSet(new long[]{0x0000000000800002L});
public static final BitSet FOLLOW_ELSE_in_if_592 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_if_596 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ELIF_in_elif639 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_elif641 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_elif643 = new BitSet(new long[]{0x2007A51900002A00L,0x0000000000000082L});
public static final BitSet FOLLOW_block_in_elif645 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_elif647 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ELSE_in_else_668 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_else_670 = new BitSet(new long[]{0x2007A51900002A00L,0x0000000000000082L});
public static final BitSet FOLLOW_block_in_else_672 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_else_675 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_WHILE_in_while_695 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_while_699 = new BitSet(new long[]{0x0000800000000000L,0x0000000000000008L});
public static final BitSet FOLLOW_NEWLINE_in_while_707 = new BitSet(new long[]{0x2007A51900002A00L,0x0000000000000082L});
public static final BitSet FOLLOW_block_in_while_709 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_while_711 = new BitSet(new long[]{0x0000000001000000L});
public static final BitSet FOLLOW_END_in_while_713 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_THEN_in_while_736 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_while_740 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_and_in_or772 = new BitSet(new long[]{0x0010000000000002L});
public static final BitSet FOLLOW_OR_in_or775 = new BitSet(new long[]{0x0007251800000A00L,0x0000000000000002L});
public static final BitSet FOLLOW_and_in_or778 = new BitSet(new long[]{0x0010000000000002L});
public static final BitSet FOLLOW_rel_in_and791 = new BitSet(new long[]{0x0000000000000012L});
public static final BitSet FOLLOW_AND_in_and794 = new BitSet(new long[]{0x0007251800000A00L,0x0000000000000002L});
public static final BitSet FOLLOW_rel_in_and797 = new BitSet(new long[]{0x0000000000000012L});
public static final BitSet FOLLOW_add_in_rel810 = new BitSet(new long[]{0x0880422062020002L});
public static final BitSet FOLLOW_set_in_rel813 = new BitSet(new long[]{0x0007251800000A00L,0x0000000000000002L});
public static final BitSet FOLLOW_add_in_rel834 = new BitSet(new long[]{0x0880422062020002L});
public static final BitSet FOLLOW_mul_in_add847 = new BitSet(new long[]{0x0100040000000002L});
public static final BitSet FOLLOW_set_in_add850 = new BitSet(new long[]{0x0007251800000A00L,0x0000000000000002L});
public static final BitSet FOLLOW_mul_in_add857 = new BitSet(new long[]{0x0100040000000002L});
public static final BitSet FOLLOW_unary_in_mul870 = new BitSet(new long[]{0x0000180000100002L});
public static final BitSet FOLLOW_set_in_mul873 = new BitSet(new long[]{0x0007251800000A00L,0x0000000000000002L});
public static final BitSet FOLLOW_unary_in_mul882 = new BitSet(new long[]{0x0000180000100002L});
public static final BitSet FOLLOW_postfix_in_unary896 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_NOT_in_unary901 = new BitSet(new long[]{0x0006211800000A00L,0x0000000000000002L});
public static final BitSet FOLLOW_postfix_in_unary904 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_MINUS_in_unary909 = new BitSet(new long[]{0x0006211800000A00L,0x0000000000000002L});
public static final BitSet FOLLOW_postfix_in_unary911 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_primary_in_postfix934 = new BitSet(new long[]{0x0000010800200002L});
public static final BitSet FOLLOW_LPAREN_in_postfix946 = new BitSet(new long[]{0x1007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_argsdef_in_postfix948 = new BitSet(new long[]{0x1000000000000000L});
public static final BitSet FOLLOW_RPAREN_in_postfix950 = new BitSet(new long[]{0x0000010800200002L});
public static final BitSet FOLLOW_LBRACK_in_postfix973 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_postfix975 = new BitSet(new long[]{0x0200000000000000L});
public static final BitSet FOLLOW_RBRACK_in_postfix977 = new BitSet(new long[]{0x0000010800200002L});
public static final BitSet FOLLOW_DOT_in_postfix1000 = new BitSet(new long[]{0x0006211800000A00L,0x0000000000000002L});
public static final BitSet FOLLOW_primary_in_postfix1002 = new BitSet(new long[]{0x0000010800200002L});
public static final BitSet FOLLOW_expr_in_argsdef1036 = new BitSet(new long[]{0x0000000000008002L});
public static final BitSet FOLLOW_COMMA_in_argsdef1039 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_argsdef1041 = new BitSet(new long[]{0x0000000000008002L});
public static final BitSet FOLLOW_NAME_in_primary1066 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_AT_in_primary1071 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_NAME_in_primary1074 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_NUMBER_in_primary1079 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_STRING_in_primary1084 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_BOOLEAN_in_primary1089 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_NULL_in_primary1094 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LPAREN_in_primary1099 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_primary1101 = new BitSet(new long[]{0x1000000000000000L});
public static final BitSet FOLLOW_RPAREN_in_primary1103 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_obj_in_primary1117 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_fun_in_primary1122 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_array_in_primary1127 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LCURLY_in_obj1139 = new BitSet(new long[]{0x0400A00000008000L});
public static final BitSet FOLLOW_NEWLINE_in_obj1141 = new BitSet(new long[]{0x0400A00000008000L});
public static final BitSet FOLLOW_pair_in_obj1145 = new BitSet(new long[]{0x0400800000008000L});
public static final BitSet FOLLOW_COMMA_in_obj1149 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_COMMA_in_obj1151 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_obj1154 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_pair_in_obj1157 = new BitSet(new long[]{0x0400800000008000L});
public static final BitSet FOLLOW_COMMA_in_obj1164 = new BitSet(new long[]{0x0400000000000000L});
public static final BitSet FOLLOW_COMMA_in_obj1166 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_obj1169 = new BitSet(new long[]{0x0400000000000000L});
public static final BitSet FOLLOW_RCURLY_in_obj1173 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_NAME_in_pair1193 = new BitSet(new long[]{0x0000000000004000L});
public static final BitSet FOLLOW_COLON_in_pair1195 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_pair1198 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LCURLY_in_fun1209 = new BitSet(new long[]{0x2407A51900002A80L,0x0000000000000082L});
public static final BitSet FOLLOW_paramsdef_in_fun1212 = new BitSet(new long[]{0x0000000000000080L});
public static final BitSet FOLLOW_ARROW_in_fun1214 = new BitSet(new long[]{0x2407A51900002A00L,0x0000000000000082L});
public static final BitSet FOLLOW_NEWLINE_in_fun1218 = new BitSet(new long[]{0x2407A51900002A00L,0x0000000000000082L});
public static final BitSet FOLLOW_block_in_fun1221 = new BitSet(new long[]{0x0400000000000000L});
public static final BitSet FOLLOW_RCURLY_in_fun1223 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LBRACK_in_array1252 = new BitSet(new long[]{0x0207A51900008A00L,0x0000000000000082L});
public static final BitSet FOLLOW_NEWLINE_in_array1254 = new BitSet(new long[]{0x0207A51900008A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_array1258 = new BitSet(new long[]{0x0200800000008000L});
public static final BitSet FOLLOW_COMMA_in_array1262 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_COMMA_in_array1264 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_array1267 = new BitSet(new long[]{0x0007251900000A00L,0x0000000000000082L});
public static final BitSet FOLLOW_expr_in_array1270 = new BitSet(new long[]{0x0200800000008000L});
public static final BitSet FOLLOW_COMMA_in_array1278 = new BitSet(new long[]{0x0200000000000000L});
public static final BitSet FOLLOW_COMMA_in_array1280 = new BitSet(new long[]{0x0000800000000000L});
public static final BitSet FOLLOW_NEWLINE_in_array1283 = new BitSet(new long[]{0x0200000000000000L});
public static final BitSet FOLLOW_RBRACK_in_array1287 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_AT_in_vardef1307 = new BitSet(new long[]{0x0000200000000000L});
public static final BitSet FOLLOW_NAME_in_vardef1310 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_assign_in_synpred1_Atto264 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_obj_in_synpred2_Atto1113 = new BitSet(new long[]{0x0000000000000002L});
} | [
"toshihiro.nakamura@gmail.com"
] | toshihiro.nakamura@gmail.com |
60b68337e88e174d7d32890e7b0bb5bf9d9d38a0 | 7a2f7a99b05d37c21e5b50954a793886aefba3fd | /src/main/java/com/his/server/GetDeptClinicTotalByYear.java | b9be2e2caa46a4f5d56f2b3bfcd504778c8944d2 | [] | no_license | 2430546168/HisCloud | 9b2bf6bbb4294f6ca6150bac9834f9d13a42c4a1 | 20ada9b607e37f5fdcdbdae654fc0137d8d2658d | refs/heads/master | 2022-12-22T15:13:27.512402 | 2020-03-30T13:48:38 | 2020-03-30T13:48:38 | 226,229,622 | 1 | 1 | null | 2022-12-16T07:47:10 | 2019-12-06T02:28:57 | Java | GB18030 | Java | false | false | 1,860 | java |
package com.his.server;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>getDeptClinicTotalByYear complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="getDeptClinicTotalByYear">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="arg1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "getDeptClinicTotalByYear", propOrder = {
"arg0",
"arg1"
})
public class GetDeptClinicTotalByYear {
protected String arg0;
protected String arg1;
/**
* 获取arg0属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg0() {
return arg0;
}
/**
* 设置arg0属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg0(String value) {
this.arg0 = value;
}
/**
* 获取arg1属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg1() {
return arg1;
}
/**
* 设置arg1属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg1(String value) {
this.arg1 = value;
}
}
| [
"myceses@163.cm"
] | myceses@163.cm |
d80844378bd3e81703dd7a22be024e44916edd68 | d8e695d863aea3293e04efd91f01f4298adbc3a0 | /apache-ode-1.3.5/ode-bpel-runtime/target/generated/apt/org/apache/ode/bpel/runtime/channels/ParentScopeChannel.java | 718b819d6243da2e6f7bec1a3cc01dced99c70e7 | [] | no_license | polyu-lsgi-xiaofei/bpelcube | 685469261d5ca9b7ee4c7288cf47a950d116b21f | 45b371a9353209bcc7c4b868cbae2ce500f54e01 | refs/heads/master | 2021-01-13T02:31:47.445295 | 2012-11-01T16:20:11 | 2012-11-01T16:20:11 | 35,921,433 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 680 | java | /*
* SOURCE FILE GENERATATED BY JACOB CHANNEL CLASS GENERATOR
*
* !!! DO NOT EDIT !!!!
*
* Generated On : Sat Jun 09 23:20:44 EEST 2012
* For Interface : org.apache.ode.bpel.runtime.channels.ParentScope
*/
package org.apache.ode.bpel.runtime.channels;
/**
* An auto-generated channel interface for the channel type
* {@link org.apache.ode.bpel.runtime.channels.ParentScope}.
* @see org.apache.ode.bpel.runtime.channels.ParentScope
* @see org.apache.ode.bpel.runtime.channels.ParentScopeChannelListener
*/
public interface ParentScopeChannel
extends org.apache.ode.jacob.Channel,
org.apache.ode.bpel.runtime.channels.ParentScope
{}
| [
"michael.pantazoglou@gmail.com@f004a122-f478-6e0f-c15d-9ccb889b5864"
] | michael.pantazoglou@gmail.com@f004a122-f478-6e0f-c15d-9ccb889b5864 |
054cae84546999e1188532e6763b1e23a0a4e35e | e21d7ae10c70905aeee73a1d1ab65bb6c9382f23 | /app/src/androidTest/java/com/nugrs/pointeproductsapp/ExampleInstrumentedTest.java | d73af9f1bd25e705ed63b190a41b8158f96028b1 | [] | no_license | Chiif1/PointeProducts | 165139c773e4f190e9e377f7c50e85efa6214503 | 6ea9621bb862e732da7b6ff7ed12bd7d090535f9 | refs/heads/master | 2023-04-06T15:06:34.057527 | 2021-03-27T19:07:58 | 2021-03-27T19:07:58 | 351,770,610 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 768 | java | package com.nugrs.pointeproductsapp;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.nugrs.pointeproductsapp", appContext.getPackageName());
}
} | [
"nugrs@aol.com"
] | nugrs@aol.com |
0f32fb39543ba84f72791c9d240e0c7196acb615 | 8ff9cb4ab6ee8dc2d772aafa729dc6c3aa5f075f | /app/src/main/java/minework/onesit/fragment/plan/PlanFragment.java | cb26a12ce186c8414862b3be324b72dedb61972f | [] | no_license | Snowinginlight/No.2_OneSit | 80c437b83643b7c12f54641d7ec5d9793be3a831 | 96c24aea3a68e47c234e29cbc28c902118a78087 | refs/heads/master | 2020-12-24T10:03:40.783343 | 2017-05-24T07:47:13 | 2017-05-24T07:47:13 | 73,249,342 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 8,992 | java | package minework.onesit.fragment.plan;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import org.joda.time.DateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import minework.onesit.R;
import minework.onesit.activity.MyApplication;
import minework.onesit.activity.PlanCreate;
import minework.onesit.activity.Publish;
import minework.onesit.database.MyDatabaseUtil;
import minework.onesit.util.MyUtil;
/**
* Created by 无知 on 2016/11/12.
*/
public class PlanFragment extends Fragment implements View.OnClickListener, View.OnTouchListener {
private static int planNum = 0;
private static int planSelfNum = 0;
private Context mContext;
//planfragment
private View planLayout;
private Button planAdd;
private TextView planTitle;
private Button planPublish;
private LayoutInflater layoutInflater;
//日历
private View calendarArea;
private RecyclerView calendar;
private CalendarAdapter calendarAdapter;
//计划条
private RecyclerView planList;
private List<Map<String, String>> mDatas;
private List<Map<String, String>> planNetList;
private List<Map<String, String>> planSelfList;
//滑动坐标
private float x1 = 0;
private float x2 = 0;
private Handler mHandler = new Handler(new Handler.Callback() {
@Override
public boolean handleMessage(Message message) {
switch (message.what) {
case 0:
//点击计划显示全部信息
break;
case 1:
//更新计划
planList.setLayoutManager(new LinearLayoutManager(mContext));
planList.setAdapter(new PlanListAdapter(MyUtil.chooseDatas(mDatas, message.arg1, message.arg2), 1, mHandler));
break;
default:
return true;
}
return true;
}
});
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
planLayout = inflater.inflate(R.layout.plan_layout, container, false);
layoutInflater = inflater;
mContext = MyApplication.getInstance();
initAllData();
init();
return planLayout;
}
private void init() {
planAdd = (Button) planLayout.findViewById(R.id.plan_add);
planTitle = (TextView) planLayout.findViewById(R.id.plan_title);
planPublish = (Button) planLayout.findViewById(R.id.plan_publish);
planList = (RecyclerView) planLayout.findViewById(R.id.plan_list);
planList.setLayoutManager(new LinearLayoutManager(mContext));
planList.setAdapter(new PlanListAdapter(mDatas, 0, mHandler));
calendarArea = planLayout.findViewById(R.id.calendar_area);
calendarArea.setVisibility(View.GONE);
calendar = (RecyclerView) planLayout.findViewById(R.id.calendar);
planTitle.setOnClickListener(this);
planAdd.setOnClickListener(this);
planPublish.setOnClickListener(this);
planLayout.setOnTouchListener(this);
planList.setOnTouchListener(this);
}
private void initAllData() {
mDatas = new ArrayList<Map<String, String>>();
planNetList = MyUtil.orderByTime(MyDatabaseUtil.queryPlanAll());
planSelfList = MyUtil.orderByTime(MyDatabaseUtil.queryPlanSelfAll());
planNum = planNetList.size();
planSelfNum = planSelfList.size();
mDatas = MyUtil.orderByTime(planNetList, planSelfList);
}
private void initWeekData() {
mDatas = new ArrayList<Map<String, String>>();
planNetList = MyUtil.orderByTime(MyDatabaseUtil.queryPlanAll());
planSelfList = MyUtil.orderByTime(MyDatabaseUtil.queryPlanSelfAll());
planNum = planNetList.size();
planSelfNum = planSelfList.size();
mDatas = MyUtil.orderByTime(planNetList, planSelfList);
}
private void initMonthData() {
mDatas = new ArrayList<Map<String, String>>();
planNetList = MyUtil.orderByTime(MyDatabaseUtil.queryPlanAll());
planSelfList = MyUtil.orderByTime(MyDatabaseUtil.queryPlanSelfAll());
planNum = planNetList.size();
planSelfNum = planSelfList.size();
mDatas = MyUtil.orderByTime(planNetList, planSelfList);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.plan_add:
Intent intent = new Intent(mContext, PlanCreate.class);
intent.putExtra("planSelfNum", planSelfNum);
startActivity(intent);
break;
case R.id.plan_publish:
startActivity(new Intent(mContext, Publish.class));
break;
case R.id.plan_title:
switch (planTitle.getText().toString()) {
case "全部":
planTitle.setText("本周");
calendarArea.setVisibility(View.VISIBLE);
calendar.setLayoutManager(new GridLayoutManager(mContext, 7));
calendar.setAdapter(new CalendarAdapter(DateTime.now(), 0, mHandler));
planList.setLayoutManager(new LinearLayoutManager(mContext));
planList.setAdapter(new PlanListAdapter(MyUtil.chooseDatas(mDatas, DateTime.now().getMonthOfYear(), DateTime.now().getDayOfMonth()), 1, mHandler));
break;
case "本周":
planTitle.setText("本月");
calendar.setLayoutManager(new GridLayoutManager(mContext, 7));
calendar.setAdapter(new CalendarAdapter(DateTime.now(), 1, mHandler));
planList.setLayoutManager(new LinearLayoutManager(mContext));
planList.setAdapter(new PlanListAdapter(MyUtil.chooseDatas(mDatas, DateTime.now().getMonthOfYear(), DateTime.now().getDayOfMonth()), 1, mHandler));
break;
case "本月":
planTitle.setText("全部");
calendarArea.setVisibility(View.GONE);
planList.setLayoutManager(new LinearLayoutManager(mContext));
planList.setAdapter(new PlanListAdapter(mDatas, 0, mHandler));
break;
default:
break;
}
break;
default:
return;
}
}
@Override
public void onResume() {
super.onResume();
planSelfList = MyUtil.orderByTime(MyDatabaseUtil.queryPlanSelfAll());
planSelfNum = planSelfList.size();
mDatas = MyUtil.orderByTime(planNetList, planSelfList);
switch (planTitle.getText().toString()) {
case "全部":
planList.setLayoutManager(new LinearLayoutManager(mContext));
planList.setAdapter(new PlanListAdapter(mDatas, 0, mHandler));
break;
case "本周":
planList.setLayoutManager(new LinearLayoutManager(mContext));
planList.setAdapter(new PlanListAdapter(MyUtil.chooseDatas(mDatas, DateTime.now().getMonthOfYear(), DateTime.now().getDayOfMonth()), 1, mHandler));
break;
case "本月":
planList.setLayoutManager(new LinearLayoutManager(mContext));
planList.setAdapter(new PlanListAdapter(MyUtil.chooseDatas(mDatas, DateTime.now().getMonthOfYear(), DateTime.now().getDayOfMonth()), 1, mHandler));
break;
default:
break;
}
}
@Override
public boolean onTouch(View view, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
//当手指按下的时候
x1 = event.getX();
}
if (event.getAction() == MotionEvent.ACTION_UP) {
//当手指离开的时候
x2 = event.getX();
if (x1 - x2 > 70 && !Objects.equals(planTitle.getText().toString(), "全部")) {
((CalendarAdapter) calendar.getAdapter()).changeItem(-1);
} else if (x2 - x1 > 70 && !Objects.equals(planTitle.getText().toString(), "全部")) {
((CalendarAdapter) calendar.getAdapter()).changeItem(1);
}
}
return true;
}
}
| [
"xuedouwuzhi@163.com"
] | xuedouwuzhi@163.com |
9dbe24d7056fd3534fae82ba0a49327342c5b3dd | 86a08ffe8002fb37dfe2154851f1909d29bb44a8 | /src/studiplayer/audio/NotPlayableException.java | 83451d350e2a45ea12500c029142df7281c082e4 | [] | no_license | ssafali/media-player | 0dfb0cee9568c2efb5e3747ab3bab6bf3586e06e | aed552f3365a05d8d6ca1c69a7a7687bb5177c1a | refs/heads/main | 2023-08-04T14:11:55.123243 | 2021-09-27T17:40:44 | 2021-09-27T17:40:44 | 410,981,778 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 598 | java | package studiplayer.audio;
@SuppressWarnings("serial")
public class NotPlayableException extends Exception {
private String pathname;
public NotPlayableException (String pathname, String msg) {
super(msg);
this.pathname = pathname;
}
public NotPlayableException (String pathname, Throwable t) {
super(t);
this.pathname = pathname;
}
public NotPlayableException (String pathname, String msg, Throwable t) {
super(msg, t);
this.pathname = pathname;
}
@Override
public String toString() {
return pathname + ": " + super.toString();
}
}
| [
"noreply@github.com"
] | ssafali.noreply@github.com |
ce783c4447456dbadfe81a94dbcd63f5c0e7a52a | caac7d16de30402495d50b3eeec77436e5167c77 | /SensoryTurtlesClient/src/it/framework/client/service/inferf/IOffset.java | 7c9325890d166dd5cd33d0c0c6ed6ff525952e48 | [] | no_license | faro1976/latartaruga | f56643182cf13d6927ef8458b7ff3056bd3bd286 | d677c76369a333d09da73c0bc2f1b29ddbc9dc96 | refs/heads/master | 2018-02-10T23:34:46.925280 | 2017-02-17T15:48:23 | 2017-02-17T15:48:23 | 61,433,152 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 121 | java | package it.framework.client.service.inferf;
public interface IOffset {
int getStart();
int getMaxResults();
}
| [
"SALVIAL2@SCDIRITCA75.rete.poste"
] | SALVIAL2@SCDIRITCA75.rete.poste |
b192bfe65c62121cf6bcf6d78bda27b46772da1a | 7abf99c4fb3ffb2bda828ca3ecf11a2e84a8031d | /src/model/cards/spells/Flamestrike.java | ec5aa2b9c95316f20ef92546b2decf155f0517c3 | [] | no_license | IsmailElShinnawy/Hearthstone-mini-replica-in-Java | 8a72cc43c369d8e7818d4883832115c9390b5742 | eb699457e01b5d2afa05cf9c0cb6f529ed18dc67 | refs/heads/master | 2022-08-22T16:38:12.287494 | 2020-05-21T23:46:39 | 2020-05-21T23:46:39 | 265,975,452 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 731 | java | package model.cards.spells;
import java.util.ArrayList;
import model.cards.Rarity;
import model.cards.minions.Minion;
public class Flamestrike extends Spell implements AOESpell {
public Flamestrike() {
super("Flamestrike", 7, Rarity.BASIC);
}
public void performAction(ArrayList<Minion> oppField, ArrayList<Minion> curField) {
for (int i = 0; i < oppField.size(); i++) {
Minion m = oppField.get(i);
if (m.isDivine())
m.setDivine(false);
else {
m.setCurrentHP(oppField.get(i).getCurrentHP() - 4);
if (m.getCurrentHP() == 0)
i--;
}
}
}
public String getHoverMessage() {
return "Deals 4 damage to all enemy minions. Make sure you will pass by all enemy\r\n" +
"minions.";
}
}
| [
"ismailelshennawy@gmail.com"
] | ismailelshennawy@gmail.com |
4ed065d47f1a6ee5bb051a9cb1350841cf0457d0 | f8e4a7f09af357c29f3cefa25b8baca96dc6c07a | /MonCommerceGit/src/main/java/moncommerce/service/impl/ProduitDepotServiceImpl.java | a0390d5479dffa9ab48160ae0d68363da447b9c6 | [] | no_license | ahmedbhh/MonCommerce | 3a01cd03ba8bc8e79ca45da6ece2b545f3bfe7e6 | 035581625b5d2dd12d4ad036a2e3ce1f9d5faade | refs/heads/master | 2021-01-16T18:20:03.947283 | 2014-07-07T01:20:35 | 2014-07-07T01:20:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 857 | java | package moncommerce.service.impl;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import moncommerce.service.ProduitDepotService;
import moncommerce.domain.model.ProduitDepot;
import moncommerce.domain.model.ProduitDepotPK;
import moncommerce.repositroy.ProduitDepotFacade;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
/**
*
* @author AHMED
*/
@Transactional(propagation = Propagation.REQUIRED)
@Service
public class ProduitDepotServiceImpl
extends AbstractServiceImpl<ProduitDepot, ProduitDepotPK>
implements ProduitDepotService {
@Resource
ProduitDepotFacade repository;
@PostConstruct
public void init() {
super.setJpaRepository(repository);
}
}
| [
"AHMED@192.168.1.4"
] | AHMED@192.168.1.4 |
c19028f56c76577d0585a4654951af1d8e6be234 | 0d765f28d5b320742a982ad8d5b416a325cb94a8 | /app/src/main/java/com/vovk/horsego/app/ResultActivity.java | 9b892a1a2ef51fb928e47653fe927a878d1c7817 | [] | no_license | Dima-vovk/HorseGo | 45196434476cb43c2db5ecbb1d5a9d4ea170ae93 | 53f33714f014a7541fbaeabe1d51c15583b9e208 | refs/heads/master | 2021-01-10T18:03:57.737588 | 2015-12-11T22:08:06 | 2015-12-11T22:08:06 | 47,853,431 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 356 | java | package com.vovk.horsego.app;
import android.app.Activity;
import android.os.Bundle;
/**
* Created by Dima on 11.12.2015.
*/
public class ResultActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.user_layout);
}
}
| [
"vovk_dima@i.ua"
] | vovk_dima@i.ua |
191af3862229d71ec7d0b974362962f41fa9092a | c5552171914d83a9056929d74a3ae67926d5ca9b | /app/src/main/java/com/coolweather/android/gson/Forecast.java | 699483998050240b1936f5b70e8f6c73204231b9 | [
"Apache-2.0"
] | permissive | Tanfeiyu/coolweather | 4e8141ae7ea29fa99c332607ba37ecaf9d4e85a4 | 3833afbd8d58f4e3784499f2d52bd6638cad544f | refs/heads/master | 2020-05-20T10:13:39.331315 | 2019-05-08T03:31:21 | 2019-05-08T03:31:21 | 185,520,549 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 435 | java | package com.coolweather.android.gson;
import com.google.gson.annotations.SerializedName;
public class Forecast {
public String date;
@SerializedName("tmp")
public Temperature temperature;
@SerializedName("cond")
public More more;
public class Temperature{
public String max;
public String min;
}
public class More{
@SerializedName("txt_d")
public String info;
}
}
| [
"925493919@qq.com"
] | 925493919@qq.com |
3b59bef8701ed36da9e355ac4cb2fb758bd6f138 | d8b069e9bfc6a35f0833e0961cf20718fb095aa0 | /src/fractalzoomer/functions/root_finding_methods/secant/SecantGeneralized8.java | d53e12a2dfd4067087bfbaf159470cd37a9ee90d | [] | no_license | trnarayaninsamy/Fractal-Zoomer | cd76bdba8e51b3758f58dafc20cd61d6bcb5d451 | 59ea12df6739c16caf3d57ff42ae8e7f6a05a7ca | refs/heads/master | 2021-01-22T06:32:24.788023 | 2015-01-06T14:41:17 | 2015-01-06T14:41:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,483 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fractalzoomer.functions.root_finding_methods.secant;
import fractalzoomer.in_coloring_algorithms.AtanReTimesImTimesAbsReTimesAbsIm;
import fractalzoomer.out_coloring_algorithms.BinaryDecomposition;
import fractalzoomer.out_coloring_algorithms.BinaryDecomposition2;
import fractalzoomer.out_coloring_algorithms.ColorDecompositionRootFindingMethod;
import fractalzoomer.core.Complex;
import fractalzoomer.functions.root_finding_methods.RootFindingMethods;
import fractalzoomer.in_coloring_algorithms.CosMag;
import fractalzoomer.in_coloring_algorithms.DecompositionLike;
import fractalzoomer.out_coloring_algorithms.EscapeTime;
import fractalzoomer.out_coloring_algorithms.EscapeTimeColorDecompositionRootFindingMethod;
import fractalzoomer.in_coloring_algorithms.MagTimesCosReSquared;
import fractalzoomer.main.MainWindow;
import fractalzoomer.in_coloring_algorithms.MaximumIterations;
import fractalzoomer.in_coloring_algorithms.ReDivideIm;
import fractalzoomer.in_coloring_algorithms.SinReSquaredMinusImSquared;
import fractalzoomer.in_coloring_algorithms.Squares;
import fractalzoomer.in_coloring_algorithms.Squares2;
import fractalzoomer.in_coloring_algorithms.ZMag;
import fractalzoomer.out_coloring_algorithms.EscapeTimeAlgorithm1;
import fractalzoomer.out_coloring_algorithms.SmoothBinaryDecomposition2RootFindingMethod;
import fractalzoomer.out_coloring_algorithms.SmoothBinaryDecompositionRootFindingMethod;
import fractalzoomer.out_coloring_algorithms.SmoothColorDecompositionRootFindingMethod;
import fractalzoomer.out_coloring_algorithms.SmoothEscapeTimeColorDecompositionRootFindingMethod;
import fractalzoomer.out_coloring_algorithms.SmoothEscapeTimeRootFindingMethod;
import java.util.ArrayList;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author hrkalona
*/
public class SecantGeneralized8 extends RootFindingMethods {
public SecantGeneralized8(double xCenter, double yCenter, double size, int max_iterations, int out_coloring_algorithm, int in_coloring_algorithm, boolean smoothing, int plane_type, double[] rotation_vals, double[] rotation_center, String user_plane, double[] plane_transform_center, double plane_transform_angle, double plane_transform_radius, double [] plane_transform_scales, double plane_transform_angle2, int plane_transform_sides, double plane_transform_amount, int converging_smooth_algorithm) {
super(xCenter, yCenter, size, max_iterations, out_coloring_algorithm, plane_type, rotation_vals, rotation_center, user_plane, plane_transform_center, plane_transform_angle, plane_transform_radius, plane_transform_scales, plane_transform_angle2, plane_transform_sides, plane_transform_amount);
switch (out_coloring_algorithm) {
case MainWindow.ESCAPE_TIME:
if(!smoothing) {
out_color_algorithm = new EscapeTime();
}
else {
out_color_algorithm = new SmoothEscapeTimeRootFindingMethod(Math.log(convergent_bailout), converging_smooth_algorithm);
}
break;
case MainWindow.BINARY_DECOMPOSITION:
if(!smoothing) {
out_color_algorithm = new BinaryDecomposition();
}
else {
out_color_algorithm = new SmoothBinaryDecompositionRootFindingMethod(Math.log(convergent_bailout), converging_smooth_algorithm);
}
break;
case MainWindow.BINARY_DECOMPOSITION2:
if(!smoothing) {
out_color_algorithm = new BinaryDecomposition2();
}
else {
out_color_algorithm = new SmoothBinaryDecomposition2RootFindingMethod(Math.log(convergent_bailout), converging_smooth_algorithm);
}
break;
case MainWindow.COLOR_DECOMPOSITION:
if(!smoothing) {
out_color_algorithm = new ColorDecompositionRootFindingMethod();
}
else {
out_color_algorithm = new SmoothColorDecompositionRootFindingMethod(Math.log(convergent_bailout), converging_smooth_algorithm);
}
break;
case MainWindow. ESCAPE_TIME_COLOR_DECOMPOSITION:
if(!smoothing) {
out_color_algorithm = new EscapeTimeColorDecompositionRootFindingMethod();
}
else {
out_color_algorithm = new SmoothEscapeTimeColorDecompositionRootFindingMethod(Math.log(convergent_bailout), converging_smooth_algorithm);
}
break;
case MainWindow.ESCAPE_TIME_ALGORITHM:
out_color_algorithm = new EscapeTimeAlgorithm1(3);
break;
}
switch (in_coloring_algorithm) {
case MainWindow.MAXIMUM_ITERATIONS:
in_color_algorithm = new MaximumIterations();
break;
case MainWindow.Z_MAG:
in_color_algorithm = new ZMag();
break;
case MainWindow.DECOMPOSITION_LIKE:
in_color_algorithm = new DecompositionLike();
break;
case MainWindow.RE_DIVIDE_IM:
in_color_algorithm = new ReDivideIm();
break;
case MainWindow.COS_MAG:
in_color_algorithm = new CosMag();
break;
case MainWindow.MAG_TIMES_COS_RE_SQUARED:
in_color_algorithm = new MagTimesCosReSquared();
break;
case MainWindow.SIN_RE_SQUARED_MINUS_IM_SQUARED:
in_color_algorithm = new SinReSquaredMinusImSquared();
break;
case MainWindow.ATAN_RE_TIMES_IM_TIMES_ABS_RE_TIMES_ABS_IM:
in_color_algorithm = new AtanReTimesImTimesAbsReTimesAbsIm();
break;
case MainWindow.SQUARES:
in_color_algorithm = new Squares();
break;
case MainWindow.SQUARES2:
in_color_algorithm = new Squares2();
break;
}
}
//orbit
public SecantGeneralized8(double xCenter, double yCenter, double size, int max_iterations, ArrayList<Complex> complex_orbit, int plane_type, double[] rotation_vals, double[] rotation_center, String user_plane, double[] plane_transform_center, double plane_transform_angle, double plane_transform_radius, double [] plane_transform_scales, double plane_transform_angle2, int plane_transform_sides, double plane_transform_amount) {
super(xCenter, yCenter, size, max_iterations, complex_orbit, plane_type, rotation_vals, rotation_center, user_plane, plane_transform_center, plane_transform_angle, plane_transform_radius, plane_transform_scales, plane_transform_angle2, plane_transform_sides, plane_transform_amount);
}
@Override
protected void function(Complex[] complex) {
Complex fz1 = complex[0].eighth().plus_mutable(complex[0].fourth().times_mutable(15)).sub_mutable(16);
Complex temp = new Complex(complex[0]);
complex[0].sub_mutable(fz1.times((complex[0].sub(complex[1])).divide_mutable(fz1.sub(complex[2]))));
complex[1].assign(temp);
complex[2].assign(fz1);
}
@Override
public double calculateFractalWithoutPeriodicity(Complex pixel) {
int iterations = 0;
double temp = 0;
Complex[] complex = new Complex[3];
complex[0] = new Complex(pixel);//z
complex[1] = new Complex();
complex[2] = new Complex(-16, 0);
Complex zold = new Complex();
Complex zold2 = new Complex();
for (; iterations < max_iterations; iterations++) {
if((temp = complex[0].distance_squared(zold)) <= convergent_bailout) {
Object[] object = {iterations, complex[0], temp, zold, zold2};
return out_color_algorithm.getResult(object);
}
zold2.assign(zold);
zold.assign(complex[0]);
function(complex);
}
Object[] object = {max_iterations, complex[0]};
return in_color_algorithm.getResult(object);
}
@Override
public double[] calculateFractal3DWithoutPeriodicity(Complex pixel) {
int iterations = 0;
double temp = 0;
Complex[] complex = new Complex[3];
complex[0] = new Complex(pixel);//z
complex[1] = new Complex(); //zold
complex[2] = new Complex(-16, 0);
Complex zold = new Complex();
Complex zold2 = new Complex();
for (; iterations < max_iterations; iterations++) {
if((temp = complex[0].distance_squared(zold)) <= convergent_bailout) {
Object[] object = {iterations, complex[0], temp, zold, zold2};
double[] array = {40 * Math.log(out_color_algorithm.getResult3D(object) - 100799) - 100, out_color_algorithm.getResult(object)};
return array;
}
zold2.assign(zold);
zold.assign(complex[0]);
function(complex);
}
Object[] object = {max_iterations, complex[0]};
double temp2 = in_color_algorithm.getResult(object);
double result = temp2 == max_iterations ? max_iterations : max_iterations + temp2 - 100820;
double[] array = {40 * Math.log(result + 1) - 100, temp2};
return array;
}
@Override
public void calculateFractalOrbit() {
int iterations = 0;
Complex[] complex = new Complex[3];
complex[0] = new Complex(pixel_orbit);//z
complex[1] = new Complex();
complex[2] = new Complex(-16, 0);
Complex temp = null;
for (; iterations < max_iterations; iterations++) {
function(complex);
temp = rotation.getPixel(complex[0], true);
if(Double.isNaN(temp.getRe()) || Double.isNaN(temp.getIm()) || Double.isInfinite(temp.getRe()) || Double.isInfinite(temp.getIm())) {
break;
}
complex_orbit.add(temp);
}
}
}
| [
"hrkalona@uth.gr"
] | hrkalona@uth.gr |
d4b9cdabc14e2bee3652093fa49f0d702cab9915 | d4742e20c55b58f5f279692aa66e23af02e54080 | /src/main/java/by/generator/CsvGenerator.java | 7ab736aed536c8c3e4b0d346965f5440f90094a2 | [] | no_license | SpiderSwift/student-app | 3fb4117956bf3961414d042b70e9145614b76bf2 | 2725ff32a712ea9f4e984ff3a3c2298bc80b4b9d | refs/heads/master | 2023-02-08T05:17:59.762542 | 2020-10-13T15:19:24 | 2020-10-13T15:19:24 | 124,638,929 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 496 | java | package by.generator;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
public class CsvGenerator<T> {
private Class<T> clazz;
public CsvGenerator(Class<T> clazz) {
this.clazz = clazz;
}
public void generateCSV(List<T> items) throws IOException {
PrintWriter out = new PrintWriter("C://file/" + clazz.getSimpleName() +"s.txt");
for (T t : items) {
out.println(t + "\n");
}
out.close();
}
}
| [
"lionheart66666@mail.ru"
] | lionheart66666@mail.ru |
472a55e0cc8797cc83adb2a64190ab7641f9009f | 6b7728a67e16c85749e81f175c7b9af1fbec507a | /app/src/main/java/com/zane/customview/meiwen/CollectListDialog.java | 470bdb655351fddc6f6a4e2e11393aa3db821a2b | [] | no_license | zane618/L | dab728020a8e8177504dda2899543296ecd38f50 | 9e1c798974e00b33569266d81017c3740e0679fe | refs/heads/master | 2021-01-01T04:46:44.980570 | 2018-09-07T06:40:55 | 2018-09-07T06:40:55 | 95,369,536 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,075 | java | package com.zane.customview.meiwen;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.StyleRes;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.zane.custome.RecycleViewDivider;
import com.zane.l.R;
import com.zane.ui.meiwen.db.MeiwEntity;
import java.util.List;
/**
* Created by shizhang on 2017/8/27.
*/
public class CollectListDialog extends Dialog {
private RecyclerView recyclerView;
private List<MeiwEntity> datas;
private CollectListAdapter adapter;
private Context mContext;
private OnItemChoose onItemChoose;
private View close;
public interface OnItemChoose {
void onItem(String date);
}
public CollectListDialog(@NonNull Context context, List<MeiwEntity> datas, OnItemChoose onItemChoose) {
super(context, R.style.MyDialog);
this.datas = datas;
mContext = context;
this.onItemChoose = onItemChoose;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.dlg_meiwen_collect_list);
Window window = this.getWindow();
window.getDecorView().setPadding(0, 0, 0, 0); //消除边距
WindowManager.LayoutParams lp = window.getAttributes();
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
window.setAttributes(lp);
setCanceledOnTouchOutside(false);
setCancelable(true);
initView();
}
private void initView() {
recyclerView = (RecyclerView) findViewById(R.id.recyler_view);
close = findViewById(R.id.iv_close);
close.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
}
});
recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
recyclerView.addItemDecoration(new RecycleViewDivider(mContext, LinearLayoutManager.VERTICAL));
adapter = new CollectListAdapter(0, datas);
recyclerView.setAdapter(adapter);
adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
dismiss();
if (onItemChoose != null) {
onItemChoose.onItem(datas.get(position).getDate());
}
}
});
}
public void upData(List<MeiwEntity> datas) {
if (this.datas != null && this.datas.size() > 0) {
this.datas.clear();
}
this.datas.addAll(datas);
this.adapter.notifyDataSetChanged();
}
}
| [
"769042485@qq.com"
] | 769042485@qq.com |
c33a0753efe1575ecd1ab6db5b74ac33038d863c | f4d2b6f0623685d6b303efd145e0b05adca50dd5 | /src/snake_game/publc.java | 4e9ecd9d3d450b280e89c406406324ea43ff1822 | [] | no_license | omprakashjoshi/java-Snake-game | 19905d41c3848722c5c335e9d92d8e99b828a3e4 | e3c4420b4b4dec72a5a10c4986f6c5ae3e69afe5 | refs/heads/master | 2023-03-29T14:13:47.868225 | 2021-04-04T03:40:28 | 2021-04-04T03:40:28 | 354,207,333 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 273 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package snake_game;
/**
*
* @author okesh Zoc
*/
class publc {
}
| [
"jomprakash012@gmail.com"
] | jomprakash012@gmail.com |
99636d6dbe1606d161378675acba6052d34208d3 | 9691d131fbcb5378e7ff7a1c1f336d78ba3be9c4 | /aurora-esb/src/aurora/plugin/esb/model/Status.java | d77706ccf6c36333c93dc8101da4a394a731d2b0 | [] | no_license | city-north/aurora-ide | 8494bd46de6b8080c051e155d46bf1eb7bca9cba | 311cefaa178181c74b87864a799cbaba5ae84505 | refs/heads/master | 2021-10-09T09:31:39.972214 | 2018-12-25T07:42:54 | 2018-12-25T07:42:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 59 | java | package aurora.plugin.esb.model;
public class Status {
}
| [
"shi@shiliyan.net"
] | shi@shiliyan.net |
5c08d2e379446f969717a34b374c1a3b1a9028d6 | d1dd0c7d2063c5a5ae50e2d944795a3e4afaeb95 | /surefire-3.0.0-M5/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/util/FailsafeSummaryXmlUtils.java | 5b83696f7cdd0286d9f63426c3078583cf358cec | [
"Apache-2.0"
] | permissive | wessam1292/finalcertificates | e42945e28ce6b2f4f17c92dcc18b9b9aa1e1ed35 | b580a23ac9f1e669041d611558b6f12369f522a3 | refs/heads/master | 2023-01-07T02:20:09.881872 | 2020-10-30T19:27:53 | 2020-10-30T19:27:53 | 305,834,552 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,723 | java | package org.apache.maven.plugin.failsafe.util;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
import org.apache.maven.surefire.shared.io.IOUtils;
import org.apache.maven.surefire.api.suite.RunResult;
import org.w3c.dom.Node;
import org.xml.sax.InputSource;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Locale;
import static java.lang.Boolean.parseBoolean;
import static java.lang.Integer.parseInt;
import static java.lang.String.format;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.maven.surefire.shared.lang3.StringEscapeUtils.escapeXml10;
import static org.apache.maven.surefire.shared.lang3.StringEscapeUtils.unescapeXml;
import static org.apache.maven.surefire.shared.utils.StringUtils.isBlank;
/**
* @author <a href="mailto:tibordigana@apache.org">Tibor Digana (tibor17)</a>
* @since 2.20
*/
public final class FailsafeSummaryXmlUtils
{
private static final String FAILSAFE_SUMMARY_XML_SCHEMA_LOCATION =
"https://maven.apache.org/surefire/maven-surefire-plugin/xsd/failsafe-summary.xsd";
private static final String MESSAGE_NIL_ELEMENT =
"<failureMessage xsi:nil=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>";
private static final String MESSAGE_ELEMENT =
"<failureMessage>%s</failureMessage>";
private static final String FAILSAFE_SUMMARY_XML_TEMPLATE =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<failsafe-summary xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ " xsi:noNamespaceSchemaLocation=\"" + FAILSAFE_SUMMARY_XML_SCHEMA_LOCATION + "\""
+ " result=\"%s\" timeout=\"%s\">\n"
+ " <completed>%d</completed>\n"
+ " <errors>%d</errors>\n"
+ " <failures>%d</failures>\n"
+ " <skipped>%d</skipped>\n"
+ " %s\n"
+ "</failsafe-summary>";
private FailsafeSummaryXmlUtils()
{
throw new IllegalStateException( "No instantiable constructor." );
}
public static RunResult toRunResult( File failsafeSummaryXml ) throws Exception
{
XPathFactory xpathFactory = XPathFactory.newInstance();
XPath xpath = xpathFactory.newXPath();
try ( FileInputStream is = new FileInputStream( failsafeSummaryXml ) )
{
Node root = ( Node ) xpath.evaluate( "/", new InputSource( is ), XPathConstants.NODE );
String completed = xpath.evaluate( "/failsafe-summary/completed", root );
String errors = xpath.evaluate( "/failsafe-summary/errors", root );
String failures = xpath.evaluate( "/failsafe-summary/failures", root );
String skipped = xpath.evaluate( "/failsafe-summary/skipped", root );
String failureMessage = xpath.evaluate( "/failsafe-summary/failureMessage", root );
String timeout = xpath.evaluate( "/failsafe-summary/@timeout", root );
return new RunResult( parseInt( completed ), parseInt( errors ), parseInt( failures ), parseInt( skipped ),
isBlank( failureMessage ) ? null : unescapeXml( failureMessage ),
parseBoolean( timeout )
);
}
}
public static void fromRunResultToFile( RunResult fromRunResult, File toFailsafeSummaryXml )
throws IOException
{
String failure = fromRunResult.getFailure();
String msg = isBlank( failure ) ? MESSAGE_NIL_ELEMENT : format( MESSAGE_ELEMENT, escapeXml10( failure ) );
String xml = format( Locale.ROOT, FAILSAFE_SUMMARY_XML_TEMPLATE,
fromRunResult.getFailsafeCode(),
String.valueOf( fromRunResult.isTimeout() ),
fromRunResult.getCompletedCount(),
fromRunResult.getErrors(),
fromRunResult.getFailures(),
fromRunResult.getSkipped(),
msg );
try ( FileOutputStream os = new FileOutputStream( toFailsafeSummaryXml ) )
{
IOUtils.write( xml, os, UTF_8 );
}
}
public static void writeSummary( RunResult mergedSummary, File mergedSummaryFile, boolean inProgress )
throws Exception
{
if ( !mergedSummaryFile.getParentFile().isDirectory() )
{
//noinspection ResultOfMethodCallIgnored
mergedSummaryFile.getParentFile().mkdirs();
}
if ( mergedSummaryFile.exists() && inProgress )
{
RunResult runResult = toRunResult( mergedSummaryFile );
mergedSummary = mergedSummary.aggregate( runResult );
}
fromRunResultToFile( mergedSummary, mergedSummaryFile );
}
}
| [
"wessam.gamal1992@gmail.com"
] | wessam.gamal1992@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.