blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 332 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2
values | repo_name stringlengths 7 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 557
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 82
values | src_encoding stringclasses 28
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 7 5.41M | extension stringclasses 11
values | content stringlengths 7 5.41M | authors listlengths 1 1 | author stringlengths 0 161 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0061d5d2a6dcc2b8bfb08f4b435d590207adf14e | cc0ef3beacb28502950b0feee49ee91b278e50c0 | /src/controller/Controller.java | ea900fd693ac9301ff07d1087bf6bd522433057b | [] | no_license | pdavila13/StoreHibernateNO | 1a928cc902b251cdba2f1ef31dbe01c0d7031e9b | a52af76231aca4c985c96f3daf99ef3ff7bf4a7d | refs/heads/master | 2021-01-20T01:59:08.033133 | 2017-04-11T10:39:58 | 2017-04-11T10:39:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 18,792 | 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 controller;
import entities.Product;
import entities.Stock;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Vector;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import model.ClassDAO;
import views.View;
/**
*
* @author pdavila
*/
public class Controller {
private View view;
private ClassDAO<Product> modelProduct;
private ClassDAO<Stock> modelStock;
private TableColumn loadTableProduct;
private TableColumn loadTableStock;
private int filasel = -1;
public Controller(View view, ClassDAO<Product> modelProduct, ClassDAO<Stock> modelStock) {
this.view = view;
this.modelProduct = modelProduct;
this.modelStock = modelStock;
loadTableProduct = loadTable((ArrayList) modelProduct.obtainList(), view.getProductTable(), Product.class);
loadTableStock = loadTable((ArrayList) modelStock.obtainList(), view.getStockTable(), Stock.class);
loadCombo((ArrayList)modelStock.obtainList(),view.getProductStockComboBox());
controlProduct();
controlStock();
exitButton();
}
private void controlProduct() {
view.getCreateProductButton().addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource().equals(view.getCreateProductButton())) {
if(!view.getProductIdTextField().getText().trim().equals("") ||
!view.getProductNameTextField().getText().trim().equals("") ||
!view.getProductTraceMarkTextField().getText().trim().equals("") ||
!view.getProductModelTextField().getText().trim().equals("") ||
!view.getProductPriceTextField().getText().trim().equals(""))
modelProduct.obtainList();
Product p = new Product(
view.getProductNameTextField().getText(),
view.getProductTraceMarkTextField().getText(),
view.getProductModelTextField().getText(),
Integer.valueOf(view.getProductPriceTextField().getText()),
(Stock) view.getProductStockComboBox().getSelectedItem()
);
modelProduct.store(p);
loadTable((ArrayList) modelProduct.obtainList(),view.getProductTable(),Product.class);
} else {
JOptionPane.showMessageDialog(null, "No has introducido ningun producto", "ERROR",JOptionPane.ERROR_MESSAGE);
}
}
});
view.getModifyProductButton().addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
TableColumnModel tcm = (TableColumnModel) view.getProductTable().getColumnModel();
if (view.getProductTable().getSelectedRow() != -1) {
view.getProductTable().addColumn(loadTableProduct);
DefaultTableModel tm = (DefaultTableModel) view.getProductTable().getModel();
Product modifyProduct = (Product) tm.getValueAt(view.getProductTable().getSelectedRow(), tm.getColumnCount() -1);
modifyProduct.set2_product_name(view.getProductNameTextField().getText());
modifyProduct.set3_product_trademark(view.getProductTraceMarkTextField().getText());
modifyProduct.set4_product_model(view.getProductModelTextField().getText());
modifyProduct.set5_product_price(Integer.valueOf(view.getProductPriceTextField().getText()));
modifyProduct.set6_stored((Stock) view.getProductStockComboBox().getSelectedItem());
view.getProductTable().removeColumn(loadTableProduct);
modelProduct.update(modifyProduct);
view.getProductTable().addColumn(loadTableProduct);
loadTableProduct = loadTable((ArrayList) modelProduct.obtainList(),view.getProductTable(),Product.class);
loadCombo((ArrayList)modelStock.obtainList(),view.getProductStockComboBox());
} else {
JOptionPane.showMessageDialog(null, "Selecciona un producto para modificarlo", "ERROR",JOptionPane.ERROR_MESSAGE);
}
}
});
view.getDeleteProductButton().addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
TableColumnModel tcm = (TableColumnModel) view.getProductTable().getColumnModel();
if (view.getProductTable().getSelectedRow() != -1) {
DefaultTableModel tm = (DefaultTableModel) view.getProductTable().getModel();
Product deleteProduct = (Product) tm.getValueAt(view.getProductTable().getSelectedRow(), tm.getColumnCount() -1);
view.getProductTable().removeColumn(loadTableProduct);
modelProduct.destroy(deleteProduct);
view.getProductTable().addColumn(loadTableProduct);
loadTableProduct = loadTable((ArrayList) modelProduct.obtainList(),view.getProductTable(),Product.class);
} else {
JOptionPane.showMessageDialog(null, "Seleccciona un producto para eliminarlo", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
});
view.getProductTable().addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (view.getProductTable().getSelectedRow() != -1) {
super.mouseClicked(e);
DefaultTableModel model = (DefaultTableModel) view.getProductTable().getModel();
view.getProductIdTextField().setText(model.getValueAt(Integer.valueOf(view.getProductTable().getSelectedRow()), 0).toString());
view.getProductNameTextField().setText(model.getValueAt(view.getProductTable().getSelectedRow(), 1).toString());
view.getProductTraceMarkTextField().setText(model.getValueAt(view.getProductTable().getSelectedRow(), 2).toString());
view.getProductModelTextField().setText(model.getValueAt(view.getProductTable().getSelectedRow(), 3).toString());
view.getProductPriceTextField().setText(model.getValueAt(Integer.valueOf(view.getProductTable().getSelectedRow()), 4).toString());
view.getProductStockComboBox().setSelectedItem(model.getValueAt(view.getProductTable().getSelectedRow(), 5).toString());
} else {
JOptionPane.showMessageDialog(null, "Selecciona un producto de la tabla", "ERROR",JOptionPane.ERROR_MESSAGE);
}
}
});
view.getClearProductButton().addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
view.getProductIdTextField().setText("");
view.getProductNameTextField().setText("");
view.getProductTraceMarkTextField().setText("");
view.getProductModelTextField().setText("");
view.getProductPriceTextField().setText("");
}
});
}
private void controlStock() {
view.getCreateStockButton().addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource().equals(view.getCreateStockButton())) {
if(!view.getStockIdTextField().getText().trim().equals("") ||
!view.getStockTotalTextField().getText().trim().equals(""))
modelStock.obtainList();
Stock s = new Stock(
Integer.valueOf(view.getStockTotalTextField().getText())
);
modelStock.store(s);
loadTable((ArrayList) modelStock.obtainList(),view.getStockTable(),Stock.class);
loadCombo((ArrayList)modelStock.obtainList(),view.getProductStockComboBox());
} else {
JOptionPane.showMessageDialog(null, "No has introducido ningun stock", "ERROR",JOptionPane.ERROR_MESSAGE);
}
}
});
view.getModifyStockButton().addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
TableColumnModel tcm = (TableColumnModel) view.getStockTable().getColumnModel();
if (view.getStockTable().getSelectedRow() != -1) {
view.getStockTable().addColumn(loadTableStock);
DefaultTableModel tm = (DefaultTableModel) view.getStockTable().getModel();
Stock modifyStock = (Stock) tm.getValueAt(view.getStockTable().getSelectedRow(), tm.getColumnCount() -1);
modifyStock.set2_stock_total(Integer.valueOf(view.getStockTotalTextField().getText()));
view.getStockTable().removeColumn(loadTableStock);
modelStock.update(modifyStock);
view.getStockTable().addColumn(loadTableStock);
loadTableStock = loadTable((ArrayList) modelStock.obtainList(),view.getStockTable(),Stock.class);
} else {
JOptionPane.showMessageDialog(null, "Selecciona un stcok para modificarlo", "ERROR",JOptionPane.ERROR_MESSAGE);
}
}
});
view.getDeleteStockButton().addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
TableColumnModel tcm = (TableColumnModel) view.getStockTable().getColumnModel();
if (view.getStockTable().getSelectedRow() != -1) {
DefaultTableModel tm = (DefaultTableModel) view.getStockTable().getModel();
Stock deleteStock = (Stock) tm.getValueAt(view.getStockTable().getSelectedRow(), tm.getColumnCount() -1);
view.getStockTable().removeColumn(loadTableStock);
modelStock.destroy(deleteStock);
view.getStockTable().addColumn(loadTableStock);
loadTableStock = loadTable((ArrayList) modelStock.obtainList(),view.getStockTable(),Stock.class);
} else {
JOptionPane.showMessageDialog(null, "Seleccciona un stock para eliminarlo", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
});
view.getStockTable().addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (view.getStockTable().getSelectedRow() != -1) {
super.mouseClicked(e);
DefaultTableModel model = (DefaultTableModel) view.getStockTable().getModel();
view.getStockIdTextField().setText(model.getValueAt(Integer.valueOf(view.getStockTable().getSelectedRow()), 0).toString());
view.getStockTotalTextField().setText(model.getValueAt(Integer.valueOf(view.getStockTable().getSelectedRow()), 1).toString());
} else {
JOptionPane.showMessageDialog(null, "Selecciona un stock de la tabla", "ERROR",JOptionPane.ERROR_MESSAGE);
}
}
});
view.getClearStockButton().addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
view.getStockIdTextField().setText("");
view.getStockTotalTextField().setText("");
}
});
}
public void exitButton() {
view.getExitButton().addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
}
//Mètode que carrega els objectes continguts a l'ArrayList i el mostra a la JTable. La classe indica de quin tipo són els objectes de l'ArrayList
//Si volem que es pugue modificar les dades directament des de la taula hauríem d'usar el model instància de la classe ModelCanvisBD, que varia d'una BD a una altra
//Esta versió afegix a la darrera columna de la taula l'objecte mostrat a la mateixa de manera que el podrem recuperar fàcilment per fer updates, deletes, etc...
//Esta columna extra no apareix a la taula ja que la borrem, però la retornem per poder-la afegir quan sigue necessari
private static TableColumn loadTable(ArrayList resultSet, JTable table, Class<?> classe) {
//variables locals
Vector columnNames = new Vector();
Vector data = new Vector();
//Per poder actualitzar la BD des de la taula usaríem el model comentat
//ModelCanvisBD model;
DefaultTableModel model;
//Anotem el nº de camps de la classe
Field[] camps = classe.getDeclaredFields();
//Ordenem els camps alfabèticament
Arrays.sort(camps, new OrdenarCampClasseAlfabeticament());
int ncamps = camps.length;
//Recorrem els camps de la classe i posem els seus noms com a columnes de la taula
//Com hem hagut de posar _numero_ davant el nom dels camps, mostrem el nom a partir de la 4ª lletra
for (Field f : camps) {
columnNames.addElement(f.getName().substring(3));
}
//Afegixo al model de la taula una columna on guardaré l'objecte mostrat a cada fila (amago la columna al final per a que no aparegue a la vista)
columnNames.addElement("objecte");
//Si hi ha algun element a l'arraylist omplim la taula
if (resultSet.size() != 0) {
//Guardem els descriptors de mètode que ens interessen (els getters), més una columna per guardar l'objecte sencer
Vector<Method> methods = new Vector(ncamps + 1);
try {
PropertyDescriptor[] descriptors = Introspector.getBeanInfo(classe).getPropertyDescriptors();
Arrays.sort(descriptors, new OrdenarMetodeClasseAlfabeticament());
for (PropertyDescriptor pD : descriptors) {
Method m = pD.getReadMethod();
if (m != null & !m.getName().equals("getClass")) {
methods.addElement(m);
}
}
} catch (IntrospectionException ex) {
//Logger.getLogger(VistaActors.class.getName()).log(Level.SEVERE, null, ex);
}
for (Object m : resultSet) {
Vector row = new Vector(ncamps + 1);
for (Method mD : methods) {
try {
row.addElement(mD.invoke(m));
} catch (IllegalAccessException ex) {
//Logger.getLogger(VistaActors.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalArgumentException ex) {
//Logger.getLogger(VistaActors.class.getName()).log(Level.SEVERE, null, ex);
} catch (InvocationTargetException ex) {
//Logger.getLogger(VistaActors.class.getName()).log(Level.SEVERE, null, ex);
}
}
//Aquí guardo l'objecte sencer a la darrera columna
row.addElement(m);
//Finalment afegixo la fila a les dades
data.addElement(row);
}
}
//Utilitzem el model que permet actualitzar la BD des de la taula
//model = new ModelCanvisBD(data, columnNames, Model.getConnexio(), columnNames.size() - 1);
model = new DefaultTableModel(data, columnNames);
table.setModel(model);
//Borro la darrera columna per a que no aparegue a la vista, però abans la guardo en una variable que al final serà el que retorna el mètode
TableColumnModel tcm = table.getColumnModel();
TableColumn columna = tcm.getColumn(tcm.getColumnCount() - 1);
tcm.removeColumn(columna);
//Fixo l'amplada de les columnes que sí es mostren
TableColumn column;
for (int i = 0; i < table.getColumnCount(); i++) {
column = table.getColumnModel().getColumn(i);
column.setMaxWidth(250);
}
return columna;
}
//per carregar un JComboBox a partir d'un ArrayList que conté les dades
public void loadCombo(ArrayList resultSet, JComboBox combo) {
combo.setModel(new DefaultComboBoxModel((resultSet!=null?resultSet.toArray():new Object[]{})));
}
public static class OrdenarMetodeClasseAlfabeticament implements Comparator {
public int compare(Object o1, Object o2) {
Method mo1 = ((PropertyDescriptor) o1).getReadMethod();
Method mo2 = ((PropertyDescriptor) o2).getReadMethod();
if (mo1 != null && mo2 != null) {
return (int) mo1.getName().compareToIgnoreCase(mo2.getName());
}
if (mo1 == null) {
return -1;
} else {
return 1;
}
}
}
public static class OrdenarCampClasseAlfabeticament implements Comparator {
public int compare(Object o1, Object o2) {
return (int) (((Field) o1).getName().compareToIgnoreCase(((Field) o2).getName()));
}
}
}
| [
"pdavila@iesebre.com"
] | pdavila@iesebre.com |
6aac6bff1aeb5a45fe96e656e2d560ac57d3a83c | 46301c7752ed33a35ab9b72feb9463ce66f9c416 | /Buyer/src/main/java/com/zjclugger/buyer/ui/uc/UserRegisterFragment.java | bea72c371e8c49a510755c92f29d31202c94a10d | [
"Apache-2.0"
] | permissive | zjclugger/JLibrary | 81b22613f530a7b7977114641baab17312070711 | d004c5673e36ce90dc6e934c7bb5c647283ad857 | refs/heads/master | 2022-11-19T06:30:25.043053 | 2020-07-24T07:37:38 | 2020-07-24T07:37:38 | 275,754,517 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,032 | java | package com.zjclugger.buyer.ui.uc;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textfield.TextInputLayout;
import com.zjclugger.buyer.R;
import com.zjclugger.buyer.ui.vm.BuyerViewModel;
import com.zjclugger.lib.api.ApiResponse;
import com.zjclugger.lib.api.ApiResponseUtils;
import com.zjclugger.lib.api.entity.BaseWrapper;
import com.zjclugger.lib.api.entity.WrapperEntity;
import com.zjclugger.lib.base.BaseFragment;
import com.zjclugger.lib.utils.CommonUtils;
import com.zjclugger.lib.utils.WidgetUtils;
import butterknife.BindView;
/**
* 用户注册<br>
* Created by King.Zi on 2020/4/9.<br>
* Copyright (c) 2020 zjclugger.com
*/
public class UserRegisterFragment extends BaseFragment {
@BindView(R.id.til_password)
TextInputLayout mRegisterMessageLayout;
@BindView(R.id.et_register_email)
TextInputEditText mUserNameView;
@BindView(R.id.et_register_password)
TextInputEditText mPasswordView;
@BindView(R.id.et_register_password2)
TextInputEditText mPasswordView2;
@BindView(R.id.chk_user_agreement)
CheckBox mAgreementButton;
@BindView(R.id.tv_go_login)
TextView mToLoginView;
@BindView(R.id.register_button)
Button mRegisterButton;
BuyerViewModel mViewModel;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mViewModel = ViewModelProviders.of(getActivity()).get(BuyerViewModel.class);
}
@Override
public int getLayout() {
return R.layout.fragment_register_layout;
}
@Override
public void initViews() {
mRegisterButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (verifyEmail()) {
if (verifyPassword(mPasswordView, mPasswordView2)) {
if (verifyEquals(mPasswordView.getText().toString(),
mPasswordView2.getText().toString())) {
if (mAgreementButton.isChecked()) {
// changePassword(mPasswordNew1View.getText().toString());
checkEmail();
} else {
WidgetUtils.toastMessage(getActivity(), "未同意用户协议");
}
}
}
}
}
});
mToLoginView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
close();
}
});
}
private void checkEmail() {
showWaiting();
mViewModel.checkEmail(String.valueOf(mUserNameView.getText())).observe(this,
new Observer<ApiResponse<BaseWrapper<String>>>() {
@Override
public void onChanged(ApiResponse<BaseWrapper<String>> response) {
if (ApiResponseUtils.isSuccess(response, "邮箱检测失败,请重试!")) {
WrapperEntity result = response.body;
if (result.isSuccess()) {
//todo:注册
register();
} else {
closeProgressDialog();
WidgetUtils.toastErrorMessage(mContext, result.getMessage());
}
} else {
closeProgressDialog();
}
}
});
}
private void register() {
mViewModel.register(String.valueOf(mUserNameView.getText()),
String.valueOf(mPasswordView.getText())).observe(this,
new Observer<ApiResponse<BaseWrapper<Boolean>>>() {
@Override
public void onChanged(ApiResponse<BaseWrapper<Boolean>> response) {
closeProgressDialog();
if (ApiResponseUtils.isSuccess(response, "注册失败")) {
WrapperEntity result = response.body;
if (result.isSuccess()) {
WidgetUtils.toastMessage(mContext, "注册成功");
getFragmentManager().popBackStack();
} else {
WidgetUtils.toastErrorMessage(mContext, result.getMessage());
}
}
}
});
}
private boolean verifyEmail() {
String errorMessage = "";
if (TextUtils.isEmpty(mUserNameView.getText())) {
errorMessage = "邮箱不能为空";
} else if (!CommonUtils.isEmail(String.valueOf(mUserNameView.getText()))) {
errorMessage = "邮箱格式不正确!";
}
return verify(mUserNameView, errorMessage);
}
private boolean verifyPassword(TextInputEditText... inputEditTextViews) {
String errorMessage = "";
for (TextInputEditText inputEditText : inputEditTextViews) {
if (inputEditText != null) {
if (TextUtils.isEmpty(inputEditText.getText())) {
errorMessage = "新密码不能为空";
} else if (String.valueOf(inputEditText.getText()).length() <= 6) {
errorMessage = getString(R.string.tip_register_password);
}
if (!verify(inputEditText, errorMessage)) {
return false;
}
}
}
return true;
}
private boolean verify(TextInputEditText inputEditText, String errorMessage) {
if (!TextUtils.isEmpty(errorMessage)) {
mRegisterMessageLayout.setErrorEnabled(true);
mRegisterMessageLayout.setError(errorMessage);
inputEditText.requestFocus();
return false;
} else {
mRegisterMessageLayout.setErrorEnabled(false);
return true;
}
}
private boolean verifyEquals(String value1, String value2) {
if (!value1.equalsIgnoreCase(value2)) {
mRegisterMessageLayout.setErrorEnabled(true);
mRegisterMessageLayout.setError("再次密码不一致");
return false;
} else {
mRegisterMessageLayout.setErrorEnabled(false);
return true;
}
}
@Override
public void closeFloatView() {
}
@Override
public boolean doBackPress() {
return false;
}
} | [
"zjclugger@126.com"
] | zjclugger@126.com |
0bc4c50d9454b699ceed87d14a1b5c2421916492 | 1416b231df4ee3eb525c509f8ad0e2b269bce239 | /src/main/java/de/siobra/exampleapp/WebConfig.java | 79d40715399f279258163c36158eb02ad4f93960 | [
"MIT"
] | permissive | Agraphie/springboot-gradle-cctrl-example | 7e9b10f4f13973ce387ceb283e0a493fd93178aa | 2d680f3bf5386413731ea0fb02844bfba3b55a66 | refs/heads/master | 2020-03-31T09:11:57.709809 | 2014-08-18T13:58:08 | 2014-08-18T13:58:08 | 19,210,256 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 975 | java | package de.siobra.exampleapp;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/person").setViewName("person");
}
@Override
public void configureContentNegotiation(
ContentNegotiationConfigurer configurer) {
// Simple strategy: only path extension is taken into account
configurer.favorPathExtension(true)
.ignoreAcceptHeader(true)
.useJaf(false)
.mediaType("html", MediaType.TEXT_HTML)
.mediaType("json", MediaType.APPLICATION_JSON);
}
}
| [
"clkepple@htwg-konstanz.de"
] | clkepple@htwg-konstanz.de |
b18bd3dbc80ea279a6be218b39ae97912642d15a | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /PMD/rev5929-6010/left-tag-4-2-1-6010/src/net/sourceforge/pmd/cpd/SourceCode.java | ceefe150f3ee0491d9b8cc9cbfec2de827610560 | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,834 | java |
package net.sourceforge.pmd.cpd;
import net.sourceforge.pmd.PMD;
import java.io.File;
import java.io.LineNumberReader;
import java.io.Reader;
import java.io.StringReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.lang.ref.SoftReference;
import java.util.ArrayList;
import java.util.List;
public class SourceCode {
public static abstract class CodeLoader {
private SoftReference<List<String>> code;
public List<String> getCode() {
List<String> c = null;
if (code != null) {
c = code.get();
}
if (c != null) {
return c;
}
this.code = new SoftReference<List<String>>(load());
return code.get();
}
public abstract String getFileName();
protected abstract Reader getReader() throws Exception;
protected List<String> load() {
LineNumberReader lnr = null;
try {
lnr = new LineNumberReader(getReader());
List<String> lines = new ArrayList<String>();
String currentLine;
while ((currentLine = lnr.readLine()) != null) {
lines.add(currentLine);
}
return lines;
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("Problem while reading " + getFileName() + ":" + e.getMessage());
} finally {
try {
if (lnr != null)
lnr.close();
} catch (Exception e) {
throw new RuntimeException("Problem while reading " + getFileName() + ":" + e.getMessage());
}
}
}
}
public static class FileCodeLoader extends CodeLoader {
private File file;
private String encoding;
public FileCodeLoader(File file, String encoding) {
this.file = file;
this.encoding = encoding;
}
public Reader getReader() throws Exception {
return new InputStreamReader(new FileInputStream(file), encoding);
}
public String getFileName() {
return this.file.getAbsolutePath();
}
}
public static class StringCodeLoader extends CodeLoader {
public static final String DEFAULT_NAME = "CODE_LOADED_FROM_STRING";
private String source_code;
private String name;
public StringCodeLoader(String code) {
this(code, DEFAULT_NAME);
}
public StringCodeLoader(String code, String name) {
this.source_code = code;
this.name = name;
}
public Reader getReader() {
return new StringReader(source_code);
}
public String getFileName() {
return name;
}
}
private CodeLoader cl;
public SourceCode(CodeLoader cl) {
this.cl = cl;
}
public List<String> getCode() {
return cl.getCode();
}
public StringBuffer getCodeBuffer() {
StringBuffer sb = new StringBuffer();
List<String> lines = cl.getCode();
for ( String line : lines ) {
sb.append(line);
sb.append(PMD.EOL);
}
return sb;
}
public String getSlice(int startLine, int endLine) {
StringBuffer sb = new StringBuffer();
List lines = cl.getCode();
for (int i = startLine - 1; i < endLine && i < lines.size(); i++) {
if (sb.length() != 0) {
sb.append(PMD.EOL);
}
sb.append((String) lines.get(i));
}
return sb.toString();
}
public String getFileName() {
return cl.getFileName();
}
}
| [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
b39ca08456183c34125d7115792bc28f7ea30690 | 572ab44a5612fa7c48c1c3b29b5f4375f3b08ed1 | /BIMfoBA.src/jsdai/SIfc4/CIfcrelspaceboundary2ndlevel.java | ff56278174e22f1ac40ba8a95fd92f5ff6d7ad6f | [] | no_license | ren90/BIMforBA | ce9dd9e5c0b8cfd2dbd2b84f3e2bcc72bc8aa18e | 4a83d5ecb784b80a217895d93e0e30735dc83afb | refs/heads/master | 2021-01-12T20:49:32.561833 | 2015-03-09T11:00:40 | 2015-03-09T11:00:40 | 24,721,790 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 15,555 | java | /* Generated by JSDAI Express Compiler, version 4.3.2, build 500, 2011-12-13 */
// Java class implementing entity IfcRelSpaceBoundary2ndLevel
package jsdai.SIfc4;
import jsdai.lang.*;
public class CIfcrelspaceboundary2ndlevel extends CIfcrelspaceboundary1stlevel implements EIfcrelspaceboundary2ndlevel {
public static final jsdai.dictionary.CEntity_definition definition = initEntityDefinition(CIfcrelspaceboundary2ndlevel.class, SIfc4.ss);
/*----------------------------- Attributes -----------*/
/*
// GlobalId: protected String a0; GlobalId - java inheritance - STRING
// OwnerHistory: protected Object a1; OwnerHistory - java inheritance - ENTITY IfcOwnerHistory
// Name: protected String a2; Name - java inheritance - STRING
// Description: protected String a3; Description - java inheritance - STRING
// RelatingSpace: protected Object a4; RelatingSpace - java inheritance - SELECT IfcSpaceBoundarySelect
// RelatedBuildingElement: protected Object a5; RelatedBuildingElement - java inheritance - ENTITY IfcElement
// ConnectionGeometry: protected Object a6; ConnectionGeometry - java inheritance - ENTITY IfcConnectionGeometry
// PhysicalOrVirtualBoundary: protected int a7; PhysicalOrVirtualBoundary - java inheritance - ENUMERATION IfcPhysicalOrVirtualEnum
// InternalOrExternalBoundary: protected int a8; InternalOrExternalBoundary - java inheritance - ENUMERATION IfcInternalOrExternalEnum
// ParentBoundary: protected Object a9; ParentBoundary - java inheritance - ENTITY IfcRelSpaceBoundary1stLevel
// InnerBoundaries: protected Object - inverse - java inheritance - ENTITY IfcRelSpaceBoundary1stLevel
protected Object a10; // CorrespondingBoundary - current entity - ENTITY IfcRelSpaceBoundary2ndLevel
protected static final jsdai.dictionary.CExplicit_attribute a10$ = CEntity.initExplicitAttribute(definition, 10);
// Corresponds: protected Object - inverse - current - ENTITY IfcRelSpaceBoundary2ndLevel
protected static final jsdai.dictionary.CInverse_attribute i1$ = CEntity.initInverseAttribute(definition, 1);
*/
/*----------------------------- Attributes (new version) -----------*/
// GlobalId - explicit - java inheritance
// protected static final jsdai.dictionary.CExplicit_attribute a0$ = CEntity.initExplicitAttribute(definition, 0);
// protected String a0;
// OwnerHistory - explicit - java inheritance
// protected static final jsdai.dictionary.CExplicit_attribute a1$ = CEntity.initExplicitAttribute(definition, 1);
// protected Object a1;
// Name - explicit - java inheritance
// protected static final jsdai.dictionary.CExplicit_attribute a2$ = CEntity.initExplicitAttribute(definition, 2);
// protected String a2;
// Description - explicit - java inheritance
// protected static final jsdai.dictionary.CExplicit_attribute a3$ = CEntity.initExplicitAttribute(definition, 3);
// protected String a3;
// RelatingSpace - explicit - java inheritance
// protected static final jsdai.dictionary.CExplicit_attribute a4$ = CEntity.initExplicitAttribute(definition, 4);
// protected Object a4;
// RelatedBuildingElement - explicit - java inheritance
// protected static final jsdai.dictionary.CExplicit_attribute a5$ = CEntity.initExplicitAttribute(definition, 5);
// protected Object a5;
// ConnectionGeometry - explicit - java inheritance
// protected static final jsdai.dictionary.CExplicit_attribute a6$ = CEntity.initExplicitAttribute(definition, 6);
// protected Object a6;
// PhysicalOrVirtualBoundary - explicit - java inheritance
// protected static final jsdai.dictionary.CExplicit_attribute a7$ = CEntity.initExplicitAttribute(definition, 7);
// protected int a7;
// InternalOrExternalBoundary - explicit - java inheritance
// protected static final jsdai.dictionary.CExplicit_attribute a8$ = CEntity.initExplicitAttribute(definition, 8);
// protected int a8;
// ParentBoundary - explicit - java inheritance
// protected static final jsdai.dictionary.CExplicit_attribute a9$ = CEntity.initExplicitAttribute(definition, 9);
// protected Object a9;
// InnerBoundaries - inverse - java inheritance
// protected static final jsdai.dictionary.CInverse_attribute i0$ = CEntity.initInverseAttribute(definition, 0);
// CorrespondingBoundary - explicit - current entity
protected static final jsdai.dictionary.CExplicit_attribute a10$ = CEntity.initExplicitAttribute(definition, 10);
protected Object a10;
// Corresponds - inverse - current entity
protected static final jsdai.dictionary.CInverse_attribute i1$ = CEntity.initInverseAttribute(definition, 1);
public jsdai.dictionary.EEntity_definition getInstanceType() {
return definition;
}
/* *** old implementation ***
protected void changeReferences(InverseEntity old, InverseEntity newer) throws SdaiException {
super.changeReferences(old, newer);
if (a10 == old) {
a10 = newer;
}
}
*/
protected void changeReferences(InverseEntity old, InverseEntity newer) throws SdaiException {
super.changeReferences(old, newer);
if (a10 == old) {
a10 = newer;
}
}
/*----------- Methods for attribute access -----------*/
/*----------- Methods for attribute access (new)-----------*/
//going through all the attributes: #5618=EXPLICIT_ATTRIBUTE('GlobalId',#5616,0,#2517,$,.F.);
//<01> generating methods for consolidated attribute: GlobalId
//<01-1> supertype, java inheritance
//<01-1-0> explicit - generateExplicitSupertypeJavaInheritedMethodsX()
//going through all the attributes: #5619=EXPLICIT_ATTRIBUTE('OwnerHistory',#5616,1,#4858,$,.T.);
//<01> generating methods for consolidated attribute: OwnerHistory
//<01-1> supertype, java inheritance
//<01-1-0> explicit - generateExplicitSupertypeJavaInheritedMethodsX()
// attribute (java explicit): OwnerHistory, base type: entity IfcOwnerHistory
public static int usedinOwnerhistory(EIfcroot type, EIfcownerhistory instance, ASdaiModel domain, AEntity result) throws SdaiException {
return ((CEntity)instance).makeUsedin(definition, a1$, domain, result);
}
//going through all the attributes: #5620=EXPLICIT_ATTRIBUTE('Name',#5616,2,#2539,$,.T.);
//<01> generating methods for consolidated attribute: Name
//<01-1> supertype, java inheritance
//<01-1-0> explicit - generateExplicitSupertypeJavaInheritedMethodsX()
//going through all the attributes: #5621=EXPLICIT_ATTRIBUTE('Description',#5616,3,#2657,$,.T.);
//<01> generating methods for consolidated attribute: Description
//<01-1> supertype, java inheritance
//<01-1-0> explicit - generateExplicitSupertypeJavaInheritedMethodsX()
//going through all the attributes: #5514=EXPLICIT_ATTRIBUTE('RelatingSpace',#5512,0,#3201,$,.F.);
//<01> generating methods for consolidated attribute: RelatingSpace
//<01-1> supertype, java inheritance
//<01-1-0> explicit - generateExplicitSupertypeJavaInheritedMethodsX()
// -1- methods for SELECT attribute: RelatingSpace
public static int usedinRelatingspace(EIfcrelspaceboundary type, EEntity instance, ASdaiModel domain, AEntity result) throws SdaiException {
return ((CEntity)instance).makeUsedin(definition, a4$, domain, result);
}
//going through all the attributes: #5515=EXPLICIT_ATTRIBUTE('RelatedBuildingElement',#5512,1,#4136,$,.F.);
//<01> generating methods for consolidated attribute: RelatedBuildingElement
//<01-1> supertype, java inheritance
//<01-1-0> explicit - generateExplicitSupertypeJavaInheritedMethodsX()
// attribute (java explicit): RelatedBuildingElement, base type: entity IfcElement
public static int usedinRelatedbuildingelement(EIfcrelspaceboundary type, EIfcelement instance, ASdaiModel domain, AEntity result) throws SdaiException {
return ((CEntity)instance).makeUsedin(definition, a5$, domain, result);
}
//going through all the attributes: #5516=EXPLICIT_ATTRIBUTE('ConnectionGeometry',#5512,2,#3726,$,.T.);
//<01> generating methods for consolidated attribute: ConnectionGeometry
//<01-1> supertype, java inheritance
//<01-1-0> explicit - generateExplicitSupertypeJavaInheritedMethodsX()
// attribute (java explicit): ConnectionGeometry, base type: entity IfcConnectionGeometry
public static int usedinConnectiongeometry(EIfcrelspaceboundary type, EIfcconnectiongeometry instance, ASdaiModel domain, AEntity result) throws SdaiException {
return ((CEntity)instance).makeUsedin(definition, a6$, domain, result);
}
//going through all the attributes: #5517=EXPLICIT_ATTRIBUTE('PhysicalOrVirtualBoundary',#5512,3,#2949,$,.F.);
//<01> generating methods for consolidated attribute: PhysicalOrVirtualBoundary
//<01-1> supertype, java inheritance
//<01-1-0> explicit - generateExplicitSupertypeJavaInheritedMethodsX()
//going through all the attributes: #5518=EXPLICIT_ATTRIBUTE('InternalOrExternalBoundary',#5512,4,#2899,$,.F.);
//<01> generating methods for consolidated attribute: InternalOrExternalBoundary
//<01-1> supertype, java inheritance
//<01-1-0> explicit - generateExplicitSupertypeJavaInheritedMethodsX()
//going through all the attributes: #5521=EXPLICIT_ATTRIBUTE('ParentBoundary',#5519,0,#5519,$,.T.);
//<01> generating methods for consolidated attribute: ParentBoundary
//<01-1> supertype, java inheritance
//<01-1-0> explicit - generateExplicitSupertypeJavaInheritedMethodsX()
// attribute (java explicit): ParentBoundary, base type: entity IfcRelSpaceBoundary1stLevel
public static int usedinParentboundary(EIfcrelspaceboundary1stlevel type, EIfcrelspaceboundary1stlevel instance, ASdaiModel domain, AEntity result) throws SdaiException {
return ((CEntity)instance).makeUsedin(definition, a9$, domain, result);
}
//going through all the attributes: #5522=INVERSE_ATTRIBUTE('InnerBoundaries',#5519,0,#5519,$,#5521,#9196,$,.F.);
//<01> generating methods for consolidated attribute: InnerBoundaries
//<01-1> supertype, java inheritance
//<01-1-2> inverse - generateInverseSupertypeJavaInheritedMethodsX()
//going through all the attributes: #5525=EXPLICIT_ATTRIBUTE('CorrespondingBoundary',#5523,0,#5523,$,.T.);
//<01> generating methods for consolidated attribute: CorrespondingBoundary
//<01-0> current entity
//<01-0-0> explicit attribute - generateExplicitCurrentEntityMethodsX()
// attribute (current explicit or supertype explicit) : CorrespondingBoundary, base type: entity IfcRelSpaceBoundary2ndLevel
public static int usedinCorrespondingboundary(EIfcrelspaceboundary2ndlevel type, EIfcrelspaceboundary2ndlevel instance, ASdaiModel domain, AEntity result) throws SdaiException {
return ((CEntity)instance).makeUsedin(definition, a10$, domain, result);
}
public boolean testCorrespondingboundary(EIfcrelspaceboundary2ndlevel type) throws SdaiException {
return test_instance(a10);
}
public EIfcrelspaceboundary2ndlevel getCorrespondingboundary(EIfcrelspaceboundary2ndlevel type) throws SdaiException {
return (EIfcrelspaceboundary2ndlevel)get_instance(a10);
}
public void setCorrespondingboundary(EIfcrelspaceboundary2ndlevel type, EIfcrelspaceboundary2ndlevel value) throws SdaiException {
a10 = set_instance(a10, value);
}
public void unsetCorrespondingboundary(EIfcrelspaceboundary2ndlevel type) throws SdaiException {
a10 = unset_instance(a10);
}
public static jsdai.dictionary.EAttribute attributeCorrespondingboundary(EIfcrelspaceboundary2ndlevel type) throws SdaiException {
return a10$;
}
//going through all the attributes: #5526=INVERSE_ATTRIBUTE('Corresponds',#5523,0,#5523,$,#5525,#9198,#9199,.F.);
//<01> generating methods for consolidated attribute: Corresponds
//<01-0> current entity
//<01-0-2> inverse attribute - generateInverseCurrentEntityMethodsX()
public AIfcrelspaceboundary2ndlevel getCorresponds(EIfcrelspaceboundary2ndlevel type, ASdaiModel domain) throws SdaiException {
AIfcrelspaceboundary2ndlevel result = (AIfcrelspaceboundary2ndlevel)get_inverse_aggregate(i1$);
CIfcrelspaceboundary2ndlevel.usedinCorrespondingboundary(null, this, domain, result);
return result;
}
public static jsdai.dictionary.EAttribute attributeCorresponds(EIfcrelspaceboundary2ndlevel type) throws SdaiException {
return i1$;
}
/*---------------------- setAll() --------------------*/
/* *** old implementation ***
protected void setAll(ComplexEntityValue av) throws SdaiException {
if (av == null) {
a4 = unset_instance(a4);
a5 = unset_instance(a5);
a6 = unset_instance(a6);
a7 = 0;
a8 = 0;
a9 = unset_instance(a9);
a10 = unset_instance(a10);
a0 = null;
a1 = unset_instance(a1);
a2 = null;
a3 = null;
return;
}
a4 = av.entityValues[2].getInstance(0, this, a4$);
a5 = av.entityValues[2].getInstance(1, this, a5$);
a6 = av.entityValues[2].getInstance(2, this, a6$);
a7 = av.entityValues[2].getEnumeration(3, a7$);
a8 = av.entityValues[2].getEnumeration(4, a8$);
a9 = av.entityValues[3].getInstance(0, this, a9$);
a10 = av.entityValues[4].getInstance(0, this, a10$);
a0 = av.entityValues[5].getString(0);
a1 = av.entityValues[5].getInstance(1, this, a1$);
a2 = av.entityValues[5].getString(2);
a3 = av.entityValues[5].getString(3);
}
*/
protected void setAll(ComplexEntityValue av) throws SdaiException {
if (av == null) {
a4 = unset_instance(a4);
a5 = unset_instance(a5);
a6 = unset_instance(a6);
a7 = 0;
a8 = 0;
a9 = unset_instance(a9);
a10 = unset_instance(a10);
a0 = null;
a1 = unset_instance(a1);
a2 = null;
a3 = null;
return;
}
a4 = av.entityValues[2].getInstance(0, this, a4$);
a5 = av.entityValues[2].getInstance(1, this, a5$);
a6 = av.entityValues[2].getInstance(2, this, a6$);
a7 = av.entityValues[2].getEnumeration(3, a7$);
a8 = av.entityValues[2].getEnumeration(4, a8$);
a9 = av.entityValues[3].getInstance(0, this, a9$);
a10 = av.entityValues[4].getInstance(0, this, a10$);
a0 = av.entityValues[5].getString(0);
a1 = av.entityValues[5].getInstance(1, this, a1$);
a2 = av.entityValues[5].getString(2);
a3 = av.entityValues[5].getString(3);
}
/*---------------------- getAll() --------------------*/
/* *** old implementation ***
protected void getAll(ComplexEntityValue av) throws SdaiException {
// partial entity: IfcRelationship
// partial entity: IfcRelConnects
// partial entity: IfcRelSpaceBoundary
av.entityValues[2].setInstance(0, a4);
av.entityValues[2].setInstance(1, a5);
av.entityValues[2].setInstance(2, a6);
av.entityValues[2].setEnumeration(3, a7, a7$);
av.entityValues[2].setEnumeration(4, a8, a8$);
// partial entity: IfcRelSpaceBoundary1stLevel
av.entityValues[3].setInstance(0, a9);
// partial entity: IfcRelSpaceBoundary2ndLevel
av.entityValues[4].setInstance(0, a10);
// partial entity: IfcRoot
av.entityValues[5].setString(0, a0);
av.entityValues[5].setInstance(1, a1);
av.entityValues[5].setString(2, a2);
av.entityValues[5].setString(3, a3);
}
*/
protected void getAll(ComplexEntityValue av) throws SdaiException {
// partial entity: IfcRelationship
// partial entity: IfcRelConnects
// partial entity: IfcRelSpaceBoundary
av.entityValues[2].setInstance(0, a4);
av.entityValues[2].setInstance(1, a5);
av.entityValues[2].setInstance(2, a6);
av.entityValues[2].setEnumeration(3, a7, a7$);
av.entityValues[2].setEnumeration(4, a8, a8$);
// partial entity: IfcRelSpaceBoundary1stLevel
av.entityValues[3].setInstance(0, a9);
// partial entity: IfcRelSpaceBoundary2ndLevel
av.entityValues[4].setInstance(0, a10);
// partial entity: IfcRoot
av.entityValues[5].setString(0, a0);
av.entityValues[5].setInstance(1, a1);
av.entityValues[5].setString(2, a2);
av.entityValues[5].setString(3, a3);
}
}
| [
"renato.filipe.vieira@gmail.com"
] | renato.filipe.vieira@gmail.com |
e739a412dcb6e110d89179ac901f167611f21eba | 62e81d0d70bb5c85bc480eb174917c954c371269 | /android/app/src/main/java/com/aulareact/MainApplication.java | 5f44321d23ceae7f0dbc69546477f0aee00e316c | [] | no_license | mmarlonsodre1/InstaMarlon | 9c95bf96f8a7aac2c3d52ada8cd90abd9d6e8aeb | 0b1c2a3197275d75dec812cd49c804b0cbee34a9 | refs/heads/master | 2023-01-12T00:22:01.720802 | 2019-10-19T23:06:37 | 2019-10-19T23:06:37 | 216,095,745 | 2 | 0 | null | 2023-01-04T22:58:01 | 2019-10-18T19:42:19 | JavaScript | UTF-8 | Java | false | false | 1,248 | java | package com.aulareact;
import com.facebook.react.PackageList;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.reactnativenavigation.NavigationApplication;
import com.reactnativenavigation.react.NavigationReactNativeHost;
import com.reactnativenavigation.react.ReactGateway;
import java.util.List;
public class MainApplication extends NavigationApplication {
@Override
protected ReactGateway createReactGateway() {
ReactNativeHost host = new NavigationReactNativeHost(this, isDebug(), createAdditionalReactPackages()) {
@Override
protected String getJSMainModuleName() {
return "index";
}
};
return new ReactGateway(this, isDebug(), host);
}
@Override
public boolean isDebug() {
return BuildConfig.DEBUG;
}
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return packages;
}
@Override
public List<ReactPackage> createAdditionalReactPackages() {
return getPackages();
}
}
| [
"desenvolvedor.apple@radixeng.com.br"
] | desenvolvedor.apple@radixeng.com.br |
71d98f6f7c19cfb35a31bc0362c5b782d0f5375f | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--intellij-community/9d4665f1a9d40794a124547a9ecf4933d999a1e5/after/GradleRefreshProjectAction.java | 18564c077e76bf2e9076ef3e82e9259c89e83b56 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,347 | java | package org.jetbrains.plugins.gradle.action;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.externalSystem.model.task.ExternalSystemTaskType;
import com.intellij.openapi.externalSystem.util.ExternalSystemBundle;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Ref;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.gradle.settings.GradleSettings;
import com.intellij.openapi.externalSystem.service.task.ExternalSystemTaskManager;
import org.jetbrains.plugins.gradle.notification.GradleConfigNotificationManager;
import com.intellij.openapi.externalSystem.ui.ExternalProjectStructureTreeModel;
import org.jetbrains.plugins.gradle.util.GradleUtil;
/**
* Forces the 'gradle' plugin to retrieve the most up-to-date info about the
* {@link GradleSettings#getLinkedProjectPath() linked gradle project} and update all affected control if necessary
* (like project structure UI, tasks list etc).
*
* @author Denis Zhdanov
* @since 1/23/12 3:48 PM
*/
public class GradleRefreshProjectAction extends AbstractGradleLinkedProjectAction implements DumbAware, AnAction.TransparentUpdate {
private final Ref<String> myErrorMessage = new Ref<String>();
public GradleRefreshProjectAction() {
getTemplatePresentation().setText(ExternalSystemBundle.message("gradle.action.refresh.project.text"));
getTemplatePresentation().setDescription(ExternalSystemBundle.message("gradle.action.refresh.project.description"));
}
@Override
protected void doUpdate(@NotNull AnActionEvent event, @NotNull Project project, @NotNull String linkedProjectPath) {
String message = myErrorMessage.get();
if (message != null) {
ExternalProjectStructureTreeModel model = GradleUtil.getProjectStructureTreeModel(event.getDataContext());
if (model != null) {
model.rebuild();
}
GradleConfigNotificationManager notificationManager = ServiceManager.getService(project, GradleConfigNotificationManager.class);
notificationManager.processRefreshError(message);
myErrorMessage.set(null);
}
boolean enabled = false;
final ExternalSystemTaskManager taskManager = ServiceManager.getService(project, ExternalSystemTaskManager.class);
if (taskManager != null) {
enabled = !taskManager.hasTaskOfTypeInProgress(ExternalSystemTaskType.RESOLVE_PROJECT);
}
event.getPresentation().setEnabled(enabled);
}
@Override
protected void doActionPerformed(@NotNull AnActionEvent event, @NotNull final Project project, @NotNull final String linkedProjectPath) {
// We save all documents because there is more than one target 'build.gradle' file in case of multi-module gradle project.
FileDocumentManager.getInstance().saveAllDocuments();
GradleConfigNotificationManager notificationManager = ServiceManager.getService(project, GradleConfigNotificationManager.class);
if (!GradleUtil.isGradleAvailable(project)) {
notificationManager.processUnknownGradleHome();
return;
}
myErrorMessage.set(null);
GradleUtil.refreshProject(project, myErrorMessage);
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
5aafd8df36e7fc0ce2bf9eeb95074afd9ec2e85f | 3a59bd4f3c7841a60444bb5af6c859dd2fe7b355 | /sources/p033rx/functions/Action2.java | 4137fed8e9c883e4a4fccd54933f7b7024fd7835 | [] | no_license | sengeiou/KnowAndGo-android-thunkable | 65ac6882af9b52aac4f5a4999e095eaae4da3c7f | 39e809d0bbbe9a743253bed99b8209679ad449c9 | refs/heads/master | 2023-01-01T02:20:01.680570 | 2020-10-22T04:35:27 | 2020-10-22T04:35:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 149 | java | package p033rx.functions;
/* renamed from: rx.functions.Action2 */
public interface Action2<T1, T2> extends Action {
void call(T1 t1, T2 t2);
}
| [
"joshuahj.tsao@gmail.com"
] | joshuahj.tsao@gmail.com |
3773344dd71412a974b688ddd8639e26a7eab55a | 43b22fa9d44ee47917025238c413735ee752bcad | /src/main/java/com/ing/product/repo/CustomerRepository.java | f7a6698b2284519a017ddbe60214f950f9c67f27 | [] | no_license | manimalar88/savings-product | 91906e789c1918b189ddd9968229cf373d932bc3 | 5f691b8cdc45470353c1dcb0fddade24f981f3bd | refs/heads/master | 2020-03-11T14:15:22.060864 | 2018-04-24T14:09:06 | 2018-04-24T14:09:06 | 130,048,379 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 273 | java | package com.ing.product.repo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.ing.product.model.Customer;
@Repository
public interface CustomerRepository extends JpaRepository<Customer, Long>{
} | [
"send2gopi@gmail.com"
] | send2gopi@gmail.com |
40c55f06165964e1957685e70287ad67e1b132c9 | db88bc16e1319a321493346f25712ab388f3ad24 | /java01/src/step10/Exam063_1.java | 7d420745b3898cf22764f9dae4c60c386294f345 | [] | no_license | hanokjoo/java89_old | efd1b7a7d6a0c51dfb56b120fdf229e9dff64a50 | bfa88120aeaae850d0ff19d07a39ca1b69fc46c0 | refs/heads/master | 2021-06-08T00:39:25.196228 | 2016-11-08T10:39:26 | 2016-11-08T10:39:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 841 | java | package step10;
import java.util.Scanner;
//클래스 당 클래스 파일 하나가 만들어진다.
public class Exam063_1 {
//inner class, Exam063_0$MyType.class 생성됨
static class MyType {
static int a;
int b;
}
public static void main(String[] args) {
//스태틱 변수 사용
MyType.a = 100;
System.out.println(MyType.a);
MyType obj1 = new MyType();
MyType obj2 = new MyType();
obj1.b = 200;
obj2.b = 300;
System.out.printf("MyType.a=%d, obj1.b=%d, obj2.b=%d\n",
MyType.a, obj1.b, obj2.b);
obj2.a = 600;
System.out.printf("MyType.a=%d, obj1.b=%d, obj2.b=%d\n",
MyType.a, obj1.b, obj2.b);
obj2.a = 600;
System.out.printf("MyType.a=%d, obj1.b=%d, obj2.b=%d\n",
MyType.a, obj1.b, obj2.b);
}
}
| [
"okjoo.han88@gmail.com"
] | okjoo.han88@gmail.com |
e28baee20318f6e596f0c18ecf18002e611529f9 | 0c1ef9e9816ccf0bc88add83423cc4ce42a257a5 | /Daily Coding Problem/337.java | 5c8b3c3a386c8bf028af281d5444b2ce7efd36d1 | [] | no_license | hyzzd/leetcode-solutions | c32123e87bedb22211b8d054fdf1c70630dd2945 | e4a49ff174cdb895c08620e9f179b327d4d2794b | refs/heads/master | 2020-03-16T06:45:02.454917 | 2019-08-31T15:33:53 | 2019-08-31T15:33:53 | 132,562,044 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,096 | java | // from random import shuffle
// class Node:
// def __init__(self, x):
// self.val = x
// self.next = None
// def __str__(self):
// string = "["
// node = self
// while node:
// string += "{} ->".format(node.val)
// node = node.next
// string += "None]"
// return string
// def get_nodes(values):
// next_node = None
// for value in values[::-1]:
// node = Node(value)
// node.next = next_node
// next_node = node
// return next_node
// def get_list(head):
// node = head
// nodes = list()
// while node:
// nodes.append(node.val)
// node = node.next
// return nodes
// def unishuffle(llist):
// length = 0
// node = ll
// node_list = list()
// while node:
// node_list.append(node)
// node = node.next
// length += 1
// shuffle(node_list)
// dummy = Node(None)
// for node in node_list:
// node.next = dummy.next
// dummy.next = node
// return dummy.next | [
"zhaoxiaohu920922@gmail.com"
] | zhaoxiaohu920922@gmail.com |
ba29bc8ee6aba98c683fe004ff3b79a7d0457794 | 6db764ec110c66084f7c06a3c9f3acb781dc184a | /algorithmeJava/src/algorithmeJava/dynamicProgramming1/Q1904.java | 894cefdfa6cc43021919831ff6fb4058031e88a0 | [] | no_license | wonjaechoi2012/algorithmJava | 07a0d35234d5433a65e14c7363f5e0c0c12c0ecc | dea030db83d8551db33b2815b8ebb6e1e639a1fa | refs/heads/master | 2020-07-31T21:08:52.194530 | 2019-10-17T15:17:16 | 2019-10-17T15:17:16 | 210,754,754 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 677 | java | package algorithmeJava.dynamicProgramming1;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Q1904 {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
int num = Integer.parseInt(br.readLine());
if(num==0)
System.out.println(0);
else {
long[] fib = new long[num+1];
fib[1]=1; fib[2]=2;
for(int i=3;i<fib.length;i++) {
fib[i]=fib[i-1]+fib[i-2];
fib[i]=fib[i]%15746;
}
System.out.println(fib[num]);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
| [
"wonjae@DESKTOP-P3LF4OH"
] | wonjae@DESKTOP-P3LF4OH |
38be48be326ca8d5dde828a2d90cd125ee0e4f52 | 9d8def6fc55e4e96f19b84e4a9793fc8f59de752 | /src/main/java/pl/crudApp/service/CustomerServiceImpl.java | 2cb5854a42ab1dd064252d4211b8a2b79a757bd6 | [] | no_license | Rafsters/SpringMVCHibernateCRUDApp | be6379558361498fc934c7ccd18d1fa61f0b1f58 | ea008910ffc9a75e5fbf54a53b06fb0124ac5e23 | refs/heads/master | 2020-03-17T04:07:55.983750 | 2018-05-13T18:30:17 | 2018-05-13T18:30:17 | 133,263,764 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,062 | java | package pl.crudApp.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pl.crudApp.dao.CustomerDAO;
import pl.crudApp.entity.Customer;
import java.util.List;
@Service
public class CustomerServiceImpl implements CustomerService {
// Need to inject customer DAO
@Autowired
private CustomerDAO customerDAO;
@Transactional
public List<Customer> getCustomers() {
return customerDAO.getCustomers();
}
@Transactional
public void saveCustomer(Customer customer) {
customerDAO.saveCustomer(customer);
}
@Transactional
public Customer getCustomer(int id) {
return customerDAO.getCustomer(id);
}
@Transactional
public void deleteCustomer(int id) {
customerDAO.deleteCustomer(id);
}
@Transactional
public List<Customer> searchCustomers(String theSearchName) {
return customerDAO.searchCustomers(theSearchName);
}
}
| [
"kwiecienraf@gmail.com"
] | kwiecienraf@gmail.com |
30e57d0d9d2f59566487d32c75f0258b08e7af6a | a639a28443e2f8cbf462a763fd908a996596b081 | /Q-ide/src/main/java/com/pqixing/intellij/utils/UiUtils.java | 102ff7d98073c933b84bb180453ef685ddcc14cc | [] | no_license | morristech/modularization | 5d187b852d1f3f2fac1367c96c8c0fcc6ec6b7d8 | 2c0e2519763fed8fcfd19b2cbfdaa5806c52e671 | refs/heads/master | 2020-05-19T17:34:56.248386 | 2019-04-28T09:42:40 | 2019-04-28T09:42:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,411 | java | package com.pqixing.intellij.utils;
import com.android.ddmlib.IDevice;
import com.android.tools.idea.explorer.adbimpl.AdbShellCommandsUtil;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.util.List;
import javax.swing.JDialog;
public class UiUtils {
public static final String IDE_PROPERTIES = ".idea/modularization.properties";
// public static void centerDialog(JDialog dialog) {
//// Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); //获取屏幕的尺寸
//// dialog.setLocation((screenSize.width-450)/2, (screenSize.height-350)/2);//设置窗口居中显示
// new Thread(new Runnable() {
// @Override
// public void run() {
// try {
// Thread.sleep(100);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// dialog.setLocationRelativeTo(null);
// }
// }).start();
// }
public static String adbShellCommon(IDevice device, String cmd,boolean firstLine){
try {
List<String> output = AdbShellCommandsUtil.executeCommand(device, cmd).getOutput();
if(firstLine||output.size()==1) return output.get(0);
return output.toString();
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}
| [
"pqixing@163.com"
] | pqixing@163.com |
4ff625800c32b17e8d9539456d05595e250ad9fb | 5c33f90d3b6a8671c01dc57c82cb47a159f7e93c | /agrona/src/main/java/org/agrona/concurrent/broadcast/package-info.java | f75b6ece06ce6858d0757aa28bf81f2bc51328fe | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | LCB14/agrona | fa3683fd080443de1cae5fd42b312936090255aa | c2addf930738e7d0bd934dbe7f4a7d1692053cc1 | refs/heads/master | 2020-06-25T08:33:00.152408 | 2019-07-27T09:28:50 | 2019-07-27T09:28:50 | 199,260,018 | 1 | 0 | Apache-2.0 | 2019-07-28T08:07:13 | 2019-07-28T08:07:13 | null | UTF-8 | Java | false | false | 747 | java | /*
* Copyright 2014-2019 Real Logic Ltd.
*
* 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
*
* https://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.
*/
/**
* Data structure for broadcasting messages from one source to many receivers via shared memory.
*/
package org.agrona.concurrent.broadcast; | [
"mjpt777@gmail.com"
] | mjpt777@gmail.com |
04423d16f5d78e1cd6cea1ac034eec09423b4e85 | e27a7c4eb60cad540a00a188cdcd8c251027b95e | /src/com/cn/base/annotation/AnnotationsDemo.java | de072a26207f96408644922d0b917b1c2e6f5780 | [] | no_license | 15566263905/java8 | b367635cd737fb8e4a200b4080590ed75ade6592 | ab10d229def94f6fd11f24892de7a9146594dd50 | refs/heads/master | 2020-05-28T01:05:16.993933 | 2019-08-23T03:51:33 | 2019-08-23T03:51:33 | 188,838,706 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 879 | java | package cn.base.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.ArrayList;
import java.util.Collection;
public class AnnotationsDemo {
@Retention( RetentionPolicy.RUNTIME )
@Target({ ElementType.TYPE_USE, ElementType.TYPE_PARAMETER })
public @interface NonEmpty {
}
public static class Holder<@NonEmpty T> extends @NonEmpty Object {
public void method() throws @NonEmpty Exception {
}
}
@SuppressWarnings("unused")
public static void main(String[] args) {
final Holder<String> holder = new @NonEmpty Holder<>();
@NonEmpty Collection<@NonEmpty String> strings = new ArrayList<>();
System.out.println(holder);
System.out.println(strings);
}
}
| [
"15566263905@163.com"
] | 15566263905@163.com |
3d8d38033e542e69d6088daf4962c5023252cffe | bb742cd91bc7e7443184e0d32eb0cd105a2efde2 | /web/src/main/java/com/dev/model/Carrera.java | 17cb3cf3dd566c806a7f043d9d855c96b74d01c5 | [] | no_license | ggosparo/tecso | 0283ee58e47efa57034a1ee6ee6fbc7ab02af6a2 | 249b5e1902604102255cb949dd09e315bf8d1f07 | refs/heads/master | 2020-04-29T13:35:47.527857 | 2019-03-17T23:33:58 | 2019-03-17T23:33:58 | 176,172,895 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,954 | java | package com.dev.model;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
* Mapea los datos de la carrera.
*/
@Entity
public class Carrera implements Serializable {
private static final long serialVersionUID = 3L;
/**
* Almacena el valor del identificador.
*/
@Id
private int identificador;
/**
* Alamcena el nombre de la carrera.
*/
private String nombre;
/**
* Almacena la descripcion de la carrera.
*/
private String descripcion;
/**
* Almacena la fecha de inicio de la carrera.
*/
private Date fechadesde;
/**
* Almacena la fecha de finalizacion o cierre de la carrera.
*/
private Date fechahasta;
/**
* @return Retorna el identificador que esta almacenado en la propiedad <code>identificador</code>.
*/
public int getIdentificador() {
return identificador;
}
/**
* @param identificador Contiene el numero de identificador a setear en la propiedad <code>identificador</code>.
* @return Retorna el objeto <code>{@link Carrera}</code>.
*/
public Carrera setIdentificador(int identificador) {
this.identificador = identificador;
return this;
}
/**
* @return Retorna el nombre que esta almacenado en la propiedad <code>nombre</code>.
*/
public String getNombre() {
return nombre;
}
/**
* @param nombre Contiene el nombre la carrera a setear en la propiedad <code>nombre</code>.
* @return Retorna el objeto <code>{@link Carrera}</code>.
*/
public Carrera setNombre(String nombre) {
this.nombre = nombre;
return this;
}
/**
* @return Retorna la descripcion de la carrera que esta almacenado en la propiedad <code>descripcion</code>.
*/
public String getDescripcion() {
return descripcion;
}
/**
* @param descripcion Contiene la descripcion de la carrera a setear en la propiedad <code>descripcion</code>.
* @return Retorna el objeto <code>{@link Carrera}</code>.
*/
public Carrera setDescripcion(String descripcion) {
this.descripcion = descripcion;
return this;
}
/**
* @return Retorna la fecha de inicio de la carrera que esta almacenado en la propiedad <code>fechadesde</code>.
*/
public Date getFechadesde() {
return fechadesde;
}
/**
* @param fechadesde Contiene la fecha de inicio de la carrera a setear en la propiedad <code>fechadesde</code>.
* @return Retorna el objeto <code>{@link Carrera}</code>.
*/
public Carrera setFechadesde(Date fechadesde) {
this.fechadesde = fechadesde;
return this;
}
/**
* @return Retorna la fecha de fin o cierre de la carrera que esta almacenado en la propiedad <code>fechahasta</code>.
*/
public Date getFechahasta() {
return fechahasta;
}
/**
* @param fechahasta Contiene la fecha de fin o cierre de la carrera a setear en la propiedad <code>fechahasta</code>.
* @return Retorna el objeto <code>{@link Carrera}</code>.
*/
public Carrera setFechahasta(Date fechahasta) {
this.fechahasta = fechahasta;
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Carrera carrera = (Carrera) o;
return identificador == carrera.identificador;
}
@Override
public int hashCode() {
return identificador;
}
@Override
public String toString() {
return "Carrera{" +
"identificador=" + identificador +
", nombre='" + nombre + '\'' +
", descripcion='" + descripcion + '\'' +
", fechadesde=" + fechadesde +
", fechahasta=" + fechahasta +
'}';
}
}
| [
"gosparo@yahoo.com.ar"
] | gosparo@yahoo.com.ar |
3b884c64f9f4e0ccb49666e91c63e93d585d9756 | bfd7dcbb7dfd9b49a06ba6dd75776c87e5344613 | /src/lesson28/Capability.java | 048681e13e1bce99269ea90eb770fa5884fae2f9 | [] | no_license | SergioTalko/java-core-grom | ca7b0dcee1ab24daf287e0ee60b2880a2d854908 | ca03abd7e3e55dd1a4a19a108fbf08cf2911367c | refs/heads/master | 2021-09-04T19:14:56.865861 | 2018-01-21T16:02:41 | 2018-01-21T16:02:41 | 91,696,151 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,839 | java | package lesson28;
import java.util.Date;
public class Capability implements Comparable<Capability> {
//id: 1001, 1005, 900
//id: 900, 1001, 1005
private long id;
private String channelName;
private String fingerPrint;
private boolean isActive;
private Date dateCreated;
public Capability(long id, String channelName, String fingerPrint, boolean isActive, Date dateCreated) {
this.id = id;
this.channelName = channelName;
this.fingerPrint = fingerPrint;
this.isActive = isActive;
this.dateCreated = dateCreated;
}
public long getId() {
return id;
}
public String getChannelName() {
return channelName;
}
public String getFingerPrint() {
return fingerPrint;
}
public boolean isActive() {
return isActive;
}
public Date getDateCreated() {
return dateCreated;
}
public void setDateCreated(Date dateCreated) {
this.dateCreated = dateCreated;
}
// -1 OR 0 OR 1
// true OR false
@Override
public int compareTo(Capability capability) {
return (int) (this.id - capability.getId());
//before: 1001, 1005, 900
//step 1: 1001 - 1005 = -4
//after: 1001, 1005, 900
//before: 1001, 1005, 900
//step 2: 1005 - 900 = 105
//after: 1001, 900, 1005
//before: 1001, 900, 900
//step 3: 1001 - 900 = 101
//after: 900, 1001, 1005
}
@Override
public String toString() {
return "Capability{" +
"id=" + id +
", channelName='" + channelName + '\'' +
", fingerPrint='" + fingerPrint + '\'' +
", isActive=" + isActive +
", dateCreated=" + dateCreated +
'}';
}
}
| [
"sergio.talko@gmail.com"
] | sergio.talko@gmail.com |
3f44087085b9f7c89ce7c067677ddcba4f37adec | 0c50c4bb815d277369a41b010f5c50a17bbd1373 | /Board/app/src/main/java/de/cisha/chess/R.java | 00ede2717ebd0e338c632ca2292cf34d59a0f2ae | [] | no_license | korkies22/ReporteMoviles | 645b830b018c1eabbd5b6c9b1ab281ea65ff4045 | e708d4aa313477b644b0485c14682611d6086229 | refs/heads/master | 2022-03-04T14:18:12.406700 | 2022-02-17T03:11:01 | 2022-02-17T03:11:01 | 157,728,106 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 116,324 | java | //
// Decompiled by Procyon v0.5.30
//
package de.cisha.chess;
public final class R
{
public static final class anim
{
public static final int abc_fade_in = 2130771968;
public static final int abc_fade_out = 2130771969;
public static final int abc_grow_fade_in_from_bottom = 2130771970;
public static final int abc_popup_enter = 2130771971;
public static final int abc_popup_exit = 2130771972;
public static final int abc_shrink_fade_out_from_bottom = 2130771973;
public static final int abc_slide_in_bottom = 2130771974;
public static final int abc_slide_in_top = 2130771975;
public static final int abc_slide_out_bottom = 2130771976;
public static final int abc_slide_out_top = 2130771977;
public static final int abc_tooltip_enter = 2130771978;
public static final int abc_tooltip_exit = 2130771979;
}
public static final class attr
{
public static final int actionBarDivider = 2130968577;
public static final int actionBarItemBackground = 2130968578;
public static final int actionBarPopupTheme = 2130968579;
public static final int actionBarSize = 2130968580;
public static final int actionBarSplitStyle = 2130968581;
public static final int actionBarStyle = 2130968582;
public static final int actionBarTabBarStyle = 2130968583;
public static final int actionBarTabStyle = 2130968584;
public static final int actionBarTabTextStyle = 2130968585;
public static final int actionBarTheme = 2130968586;
public static final int actionBarWidgetTheme = 2130968587;
public static final int actionButtonStyle = 2130968588;
public static final int actionDropDownStyle = 2130968589;
public static final int actionLayout = 2130968590;
public static final int actionMenuTextAppearance = 2130968591;
public static final int actionMenuTextColor = 2130968592;
public static final int actionModeBackground = 2130968593;
public static final int actionModeCloseButtonStyle = 2130968594;
public static final int actionModeCloseDrawable = 2130968595;
public static final int actionModeCopyDrawable = 2130968596;
public static final int actionModeCutDrawable = 2130968597;
public static final int actionModeFindDrawable = 2130968598;
public static final int actionModePasteDrawable = 2130968599;
public static final int actionModePopupWindowStyle = 2130968600;
public static final int actionModeSelectAllDrawable = 2130968601;
public static final int actionModeShareDrawable = 2130968602;
public static final int actionModeSplitBackground = 2130968603;
public static final int actionModeStyle = 2130968604;
public static final int actionModeWebSearchDrawable = 2130968605;
public static final int actionOverflowButtonStyle = 2130968606;
public static final int actionOverflowMenuStyle = 2130968607;
public static final int actionProviderClass = 2130968608;
public static final int actionViewClass = 2130968609;
public static final int activityChooserViewStyle = 2130968610;
public static final int alertDialogButtonGroupStyle = 2130968611;
public static final int alertDialogCenterButtons = 2130968612;
public static final int alertDialogStyle = 2130968613;
public static final int alertDialogTheme = 2130968614;
public static final int allowStacking = 2130968615;
public static final int alpha = 2130968616;
public static final int alphabeticModifiers = 2130968617;
public static final int arrowHeadLength = 2130968618;
public static final int arrowShaftLength = 2130968620;
public static final int autoCompleteTextViewStyle = 2130968622;
public static final int autoSizeMaxTextSize = 2130968623;
public static final int autoSizeMinTextSize = 2130968624;
public static final int autoSizePresetSizes = 2130968625;
public static final int autoSizeStepGranularity = 2130968626;
public static final int autoSizeTextType = 2130968627;
public static final int background = 2130968628;
public static final int backgroundSplit = 2130968629;
public static final int backgroundStacked = 2130968630;
public static final int backgroundTint = 2130968631;
public static final int backgroundTintMode = 2130968632;
public static final int barLength = 2130968633;
public static final int borderlessButtonStyle = 2130968645;
public static final int buttonBarButtonStyle = 2130968648;
public static final int buttonBarNegativeButtonStyle = 2130968649;
public static final int buttonBarNeutralButtonStyle = 2130968650;
public static final int buttonBarPositiveButtonStyle = 2130968651;
public static final int buttonBarStyle = 2130968652;
public static final int buttonGravity = 2130968653;
public static final int buttonIconDimen = 2130968654;
public static final int buttonPanelSideLayout = 2130968655;
public static final int buttonStyle = 2130968657;
public static final int buttonStyleSmall = 2130968658;
public static final int buttonTint = 2130968659;
public static final int buttonTintMode = 2130968660;
public static final int checkboxStyle = 2130968669;
public static final int checkedTextViewStyle = 2130968670;
public static final int closeIcon = 2130968673;
public static final int closeItemLayout = 2130968674;
public static final int collapseContentDescription = 2130968675;
public static final int collapseIcon = 2130968676;
public static final int color = 2130968679;
public static final int colorAccent = 2130968680;
public static final int colorBackgroundFloating = 2130968681;
public static final int colorButtonNormal = 2130968682;
public static final int colorControlActivated = 2130968683;
public static final int colorControlHighlight = 2130968684;
public static final int colorControlNormal = 2130968685;
public static final int colorError = 2130968686;
public static final int colorPrimary = 2130968687;
public static final int colorPrimaryDark = 2130968688;
public static final int colorSwitchThumbNormal = 2130968690;
public static final int commitIcon = 2130968703;
public static final int contentDescription = 2130968704;
public static final int contentInsetEnd = 2130968705;
public static final int contentInsetEndWithActions = 2130968706;
public static final int contentInsetLeft = 2130968707;
public static final int contentInsetRight = 2130968708;
public static final int contentInsetStart = 2130968709;
public static final int contentInsetStartWithNavigation = 2130968710;
public static final int controlBackground = 2130968717;
public static final int coordinatorLayoutStyle = 2130968718;
public static final int customNavigationLayout = 2130968724;
public static final int defaultQueryHint = 2130968725;
public static final int dialogPreferredPadding = 2130968726;
public static final int dialogTheme = 2130968727;
public static final int displayOptions = 2130968729;
public static final int divider = 2130968730;
public static final int dividerHorizontal = 2130968731;
public static final int dividerPadding = 2130968732;
public static final int dividerVertical = 2130968733;
public static final int drawableSize = 2130968734;
public static final int drawerArrowStyle = 2130968735;
public static final int dropDownListViewStyle = 2130968736;
public static final int dropdownListPreferredItemHeight = 2130968737;
public static final int editTextBackground = 2130968738;
public static final int editTextColor = 2130968739;
public static final int editTextStyle = 2130968740;
public static final int elevation = 2130968741;
public static final int expandActivityOverflowButtonDrawable = 2130968744;
public static final int font = 2130968764;
public static final int fontFamily = 2130968765;
public static final int fontProviderAuthority = 2130968766;
public static final int fontProviderCerts = 2130968767;
public static final int fontProviderFetchStrategy = 2130968768;
public static final int fontProviderFetchTimeout = 2130968769;
public static final int fontProviderPackage = 2130968770;
public static final int fontProviderQuery = 2130968771;
public static final int fontStyle = 2130968772;
public static final int fontWeight = 2130968773;
public static final int gapBetweenBars = 2130968781;
public static final int goIcon = 2130968783;
public static final int height = 2130968786;
public static final int hideOnContentScroll = 2130968787;
public static final int homeAsUpIndicator = 2130968792;
public static final int homeLayout = 2130968793;
public static final int icon = 2130968794;
public static final int iconTint = 2130968795;
public static final int iconTintMode = 2130968796;
public static final int iconifiedByDefault = 2130968800;
public static final int imageButtonStyle = 2130968803;
public static final int indeterminateProgressStyle = 2130968804;
public static final int initialActivityCount = 2130968805;
public static final int isLightTheme = 2130968807;
public static final int itemPadding = 2130968810;
public static final int keylines = 2130968813;
public static final int layout = 2130968814;
public static final int layout_anchor = 2130968816;
public static final int layout_anchorGravity = 2130968817;
public static final int layout_behavior = 2130968818;
public static final int layout_dodgeInsetEdges = 2130968821;
public static final int layout_insetEdge = 2130968822;
public static final int layout_keyline = 2130968823;
public static final int listChoiceBackgroundIndicator = 2130968830;
public static final int listDividerAlertDialog = 2130968831;
public static final int listItemLayout = 2130968832;
public static final int listLayout = 2130968833;
public static final int listMenuViewStyle = 2130968834;
public static final int listPopupWindowStyle = 2130968835;
public static final int listPreferredItemHeight = 2130968836;
public static final int listPreferredItemHeightLarge = 2130968837;
public static final int listPreferredItemHeightSmall = 2130968838;
public static final int listPreferredItemPaddingLeft = 2130968839;
public static final int listPreferredItemPaddingRight = 2130968840;
public static final int logo = 2130968841;
public static final int logoDescription = 2130968842;
public static final int maxButtonHeight = 2130968846;
public static final int measureWithLargestChild = 2130968847;
public static final int multiChoiceItemLayout = 2130968849;
public static final int navigationContentDescription = 2130968850;
public static final int navigationIcon = 2130968851;
public static final int navigationMode = 2130968852;
public static final int numericModifiers = 2130968853;
public static final int overlapAnchor = 2130968854;
public static final int paddingBottomNoButtons = 2130968855;
public static final int paddingEnd = 2130968856;
public static final int paddingStart = 2130968857;
public static final int paddingTopNoTitle = 2130968858;
public static final int panelBackground = 2130968860;
public static final int panelMenuListTheme = 2130968861;
public static final int panelMenuListWidth = 2130968862;
public static final int popupMenuStyle = 2130968868;
public static final int popupTheme = 2130968870;
public static final int popupWindowStyle = 2130968871;
public static final int preserveIconSpacing = 2130968872;
public static final int progressBarPadding = 2130968874;
public static final int progressBarStyle = 2130968875;
public static final int queryBackground = 2130968876;
public static final int queryHint = 2130968877;
public static final int radioButtonStyle = 2130968878;
public static final int ratingBarStyle = 2130968880;
public static final int ratingBarStyleIndicator = 2130968881;
public static final int ratingBarStyleSmall = 2130968882;
public static final int searchHintIcon = 2130968889;
public static final int searchIcon = 2130968890;
public static final int searchViewStyle = 2130968891;
public static final int seekBarStyle = 2130968892;
public static final int selectableItemBackground = 2130968894;
public static final int selectableItemBackgroundBorderless = 2130968895;
public static final int showAsAction = 2130968899;
public static final int showDividers = 2130968900;
public static final int showText = 2130968902;
public static final int showTitle = 2130968903;
public static final int singleChoiceItemLayout = 2130968904;
public static final int spinBars = 2130968907;
public static final int spinnerDropDownItemStyle = 2130968908;
public static final int spinnerStyle = 2130968909;
public static final int splitTrack = 2130968910;
public static final int srcCompat = 2130968911;
public static final int state_above_anchor = 2130968913;
public static final int statusBarBackground = 2130968916;
public static final int subMenuArrow = 2130968920;
public static final int submitBackground = 2130968921;
public static final int subtitle = 2130968922;
public static final int subtitleTextAppearance = 2130968923;
public static final int subtitleTextColor = 2130968924;
public static final int subtitleTextStyle = 2130968925;
public static final int suggestionRowLayout = 2130968926;
public static final int switchMinWidth = 2130968927;
public static final int switchPadding = 2130968928;
public static final int switchStyle = 2130968929;
public static final int switchTextAppearance = 2130968930;
public static final int textAllCaps = 2130968948;
public static final int textAppearanceLargePopupMenu = 2130968949;
public static final int textAppearanceListItem = 2130968950;
public static final int textAppearanceListItemSecondary = 2130968951;
public static final int textAppearanceListItemSmall = 2130968952;
public static final int textAppearancePopupMenuHeader = 2130968953;
public static final int textAppearanceSearchResultSubtitle = 2130968954;
public static final int textAppearanceSearchResultTitle = 2130968955;
public static final int textAppearanceSmallPopupMenu = 2130968956;
public static final int textColorAlertDialogListItem = 2130968957;
public static final int textColorSearchUrl = 2130968959;
public static final int theme = 2130968962;
public static final int thickness = 2130968963;
public static final int thumbTextPadding = 2130968964;
public static final int thumbTint = 2130968965;
public static final int thumbTintMode = 2130968966;
public static final int tickMark = 2130968967;
public static final int tickMarkTint = 2130968968;
public static final int tickMarkTintMode = 2130968969;
public static final int tint = 2130968970;
public static final int tintMode = 2130968971;
public static final int title = 2130968972;
public static final int titleMargin = 2130968974;
public static final int titleMarginBottom = 2130968975;
public static final int titleMarginEnd = 2130968976;
public static final int titleMarginStart = 2130968977;
public static final int titleMarginTop = 2130968978;
public static final int titleMargins = 2130968979;
public static final int titleTextAppearance = 2130968981;
public static final int titleTextColor = 2130968982;
public static final int titleTextStyle = 2130968983;
public static final int toolbarNavigationButtonStyle = 2130968985;
public static final int toolbarStyle = 2130968986;
public static final int tooltipForegroundColor = 2130968987;
public static final int tooltipFrameBackground = 2130968988;
public static final int tooltipText = 2130968989;
public static final int track = 2130968991;
public static final int trackTint = 2130968992;
public static final int trackTintMode = 2130968993;
public static final int viewInflaterClass = 2130968997;
public static final int voiceIcon = 2130968998;
public static final int windowActionBar = 2130969005;
public static final int windowActionBarOverlay = 2130969006;
public static final int windowActionModeOverlay = 2130969007;
public static final int windowFixedHeightMajor = 2130969008;
public static final int windowFixedHeightMinor = 2130969009;
public static final int windowFixedWidthMajor = 2130969010;
public static final int windowFixedWidthMinor = 2130969011;
public static final int windowMinWidthMajor = 2130969012;
public static final int windowMinWidthMinor = 2130969013;
public static final int windowNoTitle = 2130969014;
}
public static final class bool
{
public static final int abc_action_bar_embed_tabs = 2131034112;
public static final int abc_allow_stacked_button_bar = 2131034113;
public static final int abc_config_actionMenuItemAllCaps = 2131034114;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 2131034115;
}
public static final class color
{
public static final int abc_background_cache_hint_selector_material_dark = 2131099648;
public static final int abc_background_cache_hint_selector_material_light = 2131099649;
public static final int abc_btn_colored_borderless_text_material = 2131099650;
public static final int abc_btn_colored_text_material = 2131099651;
public static final int abc_color_highlight_material = 2131099652;
public static final int abc_hint_foreground_material_dark = 2131099653;
public static final int abc_hint_foreground_material_light = 2131099654;
public static final int abc_input_method_navigation_guard = 2131099655;
public static final int abc_primary_text_disable_only_material_dark = 2131099656;
public static final int abc_primary_text_disable_only_material_light = 2131099657;
public static final int abc_primary_text_material_dark = 2131099658;
public static final int abc_primary_text_material_light = 2131099659;
public static final int abc_search_url_text = 2131099660;
public static final int abc_search_url_text_normal = 2131099661;
public static final int abc_search_url_text_pressed = 2131099662;
public static final int abc_search_url_text_selected = 2131099663;
public static final int abc_secondary_text_material_dark = 2131099664;
public static final int abc_secondary_text_material_light = 2131099665;
public static final int abc_tint_btn_checkable = 2131099666;
public static final int abc_tint_default = 2131099667;
public static final int abc_tint_edittext = 2131099668;
public static final int abc_tint_seek_thumb = 2131099669;
public static final int abc_tint_spinner = 2131099670;
public static final int abc_tint_switch_track = 2131099671;
public static final int accent_material_dark = 2131099672;
public static final int accent_material_light = 2131099673;
public static final int background_floating_material_dark = 2131099678;
public static final int background_floating_material_light = 2131099679;
public static final int background_material_dark = 2131099680;
public static final int background_material_light = 2131099681;
public static final int bright_foreground_disabled_material_dark = 2131099683;
public static final int bright_foreground_disabled_material_light = 2131099684;
public static final int bright_foreground_inverse_material_dark = 2131099685;
public static final int bright_foreground_inverse_material_light = 2131099686;
public static final int bright_foreground_material_dark = 2131099687;
public static final int bright_foreground_material_light = 2131099688;
public static final int button_material_dark = 2131099695;
public static final int button_material_light = 2131099696;
public static final int dim_foreground_disabled_material_dark = 2131099772;
public static final int dim_foreground_disabled_material_light = 2131099773;
public static final int dim_foreground_material_dark = 2131099774;
public static final int dim_foreground_material_light = 2131099775;
public static final int error_color_material = 2131099776;
public static final int foreground_material_dark = 2131099777;
public static final int foreground_material_light = 2131099778;
public static final int highlighted_text_material_dark = 2131099779;
public static final int highlighted_text_material_light = 2131099780;
public static final int material_blue_grey_800 = 2131099781;
public static final int material_blue_grey_900 = 2131099782;
public static final int material_blue_grey_950 = 2131099783;
public static final int material_deep_teal_200 = 2131099784;
public static final int material_deep_teal_500 = 2131099785;
public static final int material_grey_100 = 2131099786;
public static final int material_grey_300 = 2131099787;
public static final int material_grey_50 = 2131099788;
public static final int material_grey_600 = 2131099789;
public static final int material_grey_800 = 2131099790;
public static final int material_grey_850 = 2131099791;
public static final int material_grey_900 = 2131099792;
public static final int notification_action_color_filter = 2131099798;
public static final int notification_icon_bg_color = 2131099799;
public static final int primary_dark_material_dark = 2131099814;
public static final int primary_dark_material_light = 2131099815;
public static final int primary_material_dark = 2131099816;
public static final int primary_material_light = 2131099817;
public static final int primary_text_default_material_dark = 2131099818;
public static final int primary_text_default_material_light = 2131099819;
public static final int primary_text_disabled_material_dark = 2131099820;
public static final int primary_text_disabled_material_light = 2131099821;
public static final int ripple_material_dark = 2131099828;
public static final int ripple_material_light = 2131099829;
public static final int secondary_text_default_material_dark = 2131099830;
public static final int secondary_text_default_material_light = 2131099831;
public static final int secondary_text_disabled_material_dark = 2131099832;
public static final int secondary_text_disabled_material_light = 2131099833;
public static final int switch_thumb_disabled_material_dark = 2131099839;
public static final int switch_thumb_disabled_material_light = 2131099840;
public static final int switch_thumb_material_dark = 2131099841;
public static final int switch_thumb_material_light = 2131099842;
public static final int switch_thumb_normal_material_dark = 2131099843;
public static final int switch_thumb_normal_material_light = 2131099844;
public static final int tooltip_background_dark = 2131099849;
public static final int tooltip_background_light = 2131099850;
}
public static final class dimen
{
public static final int abc_action_bar_content_inset_material = 2131165184;
public static final int abc_action_bar_content_inset_with_nav = 2131165185;
public static final int abc_action_bar_default_height_material = 2131165186;
public static final int abc_action_bar_default_padding_end_material = 2131165187;
public static final int abc_action_bar_default_padding_start_material = 2131165188;
public static final int abc_action_bar_elevation_material = 2131165189;
public static final int abc_action_bar_icon_vertical_padding_material = 2131165190;
public static final int abc_action_bar_overflow_padding_end_material = 2131165191;
public static final int abc_action_bar_overflow_padding_start_material = 2131165192;
public static final int abc_action_bar_progress_bar_size = 2131165193;
public static final int abc_action_bar_stacked_max_height = 2131165194;
public static final int abc_action_bar_stacked_tab_max_width = 2131165195;
public static final int abc_action_bar_subtitle_bottom_margin_material = 2131165196;
public static final int abc_action_bar_subtitle_top_margin_material = 2131165197;
public static final int abc_action_button_min_height_material = 2131165198;
public static final int abc_action_button_min_width_material = 2131165199;
public static final int abc_action_button_min_width_overflow_material = 2131165200;
public static final int abc_alert_dialog_button_bar_height = 2131165201;
public static final int abc_alert_dialog_button_dimen = 2131165202;
public static final int abc_button_inset_horizontal_material = 2131165203;
public static final int abc_button_inset_vertical_material = 2131165204;
public static final int abc_button_padding_horizontal_material = 2131165205;
public static final int abc_button_padding_vertical_material = 2131165206;
public static final int abc_cascading_menus_min_smallest_width = 2131165207;
public static final int abc_config_prefDialogWidth = 2131165208;
public static final int abc_control_corner_material = 2131165209;
public static final int abc_control_inset_material = 2131165210;
public static final int abc_control_padding_material = 2131165211;
public static final int abc_dialog_fixed_height_major = 2131165212;
public static final int abc_dialog_fixed_height_minor = 2131165213;
public static final int abc_dialog_fixed_width_major = 2131165214;
public static final int abc_dialog_fixed_width_minor = 2131165215;
public static final int abc_dialog_list_padding_bottom_no_buttons = 2131165216;
public static final int abc_dialog_list_padding_top_no_title = 2131165217;
public static final int abc_dialog_min_width_major = 2131165218;
public static final int abc_dialog_min_width_minor = 2131165219;
public static final int abc_dialog_padding_material = 2131165220;
public static final int abc_dialog_padding_top_material = 2131165221;
public static final int abc_dialog_title_divider_material = 2131165222;
public static final int abc_disabled_alpha_material_dark = 2131165223;
public static final int abc_disabled_alpha_material_light = 2131165224;
public static final int abc_dropdownitem_icon_width = 2131165225;
public static final int abc_dropdownitem_text_padding_left = 2131165226;
public static final int abc_dropdownitem_text_padding_right = 2131165227;
public static final int abc_edit_text_inset_bottom_material = 2131165228;
public static final int abc_edit_text_inset_horizontal_material = 2131165229;
public static final int abc_edit_text_inset_top_material = 2131165230;
public static final int abc_floating_window_z = 2131165231;
public static final int abc_list_item_padding_horizontal_material = 2131165232;
public static final int abc_panel_menu_list_width = 2131165233;
public static final int abc_progress_bar_height_material = 2131165234;
public static final int abc_search_view_preferred_height = 2131165235;
public static final int abc_search_view_preferred_width = 2131165236;
public static final int abc_seekbar_track_background_height_material = 2131165237;
public static final int abc_seekbar_track_progress_height_material = 2131165238;
public static final int abc_select_dialog_padding_start_material = 2131165239;
public static final int abc_switch_padding = 2131165240;
public static final int abc_text_size_body_1_material = 2131165241;
public static final int abc_text_size_body_2_material = 2131165242;
public static final int abc_text_size_button_material = 2131165243;
public static final int abc_text_size_caption_material = 2131165244;
public static final int abc_text_size_display_1_material = 2131165245;
public static final int abc_text_size_display_2_material = 2131165246;
public static final int abc_text_size_display_3_material = 2131165247;
public static final int abc_text_size_display_4_material = 2131165248;
public static final int abc_text_size_headline_material = 2131165249;
public static final int abc_text_size_large_material = 2131165250;
public static final int abc_text_size_medium_material = 2131165251;
public static final int abc_text_size_menu_header_material = 2131165252;
public static final int abc_text_size_menu_material = 2131165253;
public static final int abc_text_size_small_material = 2131165254;
public static final int abc_text_size_subhead_material = 2131165255;
public static final int abc_text_size_subtitle_material_toolbar = 2131165256;
public static final int abc_text_size_title_material = 2131165257;
public static final int abc_text_size_title_material_toolbar = 2131165258;
public static final int compat_button_inset_horizontal_material = 2131165280;
public static final int compat_button_inset_vertical_material = 2131165281;
public static final int compat_button_padding_horizontal_material = 2131165282;
public static final int compat_button_padding_vertical_material = 2131165283;
public static final int compat_control_corner_material = 2131165284;
public static final int disabled_alpha_material_dark = 2131165344;
public static final int disabled_alpha_material_light = 2131165345;
public static final int highlight_alpha_material_colored = 2131165349;
public static final int highlight_alpha_material_dark = 2131165350;
public static final int highlight_alpha_material_light = 2131165351;
public static final int hint_alpha_material_dark = 2131165352;
public static final int hint_alpha_material_light = 2131165353;
public static final int hint_pressed_alpha_material_dark = 2131165354;
public static final int hint_pressed_alpha_material_light = 2131165355;
public static final int notification_action_icon_size = 2131165359;
public static final int notification_action_text_size = 2131165360;
public static final int notification_big_circle_margin = 2131165361;
public static final int notification_content_margin_start = 2131165362;
public static final int notification_large_icon_height = 2131165363;
public static final int notification_large_icon_width = 2131165364;
public static final int notification_main_column_padding_top = 2131165365;
public static final int notification_media_narrow_margin = 2131165366;
public static final int notification_right_icon_size = 2131165367;
public static final int notification_right_side_padding_top = 2131165368;
public static final int notification_small_icon_background_padding = 2131165369;
public static final int notification_small_icon_size_as_large = 2131165370;
public static final int notification_subtext_size = 2131165371;
public static final int notification_top_pad = 2131165372;
public static final int notification_top_pad_large_text = 2131165373;
public static final int tooltip_corner_radius = 2131165377;
public static final int tooltip_horizontal_padding = 2131165378;
public static final int tooltip_margin = 2131165379;
public static final int tooltip_precise_anchor_extra_offset = 2131165380;
public static final int tooltip_precise_anchor_threshold = 2131165381;
public static final int tooltip_vertical_padding = 2131165382;
public static final int tooltip_y_offset_non_touch = 2131165383;
public static final int tooltip_y_offset_touch = 2131165384;
}
public static final class drawable
{
public static final int abc_ab_share_pack_mtrl_alpha = 2131230727;
public static final int abc_action_bar_item_background_material = 2131230728;
public static final int abc_btn_borderless_material = 2131230729;
public static final int abc_btn_check_material = 2131230730;
public static final int abc_btn_check_to_on_mtrl_000 = 2131230731;
public static final int abc_btn_check_to_on_mtrl_015 = 2131230732;
public static final int abc_btn_colored_material = 2131230733;
public static final int abc_btn_default_mtrl_shape = 2131230734;
public static final int abc_btn_radio_material = 2131230735;
public static final int abc_btn_radio_to_on_mtrl_000 = 2131230736;
public static final int abc_btn_radio_to_on_mtrl_015 = 2131230737;
public static final int abc_btn_switch_to_on_mtrl_00001 = 2131230738;
public static final int abc_btn_switch_to_on_mtrl_00012 = 2131230739;
public static final int abc_cab_background_internal_bg = 2131230740;
public static final int abc_cab_background_top_material = 2131230741;
public static final int abc_cab_background_top_mtrl_alpha = 2131230742;
public static final int abc_control_background_material = 2131230743;
public static final int abc_dialog_material_background = 2131230744;
public static final int abc_edit_text_material = 2131230745;
public static final int abc_ic_ab_back_material = 2131230746;
public static final int abc_ic_arrow_drop_right_black_24dp = 2131230747;
public static final int abc_ic_clear_material = 2131230748;
public static final int abc_ic_commit_search_api_mtrl_alpha = 2131230749;
public static final int abc_ic_go_search_api_material = 2131230750;
public static final int abc_ic_menu_copy_mtrl_am_alpha = 2131230751;
public static final int abc_ic_menu_cut_mtrl_alpha = 2131230752;
public static final int abc_ic_menu_overflow_material = 2131230753;
public static final int abc_ic_menu_paste_mtrl_am_alpha = 2131230754;
public static final int abc_ic_menu_selectall_mtrl_alpha = 2131230755;
public static final int abc_ic_menu_share_mtrl_alpha = 2131230756;
public static final int abc_ic_search_api_material = 2131230757;
public static final int abc_ic_star_black_16dp = 2131230758;
public static final int abc_ic_star_black_36dp = 2131230759;
public static final int abc_ic_star_black_48dp = 2131230760;
public static final int abc_ic_star_half_black_16dp = 2131230761;
public static final int abc_ic_star_half_black_36dp = 2131230762;
public static final int abc_ic_star_half_black_48dp = 2131230763;
public static final int abc_ic_voice_search_api_material = 2131230764;
public static final int abc_item_background_holo_dark = 2131230765;
public static final int abc_item_background_holo_light = 2131230766;
public static final int abc_list_divider_mtrl_alpha = 2131230767;
public static final int abc_list_focused_holo = 2131230768;
public static final int abc_list_longpressed_holo = 2131230769;
public static final int abc_list_pressed_holo_dark = 2131230770;
public static final int abc_list_pressed_holo_light = 2131230771;
public static final int abc_list_selector_background_transition_holo_dark = 2131230772;
public static final int abc_list_selector_background_transition_holo_light = 2131230773;
public static final int abc_list_selector_disabled_holo_dark = 2131230774;
public static final int abc_list_selector_disabled_holo_light = 2131230775;
public static final int abc_list_selector_holo_dark = 2131230776;
public static final int abc_list_selector_holo_light = 2131230777;
public static final int abc_menu_hardkey_panel_mtrl_mult = 2131230778;
public static final int abc_popup_background_mtrl_mult = 2131230779;
public static final int abc_ratingbar_indicator_material = 2131230780;
public static final int abc_ratingbar_material = 2131230781;
public static final int abc_ratingbar_small_material = 2131230782;
public static final int abc_scrubber_control_off_mtrl_alpha = 2131230783;
public static final int abc_scrubber_control_to_pressed_mtrl_000 = 2131230784;
public static final int abc_scrubber_control_to_pressed_mtrl_005 = 2131230785;
public static final int abc_scrubber_primary_mtrl_alpha = 2131230786;
public static final int abc_scrubber_track_mtrl_alpha = 2131230787;
public static final int abc_seekbar_thumb_material = 2131230788;
public static final int abc_seekbar_tick_mark_material = 2131230789;
public static final int abc_seekbar_track_material = 2131230790;
public static final int abc_spinner_mtrl_am_alpha = 2131230791;
public static final int abc_spinner_textfield_background_material = 2131230792;
public static final int abc_switch_thumb_material = 2131230793;
public static final int abc_switch_track_mtrl_alpha = 2131230794;
public static final int abc_tab_indicator_material = 2131230795;
public static final int abc_tab_indicator_mtrl_alpha = 2131230796;
public static final int abc_text_cursor_material = 2131230797;
public static final int abc_text_select_handle_left_mtrl_dark = 2131230798;
public static final int abc_text_select_handle_left_mtrl_light = 2131230799;
public static final int abc_text_select_handle_middle_mtrl_dark = 2131230800;
public static final int abc_text_select_handle_middle_mtrl_light = 2131230801;
public static final int abc_text_select_handle_right_mtrl_dark = 2131230802;
public static final int abc_text_select_handle_right_mtrl_light = 2131230803;
public static final int abc_textfield_activated_mtrl_alpha = 2131230804;
public static final int abc_textfield_default_mtrl_alpha = 2131230805;
public static final int abc_textfield_search_activated_mtrl_alpha = 2131230806;
public static final int abc_textfield_search_default_mtrl_alpha = 2131230807;
public static final int abc_textfield_search_material = 2131230808;
public static final int abc_vector_test = 2131230809;
public static final int ic_action_search = 2131231392;
public static final int ic_launcher = 2131231393;
public static final int notification_action_background = 2131231531;
public static final int notification_bg = 2131231532;
public static final int notification_bg_low = 2131231533;
public static final int notification_bg_low_normal = 2131231534;
public static final int notification_bg_low_pressed = 2131231535;
public static final int notification_bg_normal = 2131231536;
public static final int notification_bg_normal_pressed = 2131231537;
public static final int notification_icon_background = 2131231538;
public static final int notification_template_icon_bg = 2131231539;
public static final int notification_template_icon_low_bg = 2131231540;
public static final int notification_tile_bg = 2131231541;
public static final int notify_panel_notification_icon_bg = 2131231542;
public static final int tooltip_frame_dark = 2131231860;
public static final int tooltip_frame_light = 2131231861;
}
public static final class id
{
public static final int action_bar = 2131296278;
public static final int action_bar_activity_content = 2131296279;
public static final int action_bar_container = 2131296280;
public static final int action_bar_root = 2131296281;
public static final int action_bar_spinner = 2131296282;
public static final int action_bar_subtitle = 2131296283;
public static final int action_bar_title = 2131296284;
public static final int action_container = 2131296285;
public static final int action_context_bar = 2131296286;
public static final int action_divider = 2131296287;
public static final int action_image = 2131296288;
public static final int action_menu_divider = 2131296289;
public static final int action_menu_presenter = 2131296290;
public static final int action_mode_bar = 2131296291;
public static final int action_mode_bar_stub = 2131296292;
public static final int action_mode_close_button = 2131296293;
public static final int action_text = 2131296294;
public static final int actions = 2131296295;
public static final int activity_chooser_view_content = 2131296296;
public static final int add = 2131296298;
public static final int alertTitle = 2131296301;
public static final int async = 2131296340;
public static final int blocking = 2131296344;
public static final int bottom = 2131296346;
public static final int buttonPanel = 2131296417;
public static final int checkbox = 2131296432;
public static final int chronometer = 2131296438;
public static final int contentPanel = 2131296454;
public static final int custom = 2131296463;
public static final int customPanel = 2131296464;
public static final int decor_content_parent = 2131296478;
public static final int default_activity_button = 2131296479;
public static final int edit_query = 2131296511;
public static final int end = 2131296514;
public static final int expand_activities_button = 2131296525;
public static final int expanded_menu = 2131296526;
public static final int forever = 2131296535;
public static final int home = 2131296544;
public static final int icon = 2131296546;
public static final int icon_group = 2131296547;
public static final int image = 2131296550;
public static final int info = 2131296553;
public static final int italic = 2131296556;
public static final int left = 2131296561;
public static final int line1 = 2131296563;
public static final int line3 = 2131296564;
public static final int listMode = 2131296567;
public static final int list_item = 2131296568;
public static final int message = 2131296614;
public static final int multiply = 2131296623;
public static final int none = 2131296637;
public static final int normal = 2131296638;
public static final int notification_background = 2131296639;
public static final int notification_main_column = 2131296640;
public static final int notification_main_column_container = 2131296641;
public static final int parentPanel = 2131296660;
public static final int progress_circular = 2131296881;
public static final int progress_horizontal = 2131296882;
public static final int radio = 2131296888;
public static final int right = 2131296918;
public static final int right_icon = 2131296919;
public static final int right_side = 2131296920;
public static final int screen = 2131296931;
public static final int scrollIndicatorDown = 2131296933;
public static final int scrollIndicatorUp = 2131296934;
public static final int scrollView = 2131296935;
public static final int search_badge = 2131296940;
public static final int search_bar = 2131296941;
public static final int search_button = 2131296942;
public static final int search_close_btn = 2131296943;
public static final int search_edit_frame = 2131296944;
public static final int search_go_btn = 2131296945;
public static final int search_mag_icon = 2131296946;
public static final int search_plate = 2131296947;
public static final int search_src_text = 2131296948;
public static final int search_voice_btn = 2131296949;
public static final int select_dialog_listview = 2131296950;
public static final int shortcut = 2131297007;
public static final int spacer = 2131297024;
public static final int split_action_bar = 2131297039;
public static final int src_atop = 2131297040;
public static final int src_in = 2131297041;
public static final int src_over = 2131297042;
public static final int start = 2131297049;
public static final int submenuarrow = 2131297078;
public static final int submit_area = 2131297079;
public static final int tabMode = 2131297080;
public static final int tag_transition_group = 2131297132;
public static final int text = 2131297144;
public static final int text2 = 2131297145;
public static final int textSpacerNoButtons = 2131297146;
public static final int textSpacerNoTitle = 2131297147;
public static final int time = 2131297159;
public static final int title = 2131297166;
public static final int titleDividerNoCustom = 2131297167;
public static final int title_template = 2131297168;
public static final int top = 2131297170;
public static final int topPanel = 2131297171;
public static final int uniform = 2131297191;
public static final int up = 2131297193;
public static final int wrap_content = 2131297268;
}
public static final class integer
{
public static final int abc_config_activityDefaultDur = 2131361792;
public static final int abc_config_activityShortDur = 2131361793;
public static final int cancel_button_image_alpha = 2131361796;
public static final int config_tooltipAnimTime = 2131361797;
public static final int status_bar_notification_info_maxnum = 2131361808;
}
public static final class layout
{
public static final int abc_action_bar_title_item = 2131427328;
public static final int abc_action_bar_up_container = 2131427329;
public static final int abc_action_menu_item_layout = 2131427330;
public static final int abc_action_menu_layout = 2131427331;
public static final int abc_action_mode_bar = 2131427332;
public static final int abc_action_mode_close_item_material = 2131427333;
public static final int abc_activity_chooser_view = 2131427334;
public static final int abc_activity_chooser_view_list_item = 2131427335;
public static final int abc_alert_dialog_button_bar_material = 2131427336;
public static final int abc_alert_dialog_material = 2131427337;
public static final int abc_alert_dialog_title_material = 2131427338;
public static final int abc_dialog_title_material = 2131427339;
public static final int abc_expanded_menu_layout = 2131427340;
public static final int abc_list_menu_item_checkbox = 2131427341;
public static final int abc_list_menu_item_icon = 2131427342;
public static final int abc_list_menu_item_layout = 2131427343;
public static final int abc_list_menu_item_radio = 2131427344;
public static final int abc_popup_menu_header_item_layout = 2131427345;
public static final int abc_popup_menu_item_layout = 2131427346;
public static final int abc_screen_content_include = 2131427347;
public static final int abc_screen_simple = 2131427348;
public static final int abc_screen_simple_overlay_action_mode = 2131427349;
public static final int abc_screen_toolbar = 2131427350;
public static final int abc_search_dropdown_item_icons_2line = 2131427351;
public static final int abc_search_view = 2131427352;
public static final int abc_select_dialog_material = 2131427353;
public static final int abc_tooltip = 2131427354;
public static final int notification_action = 2131427465;
public static final int notification_action_tombstone = 2131427466;
public static final int notification_template_custom_big = 2131427473;
public static final int notification_template_icon_group = 2131427474;
public static final int notification_template_part_chronometer = 2131427478;
public static final int notification_template_part_time = 2131427479;
public static final int select_dialog_item_material = 2131427531;
public static final int select_dialog_multichoice_material = 2131427532;
public static final int select_dialog_singlechoice_material = 2131427533;
public static final int support_simple_spinner_dropdown_item = 2131427555;
}
public static final class string
{
public static final int abc_action_bar_home_description = 2131689473;
public static final int abc_action_bar_up_description = 2131689474;
public static final int abc_action_menu_overflow_description = 2131689475;
public static final int abc_action_mode_done = 2131689476;
public static final int abc_activity_chooser_view_see_all = 2131689477;
public static final int abc_activitychooserview_choose_application = 2131689478;
public static final int abc_capital_off = 2131689479;
public static final int abc_capital_on = 2131689480;
public static final int abc_font_family_body_1_material = 2131689481;
public static final int abc_font_family_body_2_material = 2131689482;
public static final int abc_font_family_button_material = 2131689483;
public static final int abc_font_family_caption_material = 2131689484;
public static final int abc_font_family_display_1_material = 2131689485;
public static final int abc_font_family_display_2_material = 2131689486;
public static final int abc_font_family_display_3_material = 2131689487;
public static final int abc_font_family_display_4_material = 2131689488;
public static final int abc_font_family_headline_material = 2131689489;
public static final int abc_font_family_menu_material = 2131689490;
public static final int abc_font_family_subhead_material = 2131689491;
public static final int abc_font_family_title_material = 2131689492;
public static final int abc_search_hint = 2131689493;
public static final int abc_searchview_description_clear = 2131689494;
public static final int abc_searchview_description_query = 2131689495;
public static final int abc_searchview_description_search = 2131689496;
public static final int abc_searchview_description_submit = 2131689497;
public static final int abc_searchview_description_voice = 2131689498;
public static final int abc_shareactionprovider_share_with = 2131689499;
public static final int abc_shareactionprovider_share_with_application = 2131689500;
public static final int abc_toolbar_collapse_description = 2131689501;
public static final int app_name = 2131689560;
public static final int game_type_blitz = 2131690008;
public static final int game_type_bullet = 2131690009;
public static final int game_type_no_time = 2131690010;
public static final int game_type_rapid = 2131690011;
public static final int game_type_standard = 2131690012;
public static final int position_validation_rule_pawns_in_impossible_positions = 2131690178;
public static final int position_validation_rule_wrong_number_of_kings = 2131690179;
public static final int position_validation_rule_wrong_side_to_move_with_king_in_check = 2131690180;
public static final int search_menu_title = 2131690277;
public static final int status_bar_notification_info_overflow = 2131690300;
}
public static final class style
{
public static final int AlertDialog_AppCompat = 2131755008;
public static final int AlertDialog_AppCompat_Light = 2131755009;
public static final int Animation_AppCompat_Dialog = 2131755010;
public static final int Animation_AppCompat_DropDownUp = 2131755011;
public static final int Animation_AppCompat_Tooltip = 2131755012;
public static final int AppTheme = 2131755015;
public static final int Base_AlertDialog_AppCompat = 2131755016;
public static final int Base_AlertDialog_AppCompat_Light = 2131755017;
public static final int Base_Animation_AppCompat_Dialog = 2131755018;
public static final int Base_Animation_AppCompat_DropDownUp = 2131755019;
public static final int Base_Animation_AppCompat_Tooltip = 2131755020;
public static final int Base_DialogWindowTitleBackground_AppCompat = 2131755023;
public static final int Base_DialogWindowTitle_AppCompat = 2131755022;
public static final int Base_TextAppearance_AppCompat = 2131755024;
public static final int Base_TextAppearance_AppCompat_Body1 = 2131755025;
public static final int Base_TextAppearance_AppCompat_Body2 = 2131755026;
public static final int Base_TextAppearance_AppCompat_Button = 2131755027;
public static final int Base_TextAppearance_AppCompat_Caption = 2131755028;
public static final int Base_TextAppearance_AppCompat_Display1 = 2131755029;
public static final int Base_TextAppearance_AppCompat_Display2 = 2131755030;
public static final int Base_TextAppearance_AppCompat_Display3 = 2131755031;
public static final int Base_TextAppearance_AppCompat_Display4 = 2131755032;
public static final int Base_TextAppearance_AppCompat_Headline = 2131755033;
public static final int Base_TextAppearance_AppCompat_Inverse = 2131755034;
public static final int Base_TextAppearance_AppCompat_Large = 2131755035;
public static final int Base_TextAppearance_AppCompat_Large_Inverse = 2131755036;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131755037;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131755038;
public static final int Base_TextAppearance_AppCompat_Medium = 2131755039;
public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 2131755040;
public static final int Base_TextAppearance_AppCompat_Menu = 2131755041;
public static final int Base_TextAppearance_AppCompat_SearchResult = 2131755042;
public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 2131755043;
public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 2131755044;
public static final int Base_TextAppearance_AppCompat_Small = 2131755045;
public static final int Base_TextAppearance_AppCompat_Small_Inverse = 2131755046;
public static final int Base_TextAppearance_AppCompat_Subhead = 2131755047;
public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 2131755048;
public static final int Base_TextAppearance_AppCompat_Title = 2131755049;
public static final int Base_TextAppearance_AppCompat_Title_Inverse = 2131755050;
public static final int Base_TextAppearance_AppCompat_Tooltip = 2131755051;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131755052;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131755053;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131755054;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 2131755055;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131755056;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131755057;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 2131755058;
public static final int Base_TextAppearance_AppCompat_Widget_Button = 2131755059;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131755060;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Colored = 2131755061;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 2131755062;
public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 2131755063;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131755064;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131755065;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131755066;
public static final int Base_TextAppearance_AppCompat_Widget_Switch = 2131755067;
public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131755068;
public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131755069;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131755070;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 2131755071;
public static final int Base_ThemeOverlay_AppCompat = 2131755086;
public static final int Base_ThemeOverlay_AppCompat_ActionBar = 2131755087;
public static final int Base_ThemeOverlay_AppCompat_Dark = 2131755088;
public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 2131755089;
public static final int Base_ThemeOverlay_AppCompat_Dialog = 2131755090;
public static final int Base_ThemeOverlay_AppCompat_Dialog_Alert = 2131755091;
public static final int Base_ThemeOverlay_AppCompat_Light = 2131755092;
public static final int Base_Theme_AppCompat = 2131755072;
public static final int Base_Theme_AppCompat_CompactMenu = 2131755073;
public static final int Base_Theme_AppCompat_Dialog = 2131755074;
public static final int Base_Theme_AppCompat_DialogWhenLarge = 2131755078;
public static final int Base_Theme_AppCompat_Dialog_Alert = 2131755075;
public static final int Base_Theme_AppCompat_Dialog_FixedSize = 2131755076;
public static final int Base_Theme_AppCompat_Dialog_MinWidth = 2131755077;
public static final int Base_Theme_AppCompat_Light = 2131755079;
public static final int Base_Theme_AppCompat_Light_DarkActionBar = 2131755080;
public static final int Base_Theme_AppCompat_Light_Dialog = 2131755081;
public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 2131755085;
public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 2131755082;
public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 2131755083;
public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 2131755084;
public static final int Base_V21_ThemeOverlay_AppCompat_Dialog = 2131755098;
public static final int Base_V21_Theme_AppCompat = 2131755094;
public static final int Base_V21_Theme_AppCompat_Dialog = 2131755095;
public static final int Base_V21_Theme_AppCompat_Light = 2131755096;
public static final int Base_V21_Theme_AppCompat_Light_Dialog = 2131755097;
public static final int Base_V22_Theme_AppCompat = 2131755100;
public static final int Base_V22_Theme_AppCompat_Light = 2131755101;
public static final int Base_V23_Theme_AppCompat = 2131755102;
public static final int Base_V23_Theme_AppCompat_Light = 2131755103;
public static final int Base_V26_Theme_AppCompat = 2131755104;
public static final int Base_V26_Theme_AppCompat_Light = 2131755105;
public static final int Base_V26_Widget_AppCompat_Toolbar = 2131755106;
public static final int Base_V7_ThemeOverlay_AppCompat_Dialog = 2131755112;
public static final int Base_V7_Theme_AppCompat = 2131755108;
public static final int Base_V7_Theme_AppCompat_Dialog = 2131755109;
public static final int Base_V7_Theme_AppCompat_Light = 2131755110;
public static final int Base_V7_Theme_AppCompat_Light_Dialog = 2131755111;
public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 2131755113;
public static final int Base_V7_Widget_AppCompat_EditText = 2131755114;
public static final int Base_V7_Widget_AppCompat_Toolbar = 2131755115;
public static final int Base_Widget_AppCompat_ActionBar = 2131755116;
public static final int Base_Widget_AppCompat_ActionBar_Solid = 2131755117;
public static final int Base_Widget_AppCompat_ActionBar_TabBar = 2131755118;
public static final int Base_Widget_AppCompat_ActionBar_TabText = 2131755119;
public static final int Base_Widget_AppCompat_ActionBar_TabView = 2131755120;
public static final int Base_Widget_AppCompat_ActionButton = 2131755121;
public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 2131755122;
public static final int Base_Widget_AppCompat_ActionButton_Overflow = 2131755123;
public static final int Base_Widget_AppCompat_ActionMode = 2131755124;
public static final int Base_Widget_AppCompat_ActivityChooserView = 2131755125;
public static final int Base_Widget_AppCompat_AutoCompleteTextView = 2131755126;
public static final int Base_Widget_AppCompat_Button = 2131755127;
public static final int Base_Widget_AppCompat_ButtonBar = 2131755133;
public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 2131755134;
public static final int Base_Widget_AppCompat_Button_Borderless = 2131755128;
public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 2131755129;
public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131755130;
public static final int Base_Widget_AppCompat_Button_Colored = 2131755131;
public static final int Base_Widget_AppCompat_Button_Small = 2131755132;
public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 2131755135;
public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 2131755136;
public static final int Base_Widget_AppCompat_CompoundButton_Switch = 2131755137;
public static final int Base_Widget_AppCompat_DrawerArrowToggle = 2131755138;
public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 2131755139;
public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 2131755140;
public static final int Base_Widget_AppCompat_EditText = 2131755141;
public static final int Base_Widget_AppCompat_ImageButton = 2131755142;
public static final int Base_Widget_AppCompat_Light_ActionBar = 2131755143;
public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 2131755144;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 2131755145;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 2131755146;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131755147;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 2131755148;
public static final int Base_Widget_AppCompat_Light_PopupMenu = 2131755149;
public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 2131755150;
public static final int Base_Widget_AppCompat_ListMenuView = 2131755151;
public static final int Base_Widget_AppCompat_ListPopupWindow = 2131755152;
public static final int Base_Widget_AppCompat_ListView = 2131755153;
public static final int Base_Widget_AppCompat_ListView_DropDown = 2131755154;
public static final int Base_Widget_AppCompat_ListView_Menu = 2131755155;
public static final int Base_Widget_AppCompat_PopupMenu = 2131755156;
public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 2131755157;
public static final int Base_Widget_AppCompat_PopupWindow = 2131755158;
public static final int Base_Widget_AppCompat_ProgressBar = 2131755159;
public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 2131755160;
public static final int Base_Widget_AppCompat_RatingBar = 2131755161;
public static final int Base_Widget_AppCompat_RatingBar_Indicator = 2131755162;
public static final int Base_Widget_AppCompat_RatingBar_Small = 2131755163;
public static final int Base_Widget_AppCompat_SearchView = 2131755164;
public static final int Base_Widget_AppCompat_SearchView_ActionBar = 2131755165;
public static final int Base_Widget_AppCompat_SeekBar = 2131755166;
public static final int Base_Widget_AppCompat_SeekBar_Discrete = 2131755167;
public static final int Base_Widget_AppCompat_Spinner = 2131755168;
public static final int Base_Widget_AppCompat_Spinner_Underlined = 2131755169;
public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 2131755170;
public static final int Base_Widget_AppCompat_Toolbar = 2131755171;
public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 2131755172;
public static final int Platform_AppCompat = 2131755199;
public static final int Platform_AppCompat_Light = 2131755200;
public static final int Platform_ThemeOverlay_AppCompat = 2131755201;
public static final int Platform_ThemeOverlay_AppCompat_Dark = 2131755202;
public static final int Platform_ThemeOverlay_AppCompat_Light = 2131755203;
public static final int Platform_V21_AppCompat = 2131755204;
public static final int Platform_V21_AppCompat_Light = 2131755205;
public static final int Platform_V25_AppCompat = 2131755206;
public static final int Platform_V25_AppCompat_Light = 2131755207;
public static final int Platform_Widget_AppCompat_Spinner = 2131755208;
public static final int RtlOverlay_DialogWindowTitle_AppCompat = 2131755209;
public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 2131755210;
public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 2131755211;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 2131755212;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 2131755213;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 2131755214;
public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 2131755220;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 2131755215;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 2131755216;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 2131755217;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 2131755218;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 2131755219;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 2131755221;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 2131755222;
public static final int TextAppearance_AppCompat = 2131755223;
public static final int TextAppearance_AppCompat_Body1 = 2131755224;
public static final int TextAppearance_AppCompat_Body2 = 2131755225;
public static final int TextAppearance_AppCompat_Button = 2131755226;
public static final int TextAppearance_AppCompat_Caption = 2131755227;
public static final int TextAppearance_AppCompat_Display1 = 2131755228;
public static final int TextAppearance_AppCompat_Display2 = 2131755229;
public static final int TextAppearance_AppCompat_Display3 = 2131755230;
public static final int TextAppearance_AppCompat_Display4 = 2131755231;
public static final int TextAppearance_AppCompat_Headline = 2131755232;
public static final int TextAppearance_AppCompat_Inverse = 2131755233;
public static final int TextAppearance_AppCompat_Large = 2131755234;
public static final int TextAppearance_AppCompat_Large_Inverse = 2131755235;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 2131755236;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 2131755237;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131755238;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131755239;
public static final int TextAppearance_AppCompat_Medium = 2131755240;
public static final int TextAppearance_AppCompat_Medium_Inverse = 2131755241;
public static final int TextAppearance_AppCompat_Menu = 2131755242;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 2131755243;
public static final int TextAppearance_AppCompat_SearchResult_Title = 2131755244;
public static final int TextAppearance_AppCompat_Small = 2131755245;
public static final int TextAppearance_AppCompat_Small_Inverse = 2131755246;
public static final int TextAppearance_AppCompat_Subhead = 2131755247;
public static final int TextAppearance_AppCompat_Subhead_Inverse = 2131755248;
public static final int TextAppearance_AppCompat_Title = 2131755249;
public static final int TextAppearance_AppCompat_Title_Inverse = 2131755250;
public static final int TextAppearance_AppCompat_Tooltip = 2131755251;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131755252;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131755253;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131755254;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 2131755255;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131755256;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131755257;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 2131755258;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 2131755259;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 2131755260;
public static final int TextAppearance_AppCompat_Widget_Button = 2131755261;
public static final int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131755262;
public static final int TextAppearance_AppCompat_Widget_Button_Colored = 2131755263;
public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 2131755264;
public static final int TextAppearance_AppCompat_Widget_DropDownItem = 2131755265;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131755266;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131755267;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131755268;
public static final int TextAppearance_AppCompat_Widget_Switch = 2131755269;
public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131755270;
public static final int TextAppearance_Compat_Notification = 2131755271;
public static final int TextAppearance_Compat_Notification_Info = 2131755272;
public static final int TextAppearance_Compat_Notification_Line2 = 2131755274;
public static final int TextAppearance_Compat_Notification_Time = 2131755277;
public static final int TextAppearance_Compat_Notification_Title = 2131755279;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131755289;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131755290;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 2131755291;
public static final int ThemeOverlay_AppCompat = 2131755321;
public static final int ThemeOverlay_AppCompat_ActionBar = 2131755322;
public static final int ThemeOverlay_AppCompat_Dark = 2131755323;
public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 2131755324;
public static final int ThemeOverlay_AppCompat_Dialog = 2131755325;
public static final int ThemeOverlay_AppCompat_Dialog_Alert = 2131755326;
public static final int ThemeOverlay_AppCompat_Light = 2131755327;
public static final int Theme_AppCompat = 2131755292;
public static final int Theme_AppCompat_CompactMenu = 2131755293;
public static final int Theme_AppCompat_DayNight = 2131755294;
public static final int Theme_AppCompat_DayNight_DarkActionBar = 2131755295;
public static final int Theme_AppCompat_DayNight_Dialog = 2131755296;
public static final int Theme_AppCompat_DayNight_DialogWhenLarge = 2131755299;
public static final int Theme_AppCompat_DayNight_Dialog_Alert = 2131755297;
public static final int Theme_AppCompat_DayNight_Dialog_MinWidth = 2131755298;
public static final int Theme_AppCompat_DayNight_NoActionBar = 2131755300;
public static final int Theme_AppCompat_Dialog = 2131755301;
public static final int Theme_AppCompat_DialogWhenLarge = 2131755304;
public static final int Theme_AppCompat_Dialog_Alert = 2131755302;
public static final int Theme_AppCompat_Dialog_MinWidth = 2131755303;
public static final int Theme_AppCompat_Light = 2131755305;
public static final int Theme_AppCompat_Light_DarkActionBar = 2131755306;
public static final int Theme_AppCompat_Light_Dialog = 2131755307;
public static final int Theme_AppCompat_Light_DialogWhenLarge = 2131755310;
public static final int Theme_AppCompat_Light_Dialog_Alert = 2131755308;
public static final int Theme_AppCompat_Light_Dialog_MinWidth = 2131755309;
public static final int Theme_AppCompat_Light_NoActionBar = 2131755311;
public static final int Theme_AppCompat_NoActionBar = 2131755312;
public static final int Widget_AppCompat_ActionBar = 2131755330;
public static final int Widget_AppCompat_ActionBar_Solid = 2131755331;
public static final int Widget_AppCompat_ActionBar_TabBar = 2131755332;
public static final int Widget_AppCompat_ActionBar_TabText = 2131755333;
public static final int Widget_AppCompat_ActionBar_TabView = 2131755334;
public static final int Widget_AppCompat_ActionButton = 2131755335;
public static final int Widget_AppCompat_ActionButton_CloseMode = 2131755336;
public static final int Widget_AppCompat_ActionButton_Overflow = 2131755337;
public static final int Widget_AppCompat_ActionMode = 2131755338;
public static final int Widget_AppCompat_ActivityChooserView = 2131755339;
public static final int Widget_AppCompat_AutoCompleteTextView = 2131755340;
public static final int Widget_AppCompat_Button = 2131755341;
public static final int Widget_AppCompat_ButtonBar = 2131755347;
public static final int Widget_AppCompat_ButtonBar_AlertDialog = 2131755348;
public static final int Widget_AppCompat_Button_Borderless = 2131755342;
public static final int Widget_AppCompat_Button_Borderless_Colored = 2131755343;
public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131755344;
public static final int Widget_AppCompat_Button_Colored = 2131755345;
public static final int Widget_AppCompat_Button_Small = 2131755346;
public static final int Widget_AppCompat_CompoundButton_CheckBox = 2131755349;
public static final int Widget_AppCompat_CompoundButton_RadioButton = 2131755350;
public static final int Widget_AppCompat_CompoundButton_Switch = 2131755351;
public static final int Widget_AppCompat_DrawerArrowToggle = 2131755352;
public static final int Widget_AppCompat_DropDownItem_Spinner = 2131755353;
public static final int Widget_AppCompat_EditText = 2131755354;
public static final int Widget_AppCompat_ImageButton = 2131755355;
public static final int Widget_AppCompat_Light_ActionBar = 2131755356;
public static final int Widget_AppCompat_Light_ActionBar_Solid = 2131755357;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 2131755358;
public static final int Widget_AppCompat_Light_ActionBar_TabBar = 2131755359;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 2131755360;
public static final int Widget_AppCompat_Light_ActionBar_TabText = 2131755361;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131755362;
public static final int Widget_AppCompat_Light_ActionBar_TabView = 2131755363;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 2131755364;
public static final int Widget_AppCompat_Light_ActionButton = 2131755365;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 2131755366;
public static final int Widget_AppCompat_Light_ActionButton_Overflow = 2131755367;
public static final int Widget_AppCompat_Light_ActionMode_Inverse = 2131755368;
public static final int Widget_AppCompat_Light_ActivityChooserView = 2131755369;
public static final int Widget_AppCompat_Light_AutoCompleteTextView = 2131755370;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 2131755371;
public static final int Widget_AppCompat_Light_ListPopupWindow = 2131755372;
public static final int Widget_AppCompat_Light_ListView_DropDown = 2131755373;
public static final int Widget_AppCompat_Light_PopupMenu = 2131755374;
public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 2131755375;
public static final int Widget_AppCompat_Light_SearchView = 2131755376;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 2131755377;
public static final int Widget_AppCompat_ListMenuView = 2131755378;
public static final int Widget_AppCompat_ListPopupWindow = 2131755379;
public static final int Widget_AppCompat_ListView = 2131755380;
public static final int Widget_AppCompat_ListView_DropDown = 2131755381;
public static final int Widget_AppCompat_ListView_Menu = 2131755382;
public static final int Widget_AppCompat_PopupMenu = 2131755383;
public static final int Widget_AppCompat_PopupMenu_Overflow = 2131755384;
public static final int Widget_AppCompat_PopupWindow = 2131755385;
public static final int Widget_AppCompat_ProgressBar = 2131755386;
public static final int Widget_AppCompat_ProgressBar_Horizontal = 2131755387;
public static final int Widget_AppCompat_RatingBar = 2131755388;
public static final int Widget_AppCompat_RatingBar_Indicator = 2131755389;
public static final int Widget_AppCompat_RatingBar_Small = 2131755390;
public static final int Widget_AppCompat_SearchView = 2131755391;
public static final int Widget_AppCompat_SearchView_ActionBar = 2131755392;
public static final int Widget_AppCompat_SeekBar = 2131755393;
public static final int Widget_AppCompat_SeekBar_Discrete = 2131755394;
public static final int Widget_AppCompat_Spinner = 2131755395;
public static final int Widget_AppCompat_Spinner_DropDown = 2131755396;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 2131755397;
public static final int Widget_AppCompat_Spinner_Underlined = 2131755398;
public static final int Widget_AppCompat_TextView_SpinnerItem = 2131755399;
public static final int Widget_AppCompat_Toolbar = 2131755400;
public static final int Widget_AppCompat_Toolbar_Button_Navigation = 2131755401;
public static final int Widget_Compat_NotificationActionContainer = 2131755402;
public static final int Widget_Compat_NotificationActionText = 2131755403;
public static final int Widget_Support_CoordinatorLayout = 2131755416;
}
public static final class styleable
{
public static final int[] ActionBar;
public static final int[] ActionBarLayout;
public static final int ActionBarLayout_android_layout_gravity = 0;
public static final int ActionBar_background = 0;
public static final int ActionBar_backgroundSplit = 1;
public static final int ActionBar_backgroundStacked = 2;
public static final int ActionBar_contentInsetEnd = 3;
public static final int ActionBar_contentInsetEndWithActions = 4;
public static final int ActionBar_contentInsetLeft = 5;
public static final int ActionBar_contentInsetRight = 6;
public static final int ActionBar_contentInsetStart = 7;
public static final int ActionBar_contentInsetStartWithNavigation = 8;
public static final int ActionBar_customNavigationLayout = 9;
public static final int ActionBar_displayOptions = 10;
public static final int ActionBar_divider = 11;
public static final int ActionBar_elevation = 12;
public static final int ActionBar_height = 13;
public static final int ActionBar_hideOnContentScroll = 14;
public static final int ActionBar_homeAsUpIndicator = 15;
public static final int ActionBar_homeLayout = 16;
public static final int ActionBar_icon = 17;
public static final int ActionBar_indeterminateProgressStyle = 18;
public static final int ActionBar_itemPadding = 19;
public static final int ActionBar_logo = 20;
public static final int ActionBar_navigationMode = 21;
public static final int ActionBar_popupTheme = 22;
public static final int ActionBar_progressBarPadding = 23;
public static final int ActionBar_progressBarStyle = 24;
public static final int ActionBar_subtitle = 25;
public static final int ActionBar_subtitleTextStyle = 26;
public static final int ActionBar_title = 27;
public static final int ActionBar_titleTextStyle = 28;
public static final int[] ActionMenuItemView;
public static final int ActionMenuItemView_android_minWidth = 0;
public static final int[] ActionMode;
public static final int ActionMode_background = 0;
public static final int ActionMode_backgroundSplit = 1;
public static final int ActionMode_closeItemLayout = 2;
public static final int ActionMode_height = 3;
public static final int ActionMode_subtitleTextStyle = 4;
public static final int ActionMode_titleTextStyle = 5;
public static final int[] ActivityChooserView;
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 0;
public static final int ActivityChooserView_initialActivityCount = 1;
public static final int[] AlertDialog;
public static final int AlertDialog_android_layout = 0;
public static final int AlertDialog_buttonIconDimen = 1;
public static final int AlertDialog_buttonPanelSideLayout = 2;
public static final int AlertDialog_listItemLayout = 3;
public static final int AlertDialog_listLayout = 4;
public static final int AlertDialog_multiChoiceItemLayout = 5;
public static final int AlertDialog_showTitle = 6;
public static final int AlertDialog_singleChoiceItemLayout = 7;
public static final int[] AppCompatImageView;
public static final int AppCompatImageView_android_src = 0;
public static final int AppCompatImageView_srcCompat = 1;
public static final int AppCompatImageView_tint = 2;
public static final int AppCompatImageView_tintMode = 3;
public static final int[] AppCompatSeekBar;
public static final int AppCompatSeekBar_android_thumb = 0;
public static final int AppCompatSeekBar_tickMark = 1;
public static final int AppCompatSeekBar_tickMarkTint = 2;
public static final int AppCompatSeekBar_tickMarkTintMode = 3;
public static final int[] AppCompatTextHelper;
public static final int AppCompatTextHelper_android_drawableBottom = 2;
public static final int AppCompatTextHelper_android_drawableEnd = 6;
public static final int AppCompatTextHelper_android_drawableLeft = 3;
public static final int AppCompatTextHelper_android_drawableRight = 4;
public static final int AppCompatTextHelper_android_drawableStart = 5;
public static final int AppCompatTextHelper_android_drawableTop = 1;
public static final int AppCompatTextHelper_android_textAppearance = 0;
public static final int[] AppCompatTextView;
public static final int AppCompatTextView_android_textAppearance = 0;
public static final int AppCompatTextView_autoSizeMaxTextSize = 1;
public static final int AppCompatTextView_autoSizeMinTextSize = 2;
public static final int AppCompatTextView_autoSizePresetSizes = 3;
public static final int AppCompatTextView_autoSizeStepGranularity = 4;
public static final int AppCompatTextView_autoSizeTextType = 5;
public static final int AppCompatTextView_fontFamily = 6;
public static final int AppCompatTextView_textAllCaps = 7;
public static final int[] AppCompatTheme;
public static final int AppCompatTheme_actionBarDivider = 2;
public static final int AppCompatTheme_actionBarItemBackground = 3;
public static final int AppCompatTheme_actionBarPopupTheme = 4;
public static final int AppCompatTheme_actionBarSize = 5;
public static final int AppCompatTheme_actionBarSplitStyle = 6;
public static final int AppCompatTheme_actionBarStyle = 7;
public static final int AppCompatTheme_actionBarTabBarStyle = 8;
public static final int AppCompatTheme_actionBarTabStyle = 9;
public static final int AppCompatTheme_actionBarTabTextStyle = 10;
public static final int AppCompatTheme_actionBarTheme = 11;
public static final int AppCompatTheme_actionBarWidgetTheme = 12;
public static final int AppCompatTheme_actionButtonStyle = 13;
public static final int AppCompatTheme_actionDropDownStyle = 14;
public static final int AppCompatTheme_actionMenuTextAppearance = 15;
public static final int AppCompatTheme_actionMenuTextColor = 16;
public static final int AppCompatTheme_actionModeBackground = 17;
public static final int AppCompatTheme_actionModeCloseButtonStyle = 18;
public static final int AppCompatTheme_actionModeCloseDrawable = 19;
public static final int AppCompatTheme_actionModeCopyDrawable = 20;
public static final int AppCompatTheme_actionModeCutDrawable = 21;
public static final int AppCompatTheme_actionModeFindDrawable = 22;
public static final int AppCompatTheme_actionModePasteDrawable = 23;
public static final int AppCompatTheme_actionModePopupWindowStyle = 24;
public static final int AppCompatTheme_actionModeSelectAllDrawable = 25;
public static final int AppCompatTheme_actionModeShareDrawable = 26;
public static final int AppCompatTheme_actionModeSplitBackground = 27;
public static final int AppCompatTheme_actionModeStyle = 28;
public static final int AppCompatTheme_actionModeWebSearchDrawable = 29;
public static final int AppCompatTheme_actionOverflowButtonStyle = 30;
public static final int AppCompatTheme_actionOverflowMenuStyle = 31;
public static final int AppCompatTheme_activityChooserViewStyle = 32;
public static final int AppCompatTheme_alertDialogButtonGroupStyle = 33;
public static final int AppCompatTheme_alertDialogCenterButtons = 34;
public static final int AppCompatTheme_alertDialogStyle = 35;
public static final int AppCompatTheme_alertDialogTheme = 36;
public static final int AppCompatTheme_android_windowAnimationStyle = 1;
public static final int AppCompatTheme_android_windowIsFloating = 0;
public static final int AppCompatTheme_autoCompleteTextViewStyle = 37;
public static final int AppCompatTheme_borderlessButtonStyle = 38;
public static final int AppCompatTheme_buttonBarButtonStyle = 39;
public static final int AppCompatTheme_buttonBarNegativeButtonStyle = 40;
public static final int AppCompatTheme_buttonBarNeutralButtonStyle = 41;
public static final int AppCompatTheme_buttonBarPositiveButtonStyle = 42;
public static final int AppCompatTheme_buttonBarStyle = 43;
public static final int AppCompatTheme_buttonStyle = 44;
public static final int AppCompatTheme_buttonStyleSmall = 45;
public static final int AppCompatTheme_checkboxStyle = 46;
public static final int AppCompatTheme_checkedTextViewStyle = 47;
public static final int AppCompatTheme_colorAccent = 48;
public static final int AppCompatTheme_colorBackgroundFloating = 49;
public static final int AppCompatTheme_colorButtonNormal = 50;
public static final int AppCompatTheme_colorControlActivated = 51;
public static final int AppCompatTheme_colorControlHighlight = 52;
public static final int AppCompatTheme_colorControlNormal = 53;
public static final int AppCompatTheme_colorError = 54;
public static final int AppCompatTheme_colorPrimary = 55;
public static final int AppCompatTheme_colorPrimaryDark = 56;
public static final int AppCompatTheme_colorSwitchThumbNormal = 57;
public static final int AppCompatTheme_controlBackground = 58;
public static final int AppCompatTheme_dialogPreferredPadding = 59;
public static final int AppCompatTheme_dialogTheme = 60;
public static final int AppCompatTheme_dividerHorizontal = 61;
public static final int AppCompatTheme_dividerVertical = 62;
public static final int AppCompatTheme_dropDownListViewStyle = 63;
public static final int AppCompatTheme_dropdownListPreferredItemHeight = 64;
public static final int AppCompatTheme_editTextBackground = 65;
public static final int AppCompatTheme_editTextColor = 66;
public static final int AppCompatTheme_editTextStyle = 67;
public static final int AppCompatTheme_homeAsUpIndicator = 68;
public static final int AppCompatTheme_imageButtonStyle = 69;
public static final int AppCompatTheme_listChoiceBackgroundIndicator = 70;
public static final int AppCompatTheme_listDividerAlertDialog = 71;
public static final int AppCompatTheme_listMenuViewStyle = 72;
public static final int AppCompatTheme_listPopupWindowStyle = 73;
public static final int AppCompatTheme_listPreferredItemHeight = 74;
public static final int AppCompatTheme_listPreferredItemHeightLarge = 75;
public static final int AppCompatTheme_listPreferredItemHeightSmall = 76;
public static final int AppCompatTheme_listPreferredItemPaddingLeft = 77;
public static final int AppCompatTheme_listPreferredItemPaddingRight = 78;
public static final int AppCompatTheme_panelBackground = 79;
public static final int AppCompatTheme_panelMenuListTheme = 80;
public static final int AppCompatTheme_panelMenuListWidth = 81;
public static final int AppCompatTheme_popupMenuStyle = 82;
public static final int AppCompatTheme_popupWindowStyle = 83;
public static final int AppCompatTheme_radioButtonStyle = 84;
public static final int AppCompatTheme_ratingBarStyle = 85;
public static final int AppCompatTheme_ratingBarStyleIndicator = 86;
public static final int AppCompatTheme_ratingBarStyleSmall = 87;
public static final int AppCompatTheme_searchViewStyle = 88;
public static final int AppCompatTheme_seekBarStyle = 89;
public static final int AppCompatTheme_selectableItemBackground = 90;
public static final int AppCompatTheme_selectableItemBackgroundBorderless = 91;
public static final int AppCompatTheme_spinnerDropDownItemStyle = 92;
public static final int AppCompatTheme_spinnerStyle = 93;
public static final int AppCompatTheme_switchStyle = 94;
public static final int AppCompatTheme_textAppearanceLargePopupMenu = 95;
public static final int AppCompatTheme_textAppearanceListItem = 96;
public static final int AppCompatTheme_textAppearanceListItemSecondary = 97;
public static final int AppCompatTheme_textAppearanceListItemSmall = 98;
public static final int AppCompatTheme_textAppearancePopupMenuHeader = 99;
public static final int AppCompatTheme_textAppearanceSearchResultSubtitle = 100;
public static final int AppCompatTheme_textAppearanceSearchResultTitle = 101;
public static final int AppCompatTheme_textAppearanceSmallPopupMenu = 102;
public static final int AppCompatTheme_textColorAlertDialogListItem = 103;
public static final int AppCompatTheme_textColorSearchUrl = 104;
public static final int AppCompatTheme_toolbarNavigationButtonStyle = 105;
public static final int AppCompatTheme_toolbarStyle = 106;
public static final int AppCompatTheme_tooltipForegroundColor = 107;
public static final int AppCompatTheme_tooltipFrameBackground = 108;
public static final int AppCompatTheme_viewInflaterClass = 109;
public static final int AppCompatTheme_windowActionBar = 110;
public static final int AppCompatTheme_windowActionBarOverlay = 111;
public static final int AppCompatTheme_windowActionModeOverlay = 112;
public static final int AppCompatTheme_windowFixedHeightMajor = 113;
public static final int AppCompatTheme_windowFixedHeightMinor = 114;
public static final int AppCompatTheme_windowFixedWidthMajor = 115;
public static final int AppCompatTheme_windowFixedWidthMinor = 116;
public static final int AppCompatTheme_windowMinWidthMajor = 117;
public static final int AppCompatTheme_windowMinWidthMinor = 118;
public static final int AppCompatTheme_windowNoTitle = 119;
public static final int[] ButtonBarLayout;
public static final int ButtonBarLayout_allowStacking = 0;
public static final int[] ColorStateListItem;
public static final int ColorStateListItem_alpha = 2;
public static final int ColorStateListItem_android_alpha = 1;
public static final int ColorStateListItem_android_color = 0;
public static final int[] CompoundButton;
public static final int CompoundButton_android_button = 0;
public static final int CompoundButton_buttonTint = 1;
public static final int CompoundButton_buttonTintMode = 2;
public static final int[] CoordinatorLayout;
public static final int[] CoordinatorLayout_Layout;
public static final int CoordinatorLayout_Layout_android_layout_gravity = 0;
public static final int CoordinatorLayout_Layout_layout_anchor = 1;
public static final int CoordinatorLayout_Layout_layout_anchorGravity = 2;
public static final int CoordinatorLayout_Layout_layout_behavior = 3;
public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 4;
public static final int CoordinatorLayout_Layout_layout_insetEdge = 5;
public static final int CoordinatorLayout_Layout_layout_keyline = 6;
public static final int CoordinatorLayout_keylines = 0;
public static final int CoordinatorLayout_statusBarBackground = 1;
public static final int[] DrawerArrowToggle;
public static final int DrawerArrowToggle_arrowHeadLength = 0;
public static final int DrawerArrowToggle_arrowShaftLength = 1;
public static final int DrawerArrowToggle_barLength = 2;
public static final int DrawerArrowToggle_color = 3;
public static final int DrawerArrowToggle_drawableSize = 4;
public static final int DrawerArrowToggle_gapBetweenBars = 5;
public static final int DrawerArrowToggle_spinBars = 6;
public static final int DrawerArrowToggle_thickness = 7;
public static final int[] FontFamily;
public static final int[] FontFamilyFont;
public static final int FontFamilyFont_android_font = 0;
public static final int FontFamilyFont_android_fontStyle = 2;
public static final int FontFamilyFont_android_fontWeight = 1;
public static final int FontFamilyFont_font = 3;
public static final int FontFamilyFont_fontStyle = 4;
public static final int FontFamilyFont_fontWeight = 5;
public static final int FontFamily_fontProviderAuthority = 0;
public static final int FontFamily_fontProviderCerts = 1;
public static final int FontFamily_fontProviderFetchStrategy = 2;
public static final int FontFamily_fontProviderFetchTimeout = 3;
public static final int FontFamily_fontProviderPackage = 4;
public static final int FontFamily_fontProviderQuery = 5;
public static final int[] LinearLayoutCompat;
public static final int[] LinearLayoutCompat_Layout;
public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static final int LinearLayoutCompat_Layout_android_layout_height = 2;
public static final int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static final int LinearLayoutCompat_Layout_android_layout_width = 1;
public static final int LinearLayoutCompat_android_baselineAligned = 2;
public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static final int LinearLayoutCompat_android_gravity = 0;
public static final int LinearLayoutCompat_android_orientation = 1;
public static final int LinearLayoutCompat_android_weightSum = 4;
public static final int LinearLayoutCompat_divider = 5;
public static final int LinearLayoutCompat_dividerPadding = 6;
public static final int LinearLayoutCompat_measureWithLargestChild = 7;
public static final int LinearLayoutCompat_showDividers = 8;
public static final int[] ListPopupWindow;
public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static final int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static final int[] MenuGroup;
public static final int MenuGroup_android_checkableBehavior = 5;
public static final int MenuGroup_android_enabled = 0;
public static final int MenuGroup_android_id = 1;
public static final int MenuGroup_android_menuCategory = 3;
public static final int MenuGroup_android_orderInCategory = 4;
public static final int MenuGroup_android_visible = 2;
public static final int[] MenuItem;
public static final int MenuItem_actionLayout = 13;
public static final int MenuItem_actionProviderClass = 14;
public static final int MenuItem_actionViewClass = 15;
public static final int MenuItem_alphabeticModifiers = 16;
public static final int MenuItem_android_alphabeticShortcut = 9;
public static final int MenuItem_android_checkable = 11;
public static final int MenuItem_android_checked = 3;
public static final int MenuItem_android_enabled = 1;
public static final int MenuItem_android_icon = 0;
public static final int MenuItem_android_id = 2;
public static final int MenuItem_android_menuCategory = 5;
public static final int MenuItem_android_numericShortcut = 10;
public static final int MenuItem_android_onClick = 12;
public static final int MenuItem_android_orderInCategory = 6;
public static final int MenuItem_android_title = 7;
public static final int MenuItem_android_titleCondensed = 8;
public static final int MenuItem_android_visible = 4;
public static final int MenuItem_contentDescription = 17;
public static final int MenuItem_iconTint = 18;
public static final int MenuItem_iconTintMode = 19;
public static final int MenuItem_numericModifiers = 20;
public static final int MenuItem_showAsAction = 21;
public static final int MenuItem_tooltipText = 22;
public static final int[] MenuView;
public static final int MenuView_android_headerBackground = 4;
public static final int MenuView_android_horizontalDivider = 2;
public static final int MenuView_android_itemBackground = 5;
public static final int MenuView_android_itemIconDisabledAlpha = 6;
public static final int MenuView_android_itemTextAppearance = 1;
public static final int MenuView_android_verticalDivider = 3;
public static final int MenuView_android_windowAnimationStyle = 0;
public static final int MenuView_preserveIconSpacing = 7;
public static final int MenuView_subMenuArrow = 8;
public static final int[] PopupWindow;
public static final int[] PopupWindowBackgroundState;
public static final int PopupWindowBackgroundState_state_above_anchor = 0;
public static final int PopupWindow_android_popupAnimationStyle = 1;
public static final int PopupWindow_android_popupBackground = 0;
public static final int PopupWindow_overlapAnchor = 2;
public static final int[] RecycleListView;
public static final int RecycleListView_paddingBottomNoButtons = 0;
public static final int RecycleListView_paddingTopNoTitle = 1;
public static final int[] SearchView;
public static final int SearchView_android_focusable = 0;
public static final int SearchView_android_imeOptions = 3;
public static final int SearchView_android_inputType = 2;
public static final int SearchView_android_maxWidth = 1;
public static final int SearchView_closeIcon = 4;
public static final int SearchView_commitIcon = 5;
public static final int SearchView_defaultQueryHint = 6;
public static final int SearchView_goIcon = 7;
public static final int SearchView_iconifiedByDefault = 8;
public static final int SearchView_layout = 9;
public static final int SearchView_queryBackground = 10;
public static final int SearchView_queryHint = 11;
public static final int SearchView_searchHintIcon = 12;
public static final int SearchView_searchIcon = 13;
public static final int SearchView_submitBackground = 14;
public static final int SearchView_suggestionRowLayout = 15;
public static final int SearchView_voiceIcon = 16;
public static final int[] Spinner;
public static final int Spinner_android_dropDownWidth = 3;
public static final int Spinner_android_entries = 0;
public static final int Spinner_android_popupBackground = 1;
public static final int Spinner_android_prompt = 2;
public static final int Spinner_popupTheme = 4;
public static final int[] SwitchCompat;
public static final int SwitchCompat_android_textOff = 1;
public static final int SwitchCompat_android_textOn = 0;
public static final int SwitchCompat_android_thumb = 2;
public static final int SwitchCompat_showText = 3;
public static final int SwitchCompat_splitTrack = 4;
public static final int SwitchCompat_switchMinWidth = 5;
public static final int SwitchCompat_switchPadding = 6;
public static final int SwitchCompat_switchTextAppearance = 7;
public static final int SwitchCompat_thumbTextPadding = 8;
public static final int SwitchCompat_thumbTint = 9;
public static final int SwitchCompat_thumbTintMode = 10;
public static final int SwitchCompat_track = 11;
public static final int SwitchCompat_trackTint = 12;
public static final int SwitchCompat_trackTintMode = 13;
public static final int[] TextAppearance;
public static final int TextAppearance_android_fontFamily = 10;
public static final int TextAppearance_android_shadowColor = 6;
public static final int TextAppearance_android_shadowDx = 7;
public static final int TextAppearance_android_shadowDy = 8;
public static final int TextAppearance_android_shadowRadius = 9;
public static final int TextAppearance_android_textColor = 3;
public static final int TextAppearance_android_textColorHint = 4;
public static final int TextAppearance_android_textColorLink = 5;
public static final int TextAppearance_android_textSize = 0;
public static final int TextAppearance_android_textStyle = 2;
public static final int TextAppearance_android_typeface = 1;
public static final int TextAppearance_fontFamily = 11;
public static final int TextAppearance_textAllCaps = 12;
public static final int[] Toolbar;
public static final int Toolbar_android_gravity = 0;
public static final int Toolbar_android_minHeight = 1;
public static final int Toolbar_buttonGravity = 2;
public static final int Toolbar_collapseContentDescription = 3;
public static final int Toolbar_collapseIcon = 4;
public static final int Toolbar_contentInsetEnd = 5;
public static final int Toolbar_contentInsetEndWithActions = 6;
public static final int Toolbar_contentInsetLeft = 7;
public static final int Toolbar_contentInsetRight = 8;
public static final int Toolbar_contentInsetStart = 9;
public static final int Toolbar_contentInsetStartWithNavigation = 10;
public static final int Toolbar_logo = 11;
public static final int Toolbar_logoDescription = 12;
public static final int Toolbar_maxButtonHeight = 13;
public static final int Toolbar_navigationContentDescription = 14;
public static final int Toolbar_navigationIcon = 15;
public static final int Toolbar_popupTheme = 16;
public static final int Toolbar_subtitle = 17;
public static final int Toolbar_subtitleTextAppearance = 18;
public static final int Toolbar_subtitleTextColor = 19;
public static final int Toolbar_title = 20;
public static final int Toolbar_titleMargin = 21;
public static final int Toolbar_titleMarginBottom = 22;
public static final int Toolbar_titleMarginEnd = 23;
public static final int Toolbar_titleMarginStart = 24;
public static final int Toolbar_titleMarginTop = 25;
public static final int Toolbar_titleMargins = 26;
public static final int Toolbar_titleTextAppearance = 27;
public static final int Toolbar_titleTextColor = 28;
public static final int[] View;
public static final int[] ViewBackgroundHelper;
public static final int ViewBackgroundHelper_android_background = 0;
public static final int ViewBackgroundHelper_backgroundTint = 1;
public static final int ViewBackgroundHelper_backgroundTintMode = 2;
public static final int[] ViewStubCompat;
public static final int ViewStubCompat_android_id = 0;
public static final int ViewStubCompat_android_inflatedId = 2;
public static final int ViewStubCompat_android_layout = 1;
public static final int View_android_focusable = 1;
public static final int View_android_theme = 0;
public static final int View_paddingEnd = 2;
public static final int View_paddingStart = 3;
public static final int View_theme = 4;
static {
ActionBar = new int[] { 2130968628, 2130968629, 2130968630, 2130968705, 2130968706, 2130968707, 2130968708, 2130968709, 2130968710, 2130968724, 2130968729, 2130968730, 2130968741, 2130968786, 2130968787, 2130968792, 2130968793, 2130968794, 2130968804, 2130968810, 2130968841, 2130968852, 2130968870, 2130968874, 2130968875, 2130968922, 2130968925, 2130968972, 2130968983 };
ActionBarLayout = new int[] { 16842931 };
ActionMenuItemView = new int[] { 16843071 };
ActionMode = new int[] { 2130968628, 2130968629, 2130968674, 2130968786, 2130968925, 2130968983 };
ActivityChooserView = new int[] { 2130968744, 2130968805 };
AlertDialog = new int[] { 16842994, 2130968654, 2130968655, 2130968832, 2130968833, 2130968849, 2130968903, 2130968904 };
AppCompatImageView = new int[] { 16843033, 2130968911, 2130968970, 2130968971 };
AppCompatSeekBar = new int[] { 16843074, 2130968967, 2130968968, 2130968969 };
AppCompatTextHelper = new int[] { 16842804, 16843117, 16843118, 16843119, 16843120, 16843666, 16843667 };
AppCompatTextView = new int[] { 16842804, 2130968623, 2130968624, 2130968625, 2130968626, 2130968627, 2130968765, 2130968948 };
AppCompatTheme = new int[] { 16842839, 16842926, 2130968577, 2130968578, 2130968579, 2130968580, 2130968581, 2130968582, 2130968583, 2130968584, 2130968585, 2130968586, 2130968587, 2130968588, 2130968589, 2130968591, 2130968592, 2130968593, 2130968594, 2130968595, 2130968596, 2130968597, 2130968598, 2130968599, 2130968600, 2130968601, 2130968602, 2130968603, 2130968604, 2130968605, 2130968606, 2130968607, 2130968610, 2130968611, 2130968612, 2130968613, 2130968614, 2130968622, 2130968645, 2130968648, 2130968649, 2130968650, 2130968651, 2130968652, 2130968657, 2130968658, 2130968669, 2130968670, 2130968680, 2130968681, 2130968682, 2130968683, 2130968684, 2130968685, 2130968686, 2130968687, 2130968688, 2130968690, 2130968717, 2130968726, 2130968727, 2130968731, 2130968733, 2130968736, 2130968737, 2130968738, 2130968739, 2130968740, 2130968792, 2130968803, 2130968830, 2130968831, 2130968834, 2130968835, 2130968836, 2130968837, 2130968838, 2130968839, 2130968840, 2130968860, 2130968861, 2130968862, 2130968868, 2130968871, 2130968878, 2130968880, 2130968881, 2130968882, 2130968891, 2130968892, 2130968894, 2130968895, 2130968908, 2130968909, 2130968929, 2130968949, 2130968950, 2130968951, 2130968952, 2130968953, 2130968954, 2130968955, 2130968956, 2130968957, 2130968959, 2130968985, 2130968986, 2130968987, 2130968988, 2130968997, 2130969005, 2130969006, 2130969007, 2130969008, 2130969009, 2130969010, 2130969011, 2130969012, 2130969013, 2130969014 };
ButtonBarLayout = new int[] { 2130968615 };
ColorStateListItem = new int[] { 16843173, 16843551, 2130968616 };
CompoundButton = new int[] { 16843015, 2130968659, 2130968660 };
CoordinatorLayout = new int[] { 2130968813, 2130968916 };
CoordinatorLayout_Layout = new int[] { 16842931, 2130968816, 2130968817, 2130968818, 2130968821, 2130968822, 2130968823 };
DrawerArrowToggle = new int[] { 2130968618, 2130968620, 2130968633, 2130968679, 2130968734, 2130968781, 2130968907, 2130968963 };
FontFamily = new int[] { 2130968766, 2130968767, 2130968768, 2130968769, 2130968770, 2130968771 };
FontFamilyFont = new int[] { 16844082, 16844083, 16844095, 2130968764, 2130968772, 2130968773 };
LinearLayoutCompat = new int[] { 16842927, 16842948, 16843046, 16843047, 16843048, 2130968730, 2130968732, 2130968847, 2130968900 };
LinearLayoutCompat_Layout = new int[] { 16842931, 16842996, 16842997, 16843137 };
ListPopupWindow = new int[] { 16843436, 16843437 };
MenuGroup = new int[] { 16842766, 16842960, 16843156, 16843230, 16843231, 16843232 };
MenuItem = new int[] { 16842754, 16842766, 16842960, 16843014, 16843156, 16843230, 16843231, 16843233, 16843234, 16843235, 16843236, 16843237, 16843375, 2130968590, 2130968608, 2130968609, 2130968617, 2130968704, 2130968795, 2130968796, 2130968853, 2130968899, 2130968989 };
MenuView = new int[] { 16842926, 16843052, 16843053, 16843054, 16843055, 16843056, 16843057, 2130968872, 2130968920 };
PopupWindow = new int[] { 16843126, 16843465, 2130968854 };
PopupWindowBackgroundState = new int[] { 2130968913 };
RecycleListView = new int[] { 2130968855, 2130968858 };
SearchView = new int[] { 16842970, 16843039, 16843296, 16843364, 2130968673, 2130968703, 2130968725, 2130968783, 2130968800, 2130968814, 2130968876, 2130968877, 2130968889, 2130968890, 2130968921, 2130968926, 2130968998 };
Spinner = new int[] { 16842930, 16843126, 16843131, 16843362, 2130968870 };
SwitchCompat = new int[] { 16843044, 16843045, 16843074, 2130968902, 2130968910, 2130968927, 2130968928, 2130968930, 2130968964, 2130968965, 2130968966, 2130968991, 2130968992, 2130968993 };
TextAppearance = new int[] { 16842901, 16842902, 16842903, 16842904, 16842906, 16842907, 16843105, 16843106, 16843107, 16843108, 16843692, 2130968765, 2130968948 };
Toolbar = new int[] { 16842927, 16843072, 2130968653, 2130968675, 2130968676, 2130968705, 2130968706, 2130968707, 2130968708, 2130968709, 2130968710, 2130968841, 2130968842, 2130968846, 2130968850, 2130968851, 2130968870, 2130968922, 2130968923, 2130968924, 2130968972, 2130968974, 2130968975, 2130968976, 2130968977, 2130968978, 2130968979, 2130968981, 2130968982 };
View = new int[] { 16842752, 16842970, 2130968856, 2130968857, 2130968962 };
ViewBackgroundHelper = new int[] { 16842964, 2130968631, 2130968632 };
ViewStubCompat = new int[] { 16842960, 16842994, 16842995 };
}
}
}
| [
"cm.sarmiento10@uniandes.edu.co"
] | cm.sarmiento10@uniandes.edu.co |
bff7a4ac4ca3d830b06a3f64a7954c7f3dca84a8 | 144e2072e82558e7d47b960b4c58610e1a90c62c | /Spring源码学习/spring-framework-5.1.5.RELEASE/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandler.java | e3696cb8441cce821cd15d584bbde5af20fbc131 | [] | no_license | poshakjaiswal/learn_java | fd2ca62628842ffd348ae5e71994b52841d99466 | 58a6e2160e2af5406bfd30999563f4a6074ea5d6 | refs/heads/master | 2020-07-18T18:37:22.050270 | 2019-05-09T14:02:05 | 2019-05-09T14:02:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,662 | java | /*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.beans.factory.xml;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.lang.Nullable;
/**
* Base interface used by the {@link DefaultBeanDefinitionDocumentReader}
* for handling custom namespaces in a Spring XML configuration file.
*
* <p>Implementations are expected to return implementations of the
* {@link BeanDefinitionParser} interface for custom top-level tags and
* implementations of the {@link BeanDefinitionDecorator} interface for
* custom nested tags.
*
* <p>The parser will call {@link #parse} when it encounters a custom tag
* directly under the {@code <beans>} tags and {@link #decorate} when
* it encounters a custom tag directly under a {@code <bean>} tag.
*
* <p>Developers writing their own custom element extensions typically will
* not implement this interface directly, but rather make use of the provided
* {@link NamespaceHandlerSupport} class.
*
* 用于处理自定义命名空间的Spring标签。
* @author Rob Harrop
* @author Erik Wiersma
* @since 2.0
* @see DefaultBeanDefinitionDocumentReader
* @see NamespaceHandlerResolver
*/
public interface NamespaceHandler {
/**
* Invoked by the {@link DefaultBeanDefinitionDocumentReader} after
* construction but before any custom elements are parsed.
* 在构造函数之后,在自定义标签元素被解析之前执行。一般用于注册标签名和{@link BeanDefinitionParser}的映射。
* @see NamespaceHandlerSupport#registerBeanDefinitionParser(String, BeanDefinitionParser)
*/
void init();
/**
* Parse the specified {@link Element} and register any resulting
* {@link BeanDefinition BeanDefinitions} with the
* {@link org.springframework.beans.factory.support.BeanDefinitionRegistry}
* that is embedded in the supplied {@link ParserContext}.
* <p>Implementations should return the primary {@code BeanDefinition}
* that results from the parse phase if they wish to be used nested
* inside (for example) a {@code <property>} tag.
* <p>Implementations may return {@code null} if they will
* <strong>not</strong> be used in a nested scenario.
* @param element the element that is to be parsed into one or more {@code BeanDefinitions}
* @param parserContext the object encapsulating the current state of the parsing process
* @return the primary {@code BeanDefinition} (can be {@code null} as explained above)
*
* 解析指定的{@link Element} 并注册进嵌入在ParserContext中的BeanDefinitionRegistry
*/
@Nullable
BeanDefinition parse(Element element, ParserContext parserContext);
/**
* Parse the specified {@link Node} and decorate the supplied
* {@link BeanDefinitionHolder}, returning the decorated definition.
* <p>The {@link Node} may be either an {@link org.w3c.dom.Attr} or an
* {@link Element}, depending on whether a custom attribute or element
* is being parsed.
* <p>Implementations may choose to return a completely new definition,
* which will replace the original definition in the resulting
* {@link org.springframework.beans.factory.BeanFactory}.
* <p>The supplied {@link ParserContext} can be used to register any
* additional beans needed to support the main definition.
* @param source the source element or attribute that is to be parsed
* @param definition the current bean definition
* @param parserContext the object encapsulating the current state of the parsing process
* @return the decorated definition (to be registered in the BeanFactory),
* or simply the original bean definition if no decoration is required.
* A {@code null} value is strictly speaking invalid, but will be leniently
* treated like the case where the original bean definition gets returned.
* 解析指定的节点并装饰
*/
@Nullable
BeanDefinitionHolder decorate(Node source, BeanDefinitionHolder definition, ParserContext parserContext);
}
| [
"1599153675@qq.com"
] | 1599153675@qq.com |
481eda5886f7195331cf016af87fa628200c78c2 | 24a8fa42d0aa59bfef2449f853597c2276498c5b | /src/app/src/main/java/org/smoothbuild/util/graph/GraphEdge.java | 5a9194e2701abc25b5a647d294be580b6a2062eb | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | mikosik/smooth-build | 0ece94cb04ad95e7e2b971a06f59a62b61a2cf6c | f0cdc60f6c99dd3a6dd39c4c992e3cc23bbf082d | refs/heads/master | 2023-09-04T05:24:32.203971 | 2023-04-17T09:54:25 | 2023-04-17T09:59:32 | 11,688,671 | 16 | 1 | null | null | null | null | UTF-8 | Java | false | false | 93 | java | package org.smoothbuild.util.graph;
public record GraphEdge<E, K>(E value, K targetKey) {
}
| [
"marcin.mikosik@gmail.com"
] | marcin.mikosik@gmail.com |
473762ba15637abf12254946560713808a6cca42 | 0003c2c327aed91560b4a47be33dbac06ab52a10 | /ClockCalendar/src/com/yktx/check/adapter/TaskGridViewAdapter.java | 6dd9d6e904de8242a1bea668c97dc06f52e8c7af | [] | no_license | TomsDay/MyApplication | fdcc4fec76e77b51fe15d96b088c5fe43faa8d35 | 5ae07967a7fae7e20d0b35da8e0d8ec3bfb8cc2c | refs/heads/master | 2020-12-29T01:11:29.962363 | 2015-12-29T09:46:22 | 2015-12-29T09:46:50 | 48,739,120 | 0 | 0 | null | 2015-12-29T09:17:30 | 2015-12-29T09:17:29 | null | UTF-8 | Java | false | false | 9,676 | java | package com.yktx.check.adapter;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.assist.ImageScaleType;
import com.yktx.check.ImagePagerActivity2;
import com.yktx.check.R;
import com.yktx.check.bean.CustomDate;
import com.yktx.check.bean.GetByTaskIdCameraBean;
import com.yktx.check.util.DateUtil;
import com.yktx.check.util.TimeUtil;
import com.yktx.check.util.Tools;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
public class TaskGridViewAdapter extends RecyclerView.Adapter<TaskGridViewAdapter.MyViewHolder> {
private LinkedHashMap<String, GetByTaskIdCameraBean> curMap = new LinkedHashMap<String, GetByTaskIdCameraBean>();
protected LayoutInflater mInflater;
public DisplayImageOptions options = new DisplayImageOptions.Builder()
.showImageOnLoading(R.anim.loading_image_animation)
.showImageForEmptyUri(R.drawable.xq_rl_wutu)
.showImageOnFail(R.drawable.xq_rl_wutu)
.bitmapConfig(Bitmap.Config.RGB_565).cacheOnDisk(true)
.cacheInMemory(false)
// 启用内存缓存
.imageScaleType(ImageScaleType.IN_SAMPLE_INT).build();
private Activity mContext;
private CustomDate createDate;
String today;
InfoTakePhoto infoTakePhoto;
public void setInfoTakePhoto(InfoTakePhoto takePhoto) {
infoTakePhoto = takePhoto;
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup viewGroup, int i )
{
// 给ViewHolder设置布局文件
View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.task_gridview_activity, viewGroup, false);
return new MyViewHolder(v);
}
@Override
public void onBindViewHolder(MyViewHolder viewHolder, int i) {
showView(viewHolder,i);
}
@Override
public int getItemCount()
{
// 返回数据总数
return 500;
}
// 重写的自定义ViewHolder
class MyViewHolder extends RecyclerView.ViewHolder
{
public ImageView taskLastPhoto, taskMorePhoto, taskImageKuang;
public TextView taskBg;
public MyViewHolder(View convertView) {
super(convertView);
// TODO Auto-generated constructor stub
taskLastPhoto = (ImageView) convertView
.findViewById(R.id.taskLastPhoto);
taskBg = (TextView) convertView.findViewById(R.id.taskBg);
taskMorePhoto = (ImageView) convertView
.findViewById(R.id.taskMorePhoto);
taskImageKuang = (ImageView) convertView
.findViewById(R.id.taskImageKuang);
}
}
public void setCreateDate(CustomDate createDate) {
this.createDate = createDate;
}
@Override
public long getItemId(int position) {
return position;
}
String getUserID, taskID, userID;
public TaskGridViewAdapter(Activity context, String getUserID,
String taskID, String userID) {
mContext = context;
this.getUserID = getUserID;
this.userID = userID;
this.taskID = taskID;
mInflater = LayoutInflater.from(context);
today = TimeUtil.getYYMMDD(System.currentTimeMillis());
}
String imageSource[];
public void setList(LinkedHashMap<String, GetByTaskIdCameraBean> curMap) {
this.curMap = curMap;
if (curMap.size() != 0) {
imageSource = new String[curMap.size()];
Iterator iter = curMap.entrySet().iterator();
int i = 0;
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry) iter.next();
String key = (String) entry.getKey();
imageSource[i] = key + "";
GetByTaskIdCameraBean bean = curMap.get(key);
bean.setPosition(i);
curMap.put(key, bean);
i++;
}
}
}
@SuppressLint("ResourceAsColor")
private void showView(MyViewHolder viewHolder, final int position) {
if (createDate != null) {
long curDate = DateUtil.getDate(createDate.toString(), -position);
String curDateStr = TimeUtil.getYYMMDD(curDate);
boolean isToday = false;
viewHolder.taskImageKuang.setVisibility(View.GONE);
if (curDateStr.equals(today)) {
// 今天
isToday = true;
viewHolder.taskBg.setTextColor(0xffff9500);
viewHolder.taskBg.setBackgroundResource(R.color.white);
} else if (curDate < System.currentTimeMillis()) {
// 过去的
viewHolder.taskBg
.setBackgroundResource(R.color.meibao_color_13);
viewHolder.taskBg.setTextColor(mContext.getResources().getColor(R.color.meibao_color_11));
} else {
// 以后的
viewHolder.taskBg
.setBackgroundResource(R.color.meibao_color_15);
viewHolder.taskBg.setTextColor(mContext.getResources().getColor(R.color.meibao_color_12));
}
String array[] = curDateStr.split("-");
int month = Integer.parseInt(array[1]);
int day = Integer.parseInt(array[2]);
if (isToday) {
if (userID.equals(getUserID)) {
viewHolder.taskBg.setText("");// 原来是空""
} else {
viewHolder.taskBg.setText(day + "");
}
} else if (day == 1) {
// 月初
// viewHolder.taskBg.setText(month + "月" + day);
viewHolder.taskBg.setText(month + "月");
} else {
viewHolder.taskBg.setText(day + "");
}
if (curMap.get(curDateStr) != null) {
viewHolder.taskLastPhoto.setVisibility(View.VISIBLE);
// viewHolder.taskDate.setVisibility(View.VISIBLE);
final GetByTaskIdCameraBean bean = curMap.get(curDateStr);
if (bean.getLastImagePath() == null
|| bean.getLastImagePath().equals("null")) {
viewHolder.taskLastPhoto
.setImageResource(R.drawable.xq_rl_wutu);
viewHolder.taskBg.setText("");
viewHolder.taskImageKuang.setVisibility(View.GONE);
} else {
ImageLoader.getInstance().displayImage(
Tools.getImagePath(bean.getLastImageSource())
+ bean.getLastImagePath()
+ "?imageMogr2/thumbnail/100x100",
viewHolder.taskLastPhoto, options);
viewHolder.taskImageKuang.setVisibility(View.VISIBLE);
}
if (bean.getImageCount() > 1) {
viewHolder.taskMorePhoto.setVisibility(View.VISIBLE);
} else {
viewHolder.taskMorePhoto.setVisibility(View.GONE);
}
// viewHolder.taskDate.setText(bean.getCheckDate().substring(5));
viewHolder.taskLastPhoto
.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
if (bean.getImageCount() == 0) {
// AlertDialog.Builder builder = new
// AlertDialog.Builder(
// mContext);
// builder.setTitle("提示");
// builder.setMessage("浏览此日内容,需通过打卡7app");
// builder.setPositiveButton("下载",
// new DialogInterface.OnClickListener() {
// public void onClick(DialogInterface
// dialog,
// int whichButton) {
// MobclickAgent.onEvent(mContext,
// "infoShareWeixinClick");
//
// // 这里添加点击确定后的逻辑
// Uri uri = Uri
// .parse("http://a.app.qq.com/o/simple.jsp?pkgname=com.yktx.check");
// Intent intent = new
// Intent(Intent.ACTION_VIEW, uri);
// mContext.startActivity(intent);
//
// }
// });
// builder.setNegativeButton("返回", new
// DialogInterface.OnClickListener() {
//
// @Override
// public void onClick(DialogInterface arg0,
// int arg1) {
// // TODO Auto-generated method stub
//
// }
// });
// builder.show();
// Intent in = new Intent(mContext,
// DailycamLoadClockActivity.class);
// in.putExtra("isMainPage", false);
// mContext.startActivity(in);
// mContext.overridePendingTransition(R.anim.my_scale_action,
// R.anim.my_scale_action1);
} else {
imageBrower(bean.getPosition());
}
}
});
} else if (isToday) {
if (userID.equals(getUserID)) {
viewHolder.taskLastPhoto.setVisibility(View.VISIBLE);
} else {
viewHolder.taskLastPhoto.setVisibility(View.INVISIBLE);
}
viewHolder.taskLastPhoto
.setImageResource(R.drawable.xq_rl_jintiandaka);
viewHolder.taskMorePhoto.setVisibility(View.GONE);
// viewHolder.taskDate.setVisibility(View.GONE);
viewHolder.taskLastPhoto
.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Tools.getLog(Tools.d, "aaa", "今天没有照片的点击!");
if (infoTakePhoto != null)
infoTakePhoto.TakePhoto();
}
});
} else {
viewHolder.taskLastPhoto.setVisibility(View.INVISIBLE);
viewHolder.taskMorePhoto.setVisibility(View.GONE);
}
} else {
viewHolder.taskLastPhoto.setVisibility(View.INVISIBLE);
}
}
private void imageBrower(int position) {
Intent intent = new Intent(mContext, ImagePagerActivity2.class);
// 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
intent.putExtra(ImagePagerActivity2.EXTRA_IMAGE_SOURCE, imageSource);
intent.putExtra(ImagePagerActivity2.EXTRA_IMAGE_DATE,
imageSource[position]);
intent.putExtra(ImagePagerActivity2.EXTRA_IMAGE_USERID, getUserID);
intent.putExtra(ImagePagerActivity2.EXTRA_IMAGE_TASKID, taskID);
mContext.startActivity(intent);
}
public interface InfoTakePhoto {
public void TakePhoto();
}
}
| [
"390553699@qq.com"
] | 390553699@qq.com |
6527f7980426db1d38e08820840bfba9a703939e | 880de14bc9e353e863e2932bfb179d5cc171a3dd | /Financeiro_1/src/br/unisinos/financeiro/model/cheque/Cheque.java | 3d4744d0c43374e60fa996b90f299c51fe26d36e | [] | no_license | gelsongodoi/PROJETOS | c0204dc3876b4476533ed7db2e591b33ce2e7553 | fc9b3e26de4d91ffd2c926628bb95a8b016d6b2d | refs/heads/master | 2021-01-10T11:15:05.989228 | 2015-10-14T02:13:18 | 2015-10-14T02:13:18 | 44,211,200 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 470 | java | package br.unisinos.financeiro.model.cheque;
import java.io.Serializable;
import java.util.Date;
import br.unisinos.financeiro.model.conta.Conta;
import br.unisinos.financeiro.model.lancamento.Lancamento;
public class Cheque implements Serializable {
private static final long serialVersionUID = -3384982264753009116L;
private ChequeId chequeId;
private Conta conta;
private Date dataCadastro;
private Character situacao;
private Lancamento lancamento;
}
| [
"gelson.godoi@gmail.com"
] | gelson.godoi@gmail.com |
7f6c6f91471b4cc310c5c309cf8a473b23dfbc71 | 848c2372f0afbc579e7d70889b0c9b6e1e87d6ed | /0808/src/InheritanceDemo3.java | 25e79dd7182c3191a4ae9260c2701a8cf4f190d2 | [] | no_license | tmznf963/SIST-E | fdc505d223b680276e7b30468b56ea62f1891850 | d24806373ac2b4eab163803d28d23124ad91238f | refs/heads/master | 2020-03-24T16:49:09.117983 | 2018-09-13T03:40:30 | 2018-09-13T03:40:30 | 142,838,096 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 488 | java |
public class InheritanceDemo3 {
public static void main(String[] args) {
Sub sub = new Sub();//상속은 항상 자식클래스로 접근.
System.out.println(sub.name);
System.out.println(sub.price);
System.out.println(Super.price);//공유변수 는 클래스 이름 접근.
//System.out.println(Super.name); // static 변수가 아니기에 접근 불가
}
}
class Super {
String name = "Michael";
static int price = 150; //공유 변수
}
class Sub extends Super{
}
| [
"qhfhd963@naver.com"
] | qhfhd963@naver.com |
33e49f3aae3dbfad9ce4b7f2f9790934431060f9 | 7f5bbcba39d5c3cde2401fd4cabb3aea144eea36 | /src/org/ruboto/RubotoActivity.java | a46b86af5deabc52e93b26e6e6cfc105b9ed81db | [] | no_license | ruboto/ruboto-demos | 336ecd61c56d6218bd14ce9b9125db5d66cf167e | c909fbe2cd2a12978af251e6e6affd1c8184ab7c | refs/heads/master | 2021-01-15T16:05:46.402276 | 2010-12-12T00:54:52 | 2010-12-12T00:54:52 | 1,177,505 | 7 | 0 | null | null | null | null | UTF-8 | Java | false | false | 32,008 | java | package org.ruboto;
import org.jruby.Ruby;
import org.jruby.javasupport.util.RuntimeHelpers;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.javasupport.JavaUtil;
import org.jruby.exceptions.RaiseException;
import org.ruboto.Script;
import java.io.IOException;
import android.app.ProgressDialog;
import android.os.Handler;
public class RubotoActivity extends android.app.Activity {
private Ruby __ruby__;
private String scriptName;
private String remoteVariable = "";
public Object[] args;
private ProgressDialog loadingDialog;
public static final int CB_ACTIVITY_RESULT = 0;
public static final int CB_CHILD_TITLE_CHANGED = 1;
public static final int CB_CONFIGURATION_CHANGED = 2;
public static final int CB_CONTENT_CHANGED = 3;
public static final int CB_CONTEXT_ITEM_SELECTED = 4;
public static final int CB_CONTEXT_MENU_CLOSED = 5;
public static final int CB_CREATE_CONTEXT_MENU = 6;
public static final int CB_CREATE_DESCRIPTION = 7;
public static final int CB_CREATE_DIALOG = 8;
public static final int CB_CREATE_OPTIONS_MENU = 9;
public static final int CB_CREATE_PANEL_MENU = 10;
public static final int CB_CREATE_PANEL_VIEW = 11;
public static final int CB_CREATE_THUMBNAIL = 12;
public static final int CB_CREATE_VIEW = 13;
public static final int CB_DESTROY = 14;
public static final int CB_KEY_DOWN = 15;
public static final int CB_KEY_MULTIPLE = 16;
public static final int CB_KEY_UP = 17;
public static final int CB_LOW_MEMORY = 18;
public static final int CB_MENU_ITEM_SELECTED = 19;
public static final int CB_MENU_OPENED = 20;
public static final int CB_NEW_INTENT = 21;
public static final int CB_OPTIONS_ITEM_SELECTED = 22;
public static final int CB_OPTIONS_MENU_CLOSED = 23;
public static final int CB_PANEL_CLOSED = 24;
public static final int CB_PAUSE = 25;
public static final int CB_POST_CREATE = 26;
public static final int CB_POST_RESUME = 27;
public static final int CB_PREPARE_DIALOG = 28;
public static final int CB_PREPARE_OPTIONS_MENU = 29;
public static final int CB_PREPARE_PANEL = 30;
public static final int CB_RESTART = 31;
public static final int CB_RESTORE_INSTANCE_STATE = 32;
public static final int CB_RESUME = 33;
public static final int CB_RETAIN_NON_CONFIGURATION_INSTANCE = 34;
public static final int CB_SAVE_INSTANCE_STATE = 35;
public static final int CB_SEARCH_REQUESTED = 36;
public static final int CB_START = 37;
public static final int CB_STOP = 38;
public static final int CB_TITLE_CHANGED = 39;
public static final int CB_TOUCH_EVENT = 40;
public static final int CB_TRACKBALL_EVENT = 41;
public static final int CB_WINDOW_ATTRIBUTES_CHANGED = 42;
public static final int CB_WINDOW_FOCUS_CHANGED = 43;
public static final int CB_USER_INTERACTION = 44;
public static final int CB_USER_LEAVE_HINT = 45;
public static final int CB_ATTACHED_TO_WINDOW = 46;
public static final int CB_BACK_PRESSED = 47;
public static final int CB_DETACHED_FROM_WINDOW = 48;
public static final int CB_KEY_LONG_PRESS = 49;
public static final int CB_APPLY_THEME_RESOURCE = 50;
private IRubyObject[] callbackProcs = new IRubyObject[53];
private Ruby getRuby() {
if (__ruby__ == null) __ruby__ = Script.getRuby();
if (__ruby__ == null) {
Script.setUpJRuby(null);
__ruby__ = Script.getRuby();
}
return __ruby__;
}
public void setCallbackProc(int id, IRubyObject obj) {
callbackProcs[id] = obj;
}
public RubotoActivity setRemoteVariable(String var) {
remoteVariable = ((var == null) ? "" : (var + "."));
return this;
}
public void setScriptName(String name){
scriptName = name;
}
/****************************************************************************************
*
* Activity Lifecycle: onCreate
*/
@Override
public void onCreate(android.os.Bundle arg0) {
args = new Object[1];
args[0] = arg0;
super.onCreate(arg0);
if (Script.getRuby() != null) {
finishCreate();
} else {
loadingThread.start();
loadingDialog = ProgressDialog.show(this, null, "Loading...", true, false);
}
}
private final Handler loadingHandler = new Handler();
private final Thread loadingThread = new Thread() {
public void run(){
Script.setUpJRuby(null);
loadingHandler.post(loadingComplete);
}
};
private final Runnable loadingComplete = new Runnable(){
public void run(){
loadingDialog.dismiss();
finishCreate();
}
};
private void finishCreate() {
Script.copyScriptsIfNeeded(getFilesDir().getAbsolutePath() + "/scripts", getAssets());
getRuby();
Script.defineGlobalVariable("$activity", this);
Script.defineGlobalVariable("$bundle", args[0]);
android.os.Bundle configBundle = getIntent().getBundleExtra("RubotoActivity Config");
if (configBundle != null) {
setRemoteVariable(configBundle.getString("Remote Variable"));
if (configBundle.getBoolean("Define Remote Variable")) {
Script.defineGlobalVariable(configBundle.getString("Remote Variable"), this);
setRemoteVariable(configBundle.getString("Remote Variable"));
}
if (configBundle.getString("Initialize Script") != null) {
Script.execute(configBundle.getString("Initialize Script"));
}
Script.execute(remoteVariable + "on_create($bundle)");
} else {
try {
new Script(scriptName).execute();
} catch(IOException e){
e.printStackTrace();
ProgressDialog.show(this, "Script failed", "Something bad happened", true, true);
}
}
}
/****************************************************************************************
*
* Generated Methods
*/
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
if (callbackProcs[CB_ACTIVITY_RESULT] != null) {
super.onActivityResult(requestCode, resultCode, data);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_ACTIVITY_RESULT], "call" , JavaUtil.convertJavaToRuby(getRuby(), requestCode), JavaUtil.convertJavaToRuby(getRuby(), resultCode), JavaUtil.convertJavaToRuby(getRuby(), data));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onActivityResult(requestCode, resultCode, data);
}
}
public void onChildTitleChanged(android.app.Activity childActivity, java.lang.CharSequence title) {
if (callbackProcs[CB_CHILD_TITLE_CHANGED] != null) {
super.onChildTitleChanged(childActivity, title);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CHILD_TITLE_CHANGED], "call" , JavaUtil.convertJavaToRuby(getRuby(), childActivity), JavaUtil.convertJavaToRuby(getRuby(), title));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onChildTitleChanged(childActivity, title);
}
}
public void onConfigurationChanged(android.content.res.Configuration newConfig) {
if (callbackProcs[CB_CONFIGURATION_CHANGED] != null) {
super.onConfigurationChanged(newConfig);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CONFIGURATION_CHANGED], "call" , JavaUtil.convertJavaToRuby(getRuby(), newConfig));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onConfigurationChanged(newConfig);
}
}
public void onContentChanged() {
if (callbackProcs[CB_CONTENT_CHANGED] != null) {
super.onContentChanged();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CONTENT_CHANGED], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onContentChanged();
}
}
public boolean onContextItemSelected(android.view.MenuItem item) {
if (callbackProcs[CB_CONTEXT_ITEM_SELECTED] != null) {
super.onContextItemSelected(item);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CONTEXT_ITEM_SELECTED], "call" , JavaUtil.convertJavaToRuby(getRuby(), item)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onContextItemSelected(item);
}
}
public void onContextMenuClosed(android.view.Menu menu) {
if (callbackProcs[CB_CONTEXT_MENU_CLOSED] != null) {
super.onContextMenuClosed(menu);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CONTEXT_MENU_CLOSED], "call" , JavaUtil.convertJavaToRuby(getRuby(), menu));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onContextMenuClosed(menu);
}
}
public void onCreateContextMenu(android.view.ContextMenu menu, android.view.View v, android.view.ContextMenu.ContextMenuInfo menuInfo) {
if (callbackProcs[CB_CREATE_CONTEXT_MENU] != null) {
super.onCreateContextMenu(menu, v, menuInfo);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CREATE_CONTEXT_MENU], "call" , JavaUtil.convertJavaToRuby(getRuby(), menu), JavaUtil.convertJavaToRuby(getRuby(), v), JavaUtil.convertJavaToRuby(getRuby(), menuInfo));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onCreateContextMenu(menu, v, menuInfo);
}
}
public java.lang.CharSequence onCreateDescription() {
if (callbackProcs[CB_CREATE_DESCRIPTION] != null) {
super.onCreateDescription();
try {
return (java.lang.CharSequence)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CREATE_DESCRIPTION], "call" ).toJava(java.lang.CharSequence.class);
} catch (RaiseException re) {
re.printStackTrace();
return null;
}
} else {
return super.onCreateDescription();
}
}
public android.app.Dialog onCreateDialog(int id) {
if (callbackProcs[CB_CREATE_DIALOG] != null) {
super.onCreateDialog(id);
try {
return (android.app.Dialog)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CREATE_DIALOG], "call" , JavaUtil.convertJavaToRuby(getRuby(), id)).toJava(android.app.Dialog.class);
} catch (RaiseException re) {
re.printStackTrace();
return null;
}
} else {
return super.onCreateDialog(id);
}
}
public boolean onCreateOptionsMenu(android.view.Menu menu) {
if (callbackProcs[CB_CREATE_OPTIONS_MENU] != null) {
super.onCreateOptionsMenu(menu);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CREATE_OPTIONS_MENU], "call" , JavaUtil.convertJavaToRuby(getRuby(), menu)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onCreateOptionsMenu(menu);
}
}
public boolean onCreatePanelMenu(int featureId, android.view.Menu menu) {
if (callbackProcs[CB_CREATE_PANEL_MENU] != null) {
super.onCreatePanelMenu(featureId, menu);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CREATE_PANEL_MENU], "call" , JavaUtil.convertJavaToRuby(getRuby(), featureId), JavaUtil.convertJavaToRuby(getRuby(), menu)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onCreatePanelMenu(featureId, menu);
}
}
public android.view.View onCreatePanelView(int featureId) {
if (callbackProcs[CB_CREATE_PANEL_VIEW] != null) {
super.onCreatePanelView(featureId);
try {
return (android.view.View)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CREATE_PANEL_VIEW], "call" , JavaUtil.convertJavaToRuby(getRuby(), featureId)).toJava(android.view.View.class);
} catch (RaiseException re) {
re.printStackTrace();
return null;
}
} else {
return super.onCreatePanelView(featureId);
}
}
public boolean onCreateThumbnail(android.graphics.Bitmap outBitmap, android.graphics.Canvas canvas) {
if (callbackProcs[CB_CREATE_THUMBNAIL] != null) {
super.onCreateThumbnail(outBitmap, canvas);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CREATE_THUMBNAIL], "call" , JavaUtil.convertJavaToRuby(getRuby(), outBitmap), JavaUtil.convertJavaToRuby(getRuby(), canvas)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onCreateThumbnail(outBitmap, canvas);
}
}
public android.view.View onCreateView(java.lang.String name, android.content.Context context, android.util.AttributeSet attrs) {
if (callbackProcs[CB_CREATE_VIEW] != null) {
super.onCreateView(name, context, attrs);
try {
return (android.view.View)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CREATE_VIEW], "call" , JavaUtil.convertJavaToRuby(getRuby(), name), JavaUtil.convertJavaToRuby(getRuby(), context), JavaUtil.convertJavaToRuby(getRuby(), attrs)).toJava(android.view.View.class);
} catch (RaiseException re) {
re.printStackTrace();
return null;
}
} else {
return super.onCreateView(name, context, attrs);
}
}
public void onDestroy() {
if (callbackProcs[CB_DESTROY] != null) {
super.onDestroy();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_DESTROY], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onDestroy();
}
}
public boolean onKeyDown(int keyCode, android.view.KeyEvent event) {
if (callbackProcs[CB_KEY_DOWN] != null) {
super.onKeyDown(keyCode, event);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_KEY_DOWN], "call" , JavaUtil.convertJavaToRuby(getRuby(), keyCode), JavaUtil.convertJavaToRuby(getRuby(), event)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onKeyDown(keyCode, event);
}
}
public boolean onKeyMultiple(int keyCode, int repeatCount, android.view.KeyEvent event) {
if (callbackProcs[CB_KEY_MULTIPLE] != null) {
super.onKeyMultiple(keyCode, repeatCount, event);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_KEY_MULTIPLE], "call" , JavaUtil.convertJavaToRuby(getRuby(), keyCode), JavaUtil.convertJavaToRuby(getRuby(), repeatCount), JavaUtil.convertJavaToRuby(getRuby(), event)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onKeyMultiple(keyCode, repeatCount, event);
}
}
public boolean onKeyUp(int keyCode, android.view.KeyEvent event) {
if (callbackProcs[CB_KEY_UP] != null) {
super.onKeyUp(keyCode, event);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_KEY_UP], "call" , JavaUtil.convertJavaToRuby(getRuby(), keyCode), JavaUtil.convertJavaToRuby(getRuby(), event)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onKeyUp(keyCode, event);
}
}
public void onLowMemory() {
if (callbackProcs[CB_LOW_MEMORY] != null) {
super.onLowMemory();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_LOW_MEMORY], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onLowMemory();
}
}
public boolean onMenuItemSelected(int featureId, android.view.MenuItem item) {
if (callbackProcs[CB_MENU_ITEM_SELECTED] != null) {
super.onMenuItemSelected(featureId, item);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_MENU_ITEM_SELECTED], "call" , JavaUtil.convertJavaToRuby(getRuby(), featureId), JavaUtil.convertJavaToRuby(getRuby(), item)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onMenuItemSelected(featureId, item);
}
}
public boolean onMenuOpened(int featureId, android.view.Menu menu) {
if (callbackProcs[CB_MENU_OPENED] != null) {
super.onMenuOpened(featureId, menu);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_MENU_OPENED], "call" , JavaUtil.convertJavaToRuby(getRuby(), featureId), JavaUtil.convertJavaToRuby(getRuby(), menu)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onMenuOpened(featureId, menu);
}
}
public void onNewIntent(android.content.Intent intent) {
if (callbackProcs[CB_NEW_INTENT] != null) {
super.onNewIntent(intent);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_NEW_INTENT], "call" , JavaUtil.convertJavaToRuby(getRuby(), intent));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onNewIntent(intent);
}
}
public boolean onOptionsItemSelected(android.view.MenuItem item) {
if (callbackProcs[CB_OPTIONS_ITEM_SELECTED] != null) {
super.onOptionsItemSelected(item);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_OPTIONS_ITEM_SELECTED], "call" , JavaUtil.convertJavaToRuby(getRuby(), item)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onOptionsItemSelected(item);
}
}
public void onOptionsMenuClosed(android.view.Menu menu) {
if (callbackProcs[CB_OPTIONS_MENU_CLOSED] != null) {
super.onOptionsMenuClosed(menu);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_OPTIONS_MENU_CLOSED], "call" , JavaUtil.convertJavaToRuby(getRuby(), menu));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onOptionsMenuClosed(menu);
}
}
public void onPanelClosed(int featureId, android.view.Menu menu) {
if (callbackProcs[CB_PANEL_CLOSED] != null) {
super.onPanelClosed(featureId, menu);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_PANEL_CLOSED], "call" , JavaUtil.convertJavaToRuby(getRuby(), featureId), JavaUtil.convertJavaToRuby(getRuby(), menu));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onPanelClosed(featureId, menu);
}
}
public void onPause() {
if (callbackProcs[CB_PAUSE] != null) {
super.onPause();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_PAUSE], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onPause();
}
}
public void onPostCreate(android.os.Bundle savedInstanceState) {
if (callbackProcs[CB_POST_CREATE] != null) {
super.onPostCreate(savedInstanceState);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_POST_CREATE], "call" , JavaUtil.convertJavaToRuby(getRuby(), savedInstanceState));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onPostCreate(savedInstanceState);
}
}
public void onPostResume() {
if (callbackProcs[CB_POST_RESUME] != null) {
super.onPostResume();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_POST_RESUME], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onPostResume();
}
}
public void onPrepareDialog(int id, android.app.Dialog dialog) {
if (callbackProcs[CB_PREPARE_DIALOG] != null) {
super.onPrepareDialog(id, dialog);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_PREPARE_DIALOG], "call" , JavaUtil.convertJavaToRuby(getRuby(), id), JavaUtil.convertJavaToRuby(getRuby(), dialog));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onPrepareDialog(id, dialog);
}
}
public boolean onPrepareOptionsMenu(android.view.Menu menu) {
if (callbackProcs[CB_PREPARE_OPTIONS_MENU] != null) {
super.onPrepareOptionsMenu(menu);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_PREPARE_OPTIONS_MENU], "call" , JavaUtil.convertJavaToRuby(getRuby(), menu)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onPrepareOptionsMenu(menu);
}
}
public boolean onPreparePanel(int featureId, android.view.View view, android.view.Menu menu) {
if (callbackProcs[CB_PREPARE_PANEL] != null) {
super.onPreparePanel(featureId, view, menu);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_PREPARE_PANEL], "call" , JavaUtil.convertJavaToRuby(getRuby(), featureId), JavaUtil.convertJavaToRuby(getRuby(), view), JavaUtil.convertJavaToRuby(getRuby(), menu)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onPreparePanel(featureId, view, menu);
}
}
public void onRestart() {
if (callbackProcs[CB_RESTART] != null) {
super.onRestart();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_RESTART], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onRestart();
}
}
public void onRestoreInstanceState(android.os.Bundle savedInstanceState) {
if (callbackProcs[CB_RESTORE_INSTANCE_STATE] != null) {
super.onRestoreInstanceState(savedInstanceState);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_RESTORE_INSTANCE_STATE], "call" , JavaUtil.convertJavaToRuby(getRuby(), savedInstanceState));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onRestoreInstanceState(savedInstanceState);
}
}
public void onResume() {
if (callbackProcs[CB_RESUME] != null) {
super.onResume();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_RESUME], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onResume();
}
}
public java.lang.Object onRetainNonConfigurationInstance() {
if (callbackProcs[CB_RETAIN_NON_CONFIGURATION_INSTANCE] != null) {
super.onRetainNonConfigurationInstance();
try {
return (java.lang.Object)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_RETAIN_NON_CONFIGURATION_INSTANCE], "call" ).toJava(java.lang.Object.class);
} catch (RaiseException re) {
re.printStackTrace();
return null;
}
} else {
return super.onRetainNonConfigurationInstance();
}
}
public void onSaveInstanceState(android.os.Bundle outState) {
if (callbackProcs[CB_SAVE_INSTANCE_STATE] != null) {
super.onSaveInstanceState(outState);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_SAVE_INSTANCE_STATE], "call" , JavaUtil.convertJavaToRuby(getRuby(), outState));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onSaveInstanceState(outState);
}
}
public boolean onSearchRequested() {
if (callbackProcs[CB_SEARCH_REQUESTED] != null) {
super.onSearchRequested();
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_SEARCH_REQUESTED], "call" ).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onSearchRequested();
}
}
public void onStart() {
if (callbackProcs[CB_START] != null) {
super.onStart();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_START], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onStart();
}
}
public void onStop() {
if (callbackProcs[CB_STOP] != null) {
super.onStop();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_STOP], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onStop();
}
}
public void onTitleChanged(java.lang.CharSequence title, int color) {
if (callbackProcs[CB_TITLE_CHANGED] != null) {
super.onTitleChanged(title, color);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_TITLE_CHANGED], "call" , JavaUtil.convertJavaToRuby(getRuby(), title), JavaUtil.convertJavaToRuby(getRuby(), color));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onTitleChanged(title, color);
}
}
public boolean onTouchEvent(android.view.MotionEvent event) {
if (callbackProcs[CB_TOUCH_EVENT] != null) {
super.onTouchEvent(event);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_TOUCH_EVENT], "call" , JavaUtil.convertJavaToRuby(getRuby(), event)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onTouchEvent(event);
}
}
public boolean onTrackballEvent(android.view.MotionEvent event) {
if (callbackProcs[CB_TRACKBALL_EVENT] != null) {
super.onTrackballEvent(event);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_TRACKBALL_EVENT], "call" , JavaUtil.convertJavaToRuby(getRuby(), event)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onTrackballEvent(event);
}
}
public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams params) {
if (callbackProcs[CB_WINDOW_ATTRIBUTES_CHANGED] != null) {
super.onWindowAttributesChanged(params);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_WINDOW_ATTRIBUTES_CHANGED], "call" , JavaUtil.convertJavaToRuby(getRuby(), params));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onWindowAttributesChanged(params);
}
}
public void onWindowFocusChanged(boolean hasFocus) {
if (callbackProcs[CB_WINDOW_FOCUS_CHANGED] != null) {
super.onWindowFocusChanged(hasFocus);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_WINDOW_FOCUS_CHANGED], "call" , JavaUtil.convertJavaToRuby(getRuby(), hasFocus));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onWindowFocusChanged(hasFocus);
}
}
public void onUserInteraction() {
if (callbackProcs[CB_USER_INTERACTION] != null) {
super.onUserInteraction();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_USER_INTERACTION], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onUserInteraction();
}
}
public void onUserLeaveHint() {
if (callbackProcs[CB_USER_LEAVE_HINT] != null) {
super.onUserLeaveHint();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_USER_LEAVE_HINT], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onUserLeaveHint();
}
}
public void onAttachedToWindow() {
if (callbackProcs[CB_ATTACHED_TO_WINDOW] != null) {
super.onAttachedToWindow();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_ATTACHED_TO_WINDOW], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onAttachedToWindow();
}
}
public void onBackPressed() {
if (callbackProcs[CB_BACK_PRESSED] != null) {
super.onBackPressed();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_BACK_PRESSED], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onBackPressed();
}
}
public void onDetachedFromWindow() {
if (callbackProcs[CB_DETACHED_FROM_WINDOW] != null) {
super.onDetachedFromWindow();
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_DETACHED_FROM_WINDOW], "call" );
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onDetachedFromWindow();
}
}
public boolean onKeyLongPress(int keyCode, android.view.KeyEvent event) {
if (callbackProcs[CB_KEY_LONG_PRESS] != null) {
super.onKeyLongPress(keyCode, event);
try {
return (Boolean)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_KEY_LONG_PRESS], "call" , JavaUtil.convertJavaToRuby(getRuby(), keyCode), JavaUtil.convertJavaToRuby(getRuby(), event)).toJava(boolean.class);
} catch (RaiseException re) {
re.printStackTrace();
return false;
}
} else {
return super.onKeyLongPress(keyCode, event);
}
}
public android.app.Dialog onCreateDialog(int id, android.os.Bundle args) {
if (callbackProcs[CB_CREATE_DIALOG] != null) {
try {
return (android.app.Dialog)RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_CREATE_DIALOG], "call" , JavaUtil.convertJavaToRuby(getRuby(), id), JavaUtil.convertJavaToRuby(getRuby(), args)).toJava(android.app.Dialog.class);
} catch (RaiseException re) {
re.printStackTrace();
return null;
}
} else {
return null;
}
}
public void onPrepareDialog(int id, android.app.Dialog dialog, android.os.Bundle args) {
if (callbackProcs[CB_PREPARE_DIALOG] != null) {
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_PREPARE_DIALOG], "call" , JavaUtil.convertJavaToRuby(getRuby(), id), JavaUtil.convertJavaToRuby(getRuby(), dialog), JavaUtil.convertJavaToRuby(getRuby(), args));
} catch (RaiseException re) {
re.printStackTrace();
}
}
}
public void onApplyThemeResource(android.content.res.Resources.Theme theme, int resid, boolean first) {
if (callbackProcs[CB_APPLY_THEME_RESOURCE] != null) {
super.onApplyThemeResource(theme, resid, first);
try {
RuntimeHelpers.invoke(getRuby().getCurrentContext(), callbackProcs[CB_APPLY_THEME_RESOURCE], "call" , JavaUtil.convertJavaToRuby(getRuby(), theme), JavaUtil.convertJavaToRuby(getRuby(), resid), JavaUtil.convertJavaToRuby(getRuby(), first));
} catch (RaiseException re) {
re.printStackTrace();
}
} else {
super.onApplyThemeResource(theme, resid, first);
}
}
}
| [
"rscottmoyer@gmail.com"
] | rscottmoyer@gmail.com |
33addb07eff28dfac83716b2b184460679f560a2 | 834e84824640a5b1877bf734a92f1960e54c86d7 | /231300_Lab07/src/com/unicamp/mc322/lab07/frogy/entity/map/item/EmptyItem.java | aab80da04de3214c2aec3557cf5693452d00cb81 | [] | no_license | Andre-Satorres/MC-322-OOP | bb4dc03e239336add777dbe7d36c856f6d89e16c | 9570f70a1ee8515ac0aa7b946525d9239f2d10e5 | refs/heads/main | 2023-06-07T05:12:50.421176 | 2021-07-04T12:58:55 | 2021-07-04T12:58:55 | 363,712,943 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 340 | java | package com.unicamp.mc322.lab07.frogy.entity.map.item;
import com.unicamp.mc322.lab07.frogy.entity.frog.Frog;
import com.unicamp.mc322.lab07.frogy.entity.map.item.icon.Icon;
public class EmptyItem extends MapItem {
public EmptyItem(Icon icon) {
super(icon);
}
@Override
public void interactWith(Frog frog) { }
}
| [
"andre-satorres@andre-567.localdomain"
] | andre-satorres@andre-567.localdomain |
3a30d876504800ecde635d94808e432ad13316ee | 3ab1d532740e7afb52c6a0e3a2fd9de23b8ef6cc | /back-office/src/main/java/com/lianyu/tech/backoffice/web/controller/verify/LoginController.java | 447248f7c5a5d7683df4a5263fdfe863c8f853b9 | [
"Apache-2.0"
] | permissive | howbigbobo/com.lianyu.tech | a3c05055a2bbcfce0860c93f9ed009fa3eab06b0 | 15f64ec466d823e69cad4dc218285b48b106045c | refs/heads/master | 2021-01-10T10:08:09.986928 | 2015-12-01T15:00:13 | 2015-12-01T15:00:13 | 44,462,341 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,525 | java | package com.lianyu.tech.backoffice.web.controller.verify;
import com.lianyu.tech.backoffice.web.SessionConstants;
import com.lianyu.tech.backoffice.web.SiteContext;
import com.lianyu.tech.common.service.AccountService;
import com.lianyu.tech.core.platform.web.site.SiteController;
import com.lianyu.tech.core.platform.web.site.cookie.RequireCookie;
import com.lianyu.tech.core.platform.web.site.session.RequireSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import javax.inject.Inject;
@RequireCookie
@RequireSession
@Controller
public class LoginController extends SiteController {
@Inject
SiteContext siteContext;
@Inject
AccountService accountService;
@RequestMapping(value = "/login", method = RequestMethod.GET)
public String login() {
siteContext.addSession(SessionConstants.VERIFY_CODE_IMG, "");
return "login";
}
@RequestMapping(value = "/logout", method = RequestMethod.GET)
public String loginOut() {
siteContext.logout();
return "redirect:/login";
}
// @RequestMapping(value = "/addUser", method = RequestMethod.GET)
// public String addUser(@RequestParam("name") String name, @RequestParam("pwd") String pwd) {
// Account account = new Account();
// account.setName(name);
// account.setPwd(pwd);
// accountService.add(account);
// return "login";
// }
}
| [
"howbigbobo@live.com"
] | howbigbobo@live.com |
4e5df34325172d6bc30eb28691cf577bf3f66728 | 4c53f1c2b38ab97531be88828cbae38e3aa5e951 | /chrome/android/java/src/org/chromium/chrome/browser/toolbar/MenuButton.java | b53f775d0b5ce105338f879c5aefb4e10828f7c9 | [
"BSD-3-Clause"
] | permissive | piotrzarycki/chromium | 7d1e8c688986d962eecbd1b5d2ca93e1d167bd29 | f9965cd785ea5898a2f84d9a7c05054922e02988 | refs/heads/master | 2023-02-26T03:58:58.895546 | 2019-11-13T18:09:45 | 2019-11-13T18:09:45 | 221,524,087 | 1 | 0 | BSD-3-Clause | 2019-11-13T18:19:59 | 2019-11-13T18:19:59 | null | UTF-8 | Java | false | false | 14,693 | java | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.toolbar;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.ColorStateList;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.DrawableRes;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ThemeColorProvider;
import org.chromium.chrome.browser.ThemeColorProvider.TintObserver;
import org.chromium.chrome.browser.appmenu.AppMenuButtonHelper;
import org.chromium.chrome.browser.flags.FeatureUtilities;
import org.chromium.chrome.browser.omaha.UpdateMenuItemHelper;
import org.chromium.chrome.browser.omaha.UpdateMenuItemHelper.MenuButtonState;
import org.chromium.chrome.browser.ui.widget.animation.Interpolators;
import org.chromium.chrome.browser.ui.widget.highlight.PulseDrawable;
import org.chromium.ui.interpolators.BakedBezierInterpolator;
/**
* The overflow menu button.
*/
public class MenuButton extends FrameLayout implements TintObserver {
/** The {@link ImageButton} for the menu button. */
private ImageButton mMenuImageButton;
/** The view for the update badge. */
private ImageView mUpdateBadgeView;
private boolean mUseLightDrawables;
private AppMenuButtonHelper mAppMenuButtonHelper;
private boolean mHighlightingMenu;
private PulseDrawable mHighlightDrawable;
private boolean mSuppressAppMenuUpdateBadge;
private AnimatorSet mMenuBadgeAnimatorSet;
private boolean mIsMenuBadgeAnimationRunning;
/** A provider that notifies components when the theme color changes.*/
private ThemeColorProvider mThemeColorProvider;
/** The menu button text label. */
private TextView mLabel;
/** The wrapper View that contains the menu button and the label. */
private View mWrapper;
public MenuButton(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mMenuImageButton = findViewById(R.id.menu_button);
mUpdateBadgeView = findViewById(R.id.menu_badge);
}
public void setAppMenuButtonHelper(AppMenuButtonHelper appMenuButtonHelper) {
mAppMenuButtonHelper = appMenuButtonHelper;
View touchView = mWrapper != null ? mWrapper : mMenuImageButton;
if (mWrapper != null) mWrapper.setOnTouchListener(mAppMenuButtonHelper);
mMenuImageButton.setOnTouchListener(mAppMenuButtonHelper);
touchView.setAccessibilityDelegate(mAppMenuButtonHelper.getAccessibilityDelegate());
}
public AppMenuButtonHelper getAppMenuButtonHelper() {
return mAppMenuButtonHelper;
}
public View getMenuBadge() {
return mUpdateBadgeView;
}
public ImageButton getImageButton() {
return mMenuImageButton;
}
/**
* @param wrapper The wrapping View of this button.
*/
public void setWrapperView(ViewGroup wrapper) {
mWrapper = wrapper;
mWrapper.setOnClickListener(null);
mLabel = mWrapper.findViewById(R.id.menu_button_label);
if (FeatureUtilities.isLabeledBottomToolbarEnabled()) mLabel.setVisibility(View.VISIBLE);
}
/**
* Sets the update badge to visible.
*
* @param visible Whether the update badge should be visible. Always sets visibility to GONE
* if the update type does not require a badge.
* TODO(crbug.com/865801): Clean this up when MenuButton and UpdateMenuItemHelper is MVCed.
*/
private void setUpdateBadgeVisibility(boolean visible) {
mUpdateBadgeView.setVisibility(visible ? View.VISIBLE : View.GONE);
if (visible) updateImageResources();
updateContentDescription(visible);
}
private void updateImageResources() {
MenuButtonState buttonState = UpdateMenuItemHelper.getInstance().getUiState().buttonState;
if (buttonState == null) return;
@DrawableRes
int drawable = mUseLightDrawables ? buttonState.lightBadgeIcon : buttonState.darkBadgeIcon;
mUpdateBadgeView.setImageDrawable(
ApiCompatibilityUtils.getDrawable(getResources(), drawable));
}
/**
* Show the update badge on the app menu button.
* @param animate Whether to animate the showing of the update badge.
*/
public void showAppMenuUpdateBadgeIfAvailable(boolean animate) {
if (mUpdateBadgeView == null || mMenuImageButton == null || mSuppressAppMenuUpdateBadge
|| !isBadgeAvailable()) {
return;
}
updateImageResources();
updateContentDescription(true);
if (!animate || mIsMenuBadgeAnimationRunning) {
setUpdateBadgeVisibility(true);
return;
}
// Set initial states.
mUpdateBadgeView.setAlpha(0.f);
mUpdateBadgeView.setVisibility(View.VISIBLE);
mMenuBadgeAnimatorSet = createShowUpdateBadgeAnimation(mMenuImageButton, mUpdateBadgeView);
mMenuBadgeAnimatorSet.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
mIsMenuBadgeAnimationRunning = true;
}
@Override
public void onAnimationEnd(Animator animation) {
mIsMenuBadgeAnimationRunning = false;
}
@Override
public void onAnimationCancel(Animator animation) {
mIsMenuBadgeAnimationRunning = false;
}
});
mMenuBadgeAnimatorSet.start();
}
/**
* Remove the update badge on the app menu button.
* @param animate Whether to animate the hiding of the update badge.
*/
public void removeAppMenuUpdateBadge(boolean animate) {
if (mUpdateBadgeView == null || !isShowingAppMenuUpdateBadge()) return;
updateContentDescription(false);
if (!animate) {
setUpdateBadgeVisibility(false);
return;
}
if (mIsMenuBadgeAnimationRunning && mMenuBadgeAnimatorSet != null) {
mMenuBadgeAnimatorSet.cancel();
}
// Set initial states.
mMenuImageButton.setAlpha(0.f);
mMenuBadgeAnimatorSet = createHideUpdateBadgeAnimation(mMenuImageButton, mUpdateBadgeView);
mMenuBadgeAnimatorSet.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
mIsMenuBadgeAnimationRunning = true;
}
@Override
public void onAnimationEnd(Animator animation) {
mIsMenuBadgeAnimationRunning = false;
}
@Override
public void onAnimationCancel(Animator animation) {
mIsMenuBadgeAnimationRunning = false;
}
});
mMenuBadgeAnimatorSet.start();
}
/**
* @param suppress Whether to prevent the update badge from being show. This is currently only
* used to prevent the badge from being shown in the tablet tab switcher.
*/
public void setAppMenuUpdateBadgeSuppressed(boolean suppress) {
mSuppressAppMenuUpdateBadge = suppress;
if (mSuppressAppMenuUpdateBadge) {
removeAppMenuUpdateBadge(false);
} else {
showAppMenuUpdateBadgeIfAvailable(false);
}
}
/**
* @return Whether the update badge is showing.
*/
public boolean isShowingAppMenuUpdateBadge() {
return mUpdateBadgeView.getVisibility() == View.VISIBLE;
}
private static boolean isBadgeAvailable() {
return UpdateMenuItemHelper.getInstance().getUiState().buttonState != null;
}
/**
* Sets the content description for the menu button.
* @param isUpdateBadgeVisible Whether the update menu badge is visible.
*/
private void updateContentDescription(boolean isUpdateBadgeVisible) {
if (isUpdateBadgeVisible) {
MenuButtonState buttonState =
UpdateMenuItemHelper.getInstance().getUiState().buttonState;
assert buttonState != null : "No button state when trying to show the badge.";
mMenuImageButton.setContentDescription(
getResources().getString(buttonState.menuContentDescription));
} else {
mMenuImageButton.setContentDescription(
getResources().getString(R.string.accessibility_toolbar_btn_menu));
}
}
/**
* Sets the menu button's background depending on whether or not we are highlighting and whether
* or not we are using light or dark assets.
*/
public void setMenuButtonHighlightDrawable() {
// Return if onFinishInflate didn't finish
if (mMenuImageButton == null) return;
if (mHighlightingMenu) {
if (mHighlightDrawable == null) {
mHighlightDrawable = PulseDrawable.createCircle(getContext());
mHighlightDrawable.setInset(ViewCompat.getPaddingStart(mMenuImageButton),
mMenuImageButton.getPaddingTop(),
ViewCompat.getPaddingEnd(mMenuImageButton),
mMenuImageButton.getPaddingBottom());
}
mHighlightDrawable.setUseLightPulseColor(
getContext().getResources(), mUseLightDrawables);
setBackground(mHighlightDrawable);
mHighlightDrawable.start();
} else {
setBackground(null);
}
}
public void setMenuButtonHighlight(boolean highlight) {
mHighlightingMenu = highlight;
setMenuButtonHighlightDrawable();
}
public void setThemeColorProvider(ThemeColorProvider themeColorProvider) {
mThemeColorProvider = themeColorProvider;
mThemeColorProvider.addTintObserver(this);
}
@Override
public void onTintChanged(ColorStateList tintList, boolean useLight) {
ApiCompatibilityUtils.setImageTintList(mMenuImageButton, tintList);
mUseLightDrawables = useLight;
updateImageResources();
if (mLabel != null) mLabel.setTextColor(tintList);
}
public void destroy() {
if (mThemeColorProvider != null) {
mThemeColorProvider.removeTintObserver(this);
mThemeColorProvider = null;
}
}
/**
* Creates an {@link AnimatorSet} for showing the update badge that is displayed on top
* of the app menu button.
*
* @param menuButton The {@link View} containing the app menu button.
* @param menuBadge The {@link View} containing the update badge.
* @return An {@link AnimatorSet} to run when showing the update badge.
*/
private static AnimatorSet createShowUpdateBadgeAnimation(
final View menuButton, final View menuBadge) {
// Create badge ObjectAnimators.
ObjectAnimator badgeFadeAnimator = ObjectAnimator.ofFloat(menuBadge, View.ALPHA, 1.f);
badgeFadeAnimator.setInterpolator(BakedBezierInterpolator.FADE_IN_CURVE);
int pixelTranslation = menuBadge.getResources().getDimensionPixelSize(
R.dimen.menu_badge_translation_y_distance);
ObjectAnimator badgeTranslateYAnimator =
ObjectAnimator.ofFloat(menuBadge, View.TRANSLATION_Y, pixelTranslation, 0.f);
badgeTranslateYAnimator.setInterpolator(BakedBezierInterpolator.TRANSFORM_CURVE);
// Create menu button ObjectAnimator.
ObjectAnimator menuButtonFadeAnimator = ObjectAnimator.ofFloat(menuButton, View.ALPHA, 0.f);
menuButtonFadeAnimator.setInterpolator(Interpolators.LINEAR_INTERPOLATOR);
// Create AnimatorSet and listeners.
AnimatorSet set = new AnimatorSet();
set.playTogether(badgeFadeAnimator, badgeTranslateYAnimator, menuButtonFadeAnimator);
set.setDuration(350);
set.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
// Make sure the menu button is visible again.
menuButton.setAlpha(1.f);
}
@Override
public void onAnimationCancel(Animator animation) {
// Jump to the end state if the animation is canceled.
menuBadge.setAlpha(1.f);
menuBadge.setTranslationY(0.f);
menuButton.setAlpha(1.f);
}
});
return set;
}
/**
* Creates an {@link AnimatorSet} for hiding the update badge that is displayed on top
* of the app menu button.
*
* @param menuButton The {@link View} containing the app menu button.
* @param menuBadge The {@link View} containing the update badge.
* @return An {@link AnimatorSet} to run when hiding the update badge.
*/
private static AnimatorSet createHideUpdateBadgeAnimation(
final View menuButton, final View menuBadge) {
// Create badge ObjectAnimator.
ObjectAnimator badgeFadeAnimator = ObjectAnimator.ofFloat(menuBadge, View.ALPHA, 0.f);
badgeFadeAnimator.setInterpolator(BakedBezierInterpolator.FADE_OUT_CURVE);
// Create menu button ObjectAnimator.
ObjectAnimator menuButtonFadeAnimator = ObjectAnimator.ofFloat(menuButton, View.ALPHA, 1.f);
menuButtonFadeAnimator.setInterpolator(BakedBezierInterpolator.FADE_IN_CURVE);
// Create AnimatorSet and listeners.
AnimatorSet set = new AnimatorSet();
set.playTogether(badgeFadeAnimator, menuButtonFadeAnimator);
set.setDuration(200);
set.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
menuBadge.setVisibility(View.GONE);
}
@Override
public void onAnimationCancel(Animator animation) {
// Jump to the end state if the animation is canceled.
menuButton.setAlpha(1.f);
menuBadge.setVisibility(View.GONE);
}
});
return set;
}
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
c43c8a5ed47aab67fb97eb0a00224eb93b860dfe | 2582f4ebefff607f36939ef9d28b2ca9d0e39792 | /RemoraidSocialNetwork/src/main/java/es/uco/iw/mvc/modelo/data/clienteTiburonToro/gestCTT/GestSkillCtt.java | e93a50c6bc4583ca3ea1b181790e5f314b346f19 | [] | no_license | i82egjur/Ingenieria-Web | 3a84f8ab31e7318329413c0182fff111e9c4c260 | 3d5d8039645df4f0f4a96764a2ba9329e00902b9 | refs/heads/main | 2023-05-13T23:59:39.098122 | 2021-05-20T11:45:58 | 2021-05-20T11:45:58 | 344,528,455 | 2 | 3 | null | 2021-03-04T16:28:21 | 2021-03-04T15:54:26 | null | UTF-8 | Java | false | false | 307 | java | package es.uco.iw.mvc.modelo.data.clienteTiburonToro.gestCTT;
import java.util.Vector;
public interface GestSkillCtt
{
public void addSkill(String mail, Vector <String> skill);
public void deleteSkill(String mail, Vector <String> skill);
public Vector <String> getSkillsRemora(String mail);
}
| [
"i82gapop@uco.es"
] | i82gapop@uco.es |
5cb7f66fb8d48f4676da0ba762a24f06e90429da | dbfe40b6b87124fcb1a89906a2fe6518eda8665e | /eMayorWebTier/src/org/apache/struts/tiles/FactoryNotFoundException.java | 7aa1f3802f98360bc129041574dcc0140a24ac13 | [] | no_license | BackupTheBerlios/emayor | 1fc04a0411908b6c189b5dfaa1e11f9d25c37884 | daa5627cbf1461323fef5771c23bb16c66ad02aa | refs/heads/master | 2016-09-06T19:26:16.110107 | 2006-05-04T07:27:38 | 2006-05-04T07:27:38 | 40,069,904 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,128 | java | /*
* $Id: FactoryNotFoundException.java,v 1.1 2005/11/16 10:51:49 emayor Exp $
*
* Copyright 1999-2004 The Apache Software 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.apache.struts.tiles;
/**
* Exception thrown when definitions factory is not found.
*/
public class FactoryNotFoundException extends DefinitionsFactoryException
{
/**
* Constructor.
*/
public FactoryNotFoundException()
{
super();
}
/**
* Constructor.
* @param msg Message.
*/
public FactoryNotFoundException( String msg )
{
super(msg);
}
}
| [
"emayor"
] | emayor |
463b147bceca220226d05eccc6285e369eb5c9ce | ddb4dd6aaa8fa61843c0ef95db5e6fc6c96608ca | /4.Collections/task3811/Ticket.java | a61bf470610bbad740fbf8fbc187ff12f230d32a | [] | no_license | NataliaPravitel/JavaRushGitRepository | bf4ad968ee34fad26db58f30afae5b6b5b1a773a | f6fd61a51ae32a2940ec97effb82a7cc98158dd0 | refs/heads/master | 2021-09-19T11:08:23.437860 | 2021-09-10T13:48:16 | 2021-09-10T13:48:16 | 238,951,950 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,166 | java | package com.javarush.task.task38.task3811;
//Реализуй в отдельном файле аннотацию Ticket.
//
//Требования к ней следующие:
//1) Должна быть публичная и доступна во время выполнения программы.
//2) Применяться может только к новым типам данных (Class, interface (including annotation type), or enum declaration).
//3) Должна содержать enum Priority c элементами LOW, MEDIUM, HIGH.
//4) Приоритет будет задавать свойство priority - по умолчанию Priority.MEDIUM.
//5) Свойство tags будет массивом строк и будет хранить теги связанные с тикетом.
//6) Свойство createdBy будет строкой - по умолчанию Amigo.
//
//
//Requirements:
//1. Аннотация Ticket должна быть публичная и доступна во время выполнения программы.
//2. Аннотация Ticket должна применяться только к новым типам данных.
//3. Аннотация Ticket должна содержать enum Priority c элементами LOW, MEDIUM, HIGH.
//4. Аннотация Ticket должна содержать свойство priority - по умолчанию Priority.MEDIUM.
//5. Аннотация Ticket должна содержать свойство tags - массив строк, пустой по умолчанию.
//6. Аннотация Ticket должна содержать свойство createdBy - строку, равную "Amigo" по умолчанию.
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Ticket {
enum Priority {
LOW, MEDIUM, HIGH
}
Priority priority() default Priority.MEDIUM;
String[] tags() default {};
String createdBy() default "Amigo";
}
| [
"natalia.lvova1990@gmail.com"
] | natalia.lvova1990@gmail.com |
996916945b892098254c76c417504ab79c02a298 | f737d34684afee17aceab731431d98672026654a | /JAVA/day09_collection_io/src/ex04/io/KeyInput.java | 3e5a3dca3ceac156b545211645286d26b9954c63 | [] | no_license | kimmjen/ION_KOSA | 8b5009d479dc9d6d0c04c937220837416a080a37 | fca21d2d52a8b22ba5d512a4a4a7b44463914bfe | refs/heads/master | 2023-08-23T06:58:45.292631 | 2021-10-15T08:00:58 | 2021-10-15T08:00:58 | 399,995,833 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 377 | java | package ex04.io;
import java.io.IOException;
public class KeyInput {
public static void main(String[] args)
throws IOException { // 예외 처리 위임
int su1 = 0, su2 = 0;
System.out.println("데이터 입력 끝은 Crtl + Z 누르세요.");
while((su1 = System.in.read()) != -1) {
System.out.print((char) su1 + "\t");
}
System.out.println();
}
}
| [
"wpals814@gmail.com"
] | wpals814@gmail.com |
cc3fc1408738aba00cec2eb20d527338c63cf179 | afe0c345b0e36e8c3ed7774bb8d2498df412275b | /src/Forme/Polja/Listeneri/ClickTbl.java | a734f93d8b53cb50b7ddf760c8cbe68f5d4d4376 | [] | no_license | klapnebojsa/kese22 | 82dea774bc1ab118ece4cd5b209de075c8bbc6b9 | 8f224bfcc653edfd4bf83cba9f44e8f804d520f6 | refs/heads/master | 2016-09-06T02:08:49.331480 | 2015-07-30T01:53:33 | 2015-07-30T01:53:33 | 39,925,763 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,654 | 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 Forme.Polja.Listeneri;
import Forme.Konstante.FunkcijskiTasteri;
import Forme.Polja.Prikazi.PoljaIzTabeleDefinicija;
import Forme.Polja.Prikazi.PoljaIzTabeleNapuni;
import Forme.PopUpovi.TablePopUp;
import Forme.Tabele.MojaTabela;
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JMenuItem;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
/**
*
* @author Nebojsa
*/
public class ClickTbl{
JMenuItem menuItemNovi;
JMenuItem menuItemIzmeni;
public void TableClick(final MojaTabela mt1, final PoljaIzTabeleDefinicija poljaIzTabele, final int[] kljucevi, final int[] poljaDisabled) {
//MouseClick na tabelu ili up-down
mt1.getTable().getSelectionModel().addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent event) {
try {
PoljaIzTabeleNapuni poljaIzTabeleNapuni = new PoljaIzTabeleNapuni(mt1, poljaIzTabele);
poljaIzTabeleNapuni.Napuni();
mt1.getModel().setSelectRow(mt1.getTable().getSelectedRow());
mt1.getModel().setSelectCell(mt1.getTable().getSelectedColumn());
} catch (Exception e) {
}
}
}
);
mt1.getTable().addMouseListener(new MouseAdapter() {
//Mouse double click
@Override
public void mousePressed(MouseEvent me) {
if (me.getClickCount() == 2 && me.getButton() == MouseEvent.BUTTON1) {
FunkcijskiTasteri ft = new FunkcijskiTasteri();
Robot robot = null;
try {robot = new Robot();
} catch (AWTException ex) {Logger.getLogger(TablePopUp.class.getName()).log(Level.SEVERE, null, ex);}
robot.keyPress(ft.getFtIspravi());
}
//Mouse right click
if ( me.getButton() == MouseEvent.BUTTON3){
TablePopUp tablePopUp = new TablePopUp(mt1, me);
tablePopUp.rightClick();
}
}
});
}
}
| [
"klapnebojsa@gmail.com"
] | klapnebojsa@gmail.com |
b07dff431cf91af3de436fe263a8756844fb3138 | 119496e37ba1f4461f573d6718f6b20e46d6f6e9 | /percolation/PercolationVisualizer.java | 52b7aa15addbdf2709850d953abef0c6c409c709 | [] | no_license | projectaki/Percolation-princeton-course | de89120c43f29e83a4cd141f9e8e4cab7619f743 | cedb2955f085bd70802c931d1510b5d5a4c3efcc | refs/heads/master | 2022-11-29T22:01:20.824377 | 2020-08-15T12:08:12 | 2020-08-15T12:08:12 | 287,387,254 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,027 | java | /******************************************************************************
* Compilation: javac PercolationVisualizer.java
* Execution: java PercolationVisualizer input.txt
* Dependencies: Percolation.java
*
* This program takes the name of a file as a command-line argument.
* From that file, it
*
* - Reads the grid size n of the percolation system.
* - Creates an n-by-n grid of sites (intially all blocked)
* - Reads in a sequence of sites (row i, column j) to open.
*
* After each site is opened, it draws full sites in light blue,
* open sites (that aren't full) in white, and blocked sites in black,
* with with site (1, 1) in the upper left-hand corner.
*
******************************************************************************/
import edu.princeton.cs.algs4.In;
import edu.princeton.cs.algs4.StdDraw;
import java.awt.Font;
public class PercolationVisualizer {
// delay in miliseconds (controls animation speed)
private static final int DELAY = 100;
// draw n-by-n percolation system
public static void draw(Percolation perc, int n) {
StdDraw.clear();
StdDraw.setPenColor(StdDraw.BLACK);
StdDraw.setXscale(-0.05 * n, 1.05 * n);
StdDraw.setYscale(-0.05 * n, 1.05 * n); // leave a border to write text
StdDraw.filledSquare(n / 2.0, n / 2.0, n / 2.0);
// draw n-by-n grid
int opened = 0;
for (int row = 1; row <= n; row++) {
for (int col = 1; col <= n; col++) {
if (perc.isFull(row, col)) {
StdDraw.setPenColor(StdDraw.PINK);
opened++;
}
else if (perc.isOpen(row, col)) {
StdDraw.setPenColor(StdDraw.WHITE);
opened++;
}
else
StdDraw.setPenColor(StdDraw.BLACK);
StdDraw.filledSquare(col - 0.5, n - row + 0.5, 0.45);
}
}
// write status text
StdDraw.setFont(new Font("SansSerif", Font.PLAIN, 12));
StdDraw.setPenColor(StdDraw.BLACK);
StdDraw.text(0.25 * n, -0.025 * n, opened + " open sites");
if (perc.percolates()) StdDraw.text(0.75 * n, -0.025 * n, "percolates");
else StdDraw.text(0.75 * n, -0.025 * n, "does not percolate");
}
public static void main(String[] args) {
In in = new In(args[0]); // input file
int n = in.readInt(); // n-by-n percolation system
// turn on animation mode
StdDraw.enableDoubleBuffering();
// repeatedly read in sites to open and draw resulting system
Percolation perc = new Percolation(n);
draw(perc, n);
StdDraw.show();
StdDraw.pause(DELAY);
while (!in.isEmpty()) {
int i = in.readInt();
int j = in.readInt();
perc.open(i, j);
draw(perc, n);
StdDraw.show();
StdDraw.pause(DELAY);
}
}
}
| [
"akosegypro@gmail.com"
] | akosegypro@gmail.com |
c7750f7e36105e20ee577f276c431e6b5fbf68b7 | c4df65aad78427d821b520d80486997732a5349b | /src/main/java/com/daling/test/AnimalEvent.java | a71d372109f9f867b83710ed3621293f81499d08 | [] | no_license | tanhuaqiang/mycode | 810572fd77f42157f3bf5f4fc810543aa324d7b6 | 4f563787a26c2ca0f64869531370afe1111ed329 | refs/heads/master | 2023-08-15T11:36:48.380828 | 2022-07-07T11:58:44 | 2022-07-07T11:58:44 | 242,457,185 | 1 | 0 | null | 2023-07-23T06:31:57 | 2020-02-23T04:39:16 | Java | UTF-8 | Java | false | false | 502 | java | package com.daling.test;
import org.springframework.context.ApplicationEvent;
/**
* 当需要创建自定义事件时,可以新建一个继承自ApplicationEvent抽象类的类
*/
public class AnimalEvent extends ApplicationEvent {
private String name;
public String getName() {
return name;
}
public AnimalEvent(Object source, String name) {
super(source);
this.name = name;
}
public AnimalEvent(Object source) {
super(source);
}
} | [
"tanhuaqiang@meituan.com"
] | tanhuaqiang@meituan.com |
593cddb3d642db180f1d84b699384548a3956ffa | f670d771dcbdf42d33466ca35b6cba8f0ce247b6 | /src/Exercise8.java | 90cf128da34ef5d6cb559fccf01a64fdae7b3c4b | [] | no_license | MusienkoYuriy97/tms-homework3 | e580a98a764de936d946bf98d57abd348b4e1616 | dd248c8c05f2b70d4c60aca7c9e7b3759baea951 | refs/heads/master | 2023-04-03T02:25:22.109030 | 2021-04-10T11:17:07 | 2021-04-10T11:17:07 | 356,557,894 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 929 | java | import java.util.Arrays;
import java.util.Random;
public class Exercise8 {
public static void main(String[] args) {
int myArray[] = new int[7];
int maxElement;
int index_maxElement = 0;
Random random = new Random();
for (int i = 0; i < myArray.length; i++) {
myArray[i] = random.nextInt(4);
}
System.out.println(Arrays.toString(myArray) + " - Исходный массив");
maxElement = myArray[0];
for (int i = 1; i < myArray.length; i++) {
if (myArray[i] > maxElement){
maxElement = myArray[i];
index_maxElement = i;
}
}
myArray[index_maxElement] = myArray[0];
myArray[0] = maxElement;
System.out.println(Arrays.toString(myArray) + " - Массив после замены макс эл-та на эл. с 0-вым индексом");
}
}
| [
"97musienko@gmail.com"
] | 97musienko@gmail.com |
17947b83db14ba1f915fe2062caf8d72f9e88432 | 38f4db9739a1a20d66cfe905efd5fadad6e5ff77 | /pixeldungeon/src/main/java/com/johngohce/phoenixpd/sprites/MobSprite.java | 0dc4b9589999c39b2f861a8a85c7db176140fbfb | [] | no_license | gohjohn/phoenix-pixel-dugeon | faa3113652390d312b0838aa9ae19b790bff0a78 | de8e39e5c1686c004a92df54f668c28904513f4b | refs/heads/master | 2021-07-11T03:09:15.327037 | 2017-10-09T12:31:16 | 2017-10-09T12:31:16 | 106,283,187 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,123 | java | /*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.johngohce.phoenixpd.sprites;
import com.johngohce.noosa.TextureFilm;
import com.johngohce.noosa.tweeners.AlphaTweener;
import com.johngohce.noosa.tweeners.ScaleTweener;
import com.johngohce.phoenixpd.DungeonTilemap;
import com.johngohce.phoenixpd.actors.mobs.Mob;
import com.johngohce.utils.PointF;
import com.johngohce.utils.Random;
public class MobSprite extends CharSprite {
private static final float FADE_TIME = 3f;
private static final float FALL_TIME = 1f;
public TextureFilm frames = null;
@Override
public void update() {
sleeping = ch != null && ((Mob)ch).state == ((Mob)ch).SLEEPING;
super.update();
}
@Override
public void onComplete( Animation anim ) {
super.onComplete( anim );
if (anim == die) {
parent.add( new AlphaTweener( this, 0, FADE_TIME ) {
@Override
protected void onComplete() {
MobSprite.this.killAndErase();
parent.erase( this );
};
} );
}
}
public void fall() {
origin.set( width / 2, height - DungeonTilemap.SIZE / 2 );
angularSpeed = Random.Int( 2 ) == 0 ? -720 : 720;
parent.add( new ScaleTweener( this, new PointF( 0, 0 ), FALL_TIME ) {
@Override
protected void onComplete() {
MobSprite.this.killAndErase();
parent.erase( this );
};
@Override
protected void updateValues( float progress ) {
super.updateValues( progress );
am = 1 - progress;
}
} );
}
}
| [
"john.goh.ce@gmail.com"
] | john.goh.ce@gmail.com |
6b859158f9832f17e6f0e1e732fe77f7a63189f9 | 091cfec10fa39217df522ead328cdd9834ad1ff7 | /LAB/src/lab6/Line.java | a84692049bc7dc982b810ea8117a0eccc9fd6fc4 | [] | no_license | SatyamRaghuwanshi/SATYAM_CAPG1218JA1670 | b3af79e1fdfbae5f6ac358d63782ec695348ef66 | ba431a6ac551c16edaf92fdfb5b30694375a4e17 | refs/heads/master | 2022-12-23T09:58:34.874754 | 2020-08-28T05:36:35 | 2020-08-28T05:36:35 | 179,617,476 | 0 | 0 | null | 2022-05-25T06:38:21 | 2019-04-05T04:11:45 | Java | UTF-8 | Java | false | false | 552 | java | package lab6;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
public class Line {
public static void main(String args[])
{
File f=new File("E:\\hell.java");
try {
FileReader fr=new FileReader(f);
BufferedReader br=new BufferedReader(fr);
String str="";
int count=1;
while((str=br.readLine())!=null)
{
System.out.println(count+" "+str);
count++;
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
| [
"noreply@github.com"
] | noreply@github.com |
a26331b06aa9ada1d2d2713ead8f47a448f6bd34 | 3812f362a25e7b507a811d604db82349767975f4 | /Desktop/minecraft-mod-dev/my-mod-src/Pasta.java | 4af1d327328a3245d1c5dd37bb67d789989138c0 | [] | no_license | Neil5043/KnackCraft | 9c84e4b18a70640affe554e9e8b018316da2c27a | ad10338af3a826e1a10b0104c1ea868034ed238e | refs/heads/master | 2020-06-08T20:45:00.997772 | 2013-05-21T04:03:18 | 2013-05-21T04:03:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,221 | java | import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import neil.lib.refrence.Refrence;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityEggInfo;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@Mod( modid = Refrence.MOD_ID, name = Refrence.MOD_NAME, version = Refrence.VERSION)
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Pasta
{
public static final String modid = "pasta";
public static Block CheeseBlock;
public static Item CheeseItem;
@SidedProxy(clientSide="ClientProxy", serverSide="CommonProxy")
public static CommonProxy proxy;
public static int startEntityId = 300;
@Init
public void Init(FMLInitializationEvent event)
{
EntityRegistry.registerModEntity(EntityCheeseMonster.class, "Cheese Monster", 1, this, 80, 3, true);
LanguageRegistry.instance().addStringLocalization("entity.CheeseMonster_Pasta.CheeseMonster.name", "Cheese Monster");
CheeseBlock = new BlockCheese(254, Material.rock).setUnlocalizedName("CheeseBlock");
EntityRegistry.addSpawn(EntityCheeseMonster.class, 10, 4, 4, EnumCreatureType.monster);
GameRegistry.registerBlock(CheeseBlock, modid + CheeseBlock.getUnlocalizedName());
LanguageRegistry.addName(CheeseBlock, "Cheese Block");
registerEntityEgg(EntityCheeseMonster.class, 0xEDF777, 000000);
CheeseItem = new ItemCheese(5000, 2, 1f, true).setUnlocalizedName("Cheese");
LanguageRegistry.addName(CheeseItem, "Cheese");
GameRegistry.addShapelessRecipe(new ItemStack(CheeseBlock), new Object[]{
new ItemStack(Item.bucketMilk), new ItemStack(Block.sponge), new ItemStack(Item.bowlSoup)
});
GameRegistry.addRecipe(new ItemStack(CheeseItem), new Object[]{
"XYX",
"YYY",
" ",
'X', Item.bucketMilk, 'Y', Item.egg});
GameRegistry.addRecipe(new ItemStack(CheeseBlock), new Object[]{
"CCC",
"CCC",
"CCC",
'C', CheeseItem
});
}
public static int getUniqueEntityId()
{
do
{
startEntityId++; //I MADE IT HAPPY :D
}
while(EntityList.getStringFromID(startEntityId) != null);
return startEntityId;
}
public static void registerEntityEgg(Class <? extends Entity> entity, int primaryColor, int secondaryColor)
{
int id = getUniqueEntityId();
EntityList.IDtoClassMapping.put(id, entity);
EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
} | [
"jde88de@yahoo.com"
] | jde88de@yahoo.com |
5f3a44d2f241dbc07dedaf850d3847d9a717adb0 | 0c19f523399a2f643e0ea0af8c8beabbf1fe051d | /BasicProgrames/src/numericalProgrames/PrimeNo.java | 8ad557daf158748df6214edf1155306ea0286b7e | [] | no_license | ashu1206/JavaPrograms | a982226419bc2c370e8935ed89814b4dc98fae7d | 5d2ae43d774c9f88d720e38dcba66c246e126ec4 | refs/heads/master | 2022-11-20T23:42:34.922514 | 2020-07-25T15:52:07 | 2020-07-25T15:52:07 | 282,474,584 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 521 | java | package numericalProgrames;
public class PrimeNo {
public static void main(String[] args)
{
int i,m = 0,dummy = 0;
int n = 101;
m = n/2;
if(n==0||n==1)
{
System.out.println("Not a Prime Number");
}
else
{
for(i=2;i<=m;i++)
{
if(n%i==0)
{
System.out.println("Not a Prime Number");
dummy=1;
break;
}
}
if(dummy == 0)
{
System.out.println("A Prime Number");
}
}
}
}
| [
"ashukshukla612@gmail.com"
] | ashukshukla612@gmail.com |
60cb23c3e90e9646e6d53a602371194167ae5562 | fa93c9be2923e697fb8a2066f8fb65c7718cdec7 | /sources/com/google/android/gms/wallet/zzac.java | 2bafc5e4c7841ffca6c532eafc0dc4723e21b1cc | [] | no_license | Auch-Auch/avito_source | b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b | 76fdcc5b7e036c57ecc193e790b0582481768cdc | refs/heads/master | 2023-05-06T01:32:43.014668 | 2021-05-25T10:19:22 | 2021-05-25T10:19:22 | 370,650,685 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,596 | java | package com.google.android.gms.wallet;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
@SafeParcelable.Class(creator = "ProxyCardCreator")
@SafeParcelable.Reserved({1})
@Deprecated
public final class zzac extends AbstractSafeParcelable {
public static final Parcelable.Creator<zzac> CREATOR = new zzae();
@SafeParcelable.Field(id = 2)
private String zzdq;
@SafeParcelable.Field(id = 3)
private String zzdr;
@SafeParcelable.Field(id = 4)
private int zzds;
@SafeParcelable.Field(id = 5)
private int zzdt;
@SafeParcelable.Constructor
public zzac(@SafeParcelable.Param(id = 2) String str, @SafeParcelable.Param(id = 3) String str2, @SafeParcelable.Param(id = 4) int i, @SafeParcelable.Param(id = 5) int i2) {
this.zzdq = str;
this.zzdr = str2;
this.zzds = i;
this.zzdt = i2;
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeString(parcel, 2, this.zzdq, false);
SafeParcelWriter.writeString(parcel, 3, this.zzdr, false);
SafeParcelWriter.writeInt(parcel, 4, this.zzds);
SafeParcelWriter.writeInt(parcel, 5, this.zzdt);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
}
| [
"auchhunter@gmail.com"
] | auchhunter@gmail.com |
f97836d6ce8526835460cf945705c30249193891 | 8069ffcec0e0b67df36f904bf5138b160132b32e | /src/bus/copy/DanhsachDoituong.java | 4be563000e4cf1d39905ff6401e9ecdf5080bf6d | [] | no_license | tocdai5/quanlivattunew | 28b66ca83a52ac1848e1a70c5d36e282f566447f | 36412f7a5e4cb9d3f6e02698d0cb6b4ff2ed7cd2 | refs/heads/master | 2020-06-02T07:31:27.710835 | 2015-04-09T10:07:51 | 2015-04-09T10:08:45 | 33,557,754 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 669 | java | package bus.copy;
import java.util.ArrayList;
import java.util.List;
import model.Doituong;
import quanly.QuanlyDoituong;
public class DanhsachDoituong {
private List<Doituong> lstDoituong;
private QuanlyDoituong qldt = new QuanlyDoituong();
public DanhsachDoituong() {
super();
if(qldt.getDoituongList() != null)
{
lstDoituong = qldt.getDoituongList();
}
else
{
lstDoituong = new ArrayList<Doituong>();
}
}
public Doituong getByIndex(int index)
{
return lstDoituong.get(index);
}
public List<Doituong> getLstDoituong() {
return lstDoituong;
}
public Doituong findByIndex(int index)
{
return lstDoituong.get(index);
}
}
| [
"nguyenquoccong2906@gmail.com"
] | nguyenquoccong2906@gmail.com |
f129c81c1a0a52288257f1073f9c2e6b613f9c1c | 2391aa977084e5c1dcfdd3da60d74e3f92f50267 | /app/build/generated/source/buildConfig/debug/com/swimmi/windnote/BuildConfig.java | fecd7ba82b3488a02ebdb0ddba39d9c767462695 | [] | no_license | niuza/WindNote | 7564f9c701f473a9105f0bdc0e67d3ab9acccf9f | f28924c6c9c507a44989a1cb33e8214dba4dcf87 | refs/heads/master | 2021-01-24T23:57:20.149430 | 2016-04-20T13:43:21 | 2016-04-20T13:43:21 | 56,690,260 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 445 | java | /**
* Automatically generated file. DO NOT MODIFY
*/
package com.swimmi.windnote;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.swimmi.windnote";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}
| [
"1007434927@qq.com"
] | 1007434927@qq.com |
74e1556b0118d97a20916ed478ae700ee40096f0 | bd44169c3ecd6c06418b3de757d7c56caee234ba | /malldemo/src/main/java/com/cskaoyan/malldemo/service/impl/SearchHistoryServiceimpl.java | 67637b5f6e053e03cdf1d408170c5493f99e7388 | [] | no_license | 1cutecoder/MyMall | 043735a6957c77da44db8d5540c7a22757135d37 | 396eb775f12d4be0a91943b7c8a94635c424a097 | refs/heads/master | 2020-06-14T23:27:58.971822 | 2019-07-04T02:25:48 | 2019-07-04T02:25:48 | 195,154,292 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,174 | java | package com.cskaoyan.malldemo.service.impl;
import com.cskaoyan.malldemo.bean.SearchHistory;
import com.cskaoyan.malldemo.bean.SearchHistoryExample;
import com.cskaoyan.malldemo.mapper.SearchHistoryMapper;
import com.cskaoyan.malldemo.service.SearchHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class SearchHistoryServiceimpl implements SearchHistoryService {
@Autowired
SearchHistoryMapper searchHistoryMapper;
@Override
public List<SearchHistory> querySearchHistoryList(String page, String limit, String userId, String keyword, String sort, String order) {
int startPage = (Integer.parseInt(page)-1)*Integer.parseInt(limit);
int endPage = (Integer.parseInt(page))*Integer.parseInt(limit);
List<SearchHistory> searchHistories = searchHistoryMapper.selectSearchHistoryList(startPage, endPage, userId, keyword, sort, order);
return searchHistories;
}
@Override
public int queryTotalSearchHistory() {
return (int) searchHistoryMapper.countByExample(new SearchHistoryExample());
}
}
| [
"820861340@qq.com"
] | 820861340@qq.com |
e405e08930a9a79c43da1e17fb4d1d6e66a67478 | 3b8031c72865c50f11ed09367321803ea9572231 | /src/test/java/com/epam/bdd/ebay/pages/CartViewPage.java | 3352db186c68949f8e1244155845aa7b8d2e80e0 | [] | no_license | leysanka/BDD_Demo | 71beb2e305a0f93ca457e1cb63e2367a4f2c0961 | 7fcbdacfa42c954af2df0e3bdb2708a602d3c904 | refs/heads/master | 2021-08-29T16:06:41.942384 | 2017-12-14T08:25:41 | 2017-12-14T08:25:41 | 113,586,249 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,642 | java | package com.epam.bdd.ebay.pages;
import com.epam.bdd.ebay.exceptions.WrongPageException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import java.util.List;
public class CartViewPage extends CommonPage {
private static final String CART_URL = "https://cart.payments.ebay.com";
@FindBy(xpath = "//div[@id='ShopCart']//div[contains(@id, 'sellerBucket')]")
private List<WebElement> allGoodsInShopCart;
@FindBy(xpath = "//div[@id='ShopCart']//a[contains(@class, 'actionLink')][1]")
private List<WebElement> deleteButtonsForShopCartGoods;
public CartViewPage(WebDriver driver) {
super(driver);
if (!driver.getCurrentUrl().startsWith(CART_URL)) {
throw new WrongPageException("Cart view url does not meet to the expected.");
}
}
public void deleteAllGoodsFromCart() {
if (allGoodsInShopCart.size() > 0 ){
do {
WebElement deleteButton = deleteButtonsForShopCartGoods.get(0);
scrollToElement(deleteButton);
waitForElementIsClickable(deleteButton);
deleteButton.click();
}
while (allGoodsInShopCart.size() > 0);
}
/* if (allGoodsInShopCart.size() > 0 ) {
for (int i = 0; i < allGoodsInShopCart.size(); i++){
WebElement deleteButton = deleteButtonsForShopCartGoods.get(i);
scrollToElement(deleteButton);
waitForElementIsClickable(deleteButton);
deleteButton.click();
}
}*/
}
}
| [
"Alesia_Kastsiuchenka@epam.com"
] | Alesia_Kastsiuchenka@epam.com |
19240fcce8e09418852991fe11554500801be4e2 | a78353bdfad1b7bf620478ae60f974b92acb2bc1 | /src/main/java/project/models/entity/CarForSale.java | 5fa49434450f4ed2dc3aada6778cf0d8515b106a | [] | no_license | dombarov/SpringProject | 2150be7872b109a4e0e6374d8edd3315f7ff3f68 | 5352a932777ce30243d8db1818ba1df3f9bda152 | refs/heads/master | 2023-03-29T08:55:20.359633 | 2021-04-01T20:41:24 | 2021-04-01T20:41:24 | 351,174,643 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,544 | java | package project.models.entity;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name = "cars_sale")
public class CarForSale extends BaseEntity {
private String brand;
private String enginetype;
private String horsePower;
private String year;
private int price;
private String mileage;
private String colour;
private String transmission;
private UserEntity user;
private String image;
private String telephoneNumber;
public CarForSale() {
}
@ManyToOne
public UserEntity getUser() {
return user;
}
public CarForSale setUser(UserEntity user) {
this.user = user;
return this;
}
public String getBrand() {
return brand;
}
public CarForSale setBrand(String brand) {
this.brand = brand;
return this;
}
public String getEnginetype() {
return enginetype;
}
public CarForSale setEnginetype(String enginetype) {
this.enginetype = enginetype;
return this;
}
public String getHorsePower() {
return horsePower;
}
public CarForSale setHorsePower(String horsePower) {
this.horsePower = horsePower;
return this;
}
public String getYear() {
return year;
}
public CarForSale setYear(String year) {
this.year = year;
return this;
}
public int getPrice() {
return price;
}
public CarForSale setPrice(int price) {
this.price = price;
return this;
}
public String getMileage() {
return mileage;
}
public CarForSale setMileage(String mileage) {
this.mileage = mileage;
return this;
}
public String getColour() {
return colour;
}
public CarForSale setColour(String colour) {
this.colour = colour;
return this;
}
public String getTransmission() {
return transmission;
}
public CarForSale setTransmission(String transmission) {
this.transmission = transmission;
return this;
}
public String getImage() {
return image;
}
public CarForSale setImage(String image) {
this.image = image;
return this;
}
public String getTelephoneNumber() {
return telephoneNumber;
}
public CarForSale setTelephoneNumber(String telephoneNumber) {
this.telephoneNumber = telephoneNumber;
return this;
}
}
| [
"sasho_art91"
] | sasho_art91 |
06471c59d404fe53cc9d16dcbfa59cece733a688 | 414cc8d28b6a7fb74047aa05ef9f81f839d32e4c | /src/com/jagex/Class536_Sub18_Sub7_Sub2.java | 7a2bf40504f39df132051619d9237e12cc020c35 | [] | no_license | titandino/876-Deobfuscated | 3d71fade77595cdbbacca9238ec15ed57ceee92b | bb546e9a28d77f9d93214386c72b64c9fae29d18 | refs/heads/master | 2021-01-12T07:42:29.043949 | 2017-01-27T03:23:54 | 2017-01-27T03:23:54 | 76,999,846 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 23,962 | java | /* Class536_Sub18_Sub7_Sub2 - Decompiled by JODE
* Visit http://jode.sourceforge.net/
*/
package com.jagex;
public class Class536_Sub18_Sub7_Sub2 extends Class536_Sub18_Sub7 {
int anInt12075;
int anInt12076;
static final int anInt12077 = 16;
int anInt12078;
int anInt12079;
byte[] aByteArray12080;
void method10999(int i, int i_0_, int i_1_, int i_2_) {
anInt12078 = i;
anInt12079 = i_0_;
anInt12075 = i_1_ - i;
anInt12076 = i_2_ - i_0_;
}
void method11000(int i, int i_3_, int i_4_, int i_5_) {
anInt12078 = i;
anInt12079 = i_3_;
anInt12075 = i_4_ - i;
anInt12076 = i_5_ - i_3_;
}
boolean method11001(int i, int i_6_) {
return aByteArray12080.length >= i * i_6_;
}
void method11002(int i, int i_7_, int i_8_, int i_9_, int i_10_, int i_11_) {
int i_12_ = 0;
if (i_7_ != i)
i_12_ = (i_10_ - i_9_ << 16) / (i_7_ - i);
int i_13_ = 0;
if (i_8_ != i_7_)
i_13_ = (i_11_ - i_10_ << 16) / (i_8_ - i_7_);
int i_14_ = 0;
if (i_8_ != i)
i_14_ = (i_9_ - i_11_ << 16) / (i - i_8_);
if (i <= i_7_ && i <= i_8_) {
if (i_7_ < i_8_) {
i_11_ = i_9_ <<= 16;
if (i < 0) {
i_11_ -= i_14_ * i;
i_9_ -= i_12_ * i;
i = 0;
}
i_10_ <<= 16;
if (i_7_ < 0) {
i_10_ -= i_13_ * i_7_;
i_7_ = 0;
}
if (i != i_7_ && i_14_ < i_12_ || i == i_7_ && i_14_ > i_13_) {
i_8_ -= i_7_;
i_7_ -= i;
i *= anInt12075;
while (--i_7_ >= 0) {
method11003(aByteArray12080, i, 0, i_11_ >> 16, i_9_ >> 16);
i_11_ += i_14_;
i_9_ += i_12_;
i += anInt12075;
}
while (--i_8_ >= 0) {
method11003(aByteArray12080, i, 0, i_11_ >> 16, i_10_ >> 16);
i_11_ += i_14_;
i_10_ += i_13_;
i += anInt12075;
}
} else {
i_8_ -= i_7_;
i_7_ -= i;
i *= anInt12075;
while (--i_7_ >= 0) {
method11003(aByteArray12080, i, 0, i_9_ >> 16, i_11_ >> 16);
i_11_ += i_14_;
i_9_ += i_12_;
i += anInt12075;
}
while (--i_8_ >= 0) {
method11003(aByteArray12080, i, 0, i_10_ >> 16, i_11_ >> 16);
i_11_ += i_14_;
i_10_ += i_13_;
i += anInt12075;
}
}
} else {
i_10_ = i_9_ <<= 16;
if (i < 0) {
i_10_ -= i_14_ * i;
i_9_ -= i_12_ * i;
i = 0;
}
i_11_ <<= 16;
if (i_8_ < 0) {
i_11_ -= i_13_ * i_8_;
i_8_ = 0;
}
if (i != i_8_ && i_14_ < i_12_ || i == i_8_ && i_13_ > i_12_) {
i_7_ -= i_8_;
i_8_ -= i;
i *= anInt12075;
while (--i_8_ >= 0) {
method11003(aByteArray12080, i, 0, i_10_ >> 16, i_9_ >> 16);
i_10_ += i_14_;
i_9_ += i_12_;
i += anInt12075;
}
while (--i_7_ >= 0) {
method11003(aByteArray12080, i, 0, i_11_ >> 16, i_9_ >> 16);
i_11_ += i_13_;
i_9_ += i_12_;
i += anInt12075;
}
} else {
i_7_ -= i_8_;
i_8_ -= i;
i *= anInt12075;
while (--i_8_ >= 0) {
method11003(aByteArray12080, i, 0, i_9_ >> 16, i_10_ >> 16);
i_10_ += i_14_;
i_9_ += i_12_;
i += anInt12075;
}
while (--i_7_ >= 0) {
method11003(aByteArray12080, i, 0, i_9_ >> 16, i_11_ >> 16);
i_11_ += i_13_;
i_9_ += i_12_;
i += anInt12075;
}
}
}
} else if (i_7_ <= i_8_) {
if (i_8_ < i) {
i_9_ = i_10_ <<= 16;
if (i_7_ < 0) {
i_9_ -= i_12_ * i_7_;
i_10_ -= i_13_ * i_7_;
i_7_ = 0;
}
i_11_ <<= 16;
if (i_8_ < 0) {
i_11_ -= i_14_ * i_8_;
i_8_ = 0;
}
if (i_7_ != i_8_ && i_12_ < i_13_ || i_7_ == i_8_ && i_12_ > i_14_) {
i -= i_8_;
i_8_ -= i_7_;
i_7_ *= anInt12075;
while (--i_8_ >= 0) {
method11003(aByteArray12080, i_7_, 0, i_9_ >> 16, i_10_ >> 16);
i_9_ += i_12_;
i_10_ += i_13_;
i_7_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_7_, 0, i_9_ >> 16, i_11_ >> 16);
i_9_ += i_12_;
i_11_ += i_14_;
i_7_ += anInt12075;
}
} else {
i -= i_8_;
i_8_ -= i_7_;
i_7_ *= anInt12075;
while (--i_8_ >= 0) {
method11003(aByteArray12080, i_7_, 0, i_10_ >> 16, i_9_ >> 16);
i_9_ += i_12_;
i_10_ += i_13_;
i_7_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_7_, 0, i_11_ >> 16, i_9_ >> 16);
i_9_ += i_12_;
i_11_ += i_14_;
i_7_ += anInt12075;
}
}
} else {
i_11_ = i_10_ <<= 16;
if (i_7_ < 0) {
i_11_ -= i_12_ * i_7_;
i_10_ -= i_13_ * i_7_;
i_7_ = 0;
}
i_9_ <<= 16;
if (i < 0) {
i_9_ -= i_14_ * i;
i = 0;
}
if (i_12_ < i_13_) {
i_8_ -= i;
i -= i_7_;
i_7_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_7_, 0, i_11_ >> 16, i_10_ >> 16);
i_11_ += i_12_;
i_10_ += i_13_;
i_7_ += anInt12075;
}
while (--i_8_ >= 0) {
method11003(aByteArray12080, i_7_, 0, i_9_ >> 16, i_10_ >> 16);
i_9_ += i_14_;
i_10_ += i_13_;
i_7_ += anInt12075;
}
} else {
i_8_ -= i;
i -= i_7_;
i_7_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_7_, 0, i_10_ >> 16, i_11_ >> 16);
i_11_ += i_12_;
i_10_ += i_13_;
i_7_ += anInt12075;
}
while (--i_8_ >= 0) {
method11003(aByteArray12080, i_7_, 0, i_10_ >> 16, i_9_ >> 16);
i_9_ += i_14_;
i_10_ += i_13_;
i_7_ += anInt12075;
}
}
}
} else if (i < i_7_) {
i_10_ = i_11_ <<= 16;
if (i_8_ < 0) {
i_10_ -= i_13_ * i_8_;
i_11_ -= i_14_ * i_8_;
i_8_ = 0;
}
i_9_ <<= 16;
if (i < 0) {
i_9_ -= i_12_ * i;
i = 0;
}
if (i_13_ < i_14_) {
i_7_ -= i;
i -= i_8_;
i_8_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_8_, 0, i_10_ >> 16, i_11_ >> 16);
i_10_ += i_13_;
i_11_ += i_14_;
i_8_ += anInt12075;
}
while (--i_7_ >= 0) {
method11003(aByteArray12080, i_8_, 0, i_10_ >> 16, i_9_ >> 16);
i_10_ += i_13_;
i_9_ += i_12_;
i_8_ += anInt12075;
}
} else {
i_7_ -= i;
i -= i_8_;
i_8_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_8_, 0, i_11_ >> 16, i_10_ >> 16);
i_10_ += i_13_;
i_11_ += i_14_;
i_8_ += anInt12075;
}
while (--i_7_ >= 0) {
method11003(aByteArray12080, i_8_, 0, i_9_ >> 16, i_10_ >> 16);
i_10_ += i_13_;
i_9_ += i_12_;
i_8_ += anInt12075;
}
}
} else {
i_9_ = i_11_ <<= 16;
if (i_8_ < 0) {
i_9_ -= i_13_ * i_8_;
i_11_ -= i_14_ * i_8_;
i_8_ = 0;
}
i_10_ <<= 16;
if (i_7_ < 0) {
i_10_ -= i_12_ * i_7_;
i_7_ = 0;
}
if (i_13_ < i_14_) {
i -= i_7_;
i_7_ -= i_8_;
i_8_ *= anInt12075;
while (--i_7_ >= 0) {
method11003(aByteArray12080, i_8_, 0, i_9_ >> 16, i_11_ >> 16);
i_9_ += i_13_;
i_11_ += i_14_;
i_8_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_8_, 0, i_10_ >> 16, i_11_ >> 16);
i_10_ += i_12_;
i_11_ += i_14_;
i_8_ += anInt12075;
}
} else {
i -= i_7_;
i_7_ -= i_8_;
i_8_ *= anInt12075;
while (--i_7_ >= 0) {
method11003(aByteArray12080, i_8_, 0, i_11_ >> 16, i_9_ >> 16);
i_9_ += i_13_;
i_11_ += i_14_;
i_8_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_8_, 0, i_11_ >> 16, i_10_ >> 16);
i_10_ += i_12_;
i_11_ += i_14_;
i_8_ += anInt12075;
}
}
}
}
static final void method11003(byte[] is, int i, int i_15_, int i_16_, int i_17_) {
if (i_16_ < i_17_) {
i += i_16_;
i_15_ = i_17_ - i_16_ >> 2;
while (--i_15_ >= 0) {
is[i++] = (byte) 1;
is[i++] = (byte) 1;
is[i++] = (byte) 1;
is[i++] = (byte) 1;
}
i_15_ = i_17_ - i_16_ & 0x3;
while (--i_15_ >= 0)
is[i++] = (byte) 1;
}
}
void method11004(int i, int i_18_, int i_19_, int i_20_) {
anInt12078 = i;
anInt12079 = i_18_;
anInt12075 = i_19_ - i;
anInt12076 = i_20_ - i_18_;
}
void method11005() {
int i = -1;
int i_21_ = aByteArray12080.length - 8;
while (i < i_21_) {
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
}
while (i < aByteArray12080.length - 1)
aByteArray12080[++i] = (byte) 0;
}
void method11006(int i, int i_22_, int i_23_, int i_24_, int i_25_, int i_26_) {
int i_27_ = 0;
if (i_22_ != i)
i_27_ = (i_25_ - i_24_ << 16) / (i_22_ - i);
int i_28_ = 0;
if (i_23_ != i_22_)
i_28_ = (i_26_ - i_25_ << 16) / (i_23_ - i_22_);
int i_29_ = 0;
if (i_23_ != i)
i_29_ = (i_24_ - i_26_ << 16) / (i - i_23_);
if (i <= i_22_ && i <= i_23_) {
if (i_22_ < i_23_) {
i_26_ = i_24_ <<= 16;
if (i < 0) {
i_26_ -= i_29_ * i;
i_24_ -= i_27_ * i;
i = 0;
}
i_25_ <<= 16;
if (i_22_ < 0) {
i_25_ -= i_28_ * i_22_;
i_22_ = 0;
}
if (i != i_22_ && i_29_ < i_27_ || i == i_22_ && i_29_ > i_28_) {
i_23_ -= i_22_;
i_22_ -= i;
i *= anInt12075;
while (--i_22_ >= 0) {
method11003(aByteArray12080, i, 0, i_26_ >> 16, i_24_ >> 16);
i_26_ += i_29_;
i_24_ += i_27_;
i += anInt12075;
}
while (--i_23_ >= 0) {
method11003(aByteArray12080, i, 0, i_26_ >> 16, i_25_ >> 16);
i_26_ += i_29_;
i_25_ += i_28_;
i += anInt12075;
}
} else {
i_23_ -= i_22_;
i_22_ -= i;
i *= anInt12075;
while (--i_22_ >= 0) {
method11003(aByteArray12080, i, 0, i_24_ >> 16, i_26_ >> 16);
i_26_ += i_29_;
i_24_ += i_27_;
i += anInt12075;
}
while (--i_23_ >= 0) {
method11003(aByteArray12080, i, 0, i_25_ >> 16, i_26_ >> 16);
i_26_ += i_29_;
i_25_ += i_28_;
i += anInt12075;
}
}
} else {
i_25_ = i_24_ <<= 16;
if (i < 0) {
i_25_ -= i_29_ * i;
i_24_ -= i_27_ * i;
i = 0;
}
i_26_ <<= 16;
if (i_23_ < 0) {
i_26_ -= i_28_ * i_23_;
i_23_ = 0;
}
if (i != i_23_ && i_29_ < i_27_ || i == i_23_ && i_28_ > i_27_) {
i_22_ -= i_23_;
i_23_ -= i;
i *= anInt12075;
while (--i_23_ >= 0) {
method11003(aByteArray12080, i, 0, i_25_ >> 16, i_24_ >> 16);
i_25_ += i_29_;
i_24_ += i_27_;
i += anInt12075;
}
while (--i_22_ >= 0) {
method11003(aByteArray12080, i, 0, i_26_ >> 16, i_24_ >> 16);
i_26_ += i_28_;
i_24_ += i_27_;
i += anInt12075;
}
} else {
i_22_ -= i_23_;
i_23_ -= i;
i *= anInt12075;
while (--i_23_ >= 0) {
method11003(aByteArray12080, i, 0, i_24_ >> 16, i_25_ >> 16);
i_25_ += i_29_;
i_24_ += i_27_;
i += anInt12075;
}
while (--i_22_ >= 0) {
method11003(aByteArray12080, i, 0, i_24_ >> 16, i_26_ >> 16);
i_26_ += i_28_;
i_24_ += i_27_;
i += anInt12075;
}
}
}
} else if (i_22_ <= i_23_) {
if (i_23_ < i) {
i_24_ = i_25_ <<= 16;
if (i_22_ < 0) {
i_24_ -= i_27_ * i_22_;
i_25_ -= i_28_ * i_22_;
i_22_ = 0;
}
i_26_ <<= 16;
if (i_23_ < 0) {
i_26_ -= i_29_ * i_23_;
i_23_ = 0;
}
if (i_22_ != i_23_ && i_27_ < i_28_ || i_22_ == i_23_ && i_27_ > i_29_) {
i -= i_23_;
i_23_ -= i_22_;
i_22_ *= anInt12075;
while (--i_23_ >= 0) {
method11003(aByteArray12080, i_22_, 0, i_24_ >> 16, i_25_ >> 16);
i_24_ += i_27_;
i_25_ += i_28_;
i_22_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_22_, 0, i_24_ >> 16, i_26_ >> 16);
i_24_ += i_27_;
i_26_ += i_29_;
i_22_ += anInt12075;
}
} else {
i -= i_23_;
i_23_ -= i_22_;
i_22_ *= anInt12075;
while (--i_23_ >= 0) {
method11003(aByteArray12080, i_22_, 0, i_25_ >> 16, i_24_ >> 16);
i_24_ += i_27_;
i_25_ += i_28_;
i_22_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_22_, 0, i_26_ >> 16, i_24_ >> 16);
i_24_ += i_27_;
i_26_ += i_29_;
i_22_ += anInt12075;
}
}
} else {
i_26_ = i_25_ <<= 16;
if (i_22_ < 0) {
i_26_ -= i_27_ * i_22_;
i_25_ -= i_28_ * i_22_;
i_22_ = 0;
}
i_24_ <<= 16;
if (i < 0) {
i_24_ -= i_29_ * i;
i = 0;
}
if (i_27_ < i_28_) {
i_23_ -= i;
i -= i_22_;
i_22_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_22_, 0, i_26_ >> 16, i_25_ >> 16);
i_26_ += i_27_;
i_25_ += i_28_;
i_22_ += anInt12075;
}
while (--i_23_ >= 0) {
method11003(aByteArray12080, i_22_, 0, i_24_ >> 16, i_25_ >> 16);
i_24_ += i_29_;
i_25_ += i_28_;
i_22_ += anInt12075;
}
} else {
i_23_ -= i;
i -= i_22_;
i_22_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_22_, 0, i_25_ >> 16, i_26_ >> 16);
i_26_ += i_27_;
i_25_ += i_28_;
i_22_ += anInt12075;
}
while (--i_23_ >= 0) {
method11003(aByteArray12080, i_22_, 0, i_25_ >> 16, i_24_ >> 16);
i_24_ += i_29_;
i_25_ += i_28_;
i_22_ += anInt12075;
}
}
}
} else if (i < i_22_) {
i_25_ = i_26_ <<= 16;
if (i_23_ < 0) {
i_25_ -= i_28_ * i_23_;
i_26_ -= i_29_ * i_23_;
i_23_ = 0;
}
i_24_ <<= 16;
if (i < 0) {
i_24_ -= i_27_ * i;
i = 0;
}
if (i_28_ < i_29_) {
i_22_ -= i;
i -= i_23_;
i_23_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_23_, 0, i_25_ >> 16, i_26_ >> 16);
i_25_ += i_28_;
i_26_ += i_29_;
i_23_ += anInt12075;
}
while (--i_22_ >= 0) {
method11003(aByteArray12080, i_23_, 0, i_25_ >> 16, i_24_ >> 16);
i_25_ += i_28_;
i_24_ += i_27_;
i_23_ += anInt12075;
}
} else {
i_22_ -= i;
i -= i_23_;
i_23_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_23_, 0, i_26_ >> 16, i_25_ >> 16);
i_25_ += i_28_;
i_26_ += i_29_;
i_23_ += anInt12075;
}
while (--i_22_ >= 0) {
method11003(aByteArray12080, i_23_, 0, i_24_ >> 16, i_25_ >> 16);
i_25_ += i_28_;
i_24_ += i_27_;
i_23_ += anInt12075;
}
}
} else {
i_24_ = i_26_ <<= 16;
if (i_23_ < 0) {
i_24_ -= i_28_ * i_23_;
i_26_ -= i_29_ * i_23_;
i_23_ = 0;
}
i_25_ <<= 16;
if (i_22_ < 0) {
i_25_ -= i_27_ * i_22_;
i_22_ = 0;
}
if (i_28_ < i_29_) {
i -= i_22_;
i_22_ -= i_23_;
i_23_ *= anInt12075;
while (--i_22_ >= 0) {
method11003(aByteArray12080, i_23_, 0, i_24_ >> 16, i_26_ >> 16);
i_24_ += i_28_;
i_26_ += i_29_;
i_23_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_23_, 0, i_25_ >> 16, i_26_ >> 16);
i_25_ += i_27_;
i_26_ += i_29_;
i_23_ += anInt12075;
}
} else {
i -= i_22_;
i_22_ -= i_23_;
i_23_ *= anInt12075;
while (--i_22_ >= 0) {
method11003(aByteArray12080, i_23_, 0, i_26_ >> 16, i_24_ >> 16);
i_24_ += i_28_;
i_26_ += i_29_;
i_23_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_23_, 0, i_26_ >> 16, i_25_ >> 16);
i_25_ += i_27_;
i_26_ += i_29_;
i_23_ += anInt12075;
}
}
}
}
void method11007() {
int i = -1;
int i_30_ = aByteArray12080.length - 8;
while (i < i_30_) {
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
}
while (i < aByteArray12080.length - 1)
aByteArray12080[++i] = (byte) 0;
}
Class536_Sub18_Sub7_Sub2(Class167_Sub2 class167_sub2, int i, int i_31_) {
aByteArray12080 = new byte[i * i_31_];
}
void method11008(int i, int i_32_, int i_33_, int i_34_, int i_35_, int i_36_) {
int i_37_ = 0;
if (i_32_ != i)
i_37_ = (i_35_ - i_34_ << 16) / (i_32_ - i);
int i_38_ = 0;
if (i_33_ != i_32_)
i_38_ = (i_36_ - i_35_ << 16) / (i_33_ - i_32_);
int i_39_ = 0;
if (i_33_ != i)
i_39_ = (i_34_ - i_36_ << 16) / (i - i_33_);
if (i <= i_32_ && i <= i_33_) {
if (i_32_ < i_33_) {
i_36_ = i_34_ <<= 16;
if (i < 0) {
i_36_ -= i_39_ * i;
i_34_ -= i_37_ * i;
i = 0;
}
i_35_ <<= 16;
if (i_32_ < 0) {
i_35_ -= i_38_ * i_32_;
i_32_ = 0;
}
if (i != i_32_ && i_39_ < i_37_ || i == i_32_ && i_39_ > i_38_) {
i_33_ -= i_32_;
i_32_ -= i;
i *= anInt12075;
while (--i_32_ >= 0) {
method11003(aByteArray12080, i, 0, i_36_ >> 16, i_34_ >> 16);
i_36_ += i_39_;
i_34_ += i_37_;
i += anInt12075;
}
while (--i_33_ >= 0) {
method11003(aByteArray12080, i, 0, i_36_ >> 16, i_35_ >> 16);
i_36_ += i_39_;
i_35_ += i_38_;
i += anInt12075;
}
} else {
i_33_ -= i_32_;
i_32_ -= i;
i *= anInt12075;
while (--i_32_ >= 0) {
method11003(aByteArray12080, i, 0, i_34_ >> 16, i_36_ >> 16);
i_36_ += i_39_;
i_34_ += i_37_;
i += anInt12075;
}
while (--i_33_ >= 0) {
method11003(aByteArray12080, i, 0, i_35_ >> 16, i_36_ >> 16);
i_36_ += i_39_;
i_35_ += i_38_;
i += anInt12075;
}
}
} else {
i_35_ = i_34_ <<= 16;
if (i < 0) {
i_35_ -= i_39_ * i;
i_34_ -= i_37_ * i;
i = 0;
}
i_36_ <<= 16;
if (i_33_ < 0) {
i_36_ -= i_38_ * i_33_;
i_33_ = 0;
}
if (i != i_33_ && i_39_ < i_37_ || i == i_33_ && i_38_ > i_37_) {
i_32_ -= i_33_;
i_33_ -= i;
i *= anInt12075;
while (--i_33_ >= 0) {
method11003(aByteArray12080, i, 0, i_35_ >> 16, i_34_ >> 16);
i_35_ += i_39_;
i_34_ += i_37_;
i += anInt12075;
}
while (--i_32_ >= 0) {
method11003(aByteArray12080, i, 0, i_36_ >> 16, i_34_ >> 16);
i_36_ += i_38_;
i_34_ += i_37_;
i += anInt12075;
}
} else {
i_32_ -= i_33_;
i_33_ -= i;
i *= anInt12075;
while (--i_33_ >= 0) {
method11003(aByteArray12080, i, 0, i_34_ >> 16, i_35_ >> 16);
i_35_ += i_39_;
i_34_ += i_37_;
i += anInt12075;
}
while (--i_32_ >= 0) {
method11003(aByteArray12080, i, 0, i_34_ >> 16, i_36_ >> 16);
i_36_ += i_38_;
i_34_ += i_37_;
i += anInt12075;
}
}
}
} else if (i_32_ <= i_33_) {
if (i_33_ < i) {
i_34_ = i_35_ <<= 16;
if (i_32_ < 0) {
i_34_ -= i_37_ * i_32_;
i_35_ -= i_38_ * i_32_;
i_32_ = 0;
}
i_36_ <<= 16;
if (i_33_ < 0) {
i_36_ -= i_39_ * i_33_;
i_33_ = 0;
}
if (i_32_ != i_33_ && i_37_ < i_38_ || i_32_ == i_33_ && i_37_ > i_39_) {
i -= i_33_;
i_33_ -= i_32_;
i_32_ *= anInt12075;
while (--i_33_ >= 0) {
method11003(aByteArray12080, i_32_, 0, i_34_ >> 16, i_35_ >> 16);
i_34_ += i_37_;
i_35_ += i_38_;
i_32_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_32_, 0, i_34_ >> 16, i_36_ >> 16);
i_34_ += i_37_;
i_36_ += i_39_;
i_32_ += anInt12075;
}
} else {
i -= i_33_;
i_33_ -= i_32_;
i_32_ *= anInt12075;
while (--i_33_ >= 0) {
method11003(aByteArray12080, i_32_, 0, i_35_ >> 16, i_34_ >> 16);
i_34_ += i_37_;
i_35_ += i_38_;
i_32_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_32_, 0, i_36_ >> 16, i_34_ >> 16);
i_34_ += i_37_;
i_36_ += i_39_;
i_32_ += anInt12075;
}
}
} else {
i_36_ = i_35_ <<= 16;
if (i_32_ < 0) {
i_36_ -= i_37_ * i_32_;
i_35_ -= i_38_ * i_32_;
i_32_ = 0;
}
i_34_ <<= 16;
if (i < 0) {
i_34_ -= i_39_ * i;
i = 0;
}
if (i_37_ < i_38_) {
i_33_ -= i;
i -= i_32_;
i_32_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_32_, 0, i_36_ >> 16, i_35_ >> 16);
i_36_ += i_37_;
i_35_ += i_38_;
i_32_ += anInt12075;
}
while (--i_33_ >= 0) {
method11003(aByteArray12080, i_32_, 0, i_34_ >> 16, i_35_ >> 16);
i_34_ += i_39_;
i_35_ += i_38_;
i_32_ += anInt12075;
}
} else {
i_33_ -= i;
i -= i_32_;
i_32_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_32_, 0, i_35_ >> 16, i_36_ >> 16);
i_36_ += i_37_;
i_35_ += i_38_;
i_32_ += anInt12075;
}
while (--i_33_ >= 0) {
method11003(aByteArray12080, i_32_, 0, i_35_ >> 16, i_34_ >> 16);
i_34_ += i_39_;
i_35_ += i_38_;
i_32_ += anInt12075;
}
}
}
} else if (i < i_32_) {
i_35_ = i_36_ <<= 16;
if (i_33_ < 0) {
i_35_ -= i_38_ * i_33_;
i_36_ -= i_39_ * i_33_;
i_33_ = 0;
}
i_34_ <<= 16;
if (i < 0) {
i_34_ -= i_37_ * i;
i = 0;
}
if (i_38_ < i_39_) {
i_32_ -= i;
i -= i_33_;
i_33_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_33_, 0, i_35_ >> 16, i_36_ >> 16);
i_35_ += i_38_;
i_36_ += i_39_;
i_33_ += anInt12075;
}
while (--i_32_ >= 0) {
method11003(aByteArray12080, i_33_, 0, i_35_ >> 16, i_34_ >> 16);
i_35_ += i_38_;
i_34_ += i_37_;
i_33_ += anInt12075;
}
} else {
i_32_ -= i;
i -= i_33_;
i_33_ *= anInt12075;
while (--i >= 0) {
method11003(aByteArray12080, i_33_, 0, i_36_ >> 16, i_35_ >> 16);
i_35_ += i_38_;
i_36_ += i_39_;
i_33_ += anInt12075;
}
while (--i_32_ >= 0) {
method11003(aByteArray12080, i_33_, 0, i_34_ >> 16, i_35_ >> 16);
i_35_ += i_38_;
i_34_ += i_37_;
i_33_ += anInt12075;
}
}
} else {
i_34_ = i_36_ <<= 16;
if (i_33_ < 0) {
i_34_ -= i_38_ * i_33_;
i_36_ -= i_39_ * i_33_;
i_33_ = 0;
}
i_35_ <<= 16;
if (i_32_ < 0) {
i_35_ -= i_37_ * i_32_;
i_32_ = 0;
}
if (i_38_ < i_39_) {
i -= i_32_;
i_32_ -= i_33_;
i_33_ *= anInt12075;
while (--i_32_ >= 0) {
method11003(aByteArray12080, i_33_, 0, i_34_ >> 16, i_36_ >> 16);
i_34_ += i_38_;
i_36_ += i_39_;
i_33_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_33_, 0, i_35_ >> 16, i_36_ >> 16);
i_35_ += i_37_;
i_36_ += i_39_;
i_33_ += anInt12075;
}
} else {
i -= i_32_;
i_32_ -= i_33_;
i_33_ *= anInt12075;
while (--i_32_ >= 0) {
method11003(aByteArray12080, i_33_, 0, i_36_ >> 16, i_34_ >> 16);
i_34_ += i_38_;
i_36_ += i_39_;
i_33_ += anInt12075;
}
while (--i >= 0) {
method11003(aByteArray12080, i_33_, 0, i_36_ >> 16, i_35_ >> 16);
i_35_ += i_37_;
i_36_ += i_39_;
i_33_ += anInt12075;
}
}
}
}
void method11009() {
int i = -1;
int i_40_ = aByteArray12080.length - 8;
while (i < i_40_) {
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
aByteArray12080[++i] = (byte) 0;
}
while (i < aByteArray12080.length - 1)
aByteArray12080[++i] = (byte) 0;
}
static final void method11010(byte[] is, int i, int i_41_, int i_42_, int i_43_) {
if (i_42_ < i_43_) {
i += i_42_;
i_41_ = i_43_ - i_42_ >> 2;
while (--i_41_ >= 0) {
is[i++] = (byte) 1;
is[i++] = (byte) 1;
is[i++] = (byte) 1;
is[i++] = (byte) 1;
}
i_41_ = i_43_ - i_42_ & 0x3;
while (--i_41_ >= 0)
is[i++] = (byte) 1;
}
}
}
| [
"trenton.kress@gmail.com"
] | trenton.kress@gmail.com |
54b9ab8d95cc259cec7a5335e6cca71af184ed53 | d929328837cacad205e4c5d9568ed3291f40d2c8 | /project5/src/prog2/tests/tetris/pub/PieceTest.java | 4989540448ba99cbf13932b9dd62d2bc3f056793 | [] | no_license | MichaelSargious/Pro5_Tetris | 6cf485bd4556d748be2d4486b20861dd09f4b6a3 | e17fd851d74f68cf1790269e391de7843ba85303 | refs/heads/main | 2023-05-08T14:16:26.102032 | 2021-06-05T15:06:20 | 2021-06-05T15:06:20 | 374,142,862 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,100 | java | package prog2.tests.tetris.pub;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.Random;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestRule;
import prog2.tests.PublicTest;
import prog2.tests.tetris.TetrisExercise;
import tetris.game.MyTetrisFactory;
import tetris.game.pieces.Piece;
import tetris.game.pieces.Piece.PieceType;
import tetris.game.pieces.PieceFactory;
public class PieceTest implements PublicTest, TetrisExercise {
@Rule
public TestRule timeout = TestUtil.timeoutSeconds(5);
private final static long SEED = 343681;
PieceFactory pf = MyTetrisFactory.createPieceFactory(new Random(SEED));
public boolean checkPieceEquals(Piece p0, Piece p1) {
if (p0.getPieceType() != p1.getPieceType())
return false;
if (p0.getWidth() != p1.getWidth())
return false;
if (p0.getHeight() != p1.getHeight())
return false;
for (int i = 0; i < p0.getHeight(); i++)
for (int j = 0; j < p0.getWidth(); j++)
if (p0.getBody()[i][j] != p1.getBody()[i][j])
return false;
return true;
}
public void assertRotationsEqual(Piece start, int rotations) throws Exception {
Piece rotation = start;
for (int i = 0; i < rotations; i++) {
rotation = rotation.getClockwiseRotation();
System.out.println((i+1) + ".R_rotation" + " piece: " + rotation.getPieceType() + " point: ("+ rotation.getRotationPoint().getRow() + ", "+ rotation.getRotationPoint().getColumn() + ")");
for (int x = 0; x < rotation.getHeight(); x++) {
for (int y = 0; y < rotation.getWidth(); y++) {
System.out.print(rotation.getBody()[x][y] + " ");
}
System.out.println();
}
System.out.println("---------------");
}
System.out.println("======================================================================");
assertTrue(start.getPieceType().toString() + " piece is not equal to the piece got after " + rotations
+ " rotations ", checkPieceEquals(start, rotation));
assertEquals(
start.getPieceType().toString() + " piece type is not equal to the piece type got after rotations ",
start.getPieceType(), rotation.getPieceType());
}
@Test
public void testForRandomness1() {
PieceFactory pf1 = MyTetrisFactory.createPieceFactory(new Random(SEED));
PieceFactory pf2 = MyTetrisFactory.createPieceFactory(new Random(SEED));
PieceType pt1 = pf1.getNextRandomPiece().getPieceType();
PieceType pt2 = pf2.getNextRandomPiece().getPieceType();
boolean allEqual = true;
for (int i = 0; i < 10; i++) {
if (!pt1.equals(pf1.getNextRandomPiece().getPieceType())) {
allEqual = false;
}
if (!pt2.equals(pf2.getNextRandomPiece().getPieceType())) {
allEqual = false;
}
}
if (allEqual) {
fail("Piece Factory produced no random sequence");
}
}
@Test
public void testLPiece() throws Exception {
Piece p = pf.getLPiece();
checkPiece(p, 2, 3, 1, 0);
}
@Test
public void testLPieceRotations() throws Exception {
assertRotationsEqual(pf.getLPiece(), 4);
}
@Test
public void testOPieceRotations() throws Exception {
assertRotationsEqual(pf.getOPiece(), 4);
}
@Test
public void testIPieceRotations() throws Exception {
assertRotationsEqual(pf.getIPiece(), 4);
}
@Test
public void testTPiece() throws Exception {
Piece p = pf.getTPiece();
checkPiece(p, 3, 2, 0, 1);
}
@Test
public void testTPieceRotations() throws Exception {
assertRotationsEqual(pf.getTPiece(), 4);
}
private void checkPiece(Piece piece, int width, int height, int rotationX, int rotationY) throws Exception {
assertEquals("Width of piece is wrong", width, piece.getWidth());
assertEquals("Height of piece is wrong", height, piece.getHeight());
assertEquals("X coordinate of rotation point is wrong", rotationX, piece.getRotationPoint().getRow());
assertEquals("Y coordinate of rotation point is wrong", rotationY, piece.getRotationPoint().getColumn());
}
}
| [
"miko@Michaels-MacBook-Air.local"
] | miko@Michaels-MacBook-Air.local |
2ebf0d11bc8974af1957f9dedf0f9b8138085c66 | b129b0446fc2d8c4ee45f5b9870781c971e6d17e | /Homework2/GenQueue.java | c7e98bb712c7187e5ad992a372b34679c1356db4 | [] | no_license | ellieebarry/CSCE146 | e64134d420a97d035bf52f2cd55ab94b3cce31c0 | 1e012817b1f3ff69be9b30e1949a46aeaba6780c | refs/heads/main | 2023-03-28T13:14:42.398950 | 2021-03-19T20:19:16 | 2021-03-19T20:19:16 | 344,243,372 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,368 | java | package Homework03;
/* Created by Ellie Barry */
public class GenQueue <T>{
// Instance variable
public ListNode head;
public ListNode tail;
// Internal class for the objects that create a linked list
private class ListNode{
private ListNode link;
private T data;
// Default constructor
public ListNode() {
data = null;
link = null;
}
// Parameterized constructor
public ListNode(T aData, ListNode aLink) {
data = aData;
link = aLink;
}
}
public void LinkedListQueue() {
head = tail = null;
}
// Adds data to the end of the queue
public void enqueue(T aData) {
ListNode newNode = new ListNode(aData, null);
if(head == null) {
head = tail = newNode;
return;
}
tail.link = newNode;
tail = newNode;
}
// Removes first element of data
public T dequeue() {
if(head == null) {
return null;
}
T ret = head.data;
head = head.link;
return ret;
}
// Returns first object in the queue
public T peek() {
if(head == null) {
return null;
}
return head.data;
}
// Prints out all elements in list
public void print() {
ListNode temp = head;
while(temp != null) {
System.out.println(temp.data);
temp = temp.link;
}
}
}
| [
"noreply@github.com"
] | noreply@github.com |
4132ce61c0969a84496179c5bd5db8b6ba99125b | 5093d54d849edd00693813aa86f4c05148d4a536 | /src/main/java/com/application/service/MongoService.java | 588bf1ab82e84d80fea6c13e425b24a5847a90af | [] | no_license | tangtaiming/myerp-dao | f88ae2e7754dfa0dad8bc6ca1f714e3c9feb11f0 | 24e4c80ce7fd6ce173210e7311d7ccfe549cb3e1 | refs/heads/master | 2022-12-25T21:12:26.984133 | 2018-09-18T17:26:49 | 2018-09-18T17:26:49 | 149,302,933 | 1 | 0 | null | 2022-12-16T08:51:24 | 2018-09-18T14:34:13 | Java | UTF-8 | Java | false | false | 729 | java | package com.application.service;
import org.springframework.data.repository.NoRepositoryBean;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* @auther ttm
* @date 2018/9/18
*/
@NoRepositoryBean
public interface MongoService<T extends Serializable> {
public List<T> findCollection(Map<String, Object> request);
public Long findCollectionCount(Map<String, Object> request);
public boolean update(Map<String, Object> request);
public boolean save(Map<String, Object> request);
public boolean deleteById(Object id);
public T findOne(Object id);
public T findOne(Map<String, Object> request);
public List<T> findListByQuery(Map<String, Object> request);
}
| [
"accountnum@sina.cn"
] | accountnum@sina.cn |
956f40db44706a1b4b7632618161d2aa40232918 | ada0c9168deedece91162b5c2a3908c61626caaa | /src/model/Cest.java | fa9f321908864eaa17269bb0685a50d6ec7a99e1 | [] | no_license | julioizidoro/jgdynamic | 52464107c48c43708eb91637ee82dad7d321bc89 | 11735a498712f902409688d30963a79a7c990c9d | refs/heads/master | 2020-04-12T01:33:54.980169 | 2019-04-25T18:54:38 | 2019-04-25T18:54:38 | 30,019,734 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,410 | 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.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
*
* @author Wolverine
*/
@Entity
@Table(name = "cest")
public class Cest implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Column(name = "cest")
private String cest;
@Column(name = "ncm")
private String ncm;
@Column(name = "descricao")
private String descricao;
public Cest() {
}
public Cest(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getCest() {
return cest;
}
public void setCest(String cest) {
this.cest = cest;
}
public String getNcm() {
return ncm;
}
public void setNcm(String ncm) {
this.ncm = ncm;
}
public String getDescricao() {
return descricao;
}
public void setDescricao(String descricao) {
this.descricao = descricao;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Cest)) {
return false;
}
Cest other = (Cest) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "model.Cest[ id=" + id + " ]";
}
}
| [
"jizidoro@globo.com"
] | jizidoro@globo.com |
a47daf68a029dd9d1f61fd37ab28f918832605aa | cec0c2fa585c3f788fc8becf24365e56bce94368 | /it/unimi/dsi/fastutil/ints/AbstractInt2ObjectSortedMap.java | 746e00048f957b51b3ce9cd5d9ea9aae5d6f0db6 | [] | no_license | maksym-pasichnyk/Server-1.16.3-Remapped | 358f3c4816cbf41e137947329389edf24e9c6910 | 4d992e2d9d4ada3ecf7cecc039c4aa0083bc461e | refs/heads/master | 2022-12-15T08:54:21.236174 | 2020-09-19T16:13:43 | 2020-09-19T16:13:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,949 | java | /* */ package it.unimi.dsi.fastutil.ints;
/* */
/* */ import it.unimi.dsi.fastutil.objects.AbstractObjectCollection;
/* */ import it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator;
/* */ import it.unimi.dsi.fastutil.objects.ObjectCollection;
/* */ import it.unimi.dsi.fastutil.objects.ObjectIterator;
/* */ import java.util.Collection;
/* */ import java.util.Comparator;
/* */ import java.util.Iterator;
/* */ import java.util.Set;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public abstract class AbstractInt2ObjectSortedMap<V>
/* */ extends AbstractInt2ObjectMap<V>
/* */ implements Int2ObjectSortedMap<V>
/* */ {
/* */ private static final long serialVersionUID = -1773560792952436569L;
/* */
/* */ public IntSortedSet keySet() {
/* 47 */ return new KeySet();
/* */ }
/* */
/* */ protected class KeySet
/* */ extends AbstractIntSortedSet {
/* */ public boolean contains(int k) {
/* 53 */ return AbstractInt2ObjectSortedMap.this.containsKey(k);
/* */ }
/* */
/* */ public int size() {
/* 57 */ return AbstractInt2ObjectSortedMap.this.size();
/* */ }
/* */
/* */ public void clear() {
/* 61 */ AbstractInt2ObjectSortedMap.this.clear();
/* */ }
/* */
/* */ public IntComparator comparator() {
/* 65 */ return AbstractInt2ObjectSortedMap.this.comparator();
/* */ }
/* */
/* */ public int firstInt() {
/* 69 */ return AbstractInt2ObjectSortedMap.this.firstIntKey();
/* */ }
/* */
/* */ public int lastInt() {
/* 73 */ return AbstractInt2ObjectSortedMap.this.lastIntKey();
/* */ }
/* */
/* */ public IntSortedSet headSet(int to) {
/* 77 */ return AbstractInt2ObjectSortedMap.this.headMap(to).keySet();
/* */ }
/* */
/* */ public IntSortedSet tailSet(int from) {
/* 81 */ return AbstractInt2ObjectSortedMap.this.tailMap(from).keySet();
/* */ }
/* */
/* */ public IntSortedSet subSet(int from, int to) {
/* 85 */ return AbstractInt2ObjectSortedMap.this.subMap(from, to).keySet();
/* */ }
/* */
/* */ public IntBidirectionalIterator iterator(int from) {
/* 89 */ return new AbstractInt2ObjectSortedMap.KeySetIterator(AbstractInt2ObjectSortedMap.this.int2ObjectEntrySet().iterator(new AbstractInt2ObjectMap.BasicEntry(from, null)));
/* */ }
/* */
/* */ public IntBidirectionalIterator iterator() {
/* 93 */ return new AbstractInt2ObjectSortedMap.KeySetIterator(Int2ObjectSortedMaps.fastIterator(AbstractInt2ObjectSortedMap.this));
/* */ }
/* */ }
/* */
/* */
/* */
/* */ protected static class KeySetIterator<V>
/* */ implements IntBidirectionalIterator
/* */ {
/* */ protected final ObjectBidirectionalIterator<Int2ObjectMap.Entry<V>> i;
/* */
/* */
/* */ public KeySetIterator(ObjectBidirectionalIterator<Int2ObjectMap.Entry<V>> i) {
/* 106 */ this.i = i;
/* */ }
/* */
/* */ public int nextInt() {
/* 110 */ return ((Int2ObjectMap.Entry)this.i.next()).getIntKey();
/* */ }
/* */
/* */ public int previousInt() {
/* 114 */ return ((Int2ObjectMap.Entry)this.i.previous()).getIntKey();
/* */ }
/* */
/* */ public boolean hasNext() {
/* 118 */ return this.i.hasNext();
/* */ }
/* */
/* */ public boolean hasPrevious() {
/* 122 */ return this.i.hasPrevious();
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public ObjectCollection<V> values() {
/* 140 */ return (ObjectCollection<V>)new ValuesCollection();
/* */ }
/* */
/* */ protected class ValuesCollection
/* */ extends AbstractObjectCollection<V> {
/* */ public ObjectIterator<V> iterator() {
/* 146 */ return new AbstractInt2ObjectSortedMap.ValuesIterator<>(Int2ObjectSortedMaps.fastIterator(AbstractInt2ObjectSortedMap.this));
/* */ }
/* */
/* */ public boolean contains(Object k) {
/* 150 */ return AbstractInt2ObjectSortedMap.this.containsValue(k);
/* */ }
/* */
/* */ public int size() {
/* 154 */ return AbstractInt2ObjectSortedMap.this.size();
/* */ }
/* */
/* */ public void clear() {
/* 158 */ AbstractInt2ObjectSortedMap.this.clear();
/* */ }
/* */ }
/* */
/* */
/* */
/* */ protected static class ValuesIterator<V>
/* */ implements ObjectIterator<V>
/* */ {
/* */ protected final ObjectBidirectionalIterator<Int2ObjectMap.Entry<V>> i;
/* */
/* */
/* */ public ValuesIterator(ObjectBidirectionalIterator<Int2ObjectMap.Entry<V>> i) {
/* 171 */ this.i = i;
/* */ }
/* */
/* */ public V next() {
/* 175 */ return ((Int2ObjectMap.Entry<V>)this.i.next()).getValue();
/* */ }
/* */
/* */ public boolean hasNext() {
/* 179 */ return this.i.hasNext();
/* */ }
/* */ }
/* */ }
/* Location: C:\Users\Josep\Downloads\Decompile Minecraft\deobfuscated.jar!\i\\unimi\dsi\fastutil\ints\AbstractInt2ObjectSortedMap.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/ | [
"tanksherman27@gmail.com"
] | tanksherman27@gmail.com |
1f9f57f9ace7ce2f70ef64cc2a73d8a8a8bed944 | 4339887bb41fef64053840e524a07d0a3976e7ae | /src/ast/IntLiteral.java | 2310d4c65565692d1ed51be73b4aec1cfe743cab | [] | no_license | Emanon42/ct-19-20 | ef9c27fb05b22b623c48f9874d1c6f15e0e95271 | 5523bd0b078c4483881341f58d919b8751b651bb | refs/heads/master | 2020-12-14T13:52:32.531802 | 2020-04-18T15:24:28 | 2020-04-18T15:24:28 | 234,756,760 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 320 | java | package ast;
public class IntLiteral extends Expr {
public final int value;
public IntLiteral(int i){
this.value = i;
}
public <T> T accept(ASTVisitor<T> v){
return v.visitIntLiteral(this);
}
@Override
public boolean isLegalLeftForAssign() {
return false;
}
}
| [
"EmanonTang@outlook.com"
] | EmanonTang@outlook.com |
edea16ebe1373ef50ef98433a0ca09813de8f73c | 252d2f585cdd10c98493cd3e18c0aaa521a93169 | /sd-jt-sso/src/main/java/cn/jt/feign/UserFeign.java | 1be2ef3047bd27f7dc7d04f9a6fbe941609bb152 | [] | no_license | AaronCarrier/jt-project | 1f28b910381d0d51414974ac09b5753c91704b11 | 6a797216e0d3befd59118ddfa956202a1de88c6f | refs/heads/master | 2022-02-17T17:00:56.147811 | 2019-08-28T15:07:22 | 2019-08-28T15:07:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 856 | java | package cn.jt.feign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import cn.jt.common.util.SysResult;
import cn.jt.sso.pojo.User;
@FeignClient("jt-sso-provider")
public interface UserFeign {
@RequestMapping("/user/check/{param}/{typeVal}")
public SysResult check(@PathVariable String param, @PathVariable Integer typeVal);
@RequestMapping("/user/query/{ticket}")
public SysResult query(@PathVariable String ticket) ;
@RequestMapping("/user/register")
public SysResult register(User user);
@RequestMapping("/user/login")
public SysResult login(@RequestParam("u") String username, @RequestParam("p") String password) ;
}
| [
"1434097121@qq.com"
] | 1434097121@qq.com |
fac6601563ea40ca25d53655c26d3934d549dd5d | 80403ec5838e300c53fcb96aeb84d409bdce1c0c | /externalModules/labModules/laboratory/src/org/labkey/laboratory/table/WrappingTableCustomizer.java | 432431f03a8a21131e981f212264f4ef4b6c6fea | [] | no_license | scchess/LabKey | 7e073656ea494026b0020ad7f9d9179f03d87b41 | ce5f7a903c78c0d480002f738bccdbef97d6aeb9 | refs/heads/master | 2021-09-17T10:49:48.147439 | 2018-03-22T13:01:41 | 2018-03-22T13:01:41 | 126,447,224 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 757 | java | package org.labkey.laboratory.table;
import org.labkey.api.data.TableCustomizer;
import org.labkey.api.data.TableInfo;
import org.labkey.api.laboratory.LaboratoryService;
import org.labkey.api.ldk.LDKService;
/**
* User: bimber
* Date: 9/22/13
* Time: 1:43 PM
*/
public class WrappingTableCustomizer implements TableCustomizer
{
public WrappingTableCustomizer()
{
}
public void customize(TableInfo ti)
{
LaboratoryService.get().getLaboratoryTableCustomizer().customize(ti);
if (ti.getPkColumnNames().size() > 0)
LDKService.get().getDefaultTableCustomizer().customize(ti);
else
LDKService.get().getBuiltInColumnsCustomizer(true).customize(ti);
}
}
| [
"klum@labkey.com"
] | klum@labkey.com |
591b5e608c6c8539802fc6696a5d4d3dc6d31e68 | 4e79ed9d5d2f0a124d77e416dd003cf9e8844d9e | /Flow Control Statements/fcb11.java | c7e326fa991a52f8e4f2ef63bed28e96385e70ad | [] | no_license | navin613/pblapp-Java-Fundamentals | 47e0756b636fc24d6aefb95feb01856c5c44a201 | fbdb8c3442003c03a6b7d2c384580ad095978add | refs/heads/master | 2021-05-23T00:29:35.906325 | 2020-04-05T07:08:05 | 2020-04-05T07:08:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 293 | java | import java.util.*;
import java.io.*;
//This is 11 question of flow control statements topic
class fcb11{
public static void main(String args[]){
for(int i=23;i<=57;i++){
if(i==23 || i==57)
System.out.println(i);
else{
if(i%2==0)
System.out.println(i);
}
}
}
}
| [
"49487174+navin613@users.noreply.github.com"
] | 49487174+navin613@users.noreply.github.com |
c4346000a0f0e5af8d362c560a80a03ec2b1058e | f27033661e1652fc9c92cd1a6ee06d381c2ec146 | /bookShop/src/main/java/com/bookshop/repository/UserCartRepository.java | 4b312120f8bde82b28a1159e0807f788ee35ff90 | [] | no_license | vadym01/bookStore | f8b48f1d62a70440992a3fb212153780470ae8ed | f15c7de727cccbe2f0b87ae2f223827201ebd93e | refs/heads/master | 2022-07-03T03:26:41.566400 | 2020-05-06T17:54:17 | 2020-05-06T17:54:17 | 232,159,776 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 213 | java | package com.bookshop.repository;
import com.bookshop.entities.UserCart;
import org.springframework.data.jpa.repository.JpaRepository;
public interface UserCartRepository extends JpaRepository<UserCart,Long> {
}
| [
"vasylaki95@gmail.com"
] | vasylaki95@gmail.com |
1507073a0b11a4ba65d5bb12e9d8e5c69bb428eb | c8988ff4d8026362f111804aca2cdfb5b8415e53 | /app/src/main/java/com/finalyear/accesify/Count_attendance.java | b3ff63ff5ec0890e4ce4b26ce0410b235d1d436c | [] | no_license | ChaviGarg/Accesify-Project | 71760710c88b11e2753e68a8a0acfefa5e14fec0 | f263995317caaf0120f7ffe58133e479cfe29fee | refs/heads/master | 2023-02-23T19:24:46.941732 | 2021-01-31T11:35:38 | 2021-01-31T11:35:38 | 334,638,824 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,951 | java | package com.finalyear.accesify;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.TextView;
import com.firebase.ui.database.FirebaseRecyclerAdapter;
import com.firebase.ui.database.FirebaseRecyclerOptions;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.Query;
import com.google.firebase.database.ValueEventListener;
import com.squareup.picasso.Picasso;
import java.util.HashMap;
import de.hdodenhof.circleimageview.CircleImageView;
public class Count_attendance extends AppCompatActivity {
private DatabaseReference databaseReference;
private RecyclerView mUserslist;
private Toolbar mToolbar;
private DatabaseReference mUsersDatabase;
private LinearLayoutManager mLayoutManager;
private String date,subject;
Button upload_button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_count_attendance);
mUsersDatabase = FirebaseDatabase.getInstance().getReference().child("Users");
mLayoutManager = new LinearLayoutManager(this);
// View v = inflater.inflate(R.layout.activity_count_attendance, container, false);
mUserslist = findViewById(R.id.attendance_recycler);
mUserslist.setHasFixedSize(true);
mUserslist.setLayoutManager(mLayoutManager);
}
@Override
protected void onStart() {
super.onStart();
startListening();
}
public void startListening() {
Query query = FirebaseDatabase.getInstance()
.getReference()
.child("Teachers").child(FirebaseAuth.getInstance().getCurrentUser().getUid()).child("Students")
.limitToLast(100);
FirebaseRecyclerOptions<Users> options =
new FirebaseRecyclerOptions.Builder<Users>()
.setQuery(query, Users.class)
.build();
FirebaseRecyclerAdapter adapter = new FirebaseRecyclerAdapter<Users, UserViewHolder>(options) {
@Override
public UserViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
// Create a new instance of the ViewHolder, in this case we are using a custom
// layout called R.layout.message for each item
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.attendance_list_layout, parent, false);
return new UserViewHolder(view);
}
@Override
protected void onBindViewHolder(final UserViewHolder holder, int position, final Users model) {
date=getIntent().getStringExtra("date");
// Bind the Chat object to
// the ChatHolder
holder.setName(model.name);
holder.setRollnumber(model.roll_number);
/* final DatabaseReference mStudentDatabase=FirebaseDatabase.getInstance().getReference().child("Attendance");
mStudentDatabase.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
if (dataSnapshot.hasChild(model.roll_number)) {
// final String subject = dataSnapshot.child("subject").getValue().toString();
/*mStudentDatabase.child(model.roll_number).addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
if (dataSnapshot != null) {
if (dataSnapshot.hasChild(date)) {
mStudentDatabase.child(model.roll_number).child(date).addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
if (dataSnapshot!=null) {
if(dataSnapshot.child("status").getValue().toString()=="present"){
holder.checkBox.setChecked(true);
holder.upload_button.setEnabled(false);
if (dataSnapshot.child("status").getValue().toString()=="absent"){
holder.checkBox.setChecked(false);
holder.upload_button.setEnabled(false);
}
}
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
// mStudentDatabase.child(model.roll_number).child(dataSnapshot.child("subject").getValue().toString())
}
}
@Override
public void onCancelled (@NonNull DatabaseError databaseError){
}
});
*/
holder.upload_button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
FirebaseDatabase.getInstance().getReference().child("Teachers").child(FirebaseAuth.getInstance().getCurrentUser().getUid()).addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
subject=dataSnapshot.child("subject").getValue().toString();
final DatabaseReference AttendanceDatabase=FirebaseDatabase.getInstance().getReference().child("Attendance");
AttendanceDatabase.child(model.roll_number).child(subject).child(date).addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
if (dataSnapshot != null) {
if (holder.checkBox.isChecked())
{
HashMap<String,String> hashMap= new HashMap<>();
hashMap.put("name",model.name);
hashMap.put("status","present");
hashMap.put("roll_number",model.roll_number);
hashMap.put("date",date);
hashMap.put("subject",subject);
AttendanceDatabase.child(model.roll_number).child(subject).child("present").child(date).setValue(hashMap);
holder.checkBox.setEnabled(false);
holder.upload_button.setEnabled(false);
}
else{
HashMap<String,String> hashMap= new HashMap<>();
hashMap.put("name",model.name);
hashMap.put("status","absent");
hashMap.put("roll_number",model.roll_number);
hashMap.put("date",date);
AttendanceDatabase.child(model.roll_number).child(subject).child("absent").child(date).setValue(hashMap);
}
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
});
// ...
}
};
mUserslist.setAdapter(adapter);
adapter.startListening();
}
public static class UserViewHolder extends RecyclerView.ViewHolder {
View mView;
CheckBox checkBox;
Button upload_button;
public UserViewHolder(View itemView) {
super(itemView);
mView = itemView;
upload_button=mView.findViewById(R.id.upload_button);
checkBox= mView.findViewById(R.id.checkBox);
}
public void setName(String name) {
TextView userNameView = (TextView) mView.findViewById(R.id.student_displayname);
userNameView.setText(name);
}
public void setRollnumber(String status) {
TextView userStatusView=(TextView)
mView.findViewById(R.id.student_Rollno_ID);
userStatusView.setText(status);
}
}
}
| [
"chhaviagarwal2017@gmail.com"
] | chhaviagarwal2017@gmail.com |
4d4c00235b85e56abc36a29b0f411a5c1bf3b3ba | c512cf08b4d9170f583ea71d05aa5c5f68c15d93 | /src/com/thalesgroup/rtti/_2014_02_20/ldbsv/types/ArrayOfServiceLocations.java | 54e0393b5735c9e66f97993fa8d62b9a5c57acf2 | [] | no_license | nathan3882/SOAPIdealTrains | 16f693f739750f2c6a66198c8d1f66d50f97da47 | 118bec599bcd49c3fab944396c6c67337ae28c32 | refs/heads/master | 2021-10-21T21:58:52.479851 | 2019-03-06T21:43:07 | 2019-03-06T21:43:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,083 | java |
package com.thalesgroup.rtti._2014_02_20.ldbsv.types;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* A list of locations for a service.
*
* <p>Java class for ArrayOfServiceLocations complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ArrayOfServiceLocations">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="location" type="{http://thalesgroup.com/RTTI/2014-02-20/ldbsv/types}ServiceLocation" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ArrayOfServiceLocations", propOrder = {
"location"
})
public class ArrayOfServiceLocations {
@XmlElement(nillable = true)
protected List<ServiceLocation> location;
/**
* Gets the value of the location property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the location property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getLocation().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ServiceLocation }
*
*
*/
public List<ServiceLocation> getLocation() {
if (location == null) {
location = new ArrayList<ServiceLocation>();
}
return this.location;
}
}
| [
"nathan.allanson14@hotmail.com"
] | nathan.allanson14@hotmail.com |
25b7f66a6cc64db51f4612b4f72247152a577dff | d9393174c9579e10f1ad30b7f9782111b4c65db9 | /src/main/java/kmdm/beethoven/config/audit/AuditEventConverter.java | 2a64609f3ed271180e0347cb75b8511f9361b559 | [
"MIT"
] | permissive | martinely95/BeethovenJHipster | fe51c800185b9b59ff6cecd46d35392f3e20c67d | f0913db66379506556b22c14d8aaa00f15f399c3 | refs/heads/master | 2021-09-06T00:17:01.048367 | 2018-01-31T22:43:18 | 2018-01-31T22:43:18 | 118,338,727 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,319 | java | package kmdm.beethoven.config.audit;
import kmdm.beethoven.domain.PersistentAuditEvent;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.security.web.authentication.WebAuthenticationDetails;
import org.springframework.stereotype.Component;
import java.util.*;
@Component
public class AuditEventConverter {
/**
* Convert a list of PersistentAuditEvent to a list of AuditEvent
*
* @param persistentAuditEvents the list to convert
* @return the converted list.
*/
public List<AuditEvent> convertToAuditEvent(Iterable<PersistentAuditEvent> persistentAuditEvents) {
if (persistentAuditEvents == null) {
return Collections.emptyList();
}
List<AuditEvent> auditEvents = new ArrayList<>();
for (PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) {
auditEvents.add(convertToAuditEvent(persistentAuditEvent));
}
return auditEvents;
}
/**
* Convert a PersistentAuditEvent to an AuditEvent
*
* @param persistentAuditEvent the event to convert
* @return the converted list.
*/
public AuditEvent convertToAuditEvent(PersistentAuditEvent persistentAuditEvent) {
if (persistentAuditEvent == null) {
return null;
}
return new AuditEvent(Date.from(persistentAuditEvent.getAuditEventDate()), persistentAuditEvent.getPrincipal(),
persistentAuditEvent.getAuditEventType(), convertDataToObjects(persistentAuditEvent.getData()));
}
/**
* Internal conversion. This is needed to support the current SpringBoot actuator AuditEventRepository interface
*
* @param data the data to convert
* @return a map of String, Object
*/
public Map<String, Object> convertDataToObjects(Map<String, String> data) {
Map<String, Object> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, String> entry : data.entrySet()) {
results.put(entry.getKey(), entry.getValue());
}
}
return results;
}
/**
* Internal conversion. This method will allow to save additional data.
* By default, it will save the object as string
*
* @param data the data to convert
* @return a map of String, String
*/
public Map<String, String> convertDataToStrings(Map<String, Object> data) {
Map<String, String> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, Object> entry : data.entrySet()) {
Object object = entry.getValue();
// Extract the data that will be saved.
if (object instanceof WebAuthenticationDetails) {
WebAuthenticationDetails authenticationDetails = (WebAuthenticationDetails) object;
results.put("remoteAddress", authenticationDetails.getRemoteAddress());
results.put("sessionId", authenticationDetails.getSessionId());
} else if (object != null) {
results.put(entry.getKey(), object.toString());
} else {
results.put(entry.getKey(), "null");
}
}
}
return results;
}
}
| [
"martinely95@gmail.com"
] | martinely95@gmail.com |
0e85635f84cc7baad9b0cd0146c643c88d7bac07 | 892d6b9c2b99d83c1fac5be1620130d8d0852013 | /SiteConstructionSimulator/src/com/construction/simulator/site/util/SiteDataConstants.java | 0e0d9cb869f65b79beb4da7b755475818350a172 | [] | no_license | AmeetDalvi/SiteConstructionSimulator | 7440098c0add51750b34a70a199127f60bcbb6ee | c2e26c0fd40fb67c708fc67d004a86d7d9440faa | refs/heads/master | 2022-01-17T00:09:24.700651 | 2019-07-20T17:58:26 | 2019-07-20T17:58:26 | 197,963,139 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 598 | java | package com.construction.simulator.site.util;
public class SiteDataConstants {
public static final String TREE = "t";
public static final String ROCK_LAND = "r";
public static final String PLAIN_LAND = "o";
public static final String ADVANCE = "a";
public static final String TREE_PRESERVED = "T";
public static final String LEFT = "l";
public static final String RIGHT = ROCK_LAND;
public static final String QUIT = "q";
public static final String EAST = "E";
public static final String WEST = "W";
public static final String SOUTH = "S";
public static final String NORTH = "N";
}
| [
"amitdattha@gmail.com"
] | amitdattha@gmail.com |
47343924dda04a9bc3272c425dde2fe8fa372a3d | ff848dff85c1e33c0379f9819de3a037770ca2ee | /WebApplication/ejbs/src/main/java/br/com/lp3/ejb/beans/SongManagerBean.java | 4418f201e4156494ea9645822eb06a2a6fed1fa6 | [] | no_license | Morelatto/Steam.fm | ff08f738a8c0c844d6cbb067f89f1700a03d4fe5 | c2e6eda0314e70f33e7140ebe515ee146e2123cd | refs/heads/master | 2022-01-20T21:24:43.651055 | 2019-05-22T14:50:41 | 2019-05-22T14:51:33 | 43,655,195 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,020 | java | package br.com.lp3.ejb.beans;
import br.com.lp3.dao.RemoteDAO;
import br.com.lp3.ejb.SongManager;
import br.com.lp3.entities.Song;
import br.com.lp3.utilities.RemoteDAOOperations;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import javax.ejb.Stateless;
import static br.com.lp3.utilities.SteamFmConstants.RMI_SERVER_HOST;
import static br.com.lp3.utilities.SteamFmConstants.RMI_SERVER_PORT;
@Stateless
public class SongManagerBean implements SongManager {
private RemoteDAOOperations<Song> operations;
public SongManagerBean() throws RemoteException, NotBoundException {
Registry registry = LocateRegistry.getRegistry(RMI_SERVER_HOST, RMI_SERVER_PORT);
RemoteDAO remoteDAO = (RemoteDAO) registry.lookup("SongDAO");
operations = new RemoteDAOOperations<Song>(remoteDAO);
}
@Override
public RemoteDAOOperations<Song> getOperations() {
return operations;
}
}
| [
"pmichilis@uolinc.com"
] | pmichilis@uolinc.com |
7349c7366038cb7b5d6e7ab22a7b7336d5497717 | 2af9cec11033525eaa837a6f4c32321f210a41bc | /SemestralniPraceB_Balacek,strom/src/kolekce/AbstrLifo.java | 44b183d4b31a5505a44f1dbe7668c6d9a6357418 | [] | no_license | st52487/JavaProjects | 713eb002242c485616ed1cefebe1bd0bdc3fa702 | 04bb245729012fc157f72b0f597870bc152277e3 | refs/heads/master | 2020-05-01T17:45:52.561070 | 2019-04-11T15:25:17 | 2019-04-11T15:25:17 | 177,607,933 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 567 | java | package kolekce;
import objekty.Pozice;
public class AbstrLifo<T> implements IAbstrLifo<T> {
private final IAbstrDoubleList<T> STACK;
private IAbstrLifo<T> lifo;
public AbstrLifo() {
STACK = new AbstrDoubleList();
}
@Override
public void zrus() {
STACK.zrus();
}
@Override
public boolean jePrazdny() {
return STACK.jePrazdny();
}
@Override
public void vloz(T data) {
STACK.vlozPrvni(data);
}
@Override
public T odeber() {
return STACK.odeberPrvni();
}
}
| [
"43894020+st52487@users.noreply.github.com"
] | 43894020+st52487@users.noreply.github.com |
c21733d5802d76b9331725e677febccaeeb50638 | 7c182ae5f11583569ccf8a54195e31c9b30dea7b | /checkup-storm/src/main/java/backtype/storm/generated/StreamInfo.java | b3e952807ec33be5c3d83d6dd261c7e2fa653630 | [] | no_license | hhland/checkup-mvn | acb4196a706132659fcde5d68b546d1d9188bff7 | 9ba0895fe40912ea6679421a713b7820cc2f2617 | refs/heads/master | 2020-04-05T19:24:10.081115 | 2015-06-24T16:42:22 | 2015-06-24T16:42:22 | 27,477,903 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | true | 14,648 | java | /**
* Autogenerated by Thrift Compiler (0.7.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package backtype.storm.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class StreamInfo implements org.apache.thrift7.TBase<StreamInfo, StreamInfo._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("StreamInfo");
private static final org.apache.thrift7.protocol.TField OUTPUT_FIELDS_FIELD_DESC = new org.apache.thrift7.protocol.TField("output_fields", org.apache.thrift7.protocol.TType.LIST, (short)1);
private static final org.apache.thrift7.protocol.TField DIRECT_FIELD_DESC = new org.apache.thrift7.protocol.TField("direct", org.apache.thrift7.protocol.TType.BOOL, (short)2);
private List<String> output_fields; // required
private boolean direct; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
OUTPUT_FIELDS((short)1, "output_fields"),
DIRECT((short)2, "direct");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // OUTPUT_FIELDS
return OUTPUT_FIELDS;
case 2: // DIRECT
return DIRECT;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __DIRECT_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.OUTPUT_FIELDS, new org.apache.thrift7.meta_data.FieldMetaData("output_fields", org.apache.thrift7.TFieldRequirementType.REQUIRED,
new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING))));
tmpMap.put(_Fields.DIRECT, new org.apache.thrift7.meta_data.FieldMetaData("direct", org.apache.thrift7.TFieldRequirementType.REQUIRED,
new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(StreamInfo.class, metaDataMap);
}
public StreamInfo() {
}
public StreamInfo(
List<String> output_fields,
boolean direct)
{
this();
this.output_fields = output_fields;
this.direct = direct;
set_direct_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public StreamInfo(StreamInfo other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.is_set_output_fields()) {
List<String> __this__output_fields = new ArrayList<String>();
for (String other_element : other.output_fields) {
__this__output_fields.add(other_element);
}
this.output_fields = __this__output_fields;
}
this.direct = other.direct;
}
public StreamInfo deepCopy() {
return new StreamInfo(this);
}
@Override
public void clear() {
this.output_fields = null;
set_direct_isSet(false);
this.direct = false;
}
public int get_output_fields_size() {
return (this.output_fields == null) ? 0 : this.output_fields.size();
}
public java.util.Iterator<String> get_output_fields_iterator() {
return (this.output_fields == null) ? null : this.output_fields.iterator();
}
public void add_to_output_fields(String elem) {
if (this.output_fields == null) {
this.output_fields = new ArrayList<String>();
}
this.output_fields.add(elem);
}
public List<String> get_output_fields() {
return this.output_fields;
}
public void set_output_fields(List<String> output_fields) {
this.output_fields = output_fields;
}
public void unset_output_fields() {
this.output_fields = null;
}
/** Returns true if field output_fields is set (has been assigned a value) and false otherwise */
public boolean is_set_output_fields() {
return this.output_fields != null;
}
public void set_output_fields_isSet(boolean value) {
if (!value) {
this.output_fields = null;
}
}
public boolean is_direct() {
return this.direct;
}
public void set_direct(boolean direct) {
this.direct = direct;
set_direct_isSet(true);
}
public void unset_direct() {
__isset_bit_vector.clear(__DIRECT_ISSET_ID);
}
/** Returns true if field direct is set (has been assigned a value) and false otherwise */
public boolean is_set_direct() {
return __isset_bit_vector.get(__DIRECT_ISSET_ID);
}
public void set_direct_isSet(boolean value) {
__isset_bit_vector.set(__DIRECT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case OUTPUT_FIELDS:
if (value == null) {
unset_output_fields();
} else {
set_output_fields((List<String>)value);
}
break;
case DIRECT:
if (value == null) {
unset_direct();
} else {
set_direct((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case OUTPUT_FIELDS:
return get_output_fields();
case DIRECT:
return Boolean.valueOf(is_direct());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case OUTPUT_FIELDS:
return is_set_output_fields();
case DIRECT:
return is_set_direct();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof StreamInfo)
return this.equals((StreamInfo)that);
return false;
}
public boolean equals(StreamInfo that) {
if (that == null)
return false;
boolean this_present_output_fields = true && this.is_set_output_fields();
boolean that_present_output_fields = true && that.is_set_output_fields();
if (this_present_output_fields || that_present_output_fields) {
if (!(this_present_output_fields && that_present_output_fields))
return false;
if (!this.output_fields.equals(that.output_fields))
return false;
}
boolean this_present_direct = true;
boolean that_present_direct = true;
if (this_present_direct || that_present_direct) {
if (!(this_present_direct && that_present_direct))
return false;
if (this.direct != that.direct)
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_output_fields = true && (is_set_output_fields());
builder.append(present_output_fields);
if (present_output_fields)
builder.append(output_fields);
boolean present_direct = true;
builder.append(present_direct);
if (present_direct)
builder.append(direct);
return builder.toHashCode();
}
public int compareTo(StreamInfo other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
StreamInfo typedOther = (StreamInfo)other;
lastComparison = Boolean.valueOf(is_set_output_fields()).compareTo(typedOther.is_set_output_fields());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_output_fields()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.output_fields, typedOther.output_fields);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_direct()).compareTo(typedOther.is_set_direct());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_direct()) {
lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.direct, typedOther.direct);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
org.apache.thrift7.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == org.apache.thrift7.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // OUTPUT_FIELDS
if (field.type == org.apache.thrift7.protocol.TType.LIST) {
{
org.apache.thrift7.protocol.TList _list8 = iprot.readListBegin();
this.output_fields = new ArrayList<String>(_list8.size);
for (int _i9 = 0; _i9 < _list8.size; ++_i9)
{
String _elem10; // required
_elem10 = iprot.readString();
this.output_fields.add(_elem10);
}
iprot.readListEnd();
}
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // DIRECT
if (field.type == org.apache.thrift7.protocol.TType.BOOL) {
this.direct = iprot.readBool();
set_direct_isSet(true);
} else {
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.output_fields != null) {
oprot.writeFieldBegin(OUTPUT_FIELDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift7.protocol.TList(org.apache.thrift7.protocol.TType.STRING, this.output_fields.size()));
for (String _iter11 : this.output_fields)
{
oprot.writeString(_iter11);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(DIRECT_FIELD_DESC);
oprot.writeBool(this.direct);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("StreamInfo(");
boolean first = true;
sb.append("output_fields:");
if (this.output_fields == null) {
sb.append("null");
} else {
sb.append(this.output_fields);
}
first = false;
if (!first) sb.append(", ");
sb.append("direct:");
sb.append(this.direct);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift7.TException {
// check for required fields
if (!is_set_output_fields()) {
throw new org.apache.thrift7.protocol.TProtocolException("Required field 'output_fields' is unset! Struct:" + toString());
}
if (!is_set_direct()) {
throw new org.apache.thrift7.protocol.TProtocolException("Required field 'direct' is unset! Struct:" + toString());
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bit_vector = new BitSet(1);
read(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift7.TException te) {
throw new java.io.IOException(te);
}
}
}
| [
"hhlin54133@gmail.com"
] | hhlin54133@gmail.com |
6531328f02545ecd85a5fc36ca7a4afd0c5bfdeb | f5890f42749b8c9cf09cd568f38d37d36fecf3f9 | /Week04/src/examples/ParameterTester.java | 5de8c1522bb9f903f62b2a560fde8b7ebc50bded | [] | no_license | Amrit2/JavaProjects | fb69a434a2035641e7ab2d99bb6911bfdc5ce1a1 | 6a3f9619d74b3ae212b582095580dfe845e99092 | refs/heads/master | 2020-03-25T20:06:39.864931 | 2018-08-09T07:20:14 | 2018-08-09T07:20:14 | 144,115,460 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 931 | java | package examples;
/**
* Source: Java Foundations (Lewis et al.) This class demonstrates the effects
* of passing various types of parameters.
*
* @author Kjohnson & Jamal
*/
public class ParameterTester
{
/**
* Sets up three variables (one primitive and two objects) to serve as
* actual parameters to the changeValues method. Prints their values before
* and after calling the method.
*
* @param args
*/
public static void main(String[] args)
{
ParameterModifier modifier = new ParameterModifier();
int a1 = 111;
Num a2 = new Num(222);
Num a3 = new Num(333);
System.out.println("Before calling changeValues:");
System.out.println("a1\ta2\ta3");
System.out.println(a1 + "\t" + a2 + "\t" + a3 + "\n");
modifier.changeValues(a1, a2, a3);
System.out.println("After calling changeValues:");
System.out.println("a1\ta2\ta3");
System.out.println(a1 + "\t" + a2 + "\t" + a3 + "\n");
}
} | [
"amrit.kaur@myob.com"
] | amrit.kaur@myob.com |
b9a89a1913bf55158db4784008d2ee631c7b6356 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13457-38-14-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/resource/servlet/RoutingFilter_ESTest_scaffolding.java | 821625be12d45a68f1885c1d6df8467d74daddc9 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 444 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Apr 05 23:46:23 UTC 2020
*/
package org.xwiki.resource.servlet;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class RoutingFilter_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
32aa72ba0156a95a2de24cf210848808d19c9426 | b1f97eb9ddafea2481220b8d06c9739f27e4883e | /src/main/java/com/liaoyb/qingqing/gateway/web/rest/util/HeaderUtil.java | 62e888328b1257b925e54850fa21eedd8396c7e6 | [] | no_license | qingqing-mall/qingqing-gateway | d5baf00e9f94094def6b6605bc8baebf824f94a4 | a7ddb63590f62375e1e5a713bcbe3d0d411c411e | refs/heads/master | 2020-05-18T22:34:50.046383 | 2019-05-03T03:35:16 | 2019-05-03T03:35:16 | 184,694,029 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,660 | java | package com.liaoyb.qingqing.gateway.web.rest.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
/**
* Utility class for HTTP headers creation.
*/
public final class HeaderUtil {
private static final Logger log = LoggerFactory.getLogger(HeaderUtil.class);
private static final String APPLICATION_NAME = "gatewayApp";
private HeaderUtil() {
}
public static HttpHeaders createAlert(String message, String param) {
HttpHeaders headers = new HttpHeaders();
headers.add("X-" + APPLICATION_NAME + "-alert", message);
headers.add("X-" + APPLICATION_NAME + "-params", param);
return headers;
}
public static HttpHeaders createEntityCreationAlert(String entityName, String param) {
return createAlert(APPLICATION_NAME + "." + entityName + ".created", param);
}
public static HttpHeaders createEntityUpdateAlert(String entityName, String param) {
return createAlert(APPLICATION_NAME + "." + entityName + ".updated", param);
}
public static HttpHeaders createEntityDeletionAlert(String entityName, String param) {
return createAlert(APPLICATION_NAME + "." + entityName + ".deleted", param);
}
public static HttpHeaders createFailureAlert(String entityName, String errorKey, String defaultMessage) {
log.error("Entity processing failed, {}", defaultMessage);
HttpHeaders headers = new HttpHeaders();
headers.add("X-" + APPLICATION_NAME + "-error", "error." + errorKey);
headers.add("X-" + APPLICATION_NAME + "-params", entityName);
return headers;
}
}
| [
"liaoyanbo@cloudwalk.cn"
] | liaoyanbo@cloudwalk.cn |
4300c1f10930373a9a108eba3413daf58dca90b2 | 13c9c927335155080fee88aa72044a073230b9b6 | /src/main/java/com/jir/mr/outputformat/FilterReducer.java | fc24c567c09a5382d413be88bb53417ad3f56d0a | [] | no_license | JIRNXY/repository1 | 041d4ecaf5b02b4bbad937dd2595fedfb7c429c8 | 62a14d539ac6b4d43f651bab0989bd6f1e8e887d | refs/heads/master | 2023-03-20T20:22:14.539017 | 2021-03-07T13:33:40 | 2021-03-07T13:33:40 | 345,358,477 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 685 | java | package com.jir.mr.outputformat;
import java.io.IOException;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;
public class FilterReducer extends Reducer<Text, NullWritable, Text, NullWritable>{
// http://www.baidu.com
Text k = new Text();
@Override
protected void reduce(Text key, Iterable<NullWritable> values,
Context context) throws IOException, InterruptedException {
String line = key.toString();
line = line + "\r\n";
k.set(line);
//防止有冲突,循环写出
for (@SuppressWarnings("unused") NullWritable nullWritable : values) {
context.write(k, NullWritable.get());
}
}
}
| [
"3327813160@qq.com"
] | 3327813160@qq.com |
d3023bd0e31126838928e72f13c80ca3fcc8aa9e | fa4c9245ff7c0aea4ac486b7a545381d345297be | /mokosupport/src/main/java/com/moko/support/task/OrderTaskResponse.java | 31b032ad8c5aed1b2f3ddb1f2c813a4b524803dc | [] | no_license | Moko-LoRa-APP/Android-SDK | d3e94b7040bdd5b80c1866c5c9b8c529c4b1024f | 924e9e752ea7bca081e8687680fed07f98dfdb4f | refs/heads/master | 2023-03-01T01:00:07.649337 | 2020-12-25T03:27:00 | 2020-12-25T03:27:00 | 286,911,441 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 388 | java | package com.moko.support.task;
import com.moko.support.entity.OrderEnum;
import java.io.Serializable;
/**
* @Date 2018/1/23
* @Author wenzheng.liu
* @Description 任务反馈
* @ClassPath com.moko.support.task.OrderTaskResponse
*/
public class OrderTaskResponse implements Serializable {
public OrderEnum order;
public int responseType;
public byte[] responseValue;
}
| [
"329541594@qq.com"
] | 329541594@qq.com |
cab73435bcc4f8f2a38977668ddca6ebaee1f85c | e5f4e559cf188f79a1629000d971c39c2a48ee27 | /modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/FunctionsTest.java | 7d27d4a156ee32bf11f154312f0fc8d8b15a8f3f | [
"Apache-2.0",
"LicenseRef-scancode-gutenberg-2020",
"CC0-1.0",
"BSD-3-Clause"
] | permissive | NSAmelchev/ignite | 704f29e90606c15dcbe6648a593acb520202ba89 | 3acf3f1098d38ddea6d7f3d55c0d0ec2dafad17d | refs/heads/master | 2023-08-16T22:58:22.536044 | 2022-08-04T07:39:55 | 2022-08-04T07:39:55 | 80,110,041 | 1 | 0 | Apache-2.0 | 2023-01-25T14:45:55 | 2017-01-26T11:45:47 | Java | UTF-8 | Java | false | false | 12,178 | java | /*
* 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.
*/
package org.apache.ignite.internal.processors.query.calcite.integration;
import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.List;
import java.util.function.LongFunction;
import org.apache.calcite.sql.validate.SqlValidatorException;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.calcite.CalciteQueryEngineConfiguration;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.processors.query.IgniteSQLException;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.junit.Test;
/**
* Test Ignite SQL functions.
*/
public class FunctionsTest extends AbstractBasicIntegrationTest {
/** */
private static final Object[] NULL_RESULT = new Object[] { null };
/** */
@Test
public void testTimestampDiffWithFractionsOfSecond() {
assertQuery("SELECT TIMESTAMPDIFF(MICROSECOND, TIMESTAMP '2022-02-01 10:30:28.000', " +
"TIMESTAMP '2022-02-01 10:30:28.128')").returns(128000).check();
assertQuery("SELECT TIMESTAMPDIFF(NANOSECOND, TIMESTAMP '2022-02-01 10:30:28.000', " +
"TIMESTAMP '2022-02-01 10:30:28.128')").returns(128000000L).check();
}
/** */
@Test
public void testLength() {
assertQuery("SELECT LENGTH('TEST')").returns(4).check();
assertQuery("SELECT LENGTH(NULL)").returns(NULL_RESULT).check();
}
/** */
@Test
public void testQueryEngine() {
assertQuery("SELECT QUERY_ENGINE()").returns(CalciteQueryEngineConfiguration.ENGINE_NAME).check();
}
/** */
@Test
public void testCurrentDateTimeTimeStamp() {
checkDateTimeQuery("SELECT CURRENT_DATE", Date::new);
checkDateTimeQuery("SELECT CURRENT_TIME", Time::new);
checkDateTimeQuery("SELECT CURRENT_TIMESTAMP", Timestamp::new);
checkDateTimeQuery("SELECT LOCALTIME", Time::new);
checkDateTimeQuery("SELECT LOCALTIMESTAMP", Timestamp::new);
checkDateTimeQuery("SELECT {fn CURDATE()}", Date::new);
checkDateTimeQuery("SELECT {fn CURTIME()}", Time::new);
checkDateTimeQuery("SELECT {fn NOW()}", Timestamp::new);
}
/** */
private <T> void checkDateTimeQuery(String sql, LongFunction<T> func) {
while (true) {
long tsBeg = U.currentTimeMillis();
List<List<?>> res = sql(sql);
long tsEnd = U.currentTimeMillis();
assertEquals(1, res.size());
assertEquals(1, res.get(0).size());
String strBeg = func.apply(tsBeg).toString();
String strEnd = func.apply(tsEnd).toString();
// Date changed, time comparison may return wrong result.
if (strBeg.compareTo(strEnd) > 0)
continue;
String strRes = res.get(0).get(0).toString();
assertTrue(strBeg.compareTo(strRes) <= 0);
assertTrue(strEnd.compareTo(strRes) >= 0);
return;
}
}
/** */
@Test
public void testReplace() {
assertQuery("SELECT REPLACE('12341234', '1', '55')").returns("5523455234").check();
assertQuery("SELECT REPLACE(NULL, '1', '5')").returns(NULL_RESULT).check();
assertQuery("SELECT REPLACE('1', NULL, '5')").returns(NULL_RESULT).check();
assertQuery("SELECT REPLACE('11', '1', NULL)").returns(NULL_RESULT).check();
assertQuery("SELECT REPLACE('11', '1', '')").returns("").check();
}
/** */
@Test
public void testRange() {
assertQuery("SELECT * FROM table(system_range(1, 4))")
.returns(1L)
.returns(2L)
.returns(3L)
.returns(4L)
.check();
assertQuery("SELECT * FROM table(system_range(1, 4, 2))")
.returns(1L)
.returns(3L)
.check();
assertQuery("SELECT * FROM table(system_range(4, 1, -1))")
.returns(4L)
.returns(3L)
.returns(2L)
.returns(1L)
.check();
assertQuery("SELECT * FROM table(system_range(4, 1, -2))")
.returns(4L)
.returns(2L)
.check();
assertEquals(0, sql("SELECT * FROM table(system_range(4, 1))").size());
assertEquals(0, sql("SELECT * FROM table(system_range(null, 1))").size());
assertThrows("SELECT * FROM table(system_range(1, 1, 0))", IllegalArgumentException.class,
"Increment can't be 0");
}
/**
* Important! Don`t change query call sequence in this test. This also tests correctness of
* {@link org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl#SCALAR_CACHE} usage.
*/
@Test
public void testRangeWithCache() throws Exception {
IgniteCache<Integer, Integer> cache = grid(0).getOrCreateCache(
new CacheConfiguration<Integer, Integer>("test")
.setBackups(1)
.setIndexedTypes(Integer.class, Integer.class)
);
for (int i = 0; i < 100; i++)
cache.put(i, i);
awaitPartitionMapExchange();
// Correlated INNER join.
assertQuery("SELECT t._val FROM \"test\".Integer t WHERE t._val < 5 AND " +
"t._key in (SELECT x FROM table(system_range(t._val, t._val))) ")
.returns(0)
.returns(1)
.returns(2)
.returns(3)
.returns(4)
.check();
// Correlated LEFT joins.
assertQuery("SELECT t._val FROM \"test\".Integer t WHERE t._val < 5 AND " +
"EXISTS (SELECT x FROM table(system_range(t._val, t._val)) WHERE mod(x, 2) = 0) ")
.returns(0)
.returns(2)
.returns(4)
.check();
assertQuery("SELECT t._val FROM \"test\".Integer t WHERE t._val < 5 AND " +
"NOT EXISTS (SELECT x FROM table(system_range(t._val, t._val)) WHERE mod(x, 2) = 0) ")
.returns(1)
.returns(3)
.check();
assertEquals(0, sql("SELECT t._val FROM \"test\".Integer t WHERE " +
"EXISTS (SELECT x FROM table(system_range(t._val, null))) ").size());
// Non-correlated join.
assertQuery("SELECT t._val FROM \"test\".Integer t JOIN table(system_range(1, 50)) as r ON t._key = r.x " +
"WHERE mod(r.x, 10) = 0")
.returns(10)
.returns(20)
.returns(30)
.returns(40)
.returns(50)
.check();
}
/** */
@Test
public void testPercentRemainder() {
assertQuery("SELECT 3 % 2").returns(1).check();
assertQuery("SELECT 4 % 2").returns(0).check();
assertQuery("SELECT NULL % 2").returns(NULL_RESULT).check();
assertQuery("SELECT 3 % NULL::int").returns(NULL_RESULT).check();
assertQuery("SELECT 3 % NULL").returns(NULL_RESULT).check();
}
/** */
@Test
public void testNullFunctionArguments() {
// Don't infer result data type from arguments (result is always INTEGER_NULLABLE).
assertQuery("SELECT ASCII(NULL)").returns(NULL_RESULT).check();
// Inferring result data type from first STRING argument.
assertQuery("SELECT REPLACE(NULL, '1', '2')").returns(NULL_RESULT).check();
// Inferring result data type from both arguments.
assertQuery("SELECT MOD(1, null)").returns(NULL_RESULT).check();
// Inferring result data type from first NUMERIC argument.
assertQuery("SELECT TRUNCATE(NULL, 0)").returns(NULL_RESULT).check();
// Inferring arguments data types and then inferring result data type from all arguments.
assertQuery("SELECT FALSE AND NULL").returns(false).check();
}
/** */
@Test
public void testMonthnameDayname() {
assertQuery("SELECT MONTHNAME(DATE '2021-01-01')").returns("January").check();
assertQuery("SELECT DAYNAME(DATE '2021-01-01')").returns("Friday").check();
}
/** */
@Test
public void testTypeOf() {
assertQuery("SELECT TYPEOF(1)").returns("INTEGER").check();
assertQuery("SELECT TYPEOF(1.1::DOUBLE)").returns("DOUBLE").check();
assertQuery("SELECT TYPEOF(1.1::DECIMAL(3, 2))").returns("DECIMAL(3, 2)").check();
assertQuery("SELECT TYPEOF('a')").returns("CHAR(1)").check();
assertQuery("SELECT TYPEOF('a'::varchar(1))").returns("VARCHAR(1)").check();
assertQuery("SELECT TYPEOF(NULL)").returns("NULL").check();
assertQuery("SELECT TYPEOF(NULL::VARCHAR(100))").returns("VARCHAR(100)").check();
assertThrows("SELECT TYPEOF()", SqlValidatorException.class, "Invalid number of arguments");
assertThrows("SELECT TYPEOF(1, 2)", SqlValidatorException.class, "Invalid number of arguments");
}
/** */
@Test
public void testRegex() {
assertQuery("SELECT 'abcd' ~ 'ab[cd]'").returns(true).check();
assertQuery("SELECT 'abcd' ~ 'ab[cd]$'").returns(false).check();
assertQuery("SELECT 'abcd' ~ 'ab[CD]'").returns(false).check();
assertQuery("SELECT 'abcd' ~* 'ab[cd]'").returns(true).check();
assertQuery("SELECT 'abcd' ~* 'ab[cd]$'").returns(false).check();
assertQuery("SELECT 'abcd' ~* 'ab[CD]'").returns(true).check();
assertQuery("SELECT 'abcd' !~ 'ab[cd]'").returns(false).check();
assertQuery("SELECT 'abcd' !~ 'ab[cd]$'").returns(true).check();
assertQuery("SELECT 'abcd' !~ 'ab[CD]'").returns(true).check();
assertQuery("SELECT 'abcd' !~* 'ab[cd]'").returns(false).check();
assertQuery("SELECT 'abcd' !~* 'ab[cd]$'").returns(true).check();
assertQuery("SELECT 'abcd' !~* 'ab[CD]'").returns(false).check();
assertQuery("SELECT null ~ 'ab[cd]'").returns(NULL_RESULT).check();
assertQuery("SELECT 'abcd' ~ null").returns(NULL_RESULT).check();
assertQuery("SELECT null ~ null").returns(NULL_RESULT).check();
assertQuery("SELECT null ~* 'ab[cd]'").returns(NULL_RESULT).check();
assertQuery("SELECT 'abcd' ~* null").returns(NULL_RESULT).check();
assertQuery("SELECT null ~* null").returns(NULL_RESULT).check();
assertQuery("SELECT null !~ 'ab[cd]'").returns(NULL_RESULT).check();
assertQuery("SELECT 'abcd' !~ null").returns(NULL_RESULT).check();
assertQuery("SELECT null !~ null").returns(NULL_RESULT).check();
assertQuery("SELECT null !~* 'ab[cd]'").returns(NULL_RESULT).check();
assertQuery("SELECT 'abcd' !~* null").returns(NULL_RESULT).check();
assertQuery("SELECT null !~* null").returns(NULL_RESULT).check();
assertThrows("SELECT 'abcd' ~ '[a-z'", IgniteSQLException.class, null);
}
/** */
@Test
public void testDynamicParameterTypesInference() {
assertQuery("SELECT lower(?)").withParams("ASD").returns("asd").check();
assertQuery("SELECT ? % ?").withParams(11, 10).returns(BigDecimal.valueOf(1)).check();
assertQuery("SELECT sqrt(?)").withParams(4d).returns(2d).check();
assertQuery("SELECT last_day(?)").withParams(Date.valueOf("2022-01-01"))
.returns(Date.valueOf("2022-01-31")).check();
assertQuery("SELECT ?").withParams("asd").returns("asd").check();
assertQuery("SELECT coalesce(?, ?)").withParams("a", 10).returns("a").check();
}
}
| [
"plehanov.alex@gmail.com"
] | plehanov.alex@gmail.com |
e26b8c153aeb0b9fb7486695b710bd1867545577 | d190eb4e5e3e66893e7e811a73dea937a3297e5e | /chrome/android/java/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcher.java | 75d000862490c382eafd72fc5afc6bb8cb342265 | [
"BSD-3-Clause"
] | permissive | barkinet/chromium | 583629a6b89a4c20a716e0bdefd8d1d4099f37cf | c869f969ab542e85eff201e64d45fa5daf8dd012 | refs/heads/master | 2023-01-16T06:11:09.995777 | 2018-12-04T12:01:23 | 2018-12-04T12:01:23 | 160,352,486 | 1 | 0 | null | 2018-12-04T12:15:25 | 2018-12-04T12:15:24 | null | UTF-8 | Java | false | false | 1,674 | java | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.cached_image_fetcher;
import android.graphics.Bitmap;
import org.chromium.base.Callback;
import org.chromium.base.ThreadUtils;
/**
* Provides cached image fetching capabilities. Uses getLastUsedProfile, which
* will need to be changed when supporting multi-profile.
*/
public interface CachedImageFetcher {
static CachedImageFetcher getInstance() {
ThreadUtils.assertOnUiThread();
return CachedImageFetcherImpl.getInstance();
}
/**
* Report an event metric.
*
* @param eventId The event to be reported
*/
void reportEvent(@CachedImageFetcherEvent int eventId);
/**
* Fetches the image at url with the desired size. Image is null if not
* found or fails decoding.
*
* @param url The url to fetch the image from.
* @param width The new bitmap's desired width (in pixels).
* @param height The new bitmap's desired height (in pixels).
* @param callback The function which will be called when the image is ready.
*/
void fetchImage(String url, int width, int height, Callback<Bitmap> callback);
/**
* Alias of fetchImage that ignores scaling.
*
* @param url The url to fetch the image from.
* @param callback The function which will be called when the image is ready.
*/
void fetchImage(String url, Callback<Bitmap> callback);
/**
* Destroy method, called to clear resources to prevent leakage.
*/
void destroy();
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
511ca4d104f6efc12fade7c70984c5d2efc16d99 | 82de1e98e30a0836b892f00e07bfcc0954dbc517 | /hotcomm-data/hotcomm-data-service/src/main/java/com/hotcomm/data/bean/enums/DeviceGroupEnum.java | 3e33bf23ae999c4e9ddb685819a60201d8a80579 | [] | no_license | jiajiales/hangkang-qingdao | ab319048b61f6463f8cf1ac86ac5c74bd3df35d7 | 60a0a4b1d1fb9814d8aa21188aebbf72a1d6b25d | refs/heads/master | 2020-04-22T17:07:34.569613 | 2019-02-13T15:14:07 | 2019-02-13T15:14:07 | 170,530,164 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,247 | java | package com.hotcomm.data.bean.enums;
public class DeviceGroupEnum {
public enum DeviceGroupStatus {
ENABLE(1, "有效"),
DISABLE(2, "无效");
private Integer value;
private String name;
DeviceGroupStatus(Integer value, String name) {
this.value = value;
this.name = name;
}
public Integer getValue() {
return value;
}
public String getName() {
return name;
}
public static DeviceGroupStatus getByValue(Integer value) {
for (DeviceGroupStatus obj : DeviceGroupStatus.values()) {
if (obj.getValue().equals(value)) {
return obj;
}
}
return null;
}
}
public enum DeviceGroupDeleteStatus {
NO(1, "否"),
YES(2, "是");
private Integer value;
private String name;
DeviceGroupDeleteStatus(Integer value, String name) {
this.value = value;
this.name = name;
}
public Integer getValue() {
return value;
}
public String getName() {
return name;
}
public static DeviceGroupDeleteStatus getByValue(Integer value) {
for (DeviceGroupDeleteStatus obj : DeviceGroupDeleteStatus.values()) {
if (obj.getValue().equals(value)) {
return obj;
}
}
return null;
}
}
}
| [
"562910919@qq.com"
] | 562910919@qq.com |
e1899d20e548d084c4d588bbada3edf673218466 | f03c784d24a1bab7b6e1a73aab30144c7aa01f67 | /eclipse-jee/udemy-hibernate-course/7-Retrieving-Entities/src/main/java/com/infiniteskills/data/App1.java | 26727999d70d6d86207807407c5efa9e7a2a06ee | [] | no_license | johnvincentio/repo-hibernate | 1fbfd41df969a1c87f41af451e8cbe8292473409 | a8e66048af88653f08c40fac470232b45b18f84a | refs/heads/master | 2022-11-27T16:59:39.228086 | 2020-01-21T23:06:41 | 2020-01-21T23:06:41 | 84,679,034 | 0 | 0 | null | 2022-11-24T07:18:52 | 2017-03-11T20:50:37 | Java | UTF-8 | Java | false | false | 1,247 | java | package com.infiniteskills.data;
import org.hibernate.Session;
import com.infiniteskills.data.entities.Bank;
/*
Hibernate: select bank0_.BANK_ID as BANK_ID1_1_0_, bank0_.ADDRESS_LINE_1 as ADDRESS_2_1_0_, bank0_.ADDRESS_LINE_2 as ADDRESS_3_1_0_, bank0_.ADDRESS_TYPE as ADDRESS_4_1_0_, bank0_.CITY as CITY5_1_0_, bank0_.STATE as STATE6_1_0_, bank0_.ZIP_CODE as ZIP_CODE7_1_0_, bank0_.CREATED_BY as CREATED_8_1_0_, bank0_.CREATED_DATE as CREATED_9_1_0_, bank0_.IS_INTERNATIONAL as IS_INTE10_1_0_, bank0_.LAST_UPDATED_BY as LAST_UP11_1_0_, bank0_.LAST_UPDATED_DATE as LAST_UP12_1_0_, bank0_.NAME as NAME13_1_0_ from BANK bank0_ where bank0_.BANK_ID=?
Method Executed
Second National Trust
*/
public class App1 {
public static void main(String[] args) {
Session session = HibernateUtil.getSessionFactory().openSession();
try {
org.hibernate.Transaction transaction = session.beginTransaction();
Bank bank = (Bank) session.get(Bank.class, 1L);
System.out.println("Method Executed");
System.out.println(bank.getName());
transaction.commit();
}
catch (Exception e) {
e.printStackTrace();
}
finally {
session.close();
HibernateUtil.getSessionFactory().close();
}
}
}
| [
"john@johnvincent.io"
] | john@johnvincent.io |
8090bc195c102df01baea0531595f532a3405191 | 1f3cf0a8339954e60afbb52d2a37fdc304b425b6 | /src/main/java/com/prakash/busi/daoImpl/CountryDAOImpl.java | cdd619e1a5c05cc1be40d5b531f769adc158776e | [] | no_license | Chprakash/BusiReg | d9bca4c504e61badbe52fecaa9836bb2ead0e483 | c37bcc9a2aecd67f44c3492bdb193b4d93fecc5d | refs/heads/master | 2020-04-02T01:47:13.405887 | 2017-06-25T09:35:34 | 2017-06-25T09:35:34 | 83,183,215 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,213 | java | package com.prakash.busi.daoImpl;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.prakash.busi.dao.AbstractDao;
import com.prakash.busi.dao.CountryDAO;
import com.prakash.busi.model.LCountry;
@Repository
@Transactional
public class CountryDAOImpl extends AbstractDao<Long, LCountry> implements CountryDAO{
static final Logger logger = LoggerFactory.getLogger(CountryDAOImpl.class);
@Override
public LCountry getCountryByID(Long id) {
logger.info("CountryDAOImpl.getCountryByID(...)");
LCountry country = getByKey(id);
if(country!=null){
return country;
}
return null;
}
@Override
@SuppressWarnings("unchecked")
public List<LCountry> getAllCountries() {
logger.info("CountryDAOImpl.getAllCountries(...)");
Criteria criteria = createEntityCriteria().addOrder(Order.asc("id"));
criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);//To avoid duplicates.
List<LCountry> countryList = (List<LCountry>) criteria.list();
return countryList;
}
}
| [
"mailstochandraprakash@gmail.com"
] | mailstochandraprakash@gmail.com |
e6d3738e0e70f112bc82fb0f3db6aa86aeb71874 | 3d2423c1487e7b269ed32e4f9e9a389e88965608 | /upload-apk/src/main/java/cn/hcnet2006/blog/uploadapk/service/impl/OSSService.java | 543cdf08993becea553ff78b9c5667aeea8b1874 | [] | no_license | lidengyin/micro-blog | 79b5fea9bf52bcfd12609d3b04de48de60ae7121 | be112647a2e036cd594908ea0c937e2f83967542 | refs/heads/master | 2022-06-23T08:52:18.673051 | 2020-03-27T14:05:55 | 2020-03-27T14:05:55 | 243,299,945 | 0 | 1 | null | 2022-06-21T02:59:34 | 2020-02-26T15:43:19 | JavaScript | UTF-8 | Java | false | false | 277 | java | package cn.hcnet2006.blog.uploadapk.service.impl;
import cn.hcnet2006.blog.uploadapk.config.OSSConfig;
import com.aliyun.oss.OSS;
import org.springframework.beans.factory.annotation.Autowired;
public class OSSService {
private OSS ossClient = OSSConfig.ossClient();
}
| [
"2743853037@qq.com"
] | 2743853037@qq.com |
2e8299fe3829a271bc1eee95f881a0c9bb879578 | 51d326ddc7a843c71d02d14b649242186a8772da | /HeadfirstDesignPattern/src/com/lrd/ObserverPattern/StatisticDisplay.java | 8a58b6cb70cc4efba7bb2410dcca218c426bff4d | [] | no_license | ReaderLi/DesignPatternForJava | 751eed5920b2b8a8072b183b22a07a66a5490aee | e56da58574e27b68e3cfd7a0016df4fe14737d84 | refs/heads/master | 2021-04-15T17:57:28.362080 | 2018-04-24T13:58:41 | 2018-04-24T13:58:41 | 126,658,800 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,937 | java | package com.lrd.ObserverPattern;
import java.util.ArrayList;
import java.util.Map;
public class StatisticDisplay implements Observer,Display{
private WeatherDataManager weatherDataManager;
private WeatherData weatherData;
private float temperature;
private float humidity;
private float pressure;
private Map<String, WeatherData> weatherDataMap;
private ArrayList<Float> weatherDataTemperatureArrayList = new ArrayList<>();
public StatisticDisplay(WeatherData weatherData,WeatherDataManager weatherDataManager){
this.weatherDataManager = weatherDataManager;
this.weatherData = new WeatherData();
weatherData.registerObserver(this);
}
@Override
public void display() {
weatherDataMap = weatherDataManager.getweatherDataMap();
for (Map.Entry<String, WeatherData> entry : weatherDataMap.entrySet()) {
//System.out.println(entry.getKey() + ":" + entry.getValue());
weatherDataTemperatureArrayList.add(entry.getValue().getTemperature());
}
float minTempe = weatherDataTemperatureArrayList.get(0);
float maxTempe = weatherDataTemperatureArrayList.get(0);
float avgTempe;
float sum = weatherDataTemperatureArrayList.get(0);
for (int i=1;i< weatherDataTemperatureArrayList.size();i++){
sum += weatherDataTemperatureArrayList.get(i);
float temp = weatherDataTemperatureArrayList.get(i);
if(minTempe > temp){
minTempe = temp;
}
if (maxTempe < temp){
maxTempe = temp;
}
}
avgTempe = sum/weatherDataTemperatureArrayList.size();
System.out.println("Avg/Max/Min temperature = " + avgTempe + "/" + maxTempe + "/" + minTempe);
}
@Override
public void update(float temperature, float humidity, float pressure) {
display();
}
}
| [
"1422996900@qq.com"
] | 1422996900@qq.com |
ade5b4a6129bc2f47897e070a3b53fff2e40f84a | 7e3a129cf3ecc8a52b042ecb14dc8ea2a0e7ea94 | /src/day11/LoginException.java | 923d1977a20f1da9fdf93d6c819f23195bc8e74d | [] | no_license | bwf2020/java14rep | 884043be96798b51e4fd73c9ae63ca97be494a27 | 0cf9c3235df9174b200e2164802ae4fd33979fa9 | refs/heads/master | 2023-08-10T18:47:57.157443 | 2021-09-22T08:46:34 | 2021-09-22T08:46:34 | 394,903,964 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 496 | java | package day11;
public class LoginException extends Exception{
@Override
public String getMessage() {
System.out.println("登录发生错误了");
System.out.println("登录发生错误了2");
System.out.println("登录发生错误了3");
System.out.println("登录发生错误了4");
System.out.println("登录发生错误了5");
System.out.println("登录发生错误了6");
System.out.println("登录发生错误了7");
return "登录发生错误了2";
}
}
| [
"boweifeng.com"
] | boweifeng.com |
68e0b88e9baa8f1df27e72441c3bbe5a38039090 | c8fc4cc4b28bda39ad23f2ac8b46c96f7b17d21d | /bbva-integracion-api/src/main/java/com/example/integraciones/repository/rol/RolRespository.java | d38c3307a1f4ca740e00632069d6bcac5b153a88 | [] | no_license | nesvila90/poc-spring-cloud | 38134f597c3ee4fbf1ce4aa09109998555d85653 | 67f3d9f1cf1d930205876c4b3847d6da2fb9cf53 | refs/heads/master | 2021-02-10T20:32:14.877572 | 2020-03-04T03:10:43 | 2020-03-04T03:10:43 | 244,417,205 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 235 | java | package com.example.integraciones.repository.rol;
import com.example.integraciones.domain.entity.Rol;
import org.springframework.data.jpa.repository.JpaRepository;
public interface RolRespository extends JpaRepository<Rol, Long> {
}
| [
"nesvila90@hotmail.com"
] | nesvila90@hotmail.com |
7159e7a67f0aba4772118e42473b40184bcbddbd | 3be1ee7242918dc0286e7f450b8f82bf25c1afdc | /app/src/main/java/com/kardelenapp/matematikformulleri/UcgenFragment.java | bf7b4f371a61ab3570da41f1b2de4e2beab33af2 | [] | no_license | ipekbayrak/MatematikFormulleri | 46e01e6970a047171e3940104d00770778295dc5 | 99347b3d6aca581694b550f7ba2121fa80f78436 | refs/heads/master | 2023-01-07T23:05:37.051741 | 2020-10-23T19:32:54 | 2020-10-23T19:32:54 | 306,729,777 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 501 | java | package com.kardelenapp.matematikformulleri;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by mustafa on 11/16/2017.
*/
public class UcgenFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.ucgen, null);
return v;
}
} | [
"mustafa.ipekbayrak@istanbul.edu.tr"
] | mustafa.ipekbayrak@istanbul.edu.tr |
f0e63263c221f0975c9daa55815cd436f0e97288 | 1e20c4121c5778d350a51ffa519ed3888c50e413 | /src/main/java/org/nnc/moviediary/service/implementations/GenreServiceImpl.java | 36d515f2c44b0d1c62c03f945fd9de5a3a4ce0c8 | [] | no_license | deneslovei/moviediary | 9027f2356b6471b765466cea523ee6a355e70894 | f442d1043cc822abc8e41ebcea8e8ee11f392f8d | refs/heads/master | 2020-06-05T15:53:54.979070 | 2013-07-12T14:54:01 | 2013-07-12T14:54:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,067 | java | package org.nnc.moviediary.service.implementations;
import java.util.List;
import org.nnc.moviediary.dao.interfaces.GenreDao;
import org.nnc.moviediary.domain.entities.Genre;
import org.nnc.moviediary.domain.entities.Movie;
import org.nnc.moviediary.service.interfaces.GenreService;
public class GenreServiceImpl implements GenreService {
private GenreDao genreDao;
public GenreServiceImpl(final GenreDao genreDao) {
this.genreDao = genreDao;
}
@Override
public List<Genre> getAllGenres() {
return genreDao.getAllGenres();
}
@Override
public Genre getGenreById(final String genreId) {
long id = Long.parseLong(genreId);
return genreDao.getGenreById(id);
}
@Override
public List<String> saveGenre(final Boolean visible, final String name, final String description, final String[] moviesIds) {
List<String> errors = ServiceUtil.validateGenre("0", visible, name, description, moviesIds);
if (errors.isEmpty()) {
List<Movie> movies = ServiceUtil.convertIdsToDummyEntitiesToSave(moviesIds, Movie.class);
saveGenre(visible, name, description, movies);
}
return errors;
}
private void saveGenre(final Boolean visible, final String name, final String description, final List<Movie> movies) {
Genre genre = new Genre(0L, visible, name, description, movies);
genreDao.saveGenre(genre);
}
@Override
public List<String> updateGenre(final String genreId, final Boolean visible, final String name, final String description, final String[] moviesIds) {
List<String> errors = ServiceUtil.validateGenre(genreId, visible, name, description, moviesIds);
if (errors.isEmpty()) {
long id = Long.parseLong(genreId);
List<Movie> movies = ServiceUtil.convertIdsToDummyEntitiesToSave(moviesIds, Movie.class);
updateGenre(id, visible, name, description, movies);
}
return errors;
}
private void updateGenre(final long id, final Boolean visible, final String name, final String description, final List<Movie> movies) {
Genre genre = new Genre(id, visible, name, description, movies);
genreDao.updateGenre(genre);
}
}
| [
"deneslovei@gmail.com"
] | deneslovei@gmail.com |
6fa13ba3913a61094504fa0165dab2451ad5016d | 26797675560f2d13f85e59251e27b9c87c729d2e | /app/src/main/java/com/android/ground/ground/model/post/lineup/ScoreMannerSkill.java | 7e77d86de37206c305955f099115640886055deb | [] | no_license | SangyuKim/Ground099 | 4fbb0de1a952b2255223622affaa89f83bfe2c03 | 2249b2f0ad5c8f8a58fbd710409acf246074125e | refs/heads/master | 2021-01-10T15:31:22.081160 | 2015-12-16T11:48:42 | 2015-12-16T11:48:42 | 47,305,130 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 301 | java | package com.android.ground.ground.model.post.lineup;
/**
* Created by Tacademy on 2015-12-02.
*/
public class ScoreMannerSkill {
public int match_id;
public int club_id;
public int homeAway;
public int score;
public int skill;
public int manner;
public int member_id;
}
| [
"catusa159@naver.com"
] | catusa159@naver.com |
f67b3b39e5e9c5530390181b2d8b21b3083eba17 | 6a0789951201cff61ff9c32d0562a6148d545b3e | /Penerbit/src/penerbit/penerbit.java | 794233f799da090ce06b8d9ae3f7ec523171bef5 | [] | no_license | dianbugas/java-Gui | ddb70226fa529a224eec7cc8993322d4c8c985e3 | a09e7b57f0b509b9b444fcdd0617bd9e3bbc868a | refs/heads/master | 2023-02-20T15:30:40.801096 | 2021-01-18T14:47:28 | 2021-01-18T14:47:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,329 | 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 penerbit;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.table.DefaultTableModel;
/**
*
* @author dian
*/
public final class penerbit extends javax.swing.JFrame {
public Connection con;
public Statement st;
public ResultSet rs;
public DefaultTableModel model;
/**
* Creates new form penerbit
*/
public penerbit() {
initComponents();
String[] header = {"id","penerbit","kota"};
model = new DefaultTableModel(header,0);
table.setModel(model);
tampil();
}
public void tampil(){
koneksi classKoneksi = new koneksi();
try{
con = koneksi.getKoneksi();
st = con.createStatement();
rs = st.executeQuery("SELECT * FROM penerbit");
while(rs.next()){
String[] row = {rs.getString(1),rs.getString(2),rs.getString(3)};
model.addRow(row);
}
table.setModel(model);
}catch(SQLException ex){
System.out.print(ex.getMessage());
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
table = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Tabel Penerbit");
table.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane1.setViewportView(table);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 489, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(24, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(13, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
pack();
}// </editor-fold>//GEN-END:initComponents
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(penerbit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(penerbit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(penerbit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(penerbit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new penerbit().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable table;
// End of variables declaration//GEN-END:variables
}
| [
"dianbugas@gmail.com"
] | dianbugas@gmail.com |
3f09a2f72a66291ad63287a050447f78d92ace16 | bd38094f4ace4153cb245bcedf131a40b04fcba4 | /.JETEmitters/src/org/talend/designer/codegen/translators/databases/sybase/TSybaseSPBeginJava.java | a6287091d608ebbc718fa46b3802be77f84f51de | [] | no_license | merabetyaabi/MyProject | a9dd5ccacde87a19ba9546491875e809e555d76a | be8237c60ff80879b31e7d1d18195d3a5377f1f6 | refs/heads/master | 2020-04-30T17:03:06.025422 | 2019-03-31T18:15:45 | 2019-03-31T18:15:45 | 176,966,605 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 30,401 | java | package org.talend.designer.codegen.translators.databases.sybase;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.ElementParameterParser;
import org.talend.designer.codegen.config.CodeGeneratorArgument;
import java.util.List;
import java.util.Map;
public class TSybaseSPBeginJava
{
protected static String nl;
public static synchronized TSybaseSPBeginJava create(String lineSeparator)
{
nl = lineSeparator;
TSybaseSPBeginJava result = new TSybaseSPBeginJava();
nl = null;
return result;
}
public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
protected final String TEXT_1 = "";
protected final String TEXT_2 = NL;
protected final String TEXT_3 = NL + " if(log.is";
protected final String TEXT_4 = "Enabled())";
protected final String TEXT_5 = NL + " log.";
protected final String TEXT_6 = "(\"";
protected final String TEXT_7 = " - \" ";
protected final String TEXT_8 = " + ";
protected final String TEXT_9 = " ";
protected final String TEXT_10 = ");";
protected final String TEXT_11 = NL + " StringBuilder ";
protected final String TEXT_12 = " = new StringBuilder();";
protected final String TEXT_13 = NL + " ";
protected final String TEXT_14 = ".append(\"Parameters:\");";
protected final String TEXT_15 = NL + " ";
protected final String TEXT_16 = ".append(\"";
protected final String TEXT_17 = "\" + \" = \" + String.valueOf(";
protected final String TEXT_18 = ").substring(0, 4) + \"...\"); ";
protected final String TEXT_19 = NL + " ";
protected final String TEXT_20 = ".append(\"";
protected final String TEXT_21 = "\" + \" = \" + ";
protected final String TEXT_22 = ");";
protected final String TEXT_23 = NL + " ";
protected final String TEXT_24 = ".append(\" | \");";
protected final String TEXT_25 = NL + " StringBuilder ";
protected final String TEXT_26 = " = new StringBuilder(); ";
protected final String TEXT_27 = NL + " ";
protected final String TEXT_28 = ".append(";
protected final String TEXT_29 = ".";
protected final String TEXT_30 = ");";
protected final String TEXT_31 = NL + " if(";
protected final String TEXT_32 = ".";
protected final String TEXT_33 = " == null){";
protected final String TEXT_34 = NL + " ";
protected final String TEXT_35 = ".append(\"<null>\");" + NL + " }else{";
protected final String TEXT_36 = NL + " ";
protected final String TEXT_37 = ".append(";
protected final String TEXT_38 = ".";
protected final String TEXT_39 = ");" + NL + " } ";
protected final String TEXT_40 = NL + " ";
protected final String TEXT_41 = ".append(\"|\");";
protected final String TEXT_42 = NL;
protected final String TEXT_43 = NL + " java.sql.Connection connection_";
protected final String TEXT_44 = " = (java.sql.Connection)globalMap.get(\"";
protected final String TEXT_45 = "\");";
protected final String TEXT_46 = NL + " String dbschema_";
protected final String TEXT_47 = "= (String)globalMap.get(\"";
protected final String TEXT_48 = "\");";
protected final String TEXT_49 = NL + " java.lang.Class.forName(\"com.sybase.jdbc3.jdbc.SybDriver\");";
protected final String TEXT_50 = NL + "\t\t String connectionString_";
protected final String TEXT_51 = " = \"jdbc:sybase:Tds:\" + ";
protected final String TEXT_52 = " + \":\" + ";
protected final String TEXT_53 = " + \"/\" + ";
protected final String TEXT_54 = ";";
protected final String TEXT_55 = NL + "\t\t String connectionString_";
protected final String TEXT_56 = " = \"jdbc:sybase:Tds:\" + ";
protected final String TEXT_57 = " + \":\" + ";
protected final String TEXT_58 = " + \"/\" + ";
protected final String TEXT_59 = " + \"?\" + ";
protected final String TEXT_60 = ";";
protected final String TEXT_61 = NL + "\t " + NL + "\t";
protected final String TEXT_62 = NL + "\t" + NL + "\t";
protected final String TEXT_63 = " " + NL + "\tfinal String decryptedPassword_";
protected final String TEXT_64 = " = routines.system.PasswordEncryptUtil.decryptPassword(";
protected final String TEXT_65 = ");";
protected final String TEXT_66 = NL + "\tfinal String decryptedPassword_";
protected final String TEXT_67 = " = ";
protected final String TEXT_68 = "; ";
protected final String TEXT_69 = NL + NL + " \t";
protected final String TEXT_70 = NL + " java.sql.Connection connection_";
protected final String TEXT_71 = " = java.sql.DriverManager.getConnection(connectionString_";
protected final String TEXT_72 = ", ";
protected final String TEXT_73 = ", decryptedPassword_";
protected final String TEXT_74 = ");" + NL + "\t";
protected final String TEXT_75 = NL + NL + "\tString dbschema_";
protected final String TEXT_76 = "= ";
protected final String TEXT_77 = "; ";
protected final String TEXT_78 = NL + "String spName_";
protected final String TEXT_79 = " = ";
protected final String TEXT_80 = ";" + NL + "if(dbschema_";
protected final String TEXT_81 = " != null && dbschema_";
protected final String TEXT_82 = ".trim().length() != 0) {" + NL + "\tspName_";
protected final String TEXT_83 = " = dbschema_";
protected final String TEXT_84 = " + \".\" + spName_";
protected final String TEXT_85 = ";" + NL + "} ";
protected final String TEXT_86 = NL + "java.sql.PreparedStatement statement_";
protected final String TEXT_87 = " = connection_";
protected final String TEXT_88 = ".prepareStatement(\"select \" + spName_";
protected final String TEXT_89 = " + \"(";
protected final String TEXT_90 = NL + "java.sql.CallableStatement statement_";
protected final String TEXT_91 = " = connection_";
protected final String TEXT_92 = ".prepareCall(\"{call \" + ";
protected final String TEXT_93 = " + \"(";
protected final String TEXT_94 = "?";
protected final String TEXT_95 = ",?";
protected final String TEXT_96 = ")";
protected final String TEXT_97 = "}";
protected final String TEXT_98 = "\");" + NL;
protected final String TEXT_99 = NL + " statement_";
protected final String TEXT_100 = ".setQueryTimeout(";
protected final String TEXT_101 = ");";
protected final String TEXT_102 = NL + NL + "java.sql.Date tmpDate_";
protected final String TEXT_103 = ";" + NL + "String tmpString_";
protected final String TEXT_104 = ";";
protected final String TEXT_105 = NL;
public String generate(Object argument)
{
final StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(TEXT_1);
stringBuffer.append(TEXT_2);
class BasicLogUtil{
protected String cid = "";
protected org.talend.core.model.process.INode node = null;
protected boolean log4jEnabled = false;
private String logID = "";
private BasicLogUtil(){}
public BasicLogUtil(org.talend.core.model.process.INode node){
this.node = node;
String cidx = this.node.getUniqueName();
if(cidx.matches("^.*?tAmazonAuroraOutput_\\d+_out$")){
cidx = cidx.substring(0,cidx.length()-4);// 4 ==> "_out".length();
}
this.cid = cidx;
this.log4jEnabled = ("true").equals(org.talend.core.model.process.ElementParameterParser.getValue(this.node.getProcess(), "__LOG4J_ACTIVATE__"));
this.log4jEnabled = this.log4jEnabled &&
this.node.getComponent().isLog4JEnabled() && !"JOBLET".equals(node.getComponent().getComponentType().toString());
this.logID = this.cid;
}
public String var(String varName){
return varName + "_" + this.cid;
}
public String str(String content){
return "\"" + content + "\"";
}
public void info(String... message){
log4j("info", message);
}
public void debug(String... message){
log4j("debug", message);
}
public void warn(String... message){
log4j("warn", message);
}
public void error(String... message){
log4j("error", message);
}
public void fatal(String... message){
log4j("fatal", message);
}
public void trace(String... message){
log4j("trace", message);
}
java.util.List<String> checkableList = java.util.Arrays.asList(new String[]{"info", "debug", "trace"});
public void log4j(String level, String... messages){
if(this.log4jEnabled){
if(checkableList.contains(level)){
stringBuffer.append(TEXT_3);
stringBuffer.append(level.substring(0, 1).toUpperCase() + level.substring(1));
stringBuffer.append(TEXT_4);
}
stringBuffer.append(TEXT_5);
stringBuffer.append(level);
stringBuffer.append(TEXT_6);
stringBuffer.append(logID);
stringBuffer.append(TEXT_7);
for(String message : messages){
stringBuffer.append(TEXT_8);
stringBuffer.append(message);
stringBuffer.append(TEXT_9);
}
stringBuffer.append(TEXT_10);
}
}
public boolean isActive(){
return this.log4jEnabled;
}
}
class LogUtil extends BasicLogUtil{
private LogUtil(){
}
public LogUtil(org.talend.core.model.process.INode node){
super(node);
}
public void startWork(){
debug(str("Start to work."));
}
public void endWork(){
debug(str("Done."));
}
public void logIgnoredException(String exception){
warn(exception);
}
public void logPrintedException(String exception){
error(exception);
}
public void logException(String exception){
fatal(exception);
}
public void logCompSetting(){
if(log4jEnabled){
stringBuffer.append(TEXT_11);
stringBuffer.append(var("log4jParamters"));
stringBuffer.append(TEXT_12);
stringBuffer.append(TEXT_13);
stringBuffer.append(var("log4jParamters"));
stringBuffer.append(TEXT_14);
java.util.Set<org.talend.core.model.process.EParameterFieldType> ignoredParamsTypes = new java.util.HashSet<org.talend.core.model.process.EParameterFieldType>();
ignoredParamsTypes.addAll(
java.util.Arrays.asList(
org.talend.core.model.process.EParameterFieldType.SCHEMA_TYPE,
org.talend.core.model.process.EParameterFieldType.LABEL,
org.talend.core.model.process.EParameterFieldType.EXTERNAL,
org.talend.core.model.process.EParameterFieldType.MAPPING_TYPE,
org.talend.core.model.process.EParameterFieldType.IMAGE,
org.talend.core.model.process.EParameterFieldType.TNS_EDITOR,
org.talend.core.model.process.EParameterFieldType.WSDL2JAVA,
org.talend.core.model.process.EParameterFieldType.GENERATEGRAMMARCONTROLLER,
org.talend.core.model.process.EParameterFieldType.GENERATE_SURVIVORSHIP_RULES_CONTROLLER,
org.talend.core.model.process.EParameterFieldType.REFRESH_REPORTS,
org.talend.core.model.process.EParameterFieldType.BROWSE_REPORTS,
org.talend.core.model.process.EParameterFieldType.PALO_DIM_SELECTION,
org.talend.core.model.process.EParameterFieldType.GUESS_SCHEMA,
org.talend.core.model.process.EParameterFieldType.MATCH_RULE_IMEX_CONTROLLER,
org.talend.core.model.process.EParameterFieldType.MEMO_PERL,
org.talend.core.model.process.EParameterFieldType.DBTYPE_LIST,
org.talend.core.model.process.EParameterFieldType.VERSION,
org.talend.core.model.process.EParameterFieldType.TECHNICAL,
org.talend.core.model.process.EParameterFieldType.ICON_SELECTION,
org.talend.core.model.process.EParameterFieldType.JAVA_COMMAND,
org.talend.core.model.process.EParameterFieldType.TREE_TABLE,
org.talend.core.model.process.EParameterFieldType.VALIDATION_RULE_TYPE,
org.talend.core.model.process.EParameterFieldType.DCSCHEMA,
org.talend.core.model.process.EParameterFieldType.SURVIVOR_RELATION,
org.talend.core.model.process.EParameterFieldType.REST_RESPONSE_SCHEMA_TYPE
)
);
for(org.talend.core.model.process.IElementParameter ep : org.talend.core.model.utils.NodeUtil.getDisplayedParameters(node)){
if(!ep.isLog4JEnabled() || ignoredParamsTypes.contains(ep.getFieldType())){
continue;
}
String name = ep.getName();
if(org.talend.core.model.process.EParameterFieldType.PASSWORD.equals(ep.getFieldType())){
String epName = "__" + name + "__";
String password = "";
if(org.talend.core.model.process.ElementParameterParser.canEncrypt(node, epName)){
password = org.talend.core.model.process.ElementParameterParser.getEncryptedValue(node, epName);
}else{
String passwordValue = org.talend.core.model.process.ElementParameterParser.getValue(node, epName);
if (passwordValue == null || "".equals(passwordValue.trim())) {// for the value which empty
passwordValue = "\"\"";
}
password = "routines.system.PasswordEncryptUtil.encryptPassword(" + passwordValue + ")";
}
stringBuffer.append(TEXT_15);
stringBuffer.append(var("log4jParamters"));
stringBuffer.append(TEXT_16);
stringBuffer.append(name);
stringBuffer.append(TEXT_17);
stringBuffer.append(password);
stringBuffer.append(TEXT_18);
}else{
String value = org.talend.core.model.utils.NodeUtil.getNormalizeParameterValue(node, ep);
stringBuffer.append(TEXT_19);
stringBuffer.append(var("log4jParamters"));
stringBuffer.append(TEXT_20);
stringBuffer.append(name);
stringBuffer.append(TEXT_21);
stringBuffer.append(value);
stringBuffer.append(TEXT_22);
}
stringBuffer.append(TEXT_23);
stringBuffer.append(var("log4jParamters"));
stringBuffer.append(TEXT_24);
}
}
debug(var("log4jParamters"));
}
//no use for now, because we log the data by rowStruct
public void traceData(String rowStruct, java.util.List<org.talend.core.model.metadata.IMetadataColumn> columnList, String nbline){
if(log4jEnabled){
stringBuffer.append(TEXT_25);
stringBuffer.append(var("log4jSb"));
stringBuffer.append(TEXT_26);
for(org.talend.core.model.metadata.IMetadataColumn column : columnList){
org.talend.core.model.metadata.types.JavaType javaType = org.talend.core.model.metadata.types.JavaTypesManager.getJavaTypeFromId(column.getTalendType());
String columnName = column.getLabel();
boolean isPrimit = org.talend.core.model.metadata.types.JavaTypesManager.isJavaPrimitiveType(column.getTalendType(), column.isNullable());
if(isPrimit){
stringBuffer.append(TEXT_27);
stringBuffer.append(var("log4jSb"));
stringBuffer.append(TEXT_28);
stringBuffer.append(rowStruct);
stringBuffer.append(TEXT_29);
stringBuffer.append(columnName);
stringBuffer.append(TEXT_30);
}else{
stringBuffer.append(TEXT_31);
stringBuffer.append(rowStruct);
stringBuffer.append(TEXT_32);
stringBuffer.append(columnName);
stringBuffer.append(TEXT_33);
stringBuffer.append(TEXT_34);
stringBuffer.append(var("log4jSb"));
stringBuffer.append(TEXT_35);
stringBuffer.append(TEXT_36);
stringBuffer.append(var("log4jSb"));
stringBuffer.append(TEXT_37);
stringBuffer.append(rowStruct);
stringBuffer.append(TEXT_38);
stringBuffer.append(columnName);
stringBuffer.append(TEXT_39);
}
stringBuffer.append(TEXT_40);
stringBuffer.append(var("log4jSb"));
stringBuffer.append(TEXT_41);
}
}
trace(str("Content of the record "), nbline, str(": "), var("log4jSb"));
}
}
class LogHelper{
java.util.Map<String, String> pastDict = null;
public LogHelper(){
pastDict = new java.util.HashMap<String, String>();
pastDict.put("insert", "inserted");
pastDict.put("update", "updated");
pastDict.put("delete", "deleted");
pastDict.put("upsert", "upserted");
}
public String upperFirstChar(String data){
return data.substring(0, 1).toUpperCase() + data.substring(1);
}
public String toPastTense(String data){
return pastDict.get(data);
}
}
LogHelper logHelper = new LogHelper();
LogUtil log = null;
stringBuffer.append(TEXT_42);
class DBConnLogUtil extends BasicLogUtil{
private DBConnLogUtil(){}
protected DBConnLogUtil(org.talend.core.model.process.INode node){
super(node);
}
public void logJDBCDriver(String driverClass){
debug(str("Driver ClassName: "), driverClass, str("."));
}
public void connTry(String url, String dbUser){
if(dbUser != null){
debug(str("Connection attempts to '"), url, str("' with the username '"), dbUser, str("'."));
}else{
debug(str("Connection attempts to '"), url, str("'."));
}
}
public void connDone(String url){
debug(str("Connection to '"), url, str("' has succeeded."));
}
public void useExistConn(String url, String dbUser){
if(dbUser != null){
debug(str("Uses an existing connection with username '"), dbUser, str("'. Connection URL: "), url, str("."));
}else{
debug(str("Uses an existing connection. Connection URL: "), url, str("."));
}
}
public void closeTry(String connCompID){
if(connCompID == null){
debug(str("Closing the connection to the database."));
}else{
debug(str("Closing the connection "), connCompID, str(" to the database."));
}
}
public void closeDone(String connCompID){
if(connCompID == null){
debug(str("Connection to the database has closed."));
}else{
debug(str("Connection "), connCompID, str(" to the database has closed."));
}
}
}
class DBTableActionLogUtil extends BasicLogUtil{
private DBTableActionLogUtil(){}
protected DBTableActionLogUtil(org.talend.core.model.process.INode node){
super(node);
}
public void dropTry(String tableName){
tableActionTry(tableName, str("Dropping"));
}
public void dropDone(String tableName){
tableActionDone(tableName, str("Drop"));
}
public void createTry(String tableName){
tableActionTry(tableName, str("Creating"));
}
public void createDone(String tableName){
tableActionDone(tableName, str("Create"));
}
public void clearTry(String tableName){
tableActionTry(tableName, str("Clearing"));
}
public void clearDone(String tableName){
tableActionDone(tableName, str("Clear"));
}
public void truncateTry(String tableName){
tableActionTry(tableName, str("Truncating"));
}
public void truncateDone(String tableName){
tableActionDone(tableName, str("Truncate"));
}
public void truncateReuseStorageTry(String tableName){
tableActionTry(tableName, str("Truncating reuse storage"));
}
public void truncateReuseStorageDone(String tableName){
tableActionDone(tableName, str("Truncate reuse stroage"));
}
private void tableActionTry(String tableName, String action){
debug(action, str(" table '"), tableName, str("'."));
}
private void tableActionDone(String tableName, String action){
debug(action, str(" table '"), tableName, str("' has succeeded."));
}
}
class DBCommitLogUtil extends BasicLogUtil{
private DBCommitLogUtil(){}
protected DBCommitLogUtil(org.talend.core.model.process.INode node){
super(node);
}
public void logAutoCommit(String autoCommit){
debug(str("Connection is set auto commit to '"), autoCommit, str("'."));
}
public void commitTry(String connCompID, String commitCount){
if(commitCount == null && connCompID == null){
debug(str("Connection starting to commit."));
}else if(commitCount == null){
debug(str("Connection "), connCompID, str(" starting to commit."));
}else if(connCompID == null){
debug(str("Connection starting to commit "), commitCount, str(" record(s)."));
}else{
debug(str("Connection "), connCompID, str(" starting to commit "), commitCount, str(" record(s)."));
}
}
public void commitDone(String connCompID){
if(connCompID == null){
debug(str("Connection commit has succeeded."));
}else{
debug(str("Connection "), connCompID, (" commit has succeeded."));
}
}
}
class DBBatchLogUtil extends BasicLogUtil{
private DBBatchLogUtil(){}
protected DBBatchLogUtil(org.talend.core.model.process.INode node){
super(node);
}
public void executeTry(String action){
debug(str("Executing the "), action, str(" batch."));
}
public void executeDone(String action){
debug(str("The "), action, str(" batch execution has succeeded."));
}
}
class DBDataActionLogUtil extends BasicLogUtil{
private DBDataActionLogUtil(){}
protected DBDataActionLogUtil(org.talend.core.model.process.INode node){
super(node);
}
public void inserting(String nbline){
sqlAction(nbline, str("Inserting"));
}
public void deleting(String nbline){
sqlAction(nbline, str("Deleting"));
}
public void updating(String nbline){
sqlAction(nbline, str("Updating"));
}
public void replacing(String nbline){
sqlAction(nbline, str("Replacing"));
}
public void insertingOnDuplicateKeyUpdating(String nbline){
sqlAction(nbline, str("Inserting on duplicate key updating"));
}
public void insertingIgnore(String nbline){
sqlAction(nbline, str("Inserting ignore"));
}
private void sqlAction(String nbline, String action){
if(nbline == null){
debug(action, str(" the record."));
}else{
debug(action, str(" the record "), nbline, str("."));
}
}
public void sqlExecuteTry(String sql){
debug(str("Executing '"), sql, str("'."));
}
public void sqlExecuteDone(String sql){
debug(str("Execute '"), sql, str("' has succeeded."));
}
public void addingToBatch(String nbline, String batchAction){
debug(str("Adding the record "), nbline, str(" to the "), batchAction, str(" batch."));
}
}
class DBStateLogUtil extends BasicLogUtil{
private DBStateLogUtil(){}
protected DBStateLogUtil(org.talend.core.model.process.INode node){
super(node);
}
public void logInsertedLines(String nbline){
logFinishedLines(nbline, str("inserted"));
}
public void logUpdatedLines(String nbline){
logFinishedLines(nbline, str("updated"));
}
public void logDeletedLines(String nbline){
logFinishedLines(nbline, str("deleted"));
}
public void logRejectedLines(String nbline){
logFinishedLines(nbline, str("rejected"));
}
private void logFinishedLines(String nbline, String action){
debug(str("Has "), action, str(" "), nbline, str(" record(s)."));
}
}
class DBLogUtil extends LogUtil{
DBConnLogUtil conn = null;
DBTableActionLogUtil table = null;
DBCommitLogUtil commit = null;
DBBatchLogUtil batch = null;
DBDataActionLogUtil data = null;
DBStateLogUtil state = null;
private DBLogUtil(){}
protected DBLogUtil(org.talend.core.model.process.INode node){
super(node);
conn = new DBConnLogUtil(node);
table = new DBTableActionLogUtil(node);
commit = new DBCommitLogUtil(node);
batch = new DBBatchLogUtil(node);
data = new DBDataActionLogUtil(node);
state = new DBStateLogUtil(node);
}
public DBConnLogUtil conn(){
return conn;
}
public DBTableActionLogUtil table(){
return table;
}
public DBCommitLogUtil commit(){
return commit;
}
public DBBatchLogUtil batch(){
return batch;
}
public DBDataActionLogUtil data(){
return data;
}
public DBStateLogUtil state(){
return state;
}
}
DBLogUtil dbLog = null;
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode) codeGenArgument.getArgument();
dbLog = new DBLogUtil(node);
String cid = node.getUniqueName();
String dbhost = ElementParameterParser.getValue(node, "__HOST__");
String dbport = ElementParameterParser.getValue(node, "__PORT__");
String dbname = ElementParameterParser.getValue(node, "__DBNAME__");
String dbuser = ElementParameterParser.getValue(node, "__USER__");
String spName = ElementParameterParser.getValue(node, "__SP_NAME__");
String dbschema = ElementParameterParser.getValue(node, "__DB_SCHEMA__");
boolean isFunction = ("true").equals(ElementParameterParser.getValue(node, "__IS_FUNCTION__"));
List<Map<String, String>> spArgs = (List<Map<String,String>>) ElementParameterParser.getObjectValue(node, "__SP_ARGS__");
boolean useExistingConn = ("true").equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
String dbproperties = ElementParameterParser.getValue(node, "__PROPERTIES__");
if(useExistingConn){
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
String conn = "conn_" + connection;
String schema = "dbschema_" + connection;
stringBuffer.append(TEXT_43);
stringBuffer.append(cid );
stringBuffer.append(TEXT_44);
stringBuffer.append(conn );
stringBuffer.append(TEXT_45);
dbLog.conn().useExistConn("connection_"+cid+".getMetaData().getURL()", "connection_"+cid+".getMetaData().getUserName()");
stringBuffer.append(TEXT_46);
stringBuffer.append(cid);
stringBuffer.append(TEXT_47);
stringBuffer.append(schema);
stringBuffer.append(TEXT_48);
} else {
stringBuffer.append(TEXT_49);
dbLog.conn().logJDBCDriver(dbLog.str("com.sybase.jdbc3.jdbc.SybDriver"));
if(dbproperties == null || ("\"\"").equals(dbproperties) || ("").equals(dbproperties)) {
stringBuffer.append(TEXT_50);
stringBuffer.append(cid);
stringBuffer.append(TEXT_51);
stringBuffer.append(dbhost);
stringBuffer.append(TEXT_52);
stringBuffer.append(dbport);
stringBuffer.append(TEXT_53);
stringBuffer.append(dbname);
stringBuffer.append(TEXT_54);
} else {
stringBuffer.append(TEXT_55);
stringBuffer.append(cid);
stringBuffer.append(TEXT_56);
stringBuffer.append(dbhost);
stringBuffer.append(TEXT_57);
stringBuffer.append(dbport);
stringBuffer.append(TEXT_58);
stringBuffer.append(dbname);
stringBuffer.append(TEXT_59);
stringBuffer.append(dbproperties);
stringBuffer.append(TEXT_60);
}
stringBuffer.append(TEXT_61);
String passwordFieldName = "__PASS__";
stringBuffer.append(TEXT_62);
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {
stringBuffer.append(TEXT_63);
stringBuffer.append(cid);
stringBuffer.append(TEXT_64);
stringBuffer.append(ElementParameterParser.getEncryptedValue(node, passwordFieldName));
stringBuffer.append(TEXT_65);
} else {
stringBuffer.append(TEXT_66);
stringBuffer.append(cid);
stringBuffer.append(TEXT_67);
stringBuffer.append( ElementParameterParser.getValue(node, passwordFieldName));
stringBuffer.append(TEXT_68);
}
stringBuffer.append(TEXT_69);
dbLog.conn().connTry(dbLog.var("connectionString"), dbuser);
stringBuffer.append(TEXT_70);
stringBuffer.append(cid);
stringBuffer.append(TEXT_71);
stringBuffer.append(cid);
stringBuffer.append(TEXT_72);
stringBuffer.append(dbuser);
stringBuffer.append(TEXT_73);
stringBuffer.append(cid);
stringBuffer.append(TEXT_74);
dbLog.conn().connDone(dbLog.var("connectionString"));
stringBuffer.append(TEXT_75);
stringBuffer.append(cid);
stringBuffer.append(TEXT_76);
stringBuffer.append(dbschema);
stringBuffer.append(TEXT_77);
}
dbLog.commit().logAutoCommit("connection_"+cid+".getAutoCommit()");
stringBuffer.append(TEXT_78);
stringBuffer.append(cid);
stringBuffer.append(TEXT_79);
stringBuffer.append(spName);
stringBuffer.append(TEXT_80);
stringBuffer.append(cid);
stringBuffer.append(TEXT_81);
stringBuffer.append(cid);
stringBuffer.append(TEXT_82);
stringBuffer.append(cid);
stringBuffer.append(TEXT_83);
stringBuffer.append(cid);
stringBuffer.append(TEXT_84);
stringBuffer.append(cid);
stringBuffer.append(TEXT_85);
if(isFunction){
stringBuffer.append(TEXT_86);
stringBuffer.append(cid);
stringBuffer.append(TEXT_87);
stringBuffer.append(cid);
stringBuffer.append(TEXT_88);
stringBuffer.append(cid);
stringBuffer.append(TEXT_89);
}else{
stringBuffer.append(TEXT_90);
stringBuffer.append(cid);
stringBuffer.append(TEXT_91);
stringBuffer.append(cid);
stringBuffer.append(TEXT_92);
stringBuffer.append(spName);
stringBuffer.append(TEXT_93);
}
boolean isFirstArg = true;
for (int i = 0; i < spArgs.size(); i++) {
if(!("RECORDSET").equals(spArgs.get(i).get("TYPE"))){
if(isFirstArg){
stringBuffer.append(TEXT_94);
isFirstArg=false;
}else{
stringBuffer.append(TEXT_95);
}
}
}
stringBuffer.append(TEXT_96);
if(!isFunction){
stringBuffer.append(TEXT_97);
}
stringBuffer.append(TEXT_98);
String timeoutInterval = ElementParameterParser.getValue(node, "__TIMEOUT_INTERVAL__");
if(timeoutInterval != null && !("0").equals(timeoutInterval) && !("").equals(timeoutInterval)) {
stringBuffer.append(TEXT_99);
stringBuffer.append(cid);
stringBuffer.append(TEXT_100);
stringBuffer.append(timeoutInterval);
stringBuffer.append(TEXT_101);
}
stringBuffer.append(TEXT_102);
stringBuffer.append(cid);
stringBuffer.append(TEXT_103);
stringBuffer.append(cid);
stringBuffer.append(TEXT_104);
stringBuffer.append(TEXT_105);
return stringBuffer.toString();
}
}
| [
"merabet.abdelaziz@gmail.com"
] | merabet.abdelaziz@gmail.com |
204533d49bba82b45ceb1d982e50ada0296e3181 | 14641dfd31817d6d1858bece6040af78254cb2aa | /Base/src/base/net/socket/SocketClient.java | 4fe5cd0cf289bf2ed7d3d3d7d67309bd5446b11a | [] | no_license | devinlee/Java | 8652e6407e314413e13b3d9d6c096264bb83711f | 18c78dd84fe3e9002e72740a466fd88559a09f87 | refs/heads/master | 2020-12-05T07:26:50.561910 | 2016-09-23T16:42:11 | 2016-09-23T16:42:11 | 66,382,364 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,865 | java | package base.net.socket;
import java.io.IOException;
import java.nio.channels.SocketChannel;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.logging.Level;
import java.util.logging.Logger;
import base.event.Event;
import base.event.EventDispatcher;
import base.net.NetFactory;
import base.net.socket.events.SocketConnectionEvent;
import base.net.socket.packet.ISocketSendablePacketBase;
import base.net.socket.tcp.SocketTcpClient;
import base.net.socket.tcp.SocketTcpKeepAlive;
import base.net.socket.udp.SocketUdpClient;
import base.net.socket.udp.SocketUdpKeepAlive;
import base.timer.TimerController;
import base.types.SocketType;
/**
* Socket Client
* @author Devin
*
*/
public class SocketClient extends EventDispatcher implements ISocketServer
{
/**
* Socket名称
*/
private String socketName;
public String getSocketName()
{
return socketName;
}
/**
* 服务是否可用
*/
protected boolean isAvailable = false;
/**
* 服务是否可用
*/
public void setAvailable(boolean isAvailable)
{
this.isAvailable = isAvailable;
}
/**
* 服务是否可用
*/
public boolean isAvailable()
{
return isAvailable;
}
/**
* Socket通讯模式
*/
private SocketType socketType;
/**
* IP地址
*/
protected String ipAddress;
/**
* 端口
*/
protected int port;
/**
* 是否为数据传递服务。当值为true时,则在收取数据包时,会读取初始来源的Socket命令ID,否则不读取初始来源的Socket命令ID
*/
protected boolean dataTransfer;
/**
* 通讯数据是否安全加密(不加密包体以及不加入包尾校验串)
*/
private boolean isCrypto;
/**
* 是否发送心跳包
*/
private boolean isSendKeepAlive;
/**
* SocketChannel
*/
private SocketChannel socketChannel;
/**
* 待发送包队列
*/
private BlockingQueue<ISocketSendablePacketBase> sendablePacketQueue = new LinkedBlockingQueue<ISocketSendablePacketBase>();
/**
* Socket基础连接处理类
*/
private ISocketConnection socketConnection;
/**
* Socket基础连接处理类
* @return
*/
public ISocketConnection getSocketConnectionBase()
{
return socketConnection;
}
/**
* Socket Tcp客户端
*/
private SocketTcpClient socketTcpClient;
/**
* Socket Udp客户端
*/
private SocketUdpClient socketUdpClient;
/**
* 保持Socket Tcp 连接存活的心跳发送任务
*/
private SocketTcpKeepAlive socketTcpKeepAlive;
/**
* 保持Socket Udp 连接存活的心跳发送任务
*/
private SocketUdpKeepAlive socketUdpKeepAlive;
private SocketSelector socketSelector;
/**
* ByteBuffer池
*/
private SocketByteBufferPool socketByteBufferPool;
public SocketSelector getSocketSelector()
{
return socketSelector;
}
/**
* Socket Client
* @param socketSelector SocketSelector
* @param clientName 客户端名称
* @param socketType Socket通讯模式
* @param ipAddress 连接的服务端ip地址
* @param port 连接的服务端端口
* @param dataTransfer 是否为数据传递服务。当值为true时,则在收取数据包时,会读取初始来源的Socket命令ID,否则不读取初始来源的Socket命令ID
* @param isCrypto 通讯数据是否安全加密(不加密包体以及不加入包尾校验串)
* @param isSendKeepAlive 是否发送心跳包
*/
public SocketClient(SocketSelector socketSelector, String clientName, SocketType socketType, String ipAddress, int port, boolean dataTransfer, boolean isCrypto, boolean isSendKeepAlive)
{
this.socketSelector = socketSelector;
this.socketName = clientName;
this.socketType = socketType;
this.ipAddress = ipAddress;
this.port = port;
this.dataTransfer = dataTransfer;
this.isCrypto = isCrypto;
this.isSendKeepAlive = isSendKeepAlive;
this.socketByteBufferPool = new SocketByteBufferPool(10000, SocketConfig.PACKET_TCP_LENGTN);
}
/**
* 开始服务
*/
public void startServer()
{
startServer(true);
}
/**
* 开始服务
*/
public void startServer(Boolean isStartSocketSelector)
{
try
{
socketConnection = NetFactory.socketController().createSocketConnectionBase(dataTransfer, isCrypto);
socketConnection.addEventListener(SocketConnectionEvent.HANDSHAKE_COMPLETE, this);
socketConnection.addEventListener(SocketConnectionEvent.CLOSE_CONNECTION, this);
socketConnection.setSocketByteBufferPool(socketByteBufferPool);
if (socketType == SocketType.ALL || socketType == SocketType.TCP)
{
socketTcpClient = new SocketTcpClient(this, ipAddress, port, dataTransfer, isCrypto);
socketTcpClient.setSocketByteBufferPool(socketByteBufferPool);
socketTcpClient.startServer();
}
if (socketType == SocketType.ALL || socketType == SocketType.UDP)
{
socketUdpClient = new SocketUdpClient(this, ipAddress, port, dataTransfer, isCrypto);
socketUdpClient.setSocketByteBufferPool(socketByteBufferPool);
socketUdpClient.startServer();
}
if (isStartSocketSelector && socketSelector != null && !socketSelector.getIsAvailable() && !socketSelector.isAlive())
{
socketSelector.start();
}
isAvailable = true;
}
catch (Exception e)
{
Logger.getLogger(SocketClient.class.getName()).log(Level.SEVERE, "SocketClient " + socketName + " 运行错误。", e);
}
}
private boolean connectableTcp;
private boolean connectableUdp;
/**
* 连接成功
* @param socketType 连接Socket类型
*/
public void connectable(SocketType socketType)
{
if(socketType == SocketType.TCP)
{
connectableTcp=true;
}
if(socketType == SocketType.UDP)
{
connectableUdp=true;
}
boolean isConnectable = false;
if ((this.socketType == SocketType.ALL && connectableTcp&& connectableUdp)
|| (this.socketType == SocketType.TCP && connectableTcp)
|| (this.socketType == SocketType.UDP && connectableUdp))
{
isConnectable = true;
}
if (isConnectable)
{
if (socketType == SocketType.TCP)
{
socketConnection.clientToServerTcpConnecyionSuccess();// Tcp连接成功,发送至服务器告知成功
}
dispatchEvent(new SocketConnectionEvent(SocketConnectionEvent.CONNECTABLE, socketType));
}
}
/**
* 协议握手成功
* @param socketType 连接Socket类型
*/
public void handshakeComplete(SocketType socketType)
{
boolean isHandshakeComplete = false;
if ((this.socketType == SocketType.ALL && socketConnection.getHandshakeCompleteTcp() && socketConnection.getHandshakeCompleteUdp())
|| (this.socketType == SocketType.TCP && socketConnection.getHandshakeCompleteTcp())
|| (this.socketType == SocketType.UDP && socketConnection.getHandshakeCompleteUdp()))
{
isHandshakeComplete = true;
}
if (isSendKeepAlive)
{
setKeepAlive(10, 10);
}
if (isHandshakeComplete)
{
dispatchEvent(new SocketConnectionEvent(SocketConnectionEvent.HANDSHAKE_COMPLETE));
}
}
/**
* 保持连接存活的心跳包发送
* @param tcpSecondTime tcp包发送时间秒
* @param udpSecondTime udp包发送时间秒
*/
private void setKeepAlive(int tcpSecondTime, int udpSecondTime)
{
if (socketType == SocketType.ALL || socketType == SocketType.TCP)
{
socketTcpKeepAlive = new SocketTcpKeepAlive(this);
TimerController.timer("SocketKeepAlive", socketTcpKeepAlive, 0, tcpSecondTime * 1000);
}
if (socketType == SocketType.ALL || socketType == SocketType.UDP)
{
socketUdpKeepAlive = new SocketUdpKeepAlive(this);
TimerController.timer("SocketKeepAlive", socketUdpKeepAlive, 0, udpSecondTime * 1000);
}
}
/**
* 发送数据包
* @param socketSendablePacketBase 发送数据包
*/
public void send(ISocketSendablePacketBase socketSendablePacketBase)
{
try
{
sendablePacketQueue.put(socketSendablePacketBase);
sendSendablePacketQueue();
}
catch (InterruptedException e)
{
Logger.getLogger(SocketClient.class.getName()).log(Level.SEVERE, "将发送包插入发送队列时错误。", e);
}
}
/**
* 执行发送包队列发送
*/
public void sendSendablePacketQueue()
{
if (isAvailable && socketConnection != null && socketConnection.getIsAvailable())
{
ISocketSendablePacketBase sendablePacket = null;
while ((sendablePacket = sendablePacketQueue.poll()) != null)
{// 循环取得发收包队列中的包予发送
socketConnection.sendPacket(sendablePacket);
}
}
}
@Override
public void handleEvent(Event event)
{
switch (event.getType())
{
case SocketConnectionEvent.HANDSHAKE_COMPLETE:
handshakeComplete((SocketType) event.getData());
break;
case SocketConnectionEvent.CLOSE_CONNECTION:
dispatchEvent(new SocketConnectionEvent(SocketConnectionEvent.CLOSE_CONNECTION));
break;
}
}
/**
* 关闭SocketClient
*/
public synchronized void close()
{
try
{
isAvailable = false;
if (socketTcpKeepAlive != null)
{
socketTcpKeepAlive.cancel();
socketTcpKeepAlive = null;
}
if (socketUdpKeepAlive != null)
{
socketUdpKeepAlive.cancel();
socketUdpKeepAlive = null;
}
while (sendablePacketQueue != null && sendablePacketQueue.size() > 0)
{
ISocketSendablePacketBase sendablePacket = sendablePacketQueue.poll();
if (sendablePacket != null)
{
sendablePacket.dispose();
sendablePacket = null;
}
}
if (socketConnection != null)
{
socketConnection.removeEventListener(SocketConnectionEvent.HANDSHAKE_COMPLETE, this);
socketConnection.removeEventListener(SocketConnectionEvent.CLOSE_CONNECTION, this);
socketConnection.close();
socketConnection = null;
}
if (socketChannel != null)
{
socketChannel.close();
socketChannel = null;
}
socketSelector = null;
}
catch (IOException e)
{
Logger.getLogger(SocketClient.class.getName()).log(Level.SEVERE, "SocketClient关闭时错误。", e);
}
}
}
| [
"i@lishujun.com"
] | i@lishujun.com |
f377db606695f0efdb86b9ed9e4722089099ad2e | dd939957dbec4f1fd4a661c297023f7c1da5ac09 | /src/Homework5/BitDiv.java | 0e0611ff88aadd6ae4e6394df36e71e1bae76a4d | [] | no_license | Bvaluyev/Homeworks | 38dc1439978c60c9915e09c120af2ac2260832eb | bd397eb78be9fb9655ecec2df2b74a59a05ce4fc | refs/heads/master | 2020-04-13T02:55:41.880099 | 2019-01-19T17:39:06 | 2019-01-19T17:39:06 | 162,916,111 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 315 | java | package Homework5;
public class BitDiv {
public static void main(String[] args) {
System.out.println(bitDivByFour(100, 4));
}
public static long bitDivByFour(double a, double b) {
long e = (long) a;
long t = (long) b;
long x = (e >> t);
return x;
}
}
| [
"45964487+Bvaluyev@users.noreply.github.com"
] | 45964487+Bvaluyev@users.noreply.github.com |
065fe89ff3fd01c7c900e583f3af02810f1f2d79 | c8c949b3710fbb4b983d03697ec9173a0ad3f79f | /src/com/company/MaximumWidthofBinaryTree.java | 8d5f9be93f640d0f60c34f73b39c92166511862c | [] | no_license | mxx626/myleet | ae4409dec30d81eaaef26518cdf52a75fd3810bc | 5da424b2f09342947ba6a9fffb1cca31b7101cf0 | refs/heads/master | 2020-03-22T15:11:07.145406 | 2018-07-09T05:12:28 | 2018-07-09T05:12:28 | 140,234,151 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,328 | java | package com.company;
// Tree, BFS, DFS
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
public class MaximumWidthofBinaryTree {
/**
* Given a binary tree, write a function to get the maximum width of the given tree. The width of a
* tree is the maximum width among all levels. The binary tree has the same structure as a full binary
* tree, but some nodes are null.
The width of one level is defined as the length between the end-nodes (the leftmost and right most
non-null nodes in the level, where the null nodes between the end-nodes are also counted into the
length calculation.
Example 1:
Input:
1
/ \
3 2
/ \ \
5 3 9
Output: 4
Explanation: The maximum width existing in the third level with the length 4 (5,3,null,9).
Example 2:
Input:
1
/
3
/ \
5 3
Output: 2
Explanation: The maximum width existing in the third level with the length 2 (5,3).
Example 3:
Input:
1
/ \
3 2
/
5
Output: 2
Explanation: The maximum width existing in the second level with the length 2 (3,2).
Example 4:
Input:
1
/ \
3 2
/ \
5 9
/ \
6 7
Output: 8
Explanation:The maximum width existing in the fourth level with the length 8 (6,null,null,null,null,null,null,7).
Note: Answer will in the range of 32-bit signed integer.
* @param root
* @return
*/
private int ret = 1;
public int widthOfBinaryTree1(TreeNode root) {
if (root==null) return 0;
helper(root, 0, 0, new ArrayList<>());
return ret;
}
private void helper(TreeNode root, int level, int idx, List<Integer> startList)
{
if (root==null) return;
if (startList.size()<=level)
startList.add(idx);
ret = Math.max(ret, idx - startList.get(level)+1);
helper(root.left, level+1, idx*2, startList);
helper(root.right, level+1, idx*2+1, startList);
}
///////////////////////////////////////////////////////
public int widthOfBinaryTree(TreeNode root) {
if (root==null) return 0;
LinkedList<TreeNode> q = new LinkedList<>();
LinkedList<Integer> pos = new LinkedList<>();
int ret = 1;
q.offer(root); pos.offer(0);
while(!q.isEmpty())
{
int size = q.size();
for (int i=0; i<size; ++i)
{
TreeNode cur = q.poll();
int idx = pos.poll();
if (cur.left!=null) {
q.offer(cur.left);
pos.offer(2*idx);
}
if (cur.right!=null)
{
q.offer(cur.right);
pos.offer(2*idx+1);
}
}
if (pos.size()==0) break;
ret = Math.max(ret, pos.peekLast()-pos.peekFirst()+1);
}
return ret;
}
public class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode(int x) { val = x; }
}
}
| [
"mxx626@outlook.com"
] | mxx626@outlook.com |
f5c341cee282de6022f26d2781ab550fceb254f4 | cdc931fad82eef60520eaa972c90c8f4f583e313 | /src/com/expedia/www/config/io/ConfigurationReaderFactory.java | c7ca6db2216cda204cf51527aad1a3923222fe91 | [] | no_license | nimz89/trie-config-poc-master | b571f07fe83fadda06bf474c372f292b1c458032 | 8b051731179e7800a54ed1f5c791e5b87587719e | refs/heads/master | 2021-01-10T06:24:44.762471 | 2015-12-03T11:28:10 | 2015-12-03T11:28:10 | 47,327,763 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 152 | java | package com.expedia.www.config.io;
public interface ConfigurationReaderFactory {
public ConfigurationReader getInstance(String configNamespace);
}
| [
"nimra.zhcet@gmail.com"
] | nimra.zhcet@gmail.com |
fe23301b14c0e3a94f4284e2ad78cdfa4ef4eda9 | 9d32980f5989cd4c55cea498af5d6a413e08b7a2 | /A72n_10_0_0/src/main/java/android/os/Bundle.java | cd87b77dd9a49c0431b825d6bf23e2b618ceb0c3 | [] | no_license | liuhaosource/OppoFramework | e7cc3bcd16958f809eec624b9921043cde30c831 | ebe39acabf5eae49f5f991c5ce677d62b683f1b6 | refs/heads/master | 2023-06-03T23:06:17.572407 | 2020-11-30T08:40:07 | 2020-11-30T08:40:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 20,603 | java | package android.os;
import android.annotation.UnsupportedAppUsage;
import android.net.TrafficStats;
import android.os.Parcelable;
import android.util.ArrayMap;
import android.util.Size;
import android.util.SizeF;
import android.util.SparseArray;
import android.util.proto.ProtoOutputStream;
import com.android.internal.annotations.VisibleForTesting;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
public static final Parcelable.Creator<Bundle> CREATOR = new Parcelable.Creator<Bundle>() {
/* class android.os.Bundle.AnonymousClass1 */
@Override // android.os.Parcelable.Creator
public Bundle createFromParcel(Parcel in) {
return in.readBundle();
}
@Override // android.os.Parcelable.Creator
public Bundle[] newArray(int size) {
return new Bundle[size];
}
};
public static final Bundle EMPTY = new Bundle();
@VisibleForTesting
static final int FLAG_ALLOW_FDS = 1024;
@VisibleForTesting
static final int FLAG_HAS_FDS = 256;
@VisibleForTesting
static final int FLAG_HAS_FDS_KNOWN = 512;
public static final Bundle STRIPPED = new Bundle();
static {
EMPTY.mMap = ArrayMap.EMPTY;
STRIPPED.putInt("STRIPPED", 1);
}
public Bundle() {
this.mFlags = 1536;
}
@VisibleForTesting
public Bundle(Parcel parcelledData) {
super(parcelledData);
this.mFlags = 1024;
maybePrefillHasFds();
}
@VisibleForTesting
public Bundle(Parcel parcelledData, int length) {
super(parcelledData, length);
this.mFlags = 1024;
maybePrefillHasFds();
}
private void maybePrefillHasFds() {
if (this.mParcelledData == null) {
return;
}
if (this.mParcelledData.hasFileDescriptors()) {
this.mFlags |= 768;
} else {
this.mFlags |= 512;
}
}
public Bundle(ClassLoader loader) {
super(loader);
this.mFlags = 1536;
}
public Bundle(int capacity) {
super(capacity);
this.mFlags = 1536;
}
public Bundle(Bundle b) {
super(b);
this.mFlags = b.mFlags;
}
public Bundle(PersistableBundle b) {
super(b);
this.mFlags = 1536;
}
Bundle(boolean doInit) {
super(doInit);
}
@UnsupportedAppUsage
public static Bundle forPair(String key, String value) {
Bundle b = new Bundle(1);
b.putString(key, value);
return b;
}
@Override // android.os.BaseBundle
public void setClassLoader(ClassLoader loader) {
super.setClassLoader(loader);
}
@Override // android.os.BaseBundle
public ClassLoader getClassLoader() {
return super.getClassLoader();
}
public boolean setAllowFds(boolean allowFds) {
boolean orig = (this.mFlags & 1024) != 0;
if (allowFds) {
this.mFlags |= 1024;
} else {
this.mFlags &= -1025;
}
return orig;
}
public void setDefusable(boolean defusable) {
if (defusable) {
this.mFlags |= 1;
} else {
this.mFlags &= -2;
}
}
@UnsupportedAppUsage
public static Bundle setDefusable(Bundle bundle, boolean defusable) {
if (bundle != null) {
bundle.setDefusable(defusable);
}
return bundle;
}
@Override // java.lang.Object
public Object clone() {
return new Bundle(this);
}
public Bundle deepCopy() {
Bundle b = new Bundle(false);
b.copyInternal(this, true);
return b;
}
@Override // android.os.BaseBundle
public void clear() {
super.clear();
this.mFlags = 1536;
}
@Override // android.os.BaseBundle
public void remove(String key) {
super.remove(key);
if ((this.mFlags & 256) != 0) {
this.mFlags &= -513;
}
}
public void putAll(Bundle bundle) {
unparcel();
bundle.unparcel();
this.mMap.putAll(bundle.mMap);
if ((bundle.mFlags & 256) != 0) {
this.mFlags |= 256;
}
if ((bundle.mFlags & 512) == 0) {
this.mFlags &= -513;
}
}
@UnsupportedAppUsage
public int getSize() {
if (this.mParcelledData != null) {
return this.mParcelledData.dataSize();
}
return 0;
}
public boolean hasFileDescriptors() {
if ((this.mFlags & 512) == 0) {
boolean fdFound = false;
if (this.mParcelledData == null) {
int i = this.mMap.size() - 1;
while (true) {
if (i < 0) {
break;
}
Object obj = this.mMap.valueAt(i);
if (obj instanceof Parcelable) {
if ((((Parcelable) obj).describeContents() & 1) != 0) {
fdFound = true;
break;
}
} else if (obj instanceof Parcelable[]) {
Parcelable[] array = (Parcelable[]) obj;
int n = array.length - 1;
while (true) {
if (n >= 0) {
Parcelable p = array[n];
if (p != null && (p.describeContents() & 1) != 0) {
fdFound = true;
break;
}
n--;
} else {
break;
}
}
} else if (obj instanceof SparseArray) {
SparseArray<? extends Parcelable> array2 = (SparseArray) obj;
int n2 = array2.size() - 1;
while (true) {
if (n2 >= 0) {
Parcelable p2 = (Parcelable) array2.valueAt(n2);
if (p2 != null && (p2.describeContents() & 1) != 0) {
fdFound = true;
break;
}
n2--;
} else {
break;
}
}
} else if (obj instanceof ArrayList) {
ArrayList array3 = (ArrayList) obj;
if (!array3.isEmpty() && (array3.get(0) instanceof Parcelable)) {
int n3 = array3.size() - 1;
while (true) {
if (n3 >= 0) {
Parcelable p3 = (Parcelable) array3.get(n3);
if (p3 != null && (p3.describeContents() & 1) != 0) {
fdFound = true;
break;
}
n3--;
} else {
break;
}
}
}
}
i--;
}
} else if (this.mParcelledData.hasFileDescriptors()) {
fdFound = true;
}
if (fdFound) {
this.mFlags |= 256;
} else {
this.mFlags &= TrafficStats.TAG_NETWORK_STACK_RANGE_END;
}
this.mFlags |= 512;
}
return (this.mFlags & 256) != 0;
}
@UnsupportedAppUsage
public Bundle filterValues() {
unparcel();
Bundle bundle = this;
if (this.mMap != null) {
ArrayMap<String, Object> map = this.mMap;
for (int i = map.size() - 1; i >= 0; i--) {
Object value = map.valueAt(i);
if (!PersistableBundle.isValidType(value)) {
if (value instanceof Bundle) {
Bundle newBundle = ((Bundle) value).filterValues();
if (newBundle != value) {
if (map == this.mMap) {
bundle = new Bundle(this);
map = bundle.mMap;
}
map.setValueAt(i, newBundle);
}
} else if (!value.getClass().getName().startsWith("android.")) {
if (map == this.mMap) {
bundle = new Bundle(this);
map = bundle.mMap;
}
map.removeAt(i);
}
}
}
}
this.mFlags |= 512;
this.mFlags &= TrafficStats.TAG_NETWORK_STACK_RANGE_END;
return bundle;
}
@Override // android.os.BaseBundle
public void putByte(String key, byte value) {
super.putByte(key, value);
}
@Override // android.os.BaseBundle
public void putChar(String key, char value) {
super.putChar(key, value);
}
@Override // android.os.BaseBundle
public void putShort(String key, short value) {
super.putShort(key, value);
}
@Override // android.os.BaseBundle
public void putFloat(String key, float value) {
super.putFloat(key, value);
}
@Override // android.os.BaseBundle
public void putCharSequence(String key, CharSequence value) {
super.putCharSequence(key, value);
}
public void putParcelable(String key, Parcelable value) {
unparcel();
this.mMap.put(key, value);
this.mFlags &= -513;
}
public void putSize(String key, Size value) {
unparcel();
this.mMap.put(key, value);
}
public void putSizeF(String key, SizeF value) {
unparcel();
this.mMap.put(key, value);
}
public void putParcelableArray(String key, Parcelable[] value) {
unparcel();
this.mMap.put(key, value);
this.mFlags &= -513;
}
public void putParcelableArrayList(String key, ArrayList<? extends Parcelable> value) {
unparcel();
this.mMap.put(key, value);
this.mFlags &= -513;
}
@UnsupportedAppUsage
public void putParcelableList(String key, List<? extends Parcelable> value) {
unparcel();
this.mMap.put(key, value);
this.mFlags &= -513;
}
public void putSparseParcelableArray(String key, SparseArray<? extends Parcelable> value) {
unparcel();
this.mMap.put(key, value);
this.mFlags &= -513;
}
@Override // android.os.BaseBundle
public void putIntegerArrayList(String key, ArrayList<Integer> value) {
super.putIntegerArrayList(key, value);
}
@Override // android.os.BaseBundle
public void putStringArrayList(String key, ArrayList<String> value) {
super.putStringArrayList(key, value);
}
@Override // android.os.BaseBundle
public void putCharSequenceArrayList(String key, ArrayList<CharSequence> value) {
super.putCharSequenceArrayList(key, value);
}
@Override // android.os.BaseBundle
public void putSerializable(String key, Serializable value) {
super.putSerializable(key, value);
}
@Override // android.os.BaseBundle
public void putByteArray(String key, byte[] value) {
super.putByteArray(key, value);
}
@Override // android.os.BaseBundle
public void putShortArray(String key, short[] value) {
super.putShortArray(key, value);
}
@Override // android.os.BaseBundle
public void putCharArray(String key, char[] value) {
super.putCharArray(key, value);
}
@Override // android.os.BaseBundle
public void putFloatArray(String key, float[] value) {
super.putFloatArray(key, value);
}
@Override // android.os.BaseBundle
public void putCharSequenceArray(String key, CharSequence[] value) {
super.putCharSequenceArray(key, value);
}
public void putBundle(String key, Bundle value) {
unparcel();
this.mMap.put(key, value);
}
public void putBinder(String key, IBinder value) {
unparcel();
this.mMap.put(key, value);
}
@UnsupportedAppUsage
@Deprecated
public void putIBinder(String key, IBinder value) {
unparcel();
this.mMap.put(key, value);
}
@Override // android.os.BaseBundle
public byte getByte(String key) {
return super.getByte(key);
}
@Override // android.os.BaseBundle
public Byte getByte(String key, byte defaultValue) {
return super.getByte(key, defaultValue);
}
@Override // android.os.BaseBundle
public char getChar(String key) {
return super.getChar(key);
}
@Override // android.os.BaseBundle
public char getChar(String key, char defaultValue) {
return super.getChar(key, defaultValue);
}
@Override // android.os.BaseBundle
public short getShort(String key) {
return super.getShort(key);
}
@Override // android.os.BaseBundle
public short getShort(String key, short defaultValue) {
return super.getShort(key, defaultValue);
}
@Override // android.os.BaseBundle
public float getFloat(String key) {
return super.getFloat(key);
}
@Override // android.os.BaseBundle
public float getFloat(String key, float defaultValue) {
return super.getFloat(key, defaultValue);
}
@Override // android.os.BaseBundle
public CharSequence getCharSequence(String key) {
return super.getCharSequence(key);
}
@Override // android.os.BaseBundle
public CharSequence getCharSequence(String key, CharSequence defaultValue) {
return super.getCharSequence(key, defaultValue);
}
public Size getSize(String key) {
unparcel();
Object o = this.mMap.get(key);
try {
return (Size) o;
} catch (ClassCastException e) {
typeWarning(key, o, "Size", e);
return null;
}
}
public SizeF getSizeF(String key) {
unparcel();
Object o = this.mMap.get(key);
try {
return (SizeF) o;
} catch (ClassCastException e) {
typeWarning(key, o, "SizeF", e);
return null;
}
}
public Bundle getBundle(String key) {
unparcel();
Object o = this.mMap.get(key);
if (o == null) {
return null;
}
try {
return (Bundle) o;
} catch (ClassCastException e) {
typeWarning(key, o, "Bundle", e);
return null;
}
}
public <T extends Parcelable> T getParcelable(String key) {
unparcel();
Object o = this.mMap.get(key);
if (o == null) {
return null;
}
try {
return (T) ((Parcelable) o);
} catch (ClassCastException e) {
typeWarning(key, o, "Parcelable", e);
return null;
}
}
public Parcelable[] getParcelableArray(String key) {
unparcel();
Object o = this.mMap.get(key);
if (o == null) {
return null;
}
try {
return (Parcelable[]) o;
} catch (ClassCastException e) {
typeWarning(key, o, "Parcelable[]", e);
return null;
}
}
public <T extends Parcelable> ArrayList<T> getParcelableArrayList(String key) {
unparcel();
Object o = this.mMap.get(key);
if (o == null) {
return null;
}
try {
return (ArrayList) o;
} catch (ClassCastException e) {
typeWarning(key, o, "ArrayList", e);
return null;
}
}
public <T extends Parcelable> SparseArray<T> getSparseParcelableArray(String key) {
unparcel();
Object o = this.mMap.get(key);
if (o == null) {
return null;
}
try {
return (SparseArray) o;
} catch (ClassCastException e) {
typeWarning(key, o, "SparseArray", e);
return null;
}
}
@Override // android.os.BaseBundle
public Serializable getSerializable(String key) {
return super.getSerializable(key);
}
@Override // android.os.BaseBundle
public ArrayList<Integer> getIntegerArrayList(String key) {
return super.getIntegerArrayList(key);
}
@Override // android.os.BaseBundle
public ArrayList<String> getStringArrayList(String key) {
return super.getStringArrayList(key);
}
@Override // android.os.BaseBundle
public ArrayList<CharSequence> getCharSequenceArrayList(String key) {
return super.getCharSequenceArrayList(key);
}
@Override // android.os.BaseBundle
public byte[] getByteArray(String key) {
return super.getByteArray(key);
}
@Override // android.os.BaseBundle
public short[] getShortArray(String key) {
return super.getShortArray(key);
}
@Override // android.os.BaseBundle
public char[] getCharArray(String key) {
return super.getCharArray(key);
}
@Override // android.os.BaseBundle
public float[] getFloatArray(String key) {
return super.getFloatArray(key);
}
@Override // android.os.BaseBundle
public CharSequence[] getCharSequenceArray(String key) {
return super.getCharSequenceArray(key);
}
public IBinder getBinder(String key) {
unparcel();
Object o = this.mMap.get(key);
if (o == null) {
return null;
}
try {
return (IBinder) o;
} catch (ClassCastException e) {
typeWarning(key, o, "IBinder", e);
return null;
}
}
@UnsupportedAppUsage
@Deprecated
public IBinder getIBinder(String key) {
unparcel();
Object o = this.mMap.get(key);
if (o == null) {
return null;
}
try {
return (IBinder) o;
} catch (ClassCastException e) {
typeWarning(key, o, "IBinder", e);
return null;
}
}
@Override // android.os.Parcelable
public int describeContents() {
if (hasFileDescriptors()) {
return 0 | 1;
}
return 0;
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int flags) {
boolean oldAllowFds = parcel.pushAllowFds((this.mFlags & 1024) != 0);
try {
super.writeToParcelInner(parcel, flags);
} finally {
parcel.restoreAllowFds(oldAllowFds);
}
}
public void readFromParcel(Parcel parcel) {
super.readFromParcelInner(parcel);
this.mFlags = 1024;
maybePrefillHasFds();
}
public synchronized String toString() {
if (this.mParcelledData == null) {
try {
return "Bundle[" + this.mMap.toString() + "]";
} catch (ArrayIndexOutOfBoundsException e) {
return "Bundle[EMPTY_PARCEL]";
}
} else if (isEmptyParcel()) {
return "Bundle[EMPTY_PARCEL]";
} else {
return "Bundle[mParcelledData.dataSize=" + this.mParcelledData.dataSize() + "]";
}
}
public synchronized String toShortString() {
if (this.mParcelledData == null) {
return this.mMap.toString();
} else if (isEmptyParcel()) {
return "EMPTY_PARCEL";
} else {
return "mParcelledData.dataSize=" + this.mParcelledData.dataSize();
}
}
public void writeToProto(ProtoOutputStream proto, long fieldId) {
long token = proto.start(fieldId);
if (this.mParcelledData == null) {
proto.write(1138166333442L, this.mMap.toString());
} else if (isEmptyParcel()) {
proto.write(1120986464257L, 0);
} else {
proto.write(1120986464257L, this.mParcelledData.dataSize());
}
proto.end(token);
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
85484e003b65d8341e5990226497143946ebc804 | 50bcedb0d0f8189a7eeb006284d38aeeaede329b | /src/main/java/controller/InfoController.java | 832d9dc6d16c98185ab35a5ccfa3c1d7bb654351 | [] | no_license | liyupi/vi-team_back-end | 4a99497e45a7a0d54044976b2dcb77c0f6793c2d | f4418bceafcf23545f59dea0cebc503dc58459d1 | refs/heads/master | 2020-03-19T15:42:12.139691 | 2018-06-09T01:52:19 | 2018-06-09T01:52:19 | 136,681,941 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,894 | java | package controller;
import com.github.pagehelper.Page;
import entity.Info;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import service.InfoService;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author: Yupi Li
* @Date: Created in 13:56 2018/5/13
* @Description:
* @Modified By:
*/
@Controller
@CrossOrigin
public class InfoController {
@Resource
private InfoService infoService;
@RequestMapping("/info/add")
@ResponseBody
public Map<String, Object> addInfo(Info info, String token) {
Map<String, Object> map = new HashMap<>();
try {
if (infoService.addInfo(info, token)) {
map.put("code", 0);
} else {
map.put("code", 2);
}
} catch (Exception e) {
map.put("code", 3);
}
return map;
}
@RequestMapping("/info/get/team")
@ResponseBody
public Map<String, Object> getTeamInfoByStatusByPage(Integer teamId, Integer status, String token, int page, int limit) {
Map<String, Object> map = new HashMap<>();
try {
List<Info> infoList = infoService.getInfosByTeamIdByStatusByPage(teamId, status, token, page, limit);
if (infoList != null) {
long total = ((Page) infoList).getTotal();
map.put("total", total);
if (infoList.size() > 0) {
map.put("infoList", infoList);
map.put("code", 0);
} else {
map.put("code", 4);
}
} else {
map.put("code", 2);
}
} catch (Exception e) {
map.put("code", 3);
}
return map;
}
@RequestMapping("/info/update")
@ResponseBody
public Map<String, Object> updateInfo(Info info, String token) {
Map<String, Object> map = new HashMap<>();
try {
if (infoService.updateInfo(info, token)) {
map.put("code", 0);
} else {
map.put("code", 2);
}
} catch (Exception e) {
map.put("code", 3);
}
return map;
}
@RequestMapping("/info/delete")
@ResponseBody
public Map<String, Object> deleteInfo(Integer infoId, String token) {
Map<String, Object> map = new HashMap<>();
try {
if (infoService.deleteInfoById(infoId, token)) {
map.put("code", 0);
} else {
map.put("code", 2);
}
} catch (Exception e) {
map.put("code", 3);
}
return map;
}
}
| [
"592789970@qq.com"
] | 592789970@qq.com |
e93022b6345164f0bfb6e78050781eb46f3256b7 | 6b1f575f22c27ac1df63f4c6bd10974fa23cd9f1 | /lab3_1.java | 78115f66465bae391c710e1cb796b07af96aadbc | [] | no_license | hyeminjang31/- | fc74a88f898f7b6617e1f3c3f6bff4977e6a23a8 | 6a73b83f283876d62ea65b3ec4076152c7a0107b | refs/heads/main | 2023-08-04T06:23:58.166499 | 2021-08-18T12:23:36 | 2021-08-18T12:23:36 | 384,925,664 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 610 | java | import java.util.*;
public class lab3_1 {
public static void main(String[] args) {
System.out.print("월 입력:");
Scanner keyboard=new Scanner(System.in);
int month=keyboard.nextInt();
if(month<0 || month >12)
{
System.out.println("입력오류");
System.exit(0);
}
int day=0;
switch(month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12: day=31;break;
case 2: day=28; break;
case 4:
case 6:
case 9:
case 11: day=30;break;
}
System.out.println(month+"월에는 "+day+"일이 있습니다.");
}
}
| [
"noreply@github.com"
] | noreply@github.com |
045a92391819475627d33a4ecc082e60865ce207 | 72247e4537dd3653d0ab5cda7016ffa7314cc17c | /peppol-smp-server-webapp-xml/src/test/java/com/helger/peppol/smpserver/rest/ServiceMetadataInterfaceTest.java | 48da0a5dbe1059b861d5ea6236081b8132786093 | [] | no_license | napramirez/peppol-smp-server | 6c18f1203e86cecb0d70921996fc220ad3460dc6 | e4a6260beec779c3c927c0c43dcd335d9bf918df | refs/heads/master | 2020-04-16T12:31:44.218070 | 2019-01-11T08:23:46 | 2019-01-11T08:23:46 | 165,583,069 | 1 | 0 | null | 2019-01-14T02:36:09 | 2019-01-14T02:36:09 | null | UTF-8 | Java | false | false | 23,134 | java | /**
* Copyright (C) 2014-2019 Philip Helger and contributors
* philip[at]helger[dot]com
*
* 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.helger.peppol.smpserver.rest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import javax.annotation.Nonnull;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation.Builder;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;
import org.junit.Rule;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.helger.commons.ValueEnforcer;
import com.helger.commons.collection.ArrayHelper;
import com.helger.commons.http.CHttpHeader;
import com.helger.commons.io.resource.ClassPathResource;
import com.helger.commons.string.StringHelper;
import com.helger.http.basicauth.BasicAuthClientCredentials;
import com.helger.peppol.identifier.factory.PeppolIdentifierFactory;
import com.helger.peppol.identifier.generic.doctype.IDocumentTypeIdentifier;
import com.helger.peppol.identifier.generic.participant.IParticipantIdentifier;
import com.helger.peppol.identifier.generic.participant.SimpleParticipantIdentifier;
import com.helger.peppol.identifier.peppol.doctype.EPredefinedDocumentTypeIdentifier;
import com.helger.peppol.identifier.peppol.doctype.PeppolDocumentTypeIdentifier;
import com.helger.peppol.identifier.peppol.process.EPredefinedProcessIdentifier;
import com.helger.peppol.identifier.peppol.process.PeppolProcessIdentifier;
import com.helger.peppol.smp.ESMPTransportProfile;
import com.helger.peppol.smp.EndpointType;
import com.helger.peppol.smp.ObjectFactory;
import com.helger.peppol.smp.ProcessListType;
import com.helger.peppol.smp.ProcessType;
import com.helger.peppol.smp.RedirectType;
import com.helger.peppol.smp.ServiceEndpointList;
import com.helger.peppol.smp.ServiceGroupType;
import com.helger.peppol.smp.ServiceInformationType;
import com.helger.peppol.smp.ServiceMetadataType;
import com.helger.peppol.smpclient.SMPClient;
import com.helger.peppol.smpclient.exception.SMPClientException;
import com.helger.peppol.smpclient.exception.SMPClientNotFoundException;
import com.helger.peppol.smpserver.domain.SMPMetaManager;
import com.helger.peppol.smpserver.domain.redirect.ISMPRedirectManager;
import com.helger.peppol.smpserver.domain.servicegroup.ISMPServiceGroup;
import com.helger.peppol.smpserver.domain.servicegroup.ISMPServiceGroupManager;
import com.helger.peppol.smpserver.domain.serviceinfo.ISMPServiceInformationManager;
import com.helger.peppol.smpserver.mock.MockSMPClient;
import com.helger.peppol.smpserver.mock.SMPServerRESTTestRule;
import com.helger.peppol.utils.W3CEndpointReferenceHelper;
import com.helger.photon.security.CSecurity;
/**
* Test class for class {@link ServiceMetadataInterface}.
*
* @author Philip Helger
*/
public final class ServiceMetadataInterfaceTest
{
private static final Logger LOGGER = LoggerFactory.getLogger (ServiceMetadataInterfaceTest.class);
private static final BasicAuthClientCredentials CREDENTIALS = new BasicAuthClientCredentials (CSecurity.USER_ADMINISTRATOR_LOGIN,
CSecurity.USER_ADMINISTRATOR_PASSWORD);
@Rule
public final SMPServerRESTTestRule m_aRule = new SMPServerRESTTestRule (ClassPathResource.getAsFile ("test-smp-server-xml.properties")
.getAbsolutePath ());
private final ObjectFactory m_aObjFactory = new ObjectFactory ();
@Nonnull
private static Builder _addCredentials (@Nonnull final Builder aBuilder)
{
// Use default credentials for XML backend
return aBuilder.header (CHttpHeader.AUTHORIZATION, CREDENTIALS.getRequestValue ());
}
private static int _testResponseJerseyClient (final Response aResponseMsg, final int... aStatusCodes)
{
ValueEnforcer.notNull (aResponseMsg, "ResponseMsg");
ValueEnforcer.notEmpty (aStatusCodes, "StatusCodes");
assertNotNull (aResponseMsg);
// Read response
final String sResponse = aResponseMsg.readEntity (String.class);
if (StringHelper.hasText (sResponse))
LOGGER.info ("HTTP Response: " + sResponse);
assertTrue (Arrays.toString (aStatusCodes) + " does not contain " + aResponseMsg.getStatus (),
ArrayHelper.contains (aStatusCodes, aResponseMsg.getStatus ()));
return aResponseMsg.getStatus ();
}
@Test
public void testCreateAndDeleteServiceInformationJerseyClient ()
{
// Lower case
final IParticipantIdentifier aPI_LC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("9915:xxx");
final String sPI_LC = aPI_LC.getURIEncoded ();
// Upper case
final IParticipantIdentifier aPI_UC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("9915:XXX");
final String sPI_UC = aPI_UC.getURIEncoded ();
final PeppolDocumentTypeIdentifier aDT = EPredefinedDocumentTypeIdentifier.INVOICE_T010_BIS4A_V20.getAsDocumentTypeIdentifier ();
final String sDT = aDT.getURIEncoded ();
final PeppolProcessIdentifier aProcID = EPredefinedProcessIdentifier.BIS4A_V2.getAsProcessIdentifier ();
final ServiceGroupType aSG = new ServiceGroupType ();
aSG.setParticipantIdentifier (new SimpleParticipantIdentifier (aPI_LC));
final ServiceMetadataType aSM = new ServiceMetadataType ();
final ServiceInformationType aSI = new ServiceInformationType ();
aSI.setParticipantIdentifier (new SimpleParticipantIdentifier (aPI_LC));
aSI.setDocumentIdentifier (aDT);
{
final ProcessListType aPL = new ProcessListType ();
final ProcessType aProcess = new ProcessType ();
aProcess.setProcessIdentifier (aProcID);
final ServiceEndpointList aSEL = new ServiceEndpointList ();
final EndpointType aEndpoint = new EndpointType ();
aEndpoint.setEndpointReference (W3CEndpointReferenceHelper.createEndpointReference ("http://test.smpserver/as2"));
aEndpoint.setRequireBusinessLevelSignature (false);
aEndpoint.setCertificate ("blacert");
aEndpoint.setServiceDescription ("Unit test service");
aEndpoint.setTechnicalContactUrl ("https://github.com/phax/peppol-smp-server");
aEndpoint.setTransportProfile (ESMPTransportProfile.TRANSPORT_PROFILE_AS2.getID ());
aSEL.addEndpoint (aEndpoint);
aProcess.setServiceEndpointList (aSEL);
aPL.addProcess (aProcess);
aSI.setProcessList (aPL);
}
aSM.setServiceInformation (aSI);
final ISMPServiceGroupManager aSGMgr = SMPMetaManager.getServiceGroupMgr ();
final ISMPServiceInformationManager aSIMgr = SMPMetaManager.getServiceInformationMgr ();
final WebTarget aTarget = m_aRule.getWebTarget ();
Response aResponseMsg;
_testResponseJerseyClient (aTarget.path (sPI_LC).request ().get (), 404);
_testResponseJerseyClient (aTarget.path (sPI_UC).request ().get (), 404);
try
{
// PUT ServiceGroup
aResponseMsg = _addCredentials (aTarget.path (sPI_LC)
.request ()).put (Entity.xml (m_aObjFactory.createServiceGroup (aSG)));
_testResponseJerseyClient (aResponseMsg, 200);
// Read both
assertNotNull (aTarget.path (sPI_LC).request ().get (ServiceGroupType.class));
assertNotNull (aTarget.path (sPI_UC).request ().get (ServiceGroupType.class));
final ISMPServiceGroup aServiceGroup = aSGMgr.getSMPServiceGroupOfID (aPI_LC);
assertNotNull (aServiceGroup);
final ISMPServiceGroup aServiceGroup_UC = aSGMgr.getSMPServiceGroupOfID (aPI_UC);
assertEquals (aServiceGroup, aServiceGroup_UC);
try
{
// PUT 1 ServiceInformation
aResponseMsg = _addCredentials (aTarget.path (sPI_LC)
.path ("services")
.path (sDT)
.request ()).put (Entity.xml (m_aObjFactory.createServiceMetadata (aSM)));
_testResponseJerseyClient (aResponseMsg, 200);
assertNotNull (aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType (aServiceGroup, aDT));
// PUT 2 ServiceInformation
aResponseMsg = _addCredentials (aTarget.path (sPI_LC)
.path ("services")
.path (sDT)
.request ()).put (Entity.xml (m_aObjFactory.createServiceMetadata (aSM)));
_testResponseJerseyClient (aResponseMsg, 200);
assertNotNull (aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType (aServiceGroup, aDT));
// DELETE 1 ServiceInformation
aResponseMsg = _addCredentials (aTarget.path (sPI_LC).path ("services").path (sDT).request ()).delete ();
_testResponseJerseyClient (aResponseMsg, 200);
assertNull (aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType (aServiceGroup, aDT));
}
finally
{
// DELETE 2 ServiceInformation
aResponseMsg = _addCredentials (aTarget.path (sPI_LC).path ("services").path (sDT).request ()).delete ();
_testResponseJerseyClient (aResponseMsg, 200, 404);
assertNull (aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType (aServiceGroup, aDT));
}
assertNotNull (aTarget.path (sPI_LC).request ().get (ServiceGroupType.class));
}
finally
{
// DELETE ServiceGroup
aResponseMsg = _addCredentials (aTarget.path (sPI_LC).request ()).delete ();
// May be 500 if no MySQL is running
_testResponseJerseyClient (aResponseMsg, 200, 404);
_testResponseJerseyClient (aTarget.path (sPI_LC).request ().get (), 404);
_testResponseJerseyClient (aTarget.path (sPI_UC).request ().get (), 404);
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_LC));
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_UC));
}
}
@Test
public void testCreateAndDeleteServiceInformationSMPClient () throws SMPClientException
{
// Lower case
final IParticipantIdentifier aPI_LC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("9915:xxx");
// Upper case
final IParticipantIdentifier aPI_UC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("9915:XXX");
final PeppolDocumentTypeIdentifier aDT = EPredefinedDocumentTypeIdentifier.INVOICE_T010_BIS4A_V20.getAsDocumentTypeIdentifier ();
final PeppolProcessIdentifier aProcID = EPredefinedProcessIdentifier.BIS4A_V2.getAsProcessIdentifier ();
final ServiceGroupType aSG = new ServiceGroupType ();
aSG.setParticipantIdentifier (new SimpleParticipantIdentifier (aPI_LC));
final ServiceInformationType aSI = new ServiceInformationType ();
aSI.setParticipantIdentifier (new SimpleParticipantIdentifier (aPI_LC));
aSI.setDocumentIdentifier (aDT);
{
final ProcessListType aPL = new ProcessListType ();
final ProcessType aProcess = new ProcessType ();
aProcess.setProcessIdentifier (aProcID);
final ServiceEndpointList aSEL = new ServiceEndpointList ();
final EndpointType aEndpoint = new EndpointType ();
aEndpoint.setEndpointReference (W3CEndpointReferenceHelper.createEndpointReference ("http://test.smpserver/as2"));
aEndpoint.setRequireBusinessLevelSignature (false);
aEndpoint.setCertificate ("blacert");
aEndpoint.setServiceDescription ("Unit test service");
aEndpoint.setTechnicalContactUrl ("https://github.com/phax/peppol-smp-server");
aEndpoint.setTransportProfile (ESMPTransportProfile.TRANSPORT_PROFILE_AS2.getID ());
aSEL.addEndpoint (aEndpoint);
aProcess.setServiceEndpointList (aSEL);
aPL.addProcess (aProcess);
aSI.setProcessList (aPL);
}
final ISMPServiceGroupManager aSGMgr = SMPMetaManager.getServiceGroupMgr ();
final ISMPServiceInformationManager aSIMgr = SMPMetaManager.getServiceInformationMgr ();
final SMPClient aSMPClient = new MockSMPClient ();
assertNull (aSMPClient.getServiceGroupOrNull (aPI_LC));
assertNull (aSMPClient.getServiceGroupOrNull (aPI_UC));
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_LC));
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_UC));
try
{
// PUT ServiceGroup
aSMPClient.saveServiceGroup (aSG, CREDENTIALS);
// Read both
assertNotNull (aSMPClient.getServiceGroupOrNull (aPI_LC));
assertNotNull (aSMPClient.getServiceGroupOrNull (aPI_UC));
assertTrue (aSGMgr.containsSMPServiceGroupWithID (aPI_LC));
assertTrue (aSGMgr.containsSMPServiceGroupWithID (aPI_UC));
final ISMPServiceGroup aServiceGroup = aSGMgr.getSMPServiceGroupOfID (aPI_LC);
assertNotNull (aServiceGroup);
final ISMPServiceGroup aServiceGroup_UC = aSGMgr.getSMPServiceGroupOfID (aPI_UC);
assertEquals (aServiceGroup, aServiceGroup_UC);
try
{
// PUT 1 ServiceInformation
aSMPClient.saveServiceInformation (aSI, CREDENTIALS);
assertNotNull (aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType (aServiceGroup, aDT));
// PUT 2 ServiceInformation
aSMPClient.saveServiceInformation (aSI, CREDENTIALS);
assertNotNull (aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType (aServiceGroup, aDT));
// DELETE 1 ServiceInformation
aSMPClient.deleteServiceRegistration (aPI_LC, aDT, CREDENTIALS);
assertNull (aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType (aServiceGroup, aDT));
}
finally
{
// DELETE 2 ServiceInformation
try
{
aSMPClient.deleteServiceRegistration (aPI_LC, aDT, CREDENTIALS);
}
catch (final SMPClientNotFoundException ex)
{
// Expected
}
assertNull (aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType (aServiceGroup, aDT));
}
assertNotNull (aSMPClient.getServiceGroup (aPI_LC));
}
finally
{
// DELETE ServiceGroup
try
{
aSMPClient.deleteServiceGroup (aPI_LC, CREDENTIALS);
}
catch (final SMPClientNotFoundException ex)
{
// Expected
}
assertNull (aSMPClient.getServiceGroupOrNull (aPI_LC));
assertNull (aSMPClient.getServiceGroupOrNull (aPI_UC));
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_LC));
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_UC));
}
}
@Test
public void testCreateAndDeleteRedirectJerseyClient ()
{
// Lower case
final IParticipantIdentifier aPI_LC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("9915:xxx");
final String sPI_LC = aPI_LC.getURIEncoded ();
// Upper case
final IParticipantIdentifier aPI_UC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("9915:XXX");
final String sPI_UC = aPI_UC.getURIEncoded ();
final IDocumentTypeIdentifier aDT = EPredefinedDocumentTypeIdentifier.INVOICE_T010_BIS4A_V20.getAsDocumentTypeIdentifier ();
final String sDT = aDT.getURIEncoded ();
final ServiceGroupType aSG = new ServiceGroupType ();
aSG.setParticipantIdentifier (new SimpleParticipantIdentifier (aPI_LC));
final ServiceMetadataType aSM = new ServiceMetadataType ();
final RedirectType aRedir = new RedirectType ();
aRedir.setHref ("http://other-smp.domain.xyz");
aRedir.setCertificateUID ("APP_0000000000000");
aSM.setRedirect (aRedir);
final ISMPServiceGroupManager aSGMgr = SMPMetaManager.getServiceGroupMgr ();
final ISMPRedirectManager aSRMgr = SMPMetaManager.getRedirectMgr ();
final WebTarget aTarget = m_aRule.getWebTarget ();
Response aResponseMsg;
_testResponseJerseyClient (aTarget.path (sPI_LC).request ().get (), 404);
_testResponseJerseyClient (aTarget.path (sPI_UC).request ().get (), 404);
try
{
// PUT ServiceGroup
aResponseMsg = _addCredentials (aTarget.path (sPI_LC)
.request ()).put (Entity.xml (m_aObjFactory.createServiceGroup (aSG)));
_testResponseJerseyClient (aResponseMsg, 200);
assertNotNull (aTarget.path (sPI_LC).request ().get (ServiceGroupType.class));
assertNotNull (aTarget.path (sPI_UC).request ().get (ServiceGroupType.class));
final ISMPServiceGroup aServiceGroup = aSGMgr.getSMPServiceGroupOfID (aPI_LC);
assertNotNull (aServiceGroup);
final ISMPServiceGroup aServiceGroup_UC = aSGMgr.getSMPServiceGroupOfID (aPI_UC);
assertEquals (aServiceGroup, aServiceGroup_UC);
try
{
// PUT 1 ServiceInformation
aResponseMsg = _addCredentials (aTarget.path (sPI_LC)
.path ("services")
.path (sDT)
.request ()).put (Entity.xml (m_aObjFactory.createServiceMetadata (aSM)));
_testResponseJerseyClient (aResponseMsg, 200);
assertNotNull (aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType (aServiceGroup, aDT));
// PUT 2 ServiceInformation
aResponseMsg = _addCredentials (aTarget.path (sPI_LC)
.path ("services")
.path (sDT)
.request ()).put (Entity.xml (m_aObjFactory.createServiceMetadata (aSM)));
_testResponseJerseyClient (aResponseMsg, 200);
assertNotNull (aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType (aServiceGroup, aDT));
// DELETE 1 Redirect
aResponseMsg = _addCredentials (aTarget.path (sPI_LC).path ("services").path (sDT).request ()).delete ();
_testResponseJerseyClient (aResponseMsg, 200);
assertNull (aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType (aServiceGroup, aDT));
}
finally
{
// DELETE 2 Redirect
aResponseMsg = _addCredentials (aTarget.path (sPI_LC).path ("services").path (sDT).request ()).delete ();
_testResponseJerseyClient (aResponseMsg, 200, 404);
assertNull (aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType (aServiceGroup, aDT));
}
assertNotNull (aTarget.path (sPI_LC).request ().get (ServiceGroupType.class));
}
finally
{
// DELETE ServiceGroup
aResponseMsg = _addCredentials (aTarget.path (sPI_LC).request ()).delete ();
_testResponseJerseyClient (aResponseMsg, 200, 404);
_testResponseJerseyClient (aTarget.path (sPI_LC).request ().get (), 404);
_testResponseJerseyClient (aTarget.path (sPI_UC).request ().get (), 404);
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_LC));
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_UC));
}
}
@Test
public void testCreateAndDeleteRedirectSMPClient () throws SMPClientException
{
// Lower case
final IParticipantIdentifier aPI_LC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("9915:xxx");
// Upper case
final IParticipantIdentifier aPI_UC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("9915:XXX");
final IDocumentTypeIdentifier aDT = EPredefinedDocumentTypeIdentifier.INVOICE_T010_BIS4A_V20.getAsDocumentTypeIdentifier ();
final ServiceGroupType aSG = new ServiceGroupType ();
aSG.setParticipantIdentifier (new SimpleParticipantIdentifier (aPI_LC));
final RedirectType aRedir = new RedirectType ();
aRedir.setHref ("http://other-smp.domain.xyz");
aRedir.setCertificateUID ("APP_0000000000000");
final ISMPServiceGroupManager aSGMgr = SMPMetaManager.getServiceGroupMgr ();
final ISMPRedirectManager aSRMgr = SMPMetaManager.getRedirectMgr ();
final SMPClient aSMPClient = new MockSMPClient ();
assertNull (aSMPClient.getServiceGroupOrNull (aPI_LC));
assertNull (aSMPClient.getServiceGroupOrNull (aPI_UC));
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_LC));
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_UC));
try
{
// PUT ServiceGroup
aSMPClient.saveServiceGroup (aSG, CREDENTIALS);
assertNotNull (aSMPClient.getServiceGroupOrNull (aPI_LC));
assertNotNull (aSMPClient.getServiceGroupOrNull (aPI_UC));
assertTrue (aSGMgr.containsSMPServiceGroupWithID (aPI_LC));
assertTrue (aSGMgr.containsSMPServiceGroupWithID (aPI_UC));
final ISMPServiceGroup aServiceGroup = aSGMgr.getSMPServiceGroupOfID (aPI_LC);
assertNotNull (aServiceGroup);
final ISMPServiceGroup aServiceGroup_UC = aSGMgr.getSMPServiceGroupOfID (aPI_UC);
assertEquals (aServiceGroup, aServiceGroup_UC);
try
{
// PUT 1 ServiceInformation
aSMPClient.saveServiceRedirect (aPI_LC, aDT, aRedir, CREDENTIALS);
assertNotNull (aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType (aServiceGroup, aDT));
// PUT 2 ServiceInformation
aSMPClient.saveServiceRedirect (aPI_LC, aDT, aRedir, CREDENTIALS);
assertNotNull (aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType (aServiceGroup, aDT));
// DELETE 1 Redirect
aSMPClient.deleteServiceRegistration (aPI_LC, aDT, CREDENTIALS);
assertNull (aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType (aServiceGroup, aDT));
}
finally
{
// DELETE 2 Redirect
try
{
aSMPClient.deleteServiceRegistration (aPI_LC, aDT, CREDENTIALS);
}
catch (final SMPClientNotFoundException ex)
{
// Expected
}
assertNull (aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType (aServiceGroup, aDT));
}
assertNotNull (aSGMgr.getSMPServiceGroupOfID (aPI_LC));
}
finally
{
// DELETE ServiceGroup
try
{
aSMPClient.deleteServiceGroup (aPI_LC, CREDENTIALS);
}
catch (final SMPClientNotFoundException ex)
{
// Expected
}
assertNull (aSMPClient.getServiceGroupOrNull (aPI_LC));
assertNull (aSMPClient.getServiceGroupOrNull (aPI_UC));
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_LC));
assertFalse (aSGMgr.containsSMPServiceGroupWithID (aPI_UC));
}
}
}
| [
"philip@helger.com"
] | philip@helger.com |
cb98df5d5403f54869dcead840d4c5148b07bf25 | ec58b9b8b43bc75b8bee2f2e079e55af9da0dcae | /StateChartPlugIn.diagram/src/statechart/diagram/edit/policies/NodeNodeOrComp2CanonicalEditPolicy.java | fff5a1ddbe4d6e040163c132122d1b097840d84b | [] | no_license | kouvelas/ASEME | b31b4a37f21ed20840393b309612eacda92b608b | 996acaaf5209fb6ec1dfbc2762d6baeff58b751d | refs/heads/master | 2021-03-12T23:12:15.441118 | 2013-06-13T19:22:09 | 2013-06-13T19:22:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,199 | java | /*
* Kouretes Statechart Editor-KSE developed
* by Angeliki Topalidou-Kyniazopoulou
* for Kouretes Team. Code developed by Nikolaos Spanoudakis, Alex Parashos,
* ibm, apache and eclipse is used.
*/
package statechart.diagram.edit.policies;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.notation.Bounds;
import org.eclipse.gmf.runtime.notation.Location;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.Size;
import org.eclipse.gmf.runtime.notation.View;
import statechart.StatechartPackage;
import statechart.diagram.edit.parts.Node10EditPart;
import statechart.diagram.edit.parts.Node11EditPart;
import statechart.diagram.edit.parts.Node12EditPart;
import statechart.diagram.edit.parts.Node7EditPart;
import statechart.diagram.edit.parts.Node8EditPart;
import statechart.diagram.edit.parts.Node9EditPart;
import statechart.diagram.part.StateChartDiagramUpdater;
import statechart.diagram.part.StateChartNodeDescriptor;
import statechart.diagram.part.StateChartVisualIDRegistry;
/**
* @generated
*/
public class NodeNodeOrComp2CanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
protected void refreshOnActivate() {
// Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
List<?> c = getHost().getChildren();
for (int i = 0; i < c.size(); i++) {
((EditPart) c.get(i)).activate();
}
super.refreshOnActivate();
}
/**
* @generated
*/
protected EStructuralFeature getFeatureToSynchronize() {
return StatechartPackage.eINSTANCE.getNode_Children();
}
/**
* @generated
*/
@SuppressWarnings("rawtypes")
protected List getSemanticChildrenList() {
View viewObject = (View) getHost().getModel();
LinkedList<EObject> result = new LinkedList<EObject>();
List<StateChartNodeDescriptor> childDescriptors = StateChartDiagramUpdater
.getNodeNodeOrComp_7002SemanticChildren(viewObject);
for (StateChartNodeDescriptor d : childDescriptors) {
result.add(d.getModelElement());
}
return result;
}
/**
* @generated
*/
protected boolean isOrphaned(Collection<EObject> semanticChildren,
final View view) {
return isMyDiagramElement(view)
&& !semanticChildren.contains(view.getElement());
}
/**
* @generated
*/
private boolean isMyDiagramElement(View view) {
int visualID = StateChartVisualIDRegistry.getVisualID(view);
switch (visualID) {
case Node7EditPart.VISUAL_ID:
case Node8EditPart.VISUAL_ID:
case Node9EditPart.VISUAL_ID:
case Node10EditPart.VISUAL_ID:
case Node11EditPart.VISUAL_ID:
case Node12EditPart.VISUAL_ID:
return true;
}
return false;
}
/**
* @generated
*/
protected void refreshSemantic() {
if (resolveSemanticElement() == null) {
return;
}
LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
List<StateChartNodeDescriptor> childDescriptors = StateChartDiagramUpdater
.getNodeNodeOrComp_7002SemanticChildren((View) getHost()
.getModel());
LinkedList<View> orphaned = new LinkedList<View>();
// we care to check only views we recognize as ours
LinkedList<View> knownViewChildren = new LinkedList<View>();
for (View v : getViewChildren()) {
if (isMyDiagramElement(v)) {
knownViewChildren.add(v);
}
}
// alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
HashMap<StateChartNodeDescriptor, LinkedList<View>> potentialViews = new HashMap<StateChartNodeDescriptor, LinkedList<View>>();
//
// iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
// iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
// to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
for (Iterator<StateChartNodeDescriptor> descriptorsIterator = childDescriptors
.iterator(); descriptorsIterator.hasNext();) {
StateChartNodeDescriptor next = descriptorsIterator.next();
String hint = StateChartVisualIDRegistry
.getType(next.getVisualID());
LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
LinkedList<View> potentialMatch = new LinkedList<View>(); // semanticElement matches, hint does not
for (View childView : getViewChildren()) {
EObject semanticElement = childView.getElement();
if (next.getModelElement().equals(semanticElement)) {
if (hint.equals(childView.getType())) {
perfectMatch.add(childView);
// actually, can stop iteration over view children here, but
// may want to use not the first view but last one as a 'real' match (the way original CEP does
// with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
} else {
potentialMatch.add(childView);
}
}
}
if (perfectMatch.size() > 0) {
descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
// use only one view (first or last?), keep rest as orphaned for further consideration
knownViewChildren.remove(perfectMatch.getFirst());
} else if (potentialMatch.size() > 0) {
potentialViews.put(next, potentialMatch);
}
}
// those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
// or those we have potential matches to, and thus need to be recreated, preserving size/location information.
orphaned.addAll(knownViewChildren);
//
CompositeTransactionalCommand boundsCommand = new CompositeTransactionalCommand(
host().getEditingDomain(),
DiagramUIMessages.SetLocationCommand_Label_Resize);
ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(
childDescriptors.size());
for (StateChartNodeDescriptor next : childDescriptors) {
String hint = StateChartVisualIDRegistry
.getType(next.getVisualID());
IAdaptable elementAdapter = new CanonicalElementAdapter(
next.getModelElement(), hint);
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(
elementAdapter, Node.class, hint, ViewUtil.APPEND, false,
host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
LinkedList<View> possibleMatches = potentialViews.get(next);
if (possibleMatches != null) {
// from potential matches, leave those that were not eventually used for some other NodeDescriptor (i.e. those left as orphaned)
possibleMatches.retainAll(knownViewChildren);
}
if (possibleMatches != null && !possibleMatches.isEmpty()) {
View originalView = possibleMatches.getFirst();
knownViewChildren.remove(originalView); // remove not to copy properties of the same view again and again
// add command to copy properties
if (originalView instanceof Node) {
if (((Node) originalView).getLayoutConstraint() instanceof Bounds) {
Bounds b = (Bounds) ((Node) originalView)
.getLayoutConstraint();
boundsCommand.add(new SetBoundsCommand(boundsCommand
.getEditingDomain(), boundsCommand.getLabel(),
descriptor, new Rectangle(b.getX(), b.getY(), b
.getWidth(), b.getHeight())));
} else if (((Node) originalView).getLayoutConstraint() instanceof Location) {
Location l = (Location) ((Node) originalView)
.getLayoutConstraint();
boundsCommand.add(new SetBoundsCommand(boundsCommand
.getEditingDomain(), boundsCommand.getLabel(),
descriptor, new Point(l.getX(), l.getY())));
} else if (((Node) originalView).getLayoutConstraint() instanceof Size) {
Size s = (Size) ((Node) originalView)
.getLayoutConstraint();
boundsCommand.add(new SetBoundsCommand(boundsCommand
.getEditingDomain(), boundsCommand.getLabel(),
descriptor, new Dimension(s.getWidth(), s
.getHeight())));
}
}
}
}
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
Command cmd = getCreateViewCommand(request);
if (cmd != null && cmd.canExecute()) {
SetViewMutabilityCommand.makeMutable(
new EObjectAdapter(host().getNotationView())).execute();
executeCommand(cmd);
if (boundsCommand.canExecute()) {
executeCommand(new ICommandProxy(boundsCommand.reduce()));
}
@SuppressWarnings("unchecked")
List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
createdViews.addAll(nl);
}
if (changed || createdViews.size() > 0) {
postProcessRefreshSemantic(createdViews);
}
if (createdViews.size() > 1) {
// perform a layout of the container
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host()
.getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
makeViewsImmutable(createdViews);
}
}
| [
"nikos@science.tuc.gr"
] | nikos@science.tuc.gr |
763d19a149c58ed9b647382eb631049df74443c6 | a063acc6e5502ea6acfe8fb9981eadafb4bd0cd1 | /src/com/deitel/exercicios/Capitulo6/Cap6_24/Main.java | af672d7dd1bcde15405848fcde5a6bf03dc32204 | [] | no_license | dpauloalmeida/java-how-to-program | af02885e8c7751ca3455c23ef280303aa0ab7adb | a962d85091f5c1138965e56a4436a97aaa23aea9 | refs/heads/master | 2021-09-06T09:00:47.187369 | 2018-02-04T17:25:42 | 2018-02-04T17:25:42 | 106,619,826 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 451 | java | package Cap6_24;
public class Main
{
public static void main( String[] args )
{
isPerfect();
System.out.println( "Encerrando..." );
}
public static void isPerfect()
{
for( int i = 1; i <= 1000; i++ )
{
int numberPerfect = 0;
for( int j = 1; j <= i; j++ )
{
if( i % j == 0 && i != j )
numberPerfect += j;
}
if( numberPerfect == i )
System.out.printf( "%d is a perfect number!%n", i );
}
}
}
| [
"danilo.eru@gmail.com"
] | danilo.eru@gmail.com |
59ebabae099b4f1bb0423386f7e1d9a3a65ca969 | 0dc1ac8723808d86ce447060811fb75eb39a4907 | /Spring2/src/com/Smileyes/g_pointcut/TestProxy.java | c0dc54896e5d4e6c98723649d2305bab4094bef2 | [] | no_license | Smileyes/CodeLearning | 5cea9e8ef8578f4324ca4c9abd8ea53fbbd7f0e7 | 1f885b7a3123bedd6dcf6c231445b30298b3a08d | refs/heads/master | 2021-01-01T04:14:16.643592 | 2017-09-15T03:57:05 | 2017-09-15T03:57:05 | 97,144,979 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 550 | java | package com.Smileyes.g_pointcut;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/*
* 测试AOP编程的方式
* 采用注解的方式
* 被代理目标对象实现接口
* @author Smileyes
*
*/
public class TestProxy {
private ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext(
"com/Smileyes/g_pointcut/bean.xml");
@Test
public void save() {
IUserDao userDao = (IUserDao) ac.getBean("userDao");
System.out.println(userDao.getClass());
userDao.save();
}
}
| [
"teslalyl@gmail.com"
] | teslalyl@gmail.com |
b6565b3d56fe411c5f5decf8de2f80db9900f585 | 03b07aaf2e1096e0765b34ac4170c120b696c058 | /demo_gradle/src/main/java/com/example/demo/TestController.java | 3949e765b206c0caf3309333432b4b978742dc20 | [] | no_license | itforest/myspringboot | d9db03b73622798cdb407d250b523046413e2e33 | d437713fbe7263a6ce7b9a6c9db9caaab7e98a4a | refs/heads/master | 2020-05-07T22:04:10.310549 | 2019-04-12T04:32:32 | 2019-04-12T04:32:32 | 180,930,774 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 452 | java | package com.example.demo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class TestController {
@ResponseBody
@RequestMapping("/")
public String root() {
System.out.println("######################ROOT#########################");
return "HELLO ROOT";
}
}
| [
"itforest@itforest-PC"
] | itforest@itforest-PC |
cf4ae3b23171034099223ec4dd67c98f9f4b72ff | 1d9782798f1d0d44d188b65f00928dd8a3687731 | /src/main/java/tencent/ReverseTest.java | c8aebdf5f50df9c3c8e3ec9cecd4a1af74c5b1b0 | [] | no_license | XavierWD/leetcode | a00317d51586e5c4cb8c85329f62e4da07de6ef4 | 3a7d7c2f6e4beb907659a7b9b2c4fb5d8526ecaa | refs/heads/master | 2022-07-14T23:13:57.862603 | 2019-06-09T14:30:54 | 2019-06-09T14:30:54 | 175,628,889 | 0 | 0 | null | 2022-06-21T01:14:53 | 2019-03-14T13:35:18 | Java | UTF-8 | Java | false | false | 599 | java | package tencent;
public class ReverseTest {
public static void main(String...args){
System.out.println(Integer.MAX_VALUE);
}
public int reverse(int x) {
String xs = String.valueOf(Math.abs(x));
int result = 0;
for (int i = xs.length() - 1; i >= 0; i--) {
if (result > ((Integer.MAX_VALUE - (xs.charAt(i) - '0')) / 10)) {
return 0;
}
result = result * 10 + (xs.charAt(i) - '0');
}
if (x > 0) {
return result;
} else {
return -result;
}
}
}
| [
"mac@macdeMac-Pro.local"
] | mac@macdeMac-Pro.local |
d345552ba03b47eee7f5d95b2f7f4ff529b4c361 | 3ce0082182fdd67f5495e7e514669a2a1abc1ca9 | /src/main/java/pl/com/audeo/kokat/CustomerRepository.java | 3d809d51ac6eedf4e34495a1c2736e1a836fdd5d | [] | no_license | flakw/kokat | 38cd463f6bdaae2253eee2573409cba2dbf794b6 | cbda122780dd6f629a6e6743f7f529dcfacbabf7 | refs/heads/master | 2020-04-06T06:58:46.855056 | 2016-08-26T19:00:17 | 2016-08-26T19:00:17 | 63,792,172 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 323 | java | package pl.com.audeo.kokat;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* User: Wojtek
* Date: 2016-08-26
* Time: 20:20
*/
public interface CustomerRepository extends JpaRepository<Customer, Long> {
List<Customer> findByLastNameStartsWithIgnoreCase(String lastName);
}
| [
"wflak2301@gmail.com"
] | wflak2301@gmail.com |
3e8db455b173eaa8fe5f1c7d78199e7f7a16c3e3 | 83e81c25b1f74f88ed0f723afc5d3f83e7d05da8 | /packages/SystemUI/tests/src/com/android/systemui/pip/PipAnimationControllerTest.java | 22f6a62f02677297657c405dfeeb8a5fa9ad064e | [
"Apache-2.0",
"LicenseRef-scancode-unicode"
] | permissive | Ankits-lab/frameworks_base | 8a63f39a79965c87a84e80550926327dcafb40b7 | 150a9240e5a11cd5ebc9bb0832ce30e9c23f376a | refs/heads/main | 2023-02-06T03:57:44.893590 | 2020-11-14T09:13:40 | 2020-11-14T09:13:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,867 | java | /*
* Copyright (C) 2020 The Android Open Source Project
*
* 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.android.systemui.pip;
import static com.android.systemui.pip.PipAnimationController.TRANSITION_DIRECTION_TO_FULLSCREEN;
import static com.android.systemui.pip.PipAnimationController.TRANSITION_DIRECTION_TO_PIP;
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
import android.view.SurfaceControl;
import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.statusbar.policy.ConfigurationController;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
* Unit tests against {@link PipAnimationController} to ensure that it sends the right callbacks
* depending on the various interactions.
*/
@RunWith(AndroidTestingRunner.class)
@SmallTest
@TestableLooper.RunWithLooper(setAsMainLooper = true)
public class PipAnimationControllerTest extends SysuiTestCase {
private PipAnimationController mPipAnimationController;
private SurfaceControl mLeash;
@Mock
private PipAnimationController.PipAnimationCallback mPipAnimationCallback;
@Before
public void setUp() throws Exception {
mPipAnimationController = new PipAnimationController(
mContext, new PipSurfaceTransactionHelper(mContext,
mock(ConfigurationController.class)));
mLeash = new SurfaceControl.Builder()
.setContainerLayer()
.setName("FakeLeash")
.build();
MockitoAnnotations.initMocks(this);
}
@Test
public void getAnimator_withAlpha_returnFloatAnimator() {
final PipAnimationController.PipTransitionAnimator animator = mPipAnimationController
.getAnimator(mLeash, new Rect(), 0f, 1f);
assertEquals("Expect ANIM_TYPE_ALPHA animation",
animator.getAnimationType(), PipAnimationController.ANIM_TYPE_ALPHA);
}
@Test
public void getAnimator_withBounds_returnBoundsAnimator() {
final PipAnimationController.PipTransitionAnimator animator = mPipAnimationController
.getAnimator(mLeash, new Rect(), new Rect(), null);
assertEquals("Expect ANIM_TYPE_BOUNDS animation",
animator.getAnimationType(), PipAnimationController.ANIM_TYPE_BOUNDS);
}
@Test
public void getAnimator_whenSameTypeRunning_updateExistingAnimator() {
final Rect startValue = new Rect(0, 0, 100, 100);
final Rect endValue1 = new Rect(100, 100, 200, 200);
final Rect endValue2 = new Rect(200, 200, 300, 300);
final PipAnimationController.PipTransitionAnimator oldAnimator = mPipAnimationController
.getAnimator(mLeash, startValue, endValue1, null);
oldAnimator.setSurfaceControlTransactionFactory(DummySurfaceControlTx::new);
oldAnimator.start();
final PipAnimationController.PipTransitionAnimator newAnimator = mPipAnimationController
.getAnimator(mLeash, startValue, endValue2, null);
assertEquals("getAnimator with same type returns same animator",
oldAnimator, newAnimator);
assertEquals("getAnimator with same type updates end value",
endValue2, newAnimator.getEndValue());
}
@Test
public void getAnimator_setTransitionDirection() {
PipAnimationController.PipTransitionAnimator animator = mPipAnimationController
.getAnimator(mLeash, new Rect(), 0f, 1f)
.setTransitionDirection(TRANSITION_DIRECTION_TO_PIP);
assertEquals("Transition to PiP mode",
animator.getTransitionDirection(), TRANSITION_DIRECTION_TO_PIP);
animator = mPipAnimationController
.getAnimator(mLeash, new Rect(), 0f, 1f)
.setTransitionDirection(TRANSITION_DIRECTION_TO_FULLSCREEN);
assertEquals("Transition to fullscreen mode",
animator.getTransitionDirection(), TRANSITION_DIRECTION_TO_FULLSCREEN);
}
@Test
@SuppressWarnings("unchecked")
public void pipTransitionAnimator_updateEndValue() {
final Rect startValue = new Rect(0, 0, 100, 100);
final Rect endValue1 = new Rect(100, 100, 200, 200);
final Rect endValue2 = new Rect(200, 200, 300, 300);
final PipAnimationController.PipTransitionAnimator animator = mPipAnimationController
.getAnimator(mLeash, startValue, endValue1, null);
animator.updateEndValue(endValue2);
assertEquals("updateEndValue updates end value", animator.getEndValue(), endValue2);
}
@Test
public void pipTransitionAnimator_setPipAnimationCallback() {
final Rect startValue = new Rect(0, 0, 100, 100);
final Rect endValue = new Rect(100, 100, 200, 200);
final PipAnimationController.PipTransitionAnimator animator = mPipAnimationController
.getAnimator(mLeash, startValue, endValue, null);
animator.setSurfaceControlTransactionFactory(DummySurfaceControlTx::new);
animator.setPipAnimationCallback(mPipAnimationCallback);
// onAnimationStart triggers onPipAnimationStart
animator.onAnimationStart(animator);
verify(mPipAnimationCallback).onPipAnimationStart(animator);
// onAnimationCancel triggers onPipAnimationCancel
animator.onAnimationCancel(animator);
verify(mPipAnimationCallback).onPipAnimationCancel(animator);
// onAnimationEnd triggers onPipAnimationEnd
animator.onAnimationEnd(animator);
verify(mPipAnimationCallback).onPipAnimationEnd(any(SurfaceControl.Transaction.class),
eq(animator));
}
/**
* A dummy {@link SurfaceControl.Transaction} class.
* This is created as {@link Mock} does not support method chaining.
*/
private static class DummySurfaceControlTx extends SurfaceControl.Transaction {
@Override
public SurfaceControl.Transaction setAlpha(SurfaceControl leash, float alpha) {
return this;
}
@Override
public SurfaceControl.Transaction setPosition(SurfaceControl leash, float x, float y) {
return this;
}
@Override
public SurfaceControl.Transaction setWindowCrop(SurfaceControl leash, int w, int h) {
return this;
}
@Override
public SurfaceControl.Transaction setCornerRadius(SurfaceControl leash, float radius) {
return this;
}
@Override
public SurfaceControl.Transaction setMatrix(SurfaceControl leash, Matrix matrix,
float[] float9) {
return this;
}
@Override
public void apply() {}
}
}
| [
"keneankit01@gmail.com"
] | keneankit01@gmail.com |
c39723ec04b5b98d691a1a201b86f53a571d740e | 563f03b2e0dec7193547a2880516303b27a602a7 | /B2M/app/src/main/java/com/example/b2m/Home.java | 7e7cb1a55c633c509ebfd9ed4542fc6e7da5e1bd | [] | no_license | myadminpanel/bring2me | cd5a944d0dbd3555c8a60af20db06876bf73d991 | 6bedbe6c9e3c0c1893ed2a749446817069905340 | refs/heads/master | 2020-06-23T11:40:22.152823 | 2019-07-09T15:26:29 | 2019-07-09T15:26:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 25,492 | java | package com.example.b2m;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;
import android.view.animation.LayoutAnimationController;
import android.widget.CheckBox;
import android.widget.TextView;
import android.widget.Toast;
import com.andremion.counterfab.CounterFab;
import com.daimajia.slider.library.Animations.DescriptionAnimation;
import com.daimajia.slider.library.SliderLayout;
import com.daimajia.slider.library.SliderTypes.BaseSliderView;
import com.daimajia.slider.library.SliderTypes.TextSliderView;
import com.example.b2m.Common.Common;
import com.example.b2m.Database.Database;
import com.example.b2m.Interface.ItemClickListener;
import com.example.b2m.Model.Banner;
import com.example.b2m.Model.Category;
import com.example.b2m.Model.Token;
import com.example.b2m.ViewHolder.MenuViewHolder;
import com.firebase.ui.database.FirebaseRecyclerAdapter;
import com.firebase.ui.database.FirebaseRecyclerOptions;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.InstanceIdResult;
import com.google.firebase.messaging.FirebaseMessaging;
import com.rengwuxian.materialedittext.MaterialEditText;
import com.squareup.picasso.Picasso;
import java.util.HashMap;
import java.util.Map;
import dmax.dialog.SpotsDialog;
import io.paperdb.Paper;
import uk.co.chrisjenx.calligraphy.CalligraphyConfig;
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper;
public class Home extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
FirebaseDatabase database;
DatabaseReference category;
TextView txtFullname;
RecyclerView recycler_menu;
FirebaseRecyclerAdapter<Category, MenuViewHolder> adapter;
SwipeRefreshLayout swipeRefreshLayout;
CounterFab fab;
//slider
HashMap<String, String> image_list;
SliderLayout mSlider;
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}
@Override
protected void onCreate(Bundle savedInstanceState) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
super.onCreate(savedInstanceState);
//para el estilo de la fuente siempre agregar antes del setContentView
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/cf.otf")
.setFontAttrId(R.attr.fontPath)
.build());
setContentView(R.layout.activity_home);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar.setTitle("Menu");
setSupportActionBar(toolbar);
//swipe layout
swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_layout);
swipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary,
android.R.color.holo_green_dark,
android.R.color.holo_orange_dark,
android.R.color.holo_blue_dark);
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
if (Common.isConnectedToInternet(getBaseContext()))
loadMenu();
else {
Toast.makeText(getBaseContext(), "Por favor, revisa tu conexión!!!", Toast.LENGTH_SHORT).show();
return;
}
}
});
//cargar sin hacer wipe por defecto
swipeRefreshLayout.post(new Runnable() {
@Override
public void run() {
if (Common.isConnectedToInternet(getBaseContext()))
loadMenu();
else {
Toast.makeText(getBaseContext(), "Por favor, revisa tu conexión!!!", Toast.LENGTH_SHORT).show();
return;
}
}
});
//Inicializar Firebase
database = FirebaseDatabase.getInstance();
category = database.getReference("Category");
//esto siempre depues del getinstance del database
FirebaseRecyclerOptions<Category> options = new FirebaseRecyclerOptions.Builder<Category>()
.setQuery(category, Category.class)
.build();
adapter = new FirebaseRecyclerAdapter<Category, MenuViewHolder>(options) {
@NonNull
@Override
public MenuViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.menu_item, parent, false);
return new MenuViewHolder(itemView);
}
@Override
protected void onBindViewHolder(@NonNull MenuViewHolder viewHolder, int position, @NonNull Category model) {
viewHolder.txtMenuName.setText(model.getName());
Picasso.with(getBaseContext()).load(model.getImage())
.into(viewHolder.imageView);
final Category clickItem = model;
viewHolder.setItemClickListener(new ItemClickListener() {
@Override
public void onClick(View view, int position, boolean isLongClick) {
//obtener el ID de categoria y enviar al activity de productos (FOODS)
Intent foodList = new Intent(Home.this, FoodList.class);
//como el id de categoria es la clave primaria solo obtenemos la clave de este elemento
foodList.putExtra("CategoryId", adapter.getRef(position).getKey());
startActivity(foodList);
Toast.makeText(Home.this, "" + clickItem.getName(), Toast.LENGTH_SHORT).show();
}
});
}
};
Paper.init(this);
fab = (CounterFab) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent cartIntent = new Intent(Home.this, Cart.class);
startActivity(cartIntent);
}
});
fab.setCount(new Database(this).getCountCart(Common.currentUser.getPhone()));
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.addDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
//Cargar nombre de usuario
View headerView = navigationView.getHeaderView(0);
txtFullname = (TextView) headerView.findViewById(R.id.txtFullName);
//txtFullname.setText(Common.currentUser.getName());
//txtFullname.setText(Common.currentUser.getName());
//Cargar menu
recycler_menu = (RecyclerView) findViewById(R.id.recycler_menu);
recycler_menu.setHasFixedSize(true);
//layoutManager = new LinearLayoutManager(this);
//recycler_menu.setLayoutManager(layoutManager);
recycler_menu.setLayoutManager(new GridLayoutManager(this, 2));
//animacion
LayoutAnimationController controller = AnimationUtils.loadLayoutAnimation(recycler_menu.getContext(),
R.anim.layout_fall_down);
recycler_menu.setLayoutAnimation(controller);
//updateToken(FirebaseInstanceId.getInstance().getToken());
FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener(this, new OnSuccessListener<InstanceIdResult>() {
@Override
public void onSuccess(InstanceIdResult instanceIdResult) {
String newToken = instanceIdResult.getToken();
Log.e("nuevotoken=>", newToken);
updateToken(newToken);
}
});
//configurar slider...hay q llamar la funcion despues de inicializar el firebase
setupSlider();
}
private void setupSlider() {
mSlider = (SliderLayout) findViewById(R.id.slider);
image_list = new HashMap<>();
final DatabaseReference banners = database.getReference("Banner");
banners.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {
Banner banner = postSnapshot.getValue(Banner.class);
//concatenamos el nombre y el id algo como PIZZA_01 el nombre para la descripcion y el id para el click
image_list.put(banner.getName() + "@@@" + banner.getId(), banner.getImage());
}
for (String key : image_list.keySet()) {
String[] keySplit = key.split("@@@");
String nameOfFood = keySplit[0];
String idOfFood = keySplit[1];
//crear el slider
final TextSliderView textSliderView = new TextSliderView(getBaseContext());
textSliderView.description(nameOfFood)
.image(image_list.get(key))
.setScaleType(BaseSliderView.ScaleType.Fit)
.setOnSliderClickListener(new BaseSliderView.OnSliderClickListener() {
@Override
public void onSliderClick(BaseSliderView slider) {
Intent intent = new Intent(Home.this, FoodDetail.class);
//enviamos el id del producto al detalle
intent.putExtras(textSliderView.getBundle());
startActivity(intent);
}
});
textSliderView.bundle(new Bundle());
textSliderView.getBundle().putString("FoodId", idOfFood);
mSlider.addSlider(textSliderView);
banners.removeEventListener(this);
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
mSlider.setPresetTransformer(SliderLayout.Transformer.Background2Foreground);
mSlider.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);
mSlider.setCustomAnimation(new DescriptionAnimation());
mSlider.setDuration(4000);
}
@Override
protected void onResume() {
super.onResume();
fab.setCount(new Database(this).getCountCart(Common.currentUser.getPhone()));
if (adapter != null)
adapter.startListening();
}
private void updateToken(String token) {
FirebaseDatabase db = FirebaseDatabase.getInstance();
DatabaseReference tokens = db.getReference("Tokens");
Token data = new Token(token, false);
tokens.child(Common.currentUser.getPhone()).setValue(data);
}
private void loadMenu() {
FirebaseRecyclerOptions<Category> options = new FirebaseRecyclerOptions.Builder<Category>()
.setQuery(category, Category.class)
.build();
adapter = new FirebaseRecyclerAdapter<Category, MenuViewHolder>(options) {
@NonNull
@Override
public MenuViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int i) {
View itemView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.menu_item, parent, false);
return new MenuViewHolder(itemView);
}
@Override
protected void onBindViewHolder(@NonNull MenuViewHolder viewholder, int position, @NonNull Category model) {
viewholder.txtMenuName.setText(model.getName());
Picasso.with(getBaseContext()).load(model.getImage()).into(viewholder.imageView);
final Category clickItem = model;
viewholder.setItemClickListener(new ItemClickListener() {
@Override
public void onClick(View view, int position, boolean isLongClick) {
Intent foodList = new Intent(Home.this, FoodList.class);
foodList.putExtra("CategoryId", adapter.getRef(position).getKey());
startActivity(foodList);
}
});
}
};
adapter.startListening();
recycler_menu.setAdapter(adapter);
swipeRefreshLayout.setRefreshing(false);
//animacion
recycler_menu.getAdapter().notifyDataSetChanged();
recycler_menu.scheduleLayoutAnimation();
}
@Override
protected void onStop() {
super.onStop();
adapter.stopListening();
mSlider.stopAutoCycle();
}
@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.home, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.menu_search)
startActivity(new Intent(Home.this, SearchActivity.class));
return super.onOptionsItemSelected(item);
}
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_menu) {
} else if (id == R.id.nav_cart) {
//vista de estado de pedidos
Intent cartIntent = new Intent(Home.this, Cart.class);
startActivity(cartIntent);
} else if (id == R.id.nav_favorites) {
startActivity(new Intent(Home.this, FavoritesActivity.class));
} else if (id == R.id.nav_orders) {
Intent orderIntent = new Intent(Home.this, OrderStatus.class);
startActivity(orderIntent);
} else if (id == R.id.nav_log_out) {
//eliminar valores de RECORDARME usuario y pass
Paper.book().destroy();
//desconectarse
Intent singIn = new Intent(Home.this, SingIn.class);
singIn.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(singIn);
} else if (id == R.id.nav_update_name) {
showupdateNameDialog();
} else if (id == R.id.nav_change_pwd) {
showChangePasswordDialog();
} else if (id == R.id.nav_home_address) {
showHomeAddressDialog();
} else if (id == R.id.nav_setting) {
showSettingDialog();
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
private void showSettingDialog() {
AlertDialog.Builder alertDialog = new AlertDialog.Builder(Home.this);
alertDialog.setTitle("Configuraciones");
LayoutInflater inflater = LayoutInflater.from(this);
View layout_setting = inflater.inflate(R.layout.setting_layout, null);
final CheckBox ckb_suscribe_news = (CheckBox) layout_setting.findViewById(R.id.ckb_sub_new);
Paper.init(this);
String isSubscribe = Paper.book().read("sub_news");
if (isSubscribe == null || TextUtils.isEmpty(isSubscribe) || isSubscribe.equals("false"))
ckb_suscribe_news.setChecked(false);
else
ckb_suscribe_news.setChecked(true);
alertDialog.setView(layout_setting);
alertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int which) {
dialogInterface.dismiss();
if (ckb_suscribe_news.isChecked()) {
FirebaseMessaging.getInstance().subscribeToTopic(Common.TOPICNAME);
//Write Value
Paper.book().write("sub_news", "true");
} else {
FirebaseMessaging.getInstance().unsubscribeFromTopic(Common.TOPICNAME);
//Write Value
Paper.book().write("sub_news", "false");
}
}
});
alertDialog.show();
}
private void showChangePasswordDialog() {
AlertDialog.Builder alertDialog = new AlertDialog.Builder(Home.this);
alertDialog.setTitle("Modificar Password");
alertDialog.setMessage("Por favor, completa toda la información");
LayoutInflater inflater = LayoutInflater.from(this);
View layout_pwd = inflater.inflate(R.layout.change_password_layout, null);
final MaterialEditText edtPassword = (MaterialEditText) layout_pwd.findViewById(R.id.edtPassword);
final MaterialEditText edtNewPassword = (MaterialEditText) layout_pwd.findViewById(R.id.edtNewPassword);
final MaterialEditText edtRepeatPassword = (MaterialEditText) layout_pwd.findViewById(R.id.edtRepeatPassword);
alertDialog.setView(layout_pwd);
//boton
alertDialog.setPositiveButton("Modificar", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//cambiar la contrase;a
//android.app.AlertDialog waitingDialog=new SpotsDialog(Home.this);
final android.app.AlertDialog waitingDialog = new SpotsDialog.Builder().setContext(Home.this).build();
waitingDialog.show();
//revisar viejo password
if (edtPassword.getText().toString().equals(Common.currentUser.getPassword())) {
//comparar nueva contrase;a y la repetida
if (edtNewPassword.getText().toString().equals(edtRepeatPassword.getText().toString())) {
Map<String, Object> passwordUpdate = new HashMap<>();
passwordUpdate.put("Password", edtNewPassword.getText().toString());
//actualizar
DatabaseReference user = FirebaseDatabase.getInstance().getReference("Users");
user.child(Common.currentUser.getPhone())
.updateChildren(passwordUpdate)
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
waitingDialog.dismiss();
Toast.makeText(Home.this, "Password actualizada!", Toast.LENGTH_SHORT).show();
}
})
.addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(Home.this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
});
} else {
waitingDialog.dismiss();
Toast.makeText(Home.this, "El nuevo password no coincide", Toast.LENGTH_SHORT).show();
}
} else {
waitingDialog.dismiss();
Toast.makeText(Home.this, "Contraseña antigua equivocada", Toast.LENGTH_SHORT).show();
}
}
});
alertDialog.setNegativeButton("Cancelar", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
alertDialog.show();
}
private void showHomeAddressDialog() {
AlertDialog.Builder alertDialog = new AlertDialog.Builder(Home.this);
alertDialog.setTitle("Cambiar dirección de casa");
alertDialog.setMessage("Por favor, completa la información");
LayoutInflater inflater = LayoutInflater.from(this);
View layout_home = inflater.inflate(R.layout.home_address_layout, null);
final MaterialEditText etHomeAddress = (MaterialEditText) layout_home.findViewById(R.id.etHomeAddress);
alertDialog.setView(layout_home);
alertDialog.setPositiveButton("Actualizar", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int which) {
dialogInterface.dismiss();
Common.currentUser.setHomeAddress(etHomeAddress.getText().toString());
FirebaseDatabase.getInstance().getReference("Users")
.child(Common.currentUser.getPhone())
.setValue(Common.currentUser)
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
Toast.makeText(Home.this, "Dirección actualizada", Toast.LENGTH_SHORT).show();
}
});
}
});
alertDialog.show();
}
private void showupdateNameDialog() {
AlertDialog.Builder alertDialog = new AlertDialog.Builder(Home.this);
alertDialog.setTitle("Cambiar nombre");
alertDialog.setMessage("Por favor, completa la información");
LayoutInflater inflater = LayoutInflater.from(this);
View layout_name = inflater.inflate(R.layout.update_name_layout, null);
final MaterialEditText edtName = (MaterialEditText) layout_name.findViewById(R.id.edtName);
alertDialog.setView(layout_name);
//boton
alertDialog.setPositiveButton("Cambiar", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int i) {
//cambiar contrasenia
final android.app.AlertDialog waitingDialog = new SpotsDialog.Builder().setContext(Home.this).build();
waitingDialog.show();
//cambiar nombre
Map<String, Object> update_name = new HashMap<>();
update_name.put("name", edtName.getText().toString());
FirebaseDatabase.getInstance()
.getReference("Users")
.child(Common.currentUser.getPhone())
.updateChildren(update_name)
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
waitingDialog.dismiss();
if (task.isSuccessful())
Toast.makeText(Home.this, "Nombre cambiado", Toast.LENGTH_SHORT).show();
}
});
}
});
alertDialog.setNegativeButton("Cancelar", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
alertDialog.show();
}
} | [
"difehp_b_@hotmail.com"
] | difehp_b_@hotmail.com |
9fd00a3ca3850a638b4e6e0df860df9a33c28ccd | b13707f1d40c4a61151fa58e240fa00afaf4965e | /Dp/Baekjoon_1149.java | 0fd7774d6442b48ae0cb9e70b62ca5c34533d538 | [] | no_license | JeongWooChang/Baekjoon_solution | c8023210a2c10569d40d2e7a30a2983010266be1 | 3634c10f5dec7167e6097e6ca2b0ebd5387dc4b4 | refs/heads/main | 2023-03-11T23:35:02.761647 | 2021-03-05T02:24:21 | 2021-03-05T02:24:21 | 325,313,164 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 926 | java | package sw;
import java.util.*;
import java.io.*;
public class Baekjoon_1149 {
public static void main(String[] args) throws IOException {//RGB거리
//BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int[][] arr = new int[n+1][3];
int[][] arr2 = new int[n+1][3];
for(int i = 1 ; i <= n ; i++) {
arr[i][0] = s.nextInt();
arr[i][1] = s.nextInt();
arr[i][2] = s.nextInt();
}
for(int i = 1 ; i <= n ; i++) {
arr2[i][0] = Math.min(arr2[i-1][1], arr2[i-1][2]) + arr[i][0];
arr2[i][1] = Math.min(arr2[i-1][0], arr2[i-1][2]) + arr[i][1];
arr2[i][2] = Math.min(arr2[i-1][1], arr2[i-1][0]) + arr[i][2];
}
System.out.println(Math.min(arr2[n][2], Math.min(arr2[n][0], arr2[n][1])));
//br.close();,
//bw.close();
}
}
| [
"dnckd6678@ajou.ac.kr"
] | dnckd6678@ajou.ac.kr |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.