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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c3eb66229ba773487565f10f98d36f7d13e29301 | 74fbe90bee804d43f0e26396ec410a57876256b3 | /app/src/main/java/com/example/user/bike_shop/AddOrUpdate.java | e4c4b6eab709e7662f2c0415c148a4b1784a1528 | []
| no_license | helioPacavira/Bike_Shop_App | 754c8b6e1e0adb0d0bd7c1bd4012a55f21b7795c | e44ba08693f0e0fba24955f917dfab18bf4261dc | refs/heads/master | 2020-03-06T20:31:07.423763 | 2018-03-23T20:56:31 | 2018-03-23T20:56:31 | 127,054,946 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,780 | java | package com.example.user.bike_shop;
import android.content.ContentValues;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import java.util.ArrayList;
import java.util.List;
/**
* Created by user on 14/07/2017.
*/
public class AddOrUpdate extends AppCompatActivity {
private SQLiteDatabase db;
DatabaseHelper dataB;
private Cursor cursor;
TextView address, telephone, store_name, servicesOffered;
ArrayList allDataToText;
String storeSelected;
ContentValues values;
Spinner sp;
String addOrUpDate;
String store_ID;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.update_activity);
SQLiteOpenHelper bandDatabaseHelper = new DatabaseHelper(this);
db = bandDatabaseHelper.getReadableDatabase();
dataB = new DatabaseHelper(this);
Intent intent = getIntent();
Bundle bd = intent.getExtras();
// retrieve the data using updateStore
addOrUpDate = (String) bd.get("updateStore");
TextView title = (TextView) findViewById(R.id.title);
//declare the spinner
sp = (Spinner) findViewById(R.id.spinner);
/**
* if data received from the other activity is equals to "add"
* the textView title is set to "ADD NEW STORE"
* and the spinner is desabled
*/
if (addOrUpDate.equals("add")) {
title.setText("ADD NEW STORE");
sp.removeViewInLayout(sp);
sp.setEnabled(false);
} else {
title.setText("UPDATE STORE");
addDataToSpinner();
}
declareView();
buttons();
}
private void declareView() {
store_name = (TextView) findViewById(R.id.store_name);
telephone = (TextView) findViewById(R.id.telephone);
address = (TextView) findViewById(R.id.store_address);
servicesOffered = (TextView) findViewById(R.id.servicesOffered);
}
private void addDataToSpinner() {
/**
* in this method, data is added to the spinner using a cursor and a arrayList that will contain the names of the all store in the database
*/
cursor = db.query("STORES",
new String[]{"Store_name"},
null, null, null, null, null);
List<String> list = new ArrayList<String>();
list.add("Select store...");
while (cursor.moveToNext()) {
list.add(cursor.getString(0));
}
ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, list);
dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
sp.setAdapter(dataAdapter);
/**
* when an item in the spinner is clicked,
* the storeSelected variavel store it value
*
*/
sp.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {
//get the value of the item that was clicked in the spinner
storeSelected = String.valueOf(sp.getItemAtPosition(position));
setFields();
Toast.makeText(AddOrUpdate.this, storeSelected,
Toast.LENGTH_SHORT).show();
}
@Override
public void onNothingSelected(AdapterView<?> parentView) {
// your code here
}
});
}
private void setFields() {
//cursor that contain the data relative to the store clicked in the spinner
//this cursor will be used to set the texts in the textViews
Cursor cursor = dataB.selectAllData(storeSelected);
while (cursor.moveToNext()) {
store_name.setText(cursor.getString(1));
telephone.setText(cursor.getString(2));
address.setText(cursor.getString(3));
servicesOffered.setText(cursor.getString(4));
store_ID = cursor.getString(0);
}
}
public void buttons() {
Button addStore = (Button) findViewById(R.id.submit);
addStore.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
saveStore();
}
});
}
public void saveStore() {
/**
*if the user clicked in the main activity to add a new store,
* when clicked the save button
* the data in the the textView, will be used to create a new store , by adding those details o the database
* else a store is updated
*/
if (addOrUpDate.equals("add")) {
dataB.insertStore(db, store_name.getText().toString(), telephone.getText().toString(), address.getText().toString(),
servicesOffered.getText().toString());
} else {
dataB.updateStore(store_ID, store_name.getText().toString(), telephone.getText().toString(), address.getText().toString(),
servicesOffered.getText().toString());
}
Toast.makeText(AddOrUpdate.this, "SAVED",
Toast.LENGTH_SHORT).show();
}
}
| [
"[email protected]"
]
| |
cf8cc32fd3fa3cf104cbf97df40ff43f7aee1cd7 | 7f20b1bddf9f48108a43a9922433b141fac66a6d | /cytoscape/tags/public-0_9/src/cytoscape/filters/NegFilter.java | 482491b5be2c5739c0cc1a434bc7a1290d33c474 | []
| no_license | ahdahddl/cytoscape | bf783d44cddda313a5b3563ea746b07f38173022 | a3df8f63dba4ec49942027c91ecac6efa920c195 | refs/heads/master | 2020-06-26T16:48:19.791722 | 2013-08-28T04:08:31 | 2013-08-28T04:08:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,057 | java | package cytoscape.filters;
import y.base.*;
import y.view.*;
import cytoscape.undo.UndoableGraphHider;
import cytoscape.data.*;
/**
* Filter which flags all nodes not flagged by a given filter.
*
* @author [email protected]
* @version 2002-03-02
*/
public class NegFilter extends Filter {
Filter posF;
public NegFilter(Graph2D graph, Filter posF) {
super(graph);
this.posF = posF;
}
public NegFilter(Graph2D graph,
Filter flaggableF,
Filter posF) {
super(graph, flaggableF);
this.posF = posF;
}
public NodeList get(NodeList hidden) {
NodeList flagged = new NodeList();
NodeList pos = posF.get(hidden);
NodeList flaggable = getFlaggableF().get(hidden);
for (NodeCursor nc = graph.nodes(); nc.ok(); nc.next()) {
Node node = nc.node();
// Don't include nodes
// flagged by the positive filter
// and the hidden list
if (!pos.contains(node) && !hidden.contains(node)
&& (allFlaggable() || flaggable.contains(node))) {
flagged.add(node);
}
}
return flagged;
}
}
| [
"(no author)@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
]
| (no author)@0ecc0d97-ab19-0410-9704-bfe1a75892f5 |
84229f9dba580f7ddcad9ffaf15d9c509e8ef216 | 81c88d65e61777b2b0d9d72fa1696ee6b372a391 | /Consola/src/com/opencanarias/consola/portafirmas/CatalogoFirmantesPersonas/CatalogoFirmantePersonaDAO.java | 7b106e8e3c36f7eff9eec38d417adb8ccfe09b82 | []
| no_license | tomasda/PLAE | 44da795deb4d0603283756b68e17ec4306d5c15e | 5891358d5b338bf0a714cb31d22002f18ddcad9c | refs/heads/master | 2020-05-01T23:53:31.811416 | 2020-03-25T14:01:34 | 2020-03-25T14:01:34 | 177,657,546 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 9,037 | java | /**
*
*/
package com.opencanarias.consola.portafirmas.CatalogoFirmantesPersonas;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.jboss.logging.Logger;
import com.opencanarias.consola.ldap.LDAPManager;
import com.opencanarias.consola.ldap.LDAPPersonaBean;
import com.opencanarias.consola.portafirmas.CatalogoFirmantes.FirmanteBean;
import com.opencanarias.consola.utilidades.DataBaseUtils;
/**
* @author Tomรกs Delgado
*
*/
public class CatalogoFirmantePersonaDAO {
private static Logger logger = Logger.getLogger(CatalogoFirmantePersonaDAO.class);
//***********************************************
//******* Listado de Usuarios / Firmantes *******
//***********************************************
public List<FirmanteBean> getPersonas(List<FirmanteBean> listOfFirmantes) {
LDAPManager ldap = new LDAPManager();
List<FirmantePorPersonaBean> listFPP = null;
FirmantePorPersonaBean fpp=null;
LDAPPersonaBean p = null;
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
String sql = "";
try {
con = DataBaseUtils.getConnection("OC3F");
sql = "SELECT * FROM pf_firmante_por_persona WHERE ID_PERSONA = ?";
ps = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
for (FirmanteBean firmanteBean : listOfFirmantes) {
listFPP = new ArrayList<FirmantePorPersonaBean>();
ps.setInt(1, firmanteBean.getIdFirmante());
rs = ps.executeQuery();
rs.beforeFirst();
while (rs.next()) {
fpp = new FirmantePorPersonaBean();
p = new LDAPPersonaBean();
p.setCarLicense(rs.getString("DNI_SOLICITANTE"));
/*
* Llamada al LDAP para obtener los datos de la Persona
*/
try {
p = ldap.findLDAPUser(p.getCarLicense());
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
fpp.setPersona(p);
listFPP.add(fpp);
}
if (!listFPP.isEmpty()) {
// Collections.emptyList();
// Collections.sort(listFPP, new Comparator<FirmantePorPersonaBean>() {
// @Override
// public int compare (FirmantePorPersonaBean a, FirmantePorPersonaBean b) {
// return a.getPersona().getName().toUpperCase().compareTo(b.getPersona().getName().toUpperCase());
// }
// });
// firmanteBean.setListOfPersons(listFPP);
}
firmanteBean.setListOfPersons(listFPP);
}
} catch (SQLException e) {
logger.error(e);
}finally {
DataBaseUtils.close(con);
}
return listOfFirmantes;
}
public List<FirmanteBean> getTodosLosFirmantes(List<FirmanteBean> listOfFirmantes) {
FirmanteBean todos = new FirmanteBean();
todos.setNombre("TODOS LOS FIRMANTES");
LDAPManager ldap = new LDAPManager();
List<FirmantePorPersonaBean> listFPP = null;
FirmantePorPersonaBean fpp=null;
LDAPPersonaBean p = null;
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
String sql = "";
try {
con = DataBaseUtils.getConnection("OC3F");
sql = "SELECT * FROM PF_FIRMANTE_POR_PERSONA WHERE ID_PERSONA IS NULL";
ps = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
listFPP = new ArrayList<FirmantePorPersonaBean>();
rs = ps.executeQuery();
rs.beforeFirst();
while (rs.next()) {
fpp = new FirmantePorPersonaBean();
p = new LDAPPersonaBean();
p.setCarLicense(rs.getString("DNI_SOLICITANTE"));
try {
p = ldap.findLDAPUser(p.getCarLicense());
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
fpp.setPersona(p);
listFPP.add(fpp);
}
if (!listFPP.isEmpty()) {
todos.setListOfPersons(listFPP);
}
listOfFirmantes.add(todos);
} catch (SQLException e) {
logger.error(e);
}finally {
DataBaseUtils.close(con);
}
return listOfFirmantes;
}
public boolean addFirmantePersonaRelation(String idFirmante, String carLicense) {
boolean result = false;
Connection con = null;
PreparedStatement ps = null;
String sql = "";
try {
con = DataBaseUtils.getConnection("OC3F");
sql = "INSERT INTO PF_FIRMANTE_POR_PERSONA VALUES (SEQ_PF_FIRMANTE_POR_PERSONA.NEXTVAL,?,?)";
ps = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
ps.setString(1, idFirmante);
ps.setString(2, carLicense);
ps.executeQuery();
} catch (SQLException e) {
logger.error(e);
}finally {
DataBaseUtils.close(con);
}
return result;
}
public boolean deleteFirmantePersonaRelation(String idFirmante, String carLicense) {
boolean result = false;
Connection con = null;
PreparedStatement ps = null;
String sql = "";
try {
con = DataBaseUtils.getConnection("OC3F");
/**
* Cรณmo en la tabla se gestionan los permisos para todos los firmantes dejando el ID_PERSONA a null
* y el idFirmantes viene a 0 cuando se cumple este caso, se aplica esta condiciรณn.
*/
if (!idFirmante.equals("0")) {
sql = "DELETE FROM PF_FIRMANTE_POR_PERSONA WHERE ID_PERSONA = ? AND DNI_SOLICITANTE = ?";
ps = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
ps.setInt(1, Integer.valueOf(idFirmante));
ps.setString(2, carLicense);
}else {
sql = "DELETE FROM PF_FIRMANTE_POR_PERSONA WHERE ID_PERSONA is null AND DNI_SOLICITANTE = ?";
ps = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
ps.setString(1, carLicense);
}
ps.executeQuery();
result = true;
} catch (SQLException e) {
logger.error(e);
}finally {
DataBaseUtils.close(con);
}
return result;
}
public boolean isFirmantePersonaInTable(String carLicense, int mode) {
/**
* MODE = 0
* Todos los usuarios que pueden enviar a todos los firmantes.
* MODE = 1
* Usuario que estรก en la tabla como envรญo a firmante por separado.
*/
boolean result = false;
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
String sql = "";
try {
con = DataBaseUtils.getConnection("OC3F");
if(mode==0) {
sql = "SELECT * FROM PF_FIRMANTE_POR_PERSONA WHERE ID_PERSONA IS NULL AND DNI_SOLICITANTE = ?";
}else {
sql = "SELECT * FROM PF_FIRMANTE_POR_PERSONA WHERE ID_PERSONA IS NOT NULL AND DNI_SOLICITANTE = ?";
}
ps = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
ps.setString(1, carLicense);
rs = ps.executeQuery();
rs.beforeFirst();
while (rs.next()) {
result = true;
}
} catch (SQLException e) {
logger.error(e);
}finally {
DataBaseUtils.close(con);
}
return result;
}
public List<FirmantePorPersonaBean> getFirmantesPersonaListOfPersonas(FirmanteBean firmante) {
String param = null;
LDAPManager ldap = new LDAPManager();
List<FirmantePorPersonaBean> listFPP = null;
FirmantePorPersonaBean fpp=null;
LDAPPersonaBean p = null;
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
String sql = "";
try {
con = DataBaseUtils.getConnection("OC3F");
/*
* Sรญ el firmante ID = 0 significa que son todos los firmantes
* y que el id_persona = null.
*/
if (firmante.getIdFirmante()==0) {
sql = "SELECT * FROM PF_FIRMANTE_POR_PERSONA WHERE ID_PERSONA IS NULL";
ps = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
}else {
param = String.valueOf(firmante.getIdFirmante());
sql = "SELECT * FROM PF_FIRMANTE_POR_PERSONA WHERE ID_PERSONA = ?";
ps = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
ps.setString(1,param);
}
listFPP = new ArrayList<FirmantePorPersonaBean>();
rs = ps.executeQuery();
rs.beforeFirst();
while (rs.next()) {
fpp = new FirmantePorPersonaBean();
p = new LDAPPersonaBean();
p.setCarLicense(rs.getString("DNI_SOLICITANTE"));
try {
p = ldap.findLDAPUser(p.getCarLicense());
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
fpp.setPersona(p);
listFPP.add(fpp);
}
} catch (SQLException e) {
logger.error(e);
}finally {
DataBaseUtils.close(con);
}
return listFPP;
}
}
| [
"[email protected]"
]
| |
0843f75721319b6ca5bb57293a25e3ff981c1e06 | 7720dcd20e0678591ad5752cbc42b62b6478506b | /app/src/main/java/com/example/thelastlaugh/blooddonation/GPSTracker.java | 78bfe10d18bb81b110073e230f99747dd914e6b6 | []
| no_license | Ymograi/blooddonation | 78087cae851ecca58fa76dfefde715a1c8942db7 | 672539d77a1552c7ad5fe3ca56f6a8b65a4e34ae | refs/heads/master | 2016-08-12T09:23:11.030998 | 2016-04-17T19:37:41 | 2016-04-17T19:37:41 | 55,638,508 | 1 | 3 | null | 2016-04-15T18:03:21 | 2016-04-06T20:32:14 | PHP | UTF-8 | Java | false | false | 6,263 | java | package com.example.thelastlaugh.blooddonation;
import android.app.AlertDialog;
import android.app.Service;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.os.IBinder;
import android.provider.Settings;
import android.util.Log;
public class GPSTracker extends Service implements LocationListener {
private final Context mContext;
// flag for GPS status
boolean isGPSEnabled = false;
// flag for network status
boolean isNetworkEnabled = false;
// flag for GPS status
boolean canGetLocation = false;
Location location; // location
double latitude; // latitude
double longitude; // longitude
// The minimum distance to change Updates in meters
private static final long MIN_DISTANCE_CHANGE_FOR_UPDATES = 10; // 10 meters
// The minimum time between updates in milliseconds
private static final long MIN_TIME_BW_UPDATES = 1000 * 60 * 1; // 1 minute
// Declaring a Location Manager
protected LocationManager locationManager;
public GPSTracker(Context context) {
this.mContext = context;
getLocation();
}
public Location getLocation() {
try {
locationManager = (LocationManager) mContext
.getSystemService(LOCATION_SERVICE);
// getting GPS status
isGPSEnabled = locationManager
.isProviderEnabled(LocationManager.GPS_PROVIDER);
// getting network status
isNetworkEnabled = locationManager
.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
if (!isGPSEnabled && !isNetworkEnabled) {
// no network provider is enabled
} else {
this.canGetLocation = true;
// First get location from Network Provider
if (isNetworkEnabled) {
locationManager.requestLocationUpdates(
LocationManager.NETWORK_PROVIDER,
MIN_TIME_BW_UPDATES,
MIN_DISTANCE_CHANGE_FOR_UPDATES, this);
Log.d("Network", "Network");
if (locationManager != null) {
location = locationManager
.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
if (location != null) {
latitude = location.getLatitude();
longitude = location.getLongitude();
}
}
}
// if GPS Enabled get lat/long using GPS Services
if (isGPSEnabled) {
if (location == null) {
locationManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER,
MIN_TIME_BW_UPDATES,
MIN_DISTANCE_CHANGE_FOR_UPDATES, this);
Log.d("GPS Enabled", "GPS Enabled");
if (locationManager != null) {
location = locationManager
.getLastKnownLocation(LocationManager.GPS_PROVIDER);
if (location != null) {
latitude = location.getLatitude();
longitude = location.getLongitude();
}
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return location;
}
/**
* Stop using GPS listener
* Calling this function will stop using GPS in your app
* */
public void stopUsingGPS(){
if(locationManager != null){
locationManager.removeUpdates(GPSTracker.this);
}
}
/**
* Function to get latitude
* */
public double getLatitude(){
if(location != null){
latitude = location.getLatitude();
}
// return latitude
return latitude;
}
/**
* Function to get longitude
* */
public double getLongitude(){
if(location != null){
longitude = location.getLongitude();
}
// return longitude
return longitude;
}
/**
* Function to check GPS/wifi enabled
* @return boolean
* */
public boolean canGetLocation() {
return this.canGetLocation;
}
/**
* Function to show settings alert dialog
* On pressing Settings button will lauch Settings Options
* */
public void showSettingsAlert(){
AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext);
// Setting Dialog Title
alertDialog.setTitle("GPS is settings");
// Setting Dialog Message
alertDialog.setMessage("GPS is not enabled. Do you want to go to settings menu?");
// On pressing Settings button
alertDialog.setPositiveButton("Settings", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int which) {
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
mContext.startActivity(intent);
}
});
// on pressing cancel button
alertDialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
}
});
// Showing Alert Message
alertDialog.show();
}
@Override
public void onLocationChanged(Location location) {
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
@Override
public IBinder onBind(Intent arg0) {
return null;
}
}
| [
"[email protected]"
]
| |
eeeb1c704feb321c79ea4480e1785840374fc238 | eb2c22492d4740a3eb455f2a898f6b3bc8235809 | /jnnsBank/pbc-service/src/main/java/com/ideatech/ams/pbc/spi/sync/AmsYibanSuspendSynchronizer.java | 5a5fff21ff058eb02d91203375944a66872668a3 | []
| no_license | deepexpert-gaohz/sa-d | 72a2d0cbfe95252d2a62f6247e7732c883049459 | 2d14275071b3d562447d24bd44d3a53f5a96fb71 | refs/heads/master | 2023-03-10T08:39:15.544657 | 2021-02-24T02:17:58 | 2021-02-24T02:17:58 | 341,395,351 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 655 | java | package com.ideatech.ams.pbc.spi.sync;
import com.ideatech.ams.pbc.dto.AllAcct;
import com.ideatech.ams.pbc.dto.auth.LoginAuth;
import com.ideatech.ams.pbc.enums.SyncSystem;
import com.ideatech.ams.pbc.exception.SyncException;
import org.springframework.stereotype.Component;
/**
* ไบบ่ก่ดฆ็ฎก็ณป็ปไธ่ฌๆทไน
ๆฌๆฅๅฃ,็จๆฅๆฅๅคไบบ่ก่ดฆ็ฎก็ณป็ป
*
* @author zoulang
*
*/
@Component
public class AmsYibanSuspendSynchronizer extends AbstractSynchronizer {
@Override
protected void doSynchron(SyncSystem syncSystem, LoginAuth auth, AllAcct allAcct) throws SyncException, Exception {
super.doSuspendReportTypeAcct(auth, allAcct);
}
}
| [
"[email protected]"
]
| |
ba6239ac9870ab34085b16e08f3f70370a27a7fb | 41c1c1519c599e3b2714d17dad6d055bc07dccb8 | /src/com/VB2020/Singleton/BankAccountLogger.java | 37e8a1302db4912b19c47fd30b8293c09297cd0e | []
| no_license | VB2020/JavaTemplates | 3f3b7ee8d828c65381f6b95d0b60fe040ec98de1 | 23a3c0db7731cd6b4477bdf7fcea673832b0ec3a | refs/heads/master | 2023-03-15T04:17:44.108101 | 2021-03-07T17:17:57 | 2021-03-07T17:17:57 | 345,406,970 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 569 | java | package com.VB2020.Singleton;
public class BankAccountLogger {
private static BankAccountLogger logger;
private static String log = "This is account log...\n\n";
public static synchronized BankAccountLogger getAccountLogger()
{
if (logger == null)
{
logger = new BankAccountLogger();
}
return logger;
}
private BankAccountLogger(){}
public void addLogInfo(String logInfo)
{
log += logInfo + "\n";
}
public void showLogInfo()
{
System.out.println(log);
}
}
| [
"[email protected]"
]
| |
a89d67eea1c3ba3311579e7f573170245be96d84 | 3c3dda36c788a948cc8abacf7b4d9a17c31ddf5c | /app/src/main/java/com/thangha/pe01_thanghase130566/MainActivity.java | 1d4aa3246283cff83d5ebd2a26c45e85b5ad0760 | []
| no_license | thanghoangbmt/PE01_PRM | 6f121a2d0b18536d7b23bc00dd3878ec8e60783e | 5f04242530e9bf5bbb5ecd22921156d14a1286ff | refs/heads/master | 2023-01-08T10:26:29.561065 | 2020-11-09T04:53:40 | 2020-11-09T04:53:40 | 311,226,800 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 557 | java | package com.thangha.pe01_thanghase130566;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void clickToOpenProvider(View view) {
Intent intent = new Intent(this, OwnContentActivity.class);
startActivity(intent);
}
} | [
"="
]
| = |
08a2da4b224f195b2cc0bd4bc60c8fa245d6f651 | d8fa1714ce7f3dfd2932c4912f4b80f766bc1212 | /mokn-istio-api/src/main/java/com/mokn/istio/api/model/k8s/destinationrule/DestinationRule_Spec_TrafficPolicy_ConnectionPoll.java | 1d50aceab9cd2df22c35d466a8cfdd04b5e3baec | []
| no_license | dw-fans/mokn-istio | a60bc54867a978c2243c68f50aac24df9ac09f85 | 0b0c16e8484d2e3f54f4b205100f418c2ec9a5c1 | refs/heads/master | 2020-07-07T09:12:22.183124 | 2019-08-20T03:46:17 | 2019-08-20T03:46:17 | 203,312,786 | 1 | 0 | null | 2019-08-20T06:23:20 | 2019-08-20T06:23:20 | null | UTF-8 | Java | false | false | 710 | java | package com.mokn.istio.api.model.k8s.destinationrule;
public class DestinationRule_Spec_TrafficPolicy_ConnectionPoll {
private DestinationRule_Spec_TrafficPolicy_ConnectionPoll_Http http;
private DestinationRule_Spec_TrafficPolicy_ConnectionPoll_Tcp tcp;
public DestinationRule_Spec_TrafficPolicy_ConnectionPoll_Http getHttp() {
return http;
}
public void setHttp(DestinationRule_Spec_TrafficPolicy_ConnectionPoll_Http http) {
this.http = http;
}
public DestinationRule_Spec_TrafficPolicy_ConnectionPoll_Tcp getTcp() {
return tcp;
}
public void setTcp(DestinationRule_Spec_TrafficPolicy_ConnectionPoll_Tcp tcp) {
this.tcp = tcp;
}
}
| [
"[email protected]"
]
| |
cfb58de490cdfca825a2934a0b22923eb1c11663 | 1cca1c5f06121146a3e9a1c94a51477b4700107d | /src/main/java/com/zk/springboot/service/ILolService.java | ce54a44768110a2b95a65d87273655fa26e7f5b6 | []
| no_license | zhankuigithub/spring-boot-mybatis | 734548fdf43c14f7bf2fd3823d270f3f3d182d70 | bbd5d1c5a46435e87829382de3ca7b983a7fd9ab | refs/heads/master | 2023-02-04T16:53:22.830289 | 2020-12-22T01:25:20 | 2020-12-22T01:25:20 | 315,812,864 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 163 | java | package com.zk.springboot.service;
import com.zk.springboot.db.lol.bean.Equip;
import java.util.List;
public interface ILolService {
List<Equip> list();
}
| [
"[email protected]"
]
| |
3c346d6d30d9bf0ef7711998aef66b0a0c0ed5bf | e0a46a25bdfe332cd162e80b9a256e4e930b8f8e | /hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-api/src/main/java/org/hswebframework/web/entity/form/SimpleDynamicFormDeployLogEntity.java | 6f8d679981700b9758ac9c357bb7f24567a22972 | [
"Apache-2.0"
]
| permissive | saminfante/hsweb-framework | baa93ec7d5eec78f3f224adba8820e190e38c641 | 9075e75bdc8b3e6215dce27de3dc0cbf37deec8c | refs/heads/master | 2023-04-06T09:26:59.788489 | 2019-11-06T02:40:12 | 2019-11-06T02:40:12 | 182,584,976 | 1 | 0 | Apache-2.0 | 2023-04-04T00:57:36 | 2019-04-21T21:39:23 | Java | UTF-8 | Java | false | false | 1,835 | java | package org.hswebframework.web.entity.form;
import org.hswebframework.web.commons.entity.SimpleGenericEntity;
/**
* ่กจๅๅๅธๆฅๅฟ
*
* @author hsweb-generator-online
*/
public class SimpleDynamicFormDeployLogEntity extends SimpleGenericEntity<String> implements DynamicFormDeployLogEntity {
//่กจๅID
private String formId;
//ๅๅธ็็ๆฌ
private Long version;
//ๅๅธๆถ้ด
private Long deployTime;
//้จ็ฝฒ็ๅ
ๆฐๆฎ
private String metaData;
//้จ็ฝฒ็ถๆ
private Byte status;
/**
* @return ่กจๅID
*/
@Override
public String getFormId() {
return this.formId;
}
/**
* @param formId ่กจๅID
*/
@Override
public void setFormId(String formId) {
this.formId = formId;
}
/**
* @return ๅๅธ็็ๆฌ
*/
@Override
public Long getVersion() {
return this.version;
}
/**
* @param version ๅๅธ็็ๆฌ
*/
@Override
public void setVersion(Long version) {
this.version = version;
}
/**
* @return ๅๅธๆถ้ด
*/
@Override
public Long getDeployTime() {
return this.deployTime;
}
/**
* @param deployTime ๅๅธๆถ้ด
*/
@Override
public void setDeployTime(Long deployTime) {
this.deployTime = deployTime;
}
/**
* @return ้จ็ฝฒ็ๅ
ๆฐๆฎ
*/
@Override
public String getMetaData() {
return this.metaData;
}
/**
* @param metaData ้จ็ฝฒ็ๅ
ๆฐๆฎ
*/
@Override
public void setMetaData(String metaData) {
this.metaData = metaData;
}
@Override
public Byte getStatus() {
return status;
}
@Override
public void setStatus(Byte status) {
this.status = status;
}
} | [
"[email protected]"
]
| |
8171db0db3e706e20ab8cbe351445d561cc3ee08 | 9d13658366e283221ad49438019e3bc8f8e36d3f | /src/main/java/net/doret/application/web/rest/LogsResource.java | 9b17e6a7ceb84cece1cd7ceccbcf741952216e7e | []
| no_license | gcadoret/microservice-test-application | e1ef6458fecebd7023620840f263dc3148ee97dc | 1e6f90fc87f8f1f9ca1b8d98b73a30e51af051f7 | refs/heads/master | 2020-03-29T20:37:40.485519 | 2018-09-25T19:59:53 | 2018-09-25T19:59:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,180 | java | package net.doret.application.web.rest;
import net.doret.application.web.rest.vm.LoggerVM;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.LoggerContext;
import com.codahale.metrics.annotation.Timed;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.stream.Collectors;
/**
* Controller for view and managing Log Level at runtime.
*/
@RestController
@RequestMapping("/management")
public class LogsResource {
@GetMapping("/logs")
@Timed
public List<LoggerVM> getList() {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
return context.getLoggerList()
.stream()
.map(LoggerVM::new)
.collect(Collectors.toList());
}
@PutMapping("/logs")
@ResponseStatus(HttpStatus.NO_CONTENT)
@Timed
public void changeLevel(@RequestBody LoggerVM jsonLogger) {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
context.getLogger(jsonLogger.getName()).setLevel(Level.valueOf(jsonLogger.getLevel()));
}
}
| [
"[email protected]"
]
| |
a18c1388d951f2dfd9c7e3abaeedfc19872b7464 | 9fd2d6acbb8313817f56717063c6ece3cef98f2c | /com/google/android/gms/internal/q.java | a63d854c9c9a400ec1ed75198424b04f74341950 | []
| no_license | mathysaru/realestate | 2d977f1a400ec8b30bc24c3f2f49f105ef61fafd | 6bc640ff4774c690407bc37121886628be822458 | refs/heads/master | 2023-07-26T17:06:18.588404 | 2021-09-04T15:24:57 | 2021-09-04T15:24:57 | 403,090,679 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 304 | java | package com.google.android.gms.internal;
public abstract interface q
{
public abstract void y();
}
/* Location: C:\Users\shivane\Decompilation\dex2jar-2.0\classes-dex2jar.jar!\com\google\android\gms\internal\q.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"[email protected]"
]
| |
7171d4fac89f6ba8c6774d7a0b5479abc6065805 | f2e9e0aac9e38ab096097fe7711d2ea33930e63e | /src/test/java/com/meko/study/starter/Launcher/MainLauncher.java | 57d851954b274f683e074eefeb80839ec61bfa56 | []
| no_license | meko95/Vert.x-study | 169b8764f276068ada47cca8b3edb6105414ad30 | 182121443f1a157a7ffcbe5648a705a3c8ba0146 | refs/heads/main | 2023-07-11T21:43:38.796903 | 2021-08-08T16:51:01 | 2021-08-08T16:51:01 | 380,108,981 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,129 | java | package com.meko.study.starter.Launcher;
import com.meko.study.starter.entity.UserInfo;
import io.vertx.core.Context;
import io.vertx.core.json.JsonArray;
public class MainLauncher {
public static void main(String[] args) {
final boolean isClustered = false;
JsonArray objects = new JsonArray();
objects.add(new UserInfo());
final Launcher launcher = isClustered ? new ClusterLauncher() :
new SingleLauncher();
System.out.println(Thread.currentThread().getName() + ","
+ Thread.currentThread().getId());
launcher.start(vertx -> {
// ๆง่กVertx็ธๅ
ณๅ็ปญ้ป่พ
// TODO ๏ผ ไธป้ป่พ
final Context context = vertx.getOrCreateContext();
context.put("data","hello");
context.runOnContext(v -> {
System.out.println(Thread.currentThread().getName() + ","
+ Thread.currentThread().getId()
+ ", This will be executed async ->" + v);
Object hello = context.get("hello");
});
});
}
}
| [
"longma123"
]
| longma123 |
a52d3aec2e29c2d77d6dad32b437dedc40df1dd2 | a23b0c79672b59b7fee2f0730269318d8959ee18 | /src/main/java/org/elasticsearch/common/component/Lifecycle.java | fd703658753ca32e39cd7e5e15284816502fe170 | [
"Apache-2.0"
]
| permissive | lemonJun/ESHunt | 1d417fc3605be8c5b384c66a5b623dea6ba77a6a | d66ed11d64234e783f67699e643daa77c9d077e3 | refs/heads/master | 2021-01-19T08:30:47.171304 | 2017-04-09T06:08:58 | 2017-04-09T06:08:58 | 87,639,997 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,990 | java | /*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch 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.elasticsearch.common.component;
import org.elasticsearch.ElasticsearchIllegalStateException;
/**
* Lifecycle state. Allows the following transitions:
* <ul>
* <li>INITIALIZED -> STARTED, STOPPED, CLOSED</li>
* <li>STARTED -> STOPPED</li>
* <li>STOPPED -> STARTED, CLOSED</li>
* <li>CLOSED -> </li>
* </ul>
* <p/>
* <p>Also allows to stay in the same state. For example, when calling stop on a component, the
* following logic can be applied:
* <p/>
* <pre>
* public void stop() {
* if (!lifeccycleState.moveToStopped()) {
* return;
* }
* // continue with stop logic
* }
* </pre>
* <p/>
* <p>Note, closed is only allowed to be called when stopped, so make sure to stop the component first.
* Here is how the logic can be applied:
* <p/>
* <pre>
* public void close() {
* if (lifecycleState.started()) {
* stop();
* }
* if (!lifecycleState.moveToClosed()) {
* return;
* }
* // perofrm close logic here
* }
* </pre>
*/
public class Lifecycle {
public static enum State {
INITIALIZED, STOPPED, STARTED, CLOSED
}
private volatile State state = State.INITIALIZED;
public State state() {
return this.state;
}
/**
* Returns <tt>true</tt> if the state is initialized.
*/
public boolean initialized() {
return state == State.INITIALIZED;
}
/**
* Returns <tt>true</tt> if the state is started.
*/
public boolean started() {
return state == State.STARTED;
}
/**
* Returns <tt>true</tt> if the state is stopped.
*/
public boolean stopped() {
return state == State.STOPPED;
}
/**
* Returns <tt>true</tt> if the state is closed.
*/
public boolean closed() {
return state == State.CLOSED;
}
public boolean stoppedOrClosed() {
Lifecycle.State state = this.state;
return state == State.STOPPED || state == State.CLOSED;
}
public boolean canMoveToStarted() throws ElasticsearchIllegalStateException {
State localState = this.state;
if (localState == State.INITIALIZED || localState == State.STOPPED) {
return true;
}
if (localState == State.STARTED) {
return false;
}
if (localState == State.CLOSED) {
throw new ElasticsearchIllegalStateException("Can't move to started state when closed");
}
throw new ElasticsearchIllegalStateException("Can't move to started with unknown state");
}
public boolean moveToStarted() throws ElasticsearchIllegalStateException {
State localState = this.state;
if (localState == State.INITIALIZED || localState == State.STOPPED) {
state = State.STARTED;
return true;
}
if (localState == State.STARTED) {
return false;
}
if (localState == State.CLOSED) {
throw new ElasticsearchIllegalStateException("Can't move to started state when closed");
}
throw new ElasticsearchIllegalStateException("Can't move to started with unknown state");
}
public boolean canMoveToStopped() throws ElasticsearchIllegalStateException {
State localState = state;
if (localState == State.STARTED) {
return true;
}
if (localState == State.INITIALIZED || localState == State.STOPPED) {
return false;
}
if (localState == State.CLOSED) {
throw new ElasticsearchIllegalStateException("Can't move to started state when closed");
}
throw new ElasticsearchIllegalStateException("Can't move to started with unknown state");
}
public boolean moveToStopped() throws ElasticsearchIllegalStateException {
State localState = state;
if (localState == State.STARTED) {
state = State.STOPPED;
return true;
}
if (localState == State.INITIALIZED || localState == State.STOPPED) {
return false;
}
if (localState == State.CLOSED) {
throw new ElasticsearchIllegalStateException("Can't move to started state when closed");
}
throw new ElasticsearchIllegalStateException("Can't move to started with unknown state");
}
public boolean canMoveToClosed() throws ElasticsearchIllegalStateException {
State localState = state;
if (localState == State.CLOSED) {
return false;
}
if (localState == State.STARTED) {
throw new ElasticsearchIllegalStateException("Can't move to closed before moving to stopped mode");
}
return true;
}
public boolean moveToClosed() throws ElasticsearchIllegalStateException {
State localState = state;
if (localState == State.CLOSED) {
return false;
}
if (localState == State.STARTED) {
throw new ElasticsearchIllegalStateException("Can't move to closed before moving to stopped mode");
}
state = State.CLOSED;
return true;
}
@Override
public String toString() {
return state.toString();
}
}
| [
"[email protected]"
]
| |
c3aec8279db7decafef99a12435ff82b47b547bc | 36a9840685a08606dc90a338efba142aa1e74022 | /app/src/main/java/com/wwsl/mdsj/game/views/GameHdViewHolder.java | 0622cfc9e65686b10aaf2f39db6df71713c7ec46 | []
| no_license | SnailMyth/mdsj | 02513d95d4620a7d7ae3e390c7fd6e3ae0a8a9e3 | 84f786d10433ad26c2fffba33327c2c3777923f1 | refs/heads/master | 2023-01-13T02:03:45.771519 | 2020-11-16T16:01:50 | 2020-11-16T16:01:50 | 313,351,462 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 29,390 | java | package com.wwsl.mdsj.game.views;
import android.animation.ValueAnimator;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.ScaleAnimation;
import android.widget.ImageView;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.wwsl.game.custom.GameBetCoinView;
import com.wwsl.game.custom.PokerView;
import com.wwsl.game.util.GameIconUtil;
import com.wwsl.mdsj.AppConfig;
import com.wwsl.mdsj.R;
import com.wwsl.mdsj.event.GameWindowEvent;
import com.wwsl.mdsj.game.GameSoundPool;
import com.wwsl.mdsj.game.bean.GameParam;
import com.wwsl.mdsj.game.socket.SocketGameUtil;
import com.wwsl.mdsj.http.HttpCallback;
import com.wwsl.mdsj.http.HttpConst;
import com.wwsl.mdsj.http.HttpUtil;
import com.wwsl.mdsj.utils.DialogUtil;
import com.wwsl.mdsj.utils.DpUtil;
import com.wwsl.mdsj.utils.L;
import com.wwsl.mdsj.utils.ToastUtil;
import com.wwsl.mdsj.utils.WordUtil;
import org.greenrobot.eventbus.EventBus;
import java.math.BigDecimal;
/**
* Created by cxf on 2018/10/31.
* ๆตท็่น้ฟๆธธๆ
*/
public class GameHdViewHolder extends AbsGameViewHolder {
private static final int WHAT_READY_END = 101;//ๅๅคๅ่ฎกๆถ็ปๆ
private static final int WHAT_CARD_ANIM_START = 102;//่ง่ฒ็ผฉๅฐ๏ผๆญๆพๅ็ๅจ็ป
private static final int WHAT_BET_ANIM_DISMISS = 103;//ๅผๅงไธๆณจๆจชๆกๆถๅคฑ
private static final int WHAT_BET_COUNT_DOWN = 104;//ไธๆณจๅ่ฎกๆถ
private static final int WHAT_GAME_RESULT = 105;//ๆญๆๆธธๆ็ปๆ
private static final int WHAT_GAME_NEXT = 106;//ๅผๅงไธๆฌกๆธธๆ
private static final int MAX_REPEAT_COUNT = 6;
private TextView mTip;//ๆ็คบ็ๆจชๆก
private TextView mReadyCountDown;//ๅๅคๅผๅงๅ่ฎกๆถ็TextView
private View mRoleGroup;
private int mRepeatCount;
private Animation mResultAnim;
private int mSceneHeight;//ๅบๆฏ้ซๅบฆ
private int mRoleHeight;//่ง่ฒ้ซๅบฆ
private View mPokerGroup;
private PokerView[] mPokerViews;
private View[] mRoles;
private View[] mRoleNames;
private View mVs;
private TextView mBetCountDown;//ไธๆณจๅ่ฎกๆถ็TextView
private TextView mCoinTextView;//ๆพ็คบ็จๆทไฝ้ข็TextView
private GameBetCoinView[] mBetCoinViews;
private ImageView[] mResults;
private ImageView mCoverImg;//็ปๆๆถ็้ฎ็ฝฉ
private Animation mReadyAnim;//ๅๅคๅผๅงๅ่ฎกๆถ็ๅจ็ป
private Animation mTipHideAnim;//ๆ็คบๆจชๆก้่็ๅจ็ป
private Animation mTipShowAnim;//ๆ็คบๆจชๆกๆพ็คบ็ๅจ็ป
private Animation mRoleIdleAnim; //่ง่ฒๅพ
ๆบๅจ็ป
private ValueAnimator mRoleScaleAnim;//่ง่ฒ็ผฉๅฐ็ๅจ็ป
private Handler mHandler;
private int mBetCount;
private int mWinIndex;//ๅชไธช่ง่ฒ่ท่ไบ
private String mWinString;
public GameHdViewHolder(GameParam gameParam, GameSoundPool gameSoundPool) {
super(gameParam, gameSoundPool);
boolean anchor = gameParam.isAnchor();
mGameViewHeight = anchor ? DpUtil.dp2px(145) : DpUtil.dp2px(185);
if (!anchor) {
ViewStub viewStub = (ViewStub) findViewById(R.id.view_stub);
View view = viewStub.inflate();
view.findViewById(R.id.btn_bet_shi).setOnClickListener(this);
view.findViewById(R.id.btn_bet_bai).setOnClickListener(this);
view.findViewById(R.id.btn_bet_qian).setOnClickListener(this);
view.findViewById(R.id.btn_bet_wan).setOnClickListener(this);
mCoinTextView = (TextView) view.findViewById(R.id.coin);
mCoinTextView.setOnClickListener(this);
for (View v : mBetCoinViews) {
v.setOnClickListener(this);
}
mBetMoney = 1;
HttpUtil.getCoin(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
setLastCoin(JSONObject.parseObject(info[0]).getString("coin"));
}
}
});
}
}
@Override
protected int getLayoutId() {
return R.layout.game_view_hd;
}
@Override
public void init() {
mTip = (TextView) findViewById(R.id.tip);
mReadyCountDown = (TextView) findViewById(R.id.count_down_1);
mRoleGroup = findViewById(R.id.role_group);
mSceneHeight = DpUtil.dp2px(145);
mRoleHeight = DpUtil.dp2px(90);
mPokerGroup = findViewById(R.id.pokers_group);
mPokerViews = new PokerView[2];
mPokerViews[0] = (PokerView) findViewById(R.id.pokers_1);
mPokerViews[1] = (PokerView) findViewById(R.id.pokers_2);
mRoles = new View[2];
mRoles[0] = findViewById(R.id.role_1);
mRoles[1] = findViewById(R.id.role_2);
mRoleNames = new View[2];
mRoleNames[0] = findViewById(R.id.name_1);
mRoleNames[1] = findViewById(R.id.name_2);
mBetCountDown = (TextView) findViewById(R.id.count_down_2);
mBetCoinViews = new GameBetCoinView[3];
mBetCoinViews[0] = (GameBetCoinView) findViewById(R.id.score_1);
mBetCoinViews[1] = (GameBetCoinView) findViewById(R.id.score_2);
mBetCoinViews[2] = (GameBetCoinView) findViewById(R.id.score_3);
mResults = new ImageView[2];
mResults[0] = (ImageView) findViewById(R.id.result_1);
mResults[1] = (ImageView) findViewById(R.id.result_2);
mCoverImg = (ImageView) findViewById(R.id.cover);
mVs = findViewById(R.id.icon_vs);
//่ง่ฒ็ผฉๅฐ็ๅจ็ป
mRoleScaleAnim = ValueAnimator.ofFloat(mSceneHeight, mRoleHeight);
mRoleScaleAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float v = (float) animation.getAnimatedValue();
changeRoleHeight((int) v);
}
});
mRoleScaleAnim.setDuration(1000);
mResultAnim = new ScaleAnimation(0.2f, 1, 0.2f, 1, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
mResultAnim.setDuration(300);
mRoleIdleAnim = new ScaleAnimation(1f, 1.04f, 1f, 1.04f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 1f);
mRoleIdleAnim.setRepeatCount(-1);
mRoleIdleAnim.setRepeatMode(Animation.REVERSE);
mRoleIdleAnim.setDuration(800);
mReadyAnim = new ScaleAnimation(4, 1, 4, 1, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
mReadyAnim.setDuration(1000);
mReadyAnim.setRepeatCount(MAX_REPEAT_COUNT);
mReadyAnim.setRepeatMode(Animation.RESTART);
mReadyAnim.setInterpolator(new AccelerateInterpolator());
mReadyAnim.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
if (mReadyCountDown != null && mReadyCountDown.getVisibility() == View.VISIBLE) {
mReadyCountDown.setVisibility(View.INVISIBLE);//้่ๅๅคๅ่ฎกๆถ
}
}
@Override
public void onAnimationRepeat(Animation animation) {
mReadyCountDown.setText(String.valueOf(mRepeatCount));
mRepeatCount--;
}
});
mTipShowAnim = new ScaleAnimation(0.2f, 1, 0.2f, 1, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
mTipShowAnim.setDuration(500);
mTipHideAnim = new ScaleAnimation(1, 0.2f, 1, 0.2f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
mTipHideAnim.setDuration(500);
mTipHideAnim.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
if (mTip != null && mTip.getVisibility() == View.VISIBLE) {
mTip.setVisibility(View.INVISIBLE);
}
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case WHAT_READY_END://ๅๅคๅ่ฎกๆถ็ปๆ
anchorCreateGame();
break;
case WHAT_CARD_ANIM_START://่ง่ฒ็ผฉๅฐ๏ผๆญๆพๅ็ๅจ็ป
playCardAnim();
break;
case WHAT_BET_ANIM_DISMISS:
if (mTip != null) {
mTip.startAnimation(mTipHideAnim);
}
break;
case WHAT_BET_COUNT_DOWN://ไธๆณจๅ่ฎกๆถ
betCountDown();
break;
case WHAT_GAME_RESULT://ๆญๆๆธธๆ็ปๆ
showGameResult(msg.arg1, (String[]) msg.obj);
break;
case WHAT_GAME_NEXT:
nextGame();
break;
}
}
};
mWinString = WordUtil.getString(R.string.game_win);
}
/**
* ๆนๅ่ง่ฒ็้ซๅบฆ
*/
private void changeRoleHeight(int height) {
ViewGroup.LayoutParams params = mRoleGroup.getLayoutParams();
params.height = height;
mRoleGroup.setLayoutParams(params);
}
/**
* ๆพ็คบ่งไผ็ไฝ้ข
*/
@Override
public void setLastCoin(String coin) {
if (mCoinTextView != null) {
mCoinTextView.setText(coin + " " + mChargeString);
}
}
/**
* ๅค็socketๅ่ฐ็ๆฐๆฎ
*/
public void handleSocket(int action, JSONObject obj) {
if (mEnd) {
return;
}
L.e(mTag, "-----handleSocket--------->" + obj.toJSONString());
switch (action) {
case SocketGameUtil.GAME_ACTION_OPEN_WINDOW://ๆๅผๆธธๆ็ชๅฃ
onGameWindowShow();
break;
case SocketGameUtil.GAME_ACTION_CREATE://ๆธธๆ่ขซๅๅปบ
onGameCreate();
break;
case SocketGameUtil.GAME_ACTION_CLOSE://ไธปๆญๅ
ณ้ญๆธธๆ
onGameClose();
break;
case SocketGameUtil.GAME_ACTION_NOTIFY_BET://ๅผๅงไธๆณจ
onGameBetStart(obj);
break;
case SocketGameUtil.GAME_ACTION_BROADCAST_BET://ๆถๅฐไธๆณจๆถๆฏ
onGameBetChanged(obj);
break;
case SocketGameUtil.GAME_ACTION_RESULT://ๆถๅฐๆธธๆ็ปๆๆญๆ็็ๆถๆฏ
onGameResult(obj);
break;
}
}
/**
* ๆๆไบบๆถๅฐ ๆๅผๆธธๆ็ชๅฃ็socketๅ๏ผ ๆๅผๆธธๆ็ชๅฃ๏ผๅฏๅจ่ง่ฒๅพ
ๆบๅจ็ป๏ผ่ฟๅ
ฅ8็งๅๅคๅ่ฎกๆถ๏ผ
*/
private void onGameWindowShow() {
if (!mShowed) {
showGameWindow();
mBetStarted = false;
mRepeatCount = MAX_REPEAT_COUNT;
mReadyCountDown.setText(String.valueOf(mRepeatCount + 1));
mReadyCountDown.startAnimation(mReadyAnim);
if (mAnchor && mHandler != null) {
mHandler.sendEmptyMessageDelayed(WHAT_READY_END, 7000);
}
if (mRoles != null) {
for (View v : mRoles) {
if (v != null) {
v.startAnimation(mRoleIdleAnim);
}
}
}
}
}
/**
* ไธปๆญๅจ8็งๅๅคๆถ้ด็ปๆๅ๏ผ่ฏทๆฑๆฅๅฃ๏ผๅๅปบๆธธๆ
*/
@Override
public void anchorCreateGame() {
if (!mAnchor) {
return;
}
HttpUtil.gameHaidaoCreate(mStream, new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0) {
JSONObject obj = JSON.parseObject(info[0]);
mGameID = obj.getString("gameid");
mGameToken = obj.getString("token");
mBetTime = obj.getIntValue("time");
SocketGameUtil.hdAnchorCreateGame(mSocketClient, mGameID);
} else {
ToastUtil.show(msg);
}
}
});
}
/**
* ๆๆไบบๆถๅฐๆธธๆ่ขซๅๅปบ็socketๅ๏ผๅผๅงๆง่กๅ็ๅจ็ป
*/
private void onGameCreate() {
if (!mShowed) {
showGameWindow();
if (mTip != null && mTip.getVisibility() == View.VISIBLE) {
mTip.setVisibility(View.INVISIBLE);
}
if (mRoles != null) {
for (View v : mRoles) {
if (v != null) {
v.startAnimation(mRoleIdleAnim);
}
}
}
}
if (mRoleNames != null) {
for (View name : mRoleNames) {//้่่ง่ฒๅๅญ
if (name != null && name.getVisibility() == View.VISIBLE) {
name.setVisibility(View.GONE);
}
}
}
if (mVs != null && mVs.getVisibility() == View.VISIBLE) {
mVs.setVisibility(View.INVISIBLE);
}
if (mTip != null && mTipHideAnim != null && mTip.getVisibility() == View.VISIBLE) {
mTip.startAnimation(mTipHideAnim);//ๆจชๆกๆถๅคฑ
}
if (mRoleScaleAnim != null) {
mRoleScaleAnim.start();//ๆง่ก่ง่ฒ็ผฉๅฐๅจ็ป
}
if (mHandler != null) {
mHandler.sendEmptyMessageDelayed(WHAT_CARD_ANIM_START, 1000);
}
}
/**
* ่ง่ฒ็ผฉๅฐๅ๏ผๆญๆพๅ็ๅจ็ป๏ผไธปๆญ้็ฅๆๆไบบไธๆณจ
*/
private void playCardAnim() {
//่ง่ฒ้ ๅณ
if (mBetCoinViews != null) {
for (View v : mBetCoinViews) {
if (v != null && v.getVisibility() == View.GONE) {
v.setVisibility(View.INVISIBLE);
}
}
}
//ๆพ็คบๆๆพๆๅ
็็ๅคๆก,ๅผๅงๆง่กๅ็ๅจ็ป
if (mPokerGroup != null && mPokerGroup.getVisibility() != View.VISIBLE) {
mPokerGroup.setVisibility(View.VISIBLE);
}
if (mPokerViews != null) {
for (PokerView pv : mPokerViews) {
if (pv != null) {
pv.sendCard();
}
}
}
//ไธปๆญ้็ฅๆๆไบบไธๆณจ
if (mAnchor) {
SocketGameUtil.hdAnchorNotifyGameBet(mSocketClient, mLiveUid, mGameID, mGameToken, mBetTime);
}
}
/**
* ๆถๅฐไธปๆญ้็ฅไธๆณจ็socket,ๆญๆพๅจ็ป๏ผๅผๅงไธๆณจๅ่ฎกๆถ
*/
private void onGameBetStart(JSONObject obj) {
mBetStarted = true;
if (!mAnchor) {
mGameID = obj.getString("gameid");
mGameToken = obj.getString("token");
mBetTime = obj.getIntValue("time");
}
mBetCount = mBetTime - 1;
if (mBetCountDown != null) {
if (mBetCountDown.getVisibility() != View.VISIBLE) {
mBetCountDown.setVisibility(View.VISIBLE);
}
mBetCountDown.setText(String.valueOf(mBetCount));
}
if (mTip != null) {
if (mTip.getVisibility() != View.VISIBLE) {
mTip.setVisibility(View.VISIBLE);
}
mTip.setText(R.string.game_start_support);
mTip.startAnimation(mTipShowAnim);
}
if (mHandler != null) {
mHandler.sendEmptyMessageDelayed(WHAT_BET_COUNT_DOWN, 1000);
mHandler.sendEmptyMessageDelayed(WHAT_BET_ANIM_DISMISS, 1500);
}
//ๆพ็คบไธๆณจ็
if (mBetCoinViews != null) {
for (View v : mBetCoinViews) {
if (v != null && v.getVisibility() != View.VISIBLE) {
v.setVisibility(View.VISIBLE);
}
}
}
playGameSound(GameSoundPool.GAME_SOUND_BET_START);
}
/**
* ไธๆณจๅ่ฎกๆถ
*/
private void betCountDown() {
mBetCount--;
if (mBetCount > 0) {
mBetCountDown.setText(String.valueOf(mBetCount));
if (mHandler != null) {
mHandler.sendEmptyMessageDelayed(WHAT_BET_COUNT_DOWN, 1000);
}
} else {
mBetCountDown.setVisibility(View.INVISIBLE);
}
}
/**
* ่งไผไธๆณจ
*/
private void audienceBetGame(final int index) {
HttpUtil.gameHaidaoBet(mGameID, mBetMoney, index, new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
setLastCoin(JSON.parseObject(info[0]).getString("coin"));
SocketGameUtil.hdAudienceBetGame(mSocketClient, mBetMoney, index);
} else {
ToastUtil.show(msg);
}
}
});
}
/**
* ๆๆไบบๆถๅฐไธๆณจ็่งไผsocket๏ผๆดๆฐไธๆณจ้้ข
*/
private void onGameBetChanged(JSONObject obj) {
String uid = obj.getString("uid");
int money = obj.getIntValue("money");
int index = obj.getIntValue("type") - 1;
boolean isSelf = uid.equals(AppConfig.getInstance().getUid());
if (isSelf) {//่ชๅทฑไธ็ๆณจ
playGameSound(GameSoundPool.GAME_SOUND_BET_SUCCESS);
}
if (mBetCoinViews != null) {
if (index >= 0 && index < 3) {
if (mBetCoinViews[index] != null) {
mBetCoinViews[index].updateBetVal(money, isSelf);
}
}
}
}
/**
* ๆถๅฐๆธธๆ็ปๆๆญๆ็็ๆถๆฏ
*/
private void onGameResult(JSONObject obj) {
mWinIndex = -1;
String[][] result = JSON.parseObject(obj.getString("ct"), String[][].class);
showGameResult(0, result[0]);
Message msg = Message.obtain();
msg.what = WHAT_GAME_RESULT;
msg.arg1 = 1;
msg.obj = result[2];
if (mHandler != null) {
mHandler.sendMessageDelayed(msg, 2000);
}
}
/**
* ๆญๆๆธธๆ็ปๆ
*/
private void showGameResult(int i, String[] result) {
if (i == 0 && mTip != null) {
if (mTip.getVisibility() != View.VISIBLE) {
mTip.setVisibility(View.VISIBLE);
}
mTip.setText(R.string.game_show_result);//ๆญๆ็ปๆ
mTip.startAnimation(mTipShowAnim);
if (mHandler != null) {
mHandler.sendEmptyMessageDelayed(WHAT_BET_ANIM_DISMISS, 1500);
}
}
if (mPokerViews[i] != null) {
mPokerViews[i].showResult(
GameIconUtil.getPoker(result[0]),
GameIconUtil.getPoker(result[1]),
GameIconUtil.getPoker(result[2]),
GameIconUtil.getPoker(result[3]),
GameIconUtil.getPoker(result[4]));
}
if (mResults[i] != null) {
mResults[i].setVisibility(View.VISIBLE);
mResults[i].setImageResource(GameIconUtil.getHaiDaoResult(result[5]));
mResults[i].startAnimation(mResultAnim);
}
if (mWinIndex == -1) {
if ("1".equals(result[7])) {
mWinIndex = i;
}
}
if (i == 1) {
int coverRes = 0;
switch (mWinIndex) {
case 0:
coverRes = R.mipmap.bg_game_win_left;
break;
case 1:
coverRes = R.mipmap.bg_game_win_right;
break;
case -1:
coverRes = R.mipmap.bg_game_win_middle;
break;
}
mCoverImg.setVisibility(View.VISIBLE);
mCoverImg.setImageResource(coverRes);
if (mHandler != null) {
mHandler.sendEmptyMessageDelayed(WHAT_GAME_NEXT, 7000);//7็งๅ้ๆฐๅผๅงๆธธๆ
}
if (!mAnchor) {
getGameResult();
}
}
playGameSound(GameSoundPool.GAME_SOUND_RESULT);
}
@Override
protected void getGameResult() {
HttpUtil.gameSettle(mGameID, new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0) {
JSONObject obj = JSON.parseObject(info[0]);
setLastCoin(obj.getString("coin"));
int winCoin = new BigDecimal(obj.getString("gamecoin")).intValue();
if (winCoin > 0) {
DialogUtil.showSimpleTipDialog(mContext, mWinString, winCoin + mCoinName);
}
} else {
ToastUtil.show(msg);
}
}
});
}
/**
* ๆธธๆไธญ้่ฟๅ
ฅ็ดๆญ้ด็ๆๅผๆธธๆ็ชๅฃ
*/
@Override
public void enterRoomOpenGameWindow() {
if (!mShowed) {
showGameWindow();
//้่่ง่ฒๅๅญ
if (mRoleNames != null) {
for (View name : mRoleNames) {
if (name != null && name.getVisibility() == View.VISIBLE) {
name.setVisibility(View.GONE);
}
}
}
if (mVs != null && mVs.getVisibility() == View.VISIBLE) {
mVs.setVisibility(View.INVISIBLE);
}
changeRoleHeight(mRoleHeight);
mBetCount = mBetTime - 1;
if (mBetCount > 0 && mBetCountDown != null) {
if (mBetCountDown.getVisibility() != View.VISIBLE) {
mBetCountDown.setVisibility(View.VISIBLE);
}
mBetCountDown.setText(String.valueOf(mBetCount));
}
//ๆพ็คบไธๆณจ็
if (mBetCoinViews != null) {
for (int i = 0, length = mBetCoinViews.length; i < length; i++) {
GameBetCoinView gameBetCoinView = mBetCoinViews[i];
if (gameBetCoinView != null && gameBetCoinView.getVisibility() != View.VISIBLE) {
gameBetCoinView.setVisibility(View.VISIBLE);
gameBetCoinView.setBetVal(mTotalBet[i], mMyBet[i]);
}
}
}
//ๆพ็คบๆๆพๆๅ
็็ๅคๆก,ๅผๅงๆง่กๅ็ๅจ็ป
if (mPokerGroup != null && mPokerGroup.getVisibility() != View.VISIBLE) {
mPokerGroup.setVisibility(View.VISIBLE);
}
if (mPokerViews != null) {
for (PokerView pv : mPokerViews) {
if (pv != null) {
pv.sendCard();
}
}
}
//ๅฏๅจ่ง่ฒๅพ
ๆบๅจ็ป
if (mRoles != null) {
for (View v : mRoles) {
if (v != null) {
v.startAnimation(mRoleIdleAnim);
}
}
}
if (mTip != null) {
if (mTip.getVisibility() != View.VISIBLE) {
mTip.setVisibility(View.VISIBLE);
}
mTip.setText(R.string.game_start_support);
mTip.startAnimation(mTipShowAnim);
}
if (mHandler != null) {
mHandler.sendEmptyMessageDelayed(WHAT_BET_COUNT_DOWN, 1000);
mHandler.sendEmptyMessageDelayed(WHAT_BET_ANIM_DISMISS, 1500);
}
playGameSound(GameSoundPool.GAME_SOUND_BET_START);
}
}
/**
* ๅผๅงไธๆฌกๆธธๆ
*/
@Override
protected void nextGame() {
mBetStarted = false;
mRepeatCount = MAX_REPEAT_COUNT;
if (mResults != null) {
for (ImageView imageView : mResults) {
if (imageView != null && imageView.getVisibility() == View.VISIBLE) {
imageView.setVisibility(View.INVISIBLE);
}
}
}
if (mBetCoinViews != null) {
for (GameBetCoinView coinView : mBetCoinViews) {
if (coinView != null) {
coinView.reset();
coinView.setVisibility(View.GONE);
}
}
}
if (mRoleNames != null) {
for (View name : mRoleNames) {
if (name != null && name.getVisibility() != View.VISIBLE) {
name.setVisibility(View.VISIBLE);
}
}
}
changeRoleHeight(mSceneHeight);
if (mVs != null && mVs.getVisibility() != View.VISIBLE) {
mVs.setVisibility(View.VISIBLE);
}
if (mCoverImg != null && mCoverImg.getVisibility() == View.VISIBLE) {
mCoverImg.setVisibility(View.INVISIBLE);
}
if (mPokerGroup != null && mPokerGroup.getVisibility() == View.VISIBLE) {
mPokerGroup.setVisibility(View.INVISIBLE);
}
if (mTip != null) {
if (mTip.getVisibility() != View.VISIBLE) {
mTip.setVisibility(View.VISIBLE);
}
mTip.setText(R.string.game_wait_start);
}
if (mReadyCountDown != null) {
if (mReadyCountDown.getVisibility() != View.VISIBLE) {
mReadyCountDown.setVisibility(View.VISIBLE);
}
mReadyCountDown.setText(String.valueOf(mRepeatCount + 1));
mReadyCountDown.startAnimation(mReadyAnim);
}
if (mAnchor && mHandler != null) {
mHandler.sendEmptyMessageDelayed(WHAT_READY_END, 7000);
}
}
@Override
public void anchorCloseGame() {
if (mBetStarted) {
ToastUtil.show(R.string.game_wait_end);
return;
}
SocketGameUtil.hdAnchorCloseGame(mSocketClient);
EventBus.getDefault().post(new GameWindowEvent(false));
}
/**
* ไธปๆญๅ
ณ้ญๆธธๆ็ๅ่ฐ
*/
private void onGameClose() {
L.e(mTag, "---------onGameClose----------->");
hideGameWindow();
release();
}
@Override
public void release() {
mEnd = true;
HttpUtil.cancel(HttpConst.GET_COIN);
HttpUtil.cancel(HttpConst.GAME_HAIDAO_CREATE);
HttpUtil.cancel(HttpConst.GAME_HAIDAO_BET);
HttpUtil.cancel(HttpConst.GAME_SETTLE);
super.release();
if (mHandler != null) {
mHandler.removeCallbacksAndMessages(null);
}
mHandler = null;
if (mRoleScaleAnim != null) {
mRoleScaleAnim.cancel();
}
if (mReadyCountDown != null) {
mReadyCountDown.clearAnimation();
}
if (mTip != null) {
mTip.clearAnimation();
}
if (mRoles != null) {
for (View v : mRoles) {
if (v != null) {
v.clearAnimation();
}
}
}
if (mResults != null) {
for (View v : mResults) {
if (v != null) {
v.clearAnimation();
}
}
}
if (mPokerViews != null) {
for (PokerView pokerView : mPokerViews) {
if (pokerView != null) {
pokerView.recycleBitmap();
}
}
}
L.e(mTag, "---------release----------->");
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.score_1:
audienceBetGame(1);
break;
case R.id.score_2:
audienceBetGame(2);
break;
case R.id.score_3:
audienceBetGame(3);
break;
case R.id.btn_bet_shi:
mBetMoney = 1;
playGameSound(GameSoundPool.GAME_SOUND_BET_CHOOSE);
break;
case R.id.btn_bet_bai:
mBetMoney = 10;
playGameSound(GameSoundPool.GAME_SOUND_BET_CHOOSE);
break;
case R.id.btn_bet_qian:
mBetMoney = 100;
playGameSound(GameSoundPool.GAME_SOUND_BET_CHOOSE);
break;
case R.id.btn_bet_wan:
mBetMoney = 1000;
playGameSound(GameSoundPool.GAME_SOUND_BET_CHOOSE);
break;
case R.id.coin://ๅ
ๅผ
forwardCharge();
break;
}
}
}
| [
"[email protected]"
]
| |
d0a8999837a93d26bba6d2bfa9cbc7008f1e3f31 | 2cf1e5a7e3532b1db2d28074f57123c9f75619ef | /src/main/java/practice/problem/FairCandySwap.java | 6579ba590d35b15efbc989106eb154d093cb4388 | []
| no_license | jimty0511/algorithmPractice | 33f15c828a1463d7a1ea247b424e577fde37e1dd | dd524388e9d5c70ee97869b63465f3cd171f9460 | refs/heads/master | 2020-03-20T14:57:01.722957 | 2020-02-19T19:43:39 | 2020-02-19T19:43:39 | 137,497,450 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 619 | java | package practice.problem;
import java.util.HashSet;
import java.util.Set;
// 888. Fair Candy Swap
public class FairCandySwap {
public int[] fairCandySwap(int[] A, int[] B) {
int sumA = 0, sumB = 0;
Set<Integer> set = new HashSet<>();
for (int a : A) {
sumA += a;
set.add(a);
}
for (int b : B) {
sumB += b;
}
int diff = (sumA - sumB) / 2;
for (int b : B) {
int target = b + diff;
if (set.contains(target))
return new int[]{target, b};
}
return null;
}
}
| [
"[email protected]"
]
| |
92dde006e3c8773fb6aef91bd33e1579e1183f4e | 7e26ccb4b04b0207bf5b6cff71a5c8a6dd6f1b1c | /src/main/java/com/caseStudy/spring/repositories/CategoryRepository.java | bcfff22bcf2e17f347f589511d9a52dc7b300ffe | []
| no_license | BasilSwaggert/Maple_Final | 34dc7bcca64da0cb646687dd432c2e4181e06630 | c47c6b58d545c655e7a0608276b259f7416efd5a | refs/heads/main | 2023-04-07T21:29:17.037553 | 2021-04-13T16:09:28 | 2021-04-13T16:09:28 | 354,076,900 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 345 | java | package com.caseStudy.spring.repositories;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import com.caseStudy.spring.entities.Category;
//Repository for Category
@Repository("categoryRepository")
public interface CategoryRepository extends CrudRepository<Category, Integer> {
}
| [
"[email protected]"
]
| |
89948285491159b4601ef26b2e168e002d148d3d | fdf3b7f4d210b944f1b00a6649a86d06adc65c71 | /mall-common/src/main/java/cn/com/utils/JsonUtils.java | 60ea6906975027dd707606dd61eb72b67f7ad045 | []
| no_license | FengWenZhu/mall | adc5aec3a3efbc5da269fa955865f5aba7ab4ed5 | dfcc45ba2bbc7a830f3b8bb77d6dc5f693100973 | refs/heads/master | 2022-12-09T15:01:36.044170 | 2020-01-09T17:02:48 | 2020-01-09T17:02:48 | 192,577,236 | 0 | 0 | null | 2022-06-21T01:18:41 | 2019-06-18T16:34:47 | JavaScript | UTF-8 | Java | false | false | 1,833 | java | package cn.com.utils;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.List;
/**
* ClassName: JsonUtils
* Description: Json่ฝฌๆขๅทฅๅ
ท
* Company: Future Tech
* @author fwz
* @version v1.0.0 2019/6/30 0:14 fwz ๆไปถๅๅงๅๅปบ
*/
public class JsonUtils {
// ๅฎไนjacksonๅฏน่ฑก
private static final ObjectMapper MAPPER = new ObjectMapper();
/**
* ๅฐๅฏน่ฑก่ฝฌๆขๆjsonๅญ็ฌฆไธฒใ
* <p>Title: pojoToJson</p>
* <p>Description: </p>
* @param data
* @return
*/
public static String objectToJson(Object data) {
try {
String string = MAPPER.writeValueAsString(data);
return string;
} catch (JsonProcessingException e) {
e.printStackTrace();
}
return null;
}
/**
* ๅฐjson็ปๆ้่ฝฌๅไธบๅฏน่ฑก
*
* @param jsonData jsonๆฐๆฎ
* @param clazz ๅฏน่ฑกไธญ็object็ฑปๅ
* @return
*/
public static <T> T jsonToPojo(String jsonData, Class<T> beanType) {
try {
T t = MAPPER.readValue(jsonData, beanType);
return t;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* ๅฐjsonๆฐๆฎ่ฝฌๆขๆpojoๅฏน่ฑกlist
* <p>Title: jsonToList</p>
* <p>Description: </p>
* @param jsonData
* @param beanType
* @return
*/
public static <T>List<T> jsonToList(String jsonData, Class<T> beanType) {
JavaType javaType = MAPPER.getTypeFactory().constructParametricType(List.class, beanType);
try {
List<T> list = MAPPER.readValue(jsonData, javaType);
return list;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
| [
"[email protected]"
]
| |
51d362ad3ea16e1a9a78ef23c8c78c14f787fc0b | 8f136d795eb2d39db164e6f5557b8d895a0e49eb | /first-web-app/src/main/java/org/example/persist/OrderStatus.java | f00e26e5550003b9944ec0e989fcfd42a83d6bd4 | []
| no_license | Kuznetsovka/JEE | 55a01ddd7685aefc00a0c05f74ae9d52358993ed | fd9b20aa0b13c2a4df8dd2e0c5869f9647c33490 | refs/heads/master | 2023-03-21T06:22:24.769461 | 2021-03-08T18:58:58 | 2021-03-08T18:58:58 | 333,543,552 | 0 | 0 | null | 2021-03-14T21:49:42 | 2021-01-27T19:56:58 | Java | UTF-8 | Java | false | false | 96 | java | package org.example.persist;
public enum OrderStatus {
NEW,APPROVED,CANCELED,PAID,CLOSED
}
| [
"[email protected]"
]
| |
d5e7350e5dc3dadd9c0834cfb6c3e052d5dfd3c5 | 7a21602fdff3253daa8d5c149fc7fee652e2ef30 | /MyFirstWS/src/com/lti/rest/HelloService.java | 9c7bb4be3c88ae9c50fdb955a74766471b386228 | []
| no_license | akshayjumale444/newDemoRepo | 835fec74b20f5ae463bae2297f767c11f24a1f92 | 48c78ed2560d3b51b18f0294aca50c49867d07a6 | refs/heads/master | 2020-06-23T16:48:32.458185 | 2019-07-25T17:06:58 | 2019-07-25T17:06:58 | 198,686,044 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 809 | java | package com.lti.rest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("/hello")
public class HelloService
{
//http://localhost:8087/MyFirstWS/rest/hello ==>URI
@GET
@Produces(MediaType.TEXT_PLAIN)
public String sayHello()
{
return "Plain Text......Hello";
}
//http://localhost:8087/MyFirstWS/rest/hello/xml ==>URI
@GET
@Path("/xml")
@Produces(MediaType.TEXT_XML)
public String sayXMLHello()
{
return "<hello>Welcome to RESTful web service xml</hello>";
}
//http://localhost:8087/MyFirstWS/rest/hello ==>URI
@GET
@Path("/html")
@Produces(MediaType.TEXT_HTML)
public String sayHTMLHello()
{
return "<font color=red size=8>Hello Everybody to HTML</font>";
}
}
| [
"[email protected]"
]
| |
54838c9ef039d2a69b031740444b8e5473c10f6a | f3cd7f24c988111f12a6ef0da7f7e55b752d6fa7 | /emp-rest/src/main/java/com/lti/repo/BeneficiaryRepo.java | fe4b32584ab579aefdac3b980c9c1c971616c24f | []
| no_license | avianable/BitBank | a3b1928fdecaa1bde9e0bf1e9ea4314b05c0627a | 2412f693dd00b310b30bd99fc94ed57948ff9375 | refs/heads/master | 2022-12-19T23:14:47.881395 | 2020-10-18T12:53:34 | 2020-10-18T12:53:34 | 303,430,044 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 478 | java | package com.lti.repo;
import java.util.List;
import com.lti.entity.Beneficiary;
public interface BeneficiaryRepo {
void save(Beneficiary benficiary);
Beneficiary fetchBeneficiaryByAccNumber(int benefAccNumber);
List<Beneficiary> fetchAllBeneficiaries();
void updateBenefeciary(Beneficiary beneficiary);
void deleteBeneficiary(int benefAccNumber);
Boolean checkBeneficiaryAccountNumber(int benefAccNumber);
Boolean checkBankName(int benefAccNumber);
}
| [
"[email protected]"
]
| |
37401301a263d780c5e2ca1a9b1f04abd7e48f77 | 743e066dcd3832b0d51e100ec823d41d3b1fc380 | /src/java/mmm/core/CRegistry.java | c25e10135ec7f32c5266c5e3a74bf5fe99fd496a | []
| no_license | tseeker/mmm | 4266985864c17a38209c2d78cce4591f5df94df8 | 80781bbabc0ff5b61eea55fd9f2b0e2411a85abd | refs/heads/master | 2021-01-19T06:14:51.431388 | 2016-07-24T18:44:23 | 2016-07-24T18:44:23 | 64,080,354 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,796 | java | package mmm.core;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import mmm.Mmm;
import mmm.core.api.I_FloraRegistrar;
import mmm.core.api.I_OreGenerationRegistrar;
import mmm.core.api.I_RecipeRegistrar;
import mmm.core.api.I_RequiresClientInit;
import mmm.core.api.I_RequiresClientPreInit;
import mmm.core.api.blocks.I_ColoredBlock;
import mmm.core.api.blocks.I_StateMapperProvider;
import mmm.core.api.blocks.I_TintedBlock;
import mmm.core.api.items.I_ItemModelProvider;
import mmm.core.api.items.I_ItemModelProviderBasic;
import mmm.core.api.items.I_ItemWithVariants;
import mmm.core.api.items.I_TintedItem;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.color.BlockColors;
import net.minecraft.client.renderer.color.ItemColors;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemCloth;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.IFuelHandler;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.registry.IForgeRegistryEntry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import scala.actors.threadpool.Arrays;
public class CRegistry
{
private static class FuelHandler
implements IFuelHandler
{
@Override
public int getBurnTime( final ItemStack fuel )
{
final Item item = fuel.getItem( );
final Object fuelInfo = CRegistry.FUELS.get( item );
if ( fuelInfo != null ) {
if ( item.getHasSubtypes( ) ) {
return ( (int[]) fuelInfo )[ fuel.getItemDamage( ) ];
}
return ( (Integer) fuelInfo ).intValue( );
}
return 0;
}
}
private static final HashSet< I_RecipeRegistrar > RECIPE_REGISTRARS = new HashSet<>( );
private static final HashSet< I_OreGenerationRegistrar > ORE_GEN_REGISTRARS = new HashSet<>( );
private static final HashSet< I_FloraRegistrar > FLORA_REGISTRARS = new HashSet<>( );
private static final HashSet< Item > ITEMS = new HashSet< Item >( );
private static final HashSet< Block > BLOCKS = new HashSet< Block >( );
private static final ArrayList< Block > BLOCKS_CLIENT_PREINIT = new ArrayList<>( );
private static final ArrayList< Block > BLOCKS_CLIENT_INIT = new ArrayList<>( );
private static final ArrayList< Item > ITEMS_CLIENT_INIT = new ArrayList<>( );
private static final HashMap< Item , Object > FUELS = new HashMap<>( );
private static final FuelHandler FUEL_HANDLER = new FuelHandler( );
static {
GameRegistry.registerFuelHandler( CRegistry.FUEL_HANDLER );
}
public static void setIdentifiers( final IForgeRegistryEntry< ? > thing , final String... strings )
{
final int nStrings = strings.length;
if ( nStrings == 0 ) {
throw new IllegalArgumentException( "no identifier specified" );
}
final StringBuilder sb = new StringBuilder( );
for ( int i = 0 ; i < nStrings ; i++ ) {
if ( i > 0 ) {
sb.append( '/' );
}
sb.append( strings[ i ] );
}
thing.setRegistryName( new ResourceLocation( Mmm.ID , sb.toString( ) ) );
if ( thing instanceof Block || thing instanceof Item ) {
sb.setLength( 0 );
sb.append( Mmm.ID );
for ( int i = 0 ; i < nStrings ; i++ ) {
sb.append( '.' ).append( strings[ i ] );
}
if ( thing instanceof Block ) {
( (Block) thing ).setUnlocalizedName( sb.toString( ) );
} else {
( (Item) thing ).setUnlocalizedName( sb.toString( ) );
}
}
}
public static void addItem( final Item item )
{
if ( CRegistry.ITEMS.add( item ) ) {
GameRegistry.register( item );
CRegistry.addRegistrar( item );
if ( item instanceof I_RequiresClientInit ) {
CRegistry.ITEMS_CLIENT_INIT.add( item );
}
}
}
public static Item addBlock( final Block block )
{
Item item;
if ( block instanceof I_ColoredBlock ) {
item = new ItemCloth( block );
} else {
item = new ItemBlock( block );
}
item.setRegistryName( block.getRegistryName( ) );
return CRegistry.addBlock( block , item );
}
public static Item addBlock( final Block block , final Item blockItem )
{
if ( CRegistry.BLOCKS.add( block ) ) {
GameRegistry.register( block );
CRegistry.addRegistrar( block );
if ( block instanceof I_RequiresClientPreInit ) {
CRegistry.BLOCKS_CLIENT_PREINIT.add( block );
}
if ( block instanceof I_RequiresClientInit ) {
CRegistry.BLOCKS_CLIENT_INIT.add( block );
}
if ( blockItem != null ) {
CRegistry.addItem( blockItem );
}
}
return blockItem;
}
public static void setFuel( final Item item , final int value )
{
Object obj;
if ( item.getHasSubtypes( ) ) {
final int values[] = new int[ 16 ];
Arrays.fill( values , value );
obj = values;
} else {
obj = Integer.valueOf( value );
}
CRegistry.FUELS.put( item , obj );
}
public static void setFuel( final Item item , final int meta , final int value )
{
if ( !item.getHasSubtypes( ) ) {
throw new IllegalArgumentException( "item " + item + " has no subtypes" );
}
Object obj = CRegistry.FUELS.get( item );
if ( obj == null ) {
obj = new int[ 16 ];
CRegistry.FUELS.put( item , obj );
}
( (int[]) obj )[ meta ] = value;
}
public static void addRegistrar( final Object object )
{
CRegistry.addRecipeRegistrar( object );
CRegistry.addOreGenerationRegistrar( object );
CRegistry.addFloraRegistrar( object );
}
public static void addRecipeRegistrar( final Object object )
{
if ( object instanceof I_RecipeRegistrar ) {
CRegistry.RECIPE_REGISTRARS.add( (I_RecipeRegistrar) object );
}
}
public static void addOreGenerationRegistrar( final Object object )
{
if ( object instanceof I_OreGenerationRegistrar ) {
CRegistry.ORE_GEN_REGISTRARS.add( (I_OreGenerationRegistrar) object );
}
}
public static void addFloraRegistrar( final Object object )
{
if ( object instanceof I_FloraRegistrar ) {
CRegistry.FLORA_REGISTRARS.add( (I_FloraRegistrar) object );
}
}
public static Collection< I_OreGenerationRegistrar > getOreGenerationRegistrars( )
{
return Collections.unmodifiableCollection( CRegistry.ORE_GEN_REGISTRARS );
}
public static Collection< I_FloraRegistrar > getFloraRegistrars( )
{
return Collections.unmodifiableCollection( CRegistry.FLORA_REGISTRARS );
}
public static void registerRecipes( )
{
for ( final I_RecipeRegistrar registrar : CRegistry.RECIPE_REGISTRARS ) {
registrar.registerRecipes( );
}
}
@SideOnly( Side.CLIENT )
public static void preInitClient( )
{
for ( final Item item : CRegistry.ITEMS ) {
// Automatic model location unless there's a provider
if ( ! ( item instanceof I_ItemModelProvider ) ) {
final ModelResourceLocation location = new ModelResourceLocation( item.getRegistryName( ) ,
"inventory" );
ModelLoader.setCustomModelResourceLocation( item , 0 , location );
}
if ( ! ( item instanceof I_RequiresClientPreInit ) ) {
continue;
}
// Item models
if ( item instanceof I_ItemModelProviderBasic ) {
ModelLoader.setCustomModelResourceLocation( item , 0 ,
( (I_ItemModelProviderBasic) item ).getModelResourceLocation( ) );
} else if ( item instanceof I_ItemWithVariants ) {
final I_ItemWithVariants iwv = (I_ItemWithVariants) item;
for ( int i = 0 ; i < iwv.getVariantsCount( ) ; i++ ) {
ModelLoader.setCustomModelResourceLocation( item , i , iwv.getModelResourceLocation( i ) );
}
}
}
for ( final Block block : CRegistry.BLOCKS_CLIENT_PREINIT ) {
if ( block instanceof I_StateMapperProvider ) {
ModelLoader.setCustomStateMapper( block , ( (I_StateMapperProvider) block ).getStateMapper( ) );
}
}
}
@SideOnly( Side.CLIENT )
public static void initClient( )
{
final BlockColors blockColors = Minecraft.getMinecraft( ).getBlockColors( );
final ItemColors itemColors = Minecraft.getMinecraft( ).getItemColors( );
for ( final Block block : CRegistry.BLOCKS_CLIENT_INIT ) {
// Register tinted blocks
if ( block instanceof I_TintedBlock ) {
blockColors.registerBlockColorHandler( ( (I_TintedBlock) block ).getBlockTint( ) , block );
}
// Register tinted block items
if ( block instanceof I_TintedItem ) {
itemColors.registerItemColorHandler( ( (I_TintedItem) block ).getItemTint( ) , block );
}
}
for ( final Item item : CRegistry.ITEMS_CLIENT_INIT ) {
// Register tinted items
if ( item instanceof I_TintedItem ) {
itemColors.registerItemColorHandler( ( (I_TintedItem) item ).getItemTint( ) , item );
}
}
}
}
| [
"[email protected]"
]
| |
dfeb024c0ec727e7fb2865b784495f057dc1a361 | 68e8aa9c993f3daeb32322e02d75c2047cb0d742 | /src/main/java/com/zih/booking/service/BookingInquiryResultService.java | 77039588f524c8a6437505433708230e48425f25 | []
| no_license | WZCtqs/booking | 129a5d45190f7f81146ecf41039f5df361c65c6a | 59171db0fd6ed4015db2967249947c263f7399b2 | refs/heads/main | 2023-03-03T14:52:06.457169 | 2021-02-17T08:55:09 | 2021-02-17T08:55:09 | 339,660,157 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 333 | java | package com.zih.booking.service;
import com.zih.booking.model.BookingInquiryResult;
import com.baomidou.mybatisplus.service.IService;
/**
* <p>
* ่ฏขไปทๅ้ฆ็ปๆๆฐๆฎ่กจ ๆๅก็ฑป
* </p>
*
* @author shahy123
* @since 2020-01-19
*/
public interface BookingInquiryResultService extends IService<BookingInquiryResult> {
}
| [
"[email protected]"
]
| |
a063e88716b30527c9fc1a59d8d7c09b55978355 | 514fb4c259a2e6c843b72d557d4dc06120bc759a | /social-multiplication-repo/src/main/java/microservices/book/multiplication/domain/User.java | f5c5b841aceea654247f4224d6e399ddd22a9027 | []
| no_license | nfebrian13/springboot-microservices | 305113e3283299b7ee13fdb412d2d3a811b34d4a | be65344eed8955c34b9756aea2f428c8b4fc7ce3 | refs/heads/master | 2022-12-16T20:05:57.900414 | 2020-09-20T14:54:45 | 2020-09-20T14:54:45 | 288,909,364 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 629 | java | package microservices.book.multiplication.domain;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
/**
* Stores information to identify the user.
*/
@RequiredArgsConstructor
@Getter
@ToString
@EqualsAndHashCode
@Entity
public final class User {
@Id
@GeneratedValue
@Column(name = "USER_ID")
private Long id;
private final String alias;
// Empty constructor for JSON/JPA
protected User() {
alias = null;
}
} | [
"[email protected]"
]
| |
f19fa1b2835609d2c353f019152b9e702537d95f | 9eeb1177cd2596141528dab9b1f45b8a4ecc9dec | /src/com/globalways/cvsb/tools/BillPrinter.java | 0af02cfeccd923eaf2a8505eb45d1d7829c4d1fc | []
| no_license | globalways/CssCli | b15d3ec52f3f764e8bc2ba6a2fa399ec4784a233 | 85a92879812d94536415f45cecd74de5ce85f1ba | refs/heads/master | 2021-01-17T13:40:03.339073 | 2016-07-07T04:20:19 | 2016-07-07T04:20:19 | 32,114,769 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 9,106 | java | package com.globalways.cvsb.tools;
import java.util.List;
import com.alertdialogpro.AlertDialogPro.Builder;
import com.globalways.cvsb.R;
import com.globalways.cvsb.entity.OrderEntity;
import com.globalways.cvsb.entity.ProductEntity;
import com.globalways.cvsb.tools.PrinterBase.PrinterStatus;
import com.globalways.cvsb.ui.UITools;
import com.globalways.cvsb.view.MyDialogManager;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
import android.graphics.Paint;
import android.widget.Toast;
import zpSDK.zpSDK.zpSDK;
import zpSDK.zpSDK.zpSDK.BARCODE2D_TYPE;
/**
* ็ฅจๆฎๆๅฐๆบ
* @author wyp
*
*/
public class BillPrinter {
private Context context;
private PrinterBase pb;
private Paint paint;
private int currentY = 0;
private static final int TIME_OUT = 3000;
public BillPrinter(Context context) {
this.context = context;
this.pb = new PrinterBase(context);
this.paint = new Paint();
}
public boolean OpenPrinter(String BDAddress) {
if (BDAddress == "" || BDAddress == null) {
Toast.makeText(context, "ๆฒกๆ้ๆฉๆๅฐๆบ", Toast.LENGTH_LONG).show();
return false;
}
BluetoothDevice myDevice;
BluetoothAdapter myBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (myBluetoothAdapter == null) {
Toast.makeText(context, "่ฏปๅ่็่ฎพๅค้่ฏฏ", Toast.LENGTH_LONG).show();
return false;
}
myDevice = myBluetoothAdapter.getRemoteDevice(BDAddress);
if (myDevice == null) {
Toast.makeText(context, "่ฏปๅ่็่ฎพๅค้่ฏฏ", Toast.LENGTH_LONG).show();
return false;
}
if (zpSDK.zp_open(myBluetoothAdapter, myDevice) == false) {
notice(PrinterStatus.UNKNOWN);
return false;
}
return true;
}
@SuppressWarnings("static-access")
public void testPrint() {
if(PrinterBase.pairedBillPrinter == null){
pb.scanAndPair();
return;
}
if(!pb.connect(PrinterBase.pairedBillPrinter)){
return;
}
if (!OpenPrinter(PrinterBase.pairedBillPrinter.getAddress())) {
return;
}
if (!zpSDK.zp_page_create(58, 45)) {
Toast.makeText(context, "ๅๅปบๆๅฐ้กต้ขๅคฑ่ดฅ", Toast.LENGTH_LONG).show();
return;
}
currentY = 10;
zpSDK.zp_draw_text(6, currentY, "ๆๅฐๆต่ฏ");
zpSDK.zp_page_print(false);
zpSDK.zp_printer_status_detect();
// zpSDK.zp_goto_mark_right(150);
if (zpSDK.zp_printer_status_get(8000) != 0) {
Toast.makeText(context, zpSDK.ErrorMessage, Toast.LENGTH_LONG).show();
}
zpSDK.zp_page_free();
zpSDK.zp_close();
}
/**ๆถ้ถๆๅฐ
* @param order ่ฎขๅ
* @param products ๅๅๅ่กจ
*/
public void printCashier(OrderEntity order, List<ProductEntity> products) {
PrinterBase.pairedBillPrinter = pb.findPairedPrinter(context);
if(PrinterBase.pairedBillPrinter == null){
UITools.ToastMsg(context, context.getString(R.string.cashier_noitce_no_printer));
return;
}
if(order==null || products==null){
return;
}
int produts_size = products.size()*10;
int base_size = 55;
if (!OpenPrinter(PrinterBase.pairedBillPrinter.getAddress())) {
return;
}
if (!zpSDK.zp_page_create(58, base_size+produts_size)) {
UITools.ToastMsg(context, "ๅๅปบๆๅฐ้กต้ขๅคฑ่ดฅ");
return;
}
currentY = 10;
zpSDK.zp_draw_text(6, currentY, order.getStore_name()==null? "็ฏ้ไพฟๅฉๅบ" : order.getStore_name());
zpSDK.zp_draw_text_ex(0, currentY=currentY+4, "ๆถ้ถ : 00001", null, 2.4, 0, false, false, false);
zpSDK.zp_draw_text_ex(17.7, currentY, "ๆถ้ด : "+Tool.formateDateTimeByFormat(order.getOrder_time()*1000, "yyyy-MM-dd HH:mm:ss"), null, 2.4, 0, false, false, false);
zpSDK.zp_draw_text_ex(0, currentY=currentY+3, "ๆปไปท:๏ฟฅ"+Tool.fenToYuan(order.getOrder_amount()), null, 2.4, 0, false, false, false);
zpSDK.zp_draw_text_ex(17.7, currentY, "่ฎขๅๅท:"+order.getOrder_id(),null,2.4,0,false,false,false);
zpSDK.zp_draw_text_ex(0, currentY=currentY+4, "-----------------------------------------------------------",null,3,0,false,false,false);
zpSDK.zp_draw_text_ex(0, currentY=currentY+4, "ๅๅ ้ถๅฎไปท ๆฐ้ ้้ข",null,3,0,false,false,false);
currentY=currentY+4;
long total = 0;
for(ProductEntity p : products){
total += (long) (p.getShoppingNumber()*p.getProduct_retail_price());
zpSDK.zp_draw_text_ex(16, currentY, Tool.fenToYuan(p.getProduct_retail_price())+"/"+p.getProduct_unit(),null,2.4,0,false,false,false);
zpSDK.zp_draw_text_ex(32, currentY, p.getShoppingNumber()+"",null,2.4,0,false,false,false);
zpSDK.zp_draw_text_ex(40, currentY, Tool.fenToYuan((long) (p.getShoppingNumber()*p.getProduct_retail_price())),null,2.4,0,false,false,false);
draw_text_pinming(p.getProduct_name(), currentY);
}
zpSDK.zp_draw_text_ex(0, currentY, "-----------------------------------------------------------",null,3,0,false,false,false);
zpSDK.zp_draw_text_ex(0, currentY=currentY+4, "ๅ่ฎก: ๏ฟฅ"+Tool.fenToYuan(total), null, 2.4, 0, false, false, false);
zpSDK.zp_draw_text_ex(0, currentY=currentY+4, "ไผๆ : ๏ฟฅ"+Tool.fenToYuan(order.getDiscount_amount()), null, 2.4, 0, false, false, false);
zpSDK.zp_draw_text_ex(0, currentY=currentY+4, "ๅฎๆถ: ๏ฟฅ"+Tool.fenToYuan(order.getOrder_amount()), null, 2.4, 0, false, false, false);
zpSDK.zp_draw_text_ex(0, currentY=currentY+4, "ๆฌข่ฟๅๆฌกๅ
ไธด", null, 4, 0, false, false, false);
zpSDK.zp_page_print(false);
zpSDK.zp_printer_status_detect();
// zpSDK.zp_goto_mark_right(150);
notice(PrinterStatus.codeOf(zpSDK.zp_printer_status_get(TIME_OUT)));
zpSDK.zp_page_free();
zpSDK.zp_close();
}
/**
* ็บธๅท่ตฐๅฐๆ ็ญพๅผๅคด,ๅๆๅฐ
*/
public void gotoLabel(){
PrinterBase.pairedBillPrinter = pb.findPairedPrinter(context);
if(PrinterBase.pairedBillPrinter == null){
UITools.ToastMsg(context, context.getString(R.string.cashier_noitce_no_printer));
return;
}
if(!OpenPrinter(PrinterBase.pairedBillPrinter.getAddress()))return;
zpSDK.zp_goto_mark_label(150);
zpSDK.zp_close();
}
/**ๆๅฐๅๅๆ ็ญพ
* @param order ่ฎขๅ
* @param e ๅๅๅ่กจ
*/
public void printLabel(ProductEntity e) {
PrinterBase.pairedBillPrinter = pb.findPairedPrinter(context);
if(PrinterBase.pairedBillPrinter == null){
UITools.ToastMsg(context, context.getString(R.string.cashier_noitce_no_printer));
return;
}
if(e==null || e==null){
return;
}
if (!OpenPrinter(PrinterBase.pairedBillPrinter.getAddress())) {
return;
}
int base_size = 40;
if (!zpSDK.zp_page_create(58, base_size)) {
UITools.ToastMsg(context, "ๅๅปบๆๅฐ้กต้ขๅคฑ่ดฅ");
return;
}
currentY = 0;
//title
zpSDK.zp_draw_text_ex(0, currentY=currentY+4, e.getProduct_name(), "ๅฎไฝ", 4, 0, false, false, false);
zpSDK.zp_draw_line(0, currentY=currentY+1, 58, currentY, 2);
//body
zpSDK.zp_draw_barcode2d(29.3, currentY+1.5, e.getProduct_qr(), BARCODE2D_TYPE.BARCODE2D_QRCODE, 3, 5, 0);
zpSDK.zp_draw_text_ex(0, currentY+4, "่งๆ ผ๏ผ500g", null, 3, 0, false, false, false);
zpSDK.zp_draw_text_ex(0, currentY+4+4, "ไบงๅฐ๏ผๅไบฌ", null, 3, 0, false, false, false);
zpSDK.zp_draw_text_ex(0, currentY+4+8, "ๅไปท๏ผ"+Tool.fenToYuan(e.getProduct_original_price()), null, 3, 0, false, false, false);
zpSDK.zp_draw_text_ex(0, currentY+4+14, Tool.fenToYuan(e.getProduct_retail_price()), null, 6, 0, false, false, false);
zpSDK.zp_draw_line(0, currentY=currentY+21, 58, currentY, 2);
//footer
zpSDK.zp_draw_text_ex(0, currentY=currentY+4, e.getProduct_desc(), null, 3, 0, false, false, false);
zpSDK.zp_page_print(false);
zpSDK.zp_printer_status_detect();
// zpSDK.zp_goto_mark_right(150);
notice(PrinterStatus.codeOf(zpSDK.zp_printer_status_get(TIME_OUT)));
zpSDK.zp_page_free();
zpSDK.zp_close();
}
/**
* ๆฏๅฆๆๅทฒ็ป้
ๅฏน็ๆๅฐๆบ
* @return true ๆ๏ผfalse ๆฒกๆ
*/
public boolean hasPairedPrinter(){
return pb.findPairedPrinter(context) != null;
}
/**
* ๆๅฐๆบๆ็คบไฟกๆฏ
* @param status
*/
private void notice(PrinterStatus status){
Builder builder = MyDialogManager.builder(context);
builder.setTitle("ๆ็คบ").
setPositiveButton("็กฎๅฎ", null);
switch (status) {
case OK:return;
case PAPER_ERROR : builder.setMessage(PrinterStatus.PAPER_ERROR.getDesc()).show();break;
case NO_PAPER : builder.setMessage(PrinterStatus.NO_PAPER.getDesc()).show();break;
case HOT : builder.setMessage(PrinterStatus.HOT.getDesc()).show();break;
case UNKNOWN : builder.setMessage("ๆช็ฅๆๅฐๆบ็ถๆ๏ผ่ฏท็กฎไฟๆๅฐๆบๅคไบๅผๆบ็ถๆๅนถไธ้ ่ฟๅนณๆฟ").show();break;
default:break;
}
}
/**
* ๆๅฐๅๅ๏ผ้ฒๆญขๅๅ่ฟ้ฟๆ
ๅต
* @param text
* @param y
*/
private void draw_text_pinming(String text,int y){
if(paint.measureText(text) > 60){
int length = paint.breakText(text, true, 60, null);
zpSDK.zp_draw_text_ex(0, y, text.substring(0, length),null,2.4,0,false,false,false);
draw_text_pinming(text.substring(length,text.length()),y+4);
currentY = currentY+4;
}else{
zpSDK.zp_draw_text_ex(0, y, text,null,2.4,0,false,false,false);
currentY = currentY+4;
}
}
}
| [
"[email protected]"
]
| |
ea649d02a00e25ab4e1e324fcf965842ae75e1a8 | 24f09a826a8bf9b37a1e9a33b9f3da512641f57f | /gen/net/radon/sms/BuildConfig.java | adc91a3b1f9e86cb8683155b74fa0c17a5a88753 | []
| no_license | compuradon/Massive_SMS | 72c3d960417090c81915289f5ba786340a885418 | 2b5ff20579bdf8954162c4a593a9fd24b0037bc6 | refs/heads/master | 2021-01-10T21:21:28.888196 | 2012-06-02T15:31:29 | 2012-06-02T15:31:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 155 | java | /** Automatically generated file. DO NOT MODIFY */
package net.radon.sms;
public final class BuildConfig {
public final static boolean DEBUG = true;
} | [
"[email protected]"
]
| |
a50e9f17d2eb952aa20c5b9f937ffbff27beb46e | 535f6a3b89ae839bc1a710f4151a411e17df3bb6 | /app/src/main/java/com/app/biketracker/activity/activity/MapActivity.java | 578eed0dd434fe372b2a11338f94bda3bb441792 | []
| no_license | DaxeshV/biketracking | 0869214c914b3f898cc1bb17dca59a07fcc7ae32 | 3d1b27735cb3efa5f081cd9066d4d5962ff2f298 | refs/heads/master | 2023-01-31T07:15:22.943211 | 2020-12-14T12:49:50 | 2020-12-14T12:49:50 | 272,999,853 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,514 | java | package com.app.biketracker.activity.activity;
import android.Manifest;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Location;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import com.app.biketracker.R;
import com.example.easywaylocation.EasyWayLocation;
import com.example.easywaylocation.Listener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
import com.karumi.dexter.Dexter;
import com.karumi.dexter.MultiplePermissionsReport;
import com.karumi.dexter.PermissionToken;
import com.karumi.dexter.listener.PermissionRequest;
import com.karumi.dexter.listener.multi.MultiplePermissionsListener;
import java.util.List;
import static com.example.easywaylocation.EasyWayLocation.LOCATION_SETTING_REQUEST_CODE;
public class MapActivity extends AppCompatActivity implements View.OnClickListener, OnMapReadyCallback, Listener {
GoogleMap map;
EasyWayLocation easyWayLocation;
LatLng currentLatLung;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
LocationRequest request = new LocationRequest();
request.setInterval(50000);
request.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
easyWayLocation = new EasyWayLocation(MapActivity.this, request, false, MapActivity.this);
setPermission();
if (mapFragment != null) {
mapFragment.getMapAsync(MapActivity.this);
}
}
/*
method for check location permission enable or not
*/
private boolean checkPermissions() {
int permissionState = ActivityCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_FINE_LOCATION);
return permissionState == PackageManager.PERMISSION_GRANTED;
}
/*
method for if user denied permission
*/
private void showSettingsDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(MapActivity.this);
builder.setTitle(getString(R.string.lbl_alert_permission));
builder.setMessage("App require location permission to use this feature. You can grant them in app settings.");
builder.setPositiveButton(getString(R.string.lbl_go_setting), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
MapActivity.this.openSettings();
}
});
builder.setNegativeButton(getString(R.string.lbl_cancel), (dialog, which) -> {
dialog.cancel();
});
builder.show();
}
private void openSettings() {
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
Uri uri = Uri.fromParts("package", getPackageName(), null);
intent.setData(uri);
startActivityForResult(intent, 101);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == LOCATION_SETTING_REQUEST_CODE) {
easyWayLocation.onActivityResult(resultCode);
}
}
@Override
protected void onResume() {
super.onResume();
}
/*
Method for setup location permission
*/
public void setPermission() {
Dexter.withContext(MapActivity.this)
.withPermissions(
Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.ACCESS_FINE_LOCATION)
.withListener(new MultiplePermissionsListener() {
@Override
public void onPermissionsChecked(MultiplePermissionsReport report) {
// check if all permissions are granted
if (report.areAllPermissionsGranted()) {
easyWayLocation.startLocation();
} else {
showSettingsDialog();
}
// check for permanent denial of any permission
if (report.isAnyPermissionPermanentlyDenied()) {
showSettingsDialog();
}
}
@Override
public void onPermissionRationaleShouldBeShown(List<PermissionRequest> permissions, PermissionToken token) {
token.continuePermissionRequest();
}
})
.onSameThread()
.check();
}
@Override
protected void onPause() {
super.onPause();
if (checkPermissions()) {
if (easyWayLocation != null) {
easyWayLocation.endUpdates();
}
}
}
/*
method for add marker in current location
*/
private void addMarker(LatLng latLng) {
map.clear();
map.setMapType(1);
map.addMarker(new MarkerOptions().position(latLng).title("Last bike location"));
map.moveCamera(CameraUpdateFactory.newLatLng(latLng));
map.animateCamera(CameraUpdateFactory.zoomTo(12));
}
@Override
public void onClick(View v) {
}
@Override
public void onMapReady(GoogleMap googleMap) {
map = googleMap;
}
@Override
public void locationOn() {
}
/*
method for getting current location
*/
@Override
public void currentLocation(Location location) {
if (location != null) {
currentLatLung = new LatLng(location.getLatitude(), location.getLongitude());
addMarker(currentLatLung);
}
}
@Override
public void locationCancelled() {
}
} | [
"##iamhappY123"
]
| ##iamhappY123 |
979b023f239e7422053a6acf1389144348fe6bd2 | 7a5e0bf780fc7627e73c807b677431f064d0bad1 | /springbootTest/src/main/java/com/njxz/demo/service/impl/BookServiceImpl.java | 73698e687d31be4bf7be6fd45ffe2fecf4b46bf5 | []
| no_license | MandalasWang/library | 0788bcbe88d5b9cbdd05606228dfbf7aa732dc7b | 0c68b841faac3dd526f4cd1de28deb1de0823845 | refs/heads/master | 2020-04-25T15:12:03.951002 | 2019-03-08T07:27:04 | 2019-03-08T07:27:04 | 172,869,963 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,053 | java | package com.njxz.demo.service.impl;
import com.njxz.demo.domain.Book;
import com.njxz.demo.domain.BookExample;
import com.njxz.demo.domain.BorrowingBooks;
import com.njxz.demo.domain.BorrowingBooksExample;
import com.njxz.demo.domain.Vo.BookVo;
import com.njxz.demo.mapper.BookMapper;
import com.njxz.demo.mapper.BorrowingBooksMapper;
import com.njxz.demo.service.IBookService;
import com.njxz.demo.utils.page.Page;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.LinkedList;
import java.util.List;
@Service
public class BookServiceImpl implements IBookService {
@Resource
private BookMapper bookMapper;
@Resource
private BorrowingBooksMapper borrowingBooksMapper;
@Override
public List<BookVo> findBooksByBookName(String bookName) {
BookExample bookExample=new BookExample();
BookExample.Criteria criteria=bookExample.createCriteria();
criteria.andBookNameEqualTo(bookName);
List<Book> books=bookMapper.selectByExample(bookExample);
List<BookVo> bookVos=new LinkedList<>();
if(null==books){
return bookVos;
}
for(Book b:books){
BookVo bookVo=new BookVo();
bookVo.setBookId(b.getBookId());
bookVo.setBookName(b.getBookName());
bookVo.setBookAuthor(b.getBookAuthor());
bookVo.setBookPublish(b.getBookPublish());
BorrowingBooksExample borrowingBooksExample=new BorrowingBooksExample();
BorrowingBooksExample.Criteria criteria1=borrowingBooksExample.createCriteria();
criteria1.andBookIdEqualTo(b.getBookId());
List<BorrowingBooks> borrowingBooks=borrowingBooksMapper.selectByExample(borrowingBooksExample);
if(borrowingBooks==null||borrowingBooks.size()<1){
bookVo.setIsExist("ๅฏๅ");
}else{
bookVo.setIsExist("ไธๅฏๅ");
}
bookVos.add(bookVo);
}
return bookVos;
}
@Override
public Page<BookVo> findBooksByCategoryId(int categoryId, int pageNum) {
List<Book> books=bookMapper.selectByCategoryId(categoryId,(pageNum-1)*10,10);
List<BookVo> bookVos=new LinkedList<>();
Page<BookVo> page=new Page<>();
if(null==books){
page.setPageNum(1);
page.setPageCount(1);
return page;
}
for(Book b:books){
BookVo bookVo=new BookVo();
bookVo.setBookId(b.getBookId());
bookVo.setBookName(b.getBookName());
bookVo.setBookAuthor(b.getBookAuthor());
bookVo.setBookPublish(b.getBookPublish());
BorrowingBooksExample borrowingBooksExample=new BorrowingBooksExample();
BorrowingBooksExample.Criteria criteria1=borrowingBooksExample.createCriteria();
criteria1.andBookIdEqualTo(b.getBookId());
List<BorrowingBooks> borrowingBooks=borrowingBooksMapper.selectByExample(borrowingBooksExample);
if(borrowingBooks==null||borrowingBooks.size()<1){
bookVo.setIsExist("ๅฏๅ");
}else{
bookVo.setIsExist("ไธๅฏๅ");
}
bookVos.add(bookVo);
}
page.setList(bookVos);
page.setPageNum(pageNum);
page.setPageSize(10);
int bookCount=bookMapper.selectBookCountByCategoryId(categoryId);
int pageCount=0;
pageCount=bookCount/10;
if(bookCount%10!=0){
pageCount++;
}
page.setPageCount(pageCount);
if(bookCount==0){
page.setPageCount(1);
}
return page;
}
// @Override
// public List<BookVo> findBooksByCategoryId(int categoryId) {
// BookExample bookExample=new BookExample();
// BookExample.Criteria criteria=bookExample.createCriteria();
// criteria.andBookCategoryEqualTo(categoryId);
// List<Book> books=bookMapper.selectByExample(bookExample);
// List<BookVo> bookVos=new LinkedList<>();
// if(null==books){
// return bookVos;
// }
// for(Book b:books){
// BookVo bookVo=new BookVo();
// bookVo.setBookId(b.getBookId());
// bookVo.setBookName(b.getBookName());
// bookVo.setBookAuthor(b.getBookAuthor());
// bookVo.setBookPublish(b.getBookPublish());
// BorrowingBooksExample borrowingBooksExample=new BorrowingBooksExample();
// BorrowingBooksExample.Criteria criteria1=borrowingBooksExample.createCriteria();
// criteria1.andBookIdEqualTo(b.getBookId());
// List<BorrowingBooks> borrowingBooks=borrowingBooksMapper.selectByExample(borrowingBooksExample);
// if(borrowingBooks==null||borrowingBooks.size()<1){
// bookVo.setIsExist("ๅฏๅ");
// }else{
// bookVo.setIsExist("ไธๅฏๅ");
// }
// bookVos.add(bookVo);
// }
// return bookVos;
// }
}
| [
"[email protected]"
]
| |
feac8300bee87383d137dbd286b85f7f577fb2e4 | 67c9b7c453141a16522bff61c41745582256d89d | /ui/src/main/java/io/jmix/ui/app/jmxconsole/screen/inspect/MBeanInspectScreen.java | 1979e9417d465a3293cf63dab8e9f09e425b1048 | [
"Apache-2.0"
]
| permissive | stvliu/jmix-ui | c96ff392bbdb1249316a771ed36d2c7573f226a1 | 2cabf5019becb2143449f97bd61a81df68b47979 | refs/heads/master | 2023-04-04T09:32:07.777766 | 2021-03-28T11:52:03 | 2021-03-28T11:52:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,769 | java | /*
* Copyright 2020 Haulmont.
*
* 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 io.jmix.ui.app.jmxconsole.screen.inspect;
import io.jmix.core.LoadContext;
import io.jmix.core.Messages;
import io.jmix.ui.Fragments;
import io.jmix.ui.ScreenBuilders;
import io.jmix.ui.UiComponents;
import io.jmix.ui.action.Action;
import io.jmix.ui.app.jmxconsole.JmxControl;
import io.jmix.ui.app.jmxconsole.model.ManagedBeanAttribute;
import io.jmix.ui.app.jmxconsole.model.ManagedBeanInfo;
import io.jmix.ui.app.jmxconsole.screen.inspect.attribute.MBeanAttributeEditor;
import io.jmix.ui.app.jmxconsole.screen.inspect.operation.MBeanOperationFragment;
import io.jmix.ui.component.*;
import io.jmix.ui.model.CollectionContainer;
import io.jmix.ui.model.CollectionLoader;
import io.jmix.ui.screen.*;
import io.jmix.ui.theme.ThemeConstants;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import java.util.List;
import static io.jmix.ui.app.jmxconsole.AttributeHelper.convertTypeToReadableName;
@UiController("ui_MBeanInspectScreen")
@UiDescriptor("mbean-inspect-screen.xml")
@EditedEntityContainer("mbeanDc")
public class MBeanInspectScreen extends StandardEditor<ManagedBeanInfo> {
@Autowired
protected Table<ManagedBeanAttribute> attributesTable;
@Autowired
@Qualifier("attributesTable.edit")
protected Action editAttributeAction;
@Autowired
protected JmxControl jmxControl;
@Autowired
protected BoxLayout operations;
@Autowired
protected CollectionContainer<ManagedBeanAttribute> attrDc;
@Autowired
protected UiComponents uiComponents;
@Autowired
protected ScreenBuilders screenBuilders;
@Autowired
protected Messages messages;
@Autowired
protected Fragments fragments;
@Autowired
protected CollectionLoader<ManagedBeanAttribute> attrLoader;
@Autowired
protected ThemeConstants themeConstants;
@Subscribe
public void beforeShowEvent(BeforeShowEvent beforeShowEvent) {
attributesTable.setItemClickAction(editAttributeAction);
attrLoader.load();
if (CollectionUtils.isEmpty(attrDc.getItems())) {
attributesTable.setHeight(themeConstants.get("jmix.ui.jmxconsole.mbean-inspect.attributesTable.noAttributes.height")); // reduce its height if no attributes
}
initOperationsLayout();
if (getEditedEntity().getObjectName() != null) {
getWindow().setCaption(messages.formatMessage(getClass(), "caption.format", getEditedEntity().getObjectName()));
}
}
@Install(to = "attributesTable.type", subject = "columnGenerator")
protected Label<String> attributesTableTypeValueGenerator(ManagedBeanAttribute attribute) {
Label<String> label = uiComponents.create(Label.NAME);
label.setValue(convertTypeToReadableName(attribute.getType()));
return label;
}
@Install(to = "attrLoader", target = Target.DATA_LOADER)
protected List<ManagedBeanAttribute> attrDlLoadDelegate(LoadContext<ManagedBeanAttribute> loadContext) {
jmxControl.loadAttributes(getEditedEntity());
return getEditedEntity().getAttributes();
}
@Subscribe("closeBtn")
protected void close(Button.ClickEvent clickEvent) {
closeWithDiscard();
}
@Override
protected void preventUnsavedChanges(BeforeCloseEvent event) {
}
@Subscribe("attributesTable.edit")
public void editAttribute(Action.ActionPerformedEvent event) {
ManagedBeanAttribute mba = attributesTable.getSingleSelected();
if (mba == null) {
return;
}
if (!mba.getWriteable()) {
return;
}
StandardEditor<ManagedBeanAttribute> w = screenBuilders.editor(ManagedBeanAttribute.class, this)
.withScreenClass(MBeanAttributeEditor.class)
.withOpenMode(OpenMode.DIALOG)
.editEntity(mba)
.build();
w.addAfterCloseListener(afterCloseEvent -> reloadAttribute(w.getEditedEntity()));
w.show();
}
@Subscribe("attributesTable.refresh")
public void reloadAttributes(Action.ActionPerformedEvent event) {
attrLoader.load();
}
protected void reloadAttribute(ManagedBeanAttribute attribute) {
jmxControl.loadAttributeValue(attribute);
attrDc.replaceItem(attribute);
}
protected void initOperationsLayout() {
ManagedBeanInfo mbean = getEditedEntity();
if (CollectionUtils.isEmpty(mbean.getOperations())) {
Label<String> lbl = uiComponents.create(Label.TYPE_DEFAULT);
lbl.setValue(messages.getMessage(getClass(), "mbean.operations.none"));
operations.add(lbl);
} else {
mbean.getOperations().forEach(managedBeanOperation -> {
MBeanOperationFragment operationFragment = fragments.create(this, MBeanOperationFragment.class);
operationFragment.setOperation(managedBeanOperation);
Fragment fragment = operationFragment.getFragment();
operations.add(fragment);
});
}
}
} | [
"[email protected]"
]
| |
ba69a1197d302151693ae0b563d5b228e5014db2 | a266d6856ecdcca63343ee214b6210b7d0391b57 | /chapter_TicTacToe/src/main/java/ru/pimalex1978/util/methods/ConnectionUtils.java | 213b88bbf11f567f3f330bdf471cc874478176c6 | []
| no_license | alexander-pimenov/javalesson | 21aced7983d22daafc1e8dcb43341d2515ff7076 | 35b79e63279aaef94b8812f2ca9bc51212b9d952 | refs/heads/master | 2023-05-26T06:21:53.710359 | 2023-05-23T19:00:29 | 2023-05-23T19:00:29 | 226,805,717 | 0 | 0 | null | 2023-03-04T11:55:45 | 2019-12-09T06:58:50 | Java | UTF-8 | Java | false | false | 1,313 | java | package ru.pimalex1978.util.methods;
import java.lang.reflect.Proxy;
import java.sql.Connection;
import java.sql.SQLException;
/**
* Connection, which rollback all commits.
* It is used for integration test.
*
* @author Aleksei Sapozhnikov ([email protected])
* @version 0.1
* @since 0.1
*/
public class ConnectionUtils {
/**
* Create connection with autocommit=false mode and commit, when the connection is closed.
*
* @param connection connection.
* @return Connection object.
* @throws SQLException possible exception.
*/
public static Connection rollbackOnClose(Connection connection) throws SQLException {
connection.setAutoCommit(false);
return (Connection) Proxy.newProxyInstance(
ConnectionUtils.class.getClassLoader(),
new Class[]{Connection.class},
(proxy, method, args) -> {
Object rsl = null;
String mName = method.getName();
if ("close".equals(mName)) {
connection.rollback();
connection.close();
} else {
rsl = method.invoke(connection, args);
}
return rsl;
}
);
}
} | [
"[email protected]"
]
| |
a9b2544739daca244f7e99597ee29cc0bfe35137 | 41f3c15e7c2792d87082656ba0e948a70f895fbd | /zdemo-core-java/src/main/java/concurrent/jmm_shared/basic/problem/dead_lock/Demo02_PhilosopherEatProblem.java | ca07cba04b0bee15e3047f43168298a21fef0582 | [
"MIT"
]
| permissive | kinglyjn/zdemo-parent | 7e95b16656df35fc658e00ab9019a99a47ace5e6 | 3b07f91e1a9a8131f0bd8d0488385e5c2a2220a5 | refs/heads/master | 2022-12-03T02:18:26.891850 | 2020-04-03T13:16:52 | 2020-04-03T13:16:52 | 250,999,849 | 2 | 0 | MIT | 2022-11-24T08:35:36 | 2020-03-29T09:52:49 | Java | UTF-8 | Java | false | false | 2,860 | java | package concurrent.jmm_shared.basic.problem.dead_lock;
import lombok.extern.slf4j.Slf4j;
import java.util.concurrent.locks.ReentrantLock;
/**
* ๅฒๅญฆๅฎถๅฐฑ้ค้ฎ้ข๏ผไนๆฏไธไธช่ๅ็ๆญป้ไพๅญ๏ผ
* ่งฃๅณๆญป้้ฎ้ขไฝฟ็จ ReentrantLock.tryLock๏ผ่ฟๆ ทไนไธไผๅบ็ฐ ็บฟ็จ็ๅ
ฌๅนณๆง้ฎ้ข๏ผ้ฅฅ้ฅฟ้ฎ้ข๏ผ
*
*/
@Slf4j(topic = "c.concurrent.jmm_shared.basic.shared_data_security.Demo02_PhilosopherEatProblem")
public class Demo02_PhilosopherEatProblem {
public static void main(String[] args) {
Chopstick c1 = new Chopstick("1");
Chopstick c2 = new Chopstick("2");
Chopstick c3 = new Chopstick("3");
Chopstick c4 = new Chopstick("4");
Chopstick c5 = new Chopstick("5");
new Philosopher("่ๆ ผๆๅบ", c1, c2).start();
new Philosopher("ๆๆๅพ", c2, c3).start();
new Philosopher("ไบ้ๅฃซๅคๅพท", c3, c4).start();
new Philosopher("่ตซๆๅ
ๅฉ็น", c4, c5).start();
new Philosopher("้ฟๅบ็ฑณๅพท", c5, c1).start();
}
static class Philosopher extends Thread {
private Chopstick left; //ๅทฆๆ็ญทๅญ
private Chopstick right; //ๅณๆ็ญทๅญ
public Philosopher(String name, Chopstick left, Chopstick right) {
super(name);
this.left = left;
this.right = right;
}
public void eat() {
log.debug("ๅ้ฅญ");
try {
sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
@Override
public void run() {
/*
// ไผๅฏผ่ดๆญป้้ฎ้ข
while (true) {
synchronized (left) {
synchronized (right) {
eat();
}
}
}
*/
// ไธไผๅฏผ่ดๆญป้้ฎ้ข
while (true) {
boolean isLeftAcquired = left.tryLock();
if (isLeftAcquired) {
try {
// leftไปฃ็ ๅบ
boolean isRightAcquired = right.tryLock();
if (isRightAcquired) {
try {
// rightไปฃ็ ๅบ
eat();
} finally {
right.unlock();
}
}
} finally {
left.unlock();
}
}
}
}
}
static class Chopstick extends ReentrantLock {
private String name;
public Chopstick(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
}
| [
"[email protected]"
]
| |
c8601a8fd69ca10b72aa43205ca496c40820520b | af2d43529036c77bfa61af33541be81a144e0504 | /src/main/java/com/water/demo/ddd/webapi/policy/PolicyController.java | a211a7d53b61d70a995d8a878241ea7b3f344534 | [
"Apache-2.0"
]
| permissive | talipkorkmaz/ddd-demo | 3fdf628a2dd63f068e773f6f96b2f97964c759af | 0d7e03b48164f92406dbd7f43d2f400b1e921b0c | refs/heads/master | 2020-09-28T08:36:52.647258 | 2018-05-10T08:06:00 | 2018-05-10T08:06:00 | 226,735,507 | 1 | 0 | Apache-2.0 | 2019-12-08T21:39:01 | 2019-12-08T21:39:00 | null | UTF-8 | Java | false | false | 1,442 | java | package com.water.demo.ddd.webapi.policy;
import static com.water.demo.ddd.utils.constant.Constants.CONTENT_TYPE;
import static org.springframework.http.HttpStatus.CREATED;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import com.water.demo.ddd.domain.policy.PolicyApplicationService;
import com.water.demo.ddd.domain.policy.command.BuyPolicyCommand;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@RestController
@RequestMapping(value = "/policy", consumes = CONTENT_TYPE)
@Api(tags = "Policy", description = "Policy Resource", consumes = CONTENT_TYPE)
public class PolicyController {
@Autowired
private PolicyApplicationService applicationService;
@PostMapping
@ResponseStatus(CREATED)
@ApiOperation(value = "Buy Policy", notes = "This is for buying policy")
public HttpEntity<String> buyPolicy(@Valid @RequestBody BuyPolicyCommand policyDetail) {
String policyNumber = applicationService.buyPolicy(policyDetail);
return new HttpEntity<>(policyNumber);
}
}
| [
"[email protected]"
]
| |
610380831abebae728d99cfe2082b14b88f5b39e | 6981973939d36b5282f2811ad546c398c0a23a63 | /cms/clz-cms/cms-user/src/main/java/com/lili/user/mapper/dao/RoleMapper.java | fb1e97e7d86f7baa0c859a73b3228898907d15aa | []
| no_license | lucifax301/chelizi | 8ce36763b2470d1e490d336b493f0dca435a13c8 | e5f33c44a3419158fa7821fcc536cb2f06da9792 | refs/heads/master | 2022-12-25T14:48:08.779035 | 2019-05-30T08:59:55 | 2019-05-30T08:59:55 | 92,494,386 | 1 | 0 | null | 2022-12-16T01:16:34 | 2017-05-26T09:23:10 | Java | UTF-8 | Java | false | false | 972 | java | package com.lili.user.mapper.dao;
import java.util.HashMap;
import java.util.List;
import com.lili.user.model.Role;
import com.lili.user.model.RoleBDTO;
public interface RoleMapper {
List<Role> findBatch(RoleBDTO dto);
int deleteByPrimaryKey(Integer id);
int insert(Role record);
int insertSelective(Role record);
Role selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Role record);
int updateByPrimaryKey(Role record);
/**
* ็ป็จๆทๅ้
่ง่ฒ
* @param roleIds ่ง่ฒid้ๅ
* @param userId
* @return
*/
Integer allotRole(HashMap<String, Object> params);
// Integer allotRole(List<Long> roleIds,Integer userId);
/**
* ็ป่ง่ฒๅ้
ๆ้
* @param permissionIds ๆ้id้ๅ
* @param roleId
* @return
*/
Integer allotPermission(HashMap<String, Object> params);
// Integer allotPermission(List<Long> permissionIds,Integer roleId);
}
| [
"[email protected]"
]
| |
1ec2218551e2cde7d4ac9f458b5e80c5a0688a22 | dbce581ae7addc793ca928efeeafaf19b2a7663e | /validator/src/main/java/br/com/madeinjava/validator/exceptions/monetary/MonetaryException.java | f48a741623ca171c762f09fcdc53c4f992a07fb7 | []
| no_license | madeInJava/validator | ca5fcb617e56fdccbc2305f1db2333ede4a2b734 | e294a0c47ac69ff6dbe405c03f803e8f699c8c52 | refs/heads/master | 2020-04-06T06:39:06.748128 | 2013-12-30T16:11:40 | 2013-12-30T16:11:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 608 | java | package br.com.madeinjava.validator.exceptions.monetary;
import br.com.madeinjava.validator.exceptions.ValidateException;
/**
* MonetaryException.
*
* @author renan.paula
*/
public class MonetaryException extends ValidateException {
/** A constante serialVersionUID. */
private static final long serialVersionUID = 1L;
/**
* Instancia um novo monetary exception.
*/
public MonetaryException() {
super();
}
/**
* Instancia um novo monetary exception.
*
* @param message message
*/
public MonetaryException(String message) {
super(message);
}
}
| [
"[email protected]"
]
| |
569c7a8e96847c5830d60c0663b9f113ac2086a1 | 6ada5d4a49559ced1f72071f3b55978e902e8dc5 | /lib_zxing-master/build/generated/source/r/release/android/support/v7/appcompat/R.java | 875cbcd08e90d48660fb4205defbe4c6bf41f026 | []
| no_license | lusen8/Doctor | d66a7998ccd9e723fffb051dcd743e9b3235d9f7 | 492f86d872d446f10ca81ef488ab57367d993412 | refs/heads/master | 2021-01-24T06:44:29.706262 | 2017-07-16T07:12:47 | 2017-07-16T07:12:47 | 93,317,912 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 93,421 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package android.support.v7.appcompat;
public final class R {
public static final class anim {
public static int abc_fade_in = 0x7f040000;
public static int abc_fade_out = 0x7f040001;
public static int abc_grow_fade_in_from_bottom = 0x7f040002;
public static int abc_popup_enter = 0x7f040003;
public static int abc_popup_exit = 0x7f040004;
public static int abc_shrink_fade_out_from_bottom = 0x7f040005;
public static int abc_slide_in_bottom = 0x7f040006;
public static int abc_slide_in_top = 0x7f040007;
public static int abc_slide_out_bottom = 0x7f040008;
public static int abc_slide_out_top = 0x7f040009;
}
public static final class attr {
public static int actionBarDivider = 0x7f010040;
public static int actionBarItemBackground = 0x7f010041;
public static int actionBarPopupTheme = 0x7f01003a;
public static int actionBarSize = 0x7f01003f;
public static int actionBarSplitStyle = 0x7f01003c;
public static int actionBarStyle = 0x7f01003b;
public static int actionBarTabBarStyle = 0x7f010036;
public static int actionBarTabStyle = 0x7f010035;
public static int actionBarTabTextStyle = 0x7f010037;
public static int actionBarTheme = 0x7f01003d;
public static int actionBarWidgetTheme = 0x7f01003e;
public static int actionButtonStyle = 0x7f01005b;
public static int actionDropDownStyle = 0x7f010057;
public static int actionLayout = 0x7f0100ac;
public static int actionMenuTextAppearance = 0x7f010042;
public static int actionMenuTextColor = 0x7f010043;
public static int actionModeBackground = 0x7f010046;
public static int actionModeCloseButtonStyle = 0x7f010045;
public static int actionModeCloseDrawable = 0x7f010048;
public static int actionModeCopyDrawable = 0x7f01004a;
public static int actionModeCutDrawable = 0x7f010049;
public static int actionModeFindDrawable = 0x7f01004e;
public static int actionModePasteDrawable = 0x7f01004b;
public static int actionModePopupWindowStyle = 0x7f010050;
public static int actionModeSelectAllDrawable = 0x7f01004c;
public static int actionModeShareDrawable = 0x7f01004d;
public static int actionModeSplitBackground = 0x7f010047;
public static int actionModeStyle = 0x7f010044;
public static int actionModeWebSearchDrawable = 0x7f01004f;
public static int actionOverflowButtonStyle = 0x7f010038;
public static int actionOverflowMenuStyle = 0x7f010039;
public static int actionProviderClass = 0x7f0100ae;
public static int actionViewClass = 0x7f0100ad;
public static int activityChooserViewStyle = 0x7f010063;
public static int alertDialogButtonGroupStyle = 0x7f010087;
public static int alertDialogCenterButtons = 0x7f010088;
public static int alertDialogStyle = 0x7f010086;
public static int alertDialogTheme = 0x7f010089;
public static int allowStacking = 0x7f01009c;
public static int alpha = 0x7f01009d;
public static int arrowHeadLength = 0x7f0100a4;
public static int arrowShaftLength = 0x7f0100a5;
public static int autoCompleteTextViewStyle = 0x7f01008e;
public static int background = 0x7f01000c;
public static int backgroundSplit = 0x7f01000e;
public static int backgroundStacked = 0x7f01000d;
public static int backgroundTint = 0x7f0100df;
public static int backgroundTintMode = 0x7f0100e0;
public static int barLength = 0x7f0100a6;
public static int borderlessButtonStyle = 0x7f010060;
public static int buttonBarButtonStyle = 0x7f01005d;
public static int buttonBarNegativeButtonStyle = 0x7f01008c;
public static int buttonBarNeutralButtonStyle = 0x7f01008d;
public static int buttonBarPositiveButtonStyle = 0x7f01008b;
public static int buttonBarStyle = 0x7f01005c;
public static int buttonGravity = 0x7f0100d4;
public static int buttonPanelSideLayout = 0x7f010021;
public static int buttonStyle = 0x7f01008f;
public static int buttonStyleSmall = 0x7f010090;
public static int buttonTint = 0x7f01009e;
public static int buttonTintMode = 0x7f01009f;
public static int checkboxStyle = 0x7f010091;
public static int checkedTextViewStyle = 0x7f010092;
public static int closeIcon = 0x7f0100b7;
public static int closeItemLayout = 0x7f01001e;
public static int collapseContentDescription = 0x7f0100d6;
public static int collapseIcon = 0x7f0100d5;
public static int color = 0x7f0100a0;
public static int colorAccent = 0x7f01007e;
public static int colorBackgroundFloating = 0x7f010085;
public static int colorButtonNormal = 0x7f010082;
public static int colorControlActivated = 0x7f010080;
public static int colorControlHighlight = 0x7f010081;
public static int colorControlNormal = 0x7f01007f;
public static int colorPrimary = 0x7f01007c;
public static int colorPrimaryDark = 0x7f01007d;
public static int colorSwitchThumbNormal = 0x7f010083;
public static int commitIcon = 0x7f0100bc;
public static int contentInsetEnd = 0x7f010017;
public static int contentInsetEndWithActions = 0x7f01001b;
public static int contentInsetLeft = 0x7f010018;
public static int contentInsetRight = 0x7f010019;
public static int contentInsetStart = 0x7f010016;
public static int contentInsetStartWithNavigation = 0x7f01001a;
public static int controlBackground = 0x7f010084;
public static int customNavigationLayout = 0x7f01000f;
public static int defaultQueryHint = 0x7f0100b6;
public static int dialogPreferredPadding = 0x7f010055;
public static int dialogTheme = 0x7f010054;
public static int displayOptions = 0x7f010005;
public static int divider = 0x7f01000b;
public static int dividerHorizontal = 0x7f010062;
public static int dividerPadding = 0x7f0100aa;
public static int dividerVertical = 0x7f010061;
public static int drawableSize = 0x7f0100a2;
public static int drawerArrowStyle = 0x7f010000;
public static int dropDownListViewStyle = 0x7f010074;
public static int dropdownListPreferredItemHeight = 0x7f010058;
public static int editTextBackground = 0x7f010069;
public static int editTextColor = 0x7f010068;
public static int editTextStyle = 0x7f010093;
public static int elevation = 0x7f01001c;
public static int expandActivityOverflowButtonDrawable = 0x7f010020;
public static int gapBetweenBars = 0x7f0100a3;
public static int goIcon = 0x7f0100b8;
public static int height = 0x7f010001;
public static int hideOnContentScroll = 0x7f010015;
public static int homeAsUpIndicator = 0x7f01005a;
public static int homeLayout = 0x7f010010;
public static int icon = 0x7f010009;
public static int iconifiedByDefault = 0x7f0100b4;
public static int imageButtonStyle = 0x7f01006a;
public static int indeterminateProgressStyle = 0x7f010012;
public static int initialActivityCount = 0x7f01001f;
public static int isLightTheme = 0x7f010002;
public static int itemPadding = 0x7f010014;
public static int layout = 0x7f0100b3;
public static int listChoiceBackgroundIndicator = 0x7f01007b;
public static int listDividerAlertDialog = 0x7f010056;
public static int listItemLayout = 0x7f010025;
public static int listLayout = 0x7f010022;
public static int listMenuViewStyle = 0x7f01009b;
public static int listPopupWindowStyle = 0x7f010075;
public static int listPreferredItemHeight = 0x7f01006f;
public static int listPreferredItemHeightLarge = 0x7f010071;
public static int listPreferredItemHeightSmall = 0x7f010070;
public static int listPreferredItemPaddingLeft = 0x7f010072;
public static int listPreferredItemPaddingRight = 0x7f010073;
public static int logo = 0x7f01000a;
public static int logoDescription = 0x7f0100d9;
public static int maxButtonHeight = 0x7f0100d3;
public static int measureWithLargestChild = 0x7f0100a8;
public static int multiChoiceItemLayout = 0x7f010023;
public static int navigationContentDescription = 0x7f0100d8;
public static int navigationIcon = 0x7f0100d7;
public static int navigationMode = 0x7f010004;
public static int overlapAnchor = 0x7f0100b1;
public static int paddingEnd = 0x7f0100dd;
public static int paddingStart = 0x7f0100dc;
public static int panelBackground = 0x7f010078;
public static int panelMenuListTheme = 0x7f01007a;
public static int panelMenuListWidth = 0x7f010079;
public static int popupMenuStyle = 0x7f010066;
public static int popupTheme = 0x7f01001d;
public static int popupWindowStyle = 0x7f010067;
public static int preserveIconSpacing = 0x7f0100af;
public static int progressBarPadding = 0x7f010013;
public static int progressBarStyle = 0x7f010011;
public static int queryBackground = 0x7f0100be;
public static int queryHint = 0x7f0100b5;
public static int radioButtonStyle = 0x7f010094;
public static int ratingBarStyle = 0x7f010095;
public static int ratingBarStyleIndicator = 0x7f010096;
public static int ratingBarStyleSmall = 0x7f010097;
public static int searchHintIcon = 0x7f0100ba;
public static int searchIcon = 0x7f0100b9;
public static int searchViewStyle = 0x7f01006e;
public static int seekBarStyle = 0x7f010098;
public static int selectableItemBackground = 0x7f01005e;
public static int selectableItemBackgroundBorderless = 0x7f01005f;
public static int showAsAction = 0x7f0100ab;
public static int showDividers = 0x7f0100a9;
public static int showText = 0x7f0100ca;
public static int singleChoiceItemLayout = 0x7f010024;
public static int spinBars = 0x7f0100a1;
public static int spinnerDropDownItemStyle = 0x7f010059;
public static int spinnerStyle = 0x7f010099;
public static int splitTrack = 0x7f0100c9;
public static int srcCompat = 0x7f010026;
public static int state_above_anchor = 0x7f0100b2;
public static int subMenuArrow = 0x7f0100b0;
public static int submitBackground = 0x7f0100bf;
public static int subtitle = 0x7f010006;
public static int subtitleTextAppearance = 0x7f0100cc;
public static int subtitleTextColor = 0x7f0100db;
public static int subtitleTextStyle = 0x7f010008;
public static int suggestionRowLayout = 0x7f0100bd;
public static int switchMinWidth = 0x7f0100c7;
public static int switchPadding = 0x7f0100c8;
public static int switchStyle = 0x7f01009a;
public static int switchTextAppearance = 0x7f0100c6;
public static int textAllCaps = 0x7f01002a;
public static int textAppearanceLargePopupMenu = 0x7f010051;
public static int textAppearanceListItem = 0x7f010076;
public static int textAppearanceListItemSmall = 0x7f010077;
public static int textAppearancePopupMenuHeader = 0x7f010053;
public static int textAppearanceSearchResultSubtitle = 0x7f01006c;
public static int textAppearanceSearchResultTitle = 0x7f01006b;
public static int textAppearanceSmallPopupMenu = 0x7f010052;
public static int textColorAlertDialogListItem = 0x7f01008a;
public static int textColorSearchUrl = 0x7f01006d;
public static int theme = 0x7f0100de;
public static int thickness = 0x7f0100a7;
public static int thumbTextPadding = 0x7f0100c5;
public static int thumbTint = 0x7f0100c0;
public static int thumbTintMode = 0x7f0100c1;
public static int tickMark = 0x7f010027;
public static int tickMarkTint = 0x7f010028;
public static int tickMarkTintMode = 0x7f010029;
public static int title = 0x7f010003;
public static int titleMargin = 0x7f0100cd;
public static int titleMarginBottom = 0x7f0100d1;
public static int titleMarginEnd = 0x7f0100cf;
public static int titleMarginStart = 0x7f0100ce;
public static int titleMarginTop = 0x7f0100d0;
public static int titleMargins = 0x7f0100d2;
public static int titleTextAppearance = 0x7f0100cb;
public static int titleTextColor = 0x7f0100da;
public static int titleTextStyle = 0x7f010007;
public static int toolbarNavigationButtonStyle = 0x7f010065;
public static int toolbarStyle = 0x7f010064;
public static int track = 0x7f0100c2;
public static int trackTint = 0x7f0100c3;
public static int trackTintMode = 0x7f0100c4;
public static int voiceIcon = 0x7f0100bb;
public static int windowActionBar = 0x7f01002b;
public static int windowActionBarOverlay = 0x7f01002d;
public static int windowActionModeOverlay = 0x7f01002e;
public static int windowFixedHeightMajor = 0x7f010032;
public static int windowFixedHeightMinor = 0x7f010030;
public static int windowFixedWidthMajor = 0x7f01002f;
public static int windowFixedWidthMinor = 0x7f010031;
public static int windowMinWidthMajor = 0x7f010033;
public static int windowMinWidthMinor = 0x7f010034;
public static int windowNoTitle = 0x7f01002c;
}
public static final class bool {
public static int abc_action_bar_embed_tabs = 0x7f0a0000;
public static int abc_allow_stacked_button_bar = 0x7f0a0001;
public static int abc_config_actionMenuItemAllCaps = 0x7f0a0002;
public static int abc_config_closeDialogWhenTouchOutside = 0x7f0a0003;
public static int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f0a0004;
}
public static final class color {
public static int abc_background_cache_hint_selector_material_dark = 0x7f0c0043;
public static int abc_background_cache_hint_selector_material_light = 0x7f0c0044;
public static int abc_btn_colored_borderless_text_material = 0x7f0c0045;
public static int abc_color_highlight_material = 0x7f0c0046;
public static int abc_input_method_navigation_guard = 0x7f0c0000;
public static int abc_primary_text_disable_only_material_dark = 0x7f0c0047;
public static int abc_primary_text_disable_only_material_light = 0x7f0c0048;
public static int abc_primary_text_material_dark = 0x7f0c0049;
public static int abc_primary_text_material_light = 0x7f0c004a;
public static int abc_search_url_text = 0x7f0c004b;
public static int abc_search_url_text_normal = 0x7f0c0001;
public static int abc_search_url_text_pressed = 0x7f0c0002;
public static int abc_search_url_text_selected = 0x7f0c0003;
public static int abc_secondary_text_material_dark = 0x7f0c004c;
public static int abc_secondary_text_material_light = 0x7f0c004d;
public static int abc_tint_btn_checkable = 0x7f0c004e;
public static int abc_tint_default = 0x7f0c004f;
public static int abc_tint_edittext = 0x7f0c0050;
public static int abc_tint_seek_thumb = 0x7f0c0051;
public static int abc_tint_spinner = 0x7f0c0052;
public static int abc_tint_switch_thumb = 0x7f0c0053;
public static int abc_tint_switch_track = 0x7f0c0054;
public static int accent_material_dark = 0x7f0c0004;
public static int accent_material_light = 0x7f0c0005;
public static int background_floating_material_dark = 0x7f0c0006;
public static int background_floating_material_light = 0x7f0c0007;
public static int background_material_dark = 0x7f0c0008;
public static int background_material_light = 0x7f0c0009;
public static int bright_foreground_disabled_material_dark = 0x7f0c000a;
public static int bright_foreground_disabled_material_light = 0x7f0c000b;
public static int bright_foreground_inverse_material_dark = 0x7f0c000c;
public static int bright_foreground_inverse_material_light = 0x7f0c000d;
public static int bright_foreground_material_dark = 0x7f0c000e;
public static int bright_foreground_material_light = 0x7f0c000f;
public static int button_material_dark = 0x7f0c0010;
public static int button_material_light = 0x7f0c0011;
public static int dim_foreground_disabled_material_dark = 0x7f0c0016;
public static int dim_foreground_disabled_material_light = 0x7f0c0017;
public static int dim_foreground_material_dark = 0x7f0c0018;
public static int dim_foreground_material_light = 0x7f0c0019;
public static int foreground_material_dark = 0x7f0c001a;
public static int foreground_material_light = 0x7f0c001b;
public static int highlighted_text_material_dark = 0x7f0c001c;
public static int highlighted_text_material_light = 0x7f0c001d;
public static int hint_foreground_material_dark = 0x7f0c001e;
public static int hint_foreground_material_light = 0x7f0c001f;
public static int material_blue_grey_800 = 0x7f0c0021;
public static int material_blue_grey_900 = 0x7f0c0022;
public static int material_blue_grey_950 = 0x7f0c0023;
public static int material_deep_teal_200 = 0x7f0c0024;
public static int material_deep_teal_500 = 0x7f0c0025;
public static int material_grey_100 = 0x7f0c0026;
public static int material_grey_300 = 0x7f0c0027;
public static int material_grey_50 = 0x7f0c0028;
public static int material_grey_600 = 0x7f0c0029;
public static int material_grey_800 = 0x7f0c002a;
public static int material_grey_850 = 0x7f0c002b;
public static int material_grey_900 = 0x7f0c002c;
public static int primary_dark_material_dark = 0x7f0c002d;
public static int primary_dark_material_light = 0x7f0c002e;
public static int primary_material_dark = 0x7f0c002f;
public static int primary_material_light = 0x7f0c0030;
public static int primary_text_default_material_dark = 0x7f0c0031;
public static int primary_text_default_material_light = 0x7f0c0032;
public static int primary_text_disabled_material_dark = 0x7f0c0033;
public static int primary_text_disabled_material_light = 0x7f0c0034;
public static int ripple_material_dark = 0x7f0c0037;
public static int ripple_material_light = 0x7f0c0038;
public static int secondary_text_default_material_dark = 0x7f0c0039;
public static int secondary_text_default_material_light = 0x7f0c003a;
public static int secondary_text_disabled_material_dark = 0x7f0c003b;
public static int secondary_text_disabled_material_light = 0x7f0c003c;
public static int switch_thumb_disabled_material_dark = 0x7f0c003d;
public static int switch_thumb_disabled_material_light = 0x7f0c003e;
public static int switch_thumb_material_dark = 0x7f0c0055;
public static int switch_thumb_material_light = 0x7f0c0056;
public static int switch_thumb_normal_material_dark = 0x7f0c003f;
public static int switch_thumb_normal_material_light = 0x7f0c0040;
}
public static final class dimen {
public static int abc_action_bar_content_inset_material = 0x7f08000c;
public static int abc_action_bar_content_inset_with_nav = 0x7f08000d;
public static int abc_action_bar_default_height_material = 0x7f080001;
public static int abc_action_bar_default_padding_end_material = 0x7f08000e;
public static int abc_action_bar_default_padding_start_material = 0x7f08000f;
public static int abc_action_bar_icon_vertical_padding_material = 0x7f080012;
public static int abc_action_bar_overflow_padding_end_material = 0x7f080013;
public static int abc_action_bar_overflow_padding_start_material = 0x7f080014;
public static int abc_action_bar_progress_bar_size = 0x7f080002;
public static int abc_action_bar_stacked_max_height = 0x7f080015;
public static int abc_action_bar_stacked_tab_max_width = 0x7f080016;
public static int abc_action_bar_subtitle_bottom_margin_material = 0x7f080017;
public static int abc_action_bar_subtitle_top_margin_material = 0x7f080018;
public static int abc_action_button_min_height_material = 0x7f080019;
public static int abc_action_button_min_width_material = 0x7f08001a;
public static int abc_action_button_min_width_overflow_material = 0x7f08001b;
public static int abc_alert_dialog_button_bar_height = 0x7f080000;
public static int abc_button_inset_horizontal_material = 0x7f08001c;
public static int abc_button_inset_vertical_material = 0x7f08001d;
public static int abc_button_padding_horizontal_material = 0x7f08001e;
public static int abc_button_padding_vertical_material = 0x7f08001f;
public static int abc_cascading_menus_min_smallest_width = 0x7f080020;
public static int abc_config_prefDialogWidth = 0x7f080005;
public static int abc_control_corner_material = 0x7f080021;
public static int abc_control_inset_material = 0x7f080022;
public static int abc_control_padding_material = 0x7f080023;
public static int abc_dialog_fixed_height_major = 0x7f080006;
public static int abc_dialog_fixed_height_minor = 0x7f080007;
public static int abc_dialog_fixed_width_major = 0x7f080008;
public static int abc_dialog_fixed_width_minor = 0x7f080009;
public static int abc_dialog_list_padding_vertical_material = 0x7f080024;
public static int abc_dialog_min_width_major = 0x7f08000a;
public static int abc_dialog_min_width_minor = 0x7f08000b;
public static int abc_dialog_padding_material = 0x7f080025;
public static int abc_dialog_padding_top_material = 0x7f080026;
public static int abc_disabled_alpha_material_dark = 0x7f080027;
public static int abc_disabled_alpha_material_light = 0x7f080028;
public static int abc_dropdownitem_icon_width = 0x7f080029;
public static int abc_dropdownitem_text_padding_left = 0x7f08002a;
public static int abc_dropdownitem_text_padding_right = 0x7f08002b;
public static int abc_edit_text_inset_bottom_material = 0x7f08002c;
public static int abc_edit_text_inset_horizontal_material = 0x7f08002d;
public static int abc_edit_text_inset_top_material = 0x7f08002e;
public static int abc_floating_window_z = 0x7f08002f;
public static int abc_list_item_padding_horizontal_material = 0x7f080030;
public static int abc_panel_menu_list_width = 0x7f080031;
public static int abc_progress_bar_height_material = 0x7f080032;
public static int abc_search_view_preferred_height = 0x7f080033;
public static int abc_search_view_preferred_width = 0x7f080034;
public static int abc_seekbar_track_background_height_material = 0x7f080035;
public static int abc_seekbar_track_progress_height_material = 0x7f080036;
public static int abc_select_dialog_padding_start_material = 0x7f080037;
public static int abc_switch_padding = 0x7f080010;
public static int abc_text_size_body_1_material = 0x7f080038;
public static int abc_text_size_body_2_material = 0x7f080039;
public static int abc_text_size_button_material = 0x7f08003a;
public static int abc_text_size_caption_material = 0x7f08003b;
public static int abc_text_size_display_1_material = 0x7f08003c;
public static int abc_text_size_display_2_material = 0x7f08003d;
public static int abc_text_size_display_3_material = 0x7f08003e;
public static int abc_text_size_display_4_material = 0x7f08003f;
public static int abc_text_size_headline_material = 0x7f080040;
public static int abc_text_size_large_material = 0x7f080041;
public static int abc_text_size_medium_material = 0x7f080042;
public static int abc_text_size_menu_header_material = 0x7f080043;
public static int abc_text_size_menu_material = 0x7f080044;
public static int abc_text_size_small_material = 0x7f080045;
public static int abc_text_size_subhead_material = 0x7f080046;
public static int abc_text_size_subtitle_material_toolbar = 0x7f080003;
public static int abc_text_size_title_material = 0x7f080047;
public static int abc_text_size_title_material_toolbar = 0x7f080004;
public static int disabled_alpha_material_dark = 0x7f080049;
public static int disabled_alpha_material_light = 0x7f08004a;
public static int highlight_alpha_material_colored = 0x7f08004b;
public static int highlight_alpha_material_dark = 0x7f08004c;
public static int highlight_alpha_material_light = 0x7f08004d;
public static int notification_large_icon_height = 0x7f08004e;
public static int notification_large_icon_width = 0x7f08004f;
public static int notification_subtext_size = 0x7f080050;
}
public static final class drawable {
public static int abc_ab_share_pack_mtrl_alpha = 0x7f020000;
public static int abc_action_bar_item_background_material = 0x7f020001;
public static int abc_btn_borderless_material = 0x7f020002;
public static int abc_btn_check_material = 0x7f020003;
public static int abc_btn_check_to_on_mtrl_000 = 0x7f020004;
public static int abc_btn_check_to_on_mtrl_015 = 0x7f020005;
public static int abc_btn_colored_material = 0x7f020006;
public static int abc_btn_default_mtrl_shape = 0x7f020007;
public static int abc_btn_radio_material = 0x7f020008;
public static int abc_btn_radio_to_on_mtrl_000 = 0x7f020009;
public static int abc_btn_radio_to_on_mtrl_015 = 0x7f02000a;
public static int abc_btn_switch_to_on_mtrl_00001 = 0x7f02000b;
public static int abc_btn_switch_to_on_mtrl_00012 = 0x7f02000c;
public static int abc_cab_background_internal_bg = 0x7f02000d;
public static int abc_cab_background_top_material = 0x7f02000e;
public static int abc_cab_background_top_mtrl_alpha = 0x7f02000f;
public static int abc_control_background_material = 0x7f020010;
public static int abc_dialog_material_background = 0x7f020011;
public static int abc_edit_text_material = 0x7f020012;
public static int abc_ic_ab_back_material = 0x7f020013;
public static int abc_ic_arrow_drop_right_black_24dp = 0x7f020014;
public static int abc_ic_clear_material = 0x7f020015;
public static int abc_ic_commit_search_api_mtrl_alpha = 0x7f020016;
public static int abc_ic_go_search_api_material = 0x7f020017;
public static int abc_ic_menu_copy_mtrl_am_alpha = 0x7f020018;
public static int abc_ic_menu_cut_mtrl_alpha = 0x7f020019;
public static int abc_ic_menu_overflow_material = 0x7f02001a;
public static int abc_ic_menu_paste_mtrl_am_alpha = 0x7f02001b;
public static int abc_ic_menu_selectall_mtrl_alpha = 0x7f02001c;
public static int abc_ic_menu_share_mtrl_alpha = 0x7f02001d;
public static int abc_ic_search_api_material = 0x7f02001e;
public static int abc_ic_star_black_16dp = 0x7f02001f;
public static int abc_ic_star_black_36dp = 0x7f020020;
public static int abc_ic_star_black_48dp = 0x7f020021;
public static int abc_ic_star_half_black_16dp = 0x7f020022;
public static int abc_ic_star_half_black_36dp = 0x7f020023;
public static int abc_ic_star_half_black_48dp = 0x7f020024;
public static int abc_ic_voice_search_api_material = 0x7f020025;
public static int abc_item_background_holo_dark = 0x7f020026;
public static int abc_item_background_holo_light = 0x7f020027;
public static int abc_list_divider_mtrl_alpha = 0x7f020028;
public static int abc_list_focused_holo = 0x7f020029;
public static int abc_list_longpressed_holo = 0x7f02002a;
public static int abc_list_pressed_holo_dark = 0x7f02002b;
public static int abc_list_pressed_holo_light = 0x7f02002c;
public static int abc_list_selector_background_transition_holo_dark = 0x7f02002d;
public static int abc_list_selector_background_transition_holo_light = 0x7f02002e;
public static int abc_list_selector_disabled_holo_dark = 0x7f02002f;
public static int abc_list_selector_disabled_holo_light = 0x7f020030;
public static int abc_list_selector_holo_dark = 0x7f020031;
public static int abc_list_selector_holo_light = 0x7f020032;
public static int abc_menu_hardkey_panel_mtrl_mult = 0x7f020033;
public static int abc_popup_background_mtrl_mult = 0x7f020034;
public static int abc_ratingbar_indicator_material = 0x7f020035;
public static int abc_ratingbar_material = 0x7f020036;
public static int abc_ratingbar_small_material = 0x7f020037;
public static int abc_scrubber_control_off_mtrl_alpha = 0x7f020038;
public static int abc_scrubber_control_to_pressed_mtrl_000 = 0x7f020039;
public static int abc_scrubber_control_to_pressed_mtrl_005 = 0x7f02003a;
public static int abc_scrubber_primary_mtrl_alpha = 0x7f02003b;
public static int abc_scrubber_track_mtrl_alpha = 0x7f02003c;
public static int abc_seekbar_thumb_material = 0x7f02003d;
public static int abc_seekbar_tick_mark_material = 0x7f02003e;
public static int abc_seekbar_track_material = 0x7f02003f;
public static int abc_spinner_mtrl_am_alpha = 0x7f020040;
public static int abc_spinner_textfield_background_material = 0x7f020041;
public static int abc_switch_thumb_material = 0x7f020042;
public static int abc_switch_track_mtrl_alpha = 0x7f020043;
public static int abc_tab_indicator_material = 0x7f020044;
public static int abc_tab_indicator_mtrl_alpha = 0x7f020045;
public static int abc_text_cursor_material = 0x7f020046;
public static int abc_textfield_activated_mtrl_alpha = 0x7f020047;
public static int abc_textfield_default_mtrl_alpha = 0x7f020048;
public static int abc_textfield_search_activated_mtrl_alpha = 0x7f020049;
public static int abc_textfield_search_default_mtrl_alpha = 0x7f02004a;
public static int abc_textfield_search_material = 0x7f02004b;
public static int notification_template_icon_bg = 0x7f02004c;
}
public static final class id {
public static int action0 = 0x7f0d0062;
public static int action_bar = 0x7f0d0051;
public static int action_bar_activity_content = 0x7f0d0000;
public static int action_bar_container = 0x7f0d0050;
public static int action_bar_root = 0x7f0d004c;
public static int action_bar_spinner = 0x7f0d0001;
public static int action_bar_subtitle = 0x7f0d0031;
public static int action_bar_title = 0x7f0d0030;
public static int action_context_bar = 0x7f0d0052;
public static int action_divider = 0x7f0d0066;
public static int action_menu_divider = 0x7f0d0002;
public static int action_menu_presenter = 0x7f0d0003;
public static int action_mode_bar = 0x7f0d004e;
public static int action_mode_bar_stub = 0x7f0d004d;
public static int action_mode_close_button = 0x7f0d0032;
public static int activity_chooser_view_content = 0x7f0d0033;
public static int add = 0x7f0d001f;
public static int alertTitle = 0x7f0d003f;
public static int always = 0x7f0d0029;
public static int beginning = 0x7f0d0026;
public static int bottom = 0x7f0d002e;
public static int buttonPanel = 0x7f0d003a;
public static int cancel_action = 0x7f0d0063;
public static int checkbox = 0x7f0d0048;
public static int chronometer = 0x7f0d0069;
public static int collapseActionView = 0x7f0d002a;
public static int contentPanel = 0x7f0d0040;
public static int custom = 0x7f0d0046;
public static int customPanel = 0x7f0d0045;
public static int decor_content_parent = 0x7f0d004f;
public static int default_activity_button = 0x7f0d0036;
public static int disableHome = 0x7f0d0018;
public static int edit_query = 0x7f0d0053;
public static int end = 0x7f0d0027;
public static int end_padder = 0x7f0d006e;
public static int expand_activities_button = 0x7f0d0034;
public static int expanded_menu = 0x7f0d0047;
public static int home = 0x7f0d000a;
public static int homeAsUp = 0x7f0d0019;
public static int icon = 0x7f0d0038;
public static int ifRoom = 0x7f0d002b;
public static int image = 0x7f0d0035;
public static int info = 0x7f0d006d;
public static int line1 = 0x7f0d0067;
public static int line3 = 0x7f0d006b;
public static int listMode = 0x7f0d0015;
public static int list_item = 0x7f0d0037;
public static int media_actions = 0x7f0d0065;
public static int middle = 0x7f0d0028;
public static int multiply = 0x7f0d0020;
public static int never = 0x7f0d002c;
public static int none = 0x7f0d001a;
public static int normal = 0x7f0d0016;
public static int parentPanel = 0x7f0d003c;
public static int progress_circular = 0x7f0d000c;
public static int progress_horizontal = 0x7f0d000d;
public static int radio = 0x7f0d004a;
public static int screen = 0x7f0d0021;
public static int scrollIndicatorDown = 0x7f0d0044;
public static int scrollIndicatorUp = 0x7f0d0041;
public static int scrollView = 0x7f0d0042;
public static int search_badge = 0x7f0d0055;
public static int search_bar = 0x7f0d0054;
public static int search_button = 0x7f0d0056;
public static int search_close_btn = 0x7f0d005b;
public static int search_edit_frame = 0x7f0d0057;
public static int search_go_btn = 0x7f0d005d;
public static int search_mag_icon = 0x7f0d0058;
public static int search_plate = 0x7f0d0059;
public static int search_src_text = 0x7f0d005a;
public static int search_voice_btn = 0x7f0d005e;
public static int select_dialog_listview = 0x7f0d005f;
public static int shortcut = 0x7f0d0049;
public static int showCustom = 0x7f0d001b;
public static int showHome = 0x7f0d001c;
public static int showTitle = 0x7f0d001d;
public static int spacer = 0x7f0d003b;
public static int split_action_bar = 0x7f0d0013;
public static int src_atop = 0x7f0d0022;
public static int src_in = 0x7f0d0023;
public static int src_over = 0x7f0d0024;
public static int status_bar_latest_event_content = 0x7f0d0064;
public static int submenuarrow = 0x7f0d004b;
public static int submit_area = 0x7f0d005c;
public static int tabMode = 0x7f0d0017;
public static int text = 0x7f0d006c;
public static int text2 = 0x7f0d006a;
public static int textSpacerNoButtons = 0x7f0d0043;
public static int time = 0x7f0d0068;
public static int title = 0x7f0d0039;
public static int title_template = 0x7f0d003e;
public static int top = 0x7f0d002f;
public static int topPanel = 0x7f0d003d;
public static int up = 0x7f0d0014;
public static int useLogo = 0x7f0d001e;
public static int withText = 0x7f0d002d;
public static int wrap_content = 0x7f0d0025;
}
public static final class integer {
public static int abc_config_activityDefaultDur = 0x7f0e0000;
public static int abc_config_activityShortDur = 0x7f0e0001;
public static int cancel_button_image_alpha = 0x7f0e0002;
public static int status_bar_notification_info_maxnum = 0x7f0e0003;
}
public static final class layout {
public static int abc_action_bar_title_item = 0x7f030000;
public static int abc_action_bar_up_container = 0x7f030001;
public static int abc_action_bar_view_list_nav_layout = 0x7f030002;
public static int abc_action_menu_item_layout = 0x7f030003;
public static int abc_action_menu_layout = 0x7f030004;
public static int abc_action_mode_bar = 0x7f030005;
public static int abc_action_mode_close_item_material = 0x7f030006;
public static int abc_activity_chooser_view = 0x7f030007;
public static int abc_activity_chooser_view_list_item = 0x7f030008;
public static int abc_alert_dialog_button_bar_material = 0x7f030009;
public static int abc_alert_dialog_material = 0x7f03000a;
public static int abc_dialog_title_material = 0x7f03000b;
public static int abc_expanded_menu_layout = 0x7f03000c;
public static int abc_list_menu_item_checkbox = 0x7f03000d;
public static int abc_list_menu_item_icon = 0x7f03000e;
public static int abc_list_menu_item_layout = 0x7f03000f;
public static int abc_list_menu_item_radio = 0x7f030010;
public static int abc_popup_menu_header_item_layout = 0x7f030011;
public static int abc_popup_menu_item_layout = 0x7f030012;
public static int abc_screen_content_include = 0x7f030013;
public static int abc_screen_simple = 0x7f030014;
public static int abc_screen_simple_overlay_action_mode = 0x7f030015;
public static int abc_screen_toolbar = 0x7f030016;
public static int abc_search_dropdown_item_icons_2line = 0x7f030017;
public static int abc_search_view = 0x7f030018;
public static int abc_select_dialog_material = 0x7f030019;
public static int notification_media_action = 0x7f03001b;
public static int notification_media_cancel_action = 0x7f03001c;
public static int notification_template_big_media = 0x7f03001d;
public static int notification_template_big_media_narrow = 0x7f03001e;
public static int notification_template_lines = 0x7f03001f;
public static int notification_template_media = 0x7f030020;
public static int notification_template_part_chronometer = 0x7f030021;
public static int notification_template_part_time = 0x7f030022;
public static int select_dialog_item_material = 0x7f030023;
public static int select_dialog_multichoice_material = 0x7f030024;
public static int select_dialog_singlechoice_material = 0x7f030025;
public static int support_simple_spinner_dropdown_item = 0x7f030026;
}
public static final class string {
public static int abc_action_bar_home_description = 0x7f070000;
public static int abc_action_bar_home_description_format = 0x7f070001;
public static int abc_action_bar_home_subtitle_description_format = 0x7f070002;
public static int abc_action_bar_up_description = 0x7f070003;
public static int abc_action_menu_overflow_description = 0x7f070004;
public static int abc_action_mode_done = 0x7f070005;
public static int abc_activity_chooser_view_see_all = 0x7f070006;
public static int abc_activitychooserview_choose_application = 0x7f070007;
public static int abc_capital_off = 0x7f070008;
public static int abc_capital_on = 0x7f070009;
public static int abc_font_family_body_1_material = 0x7f070090;
public static int abc_font_family_body_2_material = 0x7f070091;
public static int abc_font_family_button_material = 0x7f070092;
public static int abc_font_family_caption_material = 0x7f070093;
public static int abc_font_family_display_1_material = 0x7f070094;
public static int abc_font_family_display_2_material = 0x7f070095;
public static int abc_font_family_display_3_material = 0x7f070096;
public static int abc_font_family_display_4_material = 0x7f070097;
public static int abc_font_family_headline_material = 0x7f070098;
public static int abc_font_family_menu_material = 0x7f070099;
public static int abc_font_family_subhead_material = 0x7f07009a;
public static int abc_font_family_title_material = 0x7f07009b;
public static int abc_search_hint = 0x7f07000a;
public static int abc_searchview_description_clear = 0x7f07000b;
public static int abc_searchview_description_query = 0x7f07000c;
public static int abc_searchview_description_search = 0x7f07000d;
public static int abc_searchview_description_submit = 0x7f07000e;
public static int abc_searchview_description_voice = 0x7f07000f;
public static int abc_shareactionprovider_share_with = 0x7f070010;
public static int abc_shareactionprovider_share_with_application = 0x7f070011;
public static int abc_toolbar_collapse_description = 0x7f070012;
public static int status_bar_notification_info_overflow = 0x7f070013;
}
public static final class style {
public static int AlertDialog_AppCompat = 0x7f09008a;
public static int AlertDialog_AppCompat_Light = 0x7f09008b;
public static int Animation_AppCompat_Dialog = 0x7f09008c;
public static int Animation_AppCompat_DropDownUp = 0x7f09008d;
public static int Base_AlertDialog_AppCompat = 0x7f09008e;
public static int Base_AlertDialog_AppCompat_Light = 0x7f09008f;
public static int Base_Animation_AppCompat_Dialog = 0x7f090090;
public static int Base_Animation_AppCompat_DropDownUp = 0x7f090091;
public static int Base_DialogWindowTitleBackground_AppCompat = 0x7f090093;
public static int Base_DialogWindowTitle_AppCompat = 0x7f090092;
public static int Base_TextAppearance_AppCompat = 0x7f090038;
public static int Base_TextAppearance_AppCompat_Body1 = 0x7f090039;
public static int Base_TextAppearance_AppCompat_Body2 = 0x7f09003a;
public static int Base_TextAppearance_AppCompat_Button = 0x7f090022;
public static int Base_TextAppearance_AppCompat_Caption = 0x7f09003b;
public static int Base_TextAppearance_AppCompat_Display1 = 0x7f09003c;
public static int Base_TextAppearance_AppCompat_Display2 = 0x7f09003d;
public static int Base_TextAppearance_AppCompat_Display3 = 0x7f09003e;
public static int Base_TextAppearance_AppCompat_Display4 = 0x7f09003f;
public static int Base_TextAppearance_AppCompat_Headline = 0x7f090040;
public static int Base_TextAppearance_AppCompat_Inverse = 0x7f09000b;
public static int Base_TextAppearance_AppCompat_Large = 0x7f090041;
public static int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f09000c;
public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f090042;
public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f090043;
public static int Base_TextAppearance_AppCompat_Medium = 0x7f090044;
public static int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f09000d;
public static int Base_TextAppearance_AppCompat_Menu = 0x7f090045;
public static int Base_TextAppearance_AppCompat_SearchResult = 0x7f090094;
public static int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f090046;
public static int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f090047;
public static int Base_TextAppearance_AppCompat_Small = 0x7f090048;
public static int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f09000e;
public static int Base_TextAppearance_AppCompat_Subhead = 0x7f090049;
public static int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f09000f;
public static int Base_TextAppearance_AppCompat_Title = 0x7f09004a;
public static int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f090010;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f090083;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f09004b;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f09004c;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f09004d;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f09004e;
public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f09004f;
public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f090050;
public static int Base_TextAppearance_AppCompat_Widget_Button = 0x7f090051;
public static int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f090084;
public static int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f090095;
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f090052;
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f090053;
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f090054;
public static int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f090055;
public static int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f090056;
public static int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f090096;
public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f090057;
public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f090058;
public static int Base_ThemeOverlay_AppCompat = 0x7f09009f;
public static int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0900a0;
public static int Base_ThemeOverlay_AppCompat_Dark = 0x7f0900a1;
public static int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0900a2;
public static int Base_ThemeOverlay_AppCompat_Dialog = 0x7f090013;
public static int Base_ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0900a3;
public static int Base_ThemeOverlay_AppCompat_Light = 0x7f0900a4;
public static int Base_Theme_AppCompat = 0x7f090059;
public static int Base_Theme_AppCompat_CompactMenu = 0x7f090097;
public static int Base_Theme_AppCompat_Dialog = 0x7f090011;
public static int Base_Theme_AppCompat_DialogWhenLarge = 0x7f090001;
public static int Base_Theme_AppCompat_Dialog_Alert = 0x7f090098;
public static int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f090099;
public static int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f09009a;
public static int Base_Theme_AppCompat_Light = 0x7f09005a;
public static int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f09009b;
public static int Base_Theme_AppCompat_Light_Dialog = 0x7f090012;
public static int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f090002;
public static int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f09009c;
public static int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f09009d;
public static int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f09009e;
public static int Base_V11_ThemeOverlay_AppCompat_Dialog = 0x7f090016;
public static int Base_V11_Theme_AppCompat_Dialog = 0x7f090014;
public static int Base_V11_Theme_AppCompat_Light_Dialog = 0x7f090015;
public static int Base_V12_Widget_AppCompat_AutoCompleteTextView = 0x7f09001e;
public static int Base_V12_Widget_AppCompat_EditText = 0x7f09001f;
public static int Base_V21_ThemeOverlay_AppCompat_Dialog = 0x7f09005f;
public static int Base_V21_Theme_AppCompat = 0x7f09005b;
public static int Base_V21_Theme_AppCompat_Dialog = 0x7f09005c;
public static int Base_V21_Theme_AppCompat_Light = 0x7f09005d;
public static int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f09005e;
public static int Base_V22_Theme_AppCompat = 0x7f090081;
public static int Base_V22_Theme_AppCompat_Light = 0x7f090082;
public static int Base_V23_Theme_AppCompat = 0x7f090085;
public static int Base_V23_Theme_AppCompat_Light = 0x7f090086;
public static int Base_V7_ThemeOverlay_AppCompat_Dialog = 0x7f0900a9;
public static int Base_V7_Theme_AppCompat = 0x7f0900a5;
public static int Base_V7_Theme_AppCompat_Dialog = 0x7f0900a6;
public static int Base_V7_Theme_AppCompat_Light = 0x7f0900a7;
public static int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0900a8;
public static int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0900aa;
public static int Base_V7_Widget_AppCompat_EditText = 0x7f0900ab;
public static int Base_Widget_AppCompat_ActionBar = 0x7f0900ac;
public static int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0900ad;
public static int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0900ae;
public static int Base_Widget_AppCompat_ActionBar_TabText = 0x7f090060;
public static int Base_Widget_AppCompat_ActionBar_TabView = 0x7f090061;
public static int Base_Widget_AppCompat_ActionButton = 0x7f090062;
public static int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f090063;
public static int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f090064;
public static int Base_Widget_AppCompat_ActionMode = 0x7f0900af;
public static int Base_Widget_AppCompat_ActivityChooserView = 0x7f0900b0;
public static int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f090020;
public static int Base_Widget_AppCompat_Button = 0x7f090065;
public static int Base_Widget_AppCompat_ButtonBar = 0x7f090069;
public static int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0900b2;
public static int Base_Widget_AppCompat_Button_Borderless = 0x7f090066;
public static int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f090067;
public static int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0900b1;
public static int Base_Widget_AppCompat_Button_Colored = 0x7f090087;
public static int Base_Widget_AppCompat_Button_Small = 0x7f090068;
public static int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f09006a;
public static int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f09006b;
public static int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0900b3;
public static int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f090000;
public static int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0900b4;
public static int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f09006c;
public static int Base_Widget_AppCompat_EditText = 0x7f090021;
public static int Base_Widget_AppCompat_ImageButton = 0x7f09006d;
public static int Base_Widget_AppCompat_Light_ActionBar = 0x7f0900b5;
public static int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0900b6;
public static int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0900b7;
public static int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f09006e;
public static int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f09006f;
public static int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f090070;
public static int Base_Widget_AppCompat_Light_PopupMenu = 0x7f090071;
public static int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f090072;
public static int Base_Widget_AppCompat_ListMenuView = 0x7f0900b8;
public static int Base_Widget_AppCompat_ListPopupWindow = 0x7f090073;
public static int Base_Widget_AppCompat_ListView = 0x7f090074;
public static int Base_Widget_AppCompat_ListView_DropDown = 0x7f090075;
public static int Base_Widget_AppCompat_ListView_Menu = 0x7f090076;
public static int Base_Widget_AppCompat_PopupMenu = 0x7f090077;
public static int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f090078;
public static int Base_Widget_AppCompat_PopupWindow = 0x7f0900b9;
public static int Base_Widget_AppCompat_ProgressBar = 0x7f090017;
public static int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f090018;
public static int Base_Widget_AppCompat_RatingBar = 0x7f090079;
public static int Base_Widget_AppCompat_RatingBar_Indicator = 0x7f090088;
public static int Base_Widget_AppCompat_RatingBar_Small = 0x7f090089;
public static int Base_Widget_AppCompat_SearchView = 0x7f0900ba;
public static int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0900bb;
public static int Base_Widget_AppCompat_SeekBar = 0x7f09007a;
public static int Base_Widget_AppCompat_SeekBar_Discrete = 0x7f0900bc;
public static int Base_Widget_AppCompat_Spinner = 0x7f09007b;
public static int Base_Widget_AppCompat_Spinner_Underlined = 0x7f090003;
public static int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f09007c;
public static int Base_Widget_AppCompat_Toolbar = 0x7f0900bd;
public static int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f09007d;
public static int Platform_AppCompat = 0x7f090019;
public static int Platform_AppCompat_Light = 0x7f09001a;
public static int Platform_ThemeOverlay_AppCompat = 0x7f09007e;
public static int Platform_ThemeOverlay_AppCompat_Dark = 0x7f09007f;
public static int Platform_ThemeOverlay_AppCompat_Light = 0x7f090080;
public static int Platform_V11_AppCompat = 0x7f09001b;
public static int Platform_V11_AppCompat_Light = 0x7f09001c;
public static int Platform_V14_AppCompat = 0x7f090023;
public static int Platform_V14_AppCompat_Light = 0x7f090024;
public static int Platform_Widget_AppCompat_Spinner = 0x7f09001d;
public static int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f09002a;
public static int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f09002b;
public static int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f09002c;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f09002d;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f09002e;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f09002f;
public static int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f090035;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f090030;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f090031;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f090032;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f090033;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f090034;
public static int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f090036;
public static int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f090037;
public static int TextAppearance_AppCompat = 0x7f0900be;
public static int TextAppearance_AppCompat_Body1 = 0x7f0900bf;
public static int TextAppearance_AppCompat_Body2 = 0x7f0900c0;
public static int TextAppearance_AppCompat_Button = 0x7f0900c1;
public static int TextAppearance_AppCompat_Caption = 0x7f0900c2;
public static int TextAppearance_AppCompat_Display1 = 0x7f0900c3;
public static int TextAppearance_AppCompat_Display2 = 0x7f0900c4;
public static int TextAppearance_AppCompat_Display3 = 0x7f0900c5;
public static int TextAppearance_AppCompat_Display4 = 0x7f0900c6;
public static int TextAppearance_AppCompat_Headline = 0x7f0900c7;
public static int TextAppearance_AppCompat_Inverse = 0x7f0900c8;
public static int TextAppearance_AppCompat_Large = 0x7f0900c9;
public static int TextAppearance_AppCompat_Large_Inverse = 0x7f0900ca;
public static int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0900cb;
public static int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0900cc;
public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0900cd;
public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0900ce;
public static int TextAppearance_AppCompat_Medium = 0x7f0900cf;
public static int TextAppearance_AppCompat_Medium_Inverse = 0x7f0900d0;
public static int TextAppearance_AppCompat_Menu = 0x7f0900d1;
public static int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0900d2;
public static int TextAppearance_AppCompat_SearchResult_Title = 0x7f0900d3;
public static int TextAppearance_AppCompat_Small = 0x7f0900d4;
public static int TextAppearance_AppCompat_Small_Inverse = 0x7f0900d5;
public static int TextAppearance_AppCompat_Subhead = 0x7f0900d6;
public static int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0900d7;
public static int TextAppearance_AppCompat_Title = 0x7f0900d8;
public static int TextAppearance_AppCompat_Title_Inverse = 0x7f0900d9;
public static int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0900da;
public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0900db;
public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0900dc;
public static int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0900dd;
public static int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0900de;
public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0900df;
public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0900e0;
public static int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0900e1;
public static int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0900e2;
public static int TextAppearance_AppCompat_Widget_Button = 0x7f0900e3;
public static int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0900e4;
public static int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0900e5;
public static int TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0900e6;
public static int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0900e7;
public static int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0900e8;
public static int TextAppearance_AppCompat_Widget_Switch = 0x7f0900e9;
public static int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0900ea;
public static int TextAppearance_StatusBar_EventContent = 0x7f090025;
public static int TextAppearance_StatusBar_EventContent_Info = 0x7f090026;
public static int TextAppearance_StatusBar_EventContent_Line2 = 0x7f090027;
public static int TextAppearance_StatusBar_EventContent_Time = 0x7f090028;
public static int TextAppearance_StatusBar_EventContent_Title = 0x7f090029;
public static int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0900eb;
public static int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0900ec;
public static int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0900ed;
public static int ThemeOverlay_AppCompat = 0x7f0900fc;
public static int ThemeOverlay_AppCompat_ActionBar = 0x7f0900fd;
public static int ThemeOverlay_AppCompat_Dark = 0x7f0900fe;
public static int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0900ff;
public static int ThemeOverlay_AppCompat_Dialog = 0x7f090100;
public static int ThemeOverlay_AppCompat_Dialog_Alert = 0x7f090101;
public static int ThemeOverlay_AppCompat_Light = 0x7f090102;
public static int Theme_AppCompat = 0x7f0900ee;
public static int Theme_AppCompat_CompactMenu = 0x7f0900ef;
public static int Theme_AppCompat_DayNight = 0x7f090004;
public static int Theme_AppCompat_DayNight_DarkActionBar = 0x7f090005;
public static int Theme_AppCompat_DayNight_Dialog = 0x7f090006;
public static int Theme_AppCompat_DayNight_DialogWhenLarge = 0x7f090009;
public static int Theme_AppCompat_DayNight_Dialog_Alert = 0x7f090007;
public static int Theme_AppCompat_DayNight_Dialog_MinWidth = 0x7f090008;
public static int Theme_AppCompat_DayNight_NoActionBar = 0x7f09000a;
public static int Theme_AppCompat_Dialog = 0x7f0900f0;
public static int Theme_AppCompat_DialogWhenLarge = 0x7f0900f3;
public static int Theme_AppCompat_Dialog_Alert = 0x7f0900f1;
public static int Theme_AppCompat_Dialog_MinWidth = 0x7f0900f2;
public static int Theme_AppCompat_Light = 0x7f0900f4;
public static int Theme_AppCompat_Light_DarkActionBar = 0x7f0900f5;
public static int Theme_AppCompat_Light_Dialog = 0x7f0900f6;
public static int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0900f9;
public static int Theme_AppCompat_Light_Dialog_Alert = 0x7f0900f7;
public static int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0900f8;
public static int Theme_AppCompat_Light_NoActionBar = 0x7f0900fa;
public static int Theme_AppCompat_NoActionBar = 0x7f0900fb;
public static int Widget_AppCompat_ActionBar = 0x7f090103;
public static int Widget_AppCompat_ActionBar_Solid = 0x7f090104;
public static int Widget_AppCompat_ActionBar_TabBar = 0x7f090105;
public static int Widget_AppCompat_ActionBar_TabText = 0x7f090106;
public static int Widget_AppCompat_ActionBar_TabView = 0x7f090107;
public static int Widget_AppCompat_ActionButton = 0x7f090108;
public static int Widget_AppCompat_ActionButton_CloseMode = 0x7f090109;
public static int Widget_AppCompat_ActionButton_Overflow = 0x7f09010a;
public static int Widget_AppCompat_ActionMode = 0x7f09010b;
public static int Widget_AppCompat_ActivityChooserView = 0x7f09010c;
public static int Widget_AppCompat_AutoCompleteTextView = 0x7f09010d;
public static int Widget_AppCompat_Button = 0x7f09010e;
public static int Widget_AppCompat_ButtonBar = 0x7f090114;
public static int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f090115;
public static int Widget_AppCompat_Button_Borderless = 0x7f09010f;
public static int Widget_AppCompat_Button_Borderless_Colored = 0x7f090110;
public static int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f090111;
public static int Widget_AppCompat_Button_Colored = 0x7f090112;
public static int Widget_AppCompat_Button_Small = 0x7f090113;
public static int Widget_AppCompat_CompoundButton_CheckBox = 0x7f090116;
public static int Widget_AppCompat_CompoundButton_RadioButton = 0x7f090117;
public static int Widget_AppCompat_CompoundButton_Switch = 0x7f090118;
public static int Widget_AppCompat_DrawerArrowToggle = 0x7f090119;
public static int Widget_AppCompat_DropDownItem_Spinner = 0x7f09011a;
public static int Widget_AppCompat_EditText = 0x7f09011b;
public static int Widget_AppCompat_ImageButton = 0x7f09011c;
public static int Widget_AppCompat_Light_ActionBar = 0x7f09011d;
public static int Widget_AppCompat_Light_ActionBar_Solid = 0x7f09011e;
public static int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f09011f;
public static int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f090120;
public static int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f090121;
public static int Widget_AppCompat_Light_ActionBar_TabText = 0x7f090122;
public static int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f090123;
public static int Widget_AppCompat_Light_ActionBar_TabView = 0x7f090124;
public static int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f090125;
public static int Widget_AppCompat_Light_ActionButton = 0x7f090126;
public static int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f090127;
public static int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f090128;
public static int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f090129;
public static int Widget_AppCompat_Light_ActivityChooserView = 0x7f09012a;
public static int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f09012b;
public static int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f09012c;
public static int Widget_AppCompat_Light_ListPopupWindow = 0x7f09012d;
public static int Widget_AppCompat_Light_ListView_DropDown = 0x7f09012e;
public static int Widget_AppCompat_Light_PopupMenu = 0x7f09012f;
public static int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f090130;
public static int Widget_AppCompat_Light_SearchView = 0x7f090131;
public static int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f090132;
public static int Widget_AppCompat_ListMenuView = 0x7f090133;
public static int Widget_AppCompat_ListPopupWindow = 0x7f090134;
public static int Widget_AppCompat_ListView = 0x7f090135;
public static int Widget_AppCompat_ListView_DropDown = 0x7f090136;
public static int Widget_AppCompat_ListView_Menu = 0x7f090137;
public static int Widget_AppCompat_PopupMenu = 0x7f090138;
public static int Widget_AppCompat_PopupMenu_Overflow = 0x7f090139;
public static int Widget_AppCompat_PopupWindow = 0x7f09013a;
public static int Widget_AppCompat_ProgressBar = 0x7f09013b;
public static int Widget_AppCompat_ProgressBar_Horizontal = 0x7f09013c;
public static int Widget_AppCompat_RatingBar = 0x7f09013d;
public static int Widget_AppCompat_RatingBar_Indicator = 0x7f09013e;
public static int Widget_AppCompat_RatingBar_Small = 0x7f09013f;
public static int Widget_AppCompat_SearchView = 0x7f090140;
public static int Widget_AppCompat_SearchView_ActionBar = 0x7f090141;
public static int Widget_AppCompat_SeekBar = 0x7f090142;
public static int Widget_AppCompat_SeekBar_Discrete = 0x7f090143;
public static int Widget_AppCompat_Spinner = 0x7f090144;
public static int Widget_AppCompat_Spinner_DropDown = 0x7f090145;
public static int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f090146;
public static int Widget_AppCompat_Spinner_Underlined = 0x7f090147;
public static int Widget_AppCompat_TextView_SpinnerItem = 0x7f090148;
public static int Widget_AppCompat_Toolbar = 0x7f090149;
public static int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f09014a;
}
public static final class styleable {
public static int[] ActionBar = { 0x7f010001, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e, 0x7f01000f, 0x7f010010, 0x7f010011, 0x7f010012, 0x7f010013, 0x7f010014, 0x7f010015, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001a, 0x7f01001b, 0x7f01001c, 0x7f01001d, 0x7f01005a };
public static int[] ActionBarLayout = { 0x010100b3 };
public static int ActionBarLayout_android_layout_gravity = 0;
public static int ActionBar_background = 10;
public static int ActionBar_backgroundSplit = 12;
public static int ActionBar_backgroundStacked = 11;
public static int ActionBar_contentInsetEnd = 21;
public static int ActionBar_contentInsetEndWithActions = 25;
public static int ActionBar_contentInsetLeft = 22;
public static int ActionBar_contentInsetRight = 23;
public static int ActionBar_contentInsetStart = 20;
public static int ActionBar_contentInsetStartWithNavigation = 24;
public static int ActionBar_customNavigationLayout = 13;
public static int ActionBar_displayOptions = 3;
public static int ActionBar_divider = 9;
public static int ActionBar_elevation = 26;
public static int ActionBar_height = 0;
public static int ActionBar_hideOnContentScroll = 19;
public static int ActionBar_homeAsUpIndicator = 28;
public static int ActionBar_homeLayout = 14;
public static int ActionBar_icon = 7;
public static int ActionBar_indeterminateProgressStyle = 16;
public static int ActionBar_itemPadding = 18;
public static int ActionBar_logo = 8;
public static int ActionBar_navigationMode = 2;
public static int ActionBar_popupTheme = 27;
public static int ActionBar_progressBarPadding = 17;
public static int ActionBar_progressBarStyle = 15;
public static int ActionBar_subtitle = 4;
public static int ActionBar_subtitleTextStyle = 6;
public static int ActionBar_title = 1;
public static int ActionBar_titleTextStyle = 5;
public static int[] ActionMenuItemView = { 0x0101013f };
public static int ActionMenuItemView_android_minWidth = 0;
public static int[] ActionMenuView = { };
public static int[] ActionMode = { 0x7f010001, 0x7f010007, 0x7f010008, 0x7f01000c, 0x7f01000e, 0x7f01001e };
public static int ActionMode_background = 3;
public static int ActionMode_backgroundSplit = 4;
public static int ActionMode_closeItemLayout = 5;
public static int ActionMode_height = 0;
public static int ActionMode_subtitleTextStyle = 2;
public static int ActionMode_titleTextStyle = 1;
public static int[] ActivityChooserView = { 0x7f01001f, 0x7f010020 };
public static int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
public static int ActivityChooserView_initialActivityCount = 0;
public static int[] AlertDialog = { 0x010100f2, 0x7f010021, 0x7f010022, 0x7f010023, 0x7f010024, 0x7f010025 };
public static int AlertDialog_android_layout = 0;
public static int AlertDialog_buttonPanelSideLayout = 1;
public static int AlertDialog_listItemLayout = 5;
public static int AlertDialog_listLayout = 2;
public static int AlertDialog_multiChoiceItemLayout = 3;
public static int AlertDialog_singleChoiceItemLayout = 4;
public static int[] AppCompatImageView = { 0x01010119, 0x7f010026 };
public static int AppCompatImageView_android_src = 0;
public static int AppCompatImageView_srcCompat = 1;
public static int[] AppCompatSeekBar = { 0x01010142, 0x7f010027, 0x7f010028, 0x7f010029 };
public static int AppCompatSeekBar_android_thumb = 0;
public static int AppCompatSeekBar_tickMark = 1;
public static int AppCompatSeekBar_tickMarkTint = 2;
public static int AppCompatSeekBar_tickMarkTintMode = 3;
public static int[] AppCompatTextView = { 0x01010034, 0x7f01002a };
public static int AppCompatTextView_android_textAppearance = 0;
public static int AppCompatTextView_textAllCaps = 1;
public static int[] AppCompatTheme = { 0x01010057, 0x010100ae, 0x7f01002b, 0x7f01002c, 0x7f01002d, 0x7f01002e, 0x7f01002f, 0x7f010030, 0x7f010031, 0x7f010032, 0x7f010033, 0x7f010034, 0x7f010035, 0x7f010036, 0x7f010037, 0x7f010038, 0x7f010039, 0x7f01003a, 0x7f01003b, 0x7f01003c, 0x7f01003d, 0x7f01003e, 0x7f01003f, 0x7f010040, 0x7f010041, 0x7f010042, 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c, 0x7f01004d, 0x7f01004e, 0x7f01004f, 0x7f010050, 0x7f010051, 0x7f010052, 0x7f010053, 0x7f010054, 0x7f010055, 0x7f010056, 0x7f010057, 0x7f010058, 0x7f010059, 0x7f01005a, 0x7f01005b, 0x7f01005c, 0x7f01005d, 0x7f01005e, 0x7f01005f, 0x7f010060, 0x7f010061, 0x7f010062, 0x7f010063, 0x7f010064, 0x7f010065, 0x7f010066, 0x7f010067, 0x7f010068, 0x7f010069, 0x7f01006a, 0x7f01006b, 0x7f01006c, 0x7f01006d, 0x7f01006e, 0x7f01006f, 0x7f010070, 0x7f010071, 0x7f010072, 0x7f010073, 0x7f010074, 0x7f010075, 0x7f010076, 0x7f010077, 0x7f010078, 0x7f010079, 0x7f01007a, 0x7f01007b, 0x7f01007c, 0x7f01007d, 0x7f01007e, 0x7f01007f, 0x7f010080, 0x7f010081, 0x7f010082, 0x7f010083, 0x7f010084, 0x7f010085, 0x7f010086, 0x7f010087, 0x7f010088, 0x7f010089, 0x7f01008a, 0x7f01008b, 0x7f01008c, 0x7f01008d, 0x7f01008e, 0x7f01008f, 0x7f010090, 0x7f010091, 0x7f010092, 0x7f010093, 0x7f010094, 0x7f010095, 0x7f010096, 0x7f010097, 0x7f010098, 0x7f010099, 0x7f01009a, 0x7f01009b };
public static int AppCompatTheme_actionBarDivider = 23;
public static int AppCompatTheme_actionBarItemBackground = 24;
public static int AppCompatTheme_actionBarPopupTheme = 17;
public static int AppCompatTheme_actionBarSize = 22;
public static int AppCompatTheme_actionBarSplitStyle = 19;
public static int AppCompatTheme_actionBarStyle = 18;
public static int AppCompatTheme_actionBarTabBarStyle = 13;
public static int AppCompatTheme_actionBarTabStyle = 12;
public static int AppCompatTheme_actionBarTabTextStyle = 14;
public static int AppCompatTheme_actionBarTheme = 20;
public static int AppCompatTheme_actionBarWidgetTheme = 21;
public static int AppCompatTheme_actionButtonStyle = 50;
public static int AppCompatTheme_actionDropDownStyle = 46;
public static int AppCompatTheme_actionMenuTextAppearance = 25;
public static int AppCompatTheme_actionMenuTextColor = 26;
public static int AppCompatTheme_actionModeBackground = 29;
public static int AppCompatTheme_actionModeCloseButtonStyle = 28;
public static int AppCompatTheme_actionModeCloseDrawable = 31;
public static int AppCompatTheme_actionModeCopyDrawable = 33;
public static int AppCompatTheme_actionModeCutDrawable = 32;
public static int AppCompatTheme_actionModeFindDrawable = 37;
public static int AppCompatTheme_actionModePasteDrawable = 34;
public static int AppCompatTheme_actionModePopupWindowStyle = 39;
public static int AppCompatTheme_actionModeSelectAllDrawable = 35;
public static int AppCompatTheme_actionModeShareDrawable = 36;
public static int AppCompatTheme_actionModeSplitBackground = 30;
public static int AppCompatTheme_actionModeStyle = 27;
public static int AppCompatTheme_actionModeWebSearchDrawable = 38;
public static int AppCompatTheme_actionOverflowButtonStyle = 15;
public static int AppCompatTheme_actionOverflowMenuStyle = 16;
public static int AppCompatTheme_activityChooserViewStyle = 58;
public static int AppCompatTheme_alertDialogButtonGroupStyle = 94;
public static int AppCompatTheme_alertDialogCenterButtons = 95;
public static int AppCompatTheme_alertDialogStyle = 93;
public static int AppCompatTheme_alertDialogTheme = 96;
public static int AppCompatTheme_android_windowAnimationStyle = 1;
public static int AppCompatTheme_android_windowIsFloating = 0;
public static int AppCompatTheme_autoCompleteTextViewStyle = 101;
public static int AppCompatTheme_borderlessButtonStyle = 55;
public static int AppCompatTheme_buttonBarButtonStyle = 52;
public static int AppCompatTheme_buttonBarNegativeButtonStyle = 99;
public static int AppCompatTheme_buttonBarNeutralButtonStyle = 100;
public static int AppCompatTheme_buttonBarPositiveButtonStyle = 98;
public static int AppCompatTheme_buttonBarStyle = 51;
public static int AppCompatTheme_buttonStyle = 102;
public static int AppCompatTheme_buttonStyleSmall = 103;
public static int AppCompatTheme_checkboxStyle = 104;
public static int AppCompatTheme_checkedTextViewStyle = 105;
public static int AppCompatTheme_colorAccent = 85;
public static int AppCompatTheme_colorBackgroundFloating = 92;
public static int AppCompatTheme_colorButtonNormal = 89;
public static int AppCompatTheme_colorControlActivated = 87;
public static int AppCompatTheme_colorControlHighlight = 88;
public static int AppCompatTheme_colorControlNormal = 86;
public static int AppCompatTheme_colorPrimary = 83;
public static int AppCompatTheme_colorPrimaryDark = 84;
public static int AppCompatTheme_colorSwitchThumbNormal = 90;
public static int AppCompatTheme_controlBackground = 91;
public static int AppCompatTheme_dialogPreferredPadding = 44;
public static int AppCompatTheme_dialogTheme = 43;
public static int AppCompatTheme_dividerHorizontal = 57;
public static int AppCompatTheme_dividerVertical = 56;
public static int AppCompatTheme_dropDownListViewStyle = 75;
public static int AppCompatTheme_dropdownListPreferredItemHeight = 47;
public static int AppCompatTheme_editTextBackground = 64;
public static int AppCompatTheme_editTextColor = 63;
public static int AppCompatTheme_editTextStyle = 106;
public static int AppCompatTheme_homeAsUpIndicator = 49;
public static int AppCompatTheme_imageButtonStyle = 65;
public static int AppCompatTheme_listChoiceBackgroundIndicator = 82;
public static int AppCompatTheme_listDividerAlertDialog = 45;
public static int AppCompatTheme_listMenuViewStyle = 114;
public static int AppCompatTheme_listPopupWindowStyle = 76;
public static int AppCompatTheme_listPreferredItemHeight = 70;
public static int AppCompatTheme_listPreferredItemHeightLarge = 72;
public static int AppCompatTheme_listPreferredItemHeightSmall = 71;
public static int AppCompatTheme_listPreferredItemPaddingLeft = 73;
public static int AppCompatTheme_listPreferredItemPaddingRight = 74;
public static int AppCompatTheme_panelBackground = 79;
public static int AppCompatTheme_panelMenuListTheme = 81;
public static int AppCompatTheme_panelMenuListWidth = 80;
public static int AppCompatTheme_popupMenuStyle = 61;
public static int AppCompatTheme_popupWindowStyle = 62;
public static int AppCompatTheme_radioButtonStyle = 107;
public static int AppCompatTheme_ratingBarStyle = 108;
public static int AppCompatTheme_ratingBarStyleIndicator = 109;
public static int AppCompatTheme_ratingBarStyleSmall = 110;
public static int AppCompatTheme_searchViewStyle = 69;
public static int AppCompatTheme_seekBarStyle = 111;
public static int AppCompatTheme_selectableItemBackground = 53;
public static int AppCompatTheme_selectableItemBackgroundBorderless = 54;
public static int AppCompatTheme_spinnerDropDownItemStyle = 48;
public static int AppCompatTheme_spinnerStyle = 112;
public static int AppCompatTheme_switchStyle = 113;
public static int AppCompatTheme_textAppearanceLargePopupMenu = 40;
public static int AppCompatTheme_textAppearanceListItem = 77;
public static int AppCompatTheme_textAppearanceListItemSmall = 78;
public static int AppCompatTheme_textAppearancePopupMenuHeader = 42;
public static int AppCompatTheme_textAppearanceSearchResultSubtitle = 67;
public static int AppCompatTheme_textAppearanceSearchResultTitle = 66;
public static int AppCompatTheme_textAppearanceSmallPopupMenu = 41;
public static int AppCompatTheme_textColorAlertDialogListItem = 97;
public static int AppCompatTheme_textColorSearchUrl = 68;
public static int AppCompatTheme_toolbarNavigationButtonStyle = 60;
public static int AppCompatTheme_toolbarStyle = 59;
public static int AppCompatTheme_windowActionBar = 2;
public static int AppCompatTheme_windowActionBarOverlay = 4;
public static int AppCompatTheme_windowActionModeOverlay = 5;
public static int AppCompatTheme_windowFixedHeightMajor = 9;
public static int AppCompatTheme_windowFixedHeightMinor = 7;
public static int AppCompatTheme_windowFixedWidthMajor = 6;
public static int AppCompatTheme_windowFixedWidthMinor = 8;
public static int AppCompatTheme_windowMinWidthMajor = 10;
public static int AppCompatTheme_windowMinWidthMinor = 11;
public static int AppCompatTheme_windowNoTitle = 3;
public static int[] ButtonBarLayout = { 0x7f01009c };
public static int ButtonBarLayout_allowStacking = 0;
public static int[] ColorStateListItem = { 0x010101a5, 0x0101031f, 0x7f01009d };
public static int ColorStateListItem_alpha = 2;
public static int ColorStateListItem_android_alpha = 1;
public static int ColorStateListItem_android_color = 0;
public static int[] CompoundButton = { 0x01010107, 0x7f01009e, 0x7f01009f };
public static int CompoundButton_android_button = 0;
public static int CompoundButton_buttonTint = 1;
public static int CompoundButton_buttonTintMode = 2;
public static int[] DrawerArrowToggle = { 0x7f0100a0, 0x7f0100a1, 0x7f0100a2, 0x7f0100a3, 0x7f0100a4, 0x7f0100a5, 0x7f0100a6, 0x7f0100a7 };
public static int DrawerArrowToggle_arrowHeadLength = 4;
public static int DrawerArrowToggle_arrowShaftLength = 5;
public static int DrawerArrowToggle_barLength = 6;
public static int DrawerArrowToggle_color = 0;
public static int DrawerArrowToggle_drawableSize = 2;
public static int DrawerArrowToggle_gapBetweenBars = 3;
public static int DrawerArrowToggle_spinBars = 1;
public static int DrawerArrowToggle_thickness = 7;
public static int[] LinearLayoutCompat = { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x7f01000b, 0x7f0100a8, 0x7f0100a9, 0x7f0100aa };
public static int[] LinearLayoutCompat_Layout = { 0x010100b3, 0x010100f4, 0x010100f5, 0x01010181 };
public static int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static int LinearLayoutCompat_Layout_android_layout_height = 2;
public static int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static int LinearLayoutCompat_Layout_android_layout_width = 1;
public static int LinearLayoutCompat_android_baselineAligned = 2;
public static int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static int LinearLayoutCompat_android_gravity = 0;
public static int LinearLayoutCompat_android_orientation = 1;
public static int LinearLayoutCompat_android_weightSum = 4;
public static int LinearLayoutCompat_divider = 5;
public static int LinearLayoutCompat_dividerPadding = 8;
public static int LinearLayoutCompat_measureWithLargestChild = 6;
public static int LinearLayoutCompat_showDividers = 7;
public static int[] ListPopupWindow = { 0x010102ac, 0x010102ad };
public static int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 };
public static int MenuGroup_android_checkableBehavior = 5;
public static int MenuGroup_android_enabled = 0;
public static int MenuGroup_android_id = 1;
public static int MenuGroup_android_menuCategory = 3;
public static int MenuGroup_android_orderInCategory = 4;
public static int MenuGroup_android_visible = 2;
public static int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f0100ab, 0x7f0100ac, 0x7f0100ad, 0x7f0100ae };
public static int MenuItem_actionLayout = 14;
public static int MenuItem_actionProviderClass = 16;
public static int MenuItem_actionViewClass = 15;
public static int MenuItem_android_alphabeticShortcut = 9;
public static int MenuItem_android_checkable = 11;
public static int MenuItem_android_checked = 3;
public static int MenuItem_android_enabled = 1;
public static int MenuItem_android_icon = 0;
public static int MenuItem_android_id = 2;
public static int MenuItem_android_menuCategory = 5;
public static int MenuItem_android_numericShortcut = 10;
public static int MenuItem_android_onClick = 12;
public static int MenuItem_android_orderInCategory = 6;
public static int MenuItem_android_title = 7;
public static int MenuItem_android_titleCondensed = 8;
public static int MenuItem_android_visible = 4;
public static int MenuItem_showAsAction = 13;
public static int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x7f0100af, 0x7f0100b0 };
public static int MenuView_android_headerBackground = 4;
public static int MenuView_android_horizontalDivider = 2;
public static int MenuView_android_itemBackground = 5;
public static int MenuView_android_itemIconDisabledAlpha = 6;
public static int MenuView_android_itemTextAppearance = 1;
public static int MenuView_android_verticalDivider = 3;
public static int MenuView_android_windowAnimationStyle = 0;
public static int MenuView_preserveIconSpacing = 7;
public static int MenuView_subMenuArrow = 8;
public static int[] PopupWindow = { 0x01010176, 0x010102c9, 0x7f0100b1 };
public static int[] PopupWindowBackgroundState = { 0x7f0100b2 };
public static int PopupWindowBackgroundState_state_above_anchor = 0;
public static int PopupWindow_android_popupAnimationStyle = 1;
public static int PopupWindow_android_popupBackground = 0;
public static int PopupWindow_overlapAnchor = 2;
public static int[] SearchView = { 0x010100da, 0x0101011f, 0x01010220, 0x01010264, 0x7f0100b3, 0x7f0100b4, 0x7f0100b5, 0x7f0100b6, 0x7f0100b7, 0x7f0100b8, 0x7f0100b9, 0x7f0100ba, 0x7f0100bb, 0x7f0100bc, 0x7f0100bd, 0x7f0100be, 0x7f0100bf };
public static int SearchView_android_focusable = 0;
public static int SearchView_android_imeOptions = 3;
public static int SearchView_android_inputType = 2;
public static int SearchView_android_maxWidth = 1;
public static int SearchView_closeIcon = 8;
public static int SearchView_commitIcon = 13;
public static int SearchView_defaultQueryHint = 7;
public static int SearchView_goIcon = 9;
public static int SearchView_iconifiedByDefault = 5;
public static int SearchView_layout = 4;
public static int SearchView_queryBackground = 15;
public static int SearchView_queryHint = 6;
public static int SearchView_searchHintIcon = 11;
public static int SearchView_searchIcon = 10;
public static int SearchView_submitBackground = 16;
public static int SearchView_suggestionRowLayout = 14;
public static int SearchView_voiceIcon = 12;
public static int[] Spinner = { 0x010100b2, 0x01010176, 0x0101017b, 0x01010262, 0x7f01001d };
public static int Spinner_android_dropDownWidth = 3;
public static int Spinner_android_entries = 0;
public static int Spinner_android_popupBackground = 1;
public static int Spinner_android_prompt = 2;
public static int Spinner_popupTheme = 4;
public static int[] SwitchCompat = { 0x01010124, 0x01010125, 0x01010142, 0x7f0100c0, 0x7f0100c1, 0x7f0100c2, 0x7f0100c3, 0x7f0100c4, 0x7f0100c5, 0x7f0100c6, 0x7f0100c7, 0x7f0100c8, 0x7f0100c9, 0x7f0100ca };
public static int SwitchCompat_android_textOff = 1;
public static int SwitchCompat_android_textOn = 0;
public static int SwitchCompat_android_thumb = 2;
public static int SwitchCompat_showText = 13;
public static int SwitchCompat_splitTrack = 12;
public static int SwitchCompat_switchMinWidth = 10;
public static int SwitchCompat_switchPadding = 11;
public static int SwitchCompat_switchTextAppearance = 9;
public static int SwitchCompat_thumbTextPadding = 8;
public static int SwitchCompat_thumbTint = 3;
public static int SwitchCompat_thumbTintMode = 4;
public static int SwitchCompat_track = 5;
public static int SwitchCompat_trackTint = 6;
public static int SwitchCompat_trackTintMode = 7;
public static int[] TextAppearance = { 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x01010161, 0x01010162, 0x01010163, 0x01010164, 0x7f01002a };
public static int TextAppearance_android_shadowColor = 4;
public static int TextAppearance_android_shadowDx = 5;
public static int TextAppearance_android_shadowDy = 6;
public static int TextAppearance_android_shadowRadius = 7;
public static int TextAppearance_android_textColor = 3;
public static int TextAppearance_android_textSize = 0;
public static int TextAppearance_android_textStyle = 2;
public static int TextAppearance_android_typeface = 1;
public static int TextAppearance_textAllCaps = 8;
public static int[] Toolbar = { 0x010100af, 0x01010140, 0x7f010003, 0x7f010006, 0x7f01000a, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001a, 0x7f01001b, 0x7f01001d, 0x7f0100cb, 0x7f0100cc, 0x7f0100cd, 0x7f0100ce, 0x7f0100cf, 0x7f0100d0, 0x7f0100d1, 0x7f0100d2, 0x7f0100d3, 0x7f0100d4, 0x7f0100d5, 0x7f0100d6, 0x7f0100d7, 0x7f0100d8, 0x7f0100d9, 0x7f0100da, 0x7f0100db };
public static int Toolbar_android_gravity = 0;
public static int Toolbar_android_minHeight = 1;
public static int Toolbar_buttonGravity = 21;
public static int Toolbar_collapseContentDescription = 23;
public static int Toolbar_collapseIcon = 22;
public static int Toolbar_contentInsetEnd = 6;
public static int Toolbar_contentInsetEndWithActions = 10;
public static int Toolbar_contentInsetLeft = 7;
public static int Toolbar_contentInsetRight = 8;
public static int Toolbar_contentInsetStart = 5;
public static int Toolbar_contentInsetStartWithNavigation = 9;
public static int Toolbar_logo = 4;
public static int Toolbar_logoDescription = 26;
public static int Toolbar_maxButtonHeight = 20;
public static int Toolbar_navigationContentDescription = 25;
public static int Toolbar_navigationIcon = 24;
public static int Toolbar_popupTheme = 11;
public static int Toolbar_subtitle = 3;
public static int Toolbar_subtitleTextAppearance = 13;
public static int Toolbar_subtitleTextColor = 28;
public static int Toolbar_title = 2;
public static int Toolbar_titleMargin = 14;
public static int Toolbar_titleMarginBottom = 18;
public static int Toolbar_titleMarginEnd = 16;
public static int Toolbar_titleMarginStart = 15;
public static int Toolbar_titleMarginTop = 17;
public static int Toolbar_titleMargins = 19;
public static int Toolbar_titleTextAppearance = 12;
public static int Toolbar_titleTextColor = 27;
public static int[] View = { 0x01010000, 0x010100da, 0x7f0100dc, 0x7f0100dd, 0x7f0100de };
public static int[] ViewBackgroundHelper = { 0x010100d4, 0x7f0100df, 0x7f0100e0 };
public static int ViewBackgroundHelper_android_background = 0;
public static int ViewBackgroundHelper_backgroundTint = 1;
public static int ViewBackgroundHelper_backgroundTintMode = 2;
public static int[] ViewStubCompat = { 0x010100d0, 0x010100f2, 0x010100f3 };
public static int ViewStubCompat_android_id = 0;
public static int ViewStubCompat_android_inflatedId = 2;
public static int ViewStubCompat_android_layout = 1;
public static int View_android_focusable = 1;
public static int View_android_theme = 0;
public static int View_paddingEnd = 3;
public static int View_paddingStart = 2;
public static int View_theme = 4;
}
}
| [
"[email protected]"
]
| |
a15964ba77017c151b3ce762eec6c1998a090655 | 5d76b555a3614ab0f156bcad357e45c94d121e2d | /src-v3/com/google/android/gms/drive/internal/C0274e.java | 82e2e78db777c9d5cdba4ed0ac3e199392026cb5 | []
| no_license | BinSlashBash/xcrumby | 8e09282387e2e82d12957d22fa1bb0322f6e6227 | 5b8b1cc8537ae1cfb59448d37b6efca01dded347 | refs/heads/master | 2016-09-01T05:58:46.144411 | 2016-02-15T13:23:25 | 2016-02-15T13:23:25 | 51,755,603 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,761 | java | package com.google.android.gms.drive.internal;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.fasterxml.jackson.databind.deser.std.FromStringDeserializer.Std;
import com.google.android.gms.common.internal.safeparcel.C0261a;
import com.google.android.gms.common.internal.safeparcel.C0261a.C0260a;
import com.google.android.gms.common.internal.safeparcel.C0262b;
import com.google.android.gms.drive.Contents;
/* renamed from: com.google.android.gms.drive.internal.e */
public class C0274e implements Creator<CloseContentsRequest> {
static void m279a(CloseContentsRequest closeContentsRequest, Parcel parcel, int i) {
int p = C0262b.m236p(parcel);
C0262b.m234c(parcel, 1, closeContentsRequest.xH);
C0262b.m219a(parcel, 2, closeContentsRequest.EX, i, false);
C0262b.m220a(parcel, 3, closeContentsRequest.EY, false);
C0262b.m211F(parcel, p);
}
public CloseContentsRequest m280F(Parcel parcel) {
Boolean bool = null;
int o = C0261a.m196o(parcel);
int i = 0;
Contents contents = null;
while (parcel.dataPosition() < o) {
Contents contents2;
int g;
Boolean bool2;
int n = C0261a.m194n(parcel);
switch (C0261a.m174R(n)) {
case Std.STD_FILE /*1*/:
Boolean bool3 = bool;
contents2 = contents;
g = C0261a.m187g(parcel, n);
bool2 = bool3;
break;
case Std.STD_URL /*2*/:
g = i;
Contents contents3 = (Contents) C0261a.m176a(parcel, n, Contents.CREATOR);
bool2 = bool;
contents2 = contents3;
break;
case Std.STD_URI /*3*/:
bool2 = C0261a.m184d(parcel, n);
contents2 = contents;
g = i;
break;
default:
C0261a.m180b(parcel, n);
bool2 = bool;
contents2 = contents;
g = i;
break;
}
i = g;
contents = contents2;
bool = bool2;
}
if (parcel.dataPosition() == o) {
return new CloseContentsRequest(i, contents, bool);
}
throw new C0260a("Overread allowed size end=" + o, parcel);
}
public CloseContentsRequest[] aj(int i) {
return new CloseContentsRequest[i];
}
public /* synthetic */ Object createFromParcel(Parcel x0) {
return m280F(x0);
}
public /* synthetic */ Object[] newArray(int x0) {
return aj(x0);
}
}
| [
"[email protected]"
]
| |
5b13daa4c06b5e5a455e06112b9e74293406f030 | dcd4cdceb2e1e414ae04833763974c0d807119da | /rlib-common/src/main/java/com/ss/rlib/common/graphics/color/ColorRGBA.java | dea1552461a4cc3553f96048ea22fd6fc35d4a5f | [
"Apache-2.0"
]
| permissive | crazyrokr/RLib | 1025c38e941e6bcc61d24b3e4a99dd4bc74a1fad | eb1795563a32d11c8a709914f4384c4a3323747d | refs/heads/master | 2020-09-05T09:44:42.643987 | 2019-10-08T05:32:43 | 2019-10-08T05:32:43 | 220,061,341 | 0 | 0 | Apache-2.0 | 2019-11-06T18:17:10 | 2019-11-06T18:17:09 | null | UTF-8 | Java | false | false | 6,499 | java | package com.ss.rlib.common.graphics.color;
import org.jetbrains.annotations.NotNull;
import java.io.Serializable;
/**
* THe implementation of a color class.
*
* @author JavaSaBr
*/
public final class ColorRGBA implements Cloneable, Serializable {
private static final long serialVersionUID = -3342702659372723983L;
/**
* The red channel.
*/
public float r;
/**
* The green channel.
*/
public float g;
/**
* The blue channel.
*/
public float b;
/**
* The alpha channel.
*/
public float a;
/**
* Instantiates a new Color rgba.
*/
public ColorRGBA() {
r = g = b = a = 1.0f;
}
/**
* Instantiates a new Color rgba.
*
* @param rgba the rgba
*/
public ColorRGBA(@NotNull final ColorRGBA rgba) {
this.a = rgba.a;
this.r = rgba.r;
this.g = rgba.g;
this.b = rgba.b;
}
/**
* Instantiates a new Color rgba.
*
* @param r the r
* @param g the g
* @param b the b
*/
public ColorRGBA(final float r, final float g, final float b) {
this.r = r;
this.g = g;
this.b = b;
this.a = 1F;
}
/**
* Instantiates a new Color rgba.
*
* @param r the r
* @param g the g
* @param b the b
* @param a the a
*/
public ColorRGBA(final float r, final float g, final float b, final float a) {
this.r = r;
this.g = g;
this.b = b;
this.a = a;
}
/**
* Instantiates a new Color rgba.
*
* @param array the array
*/
public ColorRGBA(final float[] array) {
this.r = array[0];
this.g = array.length > 1 ? array[1] : 1F;
this.b = array.length > 2 ? array[2] : 1F;
this.a = array.length > 3 ? array[3] : 1F;
}
/**
* As int abgr int.
*
* @return the int
*/
public int asIntABGR() {
return ((int) (a * 255) & 0xFF) << 24 |
((int) (b * 255) & 0xFF) << 16 |
((int) (g * 255) & 0xFF) << 8 |
(int) (r * 255) & 0xFF;
}
/**
* As int argb int.
*
* @return the int
*/
public int asIntARGB() {
return ((int) (a * 255) & 0xFF) << 24 |
((int) (r * 255) & 0xFF) << 16 |
((int) (g * 255) & 0xFF) << 8 |
(int) (b * 255) & 0xFF;
}
/**
* As int rgba int.
*
* @return the int
*/
public int asIntRGBA() {
return ((int) (r * 255) & 0xFF) << 24 |
((int) (g * 255) & 0xFF) << 16 |
((int) (b * 255) & 0xFF) << 8 |
(int) (a * 255) & 0xFF;
}
@Override
public boolean equals(final Object o) {
if (!(o instanceof ColorRGBA)) {
return false;
} else if (this == o) {
return true;
}
final ColorRGBA comp = (ColorRGBA) o;
if (Float.compare(r, comp.r) != 0) {
return false;
} else if (Float.compare(g, comp.g) != 0) {
return false;
} else if (Float.compare(b, comp.b) != 0) {
return false;
} else if (Float.compare(a, comp.a) != 0) {
return false;
}
return true;
}
/**
* From int argb.
*
* @param color the color
*/
public void fromIntARGB(final int color) {
a = ((byte) (color >> 24) & 0xFF) / 255f;
r = ((byte) (color >> 16) & 0xFF) / 255f;
g = ((byte) (color >> 8) & 0xFF) / 255f;
b = ((byte) color & 0xFF) / 255f;
}
/**
* From int rgba.
*
* @param color the color
*/
public void fromIntRGBA(final int color) {
r = ((byte) (color >> 24) & 0xFF) / 255f;
g = ((byte) (color >> 16) & 0xFF) / 255f;
b = ((byte) (color >> 8) & 0xFF) / 255f;
a = ((byte) color & 0xFF) / 255f;
}
/**
* Gets alpha.
*
* @return the alpha channel.
*/
public float getAlpha() {
return a;
}
/**
* Gets blue.
*
* @return the blue channel.
*/
public float getBlue() {
return b;
}
/**
* Gets green.
*
* @return the green channel.
*/
public float getGreen() {
return g;
}
/**
* Gets red.
*
* @return the red channel.
*/
public float getRed() {
return r;
}
@Override
public int hashCode() {
int hash = 37;
hash += 37 * hash + Float.floatToIntBits(r);
hash += 37 * hash + Float.floatToIntBits(g);
hash += 37 * hash + Float.floatToIntBits(b);
hash += 37 * hash + Float.floatToIntBits(a);
return hash;
}
/**
* Interpolate.
*
* @param beginColor the begin color
* @param finalColor the final color
* @param changeAmnt the change amnt
*/
public void interpolate(@NotNull final ColorRGBA beginColor, @NotNull final ColorRGBA finalColor, final float changeAmnt) {
this.r = (1 - changeAmnt) * beginColor.r + changeAmnt * finalColor.r;
this.g = (1 - changeAmnt) * beginColor.g + changeAmnt * finalColor.g;
this.b = (1 - changeAmnt) * beginColor.b + changeAmnt * finalColor.b;
this.a = (1 - changeAmnt) * beginColor.a + changeAmnt * finalColor.a;
}
/**
* Interpolate.
*
* @param finalColor the final color
* @param changeAmnt the change amnt
*/
public void interpolate(@NotNull final ColorRGBA finalColor, final float changeAmnt) {
this.r = (1 - changeAmnt) * this.r + changeAmnt * finalColor.r;
this.g = (1 - changeAmnt) * this.g + changeAmnt * finalColor.g;
this.b = (1 - changeAmnt) * this.b + changeAmnt * finalColor.b;
this.a = (1 - changeAmnt) * this.a + changeAmnt * finalColor.a;
}
/**
* Set color rgba.
*
* @param r the r
* @param g the g
* @param b the b
* @param a the a
* @return the color rgba
*/
public ColorRGBA set(final float r, final float g, final float b, final float a) {
this.r = r;
this.g = g;
this.b = b;
this.a = a;
return this;
}
@Override
public String toString() {
return "ColorRGBA{" +
"red=" + r +
", green=" + g +
", blue=" + b +
", alpha=" + a +
'}';
}
}
| [
"[email protected]"
]
| |
8c0cd32435f9302ef8ad1536c988ff8b644c88da | 07f74dadd1cb39a9eaf4348fead54155a5bc53c7 | /learning/java-learning/hello-mysql/src/main/java/com/mysql/mapper/GroupJoinRequestMapper.java | c51186ecdb16ee7f6aedd9d32b3fabe5961aa038 | []
| no_license | Barp-hub/remoting | 3978a305ee2c50a7902aa8658cedc5c48f8ec2e5 | c4580b30bb279b7eb9f1919eb2e8371b8b7264b8 | refs/heads/master | 2021-09-12T11:07:29.054797 | 2018-04-16T08:49:43 | 2018-04-16T08:49:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 413 | java | package com.mysql.mapper;
import com.mysql.entity.GroupJoinRequest;
public interface GroupJoinRequestMapper {
int deleteByPrimaryKey(Long rid);
int insert(GroupJoinRequest record);
int insertSelective(GroupJoinRequest record);
GroupJoinRequest selectByPrimaryKey(Long rid);
int updateByPrimaryKeySelective(GroupJoinRequest record);
int updateByPrimaryKey(GroupJoinRequest record);
} | [
"[email protected]"
]
| |
8541d9c28ca74628b202838d27ac4a43d92e5fc8 | 0bf32a21bc4f50c42f5653f29cc68e855fe20b83 | /community/src/main/java/com/nowcoder/community/service/UserService.java | 4b813a6212fd0eb06d2c447e9c73bb12ab34ea0f | []
| no_license | hu793141126/JavaUtil | 5b6717ef6f64273530acba79e2eae572dfc72795 | 1db996178ceb7c08b1e39cee2460be7c0bea3208 | refs/heads/master | 2022-06-23T22:59:10.738779 | 2021-03-24T16:50:59 | 2021-03-24T16:50:59 | 242,908,269 | 1 | 0 | null | 2022-06-21T02:51:31 | 2020-02-25T04:19:34 | HTML | UTF-8 | Java | false | false | 437 | java | package com.nowcoder.community.service;
import com.nowcoder.community.dao.UserMapper;
import com.nowcoder.community.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class UserService {
@Autowired
private UserMapper userMapper;
public User findUserById(int id) {
return userMapper.selectById(id);
}
}
| [
"9875520Aa"
]
| 9875520Aa |
395200c1875b9c4f8fdb2ef090cd52d1bb209fd9 | b1756996a2b73ec962b08f0d8458099a4e22a8e3 | /src/com/javarush/test/level07/lesson04/task02/Solution.java | 2fd3159e8ccad0df210252afc950ed5d19b72b04 | []
| no_license | seyfer/JavaLearning | 1a7b54a72fe833350b5c192b549531aee860853d | bd9bf050f44af25f0d3f079bcd92aa8b85b2b48f | refs/heads/master | 2021-07-08T16:50:14.498783 | 2016-11-13T07:48:11 | 2016-11-13T07:48:11 | 41,493,954 | 2 | 0 | null | 2021-04-26T18:01:13 | 2015-08-27T15:09:39 | Java | UTF-8 | Java | false | false | 1,015 | java | package com.javarush.test.level07.lesson04.task02;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/* ะะฐััะธะฒ ะธะท ัััะพัะตะบ ะฒ ะพะฑัะฐัะฝะพะผ ะฟะพััะดะบะต
1. ะกะพะทะดะฐัั ะผะฐััะธะฒ ะฝะฐ 10 ัััะพัะตะบ.
2. ะะฒะตััะธ ั ะบะปะฐะฒะธะฐัััั 8 ัััะพัะตะบ ะธ ัะพั
ัะฐะฝะธัั ะธั
ะฒ ะผะฐััะธะฒ.
3. ะัะฒะตััะธ ัะพะดะตัะถะธะผะพะต ะฒัะตะณะพ ะผะฐััะธะฒะฐ (10 ัะปะตะผะตะฝัะพะฒ) ะฝะฐ ัะบัะฐะฝ ะฒ ะพะฑัะฐัะฝะพะผ ะฟะพััะดะบะต. ะะฐะถะดัะน ัะปะตะผะตะฝั - ั ะฝะพะฒะพะน ัััะพะบะธ.
*/
public class Solution {
public static void main(String[] args) throws Exception {
//ะฝะฐะฟะธัะธัะต ััั ะฒะฐั ะบะพะด
String[] strings = new String[10];
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
for (int i = 0; i < 8; i++) {
strings[i] = reader.readLine();
}
for (int i = 0; i < 10; i++) {
System.out.println(strings[10 - i - 1]);
}
}
} | [
"[email protected]"
]
| |
c8d6803da151567d7479f6ca36bed6b4038f5163 | 270a0ba0024ed8ef6abf87995e51757b2d62e577 | /src/main/java/com/technothink/speech/core/impl/DBCoreImpl.java | 6c8245e4db220909655348acebfe4fd5618bc9e0 | []
| no_license | technothink/CallCenterJava | c2b30203f54956da0fa72aaf571fa27b6abf31c5 | d1c11e58d89d42850368a936c0902d59c7a41bbd | refs/heads/master | 2020-03-22T14:33:57.627802 | 2018-07-08T17:40:15 | 2018-07-08T17:40:15 | 140,188,669 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 503 | java | package com.technothink.speech.core.impl;
import org.apache.log4j.Logger;
import org.springframework.data.mongodb.core.MongoOperations;
import com.technothink.speech.core.DBCore;
public class DBCoreImpl implements DBCore {
private static final Logger log = Logger.getLogger(DBCoreImpl.class);
public void saveData(MongoOperations mongoTemplate, Object object) {
try {
mongoTemplate.save(object);
} catch (Throwable th) {
log.error("Unable to save data into mongo db ", th);
}
}
}
| [
"[email protected]"
]
| |
4f064b7409596a68a7e7f3086d17e98ee5341b16 | 629de96fd0be0e9c1c07a57464888f7287d6fbab | /app/src/main/java/com/example/mobile_schorgan/SplashActivity.java | 7de37cfb2708ce7ce6512b257b0a35bee2e0cc95 | []
| no_license | jrdevn/diversos-studies-android | 3d47e13bc765770e29ed71f23c9808c96a320485 | b92d33020d3aea3da282b8dc0dfd11c2c0659959 | refs/heads/master | 2023-04-28T17:43:05.862302 | 2021-05-13T22:21:55 | 2021-05-13T22:21:55 | 267,063,680 | 0 | 0 | null | 2021-04-13T22:47:36 | 2020-05-26T14:21:07 | Java | UTF-8 | Java | false | false | 1,277 | java | package com.example.mobile_schorgan;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.WindowManager;
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
getSupportActionBar().hide();
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
SharedPreferences sharedPref = getSharedPreferences("Login", MODE_PRIVATE);
final String login = sharedPref.getString("login", "");
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
if (login.isEmpty()) {
startActivity(new Intent(getBaseContext(), LoginActivity.class));
}
else {
startActivity(new Intent(getBaseContext(), MenuNavActivity.class));
}
finish();
}
}, 3000);
}
} | [
"[email protected]"
]
| |
9b59eab370a7ceb971a2498b246f621d046482ac | 089c2d38522bcfb49fb29e9ad04d8b64222ceffc | /service1/src/main/java/cn/iouoi/config/CacheConfiguration.java | 02db8ac6461ab7ca52442a83465ba22210ef45d3 | []
| no_license | safezpa/my_Jhipster-sample | 293c4fcf5ad43618e86a6d535f3f4374bbd870ed | 255889fee7b5b05300d0a35a870b4f7d1893132d | refs/heads/master | 2020-12-02T22:43:04.746157 | 2017-07-04T03:18:01 | 2017-07-04T03:18:01 | 96,170,760 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,767 | java | package cn.iouoi.config;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.JHipsterProperties;
import com.hazelcast.config.Config;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.config.MapConfig;
import com.hazelcast.config.EvictionPolicy;
import com.hazelcast.config.MaxSizeConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.context.annotation.*;
import org.springframework.core.env.Environment;
import javax.annotation.PreDestroy;
@Configuration
@EnableCaching
@AutoConfigureAfter(value = { MetricsConfiguration.class })
@AutoConfigureBefore(value = { WebConfigurer.class, DatabaseConfiguration.class })
public class CacheConfiguration {
private final Logger log = LoggerFactory.getLogger(CacheConfiguration.class);
private final Environment env;
private final DiscoveryClient discoveryClient;
private final ServerProperties serverProperties;
public CacheConfiguration(Environment env, DiscoveryClient discoveryClient, ServerProperties serverProperties) {
this.env = env;
this.discoveryClient = discoveryClient;
this.serverProperties = serverProperties;
}
@PreDestroy
public void destroy() {
log.info("Closing Cache Manager");
Hazelcast.shutdownAll();
}
@Bean
public CacheManager cacheManager(HazelcastInstance hazelcastInstance) {
log.debug("Starting HazelcastCacheManager");
CacheManager cacheManager = new com.hazelcast.spring.cache.HazelcastCacheManager(hazelcastInstance);
return cacheManager;
}
@Bean
public HazelcastInstance hazelcastInstance(JHipsterProperties jHipsterProperties) {
log.debug("Configuring Hazelcast");
Config config = new Config();
config.setInstanceName("service1");
// The serviceId is by default the application's name, see Spring Boot's eureka.instance.appname property
String serviceId = discoveryClient.getLocalServiceInstance().getServiceId();
log.debug("Configuring Hazelcast clustering for instanceId: {}", serviceId);
// In development, everything goes through 127.0.0.1, with a different port
if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) {
log.debug("Application is running with the \"dev\" profile, Hazelcast " +
"cluster will only work with localhost instances");
System.setProperty("hazelcast.local.localAddress", "127.0.0.1");
config.getNetworkConfig().setPort(serverProperties.getPort() + 5701);
config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true);
for (ServiceInstance instance : discoveryClient.getInstances(serviceId)) {
String clusterMember = "127.0.0.1:" + (instance.getPort() + 5701);
log.debug("Adding Hazelcast (dev) cluster member " + clusterMember);
config.getNetworkConfig().getJoin().getTcpIpConfig().addMember(clusterMember);
}
} else { // Production configuration, one host per instance all using port 5701
config.getNetworkConfig().setPort(5701);
config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true);
for (ServiceInstance instance : discoveryClient.getInstances(serviceId)) {
String clusterMember = instance.getHost() + ":5701";
log.debug("Adding Hazelcast (prod) cluster member " + clusterMember);
config.getNetworkConfig().getJoin().getTcpIpConfig().addMember(clusterMember);
}
}
config.getMapConfigs().put("default", initializeDefaultMapConfig());
config.getMapConfigs().put("cn.iouoi.domain.*", initializeDomainMapConfig(jHipsterProperties));
return Hazelcast.newHazelcastInstance(config);
}
private MapConfig initializeDefaultMapConfig() {
MapConfig mapConfig = new MapConfig();
/*
Number of backups. If 1 is set as the backup-count for example,
then all entries of the map will be copied to another JVM for
fail-safety. Valid numbers are 0 (no backup), 1, 2, 3.
*/
mapConfig.setBackupCount(0);
/*
Valid values are:
NONE (no eviction),
LRU (Least Recently Used),
LFU (Least Frequently Used).
NONE is the default.
*/
mapConfig.setEvictionPolicy(EvictionPolicy.LRU);
/*
Maximum size of the map. When max size is reached,
map is evicted based on the policy defined.
Any integer between 0 and Integer.MAX_VALUE. 0 means
Integer.MAX_VALUE. Default is 0.
*/
mapConfig.setMaxSizeConfig(new MaxSizeConfig(0, MaxSizeConfig.MaxSizePolicy.USED_HEAP_SIZE));
return mapConfig;
}
private MapConfig initializeDomainMapConfig(JHipsterProperties jHipsterProperties) {
MapConfig mapConfig = new MapConfig();
mapConfig.setTimeToLiveSeconds(jHipsterProperties.getCache().getHazelcast().getTimeToLiveSeconds());
return mapConfig;
}
}
| [
"[email protected]"
]
| |
d729035f00bf2a0783b8057e8993da3b04b4d6e4 | 97ff546215058e4014d89ef7d247a4cd077bd455 | /app/src/main/java/com/project/sean/theandroidfooddiary/FoodSearchActivity.java | d25ac19def74cf8446e1184d931a55b25beb0a90 | []
| no_license | SeanSe/TheAndroidFoodDiary | de50882ba6a50c6b5cb339bde6f2fb263ccbc0cd | 551507e74fd182bdc63bf477a964ed25ba25eb05 | refs/heads/master | 2021-01-10T18:31:25.144113 | 2016-06-01T21:14:19 | 2016-06-01T21:14:19 | 58,882,166 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,738 | java | package com.project.sean.theandroidfooddiary;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.SearchView;
import android.widget.TextView;
import com.project.sean.theandroidfooddiary.models.FoodItemModel;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
/**
* Allows a user to search for a specific food item using JSON objects retrieved from a web service.
* Connects using URLConnection to the webservice, using a URL to request specific information.
* The webservice returns a JSON object which is then parsed, this parsed data is then put into
* a view for the user to see. Each food item is selectable and will create a new activity,
* NutrientActivity, to show the nutrient of that food item.
*
* @author Sean Sexton
*/
public class FoodSearchActivity extends AppCompatActivity {
//private TextView tvData;
private ListView lvItems;
private SearchView search;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_food_search);
lvItems = (ListView) findViewById(R.id.lvItems);
search = (SearchView) findViewById(R.id.svFoodItem);
search.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
String search = query;
String apiKey = "OJSuRrEnYD1JHKpoW8x1g2lHieEnktyMnHN82fLR";
String searchURL = "http://api.nal.usda.gov/ndb/search/?format=json&q=" + search + "&sort=n&max=25&offset=0&api_key=" + apiKey;
new FoodSearchTask().execute(searchURL);
return true;
}
@Override
public boolean onQueryTextChange(String newText) {
return false;
}
});
setTitle("Food Search");
// final EditText tfFoodSearch = (EditText)findViewById(R.id.tfFoodSearch);
//
// Button btnSearch = (Button)findViewById(R.id.btnSearch);
//
// btnSearch.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// String search = tfFoodSearch.getText().toString();
// String apiKey = "OJSuRrEnYD1JHKpoW8x1g2lHieEnktyMnHN82fLR";
// String searchURL = "http://api.nal.usda.gov/ndb/search/?format=json&q=" + search + "&sort=n&max=25&offset=0&api_key=" + apiKey;
// new FoodSearchTask().execute(searchURL);
// }
// });
// lvItems.setOnItemClickListener(new AdapterView.OnItemClickListener() {
// @Override
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// String foodName = ;
// Intent myIntent = new Intent(getApplicationContext(), NutrientActivity.class);
// myIntent.putExtra("foodName", foodName);
// startActivity(myIntent);
// }
// });
}
public class FoodSearchTask extends AsyncTask<String, String, List<FoodItemModel>> {
AlertDialog.Builder alertDialog;
@Override
protected void onPreExecute() {
super.onPreExecute();
alertDialog = new AlertDialog.Builder(FoodSearchActivity.this);
}
@Override
protected List<FoodItemModel> doInBackground(String... params) {
HttpURLConnection connection = null;
BufferedReader reader = null;
try {
URL url = new URL(params[0]);
connection = (HttpURLConnection) url.openConnection();
connection.connect();
InputStream stream = connection.getInputStream();
reader = new BufferedReader(new InputStreamReader(stream));
StringBuffer buffer = new StringBuffer();
String line = "";
while ((line = reader.readLine()) != null) {
buffer.append(line);
}
String finalJson = buffer.toString();
JSONObject parentObject = new JSONObject(finalJson);
//TODO need to deal with JSON errors that are return
//TODO maybe create new activity/view for errors
JSONObject listObject = parentObject.getJSONObject("list");
JSONArray itemsArray = listObject.getJSONArray("item");
List<FoodItemModel> itemList = new ArrayList<>();
for (int i = 0; i < itemsArray.length(); i++) {
JSONObject finalObject = itemsArray.getJSONObject(i);
FoodItemModel foodItemModel = new FoodItemModel();
foodItemModel.setOffset(finalObject.getInt("offset"));
foodItemModel.setGroup(finalObject.getString("group"));
foodItemModel.setName(finalObject.getString("name"));
foodItemModel.setNdbno(finalObject.getString("ndbno"));
//Adding the final object in the list
itemList.add(foodItemModel);
}
return itemList;
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
} finally {
if (connection != null) {
connection.disconnect();
}
try {
if (reader != null) {
reader.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
return null;
}
@Override
protected void onPostExecute(List<FoodItemModel> result) {
super.onPostExecute(result);
if (result == null) {
alertDialog.setTitle("Error - Status 400");
alertDialog.setMessage("Your search resulted in zero items. Please change your search and try again.");
alertDialog.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
}
});
alertDialog.show();
} else {
FoodItemAdapter adapter = new FoodItemAdapter(getApplicationContext(),
R.layout.item_row, result);
lvItems.setAdapter(adapter);
final List<FoodItemModel> currentList = result;
lvItems.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
FoodItemModel foodList = currentList.get(position);
//String foodName = foodList.getName();
String foodId = foodList.getNdbno();
Intent myIntent = new Intent(getApplicationContext(), NutrientActivity.class);
//myIntent.putExtra("foodName", foodName);
myIntent.putExtra("foodId", foodId);
startActivity(myIntent);
}
});
//TODO add data to the list
}
}
}
public class FoodItemAdapter extends ArrayAdapter {
private List<FoodItemModel> foodItemModelList;
private int resource;
private LayoutInflater inflater;
public FoodItemAdapter(Context context, int resource, List<FoodItemModel> objects) {
super(context, resource, objects);
foodItemModelList = objects;
this.resource = resource;
inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
Log.d("Food Item Size: ", "" + foodItemModelList.size());
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (convertView == null) {
holder = new ViewHolder();
convertView = inflater.inflate(resource, null);
holder.tvOffset = (TextView) convertView.findViewById(R.id.tvOffset);
holder.tvGroup = (TextView) convertView.findViewById(R.id.tvGroup);
holder.tvNdbno = (TextView) convertView.findViewById(R.id.tvNdbno);
holder.tvName = (TextView) convertView.findViewById(R.id.tvName);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
Log.d("Position: ", "" + position);
holder.tvOffset.setText("Offset: " + foodItemModelList.get(position).getOffset());
holder.tvGroup.setText("Group: " + foodItemModelList.get(position).getGroup());
holder.tvNdbno.setText("Food ID: " + foodItemModelList.get(position).getNdbno());
holder.tvName.setText("Name: " + foodItemModelList.get(position).getName());
//Alternates row colours, BLUE if the remainder of position divided by 2 is 0
//otherwise it is CYAN
//.setBackGroundColor(Color.parseColor(#fffff));
if ((position % 2) == 0) {
convertView.setBackgroundColor(Color.WHITE);
} else {
convertView.setBackgroundColor(Color.LTGRAY);
}
return convertView;
}
class ViewHolder {
private TextView tvOffset;
private TextView tvGroup;
private TextView tvNdbno;
private TextView tvName;
}
}
}
| [
"[email protected]"
]
| |
175bea83e3b0cf9d040046aa6a919588bdb5c954 | 21bc3b4d6d7aaaf4042a85796029ce5c382b350e | /Observer/RealCase/WeatherData.java | 3ca4c137ee425839f0b4fc5d5657207cc6d8cbba | []
| no_license | mrseal/DesignPatterns | 4831b9106fccc7385fce57b249cf492d0342529e | d32fa5a908501b66a7b866a2839fccc6a628609a | refs/heads/master | 2021-05-31T18:57:38.481904 | 2016-04-24T10:53:03 | 2016-04-24T10:53:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,034 | java | import java.util.List;
import java.util.ArrayList;
public class WeatherData implements Subject {
private List<Observer> observers;
private float temperature;
private float humidity;
private float pressure;
public WeatherData() {
observers = new ArrayList<>();
}
@Override
public void registerObserver(Observer o) {
observers.add(o);
}
@Override
public void removeObserver(Observer o) {
int i = observers.indexOf(o);
if (i >= 0) {
observers.remove(i);
}
}
@Override
public void notifyObservers() {
for (Observer o : observers) {
o.update(temperature, humidity, pressure);
}
}
public void measurementsChanged() {
notifyObservers();
}
public void setMeasurements(float temperature, float humidity, float pressure) {
this.temperature = temperature;
this.humidity = humidity;
this.pressure = pressure;
measurementsChanged();
}
}
| [
"[email protected]"
]
| |
0d24d624b434bd376704dc753c7be04e05e9b6c2 | ba1cc9e4617ed6584c3fdcb13f6a8172580ded63 | /Part 1/Trees/src/CycleFoundException.java | a3269f2460d100fa32469a658e2cf1105972b85a | []
| no_license | FullofQuarks/CS3345-DS | 3007615e58235b6f0082540e6b224cc52e4c73de | 9566c64a5f43514384ea8ffb02d0f4bf3d3f23bc | refs/heads/master | 2021-01-21T05:59:11.937106 | 2018-03-20T16:53:41 | 2018-03-20T16:53:41 | 101,931,202 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 716 | java |
public class CycleFoundException extends Exception {
public CycleFoundException() {
// TODO Auto-generated constructor stub
}
public CycleFoundException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public CycleFoundException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
public CycleFoundException(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
public CycleFoundException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
// TODO Auto-generated constructor stub
}
}
| [
"[email protected]"
]
| |
32411d851a8f34b0df7cb29842666c82268c870b | d79a8175fc881806cac62c839d6b2b0a188b7081 | /src/ru/javawebinar/basejava/sql/SqlHelper.java | 0f5f50b93d4914a0c80c141011537b4c8ca2d0a3 | []
| no_license | TulyakovYasha/basejava | 215e0362e01b1606dea043ec577337831724df63 | 58a7846e359a9f463bdb991749eeb89139a9a746 | refs/heads/master | 2020-04-18T23:53:41.751958 | 2019-05-14T20:49:41 | 2019-05-14T20:49:41 | 167,798,165 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,414 | java | package ru.javawebinar.basejava.sql;
import ru.javawebinar.basejava.exception.StorageException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public class SqlHelper {
public final ConnectionFactory connectionFactory;
public SqlHelper(ConnectionFactory connectionFactory) {
this.connectionFactory = connectionFactory;
}
public void execute(String sql) {
execute(sql, PreparedStatement::execute);
}
public <T> T execute(String sql, SqlExecutor<T> executor) {
try (Connection connection = connectionFactory.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
return executor.execute(preparedStatement);
} catch (SQLException e) {
throw ExceptionUtil.convertException(e);
}
}
public <T> T transactionalExecute(SqlTransaction<T> executor) {
try (Connection conn = connectionFactory.getConnection()) {
try {
conn.setAutoCommit(false);
T res = executor.execute(conn);
conn.commit();
return res;
} catch (SQLException e) {
conn.rollback();
throw ExceptionUtil.convertException(e);
}
} catch (SQLException e) {
throw new StorageException(e);
}
}
}
| [
"[email protected]"
]
| |
b90f0a2cf7b7e3674e0ec32efcdde8e799dbd34b | 6d79d8a8e9576b5fe41ab239761879cfdf59e146 | /core/pms-core/src/main/java/by/get/pms/exception/StaleEntityException.java | 8d69d03e27e4622bec3dbfa4f6d96331aa54bf5b | []
| no_license | milos-savic/GET-PMS | f07abc8f8ada149d8fa01ceec16df5db35c02b81 | c394736399842259ab1b99af0e67580c2e1bba9f | refs/heads/master | 2021-01-13T07:37:54.912025 | 2017-03-06T20:14:45 | 2017-03-06T20:14:45 | 69,986,362 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 329 | java | package by.get.pms.exception;
/**
* Stale entity exception occurs when entity database version is not consistent
* with entity version in memory.
*
* Created by Milos.Savic on 10/12/2016.
*/
public class StaleEntityException extends RuntimeException {
public StaleEntityException(String message) {
super(message);
}
}
| [
"[email protected]"
]
| |
b4810fbf2d71ce653b3a03f65f392f9a174135e3 | 67b7aa7687d2f1dfcaeef7a8355cf39fbd483a21 | /Ekart-product-ratings/src/main/java/com/infy/entity/Ratings.java | 42d8cb1b30c37c71aeaf7cf77ea3cc8f23719817 | []
| no_license | jasmintrada/Ekart-microservices | 8c65cd815d3975350b8cf669c6aa729d672cc538 | 37f05fc21751da5489007ccda4b2c44055e45326 | refs/heads/master | 2022-12-13T23:48:22.648823 | 2020-08-29T12:09:57 | 2020-08-29T12:09:57 | 258,502,908 | 0 | 2 | null | 2020-08-29T12:14:39 | 2020-04-24T12:13:19 | Java | UTF-8 | Java | false | false | 1,048 | java | package com.infy.entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import org.hibernate.annotations.GenericGenerator;
@Entity
@GenericGenerator(name = "ratingsGenerator",strategy = "native")
public class Ratings {
@Id
@GeneratedValue(generator = "ratingsGenerator")
private int id;
private String userName;
private int productId;
private double ratings;
private String comments;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public int getProductId() {
return productId;
}
public void setProductId(int productId) {
this.productId = productId;
}
public double getRatings() {
return ratings;
}
public void setRatings(double ratings) {
this.ratings = ratings;
}
public String getComments() {
return comments;
}
public void setComments(String comments) {
this.comments = comments;
}
}
| [
"[email protected]"
]
| |
a5564e9ec5a6217292b4ac0adcc317a0c980fda1 | 93b72e09f4dff0dfa29b631bb02ec9d6bf18c480 | /src/main/java/com/king/library/common/model/LoginResult.java | 9eeaf35d4dc2aa2a6af63bec62b258811eb528f6 | []
| no_license | king1024/library | 8bb2fbfd45632201b913813879d1cff6ccd1d8b5 | 19cb01c8199f91606b24dc2ffca8785a59a092a1 | refs/heads/master | 2022-06-23T00:35:18.570191 | 2020-02-17T07:32:13 | 2020-02-17T07:32:13 | 229,909,622 | 0 | 0 | null | 2022-06-17T02:48:13 | 2019-12-24T09:09:08 | CSS | UTF-8 | Java | false | false | 715 | java | package com.king.library.common.model;
/**
* @date: 2019/12/23 17:37
* @author: duanyong
* @desc:
*/
public class LoginResult {
private boolean isLogin = false;
private String result;
public LoginResult() {
}
public LoginResult(boolean isLogin) {
this.isLogin = isLogin;
}
public LoginResult(boolean isLogin,String result) {
this.isLogin = isLogin;
this.result = result;
}
public boolean isLogin() {
return isLogin;
}
public void setLogin(boolean login) {
isLogin = login;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
}
| [
"[email protected]"
]
| |
d3ebfb88500b80ec697c3c0a2b481f260567d3b7 | d04f3a516d4830f0d834cf5c596f7a821d3990c9 | /wx-common/src/main/java/com/base/BaseEntity.java | 5e5415068763f9a3cd2ac2ff51702025d866d069 | []
| no_license | xiaorenwuchao/Frame | 295ee31efb5ed245c9f49dca5969d954db1a9314 | 548b285563faea77fdc33c4117774e30629cbf8b | refs/heads/master | 2021-01-20T10:55:18.044928 | 2016-12-26T02:34:28 | 2016-12-26T02:34:28 | 77,207,416 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,764 | java | package com.base;
import java.io.InputStream;
import java.io.Serializable;
import java.io.Writer;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.core.util.QuickWriter;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
import com.thoughtworks.xstream.io.xml.XppDriver;
/**
* @้กน็ฎๅ็งฐ๏ผcommon
* @็ฑปๅ็งฐ๏ผBaseEntity
* @็ฑปๆ่ฟฐ๏ผ ๆๆๅฎไฝ็ฑป็็ถ็ฑปใๅฏๅฐๅ
ฌๅ
ฑ็ๅฑๆงๆๆ็ฑปๅบๅๅ้ไธญๅจๆญค็ฑปไธญ
* @ๅๅปบไบบ๏ผYangChao
* @่็ณปๆนๅผ๏ผ[email protected]
* @ๅๅปบๆถ้ด๏ผ2016ๅนด12ๆ1ๆฅ ไธๅ5:14:42
* @version 1.0.0
*/
public abstract class BaseEntity implements Serializable {
public static final long serialVersionUID = 1L;
public Integer id;
/**
* ๆฉๅฑxstream๏ผไฝฟๅ
ถๆฏๆCDATAๅ
*
* @date 2013-05-19
*/
private XStream xstream = new XStream(new XppDriver() {
public HierarchicalStreamWriter createWriter(Writer out) {
return new PrettyPrintWriter(out) {
// ๅฏนๆๆxml่็น็่ฝฌๆข้ฝๅขๅ CDATAๆ ่ฎฐ
boolean cdata = true;
public void startNode(String name, @SuppressWarnings("rawtypes") Class clazz) {
super.startNode(name, clazz);
}
protected void writeText(QuickWriter writer, String text) {
if (cdata) {
writer.write("<![CDATA[");
writer.write(text);
writer.write("]]>");
} else {
writer.write(text);
}
}
};
}
});
/**
*
* @Title: getXML
* @Description: ๅฏน่ฑก่ฝฌๆขๆxml
* @return
* @author YangChao
* @date 2016ๅนด12ๆ3ๆฅ ไธๅ10:08:01
*/
public String getXML() {
xstream.alias("xml", this.getClass());
xstream.processAnnotations(this.getClass()); // ้่ฟๆณจ่งฃๆนๅผ็๏ผไธๅฎ่ฆๆ่ฟๅฅ่ฏ
return xstream.toXML(this);
}
/**
*
* @Title: toBean
* @Description: ๅฐไผ ๅ
ฅxmlๆๆฌ่ฝฌๆขๆJavaๅฏน่ฑก
* @param xmlStr
* @return
* @author YangChao
* @date 2016ๅนด12ๆ3ๆฅ ไธๅ7:03:33
*/
public BaseEntity toBean(String xmlStr) {
xstream.alias("xml", this.getClass());
xstream.processAnnotations(this.getClass()); // ้่ฟๆณจ่งฃๆนๅผ็๏ผไธๅฎ่ฆๆ่ฟๅฅ่ฏ
return (BaseEntity) xstream.fromXML(xmlStr);
}
/**
*
* @Title: toBean
* @Description: ่ฝฌๆขๆJavaๅฏน่ฑก
* @param is
* @return
* @author YangChao
* @date 2016ๅนด12ๆ3ๆฅ ไธๅ7:29:56
*/
public BaseEntity toBean(InputStream is) {
xstream.alias("xml", this.getClass());
xstream.processAnnotations(this.getClass()); // ้่ฟๆณจ่งฃๆนๅผ็๏ผไธๅฎ่ฆๆ่ฟๅฅ่ฏ
return (BaseEntity) xstream.fromXML(is);
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public XStream getXstream() {
return xstream;
}
}
| [
"[email protected]"
]
| |
5e8ce9f31be3ab442df1f30a268f8628206b6f19 | 74b47b895b2f739612371f871c7f940502e7165b | /aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/transform/ConformancePackComplianceScoresFiltersMarshaller.java | 204264a74c76adeb34d28406d49b81df0abac4a8 | [
"Apache-2.0"
]
| permissive | baganda07/aws-sdk-java | fe1958ed679cd95b4c48f971393bf03eb5512799 | f19bdb30177106b5d6394223a40a382b87adf742 | refs/heads/master | 2022-11-09T21:55:43.857201 | 2022-10-24T21:08:19 | 2022-10-24T21:08:19 | 221,028,223 | 0 | 0 | Apache-2.0 | 2019-11-11T16:57:12 | 2019-11-11T16:57:11 | null | UTF-8 | Java | false | false | 2,224 | java | /*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.config.model.transform;
import java.util.List;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.config.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* ConformancePackComplianceScoresFiltersMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class ConformancePackComplianceScoresFiltersMarshaller {
private static final MarshallingInfo<List> CONFORMANCEPACKNAMES_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ConformancePackNames").build();
private static final ConformancePackComplianceScoresFiltersMarshaller instance = new ConformancePackComplianceScoresFiltersMarshaller();
public static ConformancePackComplianceScoresFiltersMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(ConformancePackComplianceScoresFilters conformancePackComplianceScoresFilters, ProtocolMarshaller protocolMarshaller) {
if (conformancePackComplianceScoresFilters == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(conformancePackComplianceScoresFilters.getConformancePackNames(), CONFORMANCEPACKNAMES_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
| [
""
]
| |
6fcdecbd10be78dba44033aced4f4797b46343c9 | 7b2970960e9089a2f95120fe666d656cf22b92fd | /zl_ssmmain/zl_ssm_domain/src/main/java/com/zl/ssm/dao/Member.java | c27b3318b8b59db31f0630940681410953a889d2 | []
| no_license | cscsg/repo3 | 6a522f3c93d8d10697b7e9e2faf8169e8c7ad7b7 | 5c77ce2ca30847f22d611dda88a2d496861509e2 | refs/heads/master | 2022-12-13T06:44:01.946596 | 2020-08-31T09:41:32 | 2020-08-31T09:41:32 | 291,681,086 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 877 | java | package com.zl.ssm.dao;
public class Member {
private Integer id;
private String name;
private String nickname;
private String phoneNum;
private String email;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getPhoneNum() {
return phoneNum;
}
public void setPhoneNum(String phoneNum) {
this.phoneNum = phoneNum;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
| [
"[email protected]"
]
| |
ccfbb15e9166d9c88f583410bdacbd11fbf5832b | 11c6b3c5415a75bf37fde5cd5dc4ecd21ab95c87 | /InterviewBasicHandsOn/OOP/Instance/CreateStudent.java | 99def38ec2dff9351a23e1424c3bc55055eb58f2 | []
| no_license | rdp128/Java | 69a1e46e5aaf87216520294ecac11f214569213f | 5a96a1b2ffd7943df14b52c7fada43be9a790f88 | refs/heads/master | 2023-07-07T04:51:34.595894 | 2023-06-30T21:57:05 | 2023-06-30T21:57:05 | 146,137,563 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 384 | java | package Instance;
public class CreateStudent {
public static void main(String[] args)
{
Student s1 = new Student(101,"Rohan");
// s1.sid= 101;
// s1.name= "Rohan";
Student s2 = new Student(102,"Kishan");
// s2.sid= 102;
// s2.name= "Kishan";
System.out.println(s1.sid +" : " + s1.name) ;
System.out.println(s2.sid +" : " + s2.name) ;
}
}
| [
"[email protected]"
]
| |
78e26d27c4717e9ac30aaa8377658747a73f91a1 | ab7861bd781c68fd13ec8aee472e4d1e855fd8d1 | /springcloud/ๅพฎๆๅก/NetFlix/ไธใEurekaไนๆๅกๆถ่ดน่
ไธ็ไบง่
ๅฎๆ๏ผRibbon+hystrix๏ผ/user-api/src/main/java/com/gpdi/user/entity/User.java | 4f21056a6a47f8d5a60d0a02b47d1b24052ee75a | []
| no_license | nibabadeyeye/microservice | 4182f591575e4075a719886a6607d7d48bb94dfe | 2f0effa356a68cefed3a5fedff552e65d86e565a | refs/heads/master | 2022-12-09T19:10:39.895273 | 2019-12-10T03:12:33 | 2019-12-10T03:18:32 | 224,818,673 | 0 | 0 | null | 2022-12-06T00:33:56 | 2019-11-29T09:14:45 | Java | UTF-8 | Java | false | false | 574 | java | package com.gpdi.user.entity;
/**
*
* @desc:็จๆทๅฎไฝ็ฑป๏ผPOJO/VO/Domain๏ผ
*
*/
public class User {
private Long id;
private String name;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "User{" +
"id=" + id +
", name='" + name + '\'' +
'}';
}
}
| [
"[email protected]"
]
| |
5c81698aca5ec1de0960036a84fa57fa816310a3 | 59888e4f78bc87f3050a5d3a1f0b6e8caacd23dc | /coffeemanagement/src/main/java/com/example/entity/BillEntity.java | ccdd7dd899383cd7ae47120dc79f472d89ab5fe7 | []
| no_license | ctdung27/Datn2020 | 11fa12f6d3085e69cf19f44772f854bf405171de | 282743f22b85de23ce05c2526aaebf74a2afa16b | refs/heads/master | 2022-04-17T20:27:16.664908 | 2020-04-17T13:40:13 | 2020-04-17T13:40:13 | 256,509,514 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,243 | java | package com.example.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name = "bill")
public class BillEntity extends BaseEntity {
@Column(name = "status")
private String status;
@Column(name = "quantity")
private Integer quantity;
@Column(name = "totalprice")
private Integer totalPrice;
@ManyToOne
@JoinColumn(name = "seatid")
private SeatEntity seat;
@ManyToOne
@JoinColumn(name = "productid")
private ProductEntity product;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Integer getQuantity() {
return quantity;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
public Integer getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(Integer totalPrice) {
this.totalPrice = totalPrice;
}
public ProductEntity getProduct() {
return product;
}
public void setProduct(ProductEntity product) {
this.product = product;
}
public SeatEntity getSeat() {
return seat;
}
public void setSeat(SeatEntity seat) {
this.seat = seat;
}
}
| [
"[email protected]"
]
| |
bf2bc455d2b542b778e05e5e573e9201e59b6784 | 4f428e0d38bb0137c4254a7c4e098b6199212324 | /ATM_SYSTEM/src/NEW_ACCOUNT.java | 0ce3fd8020f00f72479eec58ba1b40b1d712b1ac | []
| no_license | Anwar008/ATM_SYSTEM | 96443266430f9d49555dec8ebd06da088747d2bb | 0d30c7fa02d1431aeb5729d4354365b8f32d7071 | refs/heads/master | 2020-09-27T08:54:49.495129 | 2019-12-07T08:30:58 | 2019-12-07T08:30:58 | 226,479,179 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 21,257 | java |
import java.awt.Toolkit;
import java.awt.event.WindowEvent;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.JOptionPane;
/*
* 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.
*/
/**
*
* @author Mr.Indian Hacker
*/
public class NEW_ACCOUNT extends javax.swing.JFrame {
Connection conn =null;
PreparedStatement pst=null;
ResultSet rs=null;
/**
* Creates new form NEW_ACCOUNT
*/
public NEW_ACCOUNT() {
initComponents();
}
/**
* 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() {
buttonGroup1 = new javax.swing.ButtonGroup();
form = new javax.swing.JPanel();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jLabel11 = new javax.swing.JLabel();
jTextField10 = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
jTextField6 = new javax.swing.JTextField();
jLabel7 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jTextField8 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
password = new javax.swing.JPasswordField();
jLabel4 = new javax.swing.JLabel();
jTextField2 = new javax.swing.JTextField();
jTextField3 = new javax.swing.JTextField();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
addWindowFocusListener(new java.awt.event.WindowFocusListener() {
public void windowGainedFocus(java.awt.event.WindowEvent evt) {
formWindowGainedFocus(evt);
}
public void windowLostFocus(java.awt.event.WindowEvent evt) {
}
});
form.setBackground(new java.awt.Color(0, 153, 153));
form.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
form.setForeground(new java.awt.Color(51, 51, 255));
form.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
formFocusGained(evt);
}
});
jPanel1.setBackground(new java.awt.Color(100, 149, 237));
jPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel1.setForeground(new java.awt.Color(240, 240, 240));
jLabel1.setText("ADD CUSTOMER DETAILS");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(161, 161, 161)
.addComponent(jLabel1)
.addContainerGap(124, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(25, 25, 25)
.addComponent(jLabel1)
.addContainerGap(24, Short.MAX_VALUE))
);
jPanel2.setBackground(new java.awt.Color(128, 128, 0));
jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
jLabel11.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel11.setForeground(new java.awt.Color(240, 240, 240));
jLabel11.setText("CUSTOMER ID:");
jTextField10.setText(" ");
jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel2.setForeground(new java.awt.Color(240, 240, 240));
jLabel2.setText("USER NAME:");
jTextField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1ActionPerformed(evt);
}
});
jLabel6.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel6.setForeground(new java.awt.Color(240, 240, 240));
jLabel6.setText("EMAIL ADDRESS:");
jLabel7.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel7.setForeground(new java.awt.Color(240, 240, 240));
jLabel7.setText("ADDRESS:");
jLabel12.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel12.setForeground(new java.awt.Color(240, 240, 240));
jLabel12.setText("MOBILE NO:");
jTextField8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField8ActionPerformed(evt);
}
});
jButton1.setBackground(new java.awt.Color(30, 144, 255));
jButton1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jButton1.setForeground(new java.awt.Color(240, 240, 240));
jButton1.setText("SAVE");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel3.setForeground(new java.awt.Color(240, 240, 240));
jLabel3.setText("PASSWORD:");
jLabel4.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel4.setForeground(new java.awt.Color(240, 240, 240));
jLabel4.setText("BALANCE:");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(20, 20, 20)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel6)
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField8, javax.swing.GroupLayout.DEFAULT_SIZE, 233, Short.MAX_VALUE)
.addComponent(jTextField2)
.addComponent(jTextField6)
.addComponent(jTextField3)))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(164, 164, 164)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addContainerGap(48, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jTextField10)
.addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(14, 14, 14)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(password)
.addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jTextField6)
.addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jTextField3)
.addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE))
.addGap(28, 28, 28)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE)
.addComponent(jTextField2))
.addGap(48, 48, 48)
.addComponent(jButton1)
.addContainerGap(55, Short.MAX_VALUE))
);
javax.swing.GroupLayout formLayout = new javax.swing.GroupLayout(form);
form.setLayout(formLayout);
formLayout.setHorizontalGroup(
formLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(formLayout.createSequentialGroup()
.addContainerGap(36, Short.MAX_VALUE)
.addGroup(formLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(42, Short.MAX_VALUE))
);
formLayout.setVerticalGroup(
formLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(formLayout.createSequentialGroup()
.addGap(31, 31, 31)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(30, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(form, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(form, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents
private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField1ActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
String username=jTextField1.getText();
String id=jTextField10.getText();
String pass=new String(password.getPassword());
String email,address;
email=jTextField6.getText();
address=jTextField3.getText();
String balance=jTextField2.getText();
String mobno=jTextField8.getText();
if(id.isEmpty())
{
JOptionPane.showMessageDialog(null, "Enter ID");
}
else if(username.isEmpty())
{
JOptionPane.showMessageDialog(null, "ENTER YOUR USER NAME");
}
else if(pass.isEmpty())
{
JOptionPane.showMessageDialog(null, "ENTER YOUR PASSWORD");
}
else if(email.isEmpty())
{
JOptionPane.showMessageDialog(null, "Email field can't be left empty");
}
else if(address.isEmpty())
{
JOptionPane.showMessageDialog(null, "Address field can't be left empty");
}
else if(mobno.isEmpty())
{
JOptionPane.showMessageDialog(null, "ENTER YOUR MOBILE No");
}
else if(balance.isEmpty())
{
JOptionPane.showMessageDialog(null, "ENTER SOME AMOUNT");
}
else
{
Connection conn=null;
PreparedStatement pstmt=null;
try{
Class.forName("java.sql.DriverManager");
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/atm","root","root");
Statement stmt=null;
stmt=conn.createStatement();
String query=("INSERT INTO details(id,username,password,email,address,mob_no,balance) values ('"+id+"','"+username+"','"+pass+"','"+email+"','"+address+"',"+mobno+","+balance+")");
int qexecute=stmt.executeUpdate(query);
JOptionPane.showMessageDialog(this, "ACCOUNT INFORMATION SAVED SUCCESSFULLY");
jButton1.setEnabled(false);
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
password.setText("");
jTextField6.setText("");
jTextField10.setText("");
jTextField8.setText("");
}catch(Exception e)
{
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
}//GEN-LAST:event_jButton1ActionPerformed
private void jTextField8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField8ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField8ActionPerformed
private void formFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formFocusGained
// TODO add your handling code here:
}//GEN-LAST:event_formFocusGained
private void formWindowGainedFocus(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowGainedFocus
}//GEN-LAST:event_formWindowGainedFocus
/**
* @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(NEW_ACCOUNT.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NEW_ACCOUNT.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NEW_ACCOUNT.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NEW_ACCOUNT.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 NEW_ACCOUNT().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JPanel form;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField10;
private javax.swing.JTextField jTextField2;
private javax.swing.JTextField jTextField3;
private javax.swing.JTextField jTextField6;
private javax.swing.JTextField jTextField8;
private javax.swing.JPasswordField password;
// End of variables declaration//GEN-END:variables
private void close() {
WindowEvent winClosingEvent=new WindowEvent(this,WindowEvent.WINDOW_CLOSING);
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);
}
private PreparedStatement setString(Object object, String text) {
return null;
}
}
| [
"[email protected]"
]
| |
bfc0e3b2c9e0e548a6fcd3932082c86a10e6edd5 | e9890f26429d42a7e34d7ef21dca18feb2c3976f | /src/main/java/CRM/SubEditPages/Locators/Constants/PE_LocatorsConstants.java | 52b4798668d48ef7225b25aad985eeff0a6ed740 | []
| no_license | ramisbhargav473/APOI | 41412a287b30c5c7d7326313397fc6a205c312a1 | 75c1e225db56c4eb0ad99df2f9a391da3558422d | refs/heads/master | 2022-07-24T20:16:40.413042 | 2019-10-20T21:59:02 | 2019-10-20T21:59:02 | 247,151,720 | 0 | 0 | null | 2022-06-29T18:00:51 | 2020-03-13T19:57:14 | Java | UTF-8 | Java | false | false | 9,252 | java | /**
*
*/
package CRM.SubEditPages.Locators.Constants;
import java.lang.reflect.Field;
/**
* @author jteja
*
*/
public class PE_LocatorsConstants {
/*-------------------------------------------------Prospect Edit Page Locators--------------------------------------------*/
public static final String PE_COMPANY_NAME_TEXTFIELD = "div[class='container_main prospect_header'] div[class='mat-form-field-infix'] input[id='id_companyName']";
public static final String PE_BUSINESS_TYPE_DROPDOWN = "div[class='container_main prospect_header'] div[class='mat-form-field-infix'] mat-select[id='id_customerBusinessTypeId'] div[class='mat-select-arrow']";
public static final String PE_WEBSITE_TEXTFIELD = "div[class='container_main prospect_header'] div[class='mat-form-field-infix'] input[id='id_website']";
public static final String PE_SALESREP_DROPDOWN = "div[class='container_main prospect_header'] div[class='mat-form-field-infix'] mat-select[id='id_salesRepId'] div[class='mat-select-arrow']";
public static final String PE_PROSPECT_LEVELINDICATOR = "div[class='container_main prospect_card'] div[class='lead_details_slider_container'] div[class='flex_row slider_text_container']";
public static final String PE_BUSINESS_UNIT_DROPDOWN = "div[class='container_main prospect_card'] div[class='mat-form-field-infix'] mat-select[id='id_businessUnitId'] div[class='mat-select-arrow']";
public static final String PE_COMPETITOR_AGREEMENT_EXPIRY_DATE_TEXTFIELD = "div[class='container_main prospect_card'] div[class='mat-form-field-infix'] input[id='id_competitorAgreementExpiryDate']";
public static final String PE_COMPETITOR_DROPDOWN = "div[class='prospect_card_sub'] div[class='mat-form-field-infix'] mat-select[id='id_competitorId'] div[class='mat-select-arrow']";
public static final String PE_EXPIRY_DATE_OBTAINED_ON_TEXTFIELD = "div[class='container_main prospect_card'] div[class='mat-form-field-infix'] input[id='id_competitorAgreementExpiryDateObtainedOn']";
public static final String PE_SERVICE_LINE_DROPODOWN = "div[class='container_main prospect_card'] prospect-lead-details prospect-service-estimation-collection button";
public static final String PE_SERVICE_TYPE_DROPDOWN = "div[class='container_main prospect_card'] div[class='mat-form-field-infix'] mat-select[id='id_serviceTypeId'] div[class='mat-select-arrow']";
public static final String PE_ESTIMATED_AMOUNT_TEXTFIELD = "div[class='container_main prospect_card'] div[class='mat-form-field-infix'] input[id='id_serviceEstimatedAmount']";
public static final String PE_CONTAINER_SIZE_DROPDOWN = "div[class='container_main prospect_card'] div[class='mat-form-field-infix'] mat-select[id='id_containerSizeId'] div[class='mat-select-arrow']";
public static final String PE_FREQUENCY_DROPDOWN = "div[class='container_main prospect_card'] div[class='mat-form-field-infix'] mat-select[id='id_serviceFrequencyId'] div[class='mat-select-arrow']";
public static final String PE_ADD_CONTACT_BUTTON = "div[class='container_main prospect_card'] prospect-contact-details wishes-contact-collection mat-chip-list mat-chip[class='add_button mat-chip mat-primary mat-standard-chip']";
public static final String PE_PRIMARY_CONTACT_CHECKBOX = "div[class='container_main prospect_card'] prospect-contact-details wishes-contact-collection wishes-contact mat-checkbox[formcontrolname='isPrimaryContact'] input";
public static final String PE_CONTACT_NAME_TEXTFIELD = "div[class='container_main prospect_card'] prospect-contact-details wishes-contact-collection wishes-contact mat-form-field input[formcontrolname='contactName']";
public static final String PE_CONTACT_POSITION_TEXTFIELD = "div[class='container_main prospect_card'] prospect-contact-details wishes-contact-collection wishes-contact mat-form-field input[formcontrolname='contactPosition']";
public static final String PE_CONTACT_EMAIL_TEXTFIELD = "div[class='container_main prospect_card'] prospect-contact-details wishes-contact-collection wishes-contact mat-form-field input[formcontrolname='email']";
public static final String PE_CONTACT_PRIMARY_PHONE_TEXTFIELD = "div[class='container_main prospect_card'] prospect-contact-details wishes-contact-collection wishes-contact mat-form-field input[formcontrolname='primaryPhoneNumber']";
public static final String PE_CONTACT_PRIMARY_EXTN_TEXTFIELD = "div[class='container_main prospect_card'] prospect-contact-details wishes-contact-collection wishes-contact mat-form-field input[formcontrolname='primaryPhoneNumberExtension']";
public static final String PE_CONTACT_SECONDARY_PHONE_TEXTFIELD = "div[class='container_main prospect_card'] prospect-contact-details wishes-contact-collection wishes-contact mat-form-field input[formcontrolname='secondaryPhoneNumber']";
public static final String PE_CONTACT_SECONDARY_EXTN_TEXTFIELD = "div[class='container_main prospect_card'] prospect-contact-details wishes-contact-collection wishes-contact mat-form-field input[formcontrolname='secondaryPhoneNumberExtension']";
public static final String PE_DELETE_CONTACT_BUTTON = "div[class='container_main prospect_card'] prospect-contact-details wishes-contact-collection button[class='button_main_red ng-star-inserted']";
public static final String PE_COMPANY_LINE1_TEXTFIELD = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(1) wishes-address input[id='id_addressLine1']";
public static final String PE_COMPANY_LINE2_TEXTFIELD = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(1) wishes-address input[id='id_addressLine2']";
public static final String PE_COMPANY_CITY_TEXTFIELD = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(1) wishes-address input[id='id_city']";
public static final String PE_COMPANY_ADDRESS_COUNTRY_DROPDOWN = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(1) wishes-address mat-select[id='id_countryId'] div[class='mat-select-arrow']";
public static final String PE_COMPANY_ADDRESS_PROVINCE_DROPDOWN = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(1) wishes-address mat-select[id='id_stateProvinceRegionId'] div[class='mat-select-arrow']";
public static final String PE_COMPANY_ADDRESS_ZIPCODE_TEXTFIELD = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(1) wishes-address input[id='id_zipPostalCode']";
public static final String PE_BILLING_ADDRESS_SAME_CHECKBOX = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(2) mat-checkbox label div input";
public static final String PE_BILLING_ADDRESS_LINE1_TEXTFIELD = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(2) wishes-address input[id='id_addressLine1']";
public static final String PE_BILLING_ADDRESS_LINE2_TEXTFIELD = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(2) wishes-address input[id='id_addressLine2']";
public static final String PE_BILLING_ADDRESS_CITY_TEXTFIELD = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(2) wishes-address input[id='id_city']";
public static final String PE_BILLING_ADDRESS_COUNTRY_DROPDOWN = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(2) wishes-address mat-select[id='id_countryId'] div[class='mat-select-arrow']";
public static final String PE_BILLING_ADDRESS_PROVINCE_DROPDOWN = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(2) wishes-address mat-select[id='id_stateProvinceRegionId'] div[class='mat-select-arrow']";
public static final String PE_BILLING_ADDRESS_ZIPCODE_TEXTFIELD = "div[class='container_main prospect_card'] prospect-company-and-billing-address div div div:nth-child(2) wishes-address input[id='id_zipPostalCode']";
public static final String PE_DISCARD_BUTTON = "div[class='buttons_sticky_bottom'] button:nth-child(1)";
public static final String PE_SAVEANDSUBMIT_BUTTON = "div[class='buttons_sticky_bottom'] button:nth-child(2)";
public static final String PE_SAVE_SUCCESS_BANNER = "div[class='cdk-overlay-container'] div[class='cdk-global-overlay-wrapper'] div[class='cdk-overlay-pane'] snack-bar-container success-snack-bar";
public static final String PE_SAVE_FAILURE_BANNER = "div[class='cdk-overlay-container'] div[class='cdk-global-overlay-wrapper'] div[class='cdk-overlay-pane'] snack-bar-container validation-snack-bar";
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Class<?> thisClass = null;
try {
thisClass = Class.forName(this.getClass().getName());
Field[] aClassFields = thisClass.getDeclaredFields();
/* sb.append(this.getClass().getSimpleName() + " [ "); */
for (Field f : aClassFields) {
String fName = f.getName();
sb.append(fName + " = " + f.get(this) + ",");
}
/* sb.append("]"); */
} catch (Exception e) {
e.printStackTrace();
}
return sb.toString();
}
}
| [
"[email protected]"
]
| |
464b6cd0d657cb13cbe77952089b69c87a24a9a3 | e3a9aaa8ccd0ea6d721d258a5d8d0ca9920b4f33 | /Computer Architecture and Operating Systems/Lab4 scheduling and prioirities/lab4/src/lab4/SchedulingDisplayTest2.java | 59825984343365eafd6b8de9c206eeac4294f363 | []
| no_license | Emily97/SecondYear | c904819f54f5f1cd20634466a23691458adfd1d7 | f3f5a9944b5efe22b68179c52426540dde001ea3 | refs/heads/master | 2020-05-17T01:29:49.041561 | 2019-04-25T12:15:42 | 2019-04-25T12:15:42 | 183,427,274 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 858 | 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 lab4;
/**
*
* @author n00147025
*/
public class SchedulingDisplayTest2 implements Runnable{
private String name;
private static Object screen = new Object();
SchedulingDisplayTest2(String n) {
this.name = n;
}
public void run(){
Thread t = Thread.currentThread();
int count = 100;
while (count != 0) {
int p = t.getPriority();
synchronized(screen) {
System.out.print(name + " ");
System.out.println("My priority is: " + p);
}
count--;
try{
Thread.sleep(100);
}catch(InterruptedException e){
}
}
}
}
| [
"[email protected]"
]
| |
a1c70f8df2a964ca50604386137bddb65e8c2f14 | 6ef4869c6bc2ce2e77b422242e347819f6a5f665 | /devices/google/Pixel 2/29/QPP6.190730.005/src/bouncycastle/com/android/org/bouncycastle/asn1/DERInteger.java | 61ae7da7d0c2746a0ca59f090e5aafaebb5f257b | []
| no_license | hacking-android/frameworks | 40e40396bb2edacccabf8a920fa5722b021fb060 | 943f0b4d46f72532a419fb6171e40d1c93984c8e | refs/heads/master | 2020-07-03T19:32:28.876703 | 2019-08-13T03:31:06 | 2019-08-13T03:31:06 | 202,017,534 | 2 | 0 | null | 2019-08-13T03:33:19 | 2019-08-12T22:19:30 | Java | UTF-8 | Java | false | false | 621 | java | /*
* Decompiled with CFR 0.145.
*
* Could not load the following classes:
* dalvik.annotation.compat.UnsupportedAppUsage
*/
package com.android.org.bouncycastle.asn1;
import com.android.org.bouncycastle.asn1.ASN1Integer;
import dalvik.annotation.compat.UnsupportedAppUsage;
import java.math.BigInteger;
public class DERInteger
extends ASN1Integer {
@UnsupportedAppUsage
public DERInteger(long l) {
super(l);
}
@UnsupportedAppUsage
public DERInteger(BigInteger bigInteger) {
super(bigInteger);
}
public DERInteger(byte[] arrby) {
super(arrby, true);
}
}
| [
"[email protected]"
]
| |
4e10bc120af1064050f60475844e4ab27d859bf3 | 189561dd893653f0f92a0e7d4932f7e0585cb36e | /app/src/main/java/cn/zhouzy/greatcate/common/view/ProgressGenerator.java | 7b9489739f3739068d3ad44e5cef7f35a1a56476 | []
| no_license | IzZzI/GreatCateAs | abad71279a326a17e3396b8e6524d23fea0144aa | e94bcf04b227e8be2cdc28a278d18f750c7dc7a8 | refs/heads/master | 2021-01-19T21:54:33.358887 | 2017-10-12T15:22:16 | 2017-10-12T15:22:16 | 88,719,507 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,180 | java | package cn.zhouzy.greatcate.common.view;
import java.util.Random;
import android.os.Handler;
public class ProgressGenerator
{
private int mProgress;
private boolean isRunning = false;
private ProcessButton button;
public ProgressGenerator(ProcessButton button)
{
super();
this.button = button;
}
public boolean isRunning()
{
return isRunning;
}
public void setRunning(boolean isRunning)
{
this.isRunning = isRunning;
}
public void start()
{
final Handler handler = new Handler();
isRunning = true;
handler.postDelayed(new Runnable()
{
@Override
public void run()
{
if (isRunning)
{
mProgress += 1;
button.setProgress(mProgress);
if (mProgress < 99)
{
handler.postDelayed(this, generateDelay());
} else
{
mProgress = 1;
handler.postDelayed(this, generateDelay());
}
}
}
}, generateDelay());
}
private Random random = new Random();
private int generateDelay()
{
return random.nextInt(100);
}
public void onSuccessed()
{
isRunning = false;
button.setProgress(100);
}
public void onError()
{
isRunning = false;
button.setProgress(-1);
}
}
| [
"[email protected]"
]
| |
9413fec592190e0c0a31e4d83ca37a6ac5584052 | 4af9b4593019d6064f4d384a7ab1ac623b71b213 | /Minesweeper-Before/src/game/Easy.java | a81f80610c9fc2f209c1e477c6003d4d12e000cc | []
| no_license | ArdiDramilio/Exam-Minesweeper | 2d36aa0448a1440cff586a5190305419e3e583d1 | 7d6f295a4c33e3000a5fd66aec14e0c0a7116edc | refs/heads/main | 2023-01-02T06:23:42.431216 | 2020-10-05T08:45:57 | 2020-10-05T08:45:57 | 301,339,244 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 530 | java | package game;
import player.Player;
public class Easy extends Game {
private Player p;
public Easy(Player p) {
super(new Setting(7, 5, 5));
this.p = p;
}
@Override
public void win() {
p.setEasySuccess(p.getEasySuccess() + 1);
this.hideMine = false;
clear();
print();
System.out.println("You win");
scan.nextLine();
}
@Override
public void lose() {
p.setEasyFailed(p.getEasyFailed() + 1);
this.hideMine = false;
clear();
print();
System.out.println("You lose");
scan.nextLine();
}
}
| [
"[email protected]"
]
| |
31f6bd9d5b279111e12accb0fd9e81371514abfa | ac3a7a8d120d4e281431329c8c9d388fcfb94342 | /src/main/java/com/leetcode/algorithm/hard/recoverbinarysearchtree/Solution.java | fb2de8e95085453319094f789ae7cc92937b2cb0 | [
"MIT"
]
| permissive | paulxi/LeetCodeJava | c69014c24cda48f80a25227b7ac09c6c5d6cfadc | 10b4430629314c7cfedaae02c7dc4c2318ea6256 | refs/heads/master | 2021-04-03T08:03:16.305484 | 2021-03-02T06:20:24 | 2021-03-02T06:20:24 | 125,126,097 | 3 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,603 | java | package com.leetcode.algorithm.hard.recoverbinarysearchtree;
import com.leetcode.algorithm.common.TreeNode;
class Solution {
private TreeNode first;
private TreeNode second;
private TreeNode prev = new TreeNode(Integer.MIN_VALUE);
public void recoverTree(TreeNode root) {
inorder(root);
int temp = first.val;
first.val = second.val;
second.val = temp;
}
private void inorder(TreeNode node) {
if (node == null) {
return;
}
inorder(node.left);
if (first == null && prev.val >= node.val) {
first = prev;
}
if (first != null && prev.val >= node.val) {
second = node;
}
prev = node;
inorder(node.right);
}
public void recoverTree2(TreeNode root) {
TreeNode curr = root;
while (curr != null) {
TreeNode node = curr.left;
if (node != null) {
while (node.right != null && node.right != curr) {
node = node.right;
}
if (node.right != null) {
if (prev.val > curr.val) {
if (first == null) {
first = prev;
}
second = curr;
}
prev = curr;
node.right = null;
curr = curr.right;
} else {
node.right = curr;
curr = curr.left;
}
} else {
if (prev.val > curr.val) {
if (first == null) {
first = prev;
}
second = curr;
}
prev = curr;
curr = curr.right;
}
}
int temp = first.val;
first.val = second.val;
second.val = temp;
}
}
| [
"[email protected]"
]
| |
5861f7291a1f98155e48ae12e1defb59c1d5e419 | d2f1bfd51911e9dfd68bbf502eff7db2acb4061b | /cxf-2.6.2/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/integration/WrappedTest.java | 241042a7c8857270330021a0045b3e72f652120f | []
| no_license | neuwerk/jaxws-cxf | fbf06c46ea0682549ff9b684806d56fe36a4e7ed | 8dc9437e20b6ac728db38b444d61e3ab6a963556 | refs/heads/master | 2020-06-03T05:28:19.024915 | 2019-06-20T15:28:46 | 2019-06-20T15:28:46 | 191,460,489 | 0 | 0 | null | 2019-06-11T22:44:47 | 2019-06-11T22:44:47 | null | UTF-8 | Java | false | false | 7,024 | 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.cxf.aegis.integration;
import javax.xml.namespace.QName;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.apache.cxf.aegis.AbstractAegisTest;
import org.apache.cxf.aegis.services.ArrayService;
import org.apache.cxf.aegis.services.BeanService;
import org.junit.Before;
import org.junit.Test;
/**
* @author <a href="mailto:[email protected]">Dan Diephouse</a>
* @since Feb 21, 2004
*/
public class WrappedTest extends AbstractAegisTest {
private ArrayService arrayService;
private Document arrayWsdlDoc;
@Before
public void setUp() throws Exception {
super.setUp();
setEnableJDOM(true);
arrayService = new ArrayService();
createService(ArrayService.class, arrayService, "Array", new QName("urn:Array", "Array"));
createService(BeanService.class, "BeanService");
arrayWsdlDoc = getWSDLDocument("Array");
}
@Test
public void testBeanService() throws Exception {
Node response = invoke("BeanService", "bean11.xml");
addNamespace("sb", "http://services.aegis.cxf.apache.org");
addNamespace("beanz", "urn:beanz");
assertValid("/s:Envelope/s:Body/sb:getSimpleBeanResponse", response);
assertValid("//sb:getSimpleBeanResponse/sb:return", response);
assertValid("//sb:getSimpleBeanResponse/sb:return/beanz:howdy[text()=\"howdy\"]", response);
assertValid("//sb:getSimpleBeanResponse/sb:return/beanz:bleh[text()=\"bleh\"]", response);
}
@Test
public void testArrayWsdl() throws Exception {
NodeList stuff = assertValid("//xsd:complexType[@name='ArrayOfString-2-50']", arrayWsdlDoc);
assertEquals(1, stuff.getLength());
}
@Test
public void testXmlConfigurationOfParameterTypeSchema() throws Exception {
assertValid(
"/wsdl:definitions/wsdl:types"
+ "/xsd:schema[@targetNamespace='urn:Array']"
+ "/xsd:complexType[@name=\"takeNumber\"]/xsd:sequence/xsd:element"
+ "[@type=\"xsd:long\"]",
arrayWsdlDoc);
}
@Test
public void testXmlConfigurationOfParameterType() throws Exception {
invoke("Array", "takeNumber.xml");
assertEquals(Long.valueOf(123456789), arrayService.getNumberValue());
}
@Test
public void testBeanServiceWSDL() throws Exception {
Node doc = getWSDLDocument("BeanService");
assertValid("/wsdl:definitions/wsdl:types", doc);
assertValid("/wsdl:definitions/wsdl:types/xsd:schema", doc);
assertValid("/wsdl:definitions/wsdl:types/"
+ "xsd:schema[@targetNamespace='http://services.aegis.cxf.apache.org']",
doc);
assertValid("//xsd:schema[@targetNamespace='http://services.aegis.cxf.apache.org']/"
+ "xsd:element[@name='getSubmitBean']",
doc);
assertValid("//xsd:complexType[@name='getSubmitBean']/xsd:sequence"
+ "/xsd:element[@name='bleh'][@type='xsd:string'][@minOccurs='0']", doc);
assertValid("//xsd:complexType[@name='getSubmitBean']/xsd:sequence"
+ "/xsd:element[@name='bean'][@type='ns0:SimpleBean'][@minOccurs='0']", doc);
assertValid("/wsdl:definitions/wsdl:types"
+ "/xsd:schema[@targetNamespace='http://services.aegis.cxf.apache.org']", doc);
assertValid("/wsdl:definitions/wsdl:types"
+ "/xsd:schema[@targetNamespace='urn:beanz']"
+ "/xsd:complexType[@name=\"SimpleBean\"]", doc);
assertValid(
"/wsdl:definitions/wsdl:types"
+ "/xsd:schema[@targetNamespace='urn:beanz']"
+ "/xsd:complexType[@name=\"SimpleBean\"]/xsd:sequence/xsd:element"
+ "[@name=\"bleh\"][@minOccurs='0']",
doc);
assertValid(
"/wsdl:definitions/wsdl:types"
+ "/xsd:schema[@targetNamespace='urn:beanz']"
+ "/xsd:complexType[@name=\"SimpleBean\"]/xsd:sequence/xsd:element"
+ "[@name=\"howdy\"][@minOccurs='0']",
doc);
assertValid(
"/wsdl:definitions/wsdl:types"
+ "/xsd:schema[@targetNamespace='urn:beanz']"
+ "/xsd:complexType[@name=\"SimpleBean\"]/xsd:sequence/xsd:element"
+ "[@type=\"xsd:string\"]",
doc);
}
@org.junit.Ignore // uses Jaxen.
@Test
public void testSubmitJDOMArray() throws Exception {
org.jdom.xpath.XPath jxpathWalrus =
org.jdom.xpath.XPath.newInstance("/a:anyType/iam:walrus");
jxpathWalrus.addNamespace("a", "urn:Array");
jxpathWalrus.addNamespace("iam", "uri:iam");
jxpathWalrus.addNamespace("linux", "uri:linux");
jxpathWalrus.addNamespace("planets", "uri:planets");
invoke("Array", "/org/apache/cxf/aegis/integration/anyTypeArrayJDOM.xml");
assertEquals("before items", arrayService.getBeforeValue());
assertEquals(3, arrayService.getJdomArray().length);
org.jdom.Element e = (org.jdom.Element)
jxpathWalrus.selectSingleNode(arrayService.getJdomArray()[0]);
assertNotNull(e);
assertEquals("tusks", e.getText());
assertEquals("after items", arrayService.getAfterValue());
}
@Test
public void testSubmitW3CArray() throws Exception {
addNamespace("a", "urn:Array");
addNamespace("iam", "uri:iam");
addNamespace("linux", "uri:linux");
addNamespace("planets", "uri:planets");
invoke("Array", "/org/apache/cxf/aegis/integration/anyTypeArrayW3C.xml");
assertEquals("before items", arrayService.getBeforeValue());
assertEquals(3, arrayService.getW3cArray().length);
org.w3c.dom.Document e = arrayService.getW3cArray()[0];
assertValid("/iam:walrus", e);
assertEquals("after items", arrayService.getAfterValue());
}
}
| [
"[email protected]"
]
| |
7b48f1cd18f9dc5dc947eb14b14c0a53d4ebdab6 | 59c25b8ba06b78d1ae9efbb4c2599a26212c27e9 | /src/main/java/com/oscar/siantar/square/api/entity/BeveragesEntity.java | 50e2100f6fc97286a84f6de339676a661f337aa6 | []
| no_license | oscardanielhutajulu/siantar-square-api | caed553edb1f27a94e3e831edd47583d2416e407 | 7d24119373a5fb749533e90a466a169f349ab22b | refs/heads/main | 2023-03-31T22:43:54.846930 | 2021-04-04T16:09:54 | 2021-04-04T16:09:54 | 354,587,302 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,359 | java | package com.oscar.siantar.square.api.entity;
import com.oscar.siantar.square.api.dto.ImagesDTO;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Setter
@Getter
@Entity
@Table(name = "beverages", schema = "public", catalog = "siantar_square_db")
public class BeveragesEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Integer id;
@Basic
@Column(name = "name")
private String name;
@Basic
@Column(name = "description")
private String description;
@Basic
@Column(name = "images")
private ImagesDTO images;
@Basic
@Column(name = "price")
private BigDecimal price;
@Basic
@Column(name = "availability")
private Boolean availability;
@Basic
@Column(name = "created_at")
private LocalDateTime createdAt;
@Basic
@Column(name = "updated_at")
private LocalDateTime updatedAt;
@Basic
@Column(name = "deleted_at")
private LocalDateTime deletedAt;
@Basic
@Column(name = "created_by")
private Integer createdBy;
@Basic
@Column(name = "updated_by")
private Integer updatedBy;
@Basic
@Column(name = "deleted_by")
private Integer deletedBy;
}
| [
"[email protected]"
]
| |
5e2f9bef14e5f3e4e8332ec0777ee643e70920fc | af97aca7eb392f2a4d4dbb9e1f066ccae445da37 | /AsiaJava2015p4/src/ex8.java | e4a8a685b6fe19e584f0bd486e8bcab5032b4d6b | []
| no_license | GCL1N/Asia-Java-2015 | a25fa9b918d741cfbb7f2ff34193f098b2ef6d29 | b50bdb920695a1669ad382182004e96dbc54043c | refs/heads/master | 2021-01-22T14:25:52.390583 | 2015-09-11T04:05:49 | 2015-09-11T04:05:49 | 40,107,853 | 0 | 0 | null | null | null | null | BIG5 | Java | false | false | 500 | java | //่ผธๅ
ฅไธๆธ๏ผ่จ็ฎๅพ่ฉฒๆธ้ๅง่ณ100ไปฅๅ
งๅถๆธไน็ธฝๅใ
import java.util.Scanner;
public class ex8 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scn = new Scanner(System.in);
int nm = scn.nextInt();
int sum = 0;
if(nm % 2 == 0 )
{
for( int i = nm ; i <= 100 ; i = i + 2 )
{
sum += i;
}
}
else
{
for (int i = nm + 1 ; i <= 100 ; i = i +2 )
{
sum += i ;
}
}
System.out.println(sum);
}
}
| [
"[email protected]"
]
| |
1d57d6935a8ba6dcadc8e66db550bc187e9a8341 | ecb5f8554aa611c6c61c2d0bb1fe656286c2a957 | /NetBeansProjects/CodeSnippets/src/main/java/eu/discoveri/codesnippets/graphs/SentenceTokenEdgeService.java | a054285d9270006c06e9ca3f134286cfc6a0f124 | []
| no_license | chrishpowell/PrediktTwitter | 0a7fff9b03e262d37f853995cf32a3998a3dd09a | ff1a0624f3ed5c859fa8952204c219cdfba8689b | refs/heads/master | 2023-01-21T12:54:11.347461 | 2020-06-12T21:01:55 | 2020-06-12T21:01:55 | 187,172,478 | 0 | 0 | null | 2023-01-13T23:18:22 | 2019-05-17T07:55:27 | Java | UTF-8 | Java | false | false | 537 | java | /*
* Copyright (C) Discoveri SIA - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited.
* Proprietary and confidential.
*/
package eu.discoveri.codesnippets.graphs;
import eu.discoveri.codesnippets.graph.GenericService;
/**
*
* @author Chris Powell, Discoveri OU
* @email [email protected]
*/
public class SentenceTokenEdgeService extends GenericService<SentenceTokenEdge>
{
@Override
public Class<SentenceTokenEdge> getEntityType() { return SentenceTokenEdge.class; }
}
| [
"chrispowell@chrisp-tnp-PC1"
]
| chrispowell@chrisp-tnp-PC1 |
ca7c68c50589eaeb4b50207f66ea37ffa4d2874b | 66e13bf7a6639cb37fd6d6160945d37119fe6df4 | /Java/01.Advanced/02.OOP/27.ExamPrep_II/Ex/src/CounterStriker/models/guns/Gun.java | c957a2c3695dacffa90eb2e46ccec68d91d29a84 | []
| no_license | MeGaDeTH91/SoftUni | 5fd10e55ba3a1700345fec720beac5dc2cd9d18d | a5e50c77d6efe6deddb9be0bdfb87373692aa668 | refs/heads/master | 2023-01-25T05:01:15.172521 | 2021-12-18T22:22:46 | 2021-12-18T22:22:46 | 121,627,540 | 5 | 3 | null | 2023-01-11T22:01:03 | 2018-02-15T12:31:23 | C# | UTF-8 | Java | false | false | 129 | java | package CounterStriker.models.guns;
public interface Gun {
String getName();
int getBulletsCount();
int fire();
}
| [
"[email protected]"
]
| |
43ba9288e440b84cc0d506a05f453d1eab6cc1ea | 3b5598c9f7ef3c2b311ac6d082fa2bc14f22e122 | /src/main/java/tyates/bananasolve/util/MatrixUtil.java | 7df32f8270b0f839075912f9ff9b2729f75ad1b7 | []
| no_license | Tyler-Yates/bananasolve | 5e9f702544b9f8e540da040d76c7b9bf2ed6225a | e80d25097bb2797d1996462d8b614265c0a77869 | refs/heads/master | 2021-01-22T11:32:06.217865 | 2017-06-10T21:45:07 | 2017-06-10T21:45:07 | 92,707,164 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,037 | java | package tyates.bananasolve.util;
import static tyates.bananasolve.util.StringStandardizer.UNINITIALIZED_CHARACTER;
/**
* Utility class for working with Matrices.
*/
public class MatrixUtil {
/**
* Deep copies the given matrix.
*
* @param input the given matrix
* @return the deep copy
*/
public static char[][] cloneMatrix(char[][] input) {
final char[][] output = new char[input.length][input[0].length];
for (int i = 0; i < input.length; i++) {
System.arraycopy(input[i], 0, output[i], 0, input[i].length);
}
return output;
}
/**
* Returns the smallest sub-matrix that contains all content from the given input matrix. In other words, all rows
* and columns with no content are not returned.
* <p>
* The returned matrix is a deep copy.
*
* @param input the given matrix
* @return the sub-matrix
*/
public static char[][] getSubMatrix(final char input[][]) {
int firstRow = Integer.MAX_VALUE;
int firstCol = Integer.MAX_VALUE;
int lastRow = 0;
int lastCol = 0;
for (int r = 0; r < input.length; r++) {
for (int c = 0; c < input[r].length; c++) {
if (input[r][c] != UNINITIALIZED_CHARACTER) {
firstRow = Math.min(firstRow, r);
lastRow = Math.max(lastRow, r);
firstCol = Math.min(firstCol, c);
lastCol = Math.max(lastCol, c);
}
}
}
if (firstRow > lastRow) {
firstRow = lastRow = 0;
}
if (firstCol > lastCol) {
firstCol = lastCol = 0;
}
final char[][] output = new char[lastRow - firstRow + 1][lastCol - firstCol + 1];
for (int r = firstRow; r <= lastRow; r++) {
System.arraycopy(input[r], firstCol, output[r - firstRow], 0, lastCol + 1 - firstCol);
}
return output;
}
/**
* Pretty prints the given matrix. Only the smallest content sub-matrix is printed.
*
* @param input the given matrix
* @return a String
*/
public static String prettyPrintMatrix(final char[][] input) {
final char[][] subMatrix = getSubMatrix(input);
final StringBuilder output = new StringBuilder();
// Border
for (int c = 0; c <= subMatrix[0].length + 3; c++) {
output.append("-");
}
output.append("\n");
// Tiles
for (char[] row : subMatrix) {
output.append("| "); // Border
for (char ch : row) {
if (ch == UNINITIALIZED_CHARACTER) {
output.append(' ');
} else {
output.append(ch);
}
}
output.append(" |\n"); // Border
}
// Border
for (int c = 0; c <= subMatrix[0].length + 3; c++) {
output.append("-");
}
return output.toString();
}
}
| [
"[email protected]"
]
| |
a1f3f6bc2e26a4ba79d7a08ec54334599a646b9c | a69aacc35034375836c74c7d4365acbb34df2ee9 | /src/main/java/com/xu/search/InsertValueSearch.java | ddc623ad4c088c5433ecbc6fe966061b358b9d61 | []
| no_license | westwoodl/Introduction-to-algorithms | 1f22785004cfba094448838944106eb37ec82821 | 062e9098fac31e143cb629d0aef1a5f9dc11156c | refs/heads/master | 2021-07-13T23:29:39.936510 | 2019-12-10T13:59:01 | 2019-12-10T13:59:01 | 213,617,048 | 0 | 0 | null | 2020-10-13T16:33:59 | 2019-10-08T10:48:38 | Java | UTF-8 | Java | false | false | 1,019 | java | package com.xu.search;
import org.junit.Test;
/**
* ๆๅผๆฅๆพ็ฎๆณ
*
* int mid = left + (right - left) * (findVal - arr[left]) / (arr[right] - arr[left]);
* ไธป่ฆๆฏๅ
ฌๅผ
*/
public class InsertValueSearch {
@Test
public void test() {
int[] arr = new int[100];
for (int i = 0; i < 100; i++) {
arr[i] = i;
}
System.out.println(insertValueSearch(arr, 0, arr.length - 1, 1));
}
public int insertValueSearch(int[] arr, int left, int right, int findVal) {
System.out.println("find");
if (left > right || findVal < arr[left] || findVal > arr[right]) {
return -1;
}
int mid = left + (right - left) * (findVal - arr[left]) / (arr[right] - arr[left]);
if (findVal > arr[mid])
return insertValueSearch(arr, mid + 1, right, findVal);
else if (findVal < arr[mid])
return insertValueSearch(arr, left, mid - 1, findVal);
else
return mid;
}
}
| [
"[email protected]"
]
| |
cc9a2016cc7ed18dc4f14bdcf03fd78a93dd33cc | 80f92e6d762be02e38ef74e5c72bf65f913af5eb | /src/main/java/org/codigorupestre/spacenative/votodigital/datasource/DataSourceMariaDB.java | a04ca27f6bc02da1e25df60ee21fd0eb35aa8cb1 | []
| no_license | fsialer/VotacionesDigitales | b387cd95b73e307c9e5e628efadd75ae219026f9 | e6751b8cd405794d3e53c6d1a60c64b7b44ac2f6 | refs/heads/master | 2023-04-17T05:42:09.156983 | 2021-05-02T10:14:58 | 2021-05-02T10:14:58 | 363,620,839 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,308 | java | package org.codigorupestre.spacenative.votodigital.datasource;
import org.apache.commons.dbcp.BasicDataSource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;
@Component
public class DataSourceMariaDB {
@Value("${datasource.driverclassname}")
private String driverClassName;
@Value("${datasource.url}")
private String url;
@Value("${datasource.username}")
private String userName;
@Value("${datasource.password}")
private String password;
@Value("${datasource.basedatos.votos}")
private String baseDatosVotos;
@Value("${datasource.basedatos.bitacora}")
private String baseDatosBitacora;
@Bean
@Primary
public BasicDataSource dataSourceVotoDigital() {
return getConnection(baseDatosVotos);
}
@Bean(name="bitacora")
public BasicDataSource dataSourceBitacora() {
return getConnection(baseDatosBitacora);
}
private BasicDataSource getConnection(String dataBase) {
BasicDataSource dataSource=new BasicDataSource();
dataSource.setDriverClassName(driverClassName);
dataSource.setUrl(url+dataBase);
dataSource.setUsername(userName);
dataSource.setPassword(password);
return dataSource;
}
}
| [
"[email protected]"
]
| |
4ea0eccab13415fa987107588077a3a087e5f4f3 | c6485ac56eb2de53f1e17d05e00427360a8824ca | /src/java/com/edtech/blog/dao/PostDao.java | 5f8a0f44df91e7e94f5be627ba384a137df6e3e7 | []
| no_license | pratikdange999/EdTechBlog | f4630e3c7bcb4ef8a1249d7b2ed39c711bc24227 | c259ff5c3493d0693122511e08b0022ad4251b64 | refs/heads/master | 2023-06-11T15:52:00.250330 | 2021-06-10T21:23:45 | 2021-06-30T20:01:03 | 375,995,081 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,225 | 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 com.edtech.blog.dao;
import com.edtech.blog.entities.Category;
import com.edtech.blog.entities.Post;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Pratik Dange <@PratikDange999>
*/
public class PostDao {
Connection con;
public PostDao(Connection con) {
this.con = con;
}
/**
*
* @return
*/
public ArrayList<Category> getAllCategories()
{
ArrayList<Category> list=new ArrayList<>();
try {
String q="select * from categories";
Statement st= this.con.createStatement();
ResultSet set=st.executeQuery(q);
while(set.next())
{
int cid=set.getInt("cid");
String name=set.getString("name");
String description=set.getString("description");
Category c= new Category(cid,name,description);
list.add(c);
}
} catch (Exception e) {
e.printStackTrace();
}
return list;
}
public boolean savePost(Post p){
boolean f=false;
try {
String q= "insert into posts(pTitle,pContent,pCode,pPic,catId,userId) values(?,?,?,?,?,?);";
PreparedStatement pstmt= con.prepareStatement(q);
pstmt.setString(1, p.getpTitle());
pstmt.setString(2, p.getpContent());
pstmt.setString(3, p.getpCode());
pstmt.setString(4, p.getpPic());
pstmt.setInt(5, p.getCatId());
pstmt.setInt(6, p.getUserId());
pstmt.executeUpdate();
f=true;
} catch (Exception e) {
e.printStackTrace();
}
return f;
}
//get all Posts
public List<Post> getAllPosts()
{
List<Post> list= new ArrayList<>();
//fetch all the posts
try {
PreparedStatement p=con.prepareStatement("select * from posts order by pid desc");
ResultSet set=p.executeQuery();
while(set.next())
{
int pid=set.getInt("pid");
String pTitle=set.getString("pTitle");
String pContent=set.getString("pContent");
String pCode=set.getString("pCode");
String pPic=set.getString("pPic");
Timestamp date=set.getTimestamp("pDate");
int catId=set.getInt("catId");
int userId=set.getInt("userId");
Post post=new Post(pid, pTitle, pContent, pCode, pPic, date, catId, userId);
list.add(post);
}
} catch (Exception e) {
e.printStackTrace();
}
return list;
}
public List<Post> getPostByCatId(int catId)
{
List<Post> list= new ArrayList<>();
//fetch all posts by categoryId
try {
PreparedStatement p=con.prepareStatement("select * from posts where catId=?");
p.setInt(1, catId);
ResultSet set=p.executeQuery();
while(set.next())
{
int pid=set.getInt("pid");
String pTitle=set.getString("pTitle");
String pContent=set.getString("pContent");
String pCode=set.getString("pCode");
String pPic=set.getString("pPic");
Timestamp date=set.getTimestamp("pDate");
int userId=set.getInt("userId");
Post post=new Post(pid, pTitle, pContent, pCode, pPic, date, catId, userId);
list.add(post);
}
} catch (Exception e) {
e.printStackTrace();
}
return list;
}
public Post getPostByPostId(int postId)
{
Post post=null;
String q="select * from posts where pid=?";
try
{
PreparedStatement p=this.con.prepareStatement(q);
p.setInt(1, postId);
ResultSet set=p.executeQuery();
if(set.next())
{
int pid = set.getInt("pid");
String pTitle = set.getString("pTitle");
String pContent = set.getString("pContent");
String pCode = set.getString("pCode");
String pPic = set.getString("pPic");
Timestamp date = set.getTimestamp("pDate");
int catId = set.getInt("catId");
int userId = set.getInt("userId");
post = new Post(pid, pTitle, pContent, pCode, pPic, date, catId, userId);
}
} catch(Exception e){
e.printStackTrace();
}
return post;
}
}
| [
"@PratikDange999"
]
| @PratikDange999 |
06e11d0272c320b363653bb89379bc7f7013d72a | bffd3db483bcba36d494f9dbe8b1aa18795b182c | /product-respository/src/main/java/com/respository/ProductCategoryRepository.java | cf75ecaff14567fb4eb57f2fcf27a5d90fe0a565 | []
| no_license | 240854834/product | fc492d6648edaca67e48c69c738cad4e2e826485 | 34db2346c1e818bb1ac702caca4c9865494941be | refs/heads/master | 2021-07-11T04:30:19.537137 | 2019-09-18T09:07:18 | 2019-09-18T09:07:18 | 209,265,452 | 0 | 0 | null | 2020-10-13T16:07:20 | 2019-09-18T09:05:17 | Java | UTF-8 | Java | false | false | 442 | java | package com.respository;
import com.respository.dataObject.ProductCategoryEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author jason
*/
@Repository
public interface ProductCategoryRepository extends JpaRepository<ProductCategoryEntity, Integer> {
List<ProductCategoryEntity> findByCategoryTypeIn(List<Integer> categoryTypes);
}
| [
"[email protected]"
]
| |
93e5a7ddb785ecefda171011e88d5a4cb2e95ed3 | 0e4de01bebaa4a39bb68ce5abe5e57f30915c9f8 | /dingo-expr/parser/src/main/java/io/dingodb/expr/parser/op/OpWithEvaluator.java | bf18d296dd9a16e243ac98a59ace527eb0f02b80 | [
"Apache-2.0"
]
| permissive | dd-guo/dingo | 11c5c34dfce091c40d69ac5aca5ac1f9c6ae2fe1 | 79bc41b6d52f0a9b261774f4437e968fd9a8efb7 | refs/heads/main | 2023-08-22T00:38:17.415780 | 2021-10-28T10:41:27 | 2021-11-01T05:27:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,698 | java | /*
* Copyright 2021 DataCanvas
*
* 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 io.dingodb.expr.parser.op;
import io.dingodb.expr.runtime.RtExpr;
import io.dingodb.expr.runtime.evaluator.base.Evaluator;
import io.dingodb.expr.runtime.evaluator.base.EvaluatorFactory;
import io.dingodb.expr.runtime.evaluator.base.EvaluatorKey;
import io.dingodb.expr.runtime.exception.FailGetEvaluator;
import io.dingodb.expr.runtime.op.RtEvaluatorOp;
import io.dingodb.expr.runtime.op.RtOp;
import java.util.Arrays;
public class OpWithEvaluator extends Op {
private final EvaluatorFactory factory;
public OpWithEvaluator(OpType type, EvaluatorFactory factory) {
super(type);
this.factory = factory;
}
public OpWithEvaluator(String name, EvaluatorFactory factory) {
super(name);
this.factory = factory;
}
@Override
protected RtOp createRtOp(RtExpr[] rtExprArray) throws FailGetEvaluator {
int[] typeCodes = Arrays.stream(rtExprArray).mapToInt(RtExpr::typeCode).toArray();
Evaluator evaluator = factory.getEvaluator(EvaluatorKey.of(typeCodes));
return new RtEvaluatorOp(evaluator, rtExprArray);
}
}
| [
"[email protected]"
]
| |
6783f4e024b999cd6f704ebb8d5e8522f1a88172 | 323c60833398d268cc77ae17447cdcd4ae74f9ce | /c0720g1-dating-be/src/main/java/c0720g1be/entity/AccountGroup.java | 2c89b541813e799a37036af870d7ed2d58b77048 | []
| no_license | C0720G1-DatingWebsite/C0720G1-DatingWebsite-Management-BE | 0db9bf191f6abfd0589ec1d2185b579f1da7de24 | a6af66f350e18a4e86bbdd556661f09e738d14cb | refs/heads/main | 2023-03-19T21:20:59.369898 | 2021-03-11T09:03:02 | 2021-03-11T09:03:02 | 341,050,354 | 0 | 0 | null | 2021-03-11T09:03:03 | 2021-02-22T01:53:02 | Java | UTF-8 | Java | false | false | 1,215 | java | package c0720g1be.entity;
import javax.persistence.*;
@Entity
@Table(name = "account_group",uniqueConstraints = { @UniqueConstraint(name = "ACCOUNT_GROUP_UK", columnNames = { "account_id", "group_id", "group_role_id" }) })
public class AccountGroup {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Integer id;
@ManyToOne
@JoinColumn(name = "account_id")
Account account;
@ManyToOne
@JoinColumn(name = "group_id")
UserGroup userGroup;
@ManyToOne
@JoinColumn(name = "group_role_id")
GroupRole groupRole;
public AccountGroup() {
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
public UserGroup getUserGroup() {
return userGroup;
}
public void setUserGroup(UserGroup userGroup) {
this.userGroup = userGroup;
}
public GroupRole getGroupRole() {
return groupRole;
}
public void setGroupRole(GroupRole groupRole) {
this.groupRole = groupRole;
}
}
| [
"[email protected]"
]
| |
6c1b4b9f1a6a9933cb0b2dfb1cdb6f7ce655f5e3 | 7f813a0f4b264e26a7f0fed3124182b74064ced1 | /src/com/fight2/scene/MineGatherScene.java | 6a2744189e0e711c5841efe45d907eb5ccc0b860 | []
| no_license | lanseror/Fight2 | 637892e3435bb228655378adef38f3b6736b9691 | 50d8c44b07da78b5f8027252f08d3273fe85c66e | refs/heads/master | 2020-05-20T06:27:15.629316 | 2015-03-09T13:36:50 | 2015-03-09T13:36:50 | 31,653,755 | 0 | 0 | null | 2015-03-04T11:33:14 | 2015-03-04T11:33:12 | Java | UTF-8 | Java | false | false | 3,949 | java | package com.fight2.scene;
import java.io.IOException;
import org.andengine.entity.IEntity;
import org.andengine.entity.primitive.Rectangle;
import org.andengine.entity.text.AutoWrap;
import org.andengine.entity.text.Text;
import org.andengine.entity.text.TextOptions;
import org.andengine.opengl.font.Font;
import org.andengine.util.adt.color.Color;
import com.fight2.GameActivity;
import com.fight2.constant.FontEnum;
import com.fight2.entity.GameMine;
import com.fight2.entity.GameUserSession;
import com.fight2.entity.UserProperties;
import com.fight2.entity.engine.DialogFrame;
import com.fight2.util.IParamCallback;
import com.fight2.util.MineUtils;
import com.fight2.util.QuestUtils;
import com.fight2.util.ResourceManager;
public class MineGatherScene extends BaseScene {
private final IParamCallback yesCallback;
private final GameMine mine;
public MineGatherScene(final GameActivity activity, final GameMine mine, final IParamCallback yesCallback) throws IOException {
super(activity);
this.yesCallback = yesCallback;
this.mine = mine;
init();
if (mine.getAmount() > 0) {
if (MineUtils.gather(activity) == 0) {
mine.setAmount(0);
final UserProperties userProps = QuestUtils.getUserProperties(activity);
GameUserSession.getInstance().setUserProps(userProps);
}
}
}
@Override
protected void init() throws IOException {
final IEntity bgEntity = new Rectangle(cameraCenterX, cameraCenterY, this.simulatedWidth, this.simulatedHeight, vbom);
bgEntity.setColor(Color.BLACK);
bgEntity.setAlpha(0.3f);
this.setBackgroundEnabled(false);
this.attachChild(bgEntity);
final DialogFrame frame = new DialogFrame(cameraCenterX, cameraCenterY, 600, 350, activity);
frame.bind(this, new IParamCallback() {
@Override
public void onCallback(final Object param) {
back();
yesCallback.onCallback(param);
}
});
final Font titleFont = ResourceManager.getInstance().newFont(FontEnum.Default, 30);
final Text itemText = new Text(frame.getWidth() * 0.5f, 300, titleFont, String.format("%s็ฟๅบ", mine.getType().getDesc()), vbom);
itemText.setColor(0XFF330504);
frame.attachChild(itemText);
final Font detailFont = ResourceManager.getInstance().newFont(FontEnum.Default, 24);
final TextOptions textOptions = new TextOptions(AutoWrap.LETTERS, 460);
if (mine.getAmount() > 0) {
final Text descText = new Text(frame.getWidth() * 0.5f, 230, detailFont, "็ฟๅบ็ๅฎๅซ่ฏด้๏ผโๅคงไบบ๏ผๆๅๅๅทฅไฝ๏ผๆไธบๆจ่ตๅฐ่ฟไบ่ตๆบใ่ฏท่ฟ็นๅๆฅๅง๏ผโ", textOptions, vbom);
descText.setColor(0XFF330504);
frame.attachChild(descText);
final TextOptions tipTextOptions = new TextOptions(AutoWrap.LETTERS, 380);
final Text tipText = new Text(frame.getWidth() * 0.5f, 120, detailFont, String.format("ๆถ้ๅฐ%s%s๏ผ่ฟไบ่ตๆบไผๅ
ๆขไธบไฝ ็ๅ
ฌไผ่ดก็ฎๅผ๏ผ", mine.getAmount(), mine.getType()
.getDesc()), tipTextOptions, vbom);
tipText.setColor(0XFF330504);
frame.attachChild(tipText);
} else {
final Text descText = new Text(frame.getWidth() * 0.5f, 230, detailFont, "็ฟๅบ็ๅฎๅซ่ฏด้๏ผโๅคงไบบ๏ผๅพๆฑๆญ๏ผ็ฐๅจ่ฟๆฒกๆ็ไบงๅบ่ตๆบใ่ฏท่ฟ็นๅๆฅๅง๏ผโ", textOptions, vbom);
descText.setColor(0XFF330504);
frame.attachChild(descText);
}
}
@Override
public void updateScene() {
// TODO Auto-generated method stub
}
@Override
public void leaveScene() {
// TODO Auto-generated method stub
}
}
| [
"[email protected]"
]
| |
b9be9f19e0902752e8c3706871455c11b53b9490 | 2fca51877b2b45479c81b7b65a9f3dfd230eccb6 | /src/mc_plugin/PluginListeners.java | 4fcb38abbc66fb9c4cd3945893c8086ed86aee57 | []
| no_license | JojoGelb/Minecraft_plugin_vrac | c67b1a70457238431ab95753edf00efe03fbb1a9 | 69e257aa56c99ce4623b82c62c1e8ae3ae59fa8d | refs/heads/master | 2023-06-05T14:10:53.382537 | 2021-06-23T13:24:04 | 2021-06-23T13:24:04 | 379,612,018 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,805 | java | package mc_plugin;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.block.Sign;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.entity.Trident;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.entity.ProjectileLaunchEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerFishEvent;
import org.bukkit.event.player.PlayerFishEvent.State;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.Vector;
import net.md_5.bungee.api.ChatColor;
public class PluginListeners implements Listener {
//documentation : https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/player/package-summary.html
public Main main;
public List<UUID> zeus_tridents = new ArrayList<>();
/* =====================================================================
Zone des evenements
=====================================================================*/
public PluginListeners(Main main) {
// TODO Auto-generated constructor stub
this.main = main;
}
@EventHandler
public void projectile_shot(ProjectileLaunchEvent event) {
//Il y a une complication lors du lancement d'un objet: Il se transforme de item vers entitรฉ
//Il faut donc faire la transistion. J'utilise ici L'id de l'objet que je stock pour vรฉrifier que c'est le mรชme.
//Voir post: https://www.spigotmc.org/threads/detect-when-a-player-throws-a-named-snowball.408610/#post-3633558
if(event.getEntity() instanceof Trident && event.getEntity().getShooter() instanceof Player) {
Player player = (Player) event.getEntity().getShooter();
PlayerInventory inventory = player.getInventory();
if(inventory.getItemInMainHand().getType() != Material.AIR &&
inventory.getItemInMainHand().getType() == Material.TRIDENT &&
inventory.getItemInMainHand().getItemMeta().hasDisplayName() &&
inventory.getItemInMainHand().getItemMeta().getDisplayName().equalsIgnoreCase(ChatColor.DARK_PURPLE + "Trident de Zeus, Propriรฉtaire : " + player.getName())) {
zeus_tridents.add(event.getEntity().getUniqueId());
}
}
}
@EventHandler
public void projectile_shot(ProjectileHitEvent event) {
if(event.getEntity() instanceof Trident && zeus_tridents.contains(event.getEntity().getUniqueId()) ) {
Trident trident = (Trident) event.getEntity();
Block hit_bloc = event.getHitBlock();
if(hit_bloc != null) {
Location loc = hit_bloc.getLocation();
loc.getWorld().strikeLightning(loc);
}else {
Entity hit_entity = event.getHitEntity();
Location loc = hit_entity.getLocation();
loc.getWorld().strikeLightning(loc);
}
zeus_tridents.remove(event.getEntity().getUniqueId());
return;
}
}
//Canne ร peche shotbow
@EventHandler
public void fishing_rod(PlayerFishEvent event) {
if(event.getState() == State.IN_GROUND) {
Player p = event.getPlayer();
Location hookLoc = event.getHook().getLocation();
Location playerLoc = p.getLocation();
Vector velo = new Vector();
double veloX = hookLoc.getX() - playerLoc.getX();
double veloY = hookLoc.getY() - playerLoc.getY();
double veloZ = hookLoc.getZ() - playerLoc.getZ();
if(veloY < 0) {
veloY = 0.5;
veloZ = veloZ/4;
veloX = veloX/4;
}else {
veloY = veloY/7;
veloZ = veloZ/8;
veloX = veloX/8;
}
velo.setX( veloX);
velo.setY( veloY);
velo.setZ(veloZ);
p.setVelocity(velo);
}
}
@EventHandler
public void shoot_bow_event(EntityShootBowEvent event) {
Entity entity = event.getEntity();
if (entity instanceof Player) {
Player p = (Player) entity;
ItemStack bow = event.getBow();
if ((bow.hasItemMeta() && bow.getItemMeta().getDisplayName().equalsIgnoreCase(ChatColor.DARK_PURPLE + "Flying Bow"))) {
if (!p.getScoreboardTags().contains("FLY_BOW")) {
event.setCancelled(true);
p.sendMessage(ChatColor.BOLD + "" + ChatColor.DARK_RED + "Le dieu de ce serveur ne t'a pas reconnu comme porteur de cette relique. Seul la mort peut nettoyer tes pรฉchรฉs");
return;
}
Vector projectile = event.getProjectile().getVelocity();
projectile.setY(projectile.getY() * 0.9);
projectile.setX(projectile.getX()*1.5);
projectile.setZ(projectile.getZ()*1.5);
System.out.println(projectile.getY());
System.out.println(projectile.getX());
System.out.println(projectile.getZ());
event.setProjectile(entity);
entity.setVelocity(projectile);
return;
}
Vector projectile = event.getProjectile().getVelocity();
//Arc normal
event.setCancelled(true);
TNTPrimed tnt = (TNTPrimed) p.getWorld().spawnEntity(p.getLocation().add(new Location(p.getWorld(),0,2,0)), EntityType.PRIMED_TNT);
tnt.setFuseTicks(40);
tnt.setVelocity(projectile);
}
}
//Event qui s'active lorsqu'un joueur se connecte au serveur
@EventHandler
public void onJoint(PlayerJoinEvent event) {
Player player = event.getPlayer();
//player.getInventory().clear();
boolean player_exist = false;
for(Player p : this.main.players){
if(p.getName().equalsIgnoreCase(player.getName())) {
player_exist = true;
break;
}
}
if(player_exist == false) {
this.main.players.add(player);
//Ce sera ici pour corriger les soucis de redรฉmarage serveur in game et conservation d'รฉquipe
this.main.scoreboard.getTeam("NO_TEAM").addEntry(player.getName());
player.sendMessage("ยง6[PLUGIN INFO] You are in no team: use the command /gui_compass to change team");
player.setDisplayName(ChatColor.YELLOW + player.getName() + ChatColor.WHITE);
//player.setPlayerListName("ยง6[NO TEAM] ยงf" + player.getDisplayName());*/
}
//Fonction crรฉรฉ plus bas pour donner un exemple de comment marche les fonctions
//Crรฉation d'une รฉpรฉ cheatรฉ
ItemStack godSword = createGodSword();
//Ajout ร l'inventaire du joueur
player.getInventory().addItem(godSword);
//Crรฉation d'un objet mis ร la place du casque du joueur
ItemStack head = new ItemStack(Material.GLASS, 1);
player.getInventory().setHelmet(head);
//Trรจs important aprรจs modification: met ร jour sur le jeu
player.updateInventory();
}
@EventHandler
public void onInteract(PlayerInteractEvent event) {
//S'occupe des actions de click de l'utilisateur
Player p = event.getPlayer();
Action a = event.getAction();
ItemStack it = event.getItem();
//Vรฉrification click sur panneaux
if(event.getClickedBlock() != null && a == Action.RIGHT_CLICK_BLOCK) {
BlockState bs = event.getClickedBlock().getState();
if(bs instanceof Sign) {
Sign sign = (Sign) bs;
if(sign.getLine(1).equalsIgnoreCase("Spawn")) {
//Force la commande dรฉja dรฉfinit /spawn sur le joueur
p.chat("/spawn");
return;
}
}
}
//Si rien en main lors de l'action : rien ne se passe
if (it == null) return;
//Vรฉrifie si click droit
if(a == Action.RIGHT_CLICK_AIR || a == Action.RIGHT_CLICK_BLOCK) {
//Crรฉation d'un รฉclair sur la position du joueur avec la godSword
if(it.getType() == Material.IRON_SWORD && it.hasItemMeta()) {
ItemStack godSword = createGodSword();
if (it.equals(godSword)) {
p.setNoDamageTicks(20);
Location loc = p.getLocation();
loc.getWorld().strikeLightning(loc);
loc.getWorld().spawnEntity(loc, EntityType.LIGHTNING);
Bukkit.broadcastMessage("ยง4" + this.main.getConfig().getString("message.god_sword.eclair"));
}
return;
}
//Ouverture inventaire aprรจs click droit sur bousolle spรฉcial
if(it.equals(CommandObjectCreator.create_gui_compass(this.main))) {
//Crรฉรฉ un inventaire, paramรจtres: type d'inventaire: null, nombre de cases: 1 (max = 54)
Inventory inv = Bukkit.createInventory(null, 9, "ยง8Menu GUI");
populate_GUI_inventory(inv);
p.openInventory(inv);
}
if(it.getType() == Material.TRIDENT && it.hasItemMeta()) {
if(it.getItemMeta().getDisplayName().contains((ChatColor.DARK_PURPLE + "Trident de Zeus, Propriรฉtaire : "))) {
System.out.println("CONTAIN");
}
}
//Vรฉrifie si click droit dans le vide
if(a == Action.RIGHT_CLICK_AIR) {
//Si l'objet en main est une houe en diamond alors donne un effet de speed : click dans l'air
if(it.getType() == Material.DIAMOND_HOE) {
p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 10 * 20, 2));
return;
}
}
}
}
@EventHandler
public void onClick(InventoryClickEvent event) {
//Check les clicks dans un inventaire
//Inventory inv = event.getInventory();
Player p = (Player) event.getWhoClicked();
ItemStack current = event.getCurrentItem();
//Click dans le vide
if(current == null) return;
/* Petit problรจme: l'utilisateur peut bouger l'objet avec shift
* if(p.getOpenInventory().getTitle().equalsIgnoreCase("Crafting") ) {
if (current.hasItemMeta() && current.getItemMeta().getDisplayName().equalsIgnoreCase("TEAM")){
event.setCancelled(true);
return;
}
}*/
System.out.println(p.getOpenInventory().getTitle());
if(p.getOpenInventory().getTitle().equalsIgnoreCase("ยง8Menu GUI") ) {
//On evite qu'il garde l'item en main
event.setCancelled(true);
p.closeInventory();
ItemStack item = create_itemStack(current.getType(), "Ne le dรฉsรฉquipรฉ pas sinon impossible de le remettre");
p.getInventory().setHelmet(item);
//Switch c'est comme un if:
//if (current.getType() == Material.BLACK_WOOL){
// p.setGameMode(GameMode.CREATIVE);
//if (current.getType() == Material.BLUE_WOOL){
// truc
//...
//En fr ce serait. On vรฉrifie รงa: (current.getType())
//Dans ce cas: (BLEU)
//On fait รงa ...
//Ici on vรฉrifie la couleur de la laine selectionnรฉ dans l'inventaire
switch(current.getType()) {
case BLACK_WOOL:
this.main.scoreboard.getTeam("BLACK").addEntry(p.getName());
p.setDisplayName(ChatColor.BLACK + p.getName() + ChatColor.WHITE);
p.sendMessage("ยง6[PLUGIN INFO] JOIN TEAM BLACK");
break;
case BLUE_WOOL:
this.main.scoreboard.getTeam("BLUE").addEntry(p.getName());
p.setDisplayName(ChatColor.BLUE + p.getName() + ChatColor.WHITE);
p.sendMessage("ยง6[PLUGIN INFO] JOIN TEAM BLUE");
break;
case WHITE_WOOL:
this.main.scoreboard.getTeam("WHITE").addEntry(p.getName());
p.setDisplayName(ChatColor.WHITE + p.getName() + ChatColor.WHITE);
p.sendMessage("ยง6[PLUGIN INFO] JOIN TEAM WHITE");
break;
case PINK_WOOL:
this.main.scoreboard.getTeam("PINK").addEntry(p.getName());
p.setDisplayName(ChatColor.LIGHT_PURPLE + p.getName() + ChatColor.WHITE);
p.sendMessage("ยง6[PLUGIN INFO] JOIN TEAM PINK");
break;
default:
p.sendMessage("ยง1WTF elle sort d'ou cette laine?");
break;
}
}
}
/* =====================================================================
Autre Fonctions
=====================================================================*/
public void populate_GUI_inventory(Inventory inv) {
ItemStack blackWool = create_itemStack(Material.BLACK_WOOL, "ยงaEquipe noir");
inv.setItem(0, blackWool);
ItemStack whiteWool = create_itemStack(Material.WHITE_WOOL, "ยงaEquipe blanche");
inv.setItem(1, whiteWool);
ItemStack blueWool = create_itemStack(Material.BLUE_WOOL, "ยงaEquipe bleu");
inv.setItem(2, blueWool);
ItemStack pinkWool = create_itemStack(Material.PINK_WOOL, "ยงaEquipe Rose");
inv.setItem(3, pinkWool);
}
public ItemStack create_itemStack(Material mat, String name) {
ItemStack item = new ItemStack(mat, 1);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(name);
item.setItemMeta(meta);
return item;
}
public ItemStack createGodSword() {
//Crรฉรฉ une รฉpรฉ
ItemStack customsword = new ItemStack(Material.IRON_SWORD, 1);
//Rรฉcupรจre l'objet gรฉrant les donnรฉes de l'รฉpรฉ
ItemMeta custom = customsword.getItemMeta();
//Change les propriรฉtรฉs de l'objet: voir la documentation de ItemMeta pour voir ce qu'on peut faire d'autre
custom.setDisplayName("ยงcPunisher");
custom.setLore(Arrays.asList("Ceci est l'รฉpรฉ crรฉรฉ par les dieux",
"Seul le modรฉrateur peut la possรฉder",
"Une lรฉgende dit que un coup de cette lame peut","transcender les limites du serveur"));
custom.addEnchant(Enchantment.DAMAGE_ALL, 200, true);
//Cache la ligne moche avec enchant lvl 200
custom.addItemFlags(ItemFlag.HIDE_ENCHANTS);
//applique les modifications ร l'รฉpรฉ
customsword.setItemMeta(custom);
//on retourne le rรฉsultat ร la fonction qui l'a appellรฉ
return customsword;
}
}
| [
"[email protected]"
]
| |
2dbbd7b6eda3da97f4e3bb5d18441bf0d0e47178 | 842b2652444b2785914a8ba37b5cd095c41ea867 | /src/main/java/com/itclj/service/CarService.java | 51e463f8741be80b648e7abc1bde7a1e53b61f3f | []
| no_license | lch0203/jasperreports-demo | de44e5103d4b2c477be5df0103eeaaa44a8e93c1 | baa4fbab6eb73257a3140437bac0593625903d5b | refs/heads/master | 2021-05-04T12:29:14.040577 | 2018-02-05T11:20:15 | 2018-02-05T11:20:15 | 120,295,082 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 607 | java | package com.itclj.service;
import java.util.List;
import com.itclj.model.Car;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
@Service
public class CarService implements ICarService {
@Autowired
private JdbcTemplate jtm;
@Override
public List<Car> findAll() {
String sql = "SELECT * FROM cars";
List<Car> cars = jtm.query(sql, new BeanPropertyRowMapper(Car.class));
return cars;
}
} | [
"[email protected]"
]
| |
2507dfb88e9f540d4e208800dd2ad0efa8d7ed2c | e54afb6018cc4bce151b70317f2c7728b1e3854f | /Bird Point/Source/BirdPoint/src/birdpoint/horariosemanal/HorarioSemanal.java | 4ed3d117176d3b3d18779b683c87a8a26371f206 | []
| no_license | adriano-candido/BirdPointProf | eb8080bda0f378c7a973004edfadf5cc48ec186a | 4381f76429f0f443f74fd5ecc5993a88ab021386 | refs/heads/master | 2023-07-25T08:55:32.495052 | 2021-02-06T14:44:12 | 2021-02-06T14:44:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,290 | 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 birdpoint.horariosemanal;
import java.sql.Time;
/**
*
* @author Adriano
*/
public class HorarioSemanal {
private String nomeDiaSemana;
private Time horaEntrada;
private Time horaSaida;
/**
* @return the nomeDiaSemana
*/
public String getNomeDiaSemana() {
return nomeDiaSemana;
}
/**
* @param nomeDiaSemana the nomeDiaSemana to set
*/
public void setNomeDiaSemana(String nomeDiaSemana) {
this.nomeDiaSemana = nomeDiaSemana;
}
/**
* @return the horaEntrada
*/
public Time getHoraEntrada() {
return horaEntrada;
}
/**
* @param horaEntrada the horaEntrada to set
*/
public void setHoraEntrada(Time horaEntrada) {
this.horaEntrada = horaEntrada;
}
/**
* @return the horaSaida
*/
public Time getHoraSaida() {
return horaSaida;
}
/**
* @param horaSaida the horaSaida to set
*/
public void setHoraSaida(Time horaSaida) {
this.horaSaida = horaSaida;
}
}
| [
"[email protected]"
]
| |
255ca14b2b3857fde40a4148c9596aff9f5e6c2b | 3fb7eba02484b31b0919da83144d5f267d2b4926 | /src/main/java/com/seaglasslookandfeel/ui/SeaGlassCheckBoxMenuItemUI.java | a6134efecf542101485a09c9ed968cbe2177d8c4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
]
| permissive | fkorax/seaglass | 2f47513ba4be3ab028602f2b05da66860785d78d | c2d2fe47bc8be063bb3127932995b2af5bae4307 | refs/heads/master | 2023-07-02T12:49:36.312110 | 2021-08-15T11:59:33 | 2021-08-15T11:59:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,791 | java | /*
* Copyright (c) 2009 Kathryn Huxtable and Kenneth Orr.
*
* This file is part of the SeaGlass Pluggable Look and Feel.
*
* 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.
*
* $Id$
*/
package com.seaglasslookandfeel.ui;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.event.MouseEvent;
import javax.swing.JComponent;
import javax.swing.JMenuItem;
import javax.swing.MenuElement;
import javax.swing.MenuSelectionManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.synth.SynthContext;
import com.seaglasslookandfeel.SeaGlassContext;
/**
* SeaGlass CheckBoxMenuItemUI delegate.
*
* Based on SynthCheckBoxMenuItemUI by Leif Samuelsson, Georges Saab, David
* Karlton, and Arnaud Weber
*
* The only reason this exists is that we had to modify SynthMenuItemUI.
*
* @see javax.swing.plaf.synth.SynthCheckBoxMenuItemUI
*/
public class SeaGlassCheckBoxMenuItemUI extends SeaGlassMenuItemUI {
public static ComponentUI createUI(JComponent c) {
return new SeaGlassCheckBoxMenuItemUI();
}
protected String getPropertyPrefix() {
return "CheckBoxMenuItem";
}
public void processMouseEvent(JMenuItem item, MouseEvent e, MenuElement path[], MenuSelectionManager manager) {
Point p = e.getPoint();
if (p.x >= 0 && p.x < item.getWidth() && p.y >= 0 && p.y < item.getHeight()) {
if (e.getID() == MouseEvent.MOUSE_RELEASED) {
manager.clearSelectedPath();
item.doClick(0);
} else {
manager.setSelectedPath(path);
}
} else if (item.getModel().isArmed()) {
int c = path.length - 1;
MenuElement newPath[] = new MenuElement[c];
for (int i = 0; i < c; i++) {
newPath[i] = path[i];
}
manager.setSelectedPath(newPath);
}
}
void paintBackground(SeaGlassContext context, Graphics g, JComponent c) {
context.getPainter().paintCheckBoxMenuItemBackground(context, g, 0, 0, c.getWidth(), c.getHeight());
}
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) {
((SeaGlassContext) context).getPainter().paintCheckBoxMenuItemBorder(context, g, x, y, w, h);
}
}
| [
"[email protected]"
]
| |
3d708a463f9f7ef78bd24b95cb14ec9e551d9c1d | 47782b1ad69a9c23207d801001ffe3b3340057e9 | /yelp/yelp-web-manage/src/main/java/com/yelp/web/manage/config/WebSecurityConfig.java | 60e6bb3899fde15958976461a9221853da416198 | []
| no_license | supernebula/yelp-j | 8e2b5f86770e15e8d13c896d15d623b7dcfe9bd2 | d59308c1af02c673cf258acbd24ad48de10cc3db | refs/heads/master | 2020-04-17T03:23:36.340788 | 2019-04-07T06:02:34 | 2019-04-07T06:02:34 | 166,180,934 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,007 | java | //package com.yelp.web.manage.config;
//
//import com.yelp.service.AdminService;
//import com.yelp.service.impl.AdminServiceImpl;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.authentication.AuthenticationManager;
//import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.builders.WebSecurity;
//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
//import org.springframework.security.core.userdetails.UserDetailsService;
//import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
//import org.springframework.security.crypto.password.PasswordEncoder;
//import org.springframework.security.web.csrf.CsrfFilter;
//import org.springframework.web.filter.CharacterEncodingFilter;
//import com.yelp.debug.MockAdmin;
//
///**
// * Spring boot + Spring Security ๅฎ็ฐ็จๆท็ปๅฝ็ฎก็
// * https://blog.csdn.net/wtopps/article/details/78297197
// */
//
//@Configuration
//@EnableWebSecurity
//public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
//
// AdminService adminService;
//
// @Autowired
// public WebSecurityConfig(AdminService adminService){
// this.adminService = adminService;
// }
//
// @Bean
// @Override
// protected AuthenticationManager authenticationManager() throws Exception {
// return super.authenticationManager();
// }
//
// @Override
// public void configure(WebSecurity web) throws Exception {
// //่งฃๅณ้ๆ่ตๆบ่ขซๆฆๆช็้ฎ้ข
// web.ignoring().antMatchers("/somewhere/**");
// }
//
//
//
// @Override
// protected void configure(HttpSecurity http) throws Exception {
// http.formLogin() //ๅฎไนๅฝ้่ฆ็จๆท็ปๅฝๆถๅ๏ผ่ฝฌๅฐ็็ปๅฝ้กต้ข
// .loginPage("/login.html")
// .loginProcessingUrl("/api/admin/login") //่ชๅฎไน็็ปๅฝๆฅๅฃ
// //็ปๅฝๆๅๅ้ป่ฎค่ทณ่ฝฌๅฐ
// .defaultSuccessUrl("/home")
// .and()
// .authorizeRequests() //ๅฎไนๅชไบURL้่ฆ่ขซไฟๆคใๅชไบไธ้่ฆ่ขซไฟๆค
// .antMatchers("/login.html").permitAll() // ่ฎพ็ฝฎๆๆไบบ้ฝๅฏไปฅ่ฎฟ้ฎ็ปๅฝ้กต้ข
// .anyRequest() // ไปปไฝ่ฏทๆฑ,็ปๅฝๅๅฏไปฅ่ฎฟ้ฎ
// .authenticated()
// .and()
// .logout()
// .logoutUrl("/logout")
// //้ๅบ็ปๅฝๅ็้ป่ฎคurlๆฏ"/login"
// .logoutSuccessUrl("/login")
// .and()
// .csrf().disable(); // ๅ
ณ้ญcsrf้ฒๆค
//
// //่งฃๅณไธญๆไนฑ็ ้ฎ้ข
// CharacterEncodingFilter filter = new CharacterEncodingFilter();
// filter.setEncoding("UTF-8");
// filter.setForceEncoding(true);
// http.addFilterBefore(filter, CsrfFilter.class);
// }
//
// @Autowired
// public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
// auth.userDetailsService(UserService()).passwordEncoder(passwordEncoder());
// //ไนๅฏไปฅๅฐ็จๆทๅๅฏ็ ๅๅจๅ
ๅญ๏ผไธๆจ่
// auth.inMemoryAuthentication().withUser(MockAdmin.USERNAME).password(MockAdmin.PASSWORD).roles(MockAdmin.ROLE);
// }
//
// @Bean
// public PasswordEncoder passwordEncoder() {
// return new BCryptPasswordEncoder();
// }
//
// /**
// *ไปๆฐๆฎๅบไธญ่ฏปๅ็จๆทไฟกๆฏ
// */
// @Bean
// public UserDetailsService UserService() {
// return this.adminService;
// }
//
//}
| [
"[email protected]"
]
| |
b691e425e3c6f2ebd7601735db5d90ef6d2eb9d1 | 24c9f4ddb738926fbe2dc5905fdf5cf9a0a3653a | /src/tenis/Tenis.java | 68f3b459f5c190b8b57ee68fbffb13be202671ca | []
| no_license | xmda/ProyectoFinalTenis | a88dc07f6c1d92c7372d9ca3a945fdeb9908cb44 | ac187e5b5ec931d5a926555dcd45065d608311e5 | refs/heads/master | 2021-01-23T14:58:30.538574 | 2014-08-08T12:03:51 | 2014-08-08T12:03:51 | 22,569,177 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 469 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tenis;
import tenis.Juego.Juego;
import tenis.idioma.Ingles;
public class Tenis {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Juego j=new Juego();
j.setJugador1("Diony");
j.setJugador2("Eli");
j.setIdioma(new Ingles());
j.iniciarJuego();
}
}
| [
"[email protected]"
]
| |
5149e8740af7ecab1d5fee345cd2252df42877aa | 171355a813280663ab8d041ce6e99ee7dc3ee944 | /Sched-Schema/src/main/java/edu/weber/finalproject/schedschema/PatientExam.java | 76ac93cd012edae57e4fb9247a50421a06799153 | []
| no_license | masoud23/OfficeScheduler | 4dfd3d97b0f2f7e3510f08c5ca13b97e24c7da04 | 3d5fccd135bf4e2cb6de737756ad0d9b4f39ee63 | refs/heads/master | 2020-12-24T15:40:22.475316 | 2013-01-21T02:35:57 | 2013-01-21T02:35:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,411 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.weber.finalproject.schedschema;
import java.util.Date;
import java.util.List;
/**
*
* @author Mike
*/
public class PatientExam {
private int id;
private int patientId;
private int appointmentId;
private int examId;
private int doctorId;
private Date serviceDate;
private List<Result> results;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getAppointmentId() {
return appointmentId;
}
public void setAppointmentId(int appointmentId) {
this.appointmentId = appointmentId;
}
public int getDoctorId() {
return doctorId;
}
public void setDoctorId(int doctorId) {
this.doctorId = doctorId;
}
public int getExamId() {
return examId;
}
public void setExamId(int examId) {
this.examId = examId;
}
public int getPatientId() {
return patientId;
}
public void setPatientId(int patientId) {
this.patientId = patientId;
}
public Date getServiceDate() {
return serviceDate;
}
public void setServiceDate(Date serviceDate) {
this.serviceDate = serviceDate;
}
}
| [
"[email protected]"
]
| |
b01e976703049fd75f0fa349583a6f9b254802fc | a2cada08696b48350a32c07eaf6d19480aa844d8 | /netalyzrtest/src/main/java/edu/berkeley/icsi/netalyzr/tests/NetProbeStats.java | 49d489a0d8294e351d06fb89f40998f4a453f282 | [
"Apache-2.0"
]
| permissive | feamster/MySpeedTest | 0e122f60bc81d487c63be87454123f170a8e51ae | 3392d5d77c84328e5a6f92a630c32ede349e62ab | refs/heads/master | 2021-01-12T20:49:40.538455 | 2015-07-17T15:26:41 | 2015-07-17T15:26:41 | 39,249,596 | 1 | 2 | null | 2015-07-17T10:48:12 | 2015-07-17T10:48:12 | null | UTF-8 | Java | false | false | 13,851 | java | package edu.berkeley.icsi.netalyzr.tests;
import android.util.Log;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import java.util.Date;
/**
* This class implements stats-keeping and UDP I/O management
* for the latency and buffer measurement tests.
*
* Each object has a start time C_t_0, the time at which the
* object was created. During the test, the current time
* C_t_cur refers to the time at which the next UDP message is
* assembled. Both are in millisecond granularity. C_t_cur -
* C_t_0 serves as a strictly increasing packet identifier.
*
* The object maintains a counter of the number of datagrams
* sent in the test, C_num_tx, and is configured with the
* desired size C_rcv_len, in bytes, of datagrams sent in
* response to the datagram sent by us. Transmitted datagrams
* are length-padded (with a sequence of dots) to desired
* length. Various additional arguments configure the sending
* rate, number of datagrams, etc.
*
* The UDP datagram content looks as follows (gaps indicate a
* single space character):
*
* <C_t_cur - C_t_0> <C_num_tx> <C_rcv_len> <padding>
*
* Datagrams are sent from an ephemeral port, to the buffer
* server's well-known port. The I/O routine processes up to a
* single response packet after every transmitted one, but
* times out immediately if no packets have arrived.
*
* The server's protocol operates as follows. For each client
* session (identified by source address & port), the time of
* last received packet as well as the number of packets
* S_num_rx received at that time is stored. Similarly to the
* client, the server maintains times S_t_0 and S_t_cur. For
* every received packet, the server immediately sends a
* response of the form
*
* <C_t_cur - C_t_0> <S_t_cur - S_t_0> <C_num_tx> <C_rcv_len> <S_num_rx>
* <padding>
*
* Problems:
* - server does not expire state
* - server-side duplicate tracking will break after 30 seconds.
* - If there's an acceleration proxy with compression capabilities,
* the results may be biased
*
* @author Netalyzr
*
*/
public class NetProbeStats {
private static final String TAG = "NETALYZR";
public float avgRTT;
public float sustainedPPS;
public float sustainedRTT;
public int sendPacketSize;
public int recvPacketSize;
public long sendCount;
public long recvCount;
public long serverRecvCount;
public long reorderCount;
private int reorderIndex;
public long lossBurstCount;
public long lossBurstLength;
public long dupCount;
private boolean [] dupData;
private int dupRange;
public int status;
private String server;
private InetAddress serverIP;
private int port;
private int sendRate;
private int sendTime;
private int sendSize;
private int recvSize;
private String sendSlug;
private boolean isPing;
private int maxSend;
private boolean stopAtPing;
// Alternate constructor for just pinging
// an X number of packets.
public NetProbeStats(String serverIn,
int portIn,
int sendRateIn, // in ms between packets
int maxSendIn){
isPing = true;
server = serverIn;
dupRange = 30000;
dupData = new boolean[dupRange];
dupCount = 0;
reorderCount = 0;
reorderIndex = -1;
lossBurstCount = 0;
lossBurstLength = 0;
try {
serverIP = InetAddress.getByName(server);
} catch (UnknownHostException e){
//status = Test.TEST_ERROR;
Log.d(TAG, "Failed to initialize properly");
return;
}
maxSend = maxSendIn;
port = portIn;
sendRate = sendRateIn;
sendTime = 0;
sendSize = 0;
recvSize = 0;
sendSlug = "";
serverRecvCount = 0;
for(int i = 0; i < sendSize; ++i){
sendSlug += ".";
}
stopAtPing = false;
}
// Alternate constructor for just pinging
// until the ping test starts
public NetProbeStats(String serverIn,
int portIn,
int sendRateIn){ // in ms between packets
isPing = true;
server = serverIn;
stopAtPing = true;
lossBurstCount = 0;
lossBurstLength = 0;
dupRange = 30000;
dupData = new boolean[dupRange];
dupCount = 0;
reorderCount = 0;
reorderIndex = -1;
try {
serverIP = InetAddress.getByName(server);
} catch (UnknownHostException e){
//status = Test.TEST_ERROR;
Log.d(TAG, "Failed to initialize properly");
return;
}
/* Just Send a "Metric S-load", so set max very high */
maxSend = 10000;
port = portIn;
sendRate = sendRateIn;
sendTime = 0;
sendSize = 0;
recvSize = 0;
sendSlug = "";
serverRecvCount = 0;
for(int i = 0; i < sendSize; ++i){
sendSlug += ".";
}
}
public NetProbeStats(String serverIn,
int portIn,
int sendRateIn, // In ms between packets.
// 0 = no delay
int sendTimeIn, // In seconds
int sendSizeIn, // Any additional padding on sent
int recvSizeIn // and on received
){
isPing = false;
dupRange = 30000;
dupData = new boolean[dupRange];
dupCount = 0;
reorderCount = 0;
reorderIndex = -1;
lossBurstCount = 0;
lossBurstLength = 0;
stopAtPing = false;
serverRecvCount = 0;
server = serverIn;
try {
serverIP = InetAddress.getByName(server);
} catch (UnknownHostException e){
//status = Test.TEST_ERROR;
Log.d(TAG, "Failed to initialize properly");
return;
}
port = portIn;
sendRate = sendRateIn;
sendTime = sendTimeIn;
sendSize = sendSizeIn;
recvSize = recvSizeIn;
sendSlug = "";
for(int i = 0; i < sendSize; ++i){
sendSlug += ".";
}
}
public void run(){
sendCount = 0;
recvCount = 0;
//status = Test.TEST_ERROR;
long rttCount = 0;
long sustainedRttCount = 0;
long ppsCount = 0;
long startTime = (new Date()).getTime();
long currentTime = (new Date()).getTime();
Log.d(TAG,"Start time is " + startTime);
Log.d(TAG,"Remote server is " + server);
Log.d(TAG,"Remote port is " + port);
byte [] bufIn = new byte[2048];
DatagramSocket socket;
try{
socket = new DatagramSocket();
socket.setSoTimeout(1);
} catch (SocketException e){
//status = Test.TEST_ERROR;
Log.d(TAG,"Test aborted due to socket exception");
return;
}
long lastSend = 0;
recvPacketSize = 0;
try {
while((stopAtPing //&& !TestState.startedPingTest
&& sendCount < maxSend) ||
(isPing && sendCount < maxSend && !stopAtPing) ||
(!isPing && !stopAtPing &&
(currentTime - startTime) < (sendTime * 1000))){
currentTime = (new Date()).getTime();
if((sendRate == 0) ||
((currentTime - lastSend) > sendRate)){
String message = (currentTime - startTime) + " " +
sendCount +
" " + recvSize + " " + sendSlug;
try {
socket.send(new DatagramPacket(message.getBytes(),
message.length(),
serverIP,
port));
} catch(IOException e){
if(isPing){
Log.d(TAG,"Probing process caught IOException, just treating as a loss event.");
}
}
sendCount++;
sendPacketSize = message.length();
lastSend = currentTime;
}
try {
DatagramPacket d = new DatagramPacket(bufIn,
2048);
socket.receive(d);
currentTime = (new Date()).getTime();
long deltaTime = currentTime - startTime;
String s = new String(bufIn);
String []t = s.split(" ");
int sentTime = Utils.parseInt(t[0]);
int serverCount = Utils.parseInt(t[4]);
int packetID = Utils.parseInt(t[2]);
if(packetID < reorderIndex){
reorderCount += 1;
Log.d(TAG,"Packet reordering observed");
}
reorderIndex = packetID;
if(packetID < dupRange &&
dupData[packetID]){
Log.d(TAG,"Duplicate packet received");
dupCount += 1;
}
if(packetID < dupRange){
dupData[packetID] = true;
}
if(serverCount > this.serverRecvCount){
this.serverRecvCount = serverCount;
}
if (sentTime < 0)
return;
rttCount += (deltaTime - sentTime);
if(d.getLength() != 0){
recvPacketSize = d.getLength();
}
if(deltaTime >= (sendTime * 500)){
ppsCount += 1;
sustainedRttCount += (deltaTime - sentTime);
}
recvCount++;
} catch(SocketTimeoutException e){
}
currentTime = (new Date()).getTime();
}
long loopTime = (new Date()).getTime();
Log.d(TAG,"All packets sent, waiting for the last responses");
// Keep receiving for 50% seconds afterwards
//
// Or 2 seconds afterwards for pings
while( (!isPing && ((currentTime - startTime) < ((sendTime) * 1500)))
||
(isPing && (loopTime > (currentTime - 3000)))){
try{
DatagramPacket d = new DatagramPacket(bufIn, 2048);
socket.receive(d);
if(d.getLength() != 0){
recvPacketSize = d.getLength();
}
currentTime = (new Date()).getTime();
long deltaTime = currentTime - startTime;
String s = new String(bufIn);
String []t = s.split(" ");
int sentTime = Utils.parseInt(t[0]);
int serverCount = Utils.parseInt(t[4]);
int packetID = Utils.parseInt(t[2]);
if(packetID < reorderIndex){
reorderCount += 1;
Log.d(TAG,"Packet reordering observed");
}
reorderIndex = packetID;
if(packetID < dupRange &&
dupData[packetID]){
Log.d(TAG,"Duplicate packet received");
dupCount += 1;
}
if(packetID < dupRange){
dupData[packetID] = true;
}
if(serverCount > this.serverRecvCount){
this.serverRecvCount = serverCount;
}
if (sentTime < 0)
return;
rttCount += (deltaTime - sentTime);
recvCount++;
} catch(SocketTimeoutException e){
}
currentTime = (new Date()).getTime();
}
// A burst is a minimum of 3 packets in a row lost
Log.d(TAG,"Now counting up bursts on loss");
boolean inBurst = false;
long currentBurst = 0;
for(int i = 2; i < sendCount && i < dupRange; ++i){
if(dupData[i]){
inBurst = false;
}
else if (!dupData[i] &&
!dupData[i-1] &&
!dupData[i-2]){
if(inBurst){
currentBurst += 1;
if(currentBurst > lossBurstLength){
lossBurstLength = currentBurst;
}
} else {
inBurst = true;
currentBurst = 3;
lossBurstCount += 1;
if(lossBurstLength < 3){
lossBurstLength = 3;
}
}
}
}
Log.d(TAG,"Probing done");
} catch(IOException e){
Log.d(TAG,"Probing process caught IOException!");
//status = Test.TEST_ERROR;
return;
}
avgRTT = ((float) rttCount) / ((float) recvCount);
sustainedPPS = ((float) ppsCount) / ((float) (sendTime * 0.5));
sustainedRTT = ((float) sustainedRttCount) / ((float) ppsCount);
Log.d(TAG,"Sent " + sendCount + " packets");
Log.d(TAG,"Received " + recvCount + " packets");
Log.d(TAG,"Average RTT " + avgRTT);
Log.d(TAG,"Sustained RTT " + sustainedRTT);
Log.d(TAG,"Server received " + serverRecvCount);
Log.d(TAG,"Packets reordered " + reorderCount);
Log.d(TAG,"Packets duplicated " + dupCount);
Log.d(TAG,"Loss bursts observed " + lossBurstCount);
if (!isPing){
Log.d(TAG,"Sustained PPS " + sustainedPPS);
Log.d(TAG,"Send packet bandwidth " +
(sendPacketSize * 8 * sustainedPPS));
Log.d(TAG,"Received packet bandwidth " +
(recvPacketSize * 8 * sustainedPPS));
}
Log.d(TAG,"Send packet size " + sendPacketSize);
Log.d(TAG, "Received packet size " + recvPacketSize);
socket.close();
//status = Test.TEST_SUCCESS;
}
} | [
"[email protected]"
]
| |
18fe53ffeac2435e5154393643dfa79ae8448380 | 9640ff589042143c41cf6cb6f2c4b1980a9b9691 | /Vaida/app/src/main/java/com/modestasvalauskas/vaida/Tabs/ChordProgressionTransposer/CPTMainTabFragment.java | be7d371b680fb25589ea537d439e6b3460780d94 | []
| no_license | modulovalue/vaida_archived | 061272b93a52d970f77c3228648d2f32eafaf1e0 | 51798b1d6f9fef4fdcc31ebe98c4376b9759e650 | refs/heads/master | 2020-07-05T09:26:59.127076 | 2019-08-15T20:44:44 | 2019-08-15T20:44:44 | 202,608,432 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,795 | java | package com.modestasvalauskas.vaida.Tabs.ChordProgressionTransposer;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.modestasvalauskas.vaida.R;
import com.modestasvalauskas.vaida.pianoview.Piano;
import java.util.ArrayList;
import java.util.List;
public class CPTMainTabFragment extends Fragment {
public List<Piano> pianos = new ArrayList<Piano>();
private Piano.PianoKeyListener onPianoKeyPress =
new Piano.PianoKeyListener() {
@Override
public void keyPressed(int id, int action) {
pianoToFile();
}
};
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.cptpiano_tab, container, false);
initPianoViews(view);
initShiftButtonsListener(view);
fileToPianos();
return view;
}
public void initPianoViews(View view) {
if(pianos.size() == 0) {
for(int i = 0; i < 4; i++) {
Piano piano = new Piano(getContext(), null, 0, 48);
piano.setPianoKeyListener(onPianoKeyPress);
pianos.add(piano);
}
} else {
for (Piano piano: pianos) { ((LinearLayout) piano.getParent()).removeView(piano);}
}
((LinearLayout) view.findViewById(R.id.pianoview1)).addView(pianos.get(0));
((LinearLayout) view.findViewById(R.id.pianoview2)).addView(pianos.get(1));
((LinearLayout) view.findViewById(R.id.pianoview3)).addView(pianos.get(2));
((LinearLayout) view.findViewById(R.id.pianoview4)).addView(pianos.get(3));
}
public void initShiftButtonsListener(View view) {
(view.findViewById(R.id.buttonm7)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Piano.shiftPianosBySemitone(pianos, -7);
}
});
(view.findViewById(R.id.buttonm5)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Piano.shiftPianosBySemitone(pianos, -5);
}
});
(view.findViewById(R.id.buttonm3)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Piano.shiftPianosBySemitone(pianos, -3);
}
});
(view.findViewById(R.id.buttonm1)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Piano.shiftPianosBySemitone(pianos, -1);
}
});
(view.findViewById(R.id.buttonp1)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Piano.shiftPianosBySemitone(pianos, 1);
}
});
(view.findViewById(R.id.buttonp3)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Piano.shiftPianosBySemitone(pianos, 3);
}
});
(view.findViewById(R.id.buttonp5)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Piano.shiftPianosBySemitone(pianos, 5);
}
});
(view.findViewById(R.id.buttonp7)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Piano.shiftPianosBySemitone(pianos, 7);
}
});
}
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser) {
System.out.println("VISIBLE DING");
if(getContext() != null) {
fileToPianos();
}
}
else {
}
}
public void fileToPianos() {
CPTFileData fileData = CPTSharedPreference.getLoadedFile(getContext());
System.out.println("chords: " + fileData.getChords());
for(int i = 0; i < pianos.size(); i++) {
pianos.get(i).setKeysToPressed(fileData.getChords().get(i));
}
}
public void pianoToFile() {
ArrayList<ArrayList<Integer>> arrayLists = new ArrayList<>();
for(int i = 0; i < pianos.size(); i++) {
arrayLists.add(pianos.get(i).getPressedArray());
}
CPTSharedPreference.getLoadedFile(getContext()).setChords(arrayLists);
}
} | [
"[email protected]"
]
| |
4a6e9a2dbc17fcde8caea2bee771a584ad74fe4c | b78903735c722260a42badc5e33da4fd259a0bde | /src/main/java/com/myszor/msscbeerservice/domain/Beer.java | 5ba325a8724a246efd75351ebf283786e66573b0 | []
| no_license | Maxomys/mssc-beer-service | 64cb248de9af5a06ebf350739c8504951686dd9e | fee1a00e39c31abc63f0fc6b9fba81d261f5dbd5 | refs/heads/master | 2023-03-24T13:46:55.342708 | 2021-03-23T23:35:14 | 2021-03-23T23:35:14 | 309,881,471 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,161 | java | package com.myszor.msscbeerservice.domain;
import lombok.*;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.UpdateTimestamp;
import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.UUID;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
public class Beer {
@Id
@GeneratedValue(generator = "UUID")
@GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator")
@Type(type = "org.hibernate.type.UUIDCharType")
@Column(length = 36, columnDefinition = "varchar(36)", updatable = false, nullable = false)
private UUID id;
@Version
private Long version;
@CreationTimestamp
@Column(updatable = false)
private Timestamp createdDate;
@UpdateTimestamp
private Timestamp lastModifiedDate;
private String beerName;
private String beerStyle;
@Column(unique = true)
private String upc;
private BigDecimal price;
private Integer minOnHand;
private Integer quantityToBrew;
}
| [
"[email protected]"
]
| |
ae512ee868a94d11530aab15222e44fd203c6d78 | eb4a9b8b10dd4028e647416eb21e66e8f3ebbf06 | /app/src/main/java/com/example/lijinduo/mydemo/being/BeingC.java | bacacdedc6de875f4fe261aea2968b3df353f90f | []
| no_license | GexYY/project | 5b8e1b82a6513743734aec2cd2f0d51493b5a179 | 8ffd9e2b3e626f71731033d53362658e8534b22b | refs/heads/master | 2022-03-22T14:50:22.773615 | 2018-05-15T08:43:35 | 2018-05-15T08:43:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,050 | java | package com.example.lijinduo.mydemo.being;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.TextView;
import com.example.lijinduo.mydemo.BaseActivity;
import com.example.lijinduo.mydemo.R;
import com.example.lijinduo.mydemo.tool.AppManager;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* ็ๆ๏ผXXXๅ
ฌๅธ ็ๆๆๆ
* ไฝ่
๏ผlijinduo
* ็ๆฌ๏ผ2.0
* ๅๅปบๆฅๆ๏ผ2017/8/31
* ๆ่ฟฐ๏ผ(้ๆ)
* ไฟฎ่ฎขๅๅฒ๏ผ
* ๅ่้พๆฅ๏ผ
*/
public class BeingC extends BaseActivity {
@BindView(R.id.textView)
TextView textView;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.act_beingc);
ButterKnife.bind(this);
if (AppManager.getAppManager().isBeing(BeingB.class)) {
textView.setText("Bๅญๅจ");
}else{
textView.setText("Bไธๅญๅจ");
}
}
@Override
public void doSmoething() {
}
}
| [
"[email protected]"
]
| |
ccec5b9da232b93c2eb5260dcbc51583babf1df9 | b71d65f7b96f0fd27bf67b2ee1ebd33efb2b1c12 | /01-JavaWeb็ฝไธๅๅ/store/src/utils/DataSourceUtils.java | 1015717c3a775dc825eb3a16cf9b375dca73008a | []
| no_license | luguanxing/JavaWeb-Apps | 81082420edc718734e2df1b8e8d70e80cea33a78 | 49881bdec84320ba2990c87a9e87519bc25522c6 | refs/heads/master | 2021-09-08T03:24:57.547555 | 2018-03-06T18:08:26 | 2018-03-06T18:08:26 | 103,841,721 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,765 | java | package utils;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.DataSource;
import com.mchange.v2.c3p0.ComboPooledDataSource;
public class DataSourceUtils {
private static ComboPooledDataSource ds=new ComboPooledDataSource();
private static ThreadLocal<Connection> tl=new ThreadLocal<>();
/**
* ่ทๅๆฐๆฎๆบ
* @return ่ฟๆฅๆฑ
*/
public static DataSource getDataSource(){
return ds;
}
/**
* ไป็บฟ็จไธญ่ทๅ่ฟๆฅ
* @return ่ฟๆฅ
* @throws SQLException
*/
public static Connection getConnection() throws SQLException{
Connection conn = tl.get();
//่ฅๆฏ็ฌฌไธๆฌก่ทๅ ้่ฆไปๆฑ ไธญ่ทๅไธไธช่ฟๆฅ,ๅฐ่ฟไธช่ฟๆฅๅๅฝๅ็บฟ็จ็ปๅฎ
if(conn==null){
conn=ds.getConnection();
//ๅฐ่ฟไธช่ฟๆฅๅๅฝๅ็บฟ็จ็ปๅฎ
tl.set(conn);
}
return conn;
}
/**
* ้ๆพ่ตๆบ
*
* @param conn
* ่ฟๆฅ
* @param st
* ่ฏญๅฅๆง่ก่
* @param rs
* ็ปๆ้
*/
public static void closeResource(Connection conn, Statement st, ResultSet rs) {
closeResultSet(rs);
closeStatement(st);
closeConn(conn);
}
/**
* ้ๆพ่ฟๆฅ
*
* @param conn
* ่ฟๆฅ
*/
public static void closeConn(Connection conn) {
if (conn != null) {
try {
conn.close();
//ๅๅฝๅ็บฟ็จ่งฃ็ป
tl.remove();
} catch (SQLException e) {
e.printStackTrace();
}
conn = null;
}
}
/**
* ้ๆพ่ฏญๅฅๆง่ก่
*
* @param st
* ่ฏญๅฅๆง่ก่
*/
public static void closeStatement(Statement st) {
if (st != null) {
try {
st.close();
} catch (SQLException e) {
e.printStackTrace();
}
st = null;
}
}
/**
* ้ๆพ็ปๆ้
*
* @param rs
* ็ปๆ้
*/
public static void closeResultSet(ResultSet rs) {
if (rs != null) {
try {
rs.close();
} catch (SQLException e) {
e.printStackTrace();
}
rs = null;
}
}
/**
* ๅผๅงไบๅก
* @throws SQLException
*/
public static void startTransaction() throws SQLException{
//1.่ทๅ่ฟๆฅ
Connection conn=getConnection();
//2.ๅผๅง
conn.setAutoCommit(false);
}
/**
* ไบๅกๆไบค
*/
public static void commitAndClose(){
try {
//0.่ทๅ่ฟๆฅ
Connection conn = getConnection();
//1.ๆไบคไบๅก
conn.commit();
//2.ๅ
ณ้ญไธ็งป้ค
closeConn(conn);
} catch (SQLException e) {
}
}
/**
* ๆไบคๅ้กพ
*/
public static void rollbackAndClose(){
try {
//0.่ทๅ่ฟๆฅ
Connection conn = getConnection();
//1.ไบๅกๅ้กพ
conn.rollback();
//2.ๅ
ณ้ญไธ็งป้ค
closeConn(conn);
} catch (SQLException e) {
}
}
}
| [
"[email protected]"
]
| |
7b70e5b9a40195551e641d85015e577af8aa6ead | c42abe86bfced3072b3df7a551bce85eaa655353 | /source/retrofitDemo/myretrofit/src/main/java/com/zero/myretrofit/Utils.java | 1fb103911b2416e4b82c912f7f43ef3ffe547ab2 | []
| no_license | fanzhangvip/enjoy01 | 97b36e16c5f8a18aad8cef8a04ddf037a64504b1 | 92f7e70f2b6e00b083d16eb72387665c924adaad | refs/heads/master | 2022-10-26T14:31:28.606166 | 2022-10-18T15:32:13 | 2022-10-18T15:32:13 | 183,878,032 | 2 | 6 | null | 2022-10-05T03:05:11 | 2019-04-28T08:15:08 | C++ | UTF-8 | Java | false | false | 779 | java | package com.zero.myretrofit;
import java.io.FileOutputStream;
//import sun.misc.ProxyGenerator;
public class Utils {
// /**
// * ็ๆไปฃ็็ฑปๆไปถ
// */
// public static void generyProxyFile(String classFileName,Class<?>[] classes) {//.class.getInterfaces()
// byte[] classFile = ProxyGenerator.generateProxyClass(classFileName, classes);
// String path = "./"+classFileName+".class";
// try {
// FileOutputStream fos = new FileOutputStream(path);
// fos.write(classFile);
// fos.flush();
// System.out.println("ไปฃ็็ฑปclassๆไปถๅๅ
ฅๆๅ");
// } catch (Exception e) {
// e.printStackTrace();
// System.out.println("ๅๅ
ฅๅบ้็ฑป");
// }
// }
}
| [
"[email protected]"
]
| |
258a06ab926070d92a4d330a6222b62b71fd86ce | 8eeb6c8fd3c735b57fb257cd001f097b7d91b2ed | /app/src/main/java/com/sanleng/emergencystation/adapter/ArticleAdapter.java | 5fcca62e7ce90cf55a77d5a52c19ed3278ed2d20 | []
| no_license | wendyJohn/Emergencystation | 3b5eb9f7762baf51647e7a0af0ac327f603d0899 | 76e787a638c11ff9e2b919f41046cc7a0d478555 | refs/heads/master | 2021-06-08T18:25:44.976062 | 2021-04-22T02:13:22 | 2021-04-22T02:13:22 | 163,932,586 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,777 | java | package com.sanleng.emergencystation.adapter;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.sanleng.emergencystation.R;
import com.sanleng.emergencystation.utils.ImageDown;
import com.sanleng.emergencystation.utils.ImageDown.ImageCallBack;
import java.util.List;
import java.util.Map;
/**
* ๆ็ซ ๆฐๆฎ้้
ๅจ
*
* @author QiaoShi
*/
public class ArticleAdapter extends BaseAdapter {
private Context context;
private List<Map<String, Object>> list;
/**
* bindData็จๆฅไผ ้ๆฐๆฎ็ป้้
ๅจใ
*
* @param list
*/
public void bindData(Context context, List<Map<String, Object>> list) {
this.list = list;
this.context = context;
}
@Override
public int getCount() {
return list.size();
}
@Override
public Object getItem(int position) {
return list.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final ViewHolder holder;
if (convertView == null) {
holder = new ViewHolder();
convertView = LayoutInflater.from(context).inflate(R.layout.article_item, parent, false);
holder.imageviewdata = (ImageView) convertView.findViewById(R.id.imageviewdata);
holder.name = (TextView) convertView.findViewById(R.id.name);
holder.category = (TextView) convertView.findViewById(R.id.category);
holder.frequency = (TextView) convertView.findViewById(R.id.frequency);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
// holder.imageviewdata.setImageResource(R.drawable.ic_launcher);
holder.name.setText(list.get(position).get("name").toString());
holder.category.setText(list.get(position).get("category").toString());
holder.frequency.setText(list.get(position).get("frequency").toString());
// ๆฅๅฃๅ่ฐ็ๆนๆณ๏ผๅฎๆๅพ็็่ฏปๅ;
ImageDown downImage = new ImageDown(list.get(position).get("picname_hospital_s").toString());
downImage.loadImage(new ImageCallBack() {
@Override
public void getDrawable(Drawable drawable) {
holder.imageviewdata.setImageDrawable(drawable);
}
});
return convertView;
}
class ViewHolder {
TextView name, category, frequency;
ImageView imageviewdata;
}
}
| [
"[email protected]"
]
| |
b7bcbeaddf492d65cff7e024162f839ef94db055 | 59ecc10352e10afbab8ebf14e98a0d6ec3996513 | /srcJava/serial/SerialCommChannel.java | 2794773a7cf22df670aafeb695da1a17a0099643 | []
| no_license | lorenz95/JavaRaspberry | 2ff44400e307adeb477656b68ac5ccbb15c689e2 | 2e15f7952c1ce8423f8b1580a5035995a5e505b1 | refs/heads/master | 2021-01-01T05:54:58.336597 | 2017-07-15T10:09:40 | 2017-07-15T10:09:40 | 97,305,675 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,552 | java | package pse.serial;
import gnu.io.CommPortIdentifier;
import gnu.io.SerialPort;
import gnu.io.SerialPortEvent;
import gnu.io.SerialPortEventListener;
import java.io.*;
import java.util.concurrent.*;
/**
* Comm channel implementation based on serial port.
*
* @author aricci
*
*/
public class SerialCommChannel implements CommChannel, SerialPortEventListener {
private SerialPort serialPort;
private BufferedReader input;
private OutputStream output;
private BlockingQueue<String> queue;
public SerialCommChannel(String port, int rate) throws Exception {
queue = new ArrayBlockingQueue<String>(100);
CommPortIdentifier portId = CommPortIdentifier.getPortIdentifier(port);
// open serial port, and use class name for the appName.
SerialPort serialPort = (SerialPort) portId.open(this.getClass().getName(), 2000);
// set port parameters
serialPort.setSerialPortParams(rate,
SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);
// serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_IN);
// open the streams
input = new BufferedReader(new InputStreamReader(serialPort.getInputStream()));
output = serialPort.getOutputStream();
// add event listeners
serialPort.addEventListener(this);
serialPort.notifyOnDataAvailable(true);
}
@Override
public void sendMsg(String msg) {
char[] array = msg.toCharArray();
byte[] bytes = new byte[array.length];
for (int i = 0; i < array.length; i++){
bytes[i] = (byte) array[i];
}
try {
output.write(bytes);
output.flush();
} catch(Exception ex){
ex.printStackTrace();
}
}
@Override
public String receiveMsg() throws InterruptedException {
// TODO Auto-generated method stub
return queue.take();
}
@Override
public boolean isMsgAvailable() {
// TODO Auto-generated method stub
return !queue.isEmpty();
}
/**
* This should be called when you stop using the port.
* This will prevent port locking on platforms like Linux.
*/
public synchronized void close() {
if (serialPort != null) {
serialPort.removeEventListener();
serialPort.close();
}
}
/**
* Handle an event on the serial port. Read the data and print it.
*/
public synchronized void serialEvent(SerialPortEvent oEvent) {
if (oEvent.getEventType() == SerialPortEvent.DATA_AVAILABLE) {
try {
String msg=input.readLine();
queue.put(msg);
} catch (Exception e) {
System.err.println(e.toString());
}
}
// Ignore all the other eventTypes, but you should consider the other ones.
}
}
| [
"[email protected]"
]
| |
fe6ed3b65e6ba65070b6a258871444162b7ed2ff | faa73b88d1b6e793ebc9b9648330f898c097511c | /pc-parent/pc-record/src/main/java/com/ds/record/Main.java | 52bf1ef96af49eeb3620099d5182c9f5d05bba85 | []
| no_license | wisty/bocai | 1564cb4e9ab78c345c9572c3ab713c6cc83c4a0c | 28ed4eb7470fbe8d3e26dec83c25be71b273f3e4 | refs/heads/master | 2023-04-12T18:46:39.977114 | 2017-03-11T11:50:07 | 2017-03-11T11:50:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,023 | java | package com.ds.record;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableTransactionManagement // ๅผๅฏไบๅกๆณจ่งฃ
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan(basePackages = { "com.ds" })
@EnableJpaRepositories("com.ds")
public class Main extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(Main.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(Main.class);
}
}
| [
"[email protected]"
]
| |
56637f27ec5c9fc2d09a09685bddffaac348527d | e15d3668bd963e7aee6287e2391c882bc7b05eb1 | /src/main/java/com/zengmin/services/TestngXmlService.java | 39dbe5ee2d79949652299fc31d89c9969c0bbbb8 | []
| no_license | zengmin1982/TNGPra | 02c208a42f06e9fd6391951568336ae4d61e0b0b | f1ecc8750258df66bfdd558dcb09b1f30210c29c | refs/heads/master | 2021-01-11T19:04:56.161623 | 2017-03-17T08:34:26 | 2017-03-17T08:34:26 | 79,311,627 | 6 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,978 | java | package com.zengmin.services;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.testng.IReporter;
import org.testng.TestNG;
import org.testng.reporters.FailedReporter;
import org.testng.xml.XmlClass;
import org.testng.xml.XmlInclude;
import org.testng.xml.XmlSuite;
import org.testng.xml.XmlTest;
import com.zengmin.services.TestngXmlService;
import com.zengmin.util.ClassUtil;
import com.zengmin.util.SpringPropertyResourceReader;
import com.zengmin.util.SystemConfig;
//ๅจSpringๆกๆถไธญๆณจๅไธบService
@Service("TestngXmlService")
public class TestngXmlService{
//ๅฐ่ฃ
xml็ๆ็ๆนๆณ
public List<XmlSuite> createSuite(String testsuite, String time) {
//ๅปบ็ซๆต่ฏๅฅไปถๅ่กจ
List<XmlSuite> suites = new ArrayList<XmlSuite>();
Set<String> packagenames = new HashSet<String>();
// suite.setVerbose(1);
// suite.setPreserveOrder("true");
// ๅนถ่ก็บฟ็จๆฐ
// suite.setThreadCount(4);
// ๅนถ่กๅค็ http://testng.org/doc/documentation-main.html#parallel-running
// suite.setParallel("tests");
// suite.setTimeOut("5000");
// List<String> listeners = new ArrayList<String>();
// listeners.add("report.Report");
// suite.setListeners(listeners);
//ๆซๆsuiteไธ้ข็ๅ
if (testsuite.equals("")) {
Set<Class<?>> testClasses = ClassUtil.getClasses("com.zengmin.test.suite");
for (Class<?> testClass : testClasses) {
String pcname = testClass.getPackage().getName();
if (!packagenames.contains(pcname)) {
packagenames.add(pcname);
}
}
} else {
packagenames.add("com.zengmin.test.suite." + testsuite);
}
for (String packagename : packagenames) {
//ๆๅปบtestng.xml็ๆต่ฏ็จไพ็ฑปๆ ็ญพ<test>็ๅ่กจ
List<XmlTest> tests = new ArrayList<XmlTest>();
//ๆๅปบtestng.xml็ๆต่ฏๅฅไปถๆ ็ญพ<suite>
XmlSuite suite = new XmlSuite();
HashMap timemap = new HashMap<String, String> ();
timemap.put("time", time);
suite.setParameters(timemap);
//่ฎพ็ฝฎๆต่ฏๅฅไปถsuite็ๅๅญ
suite.setName("Demo");
//ๆๅปบtestng.xml็ๆต่ฏ้ฉฑๅจ็ฑปๆ ็ญพ<class>็ๅ่กจ
List<XmlClass> classes = new ArrayList<XmlClass>();
String testclass = "TestSeo1";
//ๆๅปบtestng.xml็ๆต่ฏ็จไพ็ฑปๆ ็ญพ<test>๏ผๅนถไธ็ฝฎไบไธๆไธญๆๅปบ็suite "Demo"ไนไธ
XmlTest test = new XmlTest(suite);
//ๅขๅ ๆต่ฏๅๆฐ
test.addParameter("testcase", "This is testcase");
//่ฎพ็ฝฎ็จไพๅ็งฐ
test.setName("TestDemo");
test.addParameter("testname", "TestDemo");
test.addParameter("result", "This is testresult");
XmlClass clazz = null;
//่งๅฐ่ฃ
ๆนๆณ๏ผๆๅปบๆต่ฏ้ฉฑๅจ็ฑป
clazz = greatTest(packagename + "." + testclass);
//ๅจ้ฉฑๅจ็ฑปๅ่กจไธญๅขๅ ๆต่ฏ้ฉฑๅจ็ฑป
classes.add(clazz);
//ๅจๆต่ฏ็จไพไธญๅขๅ ้ฉฑๅจ็ฑปๅ่กจ
test.setXmlClasses(classes);
//ๅจๆต่ฏ็จไพๅ่กจไธญๅขๅ ่ฏฅ็จไพ
tests.add(test);
//ๅนถ่ก็บฟ็จๆฐ๏ผ้็จ้
็ฝฎๆไปถไธญ็็บฟ็จๆฐ
suite.setThreadCount(Integer.parseInt(SystemConfig.TESTTHREADNUM));
//ๅนถ่กๅค็ http://testng.org/doc/documentation-main.html#parallel-running
suite.setParallel(XmlSuite.ParallelMode.TESTS);
//่ฎพ็ฝฎ่ถ
ๆถๆถ้ด
suite.setTimeOut("100000");
//่ฎพ็ฝฎๆต่ฏ็จไพๅ่กจ
suite.setTests(tests);
//ๅขๅ reportng็็ๅฌ็ฑป
suite.addListener("org.uncommons.reportng.HTMLReporter");
suite.addListener("org.uncommons.reportng.JUnitXMLReporter");
suite.addListener("com.zengmin.testng.listener.ResultListener");
//ๆๅฐxmlๅ่กจ
System.out.println(suite.toXml());
suites.add(suite);
}
return suites;
}
/**
* ๆทปๅ ๆต่ฏๆนๆณ,ๆนๆณๅไธบๅคไธช็ๆ
ๅตไธไฝฟ็จ"/"่ฟ่กๅๅฒ
*
* @param classname
* ็ฑปๅๅญ
* @param methodListname
* ๆนๆณๅ
* @return
*/
private XmlClass greatTest(String className) {
//ๆๅปบๆต่ฏ้ฉฑๅจ็ฑปๆ ็ญพ<class>
XmlClass clazz = new XmlClass(className);
//ๆทปๅ ๆต่ฏๆนๆณๅ่กจ<methods>
List<XmlInclude> methodList = new ArrayList<XmlInclude>();
Set<String> methodListnames = null;
try {
//้่ฟๅๅฐ๏ผไป้ฉฑๅจ็ฑปไธญ่ทๅๆนๆณๅ่กจ
methodListnames = ClassUtil.getTestMethod(Class.forName(className));
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//ๆทปๅ ๆนๆณ่ณๅ
ๅซๆนๆณๅ่กจ<include>
for (String methodListname : methodListnames) {
methodList.add(new XmlInclude(methodListname));
}
//่ฎพ็ฝฎๆนๆณๆ ็ญพ่ณ้ฉฑๅจๅ่กจ
clazz.setIncludedMethods(methodList);
return clazz;
}
} | [
"[email protected]"
]
| |
70e5774f25d8fef6c2793e13369ad14d2c0d534b | 99dfdecfb7f632b48b5c087d3cc818e87a47e661 | /src/main/java/com/tank/message/schema/TableCreator.java | 0b116c16a938d56cc0713399da0ab62c637534c1 | []
| no_license | fuchun1010/spboot | ecd94925dcc1d3e10e4486d946bfeea41713da61 | 3ec24b8bc4d82bb60ccd6a434b8f1eb881571b2e | refs/heads/master | 2021-10-08T15:23:49.913237 | 2018-12-14T02:32:40 | 2018-12-14T02:32:40 | 107,274,564 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 119 | java | package com.tank.message.schema;
import lombok.Data;
@Data
public class TableCreator {
private String[] sqls;
}
| [
"[email protected]"
]
| |
b1c1b2377dd0858eafc3dba329ed71615bbd97c7 | 2da87d8ef7afa718de7efa72e16848799c73029f | /ikep4-support/src/main/java/com/lgcns/ikep4/support/profile/model/Career.java | d91ae3e99627ce34063ad85c9b116336b18a4411 | []
| no_license | haifeiforwork/ehr-moo | d3ee29e2cae688f343164384958f3560255e52b2 | 921ff597b316a9a0111ed4db1d5b63b88838d331 | refs/heads/master | 2020-05-03T02:34:00.078388 | 2018-04-05T00:54:04 | 2018-04-05T00:54:04 | 178,373,434 | 0 | 1 | null | 2019-03-29T09:21:01 | 2019-03-29T09:21:01 | null | UTF-8 | Java | false | false | 4,658 | java | /*
* Copyright (C) 2011 LG CNS Inc.
* All rights reserved.
*
* ๋ชจ๋ ๊ถํ์ LG CNS(http://www.lgcns.com)์ ์์ผ๋ฉฐ,
* LG CNS์ ํ๋ฝ์์ด ์์ค ๋ฐ ์ด์งํ์์ผ๋ก ์ฌ๋ฐฐํฌ, ์ฌ์ฉํ๋ ํ์๋ฅผ ๊ธ์งํฉ๋๋ค.
*/
package com.lgcns.ikep4.support.profile.model;
import java.util.Date;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.springframework.format.annotation.DateTimeFormat;
import com.lgcns.ikep4.framework.core.model.BaseObject;
/**
* ๊ฒฝ๋ ฅ ์ ๋ณด Model Object
*
* @author ์ดํ์ด ([email protected])
* @version $Id: Career.java 16258 2011-08-18 05:37:22Z giljae $
*/
public class Career extends BaseObject {
/**
* serialVersionUID
*/
private static final long serialVersionUID = -1199013294032165932L;
/**
* ๊ฒฝ๋ ฅ ์ ๋ณด ID
*/
public String careerId;
/**
* ๊ฒฝ๋ ฅ ํ์ฌ๋ช
: ์ต๋ 12์
*/
@Size(min = 0, max = 12)
public String companyName;
/**
* ๊ทผ๋ฌด๊ธฐ๊ฐ ์์์ผ : (yyyy.MM.dd)
*/
@NotNull
@DateTimeFormat(pattern="yyyy.MM.dd")
public Date workStartDate;
/**
* ๊ทผ๋ฌด๊ธฐ๊ฐ ์ข
๋ฃ์ผ : (yyyy.mm.dd)
*/
@DateTimeFormat(pattern="yyyy.MM.dd")
public Date workEndDate;
/**
* ์ญํ : ์ต๋ 18์
*/
@Size(min = 0, max = 18)
public String roleName;
/**
* ๋ด๋น์
๋ฌด : ์ต๋ 200์
*/
@Size(min = 0, max = 200)
public String workChange;
/**
* ๋ฑ๋ก์ ID
*/
public String registerId;
/**
* ๋ฑ๋ก์ ๋ช
*/
public String registerName;
/**
* ๋ฑ๋ก์ผ์
*/
public Date registDate;
/**
* ์์ ์ผ์
*/
public Date updateDate;
/**
* ์์
๋ค์ด๋ก๋์ฉ Start Date
*/
public String strWorkStartDate;
/**
* ์์
๋ค์ด๋ก๋์ฉ End Date
*/
public String strWorkEndDate;
/**
* @return the careerId
*/
public String getCareerId() {
return careerId;
}
/**
* @param careerId the careerId to set
*/
public void setCareerId(String careerId) {
this.careerId = careerId;
}
/**
* @return the companyName
*/
public String getCompanyName() {
return companyName;
}
/**
* @param companyName the companyName to set
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* @return the workStartDate
*/
public Date getWorkStartDate() {
return workStartDate;
}
/**
* @param workStartDate the workStartDate to set
*/
public void setWorkStartDate(Date workStartDate) {
this.workStartDate = workStartDate;
}
/**
* @return the workEndDate
*/
public Date getWorkEndDate() {
return workEndDate;
}
/**
* @param workEndDate the workEndDate to set
*/
public void setWorkEndDate(Date workEndDate) {
this.workEndDate = workEndDate;
}
/**
* @return the roleName
*/
public String getRoleName() {
return roleName;
}
/**
* @param roleName the roleName to set
*/
public void setRoleName(String roleName) {
this.roleName = roleName;
}
/**
* @return the workChange
*/
public String getWorkChange() {
return workChange;
}
/**
* @param workChange the workChange to set
*/
public void setWorkChange(String workChange) {
this.workChange = workChange;
}
/**
* @return the registerId
*/
public String getRegisterId() {
return registerId;
}
/**
* @param registerId the registerId to set
*/
public void setRegisterId(String registerId) {
this.registerId = registerId;
}
/**
* @return the registerName
*/
public String getRegisterName() {
return registerName;
}
/**
* @param registerName the registerName to set
*/
public void setRegisterName(String registerName) {
this.registerName = registerName;
}
/**
* @return the registDate
*/
public Date getRegistDate() {
return registDate;
}
/**
* @param registDate the registDate to set
*/
public void setRegistDate(Date registDate) {
this.registDate = registDate;
}
/**
* @return the updateDate
*/
public Date getUpdateDate() {
return updateDate;
}
/**
* @param updateDate the updateDate to set
*/
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
/**
* @return the strWorkStartDate
*/
public String getStrWorkStartDate() {
return strWorkStartDate;
}
/**
* @param strWorkStartDate the strWorkStartDate to set
*/
public void setStrWorkStartDate(String strWorkStartDate) {
this.strWorkStartDate = strWorkStartDate;
}
/**
* @return the strWorkEndDate
*/
public String getStrWorkEndDate() {
return strWorkEndDate;
}
/**
* @param strWorkEndDate the strWorkEndDate to set
*/
public void setStrWorkEndDate(String strWorkEndDate) {
this.strWorkEndDate = strWorkEndDate;
}
}
| [
"[email protected]"
]
| |
f3ed4ecc1bfbe196e4005bd734ab484fdaf68fde | 2341ddfe0153536af919155db970af3ee5ee634f | /src/main/java/greet/counter/MemoryCounter.java | 9106ce1ac87052d9bf2aa83d316b8b369d0ff3a6 | []
| no_license | vtrev/java-greetings | d0edacdf9a05a129bfc4b093c69854e34d5d976a | 8b8508c98b6903bc74df8a5b907e27a79d26de32 | refs/heads/master | 2022-05-04T07:24:24.457582 | 2021-12-31T15:18:53 | 2021-12-31T15:18:53 | 176,745,239 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,310 | java | package greet.counter;
import java.util.Map;
import java.util.HashMap;
public class MemoryCounter implements Counter{
private Map<String, Integer> greetMap = new HashMap<>();
public boolean countUser(String userName) {
if (greetMap.containsKey(userName)) {
return updateCount(userName);
}
if(!userName.equals(""))
greetMap.put(userName, 1);
return true;
}
public int getTotalGreetCount() {
return this.greetMap.size();
}
public int getUserGreetCount(String userName) {
try {
return greetMap.get(userName);
} catch (NullPointerException e) {
System.out.println("Error! User " + userName + " does not exist.");
}
return 0;
}
public boolean clearAllUserCounts() {
greetMap.clear();
return true;
}
public boolean clearUserCount(String userName) {
return clearUsers(userName);
}
private boolean clearUsers(String userName) {
if (greetMap.containsKey(userName)) {
greetMap.remove(userName);
return true;
}
return false;
}
private boolean updateCount(String userName) {
greetMap.put(userName, greetMap.get(userName) + 1);
return true;
}
}
| [
"[email protected]"
]
| |
9f167b51e2d796cfe44d47dcec587213762fc1eb | 64562bf92d4f56dbf113638b67440ed9541f0afc | /src/main/java/uz/pdp/appjparelationships/controller/FacultyController.java | 85022f8d87ae90e6b264393f3ca0bee612ce50b5 | []
| no_license | javohir101dev/app-jpa-relationships | a4c2020d079c90ae4a83b85f0b3c33ed92a47c8c | 1998e5379042db7d1faddd264c4e2c4265d0c165 | refs/heads/main | 2023-07-20T08:13:36.662778 | 2021-08-17T09:39:51 | 2021-08-17T09:39:51 | 395,784,664 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,957 | java | package uz.pdp.appjparelationships.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import uz.pdp.appjparelationships.entity.Faculty;
import uz.pdp.appjparelationships.entity.University;
import uz.pdp.appjparelationships.payload.FacultyDto;
import uz.pdp.appjparelationships.repository.FacultyRepository;
import uz.pdp.appjparelationships.repository.UniversityRepository;
import java.util.List;
import java.util.Optional;
@RestController
@RequestMapping(value = "/faculty")
public class FacultyController {
@Autowired
FacultyRepository facultyRepository;
@Autowired
UniversityRepository universityRepository;
// CREATE
@PostMapping
public String addFaculty(@RequestBody FacultyDto facultyDto) {
boolean exists = facultyRepository.existsByNameAndUniversityId(facultyDto.getName(), facultyDto.getUniversityId());
if (exists)
return "This university such faculty exist";
Faculty faculty = new Faculty();
faculty.setName(facultyDto.getName());
Optional<University> optionalUniversity = universityRepository.findById(facultyDto.getUniversityId());
if (!optionalUniversity.isPresent())
return "University not found";
faculty.setUniversity(optionalUniversity.get());
facultyRepository.save(faculty);
return "Faculty saved";
}
// READ
//VAZIRLIK UCHUN
@GetMapping
public List<Faculty> getFaculties() {
return facultyRepository.findAll();
}
//UNIVERSITET XODIMI UCHUN
@GetMapping("/byUniversityId/{universityId}")
public List<Faculty> getFacultiesByUniversityId(@PathVariable Integer universityId) {
List<Faculty> allByUniversityId = facultyRepository.findAllByUniversityId(universityId);
return allByUniversityId;
}
// UPDATE
@PutMapping("/{id}")
public String editFaculty(@PathVariable Integer id, @RequestBody FacultyDto facultyDto) {
Optional<Faculty> optionalFaculty = facultyRepository.findById(id);
if (optionalFaculty.isPresent()) {
Faculty faculty = optionalFaculty.get();
faculty.setName(facultyDto.getName());
Optional<University> optionalUniversity = universityRepository.findById(facultyDto.getUniversityId());
if (!optionalUniversity.isPresent()) {
return "University not found";
}
faculty.setUniversity(optionalUniversity.get());
facultyRepository.save(faculty);
return "Faculty edited";
}
return "Faculty not found";
}
// DELETE
@DeleteMapping("/{id}")
public String deleteFaculty(@PathVariable Integer id) {
try {
facultyRepository.deleteById(id);
return "Faculty deleted";
} catch (Exception e) {
return "Error in deleting";
}
}
}
| [
"[email protected]"
]
| |
784b296701f9a3aaa59be92fee1f9a736c012e39 | e799117f634d402e207a6a5e2a8769c5511e2d70 | /PriceConvertorApp/app/src/main/java/com/example/priceconvertorapp/view/activity/MainActivity.java | 89fd4b5bd711d5e683b9e2cf298d9405ae3fca4b | []
| no_license | Lemblematik/priceConvertor_Test_epay | 30816d8ac37349f336d7feb79d86a232b491608a | 8e46568c8d7dc150772e3cd92658f793cfcf72a6 | refs/heads/master | 2023-01-24T10:22:18.015967 | 2020-11-25T10:48:54 | 2020-11-25T10:48:54 | 315,908,746 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,056 | java | package com.example.priceconvertorapp.view.activity;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.lifecycle.Observer;
import androidx.viewpager.widget.ViewPager;
import android.os.Bundle;
import com.example.priceconvertorapp.R;
import com.example.priceconvertorapp.data.model.CurrencyResponse;
import com.example.priceconvertorapp.view.adapter.CurrencyAdapter;
import com.example.priceconvertorapp.view.fragment.ChartPrice;
import com.example.priceconvertorapp.view.fragment.PriceCalculate;
import com.example.priceconvertorapp.viewmodel.MainViewModel;
import com.google.android.material.tabs.TabLayout;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
showTabs();
}
private void showTabs() {
MainActivity.MyTabPagerAdapter tabPager = new MainActivity.MyTabPagerAdapter(getSupportFragmentManager());
ViewPager viewPager = findViewById(R.id.viewPager);
viewPager.setAdapter(tabPager);
TabLayout tabLayout = findViewById(R.id.tabLayout);
tabLayout.setupWithViewPager(viewPager);
tabLayout.getTabAt(0).setText("RATES");
tabLayout.getTabAt(1).setText("CHARTS");
}
static class MyTabPagerAdapter extends FragmentPagerAdapter {
MyTabPagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public int getCount() {
return 2;
}
@Override
public Fragment getItem(int position) {
switch(position) {
case 0:
return new PriceCalculate();
case 1:
return new ChartPrice();
default:
throw new IllegalArgumentException();
}
}
}
} | [
"[email protected]"
]
| |
939e28c8b370558368d0e1a76897e67a14233ede | d71fd5920d90b7dbb7fa0a4786d7ad38c5753454 | /src/main/java/person/zhy/dao/UserDao.java | 5013de95916ca1b862816b63952218a1abf52022 | []
| no_license | zhouhaoyan/taskList | 62eed11562ee9021662246a220812f68ca3ded7e | 954ab1990247b2a8ae76620e81e43fc4fe1a00e5 | refs/heads/master | 2021-03-22T03:38:18.918632 | 2017-11-16T06:25:56 | 2017-11-16T06:25:56 | 110,931,898 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 231 | java | package person.zhy.dao;
import person.zhy.model.User;
import person.zhy.utils.base.BaseDao;
import java.util.Map;
public interface UserDao extends BaseDao<User,Long> {
User findUserByAccAndPwd(Map<String,Object> param);
} | [
"[email protected]"
]
| |
dbcb9569063794c2e507238951bb41576fdd1385 | f4e05b21874a3bfcead2bf2fd0a063fb62b348da | /TestCircularQueue.java | f0d4d9f495a7b83744e7a18241c9987347b57b3d | []
| no_license | iamnickson/Java-Practical-1G | 36b2f998754b43d923846401895acba2e5025d21 | 91a3c51604ad9b932a3e1e44833eb830e7e462e7 | refs/heads/master | 2020-07-04T06:39:09.067612 | 2019-10-12T05:55:07 | 2019-10-12T05:55:07 | 202,190,335 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 568 | java | import java.util.Scanner;
public class TestCircularQueue
{
public static void main(String args [])
{
Scanner input=new Scanner(System.in);
System.out.println("Enter the length of the Empty Queue");
int na=input.nextInt();
CircularQueue qq=new CircularQueue(na);
qq.enQueue(10);
qq.enQueue(20);
qq.deQueue();
qq.enQueue(30);
qq.enQueue(40);
qq.deQueue();
qq.enQueue(50);
qq.enQueue(60);
for(int i=0; i<na; i++)
{
int element=qq.deQueue();
System.out.println(element);
}
System.out.println(qq.size());
}
} | [
"[email protected]"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.