blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
cf77ef7c518ebb04240452a357f32d1f6f7d0ec0
9a125233026291635d2e37b78c6828501a3cdb89
/src/main/java/org/jmeld/vc/bzr/ActiveCmd.java
e67f23e4df5490fb7f683db8aacfe99e33226790
[]
no_license
timwiffen/jmeld
cf40810468276fa2542a48d4270ed8c2b6736a78
8e0a75a1b27b7f638cb87972dedcfd360f502c96
refs/heads/master
2021-01-19T10:31:44.252198
2013-07-05T17:31:11
2013-07-05T17:31:11
11,124,569
1
0
null
null
null
null
UTF-8
Java
false
false
529
java
package org.jmeld.vc.bzr; import org.jmeld.util.*; import org.jmeld.vc.*; import org.jmeld.vc.util.*; import java.io.*; public class ActiveCmd extends VcCmd<Boolean> { private File file; public ActiveCmd(File file) { this.file = file; } public Result execute() { // If a root can be found than we have a mercurial working directory! super.execute("bzr", "info", file.getAbsolutePath()); return getResult(); } protected void build(byte[] data) { setResultData(Boolean.TRUE); } }
[ "timothy.wiffen@formicary.net" ]
timothy.wiffen@formicary.net
244a99b21afaf11dad6ab93ceab3a3c28be7a1b3
104fa879187aa618256c845ff57a9a40dcc3b88e
/src/main/java/org/robolectric/shadows/ShadowDataSetObservable.java
147374670ac2c18c4d52a09628f6b00a7401944e
[ "MIT", "LicenseRef-scancode-unicode", "Apache-2.0" ]
permissive
pauldambra/robolectric
f253b88b2e568abc9efbfc1ae3cee547c7180cc9
c720a13a513b0f5cd1d6ec4362a40df4173b108c
refs/heads/master
2022-01-25T16:59:40.595838
2013-04-18T13:13:58
2013-04-18T13:13:58
8,537,958
0
0
MIT
2022-01-21T23:50:47
2013-03-03T15:22:35
Java
UTF-8
Java
false
false
237
java
package org.robolectric.shadows; import android.database.DataSetObservable; import org.robolectric.internal.Implements; @Implements(value = DataSetObservable.class, callThroughByDefault = true) public class ShadowDataSetObservable { }
[ "xian@squareup.com" ]
xian@squareup.com
11a56de0892e282e73a5487189e4ef427d7dfa0d
0ae54dbe3aaa1893149d2d72f61bf4e0c8e1f59a
/app/src/main/java/net/sunyounglee/bakingapp/viewModels/RecipeCardViewModel.java
fa5839362c80eb5cd0beb4b10532f7b7429ee5d7
[]
no_license
memo2sun/baking_app
62a63cb084ddd1a6cfb6e586f75bdf30fea49252
f65761ae9c189a4338e081c0a6a4745457d5158b
refs/heads/main
2023-01-04T09:31:54.740218
2020-10-28T02:14:01
2020-10-28T02:14:01
307,883,099
0
0
null
null
null
null
UTF-8
Java
false
false
973
java
package net.sunyounglee.bakingapp.viewModels; import android.app.Application; import androidx.annotation.NonNull; import androidx.lifecycle.AndroidViewModel; import androidx.lifecycle.LiveData; import net.sunyounglee.bakingapp.models.Recipe; import net.sunyounglee.bakingapp.repositories.RecipeCardRepository; import java.util.List; public class RecipeCardViewModel extends AndroidViewModel { private String TAG = RecipeCardViewModel.class.getSimpleName(); private RecipeCardRepository recipeCardRepository; public RecipeCardViewModel(@NonNull Application application, RecipeCardRepository recipeCardRepository) { super(application); recipeCardRepository = RecipeCardRepository.getInstance(application); recipeCardRepository.fetchRecipe(application); this.recipeCardRepository = recipeCardRepository; } public LiveData<List<Recipe>> getRecipeList() { return recipeCardRepository.getRecipeList(); } }
[ "memo2sun@hotmail.com" ]
memo2sun@hotmail.com
d11ee4e98ea113ec1eeb69d343e995016a8d0608
a140dc78ce795f8ab7cb5ffe04dcf5d00b299c82
/app/src/main/java/tabfragments/RSVP.java
bb8b099da9382298eb702566d338d5a8654f772f
[]
no_license
Puna522025/WE_nw_rep_0904
48fc3c2b813f4b731f9eab6cf4cebf9bcf5bd78a
a70b94eb5e01e941c56c9e6eec1eaba34063610f
refs/heads/master
2020-03-09T11:18:37.766541
2018-04-09T11:21:31
2018-04-09T11:21:31
128,758,853
0
0
null
null
null
null
UTF-8
Java
false
false
13,449
java
package tabfragments; import android.Manifest; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.graphics.Typeface; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.ActivityCompat; import android.support.v4.app.Fragment; import android.support.v4.content.ContextCompat; import android.support.v7.widget.CardView; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import com.google.android.gms.analytics.HitBuilders; import com.google.android.gms.analytics.Tracker; import com.squareup.picasso.Picasso; import java.util.ArrayList; import analytics.AnalyticsApplication; import galleryList.Adapter; import Common.Config; import pkapoor.wed.R; /** * Created by pkapo8 on 11/23/2016. */ public class RSVP extends Fragment implements View.OnClickListener { private static final int MY_PERMISSIONS_REQUEST = 11; ArrayList<Integer> bridImages, gxxxmImages, rxxxaImages; Adapter adapter; RecyclerView listBxxxx, listRxxx, listGrxx; TextView tvEventrok, tvEventBri, tvEventGGGG, tvEventRSV, tvRsvpText, tvrsvpFaml1, tvRsvpFamlContact1, tvRsvpFaml2, tvRsvpFamlContact2; CardView card4; SharedPreferences sharedPreferences; RelativeLayout rlContactOne, rlContactTwo, rlRSV, rlGallery; private static final String TAG = "RSVP"; private Tracker mTracker; private ImageView igBackground; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.gallery, container, false); /* Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.back_seven); Bitmap bb = BlurBuilder.blur(getContext(), bitmap); Drawable d = new BitmapDrawable(getResources(), bb); view.setBackground(d);*/ /*bridImages = new ArrayList<>(); bridImages.add(0, R.drawable.aa); bridImages.add(1, R.drawable.ss); bridImages.add(2, R.drawable.aa); bridImages.add(3, R.drawable.ss); bridImages.add(4, R.drawable.aa); bridImages.add(5, R.drawable.ss); bridImages.add(6, R.drawable.aa); bridImages.add(7, R.drawable.ss); bridImages.add(8, R.drawable.aa); bridImages.add(9, R.drawable.ss); bridImages.add(10, R.drawable.ss); bridImages.add(11, R.drawable.aa); bridImages.add(12, R.drawable.ss); rxxxaImages = new ArrayList<>(); rxxxaImages.add(0, R.drawable.aa); rxxxaImages.add(1, R.drawable.ss); rxxxaImages.add(2, R.drawable.aa); gxxxmImages = new ArrayList<>(); gxxxmImages.add(0, R.drawable.aa); gxxxmImages.add(1, R.drawable.ss); listBxxxx = (RecyclerView) view.findViewById(R.id.listBrid); listRxxx = (RecyclerView) view.findViewById(R.id.listRxxx); listGrxx = (RecyclerView) view.findViewById(R.id.listGrxx); setListLayout(listBxxxx); setListLayout(listRxxx); setListLayout(listGrxx); adapter = new Adapter(bridImages, getContext(), "brxxx"); listBxxxx.setAdapter(adapter); adapter = new Adapter(rxxxaImages, getContext(), "Rxxxx"); listRxxx.setAdapter(adapter); adapter = new Adapter(gxxxmImages, getContext(), "Grxxx"); listGrxx.setAdapter(adapter); ((Adapter) adapter).setOnItemClickListener(new Adapter.MyClickListener() { @Override public void onItemClick(int position, View v, String type) { Intent intent = new Intent(getContext(), ViewFullScreenImage.class); intent.putExtra("position", position); intent.putExtra("type", type); startActivity(intent); } });*/ tvEventrok = (TextView) view.findViewById(R.id.Event); tvEventBri = (TextView) view.findViewById(R.id.EventBri); tvEventGGGG = (TextView) view.findViewById(R.id.EventGGGG); tvEventRSV = (TextView) view.findViewById(R.id.EventRSV); tvRsvpText = (TextView) view.findViewById(R.id.rsvrText); tvrsvpFaml1 = (TextView) view.findViewById(R.id.rsvrFaml1); tvRsvpFaml2 = (TextView) view.findViewById(R.id.rsvrFaml2); tvRsvpFamlContact1 = (TextView) view.findViewById(R.id.rsvrFamlContact1); tvRsvpFamlContact2 = (TextView) view.findViewById(R.id.rsvrFamlContact2); rlContactOne = (RelativeLayout) view.findViewById(R.id.rlContactOne); rlContactTwo = (RelativeLayout) view.findViewById(R.id.rlContactTwo); rlRSV = (RelativeLayout) view.findViewById(R.id.rlRSV); rlGallery = (RelativeLayout) view.findViewById(R.id.rlGallery); igBackground = (ImageView) view.findViewById(R.id.igBackground); card4 = (CardView) view.findViewById(R.id.card4); Typeface type = Typeface.createFromAsset(getActivity().getAssets(), "fonts/DeliusSwashCaps-Regular.ttf"); tvEventrok.setTypeface(type); tvEventBri.setTypeface(type); tvEventGGGG.setTypeface(type); tvEventRSV.setTypeface(type); tvRsvpText.setTypeface(type); tvrsvpFaml1.setTypeface(type); tvRsvpFaml2.setTypeface(type); tvRsvpFamlContact1.setTypeface(type); tvRsvpFamlContact2.setTypeface(type); sharedPreferences = getActivity().getSharedPreferences(Config.MyPREFERENCES, Context.MODE_PRIVATE); rlContactOne.setOnClickListener(this); rlContactTwo.setOnClickListener(this); AnalyticsApplication application = (AnalyticsApplication) getActivity().getApplication(); mTracker = application.getDefaultTracker(); changeTextColor(); setRSVPdetails(); return view; } private void changeTextColor() { String colorSelected = sharedPreferences.getString(Config.colorSelected,"colorRed"); if(colorSelected.equalsIgnoreCase("colorRed")){ changeColor(R.color.colorRed); }else if(colorSelected.equalsIgnoreCase("PinkKittyToolBar")){ changeColor(R.color.PinkKittyToolBar); }else if(colorSelected.equalsIgnoreCase("GreenToolBar")){ changeColor(R.color.GreenToolBar); }else if(colorSelected.equalsIgnoreCase("BlackToolBar")){ changeColor(R.color.BlackToolBar); }else if(colorSelected.equalsIgnoreCase("BlueToolBar")){ changeColor(R.color.BlueToolBar); } /* if(sharedPreferences.getString(Config.back_image,"0").equalsIgnoreCase("1")){ rlGallery.setBackground(ContextCompat.getDrawable(getContext(),R.drawable.back_seven)); }*/ String backImage = sharedPreferences.getString(Config.back_image, "0"); Config.setBackGroundInvite(backImage, getActivity(),igBackground); } private void changeColor(int colorSelected) { tvrsvpFaml1.setTextColor(ContextCompat.getColor(getContext(), colorSelected)); tvRsvpFaml2.setTextColor(ContextCompat.getColor(getContext(), colorSelected)); tvRsvpFamlContact1.setTextColor(ContextCompat.getColor(getContext(), colorSelected)); tvRsvpFamlContact2.setTextColor(ContextCompat.getColor(getContext(), colorSelected)); rlRSV.setBackgroundColor(ContextCompat.getColor(getContext(), colorSelected)); } private void setRSVPdetails() { if (sharedPreferences.getString(Config.rsvp_tobe, "true").equalsIgnoreCase("true")) { card4.setVisibility(View.VISIBLE); tvRsvpText.setText(sharedPreferences.getString(Config.rsvp_text, "name1")); tvrsvpFaml1.setText(sharedPreferences.getString(Config.rsvp_name1, "name1")); tvRsvpFaml2.setText(sharedPreferences.getString(Config.rsvp_name2, "name2")); String phoneOne = sharedPreferences.getString(Config.rsvp_phone_one, ""); String phoneTwo = sharedPreferences.getString(Config.rsvp_phone_two, ""); if (!TextUtils.isEmpty(phoneOne)) { tvRsvpFamlContact1.setText(phoneOne); rlContactOne.setVisibility(View.VISIBLE); } else { rlContactOne.setVisibility(View.GONE); } if (!TextUtils.isEmpty(phoneTwo)) { tvRsvpFamlContact2.setText(phoneTwo); rlContactTwo.setVisibility(View.VISIBLE); } else { rlContactTwo.setVisibility(View.GONE); } } else { card4.setVisibility(View.GONE); } } private void setListLayout(RecyclerView list) { LinearLayoutManager layoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false); list.setLayoutManager(layoutManager); list.setHasFixedSize(true); list.setItemAnimator(new DefaultItemAnimator()); } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); } @Override public void onClick(View view) { switch (view.getId()) { case R.id.rlContactOne: String phoneOne = sharedPreferences.getString(Config.rsvp_phone_one, ""); if (!TextUtils.isEmpty(phoneOne)) { makeCall(phoneOne); } break; case R.id.rlContactTwo: String phoneTwo = sharedPreferences.getString(Config.rsvp_phone_two, ""); if (!TextUtils.isEmpty(phoneTwo)) { makeCall(phoneTwo); } break; } } private void makeCall(String phoneNumber) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (ContextCompat.checkSelfPermission(getContext(), Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.CALL_PHONE}, MY_PERMISSIONS_REQUEST); } else { PackageManager packageManager = getActivity().getPackageManager(); Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse("tel:" + phoneNumber)); if (intent.resolveActivity(packageManager) != null) { startActivity(intent); } else { Toast.makeText(getContext(), "No call support", Toast.LENGTH_SHORT).show(); } } } } @Override public void onResume() { super.onResume(); mTracker.setScreenName(TAG); mTracker.send(new HitBuilders.ScreenViewBuilder().build()); } @Override public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) { switch (requestCode) { case MY_PERMISSIONS_REQUEST: { // If request is cancelled, the result arrays are empty. if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { // permission was granted!! } else { if (ContextCompat.checkSelfPermission(getContext(), Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) { // Should we show an explanation? if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), Manifest.permission.CALL_PHONE)) { // Show an expanation to the user *asynchronously* -- don't block // this thread waiting for the user's response! After the user // sees the explanation, try again to request the permission. } else { // No explanation needed, we can request the permission. ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.CALL_PHONE}, MY_PERMISSIONS_REQUEST); // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an // app-defined int constant. The callback method gets the // result of the request. } // permission denied, boo! Disable the // functionality that depends on this permission. } } return; } } } }
[ "pkapoor8@sapient.com" ]
pkapoor8@sapient.com
41fd1697ce996b59a0f995e8b2c2ab6d4fbab6fc
8862b6f9ca7605b4c8ed98ee232ee6c5a8894063
/app/src/main/java/org/apache/httpcopy/HttpClientConnection.java
f3b05314127d7e771a0bacf29a7d24efa4139209
[]
no_license
mburrows02/NetworkMonitor
58f7a880588e3dca807ed8962636cbd76372c355
bcb6b5e4ae0a86862df245a47520748c11f988ec
refs/heads/master
2016-09-16T13:39:20.046164
2015-04-17T22:30:24
2015-04-17T22:30:24
29,786,242
0
0
null
null
null
null
UTF-8
Java
false
false
4,132
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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.httpcopy; import java.io.IOException; /** * A client-side HTTP connection, which can be used for sending * requests and receiving responses. * * @since 4.0 */ public interface HttpClientConnection extends HttpConnection { /** * Checks if response data is available from the connection. May wait for * the specified time until some data becomes available. Note that some * implementations may completely ignore the timeout parameter. * * @param timeout the maximum time in milliseconds to wait for data * @return true if data is available; false if there was no data available * even after waiting for {@code timeout} milliseconds. * @throws IOException if an error happens on the connection */ boolean isResponseAvailable(int timeout) throws IOException; /** * Sends the request line and all headers over the connection. * @param request the request whose headers to send. * @throws org.apache.httpcopy.HttpException in case of HTTP protocol violation * @throws IOException in case of an I/O error */ void sendRequestHeader(org.apache.httpcopy.HttpRequest request) throws org.apache.httpcopy.HttpException, IOException; /** * Sends the request entity over the connection. * @param request the request whose entity to send. * @throws org.apache.httpcopy.HttpException in case of HTTP protocol violation * @throws IOException in case of an I/O error */ void sendRequestEntity(org.apache.httpcopy.HttpEntityEnclosingRequest request) throws org.apache.httpcopy.HttpException, IOException; /** * Receives the request line and headers of the next response available from * this connection. The caller should examine the HttpResponse object to * find out if it should try to receive a response entity as well. * * @return a new HttpResponse object with status line and headers * initialized. * @throws org.apache.httpcopy.HttpException in case of HTTP protocol violation * @throws IOException in case of an I/O error */ org.apache.httpcopy.HttpResponse receiveResponseHeader() throws org.apache.httpcopy.HttpException, IOException; /** * Receives the next response entity available from this connection and * attaches it to an existing HttpResponse object. * * @param response the response to attach the entity to * @throws org.apache.httpcopy.HttpException in case of HTTP protocol violation * @throws IOException in case of an I/O error */ void receiveResponseEntity(org.apache.httpcopy.HttpResponse response) throws org.apache.httpcopy.HttpException, IOException; /** * Writes out all pending buffered data over the open connection. * * @throws IOException in case of an I/O error */ void flush() throws IOException; }
[ "mburrows02@gmail.com" ]
mburrows02@gmail.com
a30134df08445349deb2aa253807bc72299e90f6
5f2c728706a8222d9ce1dee7c4dfd3ec838fcba5
/SeleniumTraining/src/package1/Demo21.java
769ac6e6fcbbfb060d22c31e04784c4f8d5462aa
[]
no_license
satishpothu/Selenium-
20c149c9d5d888a931ecc93ba4a9c634cb236b31
a7ea368fd055cb856b8f8a3241e638a52e7a5ee0
refs/heads/master
2022-01-24T04:56:49.498420
2019-07-31T05:58:17
2019-07-31T05:58:17
198,150,568
0
0
null
null
null
null
UTF-8
Java
false
false
1,033
java
package package1; import java.io.IOException; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class Demo21 { public static void main(String[] args) { // TODO Auto-generated method stub System.setProperty("webdriver.chrome.driver","C:\\Users\\SatishPothu\\Downloads\\chromedriver_win32\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.manage().window().maximize(); driver.get("file:///C:/Users/SatishPothu/Desktop/selenium.html"); String d = driver.findElement(By.xpath("//table/tbody/tr[2]/td[3]")).getText(); String d1 = driver.findElement(By.xpath("//table/tbody/tr[2]/td[3]//preceding-sibling::td[1]")).getText(); String d2 = driver.findElement(By.xpath("//table/tbody/tr[2]/td[3]//following-sibling::td")).getText(); System.out.println(d); System.out.println(d1); System.out.println(d2); } }
[ "SatishPothu@DESKTOP-EMUI88M.in.ibm.com" ]
SatishPothu@DESKTOP-EMUI88M.in.ibm.com
b6208fdc817c521d160e7b82dbf381558af786f1
491f605ac0bac3900345419f467dbb36a226bce8
/code/src/com/sunsea/parkinghere/exception/DaoException.java
358cb4ab7cf3923b25c2a6a33a5c9fbc9c32a956
[]
no_license
dzhaoyang/Agri
eb70e927adacea0c979d2e7775921c111a40bede
b499205715c4e94e052598d210703decc9b4b3dc
refs/heads/master
2020-03-21T17:15:05.195725
2018-06-27T03:05:33
2018-06-27T03:05:33
138,822,331
2
0
null
null
null
null
UTF-8
Java
false
false
407
java
package com.sunsea.parkinghere.exception; public class DaoException extends RuntimeException { public DaoException() { super(); } public DaoException(String message) { super(message); } public DaoException(Throwable cause) { super(cause); } public DaoException(String message, Throwable ex) { super(message, ex); } }
[ "39542012+dzhaoyang@users.noreply.github.com" ]
39542012+dzhaoyang@users.noreply.github.com
9d90c2ce6b07569fe88bffbd3d4cb8b0933af948
f8d4d9f96659dcab44a081c6bc86d6be1810eba3
/app/src/main/java/sk/itsovy/multicard/Login.java
7268b254f41ddbbe89e02b725862c9bf5735fe82
[]
no_license
DamianMatysko/Multicard
0db0f32e5284e7e4082f866367c9af68b4959bef
10044f69ca5ba41e973fb0d9389b87fa5e2105b2
refs/heads/master
2023-03-10T09:49:47.423904
2021-02-25T17:58:27
2021-02-25T17:58:27
331,706,956
0
0
null
null
null
null
UTF-8
Java
false
false
5,199
java
package sk.itsovy.multicard; import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.OnFailureListener; import com.google.android.gms.tasks.OnSuccessListener; import com.google.android.gms.tasks.Task; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth; public class Login extends AppCompatActivity { Button buttonLogin; EditText editPassword, editNameOrEmail; TextView backtoRegisterView; TextView forgotPassword; ProgressBar progressBarLogIn; FirebaseAuth firebaseAuth; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); editNameOrEmail = findViewById(R.id.editNameOrEmail); editPassword = findViewById(R.id.editPassword); backtoRegisterView = findViewById(R.id.backtoRegisterView); buttonLogin = findViewById(R.id.buttonLogin); progressBarLogIn = findViewById(R.id.progressBarLogin); forgotPassword = findViewById(R.id.forgotPasswordLink); firebaseAuth = FirebaseAuth.getInstance(); buttonLogin.setOnClickListener(v -> { String email = editNameOrEmail.getText().toString().trim(); String password = editPassword.getText().toString().trim(); if (TextUtils.isEmpty(email)) { editNameOrEmail.setError("Email is required."); return; } if (TextUtils.isEmpty(password)) { editPassword.setError("Password is required."); return; } if (password.length() < 6) { editPassword.setError("Password must have min six characters"); } progressBarLogIn.setVisibility(View.VISIBLE); firebaseAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()) { Toast.makeText(Login.this, "Login in successfully", Toast.LENGTH_SHORT).show(); startActivity(new Intent(getApplicationContext(), MainActivity.class)); } else { Toast.makeText(Login.this, "Error: " + task.getException().getMessage(), Toast.LENGTH_SHORT).show(); progressBarLogIn.setVisibility(View.GONE); } } }); }); forgotPassword.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { final EditText resetMail = new EditText(v.getContext()); final AlertDialog.Builder passwordResetDialog = new AlertDialog.Builder(v.getContext()); passwordResetDialog.setTitle("Reset password?"); passwordResetDialog.setMessage("Enter your email"); passwordResetDialog.setView(resetMail); passwordResetDialog.setPositiveButton("Yes", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { String mail = resetMail.getText().toString(); firebaseAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { Toast.makeText(Login.this, "Resend link send to your email.", Toast.LENGTH_SHORT).show(); } }).addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { Toast.makeText(Login.this, "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); } }); } }); passwordResetDialog.setNegativeButton("No", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { } }); passwordResetDialog.create().show(); } }); backtoRegisterView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(getApplicationContext(), Register.class)); } }); } }
[ "mada11@azet.sk" ]
mada11@azet.sk
820b3d42c068ce67eaef07afef7cfd693ff31f7e
5291e7e6f4e766dc0954721e2bf70750957c56f4
/src/bibliotecagrupo3/Vistas/DevolverPrestamo.java
8ff1d1f689d67a605a5f86e182fc2b864c506da0
[]
no_license
GomezRodrigoG/BibliotecaGrupo3
171939634cf9765e806ea6a7465bceafea1c0665
ab0c72cda36e5ce804b12baa1a3ca0f23c35abae
refs/heads/master
2023-06-12T00:53:32.237035
2021-06-17T20:38:59
2021-06-17T20:38:59
373,321,496
0
0
null
2021-06-17T19:42:14
2021-06-02T22:46:19
Java
UTF-8
Java
false
false
14,881
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 bibliotecagrupo3.Vistas; import bibliotecagrupo3.Vistas.NewPrestamo; import bibliotecaGrupo3.Controllers.Conexion; import bibliotecagrupo3.Controllers.EjemplarData; import bibliotecagrupo3.Controllers.Helpers; import bibliotecagrupo3.Controllers.LectorData; import bibliotecagrupo3.Controllers.LibroData; import bibliotecagrupo3.Controllers.MultaData; import bibliotecagrupo3.Controllers.PrestamoData; import bibliotecagrupo3.Models.Lector; import bibliotecagrupo3.Models.Libro; import bibliotecagrupo3.Models.Multa; import bibliotecagrupo3.Models.Prestamo; import java.sql.SQLException; import java.time.LocalDate; import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JOptionPane; import javax.swing.table.DefaultTableModel; /** * * @author Rodrigo */ public class DevolverPrestamo extends javax.swing.JInternalFrame { private DefaultTableModel tableModel; private PrestamoData pData; private LectorData lData; private LibroData libroData; private MultaData mData; private EjemplarData eData; private ArrayList<Prestamo> prestamosActivos = new ArrayList<Prestamo>(); private Lector lector; public DevolverPrestamo(Conexion conexion) throws SQLException { initComponents(); pData = new PrestamoData(conexion); lData = new LectorData(conexion); libroData = new LibroData(conexion); mData = new MultaData(conexion); tableModel = new DefaultTableModel(); eData = new EjemplarData(conexion); buildTableHeader(); } /** * 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() { jLabel1 = new javax.swing.JLabel(); jTFDni = new javax.swing.JTextField(); jBBuscar = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); jScrollPane1 = new javax.swing.JScrollPane(); jTablePrestamos = new javax.swing.JTable(); jCB1 = new javax.swing.JCheckBox(); jCB2 = new javax.swing.JCheckBox(); jCB3 = new javax.swing.JCheckBox(); jBSalir = new javax.swing.JButton(); jBLimpiar = new javax.swing.JButton(); jBDevolver = new javax.swing.JButton(); setTitle("Devolver prestamo"); jLabel1.setText("DNI del lector"); jBBuscar.setText("BUSCAR"); jBBuscar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBBuscarActionPerformed(evt); } }); jTablePrestamos.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null}, {null, null}, {null, null} }, new String [] { "Title 1", "Title 2" } )); jTablePrestamos.setRowHeight(30); jScrollPane1.setViewportView(jTablePrestamos); jCB1.setText("Devolver"); jCB2.setText("Devolver"); jCB2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCB2ActionPerformed(evt); } }); jCB3.setText("Devolver"); jCB3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCB3ActionPerformed(evt); } }); jBSalir.setText("SALIR"); jBSalir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBSalirActionPerformed(evt); } }); jBLimpiar.setText("LIMPIAR"); jBLimpiar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBLimpiarActionPerformed(evt); } }); jBDevolver.setText("DEVOLVER"); jBDevolver.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBDevolverActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addGap(36, 36, 36) .addComponent(jTFDni, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jBBuscar) .addGap(42, 42, 42)) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 377, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jCB1) .addComponent(jCB2) .addComponent(jCB3)) .addContainerGap(25, Short.MAX_VALUE)))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jBDevolver) .addGap(18, 18, 18) .addComponent(jBLimpiar) .addGap(18, 18, 18) .addComponent(jBSalir) .addGap(45, 45, 45)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(16, 16, 16) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jTFDni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jBBuscar)) .addGap(18, 18, 18) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(32, 32, 32) .addComponent(jCB1) .addGap(18, 18, 18) .addComponent(jCB2) .addGap(18, 18, 18) .addComponent(jCB3)) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jBSalir) .addComponent(jBLimpiar) .addComponent(jBDevolver)) .addContainerGap(19, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void jCB2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCB2ActionPerformed }//GEN-LAST:event_jCB2ActionPerformed private void jBSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBSalirActionPerformed dispose(); }//GEN-LAST:event_jBSalirActionPerformed private void jCB3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCB3ActionPerformed }//GEN-LAST:event_jCB3ActionPerformed private void jBBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBBuscarActionPerformed String dniRequerido = "Dni requerido para poder buscar"; String dniSinLetras = "Un DNI solo debe contener numeros."; int dniLector = Helpers.parseStringToInt(jTFDni.getText(), dniRequerido , dniSinLetras); lector = lData.buscarLector(dniLector); if(lector == null) return; ArrayList<Prestamo> prestamos = pData.getByLector(lector); prestamosActivos = new ArrayList<>(); for(Prestamo prestamo: prestamos){ if(prestamo.getFecha_devolucion() == null && prestamo.isEstado()){ prestamosActivos.add(prestamo); } } clearTable(); for(Prestamo prestamo:prestamosActivos){ Libro libro = prestamo.getEjemplar().getLibro(); tableModel.addRow(new Object[]{libro.getNombre(), prestamo.getFecha()}); } }//GEN-LAST:event_jBBuscarActionPerformed private void jBDevolverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBDevolverActionPerformed ArrayList<Boolean> cbSelected = new ArrayList<>(); cbSelected.add(jCB1.isSelected()); cbSelected.add(jCB2.isSelected()); cbSelected.add(jCB3.isSelected()); int count = 0; int countMultas = 0; int idMulta = 0; boolean darDeBajaLector = false; // reviso cuantas multas le corresponden for(Prestamo prestamo: prestamosActivos){ if(!cbSelected.get(count)){ count ++; continue; } LocalDate fechaPlus30 = prestamo.getFecha().plusDays(30); LocalDate fechaPlus90 = prestamo.getFecha().plusDays(90); //genero multa if(fechaPlus30.isBefore(LocalDate.now())){ countMultas++; if(fechaPlus90.isBefore(LocalDate.now())){ darDeBajaLector = true; JOptionPane.showMessageDialog(null, "El prestamo vencio hace mas de 90 dias. Por lo que el lector sera dado de baja."); continue; } JOptionPane.showMessageDialog(null, "El prestamo esta vencido. Debera esperar los dias de la multa que le correspondan para volver a pedir un prestamo."); continue; } count ++; } //creo la multa y doy de baja si es necesario if(countMultas > 0){ idMulta = mData.guardarMulta(countMultas); if(darDeBajaLector){ try { lData.desactivarLector(this.lector.getDni()); } catch (ClassNotFoundException ex) { Logger.getLogger(NewPrestamo.class.getName()).log(Level.SEVERE, null, ex); } catch (SQLException ex) { Logger.getLogger(NewPrestamo.class.getName()).log(Level.SEVERE, null, ex); } } } count = 0; for(Prestamo prestamo: prestamosActivos){ if(!cbSelected.get(count)){ count ++; continue; } prestamo.setFecha_devolucion(LocalDate.now()); prestamo.getEjemplar().setEstado("disponible"); eData.actualizarEjemplar(prestamo.getEjemplar()); if(idMulta != 0){ Multa multa = new Multa(); multa.setId_multa(idMulta); prestamo.setMulta(multa); pData.devolverConMulta(prestamo); count ++; continue; } pData.devolverSinMulta(prestamo); count ++; continue; } limpiar(); }//GEN-LAST:event_jBDevolverActionPerformed private void jBLimpiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBLimpiarActionPerformed limpiar(); }//GEN-LAST:event_jBLimpiarActionPerformed private void limpiar(){ clearTable(); jTFDni.setText(""); jCB1.setSelected(false); jCB2.setSelected(false); jCB3.setSelected(false); } private void clearTable(){ int rowCount = tableModel.getRowCount()-1; for(int i = rowCount; i >= 0; i--){ tableModel.removeRow(i); } } private void buildTableHeader(){ ArrayList <Object> columnas = new ArrayList<>(); columnas.add("Libro"); columnas.add("Fecha de prestamo"); for(Object it:columnas){ tableModel.addColumn(it); } jTablePrestamos.setModel(tableModel); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jBBuscar; private javax.swing.JButton jBDevolver; private javax.swing.JButton jBLimpiar; private javax.swing.JButton jBSalir; private javax.swing.JCheckBox jCB1; private javax.swing.JCheckBox jCB2; private javax.swing.JCheckBox jCB3; private javax.swing.JLabel jLabel1; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JSeparator jSeparator1; private javax.swing.JTextField jTFDni; private javax.swing.JTable jTablePrestamos; // End of variables declaration//GEN-END:variables }
[ "gomezrodrigo93@gmail.com" ]
gomezrodrigo93@gmail.com
cbd31e89e2e0989378a4e6c621be6703c9561826
754d00c01df469af8939afa08df9ff6bfed7a15c
/app/src/main/java/com/github/wingadium/search/ui/adapter/QuestionAdapter.java
dc5f8e04193597f79933d1347ea32712613717fb
[]
no_license
wingadium1/Search
d94d15168a0fdf4dae7f67dc71e4e8f646237843
8daacc648c1c12e9707b1a1d4ae4c7b019865d45
refs/heads/master
2021-01-10T02:20:02.759717
2016-02-21T00:24:59
2016-02-21T00:34:59
52,145,393
0
0
null
null
null
null
UTF-8
Java
false
false
3,182
java
package com.github.wingadium.search.ui.adapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.github.wingadium.search.R; import com.github.wingadium.search.ui.adapter.models.QuestionModel; import com.github.wingadium.search.ui.adapter.viewholder.QuestionViewHolder; import java.util.ArrayList; import java.util.List; /** * Created with Android Studio * User: Xaver * Date: 24/05/15 */ public class QuestionAdapter extends RecyclerView.Adapter<QuestionViewHolder> { private final LayoutInflater mInflater; private final List<QuestionModel> mModels; public QuestionAdapter(Context context, List<QuestionModel> models) { mInflater = LayoutInflater.from(context); mModels = new ArrayList<QuestionModel>(models); } @Override public QuestionViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { final View itemView = mInflater.inflate(R.layout.question_item, parent, false); return new QuestionViewHolder(itemView); } @Override public void onBindViewHolder(QuestionViewHolder holder, int position) { final QuestionModel model = mModels.get(position); holder.bind(model); } @Override public int getItemCount() { return mModels.size(); } public void animateTo(List<QuestionModel> models) { applyAndAnimateRemovals(models); applyAndAnimateAdditions(models); applyAndAnimateMovedItems(models); } private void applyAndAnimateRemovals(List<QuestionModel> newModels) { for (int i = mModels.size() - 1; i >= 0; i--) { final QuestionModel model = mModels.get(i); if (!newModels.contains(model)) { removeItem(i); } } } private void applyAndAnimateAdditions(List<QuestionModel> newModels) { for (int i = 0, count = newModels.size(); i < count; i++) { final QuestionModel model = newModels.get(i); if (!mModels.contains(model)) { addItem(i, model); } } } private void applyAndAnimateMovedItems(List<QuestionModel> newModels) { for (int toPosition = newModels.size() - 1; toPosition >= 0; toPosition--) { final QuestionModel model = newModels.get(toPosition); final int fromPosition = mModels.indexOf(model); if (fromPosition >= 0 && fromPosition != toPosition) { moveItem(fromPosition, toPosition); } } } public QuestionModel removeItem(int position) { final QuestionModel model = mModels.remove(position); notifyItemRemoved(position); return model; } public void addItem(int position, QuestionModel model) { mModels.add(position, model); notifyItemInserted(position); } public void moveItem(int fromPosition, int toPosition) { final QuestionModel model = mModels.remove(fromPosition); mModels.add(toPosition, model); notifyItemMoved(fromPosition, toPosition); } }
[ "wingadium1@gmail.com" ]
wingadium1@gmail.com
3492d3565c60be3c1c6b6ad6bef9f6cf7bcf1f11
e603b2c5d4f65928cf92aad3cacc87137d68dca6
/app/src/main/java/com/example/valentincloup/contentprovider_demo/MainActivity.java
4427ce7eb04d6864cc1ccf23e62e49c1064be062
[]
no_license
valcloup/ContentProvider_DEMO
253e70f22391510978e71b84412306f7c8fabe7c
83af1b70777016adb977ae81307a37357bdb373a
refs/heads/master
2021-09-04T06:17:52.812771
2018-01-16T16:49:23
2018-01-16T16:49:23
111,077,390
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
package com.example.valentincloup.contentprovider_demo; import android.net.Uri; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import Database.Database; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Database maDb = new Database(this); } }
[ "valcloup@hotmail.Fr" ]
valcloup@hotmail.Fr
f1f46bf68bbb6e7d9e9d47e49bf39b67af332eda
88fc721e7bb899a3913544bad584d5722c33b0fa
/src/com/playcez/SettingsActivity.java
303f66cbd176ddf2dd2afc040ca650004001732b
[]
no_license
piyushkant/Android-App-To-Locate-Places-Eat-Shop-Hangout
43b34a3b31d5d750f4d5e528ddebde6133e6e988
38e1a91db90f92329d2fe1264c0449a1eb5fe9f6
refs/heads/master
2016-09-05T15:53:26.724470
2012-09-21T11:55:39
2012-09-21T11:55:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,648
java
/* * */ package com.playcez; import android.app.Dialog; import android.app.ListActivity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.Window; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView; import android.widget.TextView; // TODO: Auto-generated Javadoc /** * The Class SettingsActivity. */ public class SettingsActivity extends ListActivity { /** The share subject. */ private String shareSubject; /** The share content. */ private String shareContent; /** The rate link. */ private String rateLink; /** The contact. */ private String [] contact; /** The accounts. */ final CharSequence [] accounts={"Facebook", "Twitter"}; /* (non-Javadoc) * @see android.app.Activity#onCreate(android.os.Bundle) */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.settingslayout); String[] values = new String[] { "Accounts", "Rate PlayCez", "Share PlayCez", "Contact Us"}; ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, values); setListAdapter(adapter); SharedPreferences myData = getSharedPreferences("myData", MODE_PRIVATE); String fbId = myData.getString("fbuid", "" ); String twId = myData.getString("twid", "" ); Log.d("fbid", fbId+""); Log.d("twid", twId+""); } /* (non-Javadoc) * @see android.app.ListActivity#onListItemClick(android.widget.ListView, android.view.View, int, long) */ protected void onListItemClick(ListView l, View v, int position, long id) { //String item = (String) getListAdapter().getItem(position); shareSubject = getString(R.string.shareSubject); shareContent = getString(R.string.shareContent); rateLink = getString(R.string.rateLink); contact = new String[]{getString(R.string.contactUs)}; switch (position) { case 0: customDialog(); break; case 1: openRateLink(rateLink); break; case 2: share(shareSubject, shareContent); break; case 3: Log.d("contact", contact+""); contactUs(contact); break; } } /** * Share. * * @param subject the subject * @param text the text */ private void share(String subject, String text) { Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_SUBJECT, subject); intent.putExtra(Intent.EXTRA_TEXT, text); startActivity(Intent.createChooser(intent, "Share")); } /** * Contact us. * * @param myEmail the my email */ private void contactUs(String [] myEmail) { final Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("plain/text"); intent.putExtra(Intent.EXTRA_EMAIL, myEmail); startActivity(intent); } /** * Open rate link. * * @param rateLink the rate link */ private void openRateLink(String rateLink) { Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(rateLink)); startActivity(myIntent); } /** * Custom dialog. */ void customDialog () { Dialog dialog = new Dialog(this); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.customdialog); dialog.setCanceledOnTouchOutside(true); TextView fbConnected = (TextView)dialog.findViewById(R.id.fbConnected); TextView twConnected = (TextView)dialog.findViewById(R.id.twConnected); Button fbButton = (Button)dialog.findViewById(R.id.fbConnectButton); Button twButton = (Button)dialog.findViewById(R.id.twConnectButton); try{ twButton.setVisibility(View.GONE); twConnected.setVisibility(View.GONE); }catch(Exception e){ e.printStackTrace(); } SharedPreferences myData = getSharedPreferences("myData", MODE_PRIVATE); String fbId = myData.getString("fbuid", "1" ); String twId = myData.getString("twid", "1" ); Log.d("fbid", fbId+" this is fbuid"); Log.d("twid", twId+" this is twid"); if (fbId.equals("1")) { Log.d("hey", "eheyeyye"); fbConnected.setText("Not Connected"); fbConnected.setTextColor(Color.parseColor("#e50004")); fbButton.setVisibility(View.VISIBLE); fbButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //*********Add Account Here ******* } }); } else { Log.d("hey", "sjajsjseheyeyye"); fbConnected.setText("Connected"); fbConnected.setTextColor(Color.parseColor("#0000ff")); fbButton.setVisibility(View.GONE); } /* if (twId == null) { twConnected.setText("Not Connected"); twConnected.setTextColor(Color.parseColor("#F0F8FF")); twButton.setVisibility(View.VISIBLE); twButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //*********Add Account Here ******* } }); } else { twConnected.setText("Connected"); twConnected.setTextColor(Color.parseColor("#0000ff")); twButton.setVisibility(View.GONE); } */ dialog.show(); } }
[ "pkreaper@gmail.com" ]
pkreaper@gmail.com
425c784293f81b9baa1846cc44658801b3a0f1f8
324a387871b71c8dcd0eb279f9a31931696d4272
/app/src/main/java/iit/android/settings/WelcomeFragment.java
20fe50053d76e6de90c38ee6e7da99de7f9cfb8d
[ "Apache-2.0" ]
permissive
bhaktibhikne/swarachakra-android
b98441a333fb4cbba793c8ce437ac463e9e2960a
6a8c61647a5cbc9b6067d736140539724a345086
refs/heads/master
2021-05-12T18:41:23.019575
2017-01-04T14:12:53
2017-01-04T14:12:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,071
java
package iit.android.settings; import iit.android.swarachakra.R; 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.Button; import android.widget.TextView; public class WelcomeFragment extends Fragment { private MainActivity mMainActivity; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mMainActivity = MainActivity.getMainApp(); View v = inflater.inflate(R.layout.welcome_fragment, container, false); TextView title = (TextView) v.findViewById(R.id.title); TextView instruction = (TextView) v.findViewById(R.id.instruction); Button welcomeButton = (Button) v.findViewById(R.id.welcome_button); instruction.setText(mMainActivity .getStringResourceByName("welcome_instruction")); title.setText(mMainActivity.getStringResourceByName("welcome_title")); welcomeButton.setText(mMainActivity.getStringResourceByName("welcome_button")); return v; } }
[ "manjiri@iitb.ac.in" ]
manjiri@iitb.ac.in
44e77fd9df982fc809c6497102558173a71dfafc
c5755f45dc03c16908564a862b16c53c9a185e41
/mapper/core/src/com/dugsolutions/medusamap/InputPan.java
6fecbcd9c211f3b504bb5324a491ebdc7f634e20
[]
no_license
douglasselph/Medusa
877b37e50133b2dfa28d5670c84da4aee7689213
06789321cd37adcc621e57940bd21d3e1228a7ad
refs/heads/master
2020-12-02T22:22:43.197321
2017-07-26T18:05:00
2017-07-26T18:05:00
96,122,982
0
0
null
null
null
null
UTF-8
Java
false
false
1,591
java
package com.dugsolutions.medusamap; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; import com.badlogic.gdx.InputAdapter; import com.badlogic.gdx.InputProcessor; import com.badlogic.gdx.graphics.OrthographicCamera; /** * Created by dug on 6/27/17. */ public class InputPan implements InputProcessor { MyCamera camera; public InputPan(MyCamera camera) { this.camera = camera; } @Override public boolean keyDown(int keycode) { if (keycode == Input.Keys.LEFT) { camera.panStart(-1, 0); } else if (keycode == Input.Keys.RIGHT) { camera.panStart(1, 0); } else if (keycode == Input.Keys.UP) { camera.panStart(0, 1); } else if (keycode == Input.Keys.DOWN) { camera.panStart(0, -1); } return false; } @Override public boolean keyTyped(char character) { return false; } @Override public boolean keyUp(int keycode) { camera.panStop(); return false; } @Override public boolean scrolled(int amount) { return false; } @Override public boolean touchDown(int screenX, int screenY, int pointer, int button) { return false; } @Override public boolean touchUp(int screenX, int screenY, int pointer, int button) { return false; } @Override public boolean touchDragged(int screenX, int screenY, int pointer) { return false; } @Override public boolean mouseMoved(int screenX, int screenY) { return false; } }
[ "douglasselph@gmail.com" ]
douglasselph@gmail.com
ecc26b09680367bc1414fb41d63e9303a0939e9e
45e23dbeb3a2d0bfa5be2eee4a6f489fe9463ca6
/com/syntax/class30/LinkedListDemo.java
1b095e6b2fd73608073c009f6166551e68394b90
[]
no_license
metindede/syntaxBanch7
3c0dc25609f7982a20ee8ca58fa8bf024ff7b32b
4202ad3cf356c0efca8a5e97e0e6e66ce6ad036a
refs/heads/master
2022-12-07T04:08:06.006118
2020-09-05T01:28:17
2020-09-05T01:28:17
276,783,606
1
0
null
null
null
null
UTF-8
Java
false
false
1,826
java
package com.syntax.class30; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; public class LinkedListDemo { public static void main(String[] args) { LinkedList<String> food = new LinkedList<>(); food.add("beshparmak"); food.add("pizza"); food.add("biryani"); food.add("tacos"); String myFood = food.get(2); System.out.println(myFood); LinkedList<String> deserts = new LinkedList<>(); deserts.add("cake"); deserts.add("ice cream"); deserts.add("cookies"); food.addAll(deserts); System.out.println("LinkedList after adding another collection = " + food); food.remove("pizza"); System.out.println("LinkedList after removing element = " + food); food.set(3, "brownie"); System.out.println("LinkedList after replacing element = " + food); // I want to get all values 1 by 1 Iterator<String> foodIterator = food.iterator(); while(foodIterator.hasNext()) { String fooood=foodIterator.next(); System.out.print(fooood+" "); if(fooood.equals("cookies") || fooood.equals("brownie")) { foodIterator.remove(); } } System.out.println(); System.out.println("LinkedList after Iterator ="+food); //lets create list list with Country type of objects LinkedList<Country> countries=new LinkedList<>(); countries.add(new USA("USA")); countries.add(new Kazakhstan("Kazakhstan")); countries.add(new Afghanistan("Afghanistan")); System.out.println("Collection of Country Objects has "+countries.size()+" elements"); for(Country c: countries) { c.election(); } //creating an Object of LinkedList and storing inside List type of variable List<String> webelements=new LinkedList<>(); webelements.add("Link"); webelements.add("radio button"); webelements.add("checkbox"); } }
[ "ddmtndd@gmail.com" ]
ddmtndd@gmail.com
b3df208ba8789bcc0661828baee3fdbb5908dc19
976e6e8138c2dd12d62e94a4a96a5ee08576c96f
/blocks/svg/src/main/java/org/kabeja/svg/generators/SVGSplineGenerator.java
befa9b61826b9d43534ea8e754d4e0d65e77e483
[ "Apache-2.0" ]
permissive
accu-rate/kabeja
494cd2f20599b19735f39437515d103db216b067
00b3bf59572d2c42b152aed64d1b2a03b28c3f3a
refs/heads/master
2022-11-28T11:51:30.582994
2022-11-16T10:36:58
2022-11-16T10:36:58
76,049,535
9
12
null
2022-11-16T10:36:59
2016-12-09T16:00:14
Java
UTF-8
Java
false
false
5,315
java
/******************************************************************************* * Copyright 2010 Simon Mieth * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/ package org.kabeja.svg.generators; import java.util.Iterator; import java.util.Map; import org.kabeja.common.DraftEntity; import org.kabeja.entities.Polyline; import org.kabeja.entities.Spline; import org.kabeja.entities.Vertex; import org.kabeja.math.MathUtils; import org.kabeja.math.SplineConverter; import org.kabeja.math.TransformContext; import org.kabeja.svg.SVGConstants; import org.kabeja.svg.SVGContext; import org.kabeja.svg.SVGGenerationException; import org.kabeja.svg.SVGPathBoundaryGenerator; import org.kabeja.svg.SVGSAXGenerator; import org.kabeja.svg.SVGSAXGeneratorManager; import org.kabeja.svg.SVGUtils; import org.kabeja.util.Constants; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; public class SVGSplineGenerator extends AbstractSVGSAXGenerator implements SVGPathBoundaryGenerator { public void toSAX(ContentHandler handler, Map svgContext, DraftEntity entity, TransformContext transformContext) throws SAXException { Spline spline = (Spline) entity; Polyline pline = SplineConverter.toPolyline(spline); //TODO pline.setID(spline.getID()); SVGSAXGeneratorManager manager = (SVGSAXGeneratorManager) svgContext.get(SVGContext.SVGSAXGENERATOR_MANAGER); try { SVGSAXGenerator gen = manager.getSVGGenerator(Constants.ENTITY_TYPE_POLYLINE); gen.toSAX(handler, svgContext, pline, transformContext); } catch (SVGGenerationException e) { throw new SAXException(e); } } public String getSVGPath(DraftEntity entity) { //use Polyline for now Spline spline = (Spline) entity; Polyline pline = SplineConverter.toPolyline(spline); StringBuffer d = new StringBuffer(); Vertex last; Vertex first; Iterator<Vertex> i = pline.getVertices().iterator(); first = last = (Vertex) i.next(); d.append("M "); d.append(last.getPoint().getX()); d.append(SVGConstants.SVG_ATTRIBUTE_PATH_PLACEHOLDER); d.append(last.getPoint().getY()); d.append(SVGConstants.SVG_ATTRIBUTE_PATH_PLACEHOLDER); while (i.hasNext()) { Vertex end = (Vertex) i.next(); d.append(getVertexPath(last, end, pline)); last = end; } // bit coded values if (pline.isClosed()) { if (last.getBulge() != 0) { d.append(getVertexPath(last, first, pline)); } d.append(" z"); } return d.toString(); } protected String getVertexPath(Vertex start, Vertex end, Polyline pline) { StringBuffer d = new StringBuffer(); if (start.getBulge() != 0) { // from the DXF-Specs. double l = MathUtils.distance(start.getPoint(), end.getPoint()); // do nothing if the points are the same if (l > 0.0) { double r = pline.getRadius(Math.abs(start.getBulge()), l); double h = (start.getBulge() * l) / 2; // converting to an elipse with the same rx=ry d.append("A "); d.append(SVGUtils.formatNumberAttribute(r)); d.append(SVGConstants.SVG_ATTRIBUTE_PATH_PLACEHOLDER); d.append(SVGUtils.formatNumberAttribute(r)); d.append(" 0"); if (Math.abs(start.getBulge()) > 1.0) { // large Arc-flag d.append(" 1 "); } else { d.append(" 0 "); } // if the bulge > 0 the center point is on the left side // if the bulge < 0 the center point is ont the right side if (start.getBulge() < 0) { // the sweep-flag d.append(" 0 "); } else { d.append(" 1 "); } d.append(end.getPoint().getX()); d.append(SVGConstants.SVG_ATTRIBUTE_PATH_PLACEHOLDER); d.append(end.getPoint().getY()); d.append(SVGConstants.SVG_ATTRIBUTE_PATH_PLACEHOLDER); } } else { d.append("L "); d.append(SVGUtils.formatNumberAttribute(end.getPoint().getX())); d.append(SVGConstants.SVG_ATTRIBUTE_PATH_PLACEHOLDER); d.append(SVGUtils.formatNumberAttribute(end.getPoint().getY())); d.append(SVGConstants.SVG_ATTRIBUTE_PATH_PLACEHOLDER); } return d.toString(); } }
[ "simon.mieth@gmx.de" ]
simon.mieth@gmx.de
41672125584a33a006c1635a4b417a27861eafa9
a35254c229a28075f58fe402c967cf84ab41f60f
/1_MiniPro/src/view/SearchIdView.java
7a9c4fc0e5403198320440ddb10fd374724effb5
[]
no_license
JoonhyunChoi/CMP
375dbdfe0b51f1a860295c5d5b1bc6a219f1e90e
e467887713964fbbc41c06e3d2dab1ac6cdfe7e9
refs/heads/master
2021-08-20T06:46:58.842260
2017-11-28T12:10:13
2017-11-28T12:10:13
111,640,144
0
0
null
2017-11-25T06:39:49
2017-11-22T05:27:40
Java
UHC
Java
false
false
2,347
java
package view; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; public class SearchIdView { public void SearchId(){ JPanel mp = new JPanel(); JPanel panel = new JPanel(); mp.setBounds(700, 400,600,200); mp.setTitle("아이디 찾기"); panel.setLayout(null); //이름 라벨 JLabel UserNameL = new JLabel("이름 : "); UserNameL.setBounds(110, 25, 100, 20); UserNameL.setFont(new Font("SansSerif", Font.PLAIN, 20)); //이름 텍스트 JTextField UserNameT= new JTextField(); UserNameT.setBounds(190, 25, 180, 30); UserNameT.setFont(new Font("SansSerif", Font.PLAIN, 20)); panel.add(UserNameL); panel.add(UserNameT); //헨드폰 입력란 JLabel PhoneL = new JLabel("헨드폰 : "); PhoneL.setBounds(90, 65, 100, 20); PhoneL.setFont(new Font("SansSerif", Font.PLAIN, 20)); //헨드폰 텍스트 JPasswordField PhoneT = new JPasswordField(); PhoneT.setBounds(190, 65, 180, 30); PhoneT.setFont(new Font("SansSerif", Font.PLAIN, 20)); panel.add(PhoneL); panel.add(PhoneT); //인증 버튼 JButton check = new JButton("인증"); check.setBounds(400, 25, 120, 80); panel.add(check); check.addActionListener(new ActionListener(){ @Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub } }); // 아이디 찾기 라벨 //아이디 출력 TextFieldTest 에서 제곱 값을 나타내듯이 나타내주도록한다. JLabel resultIdL = new JLabel("사용자 아이디: "); resultIdL.setBounds(40, 105, 160, 20); resultIdL.setFont(new Font("SansSerif", Font.PLAIN, 20)); panel.add(resultIdL); //아이디 출력 텍스트 JTextField resultIdT = new JTextField(); resultIdT.setBounds(190, 105, 180, 30); resultIdT.setFont(new Font("SansSerif", Font.PLAIN, 20)); resultIdT.setEditable(false); panel.add(resultIdT); mp.add(panel); mp.setVisible(true); mp.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } }
[ "rudnf5487@naver.com" ]
rudnf5487@naver.com
d97d04787e10f5275a3394672db2da260cd11366
d94ffcb74e26b0e0889a198458ebe066a1fc9cf8
/src/main/java/com/wcs/legalization/uaaserver/service/UserDetailsServiceCustom.java
66fe7a7c79e0b2378709994f68d0dfa1a8207527
[]
no_license
mulukenh/uaa-server
532e7e5be20df0503005baceac30b89ef06d6e36
51251e90073d96fdc5b6a32bf8a05d5d9a9b1f5d
refs/heads/master
2020-09-03T05:22:25.340832
2019-11-06T12:54:36
2019-11-06T12:54:36
219,395,911
0
0
null
2019-11-06T12:54:38
2019-11-04T01:53:17
Java
UTF-8
Java
false
false
1,043
java
package com.wcs.legalization.uaaserver.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; import com.wcs.legalization.uaaserver.entity.UserDao; import com.wcs.legalization.uaaserver.repository.UserRepository; @Service public class UserDetailsServiceCustom implements UserDetailsService { @Autowired private UserRepository userRepository; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { UserDao user = userRepository.findByUsername(username); if (user == null) { throw new UsernameNotFoundException(username); } return User.withUsername(user.getUsername()) .password(user.getPassword()) .roles("USER").build(); } }
[ "muluken@berkeley.edu" ]
muluken@berkeley.edu
4999db077f326c2429a5edd05a11bdd3bd952eb7
7574718ce215466b7dac4f58f1fcdc79262d9318
/app/src/main/java/xyz/a100ohm/poems/adapterandview/MyPoetryListAdapter.java
d80a3d7171c0f3fbc9ff82db9d40dd427b4da6e3
[]
no_license
100Ohm/poetry_app
519d7d52afaba62e8f6a497625130abd20dc0f60
ec9b62af59075ad1c8d88c71bba534eab5dd6760
refs/heads/master
2020-04-29T18:42:34.789583
2019-06-27T14:45:10
2019-06-27T14:45:10
176,331,348
0
0
null
null
null
null
UTF-8
Java
false
false
1,487
java
package xyz.a100ohm.poems.adapterandview; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import xyz.a100ohm.poems.R; /** * <p>项目名称: poetry_app </p> * <p>文件名称: null.java </p> * <p>创建时间: 2019/6/6 17:26</p> * <p>企业信息: 广东工业大学 数字媒体技术专业</p> * * @author <a href="mail to: 100ohmYeah@gmail.com" rel="nofollow">一百欧姆</a> * @version v1.0 * @update [1][2019/6/6] [一百欧姆][我的诗集的Adapter] */ public class MyPoetryListAdapter extends RecyclerView.Adapter<MyPoetryListAdapter.ViewHolder>{ private int size; public MyPoetryListAdapter(int size) { this.size = size; } @NonNull @Override public MyPoetryListAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { View view = LayoutInflater.from(viewGroup.getContext()) .inflate(R.layout.poetry_book, viewGroup, false); ViewHolder holder = new ViewHolder(view); return holder; } @Override public void onBindViewHolder(@NonNull MyPoetryListAdapter.ViewHolder viewHolder, int i) { } @Override public int getItemCount() { return size; } class ViewHolder extends RecyclerView.ViewHolder { public ViewHolder(@NonNull View itemView) { super(itemView); } } }
[ "811853466@qq.com" ]
811853466@qq.com
168b6330333962bbd47aad31fa9c714010276310
f33ac630eccf13a734928e0e7330df590256345e
/app/src/main/java/netroxtech/com/videochat/ResetPassword.java
9bd4625a34a8b8b8a222afdf297829f2c67de205
[]
no_license
maher70/VideoChat
daacd6f46a21ceefa7c86d7d7bb65e036a24828b
9b1ef063833590fe36899f8dc9631d578059180b
refs/heads/master
2020-09-22T23:30:16.481047
2016-08-18T09:52:47
2016-08-18T09:52:47
65,985,533
0
1
null
null
null
null
UTF-8
Java
false
false
339
java
package netroxtech.com.videochat; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; public class ResetPassword extends AppCompatActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_forget); } }
[ "maherbilal70@gmail.com" ]
maherbilal70@gmail.com
1f59e63df06a353e1c83476227ef5243885a3ac9
cc9dd557abd4e544ed185c97af76073d2b87761d
/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/jpa/JpaWebTests.java
d8057db9273ae3854ba48716381a5e01bf150666
[ "Apache-2.0" ]
permissive
zhangwei5095/spring-data-rest
176cc4a6b031920295741e26b2fc25a881c69a19
11d02e12bc461895a522ec4f4454a1dcdd57b7d9
refs/heads/master
2021-01-14T14:03:12.231148
2014-11-10T18:50:54
2014-12-07T14:55:33
27,736,211
2
0
null
null
null
null
UTF-8
Java
false
false
22,130
java
/* * Copyright 2013-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.data.rest.webmvc.jpa; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; import static org.springframework.data.rest.webmvc.util.TestUtils.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import net.minidev.json.JSONArray; import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.rest.core.mapping.ResourceMappings; import org.springframework.data.rest.webmvc.CommonWebTests; import org.springframework.hateoas.Link; import org.springframework.hateoas.RelProvider; import org.springframework.http.MediaType; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.test.context.ContextConfiguration; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.util.StringUtils; import org.springframework.web.util.UriComponentsBuilder; import org.springframework.web.util.UriTemplate; import com.fasterxml.jackson.databind.ObjectMapper; import com.jayway.jsonpath.JsonPath; /** * Web integration tests specific to JPA. * * @author Oliver Gierke * @author Greg Turnquist */ @Transactional @ContextConfiguration(classes = JpaRepositoryConfig.class) public class JpaWebTests extends CommonWebTests { private static final MediaType TEXT_URI_LIST = MediaType.valueOf("text/uri-list"); static final String LINK_TO_SIBLINGS_OF = "$._embedded..[?(@.firstName == '%s')]._links.siblings.href[0]"; @Autowired TestDataPopulator loader; @Autowired ResourceMappings mappings; @Autowired RelProvider relProvider; ObjectMapper mapper = new ObjectMapper(); /* * (non-Javadoc) * @see org.springframework.data.rest.webmvc.AbstractWebIntegrationTests#setUp() */ @Override @Before public void setUp() { loader.populateRepositories(); super.setUp(); } /* * (non-Javadoc) * @see org.springframework.data.rest.webmvc.AbstractWebIntegrationTests#expectedRootLinkRels() */ @Override protected Iterable<String> expectedRootLinkRels() { return Arrays.asList("people", "authors", "books"); } /* * (non-Javadoc) * @see org.springframework.data.rest.webmvc.AbstractWebIntegrationTests#getPayloadToPost() */ @Override protected Map<String, String> getPayloadToPost() throws Exception { return Collections.singletonMap("people", readFileFromClasspath("person.json")); } /* * (non-Javadoc) * @see org.springframework.data.rest.webmvc.AbstractWebIntegrationTests#getRootAndLinkedResources() */ @Override protected MultiValueMap<String, String> getRootAndLinkedResources() { MultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>(); map.add("authors", "books"); map.add("books", "authors"); return map; } /** * @see DATAREST-99 */ @Test public void doesNotExposeCreditCardRepository() throws Exception { mvc.perform(get("/")). // andExpect(status().isOk()). // andExpect(doesNotHaveLinkWithRel(mappings.getMappingFor(CreditCard.class).getRel())); } @Test public void accessPersons() throws Exception { MockHttpServletResponse response = client.request("/people?page=0&size=1"); Link nextLink = client.assertHasLinkWithRel(Link.REL_NEXT, response); assertDoesNotHaveLinkWithRel(Link.REL_PREVIOUS, response); response = client.request(nextLink); client.assertHasLinkWithRel(Link.REL_PREVIOUS, response); nextLink = client.assertHasLinkWithRel(Link.REL_NEXT, response); response = client.request(nextLink); client.assertHasLinkWithRel(Link.REL_PREVIOUS, response); assertDoesNotHaveLinkWithRel(Link.REL_NEXT, response); } /** * @see DATAREST-169 */ @Test public void exposesLinkForRelatedResource() throws Exception { MockHttpServletResponse response = client.request("/"); Link ordersLink = client.assertHasLinkWithRel("orders", response); MockHttpServletResponse orders = client.request(ordersLink); Link creatorLink = assertHasContentLinkWithRel("creator", orders); assertThat(client.request(creatorLink), is(notNullValue())); } /** * @see DATAREST-200 */ @Test public void exposesInlinedEntities() throws Exception { MockHttpServletResponse response = client.request("/"); Link ordersLink = client.assertHasLinkWithRel("orders", response); MockHttpServletResponse orders = client.request(ordersLink); assertHasJsonPathValue("$..lineItems", orders); } /** * @see DATAREST-199 */ @Test public void createsOrderUsingPut() throws Exception { mvc.perform(// put("/orders/{id}", 4711).// content(readFileFromClasspath("order.json")).contentType(MediaType.APPLICATION_JSON)// ).andExpect(status().isCreated()); } /** * @see DATAREST-117 */ @Test public void createPersonThenVerifyIgnoredAttributesDontExist() throws Exception { Link peopleLink = client.discoverUnique("people"); ObjectMapper mapper = new ObjectMapper(); Person frodo = new Person("Frodo", "Baggins"); frodo.setAge(77); frodo.setHeight(42); frodo.setWeight(75); String frodoString = mapper.writeValueAsString(frodo); MockHttpServletResponse response = postAndGet(peopleLink, frodoString, MediaType.APPLICATION_JSON); assertJsonPathEquals("$.firstName", "Frodo", response); assertJsonPathEquals("$.lastName", "Baggins", response); assertJsonPathDoesntExist("$.age", response); assertJsonPathDoesntExist("$.height", response); assertJsonPathDoesntExist("$.weight", response); } /** * @see DATAREST-95 */ @Test public void createThenPatch() throws Exception { Link peopleLink = client.discoverUnique("people"); MockHttpServletResponse bilbo = postAndGet(peopleLink, "{ \"firstName\" : \"Bilbo\", \"lastName\" : \"Baggins\" }", MediaType.APPLICATION_JSON); Link bilboLink = client.assertHasLinkWithRel("self", bilbo); assertThat((String) JsonPath.read(bilbo.getContentAsString(), "$.firstName"), is("Bilbo")); assertThat((String) JsonPath.read(bilbo.getContentAsString(), "$.lastName"), is("Baggins")); MockHttpServletResponse frodo = patchAndGet(bilboLink, "{ \"firstName\" : \"Frodo\" }", MediaType.APPLICATION_JSON); assertThat((String) JsonPath.read(frodo.getContentAsString(), "$.firstName"), is("Frodo")); assertThat((String) JsonPath.read(frodo.getContentAsString(), "$.lastName"), is("Baggins")); frodo = patchAndGet(bilboLink, "{ \"firstName\" : null }", MediaType.APPLICATION_JSON); assertThat((String) JsonPath.read(frodo.getContentAsString(), "$.firstName"), is(nullValue())); assertThat((String) JsonPath.read(frodo.getContentAsString(), "$.lastName"), is("Baggins")); } /** * @see DATAREST-150 */ @Test public void createThenPut() throws Exception { Link peopleLink = client.discoverUnique("people"); MockHttpServletResponse bilbo = postAndGet(peopleLink,// "{ \"firstName\" : \"Bilbo\", \"lastName\" : \"Baggins\" }",// MediaType.APPLICATION_JSON); Link bilboLink = client.assertHasLinkWithRel("self", bilbo); assertThat((String) JsonPath.read(bilbo.getContentAsString(), "$.firstName"), equalTo("Bilbo")); assertThat((String) JsonPath.read(bilbo.getContentAsString(), "$.lastName"), equalTo("Baggins")); MockHttpServletResponse frodo = putAndGet(bilboLink,// "{ \"firstName\" : \"Frodo\" }",// MediaType.APPLICATION_JSON); assertThat((String) JsonPath.read(frodo.getContentAsString(), "$.firstName"), equalTo("Frodo")); assertNull(JsonPath.read(frodo.getContentAsString(), "$.lastName")); } @Test public void listsSiblingsWithContentCorrectly() throws Exception { assertPersonWithNameAndSiblingLink("John"); } @Test public void listsEmptySiblingsCorrectly() throws Exception { assertPersonWithNameAndSiblingLink("Billy Bob"); } /** * @see DATAREST-219 */ @Test public void manipulatePropertyCollectionRestfullyWithMultiplePosts() throws Exception { List<Link> links = preparePersonResources(new Person("Frodo", "Baggins"), // new Person("Bilbo", "Baggins"), // new Person("Merry", "Baggins"), // new Person("Pippin", "Baggins")); Link frodosSiblingLink = links.get(0); patchAndGet(frodosSiblingLink, links.get(1).getHref(), TEXT_URI_LIST); patchAndGet(frodosSiblingLink, links.get(2).getHref(), TEXT_URI_LIST); patchAndGet(frodosSiblingLink, links.get(3).getHref(), TEXT_URI_LIST); assertSiblingNames(frodosSiblingLink, "Bilbo", "Merry", "Pippin"); } /** * @see DATAREST-219 */ @Test public void manipulatePropertyCollectionRestfullyWithSinglePost() throws Exception { List<Link> links = preparePersonResources(new Person("Frodo", "Baggins"), // new Person("Bilbo", "Baggins"), // new Person("Merry", "Baggins"), // new Person("Pippin", "Baggins")); Link frodosSiblingLink = links.get(0); patchAndGet(frodosSiblingLink, toUriList(links.get(1), links.get(2), links.get(3)), TEXT_URI_LIST); assertSiblingNames(frodosSiblingLink, "Bilbo", "Merry", "Pippin"); } /** * @see DATAREST-219 */ @Test public void manipulatePropertyCollectionRestfullyWithMultiplePuts() throws Exception { List<Link> links = preparePersonResources(new Person("Frodo", "Baggins"), // new Person("Bilbo", "Baggins"), // new Person("Merry", "Baggins"), // new Person("Pippin", "Baggins")); Link frodosSiblingsLink = links.get(0); putAndGet(frodosSiblingsLink, links.get(1).expand().getHref(), TEXT_URI_LIST); putAndGet(frodosSiblingsLink, links.get(2).expand().getHref(), TEXT_URI_LIST); putAndGet(frodosSiblingsLink, links.get(3).expand().getHref(), TEXT_URI_LIST); assertSiblingNames(frodosSiblingsLink, "Pippin"); patchAndGet(frodosSiblingsLink, links.get(2).getHref(), TEXT_URI_LIST); assertSiblingNames(frodosSiblingsLink, "Merry", "Pippin"); } /** * @see DATAREST-219 */ @Test public void manipulatePropertyCollectionRestfullyWithSinglePut() throws Exception { List<Link> links = preparePersonResources(new Person("Frodo", "Baggins"), // new Person("Bilbo", "Baggins"), // new Person("Merry", "Baggins"), // new Person("Pippin", "Baggins")); Link frodoSiblingLink = links.get(0); putAndGet(frodoSiblingLink, toUriList(links.get(1), links.get(2), links.get(3)), TEXT_URI_LIST); assertSiblingNames(frodoSiblingLink, "Bilbo", "Merry", "Pippin"); putAndGet(frodoSiblingLink, toUriList(links.get(3)), TEXT_URI_LIST); assertSiblingNames(frodoSiblingLink, "Pippin"); patchAndGet(frodoSiblingLink, toUriList(links.get(2)), TEXT_URI_LIST); assertSiblingNames(frodoSiblingLink, "Merry", "Pippin"); } /** * @see DATAREST-219 */ @Test public void manipulatePropertyCollectionRestfullyWithDelete() throws Exception { List<Link> links = preparePersonResources(new Person("Frodo", "Baggins"), // new Person("Bilbo", "Baggins"), // new Person("Merry", "Baggins"), // new Person("Pippin", "Baggins")); Link frodosSiblingsLink = links.get(0); patchAndGet(frodosSiblingsLink, links.get(1).getHref(), TEXT_URI_LIST); patchAndGet(frodosSiblingsLink, links.get(2).getHref(), TEXT_URI_LIST); patchAndGet(frodosSiblingsLink, links.get(3).getHref(), TEXT_URI_LIST); String pippinId = new UriTemplate("/people/{id}").match(links.get(3).getHref()).get("id"); deleteAndVerify(new Link(frodosSiblingsLink.getHref() + "/" + pippinId)); assertSiblingNames(frodosSiblingsLink, "Bilbo", "Merry"); } /** * @see DATAREST-50 */ @Test public void propertiesCanHaveNulls() throws Exception { Link peopleLink = client.discoverUnique("people"); Person frodo = new Person(); frodo.setFirstName("Frodo"); frodo.setLastName(null); MockHttpServletResponse response = postAndGet(peopleLink, mapper.writeValueAsString(frodo), MediaType.APPLICATION_JSON); String responseBody = response.getContentAsString(); assertEquals(JsonPath.read(responseBody, "$.firstName"), "Frodo"); assertNull(JsonPath.read(responseBody, "$.lastName")); } /** * @see DATAREST-238 */ @Test public void putShouldWorkDespiteExistingLinks() throws Exception { Link peopleLink = client.discoverUnique("people"); Person frodo = new Person("Frodo", "Baggins"); String frodoString = mapper.writeValueAsString(frodo); MockHttpServletResponse createdPerson = postAndGet(peopleLink, frodoString, MediaType.APPLICATION_JSON); Link frodoLink = client.assertHasLinkWithRel("self", createdPerson); assertJsonPathEquals("$.firstName", "Frodo", createdPerson); String bilboWithFrodosLinks = createdPerson.getContentAsString().replace("Frodo", "Bilbo"); MockHttpServletResponse overwrittenResponse = putAndGet(frodoLink, bilboWithFrodosLinks, MediaType.APPLICATION_JSON); client.assertHasLinkWithRel("self", overwrittenResponse); assertJsonPathEquals("$.firstName", "Bilbo", overwrittenResponse); } private List<Link> preparePersonResources(Person primary, Person... persons) throws Exception { Link peopleLink = client.discoverUnique("people"); List<Link> links = new ArrayList<Link>(); MockHttpServletResponse primaryResponse = postAndGet(peopleLink, mapper.writeValueAsString(primary), MediaType.APPLICATION_JSON); links.add(client.assertHasLinkWithRel("siblings", primaryResponse)); for (Person person : persons) { String payload = mapper.writeValueAsString(person); MockHttpServletResponse response = postAndGet(peopleLink, payload, MediaType.APPLICATION_JSON); links.add(client.assertHasLinkWithRel(Link.REL_SELF, response)); } return links; } /** * @see DATAREST-217 */ @Test public void doesNotAllowGetToCollectionResourceIfFindAllIsNotExported() throws Exception { Link link = client.discoverUnique("addresses"); mvc.perform(get(link.getHref())).// andExpect(status().isMethodNotAllowed()); } /** * @see DATAREST-217 */ @Test public void doesNotAllowPostToCollectionResourceIfSaveIsNotExported() throws Exception { Link link = client.discoverUnique("addresses"); mvc.perform(post(link.getHref()).content("{}").contentType(MediaType.APPLICATION_JSON)).// andExpect(status().isMethodNotAllowed()); } /** * Checks, that the server only returns the properties contained in the projection requested. * * @see OrderSummary * @see DATAREST-221 */ @Test public void returnsProjectionIfRequested() throws Exception { Link orders = client.discoverUnique("orders"); MockHttpServletResponse response = client.request(orders); Link orderLink = assertContentLinkWithRel("self", response, true).expand(); UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(orderLink.getHref()); String uri = builder.queryParam("projection", "summary").build().toUriString(); response = mvc.perform(get(uri)). // andExpect(status().isOk()). // andExpect(jsonPath("$.price", is(2.5))).// andReturn().getResponse(); assertJsonPathDoesntExist("$.lineItems", response); } /** * @see DATAREST-261 */ @Test public void relProviderDetectsCustomizedMapping() { assertThat(relProvider.getCollectionResourceRelFor(Person.class), is("people")); } /** * @see DATAREST-311 */ @Test public void onlyLinksShouldAppearWhenExecuteSearchCompact() throws Exception { Link peopleLink = client.discoverUnique("people"); Person daenerys = new Person("Daenerys", "Targaryen"); String daenerysString = mapper.writeValueAsString(daenerys); MockHttpServletResponse createdPerson = postAndGet(peopleLink, daenerysString, MediaType.APPLICATION_JSON); Link daenerysLink = client.assertHasLinkWithRel("self", createdPerson); assertJsonPathEquals("$.firstName", "Daenerys", createdPerson); Link searchLink = client.discoverUnique(peopleLink, "search"); Link byFirstNameLink = client.discoverUnique(searchLink, "findFirstPersonByFirstName"); MockHttpServletResponse response = client.request(byFirstNameLink.expand("Daenerys"), MediaType.parseMediaType("application/x-spring-data-compact+json")); String responseBody = response.getContentAsString(); JSONArray personLinks = JsonPath.<JSONArray> read(responseBody, "$.links[?(@.rel=='person')].href"); assertThat(personLinks, hasSize(1)); assertThat(personLinks.get(0), is((Object) daenerysLink.getHref())); assertThat(JsonPath.<JSONArray> read(responseBody, "$.content"), hasSize(0)); } /** * @see DATAREST-317 */ @Test public void rendersExcerptProjectionsCorrectly() throws Exception { Link authorsLink = client.discoverUnique("authors"); MockHttpServletResponse response = client.request(authorsLink); String firstAuthorPath = "$._embedded.authors[0]"; // Has main content assertHasJsonPathValue(firstAuthorPath.concat(".name"), response); // Embeddes content of related entity but no link to it assertHasJsonPathValue(firstAuthorPath.concat("._embedded.books[0].title"), response); assertJsonPathDoesntExist(firstAuthorPath.concat("._links.books"), response); // Access item resource and expect link to related resource present String content = response.getContentAsString(); String href = JsonPath.read(content, firstAuthorPath.concat("._links.self.href")); client.follow(new Link(href)).andExpect(client.hasLinkWithRel("books")); } /** * @see DATAREST-353 */ @Test public void returns404WhenTryingToDeleteANonExistingResource() throws Exception { Link authorsLink = client.discoverUnique("authors"); mvc.perform(delete(authorsLink.getHref().concat("/{id}"), 4711)).// andExpect(status().isNotFound()); } /** * @see DATAREST-384 */ @Test public void execturesSearchThatTakesASort() throws Exception { Link booksLink = client.discoverUnique("books"); Link searchLink = client.discoverUnique(booksLink, "search"); Link findBySortedLink = client.discoverUnique(searchLink, "find-by-sorted"); // Assert sort options advertised assertThat(findBySortedLink.isTemplated(), is(true)); assertThat(findBySortedLink.getVariableNames(), contains("sort")); // Assert results returned as specified client.follow(findBySortedLink.expand("title,desc")).// andExpect(jsonPath("$._embedded.books[0].title").value("Spring Data (Second Edition)")).// andExpect(jsonPath("$._embedded.books[1].title").value("Spring Data")); client.follow(findBySortedLink.expand("title,asc")).// andExpect(jsonPath("$._embedded.books[0].title").value("Spring Data")).// andExpect(jsonPath("$._embedded.books[1].title").value("Spring Data (Second Edition)")); } /** * @see DATAREST-160 */ @Test public void returnConflictWhenConcurrentlyEditingVersionedEntity() throws Exception { Link receiptLink = client.discoverUnique("receipts"); Receipt receipt = new Receipt(); receipt.setAmount(new BigDecimal(50)); receipt.setSaleItem("Springy Tacos"); String stringReceipt = mapper.writeValueAsString(receipt); MockHttpServletResponse createdReceipt = postAndGet(receiptLink, stringReceipt, MediaType.APPLICATION_JSON); Link tacosLink = client.assertHasLinkWithRel("self", createdReceipt); assertJsonPathEquals("$.saleItem", "Springy Tacos", createdReceipt); UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(tacosLink.getHref()); String concurrencyTag = createdReceipt.getHeader("ETag"); mvc.perform( patch(builder.build().toUriString()).content("{ \"saleItem\" : \"SpringyBurritos\" }") .contentType(MediaType.APPLICATION_JSON).header("If-Match", concurrencyTag)).andExpect( status().isNoContent()); mvc.perform( patch(builder.build().toUriString()).content("{ \"saleItem\" : \"SpringyTequila\" }") .contentType(MediaType.APPLICATION_JSON).header("If-Match", "\"falseETag\"")).andExpect( status().isPreconditionFailed()); } /** * Asserts the {@link Person} resource the given link points to contains siblings with the given names. * * @param link * @param siblingNames * @throws Exception */ private void assertSiblingNames(Link link, String... siblingNames) throws Exception { String responseBody = client.request(link).getContentAsString(); List<String> persons = JsonPath.read(responseBody, "$._embedded.people[*].firstName"); assertThat(persons, hasSize(siblingNames.length)); assertThat(persons, hasItems(siblingNames)); } private void assertPersonWithNameAndSiblingLink(String name) throws Exception { MockHttpServletResponse response = client.request(client.discoverUnique("people")); String jsonPath = String.format("$._embedded.people[?(@.firstName == '%s')][0]", name); // Assert content inlined Object john = JsonPath.read(response.getContentAsString(), jsonPath); assertThat(john, is(notNullValue())); assertThat(JsonPath.read(john, "$.firstName"), is(notNullValue())); // Assert sibling link exposed in resource pointed to Link selfLink = new Link(JsonPath.<String> read(john, "$._links.self.href")); client.follow(selfLink).// andExpect(status().isOk()).// andExpect(jsonPath("$._links.siblings", is(notNullValue()))); } private static String toUriList(Link... links) { List<String> uris = new ArrayList<String>(links.length); for (Link link : links) { uris.add(link.expand().getHref()); } return StringUtils.collectionToDelimitedString(uris, "\n"); } }
[ "ogierke@gopivotal.com" ]
ogierke@gopivotal.com
4daea0e81f5ac6fa894bb5c0a248e89976021cce
e88215712898c8faad7aa4b7b7278cbb3a47e162
/src/com/eoulu/service/ApplicationGalleryService.java
3858cb8b12e1747436f5b9f957d7e778f6c758ae
[]
no_license
LGDHuaOPER/HuaFEEng_Goose
f482fff96aaf8d1910b3ee11a181d8423c276b9b
318ca4377a0d37c9dcebb925456591ddf264e23d
refs/heads/master
2020-03-27T23:12:46.256068
2018-09-29T10:13:27
2018-09-29T10:13:27
147,301,655
2
1
null
null
null
null
UTF-8
Java
false
false
970
java
package com.eoulu.service; import java.util.List; import java.util.Map; import com.eoulu.commonality.Page; import com.eoulu.entity.ProductDrawings; import com.eoulu.entity.Scheme; public interface ApplicationGalleryService { public boolean addScheme(Scheme scheme); public boolean updateScheme(Scheme scheme); public List<Map<String, Object>> getSchemeByPage(Page page,String type,String column1,String content1,String column2,String content2); public int getSchemeCount(String type,String column1,String content1,String column2,String content2); public boolean addProduct(ProductDrawings drawings); public boolean updateProduct(ProductDrawings drawings); public List<Map<String, Object>> getDrawingsByPage(Page page,String category,String type,String column1,String content1,String column2,String content2); public int getDrawingsCount(String category,String type,String column1,String content1,String column2,String content2); }
[ "LGD_HuaOPER@gmail.com" ]
LGD_HuaOPER@gmail.com
ab3d8d034fce38a9b665dedaef65cc1d443c6695
4399003c72578cc2ef3cfd4a82fd0b72c930edfd
/src/Unit.java
152b1f975d490e8992c4dd9fa69033b03a1316a1
[]
no_license
Dasojj/MapRed
baec5ae3fe02058a483a108d44083dedc85fed0f
6fc24e7d73245958fca9647373a5aa3be0ca5a3a
refs/heads/main
2023-07-08T07:29:41.785704
2021-04-23T13:17:22
2021-04-23T13:17:22
360,885,238
0
0
null
null
null
null
UTF-8
Java
false
false
1,696
java
import java.awt.*; public class Unit implements HitboxListener { protected Sprite bottom; protected Sprite top; protected Hitbox hb; protected Bot bot; public Unit(int x, int y) { this.bottom = new Sprite(x, y, Map.EMPTY, Map.EMPTY, 0, 0 ); this.top = new Sprite(x, y, Map.EMPTY, Map.EMPTY, 0, 0 ); this.hb = new Hitbox(bottom, 5, this); this.bot = new Bot(this); } public void up () { bottom.setAlpha(-Math.PI/2); //top.setAlpha(-Math.PI/2); } public void down () { bottom.setAlpha(Math.PI/2); //top.setAlpha(Math.PI/2); } public void left () { bottom.setAlpha(Math.PI); //top.setAlpha(Math.PI); } public void right () { bottom.setAlpha(0); //top.setAlpha(0); } // public void show() { // bottom.show(); // } public void update(int ms) { bottom.update(ms); top.update(ms); hb.update(ms); bot.update(ms); } public void paint(Graphics g) { bottom.paint(g); top.paint(g); } public double getX(){ return this.bottom.getX(); } public double getCenterX() { return bottom.getX() + Map.BLOCK_SIZE/2; } public double getY(){ return this.bottom.getY(); } public double getCenterY() { return bottom.getY() + Map.BLOCK_SIZE/2; } public void setBot(Bot bot) { this.bot = bot; } public void setTopAlpha(double alpha) { top.setAlpha(alpha); } @Override public void onCollision(HitboxEvent event) { bottom.reverse(event.ms); top.reverse(event.ms); } }
[ "KirillM28@yandex.ru" ]
KirillM28@yandex.ru
795ed3cafe955095871547d8f172a0dd8a566aad
7a9b3dde403a1ea0510745feb733c18fc0ed4ae4
/src/test/java/com/cienet/service/UserServiceIntTest.java
81f595ee3607b69d4fabd246eee72e946860a5b6
[]
no_license
isexists/jhipster
41d5cce18e9cb530cb7c841480f4810f7e20e8b5
ea14038f3c60774e6b0526aec041324028a837e9
refs/heads/master
2021-05-13T16:01:11.624975
2018-01-10T06:50:06
2018-01-10T06:50:06
116,781,772
0
0
null
null
null
null
UTF-8
Java
false
false
6,326
java
package com.cienet.service; import com.cienet.JhipsterApp; import com.cienet.config.Constants; import com.cienet.domain.User; import com.cienet.repository.UserRepository; import com.cienet.service.dto.UserDTO; import com.cienet.service.util.RandomUtil; import org.apache.commons.lang3.RandomStringUtils; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.List; import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; /** * Test class for the UserResource REST controller. * * @see UserService */ @RunWith(SpringRunner.class) @SpringBootTest(classes = JhipsterApp.class) @Transactional public class UserServiceIntTest { @Autowired private UserRepository userRepository; @Autowired private UserService userService; private User user; @Before public void init() { user = new User(); user.setLogin("johndoe"); user.setPassword(RandomStringUtils.random(60)); user.setActivated(true); user.setEmail("johndoe@localhost"); user.setFirstName("john"); user.setLastName("doe"); user.setImageUrl("http://placehold.it/50x50"); user.setLangKey("en"); } @Test @Transactional public void assertThatUserMustExistToResetPassword() { userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.requestPasswordReset("invalid.login@localhost"); assertThat(maybeUser).isNotPresent(); maybeUser = userService.requestPasswordReset(user.getEmail()); assertThat(maybeUser).isPresent(); assertThat(maybeUser.orElse(null).getEmail()).isEqualTo(user.getEmail()); assertThat(maybeUser.orElse(null).getResetDate()).isNotNull(); assertThat(maybeUser.orElse(null).getResetKey()).isNotNull(); } @Test @Transactional public void assertThatOnlyActivatedUserCanRequestPasswordReset() { user.setActivated(false); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.requestPasswordReset(user.getLogin()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional public void assertThatResetKeyMustNotBeOlderThan24Hours() { Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); String resetKey = RandomUtil.generateResetKey(); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey(resetKey); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional public void assertThatResetKeyMustBeValid() { Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey("1234"); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional public void assertThatUserCanResetPassword() { String oldPassword = user.getPassword(); Instant daysAgo = Instant.now().minus(2, ChronoUnit.HOURS); String resetKey = RandomUtil.generateResetKey(); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey(resetKey); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isPresent(); assertThat(maybeUser.orElse(null).getResetDate()).isNull(); assertThat(maybeUser.orElse(null).getResetKey()).isNull(); assertThat(maybeUser.orElse(null).getPassword()).isNotEqualTo(oldPassword); userRepository.delete(user); } @Test @Transactional public void testFindNotActivatedUsersByCreationDateBefore() { Instant now = Instant.now(); user.setActivated(false); User dbUser = userRepository.saveAndFlush(user); dbUser.setCreatedDate(now.minus(4, ChronoUnit.DAYS)); userRepository.saveAndFlush(user); List<User> users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(now.minus(3, ChronoUnit.DAYS)); assertThat(users).isNotEmpty(); userService.removeNotActivatedUsers(); users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(now.minus(3, ChronoUnit.DAYS)); assertThat(users).isEmpty(); } @Test @Transactional public void assertThatAnonymousUserIsNotGet() { user.setLogin(Constants.ANONYMOUS_USER); if (!userRepository.findOneByLogin(Constants.ANONYMOUS_USER).isPresent()) { userRepository.saveAndFlush(user); } final PageRequest pageable = new PageRequest(0, (int) userRepository.count()); final Page<UserDTO> allManagedUsers = userService.getAllManagedUsers(pageable); assertThat(allManagedUsers.getContent().stream() .noneMatch(user -> Constants.ANONYMOUS_USER.equals(user.getLogin()))) .isTrue(); } @Test @Transactional public void testRemoveNotActivatedUsers() { user.setActivated(false); userRepository.saveAndFlush(user); // Let the audit first set the creation date but then update it user.setCreatedDate(Instant.now().minus(30, ChronoUnit.DAYS)); userRepository.saveAndFlush(user); assertThat(userRepository.findOneByLogin("johndoe")).isPresent(); userService.removeNotActivatedUsers(); assertThat(userRepository.findOneByLogin("johndoe")).isNotPresent(); } }
[ "294574413@qq.com" ]
294574413@qq.com
3faf37960d476f31748d1b101921cfed19b36751
fd48817e0892ddc0a2e2a90a3e92ed9ba7a0d976
/springboot-demo-thread/src/main/java/demo/springboot/thread/exercise/commandPattern/Retry.java
e4aad7372fdbe4deb6e102aa5951d09a001e0ef9
[ "Apache-2.0" ]
permissive
bilahepan/springboot-learning-example
261819ba99410bf0ce410d1b241ffe904d3def35
f7da8b48b945bfa10d72e9b0707db40e7ef1dbe3
refs/heads/master
2021-08-08T14:01:12.612938
2021-06-20T12:26:54
2021-06-20T12:26:54
170,424,344
0
1
Apache-2.0
2019-05-20T06:20:33
2019-02-13T02:14:14
Java
UTF-8
Java
false
false
796
java
package demo.springboot.thread.exercise.commandPattern; /** * *@author: bilahepan *@date: 2018/10/18 下午7:40 */ public class Retry { /** * 最多执行task任务maxTimes多次 * @param maxTimes * @param task * @return 是否执行成功 */ public static boolean execute(int maxTimes, RetryRunnable task) { for (int i = 0; i < maxTimes; i++) { try { //什么时候做,run方法里抛异常,失败可以重试 task.run(); //执行到这里说明执行没问题 return true; } catch (Exception ex) { System.out.println("执行出现异常" + ex); } } //执行到这里说明执行出错 return false; } }
[ "gaotc@tuya.com" ]
gaotc@tuya.com
bdd485b286c6821d912e0766b2880497dfb50206
110f1b082d80b6cf5ccd3807eba64e4a76c5e080
/DeleteData.java
a571dc51cb18888cec63ebad24ec97d2b4122daa
[]
no_license
abjs/JAVA_CRUD
85ef6fd61fceacbcfe47ccf4712f04bdea18d58b
26482107ce706f620a2708260cc04b90229433c6
refs/heads/main
2023-05-06T22:25:57.875272
2021-04-30T07:45:22
2021-04-30T07:45:22
362,950,209
0
0
null
null
null
null
UTF-8
Java
false
false
1,684
java
import java.sql.*; public class DeleteData { static { //STEP 1 : Registering The Driver Class try { Class.forName("oracle.jdbc.driver.OracleDriver"); } catch (ClassNotFoundException e) { System.out.println("Unable To Load The Driver class"); } } public static void main(String[] args) { Connection con = null; Statement stmt = null; try { //Database Credentials String URL = "jdbc:oracle:thin:@localhost:1521:XE"; String username = "system"; String password = "abjs"; //STEP 2 : Creating The Connection Object con = DriverManager.getConnection(URL, username, password); //STEP 3 : Creating The Statement Object stmt = con.createStatement(); //Constructing The SQL Query String sql = "DELETE FROM EMPLOYEE WHERE ID=111"; //Step 4 : Executing The Query //We are using executeUpdate() method as we are executing DELETE statement int i = stmt.executeUpdate(sql); if (i != 0) { System.out.println("Record is deleted"); } else { System.out.println("Record is not deleted"); } } catch (SQLException e) { e.printStackTrace(); } finally { //STEP 5 : Closing The DB Resources //Closing the Statement object try { if (stmt != null) { stmt.close(); stmt = null; } } catch (SQLException e) { e.printStackTrace(); } //Closing the Connection object try { if (con != null) { con.close(); con = null; } } catch (SQLException e) { e.printStackTrace(); } } } }
[ "itsmeabjs@gmail.com" ]
itsmeabjs@gmail.com
90f2670fe459c17ccf0f8ec877245f0886260010
d6060897eba64f18459558f5406835166345115b
/health_common/src/main/java/com/itheima/health/entity/QueryPageBean.java
8470e3bbd6cfd8ef8de2226c2b18f9a27f512f19
[]
no_license
tjuniversitywzy/itcast_health
34486d8767e1761b27650adadedd6b8205c0fd34
18ba1eae6d2dc60e4dec4fee8a7fc8268f22edbb
refs/heads/master
2022-12-25T19:05:43.227201
2020-04-29T02:05:27
2020-04-29T02:05:27
237,587,970
0
0
null
2022-12-16T00:37:46
2020-02-01T08:55:48
JavaScript
UTF-8
Java
false
false
989
java
package com.itheima.health.entity; import java.io.Serializable; /** * @author :seanyang * @date :Created in 2019/6/18 * @description :查询条件实体类 * @version: 1.0 */ public class QueryPageBean implements Serializable { private Integer currentPage;//页码 private Integer pageSize;//每页记录数 private String queryString;//查询条件 public Integer getCurrentPage() { return currentPage; } public void setCurrentPage(Integer currentPage) { this.currentPage = currentPage; } public Integer getPageSize() { return pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; } public String getQueryString() { return queryString; } public void setQueryString(String queryString) { this.queryString = queryString; } @Override public String toString() { return "QueryPageBean{" + "currentPage=" + currentPage + ", pageSize=" + pageSize + ", queryString='" + queryString + '\'' + '}'; } }
[ "1016680285@qq.com" ]
1016680285@qq.com
708fa1605712f439dc1bc6bccde26a68b3d5f4fe
6aae6eb9f5b0494276efe4e2c93f6d695a777e28
/src/cuit/edu/BEAN/OutDepot.java
c22639cedcfa45b35f90d71607e18e1185e2b870
[]
no_license
lei720/supermarket
dedc1d4be7dd998954a910b875325c7929c0a98b
9227225085c93bb690c40eba560c4aa08f3b3907
refs/heads/master
2021-01-10T22:12:16.802084
2015-04-21T23:09:25
2015-04-21T23:09:25
33,765,849
0
0
null
null
null
null
UTF-8
Java
false
false
1,310
java
package cuit.edu.BEAN; // Generated 2015-4-13 10:16:12 by Hibernate Tools 3.4.0.CR1 /** * OutDepot generated by hbm2java */ public class OutDepot implements java.io.Serializable { private int id; private Integer did; private String wname; private String outDate; private Float wight; private String remark; public OutDepot() { } public OutDepot(int id) { this.id = id; } public OutDepot(int id, Integer did, String wname, String outDate, Float wight, String remark) { this.id = id; this.did = did; this.wname = wname; this.outDate = outDate; this.wight = wight; this.remark = remark; } public int getId() { return this.id; } public void setId(int id) { this.id = id; } public Integer getDid() { return this.did; } public void setDid(Integer did) { this.did = did; } public String getWname() { return this.wname; } public void setWname(String wname) { this.wname = wname; } public String getOutDate() { return this.outDate; } public void setOutDate(String outDate) { this.outDate = outDate; } public Float getWight() { return this.wight; } public void setWight(Float wight) { this.wight = wight; } public String getRemark() { return this.remark; } public void setRemark(String remark) { this.remark = remark; } }
[ "lei_7420042@163.com" ]
lei_7420042@163.com
caad57f0c4c5b692faa99c9183e0a1f57dba4af3
2856d44091c9c8f3ed1c929324474678ed6c2c22
/youqu-service-provider-invitation/src/main/java/cn/zdxh/invitation/controller/TCommentController.java
42e7d70d703af3a04aa1dbe76660d34ed79161c2
[]
no_license
ningxiaojian31/youqu
c6805846366a3f6d31f442ee2e579a3e9625e6f1
a29000fc18972f2cbfad0b39899c351119bb098d
refs/heads/master
2022-06-26T06:11:18.721853
2020-04-14T14:09:40
2020-04-14T14:09:40
220,415,472
0
1
null
2022-06-17T02:54:29
2019-11-08T07:54:14
Java
UTF-8
Java
false
false
2,517
java
package cn.zdxh.invitation.controller; import cn.zdxh.commons.dto.TCommentBackDTO; import cn.zdxh.commons.entity.TComment; import cn.zdxh.commons.utils.Result; import cn.zdxh.commons.utils.ResultHelper; import cn.zdxh.commons.utils.SystemLog; import cn.zdxh.commons.utils.SystemLogEnum; import cn.zdxh.invitation.service.TCommentService; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** * <p> * 评论表 前端控制器 * </p> * * @author Justin * @since 2019-11-11 */ @Api(tags = "评论表") @RestController @RequestMapping("/tComment") @Slf4j public class TCommentController { @Autowired private TCommentService tCommentService; @SystemLog(type = SystemLogEnum.SAVE_LOG) @ApiOperation("保存评论") @PostMapping("/save") public Result save(@RequestBody TComment tComment){ int res = tCommentService.saveEntity(tComment); if (res > 0){ return ResultHelper.createSuccess("保存评论成功"); } return ResultHelper.createError("保存评论失败"); } @ApiOperation("查询评论") @GetMapping("/get/{id}") public Result get(@PathVariable("id") Integer id){ TComment tComment = tCommentService.getById(id); return ResultHelper.createSuccess(tComment); } @ApiOperation("查询所有评论") @PostMapping("/list") public Result list(@RequestBody TCommentBackDTO tComment, @RequestParam(value = "currentPage",required = false) Integer currentPage, @RequestParam(value = "pageSize",required = false) Integer pageSize){ //分页查询 Page page = new Page(); page.setCurrent(currentPage != null ? currentPage : 1); page.setSize(pageSize != null ? pageSize : 10); return ResultHelper.createSuccess(tCommentService.findAllByComment(page,tComment)); } @SystemLog(type = SystemLogEnum.DELETE_LOG) @ApiOperation("删除评论") @DeleteMapping("/del/{id}") public Result delete(@PathVariable("id") Integer id){ boolean res = tCommentService.removeById(id); if (res){ return ResultHelper.createSuccess("删除评论成功"); } return ResultHelper.createError("删除评论失败"); } }
[ "664650322@qq.com" ]
664650322@qq.com
f2dcab96d815f427ede53ae94e844390d2edc0dd
d6c7d323fe15ec33477438b6ae87b14576b1d8fe
/EZshare/src/main/java/server_service/PublishService.java
f4952260ae73bd1507d85204eeb893dd04e1190e
[]
no_license
partwith/ds-ezshare
25432f62fc63ddc4f52a969b224bb8398e9bb819
0078d3ca031e1df859301fa6cac9cccf3bdf73ef
refs/heads/master
2021-01-21T01:16:37.643036
2017-08-30T11:32:43
2017-08-30T11:32:43
101,872,322
0
0
null
null
null
null
UTF-8
Java
false
false
2,516
java
package server_service; import java.io.DataOutputStream; import java.io.IOException; import java.util.regex.Pattern; import java.net.URI; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import assist.*; import dao.Resource; public class PublishService extends Service { public PublishService(ResourceStorage resourceStroage, ServerRecords serverRecords) { super(resourceStroage, serverRecords); // TODO Auto-generated constructor stub } public void response(Resource resource, DataOutputStream out) { Response response = null; Gson gson = new GsonBuilder().serializeNulls().create(); try { checkResource(resource); if (resourceStroage.checkResource(resource.getResourceKey()) == true) { resourceStroage.updateResource(resource); } if (resourceStroage.checkOwner(resource) == false) { throw new MyException("cannot publish resource"); } } catch (MyException e) { // TODO Auto-generated catch block response = new ServerErrorResponse(e.getMessage()); } resourceStroage.storeResource(resource); response = new ServerSuccessResponse(); try { out.writeUTF(response.toJson(gson)); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public void checkResource(Resource resource) throws MyException { String regEx = "([a-zA-Z]:)?(\\\\[a-zA-Z0-9_.-]+)+\\\\?"; if (resource.getUri() == null) { throw new MyException("cannot publish resource"); } if (resource.getUri() != "" && !URI.create(resource.getUri()).isAbsolute()) { throw new MyException ("invalid resource"); } if (!(resource.getUri().equals("")) && ((URI.create(resource.getUri()).getScheme().equals("file"))) ) { throw new MyException("missing resource and//or secret"); } if (Pattern.matches(regEx, resource.getUri()) == true) { throw new MyException("invalid resource"); } if (resource.getUri().contains("\0")) { throw new MyException("invalid resource"); } if (resource.getChannel().contains("\0")) { throw new MyException("invalid resource"); } if (resource.getDescription().contains("\0")) { throw new MyException("invalid resource"); } if (resource.getName().contains("\0")) { throw new MyException("invalid resource"); } if (resource.getOwner().contains("\0") || resource.getOwner().equals("*")) { throw new MyException("invalid resource"); } if (resource.getTags().toString().contains("\0")) { throw new MyException("invalid resource"); } } }
[ "jizhehou@gmail.com" ]
jizhehou@gmail.com
ed38ecb5c93d6569377c872694cf3eecc90332f8
88b8cb43b9619fa2b5427f2c578da1ef24555c4d
/src/main/java/com/wlminus/domain/Product.java
52c418bc41ab88e947501e397b4bdafa6011db81
[]
no_license
wlminus/jam2-be
4193217bf6911d8437a92fa767822ecb7001be3b
f1fb9844153a6b29a6d05ee12bf9f0f3862dafd0
refs/heads/master
2023-02-26T00:23:01.597402
2021-02-03T05:25:39
2021-02-03T05:25:39
199,049,361
0
0
null
null
null
null
UTF-8
Java
false
false
11,756
java
package com.wlminus.domain; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedBy; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import javax.persistence.*; import javax.validation.constraints.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; /** * A Product. */ @Entity @Table(name = "product") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) @EntityListeners(AuditingEntityListener.class) public class Product implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Size(max = 300) @Column(name = "name", length = 300) private String name; @Size(max = 100) @Column(name = "product_code", length = 100) private String productCode; @NotNull @Min(value = 1L) @Max(value = 100000000L) @Column(name = "price", nullable = false) private Long price; @NotNull @Min(value = 1L) @Max(value = 100000000L) @Column(name = "final_price", nullable = false) private Long finalPrice; @DecimalMin(value = "0") @DecimalMax(value = "100") @Column(name = "discount") private Double discount; @Size(max = 200) @Column(name = "release_type", length = 200) private String releaseType; @Size(max = 200) @Column(name = "release_status", length = 200) private String releaseStatus; @Size(max = 1000) @Column(name = "description", length = 1000) private String description; @Size(max = 500) @Column(name = "material_desc", length = 500) private String materialDesc; @Size(max = 300) @Column(name = "slug", length = 300, unique = true) private String slug; @Column(name = "is_valid") private Boolean isValid; @Size(max = 200) @Column(name = "created_by", length = 200) @CreatedBy private String createdBy; @Column(name = "created_date") @CreatedDate private Long createdDate; @Size(max = 200) @Column(name = "modified_by", length = 200) @LastModifiedBy private String modifiedBy; @Column(name = "modified_date") @LastModifiedDate private Long modifiedDate; @ManyToOne(fetch = FetchType.EAGER) @JsonIgnoreProperties("products") private Category category; @ManyToMany(fetch = FetchType.EAGER) @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) @JoinTable(name = "product_media", joinColumns = @JoinColumn(name = "product_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "media_id", referencedColumnName = "id")) private Set<Media> media = new HashSet<>(); @ManyToMany @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) @JoinTable(name = "product_product_size", joinColumns = @JoinColumn(name = "product_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "product_size_id", referencedColumnName = "id")) private Set<ProductSize> productSizes = new HashSet<>(); @ManyToMany @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) @JoinTable(name = "product_tag", joinColumns = @JoinColumn(name = "product_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "tag_id", referencedColumnName = "id")) private Set<Tag> tags = new HashSet<>(); @OneToMany(mappedBy = "product") @JsonIgnore private Set<OrderDesc> orderDesc; // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public Product name(String name) { this.name = name; return this; } public void setName(String name) { this.name = name; } public String getProductCode() { return productCode; } public Product productCode(String productCode) { this.productCode = productCode; return this; } public void setProductCode(String productCode) { this.productCode = productCode; } public Long getPrice() { return price; } public Product price(Long price) { this.price = price; return this; } public void setPrice(Long price) { this.price = price; } public Long getFinalPrice() { return finalPrice; } public Product finalPrice(Long finalPrice) { this.finalPrice = finalPrice; return this; } public void setFinalPrice(Long finalPrice) { this.finalPrice = finalPrice; } public Double getDiscount() { return discount; } public Product discount(Double discount) { this.discount = discount; return this; } public void setDiscount(Double discount) { this.discount = discount; } public String getReleaseType() { return releaseType; } public Product releaseType(String releaseType) { this.releaseType = releaseType; return this; } public void setReleaseType(String releaseType) { this.releaseType = releaseType; } public String getReleaseStatus() { return releaseStatus; } public Product releaseStatus(String releaseStatus) { this.releaseStatus = releaseStatus; return this; } public void setReleaseStatus(String releaseStatus) { this.releaseStatus = releaseStatus; } public String getDescription() { return description; } public Product description(String description) { this.description = description; return this; } public void setDescription(String description) { this.description = description; } public String getMaterialDesc() { return materialDesc; } public Product materialDesc(String materialDesc) { this.materialDesc = materialDesc; return this; } public void setMaterialDesc(String materialDesc) { this.materialDesc = materialDesc; } public String getSlug() { return slug; } public Product slug(String slug) { this.slug = slug; return this; } public void setSlug(String slug) { this.slug = slug; } public Boolean isIsValid() { return isValid; } public Product isValid(Boolean isValid) { this.isValid = isValid; return this; } public void setIsValid(Boolean isValid) { this.isValid = isValid; } public String getCreatedBy() { return createdBy; } public Product createdBy(String createdBy) { this.createdBy = createdBy; return this; } public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } public Long getCreatedDate() { return createdDate; } public Product createdDate(Long createdDate) { this.createdDate = createdDate; return this; } public void setCreatedDate(Long createdDate) { this.createdDate = createdDate; } public String getModifiedBy() { return modifiedBy; } public Product modifiedBy(String modifiedBy) { this.modifiedBy = modifiedBy; return this; } public void setModifiedBy(String modifiedBy) { this.modifiedBy = modifiedBy; } public Long getModifiedDate() { return modifiedDate; } public Product modifiedDate(Long modifiedDate) { this.modifiedDate = modifiedDate; return this; } public void setModifiedDate(Long modifiedDate) { this.modifiedDate = modifiedDate; } public Category getCategory() { return category; } public Product category(Category category) { this.category = category; return this; } public void setCategory(Category category) { this.category = category; } public Set<Media> getMedia() { return media; } public Product media(Set<Media> media) { this.media = media; return this; } public Product addMedia(Media media) { this.media.add(media); media.getProducts().add(this); return this; } public Product removeMedia(Media media) { this.media.remove(media); media.getProducts().remove(this); return this; } public void setMedia(Set<Media> media) { this.media = media; } public Set<ProductSize> getProductSizes() { return productSizes; } public Product productSizes(Set<ProductSize> productSizes) { this.productSizes = productSizes; return this; } public Product addProductSize(ProductSize productSize) { this.productSizes.add(productSize); productSize.getProducts().add(this); return this; } public Product removeProductSize(ProductSize productSize) { this.productSizes.remove(productSize); productSize.getProducts().remove(this); return this; } public void setProductSizes(Set<ProductSize> productSizes) { this.productSizes = productSizes; } public Set<Tag> getTags() { return tags; } public Product tags(Set<Tag> tags) { this.tags = tags; return this; } public Product addTag(Tag tag) { this.tags.add(tag); tag.getProducts().add(this); return this; } public Product removeTag(Tag tag) { this.tags.remove(tag); tag.getProducts().remove(this); return this; } public void setTags(Set<Tag> tags) { this.tags = tags; } public Set<OrderDesc> getOrderDesc() { return orderDesc; } public void setOrderDesc(Set<OrderDesc> orderDesc) { this.orderDesc = orderDesc; } // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Product)) { return false; } return id != null && id.equals(((Product) o).id); } @Override public int hashCode() { return 31; } @Override public String toString() { return "Product{" + "id=" + getId() + ", name='" + getName() + "'" + ", productCode='" + getProductCode() + "'" + ", price=" + getPrice() + ", finalPrice=" + getFinalPrice() + ", discount=" + getDiscount() + ", releaseType='" + getReleaseType() + "'" + ", releaseStatus='" + getReleaseStatus() + "'" + ", description='" + getDescription() + "'" + ", materialDesc='" + getMaterialDesc() + "'" + ", slug='" + getSlug() + "'" + ", isValid='" + isIsValid() + "'" + ", createdBy='" + getCreatedBy() + "'" + ", createdDate=" + getCreatedDate() + ", modifiedBy='" + getModifiedBy() + "'" + ", modifiedDate=" + getModifiedDate() + "}"; } }
[ "wlminus.dev@gmail.com" ]
wlminus.dev@gmail.com
d203957ad6a245d26a971e76a63c5bf489e594fc
6797cf0a46f26f0e39dceea36a7e2cc4c232f1d2
/jclouds-sphereon-storage/src/main/java/org/jclouds/sphereon/storage/binders/BindGetOptionsToRequest.java
07625bedb1604387cdbb829e0722aee80576d349
[ "Apache-2.0" ]
permissive
Sphereon-Opensource/jclouds
80657f91c1b92a06ed5c79e88d9244fbb964b9fe
24fcb03a1478c19c76002d49dda2d9ee1cafc3da
refs/heads/develop
2023-05-13T23:19:16.456960
2020-03-09T22:47:49
2020-03-09T22:47:49
111,580,705
0
0
null
2021-06-07T17:44:34
2017-11-21T17:31:21
Java
UTF-8
Java
false
false
1,497
java
/* * Copyright 2017 Sphereon B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jclouds.sphereon.storage.binders; import org.jclouds.blobstore.options.GetOptions; import org.jclouds.http.HttpRequest; import org.jclouds.rest.Binder; import java.net.URI; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; public class BindGetOptionsToRequest implements Binder { @Override public <R extends HttpRequest> R bindToRequest(R request, Object input) { checkArgument(checkNotNull(input, "input") instanceof GetOptions, "this binder is only valid for GetOptions"); checkNotNull(request, "request"); GetOptions options = GetOptions.class.cast(input); URI requestEndpoint = request.getEndpoint(); String path = requestEndpoint.getPath(); request = (R) request.toBuilder().replacePath(path).build(); return request; } }
[ "nklomp@sphereon.com" ]
nklomp@sphereon.com
5e9aa9ddd5787cfa6f3e74d2aa86e5d85c2a0d43
d37646893a087ad0d1df0b396315df8a95f224f1
/kwejkapp/src/main/java/pl/akademiakodu/kwejkapp/service/MemNotFoundException.java
fb7b93d97fee863c74f68e78a760330d3ba7fac8
[]
no_license
mstankiewicz1/kwejk_app
85172d051aafd0783d9e15277873a8298bdeb5b1
0a83c85120740c4aee7f5e3b22c63a6a0a637c29
refs/heads/master
2021-01-01T20:43:56.349486
2017-07-31T18:46:32
2017-07-31T18:46:32
98,035,701
0
0
null
null
null
null
UTF-8
Java
false
false
281
java
package pl.akademiakodu.kwejkapp.service; import org.springframework.web.bind.annotation.ExceptionHandler; /** * Created by itml on 24.06.2017. */ public class MemNotFoundException extends Exception { public MemNotFoundException(){ super("Mem not found"); } }
[ "marekstankiewicz6@wp.pl" ]
marekstankiewicz6@wp.pl
c8fcb16d87c74b0785b74e8fe180aa5a8267a00a
545f84c61ef403588da0cfd6ddfe25c0415dbdb4
/JavaRushTasks/1.JavaSyntax/src/com/javarush/task/task09/task0911/Solution.java
3e91bece6fc4a10900be9cf61058d57be99efb67
[ "Apache-2.0" ]
permissive
Rodriguez111/JavaRush
562751e68237f36f32ea6b9d37c3c95e01f6b5e5
8d70f5353087301e674acef1316b9a523202ad3f
refs/heads/master
2020-04-12T00:04:57.960891
2019-01-06T01:46:25
2019-01-06T01:46:25
140,509,243
0
0
null
null
null
null
UTF-8
Java
false
false
570
java
package com.javarush.task.task09.task0911; import java.util.HashMap; /* Исключение при работе с коллекциями Map */ public class Solution { public static void main(String[] args) throws Exception { try { HashMap<String, String> map = new HashMap<String, String>(null); map.put(null, null); map.remove(null); } catch(NullPointerException i) { System.out.println("NullPointerException"); } //напишите тут ваш код } }
[ "dreamhunter1@ukr.net" ]
dreamhunter1@ukr.net
0d6de4c3fad76aa6c1fedaeae16fe7cb946d309a
b3c8ee2cd40381c6068e660a852bdae68f7179e4
/DesertWar_CSC413/SoundEffect/Sound.java
0793164311dcd0cb5bdc63542901ee7559f045e9
[]
no_license
iamsaadb/Software-Development
8a5eed3c03eb04603ca894208be88c7e36ab1d0d
d026a5679b44584fc4e516363e07af962d1efb1a
refs/heads/master
2020-03-28T19:27:51.694847
2018-09-17T05:28:51
2018-09-17T05:28:51
148,978,882
0
0
null
null
null
null
UTF-8
Java
false
false
823
java
package SoundEffect; import java.applet.Applet; import java.applet.AudioClip; import java.net.URL; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import DesertWar.DesertWarGame; public class Sound { public static void player (String file, boolean isLoop){ try{ URL link = DesertWarGame.getTankGame().getClass().getClassLoader().getResource(file); AudioClip clip = Applet.newAudioClip(link); if(isLoop){ AudioInputStream inputStream = AudioSystem.getAudioInputStream(link); Clip clipLoop = AudioSystem.getClip(); clipLoop.open(inputStream); clipLoop.loop(Clip.LOOP_CONTINUOUSLY); }else{clip.play();} }catch(Exception e){ System.err.print(e+"ad sound class"); } } }
[ "33384287+iamsaadb@users.noreply.github.com" ]
33384287+iamsaadb@users.noreply.github.com
5d6e698c151fc8d95b12936fe2c8d59e7fce2b7c
a5cc8b9765db129b941b6b22b5a9b712510c2420
/src/ch02/ex12/StringStreamElementCounter.java
204787cf54b589cece74d9c13fab3fd0ea0e4da4
[]
no_license
hishijima56/java8-2016
ce985e02909c91f3d3dec75ba1fadd668d13cc98
658adc8d4ade8a86b872cdf46392e78316d8afff
refs/heads/master
2021-01-12T13:27:53.128899
2017-03-16T23:45:57
2017-03-16T23:45:57
69,833,903
0
0
null
null
null
null
UTF-8
Java
false
false
1,387
java
/* * $Header: $ * $Revision: $ * $Date: $ */ package ch02.ex12; import java.util.Objects; import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.stream.IntStream; import java.util.stream.Stream; /** * 練習問題02_12 * @author Hidetoshi Ishijima * * @version $Revision: $ $Date: $ * @since 2016/11/17 */ public class StringStreamElementCounter { /** * {@link AtomicIntegerArray} */ private AtomicIntegerArray atomicCountArray; /** * 指定されたストリームに対して指定された文字数以下の要素数を返します。 * @param stream stream * @param length 指定文字数 * @return 指定文字数ごとの要素数の配列 */ public int[] countElementLength(Stream<String> stream, int length) { Objects.requireNonNull(stream); if (length < 0) { throw new IllegalArgumentException("lengthは0以上を設定して下さい。"); } atomicCountArray = new AtomicIntegerArray(length+1); stream.parallel().forEach(s -> { if (s.length() <= length) { atomicCountArray.getAndIncrement(s.length()); } }); int[] intArray = new int[atomicCountArray.length()]; IntStream.range(0, length+1).forEach(i -> intArray[i] = atomicCountArray.get(i)); return intArray; } }
[ "hidetoshi.ishijima56@gmail.com" ]
hidetoshi.ishijima56@gmail.com
6310edabe5605ef1146e85617ec1b33c84dac113
5c8d97f44f30686f5bc50d1903f5c3a40367cfc9
/src/test/java/ru/netology/repositoryTest/RepositoryTest.java
1e38e998a13f656d1bfa96e793079f06bbfb5ac0
[]
no_license
ElenaGorshenina/Java15.1
e3e70db3032cb83950a5ab397db8e89c5833140f
8d8cb34f412043f74638d50858f789217b463aed
refs/heads/master
2023-07-05T00:34:49.572011
2021-08-27T20:02:29
2021-08-27T20:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,773
java
package ru.netology.repositoryTest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import ru.netology.domain.Issue; import ru.netology.repository.Repository; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; public class RepositoryTest { private Repository repository = new Repository(); private Issue issue1 = new Issue(1, 2020_08_12_10, "Petrov", "bag1", "Petrov", true); private Issue issue2 = new Issue(2, 2020_08_15_01, "Petrov", "bag2", "Petrov", false); private Issue issue3 = new Issue(3, 2020_08_16_12, "Petrov", "bag3", "Petrov", true); @BeforeEach public void setUp() { repository.save(issue1); repository.save(issue2); repository.save(issue3); } @Test void saveIssueTest() { Collection<Issue> issues = new ArrayList<>(); issues.add(new Issue()); issues.add(new Issue()); repository.saveAll(issues); } @Test void removeByIdTest() { repository.removeById(2); Collection<Issue> actual = repository.findAll(); Collection<Issue> expected = Arrays.asList(issue1, issue3); assertEquals(expected, actual); } @Test void closedIssueTest() { Collection<Issue> actual = repository.closedIssue(); Collection<Issue> expected = Arrays.asList(issue1, issue3); assertEquals(expected, actual); } @Test void openedIssueTest() { Collection<Issue> actual = repository.openedIssue(); Collection<Issue> expected = Arrays.asList(issue2); assertEquals(expected, actual); } }
[ "elenkagorshenina19.07.14@gmail.com" ]
elenkagorshenina19.07.14@gmail.com
4259636c5a848a6bf325752bc9fbb87192dedb76
a999cc261a3fee3b41fcdc14f6ab88efaac41f58
/src/framework/JOGLFrame.java
9fe53e4af0b641dbcfafa4b914bbb0df16c688f3
[ "MIT" ]
permissive
duke-compsci344-spring2015/jogl_framework
75c0b038f91f341b1df54eb19233db90d2989d2c
b393331e271d293ae1894f4d4291ac1646abfd84
refs/heads/master
2021-01-10T18:53:04.208737
2015-01-22T20:45:28
2015-01-22T20:45:28
29,699,037
0
0
null
null
null
null
UTF-8
Java
false
false
2,438
java
package framework; import java.awt.Dimension; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLProfile; import javax.media.opengl.awt.GLJPanel; import javax.swing.JFrame; import com.jogamp.opengl.util.AnimatorBase; import com.jogamp.opengl.util.FPSAnimator; /** * Simply creates a frame for viewing OpenGL application in Java. * * This file should only need to be modified if extra user interface capabilities are required. * * @author Robert C. Duvall */ @SuppressWarnings("serial") public class JOGLFrame extends JFrame { public static final Dimension DEFAULT_SIZE = new Dimension(600, 600); public static final int FPS = 25; public JOGLFrame (Scene scene) { this(scene, DEFAULT_SIZE); } public JOGLFrame (Scene scene, Dimension size) { // create OpenGL classes // if you need something specific to your platform, add it here GLCapabilities caps = new GLCapabilities(GLProfile.getDefault()); // these should remain pretty much fixed for all applications GLJPanel canvas = new GLJPanel(caps); final AnimatorBase animator = new FPSAnimator(canvas, FPS); Listener listener = new Listener(scene, animator); // manage OpenGL canvas canvas.addGLEventListener(listener); canvas.addKeyListener(listener); canvas.setPreferredSize(size); // create titled window to view animation JFrame frame = new JFrame(listener.getTitle()); frame.addWindowListener(new WindowAdapter() { @Override public void windowClosing (WindowEvent e) { shutDown(animator); } }); frame.getContentPane().add(canvas); frame.pack(); frame.setVisible(true); // start thread to drive animation animator.start(); // allow for key events canvas.requestFocus(); } private void shutDown (final AnimatorBase animator) { // Run this on another thread than the AWT event queue to // make sure the call to Animator.stop() completes before // exiting (otherwise causes locks on some systems). new Thread(new Runnable() { @Override public void run () { animator.stop(); System.exit(0); } }).start(); } }
[ "robertcduvall@gmail.com" ]
robertcduvall@gmail.com
3439402cb9a56a8b92b699dc716b3bc56123f852
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_38207.java
ae28a2e38ab5a31c4bd45a57b6bdd5a15c6778e3
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
214
java
/** * Sets ID value for given entity. */ public void setIdValue(final E object,final Object value){ final String propertyName=getIdPropertyName(); BeanUtil.declared.setProperty(object,propertyName,value); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
6ef0390def42ed1eddb51f0feab3dd61de4a1cd5
6d56ab8bc591e2f7aa9198e5dcce76865ba261a3
/app/src/main/java/com/example/diancan/tabfragment/Tab2Fragment.java
5d8410b0031a4af9d9adc44e4c39c7d81f160eca
[]
no_license
huangxjgit/diancan
bc811b1357c51253b7b592294d1060e03cef8b0f
24928d78c802ddd6ac25d265edb309543649656a
refs/heads/master
2020-12-05T06:28:05.556008
2020-01-21T02:44:56
2020-01-21T02:44:56
232,035,106
0
0
null
null
null
null
UTF-8
Java
false
false
975
java
package com.example.diancan.tabfragment; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.example.diancan.R; public class Tab2Fragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_tab2, container, false); } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); } @Override public void onResume() { super.onResume(); } @Override public void onPause() { super.onPause(); } @Override public void onDestroy() { super.onDestroy(); } }
[ "2250016889@qq.com" ]
2250016889@qq.com
827698d91163a3c36cecccd1a14f6a7e01699c1c
cec628def1aad94ccbefa814d2a0dbd51588e9bd
/mercurial.remote/src/org/netbeans/modules/mercurial/remote/ui/branch/CreateBranchAction.java
600247343a94511568ff55e5f7f1873bd6cf1b35
[]
no_license
emilianbold/netbeans-releases
ad6e6e52a896212cb628d4522a4f8ae685d84d90
2fd6dc84c187e3c79a959b3ddb4da1a9703659c7
refs/heads/master
2021-01-12T04:58:24.877580
2017-10-17T14:38:27
2017-10-17T14:38:27
78,269,363
30
15
null
2020-10-13T08:36:08
2017-01-07T09:07:28
null
UTF-8
Java
false
false
6,247
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved. * * Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (collectively, the * "License"). You may not use this file except in compliance with the * License. You can obtain a copy of the License at * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the * specific language governing permissions and limitations under the * License. When distributing the software, include this License Header * Notice in each file and include the License file at * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * Contributor(s): * * The Original Software is NetBeans. The Initial Developer of the Original * Software is Sun Microsystems, Inc. Portions Copyright 1997-2009 Sun * Microsystems, Inc. All Rights Reserved. * * If you wish your version of this file to be governed by only the CDDL * or only the GPL Version 2, indicate your decision by adding * "[Contributor] elects to include this software in this distribution * under the [CDDL or GPL Version 2] license." If you do not indicate a * single choice of license, a recipient has the option to distribute * your version of this file under either the CDDL, the GPL Version 2 or * to extend the choice of license to its licensees as provided above. * However, if you add GPL Version 2 code and therefore, elected the GPL * Version 2 license, then the option applies only if the new code is * made subject to such option by the copyright holder. */ package org.netbeans.modules.mercurial.remote.ui.branch; import org.netbeans.modules.mercurial.remote.HgException; import org.netbeans.modules.mercurial.remote.HgProgressSupport; import org.netbeans.modules.mercurial.remote.Mercurial; import org.netbeans.modules.mercurial.remote.OutputLogger; import org.netbeans.modules.mercurial.remote.WorkingCopyInfo; import org.netbeans.modules.mercurial.remote.ui.actions.ContextAction; import org.netbeans.modules.mercurial.remote.util.HgCommand; import org.netbeans.modules.mercurial.remote.util.HgUtils; import org.netbeans.modules.versioning.core.api.VCSFileProxy; import org.netbeans.modules.versioning.core.spi.VCSContext; import org.openide.DialogDisplayer; import org.openide.NotifyDescriptor; import org.openide.awt.ActionID; import org.openide.awt.ActionRegistration; import org.openide.nodes.Node; import org.openide.util.NbBundle; import org.openide.util.NbBundle.Messages; import org.openide.util.RequestProcessor; @ActionID(id = "org.netbeans.modules.mercurial.remote.ui.branch.CreateBranchAction", category = "MercurialRemote") @ActionRegistration(displayName = "#CTL_MenuItem_CreateBranch") @Messages({ "CTL_MenuItem_CreateBranch=Create &Branch...", "CTL_PopupMenuItem_CreateBranch=Create Branch..." }) public class CreateBranchAction extends ContextAction { @Override protected boolean enable(Node[] nodes) { return HgUtils.isFromHgRepository(HgUtils.getCurrentContext(nodes)); } @Override protected String getBaseName(Node[] nodes) { return "CTL_MenuItem_CreateBranch"; // NOI18N } @Override @Messages({ "# {0} - branch name", "MSG_CREATE_WC_MARKED=Working copy marked as branch {0}.\nDo not forget to commit to make the branch permanent." }) protected void performContextAction(Node[] nodes) { VCSContext ctx = HgUtils.getCurrentContext(nodes); final VCSFileProxy roots[] = HgUtils.getActionRoots(ctx); if (roots == null || roots.length == 0) { return; } final VCSFileProxy root = Mercurial.getInstance().getRepositoryRoot(roots[0]); CreateBranch createBranch = new CreateBranch(); if (!createBranch.showDialog()) { return; } final String branchName = createBranch.getBranchName(); RequestProcessor rp = Mercurial.getInstance().getRequestProcessor(root); HgProgressSupport support = new HgProgressSupport() { @Override public void perform() { OutputLogger logger = getLogger(); try { logger.outputInRed(NbBundle.getMessage(CreateBranchAction.class, "MSG_CREATE_TITLE")); //NOI18N logger.outputInRed(NbBundle.getMessage(CreateBranchAction.class, "MSG_CREATE_TITLE_SEP")); //NOI18N logger.output(NbBundle.getMessage(CreateBranchAction.class, "MSG_CREATE_INFO_SEP", branchName, root.getPath())); //NOI18N HgCommand.markBranch(root, branchName, logger); WorkingCopyInfo.refreshAsync(root); DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message( Bundle.MSG_CREATE_WC_MARKED(branchName), NotifyDescriptor.INFORMATION_MESSAGE)); logger.output(Bundle.MSG_CREATE_WC_MARKED(branchName)); } catch (HgException.HgCommandCanceledException ex) { // canceled by user, do nothing } catch (HgException ex) { HgUtils.notifyException(ex); } logger.outputInRed(NbBundle.getMessage(CreateBranchAction.class, "MSG_CREATE_DONE")); // NOI18N logger.output(""); // NOI18N } }; support.start(rp, root, org.openide.util.NbBundle.getMessage(CreateBranchAction.class, "MSG_CreateBranch_Progress", branchName)); //NOI18N } }
[ "alexvsimon@netbeans.org" ]
alexvsimon@netbeans.org
601a43a4d145170200977dc7674829ea49aac8f4
7e90375e3381f487aec0fd7eaf1c7842a92cf399
/app/src/main/java/com/example/practise/bean/HistoryListBean.java
0da687f81fa3ab253beaacd6eb90a4906425f56a
[]
no_license
seehin/Android_Browser
1e0461579e997e33a94932918e530743ec0ec9bf
da2a58fe649cf7c134c0574b9a1706a18e8e4638
refs/heads/main
2023-06-25T20:18:34.351859
2021-07-23T05:20:29
2021-07-23T05:20:29
385,469,332
1
0
null
null
null
null
UTF-8
Java
false
false
1,490
java
package com.example.practise.bean; import java.io.Serializable; import java.util.LinkedList; import java.util.List; public class HistoryListBean implements Serializable,Comparable<HistoryListBean> { /** * 该属性用于通过重写CompareTo方法来做集合排序,且该属性是时间的的int的形式, * 例如time=2021-09-01,则sort=20210901 */ private int sort; private String time; private List<HistoryRecordBean> listOfDay = new LinkedList<>(); public void setTimeAndSort(String time){ this.time = time; //在定义时间时就定义了sort属性 this.sort = Integer.parseInt(time.replace("-","")); } public void setTimeToday(String time){ this.time = "今天 - "+time; this.sort = Integer.parseInt(time.replace("-","")); } public void setListOfDay(List<HistoryRecordBean> listOfDay){ this.listOfDay = listOfDay; } public int getSort(){ return this.sort; } public String getTime(){ return this.time; } public List<HistoryRecordBean> getListOfDay(){ return this.listOfDay; } @Override public int compareTo(HistoryListBean h) { return h.getSort() - this.sort; } @Override public String toString() { return "HistoryListBean{" + "sort=" + sort + ", time='" + time + '\'' + ", listOfDay=" + listOfDay + '}'; } }
[ "13025167216@163.com" ]
13025167216@163.com
ce10f636399936563f8177c24d7a550d94547a84
04c3b738a76cdaa495834265fbcc6189bcfb6ac1
/app/src/main/java/ifrs/pw3/trabalhowebiii/adapter/LinhaConsultaAdapter.java
c27d52a64981e788991227e210075d65d5dcdb16
[]
no_license
trickvg/TrabalhoWebIII
da0650ac6d0f4dec63f3825d7e1f144c67a89740
7394eb2e7c970cd891d1898a80d5b081c4244132
refs/heads/master
2020-03-28T08:33:50.570251
2018-12-04T22:26:01
2018-12-04T22:26:01
147,973,576
0
0
null
null
null
null
UTF-8
Java
false
false
6,705
java
package ifrs.pw3.trabalhowebiii.adapter; import android.content.Context; import android.content.Intent; import android.support.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.Button; import android.widget.TextView; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.ValueEventListener; import java.util.ArrayList; import ifrs.pw3.trabalhowebiii.view.AtualizarEventoActivity; import ifrs.pw3.trabalhowebiii.view.ListarEventoActivity; import ifrs.pw3.trabalhowebiii.R; import ifrs.pw3.trabalhowebiii.view.*; import ifrs.pw3.trabalhowebiii.view.SearchActivity; import ifrs.pw3.trabalhowebiii.dao.ConfiguraFirebase; import ifrs.pw3.trabalhowebiii.model.Evento; public class LinhaConsultaAdapter extends BaseAdapter { //Cria objeto LayoutInflater para ligar com a View activity_linha.xml private static LayoutInflater layoutInflater = null; ArrayList<Evento> eventos = new ArrayList<>(); //Cria objeto do tipo que lista as tarefas ListarEventoActivity listarEventos; private SearchActivity pesquisarEventos; //Construtor que recebe a ativida como parametro e a lista de tarefas que vai retornar do BD public LinhaConsultaAdapter(ListarEventoActivity listarEventos, ArrayList<Evento> eventos) { this.eventos = eventos; this.listarEventos = listarEventos; this.layoutInflater = (LayoutInflater) this.listarEventos.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } public LinhaConsultaAdapter(SearchActivity pesquisarEventos, ArrayList<Evento> eventos) { this.eventos = eventos; this.pesquisarEventos = pesquisarEventos; this.layoutInflater = (LayoutInflater) this.pesquisarEventos.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } //Retorna a quantidade de objetos que sta na lista @Override public int getCount() { return eventos.size(); } @Override public Object getItem(int position) { return position; } @Override public long getItemId(int position) { return position; } //Método converte os valoes de um item da lista de Tarefas para uma linha do ListView @Override public View getView(final int position, View convertView, ViewGroup parent) { //Cria um objeto para acessar o layout activity_linha.xml final View viewLinhaLista = layoutInflater.inflate(R.layout.activity_linha, null); //vincula os campos do arquivo de layout aos objetos cadastrados final TextView textViewTituloEvento = viewLinhaLista.findViewById(R.id.textViewTituloEvento); final TextView textViewDescricaoEvento = viewLinhaLista.findViewById(R.id.textViewDescricaoEvento); final TextView textViewLocalEvento = viewLinhaLista.findViewById(R.id.textViewLocalEvento); final TextView textViewHorarioEvento = viewLinhaLista.findViewById(R.id.textViewHorarioEvento); final TextView textViewDataEvento = viewLinhaLista.findViewById(R.id.textViewDataEvento); textViewTituloEvento.setText(eventos.get(position).getTitulo_evento()); textViewDescricaoEvento.setText(eventos.get(position).getDescricao_evento()); textViewLocalEvento.setText(String.valueOf(eventos.get(position).getLocal_evento())); textViewHorarioEvento.setText(String.valueOf(eventos.get(position).getHorario_evento())); textViewDataEvento.setText(String.valueOf(eventos.get(position).getData_evento())); if (pesquisarEventos != null) { Button buttonExcluir = viewLinhaLista.findViewById(R.id.buttonExcluir); buttonExcluir.setVisibility(View.INVISIBLE); Button buttonEditar = viewLinhaLista.findViewById(R.id.buttonEditar); buttonEditar.setVisibility(View.INVISIBLE); } if (listarEventos != null) { Button buttonExcluir = viewLinhaLista.findViewById(R.id.buttonExcluir); Button buttonEditar = viewLinhaLista.findViewById(R.id.buttonEditar); // //Criando evento para excluir um registro do BD buttonExcluir.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String mensagem = "Registro excluído com sucesso!"; //usa o objeto evento para fazer a exclusão final Evento evento = eventos.get(position); final DatabaseReference reference = ConfiguraFirebase.getNo("eventos"); reference.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { if (!eventos.isEmpty()) { eventos.remove(position); reference.child(evento.getId_evento()).removeValue(); notifyList(); } } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } }); //Criando evento para editar um registro do BD buttonEditar.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //EXERCÍCIO FAZER A TAREFA DE EDIÇÃO USANDO A LÓGICA DA EXCLUSÃO final Evento evento = eventos.get(position); Intent intent = new Intent(listarEventos, AtualizarEventoActivity.class); intent.putExtra("id_evento",evento.getId_evento()); intent.putExtra("titulo_evento",textViewTituloEvento.getText()); intent.putExtra("descricao_evento",textViewDescricaoEvento.getText()); intent.putExtra("local_evento", textViewLocalEvento.getText()); intent.putExtra("horario_evento", textViewHorarioEvento.getText()); intent.putExtra("data_evento", textViewDataEvento.getText()); // Log.d("msg", "2"); listarEventos.startActivity(intent); // // // // } }); //ajustar com método } return viewLinhaLista; } private void notifyList() { this.notifyDataSetChanged(); } }
[ "patrick.garcia@aluno.poa.ifrs.edu.br" ]
patrick.garcia@aluno.poa.ifrs.edu.br
2dbf6b5febc3700db3aa522f5d19ee0fbc80f9ed
c9e4f2ad74d3431ebdb6106c18ca37bc16324a1e
/model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/correlator/correlation/TestCorrelators.java
f9e1d4073c639b93a7e7c7ca295c16474a6cda85
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "EUPL-1.2", "LicenseRef-scancode-proprietary-license", "CDDL-1.0", "GPL-1.0-or-later", "MPL-2.0", "EPL-1.0", "MIT" ]
permissive
mythoss/midpoint
187886f802d4907a449635571e5b6d74e587b09d
834b78d89fc7e423fdf52f0fece19a24ec4e5f27
refs/heads/master
2022-06-08T18:42:30.197500
2022-05-09T15:22:07
2022-05-09T15:22:07
188,239,507
0
0
Apache-2.0
2019-05-23T13:27:48
2019-05-23T13:27:47
null
UTF-8
Java
false
false
9,212
java
/* * Copyright (C) 2010-2022 Evolveum and contributors * * This work is dual-licensed under the Apache License 2.0 * and European Union Public License. See LICENSE file for details. */ package com.evolveum.midpoint.model.impl.correlator.correlation; import com.evolveum.midpoint.model.api.correlator.*; import com.evolveum.midpoint.model.impl.AbstractInternalModelIntegrationTest; import com.evolveum.midpoint.model.impl.correlation.CorrelationCaseManager; import com.evolveum.midpoint.model.impl.correlator.CorrelatorTestUtil; import com.evolveum.midpoint.model.test.idmatch.DummyIdMatchServiceImpl; import com.evolveum.midpoint.model.impl.correlator.idmatch.IdMatchCorrelatorFactory; import com.evolveum.midpoint.schema.constants.SchemaConstants; import com.evolveum.midpoint.schema.processor.ResourceObjectTypeDefinition; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.schema.util.MatchingUtil; import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.test.DummyTestResource; import com.evolveum.midpoint.test.util.MidPointTestConstants; import com.evolveum.midpoint.util.exception.*; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.testng.annotations.Test; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; import static org.assertj.core.api.Assertions.assertThat; /** * Isolated testing of individual correlators. * * The tests are based on {@link #FILE_ACCOUNTS} with source data plus expected correlation results. * See the description in the file itself. * * Correlation cases: tests if they are created (or not), but does not check their content. * This is done in {@link TestExpressionCorrelator}. */ @ContextConfiguration(locations = { "classpath:ctx-model-test-main.xml" }) @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) public class TestCorrelators extends AbstractInternalModelIntegrationTest { protected static final File TEST_DIR = new File(MidPointTestConstants.TEST_RESOURCES_DIR, "correlator/correlation/correlators"); private static final DummyTestResource RESOURCE_DETERMINISTIC = new DummyTestResource( TEST_DIR, "resource-dummy-correlation.xml", "4a7f6b3e-64cc-4cd9-b5ba-64ecc47d7d10", "correlation", CorrelatorTestUtil::createAttributeDefinitions); /** * Contains data for executing the tests. Please see comments in the file itself. */ private static final File FILE_ACCOUNTS = new File(TEST_DIR, "accounts.csv"); /** * Users against which we correlate the accounts. */ private static final File FILE_USERS = new File(TEST_DIR, "users.xml"); private static final File[] CORRELATOR_FILES = { new File(TEST_DIR, "correlator-emp.xml"), new File(TEST_DIR, "correlator-emp-fn.xml"), new File(TEST_DIR, "correlator-emp-fn-opt.xml"), new File(TEST_DIR, "correlator-owner.xml"), new File(TEST_DIR, "correlator-owner-ref.xml"), new File(TEST_DIR, "correlator-id-match.xml") }; @Autowired private CorrelatorFactoryRegistry correlatorFactoryRegistry; @Autowired private IdMatchCorrelatorFactory idMatchCorrelatorFactory; @Autowired private CorrelationCaseManager correlationCaseManager; /** Used for correlation context construction. */ private ResourceObjectTypeDefinition resourceObjectTypeDefinition; /** Used for correlation context construction. */ private SystemConfigurationType systemConfiguration; /** Used by the `id-match` correlator instead of real ID Match Service. */ private final DummyIdMatchServiceImpl dummyIdMatchService = new DummyIdMatchServiceImpl(); /** Correlator instances for configurations loaded from {@link #CORRELATOR_FILES}. */ private final Map<String, Correlator> correlatorMap = new HashMap<>(); /** Fetched testing accounts. */ private List<CorrelationTestingAccount> allAccounts; @Override public void initSystem(Task initTask, OperationResult initResult) throws Exception { super.initSystem(initTask, initResult); this.systemConfiguration = getSystemConfiguration(); initDummyResource(RESOURCE_DETERMINISTIC, initTask, initResult); importObjectsFromFileNotRaw(FILE_USERS, initTask, initResult); CorrelatorTestUtil.addAccountsFromCsvFile(this, FILE_ACCOUNTS, RESOURCE_DETERMINISTIC); allAccounts = CorrelatorTestUtil.getAllAccounts( this, RESOURCE_DETERMINISTIC, CorrelationTestingAccount::new, initTask, initResult); initDummyIdMatchService(); instantiateCorrelators(initTask, initResult); resourceObjectTypeDefinition = RESOURCE_DETERMINISTIC.controller.getRefinedSchema() .findObjectTypeDefinitionRequired(ShadowKindType.ACCOUNT, SchemaConstants.INTENT_DEFAULT); } /** * We need specific records in our ID Match service. */ private void initDummyIdMatchService() throws SchemaException { ShadowType ian200 = CorrelatorTestUtil.findAccount(allAccounts, 200).getShadow(); dummyIdMatchService.addRecord("200", ian200.getAttributes(), "9481", null); idMatchCorrelatorFactory.setServiceOverride(dummyIdMatchService); } private void instantiateCorrelators(Task task, OperationResult result) throws CommonException, IOException { for (File correlatorFile : CORRELATOR_FILES) { AbstractCorrelatorType configBean = prismContext.parserFor(correlatorFile) .parseRealValue(AbstractCorrelatorType.class); CorrelatorContext<?> correlatorContext = new CorrelatorContext<>( CorrelatorConfiguration.typed(configBean), configBean, null, systemConfiguration ); Correlator correlator = correlatorFactoryRegistry.instantiateCorrelator( correlatorContext, task, result); correlatorMap.put(configBean.getName(), correlator); } } /** * Sequentially processes all accounts, pushing them to correlator and checking its response. */ @Test public void test100ProcessAccounts() throws CommonException { given(); Task task = getTestTask(); OperationResult result = task.getResult(); for (CorrelationTestingAccount account : allAccounts) { processAccount(account, task, result); } } private void processAccount(CorrelationTestingAccount account, Task task, OperationResult result) throws CommonException { when("correlating account #" + account.getNumber()); String correlatorName = Objects.requireNonNull( account.getCorrelator(), "no correlator specified"); Correlator correlator = Objects.requireNonNull( correlatorMap.get(correlatorName), () -> "unknown correlator " + correlatorName); UserType preFocus = new UserType(prismContext); MatchingUtil.copyAttributes(preFocus, account.getShadow()); CorrelationContext context = new CorrelationContext( account.getShadow(), preFocus, RESOURCE_DETERMINISTIC.getResource().asObjectable(), resourceObjectTypeDefinition, systemConfiguration, task); then("correlating account #" + account.getNumber()); CorrelationResult correlationResult = correlator.correlate(context, result); assertCorrelationResult(correlationResult, account, result); } private void assertCorrelationResult( CorrelationResult correlationResult, CorrelationTestingAccount account, OperationResult result) throws SchemaException { displayDumpable("Correlation result", correlationResult); assertThat(correlationResult.getSituation()) .as("correlation result status") .isEqualTo(account.getExpectedCorrelationSituation()); if (correlationResult.getSituation() == CorrelationSituationType.EXISTING_OWNER) { ObjectType realOwner = correlationResult.getOwner(); assertThat(realOwner).as("correlated owner").isNotNull(); String expectedOwnerName = account.getExpectedOwnerName(); assertThat(realOwner.getName().getOrig()).as("owner name").isEqualTo(expectedOwnerName); } CaseType correlationCase = correlationCaseManager.findCorrelationCase(account.getShadow(), false, result); if (account.shouldCorrelationCaseExist()) { assertThat(correlationCase).as("correlation case").isNotNull(); displayDumpable("Correlation case", correlationCase); } else { assertThat(correlationCase).as("correlation case").isNull(); } } }
[ "mederly@evolveum.com" ]
mederly@evolveum.com
45312c4f16d60cf8b38e62b1038d1963c04e1b82
74b47b895b2f739612371f871c7f940502e7165b
/aws-java-sdk-comprehend/src/main/java/com/amazonaws/services/comprehend/model/transform/StopTargetedSentimentDetectionJobResultJsonUnmarshaller.java
aef9a8f2cdb979b2d5414d6932209040a76882f1
[ "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
3,323
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.comprehend.model.transform; import java.math.*; import javax.annotation.Generated; import com.amazonaws.services.comprehend.model.*; import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import com.fasterxml.jackson.core.JsonToken; import static com.fasterxml.jackson.core.JsonToken.*; /** * StopTargetedSentimentDetectionJobResult JSON Unmarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StopTargetedSentimentDetectionJobResultJsonUnmarshaller implements Unmarshaller<StopTargetedSentimentDetectionJobResult, JsonUnmarshallerContext> { public StopTargetedSentimentDetectionJobResult unmarshall(JsonUnmarshallerContext context) throws Exception { StopTargetedSentimentDetectionJobResult stopTargetedSentimentDetectionJobResult = new StopTargetedSentimentDetectionJobResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return stopTargetedSentimentDetectionJobResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("JobId", targetDepth)) { context.nextToken(); stopTargetedSentimentDetectionJobResult.setJobId(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("JobStatus", targetDepth)) { context.nextToken(); stopTargetedSentimentDetectionJobResult.setJobStatus(context.getUnmarshaller(String.class).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return stopTargetedSentimentDetectionJobResult; } private static StopTargetedSentimentDetectionJobResultJsonUnmarshaller instance; public static StopTargetedSentimentDetectionJobResultJsonUnmarshaller getInstance() { if (instance == null) instance = new StopTargetedSentimentDetectionJobResultJsonUnmarshaller(); return instance; } }
[ "" ]
60380d5efdf7f98ad3b9e0f7de6b6dc78b975671
d49487a7cee5ff5180cc3322b6963b6f54ac1529
/javaFundamentals2/src/javaFundamentals2/ForLoop.java
f967ea4448e9dbe536418c126b7935f191cc3ff4
[]
no_license
Haripriya-42/Dragon
b0f1c56b7ec227c05a9bc9f18d776f5cf352f2dd
000bae509b910a07cb725928046a5c37ed7fc49e
refs/heads/master
2020-09-04T22:31:10.979572
2019-11-06T05:15:33
2019-11-06T05:15:33
219,910,232
0
0
null
null
null
null
UTF-8
Java
false
false
230
java
package javaFundamentals2; public class ForLoop { public static void main(String[] args) { for(int i=0; i<3; i++) { System.out.println("Hello Java..." +i); System.out.println("I have done...!"); } } }
[ "hariipriyah@gmail.com" ]
hariipriyah@gmail.com
7f4555426ea8558dd382e424edf8b07f15ade57e
315401f900b9b24149ccb0dce6b71c01fe59b2dd
/src/main/java/designpatterns/observer/core/Observer.java
31eda87adeb4ce484799f230f40046142332ada3
[]
no_license
zuokangshuai/DesignPatterns
6de84ea592671a27e5c8bdace4e18b783e5c4049
87ab4322556f1d76b51e34a72fc334175a6430ea
refs/heads/master
2020-04-07T19:00:23.489441
2019-01-04T09:07:27
2019-01-04T09:07:27
158,632,730
0
0
null
null
null
null
UTF-8
Java
false
false
247
java
package designpatterns.observer.core; /** * @description 观察者 * @author Kangshuai Zuo * @date 2018/12/20 14:06 */ public interface Observer { /** * 变化通知方法 */ void update(NumberGenerator numberGenerator); }
[ "1355516886@qq.com" ]
1355516886@qq.com
f87d9cbea228944f623a88339fd5c42f000ece65
c26b5ca06f80eb2087312fcd4c84408d54770871
/src/com/service/model/Carsale.java
b065543a9ce9156a0c5557d29de94f43a19ea014
[]
no_license
jbhaskar19/JANANI-BHASKAR-ITMD515-GROUP8
907341fc4ea473de1bc50f749b41ec163e865c69
e8666934f8eca0717682c9b9f0934870a4e682cd
refs/heads/master
2020-03-13T16:22:29.122438
2018-04-26T18:40:19
2018-04-26T18:40:19
131,196,309
0
0
null
null
null
null
UTF-8
Java
false
false
2,828
java
package com.service.model; // Generated Mar 31, 2018 2:39:19 AM by Hibernate Tools 5.2.8.Final import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; /** * Carsale generated by hbm2java */ @Entity @Table(name="carsale" ,catalog="ITMD_515" ) public class Carsale implements java.io.Serializable { private String sid; private String csid; private String dsId; private String VId; private String price; private String orderDate; private String delivaryDate; private String status; public Carsale() { } public Carsale(String sid, String csid, String dsId, String VId) { this.sid = sid; this.csid = csid; this.dsId = dsId; this.VId = VId; } public Carsale(String sid, String csid, String dsId, String VId, String price, String orderDate, String delivaryDate, String status) { this.sid = sid; this.csid = csid; this.dsId = dsId; this.VId = VId; this.price = price; this.orderDate = orderDate; this.delivaryDate = delivaryDate; this.status = status; } @Id @Column(name="SID", unique=true, nullable=false, length=45) public String getSid() { return this.sid; } public void setSid(String sid) { this.sid = sid; } @Column(name="CSID", nullable=false, length=45) public String getCsid() { return this.csid; } public void setCsid(String csid) { this.csid = csid; } @Column(name="DS_ID", nullable=false, length=45) public String getDsId() { return this.dsId; } public void setDsId(String dsId) { this.dsId = dsId; } @Column(name="V_ID", nullable=false, length=45) public String getVId() { return this.VId; } public void setVId(String VId) { this.VId = VId; } @Column(name="price", length=45) public String getPrice() { return this.price; } public void setPrice(String price) { this.price = price; } @Column(name="OrderDate", length=45) public String getOrderDate() { return this.orderDate; } public void setOrderDate(String orderDate) { this.orderDate = orderDate; } @Column(name="DelivaryDate", length=45) public String getDelivaryDate() { return this.delivaryDate; } public void setDelivaryDate(String delivaryDate) { this.delivaryDate = delivaryDate; } @Column(name="status", length=45) public String getStatus() { return this.status; } public void setStatus(String status) { this.status = status; } }
[ "jbhaskar@hawk.iit.edu" ]
jbhaskar@hawk.iit.edu
5888684762aaba1b4b729efb1bd574b6c9b434c5
f80b4323bf718cb46c867067cd5f8a67c8998c08
/src/main/java/com/basho/riak/client/util/pb/RiakMessageCodes.java
54f00ef56caba986d2f422830eec7c026dc1594c
[]
no_license
debabrata-tripathy/riak-java-client
138da9067efe0c8f7319de1c8ce26875c2ef02dd
aa0c05d6c0c70adbcbc11d3c20f7659b0c661b75
refs/heads/master
2021-04-09T13:08:51.191013
2013-08-20T04:32:16
2013-08-20T04:32:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,021
java
/* * Copyright 2013 Basho Technologies Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.basho.riak.client.util; /** * PBC API message code constants. * @since 1.0 */ public interface RiakMessageCodes { public static final byte MSG_ErrorResp = 0; public static final byte MSG_PingReq = 1; public static final byte MSG_PingResp = 2; public static final byte MSG_GetClientIdReq = 3; public static final byte MSG_GetClientIdResp = 4; public static final byte MSG_SetClientIdReq = 5; public static final byte MSG_SetClientIdResp = 6; public static final byte MSG_GetServerInfoReq = 7; public static final byte MSG_GetServerInfoResp = 8; public static final byte MSG_GetReq = 9; public static final byte MSG_GetResp = 10; public static final byte MSG_PutReq = 11; public static final byte MSG_PutResp = 12; public static final byte MSG_DelReq = 13; public static final byte MSG_DelResp = 14; public static final byte MSG_ListBucketsReq = 15; public static final byte MSG_ListBucketsResp = 16; public static final byte MSG_ListKeysReq = 17; public static final byte MSG_ListKeysResp = 18; public static final byte MSG_GetBucketReq = 19; public static final byte MSG_GetBucketResp = 20; public static final byte MSG_SetBucketReq = 21; public static final byte MSG_SetBucketResp = 22; public static final byte MSG_MapRedReq = 23; public static final byte MSG_MapRedResp = 24; public static final byte MSG_IndexReq = 25; public static final byte MSG_IndexResp = 26; }
[ "roach@basho.com" ]
roach@basho.com
283f4c277f08095fac96669b18a673d74ebfbc6b
b78d96a8660f90649035c7a6d6698cabb2946d62
/solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/StartUpCostCurve.java
e859124576151451d7c163051627f9998b95952f
[ "MIT" ]
permissive
suchaoxiao/ttc2017smartGrids
d7b677ddb20a0adc74daed9e3ae815997cc86e1a
2997f1c202f5af628e50f5645c900f4d35f44bb7
refs/heads/master
2021-06-19T10:21:22.740676
2017-07-14T12:13:22
2017-07-14T12:13:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,651
java
/** */ package CIM.IEC61970.Informative.MarketOperations; import CIM.IEC61970.Core.Curve; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Start Up Cost Curve</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link CIM.IEC61970.Informative.MarketOperations.StartUpCostCurve#getGeneratingBids <em>Generating Bids</em>}</li> * <li>{@link CIM.IEC61970.Informative.MarketOperations.StartUpCostCurve#getRegisteredGenerators <em>Registered Generators</em>}</li> * </ul> * * @see CIM.IEC61970.Informative.MarketOperations.MarketOperationsPackage#getStartUpCostCurve() * @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='Startup costs and time as a function of down time. Relationship between unit startup cost (Y1-axis) and unit startup time (Y2-axis) vs. unit elapsed down time (X-axis).'" * annotation="http://langdale.com.au/2005/UML Profile\040documentation='Startup costs and time as a function of down time. Relationship between unit startup cost (Y1-axis) and unit startup time (Y2-axis) vs. unit elapsed down time (X-axis).'" * annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='Startup costs and time as a function of down time. Relationship between unit startup cost (Y1-axis) and unit startup time (Y2-axis) vs. unit elapsed down time (X-axis).' Profile\040documentation='Startup costs and time as a function of down time. Relationship between unit startup cost (Y1-axis) and unit startup time (Y2-axis) vs. unit elapsed down time (X-axis).'" * @generated */ public interface StartUpCostCurve extends Curve { /** * Returns the value of the '<em><b>Generating Bids</b></em>' reference list. * The list contents are of type {@link CIM.IEC61970.Informative.MarketOperations.GeneratingBid}. * It is bidirectional and its opposite is '{@link CIM.IEC61970.Informative.MarketOperations.GeneratingBid#getStartUpCostCurve <em>Start Up Cost Curve</em>}'. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Generating Bids</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Generating Bids</em>' reference list. * @see CIM.IEC61970.Informative.MarketOperations.MarketOperationsPackage#getStartUpCostCurve_GeneratingBids() * @see CIM.IEC61970.Informative.MarketOperations.GeneratingBid#getStartUpCostCurve * @model opposite="StartUpCostCurve" * @generated */ EList<GeneratingBid> getGeneratingBids(); /** * Returns the value of the '<em><b>Registered Generators</b></em>' reference list. * The list contents are of type {@link CIM.IEC61970.Informative.MarketOperations.RegisteredGenerator}. * It is bidirectional and its opposite is '{@link CIM.IEC61970.Informative.MarketOperations.RegisteredGenerator#getStartUpCostCurves <em>Start Up Cost Curves</em>}'. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Registered Generators</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Registered Generators</em>' reference list. * @see CIM.IEC61970.Informative.MarketOperations.MarketOperationsPackage#getStartUpCostCurve_RegisteredGenerators() * @see CIM.IEC61970.Informative.MarketOperations.RegisteredGenerator#getStartUpCostCurves * @model opposite="StartUpCostCurves" * @generated */ EList<RegisteredGenerator> getRegisteredGenerators(); } // StartUpCostCurve
[ "hinkel@fzi.de" ]
hinkel@fzi.de
706523925d63ce654463aa8ce1168dfdcafa539b
68177a12480bb1e877a3237399819ef04514fc89
/src/main/java/com/example/mooclist/JobEntityRepository.java
91bbac858bce453ceb211c8c2a4c1529acd660fd
[]
no_license
carolgschwend/MoocList
ab97fc3a250d0e288c6a0ecc25f8eddae08e2697
e2aa74041b6c8a3be84da1d4b62566a967d66285
refs/heads/master
2021-08-29T19:35:11.350925
2017-12-14T19:33:48
2017-12-14T19:33:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
326
java
package com.example.mooclist; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.List; public interface JobEntityRepository extends JpaRepository<JobEntity, String> { List<JobEntity> findAll(); List<JobEntity> findAllById(Integer id); }
[ "carol.gschwend@gmail.com" ]
carol.gschwend@gmail.com
7757a96ff9b39a49eec3f610be5fef47c92810f9
5a73698dad1d41e12c7b775fde6bfa2f7dad943a
/jhotdraw/src/main/java/org/jhotdraw/draw/io/TextInputFormat.java
6e24d46e076f4e08a3a69440df3b55a7e9007fee
[]
no_license
harkomal-chana/tools
f8ed1c738708eb6040a12695895cb7b3bfbbb761
f7c53d1864fca555f0178e3061678602e26c3a48
refs/heads/master
2020-04-19T15:49:27.416108
2016-09-22T03:28:45
2016-09-22T03:28:45
66,535,135
0
1
null
null
null
null
UTF-8
Java
false
false
7,578
java
/* * @(#)TextInputFormat.java * * Copyright (c) 1996-2010 The authors and contributors of JHotDraw. * You may not use, copy or modify this file, except in compliance with the * accompanying license terms. */ package org.jhotdraw.draw.io; import org.jhotdraw.gui.filechooser.ExtensionFileFilter; import org.jhotdraw.draw.*; import java.awt.datatransfer.*; import java.awt.geom.*; import java.io.*; import java.net.URI; import java.util.*; import javax.swing.*; import org.jhotdraw.geom.Dimension2DDouble; /** * An input format for importing text into a drawing. * <p> * This class uses the prototype design pattern. A TextHolderFigure figure is used * as a prototype for creating a figure that holds the imported text. * <p> * For text that spans multiple lines, TextInputFormat can either add all the * text to the same Figure, or it can create a new Figure for each line. * * <hr> * <b>Design Patterns</b> * * <p><em>Prototype</em><br> * The text input format creates new text holder figures by cloning a prototype figure * object and assigning an image to it, which was read from data input. * That's the reason why {@code Figure} extends the {@code Cloneable} interface. * <br> * Prototype: {@link TextHolderFigure}; Client: {@link org.jhotdraw.draw.io.TextInputFormat}. * <hr> * * @author Werner Randelshofer * @version $Id: TextInputFormat.java 785 2013-12-01 19:16:30Z rawcoder $ */ public class TextInputFormat implements InputFormat { /** * The prototype for creating a figure that holds the imported text. */ private TextHolderFigure prototype; /** * Format description used for the file filter. */ private String description; /** * File name extension used for the file filter. */ private String fileExtension; /** * Image IO image format name. */ private String formatName; /** * This should be set to true for ImageHolderFigures that can hold multiple * lines of text. */ private boolean isMultiline; /** Creates a new image output format for text, for a figure that can not. * hold multiple lines of text. */ public TextInputFormat(TextHolderFigure prototype) { this(prototype, "Text", "Text", "txt", false); } /** Creates a new image output format for the specified image format. * * @param formatName The format name for the javax.imageio.ImageIO object. * @param description The format description to be used for the file filter. * @param fileExtension The file extension to be used for file filter. * @param isMultiline Set this to true, if the TextHolderFigure can hold * multiple lines of text. If this is true, multiple lines of text are * added to the same figure. If this is false, a new Figure is created for * each line of text. */ public TextInputFormat(TextHolderFigure prototype, String formatName, String description, String fileExtension, boolean isMultiline) { this.prototype = prototype; this.formatName = formatName; this.description = description; this.fileExtension = fileExtension; this.isMultiline = isMultiline; } @Override public javax.swing.filechooser.FileFilter getFileFilter() { return new ExtensionFileFilter(description, fileExtension); } public String getFileExtension() { return fileExtension; } @Override public JComponent getInputFormatAccessory() { return null; } @Override public void read(URI uri, Drawing drawing) throws IOException { read(new File(uri), drawing); } @Override public void read(URI uri, Drawing drawing, boolean replace) throws IOException { read(new File(uri), drawing, replace); } public void read(File file, Drawing drawing) throws IOException { read(file, drawing, true); } public void read(File file, Drawing drawing, boolean replace) throws IOException { InputStream in = new FileInputStream(file); try { read(in, drawing, replace); } finally { in.close(); } } @Override public void read(InputStream in, Drawing drawing, boolean replace) throws IOException { if (replace) { drawing.removeAllChildren(); } drawing.basicAddAll(0, createTextHolderFigures(in)); } public LinkedList<Figure> createTextHolderFigures(InputStream in) throws IOException { LinkedList<Figure> list = new LinkedList<Figure>(); BufferedReader r = new BufferedReader(new InputStreamReader(in, "UTF8")); if (isMultiline) { TextHolderFigure figure = (TextHolderFigure) prototype.clone(); StringBuilder buf = new StringBuilder(); for (String line = null; line != null; line = r.readLine()) { if (buf.length() != 0) { buf.append('\n'); } buf.append(line); } figure.setText(buf.toString()); Dimension2DDouble s = figure.getPreferredSize(); figure.setBounds( new Point2D.Double(0, 0), new Point2D.Double( s.width, s.height)); } else { double y = 0; for (String line = null; line != null; line = r.readLine()) { TextHolderFigure figure = (TextHolderFigure) prototype.clone(); figure.setText(line); Dimension2DDouble s = figure.getPreferredSize(); figure.setBounds( new Point2D.Double(0, y), new Point2D.Double( s.width, s.height)); list.add(figure); y += s.height; } } if (list.size() == 0) { throw new IOException("No text found"); } return list; } @Override public boolean isDataFlavorSupported(DataFlavor flavor) { return flavor.equals(DataFlavor.stringFlavor); } @Override public void read(Transferable t, Drawing drawing, boolean replace) throws UnsupportedFlavorException, IOException { String text = (String) t.getTransferData(DataFlavor.stringFlavor); LinkedList<Figure> list = new LinkedList<Figure>(); if (isMultiline) { TextHolderFigure figure = (TextHolderFigure) prototype.clone(); figure.setText(text); Dimension2DDouble s = figure.getPreferredSize(); figure.willChange(); figure.setBounds( new Point2D.Double(0, 0), new Point2D.Double( s.width, s.height)); figure.changed(); list.add(figure); } else { double y = 0; for (String line : text.split("\n")) { TextHolderFigure figure = (TextHolderFigure) prototype.clone(); figure.setText(line); Dimension2DDouble s = figure.getPreferredSize(); y += s.height; figure.willChange(); figure.setBounds( new Point2D.Double(0, 0 + y), new Point2D.Double( s.width, s.height + y)); figure.changed(); list.add(figure); } } if (replace) { drawing.removeAllChildren(); } drawing.addAll(list); } }
[ "harkomal.chana@gmail.com" ]
harkomal.chana@gmail.com
23836cba485bec164ad81c7ecdca55e2ab2e39c1
3f98c0f3ec10e05f9d44f1341607d017ce2e2368
/src/test/java/com/zeni/Day07Test.java
cb718f15059ebca073a7d5588183d5bcf7446d2b
[]
no_license
Zenigata/advent-of-code-2020
1b91726cf30f978e77ba6008ead4d406a4dee57f
22650008b73d7a8e889c7a16f89e147e3715c840
refs/heads/master
2023-01-31T21:39:23.824358
2020-12-15T17:22:34
2020-12-15T17:22:34
317,564,298
0
0
null
null
null
null
UTF-8
Java
false
false
3,331
java
package com.zeni; import static org.junit.Assert.assertEquals; import java.io.IOException; import java.net.URISyntaxException; import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.zeni.day07.Day07; import com.zeni.day07.LuggageProcessing; import com.zeni.day07.LuggageRule; import org.junit.Test; public class Day07Test { @Test public void should_have_no_rule() throws URISyntaxException, IOException { LuggageProcessing luggageProcessing = new LuggageProcessing(getRules("day07/one.txt")); long result = luggageProcessing.findUniqueContainersFor("shiny gold"); assertEquals(0, result); } @Test public void should_have_some_rules() throws URISyntaxException, IOException { LuggageProcessing luggageProcessing = new LuggageProcessing(getRules("day07/basic.txt")); long result = luggageProcessing.findUniqueContainersFor("shiny gold"); assertEquals(4, result); } @Test public void should_have_a_lot_of_rules() throws URISyntaxException, IOException { LuggageProcessing luggageProcessing = new LuggageProcessing(getRules("day07/input.txt")); long result = luggageProcessing.findUniqueContainersFor("shiny gold"); assertEquals(19, result); } @Test public void should_verify_another_implementation_part_1() throws URISyntaxException, IOException { List<String> allBags = getRules2("day07/input.txt"); Day07 day = new Day07(); long result = day.bagThatCouldCarryAShinyGoldBag(allBags); assertEquals(289, result); } @Test public void should_verify_another_implementation_part_2() throws URISyntaxException, IOException { List<String> allBags = getRules2("day07/input.txt"); Day07 day = new Day07(); int result = day.bagsInOneShinyGoldBag(allBags); assertEquals(30055, result); } private List<String> getRules2(String filePath) throws URISyntaxException, IOException { URL url = Thread.currentThread().getContextClassLoader().getResource(filePath); Path path = Paths.get(url.toURI()); return Files.readAllLines(path); } private Map<String, List<LuggageRule>> getRules(String filePath) throws URISyntaxException, IOException { URL url = Thread.currentThread().getContextClassLoader().getResource(filePath); Path path = Paths.get(url.toURI()); Map<String, List<LuggageRule>> rules = new HashMap<>(); for (String raw : Files.readAllLines(path)) { List<LuggageRule> children = new ArrayList<>(); if (!raw.contains("contain no other bags")) { String[] split = raw.substring(raw.indexOf("contain") + 7).split(","); for (String ruleRaw : split) { String text = ruleRaw.trim(); LuggageRule rule = new LuggageRule(text.substring(text.indexOf(" ") + 1, text.indexOf(" bag")), new ArrayList<>()); children.add(rule); } } rules.put(raw.substring(0, raw.indexOf(" bags")), children); } return rules; } }
[ "johan.bonneau@zenika.com" ]
johan.bonneau@zenika.com
ec23c2607c6553dd7696c1efbf0f874720afe8b1
8453ecec9e90b9be390dcdaa1b220ad7f08a9ff1
/src/com/example/utils/myapplication.java
c1a369f0a06dcbcf8df3d1ab8141cf5fd2af5872
[]
no_license
sdgdsffdsfff/salescould
c4839c17a3d594133dbfd3873c88fea6bb9b32f8
b21520e5bcf664258ed0fd2e88e16bc191d80bd7
refs/heads/master
2020-12-31T02:48:48.817685
2014-05-13T02:46:02
2014-05-13T02:46:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,248
java
/** * 全局application,为什么要用application,主要是因为这就像一个session, * 用于临时保存各种传值,服务器url,如果用数据库或者其他的操作来保存这些 * 数据的话管理起来就很繁琐,而且也不利于程序的运行速度。 * */ package com.example.utils; import java.io.InputStream; import java.util.LinkedList; import java.util.List; import android.annotation.SuppressLint; import android.app.Activity; import android.app.Application; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.StrictMode; public class myapplication extends Application { private int mainselitem; public int getMainselitem() { return mainselitem; } public void setMainselitem(int mainselitem) { this.mainselitem = mainselitem; } private UsersDBManager UsersDBManager1; private SystemDBManager SystemDBManager1; private SubmitDBManager submitDBManager1; /** * 为了完全退出程序调用方法 myapplication1.getInstance().addActivity(this); * myapplication1.getInstance().exit(); */ private static myapplication instance; private List<Activity> activityList = new LinkedList<Activity>(); public myapplication() { } // 单例模式获取唯一的MyApplication实例 public static myapplication getInstance() { if (null == instance) { instance = new myapplication(); } return instance; } // 添加Activity到容器中 public void addActivity(Activity activity) { activityList.add(activity); } // 遍历所有Activity并finish public void exit() { for (Activity activity : activityList) { activity.finish(); } System.exit(0); } /** * 为了完全退出程序 */ /*** * localhost是服务器ip地址的设置 */ private String localhost; public String getlocalhost() { return SystemDBManager1.localhost(); } private String userid; public String getUserid() { return userid; } public void setUserid(String userid) { this.userid = userid; } private String companycode; public String getCompanycode() { return companycode; } public void setCompanycode(String companycode) { this.companycode = companycode; } /*** * 全局地区选择 */ private String diqu = ""; public String getdiqu() { return diqu; } public void setdiqu(String diqu) { this.diqu = diqu; } /*** * categoryurl是分类的地址查询提交地址 */ private String customerurl = "/android/json_customer/list.php?channel_id=2&parent_id=0&page="; public String getcustomerurl() { return customerurl; } public void setcustomerurl(String customerurl) { this.customerurl = customerurl; } /*** * articleurl是新闻地址查询提交地址 */ private String articleurl; public String getarticleurl() { return articleurl; } public void setarticleurl(String articleurl) { this.articleurl = articleurl; } /*** * goodsurl是菜的自定义url提交地址 */ private String goodsurl = "/android/json_goods/list.php?channel_id=2&page="; public String getgoodsurl() { return goodsurl; } public void setgoodsurl(String goodsurl) { this.goodsurl = goodsurl; } /** * goodslikeurl喜欢的url提交地址 */ private String goodslikeurl = "/android/json_goods/list.php?channel_id=2&id="; public String getgoodslikeurl() { return goodslikeurl; } public void setgoodslikeurl(String goodslikeurl) { this.goodslikeurl = goodslikeurl; } /*** * 总金额 */ private String totalmoney = "0"; public String gettotalmoney() { return totalmoney; } public void settotalmoney(String totalmoney) { this.totalmoney = totalmoney; } /*** * 订餐总数 */ private String totalgoods = "0"; public String gettotalgoods() { return totalgoods; } public void settotalgoods(String totalgoods) { this.totalgoods = totalgoods; } /*** * 订餐详情 */ private String totalgoods_id_num = ""; public String gettotalgoods_id_num() { return totalgoods_id_num; } public void settotalgoods_id_num(String totalgoods_id_num) { this.totalgoods_id_num = totalgoods_id_num; } /*** * 全局判断用户是否登录 * * @return */ public boolean ifpass() { if (UsersDBManager1.ifpass()) { return true; } return false; } public String getusername() { String usernameString = UsersDBManager1.username(); return usernameString; } /** * 全局订单设置 */ private String dingdanString = ""; public void set_dingdansring(String dingdanString) { this.dingdanString = dingdanString; } public String get_dingdanstring() { return dingdanString; } /** * 下订单,当在购物车中点确认订单时,就新建一个基本订单,当单击确认预定时做更新操作 * * @param dingdanString */ public void createding(String dingdanString) { submitDBManager1.createding(dingdanString); } /** * 删除订单 * * @param dingdanString */ public void deleteding(String dingdanString) { submitDBManager1.deleteding(dingdanString); } /** * 读取图片 * * @param url * @return */ public Bitmap bitmap(String url) { StreamTool StreamTool1 = new StreamTool(); try { InputStream isInputStream = StreamTool1.getis(getlocalhost() + url); Bitmap bitmap = BitmapFactory.decodeStream(isInputStream); isInputStream.close(); return bitmap; } catch (Exception e) { e.printStackTrace(); } return null; } @SuppressLint("NewApi") @Override public void onCreate() { // TODO Auto-generated method stub super.onCreate(); UsersDBManager1 = new UsersDBManager(this); SystemDBManager1 = new SystemDBManager(this); submitDBManager1 = new SubmitDBManager(this); // 初始化全局变量 try { /** * 添加网络权限,安卓4.03必须 */ StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads().detectDiskWrites().detectNetwork() .penaltyLog().build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() .detectLeakedSqlLiteObjects().detectLeakedClosableObjects() .penaltyLog().penaltyDeath().build()); /** * 添加网络权限,安卓4.03必须 */ } catch (Exception e) { e.printStackTrace(); } } }
[ "dzyang1017@gmail.com" ]
dzyang1017@gmail.com
37c393e73830d6c49d8bde950e47a0f489108e0b
50911521d9164ff666af1aa19509c78977bc84ad
/ImoocNewsOne/src/com/czj/imoocnews/SimpleAdapte.java
fe6920b4cde42ad750c03f1b46f76aa6b1fb5488
[]
no_license
gjl19900424/testAsync
32c3788d02ec1f8775d313fb22e14a9df43ed2a6
1f077a671287d7bc442829df92318b5768970e61
refs/heads/master
2020-06-11T06:46:04.188655
2019-06-26T10:19:11
2019-06-26T10:19:11
193,880,745
0
0
null
null
null
null
UTF-8
Java
false
false
3,189
java
package com.czj.imoocnews; import java.util.List; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AbsListView; import android.widget.AbsListView.OnScrollListener; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; public class SimpleAdapte extends BaseAdapter implements OnScrollListener { private List<NewsBean> list; private LayoutInflater minflater; private ImageLoader mImageLoader; private int mStart, mEnd; public static String[] URLs; private boolean mFirstIn; public SimpleAdapte(Context context, List<NewsBean> list, ListView listView) { this.list = list; minflater = LayoutInflater.from(context); mImageLoader = new ImageLoader(listView); URLs = new String[list.size()]; for (int i = 0; i < list.size(); i++) { URLs[i] = list.get(i).picSmall; } mFirstIn = true; // 注册监听事件 listView.setOnScrollListener(this); } @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) { ViewHolder viewHolder; if (convertView == null) { viewHolder = new ViewHolder(); convertView = minflater.inflate(R.layout.item, null); viewHolder.title = (TextView) convertView .findViewById(R.id.lv_title); viewHolder.content = (TextView) convertView .findViewById(R.id.lv_content); viewHolder.iamge = (ImageView) convertView .findViewById(R.id.lv_image); convertView.setTag(viewHolder); } else { viewHolder = (ViewHolder) convertView.getTag(); } viewHolder.iamge.setImageResource(R.drawable.ic_launcher); String url = list.get(position).picSmall; viewHolder.iamge.setTag(url); // 传递url和imageview /* * new ImageLoader().ShowImageByThread(viewHolder.iamge, * list.get(position).picSmall); */ mImageLoader.ShowImageByAsyncTask(viewHolder.iamge, url); viewHolder.title.setText(list.get(position).name); viewHolder.content.setText(list.get(position).Title); return convertView; } class ViewHolder { private TextView title; private TextView content; private ImageView iamge; } // 滑动状态切换时候调用 @Override public void onScrollStateChanged(AbsListView view, int scrollState) { if (scrollState == SCROLL_STATE_IDLE) { // 闲置状态时 mImageLoader.loadImages(mStart, mEnd); } else { // 滑动时 mImageLoader.cancelAllTasks(); } } // 在滑动时调用 @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { // 第一个的可以见元素 mStart = firstVisibleItem; // 第一个可见的元素+可见元素的数量=可见的起始项; mEnd = visibleItemCount + firstVisibleItem; // 第一次显示的时候预加载 if (mFirstIn == true && visibleItemCount > 0) { mImageLoader.loadImages(mStart, mEnd); mFirstIn = false; } } }
[ "51991237+gjl19900424@users.noreply.github.com" ]
51991237+gjl19900424@users.noreply.github.com
89e2af5197c31bf454e54614310553beb3b9e874
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/com/avito/android/feedback_adverts/FeedbackAdvertsInteractor.java
92576064c4abb150990004087b242c7dbbd02545
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
1,158
java
package com.avito.android.feedback_adverts; import com.avito.android.remote.feedback.FeedbackAdvertItem; import io.reactivex.Single; import java.util.List; import kotlin.Metadata; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0003\bf\u0018\u00002\u00020\u0001J-\u0010\t\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\b0\u00070\u00062\b\u0010\u0003\u001a\u0004\u0018\u00010\u00022\u0006\u0010\u0005\u001a\u00020\u0004H&¢\u0006\u0004\b\t\u0010\n¨\u0006\u000b"}, d2 = {"Lcom/avito/android/feedback_adverts/FeedbackAdvertsInteractor;", "", "", "itemId", "", "page", "Lio/reactivex/Single;", "", "Lcom/avito/android/remote/feedback/FeedbackAdvertItem;", "getFeedbackItems", "(Ljava/lang/String;I)Lio/reactivex/Single;", "feedback-adverts_release"}, k = 1, mv = {1, 4, 2}) public interface FeedbackAdvertsInteractor { @NotNull Single<List<FeedbackAdvertItem>> getFeedbackItems(@Nullable String str, int i); }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
4228d705f9164b0da048093c10a882aaa58593a7
004d37d74e0e6d84baad11dc0296279b21a2ee1d
/day1109/src/main/java/com/sist/dao/BookDAO.java
d1e81b6ff550f7f3ddb0d352062692cb39662cae
[]
no_license
123userkim/day1109
c631326b0f1fbd1a101aebcd4ce139cb3d1c5ec2
fae1edd85eaf6988d2df99c50e3bf1011edf00b4
refs/heads/master
2023-08-30T10:12:08.234892
2021-11-09T09:47:13
2021-11-09T09:47:13
425,746,628
0
0
null
null
null
null
UHC
Java
false
false
3,188
java
package com.sist.dao; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import com.sist.vo.BookVO; public class BookDAO { String driver = "oracle.jdbc.driver.OracleDriver"; String url = "jdbc:oracle:thin:@localhost:1521:XE"; String user = "c##madang"; String password = "madang"; //가격을 매개변수로 전달받아 그 가격 이하인 모든 도서목록을 검색하여 ArrayList로 반환하는 메소드 정의 public ArrayList<BookVO> searchBook(int price){ String sql = "select * from book where price <= ?"; ArrayList<BookVO> list = new ArrayList<BookVO>(); Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { Class.forName(driver); conn = DriverManager.getConnection(url, user, password); pstmt = conn.prepareStatement(sql); pstmt.setInt(1, price); rs = pstmt.executeQuery(); while(rs.next()) { list.add(new BookVO(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getInt(4))); } }catch (Exception e) { // TODO: handle exception }finally { try { if(rs != null) { rs.close(); } if(pstmt != null) { pstmt.close(); } if(conn != null) { conn.close(); } }catch (Exception e) { // TODO: handle exception } } return list; } public ArrayList<BookVO> searchPub(String publisher){ String sql = "select * from book where publisher = ? order by price desc"; ArrayList<BookVO> list = new ArrayList<BookVO>(); Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { Class.forName(driver); conn = DriverManager.getConnection(url, user, password); pstmt = conn.prepareStatement(sql); pstmt.setString(1, publisher); rs = pstmt.executeQuery(); while(rs.next()) { list.add(new BookVO(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getInt(4))); } }catch (Exception e) { // TODO: handle exception }finally { try { if(rs != null) { rs.close(); } if(pstmt != null) { pstmt.close(); } if(conn != null) { conn.close(); } }catch (Exception e) { // TODO: handle exception } } return list; } public ArrayList<BookVO> searchBook(int start, int end){ String sql = "select * from book where price between ? and ?"; ArrayList<BookVO> list = new ArrayList<BookVO>(); Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { Class.forName(driver); conn = DriverManager.getConnection(url, user, password); pstmt = conn.prepareStatement(sql); pstmt.setInt(1,start); pstmt.setInt(2,end); rs = pstmt.executeQuery(); while(rs.next()) { list.add(new BookVO(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getInt(4))); } }catch (Exception e) { // TODO: handle exception }finally { try { if(rs != null) { rs.close(); } if(pstmt != null) { pstmt.close(); } if(conn != null) { conn.close(); } }catch (Exception e) { // TODO: handle exception } } return list; } }
[ "khs17@DESKTOP-CGMNMTI" ]
khs17@DESKTOP-CGMNMTI
6640c4fe1fc4aed7d1b03b7d2ba167a797d8be0b
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes5.dex_source_from_JADX/com/facebook/graphql/deserializers/GraphQLStorySaveInfoDeserializer.java
6b758807392847fc684dab25565fb6ebdfa8d898
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
4,376
java
package com.facebook.graphql.deserializers; import com.facebook.flatbuffers.FlatBufferBuilder; import com.facebook.flatbuffers.MutableFlatBuffer; import com.facebook.graphql.enums.GraphQLSavedState; import com.facebook.graphql.enums.GraphQLStorySaveNuxType; import com.facebook.graphql.enums.GraphQLStorySaveType; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import java.nio.ByteBuffer; /* compiled from: mobile_platform_native_like_button */ public class GraphQLStorySaveInfoDeserializer { public static int m5976a(JsonParser jsonParser, FlatBufferBuilder flatBufferBuilder) { boolean[] zArr = new boolean[5]; int[] iArr = new int[2]; Enum[] enumArr = new Enum[3]; while (jsonParser.c() != JsonToken.END_OBJECT) { String i = jsonParser.i(); jsonParser.c(); if (!(jsonParser.g() == JsonToken.VALUE_NULL || i == null)) { if (i.equals("story_save_nux_max_consume_duration")) { zArr[0] = true; iArr[0] = jsonParser.E(); } else if (i.equals("story_save_nux_min_consume_duration")) { zArr[1] = true; iArr[1] = jsonParser.E(); } else if (i.equals("story_save_nux_type")) { zArr[2] = true; enumArr[0] = GraphQLStorySaveNuxType.fromString(jsonParser.o()); } else if (i.equals("story_save_type")) { zArr[3] = true; enumArr[1] = GraphQLStorySaveType.fromString(jsonParser.o()); } else if (i.equals("viewer_save_state")) { zArr[4] = true; enumArr[2] = GraphQLSavedState.fromString(jsonParser.o()); } else { jsonParser.f(); } } } flatBufferBuilder.c(5); if (zArr[0]) { flatBufferBuilder.a(0, iArr[0], 0); } if (zArr[1]) { flatBufferBuilder.a(1, iArr[1], 0); } if (zArr[2]) { flatBufferBuilder.a(2, enumArr[0]); } if (zArr[3]) { flatBufferBuilder.a(3, enumArr[1]); } if (zArr[4]) { flatBufferBuilder.a(4, enumArr[2]); } return flatBufferBuilder.d(); } public static MutableFlatBuffer m5977a(JsonParser jsonParser, short s) { FlatBufferBuilder flatBufferBuilder = new FlatBufferBuilder(128); int a = m5976a(jsonParser, flatBufferBuilder); if (1 != 0) { flatBufferBuilder.c(2); flatBufferBuilder.a(0, s, 0); flatBufferBuilder.b(1, a); a = flatBufferBuilder.d(); } flatBufferBuilder.d(a); ByteBuffer wrap = ByteBuffer.wrap(flatBufferBuilder.e()); wrap.position(0); MutableFlatBuffer mutableFlatBuffer = new MutableFlatBuffer(wrap, null, null, true, null); mutableFlatBuffer.a(4, Boolean.valueOf(true)); return mutableFlatBuffer; } public static void m5978a(MutableFlatBuffer mutableFlatBuffer, int i, JsonGenerator jsonGenerator) { jsonGenerator.f(); int a = mutableFlatBuffer.a(i, 0, 0); if (a != 0) { jsonGenerator.a("story_save_nux_max_consume_duration"); jsonGenerator.b(a); } a = mutableFlatBuffer.a(i, 1, 0); if (a != 0) { jsonGenerator.a("story_save_nux_min_consume_duration"); jsonGenerator.b(a); } if (mutableFlatBuffer.a(i, 2, (short) 0) != (short) 0) { jsonGenerator.a("story_save_nux_type"); jsonGenerator.b(((GraphQLStorySaveNuxType) mutableFlatBuffer.a(i, 2, GraphQLStorySaveNuxType.class)).name()); } if (mutableFlatBuffer.a(i, 3, (short) 0) != (short) 0) { jsonGenerator.a("story_save_type"); jsonGenerator.b(((GraphQLStorySaveType) mutableFlatBuffer.a(i, 3, GraphQLStorySaveType.class)).name()); } if (mutableFlatBuffer.a(i, 4, (short) 0) != (short) 0) { jsonGenerator.a("viewer_save_state"); jsonGenerator.b(((GraphQLSavedState) mutableFlatBuffer.a(i, 4, GraphQLSavedState.class)).name()); } jsonGenerator.g(); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
510f3fb4e0dbc8752c2b672a064e0ff61c212880
aa41007f9a355106dca113b90e9b8cac2c95a235
/BarChart/app/src/main/java/com/yemensoft/barchart/PieChartActivity.java
3de557f388a6cd5ab92ed7cc7f8794eccc79d37f
[]
no_license
Tasmiya92/Example-BarChart
79d41c5857f29f3198f0e9a70bccd4092b1f1466
552430937df934f06d38189b67ccb6c2b08c87ac
refs/heads/master
2021-01-12T07:52:33.733293
2016-12-21T12:03:56
2016-12-21T12:03:56
77,048,171
0
1
null
null
null
null
UTF-8
Java
false
false
1,773
java
package com.yemensoft.barchart; /** * Created by Tasmiya on 06-11-2016. */ import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import com.github.mikephil.charting.charts.PieChart; import com.github.mikephil.charting.data.Entry; import com.github.mikephil.charting.data.LineData; import com.github.mikephil.charting.data.LineDataSet; import com.github.mikephil.charting.data.PieData; import com.github.mikephil.charting.data.PieDataSet; import com.github.mikephil.charting.utils.ColorTemplate; import java.util.ArrayList; public class PieChartActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_piechart); PieChart pieChart = (PieChart) findViewById(R.id.chart); ArrayList<Entry> entries = new ArrayList<>(); entries.add(new Entry(4f, 0)); entries.add(new Entry(8f, 1)); entries.add(new Entry(6f, 2)); entries.add(new Entry(12f, 3)); entries.add(new Entry(18f, 4)); entries.add(new Entry(9f, 5)); PieDataSet dataset = new PieDataSet(entries, "# of Calls"); ArrayList<String> labels = new ArrayList<String>(); labels.add("January"); labels.add("February"); labels.add("March"); labels.add("April"); labels.add("May"); labels.add("June"); PieData data = new PieData(labels, dataset); dataset.setColors(ColorTemplate.COLORFUL_COLORS); // pieChart.setDescription("Description"); pieChart.setData(data); pieChart.animateY(5000); // pieChart.saveToGallery("/sd/mychart.jpg", 85); // 85 is the quality of the image } }
[ "tasmiya.gs92@gmail.com" ]
tasmiya.gs92@gmail.com
3fc0b59432298bb90d9f33fc9e879533904654d9
61a622eab52cbea805e9ccd5ffe92278cab04877
/Javanewfeature/src/main/java/luozix/start/action/concurrent/CyclicBarrierTest2.java
c14f6a7f8c70a871ee5bcf0318a4f691145d1726
[ "Apache-2.0" ]
permissive
renyiwei-xinyi/jmh-and-javanew
edbbd611c5365211fe2718cdddf3de5e3ffd6487
c70d5043420a2f7f8e500de076ad82f5df801756
refs/heads/master
2023-03-09T06:15:56.504278
2021-02-28T12:40:55
2021-02-28T12:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,040
java
/** * @Title: CyclicBarrierTest2.java * @Package luozix.start.action.concurrent * @Description: TODO(用一句话描述该文件做什么) * @author xiaoyu xiaoyulong07@outlook.com * @date 2021年2月6日 上午10:54:43 * @version V1.0 */ package luozix.start.action.concurrent; import java.util.concurrent.CyclicBarrier; /** * @ClassName: CyclicBarrierTest2 * @Description: TODO(这里用一句话描述这个类的作用) * @author xiaoyu xiaoyulong07@outlook.com * @date 2021年2月6日 上午10:54:43 * */ public class CyclicBarrierTest2 { static CyclicBarrier c = new CyclicBarrier(2, new A()); public static void main(String[] args) { new Thread(new Runnable() { @Override public void run() { try { c.await(); } catch (Exception e) { } System.out.println(1); } }).start(); try { c.await(); } catch (Exception e) { } System.out.println(2); } static class A implements Runnable { @Override public void run() { System.out.println(3); } } }
[ "xiaoyulong1988@gmail.com" ]
xiaoyulong1988@gmail.com
481b0f04b0a3862f413b7fc167793f1b00eb9811
552c8cd1d9315da64e83c9fda07d1d4e8d75a854
/files/ParametarizedConstructor/ParametarizedConstructor.java
6feff913a9d60423146fb2a2ae14f8586dc309f7
[ "MIT" ]
permissive
m301/JLFG
419bfc691d3e542687205de24917bb023a5df461
6e66c59dcdb1eef02e58f4b35df79123749bbca9
refs/heads/master
2020-12-02T23:51:59.385597
2017-07-01T10:34:53
2017-07-01T10:34:53
95,955,782
3
0
null
null
null
null
UTF-8
Java
false
false
336
java
public class ParametarizedConstructor{ public static void main(String args[]){ System.out.println("Non parametarized"); (new Server()).print();; System.out.println("\nParametarized with 1 param."); (new Server(80)).print(); System.out.println("\nParametarized with 2 param."); (new Server("c:\\",80)).print(); } }
[ "madhurendra@tikaj.com" ]
madhurendra@tikaj.com
45c891e81a58922450f7fdab59e19b64bb1b7980
e92224e5542c9080ed5413fe2b2fc7c672de320d
/tp5_ihm/src/tp2/SelecteurDeCouleur.java
9b236b5f31975cddd6d408597093a62c31c79565
[]
no_license
marouaneaba/Ihm
79d007c11410a019f62cb35529d7097616abd535
c14c7fc24e54d3ff71a874be04c9213a5b959066
refs/heads/master
2021-07-01T01:32:45.046184
2017-09-20T10:02:54
2017-09-20T10:02:54
104,198,292
0
0
null
null
null
null
UTF-8
Java
false
false
8,626
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 tp2; import java.awt.BorderLayout; import java.awt.Button; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.Label; import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JColorChooser; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.JTextField; import javax.swing.event.CaretEvent; import javax.swing.event.CaretListener; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; /** * * @author abk */ public class SelecteurDeCouleur extends JPanel { public JSlider slider1,slider2,slider3; public JTextField textField1,textField2,textField3,textField4; public JPanel panel1,panel2; public Box box1,box2,box3; public String Chainecolor,hexaColor; public int color1,color2,color3; public Color color; public Color color_r; public JColorChooser chooser; int nbr = 0; public SelecteurDeCouleur(){ //setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); slider1 = new JSlider(0,255); slider1.setPreferredSize(new Dimension(250,5)); slider1.setValue(0); slider2 = new JSlider(0,255); slider2.setValue(0); slider2.setPreferredSize(new Dimension(250,5)); slider3 = new JSlider(0,255); slider3.setValue(0); slider3.setPreferredSize(new Dimension(250,5)); textField1 = new JTextField("0"); textField1.setPreferredSize( new Dimension( 30, 24 ) ); textField2 = new JTextField("0"); textField3 = new JTextField("0"); textField4 = new JTextField("0"); panel1 = new JPanel(); panel2 = new JPanel(); JPanel panel3 = new JPanel(); Box b1 = Box.createHorizontalBox(); b1.add(slider1); b1.add(textField1); Box b2 = Box.createHorizontalBox(); b2.add(slider2); b2.add(textField2); Box b3 = Box.createHorizontalBox(); b3.add(slider3); b3.add(textField3); Box b4 = Box.createVerticalBox(); b4.setSize(2, 2); b4.setBackground(Color.red); b4.add(b1); b4.add(b2); b4.add(b3); panel1.add(b4); Box b1_1 = Box.createVerticalBox(); textField4.setPreferredSize( new Dimension( 3, 20 ) ); textField4.setMinimumSize(new Dimension(3,20)); textField4.setMaximumSize(new Dimension(170,20)); b1_1.add(textField4); b1_1.setPreferredSize(new Dimension(3,20)); Label l = new Label(); l.setPreferredSize(new Dimension(150, 150)); l.setBackground(Color.red); panel2.setLayout(new BorderLayout()); panel2.add(b1_1,BorderLayout.NORTH); panel2.add(l,BorderLayout.SOUTH); slider1.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { textField1.setText(""+slider1.getValue()); String hexa = Integer.toHexString(color_r.getRGB()); textField4.setText(hexa.substring(2)); } }); slider2.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { textField2.setText(""+slider2.getValue()); String hexa = Integer.toHexString(color_r.getRGB()); textField4.setText(hexa.substring(2)); } }); slider3.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { textField3.setText(""+slider3.getValue()); String hexa = Integer.toHexString(color_r.getRGB()); textField4.setText(hexa.substring(2)); } }); textField1.addCaretListener(new CaretListener() { @Override public void caretUpdate(CaretEvent e) { try{ color1 = Integer.parseInt(textField1.getText()); //color2 = Integer.parseInt(textField2.getText()); //color3 = Integer.parseInt(textField3.getText()); slider1.setValue(Integer.parseInt(textField1.getText())); color_r = new Color(color1,color2,color3); l.setBackground(color_r); String hexa = Integer.toHexString(color_r.getRGB()); textField4.setText(hexa.substring(2)); }catch(IllegalStateException ert ){ System.out.println("slider Error"); }catch(NumberFormatException er ){ System.out.println("error 2 "); }catch(java.lang.IllegalArgumentException ee){ System.out.println("error 22 "); } } }); textField2.addCaretListener(new CaretListener() { @Override public void caretUpdate(CaretEvent e) { try{ //color1 = Integer.parseInt(textField1.getText()); color2 = Integer.parseInt(textField2.getText()); //color3 = Integer.parseInt(textField3.getText()); slider2.setValue(Integer.parseInt(textField2.getText())); color_r = new Color(color1,color2,color3); l.setBackground(color_r); String hexa = Integer.toHexString(color_r.getRGB()); textField4.setText(hexa.substring(2)); }catch(java.lang.NumberFormatException er){ System.out.println("eror format"); } } }); textField3.addCaretListener(new CaretListener() { @Override public void caretUpdate(CaretEvent e) { try{ //color1 = Integer.parseInt(textField1.getText()); //color2 = Integer.parseInt(textField2.getText()); color3 = Integer.parseInt(textField3.getText()); slider3.setValue(Integer.parseInt(textField3.getText())); color_r = new Color(color1,color2,color3); l.setBackground(color_r); String hexa = Integer.toHexString(color_r.getRGB()); textField4.setText(hexa.substring(2)); }catch(java.lang.NumberFormatException er){ System.out.println("eror format"); } } }); textField4.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { String chaine = textField4.getText(); try{ color = Color.decode("0x"+chaine); l.setBackground(color); textField1.setText(""+color.getRed()); textField2.setText(""+color.getGreen()); textField3.setText(""+color.getBlue()); color1 = Integer.parseInt(textField1.getText()); color2 = Integer.parseInt(textField2.getText()); color3 = Integer.parseInt(textField3.getText()); slider1.setValue(Integer.parseInt(textField1.getText())); slider2.setValue(Integer.parseInt(textField2.getText())); slider3.setValue(Integer.parseInt(textField3.getText())); }catch(NumberFormatException ex){ System.out.println("is not color"); } }}); add(panel1); add(panel2); this.setVisible(true); } }
[ "mar.abakarim@gmail.com" ]
mar.abakarim@gmail.com
0182b09e1b1e666f3d8144858dae4208dee58bd0
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/ccrama_Slide/app/src/main/java/me/ccrama/redditslide/SwipeLayout/app/SwipeBackActivityHelper.java
9f92cb9721351011edcb97130399a4744a60adb7
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,669
java
// isComment package me.ccrama.redditslide.SwipeLayout.app; import android.app.Activity; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.view.LayoutInflater; import android.view.View; import me.ccrama.redditslide.R; import me.ccrama.redditslide.SwipeLayout.SwipeBackLayout; import me.ccrama.redditslide.SwipeLayout.Utils; /** * isComment */ public class isClassOrIsInterface { private Activity isVariable; private SwipeBackLayout isVariable; public isConstructor(Activity isParameter) { isNameExpr = isNameExpr; } @SuppressWarnings("isStringConstant") public void isMethod() { isNameExpr.isMethod().isMethod(new ColorDrawable(isNameExpr.isFieldAccessExpr)); isNameExpr.isMethod().isMethod().isMethod(null); isNameExpr = (SwipeBackLayout) isNameExpr.isMethod(isNameExpr).isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, null); isNameExpr.isMethod(new SwipeBackLayout.SwipeListener() { @Override public void isMethod(int isParameter, float isParameter) { } @Override public void isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod() { } }); } public void isMethod() { isNameExpr.isMethod(isNameExpr); } public View isMethod(int isParameter) { if (isNameExpr != null) { return isNameExpr.isMethod(isNameExpr); } return null; } public SwipeBackLayout isMethod() { return isNameExpr; } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
c5ccd8e09d0789c3100b82b15b7472de58b8a9d2
419d8ddce5a33e2025a906638fb1ab4918464cd2
/concurrent_study/jdk7-source/src/org/omg/CosNaming/NamingContextPackage/NotEmpty.java
d333b8cd182eca3a028ed1180a6f14f755f72ebb
[]
no_license
ynan1213/Java-Study
43ac8ba546fc5a6188ee8872767fa316dfea4a32
1d933138e79ef2cb8ea4de57abc84ac12d883a0a
refs/heads/master
2022-06-30T11:54:23.245439
2021-12-05T01:43:03
2021-12-05T01:43:03
152,955,095
1
0
null
2022-06-21T04:21:49
2018-10-14T08:44:55
Java
UTF-8
Java
false
false
577
java
package org.omg.CosNaming.NamingContextPackage; /** * org/omg/CosNaming/NamingContextPackage/NotEmpty.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl * Thursday, April 4, 2013 4:34:37 AM PDT */ public final class NotEmpty extends org.omg.CORBA.UserException { public NotEmpty () { super(NotEmptyHelper.id()); } // ctor public NotEmpty (String $reason) { super(NotEmptyHelper.id() + " " + $reason); } // ctor } // class NotEmpty
[ "452245790@qq.com" ]
452245790@qq.com
f7cc23cabdf505a983f8c5e1efe5f07efeaf2372
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Csv-10/org.apache.commons.csv.CSVPrinter/BBC-F0-opt-20/tests/5/org/apache/commons/csv/CSVPrinter_ESTest.java
7ad0e5bb5a86405fde8568e04b169efd5b9a4cc7
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
38,762
java
/* * This file was automatically generated by EvoSuite * Thu Oct 14 00:17:40 GMT 2021 */ package org.apache.commons.csv; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import java.io.BufferedInputStream; import java.io.BufferedWriter; import java.io.ByteArrayOutputStream; import java.io.CharArrayWriter; import java.io.File; import java.io.FileDescriptor; import java.io.IOException; import java.io.ObjectOutputStream; import java.io.PipedReader; import java.io.PipedWriter; import java.io.StringWriter; import java.nio.BufferOverflowException; import java.nio.CharBuffer; import java.nio.ReadOnlyBufferException; import java.nio.charset.Charset; import java.sql.BatchUpdateException; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLFeatureNotSupportedException; import java.sql.SQLInvalidAuthorizationSpecException; import java.sql.SQLNonTransientConnectionException; import java.sql.SQLRecoverableException; import java.sql.SQLSyntaxErrorException; import java.sql.SQLTransientException; import java.sql.SQLWarning; import java.util.ArrayDeque; import java.util.Set; import java.util.TreeSet; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVParser; import org.apache.commons.csv.CSVPrinter; import org.apache.commons.csv.Quote; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.evosuite.runtime.mock.java.io.MockFile; import org.evosuite.runtime.mock.java.io.MockPrintStream; import org.evosuite.runtime.mock.java.io.MockPrintWriter; import org.evosuite.runtime.testdata.EvoSuiteFile; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class CSVPrinter_ESTest extends CSVPrinter_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.EXCEL; CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat1 = cSVFormat0.withNullString("3I"); CSVPrinter cSVPrinter0 = new CSVPrinter(charArrayWriter0, cSVFormat1); cSVPrinter0.print((Object) null); } @Test(timeout = 4000) public void test01() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("fra"); CSVFormat cSVFormat0 = CSVFormat.MYSQL; Quote quote0 = Quote.NONE; CSVFormat cSVFormat1 = cSVFormat0.withQuotePolicy(quote0); CSVFormat cSVFormat2 = cSVFormat1.withQuoteChar('r'); Object[] objectArray0 = new Object[2]; objectArray0[0] = (Object) mockPrintStream0; cSVFormat2.format(objectArray0); } @Test(timeout = 4000) public void test02() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.EXCEL; CSVFormat cSVFormat1 = CSVFormat.newFormat('/'); MockPrintStream mockPrintStream0 = new MockPrintStream("x@;p6JWjN+&8CIQv`~"); CSVPrinter cSVPrinter0 = cSVFormat1.print(mockPrintStream0); Object[] objectArray0 = new Object[3]; objectArray0[0] = (Object) cSVFormat0; cSVPrinter0.printRecords(objectArray0); } @Test(timeout = 4000) public void test03() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.MYSQL; CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) "x@;p6JWNN+&9IQv`~"); CSVPrinter cSVPrinter0 = new CSVPrinter(charBuffer0, cSVFormat0); // Undeclared exception! try { cSVPrinter0.println(); fail("Expecting exception: ReadOnlyBufferException"); } catch(ReadOnlyBufferException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.CharBuffer", e); } } @Test(timeout = 4000) public void test04() throws Throwable { PipedWriter pipedWriter0 = new PipedWriter(); CSVFormat cSVFormat0 = CSVFormat.TDF; CSVPrinter cSVPrinter0 = new CSVPrinter(pipedWriter0, cSVFormat0); try { cSVPrinter0.println(); fail("Expecting exception: IOException"); } catch(IOException e) { // // Pipe not connected // verifyException("java.io.PipedWriter", e); } } @Test(timeout = 4000) public void test05() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.TDF; Object[] objectArray0 = new Object[9]; CharBuffer charBuffer0 = CharBuffer.allocate(32); CharBuffer charBuffer1 = CharBuffer.wrap((CharSequence) charBuffer0); CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer1); // Undeclared exception! try { cSVPrinter0.printRecords(objectArray0); fail("Expecting exception: ReadOnlyBufferException"); } catch(ReadOnlyBufferException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.StringCharBuffer", e); } } @Test(timeout = 4000) public void test06() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.MYSQL; CharBuffer charBuffer0 = CharBuffer.allocate(3322); charBuffer0.compact(); CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer0); Object[] objectArray0 = new Object[2]; // Undeclared exception! try { cSVPrinter0.printRecords(objectArray0); fail("Expecting exception: BufferOverflowException"); } catch(BufferOverflowException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.CharBuffer", e); } } @Test(timeout = 4000) public void test07() throws Throwable { StringWriter stringWriter0 = new StringWriter(); CSVFormat cSVFormat0 = CSVFormat.DEFAULT; CSVPrinter cSVPrinter0 = new CSVPrinter(stringWriter0, cSVFormat0); // Undeclared exception! try { cSVPrinter0.printRecords((Object[]) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.apache.commons.csv.CSVPrinter", e); } } @Test(timeout = 4000) public void test08() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.MYSQL; PipedWriter pipedWriter0 = new PipedWriter(); CSVPrinter cSVPrinter0 = cSVFormat0.print(pipedWriter0); Object[] objectArray0 = new Object[1]; try { cSVPrinter0.printRecords(objectArray0); fail("Expecting exception: IOException"); } catch(IOException e) { // // Pipe not connected // verifyException("java.io.PipedWriter", e); } } @Test(timeout = 4000) public void test09() throws Throwable { StringWriter stringWriter0 = new StringWriter(); CSVFormat cSVFormat0 = CSVFormat.RFC4180; CSVPrinter cSVPrinter0 = cSVFormat0.print(stringWriter0); ResultSet resultSet0 = mock(ResultSet.class, new ViolatedAssumptionAnswer()); doReturn((ResultSetMetaData) null).when(resultSet0).getMetaData(); // Undeclared exception! try { cSVPrinter0.printRecords(resultSet0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.apache.commons.csv.CSVPrinter", e); } } @Test(timeout = 4000) public void test10() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.TDF; CSVPrinter cSVPrinter0 = cSVFormat0.print(charArrayWriter0); int[] intArray0 = new int[14]; BatchUpdateException batchUpdateException0 = new BatchUpdateException(intArray0); SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException0 = new SQLInvalidAuthorizationSpecException(batchUpdateException0); batchUpdateException0.initCause(sQLInvalidAuthorizationSpecException0); // Undeclared exception! cSVPrinter0.printRecords((Iterable<?>) batchUpdateException0); } @Test(timeout = 4000) public void test11() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.DEFAULT; Charset charset0 = Charset.defaultCharset(); Set<String> set0 = charset0.aliases(); char[] charArray0 = new char[2]; CharBuffer charBuffer0 = CharBuffer.wrap(charArray0); CharBuffer charBuffer1 = CharBuffer.wrap((CharSequence) charBuffer0); CSVPrinter cSVPrinter0 = new CSVPrinter(charBuffer1, cSVFormat0); // Undeclared exception! try { cSVPrinter0.printRecords((Iterable<?>) set0); fail("Expecting exception: ReadOnlyBufferException"); } catch(ReadOnlyBufferException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.CharBuffer", e); } } @Test(timeout = 4000) public void test12() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.MYSQL; PipedReader pipedReader0 = new PipedReader(); CSVParser cSVParser0 = cSVFormat0.parse(pipedReader0); CSVPrinter cSVPrinter0 = cSVFormat0.print(charArrayWriter0); // Undeclared exception! try { cSVPrinter0.printRecords((Iterable<?>) cSVParser0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // java.io.IOException: Pipe not connected // verifyException("org.apache.commons.csv.CSVParser$1", e); } } @Test(timeout = 4000) public void test13() throws Throwable { File file0 = MockFile.createTempFile("Unexpected Quote value: ", "Unexpected Quote value: "); MockPrintWriter mockPrintWriter0 = new MockPrintWriter(file0); CSVFormat cSVFormat0 = CSVFormat.RFC4180; CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintWriter0, cSVFormat0); // Undeclared exception! try { cSVPrinter0.printRecords((Iterable<?>) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.apache.commons.csv.CSVPrinter", e); } } @Test(timeout = 4000) public void test14() throws Throwable { Charset charset0 = Charset.defaultCharset(); Set<String> set0 = charset0.aliases(); CSVFormat cSVFormat0 = CSVFormat.EXCEL; PipedWriter pipedWriter0 = new PipedWriter(); CSVPrinter cSVPrinter0 = new CSVPrinter(pipedWriter0, cSVFormat0); try { cSVPrinter0.printRecords((Iterable<?>) set0); fail("Expecting exception: IOException"); } catch(IOException e) { // // Pipe not connected // verifyException("java.io.PipedWriter", e); } } @Test(timeout = 4000) public void test15() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.EXCEL; CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) "2Oz]zCTjeex"); CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer0); Object[] objectArray0 = new Object[4]; // Undeclared exception! try { cSVPrinter0.printRecord(objectArray0); fail("Expecting exception: ReadOnlyBufferException"); } catch(ReadOnlyBufferException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.StringCharBuffer", e); } } @Test(timeout = 4000) public void test16() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.EXCEL; Object[] objectArray0 = new Object[7]; char[] charArray0 = new char[0]; CharBuffer charBuffer0 = CharBuffer.wrap(charArray0); CSVPrinter cSVPrinter0 = new CSVPrinter(charBuffer0, cSVFormat0); // Undeclared exception! try { cSVPrinter0.printRecord(objectArray0); fail("Expecting exception: BufferOverflowException"); } catch(BufferOverflowException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.Buffer", e); } } @Test(timeout = 4000) public void test17() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("nT1Ts?2(N|:`WX"); CSVFormat cSVFormat0 = CSVFormat.DEFAULT; CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintStream0, cSVFormat0); // Undeclared exception! try { cSVPrinter0.printRecord((Object[]) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.apache.commons.csv.CSVPrinter", e); } } @Test(timeout = 4000) public void test18() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.MYSQL; CSVPrinter cSVPrinter0 = cSVFormat0.print(charArrayWriter0); SQLFeatureNotSupportedException sQLFeatureNotSupportedException0 = new SQLFeatureNotSupportedException("", "", (-2973)); SQLRecoverableException sQLRecoverableException0 = new SQLRecoverableException(sQLFeatureNotSupportedException0); sQLFeatureNotSupportedException0.initCause(sQLRecoverableException0); // Undeclared exception! cSVPrinter0.printRecord((Iterable<?>) sQLFeatureNotSupportedException0); } @Test(timeout = 4000) public void test19() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.TDF; CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) "x@;p6JWNN+&9IQv`~"); CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer0); ArrayDeque<Double> arrayDeque0 = new ArrayDeque<Double>(); // Undeclared exception! try { cSVPrinter0.printRecord((Iterable<?>) arrayDeque0); fail("Expecting exception: ReadOnlyBufferException"); } catch(ReadOnlyBufferException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.CharBuffer", e); } } @Test(timeout = 4000) public void test20() throws Throwable { char[] charArray0 = new char[0]; CharBuffer charBuffer0 = CharBuffer.wrap(charArray0); CSVFormat cSVFormat0 = CSVFormat.DEFAULT; CSVPrinter cSVPrinter0 = new CSVPrinter(charBuffer0, cSVFormat0); TreeSet<BufferedInputStream> treeSet0 = new TreeSet<BufferedInputStream>(); // Undeclared exception! try { cSVPrinter0.printRecord((Iterable<?>) treeSet0); fail("Expecting exception: BufferOverflowException"); } catch(BufferOverflowException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.CharBuffer", e); } } @Test(timeout = 4000) public void test21() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.MYSQL; PipedReader pipedReader0 = new PipedReader(); CSVParser cSVParser0 = cSVFormat0.parse(pipedReader0); CSVPrinter cSVPrinter0 = cSVFormat0.print(charArrayWriter0); // Undeclared exception! try { cSVPrinter0.printRecord((Iterable<?>) cSVParser0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // java.io.IOException: Pipe not connected // verifyException("org.apache.commons.csv.CSVParser$1", e); } } @Test(timeout = 4000) public void test22() throws Throwable { MockPrintWriter mockPrintWriter0 = new MockPrintWriter(">9)[zw7pEE"); CSVFormat cSVFormat0 = CSVFormat.TDF; CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintWriter0, cSVFormat0); // Undeclared exception! try { cSVPrinter0.printRecord((Iterable<?>) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } } @Test(timeout = 4000) public void test23() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.DEFAULT; SQLNonTransientConnectionException sQLNonTransientConnectionException0 = new SQLNonTransientConnectionException("format"); PipedWriter pipedWriter0 = new PipedWriter(); CSVPrinter cSVPrinter0 = cSVFormat0.print(pipedWriter0); try { cSVPrinter0.printRecord((Iterable<?>) sQLNonTransientConnectionException0); fail("Expecting exception: IOException"); } catch(IOException e) { // // Pipe not connected // verifyException("java.io.PipedWriter", e); } } @Test(timeout = 4000) public void test24() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.EXCEL; CSVFormat cSVFormat1 = cSVFormat0.withCommentStart('*'); char[] charArray0 = new char[0]; CharBuffer charBuffer0 = CharBuffer.wrap(charArray0); CSVPrinter cSVPrinter0 = cSVFormat1.print(charBuffer0); // Undeclared exception! try { cSVPrinter0.printComment("nmggxt9sk$RT>"); fail("Expecting exception: BufferOverflowException"); } catch(BufferOverflowException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.Buffer", e); } } @Test(timeout = 4000) public void test25() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("Q3k"); CSVFormat cSVFormat0 = CSVFormat.EXCEL; Character character0 = new Character('*'); CSVFormat cSVFormat1 = cSVFormat0.withCommentStart(character0); CSVPrinter cSVPrinter0 = cSVFormat1.print(mockPrintStream0); // Undeclared exception! try { cSVPrinter0.printComment((String) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.apache.commons.csv.CSVPrinter", e); } } @Test(timeout = 4000) public void test26() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.DEFAULT; Character character0 = new Character('Y'); CSVFormat cSVFormat1 = cSVFormat0.withCommentStart(character0); PipedWriter pipedWriter0 = new PipedWriter(); CSVPrinter cSVPrinter0 = cSVFormat1.print(pipedWriter0); try { cSVPrinter0.printComment("}tY EX=5"); fail("Expecting exception: IOException"); } catch(IOException e) { // // Pipe not connected // verifyException("java.io.PipedWriter", e); } } @Test(timeout = 4000) public void test27() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.MYSQL; Object object0 = new Object(); CharBuffer charBuffer0 = CharBuffer.wrap((CharSequence) "x@;p6JWNN+&9IQv`~"); CSVPrinter cSVPrinter0 = new CSVPrinter(charBuffer0, cSVFormat0); // Undeclared exception! try { cSVPrinter0.print(object0); fail("Expecting exception: ReadOnlyBufferException"); } catch(ReadOnlyBufferException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.CharBuffer", e); } } @Test(timeout = 4000) public void test28() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.EXCEL; char[] charArray0 = new char[21]; CharBuffer charBuffer0 = CharBuffer.wrap(charArray0); CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer0); Double double0 = new Double((-782.87)); // Undeclared exception! try { cSVPrinter0.print(double0); fail("Expecting exception: BufferOverflowException"); } catch(BufferOverflowException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.CharBuffer", e); } } @Test(timeout = 4000) public void test29() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("fra"); CSVFormat cSVFormat0 = CSVFormat.MYSQL; PipedWriter pipedWriter0 = new PipedWriter(); BufferedWriter bufferedWriter0 = new BufferedWriter(pipedWriter0, 34); CSVPrinter cSVPrinter0 = new CSVPrinter(bufferedWriter0, cSVFormat0); ObjectOutputStream objectOutputStream0 = new ObjectOutputStream(mockPrintStream0); try { cSVPrinter0.print(objectOutputStream0); fail("Expecting exception: IOException"); } catch(IOException e) { // // Pipe not connected // verifyException("java.io.PipedWriter", e); } } @Test(timeout = 4000) public void test30() throws Throwable { ByteArrayOutputStream byteArrayOutputStream0 = new ByteArrayOutputStream(2197); MockPrintStream mockPrintStream0 = new MockPrintStream(byteArrayOutputStream0); CSVFormat cSVFormat0 = CSVFormat.newFormat('o'); CSVFormat cSVFormat1 = cSVFormat0.withQuoteChar('o'); CSVPrinter cSVPrinter0 = null; try { cSVPrinter0 = new CSVPrinter(mockPrintStream0, cSVFormat1); fail("Expecting exception: IllegalStateException"); } catch(IllegalStateException e) { // // The quoteChar character and the delimiter cannot be the same ('o') // verifyException("org.apache.commons.csv.CSVFormat", e); } } @Test(timeout = 4000) public void test31() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.newFormat('|'); CSVPrinter cSVPrinter0 = null; try { cSVPrinter0 = new CSVPrinter((Appendable) null, cSVFormat0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Parameter 'out' must not be null! // verifyException("org.apache.commons.csv.Assertions", e); } } @Test(timeout = 4000) public void test32() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.MYSQL; char[] charArray0 = new char[0]; CharBuffer charBuffer0 = CharBuffer.wrap(charArray0); CSVPrinter cSVPrinter0 = cSVFormat0.print(charBuffer0); // Undeclared exception! try { cSVPrinter0.println(); fail("Expecting exception: BufferOverflowException"); } catch(BufferOverflowException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.CharBuffer", e); } } @Test(timeout = 4000) public void test33() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("format"); CSVFormat cSVFormat0 = CSVFormat.newFormat('.'); CSVPrinter cSVPrinter0 = cSVFormat0.print(mockPrintStream0); cSVPrinter0.println(); } @Test(timeout = 4000) public void test34() throws Throwable { StringWriter stringWriter0 = new StringWriter(); StringBuffer stringBuffer0 = stringWriter0.getBuffer(); CSVFormat cSVFormat0 = CSVFormat.EXCEL; CSVPrinter cSVPrinter0 = new CSVPrinter(stringBuffer0, cSVFormat0); ResultSetMetaData resultSetMetaData0 = mock(ResultSetMetaData.class, new ViolatedAssumptionAnswer()); doReturn(114).when(resultSetMetaData0).getColumnCount(); ResultSet resultSet0 = mock(ResultSet.class, new ViolatedAssumptionAnswer()); doReturn(resultSetMetaData0).when(resultSet0).getMetaData(); doReturn((String) null, (String) null, (String) null, (String) null, (String) null).when(resultSet0).getString(anyInt()); doReturn(true, false).when(resultSet0).next(); cSVPrinter0.printRecords(resultSet0); assertEquals("\"\",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r\n", stringBuffer0.toString()); assertEquals("\"\",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\r\n", stringWriter0.toString()); } @Test(timeout = 4000) public void test35() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.EXCEL; MockPrintStream mockPrintStream0 = new MockPrintStream("x@;p6JWjN+&8CIQv`~"); CSVPrinter cSVPrinter0 = cSVFormat0.print(mockPrintStream0); ArrayDeque<Double> arrayDeque0 = new ArrayDeque<Double>((-3617)); Object[] objectArray0 = new Object[3]; objectArray0[2] = (Object) arrayDeque0; cSVPrinter0.printRecords(objectArray0); assertEquals(3, objectArray0.length); } @Test(timeout = 4000) public void test36() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.TDF; CSVPrinter cSVPrinter0 = cSVFormat0.print(charArrayWriter0); int[] intArray0 = new int[14]; BatchUpdateException batchUpdateException0 = new BatchUpdateException(intArray0); cSVPrinter0.printRecords((Iterable<?>) batchUpdateException0); assertEquals(42, charArrayWriter0.size()); } @Test(timeout = 4000) public void test37() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.TDF; CSVFormat cSVFormat1 = cSVFormat0.withCommentStart('\u0082'); CSVPrinter cSVPrinter0 = cSVFormat1.print(charArrayWriter0); cSVPrinter0.printComment("\r\n"); assertEquals("\u0082 \r\n\u0082 \r\n", charArrayWriter0.toString()); assertEquals(8, charArrayWriter0.size()); } @Test(timeout = 4000) public void test38() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.DEFAULT; CSVFormat cSVFormat1 = cSVFormat0.withCommentStart(''); CSVPrinter cSVPrinter0 = cSVFormat1.print(charArrayWriter0); cSVPrinter0.printComment("\rQ:"); assertEquals(10, charArrayWriter0.size()); assertEquals(" \r\n Q:\r\n", charArrayWriter0.toString()); } @Test(timeout = 4000) public void test39() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.DEFAULT; CSVFormat cSVFormat1 = cSVFormat0.withCommentStart('n'); CSVPrinter cSVPrinter0 = cSVFormat1.print(charArrayWriter0); cSVPrinter0.printComment("\r"); assertEquals("n \r\nn \r\n", charArrayWriter0.toString()); assertEquals(8, charArrayWriter0.size()); } @Test(timeout = 4000) public void test40() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.EXCEL; CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat1 = cSVFormat0.withCommentStart('^'); CSVPrinter cSVPrinter0 = new CSVPrinter(charArrayWriter0, cSVFormat1); SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException0 = new SQLInvalidAuthorizationSpecException(""); SQLTransientException sQLTransientException0 = new SQLTransientException("", ",(UWPCiE'6|A7+oG>", sQLInvalidAuthorizationSpecException0); SQLWarning sQLWarning0 = new SQLWarning(sQLTransientException0); SQLSyntaxErrorException sQLSyntaxErrorException0 = new SQLSyntaxErrorException("pq", ",(UWPCiE'6|A7+oG>", sQLWarning0); cSVPrinter0.print(sQLSyntaxErrorException0); cSVPrinter0.printComment("out"); assertEquals(52, charArrayWriter0.size()); } @Test(timeout = 4000) public void test41() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("format"); CSVFormat cSVFormat0 = CSVFormat.DEFAULT; CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintStream0, cSVFormat0); cSVPrinter0.printComment(""); } @Test(timeout = 4000) public void test42() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.DEFAULT; CSVFormat cSVFormat1 = cSVFormat0.withCommentStart('\u0082'); CSVPrinter cSVPrinter0 = cSVFormat1.print(charArrayWriter0); cSVPrinter0.printComment("\n"); assertEquals("\u0082 \r\n\u0082 \r\n", charArrayWriter0.toString()); assertEquals(8, charArrayWriter0.size()); } @Test(timeout = 4000) public void test43() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("fra"); CSVFormat cSVFormat0 = CSVFormat.TDF; CSVFormat cSVFormat1 = cSVFormat0.withNullString("pnexpcted-Qu}te value: "); CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintStream0, cSVFormat1); cSVPrinter0.print((Object) null); } @Test(timeout = 4000) public void test44() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("format"); CSVFormat cSVFormat0 = CSVFormat.DEFAULT; CSVFormat cSVFormat1 = cSVFormat0.withDelimiter('.'); CSVPrinter cSVPrinter0 = cSVFormat1.print(mockPrintStream0); Object[] objectArray0 = new Object[6]; objectArray0[0] = (Object) cSVFormat0; cSVPrinter0.printRecord(objectArray0); assertEquals(6, objectArray0.length); } @Test(timeout = 4000) public void test45() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("format"); CSVFormat cSVFormat0 = CSVFormat.RFC4180; String[] stringArray0 = new String[4]; stringArray0[0] = "format"; Character character0 = Character.valueOf('n'); CSVFormat cSVFormat1 = cSVFormat0.withQuoteChar(character0); CSVPrinter cSVPrinter0 = cSVFormat1.print(mockPrintStream0); cSVPrinter0.printRecords((Object[]) stringArray0); assertEquals(4, stringArray0.length); } @Test(timeout = 4000) public void test46() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("\u0085"); CSVFormat cSVFormat0 = CSVFormat.TDF; CSVFormat cSVFormat1 = cSVFormat0.withNullString("\u0085"); CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintStream0, cSVFormat1); cSVPrinter0.print((Object) null); } @Test(timeout = 4000) public void test47() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.EXCEL; CSVFormat cSVFormat1 = cSVFormat0.withNullString("]joDj`GUVlm*qbc],"); CSVPrinter cSVPrinter0 = new CSVPrinter(charArrayWriter0, cSVFormat1); cSVPrinter0.print((Object) null); assertEquals(20, charArrayWriter0.size()); assertEquals("\"]joDj`GUVlm*qbc],\"", charArrayWriter0.toString()); } @Test(timeout = 4000) public void test48() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.DEFAULT; CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat1 = cSVFormat0.withNullString("@2Oz]CT3euex"); CSVPrinter cSVPrinter0 = cSVFormat1.print(charArrayWriter0); cSVPrinter0.print((Object) null); assertEquals("\"@2Oz]CT3euex\"", charArrayWriter0.toString()); assertEquals(14, charArrayWriter0.size()); } @Test(timeout = 4000) public void test49() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.EXCEL; MockPrintStream mockPrintStream0 = new MockPrintStream("9dzR`>WXAS.h"); CSVFormat cSVFormat1 = cSVFormat0.withNullString("9dzR`>WXAS.h"); CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintStream0, cSVFormat1); cSVPrinter0.print((Object) null); } @Test(timeout = 4000) public void test50() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.EXCEL; CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat1 = cSVFormat0.withNullString("' in "); CSVPrinter cSVPrinter0 = new CSVPrinter(charArrayWriter0, cSVFormat1); cSVPrinter0.print((Object) null); assertEquals(7, charArrayWriter0.size()); assertEquals("\"' in \"", charArrayWriter0.toString()); } @Test(timeout = 4000) public void test51() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.TDF; CSVFormat cSVFormat1 = cSVFormat0.withNullString(" SkipHeaderRecord:"); CSVPrinter cSVPrinter0 = new CSVPrinter(charArrayWriter0, cSVFormat1); cSVPrinter0.print(charArrayWriter0); cSVPrinter0.print((Object) null); assertEquals(55, charArrayWriter0.size()); } @Test(timeout = 4000) public void test52() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.DEFAULT; CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVPrinter cSVPrinter0 = new CSVPrinter(charArrayWriter0, cSVFormat0); cSVPrinter0.print((Object) null); assertEquals("\"\"", charArrayWriter0.toString()); assertEquals(2, charArrayWriter0.size()); } @Test(timeout = 4000) public void test53() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.DEFAULT; Quote quote0 = Quote.NON_NUMERIC; CSVFormat cSVFormat1 = cSVFormat0.withQuotePolicy(quote0); Charset charset0 = Charset.defaultCharset(); Set<String> set0 = charset0.aliases(); char[] charArray0 = new char[6]; CharBuffer charBuffer0 = CharBuffer.wrap(charArray0); CSVPrinter cSVPrinter0 = new CSVPrinter(charBuffer0, cSVFormat1); // Undeclared exception! try { cSVPrinter0.printRecords((Iterable<?>) set0); fail("Expecting exception: BufferOverflowException"); } catch(BufferOverflowException e) { // // no message in exception (getMessage() returned null) // verifyException("java.nio.CharBuffer", e); } } @Test(timeout = 4000) public void test54() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("rmat"); CSVFormat cSVFormat0 = CSVFormat.DEFAULT; Quote quote0 = Quote.ALL; CSVFormat cSVFormat1 = cSVFormat0.withQuotePolicy(quote0); CSVPrinter cSVPrinter0 = cSVFormat1.print(mockPrintStream0); ArrayDeque<Double> arrayDeque0 = new ArrayDeque<Double>(); Double double0 = new Double(271.016851); arrayDeque0.add(double0); cSVPrinter0.printRecord((Iterable<?>) arrayDeque0); assertFalse(arrayDeque0.isEmpty()); } @Test(timeout = 4000) public void test55() throws Throwable { MockPrintStream mockPrintStream0 = new MockPrintStream("*E"); CSVFormat cSVFormat0 = CSVFormat.DEFAULT; Quote quote0 = Quote.NON_NUMERIC; CSVFormat cSVFormat1 = cSVFormat0.withQuotePolicy(quote0); CSVPrinter cSVPrinter0 = new CSVPrinter(mockPrintStream0, cSVFormat1); Double double0 = new Double(2312.6584026); cSVPrinter0.print(double0); } @Test(timeout = 4000) public void test56() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.MYSQL; CSVFormat cSVFormat1 = cSVFormat0.withEscape('r'); PipedWriter pipedWriter0 = new PipedWriter(); CSVPrinter cSVPrinter0 = new CSVPrinter(pipedWriter0, cSVFormat1); Object[] objectArray0 = new Object[3]; objectArray0[0] = (Object) cSVPrinter0; try { cSVPrinter0.printRecord(objectArray0); fail("Expecting exception: IOException"); } catch(IOException e) { // // Pipe not connected // verifyException("java.io.PipedWriter", e); } } @Test(timeout = 4000) public void test57() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.MYSQL; CSVFormat cSVFormat1 = cSVFormat0.withDelimiter('a'); FileDescriptor fileDescriptor0 = new FileDescriptor(); CharBuffer charBuffer0 = CharBuffer.allocate(3322); CSVPrinter cSVPrinter0 = cSVFormat1.print(charBuffer0); Object[] objectArray0 = new Object[2]; objectArray0[0] = (Object) fileDescriptor0; cSVPrinter0.printRecords(objectArray0); assertEquals(3285, charBuffer0.remaining()); assertEquals(3285, charBuffer0.length()); } @Test(timeout = 4000) public void test58() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.MYSQL; CSVFormat cSVFormat1 = cSVFormat0.withNullString("\r\n"); CSVPrinter cSVPrinter0 = cSVFormat1.print(charArrayWriter0); cSVPrinter0.print((Object) null); assertEquals(4, charArrayWriter0.size()); assertEquals("\\r\\n", charArrayWriter0.toString()); } @Test(timeout = 4000) public void test59() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.RFC4180; CSVPrinter cSVPrinter0 = cSVFormat0.print(charArrayWriter0); cSVPrinter0.flush(); } @Test(timeout = 4000) public void test60() throws Throwable { StringWriter stringWriter0 = new StringWriter(); StringBuffer stringBuffer0 = stringWriter0.getBuffer(); CSVFormat cSVFormat0 = CSVFormat.EXCEL; CSVPrinter cSVPrinter0 = new CSVPrinter(stringBuffer0, cSVFormat0); cSVPrinter0.flush(); } @Test(timeout = 4000) public void test61() throws Throwable { CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVFormat cSVFormat0 = CSVFormat.MYSQL; CSVPrinter cSVPrinter0 = cSVFormat0.print(charArrayWriter0); cSVPrinter0.close(); } @Test(timeout = 4000) public void test62() throws Throwable { StringWriter stringWriter0 = new StringWriter(); StringBuffer stringBuffer0 = stringWriter0.getBuffer(); CSVFormat cSVFormat0 = CSVFormat.EXCEL; CSVPrinter cSVPrinter0 = new CSVPrinter(stringBuffer0, cSVFormat0); cSVPrinter0.close(); } @Test(timeout = 4000) public void test63() throws Throwable { CSVFormat cSVFormat0 = CSVFormat.EXCEL; CharArrayWriter charArrayWriter0 = new CharArrayWriter(); CSVPrinter cSVPrinter0 = new CSVPrinter(charArrayWriter0, cSVFormat0); Appendable appendable0 = cSVPrinter0.getOut(); assertSame(charArrayWriter0, appendable0); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
d208921ac361eaf0ee9e7d94e42ef22a53db2971
3b66322f084cebaa5f940eefb765fbf0ce06d688
/app/src/main/java/com/example/asus/myapplication/account.java
ff2ed21eba5ceb4e0cbacc9f8d8478ff7745e212
[]
no_license
dnaiel88520/ding
8c35d12aa9582f10260f1bc9a6c74b36846d8b22
bb7fdd10b6ced6b3301634e07a640c5db719f13b
refs/heads/master
2020-05-31T00:05:09.243755
2019-06-03T15:11:37
2019-06-03T15:11:37
190,028,844
0
0
null
null
null
null
UTF-8
Java
false
false
342
java
package com.example.asus.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class account extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_account); } }
[ "qazwsx88520@gmail.com" ]
qazwsx88520@gmail.com
b708ade18833feff7de50effdd07209758e4c06d
ea82e4c9858dbbd2fc8f4639106b7a7b679cb125
/Security-web/src/main/java/com/duheng/security/config/SecurityConfig.java
9b7fb99629cb738fe2d8f04b5b7333193107e786
[]
no_license
UserJustins/Security
f65552f37dfe026716131f6955026e068fc79c72
87cddfffbfc7dbedb487b7ff66dbac44f03ed347
refs/heads/master
2022-10-28T23:15:50.716851
2020-03-08T12:01:14
2020-03-08T12:01:14
244,904,951
0
0
null
2022-10-12T20:37:15
2020-03-04T13:17:09
Java
UTF-8
Java
false
false
3,912
java
package com.duheng.security.config; import com.duheng.security.properties.SecurityProperties; import com.duheng.security.validCodeImage.ValidCodeImageFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.web.authentication.AuthenticationFailureHandler; import org.springframework.security.web.authentication.AuthenticationSuccessHandler; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; /************************* Author: 杜衡 Date: 2020/3/5 Describe: 资源是否需要认证由SpringSecurity决定,如果需要进行认证就会根据loginPage进行跳转; 跳转之前SpringSecurity将当前请求封装到HttpSessionRequestCache。 *************************/ @Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter{ @Autowired private SecurityProperties securityProperties; //自定义登录成功处理器 @Autowired private AuthenticationSuccessHandler iduAuthenticationSuccessHandler; //自定义登录成功处理器 //自定义登录失败处理器 @Autowired private AuthenticationFailureHandler iduAuthenticationFailureHandler; /** * 密码的加密算法 * @return */ @Bean public PasswordEncoder passwordEncoder(){ return new BCryptPasswordEncoder(); } /** * 1、指定登录认证方式 eg: formLogin() * 2、对所有的资源进行权限检查 * http.formLogin() * .and() * .authorizeRequests() * .anyRequest() * .authenticated(); * 3、自定义登录页面 ,可以是Handler也可以是pageName;记得要要对资源放行 * 否则login.html被拦截重新去到login.html,死循环;导致页面重定向次数 * 过多而报错 * eg: loginPage("/login.html") * .antMatchers("/login.html").permitAll() * 4、登录请求处理 * UsernamePasswordAuthenticationFilter中默认处理的是"/login" * 和"post"的请求,自定义action怎么办? * eg: .loginProcessingUrl("/authentication/form") * 5、暂时关闭CSRF * eg:http.csrf().disable(); * * * * @param http * @throws Exception */ @Override protected void configure(HttpSecurity http) throws Exception { ValidCodeImageFilter validCodeImageFilter = new ValidCodeImageFilter(); validCodeImageFilter.setAuthenticationFailureHandler(iduAuthenticationFailureHandler); http.addFilterBefore(validCodeImageFilter,UsernamePasswordAuthenticationFilter.class) .formLogin()//指定使用表单的认证方式 UsernamePasswordAuthenticationFilter .loginPage("/authentication/require")//认证去Handler进行处理 .loginProcessingUrl("/authentication/form") .successHandler(iduAuthenticationSuccessHandler) .failureHandler(iduAuthenticationFailureHandler) .and() .authorizeRequests() .antMatchers("/authentication/require", securityProperties.getBrowser().getLoginPage(), "/image/code").permitAll()//指定放行的资源 .anyRequest() .authenticated() .and() .csrf().disable(); } }
[ "DuHeng@sina.com" ]
DuHeng@sina.com
280a3e3f2985158bd1afa56c3998c67640e4865c
cb1bc5727693ed11ae45db1833704ac41aa54277
/Spider/src/main/java/com/pool/SpiderPool.java
7367d3c4f81b10eb40acf060e4b07724b2af73f4
[]
no_license
MiroGene/InfoAnalyser
cedad7c6dccacafadf8a6abc1a943153cf12aa27
8eadb47cbce8ad6c376a3c00e2719e429527bde3
refs/heads/master
2021-01-01T17:45:15.506275
2017-08-01T08:13:46
2017-08-01T08:13:46
98,146,809
3
0
null
null
null
null
UTF-8
Java
false
false
285
java
package com.pool; import org.apache.commons.pool.impl.GenericObjectPool; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Created by Gene on 2017/8/1. */ public class SpiderPool { private static final Logger logger = LoggerFactory.getLogger(SpiderPool.class); }
[ "inkysun@163.com" ]
inkysun@163.com
f6921b6d166a600615ae1070ccb30b77c226bf83
de9110b76cab47741fa43437699361b4fa87c303
/src/com/enation/app/shop/core/service/impl/GoodsCatManager.java
c6a4b77a1458317153df2ead08f78d87abdf430c
[]
no_license
igit-cn/weman
b9b45b028a525b94a7c568f1302989be84e6e3d3
050d173d09b9a90a067a2e8e4190d9dd74dbb85d
refs/heads/master
2021-06-17T08:48:08.815275
2017-03-29T09:29:37
2017-03-29T09:29:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,071
java
package com.enation.app.shop.core.service.impl; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import com.enation.app.shop.core.model.Cat; import com.enation.app.shop.core.model.mapper.CatMapper; import com.enation.app.shop.core.service.IGoodsCatManager; import com.enation.eop.sdk.context.EopSetting; import com.enation.eop.sdk.database.BaseSupport; import com.enation.eop.sdk.utils.UploadUtil; import com.enation.framework.util.StringUtil; public class GoodsCatManager extends BaseSupport<Cat> implements IGoodsCatManager { public boolean checkname(String name,Integer catid){ if(name!=null)name=name.trim(); String sql ="select count(0) from goods_cat where name=? and cat_id!=?"; if(catid==null){ catid=0; } int count = this.baseDaoSupport.queryForInt(sql, name,catid); if(count>0) return true; else return false; } public int delete(int catId) { String sql = "select count(0) from goods_cat where parent_id = ?"; int count = this.baseDaoSupport.queryForInt(sql, catId ); if (count > 0) { return 1; // 有子类别 } sql = "select count(0) from goods where cat_id = ?"; count = this.baseDaoSupport.queryForInt(sql, catId ); if (count > 0) { return 2; // 有子类别 } sql = "delete from goods_cat where cat_id=?"; this.baseDaoSupport.execute(sql, catId ); return 0; } /** * 获取类别详细,将图片加上静态资源服务器地址 */ public Cat getById(int catId) { String sql = "select * from goods_cat where cat_id=?"; Cat cat =baseDaoSupport.queryForObject(sql, Cat.class, catId); if(cat!=null){ String image = cat.getImage(); if(image!=null){ image =UploadUtil.replacePath(image); cat.setImage(image); } } return cat; } public List<Cat> listChildren(Integer catId) { String sql ="select c.*,'' type_name from goods_cat c where parent_id=?"; return this.baseDaoSupport.queryForList(sql,new CatMapper(), catId); } public List<Cat> listAllChildren(Integer catId) { String tableName =this.getTableName("goods_cat"); String sql = "select c.*,t.name as type_name from " + tableName + " c left join "+this.getTableName("goods_type")+" t on c.type_id = t.type_id " + " where c.cat_id not in(110,111) order by parent_id,cat_order";// this.findSql("all_cat_list"); List<Cat> allCatList = daoSupport.queryForList(sql, new CatMapper()); List<Cat> topCatList = new ArrayList<Cat>(); if(catId.intValue()!=0){ Cat cat = this.getById(catId); topCatList.add(cat); } for(Cat cat :allCatList){ if(cat.getParent_id().compareTo(catId)==0){ if(this.logger.isDebugEnabled()){ this.logger.debug("发现子["+cat.getName()+"-"+cat.getCat_id() +"]"+cat.getImage()); } List<Cat> children = this.getChildren(allCatList, cat.getCat_id()); int i = this.baseDaoSupport.queryForInt("select count(0) from es_goods_cat where parent_id="+cat.getCat_id()); if(i!=0){ cat.setState("closed"); } cat.setChildren(children); topCatList.add(cat); } } return topCatList; } private List<Cat> getChildren(List<Cat> catList ,Integer parentid){ if(this.logger.isDebugEnabled()){ this.logger.debug("查找["+parentid+"]的子"); } List<Cat> children =new ArrayList<Cat>(); for(Cat cat :catList){ if(cat.getParent_id().compareTo(parentid)==0){ if(this.logger.isDebugEnabled()){ this.logger.debug(cat.getName()+"-"+cat.getCat_id()+"是子"); } cat.setChildren(this.getChildren(catList, cat.getCat_id())); children.add(cat); } } return children; } @Transactional(propagation = Propagation.REQUIRED) public void saveAdd(Cat cat) { baseDaoSupport.insert("goods_cat", cat); int cat_id = baseDaoSupport.getLastId("goods_cat"); String sql = ""; //判断是否是顶级类似别,如果parentid为空或为0则为顶级类似别 //注意末尾都要加|,以防止查询子孙时出错 if (cat.getParent_id() != null && cat.getParent_id().intValue() != 0) { //不是顶级类别,有父 sql = "select * from goods_cat where cat_id=?"; Cat parent = baseDaoSupport.queryForObject(sql, Cat.class, cat .getParent_id()); cat.setCat_path(parent.getCat_path() + cat_id+"|"); } else {//是顶级类别 cat.setCat_path(cat.getParent_id() + "|" + cat_id+"|"); //2014-6-19 @author LiFenLong 如果为顶级类别则parent_id为0 cat.setParent_id(0); } sql = "update goods_cat set cat_path=?,parent_id=? where cat_id=?"; baseDaoSupport.execute(sql, new Object[] { cat.getCat_path(),cat.getParent_id(), cat_id }); } @SuppressWarnings({ "unchecked", "rawtypes" }) @Transactional(propagation = Propagation.REQUIRED) public void update(Cat cat) { checkIsOwner(cat.getCat_id()); // 如果有父类别,根据父的path更新这个类别的path信息 if (cat.getParent_id() != null && cat.getParent_id().intValue() != 0) { String sql = "select * from goods_cat where cat_id=?"; Cat parent = baseDaoSupport.queryForObject(sql, Cat.class, cat.getParent_id()); cat.setCat_path(parent.getCat_path() + cat.getCat_id()+"|"); } else { // 顶级类别,直接更新为parentid|catid cat.setCat_path(cat.getParent_id() + "|" + cat.getCat_id()+"|"); } HashMap map = new HashMap(); map.put("name", cat.getName()); map.put("parent_id", cat.getParent_id()); map.put("cat_order", cat.getCat_order()); map.put("type_id", cat.getType_id()); map.put("cat_path", cat.getCat_path()); map.put("list_show", cat.getList_show()); map.put("image", StringUtil.isEmpty(cat.getImage())?null:cat.getImage()); baseDaoSupport.update("goods_cat", map, "cat_id=" + cat.getCat_id()); //修改子分类的cat_path List<Map> childList = this.baseDaoSupport.queryForList("select * from es_goods_cat where parent_id=?", cat.getCat_id()); if(childList!=null && childList.size()>0){ for(Map maps : childList){ Integer cat_id = (Integer) maps.get("cat_id"); Map childmap = new HashMap(); childmap.put("cat_path", cat.getCat_path()+cat_id+"|"); baseDaoSupport.update("goods_cat", childmap, " cat_id="+cat_id); } } } protected void checkIsOwner(Integer catId) { // String sql = "select userid from goods_cat where cat_id=?"; // int userid = saasDaoSupport.queryForInt(sql, catId); // super.checkIsOwner(userid); } /** * 保存分类排序 * * @param cat_ids * @param cat_sorts */ public void saveSort(int[] cat_ids, int[] cat_sorts) { String sql = ""; if (cat_ids != null) { for (int i = 0; i < cat_ids.length; i++) { sql= "update goods_cat set cat_order=? where cat_id=?" ; baseDaoSupport.execute(sql, cat_sorts[i], cat_ids[i] ); } } } public List getNavpath(int catId) { // TODO Auto-generated method stub return null; } @SuppressWarnings("rawtypes") @Override public List<Cat> getParents(int catid) { Cat cat = this.getById(catid); String path=cat.getCat_path(); path = path.substring(0,path.length()-1); path = path.replace("|", ","); List lists = new ArrayList(); this.getParent(catid,lists); List list = new ArrayList(); for(int i=(lists.size()-1);i>=0;i--){ Cat c = (Cat) lists.get(i); list.add(c); } return list; } private List getParent(Integer catid,List ls){ if(catid!=null){ String sql ="select cat_id,name,parent_id,type_id from goods_cat where cat_id="+catid; List<Cat> list = this.baseDaoSupport.queryForList(sql, Cat.class); if(!list.isEmpty()){ for(Cat cat :list){ ls.add(cat); this.getParent(cat.getParent_id(),ls); } } } return ls; } }
[ "89987531@qq.com" ]
89987531@qq.com
d3af32102cef26ec89d8042dd1d700107dacb2ac
ccbd45056c4cfc8d65360ab90beb7b1bbd4130c6
/Hadoop/App/src/main/java/ComputeYears.java
f7aa48696705f72c99de87cf4cc83e77d294f826
[ "MIT" ]
permissive
Gonkalos/GGCD
6e194b719751c8ed96f83dbd0b7955a56a2cca65
8ff3fc41947ba003e353f8fe538c46f739ddf75e
refs/heads/main
2023-07-26T09:28:11.767122
2021-09-06T16:07:04
2021-09-06T16:07:04
342,201,250
0
0
null
null
null
null
UTF-8
Java
false
false
7,203
java
import com.google.common.io.ByteStreams; import org.apache.avro.Schema; import org.apache.avro.generic.GenericData; import org.apache.avro.generic.GenericRecord; import org.apache.commons.math3.util.Pair; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.parquet.avro.AvroParquetInputFormat; import org.apache.parquet.avro.AvroParquetOutputFormat; import org.apache.parquet.avro.AvroSchemaConverter; import org.apache.parquet.schema.MessageType; import org.apache.parquet.schema.MessageTypeParser; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; public class ComputeYears { public static Schema getProjectionSchema() throws IOException { FileSystem fs = FileSystem.get(new Configuration()); FSDataInputStream is = fs.open(new Path("projection_schema.parquet")); byte[] Bytes = ByteStreams.toByteArray(is); String ps = new String(Bytes); MessageType mt = MessageTypeParser.parseMessageType(ps); return new AvroSchemaConverter().convert(mt); } public static Schema getYearSchema() throws IOException { FileSystem fs = FileSystem.get(new Configuration()); FSDataInputStream is = fs.open(new Path("year_schema.parquet")); byte[] Bytes = ByteStreams.toByteArray(is); String ps = new String(Bytes); MessageType mt = MessageTypeParser.parseMessageType(ps); return new AvroSchemaConverter().convert(mt); } public static class MyMapper extends Mapper<Void, GenericRecord, Text, Text> { @Override protected void map(Void key, GenericRecord value, Context context) throws IOException, InterruptedException { String titleType = (String)value.get("titleType"); String startYear = (String)value.get("startYear"); if (titleType.equals("movie") && !startYear.equals("\\N")) { String tconst = (String)value.get("tconst"); Double averageRating = (Double)value.get("averageRating"); int numVotes = (Integer)value.get("numVotes"); context.write(new Text(startYear), new Text(tconst + "\t" + averageRating + "\t" + numVotes)); } } } public static class MyComparator implements Comparator<Pair<String, Double>> { @Override public int compare(Pair<String, Double> pair1, Pair<String, Double> pair2) { if (pair1.getValue() > pair2.getValue()) return -1; else return 1; } } public static class MyReducer extends Reducer<Text, Text, Void, GenericRecord> { private Schema schema; @Override protected void setup(Context context) throws IOException, InterruptedException { schema = getYearSchema(); } @Override protected void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException { GenericRecord record = new GenericData.Record(schema); int totalMovies = 0; // total number of movies String mostVoted = "None"; // tconst (id) of the most voted movie int mostVotedNum = -1; // number of votes of the most voted movie List<Pair<String, Double>> topRated = new ArrayList<>(); // list with the top 10 best rated movies int min = 0; // index of the movie with the lowest average rating in the list topRated List<String> topRatedIds = new ArrayList<>(); // list with the tconst (id) for each one of the top 10 best rated movies // fill the list topRated for (int i = 0; i < 10; i++) { topRated.add(i, new Pair<>("", -1.0)); } for (Text value : values) { // get the info from each movie String[] data = value.toString().split("\t"); String tconst = data[0]; double averageRating = Double.parseDouble(data[1]); int numVotes = Integer.parseInt(data[2]); // update the most voted movie if (numVotes > mostVotedNum) { mostVoted = tconst; mostVotedNum = numVotes; } // update the index of the movie with the lowest average rating for (int i = 0; i < 10; i++) { if (topRated.get(i).getValue() < topRated.get(min).getValue()) min = i; } // update the list topRated if (averageRating > topRated.get(min).getValue()) topRated.set(min, new Pair<>(tconst, averageRating)); // sort the list topRated Collections.sort(topRated, new MyComparator()); // update the total number of movies totalMovies += 1; } // get the tconst (id) for each one of the top 10 best rated movies for (int i = 0; i < 10; i++) { if (topRated.get(i).getValue() > 0) topRatedIds.add(topRated.get(i).getKey()); } record.put("year", Integer.parseInt(key.toString())); record.put("totalMovies", totalMovies); record.put("mostVoted", mostVoted); record.put("topRated", topRatedIds); context.write(null, record); } } public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException { // Create new job Job job = Job.getInstance(new Configuration(), "ComputeYears"); // Set the jar where this classes are job.setJarByClass(ComputeYears.class); // Mapper configuration job.setMapperClass(MyMapper.class); // Reducer configuration job.setReducerClass(MyReducer.class); // Data communicated between Mapper and Reducer configuration job.setMapOutputKeyClass(Text.class); job.setMapOutputValueClass(Text.class); // Input configuration job.setInputFormatClass(AvroParquetInputFormat.class); TextInputFormat.setInputPaths(job, new Path("to_parquet_output")); AvroParquetInputFormat.setRequestedProjection(job, getProjectionSchema()); // Output configuration job.setOutputFormatClass(AvroParquetOutputFormat.class); AvroParquetOutputFormat.setSchema(job, getYearSchema()); FileOutputFormat.setOutputPath(job, new Path("compute_years_output")); // Execute job job.waitForCompletion(true); } }
[ "a84610@alunos.uminho.pt" ]
a84610@alunos.uminho.pt
834cfd5efc15a51ff0c81d258b6984d2ba345122
2398ca42ef4d11e82b56c9fa1aae7c4d1b51effd
/junit/Ex4.java
9d3fcaea07f15270230781601ff04ca4de02c18e
[]
no_license
KimiyukiYamauchi/java.2020
99383deb6dfb1887f168e36cc2a3202d44fb9247
d2c7270532fd932a5774dfb3cc347a23ff7db76e
refs/heads/master
2023-01-19T18:16:40.501284
2020-11-25T08:38:30
2020-11-25T08:38:30
305,962,972
0
3
null
null
null
null
UTF-8
Java
false
false
1,539
java
package junit; class Ex4{ public int [] ex4_1(){ int [] ret = new int[1]; return ret; } public double [] ex4_2(){ double [] ret = new double[1]; return ret; } public int [] ex4_3(int a, int b){ int [] ret = new int[1]; return ret; } public int [] ex4_4(int [] a){ int [] ret = new int[1]; return ret; } public int ex4_5(int [] a, int key){ int ret = 9999; return ret; } public int ex4_6(int [] a, int key){ int ret = 9999; return ret; } public int [] ex4_7(int [] a, int idx){ int [] ret = new int[1]; return ret; } public int [] ex4_8(int [] a, int idx, int n){ int [] ret = new int[1]; return ret; } public int [] ex4_9(int [] a, int idx, int x){ int [] ret = new int[1]; return ret; } public void ex4_10(int [] a, int [] b){ return; } public int [] ex4_11(int [] a){ int [] ret = new int[0]; return ret; } public int [] ex4_12(int [] a, int x){ int [] ret = new int[0]; return ret; } public int [] ex4_13(int [] a, int idx){ int [] ret = new int[0]; return ret; } public int [] ex4_14(int [] a, int idx, int n){ int [] ret = new int[0]; return ret; } public int [] ex4_15(int [] a, int idx, int x){ int [] ret = new int[0]; return ret; } }
[ "yamauchi@std.it-college.ac.jp" ]
yamauchi@std.it-college.ac.jp
d51f7d861713c9de90278ddd834905ae79e4e548
ccdf46b1f679447a148fecb379e24c0383886bd1
/EMS/JavaProject/Projects/projectservice/src/main/java/project/EmployeeManagementSystem/projectservice/ProjectserviceApplication.java
530988c88cfb715a7dc16a93866186a77dcd986c
[]
no_license
imdi007/Java-Training
aff230f39193972bf63c1cf18c9df704a1a3123f
bd01ba2bb5903ec11debbab37ba01cfe714cc888
refs/heads/master
2020-07-08T00:24:13.726773
2019-11-04T12:08:51
2019-11-04T12:08:51
203,516,255
0
0
null
null
null
null
UTF-8
Java
false
false
479
java
package project.EmployeeManagementSystem.projectservice; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer; @SpringBootApplication @EnableResourceServer public class ProjectserviceApplication { public static void main(String[] args) { SpringApplication.run(ProjectserviceApplication.class, args); } }
[ "kavuri15@gmail.com" ]
kavuri15@gmail.com
a4b77c6f10551cff491f413e5a169baed02e80a0
498dd2daff74247c83a698135e4fe728de93585a
/clients/google-api-services-compute/alpha/1.29.2/com/google/api/services/compute/model/HealthCheckServicesList.java
cae31ce6dcbdba9431fca9aa61d777403ac3dcfd
[ "Apache-2.0" ]
permissive
googleapis/google-api-java-client-services
0e2d474988d9b692c2404d444c248ea57b1f453d
eb359dd2ad555431c5bc7deaeafca11af08eee43
refs/heads/main
2023-08-23T00:17:30.601626
2023-08-20T02:16:12
2023-08-20T02:16:12
147,399,159
545
390
Apache-2.0
2023-09-14T02:14:14
2018-09-04T19:11:33
null
UTF-8
Java
false
false
12,672
java
/* * 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. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.compute.model; /** * Model definition for HealthCheckServicesList. * * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see: * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> * </p> * * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class HealthCheckServicesList extends com.google.api.client.json.GenericJson { /** * [Output Only] Unique identifier for the resource; defined by the server. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String id; /** * A list of HealthCheckService resources. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List<HealthCheckService> items; static { // hack to force ProGuard to consider HealthCheckService used, since otherwise it would be stripped out // see https://github.com/google/google-api-java-client/issues/543 com.google.api.client.util.Data.nullOf(HealthCheckService.class); } /** * [Output Only] Type of the resource. Always compute#healthCheckServicesList for lists of * HealthCheckServices. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String kind; /** * [Output Only] This token allows you to get the next page of results for list requests. If the * number of results is larger than maxResults, use the nextPageToken as a value for the query * parameter pageToken in the next list request. Subsequent list requests will have their own * nextPageToken to continue paging through the results. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String nextPageToken; /** * [Output Only] Server-defined URL for this resource. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String selfLink; /** * [Output Only] Informational warning message. * The value may be {@code null}. */ @com.google.api.client.util.Key private Warning warning; /** * [Output Only] Unique identifier for the resource; defined by the server. * @return value or {@code null} for none */ public java.lang.String getId() { return id; } /** * [Output Only] Unique identifier for the resource; defined by the server. * @param id id or {@code null} for none */ public HealthCheckServicesList setId(java.lang.String id) { this.id = id; return this; } /** * A list of HealthCheckService resources. * @return value or {@code null} for none */ public java.util.List<HealthCheckService> getItems() { return items; } /** * A list of HealthCheckService resources. * @param items items or {@code null} for none */ public HealthCheckServicesList setItems(java.util.List<HealthCheckService> items) { this.items = items; return this; } /** * [Output Only] Type of the resource. Always compute#healthCheckServicesList for lists of * HealthCheckServices. * @return value or {@code null} for none */ public java.lang.String getKind() { return kind; } /** * [Output Only] Type of the resource. Always compute#healthCheckServicesList for lists of * HealthCheckServices. * @param kind kind or {@code null} for none */ public HealthCheckServicesList setKind(java.lang.String kind) { this.kind = kind; return this; } /** * [Output Only] This token allows you to get the next page of results for list requests. If the * number of results is larger than maxResults, use the nextPageToken as a value for the query * parameter pageToken in the next list request. Subsequent list requests will have their own * nextPageToken to continue paging through the results. * @return value or {@code null} for none */ public java.lang.String getNextPageToken() { return nextPageToken; } /** * [Output Only] This token allows you to get the next page of results for list requests. If the * number of results is larger than maxResults, use the nextPageToken as a value for the query * parameter pageToken in the next list request. Subsequent list requests will have their own * nextPageToken to continue paging through the results. * @param nextPageToken nextPageToken or {@code null} for none */ public HealthCheckServicesList setNextPageToken(java.lang.String nextPageToken) { this.nextPageToken = nextPageToken; return this; } /** * [Output Only] Server-defined URL for this resource. * @return value or {@code null} for none */ public java.lang.String getSelfLink() { return selfLink; } /** * [Output Only] Server-defined URL for this resource. * @param selfLink selfLink or {@code null} for none */ public HealthCheckServicesList setSelfLink(java.lang.String selfLink) { this.selfLink = selfLink; return this; } /** * [Output Only] Informational warning message. * @return value or {@code null} for none */ public Warning getWarning() { return warning; } /** * [Output Only] Informational warning message. * @param warning warning or {@code null} for none */ public HealthCheckServicesList setWarning(Warning warning) { this.warning = warning; return this; } @Override public HealthCheckServicesList set(String fieldName, Object value) { return (HealthCheckServicesList) super.set(fieldName, value); } @Override public HealthCheckServicesList clone() { return (HealthCheckServicesList) super.clone(); } /** * [Output Only] Informational warning message. */ public static final class Warning extends com.google.api.client.json.GenericJson { /** * [Output Only] A warning code, if applicable. For example, Compute Engine returns * NO_RESULTS_ON_PAGE if there are no results in the response. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String code; /** * [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": * "scope", "value": "zones/us-east1-d" } * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List<Data> data; static { // hack to force ProGuard to consider Data used, since otherwise it would be stripped out // see https://github.com/google/google-api-java-client/issues/543 com.google.api.client.util.Data.nullOf(Data.class); } /** * [Output Only] A human-readable description of the warning code. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String message; /** * [Output Only] A warning code, if applicable. For example, Compute Engine returns * NO_RESULTS_ON_PAGE if there are no results in the response. * @return value or {@code null} for none */ public java.lang.String getCode() { return code; } /** * [Output Only] A warning code, if applicable. For example, Compute Engine returns * NO_RESULTS_ON_PAGE if there are no results in the response. * @param code code or {@code null} for none */ public Warning setCode(java.lang.String code) { this.code = code; return this; } /** * [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": * "scope", "value": "zones/us-east1-d" } * @return value or {@code null} for none */ public java.util.List<Data> getData() { return data; } /** * [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": * "scope", "value": "zones/us-east1-d" } * @param data data or {@code null} for none */ public Warning setData(java.util.List<Data> data) { this.data = data; return this; } /** * [Output Only] A human-readable description of the warning code. * @return value or {@code null} for none */ public java.lang.String getMessage() { return message; } /** * [Output Only] A human-readable description of the warning code. * @param message message or {@code null} for none */ public Warning setMessage(java.lang.String message) { this.message = message; return this; } @Override public Warning set(String fieldName, Object value) { return (Warning) super.set(fieldName, value); } @Override public Warning clone() { return (Warning) super.clone(); } /** * Model definition for HealthCheckServicesListWarningData. */ public static final class Data extends com.google.api.client.json.GenericJson { /** * [Output Only] A key that provides more detail on the warning being returned. For example, for * warnings where there are no results in a list request for a particular zone, this key might be * scope and the key value might be the zone name. Other examples might be a key indicating a * deprecated resource and a suggested replacement, or a warning about invalid network settings * (for example, if an instance attempts to perform IP forwarding but is not enabled for IP * forwarding). * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String key; /** * [Output Only] A warning data value corresponding to the key. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String value; /** * [Output Only] A key that provides more detail on the warning being returned. For example, for * warnings where there are no results in a list request for a particular zone, this key might be * scope and the key value might be the zone name. Other examples might be a key indicating a * deprecated resource and a suggested replacement, or a warning about invalid network settings * (for example, if an instance attempts to perform IP forwarding but is not enabled for IP * forwarding). * @return value or {@code null} for none */ public java.lang.String getKey() { return key; } /** * [Output Only] A key that provides more detail on the warning being returned. For example, for * warnings where there are no results in a list request for a particular zone, this key might be * scope and the key value might be the zone name. Other examples might be a key indicating a * deprecated resource and a suggested replacement, or a warning about invalid network settings * (for example, if an instance attempts to perform IP forwarding but is not enabled for IP * forwarding). * @param key key or {@code null} for none */ public Data setKey(java.lang.String key) { this.key = key; return this; } /** * [Output Only] A warning data value corresponding to the key. * @return value or {@code null} for none */ public java.lang.String getValue() { return value; } /** * [Output Only] A warning data value corresponding to the key. * @param value value or {@code null} for none */ public Data setValue(java.lang.String value) { this.value = value; return this; } @Override public Data set(String fieldName, Object value) { return (Data) super.set(fieldName, value); } @Override public Data clone() { return (Data) super.clone(); } } } }
[ "chingor@google.com" ]
chingor@google.com
ec7b189d7c2d9473fdead07c2f526f6495865d42
b7a1bade5bf347f2601ebdb7eda3e954895e6455
/project02t/step02/src/main/java/java76/pms/servlet/ProjectListServlet.java
ddf0166e5efde163b4aaf84a7c479e0376833a24
[]
no_license
Jeongjiho/Java76
a1429f12ffc2a5c557289760eb3164adba39c6eb
5c98d47a341776bc7b54b28907356b3007b46592
refs/heads/master
2016-08-12T20:29:57.698964
2016-02-22T14:59:27
2016-02-22T14:59:27
56,924,651
1
0
null
2016-04-23T14:54:31
2016-04-23T14:54:31
null
UTF-8
Java
false
false
915
java
package java76.pms.servlet; import java.io.PrintStream; import java.util.HashMap; import java76.pms.annotation.Component; import java76.pms.dao.ProjectDao; import java76.pms.domain.Project; @Component("/project/list") public class ProjectListServlet implements Servlet { ProjectDao projectDao; public void setProjectDao(ProjectDao projectDao) { this.projectDao = projectDao; } @Override public void service(HashMap<String, Object> params) { PrintStream out = (PrintStream)params.get("out"); out.printf("%-3s %-20s %-10s %-10s %-40s\n", "No", "Title", "Start", "End", "Members"); for (Project project : projectDao.selectList()) { out.printf("% 3d %-20s %3$tY-%3$tm-%3$td %4$s %5$-40s\n", project.getNo(), project.getTitle(), project.getStartDate(), project.getEndDate(), project.getMember()); } } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
16662f743e3eda6dc99c7facdd7269e5282f277f
691b33d7b18321c2dc878c1c76af2ecbea3f70e0
/my_testmaven_mybatis/src/test/java/com/tarena/test/TestClass.java
dac60f6f967c111f39b9d06b847afae8ec2a8642
[]
no_license
yuanwenbin1993/testupload
74c525a3517fea6861a6bc7418958196959ed1d2
d6dd58bc58e67a7bb0a49cf890b1f610a59293cd
refs/heads/master
2020-04-05T03:32:40.287657
2018-11-07T08:50:17
2018-11-07T09:05:28
156,518,822
0
0
null
null
null
null
UTF-8
Java
false
false
4,696
java
package com.tarena.test; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import org.junit.Test; import com.tarena.dao.UserDaoImpl; import com.tarena.entity.User; import com.tarena.vo.Page; public class TestClass { @Test public void testFindUserById(){ UserDaoImpl userDao=new UserDaoImpl(); userDao.fingUserById(5); } @Test public void testFindUserById1(){ UserDaoImpl userDao=new UserDaoImpl(); Map<String,Object> user=userDao.fingUserById1(5); System.out.print("id="+user.get("id")); System.out.print(" username="+user.get("name")); System.out.println(" userpassword="+user.get("password")); } @Test public void testFindUserByPageUseList(){ UserDaoImpl userDao=new UserDaoImpl(); Page page=new Page(); page.setPageSize(2); page.setCurrentPage(2); page.setUserNameKeyword("a"); page.setUserPasswordKeyword("a"); List<User> userList=userDao.fingUserByPageUseList(page); for(User user:userList){ System.out.println(user); } //下面的代码是为了模拟 page.setData(userList); page.setPreviousPage(1); page.setNextPage(3); } @Test public void testFindUserByPageUseMap(){ UserDaoImpl userDao=new UserDaoImpl(); Page page=new Page(); page.setPageSize(2); page.setCurrentPage(2); page.setUserNameKeyword("a"); page.setUserPasswordKeyword("a"); Map<String, User> userMap = userDao.fingUserByPageUseMap(page); //利用键来获取值 // Set<Object> keys = userMap.keySet(); // for(Object key:keys){ // System.out.println(userMap.get(key)); // } //利用Entry对象来获取值 for(Map.Entry<String, User> entrySet:userMap.entrySet()){ System.out.println(entrySet.getValue()); } } @Test public void testFindUserByPageUseList1(){ UserDaoImpl userDao=new UserDaoImpl(); Page page=new Page(); page.setPageSize(2); page.setCurrentPage(2); page.setUserNameKeyword("a"); page.setUserPasswordKeyword("a"); List<Map<String,Object>> userList=userDao.fingUserByPageUseList1(page); for(Map<String,Object> user:userList){ System.out.print("id="+user.get("id")); System.out.print(" username="+user.get("name")); System.out.println(" userpassword="+user.get("password")); } //下面的代码是为了模拟 page.setData(userList); page.setPreviousPage(1); page.setNextPage(3); } @Test public void testFindUserByPageUseMap1(){ UserDaoImpl userDao=new UserDaoImpl(); Page page=new Page(); page.setPageSize(1); page.setCurrentPage(1); page.setUserNameKeyword("a"); page.setUserPasswordKeyword("a"); Map<String,Map<String,Object>> userMap = userDao.fingUserByPageUseMap1(page); for(Map<String,Object> user:userMap.values()){ System.out.print("id="+user.get("id")); System.out.print(" username="+user.get("name")); System.out.println(" userpassword="+user.get("password")); } } @Test public void testFindUserByPagezidingyi(){ UserDaoImpl userDao=new UserDaoImpl(); Page page=new Page(); page.setPageSize(2); page.setCurrentPage(2); page.setUserNameKeyword("a"); page.setUserPasswordKeyword("a"); System.out.println(userDao.findUserByPage_zidingyi(page)); } @Test public void testAddUser(){ UserDaoImpl userDao=new UserDaoImpl(); User user=new User(); user.setName("asdf"); user.setPassword("111"); int rowAffect = userDao.addUser(user); System.out.println("受影响的行数:"+rowAffect); System.out.println("id="+user.getId()); } @Test public void testUpdateUser(){ UserDaoImpl userDao=new UserDaoImpl(); User user=new User(); user.setId(1); user.setName("哈哈"); user.setPassword("222"); int rowAffect = userDao.updateUser(user); System.out.println("受影响的行数:"+rowAffect); } @Test public void testdeleteUser(){ UserDaoImpl userDao=new UserDaoImpl(); int rowAffect = userDao.deleteUser(2); System.out.println("受影响的行数:"+rowAffect); } @Test public void testdeleteUser_bujianyi(){ UserDaoImpl userDao=new UserDaoImpl(); int rowAffect = userDao.deleteUser(3); System.out.println("受影响的行数:"+rowAffect); } }
[ "759992680@qq.com" ]
759992680@qq.com
ed1c91ce2bea0f1b92c33a84559f8cad8f5be56a
b2f4867b6d32db0402735cb7658b833ddd15cddd
/app/src/main/java/ues/fia/eisi/reservalocalfia/DetalleReservaConsultarActivity.java
d65dd546ab358381d77b6f6b15eec86bed3db5d0
[]
no_license
abyViana/ReservaFia
18cf816e591493afc980fe0ebae75c56463ee7ce
a29ec9c2804f509c972106fd6f4548b123c0732e
refs/heads/master
2022-11-13T23:00:57.787597
2020-07-08T21:14:29
2020-07-08T21:14:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,677
java
package ues.fia.eisi.reservalocalfia; import androidx.appcompat.app.AppCompatActivity; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.Spinner; import android.widget.Toast; import java.util.ArrayList; public class DetalleReservaConsultarActivity extends Activity { ControlReserveLocal helper; EditText editidHorario; EditText dia, horaI, horaF; EditText editcodigoLocal; EditText nomEvento , capacidadEvento, fechaEv; Spinner spinner; ArrayList<ReservaEvento> list; ArrayList<Integer> items= new ArrayList<Integer>(); ReservaEvento reservaEvento =new ReservaEvento(); /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_detalle_reserva_consultar); helper = new ControlReserveLocal(this); list=helper.consultarReservas(); //items = new String[list.size()]; items.add(0); for (int i=0;i<list.size();i++){ items.add(list.get(i).getIdReservaEvento()); } spinner=(Spinner) findViewById(R.id.spinnerreservaevento); ArrayAdapter<Integer> adapter=new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, items); spinner.setAdapter(adapter); editidHorario= (EditText) findViewById(R.id.idHorario); dia=(EditText) findViewById(R.id.idDia); horaI=(EditText) findViewById(R.id.idHInicio) ; horaF=(EditText) findViewById(R.id.HFin); editcodigoLocal = (EditText) findViewById(R.id.codigoLocal); nomEvento=(EditText) findViewById(R.id.editNombreEv); capacidadEvento=(EditText) findViewById(R.id.editCapaEvento); fechaEv=(EditText) findViewById(R.id.editFechaEv); } public void consultarDetalle(View v) { if (spinner.getSelectedItem().toString().equals("0") ||editidHorario.getText().toString().equals("") || editcodigoLocal.getText().toString().equals("") ) { Toast.makeText(this, "Debe completar los campos", Toast.LENGTH_LONG).show(); } else { helper.abrir(); DetalleReservaEvento detalleReservaEvento = helper.consultarDetalle(Integer.valueOf(editidHorario.getText().toString()), Integer.valueOf(spinner.getSelectedItem().toString()), editcodigoLocal.getText().toString()); ReservaEvento reservaEvento=helper.consultarReserva(Integer.valueOf(spinner.getSelectedItem().toString())); Horario horario=helper.consultarHorario((editidHorario.getText().toString())); helper.cerrar(); if (detalleReservaEvento == null) { Toast.makeText(this, "Detalles no registrados", Toast.LENGTH_SHORT).show(); } else { dia.setText((horario.getidDia())); horaI.setText(horario.gethoraInicio()); horaF.setText(horario.gethoraFin()); nomEvento.setText(reservaEvento.getNombreEvento()); capacidadEvento.setText(String.valueOf(reservaEvento.getCapacidadTotalEvento())); fechaEv.setText(reservaEvento.getFechaReservaEvento()); } } } public void limpiarTexto(View v) { spinner.setSelection(0); dia.setText(""); horaF.setText(""); horaI.setText(""); editcodigoLocal.setText(""); editidHorario.setText(""); nomEvento.setText(""); capacidadEvento.setText(""); fechaEv.setText(""); } }
[ "34138848+AbiMani@users.noreply.github.com" ]
34138848+AbiMani@users.noreply.github.com
934dc0f6656ccb9e3d09fd1d063b646cb9ef4680
b2a635e7cc27d2df8b1c4197e5675655add98994
/e/d/c/o/a0/n.java
e7b6bf47bd8b3ffd15427d74d81094d9dca14fcc
[]
no_license
history-purge/LeaveHomeSafe-source-code
5f2d87f513d20c0fe49efc3198ef1643641a0313
0475816709d20295134c1b55d77528d74a1795cd
refs/heads/master
2023-06-23T21:38:37.633657
2021-07-28T13:27:30
2021-07-28T13:27:30
390,328,492
1
0
null
null
null
null
UTF-8
Java
false
false
663
java
package e.d.c.o.a0; import e.d.c.b; import java.util.HashMap; public class n extends b { protected static final HashMap<Integer, String> e = new HashMap<Integer, String>(); static { e.put(Integer.valueOf(1), "Proprietary Thumbnail Format Data"); e.put(Integer.valueOf(3584), "Print Image Matching (PIM) Info"); } public n() { a(new m(this)); } public String a() { return "Kyocera/Contax Makernote"; } protected HashMap<Integer, String> b() { return e; } } /* Location: /home/yc/Downloads/LeaveHomeSafe.jar!/e/d/c/o/a0/n.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "game0427game@gmail.com" ]
game0427game@gmail.com
a5a0b7ed4de93b9b4f3fcb2d88a6930898a45cc0
c02bdf9a2fe406d2ad85ca52406ccde8d9d49d59
/src/main/java/org/example/microprofile/api/beans/plans/PlanBean.java
90751ec70d22b6943b16254a4799405384c1b962
[ "Apache-2.0" ]
permissive
EricWittmann/microprofile-openapi-jaxrs-example
f47704c12c0dda6e8a2730befdeec53e59c08e2b
09942ec89e630683a87e79fdd38f7dbd8535c671
refs/heads/master
2021-04-12T07:52:44.518305
2018-03-21T16:14:36
2018-03-21T16:14:36
126,022,609
0
2
Apache-2.0
2018-03-21T16:14:37
2018-03-20T13:34:22
Java
UTF-8
Java
false
false
3,094
java
/* * Copyright 2014 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.example.microprofile.api.beans.plans; import java.io.Serializable; import java.util.Date; import java.util.LinkedHashSet; import java.util.Set; import org.example.microprofile.api.beans.orgs.OrganizationBean; /** * Models a plan. * * @author eric.wittmann@redhat.com */ public class PlanBean implements Serializable { private static final long serialVersionUID = -7961331943587584049L; private OrganizationBean organization; private String id; private String name; private String description; private String createdBy; private Date createdOn; private Set<PlanVersionBean> versions = new LinkedHashSet<>(); /** * @return the id */ public String getId() { return id; } /** * @param id the id to set */ public void setId(String id) { this.id = id; } /** * @return the name */ public String getName() { return name; } /** * @param name the name to set */ public void setName(String name) { this.name = name; } /** * @return the createdOn */ public Date getCreatedOn() { return createdOn; } /** * @param createdOn the createdOn to set */ public void setCreatedOn(Date createdOn) { this.createdOn = createdOn; } /** * @return the description */ public String getDescription() { return description; } /** * @param description the description to set */ public void setDescription(String description) { this.description = description; } /** * @return the createdBy */ public String getCreatedBy() { return createdBy; } /** * @param createdBy the createdBy to set */ public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } /** * @return the organization */ public OrganizationBean getOrganization() { return organization; } /** * @param organization the organization to set */ public void setOrganization(OrganizationBean organization) { this.organization = organization; } /** * @return the versions */ public Set<PlanVersionBean> getVersions() { return versions; } /** * @param versions the versions to set */ public void setVersions(Set<PlanVersionBean> versions) { this.versions = versions; } }
[ "eric.wittmann@gmail.com" ]
eric.wittmann@gmail.com
1b28b84e0ffe42a7349f5436c171286551d7843f
8153030c0fc2db00f32197554bcfb1a042181cb9
/app/src/main/java/com/example/cookup/Logic/Enums/Type.java
030f1ccb7daa15fef1ba26651eef73baea84e026
[]
no_license
jmartiolivart/CookUp
3db7cd1180ad13b81b44b30e372f8ddc18fc6ad3
75be5d969091757027104ad0b1d459526c13ea24
refs/heads/main
2023-05-14T08:47:47.138627
2021-06-09T16:03:05
2021-06-09T16:03:05
375,413,268
0
0
null
null
null
null
UTF-8
Java
false
false
113
java
package com.example.cookup.Logic.Enums; public enum Type { gr, cuchara_sopera, ml, cucharilla }
[ "jmartiolivart@gmail.com" ]
jmartiolivart@gmail.com
f5de7ceb01895d2943a0cc893351b04df437bbf9
e19ea46263c4a8f873621ffa01c924c427447047
/baseio-core/src/main/java/com/generallycloud/baseio/component/NioEventLoop.java
71220a9644911e3df2d3019303bd2f6544a23f73
[ "Apache-2.0" ]
permissive
yun14128/baseio
bdde5f7d7e489985d1c5c9d237d418739450184c
1114f69a306ab18329d82af1d013b070fcdbf34f
refs/heads/master
2020-03-19T23:39:10.334688
2018-06-12T02:43:58
2018-06-12T02:43:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
28,134
java
/* * Copyright 2015-2017 GenerallyCloud.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.generallycloud.baseio.component; import java.io.IOException; import java.lang.reflect.Field; import java.nio.ByteBuffer; import java.nio.channels.SelectableChannel; import java.nio.channels.SelectionKey; import java.nio.channels.Selector; import java.nio.channels.ServerSocketChannel; import java.nio.channels.SocketChannel; import java.nio.channels.spi.SelectorProvider; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.AbstractSet; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.atomic.AtomicBoolean; import javax.net.ssl.SSLHandshakeException; import com.generallycloud.baseio.buffer.ByteBuf; import com.generallycloud.baseio.buffer.ByteBufAllocator; import com.generallycloud.baseio.buffer.UnpooledByteBufAllocator; import com.generallycloud.baseio.collection.Attributes; import com.generallycloud.baseio.collection.IntObjectHashMap; import com.generallycloud.baseio.common.ClassUtil; import com.generallycloud.baseio.common.CloseUtil; import com.generallycloud.baseio.common.MessageFormatter; import com.generallycloud.baseio.common.ReleaseUtil; import com.generallycloud.baseio.common.ThreadUtil; import com.generallycloud.baseio.component.ssl.SslHandler; import com.generallycloud.baseio.concurrent.AbstractEventLoop; import com.generallycloud.baseio.concurrent.BufferedArrayList; import com.generallycloud.baseio.concurrent.Waiter; import com.generallycloud.baseio.log.Logger; import com.generallycloud.baseio.log.LoggerFactory; import com.generallycloud.baseio.protocol.ChannelFuture; import com.generallycloud.baseio.protocol.SslFuture; /** * @author wangkai * */ //FIXME 使用ThreadLocal public class NioEventLoop extends AbstractEventLoop implements Attributes { private static final Logger logger = LoggerFactory .getLogger(NioEventLoop.class); private ByteBufAllocator allocator; private Map<Object, Object> attributes = new HashMap<>(); private ByteBuf buf; private BufferedArrayList<NioEventLoopTask> events = new BufferedArrayList<>(); private NioEventLoopGroup group; private volatile boolean hasTask = false; private final int index; private long lastIdleTime = 0; private AtomicBoolean selecting = new AtomicBoolean(); private SelectionKeySet selectionKeySet; private Selector selector; private IntObjectHashMap<SocketSession> sessions = new IntObjectHashMap<>(); private final int sessionSizeLimit = 1024 * 64; private SslFuture sslTemporary; private AtomicBoolean wakener = new AtomicBoolean(); // true eventLooper, false offerer private ByteBuffer[] writeBuffers; private List<ChannelFuture> readFutures; private final boolean sharable; private ChannelContext context; // use when not sharable private final boolean isAcceptor; private boolean selectorRegisted; NioEventLoop(NioEventLoopGroup group, int index, boolean isAcceptor) { if (!group.isSharable()) { this.context = group.getContext(); } this.index = index; this.group = group; this.isAcceptor = isAcceptor; this.sharable = group.isSharable(); this.allocator = group.getAllocatorGroup().getNext(); } private void accept(SelectionKey k) { if (!k.isValid()) { k.cancel(); return; } int readyOps = k.readyOps(); if (sharable) { if (isAcceptor) { if ((readyOps & SelectionKey.OP_ACCEPT) != 0 || (readyOps & SelectionKey.OP_CONNECT) != 0) { // 说明该链接未打开 try { registChannel(k); } catch (Exception e) { logger.error(e.getMessage(), e); } return; } } else { NioSocketChannel ch = (NioSocketChannel) k.attachment(); if (ch == null || !ch.isOpened()) { return; } if ((readyOps & SelectionKey.OP_WRITE) != 0) { try { ch.write(); } catch (Throwable e) { closeSocketChannel(ch, e); } return; } try { ch.read(buf); } catch (Throwable e) { if (e instanceof SSLHandshakeException) { finishRegistChannel(ch.getSession(), e); } closeSocketChannel(ch, e); } } } else { if ((readyOps & SelectionKey.OP_CONNECT) != 0 || (readyOps & SelectionKey.OP_ACCEPT) != 0) { // 说明该链接未打开 try { registChannel(k); } catch (Exception e) { logger.error(e.getMessage(), e); } return; } NioSocketChannel ch = (NioSocketChannel) k.attachment(); if (ch == null || !ch.isOpened()) { return; } if ((readyOps & SelectionKey.OP_WRITE) != 0) { try { ch.write(); } catch (Throwable e) { closeSocketChannel(ch, e); } return; } try { ch.read(buf); } catch (Throwable e) { if (e instanceof SSLHandshakeException) { finishRegistChannel(ch.getSession(), e); } closeSocketChannel(ch, e); } } } public ByteBufAllocator allocator() { return allocator; } public void registChannel(SelectionKey k) throws IOException { final ChannelContext context = (ChannelContext) k.attachment(); final ChannelService channelService = context.getChannelService(); final NioEventLoop thisEventLoop = this; final int channelId = group.getChannelIds().getAndIncrement(); if (channelService instanceof ChannelAcceptor) { ChannelAcceptor acceptor = (ChannelAcceptor) channelService; ServerSocketChannel serverChannel = acceptor.getSelectableChannel(); //有时候还未regist selector,但是却能selector到sk //如果getLocalAddress为空则不处理该sk if (serverChannel.getLocalAddress() == null) { return; } final SocketChannel channel = serverChannel.accept(); if (channel == null) { return; } NioEventLoop targetEventLoop = group.getNext(); // 配置为非阻塞 channel.configureBlocking(false); // 注册到selector,等待连接 if (thisEventLoop == targetEventLoop) { registChannel(channel, targetEventLoop, context, channelId); } else { targetEventLoop.dispatch(new NioEventLoopTask() { @Override public void close() throws IOException {} @Override public void fireEvent(NioEventLoop eventLoop) throws IOException { registChannel(channel, eventLoop, context, channelId); } }); } } else { @SuppressWarnings("resource") final ChannelConnector connector = (ChannelConnector) channelService; final SocketChannel javaChannel = connector.getSelectableChannel(); try { if (!javaChannel.isConnectionPending()) { return; } if (!javaChannel.finishConnect()) { throw new IOException("connect failed"); } NioEventLoop targetEL = connector.getEventLoop(); if (targetEL == null) { targetEL = group.getEventLoop(0); } if (sharable) { //我也不知道为什么要这么做,如果不这么做当eventLoopGroup为共享时 //且acceptor eventLoop同时注册了accept和connect时,selector.select()会 //立刻返回但是selected却为0,导致CPU100%,如果你知道是什么原因, //还请发起pr,或者邮件我都可以,感谢! SelectionKey sk = javaChannel.keyFor(selector); if (sk != null) { sk.cancel(); } } if (thisEventLoop == targetEL) { registChannel(javaChannel, targetEL, context, channelId); } else { targetEL.dispatch(new NioEventLoopTask() { @Override public void close() throws IOException { finishConnect(context, new IOException("closed nio eventloop")); } @Override public void fireEvent(NioEventLoop eventLoop) throws IOException { registChannel(javaChannel, eventLoop, context, channelId); } }); } } catch (IOException e) { finishConnect(context, e); } } } @Override public void clearAttributes() { this.attributes.clear(); } public void close() throws IOException { CloseUtil.close(selector); } private void closeEvents(BufferedArrayList<NioEventLoopTask> events) { for (NioEventLoopTask event : events.getBuffer()) { CloseUtil.close(event); } } private void closeSessions() { for (SocketSession session : sessions.values()) { CloseUtil.close(session); } } private void closeSocketChannel(NioSocketChannel channel, Throwable t) { logger.error(t.getMessage() + " channel:" + channel, t); CloseUtil.close(channel); } public void dispatch(NioEventLoopTask event) { //FIXME 找出这里出问题的原因 if (inEventLoop()) { if (!isRunning()) { CloseUtil.close(event); return; } handleEvent(event); return; } if (!isRunning()) { CloseUtil.close(event); return; } events.offer(event); /* ----------------------------------------------------------------- */ // 这里不需要再次判断了,因为close方法会延迟执行, // 可以确保event要么被执行,要么被close // if (!isRunning()) { // CloseUtil.close(event); // return; // } /* ----------------------------------------------------------------- */ wakeup(); } @Override protected void doStartup() throws IOException { this.writeBuffers = new ByteBuffer[group.getWriteBuffers()]; this.readFutures = new ArrayList<>(group.getReadFutures()); this.buf = UnpooledByteBufAllocator.getDirect().allocate(group.getChannelReadBuffer()); if (group.isEnableSsl()) { ByteBuf buf = UnpooledByteBufAllocator.getHeap().allocate(1024 * 64); this.sslTemporary = new SslFuture(buf, 1024 * 64); } this.selector = openSelector(); } @Override protected void doStop() { ThreadUtil.sleep(8); closeEvents(events); closeEvents(events); closeSessions(); CloseUtil.close(selector); ReleaseUtil.release(sslTemporary, this); ReleaseUtil.release(buf, buf.getReleaseVersion()); } public void finishRegistChannel(SocketSession session, Throwable e) { ChannelContext context = session.getContext(); ChannelService service = context.getChannelService(); if (service instanceof ChannelConnector) { ((ChannelConnector) service).finishConnect(session, e); } } public void finishConnect(ChannelContext context, Throwable e) { ChannelService service = context.getChannelService(); if (service instanceof ChannelConnector) { ((ChannelConnector) service).finishConnect(null, e); } } @Override public Object getAttribute(Object key) { return this.attributes.get(key); } @Override public Set<Object> getAttributeNames() { return this.attributes.keySet(); } @Override public NioEventLoopGroup getGroup() { return group; } public int getIndex() { return index; } public Selector getSelector() { return selector; } public SslHandler getSslHandler() { return (SslHandler) attributes.get(SslHandler.SSL_HANDlER_EVENT_LOOP_KEY); } public SslFuture getSslTemporary() { return sslTemporary; } public ByteBuffer[] getWriteBuffers() { return writeBuffers; } private void handleEvent(NioEventLoopTask event) { try { event.fireEvent(this); } catch (Throwable e) { CloseUtil.close(event); } } @Override public void loop() { final long idle = group.getIdleTime(); final Selector selector = this.selector; long nextIdle = 0; long selectTime = idle; for (;;) { if (!running) { setStopped(true); return; } try { int selected; if (hasTask) { selected = selector.selectNow(); hasTask = false; } else { if (selecting.compareAndSet(false, true)) { // Im not sure events.size if visible immediately by other thread ? // can we use events.getBufferSize() > 0 ? if (hasTask) { selected = selector.selectNow(); } else { // FIXME try selected = selector.select(selectTime); } hasTask = false; selecting.set(false); } else { selected = selector.selectNow(); hasTask = false; } } if (selected > 0) { if (selectionKeySet != null) { SelectionKeySet keySet = selectionKeySet; for (int i = 0; i < keySet.size; i++) { SelectionKey k = keySet.keys[i]; keySet.keys[i] = null; accept(k); } keySet.reset(); } else { Set<SelectionKey> sks = selector.selectedKeys(); for (SelectionKey k : sks) { accept(k); } sks.clear(); } } if (events.size() > 0) { List<NioEventLoopTask> es = events.getBuffer(); for (int i = 0; i < es.size(); i++) { handleEvent(es.get(i)); } } long now = System.currentTimeMillis(); if (now >= nextIdle) { sessionIdle(now); nextIdle = now + idle; selectTime = idle; } else { selectTime = nextIdle - now; } } catch (Throwable e) { logger.error(e.getMessage(), e); } } } @SuppressWarnings("rawtypes") private Selector openSelector() throws IOException { SelectorProvider provider = SelectorProvider.provider(); Object res = AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { return Class.forName("sun.nio.ch.SelectorImpl"); } catch (Throwable cause) { return cause; } } }); final Selector selector = provider.openSelector(); if (res instanceof Throwable) { return selector; } final Class selectorImplClass = (Class) res; final SelectionKeySet keySet = new SelectionKeySet(); res = AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { Field selectedKeysField = selectorImplClass.getDeclaredField("selectedKeys"); Field publicSelectedKeysField = selectorImplClass .getDeclaredField("publicSelectedKeys"); Throwable cause = ClassUtil.trySetAccessible(selectedKeysField); if (cause != null) { return cause; } cause = ClassUtil.trySetAccessible(publicSelectedKeysField); if (cause != null) { return cause; } selectedKeysField.set(selector, keySet); publicSelectedKeysField.set(selector, keySet); return null; } catch (Exception e) { return e; } } }); if (res instanceof Throwable) { return selector; } selectionKeySet = keySet; return selector; } protected void putSession(SocketSession session) throws RejectedExecutionException { IntObjectHashMap<SocketSession> sessions = this.sessions; Integer sessionId = session.getSessionId(); SocketSession old = sessions.get(sessionId); if (old != null) { CloseUtil.close(old); } if (sessions.size() >= sessionSizeLimit) { throw new RejectedExecutionException( "session size limit:" + sessionSizeLimit + ",current:" + sessions.size()); } sessions.put(sessionId.intValue(), session); session.getContext().getSessionManager().putSession(session); } private NioSocketChannel registChannel(SocketChannel javaChannel, NioEventLoop eventLoop, ChannelContext context, int channelId) throws IOException { SelectionKey sk = javaChannel.register(eventLoop.selector, SelectionKey.OP_READ); // 绑定SocketChannel到SelectionKey NioSocketChannel channel = (NioSocketChannel) sk.attachment(); if (channel != null) { CloseUtil.close(channel); } channel = new NioSocketChannel(eventLoop, sk, context, channelId); sk.attach(channel); // fire session open event channel.fireOpend(); if (!channel.isEnableSsl()) { finishRegistChannel(channel.getSession(), null); } return channel; } private SelectionKey registSelector(NioEventLoop eventLoop, ChannelContext context) throws IOException { ChannelService channelService = context.getChannelService(); SelectableChannel channel = channelService.getSelectableChannel(); if (context.isEnableSsl()) { eventLoop.setAttribute(SslHandler.SSL_HANDlER_EVENT_LOOP_KEY, context.getSslContext().newSslHandler()); } if (channelService instanceof ChannelAcceptor) { //FIXME 使用多eventLoop accept是否导致卡顿 是否要区分accept和read return channel.register(eventLoop.selector, SelectionKey.OP_ACCEPT, context); } else { return channel.register(eventLoop.selector, SelectionKey.OP_CONNECT, context); } } protected void registSelector(final ChannelContext context) throws IOException { if (sharable) { if (!isAcceptor) { throw new IOException("not acceptor event loop"); } } else { if (selectorRegisted) { throw new IOException("selector registed"); } selectorRegisted = true; } if (sharable && !isAcceptor) {} if (inEventLoop()) { registSelector(this, context); } else { final Waiter waiter = new Waiter(); dispatch(new NioEventLoopTask() { @Override public void close() throws IOException { waiter.response(null); } @Override public void fireEvent(NioEventLoop eventLoop) throws IOException { try { SelectionKey sk = registSelector(eventLoop, context); waiter.response(sk); } catch (Exception e) { waiter.response(e); throw e; } } }); waiter.await(); Object res = waiter.getResponse(); if (res instanceof IOException) { throw (IOException) res; } } // if (oldSelector != null) { // Selector oldSel = this.selector; // Selector newSel = newSelector; // Set<SelectionKey> sks = oldSel.keys(); // for (SelectionKey sk : sks) { // if (!sk.isValid() || sk.attachment() == null) { // continue; // } // try { // sk.channel().register(newSel, SelectionKey.OP_READ); // } catch (ClosedChannelException e) { // Object atta = sk.attachment(); // if (atta instanceof Closeable) { // CloseUtil.close((Closeable) atta); // } // } // } // CloseUtil.close(oldSelector); // } // this.selector = newSelector; } @Override public Object removeAttribute(Object key) { return this.attributes.remove(key); } protected void removeSession(SocketSession session) { sessions.remove(session.getSessionId()); session.getContext().getSessionManager().removeSession(session); } public SocketSession getSession(int sessionId) { return sessions.get(sessionId); } private void sessionIdle(long currentTime) { long lastIdleTime = this.lastIdleTime; this.lastIdleTime = currentTime; IntObjectHashMap<SocketSession> sessions = this.sessions; if (sessions.size() == 0) { return; } if (sharable) { for (SocketSession session : sessions.values()) { ChannelContext context = session.getContext(); List<SessionIdleEventListener> ls = context.getSessionIdleEventListeners(); if (ls.size() == 1) { try { ls.get(0).sessionIdled(session, lastIdleTime, currentTime); } catch (Exception e) { logger.error(e.getMessage(), e); } } else { for (SessionIdleEventListener l : ls) { try { l.sessionIdled(session, lastIdleTime, currentTime); } catch (Exception e) { logger.error(e.getMessage(), e); } } } } } else { List<SessionIdleEventListener> ls = context.getSessionIdleEventListeners(); for (SessionIdleEventListener l : ls) { for (SocketSession session : sessions.values()) { l.sessionIdled(session, lastIdleTime, currentTime); } } } } @Override public void setAttribute(Object key, Object value) { this.attributes.put(key, value); } // FIXME 会不会出现这种情况,数据已经接收到本地,但是还没有被EventLoop处理完 // 执行stop的时候如果确保不会再有数据进来 @Override public void wakeup() { if (wakener.compareAndSet(false, true)) { hasTask = true; if (selecting.compareAndSet(false, true)) { selecting.set(false); } else { selector.wakeup(); super.wakeup(); } wakener.set(false); } } public List<ChannelFuture> getReadFutures() { return readFutures; } private String desc; @Override public String toString() { if (desc == null) { desc = MessageFormatter.arrayFormat("NioEventLoop(idx:{},sharable:{},isAcceptor:{})", new Object[] { index, sharable, isAcceptor }); } return desc; } class SelectionKeySet extends AbstractSet<SelectionKey> { SelectionKey[] keys; int size; SelectionKeySet() { keys = new SelectionKey[1024]; } @Override public boolean add(SelectionKey o) { keys[size++] = o; if (size == keys.length) { increaseCapacity(); } return true; } @Override public boolean contains(Object o) { return false; } private void increaseCapacity() { SelectionKey[] newKeys = new SelectionKey[keys.length << 1]; System.arraycopy(keys, 0, newKeys, 0, size); keys = newKeys; } @Override public Iterator<SelectionKey> iterator() { throw new UnsupportedOperationException(); } @Override public boolean remove(Object o) { return false; } void reset() { size = 0; } @Override public int size() { return size; } } }
[ "8738115@qq.com" ]
8738115@qq.com
ec4a3b11884b5a5b325fd1247dd698ba619158ad
c53a1a5f557437797d30f68b30e08a7de109c805
/android/app/src/main/java/com/bai3react/MainActivity.java
18f02908d95fdaefe9d28b40c5cec9d36e6e2c32
[]
no_license
NgocNamFNT/LayOut
6f80e6a31d567848f8a85c4a06b2f46939513f1e
24f5e9c4eb471c9412a4ecf8c09b727ef8065b8b
refs/heads/master
2020-03-19T01:25:44.137213
2018-05-31T07:10:58
2018-05-31T07:10:58
135,544,564
0
0
null
null
null
null
UTF-8
Java
false
false
363
java
package com.bai3react; import com.facebook.react.ReactActivity; public class MainActivity extends ReactActivity { /** * Returns the name of the main component registered from JavaScript. * This is used to schedule rendering of the component. */ @Override protected String getMainComponentName() { return "Bai3React"; } }
[ "=" ]
=
290ecca39a64f6bc690016fade5864866e6872f8
cc2a38b403b99e6f1d500744e65427a5727d1e34
/CheckpointEnterprise/src/br/com/fiap/tds/exception/EntityNotFoundException.java
6562abaf18f7500fd14710031112a0f7de3f1b7f
[]
no_license
alisonguima/Enterprise_Application_Development
2b3f7c5bc0986864b17c5285682a6e475c481f74
ceb1678e703be69f20fe4608de8bf3753102ace1
refs/heads/main
2023-07-08T03:56:33.904308
2021-08-05T01:56:50
2021-08-05T01:56:50
341,381,406
0
0
null
null
null
null
ISO-8859-1
Java
false
false
276
java
package br.com.fiap.tds.exception; @SuppressWarnings("serial") public class EntityNotFoundException extends Exception { public EntityNotFoundException() { super("Entidade não encontrada"); } public EntityNotFoundException (String mensagem) { super(mensagem); } }
[ "alisonguimaraes17@gmail.com" ]
alisonguimaraes17@gmail.com
5577d990f25df2de62dbe8e28a39efdfbcb25884
df1bd8592db706162c19e494e6b8dd49a39e558f
/Lecture2-CodeExamples/src/ContinueExample.java
f058e441954191d7edee9b523571bc11e80ac4c4
[]
no_license
georgepetrof/CourseAutomationPragmatic18
5f0c0b56aff3133b8a3de9a60646a18ff3241f57
a0078d60db733f49437ebc06da63bcf89f197bd7
refs/heads/master
2020-04-01T17:49:14.663601
2018-11-09T14:26:26
2018-11-09T14:26:26
153,452,785
0
0
null
null
null
null
UTF-8
Java
false
false
210
java
public class ContinueExample { public static void main(String[] args) { int i = 0; while (i <= 50) { i = i + 1; if(i % 7 != 0) { continue; } System.out.print(i + " "); } } }
[ "you@example.com" ]
you@example.com
e91cd983845149947cc6ee9462d3707be94be53a
0a3ef652fb5fd3e90f329872ea1534aaf0fc454a
/src/OrderBookAskStorage.java
f1476b5bb2516003962baae55d42fafa9f77a54f
[]
no_license
olegkamuz/Shares
97fc3897c2cac9054d9edc15d347a8d9cd2d3c5c
fa521ac8a005eb3e9288eced1ea826d31e37b213
refs/heads/master
2022-08-31T07:47:51.148338
2020-05-26T14:53:31
2020-05-26T14:53:31
267,069,688
0
0
null
null
null
null
UTF-8
Java
false
false
1,024
java
import java.util.Map; import java.util.TreeMap; public class OrderBookAskStorage { private static OrderBookAskStorage instance = new OrderBookAskStorage(); private TreeMap<Integer, Integer> orders = new TreeMap<Integer, Integer>(); private OrderBookAskStorage() { } public static OrderBookAskStorage getInstance() { return instance; } public void add(int price, int size) { this.orders.put(price, size); } public void updateSizeWherePrice(int price, int size) { orders.replace(price, size); } public Integer getSizeAtPrice(Integer price) { if (!orders.containsKey(price)) { return null; } return orders.get(price); } public void findNewBestAsk() { for (Map.Entry<Integer, Integer> entry : orders.entrySet()) { if (entry.getValue() > 0) { (OrderBookAsk.getInstance()).setNewBest(entry.getKey(), entry.getValue()); break; } } } }
[ "olegkamuz@gmail.com" ]
olegkamuz@gmail.com
8673bf4580d3cb14777c8d9adf27a318a683e8b4
39b6bc2d1b59c419c2f26154f95c1994d9fa8c78
/xpath-lang/src/main/java/org/intellij/lang/xpath/XPath2QuoteHandler.java
01864edb3c3d3934ff98331e9a032db50f1d7d95
[ "Apache-2.0" ]
permissive
consulo/consulo-xpath
6ab5b854eedfc6cb6952661e65144bc59f1eabeb
a6bfc5b013fde798b20d7ba273962b8b6a833fcf
refs/heads/master
2023-08-16T12:50:11.186300
2023-05-16T18:24:04
2023-05-16T18:24:04
13,907,956
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package org.intellij.lang.xpath; import consulo.annotation.component.ExtensionImpl; import consulo.virtualFileSystem.fileType.FileType; import javax.annotation.Nonnull; @ExtensionImpl public class XPath2QuoteHandler extends XPathQuoteHandler { @Nonnull @Override public FileType getFileType() { return XPathFileType.XPATH2; } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
0e768e6dba1094a6d6f1c6764fbebf7b2e9241d5
b19ee5b016a165a0e91e27803d387370244931e5
/MybatisAnno/src/test/java/MyBatisTest4.java
fa9c2cf9821ea08e6cca970c9b8fb7e124299461
[]
no_license
wei-py/Java_SSM_learning
a0721ffa1f4c13d837eb7207a4c95d37c9ea08c1
8c3f879eda5be1fa690b99459be3ae3465575d3a
refs/heads/master
2023-06-04T13:21:38.643395
2021-06-29T05:53:50
2021-06-29T05:53:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,034
java
import makoto.domain.User; import makoto.mapper.UserMapper; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import org.junit.Before; import org.junit.Test; import java.io.IOException; import java.io.InputStream; import java.util.List; public class MyBatisTest4 { private UserMapper mapper; @Before public void before() throws IOException { InputStream resourceAsStream = Resources.getResourceAsStream("sqlMapConfig.xml"); SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(resourceAsStream); SqlSession sqlSession = sqlSessionFactory.openSession(true); mapper = sqlSession.getMapper(UserMapper.class); } @Test public void testSave(){ List<User> userAndRoleAll = mapper.findUserAndRoleAll(); for (User user : userAndRoleAll) { System.out.println(user); } } }
[ "jianwangp@icloud.com" ]
jianwangp@icloud.com
418a850f2f7abfd2e5ecd1ad5e970a84f48172ba
cbb0615ff079b9d6425f0b22754451de9058cd49
/src/java/com/controleur/Controleur.java
527c771158df0a37c2a6cac566ac36bae5a82260
[]
no_license
damiennevaldo/EmployesJPA
f7928dc7cd11536593234d16bc0de734cf47be49
872c7f48fc87bb887eb82d69bf2d8f69c4500c73
refs/heads/master
2020-03-20T23:40:45.160372
2018-06-19T07:52:11
2018-06-19T07:52:11
137,857,262
0
0
null
null
null
null
UTF-8
Java
false
false
8,226
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.controleur; import com.employes.utils.EmployesConstantes; import com.model.Employes; import com.model.Identifiants; import java.io.IOException; import java.util.ArrayList; import javax.ejb.EJB; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * * @author Jacques */ public class Controleur extends HttpServlet { @EJB private ConnexionPersistence connexionPersistence; ArrayList<Employes> listeEmployes = new ArrayList<>(); ArrayList<Identifiants> listeIdentifiants = new ArrayList<>(); Employes employe= new Employes(); String idEmploye = EmployesConstantes.FRM_ID_EMPL_SELECT; /** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); String loginForm = request.getParameter(EmployesConstantes.FRM_LOGIN); String mdpForm = request.getParameter(EmployesConstantes.FRM_MDP); String action = request.getParameter(EmployesConstantes.ACTION); if (action == null) { request.getRequestDispatcher(EmployesConstantes.PAGE_INDEX).forward(request, response); } else if (action != null) { switch (action) { case EmployesConstantes.ACTION_LOGIN: //Si le nom d'utilisateur et le mot de passe sont vide, renvoyer vers l'index //avec un message d'erreur. if (loginForm != null && mdpForm != null) { if (loginForm.isEmpty() || mdpForm.isEmpty()) { request.setAttribute("cleMessageErreur", EmployesConstantes.ERREUR_SAISIE_VIDE); request.getRequestDispatcher(EmployesConstantes.PAGE_INDEX).forward(request, response); } else { listeIdentifiants.addAll(connexionPersistence.getIdentifiants()); for (Identifiants i : listeIdentifiants) { if (i.getLogin().equals(loginForm) && i.getMdp().equals(mdpForm)) { listeEmployes.clear(); listeEmployes.addAll(connexionPersistence.getEmployes()); request.setAttribute("cleListeEmployes", listeEmployes); request.getRequestDispatcher(EmployesConstantes.PAGE_TOUS_LES_EMPLOYES).forward(request, response); } else { request.setAttribute("cleMessageErreur", EmployesConstantes.ERREUR_INFOS_CONN_KO); request.getRequestDispatcher(EmployesConstantes.PAGE_INDEX).forward(request, response); } } } } case EmployesConstantes.ACTION_SUPPRIMER: if (request.getParameter(idEmploye) != null) { int idClientASupprimer = Integer.parseInt(request.getParameter(idEmploye)); connexionPersistence.supprimerEmployes(idClientASupprimer); listeEmployes.clear(); listeEmployes.addAll(connexionPersistence.getEmployes()); request.setAttribute("cleListeEmployes", listeEmployes); request.getRequestDispatcher(EmployesConstantes.PAGE_TOUS_LES_EMPLOYES).forward(request, response); } case EmployesConstantes.ACTION_MODIFIER: employe = (Employes) session.getAttribute("employe"); employe.setAdresse(request.getParameter(EmployesConstantes.CHAMP_ADRESSE)); employe.setCodepostal(request.getParameter(EmployesConstantes.CHAMP_CODEPOSTAL)); employe.setEmail(request.getParameter(EmployesConstantes.CHAMP_EMAIL)); employe.setNom(request.getParameter(EmployesConstantes.CHAMP_NOM)); employe.setPrenom(request.getParameter(EmployesConstantes.CHAMP_PRENOM)); employe.setTeldom(request.getParameter(EmployesConstantes.CHAMP_TELDOMICILE)); employe.setTelport(request.getParameter(EmployesConstantes.CHAMP_TELPORTABLE)); employe.setTelpro(request.getParameter(EmployesConstantes.CHAMP_TELPRO)); employe.setVille(request.getParameter(EmployesConstantes.CHAMP_VILLE)); connexionPersistence.modifierEmployes(employe); listeEmployes.clear(); listeEmployes.addAll(connexionPersistence.getEmployes()); request.setAttribute("cleListeEmployes", listeEmployes); request.getRequestDispatcher(EmployesConstantes.PAGE_TOUS_LES_EMPLOYES).forward(request, response); case EmployesConstantes.ACTION_DETAILS: if (request.getParameter(idEmploye) != null) { int idEmployeSelect = Integer.parseInt(request.getParameter(idEmploye)); listeEmployes.clear(); listeEmployes.addAll(connexionPersistence.getEmployesId(idEmployeSelect)); employe = listeEmployes.get(0); System.out.println(""); session.setAttribute("employe", employe); request.getRequestDispatcher(EmployesConstantes.PAGE_DETAIL_EMPLOYE).forward(request, response); } case EmployesConstantes.ACTION_VOIR_LISTE: listeEmployes.clear(); listeEmployes.addAll(connexionPersistence.getEmployes()); request.setAttribute("cleListeEmployes", listeEmployes); request.getRequestDispatcher(EmployesConstantes.PAGE_TOUS_LES_EMPLOYES).forward(request, response); } } } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "esic@esic-HP.home" ]
esic@esic-HP.home
9ca1acec6d1c5c087f4e3626178b62a79edd6c31
6823598a7ecc8c7f1dd1dc4a5a52939b51c1d05d
/Voting App - CS 1631/SISv5/Components/VotingApp/TallyTable.java
b66a604c387450c3f1648063c6dc817b1d232c1b
[]
no_license
kmk189/Sample
b1a53e1f32d7d712b8ff3c34850967c3a4ec3546
ee48384b13a6afd0036c10e45332b76124ffb960
refs/heads/master
2021-03-27T08:40:33.900584
2018-12-30T17:38:17
2018-12-30T17:38:17
103,881,626
1
0
null
null
null
null
UTF-8
Java
false
false
2,487
java
import java.util.*; public class TallyTable{ ArrayList<Voters> voters; ArrayList<Candidate> candidates; //Constructor public TallyTable(int[] candidateList, String[] topicList){ voters = new ArrayList<Voters>(); candidates = new ArrayList<Candidate>(); for(int i = 0; i < candidateList.length; i++){ candidates.add(new Candidate(Integer.toString(candidateList[i]), 0, topicList[i])); } } //returns 0 if invalid //returns 1 if valid public int castVote(String voterID, String candidateID){ Candidate temp = new Candidate(); for(int i = 0; i < candidates.size(); i++){ if(candidates.get(i).getCandidateID().equals(candidateID)){ temp = candidates.get(i); break; //valid candidate ID } else if(i == candidates.size() - 1){ return 0; } } for(int i = 0; i < voters.size(); i++){ if(voters.get(i).getVoterID().equals(voterID)){ return 0; } } voters.add(new Voters(voterID, candidateID)); temp.addVote(); return 1; } public Candidate getWinner(){ int currWinner = 0; Candidate winner = new Candidate(); for(int i = 0; i < candidates.size(); i++){ if(candidates.get(i).getNumVotes() > currWinner){ currWinner = candidates.get(i).getNumVotes(); winner = candidates.get(i); } } return winner; } public void displayAll(){ System.out.println(""); System.out.println("All candidate results: "); System.out.println("-------------------------"); System.out.printf("CandidateID Votes\n"); for(int i = 0; i < candidates.size(); i++){ System.out.printf("%-19s %-5d\n", candidates.get(i).getCandidateID(), candidates.get(i).getNumVotes()); } System.out.println(""); } public String[] getTopicList(){ ArrayList<String> topic_list = new ArrayList<String>(); for(int i = 0; i < candidates.size(); i++){ topic_list.add(candidates.get(i).getTopic()); } String[] arr = new String[topic_list.size()]; for(int j = 0; j < topic_list.size(); j++){ arr[j] = topic_list.get(j); } return arr; } public int[] getVoteList(){ ArrayList<Integer> vote_list = new ArrayList<Integer>(); for(int i = 0; i < candidates.size(); i++){ vote_list.add(candidates.get(i).getNumVotes()); } int[] arr = new int[vote_list.size()]; for(int j = 0; j < vote_list.size(); j++){ arr[j] = vote_list.get(j); } return arr; } public void clearTables(){ voters.clear(); candidates.clear(); } }
[ "kmk189@pitt.edu" ]
kmk189@pitt.edu
9bc18de6e9a3d5dcc2a2cb43922bb68bb16c3abc
3d43770097eac165d011e5be5c374388fdf86b89
/MyytavatAsunnot/src/main/java/wad/myytavatasunnot/database/DAO.java
7e761bf24da6b55966323afee1fbcd8d22d22da7
[]
no_license
stade/WAD
15b6250b6353cbd482f1324053dff29a557257da
834f5cc883f177ec033a1675ff4eba8f826e5ff3
refs/heads/master
2020-06-05T12:59:46.648194
2012-03-30T09:19:14
2012-03-30T09:19:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
204
java
package wad.myytavatasunnot.database; public interface DAO<T> { public void create(T instance); public T read(int id); public void delete(T instance); public T update(T instance); }
[ "tatu.tahvanainen@gmail.com" ]
tatu.tahvanainen@gmail.com
2a1d17edb7ecaee6219810bbda9e2a9e52db2c0d
05e13c408bede78bb40cbaba237669064eddee10
/src/main/java/com/fedex/ws/openship/v18/ConsolidationTransborderDistributionDetail.java
40a0d2136bc6d14fff2132ed970aad1c5b5e6594
[]
no_license
noboomu/shipping-carriers
f60ae167bd645368012df0817f0c0d54e8fff616
74b2a7b37ac36fe2ea16b4f79f2fb0f69113e0f6
refs/heads/master
2023-05-07T08:54:31.217066
2021-06-02T23:48:11
2021-06-02T23:48:11
373,320,009
0
0
null
null
null
null
UTF-8
Java
false
false
3,054
java
package com.fedex.ws.openship.v18; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlSchemaType; import jakarta.xml.bind.annotation.XmlType; /** * Specifies consolidation data for a tranborder distribution shipment. This is data that can be provided by the customer at the consolidation creation time. * * <p>Java class for ConsolidationTransborderDistributionDetail complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ConsolidationTransborderDistributionDetail"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="SpecialServicesRequested" type="{http://fedex.com/ws/openship/v18}TransborderDistributionSpecialServicesRequested" minOccurs="0"/&gt; * &lt;element name="Routing" type="{http://fedex.com/ws/openship/v18}TransborderDistributionRoutingType" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ConsolidationTransborderDistributionDetail", propOrder = { "specialServicesRequested", "routing" }) public class ConsolidationTransborderDistributionDetail { @XmlElement(name = "SpecialServicesRequested") protected TransborderDistributionSpecialServicesRequested specialServicesRequested; @XmlElement(name = "Routing") @XmlSchemaType(name = "string") protected TransborderDistributionRoutingType routing; /** * Gets the value of the specialServicesRequested property. * * @return * possible object is * {@link TransborderDistributionSpecialServicesRequested } * */ public TransborderDistributionSpecialServicesRequested getSpecialServicesRequested() { return specialServicesRequested; } /** * Sets the value of the specialServicesRequested property. * * @param value * allowed object is * {@link TransborderDistributionSpecialServicesRequested } * */ public void setSpecialServicesRequested(TransborderDistributionSpecialServicesRequested value) { this.specialServicesRequested = value; } /** * Gets the value of the routing property. * * @return * possible object is * {@link TransborderDistributionRoutingType } * */ public TransborderDistributionRoutingType getRouting() { return routing; } /** * Sets the value of the routing property. * * @param value * allowed object is * {@link TransborderDistributionRoutingType } * */ public void setRouting(TransborderDistributionRoutingType value) { this.routing = value; } }
[ "bauer.j@gmail.com" ]
bauer.j@gmail.com
67f94bf85bb0fb156bc041cd52fdc7d84ffa04ff
d786006e39b9e702801cd58510948f7343b99309
/src/com/ismlslck/controller/StudentController.java
d9e250dadccab5b035a2c77d2ec7dbfbb12c5572
[]
no_license
ismlslckk/springMVCLearn
6e265d10710d77ccc5af72e59b410b361739b3d6
9ac1921ecc81e0788ad13da33575fb87276e1e86
refs/heads/master
2020-03-22T04:12:41.154380
2018-07-09T19:25:22
2018-07-09T19:25:22
139,481,351
1
0
null
null
null
null
UTF-8
Java
false
false
6,892
java
package com.ismlslck.controller; import com.ismlslck.Utility; import com.ismlslck.entity.Department; import com.ismlslck.entity.Faculty; import com.ismlslck.entity.Student; import com.ismlslck.service.DepartmentService; import com.ismlslck.service.FacultyService; import com.ismlslck.service.StudentService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.convert.converter.Converter; import org.springframework.stereotype.Component; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.validation.FieldError; import org.springframework.validation.ObjectError; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import javax.validation.Valid; import java.util.List; @Controller @RequestMapping("/student") public class StudentController { @Autowired private StudentService studentService; @Autowired private FacultyService facultyService; @Autowired private DepartmentService departmentService; @Component public class DepartmentConverter implements Converter<String, Department> { @Override public Department convert(String id) { try { return departmentService.getDepartmentById(Integer.parseInt(id)); } catch (NumberFormatException ex) { return null; } } } @Component public class FacultyConverter implements Converter<String, Faculty> { @Override public Faculty convert(String id) { try { return facultyService.getFacultyById(Integer.parseInt(id)); } catch (NumberFormatException ex) { return null; } } } @RequestMapping(value = "/list", method = RequestMethod.GET, produces = {"application/json; charset=UTF-8"}) public String getAllStudents(@ModelAttribute("message") String message,Model model) { List<Student> students = studentService.getAllStudents(); model.addAttribute("students", students); model.addAttribute("message", message); return "list-student"; } @RequestMapping(value = "/saveStudentForm", method = RequestMethod.GET) public String saveStudentForm(Model model) { List<Faculty> faculties = facultyService.getAllFaculty(); List<Department> departments = departmentService.getAllDepartment(); model.addAttribute("student", new Student()); model.addAttribute("faculties", faculties); model.addAttribute("departments", departments); return "save-student"; } @RequestMapping(value = "/saveStudent", method = RequestMethod.POST) public String saveStudent(@RequestParam("file") MultipartFile file,@ModelAttribute("student") @Valid Student student, BindingResult bindingResult, Model model) { //bindingResult.getFieldErrors().add(new FieldError("student","department.faculty","ger")); //file ilk parametre olmadıgında 400 hatası meydana gelmekte. if(student.getDepartment().getFaculty()==null){ bindingResult.rejectValue("department.faculty.name","department.faculty.name","(*)Fakülte ismi boş geçilemez."); } if (bindingResult.hasErrors()) { model.addAttribute("student", student); model.addAttribute("faculties", facultyService.getAllFaculty()); model.addAttribute("departments", departmentService.getAllDepartment()); return "save-student"; } else { if(file.isEmpty()){ if (studentService.saveStudent(student)) { return "redirect:/student/list"; } else { model.addAttribute("message", "Bir sorun oluştu,daha sonra tekrar deneyiniz."); return "save-student"; } } else { String uploadFileName=Utility.uploadFile(file); if(uploadFileName!=null){ student.setAvatar(uploadFileName); if (studentService.saveStudent(student)) { return "redirect:/student/list"; } else { model.addAttribute("message", "Bir sorun oluştu,daha sonra tekrar deneyiniz."); return "save-student"; } } else { model.addAttribute("message", "Bir sorun oluştu,daha sonra tekrar deneyiniz(dosya yüklenemedi)."); return "save-student"; } } } } @RequestMapping(value = "/updateForm/{studentId}", method = RequestMethod.GET) public String updateStudentForm(@PathVariable int studentId, Model model) { model.addAttribute("student", studentService.getStudentById(studentId)); model.addAttribute("faculties", facultyService.getAllFaculty()); model.addAttribute("departments", departmentService.getAllDeparmentByFacultyId(facultyService.getFacultyIdByStudentId(studentId))); return "update-student"; } @RequestMapping(value = "/update", method = RequestMethod.POST) public String updateStudent(@ModelAttribute("student") Student student, BindingResult bindingResult, Model model, RedirectAttributes redirectAttributes) { if (bindingResult.hasErrors()) { model.addAttribute("message", "Bir sorun oluştu,daha sonra tekrar deneyiniz."); model.addAttribute("student", student); return "update-student"; } else { if (studentService.updateStudent(student)) { redirectAttributes.addFlashAttribute("message", "Güncelleme başarılı."); return "redirect:/student/list"; } else { model.addAttribute("message", "Bir sorun oluştu,daha sonra tekrar deneyiniz."); model.addAttribute("student", student); return "update-student"; } } } @RequestMapping(value = "/delete/{studentId}",method = RequestMethod.GET) public String deleteStudent(@PathVariable int studentId,RedirectAttributes redirectAttributes){ if(studentService.deleteStudent(studentId)){ redirectAttributes.addFlashAttribute("message","Öğrenci başarıyla silindi"); return "redirect:/student/list"; } else { redirectAttributes.addFlashAttribute("message","Bir sorun oluştu,öğrenci silinemedi!"); return "redirect:/student/list"; } } }
[ "ismlslck@gmail.com" ]
ismlslck@gmail.com
6be503b970017062f2d6c43e8a2217c733d5c8f5
c72b09f3c55ef1a17a881824d89adb578f5f264b
/src/main/java/com/srm/platform/vendor/utility/SearchItem.java
91c98642759dac8961272d1418dc3f37f8d43777
[]
no_license
weizhisiwang/bootapp
43c9e641e6fca233caf07f06d5c3138fe6873e94
5e2d65af88701da79cd6cbe2d2b214701038ee43
refs/heads/master
2022-12-31T16:36:38.285533
2019-01-18T02:56:35
2019-01-18T02:56:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
215
java
package com.srm.platform.vendor.utility; import com.fasterxml.jackson.annotation.JsonProperty; public interface SearchItem { @JsonProperty("id") String getCode(); @JsonProperty("title") String getName(); }
[ "38938914+richolsu@users.noreply.github.com" ]
38938914+richolsu@users.noreply.github.com
1699e49804e4cd93b6767b6182578b265b861ce2
66bcb983f6ed34a6d742b2af4e0aa41e45c89fcc
/a/src/de/fub/bytecode/generic/LASTORE.java
0c6cc7b430fc2746fdddc5f8ce522a17895a38e6
[]
no_license
vmram87/raytracempj
d3be7a4bb89a01746c0122d4154221a88d197351
b3f42c06afb459b4a49daaeeb1be8b37d0426879
refs/heads/master
2021-01-10T01:32:29.222948
2010-11-05T04:10:14
2010-11-05T04:10:14
48,790,897
0
0
null
null
null
null
UTF-8
Java
false
false
391
java
package de.fub.bytecode.generic; /** * LASTORE - Store into long array * <PRE>Stack: ..., arrayref, index, value.word1, value.word2 -&gt; ...</PRE> * * @version $Id: LASTORE.java,v 1.1.1.1 2000/08/10 16:05:07 cvs Exp $ * @author <A HREF="http://www.inf.fu-berlin.de/~dahm">M. Dahm</A> */ public class LASTORE extends ArrayInstruction { public LASTORE() { super(LASTORE); } }
[ "jinqing808@190398b0-3e5a-db71-e392-7b5dfaa953ca" ]
jinqing808@190398b0-3e5a-db71-e392-7b5dfaa953ca
fdd00ebbb96493e968c479b17e1357068018b721
5c0a5d1e3685720e5fa387a26a60dd06bb7c6e4a
/promote/guess-api/src/main/java/com/spark/bitrade/task/PraiseTaskHandlerImpl.java
9f2b386e7f89ee48909bf0ab813a7df1a2099763
[]
no_license
im8s/silk-v1
5d88ccd1b5ed2370f8fba4a70298d1d14d9a175d
ff9f689443af30c815a8932899a333dfc87f6f12
refs/heads/master
2022-06-20T13:08:01.519634
2020-04-28T02:56:50
2020-04-28T02:56:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,724
java
package com.spark.bitrade.task; import com.alibaba.fastjson.JSON; import com.spark.bitrade.constant.BettingConfigStatus; import com.spark.bitrade.constant.BettingStateOperateMark; import com.spark.bitrade.constant.BettingStateOperateType; import com.spark.bitrade.constant.GuessKafkaTopicConstant; import com.spark.bitrade.dao.BettingConfigDao; import com.spark.bitrade.entity.*; import com.spark.bitrade.processor.CoinExchangeRateService; import com.spark.bitrade.processor.StatJackpotService; import com.spark.bitrade.service.*; import com.spark.bitrade.util.SpringContextUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.kafka.core.KafkaTemplate; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; import java.util.Optional; /***  * 中奖奖励操作任务  * @author yangch  * @time 2018.09.14 14:31  */ @Component @Slf4j public class PraiseTaskHandlerImpl implements IBettingTaskHandler { @Autowired private BettingConfigService bettingConfigService; @Autowired private BettingStateService bettingStateService; @Autowired private PriceRangeService priceRangeService; @Autowired private RewardService rewardService; @Autowired private CoinExchangeRateService coinExchangeRateService; @Autowired private StatJackpotService statJackpotService; @Autowired private BettingRecordService bettingRecordService; @Autowired private JackpotService jackpotService; @Autowired private KafkaTemplate<String,String> kafkaTemplate; @Autowired BettingConfigDao bettingConfigDao; @Override @Async public void run(BettingState bettingState) { //思路: // 检验 bettingState 的状态,未处理则标记为已处理 // 记录中奖价格 // 生成中奖记录 // 设置 本周期的竞猜状态为 ‘领奖状态’ // 标记 bettingState 的状态为‘已完成’ // 通知 ‘中奖通知’ if(bettingState.getMark() == BettingStateOperateMark.UNTREATED) { try { log.info("info-praise:竞猜配置的ID={}", bettingState.getPeriodId()); //更新状态 为‘处理中’ bettingState.setMark(BettingStateOperateMark.TREATING); bettingStateService.save(bettingState); BettingConfig bettingConfig = bettingConfigDao.findOne(bettingState.getPeriodId()); log.info("info-praise:实时获取竞猜配置中的价格={}", bettingConfig.getPrizePrice()); //BettingConfig bettingConfig = bettingConfigService.findConfigById(bettingState.getPeriodId()); if(bettingConfig.getPrizePrice() == null) { //获取开奖价格为null的情况,实时的从数据库中获取 bettingConfig = bettingConfigService.findConfigByIdRealtime(bettingState.getPeriodId()); } //获取开奖价格 BigDecimal currPrizePrice = bettingConfig.getPrizePrice(); log.info("info-praise:获取开奖价格={}", currPrizePrice); //计算中奖价格的区间 Optional<BettingPriceRange> bettingPriceRange = priceRangeService.determinePriceRange(bettingState.getPeriodId(), currPrizePrice); //中奖用户的兑换汇率计算 BigDecimal cashPrizeRatio = BigDecimal.ZERO; if(bettingPriceRange.isPresent()) { log.info("info-praise:中奖价格的区间={}", bettingPriceRange.get().getId()); //投注币种与奖品的汇率 BigDecimal toPrizeRate = coinExchangeRateService.toRate(bettingConfig.getBetSymbol(), bettingConfig.getPrizeSymbol()); log.info("info-praise:投注币种与奖品的汇率={},投注币种={},中奖奖励币种={}", toPrizeRate, bettingConfig.getBetSymbol(), bettingConfig.getPrizeSymbol()); //本期总奖池数量,为投注币种 BigDecimal currentJackpotTotal = statJackpotService.statCurrentJackpot(bettingState.getPeriodId()); log.info("info-praise:本期总奖池数量={}", currentJackpotTotal); //本期中奖奖池数量=本期总奖池数量*65%(本期中奖奖池比例),为投注币种 //本期中奖奖池比例 BigDecimal prizeRatio = bettingConfig.getPrizeRatio(); log.info("info-praise:本期中奖奖池比例={}", prizeRatio); BigDecimal currentJackpot = currentJackpotTotal.multiply(prizeRatio).setScale(8, BigDecimal.ROUND_DOWN); log.info("info-praise:本期中奖奖池数量={}", currentJackpot); //中奖用户的总投注数量,为投注币种 BigDecimal currBetTotalByPriceRange = bettingRecordService.queryBetTotalByPriceRange(bettingState.getPeriodId(), bettingPriceRange.get().getId()); log.info("info-praise:中奖用户的总投注数量={}", currBetTotalByPriceRange); //中奖用户的兑换汇率 BigDecimal rate = BigDecimal.ZERO; if(currBetTotalByPriceRange.compareTo(BigDecimal.ZERO)>0) { rate = currentJackpot.divide(currBetTotalByPriceRange, 8, BigDecimal.ROUND_DOWN); } log.info("info-praise:中奖用户的兑换汇率={}", rate); //按投注币种计算中奖兑换汇率 cashPrizeRatio = rate.multiply(toPrizeRate).setScale(8, BigDecimal.ROUND_DOWN); log.info("info-praise:按投注币种计算中奖兑换汇率={}", cashPrizeRatio); } //事务处理 getService().complete4Transactional(bettingState, bettingConfig, bettingPriceRange, cashPrizeRatio); //中奖消息推送 通知 this.sendKafkaMessage(bettingStateService.findBettingState( bettingConfig.getId(), BettingStateOperateType.OP_PRAISE_NOTIFICATION)); }catch (Exception e){ e.printStackTrace(); log.error("中奖奖励操作失败:{}", e.getMessage()); } } else { //正在处理中 log.info("正在处理中..."); } } //开奖及中奖用户记录处理 @Transactional(rollbackFor = Exception.class) public void complete4Transactional(BettingState bettingState, BettingConfig bettingConfig, Optional<BettingPriceRange> bettingPriceRangeOptional, BigDecimal cashPrizeRatio ){ //创建用户的中奖记录 if(bettingPriceRangeOptional.isPresent()) { BettingPriceRange bettingPriceRange = bettingPriceRangeOptional.get(); String cashSymbol = bettingConfig.getPrizeSymbol(); rewardService.batchSavePrizeRecord(bettingState.getPeriodId(), bettingPriceRange.getId(), cashPrizeRatio, cashSymbol); bettingRecordService.updatePraiseStatus(bettingPriceRange.getId()); bettingRecordService.updateLostStatus(bettingState.getPeriodId(), bettingPriceRange.getId()); } else { log.info("本期没有中奖用户。。。"); bettingRecordService.updateLostStatus(bettingState.getPeriodId(), -1); } //生成奖池记录 Jackpot jackpot = jackpotService.findByPeriodId(bettingState.getPeriodId()); if(null == jackpot) { jackpot = new Jackpot(); } jackpot.setPeriodId(bettingState.getPeriodId()); jackpot.setPrizePrice(bettingConfig.getPrizePrice()==null? BigDecimal.ZERO : bettingConfig.getPrizePrice()); if(bettingPriceRangeOptional.isPresent()) { jackpot.setRangeId(bettingPriceRangeOptional.get().getId()); //设置中奖的价格区间 } jackpot.setJackpotBalance(BigDecimal.ZERO); //当期奖池余量,奖池沉淀时再更新改值 jackpot.setRedpacketBalance(BigDecimal.ZERO); //当期红包余量,奖池沉淀时再更新改值 jackpot.setPrizeSymbol(bettingConfig.getPrizeSymbol()); jackpot.setRedpacketSymbol(bettingConfig.getRedpacketPrizeSymbol()); jackpotService.save(jackpot); //更改为 ‘领奖’状态 if(bettingConfig.getStatus() != BettingConfigStatus.STAGE_PRIZING){ log.debug("更新状态为‘领奖中’"); bettingConfigService.updateById(bettingConfig.getId(), BettingConfigStatus.STAGE_PRIZING); } //更新为 完成 bettingState.setMark(BettingStateOperateMark.TREATED); bettingStateService.save(bettingState); } //发送kafka消息 private void sendKafkaMessage(BettingState bettingState){ if(null != bettingState && bettingState.getMark() != BettingStateOperateMark.TREATED) { kafkaTemplate.send(GuessKafkaTopicConstant.TX_PROMOTE_GUESS_HANDLER, String.valueOf(bettingState.getOperate().getCode()), JSON.toJSONString(bettingState)); } } public PraiseTaskHandlerImpl getService(){ return SpringContextUtil.getBean(PraiseTaskHandlerImpl.class); } }
[ "huihui123" ]
huihui123
2c4916cd6a962e6a8aa7131bf40ae06a6a276acf
a4864679d19b97b8c1951f9a17fb65a0731cd27a
/src/managementsoftware/LongestPalindromeSubString.java
9f9326825a864216cac0ee9384096e7cd0cc37ab
[]
no_license
samsony17/Java-Code-Samples
660bfdb1f391fbb43828fc31d4b458321fa90a8d
9fd3286a513e49f12647eef370253954648fddbb
refs/heads/master
2021-01-22T08:52:50.882005
2017-06-05T05:05:36
2017-06-05T05:05:36
92,640,788
0
0
null
null
null
null
UTF-8
Java
false
false
1,061
java
package managementsoftware; import java.io.*; import java.util.*; import java.lang.*; public class LongestPalindromeSubString { public static String Palindrome(String s) { //check if empty string if(s == null || s.length() <1) { return "Empty String"; } String longest = s.substring(0, 1); for(int i=0;i<s.length();i++) { String temp = helper(s,i,i); if(temp.length() > longest.length()) { longest = temp; } temp = helper(s,i,i+1); if(temp.length() > longest.length()) { longest = temp; } } return longest; } public static String helper(String s, int begin, int end) { while(begin >= 0 && end <= s.length()-1 && s.charAt(begin) == s.charAt(end)) { begin --; end++; } return s.substring(begin + 1, end); } public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("Enter the String"); String s = in.nextLine(); String longest = Palindrome(s); System.out.println(longest); } }
[ "sams.sony@gmail.com" ]
sams.sony@gmail.com
95828cc158de9e8d2c21c4769c8f90691fb8e054
72f79cc482b0ceae6ff8501118586238425dbe67
/macrobase/alexp/src/main/java/alexp/macrobase/pipeline/BatchPipeline.java
5a9e0fdab8a236cd75f87c384dd7863c8263673c
[ "Apache-2.0", "MIT" ]
permissive
droubo/meta-level-analysis-of-anomaly-detectors
d5b3a12a29f25b3c6ca3e72c6ace7bf2509d8e95
a64671365b6c98ad14fc82f3430d3082b0455a6c
refs/heads/master
2023-08-05T04:51:16.658425
2021-09-24T09:15:52
2021-09-24T09:15:52
409,537,583
0
0
null
null
null
null
UTF-8
Java
false
false
3,755
java
package alexp.macrobase.pipeline; import alexp.macrobase.ingest.Uri; import alexp.macrobase.utils.ConfigUtils; import alexp.macrobase.pipeline.config.StringObjectMap; import com.google.common.base.Stopwatch; import edu.stanford.futuredata.macrobase.analysis.classify.Classifier; import edu.stanford.futuredata.macrobase.analysis.summary.Explanation; import edu.stanford.futuredata.macrobase.datamodel.DataFrame; import edu.stanford.futuredata.macrobase.datamodel.Schema; import edu.stanford.futuredata.macrobase.operator.Operator; import edu.stanford.futuredata.macrobase.util.MacroBaseException; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.Stream; public class BatchPipeline extends Pipeline { private final StringObjectMap conf; private final Uri inputURI; private List<Classifier> classifiersChain; private String[] metricColumns; private String timeColumn; private boolean isStrPredicate = false; private List<String> attributes; public BatchPipeline(StringObjectMap conf) throws MacroBaseException { this.conf = conf; inputURI = new Uri(conf.get("inputURI")); List<StringObjectMap> classifierConfigs = conf.getMapList("classifiers"); metricColumns = ConfigUtils.getAllValues(classifierConfigs, "metricColumns").toArray(new String[0]); timeColumn = conf.get("timeColumn"); classifierConfigs = ConfigUtils.addToAllConfigs(classifierConfigs, "timeColumn", timeColumn); // if (classifierType.equals("predicate")) { // Object rawCutoff = conf.get("cutoff"); // isStrPredicate = rawCutoff instanceof String; // } attributes = conf.get("attributes"); classifiersChain = Pipelines.getClassifiersChain(classifierConfigs); } public Explanation results() throws Exception { Stopwatch sw = Stopwatch.createStarted(); DataFrame df = loadData(); final long loadMs = sw.elapsed(TimeUnit.MILLISECONDS); sw = Stopwatch.createStarted(); Classifier classifier = Pipelines.processChained(df, classifiersChain); df = classifier.getResults(); final long classifierMs = sw.elapsed(TimeUnit.MILLISECONDS); saveOutliers("outliers", df, classifier.getOutputColumnName()); sw = Stopwatch.createStarted(); Operator<DataFrame, ? extends Explanation> summarizer = Pipelines.getSummarizer(conf, classifier.getOutputColumnName(), attributes); summarizer.process(df); Explanation explanation = summarizer.getResults(); final long explanationMs = sw.elapsed(TimeUnit.MILLISECONDS); out.printf("Load time: %d ms\nClassification time: %d ms\nSummarization time: %d ms\n", loadMs, classifierMs, explanationMs); saveExplanation("explanation", df, classifier.getOutputColumnName(), explanation); return explanation; } private DataFrame loadData() throws Exception { Map<String, Schema.ColType> colTypes = new HashMap<>(); Schema.ColType metricType = isStrPredicate ? Schema.ColType.STRING : Schema.ColType.DOUBLE; for (String column : metricColumns) { colTypes.put(column, metricType); } List<String> requiredColumns = Stream.concat(attributes.stream(), colTypes.keySet().stream()).collect(Collectors.toList()); DataFrame dataFrame = Pipelines.loadDataFrame(inputURI, colTypes, requiredColumns, conf); createAutoGeneratedColumns(dataFrame, timeColumn); return dataFrame; } }
[ "adodroubo@gmail.com" ]
adodroubo@gmail.com
cd330de6794842a9c0cd4e8ff094ae6f47cbff4f
0484122460d5fd4ead668376cda26cd6a88aeb1c
/src/main/java/com/ssm/controller/BaseController.java
f8fbd664c5e8323be93037c1acfc59727b2c845f
[]
no_license
buxz/bxzCoding_ssmProject
2fdca816bb6936e304b066be9c688e25eab2101c
c8a71d994fef8cac172c4291a9e3f868b72094de
refs/heads/master
2020-03-19T16:26:54.854933
2018-06-12T02:14:28
2018-06-12T02:14:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
249
java
package com.ssm.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; public class BaseController { static final Logger logger = LoggerFactory.getLogger(BaseController.class); }
[ "1016862070@qq.com" ]
1016862070@qq.com
581f7280379c50e4f1a9e329f7f644bf1f636842
ba3a1f88bf21f4e056f5bb1aa13ab846b4f21502
/Udemy_EtiquetaPreco/src/application/Program.java
dce8a5261d8f0ba49e7c1b1e7c98bf60631f9c37
[]
no_license
RaizerVarela/exercicios-java
aa6a5426c32f84644d7fca1c4419be6cb9b3d9e6
01231292d47bbd11ee6d175627d0c7ba8f16924c
refs/heads/master
2023-02-16T14:54:26.371089
2021-01-07T20:45:23
2021-01-07T20:45:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,639
java
package application; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Scanner; import entities.ImportedProduct; import entities.Product; import entities.UsedProduct; public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); List <Product> list = new ArrayList<>(); System.out.println("Enter the number os products: "); int n = sc.nextInt(); for(int i=1; i<=n; i++) { System.out.println("Product #" + i + " data:"); System.out.print("Common, used or imported (c/u/i): "); char resposta = sc.next().charAt(0); sc.nextLine(); System.out.print("Name: "); String name = sc.nextLine(); System.out.print("Price: "); double price = sc.nextDouble(); sc.nextLine(); if(resposta == 'u') { System.out.print("Manufacture date (DD/MM/YYYY): "); Date manufactureDate; try { manufactureDate = sdf.parse(sc.next()); list.add(new UsedProduct(name, price, manufactureDate)); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } }else if(resposta == 'i') { System.out.println("Customs Fee: "); double customsFee = sc.nextDouble(); list.add(new ImportedProduct(name, price, customsFee)); }else { list.add(new Product(name, price)); } } System.out.println("PRICE TAGS: "); for(Product prod : list) { System.out.println(prod.priceTag()); } sc.close(); } }
[ "raizer.varela@hotmail.com" ]
raizer.varela@hotmail.com
247c5b0c11b78698704c5bee8b88f339661f41af
2edaf091c1e07478123b7379897cfe7773ca3b32
/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r/androidx/appcompat/R.java
51f056a050f599c3428e0afb55f4c96640d35e22
[ "Apache-2.0" ]
permissive
mangotapioca13/Flixster
6c6b2a809f70b956ac06056885e7085da9896368
915995cabff2ac4227c4fad56ab20c116ff55cd2
refs/heads/master
2020-06-11T13:25:08.186108
2019-06-29T00:56:57
2019-06-29T00:56:57
193,980,353
0
0
null
null
null
null
UTF-8
Java
false
false
120,804
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 androidx.appcompat; public final class R { private R() {} public static final class anim { private anim() {} public static final int abc_fade_in = 0x7f010000; public static final int abc_fade_out = 0x7f010001; public static final int abc_grow_fade_in_from_bottom = 0x7f010002; public static final int abc_popup_enter = 0x7f010003; public static final int abc_popup_exit = 0x7f010004; public static final int abc_shrink_fade_out_from_bottom = 0x7f010005; public static final int abc_slide_in_bottom = 0x7f010006; public static final int abc_slide_in_top = 0x7f010007; public static final int abc_slide_out_bottom = 0x7f010008; public static final int abc_slide_out_top = 0x7f010009; public static final int abc_tooltip_enter = 0x7f01000a; public static final int abc_tooltip_exit = 0x7f01000b; } public static final class attr { private attr() {} public static final int actionBarDivider = 0x7f020000; public static final int actionBarItemBackground = 0x7f020001; public static final int actionBarPopupTheme = 0x7f020002; public static final int actionBarSize = 0x7f020003; public static final int actionBarSplitStyle = 0x7f020004; public static final int actionBarStyle = 0x7f020005; public static final int actionBarTabBarStyle = 0x7f020006; public static final int actionBarTabStyle = 0x7f020007; public static final int actionBarTabTextStyle = 0x7f020008; public static final int actionBarTheme = 0x7f020009; public static final int actionBarWidgetTheme = 0x7f02000a; public static final int actionButtonStyle = 0x7f02000b; public static final int actionDropDownStyle = 0x7f02000c; public static final int actionLayout = 0x7f02000d; public static final int actionMenuTextAppearance = 0x7f02000e; public static final int actionMenuTextColor = 0x7f02000f; public static final int actionModeBackground = 0x7f020010; public static final int actionModeCloseButtonStyle = 0x7f020011; public static final int actionModeCloseDrawable = 0x7f020012; public static final int actionModeCopyDrawable = 0x7f020013; public static final int actionModeCutDrawable = 0x7f020014; public static final int actionModeFindDrawable = 0x7f020015; public static final int actionModePasteDrawable = 0x7f020016; public static final int actionModePopupWindowStyle = 0x7f020017; public static final int actionModeSelectAllDrawable = 0x7f020018; public static final int actionModeShareDrawable = 0x7f020019; public static final int actionModeSplitBackground = 0x7f02001a; public static final int actionModeStyle = 0x7f02001b; public static final int actionModeWebSearchDrawable = 0x7f02001c; public static final int actionOverflowButtonStyle = 0x7f02001d; public static final int actionOverflowMenuStyle = 0x7f02001e; public static final int actionProviderClass = 0x7f02001f; public static final int actionViewClass = 0x7f020020; public static final int activityChooserViewStyle = 0x7f020021; public static final int alertDialogButtonGroupStyle = 0x7f020022; public static final int alertDialogCenterButtons = 0x7f020023; public static final int alertDialogStyle = 0x7f020024; public static final int alertDialogTheme = 0x7f020025; public static final int allowStacking = 0x7f020026; public static final int alpha = 0x7f020027; public static final int alphabeticModifiers = 0x7f020028; public static final int arrowHeadLength = 0x7f020029; public static final int arrowShaftLength = 0x7f02002a; public static final int autoCompleteTextViewStyle = 0x7f02002b; public static final int autoSizeMaxTextSize = 0x7f02002c; public static final int autoSizeMinTextSize = 0x7f02002d; public static final int autoSizePresetSizes = 0x7f02002e; public static final int autoSizeStepGranularity = 0x7f02002f; public static final int autoSizeTextType = 0x7f020030; public static final int background = 0x7f020031; public static final int backgroundSplit = 0x7f020032; public static final int backgroundStacked = 0x7f020033; public static final int backgroundTint = 0x7f020034; public static final int backgroundTintMode = 0x7f020035; public static final int barLength = 0x7f020036; public static final int borderlessButtonStyle = 0x7f020039; public static final int buttonBarButtonStyle = 0x7f02003a; public static final int buttonBarNegativeButtonStyle = 0x7f02003b; public static final int buttonBarNeutralButtonStyle = 0x7f02003c; public static final int buttonBarPositiveButtonStyle = 0x7f02003d; public static final int buttonBarStyle = 0x7f02003e; public static final int buttonGravity = 0x7f02003f; public static final int buttonIconDimen = 0x7f020040; public static final int buttonPanelSideLayout = 0x7f020041; public static final int buttonStyle = 0x7f020042; public static final int buttonStyleSmall = 0x7f020043; public static final int buttonTint = 0x7f020044; public static final int buttonTintMode = 0x7f020045; public static final int checkboxStyle = 0x7f020047; public static final int checkedTextViewStyle = 0x7f020048; public static final int closeIcon = 0x7f020049; public static final int closeItemLayout = 0x7f02004a; public static final int collapseContentDescription = 0x7f02004b; public static final int collapseIcon = 0x7f02004c; public static final int color = 0x7f02004d; public static final int colorAccent = 0x7f02004e; public static final int colorBackgroundFloating = 0x7f02004f; public static final int colorButtonNormal = 0x7f020050; public static final int colorControlActivated = 0x7f020051; public static final int colorControlHighlight = 0x7f020052; public static final int colorControlNormal = 0x7f020053; public static final int colorError = 0x7f020054; public static final int colorPrimary = 0x7f020055; public static final int colorPrimaryDark = 0x7f020056; public static final int colorSwitchThumbNormal = 0x7f020057; public static final int commitIcon = 0x7f020058; public static final int contentDescription = 0x7f02005c; public static final int contentInsetEnd = 0x7f02005d; public static final int contentInsetEndWithActions = 0x7f02005e; public static final int contentInsetLeft = 0x7f02005f; public static final int contentInsetRight = 0x7f020060; public static final int contentInsetStart = 0x7f020061; public static final int contentInsetStartWithNavigation = 0x7f020062; public static final int controlBackground = 0x7f020063; public static final int coordinatorLayoutStyle = 0x7f020064; public static final int customNavigationLayout = 0x7f020065; public static final int defaultQueryHint = 0x7f020066; public static final int dialogCornerRadius = 0x7f020067; public static final int dialogPreferredPadding = 0x7f020068; public static final int dialogTheme = 0x7f020069; public static final int displayOptions = 0x7f02006a; public static final int divider = 0x7f02006b; public static final int dividerHorizontal = 0x7f02006c; public static final int dividerPadding = 0x7f02006d; public static final int dividerVertical = 0x7f02006e; public static final int drawableSize = 0x7f02006f; public static final int drawerArrowStyle = 0x7f020070; public static final int dropDownListViewStyle = 0x7f020071; public static final int dropdownListPreferredItemHeight = 0x7f020072; public static final int editTextBackground = 0x7f020073; public static final int editTextColor = 0x7f020074; public static final int editTextStyle = 0x7f020075; public static final int elevation = 0x7f020076; public static final int expandActivityOverflowButtonDrawable = 0x7f020078; public static final int firstBaselineToTopHeight = 0x7f02007e; public static final int font = 0x7f02007f; public static final int fontFamily = 0x7f020080; public static final int fontProviderAuthority = 0x7f020081; public static final int fontProviderCerts = 0x7f020082; public static final int fontProviderFetchStrategy = 0x7f020083; public static final int fontProviderFetchTimeout = 0x7f020084; public static final int fontProviderPackage = 0x7f020085; public static final int fontProviderQuery = 0x7f020086; public static final int fontStyle = 0x7f020087; public static final int fontVariationSettings = 0x7f020088; public static final int fontWeight = 0x7f020089; public static final int gapBetweenBars = 0x7f02008a; public static final int goIcon = 0x7f02008b; public static final int height = 0x7f02008c; public static final int hideOnContentScroll = 0x7f02008d; public static final int homeAsUpIndicator = 0x7f02008e; public static final int homeLayout = 0x7f02008f; public static final int icon = 0x7f020090; public static final int iconTint = 0x7f020091; public static final int iconTintMode = 0x7f020092; public static final int iconifiedByDefault = 0x7f020093; public static final int imageButtonStyle = 0x7f020094; public static final int indeterminateProgressStyle = 0x7f020095; public static final int initialActivityCount = 0x7f020096; public static final int isLightTheme = 0x7f020097; public static final int itemPadding = 0x7f020098; public static final int keylines = 0x7f020099; public static final int lastBaselineToBottomHeight = 0x7f02009a; public static final int layout = 0x7f02009b; public static final int layout_anchor = 0x7f02009d; public static final int layout_anchorGravity = 0x7f02009e; public static final int layout_behavior = 0x7f02009f; public static final int layout_dodgeInsetEdges = 0x7f0200c9; public static final int layout_insetEdge = 0x7f0200d2; public static final int layout_keyline = 0x7f0200d3; public static final int lineHeight = 0x7f0200d5; public static final int listChoiceBackgroundIndicator = 0x7f0200d6; public static final int listDividerAlertDialog = 0x7f0200d7; public static final int listItemLayout = 0x7f0200d8; public static final int listLayout = 0x7f0200d9; public static final int listMenuViewStyle = 0x7f0200da; public static final int listPopupWindowStyle = 0x7f0200db; public static final int listPreferredItemHeight = 0x7f0200dc; public static final int listPreferredItemHeightLarge = 0x7f0200dd; public static final int listPreferredItemHeightSmall = 0x7f0200de; public static final int listPreferredItemPaddingLeft = 0x7f0200df; public static final int listPreferredItemPaddingRight = 0x7f0200e0; public static final int logo = 0x7f0200e1; public static final int logoDescription = 0x7f0200e2; public static final int maxButtonHeight = 0x7f0200e3; public static final int measureWithLargestChild = 0x7f0200e4; public static final int multiChoiceItemLayout = 0x7f0200e5; public static final int navigationContentDescription = 0x7f0200e6; public static final int navigationIcon = 0x7f0200e7; public static final int navigationMode = 0x7f0200e8; public static final int numericModifiers = 0x7f0200e9; public static final int overlapAnchor = 0x7f0200ea; public static final int paddingBottomNoButtons = 0x7f0200eb; public static final int paddingEnd = 0x7f0200ec; public static final int paddingStart = 0x7f0200ed; public static final int paddingTopNoTitle = 0x7f0200ee; public static final int panelBackground = 0x7f0200ef; public static final int panelMenuListTheme = 0x7f0200f0; public static final int panelMenuListWidth = 0x7f0200f1; public static final int popupMenuStyle = 0x7f0200f2; public static final int popupTheme = 0x7f0200f3; public static final int popupWindowStyle = 0x7f0200f4; public static final int preserveIconSpacing = 0x7f0200f5; public static final int progressBarPadding = 0x7f0200f6; public static final int progressBarStyle = 0x7f0200f7; public static final int queryBackground = 0x7f0200f8; public static final int queryHint = 0x7f0200f9; public static final int radioButtonStyle = 0x7f0200fa; public static final int ratingBarStyle = 0x7f0200fb; public static final int ratingBarStyleIndicator = 0x7f0200fc; public static final int ratingBarStyleSmall = 0x7f0200fd; public static final int searchHintIcon = 0x7f0200ff; public static final int searchIcon = 0x7f020100; public static final int searchViewStyle = 0x7f020101; public static final int seekBarStyle = 0x7f020102; public static final int selectableItemBackground = 0x7f020103; public static final int selectableItemBackgroundBorderless = 0x7f020104; public static final int showAsAction = 0x7f020105; public static final int showDividers = 0x7f020106; public static final int showText = 0x7f020107; public static final int showTitle = 0x7f020108; public static final int singleChoiceItemLayout = 0x7f020109; public static final int spinBars = 0x7f02010b; public static final int spinnerDropDownItemStyle = 0x7f02010c; public static final int spinnerStyle = 0x7f02010d; public static final int splitTrack = 0x7f02010e; public static final int srcCompat = 0x7f02010f; public static final int state_above_anchor = 0x7f020111; public static final int statusBarBackground = 0x7f020112; public static final int subMenuArrow = 0x7f020113; public static final int submitBackground = 0x7f020114; public static final int subtitle = 0x7f020115; public static final int subtitleTextAppearance = 0x7f020116; public static final int subtitleTextColor = 0x7f020117; public static final int subtitleTextStyle = 0x7f020118; public static final int suggestionRowLayout = 0x7f020119; public static final int switchMinWidth = 0x7f02011a; public static final int switchPadding = 0x7f02011b; public static final int switchStyle = 0x7f02011c; public static final int switchTextAppearance = 0x7f02011d; public static final int textAllCaps = 0x7f02011e; public static final int textAppearanceLargePopupMenu = 0x7f02011f; public static final int textAppearanceListItem = 0x7f020120; public static final int textAppearanceListItemSecondary = 0x7f020121; public static final int textAppearanceListItemSmall = 0x7f020122; public static final int textAppearancePopupMenuHeader = 0x7f020123; public static final int textAppearanceSearchResultSubtitle = 0x7f020124; public static final int textAppearanceSearchResultTitle = 0x7f020125; public static final int textAppearanceSmallPopupMenu = 0x7f020126; public static final int textColorAlertDialogListItem = 0x7f020127; public static final int textColorSearchUrl = 0x7f020128; public static final int theme = 0x7f020129; public static final int thickness = 0x7f02012a; public static final int thumbTextPadding = 0x7f02012b; public static final int thumbTint = 0x7f02012c; public static final int thumbTintMode = 0x7f02012d; public static final int tickMark = 0x7f02012e; public static final int tickMarkTint = 0x7f02012f; public static final int tickMarkTintMode = 0x7f020130; public static final int tint = 0x7f020131; public static final int tintMode = 0x7f020132; public static final int title = 0x7f020133; public static final int titleMargin = 0x7f020134; public static final int titleMarginBottom = 0x7f020135; public static final int titleMarginEnd = 0x7f020136; public static final int titleMarginStart = 0x7f020137; public static final int titleMarginTop = 0x7f020138; public static final int titleMargins = 0x7f020139; public static final int titleTextAppearance = 0x7f02013a; public static final int titleTextColor = 0x7f02013b; public static final int titleTextStyle = 0x7f02013c; public static final int toolbarNavigationButtonStyle = 0x7f02013d; public static final int toolbarStyle = 0x7f02013e; public static final int tooltipForegroundColor = 0x7f02013f; public static final int tooltipFrameBackground = 0x7f020140; public static final int tooltipText = 0x7f020141; public static final int track = 0x7f020142; public static final int trackTint = 0x7f020143; public static final int trackTintMode = 0x7f020144; public static final int ttcIndex = 0x7f020145; public static final int viewInflaterClass = 0x7f020146; public static final int voiceIcon = 0x7f020147; public static final int windowActionBar = 0x7f020148; public static final int windowActionBarOverlay = 0x7f020149; public static final int windowActionModeOverlay = 0x7f02014a; public static final int windowFixedHeightMajor = 0x7f02014b; public static final int windowFixedHeightMinor = 0x7f02014c; public static final int windowFixedWidthMajor = 0x7f02014d; public static final int windowFixedWidthMinor = 0x7f02014e; public static final int windowMinWidthMajor = 0x7f02014f; public static final int windowMinWidthMinor = 0x7f020150; public static final int windowNoTitle = 0x7f020151; } public static final class bool { private bool() {} public static final int abc_action_bar_embed_tabs = 0x7f030000; public static final int abc_allow_stacked_button_bar = 0x7f030001; public static final int abc_config_actionMenuItemAllCaps = 0x7f030002; } public static final class color { private color() {} public static final int abc_background_cache_hint_selector_material_dark = 0x7f040000; public static final int abc_background_cache_hint_selector_material_light = 0x7f040001; public static final int abc_btn_colored_borderless_text_material = 0x7f040002; public static final int abc_btn_colored_text_material = 0x7f040003; public static final int abc_color_highlight_material = 0x7f040004; public static final int abc_hint_foreground_material_dark = 0x7f040005; public static final int abc_hint_foreground_material_light = 0x7f040006; public static final int abc_input_method_navigation_guard = 0x7f040007; public static final int abc_primary_text_disable_only_material_dark = 0x7f040008; public static final int abc_primary_text_disable_only_material_light = 0x7f040009; public static final int abc_primary_text_material_dark = 0x7f04000a; public static final int abc_primary_text_material_light = 0x7f04000b; public static final int abc_search_url_text = 0x7f04000c; public static final int abc_search_url_text_normal = 0x7f04000d; public static final int abc_search_url_text_pressed = 0x7f04000e; public static final int abc_search_url_text_selected = 0x7f04000f; public static final int abc_secondary_text_material_dark = 0x7f040010; public static final int abc_secondary_text_material_light = 0x7f040011; public static final int abc_tint_btn_checkable = 0x7f040012; public static final int abc_tint_default = 0x7f040013; public static final int abc_tint_edittext = 0x7f040014; public static final int abc_tint_seek_thumb = 0x7f040015; public static final int abc_tint_spinner = 0x7f040016; public static final int abc_tint_switch_track = 0x7f040017; public static final int accent_material_dark = 0x7f040018; public static final int accent_material_light = 0x7f040019; public static final int background_floating_material_dark = 0x7f04001b; public static final int background_floating_material_light = 0x7f04001c; public static final int background_material_dark = 0x7f04001d; public static final int background_material_light = 0x7f04001e; public static final int bright_foreground_disabled_material_dark = 0x7f04001f; public static final int bright_foreground_disabled_material_light = 0x7f040020; public static final int bright_foreground_inverse_material_dark = 0x7f040021; public static final int bright_foreground_inverse_material_light = 0x7f040022; public static final int bright_foreground_material_dark = 0x7f040023; public static final int bright_foreground_material_light = 0x7f040024; public static final int button_material_dark = 0x7f040025; public static final int button_material_light = 0x7f040026; public static final int dim_foreground_disabled_material_dark = 0x7f04002a; public static final int dim_foreground_disabled_material_light = 0x7f04002b; public static final int dim_foreground_material_dark = 0x7f04002c; public static final int dim_foreground_material_light = 0x7f04002d; public static final int error_color_material_dark = 0x7f04002e; public static final int error_color_material_light = 0x7f04002f; public static final int foreground_material_dark = 0x7f040030; public static final int foreground_material_light = 0x7f040031; public static final int highlighted_text_material_dark = 0x7f040032; public static final int highlighted_text_material_light = 0x7f040033; public static final int material_blue_grey_800 = 0x7f040035; public static final int material_blue_grey_900 = 0x7f040036; public static final int material_blue_grey_950 = 0x7f040037; public static final int material_deep_teal_200 = 0x7f040038; public static final int material_deep_teal_500 = 0x7f040039; public static final int material_grey_100 = 0x7f04003a; public static final int material_grey_300 = 0x7f04003b; public static final int material_grey_50 = 0x7f04003c; public static final int material_grey_600 = 0x7f04003d; public static final int material_grey_800 = 0x7f04003e; public static final int material_grey_850 = 0x7f04003f; public static final int material_grey_900 = 0x7f040040; public static final int notification_action_color_filter = 0x7f040041; public static final int notification_icon_bg_color = 0x7f040042; public static final int primary_dark_material_dark = 0x7f040043; public static final int primary_dark_material_light = 0x7f040044; public static final int primary_material_dark = 0x7f040045; public static final int primary_material_light = 0x7f040046; public static final int primary_text_default_material_dark = 0x7f040047; public static final int primary_text_default_material_light = 0x7f040048; public static final int primary_text_disabled_material_dark = 0x7f040049; public static final int primary_text_disabled_material_light = 0x7f04004a; public static final int ripple_material_dark = 0x7f04004b; public static final int ripple_material_light = 0x7f04004c; public static final int secondary_text_default_material_dark = 0x7f04004d; public static final int secondary_text_default_material_light = 0x7f04004e; public static final int secondary_text_disabled_material_dark = 0x7f04004f; public static final int secondary_text_disabled_material_light = 0x7f040050; public static final int switch_thumb_disabled_material_dark = 0x7f040051; public static final int switch_thumb_disabled_material_light = 0x7f040052; public static final int switch_thumb_material_dark = 0x7f040053; public static final int switch_thumb_material_light = 0x7f040054; public static final int switch_thumb_normal_material_dark = 0x7f040055; public static final int switch_thumb_normal_material_light = 0x7f040056; public static final int tooltip_background_dark = 0x7f040058; public static final int tooltip_background_light = 0x7f040059; } public static final class dimen { private dimen() {} public static final int abc_action_bar_content_inset_material = 0x7f050000; public static final int abc_action_bar_content_inset_with_nav = 0x7f050001; public static final int abc_action_bar_default_height_material = 0x7f050002; public static final int abc_action_bar_default_padding_end_material = 0x7f050003; public static final int abc_action_bar_default_padding_start_material = 0x7f050004; public static final int abc_action_bar_elevation_material = 0x7f050005; public static final int abc_action_bar_icon_vertical_padding_material = 0x7f050006; public static final int abc_action_bar_overflow_padding_end_material = 0x7f050007; public static final int abc_action_bar_overflow_padding_start_material = 0x7f050008; public static final int abc_action_bar_stacked_max_height = 0x7f050009; public static final int abc_action_bar_stacked_tab_max_width = 0x7f05000a; public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f05000b; public static final int abc_action_bar_subtitle_top_margin_material = 0x7f05000c; public static final int abc_action_button_min_height_material = 0x7f05000d; public static final int abc_action_button_min_width_material = 0x7f05000e; public static final int abc_action_button_min_width_overflow_material = 0x7f05000f; public static final int abc_alert_dialog_button_bar_height = 0x7f050010; public static final int abc_alert_dialog_button_dimen = 0x7f050011; public static final int abc_button_inset_horizontal_material = 0x7f050012; public static final int abc_button_inset_vertical_material = 0x7f050013; public static final int abc_button_padding_horizontal_material = 0x7f050014; public static final int abc_button_padding_vertical_material = 0x7f050015; public static final int abc_cascading_menus_min_smallest_width = 0x7f050016; public static final int abc_config_prefDialogWidth = 0x7f050017; public static final int abc_control_corner_material = 0x7f050018; public static final int abc_control_inset_material = 0x7f050019; public static final int abc_control_padding_material = 0x7f05001a; public static final int abc_dialog_corner_radius_material = 0x7f05001b; public static final int abc_dialog_fixed_height_major = 0x7f05001c; public static final int abc_dialog_fixed_height_minor = 0x7f05001d; public static final int abc_dialog_fixed_width_major = 0x7f05001e; public static final int abc_dialog_fixed_width_minor = 0x7f05001f; public static final int abc_dialog_list_padding_bottom_no_buttons = 0x7f050020; public static final int abc_dialog_list_padding_top_no_title = 0x7f050021; public static final int abc_dialog_min_width_major = 0x7f050022; public static final int abc_dialog_min_width_minor = 0x7f050023; public static final int abc_dialog_padding_material = 0x7f050024; public static final int abc_dialog_padding_top_material = 0x7f050025; public static final int abc_dialog_title_divider_material = 0x7f050026; public static final int abc_disabled_alpha_material_dark = 0x7f050027; public static final int abc_disabled_alpha_material_light = 0x7f050028; public static final int abc_dropdownitem_icon_width = 0x7f050029; public static final int abc_dropdownitem_text_padding_left = 0x7f05002a; public static final int abc_dropdownitem_text_padding_right = 0x7f05002b; public static final int abc_edit_text_inset_bottom_material = 0x7f05002c; public static final int abc_edit_text_inset_horizontal_material = 0x7f05002d; public static final int abc_edit_text_inset_top_material = 0x7f05002e; public static final int abc_floating_window_z = 0x7f05002f; public static final int abc_list_item_padding_horizontal_material = 0x7f050030; public static final int abc_panel_menu_list_width = 0x7f050031; public static final int abc_progress_bar_height_material = 0x7f050032; public static final int abc_search_view_preferred_height = 0x7f050033; public static final int abc_search_view_preferred_width = 0x7f050034; public static final int abc_seekbar_track_background_height_material = 0x7f050035; public static final int abc_seekbar_track_progress_height_material = 0x7f050036; public static final int abc_select_dialog_padding_start_material = 0x7f050037; public static final int abc_switch_padding = 0x7f050038; public static final int abc_text_size_body_1_material = 0x7f050039; public static final int abc_text_size_body_2_material = 0x7f05003a; public static final int abc_text_size_button_material = 0x7f05003b; public static final int abc_text_size_caption_material = 0x7f05003c; public static final int abc_text_size_display_1_material = 0x7f05003d; public static final int abc_text_size_display_2_material = 0x7f05003e; public static final int abc_text_size_display_3_material = 0x7f05003f; public static final int abc_text_size_display_4_material = 0x7f050040; public static final int abc_text_size_headline_material = 0x7f050041; public static final int abc_text_size_large_material = 0x7f050042; public static final int abc_text_size_medium_material = 0x7f050043; public static final int abc_text_size_menu_header_material = 0x7f050044; public static final int abc_text_size_menu_material = 0x7f050045; public static final int abc_text_size_small_material = 0x7f050046; public static final int abc_text_size_subhead_material = 0x7f050047; public static final int abc_text_size_subtitle_material_toolbar = 0x7f050048; public static final int abc_text_size_title_material = 0x7f050049; public static final int abc_text_size_title_material_toolbar = 0x7f05004a; public static final int compat_button_inset_horizontal_material = 0x7f05004b; public static final int compat_button_inset_vertical_material = 0x7f05004c; public static final int compat_button_padding_horizontal_material = 0x7f05004d; public static final int compat_button_padding_vertical_material = 0x7f05004e; public static final int compat_control_corner_material = 0x7f05004f; public static final int compat_notification_large_icon_max_height = 0x7f050050; public static final int compat_notification_large_icon_max_width = 0x7f050051; public static final int disabled_alpha_material_dark = 0x7f050052; public static final int disabled_alpha_material_light = 0x7f050053; public static final int highlight_alpha_material_colored = 0x7f050057; public static final int highlight_alpha_material_dark = 0x7f050058; public static final int highlight_alpha_material_light = 0x7f050059; public static final int hint_alpha_material_dark = 0x7f05005a; public static final int hint_alpha_material_light = 0x7f05005b; public static final int hint_pressed_alpha_material_dark = 0x7f05005c; public static final int hint_pressed_alpha_material_light = 0x7f05005d; public static final int notification_action_icon_size = 0x7f050061; public static final int notification_action_text_size = 0x7f050062; public static final int notification_big_circle_margin = 0x7f050063; public static final int notification_content_margin_start = 0x7f050064; public static final int notification_large_icon_height = 0x7f050065; public static final int notification_large_icon_width = 0x7f050066; public static final int notification_main_column_padding_top = 0x7f050067; public static final int notification_media_narrow_margin = 0x7f050068; public static final int notification_right_icon_size = 0x7f050069; public static final int notification_right_side_padding_top = 0x7f05006a; public static final int notification_small_icon_background_padding = 0x7f05006b; public static final int notification_small_icon_size_as_large = 0x7f05006c; public static final int notification_subtext_size = 0x7f05006d; public static final int notification_top_pad = 0x7f05006e; public static final int notification_top_pad_large_text = 0x7f05006f; public static final int tooltip_corner_radius = 0x7f050070; public static final int tooltip_horizontal_padding = 0x7f050071; public static final int tooltip_margin = 0x7f050072; public static final int tooltip_precise_anchor_extra_offset = 0x7f050073; public static final int tooltip_precise_anchor_threshold = 0x7f050074; public static final int tooltip_vertical_padding = 0x7f050075; public static final int tooltip_y_offset_non_touch = 0x7f050076; public static final int tooltip_y_offset_touch = 0x7f050077; } public static final class drawable { private drawable() {} public static final int abc_ab_share_pack_mtrl_alpha = 0x7f060001; public static final int abc_action_bar_item_background_material = 0x7f060002; public static final int abc_btn_borderless_material = 0x7f060003; public static final int abc_btn_check_material = 0x7f060004; public static final int abc_btn_check_to_on_mtrl_000 = 0x7f060005; public static final int abc_btn_check_to_on_mtrl_015 = 0x7f060006; public static final int abc_btn_colored_material = 0x7f060007; public static final int abc_btn_default_mtrl_shape = 0x7f060008; public static final int abc_btn_radio_material = 0x7f060009; public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f06000a; public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f06000b; public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f06000c; public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f06000d; public static final int abc_cab_background_internal_bg = 0x7f06000e; public static final int abc_cab_background_top_material = 0x7f06000f; public static final int abc_cab_background_top_mtrl_alpha = 0x7f060010; public static final int abc_control_background_material = 0x7f060011; public static final int abc_dialog_material_background = 0x7f060012; public static final int abc_edit_text_material = 0x7f060013; public static final int abc_ic_ab_back_material = 0x7f060014; public static final int abc_ic_arrow_drop_right_black_24dp = 0x7f060015; public static final int abc_ic_clear_material = 0x7f060016; public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f060017; public static final int abc_ic_go_search_api_material = 0x7f060018; public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f060019; public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f06001a; public static final int abc_ic_menu_overflow_material = 0x7f06001b; public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f06001c; public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f06001d; public static final int abc_ic_menu_share_mtrl_alpha = 0x7f06001e; public static final int abc_ic_search_api_material = 0x7f06001f; public static final int abc_ic_star_black_16dp = 0x7f060020; public static final int abc_ic_star_black_36dp = 0x7f060021; public static final int abc_ic_star_black_48dp = 0x7f060022; public static final int abc_ic_star_half_black_16dp = 0x7f060023; public static final int abc_ic_star_half_black_36dp = 0x7f060024; public static final int abc_ic_star_half_black_48dp = 0x7f060025; public static final int abc_ic_voice_search_api_material = 0x7f060026; public static final int abc_item_background_holo_dark = 0x7f060027; public static final int abc_item_background_holo_light = 0x7f060028; public static final int abc_list_divider_material = 0x7f060029; public static final int abc_list_divider_mtrl_alpha = 0x7f06002a; public static final int abc_list_focused_holo = 0x7f06002b; public static final int abc_list_longpressed_holo = 0x7f06002c; public static final int abc_list_pressed_holo_dark = 0x7f06002d; public static final int abc_list_pressed_holo_light = 0x7f06002e; public static final int abc_list_selector_background_transition_holo_dark = 0x7f06002f; public static final int abc_list_selector_background_transition_holo_light = 0x7f060030; public static final int abc_list_selector_disabled_holo_dark = 0x7f060031; public static final int abc_list_selector_disabled_holo_light = 0x7f060032; public static final int abc_list_selector_holo_dark = 0x7f060033; public static final int abc_list_selector_holo_light = 0x7f060034; public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f060035; public static final int abc_popup_background_mtrl_mult = 0x7f060036; public static final int abc_ratingbar_indicator_material = 0x7f060037; public static final int abc_ratingbar_material = 0x7f060038; public static final int abc_ratingbar_small_material = 0x7f060039; public static final int abc_scrubber_control_off_mtrl_alpha = 0x7f06003a; public static final int abc_scrubber_control_to_pressed_mtrl_000 = 0x7f06003b; public static final int abc_scrubber_control_to_pressed_mtrl_005 = 0x7f06003c; public static final int abc_scrubber_primary_mtrl_alpha = 0x7f06003d; public static final int abc_scrubber_track_mtrl_alpha = 0x7f06003e; public static final int abc_seekbar_thumb_material = 0x7f06003f; public static final int abc_seekbar_tick_mark_material = 0x7f060040; public static final int abc_seekbar_track_material = 0x7f060041; public static final int abc_spinner_mtrl_am_alpha = 0x7f060042; public static final int abc_spinner_textfield_background_material = 0x7f060043; public static final int abc_switch_thumb_material = 0x7f060044; public static final int abc_switch_track_mtrl_alpha = 0x7f060045; public static final int abc_tab_indicator_material = 0x7f060046; public static final int abc_tab_indicator_mtrl_alpha = 0x7f060047; public static final int abc_text_cursor_material = 0x7f060048; public static final int abc_text_select_handle_left_mtrl_dark = 0x7f060049; public static final int abc_text_select_handle_left_mtrl_light = 0x7f06004a; public static final int abc_text_select_handle_middle_mtrl_dark = 0x7f06004b; public static final int abc_text_select_handle_middle_mtrl_light = 0x7f06004c; public static final int abc_text_select_handle_right_mtrl_dark = 0x7f06004d; public static final int abc_text_select_handle_right_mtrl_light = 0x7f06004e; public static final int abc_textfield_activated_mtrl_alpha = 0x7f06004f; public static final int abc_textfield_default_mtrl_alpha = 0x7f060050; public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f060051; public static final int abc_textfield_search_default_mtrl_alpha = 0x7f060052; public static final int abc_textfield_search_material = 0x7f060053; public static final int abc_vector_test = 0x7f060054; public static final int notification_action_background = 0x7f060059; public static final int notification_bg = 0x7f06005a; public static final int notification_bg_low = 0x7f06005b; public static final int notification_bg_low_normal = 0x7f06005c; public static final int notification_bg_low_pressed = 0x7f06005d; public static final int notification_bg_normal = 0x7f06005e; public static final int notification_bg_normal_pressed = 0x7f06005f; public static final int notification_icon_background = 0x7f060060; public static final int notification_template_icon_bg = 0x7f060061; public static final int notification_template_icon_low_bg = 0x7f060062; public static final int notification_tile_bg = 0x7f060063; public static final int notify_panel_notification_icon_bg = 0x7f060064; public static final int tooltip_frame_dark = 0x7f060065; public static final int tooltip_frame_light = 0x7f060066; } public static final class id { private id() {} public static final int action_bar = 0x7f070006; public static final int action_bar_activity_content = 0x7f070007; public static final int action_bar_container = 0x7f070008; public static final int action_bar_root = 0x7f070009; public static final int action_bar_spinner = 0x7f07000a; public static final int action_bar_subtitle = 0x7f07000b; public static final int action_bar_title = 0x7f07000c; public static final int action_container = 0x7f07000d; public static final int action_context_bar = 0x7f07000e; public static final int action_divider = 0x7f07000f; public static final int action_image = 0x7f070010; public static final int action_menu_divider = 0x7f070011; public static final int action_menu_presenter = 0x7f070012; public static final int action_mode_bar = 0x7f070013; public static final int action_mode_bar_stub = 0x7f070014; public static final int action_mode_close_button = 0x7f070015; public static final int action_text = 0x7f070016; public static final int actions = 0x7f070017; public static final int activity_chooser_view_content = 0x7f070018; public static final int add = 0x7f070019; public static final int alertTitle = 0x7f07001a; public static final int async = 0x7f07001d; public static final int blocking = 0x7f070020; public static final int bottom = 0x7f070021; public static final int buttonPanel = 0x7f070022; public static final int checkbox = 0x7f070027; public static final int chronometer = 0x7f070028; public static final int content = 0x7f07002c; public static final int contentPanel = 0x7f07002d; public static final int custom = 0x7f07002e; public static final int customPanel = 0x7f07002f; public static final int decor_content_parent = 0x7f070030; public static final int default_activity_button = 0x7f070031; public static final int edit_query = 0x7f070035; public static final int end = 0x7f070036; public static final int expand_activities_button = 0x7f070037; public static final int expanded_menu = 0x7f070038; public static final int forever = 0x7f07003c; public static final int group_divider = 0x7f07003e; public static final int home = 0x7f070040; public static final int icon = 0x7f070042; public static final int icon_group = 0x7f070043; public static final int image = 0x7f070045; public static final int info = 0x7f070046; public static final int italic = 0x7f070048; public static final int left = 0x7f07004c; public static final int line1 = 0x7f07004d; public static final int line3 = 0x7f07004e; public static final int listMode = 0x7f07004f; public static final int list_item = 0x7f070050; public static final int message = 0x7f070051; public static final int multiply = 0x7f070053; public static final int none = 0x7f070055; public static final int normal = 0x7f070056; public static final int notification_background = 0x7f070057; public static final int notification_main_column = 0x7f070058; public static final int notification_main_column_container = 0x7f070059; public static final int parentPanel = 0x7f07005c; public static final int progress_circular = 0x7f07005e; public static final int progress_horizontal = 0x7f07005f; public static final int radio = 0x7f070060; public static final int right = 0x7f070062; public static final int right_icon = 0x7f070063; public static final int right_side = 0x7f070064; public static final int screen = 0x7f070066; public static final int scrollIndicatorDown = 0x7f070067; public static final int scrollIndicatorUp = 0x7f070068; public static final int scrollView = 0x7f070069; public static final int search_badge = 0x7f07006a; public static final int search_bar = 0x7f07006b; public static final int search_button = 0x7f07006c; public static final int search_close_btn = 0x7f07006d; public static final int search_edit_frame = 0x7f07006e; public static final int search_go_btn = 0x7f07006f; public static final int search_mag_icon = 0x7f070070; public static final int search_plate = 0x7f070071; public static final int search_src_text = 0x7f070072; public static final int search_voice_btn = 0x7f070073; public static final int select_dialog_listview = 0x7f070074; public static final int shortcut = 0x7f070075; public static final int spacer = 0x7f070079; public static final int split_action_bar = 0x7f07007a; public static final int src_atop = 0x7f07007d; public static final int src_in = 0x7f07007e; public static final int src_over = 0x7f07007f; public static final int start = 0x7f070081; public static final int submenuarrow = 0x7f070082; public static final int submit_area = 0x7f070083; public static final int tabMode = 0x7f070084; public static final int tag_transition_group = 0x7f070085; public static final int tag_unhandled_key_event_manager = 0x7f070086; public static final int tag_unhandled_key_listeners = 0x7f070087; public static final int text = 0x7f070088; public static final int text2 = 0x7f070089; public static final int textSpacerNoButtons = 0x7f07008a; public static final int textSpacerNoTitle = 0x7f07008b; public static final int time = 0x7f07008c; public static final int title = 0x7f07008d; public static final int titleDividerNoCustom = 0x7f07008e; public static final int title_template = 0x7f07008f; public static final int top = 0x7f070090; public static final int topPanel = 0x7f070091; public static final int uniform = 0x7f070095; public static final int up = 0x7f070096; public static final int wrap_content = 0x7f07009a; } public static final class integer { private integer() {} public static final int abc_config_activityDefaultDur = 0x7f080000; public static final int abc_config_activityShortDur = 0x7f080001; public static final int cancel_button_image_alpha = 0x7f080002; public static final int config_tooltipAnimTime = 0x7f080003; public static final int status_bar_notification_info_maxnum = 0x7f080004; } public static final class layout { private layout() {} public static final int abc_action_bar_title_item = 0x7f090000; public static final int abc_action_bar_up_container = 0x7f090001; public static final int abc_action_menu_item_layout = 0x7f090002; public static final int abc_action_menu_layout = 0x7f090003; public static final int abc_action_mode_bar = 0x7f090004; public static final int abc_action_mode_close_item_material = 0x7f090005; public static final int abc_activity_chooser_view = 0x7f090006; public static final int abc_activity_chooser_view_list_item = 0x7f090007; public static final int abc_alert_dialog_button_bar_material = 0x7f090008; public static final int abc_alert_dialog_material = 0x7f090009; public static final int abc_alert_dialog_title_material = 0x7f09000a; public static final int abc_cascading_menu_item_layout = 0x7f09000b; public static final int abc_dialog_title_material = 0x7f09000c; public static final int abc_expanded_menu_layout = 0x7f09000d; public static final int abc_list_menu_item_checkbox = 0x7f09000e; public static final int abc_list_menu_item_icon = 0x7f09000f; public static final int abc_list_menu_item_layout = 0x7f090010; public static final int abc_list_menu_item_radio = 0x7f090011; public static final int abc_popup_menu_header_item_layout = 0x7f090012; public static final int abc_popup_menu_item_layout = 0x7f090013; public static final int abc_screen_content_include = 0x7f090014; public static final int abc_screen_simple = 0x7f090015; public static final int abc_screen_simple_overlay_action_mode = 0x7f090016; public static final int abc_screen_toolbar = 0x7f090017; public static final int abc_search_dropdown_item_icons_2line = 0x7f090018; public static final int abc_search_view = 0x7f090019; public static final int abc_select_dialog_material = 0x7f09001a; public static final int abc_tooltip = 0x7f09001b; public static final int notification_action = 0x7f09001f; public static final int notification_action_tombstone = 0x7f090020; public static final int notification_template_custom_big = 0x7f090021; public static final int notification_template_icon_group = 0x7f090022; public static final int notification_template_part_chronometer = 0x7f090023; public static final int notification_template_part_time = 0x7f090024; public static final int select_dialog_item_material = 0x7f090025; public static final int select_dialog_multichoice_material = 0x7f090026; public static final int select_dialog_singlechoice_material = 0x7f090027; public static final int support_simple_spinner_dropdown_item = 0x7f090028; } public static final class string { private string() {} public static final int abc_action_bar_home_description = 0x7f0b0000; public static final int abc_action_bar_up_description = 0x7f0b0001; public static final int abc_action_menu_overflow_description = 0x7f0b0002; public static final int abc_action_mode_done = 0x7f0b0003; public static final int abc_activity_chooser_view_see_all = 0x7f0b0004; public static final int abc_activitychooserview_choose_application = 0x7f0b0005; public static final int abc_capital_off = 0x7f0b0006; public static final int abc_capital_on = 0x7f0b0007; public static final int abc_font_family_body_1_material = 0x7f0b0008; public static final int abc_font_family_body_2_material = 0x7f0b0009; public static final int abc_font_family_button_material = 0x7f0b000a; public static final int abc_font_family_caption_material = 0x7f0b000b; public static final int abc_font_family_display_1_material = 0x7f0b000c; public static final int abc_font_family_display_2_material = 0x7f0b000d; public static final int abc_font_family_display_3_material = 0x7f0b000e; public static final int abc_font_family_display_4_material = 0x7f0b000f; public static final int abc_font_family_headline_material = 0x7f0b0010; public static final int abc_font_family_menu_material = 0x7f0b0011; public static final int abc_font_family_subhead_material = 0x7f0b0012; public static final int abc_font_family_title_material = 0x7f0b0013; public static final int abc_menu_alt_shortcut_label = 0x7f0b0014; public static final int abc_menu_ctrl_shortcut_label = 0x7f0b0015; public static final int abc_menu_delete_shortcut_label = 0x7f0b0016; public static final int abc_menu_enter_shortcut_label = 0x7f0b0017; public static final int abc_menu_function_shortcut_label = 0x7f0b0018; public static final int abc_menu_meta_shortcut_label = 0x7f0b0019; public static final int abc_menu_shift_shortcut_label = 0x7f0b001a; public static final int abc_menu_space_shortcut_label = 0x7f0b001b; public static final int abc_menu_sym_shortcut_label = 0x7f0b001c; public static final int abc_prepend_shortcut_label = 0x7f0b001d; public static final int abc_search_hint = 0x7f0b001e; public static final int abc_searchview_description_clear = 0x7f0b001f; public static final int abc_searchview_description_query = 0x7f0b0020; public static final int abc_searchview_description_search = 0x7f0b0021; public static final int abc_searchview_description_submit = 0x7f0b0022; public static final int abc_searchview_description_voice = 0x7f0b0023; public static final int abc_shareactionprovider_share_with = 0x7f0b0024; public static final int abc_shareactionprovider_share_with_application = 0x7f0b0025; public static final int abc_toolbar_collapse_description = 0x7f0b0026; public static final int search_menu_title = 0x7f0b0029; public static final int status_bar_notification_info_overflow = 0x7f0b002a; } public static final class style { private style() {} public static final int AlertDialog_AppCompat = 0x7f0c0000; public static final int AlertDialog_AppCompat_Light = 0x7f0c0001; public static final int Animation_AppCompat_Dialog = 0x7f0c0002; public static final int Animation_AppCompat_DropDownUp = 0x7f0c0003; public static final int Animation_AppCompat_Tooltip = 0x7f0c0004; public static final int Base_AlertDialog_AppCompat = 0x7f0c0006; public static final int Base_AlertDialog_AppCompat_Light = 0x7f0c0007; public static final int Base_Animation_AppCompat_Dialog = 0x7f0c0008; public static final int Base_Animation_AppCompat_DropDownUp = 0x7f0c0009; public static final int Base_Animation_AppCompat_Tooltip = 0x7f0c000a; public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f0c000c; public static final int Base_DialogWindowTitle_AppCompat = 0x7f0c000b; public static final int Base_TextAppearance_AppCompat = 0x7f0c000d; public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0c000e; public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0c000f; public static final int Base_TextAppearance_AppCompat_Button = 0x7f0c0010; public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0c0011; public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0c0012; public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0c0013; public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0c0014; public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0c0015; public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0c0016; public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0c0017; public static final int Base_TextAppearance_AppCompat_Large = 0x7f0c0018; public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0c0019; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0c001a; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0c001b; public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0c001c; public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0c001d; public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0c001e; public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0c001f; public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0c0020; public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0c0021; public static final int Base_TextAppearance_AppCompat_Small = 0x7f0c0022; public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0c0023; public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0c0024; public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0c0025; public static final int Base_TextAppearance_AppCompat_Title = 0x7f0c0026; public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0c0027; public static final int Base_TextAppearance_AppCompat_Tooltip = 0x7f0c0028; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0c0029; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0c002a; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0c002b; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0c002c; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0c002d; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0c002e; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0c002f; public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f0c0030; public static final int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0c0031; public static final int Base_TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0c0032; public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0c0033; public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0c0034; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0c0035; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0c0036; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0c0037; public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0c0038; public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0c0039; public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0c003a; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0c003b; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0c003c; public static final int Base_ThemeOverlay_AppCompat = 0x7f0c004b; public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0c004c; public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0c004d; public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0c004e; public static final int Base_ThemeOverlay_AppCompat_Dialog = 0x7f0c004f; public static final int Base_ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0c0050; public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0c0051; public static final int Base_Theme_AppCompat = 0x7f0c003d; public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0c003e; public static final int Base_Theme_AppCompat_Dialog = 0x7f0c003f; public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0c0043; public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f0c0040; public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0c0041; public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f0c0042; public static final int Base_Theme_AppCompat_Light = 0x7f0c0044; public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0c0045; public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0c0046; public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0c004a; public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f0c0047; public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0c0048; public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0c0049; public static final int Base_V21_ThemeOverlay_AppCompat_Dialog = 0x7f0c0056; public static final int Base_V21_Theme_AppCompat = 0x7f0c0052; public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0c0053; public static final int Base_V21_Theme_AppCompat_Light = 0x7f0c0054; public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0c0055; public static final int Base_V22_Theme_AppCompat = 0x7f0c0057; public static final int Base_V22_Theme_AppCompat_Light = 0x7f0c0058; public static final int Base_V23_Theme_AppCompat = 0x7f0c0059; public static final int Base_V23_Theme_AppCompat_Light = 0x7f0c005a; public static final int Base_V26_Theme_AppCompat = 0x7f0c005b; public static final int Base_V26_Theme_AppCompat_Light = 0x7f0c005c; public static final int Base_V26_Widget_AppCompat_Toolbar = 0x7f0c005d; public static final int Base_V28_Theme_AppCompat = 0x7f0c005e; public static final int Base_V28_Theme_AppCompat_Light = 0x7f0c005f; public static final int Base_V7_ThemeOverlay_AppCompat_Dialog = 0x7f0c0064; public static final int Base_V7_Theme_AppCompat = 0x7f0c0060; public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0c0061; public static final int Base_V7_Theme_AppCompat_Light = 0x7f0c0062; public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0c0063; public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0c0065; public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0c0066; public static final int Base_V7_Widget_AppCompat_Toolbar = 0x7f0c0067; public static final int Base_Widget_AppCompat_ActionBar = 0x7f0c0068; public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0c0069; public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0c006a; public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0c006b; public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0c006c; public static final int Base_Widget_AppCompat_ActionButton = 0x7f0c006d; public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0c006e; public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0c006f; public static final int Base_Widget_AppCompat_ActionMode = 0x7f0c0070; public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0c0071; public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0c0072; public static final int Base_Widget_AppCompat_Button = 0x7f0c0073; public static final int Base_Widget_AppCompat_ButtonBar = 0x7f0c0079; public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0c007a; public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f0c0074; public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f0c0075; public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0c0076; public static final int Base_Widget_AppCompat_Button_Colored = 0x7f0c0077; public static final int Base_Widget_AppCompat_Button_Small = 0x7f0c0078; public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f0c007b; public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f0c007c; public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0c007d; public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0c007e; public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0c007f; public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0c0080; public static final int Base_Widget_AppCompat_EditText = 0x7f0c0081; public static final int Base_Widget_AppCompat_ImageButton = 0x7f0c0082; public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0c0083; public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0c0084; public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0c0085; public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0c0086; public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0c0087; public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0c0088; public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0c0089; public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0c008a; public static final int Base_Widget_AppCompat_ListMenuView = 0x7f0c008b; public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0c008c; public static final int Base_Widget_AppCompat_ListView = 0x7f0c008d; public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0c008e; public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0c008f; public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0c0090; public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0c0091; public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0c0092; public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0c0093; public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0c0094; public static final int Base_Widget_AppCompat_RatingBar = 0x7f0c0095; public static final int Base_Widget_AppCompat_RatingBar_Indicator = 0x7f0c0096; public static final int Base_Widget_AppCompat_RatingBar_Small = 0x7f0c0097; public static final int Base_Widget_AppCompat_SearchView = 0x7f0c0098; public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0c0099; public static final int Base_Widget_AppCompat_SeekBar = 0x7f0c009a; public static final int Base_Widget_AppCompat_SeekBar_Discrete = 0x7f0c009b; public static final int Base_Widget_AppCompat_Spinner = 0x7f0c009c; public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f0c009d; public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f0c009e; public static final int Base_Widget_AppCompat_Toolbar = 0x7f0c009f; public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0c00a0; public static final int Platform_AppCompat = 0x7f0c00a1; public static final int Platform_AppCompat_Light = 0x7f0c00a2; public static final int Platform_ThemeOverlay_AppCompat = 0x7f0c00a3; public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f0c00a4; public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f0c00a5; public static final int Platform_V21_AppCompat = 0x7f0c00a6; public static final int Platform_V21_AppCompat_Light = 0x7f0c00a7; public static final int Platform_V25_AppCompat = 0x7f0c00a8; public static final int Platform_V25_AppCompat_Light = 0x7f0c00a9; public static final int Platform_Widget_AppCompat_Spinner = 0x7f0c00aa; public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f0c00ab; public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0c00ac; public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f0c00ad; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0c00ae; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0c00af; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Shortcut = 0x7f0c00b0; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_SubmenuArrow = 0x7f0c00b1; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0c00b2; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Title = 0x7f0c00b3; public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0c00b9; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0c00b4; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0c00b5; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0c00b6; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0c00b7; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0c00b8; public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f0c00ba; public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f0c00bb; public static final int TextAppearance_AppCompat = 0x7f0c00bc; public static final int TextAppearance_AppCompat_Body1 = 0x7f0c00bd; public static final int TextAppearance_AppCompat_Body2 = 0x7f0c00be; public static final int TextAppearance_AppCompat_Button = 0x7f0c00bf; public static final int TextAppearance_AppCompat_Caption = 0x7f0c00c0; public static final int TextAppearance_AppCompat_Display1 = 0x7f0c00c1; public static final int TextAppearance_AppCompat_Display2 = 0x7f0c00c2; public static final int TextAppearance_AppCompat_Display3 = 0x7f0c00c3; public static final int TextAppearance_AppCompat_Display4 = 0x7f0c00c4; public static final int TextAppearance_AppCompat_Headline = 0x7f0c00c5; public static final int TextAppearance_AppCompat_Inverse = 0x7f0c00c6; public static final int TextAppearance_AppCompat_Large = 0x7f0c00c7; public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0c00c8; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0c00c9; public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0c00ca; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0c00cb; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0c00cc; public static final int TextAppearance_AppCompat_Medium = 0x7f0c00cd; public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0c00ce; public static final int TextAppearance_AppCompat_Menu = 0x7f0c00cf; public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0c00d0; public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0c00d1; public static final int TextAppearance_AppCompat_Small = 0x7f0c00d2; public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0c00d3; public static final int TextAppearance_AppCompat_Subhead = 0x7f0c00d4; public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0c00d5; public static final int TextAppearance_AppCompat_Title = 0x7f0c00d6; public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0c00d7; public static final int TextAppearance_AppCompat_Tooltip = 0x7f0c00d8; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0c00d9; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0c00da; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0c00db; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0c00dc; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0c00dd; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0c00de; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0c00df; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0c00e0; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0c00e1; public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0c00e2; public static final int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0c00e3; public static final int TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0c00e4; public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0c00e5; public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0c00e6; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0c00e7; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0c00e8; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0c00e9; public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0c00ea; public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0c00eb; public static final int TextAppearance_Compat_Notification = 0x7f0c00ec; public static final int TextAppearance_Compat_Notification_Info = 0x7f0c00ed; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0c00ee; public static final int TextAppearance_Compat_Notification_Time = 0x7f0c00ef; public static final int TextAppearance_Compat_Notification_Title = 0x7f0c00f0; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0c00f1; public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0c00f2; public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0c00f3; public static final int ThemeOverlay_AppCompat = 0x7f0c0109; public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0c010a; public static final int ThemeOverlay_AppCompat_Dark = 0x7f0c010b; public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0c010c; public static final int ThemeOverlay_AppCompat_Dialog = 0x7f0c010d; public static final int ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0c010e; public static final int ThemeOverlay_AppCompat_Light = 0x7f0c010f; public static final int Theme_AppCompat = 0x7f0c00f4; public static final int Theme_AppCompat_CompactMenu = 0x7f0c00f5; public static final int Theme_AppCompat_DayNight = 0x7f0c00f6; public static final int Theme_AppCompat_DayNight_DarkActionBar = 0x7f0c00f7; public static final int Theme_AppCompat_DayNight_Dialog = 0x7f0c00f8; public static final int Theme_AppCompat_DayNight_DialogWhenLarge = 0x7f0c00fb; public static final int Theme_AppCompat_DayNight_Dialog_Alert = 0x7f0c00f9; public static final int Theme_AppCompat_DayNight_Dialog_MinWidth = 0x7f0c00fa; public static final int Theme_AppCompat_DayNight_NoActionBar = 0x7f0c00fc; public static final int Theme_AppCompat_Dialog = 0x7f0c00fd; public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0c0100; public static final int Theme_AppCompat_Dialog_Alert = 0x7f0c00fe; public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0c00ff; public static final int Theme_AppCompat_Light = 0x7f0c0101; public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0c0102; public static final int Theme_AppCompat_Light_Dialog = 0x7f0c0103; public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0c0106; public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0c0104; public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0c0105; public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0c0107; public static final int Theme_AppCompat_NoActionBar = 0x7f0c0108; public static final int Widget_AppCompat_ActionBar = 0x7f0c0110; public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0c0111; public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0c0112; public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0c0113; public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0c0114; public static final int Widget_AppCompat_ActionButton = 0x7f0c0115; public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0c0116; public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0c0117; public static final int Widget_AppCompat_ActionMode = 0x7f0c0118; public static final int Widget_AppCompat_ActivityChooserView = 0x7f0c0119; public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0c011a; public static final int Widget_AppCompat_Button = 0x7f0c011b; public static final int Widget_AppCompat_ButtonBar = 0x7f0c0121; public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0c0122; public static final int Widget_AppCompat_Button_Borderless = 0x7f0c011c; public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f0c011d; public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0c011e; public static final int Widget_AppCompat_Button_Colored = 0x7f0c011f; public static final int Widget_AppCompat_Button_Small = 0x7f0c0120; public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f0c0123; public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f0c0124; public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0c0125; public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0c0126; public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0c0127; public static final int Widget_AppCompat_EditText = 0x7f0c0128; public static final int Widget_AppCompat_ImageButton = 0x7f0c0129; public static final int Widget_AppCompat_Light_ActionBar = 0x7f0c012a; public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0c012b; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0c012c; public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0c012d; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0c012e; public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0c012f; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0c0130; public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0c0131; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0c0132; public static final int Widget_AppCompat_Light_ActionButton = 0x7f0c0133; public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0c0134; public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0c0135; public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0c0136; public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0c0137; public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0c0138; public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0c0139; public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0c013a; public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0c013b; public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0c013c; public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0c013d; public static final int Widget_AppCompat_Light_SearchView = 0x7f0c013e; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0c013f; public static final int Widget_AppCompat_ListMenuView = 0x7f0c0140; public static final int Widget_AppCompat_ListPopupWindow = 0x7f0c0141; public static final int Widget_AppCompat_ListView = 0x7f0c0142; public static final int Widget_AppCompat_ListView_DropDown = 0x7f0c0143; public static final int Widget_AppCompat_ListView_Menu = 0x7f0c0144; public static final int Widget_AppCompat_PopupMenu = 0x7f0c0145; public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0c0146; public static final int Widget_AppCompat_PopupWindow = 0x7f0c0147; public static final int Widget_AppCompat_ProgressBar = 0x7f0c0148; public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0c0149; public static final int Widget_AppCompat_RatingBar = 0x7f0c014a; public static final int Widget_AppCompat_RatingBar_Indicator = 0x7f0c014b; public static final int Widget_AppCompat_RatingBar_Small = 0x7f0c014c; public static final int Widget_AppCompat_SearchView = 0x7f0c014d; public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f0c014e; public static final int Widget_AppCompat_SeekBar = 0x7f0c014f; public static final int Widget_AppCompat_SeekBar_Discrete = 0x7f0c0150; public static final int Widget_AppCompat_Spinner = 0x7f0c0151; public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0c0152; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0c0153; public static final int Widget_AppCompat_Spinner_Underlined = 0x7f0c0154; public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f0c0155; public static final int Widget_AppCompat_Toolbar = 0x7f0c0156; public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0c0157; public static final int Widget_Compat_NotificationActionContainer = 0x7f0c0158; public static final int Widget_Compat_NotificationActionText = 0x7f0c0159; public static final int Widget_Support_CoordinatorLayout = 0x7f0c015a; } public static final class styleable { private styleable() {} public static final int[] ActionBar = { 0x7f020031, 0x7f020032, 0x7f020033, 0x7f02005d, 0x7f02005e, 0x7f02005f, 0x7f020060, 0x7f020061, 0x7f020062, 0x7f020065, 0x7f02006a, 0x7f02006b, 0x7f020076, 0x7f02008c, 0x7f02008d, 0x7f02008e, 0x7f02008f, 0x7f020090, 0x7f020095, 0x7f020098, 0x7f0200e1, 0x7f0200e8, 0x7f0200f3, 0x7f0200f6, 0x7f0200f7, 0x7f020115, 0x7f020118, 0x7f020133, 0x7f02013c }; public static final int ActionBar_background = 0; public static final int ActionBar_backgroundSplit = 1; public static final int ActionBar_backgroundStacked = 2; public static final int ActionBar_contentInsetEnd = 3; public static final int ActionBar_contentInsetEndWithActions = 4; public static final int ActionBar_contentInsetLeft = 5; public static final int ActionBar_contentInsetRight = 6; public static final int ActionBar_contentInsetStart = 7; public static final int ActionBar_contentInsetStartWithNavigation = 8; public static final int ActionBar_customNavigationLayout = 9; public static final int ActionBar_displayOptions = 10; public static final int ActionBar_divider = 11; public static final int ActionBar_elevation = 12; public static final int ActionBar_height = 13; public static final int ActionBar_hideOnContentScroll = 14; public static final int ActionBar_homeAsUpIndicator = 15; public static final int ActionBar_homeLayout = 16; public static final int ActionBar_icon = 17; public static final int ActionBar_indeterminateProgressStyle = 18; public static final int ActionBar_itemPadding = 19; public static final int ActionBar_logo = 20; public static final int ActionBar_navigationMode = 21; public static final int ActionBar_popupTheme = 22; public static final int ActionBar_progressBarPadding = 23; public static final int ActionBar_progressBarStyle = 24; public static final int ActionBar_subtitle = 25; public static final int ActionBar_subtitleTextStyle = 26; public static final int ActionBar_title = 27; public static final int ActionBar_titleTextStyle = 28; public static final int[] ActionBarLayout = { 0x10100b3 }; public static final int ActionBarLayout_android_layout_gravity = 0; public static final int[] ActionMenuItemView = { 0x101013f }; public static final int ActionMenuItemView_android_minWidth = 0; public static final int[] ActionMenuView = { }; public static final int[] ActionMode = { 0x7f020031, 0x7f020032, 0x7f02004a, 0x7f02008c, 0x7f020118, 0x7f02013c }; public static final int ActionMode_background = 0; public static final int ActionMode_backgroundSplit = 1; public static final int ActionMode_closeItemLayout = 2; public static final int ActionMode_height = 3; public static final int ActionMode_subtitleTextStyle = 4; public static final int ActionMode_titleTextStyle = 5; public static final int[] ActivityChooserView = { 0x7f020078, 0x7f020096 }; public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 0; public static final int ActivityChooserView_initialActivityCount = 1; public static final int[] AlertDialog = { 0x10100f2, 0x7f020040, 0x7f020041, 0x7f0200d8, 0x7f0200d9, 0x7f0200e5, 0x7f020108, 0x7f020109 }; public static final int AlertDialog_android_layout = 0; public static final int AlertDialog_buttonIconDimen = 1; public static final int AlertDialog_buttonPanelSideLayout = 2; public static final int AlertDialog_listItemLayout = 3; public static final int AlertDialog_listLayout = 4; public static final int AlertDialog_multiChoiceItemLayout = 5; public static final int AlertDialog_showTitle = 6; public static final int AlertDialog_singleChoiceItemLayout = 7; public static final int[] AnimatedStateListDrawableCompat = { 0x101011c, 0x1010194, 0x1010195, 0x1010196, 0x101030c, 0x101030d }; public static final int AnimatedStateListDrawableCompat_android_dither = 0; public static final int AnimatedStateListDrawableCompat_android_visible = 1; public static final int AnimatedStateListDrawableCompat_android_variablePadding = 2; public static final int AnimatedStateListDrawableCompat_android_constantSize = 3; public static final int AnimatedStateListDrawableCompat_android_enterFadeDuration = 4; public static final int AnimatedStateListDrawableCompat_android_exitFadeDuration = 5; public static final int[] AnimatedStateListDrawableItem = { 0x10100d0, 0x1010199 }; public static final int AnimatedStateListDrawableItem_android_id = 0; public static final int AnimatedStateListDrawableItem_android_drawable = 1; public static final int[] AnimatedStateListDrawableTransition = { 0x1010199, 0x1010449, 0x101044a, 0x101044b }; public static final int AnimatedStateListDrawableTransition_android_drawable = 0; public static final int AnimatedStateListDrawableTransition_android_toId = 1; public static final int AnimatedStateListDrawableTransition_android_fromId = 2; public static final int AnimatedStateListDrawableTransition_android_reversible = 3; public static final int[] AppCompatImageView = { 0x1010119, 0x7f02010f, 0x7f020131, 0x7f020132 }; public static final int AppCompatImageView_android_src = 0; public static final int AppCompatImageView_srcCompat = 1; public static final int AppCompatImageView_tint = 2; public static final int AppCompatImageView_tintMode = 3; public static final int[] AppCompatSeekBar = { 0x1010142, 0x7f02012e, 0x7f02012f, 0x7f020130 }; public static final int AppCompatSeekBar_android_thumb = 0; public static final int AppCompatSeekBar_tickMark = 1; public static final int AppCompatSeekBar_tickMarkTint = 2; public static final int AppCompatSeekBar_tickMarkTintMode = 3; public static final int[] AppCompatTextHelper = { 0x1010034, 0x101016d, 0x101016e, 0x101016f, 0x1010170, 0x1010392, 0x1010393 }; public static final int AppCompatTextHelper_android_textAppearance = 0; public static final int AppCompatTextHelper_android_drawableTop = 1; public static final int AppCompatTextHelper_android_drawableBottom = 2; public static final int AppCompatTextHelper_android_drawableLeft = 3; public static final int AppCompatTextHelper_android_drawableRight = 4; public static final int AppCompatTextHelper_android_drawableStart = 5; public static final int AppCompatTextHelper_android_drawableEnd = 6; public static final int[] AppCompatTextView = { 0x1010034, 0x7f02002c, 0x7f02002d, 0x7f02002e, 0x7f02002f, 0x7f020030, 0x7f02007e, 0x7f020080, 0x7f02009a, 0x7f0200d5, 0x7f02011e }; public static final int AppCompatTextView_android_textAppearance = 0; public static final int AppCompatTextView_autoSizeMaxTextSize = 1; public static final int AppCompatTextView_autoSizeMinTextSize = 2; public static final int AppCompatTextView_autoSizePresetSizes = 3; public static final int AppCompatTextView_autoSizeStepGranularity = 4; public static final int AppCompatTextView_autoSizeTextType = 5; public static final int AppCompatTextView_firstBaselineToTopHeight = 6; public static final int AppCompatTextView_fontFamily = 7; public static final int AppCompatTextView_lastBaselineToBottomHeight = 8; public static final int AppCompatTextView_lineHeight = 9; public static final int AppCompatTextView_textAllCaps = 10; public static final int[] AppCompatTheme = { 0x1010057, 0x10100ae, 0x7f020000, 0x7f020001, 0x7f020002, 0x7f020003, 0x7f020004, 0x7f020005, 0x7f020006, 0x7f020007, 0x7f020008, 0x7f020009, 0x7f02000a, 0x7f02000b, 0x7f02000c, 0x7f02000e, 0x7f02000f, 0x7f020010, 0x7f020011, 0x7f020012, 0x7f020013, 0x7f020014, 0x7f020015, 0x7f020016, 0x7f020017, 0x7f020018, 0x7f020019, 0x7f02001a, 0x7f02001b, 0x7f02001c, 0x7f02001d, 0x7f02001e, 0x7f020021, 0x7f020022, 0x7f020023, 0x7f020024, 0x7f020025, 0x7f02002b, 0x7f020039, 0x7f02003a, 0x7f02003b, 0x7f02003c, 0x7f02003d, 0x7f02003e, 0x7f020042, 0x7f020043, 0x7f020047, 0x7f020048, 0x7f02004e, 0x7f02004f, 0x7f020050, 0x7f020051, 0x7f020052, 0x7f020053, 0x7f020054, 0x7f020055, 0x7f020056, 0x7f020057, 0x7f020063, 0x7f020067, 0x7f020068, 0x7f020069, 0x7f02006c, 0x7f02006e, 0x7f020071, 0x7f020072, 0x7f020073, 0x7f020074, 0x7f020075, 0x7f02008e, 0x7f020094, 0x7f0200d6, 0x7f0200d7, 0x7f0200da, 0x7f0200db, 0x7f0200dc, 0x7f0200dd, 0x7f0200de, 0x7f0200df, 0x7f0200e0, 0x7f0200ef, 0x7f0200f0, 0x7f0200f1, 0x7f0200f2, 0x7f0200f4, 0x7f0200fa, 0x7f0200fb, 0x7f0200fc, 0x7f0200fd, 0x7f020101, 0x7f020102, 0x7f020103, 0x7f020104, 0x7f02010c, 0x7f02010d, 0x7f02011c, 0x7f02011f, 0x7f020120, 0x7f020121, 0x7f020122, 0x7f020123, 0x7f020124, 0x7f020125, 0x7f020126, 0x7f020127, 0x7f020128, 0x7f02013d, 0x7f02013e, 0x7f02013f, 0x7f020140, 0x7f020146, 0x7f020148, 0x7f020149, 0x7f02014a, 0x7f02014b, 0x7f02014c, 0x7f02014d, 0x7f02014e, 0x7f02014f, 0x7f020150, 0x7f020151 }; public static final int AppCompatTheme_android_windowIsFloating = 0; public static final int AppCompatTheme_android_windowAnimationStyle = 1; public static final int AppCompatTheme_actionBarDivider = 2; public static final int AppCompatTheme_actionBarItemBackground = 3; public static final int AppCompatTheme_actionBarPopupTheme = 4; public static final int AppCompatTheme_actionBarSize = 5; public static final int AppCompatTheme_actionBarSplitStyle = 6; public static final int AppCompatTheme_actionBarStyle = 7; public static final int AppCompatTheme_actionBarTabBarStyle = 8; public static final int AppCompatTheme_actionBarTabStyle = 9; public static final int AppCompatTheme_actionBarTabTextStyle = 10; public static final int AppCompatTheme_actionBarTheme = 11; public static final int AppCompatTheme_actionBarWidgetTheme = 12; public static final int AppCompatTheme_actionButtonStyle = 13; public static final int AppCompatTheme_actionDropDownStyle = 14; public static final int AppCompatTheme_actionMenuTextAppearance = 15; public static final int AppCompatTheme_actionMenuTextColor = 16; public static final int AppCompatTheme_actionModeBackground = 17; public static final int AppCompatTheme_actionModeCloseButtonStyle = 18; public static final int AppCompatTheme_actionModeCloseDrawable = 19; public static final int AppCompatTheme_actionModeCopyDrawable = 20; public static final int AppCompatTheme_actionModeCutDrawable = 21; public static final int AppCompatTheme_actionModeFindDrawable = 22; public static final int AppCompatTheme_actionModePasteDrawable = 23; public static final int AppCompatTheme_actionModePopupWindowStyle = 24; public static final int AppCompatTheme_actionModeSelectAllDrawable = 25; public static final int AppCompatTheme_actionModeShareDrawable = 26; public static final int AppCompatTheme_actionModeSplitBackground = 27; public static final int AppCompatTheme_actionModeStyle = 28; public static final int AppCompatTheme_actionModeWebSearchDrawable = 29; public static final int AppCompatTheme_actionOverflowButtonStyle = 30; public static final int AppCompatTheme_actionOverflowMenuStyle = 31; public static final int AppCompatTheme_activityChooserViewStyle = 32; public static final int AppCompatTheme_alertDialogButtonGroupStyle = 33; public static final int AppCompatTheme_alertDialogCenterButtons = 34; public static final int AppCompatTheme_alertDialogStyle = 35; public static final int AppCompatTheme_alertDialogTheme = 36; public static final int AppCompatTheme_autoCompleteTextViewStyle = 37; public static final int AppCompatTheme_borderlessButtonStyle = 38; public static final int AppCompatTheme_buttonBarButtonStyle = 39; public static final int AppCompatTheme_buttonBarNegativeButtonStyle = 40; public static final int AppCompatTheme_buttonBarNeutralButtonStyle = 41; public static final int AppCompatTheme_buttonBarPositiveButtonStyle = 42; public static final int AppCompatTheme_buttonBarStyle = 43; public static final int AppCompatTheme_buttonStyle = 44; public static final int AppCompatTheme_buttonStyleSmall = 45; public static final int AppCompatTheme_checkboxStyle = 46; public static final int AppCompatTheme_checkedTextViewStyle = 47; public static final int AppCompatTheme_colorAccent = 48; public static final int AppCompatTheme_colorBackgroundFloating = 49; public static final int AppCompatTheme_colorButtonNormal = 50; public static final int AppCompatTheme_colorControlActivated = 51; public static final int AppCompatTheme_colorControlHighlight = 52; public static final int AppCompatTheme_colorControlNormal = 53; public static final int AppCompatTheme_colorError = 54; public static final int AppCompatTheme_colorPrimary = 55; public static final int AppCompatTheme_colorPrimaryDark = 56; public static final int AppCompatTheme_colorSwitchThumbNormal = 57; public static final int AppCompatTheme_controlBackground = 58; public static final int AppCompatTheme_dialogCornerRadius = 59; public static final int AppCompatTheme_dialogPreferredPadding = 60; public static final int AppCompatTheme_dialogTheme = 61; public static final int AppCompatTheme_dividerHorizontal = 62; public static final int AppCompatTheme_dividerVertical = 63; public static final int AppCompatTheme_dropDownListViewStyle = 64; public static final int AppCompatTheme_dropdownListPreferredItemHeight = 65; public static final int AppCompatTheme_editTextBackground = 66; public static final int AppCompatTheme_editTextColor = 67; public static final int AppCompatTheme_editTextStyle = 68; public static final int AppCompatTheme_homeAsUpIndicator = 69; public static final int AppCompatTheme_imageButtonStyle = 70; public static final int AppCompatTheme_listChoiceBackgroundIndicator = 71; public static final int AppCompatTheme_listDividerAlertDialog = 72; public static final int AppCompatTheme_listMenuViewStyle = 73; public static final int AppCompatTheme_listPopupWindowStyle = 74; public static final int AppCompatTheme_listPreferredItemHeight = 75; public static final int AppCompatTheme_listPreferredItemHeightLarge = 76; public static final int AppCompatTheme_listPreferredItemHeightSmall = 77; public static final int AppCompatTheme_listPreferredItemPaddingLeft = 78; public static final int AppCompatTheme_listPreferredItemPaddingRight = 79; public static final int AppCompatTheme_panelBackground = 80; public static final int AppCompatTheme_panelMenuListTheme = 81; public static final int AppCompatTheme_panelMenuListWidth = 82; public static final int AppCompatTheme_popupMenuStyle = 83; public static final int AppCompatTheme_popupWindowStyle = 84; public static final int AppCompatTheme_radioButtonStyle = 85; public static final int AppCompatTheme_ratingBarStyle = 86; public static final int AppCompatTheme_ratingBarStyleIndicator = 87; public static final int AppCompatTheme_ratingBarStyleSmall = 88; public static final int AppCompatTheme_searchViewStyle = 89; public static final int AppCompatTheme_seekBarStyle = 90; public static final int AppCompatTheme_selectableItemBackground = 91; public static final int AppCompatTheme_selectableItemBackgroundBorderless = 92; public static final int AppCompatTheme_spinnerDropDownItemStyle = 93; public static final int AppCompatTheme_spinnerStyle = 94; public static final int AppCompatTheme_switchStyle = 95; public static final int AppCompatTheme_textAppearanceLargePopupMenu = 96; public static final int AppCompatTheme_textAppearanceListItem = 97; public static final int AppCompatTheme_textAppearanceListItemSecondary = 98; public static final int AppCompatTheme_textAppearanceListItemSmall = 99; public static final int AppCompatTheme_textAppearancePopupMenuHeader = 100; public static final int AppCompatTheme_textAppearanceSearchResultSubtitle = 101; public static final int AppCompatTheme_textAppearanceSearchResultTitle = 102; public static final int AppCompatTheme_textAppearanceSmallPopupMenu = 103; public static final int AppCompatTheme_textColorAlertDialogListItem = 104; public static final int AppCompatTheme_textColorSearchUrl = 105; public static final int AppCompatTheme_toolbarNavigationButtonStyle = 106; public static final int AppCompatTheme_toolbarStyle = 107; public static final int AppCompatTheme_tooltipForegroundColor = 108; public static final int AppCompatTheme_tooltipFrameBackground = 109; public static final int AppCompatTheme_viewInflaterClass = 110; public static final int AppCompatTheme_windowActionBar = 111; public static final int AppCompatTheme_windowActionBarOverlay = 112; public static final int AppCompatTheme_windowActionModeOverlay = 113; public static final int AppCompatTheme_windowFixedHeightMajor = 114; public static final int AppCompatTheme_windowFixedHeightMinor = 115; public static final int AppCompatTheme_windowFixedWidthMajor = 116; public static final int AppCompatTheme_windowFixedWidthMinor = 117; public static final int AppCompatTheme_windowMinWidthMajor = 118; public static final int AppCompatTheme_windowMinWidthMinor = 119; public static final int AppCompatTheme_windowNoTitle = 120; public static final int[] ButtonBarLayout = { 0x7f020026 }; public static final int ButtonBarLayout_allowStacking = 0; public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f020027 }; public static final int ColorStateListItem_android_color = 0; public static final int ColorStateListItem_android_alpha = 1; public static final int ColorStateListItem_alpha = 2; public static final int[] CompoundButton = { 0x1010107, 0x7f020044, 0x7f020045 }; public static final int CompoundButton_android_button = 0; public static final int CompoundButton_buttonTint = 1; public static final int CompoundButton_buttonTintMode = 2; public static final int[] CoordinatorLayout = { 0x7f020099, 0x7f020112 }; public static final int CoordinatorLayout_keylines = 0; public static final int CoordinatorLayout_statusBarBackground = 1; public static final int[] CoordinatorLayout_Layout = { 0x10100b3, 0x7f02009d, 0x7f02009e, 0x7f02009f, 0x7f0200c9, 0x7f0200d2, 0x7f0200d3 }; public static final int CoordinatorLayout_Layout_android_layout_gravity = 0; public static final int CoordinatorLayout_Layout_layout_anchor = 1; public static final int CoordinatorLayout_Layout_layout_anchorGravity = 2; public static final int CoordinatorLayout_Layout_layout_behavior = 3; public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 4; public static final int CoordinatorLayout_Layout_layout_insetEdge = 5; public static final int CoordinatorLayout_Layout_layout_keyline = 6; public static final int[] DrawerArrowToggle = { 0x7f020029, 0x7f02002a, 0x7f020036, 0x7f02004d, 0x7f02006f, 0x7f02008a, 0x7f02010b, 0x7f02012a }; public static final int DrawerArrowToggle_arrowHeadLength = 0; public static final int DrawerArrowToggle_arrowShaftLength = 1; public static final int DrawerArrowToggle_barLength = 2; public static final int DrawerArrowToggle_color = 3; public static final int DrawerArrowToggle_drawableSize = 4; public static final int DrawerArrowToggle_gapBetweenBars = 5; public static final int DrawerArrowToggle_spinBars = 6; public static final int DrawerArrowToggle_thickness = 7; public static final int[] FontFamily = { 0x7f020081, 0x7f020082, 0x7f020083, 0x7f020084, 0x7f020085, 0x7f020086 }; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 1; public static final int FontFamily_fontProviderFetchStrategy = 2; public static final int FontFamily_fontProviderFetchTimeout = 3; public static final int FontFamily_fontProviderPackage = 4; public static final int FontFamily_fontProviderQuery = 5; public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f02007f, 0x7f020087, 0x7f020088, 0x7f020089, 0x7f020145 }; public static final int FontFamilyFont_android_font = 0; public static final int FontFamilyFont_android_fontWeight = 1; public static final int FontFamilyFont_android_fontStyle = 2; public static final int FontFamilyFont_android_ttcIndex = 3; public static final int FontFamilyFont_android_fontVariationSettings = 4; public static final int FontFamilyFont_font = 5; public static final int FontFamilyFont_fontStyle = 6; public static final int FontFamilyFont_fontVariationSettings = 7; public static final int FontFamilyFont_fontWeight = 8; public static final int FontFamilyFont_ttcIndex = 9; public static final int[] GradientColor = { 0x101019d, 0x101019e, 0x10101a1, 0x10101a2, 0x10101a3, 0x10101a4, 0x1010201, 0x101020b, 0x1010510, 0x1010511, 0x1010512, 0x1010513 }; public static final int GradientColor_android_startColor = 0; public static final int GradientColor_android_endColor = 1; public static final int GradientColor_android_type = 2; public static final int GradientColor_android_centerX = 3; public static final int GradientColor_android_centerY = 4; public static final int GradientColor_android_gradientRadius = 5; public static final int GradientColor_android_tileMode = 6; public static final int GradientColor_android_centerColor = 7; public static final int GradientColor_android_startX = 8; public static final int GradientColor_android_startY = 9; public static final int GradientColor_android_endX = 10; public static final int GradientColor_android_endY = 11; public static final int[] GradientColorItem = { 0x10101a5, 0x1010514 }; public static final int GradientColorItem_android_color = 0; public static final int GradientColorItem_android_offset = 1; public static final int[] LinearLayoutCompat = { 0x10100af, 0x10100c4, 0x1010126, 0x1010127, 0x1010128, 0x7f02006b, 0x7f02006d, 0x7f0200e4, 0x7f020106 }; public static final int LinearLayoutCompat_android_gravity = 0; public static final int LinearLayoutCompat_android_orientation = 1; public static final int LinearLayoutCompat_android_baselineAligned = 2; public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3; public static final int LinearLayoutCompat_android_weightSum = 4; public static final int LinearLayoutCompat_divider = 5; public static final int LinearLayoutCompat_dividerPadding = 6; public static final int LinearLayoutCompat_measureWithLargestChild = 7; public static final int LinearLayoutCompat_showDividers = 8; public static final int[] LinearLayoutCompat_Layout = { 0x10100b3, 0x10100f4, 0x10100f5, 0x1010181 }; public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0; public static final int LinearLayoutCompat_Layout_android_layout_width = 1; public static final int LinearLayoutCompat_Layout_android_layout_height = 2; public static final int LinearLayoutCompat_Layout_android_layout_weight = 3; public static final int[] ListPopupWindow = { 0x10102ac, 0x10102ad }; public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0; public static final int ListPopupWindow_android_dropDownVerticalOffset = 1; public static final int[] MenuGroup = { 0x101000e, 0x10100d0, 0x1010194, 0x10101de, 0x10101df, 0x10101e0 }; public static final int MenuGroup_android_enabled = 0; public static final int MenuGroup_android_id = 1; public static final int MenuGroup_android_visible = 2; public static final int MenuGroup_android_menuCategory = 3; public static final int MenuGroup_android_orderInCategory = 4; public static final int MenuGroup_android_checkableBehavior = 5; public static final int[] MenuItem = { 0x1010002, 0x101000e, 0x10100d0, 0x1010106, 0x1010194, 0x10101de, 0x10101df, 0x10101e1, 0x10101e2, 0x10101e3, 0x10101e4, 0x10101e5, 0x101026f, 0x7f02000d, 0x7f02001f, 0x7f020020, 0x7f020028, 0x7f02005c, 0x7f020091, 0x7f020092, 0x7f0200e9, 0x7f020105, 0x7f020141 }; public static final int MenuItem_android_icon = 0; public static final int MenuItem_android_enabled = 1; public static final int MenuItem_android_id = 2; public static final int MenuItem_android_checked = 3; public static final int MenuItem_android_visible = 4; public static final int MenuItem_android_menuCategory = 5; public static final int MenuItem_android_orderInCategory = 6; public static final int MenuItem_android_title = 7; public static final int MenuItem_android_titleCondensed = 8; public static final int MenuItem_android_alphabeticShortcut = 9; public static final int MenuItem_android_numericShortcut = 10; public static final int MenuItem_android_checkable = 11; public static final int MenuItem_android_onClick = 12; public static final int MenuItem_actionLayout = 13; public static final int MenuItem_actionProviderClass = 14; public static final int MenuItem_actionViewClass = 15; public static final int MenuItem_alphabeticModifiers = 16; public static final int MenuItem_contentDescription = 17; public static final int MenuItem_iconTint = 18; public static final int MenuItem_iconTintMode = 19; public static final int MenuItem_numericModifiers = 20; public static final int MenuItem_showAsAction = 21; public static final int MenuItem_tooltipText = 22; public static final int[] MenuView = { 0x10100ae, 0x101012c, 0x101012d, 0x101012e, 0x101012f, 0x1010130, 0x1010131, 0x7f0200f5, 0x7f020113 }; public static final int MenuView_android_windowAnimationStyle = 0; public static final int MenuView_android_itemTextAppearance = 1; public static final int MenuView_android_horizontalDivider = 2; public static final int MenuView_android_verticalDivider = 3; public static final int MenuView_android_headerBackground = 4; public static final int MenuView_android_itemBackground = 5; public static final int MenuView_android_itemIconDisabledAlpha = 6; public static final int MenuView_preserveIconSpacing = 7; public static final int MenuView_subMenuArrow = 8; public static final int[] PopupWindow = { 0x1010176, 0x10102c9, 0x7f0200ea }; public static final int PopupWindow_android_popupBackground = 0; public static final int PopupWindow_android_popupAnimationStyle = 1; public static final int PopupWindow_overlapAnchor = 2; public static final int[] PopupWindowBackgroundState = { 0x7f020111 }; public static final int PopupWindowBackgroundState_state_above_anchor = 0; public static final int[] RecycleListView = { 0x7f0200eb, 0x7f0200ee }; public static final int RecycleListView_paddingBottomNoButtons = 0; public static final int RecycleListView_paddingTopNoTitle = 1; public static final int[] SearchView = { 0x10100da, 0x101011f, 0x1010220, 0x1010264, 0x7f020049, 0x7f020058, 0x7f020066, 0x7f02008b, 0x7f020093, 0x7f02009b, 0x7f0200f8, 0x7f0200f9, 0x7f0200ff, 0x7f020100, 0x7f020114, 0x7f020119, 0x7f020147 }; public static final int SearchView_android_focusable = 0; public static final int SearchView_android_maxWidth = 1; public static final int SearchView_android_inputType = 2; public static final int SearchView_android_imeOptions = 3; public static final int SearchView_closeIcon = 4; public static final int SearchView_commitIcon = 5; public static final int SearchView_defaultQueryHint = 6; public static final int SearchView_goIcon = 7; public static final int SearchView_iconifiedByDefault = 8; public static final int SearchView_layout = 9; public static final int SearchView_queryBackground = 10; public static final int SearchView_queryHint = 11; public static final int SearchView_searchHintIcon = 12; public static final int SearchView_searchIcon = 13; public static final int SearchView_submitBackground = 14; public static final int SearchView_suggestionRowLayout = 15; public static final int SearchView_voiceIcon = 16; public static final int[] Spinner = { 0x10100b2, 0x1010176, 0x101017b, 0x1010262, 0x7f0200f3 }; public static final int Spinner_android_entries = 0; public static final int Spinner_android_popupBackground = 1; public static final int Spinner_android_prompt = 2; public static final int Spinner_android_dropDownWidth = 3; public static final int Spinner_popupTheme = 4; public static final int[] StateListDrawable = { 0x101011c, 0x1010194, 0x1010195, 0x1010196, 0x101030c, 0x101030d }; public static final int StateListDrawable_android_dither = 0; public static final int StateListDrawable_android_visible = 1; public static final int StateListDrawable_android_variablePadding = 2; public static final int StateListDrawable_android_constantSize = 3; public static final int StateListDrawable_android_enterFadeDuration = 4; public static final int StateListDrawable_android_exitFadeDuration = 5; public static final int[] StateListDrawableItem = { 0x1010199 }; public static final int StateListDrawableItem_android_drawable = 0; public static final int[] SwitchCompat = { 0x1010124, 0x1010125, 0x1010142, 0x7f020107, 0x7f02010e, 0x7f02011a, 0x7f02011b, 0x7f02011d, 0x7f02012b, 0x7f02012c, 0x7f02012d, 0x7f020142, 0x7f020143, 0x7f020144 }; public static final int SwitchCompat_android_textOn = 0; public static final int SwitchCompat_android_textOff = 1; public static final int SwitchCompat_android_thumb = 2; public static final int SwitchCompat_showText = 3; public static final int SwitchCompat_splitTrack = 4; public static final int SwitchCompat_switchMinWidth = 5; public static final int SwitchCompat_switchPadding = 6; public static final int SwitchCompat_switchTextAppearance = 7; public static final int SwitchCompat_thumbTextPadding = 8; public static final int SwitchCompat_thumbTint = 9; public static final int SwitchCompat_thumbTintMode = 10; public static final int SwitchCompat_track = 11; public static final int SwitchCompat_trackTint = 12; public static final int SwitchCompat_trackTintMode = 13; public static final int[] TextAppearance = { 0x1010095, 0x1010096, 0x1010097, 0x1010098, 0x101009a, 0x101009b, 0x1010161, 0x1010162, 0x1010163, 0x1010164, 0x10103ac, 0x7f020080, 0x7f02011e }; public static final int TextAppearance_android_textSize = 0; public static final int TextAppearance_android_typeface = 1; public static final int TextAppearance_android_textStyle = 2; public static final int TextAppearance_android_textColor = 3; public static final int TextAppearance_android_textColorHint = 4; public static final int TextAppearance_android_textColorLink = 5; public static final int TextAppearance_android_shadowColor = 6; public static final int TextAppearance_android_shadowDx = 7; public static final int TextAppearance_android_shadowDy = 8; public static final int TextAppearance_android_shadowRadius = 9; public static final int TextAppearance_android_fontFamily = 10; public static final int TextAppearance_fontFamily = 11; public static final int TextAppearance_textAllCaps = 12; public static final int[] Toolbar = { 0x10100af, 0x1010140, 0x7f02003f, 0x7f02004b, 0x7f02004c, 0x7f02005d, 0x7f02005e, 0x7f02005f, 0x7f020060, 0x7f020061, 0x7f020062, 0x7f0200e1, 0x7f0200e2, 0x7f0200e3, 0x7f0200e6, 0x7f0200e7, 0x7f0200f3, 0x7f020115, 0x7f020116, 0x7f020117, 0x7f020133, 0x7f020134, 0x7f020135, 0x7f020136, 0x7f020137, 0x7f020138, 0x7f020139, 0x7f02013a, 0x7f02013b }; public static final int Toolbar_android_gravity = 0; public static final int Toolbar_android_minHeight = 1; public static final int Toolbar_buttonGravity = 2; public static final int Toolbar_collapseContentDescription = 3; public static final int Toolbar_collapseIcon = 4; public static final int Toolbar_contentInsetEnd = 5; public static final int Toolbar_contentInsetEndWithActions = 6; public static final int Toolbar_contentInsetLeft = 7; public static final int Toolbar_contentInsetRight = 8; public static final int Toolbar_contentInsetStart = 9; public static final int Toolbar_contentInsetStartWithNavigation = 10; public static final int Toolbar_logo = 11; public static final int Toolbar_logoDescription = 12; public static final int Toolbar_maxButtonHeight = 13; public static final int Toolbar_navigationContentDescription = 14; public static final int Toolbar_navigationIcon = 15; public static final int Toolbar_popupTheme = 16; public static final int Toolbar_subtitle = 17; public static final int Toolbar_subtitleTextAppearance = 18; public static final int Toolbar_subtitleTextColor = 19; public static final int Toolbar_title = 20; public static final int Toolbar_titleMargin = 21; public static final int Toolbar_titleMarginBottom = 22; public static final int Toolbar_titleMarginEnd = 23; public static final int Toolbar_titleMarginStart = 24; public static final int Toolbar_titleMarginTop = 25; public static final int Toolbar_titleMargins = 26; public static final int Toolbar_titleTextAppearance = 27; public static final int Toolbar_titleTextColor = 28; public static final int[] View = { 0x1010000, 0x10100da, 0x7f0200ec, 0x7f0200ed, 0x7f020129 }; public static final int View_android_theme = 0; public static final int View_android_focusable = 1; public static final int View_paddingEnd = 2; public static final int View_paddingStart = 3; public static final int View_theme = 4; public static final int[] ViewBackgroundHelper = { 0x10100d4, 0x7f020034, 0x7f020035 }; public static final int ViewBackgroundHelper_android_background = 0; public static final int ViewBackgroundHelper_backgroundTint = 1; public static final int ViewBackgroundHelper_backgroundTintMode = 2; public static final int[] ViewStubCompat = { 0x10100d0, 0x10100f2, 0x10100f3 }; public static final int ViewStubCompat_android_id = 0; public static final int ViewStubCompat_android_layout = 1; public static final int ViewStubCompat_android_inflatedId = 2; } }
[ "angela.liu1399@gmail.com" ]
angela.liu1399@gmail.com
a66b432f6a6c7e2f8a232bc54a43c2bb744c5f11
b0a1fcad9c40398841a02ebf1e7579409bee858f
/oxService/src/main/java/org/gluu/service/BaseCacheService.java
4e100e5fd216815fa32f3b045b6c1ca1e549895e
[ "MIT" ]
permissive
Heikkips/oxCore
8654ead666ada3d04a2513ae9b41cc4f28162dfd
2c18f81ee719560cf9d87af4ba605d4f08bd77d0
refs/heads/master
2020-09-21T16:26:54.478594
2019-11-27T08:07:08
2019-11-27T08:07:08
224,848,210
0
0
MIT
2019-11-29T12:15:17
2019-11-29T12:15:17
null
UTF-8
Java
false
false
3,590
java
/* * oxCore is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. * * Copyright (c) 2014, Gluu */ package org.gluu.service; import java.util.Date; import java.util.function.Supplier; import javax.inject.Inject; import org.gluu.service.cache.CacheInterface; import org.gluu.service.cache.CacheProvider; import org.gluu.service.cache.CacheProviderType; import org.slf4j.Logger; /** * Provides operations with cache * * @author Yuriy Movchan Date: 01.24.2012 * @author Yuriy Zabrovarnyy Date: 02.02.2017 */ public abstract class BaseCacheService implements CacheInterface { private static int DEFAULT_EXPIRATION = 60; @Inject private Logger log; public Object get(String key) { CacheProvider cacheProvider = getCacheProvider(); if (cacheProvider == null) { return null; } return cacheProvider.get(key); } public <T> T getWithPut(String key, Supplier<T> loadFunction, int expirationInSeconds) { if (loadFunction == null) { return (T) get(key); } CacheProvider cacheProvider = getCacheProvider(); if (CacheProviderType.NATIVE_PERSISTENCE == cacheProvider.getProviderType()) { return loadFunction.get(); } final Object value = get(key); if (value != null) { log.trace("Loaded from cache, key: " + key); return (T) value; } else { final T loaded = loadFunction.get(); if (loaded == null) { return null; } try { put(expirationInSeconds, key, loaded); } catch (Exception e) { log.error("Failed to put object into cache, key: " + key, e); // we don't want prevent returning loaded value due to failure with put } return loaded; } } public void put(int expirationInSeconds, String key, Object object) { CacheProvider cacheProvider = getCacheProvider(); if (cacheProvider != null) { cacheProvider.put(expirationInSeconds, key, object); } } public void remove(String key) { CacheProvider cacheProvider = getCacheProvider(); if (cacheProvider == null) { return; } cacheProvider.remove(key); } public void clear() { CacheProvider cacheProvider = getCacheProvider(); if (cacheProvider != null) { cacheProvider.clear(); } } @Override public void cleanup(Date now) { CacheProvider cacheProvider = getCacheProvider(); if (cacheProvider != null) { cacheProvider.cleanup(now); } } public void put(String key, Object object) { put(DEFAULT_EXPIRATION, key, object); } @Deprecated // we keep it only for back-compatibility of scripts code public Object get(String region, String key) { return get(key); } @Deprecated // we keep it only for back-compatibility of scripts code public void put(String expirationInSeconds, String key, Object object) { int expiration = DEFAULT_EXPIRATION; try { expiration = Integer.parseInt(expirationInSeconds); } catch (NumberFormatException ex) { // Use default expiration log.trace("Using default expiration instead of expirationInSeconds: {}", expirationInSeconds); } put(expiration, key, object); } @Deprecated // we keep it only for back-compatibility of scripts code public void remove(String region, String key) { remove(key); } protected abstract CacheProvider getCacheProvider(); }
[ "Yuriy.Movchan@gmail.com" ]
Yuriy.Movchan@gmail.com