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
8c9128b6d7937160ef8411b70819af2a7bffa415
073bb5ee0142c1b15d286e6c762ccccc732e1a31
/src/test/java/day2/HrGetRequest.java
59486546ab7d7177a22b19256a11eb3cf8c01bcf
[]
no_license
IvanaDordevic/B22_RestAssured-Ivana
88a990c534f249c60d4e17a90544774611590f4e
0cb080123b555447f9e4e2148be04fac01861d41
refs/heads/master
2023-07-16T21:13:07.439613
2021-08-31T19:50:56
2021-08-31T19:50:56
401,826,114
0
0
null
null
null
null
UTF-8
Java
false
false
1,557
java
package day2; import io.restassured.RestAssured; import io.restassured.http.ContentType; import io.restassured.response.Response; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import static io.restassured.RestAssured.*; import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Assertions.*; public class HrGetRequest { //BeforeAll is an annotation equals to @BeforeClass in testNg, we use with static method name @BeforeAll public static void init(){ //save baseurl inside this variable so that we dont need to type each http method. baseURI = "http://35.170.70.50:1000/ords/hr"; } @DisplayName("GET request to regions") @Test public void test1(){ Response response = get("/regions"); System.out.println(response.statusCode()); } /* Given accept type is application/json When user sends get request to /regions/2 Then response status code must be 200 and content type equals to application/json and response body contains Americas */ @DisplayName("Regions request") @Test public void test2() { Response response = given().accept(ContentType.JSON).when().get("/regions"); assertEquals(response.statusCode(), 200); assertEquals(response.contentType(), "application/json"); assertEquals(response.body().asString().contains("Americas"), true); } }
[ "ivanadordevic.usa@gmail.com" ]
ivanadordevic.usa@gmail.com
8b7ad0a689133e2867a975f0211a6211c36e7c7a
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/plugins/javaFX/testData/intentions/fieldToProperty/TwoFilesFieldToPropertySecondFile_after.java
b7310043afa44545c07174941ce5d6b0f3a7d03f
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
153
java
import javafx.scene.Node; class DoubleDemo2 { static void foo(DoubleDemo dd) { double d = dd.data.get(); dd.data.set(d + 2); } }
[ "pavel.dolgov@jetbrains.com" ]
pavel.dolgov@jetbrains.com
e696765eedf8a083e415548130b0c99de438cf5a
2dd64b029b5649e979af085032e742aea0920ecf
/open-platform-lmdb-server-common/src/main/java/com/minivision/openplatform/lmdb/server/common/constant/LmdbConstant.java
5ecb7f35ce5ccb635149fd3fa9a833b66e860802
[]
no_license
caixingjava/open-platform-lmdb-server
a0a3e6d607c414b6ad86c43e0ef6e0ac11d9b13b
1bdb708a4346873773930c65b1730038b1079393
refs/heads/master
2020-03-26T21:00:51.035103
2018-08-20T03:20:46
2018-08-20T03:20:46
145,360,789
5
0
null
null
null
null
UTF-8
Java
false
false
227
java
package com.minivision.openplatform.lmdb.server.common.constant; /** * <Description> <br> * * @author caixing<br> * @version 1.0<br> * @taskId <br> * @CreateDate 2018年08月17日 <br> */ public class LmdbConstant { }
[ "18851418545@163.com" ]
18851418545@163.com
c21be606bcdf13947e6e4b65c0f42d14e54fd186
36faaeaa95551ae8e439dfef28365192752bfe8f
/src/main/java/com/zhang/TestLock.java
f2642d7f8f0296a30868c0bb19dad8b02b18711e
[]
no_license
lzhlz945/juc
a7487d6f6b5510c6f08092b0de25361b845bfdaa
9801c347a99a587f035a942da6e18c45aeca973b
refs/heads/master
2023-01-29T19:26:51.034128
2020-12-10T03:00:59
2020-12-10T03:00:59
307,284,616
0
0
null
2020-10-26T07:15:36
2020-10-26T06:50:51
Java
UTF-8
Java
false
false
1,192
java
package com.zhang; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * @author: create by zhl * @version: v1.0 * @description: com.zhang * @date:2020/10/28 */ public class TestLock { public static void main(String[] args) { MyLock myLock = new MyLock(); Thread thread1 = new Thread(myLock,"窗口一"); Thread thread2 = new Thread(myLock,"窗口二"); Thread thread3 = new Thread(myLock,"窗口三"); thread1.start(); thread2.start(); thread3.start(); } } class MyLock implements Runnable{ private static int number=100; private Lock lock=new ReentrantLock(); @Override public void run() { try { lock.lock(); while (true){ if(number>0){ try { Thread.sleep(200); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(Thread.currentThread().getName()+"该窗口的余票为:"+--number); } } } finally { lock.unlock(); } } }
[ "1746678613@qq.com" ]
1746678613@qq.com
bb3a70fd5394347ca91fb8988065fcbaedb77f38
e8298f800635bbf9a271824043b7f056f150f635
/src/com/hch/mine/MainActivity.java
f3d7b69ed138895c38bed08499df5d01788ca1a0
[]
no_license
hechiheng/Mine
47411fd1ef8a9ac30bb4dcd308bed7ab4efd1411
5f10b97ecdd2b70c089152d2d0898a17da54860d
refs/heads/master
2021-07-07T00:26:52.457593
2017-10-03T03:48:55
2017-10-03T03:48:55
105,612,120
0
0
null
null
null
null
UTF-8
Java
false
false
18,607
java
package com.hch.mine; import java.util.ArrayList; import android.app.Activity; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.content.Context; import android.content.DialogInterface; import android.graphics.Typeface; import android.media.AudioManager; import android.media.MediaPlayer; import android.media.SoundPool; import android.os.Bundle; import android.os.Handler; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnLongClickListener; import android.view.Window; import android.widget.Button; import android.widget.ImageView; import android.widget.TableLayout; import android.widget.TableRow; import android.widget.TextView; /** * 扫雷游戏 * * @author hch 20170825 * */ public class MainActivity extends Activity { private final static int mineNum = 10; private boolean isClick = false; private ImageView faceImg; private TableLayout tableLayout; private TextView timeTxt, quantityTxt; private Button[][] buttons = new Button[9][9]; private Mine[][] mines = new Mine[9][9]; private ArrayList<Button> bombs = new ArrayList<Button>(); private int second = 0; private int quantity = mineNum; private MediaPlayer mediaPlayer; private SoundPool soundPool; private int clickSoundID;// 点击音效ID private int bombSoundID;// 爆炸音效ID private int winSoundID;// 胜利音效ID private int defeatSoundID;// 失败音效ID private float volumnCurrent; private float volumnRatio; /** * 定时器,定时更新时间 */ Handler handler = new Handler(); Runnable runnable = new Runnable() { @Override public void run() { if (second < 999) { handler.postDelayed(this, 1000); second++; } else { handler.removeCallbacks(this); } timeTxt.setText(String.format("%03d", second)); } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_main); timeTxt = (TextView) findViewById(R.id.timeTxt); quantityTxt = (TextView) findViewById(R.id.quantityTxt); faceImg = (ImageView) findViewById(R.id.faceImg); tableLayout = (TableLayout) findViewById(R.id.tableLayout); Typeface face = Typeface.createFromAsset(getAssets(), "fonts/digifaw.ttf"); timeTxt.setTypeface(face); quantityTxt.setTypeface(face); faceImg.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { AlertDialog.Builder builder = new Builder(MainActivity.this); builder.setMessage("该游戏操作方式分为点击和长按,单击翻开方格,长按则标记地雷,待将所有地雷都标记出来,你便赢了!"); builder.setTitle("帮助说明"); builder.setNegativeButton("关闭", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); builder.create().show(); } }); initMinePanel(); AudioManager am = (AudioManager) this .getSystemService(Context.AUDIO_SERVICE); float audioMaxVolumn = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC); volumnCurrent = am.getStreamVolume(AudioManager.STREAM_MUSIC); volumnRatio = volumnCurrent / audioMaxVolumn; // initBgMusic(); initClickSound(); } /** * 雷区按钮点击事件 * */ private class MineClickListener implements OnClickListener { @Override public void onClick(View v) { if (!isClick) { handler.postDelayed(runnable, 1000); isClick = true; } Button button = (Button) v; Mine mine = (Mine) button.getTag(); int i = mine.getI(), j = mine.getJ(); boolean sign = mines[i][j].isSign(); if (!sign && mine.getValue() == 9) { handler.removeCallbacks(runnable); faceImg.setImageResource(R.drawable.face_sad); bomb(); playClickSound(bombSoundID); showMessage("游戏失败", "你踩到地雷了!"); } else { playClickSound(clickSoundID); showMineField(mine); } checkResult(); } } private class MineLongClickListener implements OnLongClickListener { @Override public boolean onLongClick(View arg0) { if (!isClick) { handler.postDelayed(runnable, 1000); isClick = true; } Button button = (Button) arg0; Mine mine = (Mine) button.getTag(); int i = mine.getI(), j = mine.getJ(); boolean show = mines[i][j].isShow(); boolean sign = mines[i][j].isSign(); if (!show) { if (!sign) { mines[i][j].setSign(true); quantity--; setMineFieldBackground4Sign(buttons[i][j]); } else { mines[i][j].setSign(false); quantity++; setMineFieldBackground(buttons[i][j]); } quantityTxt.setText(String.format("%03d", quantity)); checkResult(); } return true; } } private void checkResult() { int chooseNum = 0; int rightNum = 0; for (int i = 0; i < 9; i++) { for (int j = 0; j < 9; j++) { if (mines[i][j].isSign()) { chooseNum++; if (mines[i][j].getValue() == 9) { rightNum++; } } } } if (chooseNum == mineNum && rightNum == mineNum) { handler.removeCallbacks(runnable); playClickSound(winSoundID); showMessage("游戏胜利", "恭喜你赢了!一共用时 " + second + "秒"); } else if (chooseNum >= mineNum) { handler.removeCallbacks(runnable); faceImg.setImageResource(R.drawable.face_sad); bomb(); playClickSound(defeatSoundID); showMessage("游戏失败", "你没有挖出全部地雷!"); } } /** * 爆炸效果 */ private void bomb() { for (Button button : bombs) { setMineFieldBackground4Bomb(button); } } /** * 初始化雷区界面 */ private void initMinePanel() { isClick = false; String mineIdxs = initRandomMine(); for (int i = 0; i < 9; i++) { TableRow tableRow = new TableRow(this); tableRow.setLayoutParams(new TableLayout.LayoutParams( TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.MATCH_PARENT, 1)); TableRow.LayoutParams layoutParams = new TableRow.LayoutParams( TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.MATCH_PARENT, 1); layoutParams.setMargins(0, 0, 0, 0); for (int j = 0; j < 9; j++) { buttons[i][j] = new Button(this); mines[i][j] = new Mine(i, j); // buttons[i][j].setText(i + "," + j); setMineFieldBackground(buttons[i][j]); buttons[i][j].setLayoutParams(layoutParams); buttons[i][j].setOnClickListener(new MineClickListener()); buttons[i][j] .setOnLongClickListener(new MineLongClickListener()); String idx = i + "" + j; if (mineIdxs.contains(idx)) { mines[i][j].setValue(9); bombs.add(buttons[i][j]); // buttons[i][j].setText("9"); } else { mines[i][j].setValue(0); // buttons[i][j].setText("0"); } buttons[i][j].setTag(mines[i][j]); tableRow.addView(buttons[i][j]); } tableLayout.addView(tableRow); } initMineNumber(); } /** * 初始化地雷的随机坐标 * * @return */ private String initRandomMine() { StringBuilder sb = new StringBuilder(""); int x, y; for (int i = 0; i < mineNum; i++) { x = (int) (Math.random() * 8); y = (int) (Math.random() * 8); while (true) { if (!sb.toString().contains(x + "" + y)) { break; } else { x = (int) (Math.random() * 8) + 1; y = (int) (Math.random() * 8) + 1; } } sb.append(x + "" + y + ","); } return sb.toString(); } /** * 初始化地雷旁边的数字 */ private void initMineNumber() { for (int i = 0; i < 9; i++) { for (int j = 0; j < 9; j++) { Mine mine = mines[i][j]; if (mine.getValue() == 9) { // 左上角 if (i - 1 >= 0 && j - 1 >= 0 && !((int) mines[i - 1][j - 1].getValue() == 9)) { mines[i - 1][j - 1].setValue((int) mines[i - 1][j - 1] .getValue() + 1); // buttons[i - 1][j - 1].setText(String // .valueOf(mines[i - 1][j - 1].getValue())); } // 顶部 if (i - 1 >= 0 && !((int) mines[i - 1][j].getValue() == 9)) { mines[i - 1][j].setValue((int) mines[i - 1][j] .getValue() + 1); // buttons[i - 1][j].setText(String // .valueOf(mines[i - 1][j].getValue())); } // 右上角 if (i - 1 >= 0 && j + 1 < 9 && !((int) mines[i - 1][j + 1].getValue() == 9)) { mines[i - 1][j + 1].setValue((int) mines[i - 1][j + 1] .getValue() + 1); // buttons[i - 1][j + 1].setText(String // .valueOf(mines[i - 1][j + 1].getValue())); } // 左部 if (j - 1 >= 0 && !((int) mines[i][j - 1].getValue() == 9)) { mines[i][j - 1].setValue((int) mines[i][j - 1] .getValue() + 1); // buttons[i][j - 1].setText(String // .valueOf(mines[i][j - 1].getValue())); } // 右部 if (j + 1 < 9 && !((int) mines[i][j + 1].getValue() == 9)) { mines[i][j + 1].setValue((int) mines[i][j + 1] .getValue() + 1); // buttons[i][j + 1].setText(String // .valueOf(mines[i][j + 1].getValue())); } // 左下角 if (i + 1 < 9 && j - 1 >= 0 && !((int) mines[i + 1][j - 1].getValue() == 9)) { mines[i + 1][j - 1].setValue((int) mines[i + 1][j - 1] .getValue() + 1); // buttons[i + 1][j - 1].setText(String // .valueOf(mines[i + 1][j - 1].getValue())); } // 顶部 if (i + 1 < 9 && !((int) mines[i + 1][j].getValue() == 9)) { mines[i + 1][j].setValue((int) mines[i + 1][j] .getValue() + 1); // buttons[i + 1][j].setText(String // .valueOf(mines[i + 1][j].getValue())); } // 右下角 if (i + 1 < 9 && j + 1 < 9 && !((int) mines[i + 1][j + 1].getValue() == 9)) { mines[i + 1][j + 1].setValue((int) mines[i + 1][j + 1] .getValue() + 1); // buttons[i + 1][j + 1].setText(String // .valueOf(mines[i + 1][j + 1].getValue())); } } } } } /** * 显示雷区的方格 */ private void showMineField(Mine mine) { int i = mine.getI(), j = mine.getJ(), value = mine.getValue(); boolean show = mines[i][j].isShow(); boolean sign = mines[i][j].isSign(); if (!show && !sign) { mines[i][j].setShow(true); setMineFieldBackground4Show(buttons[i][j]); buttons[i][j].setText(value == 0 ? "" : String.valueOf(value)); } if (!sign && value == 0) { // 左上角 if (i - 1 >= 0 && j - 1 >= 0 && !((int) mines[i - 1][j - 1].getValue() == 9) && !mines[i - 1][j - 1].isShow()) { mines[i - 1][j - 1].setShow(true); setMineFieldBackground4Show(buttons[i - 1][j - 1]); buttons[i - 1][j - 1] .setText(mines[i - 1][j - 1].getValue() == 0 ? "" : String.valueOf(mines[i - 1][j - 1].getValue())); showMineField(mines[i - 1][j - 1]); } // 顶部 if (i - 1 >= 0 && !((int) mines[i - 1][j].getValue() == 9) && !mines[i - 1][j].isShow()) { mines[i - 1][j].setShow(true); setMineFieldBackground4Show(buttons[i - 1][j]); buttons[i - 1][j].setText(mines[i - 1][j].getValue() == 0 ? "" : String.valueOf(mines[i - 1][j].getValue())); showMineField(mines[i - 1][j]); } // 右上角 if (i - 1 >= 0 && j + 1 < 9 && !((int) mines[i - 1][j + 1].getValue() == 9) && !mines[i - 1][j + 1].isShow()) { mines[i - 1][j + 1].setShow(true); setMineFieldBackground4Show(buttons[i - 1][j + 1]); buttons[i - 1][j + 1] .setText(mines[i - 1][j + 1].getValue() == 0 ? "" : String.valueOf(mines[i - 1][j + 1].getValue())); showMineField(mines[i - 1][j + 1]); } // 左部 if (j - 1 >= 0 && !((int) mines[i][j - 1].getValue() == 9) && !mines[i][j - 1].isShow()) { mines[i][j - 1].setShow(true); setMineFieldBackground4Show(buttons[i][j - 1]); buttons[i][j - 1].setText(mines[i][j - 1].getValue() == 0 ? "" : String.valueOf(mines[i][j - 1].getValue())); showMineField(mines[i][j - 1]); } // 右部 if (j + 1 < 9 && !((int) mines[i][j + 1].getValue() == 9) && !mines[i][j + 1].isShow()) { mines[i][j + 1].setShow(true); setMineFieldBackground4Show(buttons[i][j + 1]); buttons[i][j + 1].setText(mines[i][j + 1].getValue() == 0 ? "" : String.valueOf(mines[i][j + 1].getValue())); showMineField(mines[i][j + 1]); } // 左下角 if (i + 1 < 9 && j - 1 >= 0 && !((int) mines[i + 1][j - 1].getValue() == 9) && !mines[i + 1][j - 1].isShow()) { mines[i + 1][j - 1].setShow(true); setMineFieldBackground4Show(buttons[i + 1][j - 1]); buttons[i + 1][j - 1] .setText(mines[i + 1][j - 1].getValue() == 0 ? "" : String.valueOf(mines[i + 1][j - 1].getValue())); showMineField(mines[i + 1][j - 1]); } // 顶部 if (i + 1 < 9 && !((int) mines[i + 1][j].getValue() == 9) && !mines[i + 1][j].isShow()) { mines[i + 1][j].setShow(true); setMineFieldBackground4Show(buttons[i + 1][j]); buttons[i + 1][j].setText(mines[i + 1][j].getValue() == 0 ? "" : String.valueOf(mines[i + 1][j].getValue())); showMineField(mines[i + 1][j]); } // 右下角 if (i + 1 < 9 && j + 1 < 9 && !((int) mines[i + 1][j + 1].getValue() == 9) && !mines[i + 1][j + 1].isShow()) { mines[i + 1][j + 1].setShow(true); setMineFieldBackground4Show(buttons[i + 1][j + 1]); buttons[i + 1][j + 1] .setText(mines[i + 1][j + 1].getValue() == 0 ? "" : String.valueOf(mines[i + 1][j + 1].getValue())); showMineField(mines[i + 1][j + 1]); } } } /** * 设置地雷背景 * * @param button */ private void setMineFieldBackground(Button button) { // GradientDrawable drawable = new GradientDrawable(); // drawable.setShape(GradientDrawable.RECTANGLE); // 画框 // drawable.setStroke(2, Color.BLACK); // 边框粗细及颜色 // drawable.setColor(0xff8470FF); // 边框内部颜色 // button.setBackground(drawable); button.setBackgroundResource(R.drawable.grid1); } /** * 设置选择地雷背景 * * @param button */ private void setMineFieldBackground4Show(Button button) { // GradientDrawable drawable = (GradientDrawable) // button.getBackground(); // drawable.setShape(GradientDrawable.RECTANGLE); // 画框 // drawable.setStroke(2, Color.BLACK); // 边框粗细及颜色 // drawable.setColor(0xffCCCCCC); // 边框内部颜色 // button.setBackground(drawable); button.setBackgroundResource(R.drawable.grid2); } /** * 设置标记地雷背景 * * @param button */ private void setMineFieldBackground4Sign(Button button) { // GradientDrawable drawable = (GradientDrawable) // button.getBackground(); // drawable.setShape(GradientDrawable.RECTANGLE); // 画框 // drawable.setStroke(2, Color.BLACK); // 边框粗细及颜色 // drawable.setColor(0xffB0E2FF); // 边框内部颜色 // button.setBackground(drawable); button.setBackgroundResource(R.drawable.grid3); } /** * 设置地雷爆炸背景 * * @param button */ private void setMineFieldBackground4Bomb(Button button) { // GradientDrawable drawable = (GradientDrawable) // button.getBackground(); // drawable.setShape(GradientDrawable.RECTANGLE); // 画框 // drawable.setStroke(2, Color.BLACK); // 边框粗细及颜色 // drawable.setColor(0xffB0E2FF); // 边框内部颜色 // button.setBackground(drawable); button.setBackgroundResource(R.drawable.grid4); } /** * 显示信息框 * * @param title * @param message */ private void showMessage(String title, String message) { AlertDialog.Builder builder = new Builder(MainActivity.this); builder.setMessage(message); builder.setTitle(title); builder.setPositiveButton("重新开始", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); resetTime(); tableLayout.removeAllViews(); initMinePanel(); } }); builder.setNegativeButton("退出", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); System.exit(0); } }); builder.create().show(); } /** * 返回按键 */ @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { AlertDialog.Builder builder = new Builder(MainActivity.this); builder.setMessage("是否退出游戏?"); builder.setTitle("提示"); builder.setPositiveButton("重新开始", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); handler.removeCallbacks(runnable); resetTime(); tableLayout.removeAllViews(); initMinePanel(); } }); builder.setNegativeButton("退出", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); System.exit(0); } }); builder.create().show(); } return true; } /** * 重置定时器 */ private void resetTime() { second = 0; timeTxt.setText("000"); quantityTxt.setText("000"); quantity = mineNum; faceImg.setImageResource(R.drawable.face_smile); } /** * 初始化背景音乐 */ private void initBgMusic() { mediaPlayer = MediaPlayer.create(this, R.raw.bg); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaPlayer.setVolume(volumnRatio, volumnRatio); mediaPlayer.setLooping(true); mediaPlayer.start(); } /** * 初始化点击音效 */ private void initClickSound() { soundPool = new SoundPool(10, AudioManager.STREAM_MUSIC, 5); clickSoundID = soundPool.load(this, R.raw.click, 1); bombSoundID = soundPool.load(this, R.raw.bomb, 2); winSoundID = soundPool.load(this, R.raw.win, 2); defeatSoundID = soundPool.load(this, R.raw.defeat, 2); } /** * 播放点击音效 */ private void playClickSound(int soundID) { soundPool.play(soundID, volumnRatio, // 左耳道音量【0~1】 volumnRatio, // 右耳道音量【0~1】 0, // 播放优先级【0表示最低优先级】 1, // 循环模式【0表示循环一次,-1表示一直循环,其他表示数字+1表示当前数字对应的循环次数】 1 // 播放速度【1是正常,范围从0~2】 ); } @Override protected void onDestroy() { if (mediaPlayer != null && mediaPlayer.isPlaying()) { mediaPlayer.stop(); mediaPlayer.release(); mediaPlayer = null; } super.onDestroy(); } }
[ "hechiheng@qq.com" ]
hechiheng@qq.com
879d10b63c1aad973218628c6dc25282775c8175
4dca9a246c16d6c75b36da660dc6b23152e6651b
/ycf/src/main/java/spring/dto/result/PermissionResponse.java
f93811b50873db355dd01aa84c39cdade0fea462
[]
no_license
zhoubaojiang/test
5951100fce678226f33e2fabd66aa06e08b7ae02
c206d96c50d890768fe070a486121ca4a4cba976
refs/heads/master
2022-08-21T06:37:12.273564
2019-12-23T11:10:44
2019-12-23T11:10:44
227,252,836
1
0
null
2022-06-29T17:50:29
2019-12-11T01:52:14
Java
UTF-8
Java
false
false
1,238
java
package spring.dto.result; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; /** * * 功能描述: 权限信息 * @author: xiongkun * @date: 2018年8月29日 上午11:56:40 */ @Data public class PermissionResponse { @ApiModelProperty(value="权限表主键") private Long permissionId; @ApiModelProperty(value="权限表父标签") private Long parentId; @ApiModelProperty(value="权限名称") private String permissionName; @ApiModelProperty(value="权限描述") private String permissionDesc; @ApiModelProperty(value="权限key") private String permissionKey; @ApiModelProperty(value="显示顺序") private Integer showOrderNum; @ApiModelProperty(value="操作方式") private Integer operatorMode; @ApiModelProperty(value="权限链接") private String permissionUrl; @ApiModelProperty(value="权限类型") private String permissionType; @ApiModelProperty(value="权限链接图片") private String permissionImg; @ApiModelProperty(value="状态") private String status; @ApiModelProperty(value="创建时间") private Date createDate; @ApiModelProperty(value="创建人") private String createBy; }
[ "838888921@qq.com" ]
838888921@qq.com
e3731e5350b633ab7b401cc0510741cac1e09c50
fe1616575ed0047e71bd6a49b492a87fa65bf886
/src/baseballtest/Sports.java
67f166d50d825efaf39a93b86f13b7c3be4e422e
[]
no_license
ArdaDolanay0/Sports
d3a6ddf1ee76c57d1c2d0b33f6b593549b22622d
4810b5b68275319edd505adb79f350568890c774
refs/heads/master
2021-06-07T02:24:51.826470
2016-11-09T19:02:36
2016-11-09T19:02:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
318
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 baseballtest; /** * * @author ardol7945 */ public class Sports { public Sports(){ } }
[ "ardol7945@C0Y7M02.Student.UGDSB.ED" ]
ardol7945@C0Y7M02.Student.UGDSB.ED
13530c119131cc3ebb36cc117b982e3439d067e7
e7e2377031dfee7ad6a52c5c821efe759edfd10a
/patterndesign/src/main/java/com/imooc/resChain/client.java
16278a1250be2408b44d690f49b3bc514176b657
[]
no_license
johnYin2015/AndroidBasics
a29ef978e41f171c8a5c0a0225c6c7903cfcd158
3371acd869a444041850a442705bd313534dbcee
refs/heads/master
2020-06-16T23:04:19.030874
2019-07-08T06:26:19
2019-07-08T06:26:19
195,727,883
1
0
null
null
null
null
UTF-8
Java
false
false
444
java
package com.imooc.resChain; public class client { public static void main(String[] strings) { Handler projectManager = new ProjectManager(3); Handler departmentManager = new DepartmentManager(5); Handler generalManager = new GeneralManager(15); //创建职责链 projectManager.setNextHandler(departmentManager); departmentManager.setNextHandler(generalManager); //发起一次请求 projectManager.handleRequest(14); } }
[ "wit.zhaoguo@gmail.com" ]
wit.zhaoguo@gmail.com
2414b00a9a904c9a598dcbbda5bf7c5218cdf7ae
fc3fd241469aa8801b1f73fcff121282b7f9323b
/cie split/marks3.java
a2bfd38f000e72b92c311b700277fd59c9c2e54e
[]
no_license
Gpraveen12345/mini-projects
da90570d59f11da6a46fac9bb90478f6cd7d3d7c
8395878e8d2102a41dd71ef83438cd6d716c1669
refs/heads/master
2020-05-01T05:27:15.515736
2019-04-25T06:30:59
2019-04-25T06:30:59
177,301,856
0
0
null
null
null
null
UTF-8
Java
false
false
13,192
java
package com.example.lokesh.ciesplit; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.ValueEventListener; //import com.example.lokesh.CieSplit.R; public class marks3 extends AppCompatActivity { private Button submit; private EditText q1; private EditText q2; private EditText q3; private EditText q4; private EditText q5; private EditText q6; private EditText q7; private EditText q8; private EditText q9a; private EditText q9b; private EditText q10a; private EditText q10b; String regno, dm, cie, str; int sum, a, n1, n2, n3, n4, n5, n6, n7, n8, n9a, n9b, n10a, n10b; DatabaseReference databaseReference; FirebaseDatabase firebaseDatabase; @Override protected void onCreate(Bundle savedInstanceState) { regno = getIntent().getStringExtra("regno"); dm = getIntent().getStringExtra("dm"); super.onCreate(savedInstanceState); setContentView(R.layout.activity_marks3); q1 = (EditText) findViewById(R.id.q1); q2 = (EditText) findViewById(R.id.q2); q3 = (EditText) findViewById(R.id.q3); q4 = (EditText) findViewById(R.id.q4); q5 = (EditText) findViewById(R.id.q5); q6 = (EditText) findViewById(R.id.q6); q7 = (EditText) findViewById(R.id.q7); q8 = (EditText) findViewById(R.id.q8); q9a = (EditText) findViewById(R.id.q9a); q9b = (EditText) findViewById(R.id.q9b); q10a = (EditText) findViewById(R.id.q10a); q10b = (EditText) findViewById(R.id.q10b); firebaseDatabase = FirebaseDatabase.getInstance(); databaseReference = firebaseDatabase.getReference(); // Toast.makeText(getApplicationContext(),"registered sucessfully",Toast.LENGTH_SHORT).show(); submit = (Button) findViewById(R.id.submit); submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { try { //databaseReference.child("login").child("uname").setValue(user.getText().toString()); //Toast.makeText(getApplicationContext(),regno,Toast.LENGTH_SHORT).show(); n1 = Integer.parseInt(q1.getText().toString()); n2 = Integer.parseInt(q2.getText().toString()); n3 = Integer.parseInt(q3.getText().toString()); n4 = Integer.parseInt(q4.getText().toString()); n5 = Integer.parseInt(q5.getText().toString()); n6 = Integer.parseInt(q6.getText().toString()); n7 = Integer.parseInt(q7.getText().toString()); n8 = Integer.parseInt(q8.getText().toString()); n9a = Integer.parseInt(q9a.getText().toString()); n9b = Integer.parseInt(q9b.getText().toString()); n10a = Integer.parseInt(q10a.getText().toString()); n10b = Integer.parseInt(q10b.getText().toString()); sum = n1 + n2 + n3 + n4 + n5 + n6 + n7 + n8 + n9a + n9b + n10a + n10b; str = String.valueOf(sum); //Toast.makeText(getApplicationContext(), str, Toast.LENGTH_SHORT).show(); databaseReference.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { String st = dataSnapshot.child("cie3").child(regno).child(dm).child("tot").getValue().toString(); if(n1<3) { if(n2<3) { if(n3<3) { if(n4<3) { if(n5<3) { if(n6<3) { if(n7<6) { if(n8<6) { if(n9a<15) { if(n9b<15) { if(n10a<15) { if(n10b<15) { if (st.equals(str)) { if (n1 == 0) databaseReference.child("cie3").child(regno).child(dm).child("q1").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("q1").setValue(n1); if (n2 == 0) databaseReference.child("cie3").child(regno).child(dm).child("q2").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("q2").setValue(n2); if (n3 == 0) databaseReference.child("cie3").child(regno).child(dm).child("q3").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("q3").setValue(n3); if (n4 == 0) databaseReference.child("cie3").child(regno).child(dm).child("q4").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("q4").setValue(n4); if (n5 == 0) databaseReference.child("cie3").child(regno).child(dm).child("q5").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("q5").setValue(n5); if (n6 == 0) databaseReference.child("cie3").child(regno).child(dm).child("q6").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("q6").setValue(n6); if (n7 == 0) databaseReference.child("cie3").child(regno).child(dm).child("q7").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("q7").setValue(n7); if (n8 == 0) databaseReference.child("cie3").child(regno).child(dm).child("q8").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("q8").setValue(n8); if (n9a == 0) databaseReference.child("cie3").child(regno).child(dm).child("q9a").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("q9a").setValue(n9a); if (n9b == 0) databaseReference.child("cie3").child(regno).child(dm).child("q9b").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("q9b").setValue(n9b); if (n10a == 0) databaseReference.child("cie3").child(regno).child(dm).child("qa10").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("qa10").setValue(n10a); if (n10b == 0) databaseReference.child("cie3").child(regno).child(dm).child("qb10").setValue("0"); else databaseReference.child("cie3").child(regno).child(dm).child("qb10").setValue(n10b); Intent intent = new Intent(getApplicationContext(), cie3.class); intent.putExtra("regno",regno); startActivity(intent); finish(); Toast.makeText(getApplicationContext(),"Submitted", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(),"Enter the marks correctly your cie mark is"+st, Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 10b correctly", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 10a correctly", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 9b correctly", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 9a correctly", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 8 correctly ", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 7 correctly", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 6 correctly", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 5 correctly", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 4 correctly", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 3 correctly", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 2 correctly ", Toast.LENGTH_SHORT).show(); } else Toast.makeText(getApplicationContext(), "Enter 1 correctly", Toast.LENGTH_SHORT).show(); } @Override public void onCancelled(DatabaseError databaseError) { } }); } catch (Exception e) { Toast.makeText(getApplicationContext(), "All fields must be filled", Toast.LENGTH_SHORT).show(); } } }); } }
[ "gpraveeninfotch@gmail.com" ]
gpraveeninfotch@gmail.com
05abbd86a6dca8970e26d034663c071ba5d314f9
1aead92f55af00e5d01c579e99dcaacf1c1b2c04
/.svn/pristine/fd/fdf4529d53cf607c758329fe84f7722aee642d7f.svn-base
87ce64ba50d7da3a07550f8995c99dabd8c47333
[]
no_license
jcroot/HX_Mpos
f711d4c75ecfae23c3d82cc162e0e2c1187ccc97
0033bbe6f9386ba3e246eb9cdaf4c6e908683f43
refs/heads/master
2020-04-11T23:36:30.152290
2016-05-25T10:19:39
2016-05-25T10:19:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,004
package com.lk.td.pay.beans; import java.io.Serializable; import java.util.List; import android.os.Parcel; import android.os.Parcelable; /** * 保存程序异常退出时用户状态 * * @author Ding * */ public class SaveUserState implements Serializable { public SaveUserState() { } // private SaveUserState(Parcel in) { // this.amtT0 = in.readString(); // this.amtT1 = in.readString(); // this.amtT1y = in.readString(); // this.bindStatus = in.readInt(); // // this.cardInfo // this.cardNum = in.readInt(); // int temp = in.readInt(); // if (temp == 0) { // login = true; // } else { // login = false; // } // // boolean[] temp = new boolean[] {}; // // in.readBooleanArray(temp); // // this.login = temp[0]; // // } // public static final Parcelable.Creator<SaveUserState> CREATOR = new Parcelable.Creator<SaveUserState>() { // public SaveUserState createFromParcel(Parcel in) { // return new SaveUserState(in); // } // // public SaveUserState[] newArray(int size) { // return new SaveUserState[size]; // } // }; /** * */ private static final long serialVersionUID = -2017774521443640789L; private boolean login; private String uAccount; private String uId; private String uName; private String sign; /** * 认证状态(0未认证,1审核中,2审核通过,3审核不通过) */ private int uStatus; /** * 银行卡数量 */ private int cardNum; /** * 已绑定数量 */ private int termNum; /** * pos绑定状态 0-未绑定 1-已绑定 */ private int bindStatus; /** * 即时到账余额 */ private String amtT0; /** * 未到账余额 */ private String amtT1; /** * 隔天到账余额 */ private String amtT1y; /** * 账户总余额 */ private String totalAmt; public boolean isLogin() { return login; } public void setLogin(boolean login) { this.login = login; } public String getuAccount() { return uAccount; } public void setuAccount(String uAccount) { this.uAccount = uAccount; } public String getuId() { return uId; } public void setuId(String uId) { this.uId = uId; } public String getuName() { return uName; } public void setuName(String uName) { this.uName = uName; } public String getSign() { return sign; } public void setSign(String sign) { this.sign = sign; } public int getuStatus() { return uStatus; } public void setuStatus(int uStatus) { this.uStatus = uStatus; } public int getCardNum() { return cardNum; } public void setCardNum(int cardNum) { this.cardNum = cardNum; } public int getTermNum() { return termNum; } public void setTermNum(int termNum) { this.termNum = termNum; } public int getBindStatus() { return bindStatus; } public void setBindStatus(int bindStatus) { this.bindStatus = bindStatus; } public String getAmtT0() { return amtT0; } public void setAmtT0(String amtT0) { this.amtT0 = amtT0; } public String getAmtT1() { return amtT1; } public void setAmtT1(String amtT1) { this.amtT1 = amtT1; } public String getAmtT1y() { return amtT1y; } public void setAmtT1y(String amtT1y) { this.amtT1y = amtT1y; } public String getTotalAmt() { return totalAmt; } public void setTotalAmt(String totalAmt) { this.totalAmt = totalAmt; } // @Override // public void writeToParcel(Parcel dest, int flags) { // dest.writeString(totalAmt); // dest.writeString(amtT0); // dest.writeString(amtT1); // dest.writeString(amtT1y); // dest.writeString(sign); // dest.writeString(uAccount); // dest.writeString(uId); // dest.writeString(uName); // dest.writeInt(bindStatus); // dest.writeInt(cardNum); // dest.writeInt(termNum); // dest.writeInt(uStatus); // // dest.writeInt(uStatus) // if (login) // dest.writeInt(0); // else { // dest.writeInt(1); // } // dest.writeBooleanArray(new boolean[] { login }); // // } // // @Override // public int describeContents() { // // TODO 自动生成的方法存根 // return 0; // } }
[ "1037704496@qq.com" ]
1037704496@qq.com
b982c568f6ded5eb57e790c1ba56c6e390f5c8db
7b6f646bbab7bf9767cf81d72415d0ca184949ec
/src/main/java/com/san/service/BookService.java
02a4bff7f8bc4db8d1d5ae2d81ac014af6347b71
[]
no_license
anilagrawal038/spring-jpa-multiple-datasources
01c59b229280a41f7666ca328189ceaf19a77f3b
5ed7da82b19064a18153504418c4087183093761
refs/heads/master
2020-03-10T00:53:04.004724
2018-04-11T13:00:09
2018-04-11T13:00:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
530
java
package com.san.service; import java.util.Random; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.san.domain.Book; import com.san.repo.BookRepository; @Component public class BookService { @Autowired private BookRepository productRepository; public void insertThousandsBooks() { Random random = new Random(); for (int i = 0; i < 1000; i++) { productRepository.save(new Book("book" + i, "author" + i, 2000 + random.nextInt(15))); } } }
[ "Anil Agrawal" ]
Anil Agrawal
38b4323e2f7fed041f5635ab23dfa830bcab0517
34c4e398ed8ba503ff3273b68d5b97a43000c129
/core/src/main/java/org/geduino/ros/core/messages/model/Duration.java
29b56f69767814ba8e46b80a9921ec6343694d0c
[]
no_license
geduino-foundation/geduino-ros-java
fbc652f62e0fd73b11c9edbdfb2be38888dae508
229c2e0bf958eddfbcf9e050eea146be01741813
refs/heads/master
2021-01-17T11:39:26.462247
2016-10-02T16:51:47
2016-10-02T16:51:47
29,131,470
0
0
null
null
null
null
UTF-8
Java
false
false
810
java
package org.geduino.ros.core.messages.model; public class Duration extends RosTime { private static final long serialVersionUID = 1L; public static final Duration ZERO = new Duration(); public Duration() { super(0, 0); } public Duration(long seconds, long nanos) { super(seconds, nanos); } public Duration(long millis) { super(millis); } public Duration(Duration duration) { super(duration); } public void sleep() throws InterruptedException { // Sleep Thread.sleep(getMillis(), (int) getNanosForMillis()); } public Duration add(Duration duration) { // Get duration Duration sum = new Duration(add(duration)); return sum; } public Duration subtract(Duration duration) { // Get duration Duration sub = new Duration(subtract(duration)); return sub; } }
[ "a.francescon@geniusbytes.com" ]
a.francescon@geniusbytes.com
c240c2f8b7a0cb30cc670d08b02ca92af45d781e
8f0adbc43af8edf1492f86a5a92c859511a426bf
/app/src/main/java/com/example/bitm/tourmate/DataParser.java
d391c0c01cdff30ae2a5702a730d5cd2d2947f67
[]
no_license
abrarfahimalam/Tourmate
78b79f2fea7c5caf2e9de72c2009e49ccc50268e
b23a37e068066a04aafbd4125874ca9b62691645
refs/heads/master
2021-08-06T17:08:26.146540
2017-11-06T15:40:46
2017-11-06T15:40:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,606
java
package com.example.bitm.tourmate; import android.util.Log; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.HashMap; import java.util.List; /** * Created by NirZhar on 9/27/2017. */ public class DataParser { private HashMap<String, String> getPlace(JSONObject googlePlaceJson) { HashMap<String, String> googlePlaceMap = new HashMap<>(); String placeName = "--NA--"; String vicinity= "--NA--"; String latitude= ""; String longitude=""; String reference=""; Log.d("DataParser","jsonobject ="+googlePlaceJson.toString()); try { if (!googlePlaceJson.isNull("name")) { placeName = googlePlaceJson.getString("name"); } if (!googlePlaceJson.isNull("vicinity")) { vicinity = googlePlaceJson.getString("vicinity"); } latitude = googlePlaceJson.getJSONObject("geometry").getJSONObject("location").getString("lat"); longitude = googlePlaceJson.getJSONObject("geometry").getJSONObject("location").getString("lng"); reference = googlePlaceJson.getString("reference"); googlePlaceMap.put("place_name", placeName); googlePlaceMap.put("vicinity", vicinity); googlePlaceMap.put("lat", latitude); googlePlaceMap.put("lng", longitude); googlePlaceMap.put("reference", reference); } catch (JSONException e) { e.printStackTrace(); } return googlePlaceMap; } public List<HashMap<String, String>> parse(String jsonData) { JSONArray jsonArray = null; JSONObject jsonObject; Log.d("json data", jsonData); try { jsonObject = new JSONObject(jsonData); jsonArray = jsonObject.getJSONArray("results"); } catch (JSONException e) { e.printStackTrace(); } return getPlaces(jsonArray); } private List<HashMap<String, String>>getPlaces(JSONArray jsonArray) { int count = jsonArray.length(); List<HashMap<String, String>> placelist = new ArrayList<>(); HashMap<String, String> placeMap = null; for(int i = 0; i<count;i++) { try { placeMap = getPlace((JSONObject) jsonArray.get(i)); placelist.add(placeMap); } catch (JSONException e) { e.printStackTrace(); } } return placelist; } }
[ "33423523+FahimNirzhar@users.noreply.github.com" ]
33423523+FahimNirzhar@users.noreply.github.com
9d02c9ad56c625c8a0c475819b25b50e7a6c9d41
a321ecdde177ab5bc93427a2c6eb41fc865913be
/src/com/tp/concurrency/lock/Part08_LockConditionClassExample2.java
06c438fa567e9948bde0237a83eb8c51e3e7d617
[]
no_license
aman-saurabh/java-multithreading-and-concurrency
b739655019ef48d63c3c4183b2dc5f24d39bd885
c4c1c2fe05e8660559bd1d9a7f1421e3314a57db
refs/heads/main
2023-04-28T11:34:34.404062
2021-05-16T07:33:31
2021-05-16T07:33:31
356,961,218
0
0
null
null
null
null
UTF-8
Java
false
false
5,574
java
package com.tp.concurrency.lock; /* * This is one of the most appropriate solution to the problem discussed in Part4 and part6. * Solved the same problem of part4 with the help of 'Condition' class. * It should be executed in the following sequence : * First one deposit() method gets executed, followed by checkBalance(),then one withdrawl(), again followed by checkBalance(), * then second deposit() method gets executed, followed by checkBalance(),then second withdrawl(), finally checkBalance() in the last. */ import java.text.MessageFormat; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock; import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock; class Account3 { private int balance = 0; private int writeCounter = 0; private boolean readRequired = false; static ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); WriteLock writeLock = lock.writeLock(); ReadLock readLock = lock.readLock(); // Below Conditions are to be used with checkBalance method hence we should use readLock. // But readLock don't have "newCondition" method.So used writeLock here as well as in checkBalance() method to manage conditions. public Condition firstDeposit = writeLock.newCondition(); public Condition secondDeposit = writeLock.newCondition(); public Condition firstWithdrawl = writeLock.newCondition(); public Condition secondWithdrawl = writeLock.newCondition(); public Condition balanceCheck = writeLock.newCondition(); public Condition depositOrWithdraw = writeLock.newCondition(); // Write method - hence synchronized public void deposit(int amount) { try { writeLock.lockInterruptibly(); if(readRequired == true) { balanceCheck.await(); } if(writeCounter == 1) { firstWithdrawl.await(); } Thread.sleep(2000); balance += amount; System.out.printf("Amount %d deposited successfully.Current balance : %d\n", amount, balance); if(writeCounter == 0) { firstDeposit.signalAll(); } else if(writeCounter == 2){ secondDeposit.signalAll(); } depositOrWithdraw.signalAll(); readRequired = true; writeCounter++; } catch (InterruptedException e) { System.out.println("Request timeout. Please try again to deposit money."); } finally { if (writeLock.isHeldByCurrentThread()) writeLock.unlock(); } } // Write method - hence synchronized public void withdraw(int amount) { try { writeLock.lockInterruptibly(); if(readRequired == true) { balanceCheck.await(); } if(writeCounter == 0) { firstDeposit.await(); } else if (writeCounter == 2) { secondDeposit.await(); } Thread.sleep(2000); balance -= amount; System.out.println("Withdrawl of " + amount + " successful.Current balance : " + balance); if(writeCounter == 1) { firstWithdrawl.signalAll(); } else if (writeCounter == 3) { secondWithdrawl.signalAll(); } depositOrWithdraw.signalAll(); readRequired = true; writeCounter++; } catch (InterruptedException e) { System.out.println("Request timeout. Please try again to withdraw money"); } finally { if (writeLock.isHeldByCurrentThread()) writeLock.unlock(); } } // Read method - hence non-synchronized public void checkBalance() throws InterruptedException { try { writeLock.lock(); while(readRequired == false) { depositOrWithdraw.await(); } String msg = MessageFormat.format("Your balance is Rs. {0, number}/-", balance); System.out.println(msg); readRequired = false; balanceCheck.signalAll(); } finally { writeLock.unlock(); } } } class DepositRunnable3 implements Runnable { int amount; Account3 account; DepositRunnable3(int amount, Account3 account) { this.amount = amount; this.account = account; } @Override public void run() { account.deposit(amount); } } class WithdrawRunnable3 implements Runnable { int amount; Account3 account; public WithdrawRunnable3(int amount, Account3 account) { this.amount = amount; this.account = account; } @Override public void run() { account.withdraw(amount); } } class BalanceRunnable3 implements Runnable { Account3 account; public BalanceRunnable3(Account3 account) { this.account = account; } @Override public void run() { try { account.checkBalance(); } catch (InterruptedException e) { e.printStackTrace(); } } } public class Part08_LockConditionClassExample2 { public static void main(String[] args) { Account3 account = new Account3(); DepositRunnable3 dr1 = new DepositRunnable3(8000, account); WithdrawRunnable3 wr1 = new WithdrawRunnable3(2000, account); DepositRunnable3 dr2 = new DepositRunnable3(7000, account); WithdrawRunnable3 wr2 = new WithdrawRunnable3(6000, account); Thread t1 = new Thread(dr1); Thread t2 = new Thread(new BalanceRunnable3(account)); Thread t3 = new Thread(wr1); Thread t4 = new Thread(new BalanceRunnable3(account)); Thread t5 = new Thread(dr2); Thread t6 = new Thread(new BalanceRunnable3(account)); Thread t7 = new Thread(wr2); Thread t8 = new Thread(new BalanceRunnable3(account)); t1.start(); t2.start(); t3.start(); t4.start(); t5.start(); t6.start(); t7.start(); t8.start(); //If you want to check full execution, comment following lines. try { Thread.sleep(8000); } catch (InterruptedException e) { e.printStackTrace(); } t1.interrupt(); t3.interrupt(); t5.interrupt(); t7.interrupt(); } }
[ "asaurabh001@gmail.com" ]
asaurabh001@gmail.com
006c81d10653f4563567ee9162a7864ab3418f1e
7aed3f69f409e318803424922123350b5d8b15fd
/service-pm/src/test/java/com/fang/pm/controll/LogcatControllTest.java
287844f3d6283fc08659b02f05b5348c233cc78d
[]
no_license
fangDevAnd/pm-end
b019b599169bdcd723046c116f234c9c2ce63c48
c6be90afa78ce95b66b12b4a9547c9db7c43048c
refs/heads/master
2023-04-08T22:08:52.820527
2021-04-20T16:34:57
2021-04-20T16:34:57
309,027,934
0
0
null
null
null
null
UTF-8
Java
false
false
669
java
package com.fang.pm.controll; import com.fang.pm.entity.resp.Result; import com.google.gson.Gson; import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import static org.junit.jupiter.api.Assertions.*; @SpringBootTest @RunWith(SpringRunner.class) class LogcatControllTest { @Autowired LogcatControll logcatControll; @Test void option() { Result result = logcatControll.option(); System.out.println(new Gson().toJson(result)); } }
[ "13077995907@163.com" ]
13077995907@163.com
7a7120d584760f270a1a83e8c4f0093e57303cac
d5c9e50234cf7c7466ea207ebb39b1c13ca7101b
/materialdrawer/src/main/java/com/heinrichreimersoftware/materialdrawer/DrawerView.java
d48462d698b6125240c0a73155adcfb3202893fa
[]
no_license
sandeepbahalkar123/DMS_EMRD_repo
21077f84aeec0ba584a466f65dca1bf003819a43
ba5094959a24d959c8c7fb26627f4c3027d91366
refs/heads/master
2020-03-15T05:43:02.253296
2018-05-03T12:41:53
2018-05-03T12:41:53
131,992,923
1
0
null
null
null
null
UTF-8
Java
false
false
66,811
java
/* * MIT License * * Copyright (c) 2017 Jan Heinrich Reimer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.heinrichreimersoftware.materialdrawer; import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import android.os.Parcelable; import android.support.v4.content.ContextCompat; import android.support.v4.text.TextUtilsCompat; import android.util.AttributeSet; import android.util.Log; import android.util.Property; import android.util.TypedValue; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.ScrollView; import android.widget.TextView; import com.heinrichreimersoftware.materialdrawer.adapter.DrawerAdapter; import com.heinrichreimersoftware.materialdrawer.adapter.DrawerProfileAdapter; import com.heinrichreimersoftware.materialdrawer.animation.AlphaSatColorMatrixEvaluator; import com.heinrichreimersoftware.materialdrawer.animation.AnimatableColorMatrixColorFilter; import com.heinrichreimersoftware.materialdrawer.animation.StepInterpolator; import com.heinrichreimersoftware.materialdrawer.structure.DrawerHeaderItem; import com.heinrichreimersoftware.materialdrawer.structure.DrawerItem; import com.heinrichreimersoftware.materialdrawer.structure.DrawerProfile; import com.heinrichreimersoftware.materialdrawer.theme.DrawerTheme; import com.heinrichreimersoftware.materialdrawer.widget.LinearListView; import com.heinrichreimersoftware.materialdrawer.widget.ScrimInsetsFrameLayout; import java.util.ArrayList; import java.util.List; import java.util.Locale; /** * View to be used with {@link android.support.v4.widget.DrawerLayout} to display a drawer which is fully compliant with the Material Design specification. */ @SuppressWarnings("unused") public class DrawerView extends ScrimInsetsFrameLayout implements ScrimInsetsFrameLayout.OnInsetsCallback { public static final String STATE_PROFILE_LIST_OPEN = "mdProfileListOpen"; public static final String STATE_LIST_SELECTION = "mdListSelection"; public static final String STATE_FIXED_LIST_SELECTION = "mdFixedListSelection"; private static final String TAG = "DrawerView"; private static final Property<Drawable, Integer> PROPERTY_LEVEL = new Property<Drawable, Integer>(Integer.class, "level") { @Override public Integer get(Drawable object) { return object.getLevel(); } @Override public void set(Drawable object, Integer value) { object.setLevel(value); } }; private static final Property<ScrollView, Integer> PROPERTY_SCROLL_POSITION = new Property<ScrollView, Integer>(Integer.class, "scrollY") { @Override public Integer get(ScrollView object) { return object.getScrollY(); } @Override public void set(ScrollView object, Integer value) { object.scrollTo(0, value); } }; private DrawerProfileAdapter mProfileAdapter; private DrawerAdapter mAdapter; private DrawerAdapter mAdapterFixed; private DrawerProfile.OnProfileClickListener onProfileClickListener; private DrawerProfile.OnNonProfileClickListener onNonProfileClickListener; private DrawerProfile.OnProfileSwitchListener onProfileSwitchListener; private DrawerItem.OnItemClickListener mOnItemClickListener; private DrawerItem.OnItemClickListener mOnFixedItemClickListener; private ScrollView scrollView; private LinearLayout layout; private FrameLayout frameLayoutProfile; private RelativeLayout relativeLayoutProfileContent; private ImageView imageViewProfileAvatar; private ImageView imageViewProfileAvatarSecondary; private TextView textViewProfileAvatarCount; private ImageView imageViewProfileBackground; private ImageView imageViewProfileBackgroundOverlay; private LinearLayout linearLayoutProfileTextContainer; private TextView textViewProfileName; private TextView textViewProfileDescription; private ImageView imageViewOpenProfileListIcon; private LinearListView linearListViewProfileList; private LinearListView linearListView; private View fixedShadow; private View fixedDivider; private LinearLayout fixedListContainer; private LinearListView linearListViewFixed; private DrawerTheme drawerTheme; private int statusBarHeight = 0; private int drawerMaxWidth = -1; private boolean profileListOpen = false; private boolean isInViewHierarchy = false; private boolean loggingEnabled = false; public DrawerView(Context context) { this(context, null); } public DrawerView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public DrawerView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (loggingEnabled) Log.d(TAG, "DrawerView()"); init(context); } private void init(Context context) { if (loggingEnabled) Log.d(TAG, "init()"); inflate(context, R.layout.md_drawer_view, this); findViews(); setClipToPadding(false); setInsetForeground(new ColorDrawable(ContextCompat.getColor(getContext(), R.color.md_inset_foreground))); setOnInsetsCallback(this); mProfileAdapter = new DrawerProfileAdapter(context, new ArrayList<DrawerProfile>()); linearListViewProfileList.setAdapter(mProfileAdapter); linearListViewProfileList.setOnItemClickListener(new LinearListView.OnItemClickListener() { @Override public void onItemClick(LinearListView parent, View view, int position, long id) { if (position != 0) { if (mProfileAdapter.getItem(position).isProfile()) selectProfile(mProfileAdapter.getItem(position)); else // added listener onNonProfileClickListener.onProfileItemClick(mProfileAdapter.getItem(position), mProfileAdapter.getItem(position).getId()); } } }); mAdapter = new DrawerAdapter(context, new ArrayList<DrawerItem>()); linearListView.setAdapter(mAdapter); linearListView.setOnItemClickListener(new LinearListView.OnItemClickListener() { @Override public void onItemClick(LinearListView parent, View view, int position, long id) { DrawerItem item = mAdapter.getItem(position); if (!item.isHeader()) { if (item.hasOnItemClickListener()) { item.getOnItemClickListener().onClick(item, item.getId(), position); } else { if (hasOnItemClickListener()) { mOnItemClickListener.onClick(item, item.getId(), position); } } } } }); mAdapterFixed = new DrawerAdapter(context, new ArrayList<DrawerItem>()); linearListViewFixed.setAdapter(mAdapterFixed); linearListViewFixed.setOnItemClickListener(new LinearListView.OnItemClickListener() { @Override public void onItemClick(LinearListView parent, View view, int position, long id) { DrawerItem item = mAdapterFixed.getItem(position); if (!item.isHeader()) { if (item.hasOnItemClickListener()) { item.getOnItemClickListener().onClick(item, item.getId(), position); } else { if (hasOnFixedItemClickListener()) { mOnFixedItemClickListener.onClick(item, item.getId(), position); } } } } }); resetDrawerTheme(); linearLayoutProfileTextContainer.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { toggleProfileList(); } }); imageViewOpenProfileListIcon.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { toggleProfileList(); } }); frameLayoutProfile.setVisibility(GONE); layout.setPadding(0, statusBarHeight, 0, 0); updateListVisibility(); } private void findViews() { if (loggingEnabled) Log.d(TAG, "findViews()"); scrollView = (ScrollView) findViewById(R.id.mdScrollView); layout = (LinearLayout) findViewById(R.id.mdLayout); frameLayoutProfile = (FrameLayout) findViewById(R.id.mdLayoutProfile); relativeLayoutProfileContent = (RelativeLayout) findViewById(R.id.mdLayoutProfileContent); imageViewProfileAvatar = (ImageView) findViewById(R.id.mdAvatarProfile); imageViewProfileAvatarSecondary = (ImageView) findViewById(R.id.mdAvatarProfileSecondary); textViewProfileAvatarCount = (TextView) findViewById(R.id.mdAvatarProfileCount); imageViewProfileBackground = (ImageView) findViewById(R.id.mdProfileBackground); imageViewProfileBackgroundOverlay = (ImageView) findViewById(R.id.mdProfileBackgroundOverlay); linearLayoutProfileTextContainer = (LinearLayout) findViewById(R.id.mdProfileTextContainer); textViewProfileName = (TextView) findViewById(R.id.mdProfileName); textViewProfileDescription = (TextView) findViewById(R.id.mdProfileDescription); imageViewOpenProfileListIcon = (ImageView) findViewById(R.id.mdOpenProfileListIcon); linearListViewProfileList = (LinearListView) findViewById(R.id.mdProfileList); linearListView = (LinearListView) findViewById(R.id.mdList); fixedShadow = findViewById(R.id.mdFixedShadow); fixedDivider = findViewById(R.id.mdFixedDivider); fixedListContainer = (LinearLayout) findViewById(R.id.mdFixedListContainer); linearListViewFixed = (LinearListView) findViewById(R.id.mdLinearListViewFixed); } private void updateTheme() { setBackgroundColor(drawerTheme.getBackgroundColor()); setInsetForeground(new ColorDrawable(drawerTheme.getStatusBarBackgroundColor())); if (drawerTheme.isLightTheme()) { fixedDivider.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.md_divider_light)); } else { fixedDivider.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.md_divider_dark)); } linearListViewFixed.setBackgroundColor(drawerTheme.getBackgroundColor()); mAdapter.setDrawerTheme(drawerTheme); mAdapterFixed.setDrawerTheme(drawerTheme); mProfileAdapter.setDrawerTheme(drawerTheme); updateProfileTheme(); } private void updateProfileTheme() { DrawerTheme drawerTheme = this.drawerTheme; if (mProfileAdapter.getCount() > 0 && mProfileAdapter.getItem(0) != null && mProfileAdapter.getItem(0).hasDrawerTheme()) { drawerTheme = mProfileAdapter.getItem(0).getDrawerTheme(); } textViewProfileName.setTextColor(drawerTheme.getTextColorPrimaryInverse()); textViewProfileDescription.setTextColor(drawerTheme.getTextColorSecondaryInverse()); imageViewOpenProfileListIcon.setColorFilter(drawerTheme.getTextColorPrimaryInverse(), PorterDuff.Mode.SRC_IN); if (drawerTheme.isLightTheme()) { imageViewOpenProfileListIcon.setBackgroundResource(R.drawable.md_selector_light); } else { imageViewOpenProfileListIcon.setBackgroundResource(R.drawable.md_selector_dark); } } private void updateDrawerWidth() { if (loggingEnabled) Log.d(TAG, "updateDrawerWidth()"); int viewportWidth = getContext().getResources().getDisplayMetrics().widthPixels; int viewportHeight = getContext().getResources().getDisplayMetrics().heightPixels; //Minus the width of the vertical nav bar if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { int navigationBarWidthResId = getResources().getIdentifier("navigation_bar_width", "dimen", "android"); if (navigationBarWidthResId > 0) { viewportWidth -= getResources().getDimensionPixelSize(navigationBarWidthResId); } } int viewportMin = Math.min(viewportWidth, viewportHeight); //App bar size TypedValue typedValue = new TypedValue(); getContext().getTheme().resolveAttribute(R.attr.actionBarSize, typedValue, true); int actionBarSize = TypedValue.complexToDimensionPixelSize(typedValue.data, getResources().getDisplayMetrics()); int width = viewportMin - actionBarSize; getLayoutParams().width = Math.min(width, drawerMaxWidth); updateProfileSpacing(); } private void updateProfileSpacing() { if (loggingEnabled) Log.d(TAG, "updateProfileSpacing()"); if (mProfileAdapter.getCount() > 0) { int aspectRatioHeight = Math.round(getLayoutParams().width / 16 * 9) - statusBarHeight; int minHeight = getResources().getDimensionPixelSize(R.dimen.md_baseline); if (mProfileAdapter.getItem(0) != null && mProfileAdapter.getItem(0).hasAvatar()) { minHeight += getResources().getDimensionPixelSize(R.dimen.md_big_avatar_size); } if (mProfileAdapter.getItem(0) != null && mProfileAdapter.getItem(0).hasName()) { minHeight += getResources().getDimensionPixelSize(R.dimen.md_list_item_height); } if (mProfileAdapter.getItem(0) != null && mProfileAdapter.getItem(0).hasDescription()) { minHeight += getResources().getDimensionPixelSize(R.dimen.md_baseline); } frameLayoutProfile.getLayoutParams().height = Math.max(aspectRatioHeight, minHeight) + statusBarHeight; frameLayoutProfile.setVisibility(VISIBLE); relativeLayoutProfileContent.getLayoutParams().height = Math.max(aspectRatioHeight, minHeight); layout.setPadding(0, 0, 0, 0); } else { frameLayoutProfile.setVisibility(GONE); layout.setPadding(0, statusBarHeight, 0, 0); } } private void updateProfile() { if (loggingEnabled) Log.d(TAG, "updateProfile()"); if (mProfileAdapter.getCount() > 0 && isInViewHierarchy) { if (mProfileAdapter.getProfileCount() > 2) { /* More than two profiles. Should show a little badge. */ textViewProfileAvatarCount.setText(getResources().getString(R.string.md_label_plus, mProfileAdapter.getProfileCount() - 1)); textViewProfileAvatarCount.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { toggleProfileList(); // openProfileList(); } }); Bitmap icon = BitmapFactory.decodeResource(getResources(), R.drawable.profile); imageViewProfileAvatarSecondary.setImageDrawable(new BitmapDrawable(getResources(), icon)); imageViewProfileAvatarSecondary.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { toggleProfileList(); // openProfileList(); } }); /*if (mProfileAdapter.getItem(0).getBackground() instanceof BitmapDrawable) { new Palette.Builder(((BitmapDrawable) mProfileAdapter.getItem(0).getBackground()).getBitmap()) .resizeBitmapSize(500) .generate(new Palette.PaletteAsyncListener() { @Override public void onGenerated(Palette palette) { Palette.Swatch vibrantSwatch = palette.getVibrantSwatch(); if (vibrantSwatch != null) { textViewProfileAvatarCount.setTextColor(vibrantSwatch.getTitleTextColor()); textViewProfileAvatarCount.getBackground().setColorFilter(vibrantSwatch.getRgb(), PorterDuff.Mode.SRC_IN); } } }); }*/ imageViewProfileAvatarSecondary.setVisibility(VISIBLE); // Change textViewProfileAvatarCount.setVisibility(VISIBLE); imageViewOpenProfileListIcon.setVisibility(VISIBLE); } else if (mProfileAdapter.getProfileCount() == 2) { /* Two profiles. Should show the second profile avatar. */ if (mProfileAdapter.getItem(1).hasAvatar()) { imageViewProfileAvatarSecondary.setImageDrawable(mProfileAdapter.getItem(1).getAvatar()); imageViewProfileAvatarSecondary.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { selectProfile(mProfileAdapter.getItem(1)); } }); imageViewProfileAvatarSecondary.setVisibility(VISIBLE); } else { imageViewProfileAvatarSecondary.setVisibility(INVISIBLE); } textViewProfileAvatarCount.setVisibility(GONE); imageViewOpenProfileListIcon.setVisibility(VISIBLE); closeProfileList(); } else { imageViewProfileAvatarSecondary.setVisibility(INVISIBLE); textViewProfileAvatarCount.setVisibility(GONE); imageViewOpenProfileListIcon.setVisibility(GONE); } if (mProfileAdapter.getItem(0).getAvatar() != null) { imageViewProfileAvatar.setImageDrawable(mProfileAdapter.getItem(0).getAvatar()); } if (mProfileAdapter.getItem(0).getName() != null && !mProfileAdapter.getItem(0).getName().equals("")) { textViewProfileName.setText(mProfileAdapter.getItem(0).getName()); } if (mProfileAdapter.getItem(0).getBackground() != null) { imageViewProfileBackground.setImageDrawable(mProfileAdapter.getItem(0).getBackground()); } else { imageViewProfileBackground.setImageDrawable(new ColorDrawable(ContextCompat.getColor(getContext(), android.R.color.transparent))); } if (mProfileAdapter.getItem(0).getDescription() != null && !mProfileAdapter.getItem(0).getDescription().equals("")) { textViewProfileDescription.setVisibility(VISIBLE); textViewProfileDescription.setText(mProfileAdapter.getItem(0).getDescription()); } else { textViewProfileDescription.setVisibility(GONE); } if (mProfileAdapter.getItem(0).hasOnProfileClickListener()) { frameLayoutProfile.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { mProfileAdapter.getItem(0).getOnProfileClickListener().onClick(mProfileAdapter.getItem(0), mProfileAdapter.getItem(0).getId()); } }); frameLayoutProfile.setEnabled(true); } else { if (hasOnProfileClickListener()) { frameLayoutProfile.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { onProfileClickListener.onClick(mProfileAdapter.getItem(0), mProfileAdapter.getItem(0).getId()); } }); frameLayoutProfile.setEnabled(true); } else { frameLayoutProfile.setEnabled(false); } } updateProfileTheme(); } else { closeProfileList(); } } private void updateList() { if (loggingEnabled) Log.d(TAG, "updateList()"); if (mAdapter.getCount() <= 1 && isInViewHierarchy) { updateListVisibility(); } } private void updateFixedList() { if (loggingEnabled) Log.d(TAG, "updateFixedList()"); if (mAdapterFixed.getCount() <= 1 && isInViewHierarchy) { updateListVisibility(); } } private void updateListVisibility() { if (loggingEnabled) Log.d(TAG, "updateListVisibility()"); if (profileListOpen && mProfileAdapter.getCount() > 0) { linearListViewProfileList.setVisibility(VISIBLE); } else { linearListViewProfileList.setVisibility(GONE); } if (!profileListOpen && mAdapter.getCount() > 0) { linearListView.setVisibility(VISIBLE); } else { linearListView.setVisibility(GONE); } if (mAdapterFixed.getCount() > 0) { fixedListContainer.setVisibility(VISIBLE); if ((profileListOpen && mProfileAdapter.getCount() > 0) || (!profileListOpen && mAdapter.getCount() > 0)) { fixedDivider.setVisibility(VISIBLE); fixedShadow.setVisibility(VISIBLE); } else { fixedDivider.setVisibility(GONE); fixedShadow.setVisibility(GONE); } } else { fixedListContainer.setVisibility(GONE); } } private void animateToProfile(DrawerProfile profile) { if (loggingEnabled) Log.d(TAG, "animateToProfile(*" + profile.getId() + ")"); if (mProfileAdapter.getProfileCount() > 1) { List<Animator> animators = new ArrayList<>(); List<Animator.AnimatorListener> listeners = new ArrayList<>(); final DrawerProfile oldProfile = mProfileAdapter.getItem(0); final DrawerProfile newProfile = profile; boolean isRtl = Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault()) == LAYOUT_DIRECTION_RTL; int rtlSign = isRtl ? -1 : 1; /* Background animation */ AlphaSatColorMatrixEvaluator evaluator = new AlphaSatColorMatrixEvaluator(); final AnimatableColorMatrixColorFilter filter = new AnimatableColorMatrixColorFilter(evaluator.getColorMatrix()); ObjectAnimator backgroundAnimator = ObjectAnimator.ofObject(filter, "colorMatrix", evaluator, evaluator.getColorMatrix()); backgroundAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { imageViewProfileBackgroundOverlay.setColorFilter(filter.getColorFilter()); } }); animators.add(backgroundAnimator); listeners.add(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { imageViewProfileBackground.setImageDrawable(oldProfile.getBackground()); imageViewProfileBackgroundOverlay.setImageDrawable(newProfile.getBackground()); imageViewProfileBackgroundOverlay.setColorFilter(filter.getColorFilter()); imageViewProfileBackgroundOverlay.setVisibility(VISIBLE); imageViewProfileAvatarSecondary.setClickable(false); } @Override public void onAnimationEnd(Animator animation) { imageViewProfileBackground.setImageDrawable(newProfile.getBackground()); /*if (newProfile.getBackground() instanceof BitmapDrawable) { new Palette.Builder(((BitmapDrawable) newProfile.getBackground()).getBitmap()) .resizeBitmapSize(500) .generate(new Palette.PaletteAsyncListener() { @Override public void onGenerated(Palette palette) { Palette.Swatch vibrantSwatch = palette.getVibrantSwatch(); if (vibrantSwatch != null) { textViewProfileAvatarCount.setTextColor(vibrantSwatch.getTitleTextColor()); textViewProfileAvatarCount.getBackground().setColorFilter(vibrantSwatch.getRgb(), PorterDuff.Mode.SRC_IN); } } }); }*/ imageViewProfileAvatarSecondary.setClickable(true); imageViewProfileBackgroundOverlay.setVisibility(GONE); if (hasOnProfileSwitchListener()) { onProfileSwitchListener.onSwitch(oldProfile, oldProfile.getId(), newProfile, newProfile.getId()); } } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); /* Text animation */ AnimatorSet textSet = new AnimatorSet(); AnimatorSet textOutSet = new AnimatorSet(); textOutSet.playTogether( ObjectAnimator.ofFloat(linearLayoutProfileTextContainer, "alpha", 1, 0), ObjectAnimator.ofFloat(linearLayoutProfileTextContainer, "translationX", 0, getWidth() / 4 * rtlSign) ); textOutSet.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { } @Override public void onAnimationEnd(Animator animation) { updateProfileTheme(); if (newProfile.hasName()) { textViewProfileName.setText(newProfile.getName()); textViewProfileName.setVisibility(VISIBLE); } else { textViewProfileName.setVisibility(GONE); } if (newProfile.hasDescription()) { textViewProfileDescription.setText(newProfile.getDescription()); textViewProfileDescription.setVisibility(VISIBLE); } else { textViewProfileDescription.setVisibility(GONE); } } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); AnimatorSet textInSet = new AnimatorSet(); textInSet.playTogether( ObjectAnimator.ofFloat(linearLayoutProfileTextContainer, "alpha", 0, 1), ObjectAnimator.ofFloat(linearLayoutProfileTextContainer, "translationX", -getWidth() / 4 * rtlSign, 0) ); textSet.playSequentially( textOutSet, textInSet ); animators.add(textSet); AnimatorSet profileSet = new AnimatorSet(); if (mProfileAdapter.getProfileCount() == 2) { /* Avatar animation */ int translation = isRtl ? (relativeLayoutProfileContent.getWidth() - getResources().getDimensionPixelSize(R.dimen.md_big_avatar_size) - 2 * getResources().getDimensionPixelSize(R.dimen.md_baseline)) : (imageViewProfileAvatarSecondary.getLeft() - getResources().getDimensionPixelSize(R.dimen.md_baseline)); float scale = getResources().getDimension(R.dimen.md_avatar_size) / getResources().getDimension(R.dimen.md_big_avatar_size); float translationCorrect = (getResources().getDimension(R.dimen.md_avatar_size) - getResources().getDimension(R.dimen.md_big_avatar_size)) / 2; listeners.add(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { imageViewProfileAvatarSecondary.setPivotX(0); imageViewProfileAvatarSecondary.setPivotY(0); } @Override public void onAnimationEnd(Animator animation) { imageViewProfileAvatar.setTranslationX(0); imageViewProfileAvatar.setTranslationY(0); imageViewProfileAvatar.setScaleX(1); imageViewProfileAvatar.setScaleY(1); imageViewProfileAvatarSecondary.setTranslationX(0); imageViewProfileAvatarSecondary.setScaleX(1); imageViewProfileAvatarSecondary.setScaleY(1); if (oldProfile.hasAvatar()) { imageViewProfileAvatarSecondary.setImageDrawable(oldProfile.getAvatar()); imageViewProfileAvatarSecondary.setVisibility(VISIBLE); } else { imageViewProfileAvatarSecondary.setVisibility(INVISIBLE); } if (newProfile.hasAvatar()) { imageViewProfileAvatar.setImageDrawable(newProfile.getAvatar()); imageViewProfileAvatar.setVisibility(VISIBLE); imageViewProfileAvatarSecondary.setClickable(true); } else { imageViewProfileAvatar.setVisibility(INVISIBLE); imageViewProfileAvatarSecondary.setClickable(false); } } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); if (oldProfile.hasAvatar()) { ObjectAnimator stepTranslateXAnimator = ObjectAnimator.ofFloat(imageViewProfileAvatar, "translationX", 0, translation * rtlSign + translationCorrect); stepTranslateXAnimator.setInterpolator(new StepInterpolator()); animators.add(stepTranslateXAnimator); ObjectAnimator stepTranslateYAnimator = ObjectAnimator.ofFloat(imageViewProfileAvatar, "translationY", 0, translationCorrect); stepTranslateYAnimator.setInterpolator(new StepInterpolator()); animators.add(stepTranslateYAnimator); animators.add(ObjectAnimator.ofFloat(imageViewProfileAvatar, "alpha", 1, 0, 1)); animators.add(ObjectAnimator.ofFloat(imageViewProfileAvatar, "scaleX", 1, 0.5f, scale)); animators.add(ObjectAnimator.ofFloat(imageViewProfileAvatar, "scaleY", 1, 0.5f, scale)); } if (newProfile.hasAvatar()) { animators.add(ObjectAnimator.ofFloat(imageViewProfileAvatarSecondary, "translationX", 0, -translation * rtlSign)); animators.add(ObjectAnimator.ofFloat(imageViewProfileAvatarSecondary, "scaleX", 1, 1 / scale)); animators.add(ObjectAnimator.ofFloat(imageViewProfileAvatarSecondary, "scaleY", 1, 1 / scale)); } } else { AnimatorSet profileOutSet = new AnimatorSet(); profileOutSet.playTogether( ObjectAnimator.ofFloat(imageViewProfileAvatar, "alpha", 1, 0), ObjectAnimator.ofFloat(imageViewProfileAvatar, "scaleX", 1, 0.5f), ObjectAnimator.ofFloat(imageViewProfileAvatar, "scaleY", 1, 0.5f) ); profileOutSet.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { linearListViewProfileList.setOnItemClickListener(new LinearListView.OnItemClickListener() { @Override public void onItemClick(LinearListView parent, View view, int position, long id) { } }); } @Override public void onAnimationEnd(Animator animation) { imageViewProfileAvatar.setImageDrawable(newProfile.getAvatar()); linearListViewProfileList.setOnItemClickListener(new LinearListView.OnItemClickListener() { @Override public void onItemClick(LinearListView parent, View view, int position, long id) { if (position != 0) { if (mProfileAdapter.getItem(position).isProfile()) selectProfile(mProfileAdapter.getItem(position)); else // added listener onNonProfileClickListener.onProfileItemClick(mProfileAdapter.getItem(position), mProfileAdapter.getItem(position).getId()); } } }); } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); AnimatorSet profileInSet = new AnimatorSet(); profileInSet.playTogether( ObjectAnimator.ofFloat(imageViewProfileAvatar, "alpha", 0, 1), ObjectAnimator.ofFloat(imageViewProfileAvatar, "scaleX", 0.5f, 1), ObjectAnimator.ofFloat(imageViewProfileAvatar, "scaleY", 0.5f, 1) ); profileSet.playSequentially( profileOutSet, profileInSet ); animators.add(profileSet); } if (animators.size() > 0) { /* Play animation */ AnimatorSet set = new AnimatorSet(); set.playTogether(animators); set.setDuration(getResources().getInteger(R.integer.md_profile_switching_anim_time)); textSet.setDuration(getResources().getInteger(R.integer.md_profile_switching_anim_time) / 2); profileSet.setDuration(getResources().getInteger(R.integer.md_profile_switching_anim_time) / 2); for (Animator.AnimatorListener listener : listeners) { set.addListener(listener); } set.start(); } } } private void toggleProfileList() { if (loggingEnabled) Log.d(TAG, "toggleProfileList()"); if (profileListOpen) { closeProfileList(); } else { openProfileList(); } } private void openProfileList() { if (loggingEnabled) Log.d(TAG, "openProfileList()"); if (!profileListOpen) { AnimatorSet set = new AnimatorSet(); set.playTogether( ObjectAnimator.ofFloat(linearListView, "alpha", 1, 0f, 0f, 0f), ObjectAnimator.ofFloat(linearListView, "translationY", 0, getResources().getDimensionPixelSize(R.dimen.md_list_item_height) / 4), ObjectAnimator.ofFloat(linearListViewProfileList, "alpha", 0, 1), ObjectAnimator.ofFloat(linearListViewProfileList, "translationY", -getResources().getDimensionPixelSize(R.dimen.md_list_item_height) / 2, 0), ObjectAnimator.ofInt(imageViewOpenProfileListIcon.getDrawable(), PROPERTY_LEVEL, 0, 10000), ObjectAnimator.ofInt(scrollView, PROPERTY_SCROLL_POSITION, 0) ); set.setDuration(getResources().getInteger(R.integer.md_profile_list_open_anim_time)); set.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { linearListViewProfileList.setVisibility(VISIBLE); imageViewOpenProfileListIcon.setClickable(false); } @Override public void onAnimationEnd(Animator animation) { imageViewOpenProfileListIcon.setClickable(true); profileListOpen = true; updateListVisibility(); } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); set.start(); } else { updateListVisibility(); } } private void closeProfileList() { if (loggingEnabled) Log.d(TAG, "closeProfileList()"); if (profileListOpen) { AnimatorSet set = new AnimatorSet(); set.playTogether( ObjectAnimator.ofFloat(linearListViewProfileList, "alpha", 1, 0f, 0f, 0f), ObjectAnimator.ofFloat(linearListViewProfileList, "translationY", 0, -getResources().getDimensionPixelSize(R.dimen.md_list_item_height) / 4), ObjectAnimator.ofFloat(linearListView, "alpha", 0f, 1), ObjectAnimator.ofFloat(linearListView, "translationY", getResources().getDimensionPixelSize(R.dimen.md_list_item_height) / 2, 0), ObjectAnimator.ofInt(imageViewOpenProfileListIcon.getDrawable(), PROPERTY_LEVEL, 10000, 0), ObjectAnimator.ofInt(scrollView, PROPERTY_SCROLL_POSITION, 0) ); set.setDuration(getResources().getInteger(R.integer.md_profile_list_open_anim_time)); set.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { linearListView.setVisibility(VISIBLE); imageViewOpenProfileListIcon.setClickable(false); } @Override public void onAnimationEnd(Animator animation) { imageViewOpenProfileListIcon.setClickable(true); profileListOpen = false; updateListVisibility(); } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); set.start(); } else { updateListVisibility(); } } /** * Gets whether debug logging is enabled */ public boolean getLoggingEnabled() { return loggingEnabled; } /** * Sets whether debug logging is enabled * * @param loggingEnabled whether or not to enable debug logging */ public DrawerView setLoggingEnabled(boolean loggingEnabled) { this.loggingEnabled = loggingEnabled; return this; } /** * Resets the drawer theme */ public DrawerView resetDrawerTheme() { this.drawerTheme = new DrawerTheme(getContext()); updateTheme(); return this; } /** * Gets the drawer theme */ public DrawerTheme getDrawerTheme() { return drawerTheme; } /** * Sets the drawer theme * * @param theme Theme to set */ public DrawerView setDrawerTheme(DrawerTheme theme) { this.drawerTheme = theme; updateTheme(); return this; } /** * Sets the max drawer width from resources * * @param drawerMaxWidthResource Max drawer width resource to set */ public DrawerView setDrawerMaxWidthResource(int drawerMaxWidthResource) { drawerMaxWidth = getResources().getDimensionPixelSize(drawerMaxWidthResource); updateDrawerWidth(); return this; } /** * Resets the max drawer width */ public DrawerView resetDrawerMaxWidth() { this.drawerMaxWidth = getResources().getDimensionPixelSize(R.dimen.md_drawer_max_width); updateDrawerWidth(); return this; } /** * Gets the max drawer width */ public int getDrawerMaxWidth() { return drawerMaxWidth; } /** * Sets the max drawer width * * @param drawerMaxWidth Max drawer width to set */ public DrawerView setDrawerMaxWidth(int drawerMaxWidth) { this.drawerMaxWidth = drawerMaxWidth; updateDrawerWidth(); return this; } /** * Adds a profile to the drawer view * * @param profile Profile to add */ public DrawerView addProfile(DrawerProfile profile) { if (profile.getId() <= 0) { profile.setId(System.nanoTime() * 100 + Math.round(Math.random() * 100)); } for (DrawerProfile oldProfile : mProfileAdapter.getItems()) { if (oldProfile.getId() == profile.getId()) { mProfileAdapter.remove(oldProfile); break; } } profile.attachTo(this); if (profile.isProfile()) mProfileAdapter.insert(profile, mProfileAdapter.getProfileCount()); else mProfileAdapter.add(profile); if (mProfileAdapter.getProfileCount() == 1) { selectProfile(profile); } updateProfile(); return this; } /** * Gets all profiles from the drawer view * * @return Profiles from the drawer view */ public List<DrawerProfile> getProfiles() { return mProfileAdapter.getItems(); } /** * Gets all profiles from the drawer view * * @return Profiles from the drawer view */ public int getProfileCount() { return mProfileAdapter.getProfileCount(); } /** * Gets all profiles from the drawer view * * @return Profiles from the drawer view */ public int getNonProfileCount() { return mProfileAdapter.getNonProfileCount(); } /** * Gets a profile from the drawer view * * @param id The profile ID * @return Profile from the drawer view */ public DrawerProfile findProfileById(long id) { for (DrawerProfile profile : mProfileAdapter.getItems()) { if (profile.getId() == id) { return profile; } } return null; } /** * Selects a profile from the drawer view * * @param profile The profile */ public DrawerView selectProfile(DrawerProfile profile) { if (mProfileAdapter.getItems().contains(profile)) { DrawerProfile oldProfile = mProfileAdapter.getItem(0); if (mProfileAdapter.getCount() > 1) { closeProfileList(); animateToProfile(profile); mProfileAdapter.remove(profile); mProfileAdapter.insert(profile, 0); } else { mProfileAdapter.remove(profile); mProfileAdapter.insert(profile, 0); if (hasOnProfileSwitchListener()) { onProfileSwitchListener.onSwitch(oldProfile, oldProfile.getId(), profile, profile.getId()); } } } return this; } /** * Selects a profile from the drawer view * * @param id The profile ID */ public DrawerView selectProfileById(long id) { for (DrawerProfile profile : mProfileAdapter.getItems()) { if (profile.getId() == id) { selectProfile(profile); return this; } } return this; } /** * Removes a profile from the drawer view * * @param profile Profile to remove */ public DrawerView removeProfile(DrawerProfile profile) { profile.detach(); mProfileAdapter.remove(profile); updateProfile(); return this; } /** * Removes a profile from the drawer view * * @param id ID to remove */ public DrawerView removeProfileById(long id) { for (DrawerProfile profile : mProfileAdapter.getItems()) { if (profile.getId() == id) { profile.detach(); mProfileAdapter.remove(profile); updateProfile(); return this; } } return this; } /** * Removes all profiles from the drawer view */ public DrawerView clearProfiles() { for (DrawerProfile profile : mProfileAdapter.getItems()) { profile.detach(); } mProfileAdapter.clear(); updateProfile(); return this; } /** * Gets the profile click listener of the drawer * * @return Profile click listener of the drawer */ public DrawerProfile.OnProfileClickListener getOnProfileClickListener() { return onProfileClickListener; } /** * Sets a profile click listener to the drawer * * @param listener Listener to set */ public DrawerView setOnProfileClickListener(DrawerProfile.OnProfileClickListener listener) { onProfileClickListener = listener; return this; } /** * Gets whether the drawer has a profile click listener set to it * * @return True if the drawer has a profile click listener set to it, false otherwise. */ public boolean hasOnProfileClickListener() { return onProfileClickListener != null; } /** * Removes the profile click listener from the drawer */ public DrawerView removeOnProfileClickListener() { onProfileClickListener = null; return this; } // Added /** * Gets the profile click listener of the drawer * * @return Profile click listener of the drawer */ public DrawerProfile.OnNonProfileClickListener getOnNonProfileClickListener() { return onNonProfileClickListener; } /** * Sets a profile click listener to the drawer * * @param listener Listener to set */ public DrawerView setOnNonProfileClickListener(DrawerProfile.OnNonProfileClickListener listener) { onNonProfileClickListener = listener; return this; } /** * Gets whether the drawer has a profile click listener set to it * * @return True if the drawer has a profile click listener set to it, false otherwise. */ public boolean hasOnProfileItemClickListener() { return onNonProfileClickListener != null; } /** * Removes the profile click listener from the drawer */ public DrawerView removeOnProfileItemClickListener() { onNonProfileClickListener = null; return this; } // End Added /** * Gets the profile switch listener of the drawer * * @return Profile switch listener of the drawer */ public DrawerProfile.OnProfileSwitchListener getOnProfileSwitchListener() { return onProfileSwitchListener; } /** * Sets a profile switch listener to the drawer * * @param listener Listener to set */ public DrawerView setOnProfileSwitchListener(DrawerProfile.OnProfileSwitchListener listener) { onProfileSwitchListener = listener; return this; } /** * Gets whether the drawer has a profile switch listener set to it * * @return True if the drawer has a profile switch listener set to it, false otherwise. */ public boolean hasOnProfileSwitchListener() { return onProfileSwitchListener != null; } /** * Removes the profile switch listener from the drawer */ public DrawerView removeOnProfileSwitchListener() { onProfileSwitchListener = null; return this; } /** * Adds items to the drawer view * * @param items Items to add */ public DrawerView addItems(List<DrawerItem> items) { mAdapter.setNotifyOnChange(false); for (DrawerItem item : items) { if (item.getId() <= 0) { item.setId(System.nanoTime() * 100 + Math.round(Math.random() * 100)); } for (DrawerItem oldItem : mAdapter.getItems()) { if (oldItem.getId() == item.getId()) { mAdapter.remove(oldItem); break; } } item.attachTo(mAdapter); mAdapter.add(item); } mAdapter.setNotifyOnChange(true); mAdapter.notifyDataSetChanged(); updateList(); return this; } /** * Adds items to the drawer view * * @param items Items to add */ public DrawerView addItems(DrawerItem... items) { mAdapter.setNotifyOnChange(false); for (DrawerItem item : items) { if (item.getId() <= 0) { item.setId(System.nanoTime() * 100 + Math.round(Math.random() * 100)); } for (DrawerItem oldItem : mAdapter.getItems()) { if (oldItem.getId() == item.getId()) { mAdapter.remove(oldItem); break; } } item.attachTo(mAdapter); mAdapter.add(item); } mAdapter.setNotifyOnChange(true); mAdapter.notifyDataSetChanged(); updateList(); return this; } /** * Adds an item to the drawer view * * @param item Item to add */ public DrawerView addItem(DrawerItem item) { if (item.getId() <= 0) { item.setId(System.nanoTime() * 100 + Math.round(Math.random() * 100)); } for (DrawerItem oldItem : mAdapter.getItems()) { if (oldItem.getId() == item.getId()) { mAdapter.remove(oldItem); break; } } item.attachTo(mAdapter); mAdapter.add(item); updateList(); return this; } /** * Adds a divider to the drawer view */ public DrawerView addDivider() { addItem(new DrawerHeaderItem()); return this; } /** * Gets all items from the drawer view * * @return Items from the drawer view */ public List<DrawerItem> getItems() { return mAdapter.getItems(); } /** * Gets an item from the drawer view * * @param position The item position * @return Item from the drawer view */ public DrawerItem getItem(int position) { return mAdapter.getItem(position); } /** * Gets an item from the drawer view * * @param id The item ID * @return Item from the drawer view */ public DrawerItem findItemById(long id) { for (DrawerItem item : mAdapter.getItems()) { if (item.getId() == id) { return item; } } return null; } /** * Selects an item from the drawer view * * @param position The item position */ public DrawerView selectItem(int position) { mAdapterFixed.clearSelection(); mAdapter.select(position); return this; } /** * Gets the selected item position of the drawer view * * @return Position of the selected item */ public int getSelectedPosition() { return mAdapter.getSelectedPosition(); } /** * Selects an item from the drawer view * * @param id The item ID */ public DrawerView selectItemById(long id) { mAdapterFixed.clearSelection(); int count = mAdapter.getCount(); for (int i = 0; i < count; i++) { if (mAdapter.getItem(i).getId() == id) { mAdapter.select(i); return this; } } return this; } /** * Removes an item from the drawer view * * @param item Item to remove */ public DrawerView removeItem(DrawerItem item) { item.detach(); mAdapter.remove(item); updateList(); return this; } /** * Removes an item from the drawer view * * @param position Position to remove */ public DrawerView removeItem(int position) { mAdapter.getItem(position).detach(); mAdapter.remove(mAdapter.getItem(position)); updateList(); return this; } /** * Removes an item from the drawer view * * @param id ID to remove */ public DrawerView removeItemById(long id) { for (DrawerItem item : mAdapter.getItems()) { if (item.getId() == id) { mAdapter.remove(item); updateList(); return this; } } return this; } /** * Removes all items from the drawer view */ public DrawerView clearItems() { for (DrawerItem item : mAdapter.getItems()) { item.detach(); } mAdapter.clear(); updateList(); return this; } /** * Gets the item click listener of the drawer view * * @return Item click listener of the drawer view */ public DrawerItem.OnItemClickListener getOnItemClickListener() { return mOnItemClickListener; } /** * Sets an item click listener to the drawer view * * @param listener Listener to set */ public DrawerView setOnItemClickListener(DrawerItem.OnItemClickListener listener) { mOnItemClickListener = listener; return this; } /** * Gets whether the drawer view has an item click listener set to it * * @return True if the drawer view has an item click listener set to it, false otherwise. */ public boolean hasOnItemClickListener() { return mOnItemClickListener != null; } /** * Removes the item click listener from the drawer view */ public DrawerView removeOnItemClickListener() { mOnItemClickListener = null; return this; } /** * Adds fixed items to the drawer view * * @param items Items to add */ public DrawerView addFixedItems(List<DrawerItem> items) { mAdapterFixed.setNotifyOnChange(false); for (DrawerItem item : items) { if (item.getId() <= 0) { item.setId(System.nanoTime() * 100 + Math.round(Math.random() * 100)); } for (DrawerItem oldItem : mAdapterFixed.getItems()) { if (oldItem.getId() == item.getId()) { mAdapterFixed.remove(oldItem); break; } } item.attachTo(mAdapterFixed); mAdapterFixed.add(item); } mAdapterFixed.setNotifyOnChange(true); mAdapterFixed.notifyDataSetChanged(); updateFixedList(); return this; } /** * Adds fixed items to the drawer view * * @param items Items to add */ public DrawerView addFixedItems(DrawerItem... items) { mAdapterFixed.setNotifyOnChange(false); for (DrawerItem item : items) { if (item.getId() <= 0) { item.setId(System.nanoTime() * 100 + Math.round(Math.random() * 100)); } for (DrawerItem oldItem : mAdapterFixed.getItems()) { if (oldItem.getId() == item.getId()) { mAdapterFixed.remove(oldItem); break; } } item.attachTo(mAdapterFixed); mAdapterFixed.add(item); } mAdapterFixed.setNotifyOnChange(true); mAdapterFixed.notifyDataSetChanged(); updateFixedList(); return this; } /** * Adds a fixed item to the drawer view * * @param item Item to add */ public DrawerView addFixedItem(DrawerItem item) { if (item.getId() <= 0) { item.setId(System.nanoTime() * 100 + Math.round(Math.random() * 100)); } for (DrawerItem oldItem : mAdapterFixed.getItems()) { if (oldItem.getId() == item.getId()) { mAdapterFixed.remove(oldItem); break; } } item.attachTo(mAdapterFixed); mAdapterFixed.add(item); updateFixedList(); return this; } /** * Adds a fixed divider to the drawer view */ public DrawerView addFixedDivider() { addFixedItem(new DrawerHeaderItem()); return this; } /** * Gets all fixed items from the drawer view * * @return Items from the drawer view */ public List<DrawerItem> getFixedItems() { return mAdapterFixed.getItems(); } /** * Gets a fixed item from the drawer view * * @param position The item position * @return Item from the drawer view */ public DrawerItem getFixedItem(int position) { return mAdapterFixed.getItem(position); } /** * Gets a fixed item from the drawer view * * @param id The item ID * @return Item from the drawer view */ public DrawerItem findFixedItemById(long id) { for (DrawerItem item : mAdapterFixed.getItems()) { if (item.getId() == id) { return item; } } return null; } /** * Selects a fixed item from the drawer view * * @param position The item position */ public DrawerView selectFixedItem(int position) { mAdapter.clearSelection(); mAdapterFixed.select(position); return this; } /** * Gets the selected fixed item position of the drawer view * * @return Position of the selected item */ public int getSelectedFixedPosition() { return mAdapterFixed.getSelectedPosition(); } /** * Selects a fixed item from the drawer view * * @param id The item ID */ public DrawerView selectFixedItemById(long id) { mAdapter.clearSelection(); int count = mAdapterFixed.getCount(); for (int i = 0; i < count; i++) { if (mAdapterFixed.getItem(i).getId() == id) { mAdapterFixed.select(i); return this; } } return this; } /** * Removes a fixed item from the drawer view * * @param item Item to remove */ public DrawerView removeFixedItem(DrawerItem item) { item.detach(); mAdapterFixed.remove(item); updateFixedList(); return this; } /** * Removes a fixed item from the drawer view * * @param position Position to remove */ public DrawerView removeFixedItem(int position) { mAdapterFixed.getItem(position).detach(); mAdapterFixed.remove(mAdapterFixed.getItem(position)); updateFixedList(); return this; } /** * Removes a fixed item from the drawer view * * @param id ID to remove */ public DrawerView removeFixedItemById(long id) { for (DrawerItem item : mAdapterFixed.getItems()) { if (item.getId() == id) { mAdapterFixed.remove(item); updateFixedList(); return this; } } return this; } /** * Removes all fixed items from the drawer view */ public DrawerView clearFixedItems() { for (DrawerItem item : mAdapterFixed.getItems()) { item.detach(); } mAdapterFixed.clear(); updateFixedList(); return this; } /** * Gets the fixed item click listener of the drawer view * * @return Item click listener of the drawer view */ public DrawerItem.OnItemClickListener getOnFixedItemClickListener() { return mOnFixedItemClickListener; } /** * Sets a fixed item click listener to the drawer view * * @param listener Listener to set */ public DrawerView setOnFixedItemClickListener(DrawerItem.OnItemClickListener listener) { mOnFixedItemClickListener = listener; return this; } /** * Gets whether the drawer view has a fixed item click listener set to it * * @return True if the drawer view has a fixed item click listener set to it, false otherwise. */ public boolean hasOnFixedItemClickListener() { return mOnFixedItemClickListener != null; } /** * Removes the fixed item click listener from the drawer view. */ public DrawerView removeOnFixedItemClickListener() { mOnFixedItemClickListener = null; return this; } @Override public void onInsetsChanged(Rect insets) { if (loggingEnabled) Log.d(TAG, "onInsetsChanged()"); if (statusBarHeight != insets.top) { statusBarHeight = insets.top; updateProfileSpacing(); } } @Override protected void onSizeChanged(int w, int h, int oldW, int oldH) { if (loggingEnabled) Log.d(TAG, "onSizeChanged(" + w + ", " + h + ", " + oldW + ", " + oldH + ")"); super.onSizeChanged(w, h, oldW, oldH); if (w != oldW) { if (oldW == 0) { isInViewHierarchy = true; updateListVisibility(); updateProfile(); } if (drawerMaxWidth <= 0) { if (getLayoutParams().width != ViewGroup.LayoutParams.MATCH_PARENT && getLayoutParams().width != ViewGroup.LayoutParams.WRAP_CONTENT) { setDrawerMaxWidth(getLayoutParams().width); } else { resetDrawerMaxWidth(); } } updateDrawerWidth(); } } @Override public Parcelable onSaveInstanceState() { if (loggingEnabled) Log.d(TAG, "onSaveInstanceState()"); Bundle savedInstanceState = new Bundle(); savedInstanceState.putParcelable("instanceState", super.onSaveInstanceState()); savedInstanceState.putBoolean(STATE_PROFILE_LIST_OPEN, profileListOpen); savedInstanceState.putInt(STATE_LIST_SELECTION, mAdapter.getSelectedPosition()); savedInstanceState.putInt(STATE_FIXED_LIST_SELECTION, mAdapterFixed.getSelectedPosition()); return savedInstanceState; } @Override public void onRestoreInstanceState(Parcelable state) { if (loggingEnabled) Log.d(TAG, "onRestoreInstanceState()"); if (state instanceof Bundle) { Bundle savedInstanceState = (Bundle) state; if (savedInstanceState.containsKey(STATE_PROFILE_LIST_OPEN)) { if (savedInstanceState.getBoolean(STATE_PROFILE_LIST_OPEN, false)) { openProfileList(); } else { closeProfileList(); } } else { closeProfileList(); } if (savedInstanceState.containsKey(STATE_LIST_SELECTION)) { int listSelection = savedInstanceState.getInt(STATE_LIST_SELECTION, -1); if (listSelection >= 0 && listSelection < mAdapter.getCount()) { selectItem(listSelection); } else { if (savedInstanceState.containsKey(STATE_FIXED_LIST_SELECTION)) { int fixedListSelection = savedInstanceState.getInt(STATE_FIXED_LIST_SELECTION, -1); if (fixedListSelection >= 0 && fixedListSelection < mAdapterFixed.getCount()) { selectFixedItem(fixedListSelection); } } } } state = savedInstanceState.getParcelable("instanceState"); } super.onRestoreInstanceState(state); } }
[ "ganesh9405@gmail.com" ]
ganesh9405@gmail.com
794e43133db53d76b9245452499371ae79280801
63b8f78137bf0b95f55ca9c8d4df2a209471e67a
/javaEx/src/com/java/api/generics/v2/BoxApp.java
96815658a6f4c700065c0ae6d4d8c2eae5ef9aee
[]
no_license
sandee-han/bit-java
508d41c65ae8965419deb2960ea72308b18e122e
7b5a268bb16c2ed81bc2a0a4ab04990ae67539f3
refs/heads/master
2022-12-04T08:59:42.118868
2020-08-27T02:49:06
2020-08-27T02:49:06
284,865,249
0
0
null
null
null
null
UTF-8
Java
false
false
1,108
java
package com.java.api.generics.v2; // v2. public class BoxApp { public static void main(String[] args) { // 정수를 담을 수 있는 Box를 생성 // Box<Integer> intBox = new Box<Integer>(); // 타입을 Integer 지정 Box<Integer> intBox = new Box<>(); // 뒤의 것은 생략 가능 intBox.setContent(2020); // OK // intBox.setContent("2020"); // 컴파일러가 Generics를 체크 // 값을 꺼내와 봅니다 // 내부 데이터가 Integer임이 확실 -> 캐스팅 불필요 int content = intBox.getContent(); System.out.println("박스의 내용물: " + content); Box<String> strBox = new Box<>(); strBox.setContent("Java"); // 가능(String 타입 지정) // 값을 꺼내와 봅니다 String strContent = (String) strBox.getContent(); // 캐스팅 불필요 System.out.println("박스의 내용물: " + strContent); // 만약 캐스팅을 잘못하면? // 컴파일이 안된다(Generics를 체크) /* * strContent = (String)intBox.getContent(); * System.out.println("박스의 내용물: " + strContent); */ } }
[ "iwmism1938@naver.com" ]
iwmism1938@naver.com
ac5f8840fa9761755596652e22de2185ba914c9e
c212b115f9e68f9ab616c6934ae64382197708aa
/src/main/java/shepherd/standard/cluster/node/ClusterLevelEvent.java
caf5223ccd2a44e27f21c6edbdcd2c95bf52ddf8
[]
no_license
ali1995reza/Shepherd-Standard-Implement
c27be4a1b2148691f98a90180c7488e1803ee67b
75a19d8ecf173e08c2d05fb6cd55fc6c716e26a8
refs/heads/master
2023-01-20T10:39:12.644696
2020-11-29T17:31:39
2020-11-29T17:31:39
302,421,664
0
0
null
null
null
null
UTF-8
Java
false
false
1,474
java
package shepherd.standard.cluster.node; import shepherd.standard.datachannel.IoChannel; import shepherd.utils.buffer.ByteBufferArray; final class ClusterLevelEvent { enum Type { DATA_RECEIVED , CONNECT , DISCONNECT; boolean is(Type t) { return this == t; } boolean isNot(Type t) { return this!=t; } } final static ClusterLevelEvent disconnectEvent(IoChannel c) { return new ClusterLevelEvent(c , Type.DISCONNECT); } final static ClusterLevelEvent connectEvent(IoChannel c) { return new ClusterLevelEvent(c , Type.CONNECT); } final static ClusterLevelEvent dataEvent(IoChannel c , ByteBufferArray data) { return new ClusterLevelEvent(c , data); } private IoChannel ioChannel; private ByteBufferArray data; private Type type; public ClusterLevelEvent(IoChannel c , Type t , ByteBufferArray d) { ioChannel = c; type = t; data = d; } public ClusterLevelEvent(IoChannel c , ByteBufferArray d) { this(c , Type.DATA_RECEIVED , d); } public ClusterLevelEvent(IoChannel c , Type t) { this(c , t , null); } public ByteBufferArray data() { return data; } public Type type() { return type; } public boolean is(Type t) { return type==t; } public IoChannel channel() { return ioChannel; } }
[ "alirezaakhoundi73@gmail.com" ]
alirezaakhoundi73@gmail.com
d140ed6a948174951cbf2519bd92de941089b9f3
286a52782d3ce2368d905c6116b80930537c8bc4
/src/udemy/academy/learnprogramming/_13_challenge3/Main.java
27b695b76acb839237f4ba994e6102b9f39b524f
[]
no_license
prakshh/dataStructuresAndAlgorithms
59f8ab49d939c2ca5748a8f4017450e3349120a5
751ba3725a403b4ebe9bf3cad66b3b93660cbe4e
refs/heads/main
2023-04-19T17:43:49.801915
2021-05-09T06:45:59
2021-05-09T06:45:59
355,410,141
0
0
null
null
null
null
UTF-8
Java
false
false
1,557
java
package udemy.academy.learnprogramming._13_challenge3; // sort following strings using radix sort public class Main { public static void main(String[] args) { String[] stringsArray = { "bcdef", "dbaqc", "abcde", "omadd", "bbbbb"}; // do radix sort radixSort(stringsArray, 26, 5); for (int i = 0; i < stringsArray.length; i++) { System.out.println(stringsArray[i]); } } public static void radixSort(String[] input, int radix, int width) { for (int i = width - 1; i >= 0; i--) { radixSingleSort(input, i, radix); } } public static void radixSingleSort(String[] input, int position, int radix) { int numItems = input.length; int[] countArray = new int[radix]; for (String value: input) { countArray[getIndex(position, value)]++; } // Adjust the count array for (int j = 1; j < radix; j++) { countArray[j] += countArray[j - 1]; } String[] temp = new String[numItems]; for (int tempIndex = numItems - 1; tempIndex >= 0; tempIndex--) { temp[--countArray[getIndex(position, input[tempIndex])]] = input[tempIndex]; } for (int tempIndex = 0; tempIndex < numItems; tempIndex++) { input[tempIndex] = temp[tempIndex]; } } public static int getIndex(int position, String value) { return value.charAt(position) - 'a'; } }
[ "prakashdas18@gmail.com" ]
prakashdas18@gmail.com
a39f2b6110e357f0474f3f42540aafe7126fbec2
03ec2d044f75a755fd40b85954ad73dda71fd943
/src/main/java/sapacClient/oracle/iam/ws/sap/ac10/lookup/GracTWsLuOpBproc.java
4574a572bc57d7f9fd751d1286493c1506a3151a
[]
no_license
keshavkr/SAPACUM
6d63d077c1ad9241eeb24c6eae9d27f95435091c
6be7a3e10a44ce37523a44824c5802b08a9b9bc0
refs/heads/master
2020-04-02T09:27:56.454997
2018-10-24T09:20:53
2018-10-24T09:20:53
154,293,994
0
0
null
null
null
null
UTF-8
Java
false
false
1,812
java
package oracle.iam.ws.sap.ac10.lookup; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for GracTWsLuOpBproc complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="GracTWsLuOpBproc"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="item" type="{urn:sap-com:document:sap:soap:functions:mc-style}GracSWsLuOpBproc" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "GracTWsLuOpBproc", propOrder = { "item" }) public class GracTWsLuOpBproc { protected List<GracSWsLuOpBproc> item; /** * Gets the value of the item property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the item property. * * <p> * For example, to add a new item, do as follows: * <pre> * getItem().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link GracSWsLuOpBproc } * * */ public List<GracSWsLuOpBproc> getItem() { if (item == null) { item = new ArrayList<GracSWsLuOpBproc>(); } return this.item; } }
[ "keshavkr86@gmail.com" ]
keshavkr86@gmail.com
dcba0e84bb395034c2b9cdc5ecf0d3542ffa6bd0
327d615dbf9e4dd902193b5cd7684dfd789a76b1
/base_source_from_JADX/sources/com/google/android/gms/internal/ads/zzdye.java
22cd41a81e3f8c2e16ead156716969931a442106
[]
no_license
dnosauro/singcie
e53ce4c124cfb311e0ffafd55b58c840d462e96f
34d09c2e2b3497dd452246b76646b3571a18a100
refs/heads/main
2023-01-13T23:17:49.094499
2020-11-20T10:46:19
2020-11-20T10:46:19
314,513,307
0
0
null
null
null
null
UTF-8
Java
false
false
923
java
package com.google.android.gms.internal.ads; import java.util.concurrent.Callable; import java.util.concurrent.Executor; final class zzdye extends zzdyh<V> { private final Callable<V> zzhxf; private final /* synthetic */ zzdyf zzhxg; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ zzdye(zzdyf zzdyf, Callable<V> callable, Executor executor) { super(zzdyf, executor); this.zzhxg = zzdyf; this.zzhxf = (Callable) zzdvv.checkNotNull(callable); } /* access modifiers changed from: package-private */ public final void setValue(V v) { this.zzhxg.set(v); } /* access modifiers changed from: package-private */ public final V zzazk() { return this.zzhxf.call(); } /* access modifiers changed from: package-private */ public final String zzazl() { return this.zzhxf.toString(); } }
[ "dno_sauro@yahoo.it" ]
dno_sauro@yahoo.it
cc7fd9ea4ce84db18bbdb824b3952b9f0b9329f0
c7c6d665bdbcb68e5d48039e056f2b866ddca3f9
/app/src/main/java/com/app_republic/test_app/SwipeToDeleteCallback.java
84b62097e856773a3687a78d21a5e0dd4190f742
[]
no_license
elhadjhamlaoui/Simple-UI
c3743a9eb21e6f5cbda6379d614acf67712c1603
bdf6e10e8986beb0f35b4e4ff7baad7884d78c59
refs/heads/master
2020-05-21T09:10:54.137901
2019-05-10T14:19:45
2019-05-10T14:19:45
185,993,048
1
0
null
null
null
null
UTF-8
Java
false
false
1,216
java
package com.app_republic.test_app; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.helper.ItemTouchHelper; import com.app_republic.test_app.adapter.CardAdapter; import com.app_republic.test_app.adapter.PostAdapter; import static com.app_republic.test_app.util.Const.TYPE_HOME; public class SwipeToDeleteCallback extends ItemTouchHelper.SimpleCallback { private RecyclerView.Adapter mAdapter; private int type; public SwipeToDeleteCallback(RecyclerView.Adapter adapter, int type) { super(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT); mAdapter = adapter; this.type = type; } @Override public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, @NonNull RecyclerView.ViewHolder viewHolder1) { return false; } @Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { int position = viewHolder.getAdapterPosition(); if (type == TYPE_HOME) ((PostAdapter) mAdapter).deleteItem(position); else ((CardAdapter) mAdapter).deleteItem(position); } }
[ "elhadjhamlaoui@gmail.com" ]
elhadjhamlaoui@gmail.com
95371d6325576d7a380be9837515e21f0571105e
c2c9728551c653faac3d5b34fbf28eee5d5ba162
/src/Pieces/ChessPiece.java
753c3a419f0ca78d4cda6157446fdc8b4bbe87d2
[]
no_license
GregoirePelegrin/JAVA_Chess
a9b0fcd49ae6ed454c555742be237423bfb32330
8bd5854db5c17b29c42c86c2025eeca827f8c248
refs/heads/main
2023-02-09T23:31:42.446215
2020-12-31T17:10:00
2020-12-31T17:10:00
325,356,311
0
0
null
null
null
null
UTF-8
Java
false
false
1,147
java
package Pieces; import Board.Cell; import Manager.GameManager; import Utils.Side; import java.util.ArrayList; public abstract class ChessPiece { protected boolean dead = false; protected GameManager gm; protected String name; protected Cell position; protected boolean selected = false; protected Side side; public abstract ArrayList<Cell> possibleAttacks(); public abstract ArrayList<Cell> possibleMove(); public Side getSide(){ return this.side; } public boolean isSelected() { return this.selected; } public void move(Cell nextCell) { if(this.selected){ if(this.possibleMove().contains(nextCell)){ this.position.setOccupantEmpty(); nextCell.setOccupant(this); } this.selected = false; } } public void select(){ this.selected = !this.selected; } public void setPosition(Cell cell){ this.position = cell; } public String toString(){ if(this.side == Side.BLACK) return this.name.toLowerCase(); return this.name; } }
[ "pelegrin.gregoire@gmail.com" ]
pelegrin.gregoire@gmail.com
d8db3808e900ca5139643c62193201bcd552ae85
de0daed4659ff8718cab4dbc167bd66cbfcf2a89
/app/src/main/java/com/example/googlemapsaudio/BluetoothReceiverImpl.java
dd42a3956729369fcfd80dbe84796f4a421bf803
[]
no_license
mronestonyo/GoogleMapsAudio
23eee1161792f8dd07dad2629babe8d14b5117ef
794cc4b34145c174574951ee92e5320ba5d970ac
refs/heads/master
2020-10-02T03:26:33.036042
2019-12-16T00:42:14
2019-12-16T00:42:14
227,690,708
0
0
null
null
null
null
UTF-8
Java
false
false
3,185
java
package com.example.googlemapsaudio; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothHeadset; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; import android.widget.Toast; public class BluetoothReceiverImpl extends BroadcastReceiver { public static Boolean isBluetoothConnected = false; private BluetoothListener bluetoothListener; @Override public void onReceive(Context context, Intent intent) { if (intent != null) { String action = intent.getAction(); if (action != null) { if (BluetoothDevice.ACTION_ACL_CONNECTED.equals(action)) { Log.d("antonhttp", "ACL is now Connected"); isBluetoothConnected = true; } else if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)) { Log.d("antonhttp", "ACL is now Disconnected"); isBluetoothConnected = false; if (bluetoothListener != null) bluetoothListener.clearDevices(); } else if (action.equals(BluetoothHeadset.STATE_AUDIO_CONNECTED)) { int isConnected = intent.getIntExtra(BluetoothHeadset.EXTRA_STATE, BluetoothHeadset.STATE_AUDIO_DISCONNECTED); if (isConnected == BluetoothHeadset.STATE_AUDIO_CONNECTED) { isBluetoothConnected = true; } else if (isConnected == BluetoothHeadset.STATE_AUDIO_DISCONNECTED) { isBluetoothConnected = false; } } if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) { final int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR); switch (state) { case BluetoothAdapter.STATE_OFF: //Toast.makeText(context, "Bluetooth off", Toast.LENGTH_SHORT).show(); isBluetoothConnected = false; if (bluetoothListener != null) bluetoothListener.clearDevices(); break; case BluetoothAdapter.STATE_TURNING_OFF: //Toast.makeText(context, "Turning Bluetooth off...", Toast.LENGTH_SHORT).show(); break; case BluetoothAdapter.STATE_ON: isBluetoothConnected = true; //Toast.makeText(context, "Bluetooth on", Toast.LENGTH_SHORT).show(); break; case BluetoothAdapter.STATE_TURNING_ON: //Toast.makeText(context, "Turning Bluetooth on...", Toast.LENGTH_SHORT).show(); break; } } } } } void setBluetoothListener(BluetoothListener listener) { bluetoothListener = listener; } }
[ "antonio.ones@accenture.com" ]
antonio.ones@accenture.com
b4ab39f5bde05d56e21eaf6c150354820c542485
63be41e6c2c472340c3e7182527f266fd3368988
/src/customerHCLAssignment/CustomerDao.java
7ea8b1e6f01d42225945dcd08ca5c90188975332
[]
no_license
Dhathri29/HCLTrainings
9d5c71c7cedc68701a9ef303d867fcb4fa2ea7b9
bda69b3ad96fba2c859a9b1d1be192add6079abd
refs/heads/master
2023-01-16T05:33:31.555846
2020-11-07T16:29:50
2020-11-07T16:29:50
305,795,006
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
package customerHCLAssignment; import java.util.List; import java.util.Optional; public interface CustomerDao { public void addCustomer(Customer customer); public void delCustomer(int id); public void updateCustomer(int id, double purchase_capacity); public List<Customer> getAllCustomer(); public Optional<Customer> getCustomerById(int id); public List<Customer> getSelectedCustomer(double purchase_capacity); }
[ "dhathrivupparapalli@gmail.com" ]
dhathrivupparapalli@gmail.com
5682e7f8932d014bb0a6631e51b1fdfb9a55c375
bc1bd728540052344b7d134d3a9b1891e4c57c04
/박지훈2819/src/chapter2/operationEx3.java
7c9aece6fe476415233ed297684008939f3959f2
[]
no_license
jihoon2819/javaStudy
8fa153bf90c10e7d66795acbbf9bc9169bd80994
80876ed39062c4e53b89925db659090d18a4909c
refs/heads/master
2023-07-05T02:08:38.579120
2021-08-05T12:28:19
2021-08-05T12:28:19
393,030,759
0
0
null
null
null
null
UHC
Java
false
false
1,409
java
package chapter2; /** * *삼항연산자 * 조건식이 참이면 : 콜론앞의 결과를 반환 * 조거식이 거짓이면: 콜돈뒤의 결과를 반환 */ public class operationEx3 { public static void main(String[] args) { char select = 'Y'; // 대소문자 확인 boolean trueFalse = false; trueFalse = (select == 'y' ? true: false); System.out.println(trueFalse); System.out.println(select == 'y' ? true: false); // 조건식이 그대로 들어가도 같다. System.out.println( select == 'Y' ? "참이다": select == 'y' ? "참이다": "거짓이다"); /** * 예제 * score = 89; * grade = 'F' * 조건식 = socre == 0~59면 "F학점" 출력 socre == 60~69 "D학점" socre == 70~79 면 "C학점" * socre == 80~89"B학점" socre == 90~100"A학점" * System.out.println("학점은 "+ grade + score); * */ int score = 89; char grade = 'F'; // "" 의 의미는 문자열 grade = (score >= 0 && score <60) ? 'F' : (score < 70) ? 'D' : (score < 80) ? 'C' : (score < 90) ? 'B' : (score <= 100) ? 'A' : ' '; System.out.println("학점은 "+ grade + score); //grade = (score <= 59 ? grade=grade[5] : //score <= 59 ? grade=grade[4] //score <= 69 ? grade=grade[3] //score <= 79 ? grade=grade[2] //score <= 89 ? grade=grade[1] ); 오답 --- //String class } }
[ "ITPS@DESKTOP-NUOPUIF" ]
ITPS@DESKTOP-NUOPUIF
ee9b08589c6ec6102b24786b5151d2979b1f197c
73364c57427e07e90d66692a3664281d5113177e
/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/SetAutoSaveDataEntrySettingAction.java
bb488e2ae281e187e44c9a06f0adb80f15961271
[ "BSD-3-Clause" ]
permissive
abyot/sun-pmt
4681f008804c8a7fc7a75fe5124f9b90df24d44d
40add275f06134b04c363027de6af793c692c0a1
refs/heads/master
2022-12-28T09:54:11.381274
2019-06-10T15:47:21
2019-06-10T15:47:21
55,851,437
0
1
BSD-3-Clause
2022-12-16T12:05:12
2016-04-09T15:21:22
Java
UTF-8
Java
false
false
3,102
java
package org.hisp.dhis.trackedentity.action.dataentryform; /* * Copyright (c) 2004-2017, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import org.hisp.dhis.user.UserSettingKey; import org.hisp.dhis.user.UserSettingService; import com.opensymphony.xwork2.Action; /** * @author Chau Thu Tran * * @version SetAutoSaveDataEntrySettingAction.java 01:12:09 PM Apr 05, 2013 $ */ public class SetAutoSaveDataEntrySettingAction implements Action { // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- private UserSettingService userSettingService; public void setUserSettingService( UserSettingService userSettingService ) { this.userSettingService = userSettingService; } // ------------------------------------------------------------------------- // Input / Output // ------------------------------------------------------------------------- private boolean autoSave; public void setAutoSave( boolean autoSave ) { this.autoSave = autoSave; } // ------------------------------------------------------------------------- // Implementation Action // ------------------------------------------------------------------------- @Override public String execute() throws Exception { userSettingService.saveUserSetting( UserSettingKey.AUTO_SAVE_CASE_ENTRY_FORM, autoSave ); return SUCCESS; } }
[ "abyota@gmail.com" ]
abyota@gmail.com
b9f5258a4a12048c6ea16fd2ceaa6618fd46a0e2
6d4ae7224b021913ce0b782687fb24fc89f7a5e5
/java-8.3/银行高级案例/银行案例/Model/LoanInfo.java
c179fa5e3aab6745c766b2904b55be3d94951671
[]
no_license
numberfirst/Java
c1be05dc1744dca8df6917d5f3408ed8457402db
1966d85d4c2e0cf250209b27d47084b54fd917b4
refs/heads/master
2021-01-20T01:27:32.960505
2017-08-31T09:43:53
2017-08-31T09:43:53
101,288,502
0
0
null
null
null
null
UTF-8
Java
false
false
1,498
java
package 银行案例.Model; import java.math.BigDecimal; public class LoanInfo{ private Account account; private BigDecimal loanNum; private int loanYears; private BigDecimal repayment; private boolean hasHouse; private boolean mortHouse; private double salary; private int grade; private String date; public Account getAccount() { return account; } public void setAccount(Account account) { this.account = account; } public BigDecimal getLoanNum() { return loanNum; } public void setLoanNum(BigDecimal loanNum) { this.loanNum = loanNum; } public int getLoanYears() { return loanYears; } public void setLoanYears(int loanYears) { this.loanYears = loanYears; } public BigDecimal getRepayment() { return repayment; } public void setRepayment(BigDecimal repayment) { this.repayment = repayment; } public boolean isHasHouse() { return hasHouse; } public void setHasHouse(boolean hasHouse) { this.hasHouse = hasHouse; } public boolean isMortHouse() { return mortHouse; } public void setMortHouse(boolean mortHouse) { this.mortHouse = mortHouse; } public double getSalary() { return salary; } public void setSalary(double salary) { this.salary = salary; } public int getGrade() { return grade; } public void setGrade(int grade) { this.grade = grade; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } }
[ "Ben@Ben-PC" ]
Ben@Ben-PC
18547b54b8f8014307f5cd8542db3565d5e627da
fe50a246874ccbde29427071c44bda854f03e589
/Arvore Rubro Negra/Main.java
ce6a81097560a1ff2db02bd1cedcc21f95c5fc79
[]
no_license
OliAtaide/Estrutura-de-Dados-Nao-Lineares
50a0b423a286b5d07f862f6bcc7fd2e2bac53646
6ec6064cc7262318113df0ce736afdfd07ac86ac
refs/heads/master
2023-04-08T19:18:31.932100
2021-04-26T16:07:19
2021-04-26T16:07:19
349,515,270
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
public class Main { public static void printTree(Tree t) { int h = t.height(t.getRoot()); t.inOrder(t.getRoot()); int w = t.nodes.size(); int[][] vector = new int[h][w]; for (int i = 0; i < w; i++) { Node n = t.nodes.get(i); vector[t.depth(n)][i] = n.getKey(); } for (int l = 0; l < h; l++) { for (int c = 0; c < w; c++) { System.out.print((vector[l][c] != 0 ? vector[l][c] : "") + "\t"); } System.out.println(""); } } public static void main(String[] args) { Tree t = new Tree(); t.insert(13); t.insert(6); t.insert(24); t.insert(5); t.insert(41); t.insert(7); t.insert(12); t.insert(27); t.insert(57); t.insert(44); t.remove(13); t.remove(7); printTree(t); } }
[ "filipe.ataide@escolar.ifrn.edu.br" ]
filipe.ataide@escolar.ifrn.edu.br
e967d171e6ff18976dafdc9515c4569cf0312919
d2e12b769c0e411375b4dcb665bf78b6a5bb6383
/Fake-Reddit-Spring/src/test/java/com/ga/controller/ProfileControllerTest.java
30364c223d965f3f2a66f2e14fc0bc4be5a89d3d
[]
no_license
david8015/FakeReddit
32827e6e37b18bfe2099847b3d8788150a6b6290
df711cd06a4c9d159fe26626a4f0abdb6c669839
refs/heads/master
2022-12-21T11:07:03.271358
2019-10-28T18:20:19
2019-10-28T18:20:19
216,585,189
0
0
null
2022-02-10T00:15:45
2019-10-21T14:12:36
Java
UTF-8
Java
false
false
4,648
java
package com.ga.controller; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.mock; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import java.util.ArrayList; import java.util.List; import static org.mockito.Mockito.when; import com.fasterxml.jackson.databind.util.ObjectBuffer; import com.ga.entity.Profile; import com.ga.service.CommentService; import com.ga.service.ProfileService; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.RequestBuilder; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import com.fasterxml.jackson.databind.ObjectMapper; import com.ga.entity.Comment; import com.ga.entity.Post; import com.ga.entity.User; import com.ga.service.PostService; import org.springframework.web.servlet.config.annotation.EnableWebMvc; @EnableWebMvc @RunWith(MockitoJUnitRunner.class) public class ProfileControllerTest { private MockMvc mockMvc; @InjectMocks ProfileController profileController; @InjectMocks User user; @InjectMocks Profile profile; @Mock ProfileService profileService; @Before public void init() { mockMvc = MockMvcBuilders.standaloneSetup(profileController).build(); user = new User(); profile = new Profile(); user.setUserId(1L); user.setEmail("test@email.com"); user.setUsername("test"); profile.setProfileId(1L); profile.setAddress("test address"); profile.setMobile("test mobile"); //profile.setAdditionalEmail("test additional email"); user.setProfile(profile); } @Test public void getProfileByUserId_Profile_Success() throws Exception { RequestBuilder requestBuilder = MockMvcRequestBuilders .get("/profile/user/1"); ObjectMapper mapper = new ObjectMapper(); String profileByUsername = mapper.writeValueAsString(profile); when(profileService.getUserProfile(anyLong())).thenReturn(profile); mockMvc.perform(requestBuilder) .andExpect(status().isOk()) .andExpect(content().string(profileByUsername)); } @Test public void createProfileByUsername_Profile_Success() throws Exception { RequestBuilder requestBuilder = MockMvcRequestBuilders .post("/profile/user/test") .contentType(MediaType.APPLICATION_JSON) .content(createProfileInJson(profile.getMobile(), profile.getAddress())); when(profileService.createUserProfile(anyString(), any())).thenReturn(profile); ObjectMapper mapper = new ObjectMapper(); String profile2 = mapper.writeValueAsString(profile); mockMvc.perform(requestBuilder) .andExpect(status().isOk()) .andExpect(content().string(profile2)); } @Test public void updatePost_Post_Success() throws Exception{ RequestBuilder requestBuilder = MockMvcRequestBuilders .put("/profile/1") .contentType(MediaType.APPLICATION_JSON) .content(createProfileInJson(profile.getMobile(), profile.getAddress())); when(profileService.updateProfile(any(), anyLong())).thenReturn(profile); ObjectMapper mapper = new ObjectMapper(); String profile2 = mapper.writeValueAsString(profile); System.out.println(profile2); mockMvc.perform(requestBuilder) .andExpect(status().isOk()) .andExpect(content().string(profile2)); } @Test public void deleteProfile_Profile_Success() throws Exception{ RequestBuilder requestBuilder = MockMvcRequestBuilders .delete("/profile/1"); when(profileService.deleteProfileById(anyLong())).thenReturn(1L); mockMvc.perform(requestBuilder) .andExpect(status().isOk()) .andExpect(content().json("1")); } public static String createProfileInJson( String mobile, String address){ return "{ \"mobile\": \"" + mobile + "\", " + "\"address\":\"" + address + "\" }"; } }
[ "karasik.benjamin28@gmail.com" ]
karasik.benjamin28@gmail.com
b0f5ca8bc14a30c8fa230c81b304ce1501fc108b
4feac515c4d97718d285ef012208f0cdcce6387c
/src/main/java/delight/async/flow/CallbackMap.java
7307d42b3adea3001dab060f2ec0fd3a83e85272
[]
no_license
javadelight/delight-async
a89ba70614799f35099a1b174035f2334aac7890
d8e5b02715032414fd750427f22070ecd668c3f3
refs/heads/master
2023-09-04T04:01:04.017915
2023-08-31T20:48:35
2023-08-31T20:48:35
38,526,021
1
0
null
2023-08-31T20:48:36
2015-07-04T07:36:38
Java
UTF-8
Java
false
false
2,576
java
/******************************************************************************* * Copyright 2011 Max Erik Rohde http://www.mxro.de * * All rights reserved. ******************************************************************************/ package delight.async.flow; import delight.async.Value; import delight.async.callbacks.ListCallback; import delight.async.callbacks.ValueCallback; import delight.functional.collections.CollectionsUtils; import delight.functional.collections.IdentityArrayList; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * This utility class supports in writing Java in a more asynchronous style. * This class allows to <i>collect</i> the results from various callbacks, which * result from calling a method on all elements of a list. The callback provided * by this class will only be called if all the callbacks for the individual * list elements have been executed. * * @author Max Rohde * * @param <GInput> * @param <GOutput> */ public class CallbackMap<GInput, GOutput> { final Map<Integer, GOutput> responseMap; final List<GInput> messages; final int expectedSize; final ListCallback<GOutput> callback; public ValueCallback<GOutput> createCallback(final GInput message) { return new ValueCallback<GOutput>() { @Override public void onSuccess(final GOutput response) { synchronized (responseMap) { responseMap.put(messages.indexOf(message), response); if (CollectionsUtils.isMapComplete(responseMap, expectedSize)) { final List<GOutput> localResponses = CollectionsUtils .toOrderedList(responseMap); callback.onSuccess(localResponses); } } } Value<Boolean> failureReported = new Value<Boolean>(false); @Override public void onFailure(final Throwable t) { // failure should be reported only once. synchronized (failureReported) { if (!failureReported.get()) { callback.onFailure(t); } else { throw new RuntimeException(t); // TODO maybe disable ... } failureReported.set(true); } } }; } public CallbackMap(final List<GInput> messages, final ListCallback<GOutput> callback) { super(); this.messages = new IdentityArrayList<GInput>(messages); this.responseMap = new HashMap<Integer, GOutput>(); expectedSize = messages.size(); this.callback = callback; if (expectedSize == 0) { this.callback.onSuccess(new ArrayList<GOutput>(0)); } } }
[ "mxro@nowhere.com" ]
mxro@nowhere.com
9105b743dc760acc10a0c63968801ccd1007e712
05492ee233030e833ace9d2d0414a75f8c283c71
/src/main/java/com/test/jwt/entity/UserCustom.java
8d7d2dbc4ba84b5b59e067cf1facf622540fec1e
[]
no_license
ih0615/jwtPractice
34e18e2e0a24b7bd1b091cfbc459dfa0d6237a0f
c6be3fcdb3d578a89563ba33cf4177f893e1917d
refs/heads/master
2023-04-15T04:50:15.821310
2021-04-14T04:49:16
2021-04-14T04:49:16
357,773,836
0
0
null
null
null
null
UTF-8
Java
false
false
476
java
package com.test.jwt.entity; import com.test.jwt.response.UserResponseDto; import java.util.List; public interface UserCustom { //전체 찾기 List<UserResponseDto.UserCommonDto> findAllUser(); //자신 찾기 UserResponseDto.UserCommonDto findOneUser(String userId); //로그인시 자신 정보 불러오기 User findOneByUserId(String userId); //로그인 시 자신의 idx 정보 가지고 오기 Long findIdxByUserId(String userId); }
[ "ih0615@naver.com" ]
ih0615@naver.com
c9f35455528c11b10f5ca2ab1a375995893148d1
c9bf67665f1d9ee617ec65b13e91fea8cb218881
/client/test/edu/rit/se/sse/rapdevx/MainTest.java
f0865e132dbf7f4e2809369477929fe7d2418ba7
[]
no_license
rit-sse/rapdevx
2b1d81416d4e1b56a8076d26c6c056bd100a16a2
ef61497ab272cb261b70b163827c9d5a95e32665
refs/heads/master
2020-05-19T14:14:05.952501
2011-12-21T01:36:11
2011-12-21T01:36:11
2,895,887
3
1
null
null
null
null
UTF-8
Java
false
false
217
java
package edu.rit.se.sse.rapdevx; import org.junit.Test; /** * Sample test class * @author Derek Erdmann */ public class MainTest { @Test public void test() { } @Test public void failingTest(){ } }
[ "derek@derekerdmann.com" ]
derek@derekerdmann.com
f86714a556c8eba18472cfa960d5c85e86142d8c
0653d37519a8c022b03528282c36bf6b18e9ae98
/HackerRank/src/challengesAlgorithms/warmup/PlusMinus.java
c8ef8ed16d3c3638bb87767a3c228382c3623078
[]
no_license
ArturMiranda/HackerRank
8044b1d04b282fe95b6988bbe28642ee377356d7
db84ecc0dda35678dae5a2d14799a5e66efb010a
refs/heads/master
2022-04-01T09:42:38.762078
2020-02-15T18:44:39
2020-02-15T18:44:39
108,486,064
2
0
null
null
null
null
UTF-8
Java
false
false
962
java
package challengesAlgorithms.warmup; import java.util.Scanner; public class PlusMinus { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] arr = new int[n]; int positives=0, negatives=0, zeroes=0; for(int arr_i = 0; arr_i < n; arr_i++){ arr[arr_i] = in.nextInt(); if(arr[arr_i] > 0){ positives++; } else if(arr[arr_i] < 0){ negatives++; } else { zeroes++; } } float qtd = (float) (n * 1.0); System.out.printf("%.6f\n", (float)(positives/qtd)); System.out.printf("%.6f\n", (double)(negatives/qtd)); System.out.printf("%.6f\n", (double)(zeroes/qtd)); in.close(); } }
[ "arturjunior87@gmail.com" ]
arturjunior87@gmail.com
138546d55904220ff5e67c4da903c67854cd97b2
3c944012d26dc91334b1aa3d2e081d89031d3f84
/app/src/main/java/ch/epfl/sqltest/User.java
5adc276cd4fe34e6ae9295f70b197b0df88bd533
[]
no_license
AmroAbdrabo/Android-sqlite-firebase
cb1c64f45ca129b2522835d7fd9407a721b32e38
eaae9f69ad4e01568695957001ddd94058613b4f
refs/heads/master
2022-04-11T16:53:34.191206
2020-03-26T16:27:26
2020-03-26T16:27:26
250,146,632
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package ch.epfl.sqltest; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.Ignore; import androidx.room.PrimaryKey; @Entity public class User { @PrimaryKey @ColumnInfo(name = "userID") @NonNull public String email; public User(String email, String firstName, String lastName) { this.email = email; this.firstName = firstName; this.lastName = lastName; } public String firstName; public String lastName; }
[ "amro.abdrabo@gmail.com" ]
amro.abdrabo@gmail.com
ce9474e0a1ecfff5479e2f7064b35ceebfbbdde0
91aef10d580c8f97d1ac3f83735c319ad8b0f0b6
/src/test/java/com/rmaj91/fishingstoreapi/store/controller/ItemControllerTest.java
53150b7c64b17d049f4c6f6f79852d74d3b2ea6e
[]
no_license
rmaj91/fishingStoreApi
9039e3a5407f18ceca2b59dee2f613214e3a387c
6fa90eddb5e99f1534319e75d39133b8d96fad9b
refs/heads/master
2020-12-20T23:35:41.890346
2020-02-22T18:29:42
2020-02-22T18:29:42
236,242,649
1
0
null
null
null
null
UTF-8
Java
false
false
1,482
java
package com.rmaj91.fishingstoreapi.store.controller; import com.rmaj91.fishingstoreapi.store.model.Item; import com.rmaj91.fishingstoreapi.store.service.ItemService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import java.util.Map; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; class ItemControllerTest { private Item item; @Mock private ItemService itemService; @InjectMocks private ItemController itemController; @BeforeEach void init() { item = new Item(); MockitoAnnotations.initMocks(this); } @Test void readAll() { itemController.readAll(); verify(itemService,times(1)).readAll(); } @Test void read() { itemController.read(1L); verify(itemService,times(1)).read(1L); } @Test void create(){ itemController.create(item); verify(itemService,times(1)).create(item); } @Test void update(){ itemController.update(item,1L); verify(itemService,times(1)).update(item,1L); } @Test void patch(){ Map map = Map.of(); itemController.patch(map,1L); verify(itemService,times(1)).patch(map,1L); } @Test void delete(){ itemController.delete(1L); verify(itemService,times(1)).delete(1L); } }
[ "rmaj91@gmail.com" ]
rmaj91@gmail.com
b68f7076124f9b9fa8e751d8f9ead9b9a83d5236
82bdbb61fbbaa8e267f7ed13cc098f56a55c7cf8
/AppInfoSystem/src/cn/appsys/pojo/AppVersion.java
61f40a9b96962a59f7a7258501122a553d1a5536
[]
no_license
yyq310277898/999
641e1c7bd7640caa43b804d4961640f5f14730f2
c8f8398f21a161e80e3c467c8e0f2f6341060236
refs/heads/master
2020-03-18T03:11:03.667362
2018-05-21T06:15:10
2018-05-21T06:15:10
134,226,782
0
0
null
null
null
null
UTF-8
Java
false
false
2,983
java
package cn.appsys.pojo; import java.math.BigDecimal; import java.util.Date; public class AppVersion { private Integer id;//主键id private Integer appId;//appId private String versionNo;//版本号 private String versionInfo;//版本描述 private Integer publishStatus;//发布状态id private String downloadLink;//apk文件下载链接 private BigDecimal versionSize;//版本大小 private Integer createdBy;//创建者 private Date creationDate;//创建时间 private Integer modifyBy;//更新者 private Date modifyDate;//更新时间 private String apkLocPath;//apk文件的服务器存储路径 private String appName;//APP软件名称 private String publishStatusName;//发布状态名称 private String apkFileName;//上传的apk文件名称 public String getApkFileName() { return apkFileName; } public void setApkFileName(String apkFileName) { this.apkFileName = apkFileName; } public String getPublishStatusName() { return publishStatusName; } public void setPublishStatusName(String publishStatusName) { this.publishStatusName = publishStatusName; } public String getAppName() { return appName; } public void setAppName(String appName) { this.appName = appName; } public String getApkLocPath() { return apkLocPath; } public void setApkLocPath(String apkLocPath) { this.apkLocPath = apkLocPath; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getAppId() { return appId; } public void setAppId(Integer appId) { this.appId = appId; } public String getVersionNo() { return versionNo; } public void setVersionNo(String versionNo) { this.versionNo = versionNo; } public String getVersionInfo() { return versionInfo; } public void setVersionInfo(String versionInfo) { this.versionInfo = versionInfo; } public Integer getPublishStatus() { return publishStatus; } public void setPublishStatus(Integer publishStatus) { this.publishStatus = publishStatus; } public String getDownloadLink() { return downloadLink; } public void setDownloadLink(String downloadLink) { this.downloadLink = downloadLink; } public BigDecimal getVersionSize() { return versionSize; } public void setVersionSize(BigDecimal versionSize) { this.versionSize = versionSize; } public Integer getCreatedBy() { return createdBy; } public void setCreatedBy(Integer createdBy) { this.createdBy = createdBy; } public Date getCreationDate() { return creationDate; } public void setCreationDate(Date creationDate) { this.creationDate = creationDate; } public Integer getModifyBy() { return modifyBy; } public void setModifyBy(Integer modifyBy) { this.modifyBy = modifyBy; } public Date getModifyDate() { return modifyDate; } public void setModifyDate(Date modifyDate) { this.modifyDate = modifyDate; } }
[ "you@example.com" ]
you@example.com
1459d2eb8badbc90144656ab3de79c0099e8c9f8
ffd01501bb53bfaaf180da7719e94a5459a996ee
/Module4/case_study_module4/src/main/java/com/example/entity/service/RentType.java
c21be6f4a39b83889ddaffa90e231e8e1c181be0
[]
no_license
huuhan2507/C1020G1-Tranhuuhan
6b01b85e8c7d1bd585fc66365a965c3df5ee80a4
e42f7089c1b5318439c311115ed8d94afe8ae146
refs/heads/main
2023-04-19T15:46:38.638524
2021-05-11T12:14:08
2021-05-11T12:14:08
331,478,784
0
2
null
null
null
null
UTF-8
Java
false
false
473
java
package com.example.entity.service; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import javax.persistence.*; import java.util.Set; @NoArgsConstructor @Getter @Setter @Entity public class RentType { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer rentTypeId; private String rentTypeName; private Double rentTypeCost; @OneToMany(mappedBy = "rentType") private Set<Service> services; }
[ "you@example.com" ]
you@example.com
d655791163a1c1ceb094e99c474db55181fa80f0
5105c05a0f3e34ccd4beecb5c8cc6bd6fb8d5050
/src/main/java/xf/xflp/base/item/PositionType.java
1d5039b32af7ebbdad27143788423f1f38597c22
[ "MIT" ]
permissive
hschneid/xflp
1799b6079facb1685e3066c379f8284d2aabd65a
ac5d1c7b566713af2dca88376915b72228732942
refs/heads/master
2023-06-07T06:19:39.701274
2023-05-25T12:17:13
2023-05-25T12:17:13
99,508,195
32
9
MIT
2023-05-25T11:37:11
2017-08-06T19:20:39
Java
UTF-8
Java
false
false
121
java
package xf.xflp.base.item; public enum PositionType { TMP, ROOT, BASIC, EXTENDED_H, EXTENDED_V; }
[ "holger.schneider.81@gmail.com" ]
holger.schneider.81@gmail.com
32383cc8d007dc17bd614bb91f6b0f8d1cc36ec5
ba2a31c78c3d3c52b2cda5ca3de51ef391dbbbd7
/dataManager/Restaurant.java
7ba770ac0d12a6ff3e3c88903d7379bb76484f94
[]
no_license
heyitztoby/CZ2002
aac7898824348a48cc38e7f018918225e36a9888
f8eb3625d291d041809928e5350b68325b887854
refs/heads/main
2023-04-22T18:51:07.385470
2021-04-22T06:43:12
2021-04-22T06:43:12
360,417,897
0
0
null
null
null
null
UTF-8
Java
false
false
5,990
java
package app.dataManager; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import app.AppConstants; import app.model.Booking; import app.model.Invoice; import app.model.MenuItem; import app.model.Order; import app.model.OrderItem; import app.model.PromotionItem; import app.util.Utility; public class Restaurant implements AppConstants{ private static Restaurant instance = null; private BookingManager bookingMgr; private OrderManager orderMgr; private InvoiceManager invoicesMgr; private TableManager tableMgr; private Menu menu; public static Restaurant getInstance() { // singleton design pattern if (instance==null) { instance = new Restaurant(); } return instance; } private Restaurant() { this.bookingMgr = new BookingManager(); this.orderMgr = new OrderManager(); this.invoicesMgr = new InvoiceManager(); this.tableMgr = new TableManager(); this.menu = new Menu(); } public BookingManager getBookingMgr() { return bookingMgr; } public OrderManager getOrderMgr() { return orderMgr; } public InvoiceManager getInvoicesMgr() { return invoicesMgr; } public TableManager getTableMgr() { return tableMgr; } public Menu getMenu() { return menu; } public void initWithDefaultData() { initWithDefaultMenu(); } private void initWithDefaultMenu() { MenuItem m1 = new MenuItem("M01", "Main", "McSpicy", "", 5); MenuItem m2 = new MenuItem("M02", "Main", "Big Mac", "", 7); MenuItem m3 = new MenuItem("M03", "Main", "Filet-O-Fish", "", 4); MenuItem m4 = new MenuItem("M04", "Main", "McNuggets", "", 4); MenuItem b1 = new MenuItem("B01", "Drink", "Coca-Cola", "", 3); MenuItem b2 = new MenuItem("B02", "Drink", "Green Tea", "", 2.5); MenuItem b3 = new MenuItem("B03", "Drink", "Milo", "", 2.8); MenuItem b4 = new MenuItem("B04", "Drink", "Ribena", "", 3.5); MenuItem s1 = new MenuItem("S01", "Side", "Apple Pie", "", 1); MenuItem s2 = new MenuItem("S02", "Side", "Fries", "", 3.8); MenuItem d1 = new MenuItem("D01", "Desert", "McFlurry", "", 3); MenuItem d2 = new MenuItem("D02", "Desert", "Vanilla Cone", "", 2); PromotionItem p1 = new PromotionItem("P01", "Promo", "McSpicy Meal", "", 8); p1.getCombination().add(m1); p1.getCombination().add(b1); p1.getCombination().add(s2); p1.setDescription( Arrays.deepToString(p1.getCombination().toArray()) ); PromotionItem p2 = new PromotionItem("P02", "Promo", "McNuggets Meal", "", 8.2); p2.getCombination().add(m4); p2.getCombination().add(b2); p2.getCombination().add(s2); p2.setDescription( Arrays.deepToString(p2.getCombination().toArray()) ); ArrayList<MenuItem> list = new ArrayList<MenuItem>(); list.add(m1); list.add(m2); list.add(m3); list.add(m4); list.add(b1); list.add(b2); list.add(b3); list.add(b4); list.add(s1); list.add(s2); list.add(d1); list.add(d2); list.add(p1); list.add(p2); getMenu().setItems(list); } public void importDummyData() { // create booking data int randNumItems = 0; Calendar calendar = Calendar.getInstance(); Booking booking; for (int i = 0; i < 3; i++) { calendar.set(Calendar.HOUR_OF_DAY, 11); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); randNumItems = (int) (Math.random() * 5) + 1; for (int j = 0; j < randNumItems; j++) { booking = new Booking("Customer" + (j + 1), "87654321", 2, this.tableMgr.getTableById("T" + (j + 1)), calendar.getTime()); bookingMgr.addBooking(booking); calendar.add(Calendar.MINUTE, 10); } calendar.add(Calendar.DAY_OF_MONTH, 1); } // create order data calendar = Calendar.getInstance(); char session = Utility.getSession(calendar.getTime()); if (session == 'a') { calendar.set(Calendar.HOUR_OF_DAY, AM_START); } else if (session == 'p') { calendar.set(Calendar.HOUR_OF_DAY, PM_START); } randNumItems = 0; int randQty = 0; MenuItem item; Order order; for (int i = 0; i < 5; i++) { randNumItems = (int) (Math.random() * 8) + 1; randNumItems = Math.min(randNumItems, menu.getItems().size()); order = new Order(TYPE_WALK_IN, new ArrayList<OrderItem>(), 2, tableMgr.getTables().get(i), calendar.getTime()); for (int j = 0; j < randNumItems; j++) { item = menu.getItems().get(j); randQty = (int) (Math.random() * 3) + 1; order.getItems().add(new OrderItem(item, randQty)); } orderMgr.addOrder(order); calendar.add(Calendar.MINUTE, 10); } // create some invoice data Invoice curInvoice; ArrayList<OrderItem> listItems; ArrayList<MenuItem> listMenu = this.menu.getListMenuItems(false); ArrayList<MenuItem> listPromo = this.menu.getListMenuItems(true); int randNumRecords; int randNumOrderItems; calendar = Calendar.getInstance(); for (int i = 0; i < 10; i++) { // loop on days randNumRecords = (int) (Math.random() * 5) + 5 ; for (int j = 0; j < randNumRecords; j++) { // loop on invoices listItems = new ArrayList<OrderItem>(); // standard item if (listMenu.size()>0) { randNumOrderItems = (int) (Math.random() * 5) + 1; randNumOrderItems = Math.min(randNumOrderItems, listMenu.size()); for (int j2 = 0; j2 < randNumOrderItems; j2++) { listItems.add( new OrderItem( listMenu.get(j2), (int) (Math.random() * 3)+1) ); } } // promotion items if (listPromo.size()>0) { randNumOrderItems = (int) (Math.random() * 2); randNumOrderItems = randNumOrderItems>listPromo.size()?listPromo.size():randNumOrderItems; if (randNumOrderItems>0) { for (int j2 = 0; j2 < randNumOrderItems; j2++) { listItems.add( new OrderItem( listPromo.get(j2), (int) (Math.random() * 3)+1) ); } } } curInvoice = new Invoice(TYPE_WALK_IN, listItems, 2, this.tableMgr.getTableById("T1"), calendar.getTime(), true); this.invoicesMgr.addInvoice(curInvoice); calendar.add(Calendar.MINUTE, -10); } calendar.add(Calendar.DAY_OF_YEAR, -1); } } }
[ "xuanniisan@hotmail.com" ]
xuanniisan@hotmail.com
f481ead4751c59ca209269fdbb93f145254d8ac2
252851ec3358c42892b69c579d863e7fb82b37e5
/weixin-admin/src/main/java/com/cky/intercetor/LoginInterceptor.java
f891581b7674e829882633201b8253cb7fe75970
[]
no_license
salted-fish-cky/project_space
e613a3a2a1121d3c91554a2919fc3ae1e9b25eac
e1079b72e14d4b6e95d451e59c6ce250783569ef
refs/heads/master
2022-12-21T14:31:46.945062
2019-07-08T08:32:56
2019-07-08T08:32:56
174,693,502
0
0
null
2022-12-16T11:56:07
2019-03-09T12:46:07
JavaScript
UTF-8
Java
false
false
1,096
java
package com.cky.intercetor; import com.cky.model.AdminUser; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; public class LoginInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object o) throws Exception { AdminUser user = (AdminUser) request.getSession().getAttribute("user"); if(user == null){ response.sendRedirect(request.getContextPath()+"/users/login"); return false; } return true; } @Override public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { } @Override public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { } }
[ "caokeyu@iboxpay.com" ]
caokeyu@iboxpay.com
5b1ea61b6614dfd2ce4c4f3c44b11850dfa2cda5
2390e15110673b797245d340ea1ee20eba68e31a
/src/main/java/com/cw/base/RequestHeader.java
c6bac9a804ed6c6f5b1b2b7b6f6137c90e381f3d
[]
no_license
laoliuwang/cw_common
3d83f7c73603f40c69d559a5489ce275b4be7015
59decc2c7cd0b312d099dfbef96424af07b8120e
refs/heads/master
2022-11-30T00:19:04.844502
2020-08-14T07:46:26
2020-08-14T07:46:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
216
java
/** * */ package com.cw.base; import lombok.Data; /** * * @author xueyongfei * @date 2020年7月24日 */ @Data public class RequestHeader { private RequestPagination requestPagination; }
[ "llbt@LLBT-xueyongfei" ]
llbt@LLBT-xueyongfei
af8840f97a61eb543d48ff0944826fceae374245
00b3c5d54d7d686561b1db81f9b515befbb4be22
/src/encapsulation/Test3.java
84317feab357e119083b2559ec9129e87091564f
[]
no_license
javaandselenium/Javaqsp_Weekend
6715819256aa155736875887c8588df3b5f4125d
55826dae5e85aaf667ee24efce5727c285bc7053
refs/heads/master
2023-01-24T12:28:30.160630
2020-12-05T08:37:08
2020-12-05T08:37:08
307,049,741
0
0
null
null
null
null
UTF-8
Java
false
false
214
java
package encapsulation; public class Test3 { public static void main(String[] args) { Test2 t=new Test2(); System.out.println(t.getBankName()); System.out.println(t.getAccountBalance()); } }
[ "QSP@DESKTOP-EVK9GMC" ]
QSP@DESKTOP-EVK9GMC
c7627dc0d6118f02a078054956f9e6e9b6061496
a1f54c4fc08b70dfcde20dd3dc2e0b544850ceb9
/design pattern/src/combined/djview/BPMObserver.java
61282a332e81b71d1b8ff1dca029e3c515457826
[]
no_license
smith1984/java_src_tutorial
175d4f69e443084f82c48ab7457dcacfae3dfb23
50fd98e37d675f597074a6e53a9ef34824d5fcd4
refs/heads/master
2020-04-09T03:38:38.848665
2018-12-01T21:57:20
2018-12-01T21:57:20
159,990,788
1
0
null
null
null
null
UTF-8
Java
false
false
80
java
package combined.djview; public interface BPMObserver { void updateBPM(); }
[ "smith150384@gmail.com" ]
smith150384@gmail.com
fb6b5346caefbbb71ce9dcd339f10f3adcb64e59
0e8a9a2c36697fabeac373199c5f37a87eff5efc
/src/main/java/gov/nist/mu/validation/Schema.java
0094ef55de7a8a5815872e920b9bd6ea762ecfdb
[ "LicenseRef-scancode-public-domain", "Apache-2.0" ]
permissive
rahulsom/muval
25cec40e5e8adf6f1ffb03c6f2e10730a1f2df16
25f890d222e0683ef5f77fc064e9c076eb1ba432
refs/heads/master
2023-08-31T04:42:18.882865
2023-07-26T15:18:32
2023-07-26T20:09:27
53,240,181
2
3
Apache-2.0
2023-09-14T15:19:04
2016-03-06T05:55:16
Java
UTF-8
Java
false
false
385
java
package gov.nist.mu.validation; /** * Represents a Schema. * * @author rahul somasunderam */ public class Schema extends Ruleset { /** * Creates a new Schema. * * @param resourceName name of the resource * @param filename name of the file */ public Schema(String resourceName, String filename) { super(resourceName, filename); } }
[ "rahul.som@gmail.com" ]
rahul.som@gmail.com
703515c61b9d851e521e4684b5b559212dc9940e
77e8e9b98d6e6a51657b631079b875cf1aa1143c
/src/main/java/com/zbkc/nutz/bean/Role_authorize.java
edc9a220713f653a6a3ad4571208003482a20693
[]
no_license
momozqy/nutzdemo
bae06554f0aea648de58b440e7e9c8a64814c849
a6151d8d9f9b37a06db140248f56648557ff5a15
refs/heads/master
2021-01-19T16:05:34.954390
2017-04-20T02:02:21
2017-04-20T02:02:21
88,248,368
0
0
null
null
null
null
UTF-8
Java
false
false
441
java
package com.zbkc.nutz.bean; import org.nutz.dao.entity.annotation.Column; import org.nutz.dao.entity.annotation.Id; import org.nutz.dao.entity.annotation.Table; /** * Created by momo on 2017/4/14. */ @Table("角色_权限") public class Role_authorize { @Column("角色ID") private Long RoleID; @Column("权限ID") private Long authorizeID; //只读 或者 读写 @Column("权限") private String type; }
[ "532676071@qq.com" ]
532676071@qq.com
4128f203cece2b2f6b0a6ff1bceb2c96fbbc639f
e42c98daf48cb6b70e3dbd5f5af3517d901a06ab
/modules/uctool-manager/src/main/java/com/cisco/axl/api/_10/AddTimePeriodReq.java
38831f490006a8cc1a33f9fc428b9a72337f3fa7
[]
no_license
mgnext/UCTOOL
c238d8f295e689a8babcc1156eb0b487cba31da0
5e7aeb422a33b3cf33fca0231616ac0416d02f1a
refs/heads/master
2020-06-03T04:07:57.650216
2015-08-07T10:44:04
2015-08-07T10:44:04
39,693,900
2
1
null
null
null
null
UTF-8
Java
false
false
1,503
java
package com.cisco.axl.api._10; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for AddTimePeriodReq complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="AddTimePeriodReq"> * &lt;complexContent> * &lt;extension base="{http://www.cisco.com/AXL/API/10.5}APIRequest"> * &lt;sequence> * &lt;element name="timePeriod" type="{http://www.cisco.com/AXL/API/10.5}XTimePeriod"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AddTimePeriodReq", propOrder = { "timePeriod" }) public class AddTimePeriodReq extends APIRequest { @XmlElement(required = true) protected XTimePeriod timePeriod; /** * Gets the value of the timePeriod property. * * @return * possible object is * {@link XTimePeriod } * */ public XTimePeriod getTimePeriod() { return timePeriod; } /** * Sets the value of the timePeriod property. * * @param value * allowed object is * {@link XTimePeriod } * */ public void setTimePeriod(XTimePeriod value) { this.timePeriod = value; } }
[ "agentmilindu@gmail.com" ]
agentmilindu@gmail.com
c77a7ccbf651aef05e52a2d13ad11b1817e92cc3
03e2b9e914743bcc32b43c1bf9802cd2973fefa1
/src/main/java/kz/bee/drools/planner/schedule/solver/move/LessonSwapMove.java
020a0e813b1cfffa93bc4c3dd24c6721dfe53d8c
[]
no_license
nurlan/schedule
1cb6ce3c38c321a3c97c19035061667e3ce248a0
6a40aedbed8397ec3094ad7bf198b9d65bed6401
refs/heads/master
2016-09-10T17:32:38.000372
2012-05-18T08:32:12
2012-05-18T08:32:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,199
java
package kz.bee.drools.planner.schedule.solver.move; import java.util.Arrays; import java.util.Collection; import kz.bee.drools.planner.schedule.domain.Lesson; import kz.bee.drools.planner.schedule.domain.Period; import kz.bee.drools.planner.schedule.domain.Room; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.drools.planner.core.move.Move; import org.drools.planner.core.score.director.ScoreDirector; public class LessonSwapMove implements Move { private Lesson leftLesson; private Lesson rightLesson; public LessonSwapMove(Lesson leftLesson, Lesson rightLesson) { this.leftLesson = leftLesson; this.rightLesson = rightLesson; } public boolean isMoveDoable(ScoreDirector scoreDirector) { return !(ObjectUtils.equals(leftLesson.getPeriod(), rightLesson.getPeriod()) && ObjectUtils.equals(leftLesson.getRoom(), rightLesson.getRoom())); } public Move createUndoMove(ScoreDirector scoreDirector) { return new LessonSwapMove(rightLesson, leftLesson); } public void doMove(ScoreDirector scoreDirector) { Period oldLeftPeriod = leftLesson.getPeriod(); Period oldRightPeriod = rightLesson.getPeriod(); Room oldLeftRoom = leftLesson.getRoom(); Room oldRightRoom = rightLesson.getRoom(); if (oldLeftPeriod.equals(oldRightPeriod)) { CurriculumCourseMoveHelper.moveRoom(scoreDirector, leftLesson, oldRightRoom); CurriculumCourseMoveHelper.moveRoom(scoreDirector, rightLesson, oldLeftRoom); } else if (oldLeftRoom.equals(oldRightRoom)) { CurriculumCourseMoveHelper.movePeriod(scoreDirector, leftLesson, oldRightPeriod); CurriculumCourseMoveHelper.movePeriod(scoreDirector, rightLesson, oldLeftPeriod); } else { CurriculumCourseMoveHelper.moveLesson(scoreDirector, leftLesson, oldRightPeriod, oldRightRoom); CurriculumCourseMoveHelper.moveLesson(scoreDirector, rightLesson, oldLeftPeriod, oldLeftRoom); } } public Collection<? extends Object> getPlanningEntities() { return Arrays.asList(leftLesson, rightLesson); } public Collection<? extends Object> getPlanningValues() { return Arrays.<Object>asList(leftLesson.getPeriod(), leftLesson.getRoom(), rightLesson.getPeriod(), rightLesson.getRoom()); } public boolean equals(Object o) { if (this == o) { return true; } else if (o instanceof LessonSwapMove) { LessonSwapMove other = (LessonSwapMove) o; return new EqualsBuilder() .append(leftLesson, other.leftLesson) .append(rightLesson, other.rightLesson) .isEquals(); } else { return false; } } public int hashCode() { return new HashCodeBuilder() .append(leftLesson) .append(rightLesson) .toHashCode(); } public String toString() { return leftLesson + " <=> " + rightLesson; } }
[ "nurlan.rakhimzhanov@gmail.com" ]
nurlan.rakhimzhanov@gmail.com
a63bff210ce2926671f5225670c820cb2ac74f4c
6fbe50f01b80302edf22535d5df0da01f05cf98f
/WEB-INF/classes/ems/EditProfile.java
0f3f18bcafa5f5d1a98cb69a9abb15fbed457019
[]
no_license
Dhanabal07/Samlems
42c8f702d8c17396d9e2ad4c89188e00a57fd088
8d3e35eaef15b39d008a35389d4e41c40c9f654f
refs/heads/master
2023-06-16T05:25:09.542085
2021-07-18T13:53:16
2021-07-18T13:53:16
387,187,240
0
0
null
null
null
null
UTF-8
Java
false
false
3,452
java
package ems; import java.io.IOException; import java.io.PrintWriter; import java.util.*; import java.sql.*; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class EditProfile extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out=response.getWriter(); HttpSession sec=request.getSession(); String username=(String)sec.getAttribute("username"); System.out.println(username); System.out.println(username); System.out.println(username); System.out.println(username); Users e=Display.getEmployeeByUserName(username); if(e==null) { out.print("NO Profile"); return; } out.print( //"<body>" "<link rel='stylesheet' type='text/css' href='style.css'>" +"<div class='container'>" +"<div class='header'>" + "<h2>Update Account</h2>" +"</div>" +"<form id='form' class='form' action='editSave' method='get' target='_blank'>" + "<div class='form-control'>" + "<label for='username'>Username</label>" + "<input type='text' placeholder='Enter the username' name='username' id='username' value="+e.username+" required readonly/>" + "</div>" + "<div class='form-control'>" + "<label for='id'>EmployeeId</label>" + "<input type='text' placeholder='Enter your id' id='id' value="+e.empid+" name='id' required readonly='readonly'/>" + "</div>" + "<div class='form-control'>" + "<label for='name'>Name</label>" + "<input type='text' placeholder='Enter your name' id='name' value="+e.name+" name='name' required/>" + "</div>"); out.print("<div class='form-control'>" + "<label for='email'>Email</label>" + "<input type='email' placeholder='abc@gmail.com' name='email'value="+e.mail+" id='email' required/>" + "</div>" + "<div class='form-control'>" + "<label for'mobile'>Mobile Number</label>" + "<input type='text' placeholder='10 digit number' maxlength='10' value="+e.mobile+" name='mobile' id='mobile' required />" + "</div>" + "<div class='form-control'>" + "<label for='department'>Department</label>" + "<input type='text' placeholder='Enter the department' name='department' value="+e.department+" id='department' required />" + "</div>" + "<div class='form-control'>" + "<label for='company'>Company</label>" + "<input type='text' placeholder='Enter the company' name='company' value="+e.company+" id='company' required />" + "</div>" + "<div >" + "<input class='button' type='submit' name='submit' value='Save'>" + "</div>" +"</form>" +"</div>"); out.close(); } }
[ "dhanabalratha@gmail.com" ]
dhanabalratha@gmail.com
136ccabcab2f2eca3f8a07b0e2cec06718bc0452
cb26df4aa32b4155356bd7ebdab13cca20d1eb8d
/tdaysofcode/java/Testing.java
225824e0ffbf4b4c32ba423a9cde24778d2f1c5c
[]
no_license
johnalvn/hr-algtm
a91fdae05cbb2f5d57c193fc3243ac5a6b061687
addef2fdd85270a0e89b246f2dce0add1371bc92
refs/heads/master
2020-03-27T23:59:59.607003
2018-09-12T17:20:38
2018-09-12T17:20:38
147,367,132
0
0
null
null
null
null
UTF-8
Java
false
false
2,768
java
import java.util.*; public class Testing { static class TestDataEmptyArray { public static int[] get_array() { // complete this function return new int[] {}; } } static class TestDataUniqueValues { public static int[] get_array() { // complete this function return new int[] {4,7}; } public static int get_expected_result() { // complete this function return 0; } } static class TestDataExactlyTwoDifferentMinimums { public static int[] get_array() { // complete this function return new int[] {1,1}; } public static int get_expected_result() { // complete this function return 0; } } public static void TestWithEmptyArray() { try { int[] seq = TestDataEmptyArray.get_array(); int result = minimum_index(seq); } catch (IllegalArgumentException e) { return; } throw new AssertionError("Exception wasn't thrown as expected"); } public static void TestWithUniqueValues() { int[] seq = TestDataUniqueValues.get_array(); if (seq.length < 2) { throw new AssertionError("less than 2 elements in the array"); } Integer[] tmp = new Integer[seq.length]; for (int i = 0; i < seq.length; ++i) { tmp[i] = Integer.valueOf(seq[i]); } if (!((new LinkedHashSet<Integer>(Arrays.asList(tmp))).size() == seq.length)) { throw new AssertionError("not all values are unique"); } int expected_result = TestDataUniqueValues.get_expected_result(); int result = minimum_index(seq); if (result != expected_result) { throw new AssertionError("result is different than the expected result"); } } public static void TestWithExactlyTwoDifferentMinimums() { int[] seq = TestDataExactlyTwoDifferentMinimums.get_array(); if (seq.length < 2) { throw new AssertionError("less than 2 elements in the array"); } int[] tmp = seq.clone(); Arrays.sort(tmp); if (!(tmp[0] == tmp[1] && (tmp.length == 2 || tmp[1] < tmp[2]))) { throw new AssertionError("there are not exactly two minimums in the array"); } int expected_result = TestDataExactlyTwoDifferentMinimums.get_expected_result(); int result = minimum_index(seq); if (result != expected_result) { throw new AssertionError("result is different than the expected result"); } } public static int minimum_index(int[] seq) { if (seq.length == 0) { throw new IllegalArgumentException("Cannot get the minimum value index from an empty sequence"); } int min_idx = 0; for (int i = 1; i < seq.length; ++i) { if (seq[i] < seq[min_idx]) { min_idx = i; } } return min_idx; } public static void main(String[] args) { // TODO Auto-generated method stub TestWithEmptyArray(); TestWithUniqueValues(); TestWithExactlyTwoDifferentMinimums(); System.out.println("OK"); } }
[ "jhon1052020@hotmail.com" ]
jhon1052020@hotmail.com
6aaa0c1ef3e60f0f46bd7935285001ee307cb045
480ecb1950b269811b4242e13e58c793c651aae2
/online-shopping/src/main/java/net/roshan/onlineshopping/controller/ManagementController.java
7adcdafe463ee23bb8b6e9ea4f1704a105dd2219
[]
no_license
roshanbhavsar3543/online-shopping
b5265332dd3f3ac96b5526658afec9862ca904f4
6c3a234f048f9f955f95427764867fa74cf2742f
refs/heads/master
2022-12-26T00:31:55.877285
2019-09-15T16:42:16
2019-09-15T16:42:16
195,437,946
1
0
null
2022-12-16T11:07:28
2019-07-05T16:19:35
JavaScript
UTF-8
Java
false
false
5,061
java
package net.roshan.onlineshopping.controller; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import net.roshan.onlineshopping.utils.FileUploadUtils; import net.roshan.onlineshopping.validator.ProductValidator; import net.roshan.shoppingBackEnd.dao.CategoryDAO; import net.roshan.shoppingBackEnd.dao.ProductDAO; import net.roshan.shoppingBackEnd.dto.Category; import net.roshan.shoppingBackEnd.dto.Product; @Controller @RequestMapping(value="/manage") public class ManagementController { @Autowired private CategoryDAO categoryDAO; @Autowired private ProductDAO productDAO; private static final Logger logger = LoggerFactory.getLogger(ManagementController.class); @RequestMapping(value="/products",method=RequestMethod.GET) public ModelAndView showManagedProducts(@RequestParam(name="operation",required=false) String operation ) { ModelAndView mv = new ModelAndView("page"); mv.addObject("userClickManageProducts", true); mv.addObject("title", "Manage Products"); Product newProduct = new Product(); newProduct.setSupplierId(1); newProduct.setActive(true); mv.addObject("product",newProduct); if(operation!=null) { if(operation.equals("product")) { mv.addObject("message","Product Submitted Successfully!"); } else if(operation.equals("category")) { mv.addObject("message","Category Addeded Successfully!"); } } return mv; } //Below attribute is available for all methods of controller @ModelAttribute("categories") public List<Category> getListOfCategories(){ return categoryDAO.getCategories(); } //Below attribute is available for all methods of controller @ModelAttribute("category") public Category getCategory(){ return new Category(); } @RequestMapping(value="/products",method=RequestMethod.POST)//BindingResult should be exact after ModelAttribute public String handleProductSubmission(@Valid @ModelAttribute("product") Product myProduct,BindingResult results,Model model,HttpServletRequest request) { if(myProduct.getId()== 0) { //file upload validation new ProductValidator().validate(myProduct, results); }else { if(!myProduct.getFile().getOriginalFilename().equals("")) { new ProductValidator().validate(myProduct, results); } } if(results.hasErrors()) { model.addAttribute("userClickManageProducts", true); model.addAttribute("title", "Manage Products"); model.addAttribute("message", "Validation Failed For Product Submission"); return "page"; } logger.info(myProduct.toString()); //for New Product if(myProduct.getId()== 0) { productDAO.addProduct(myProduct); }else { //update Product productDAO.updateProduct(myProduct); } if(!myProduct.getFile().getOriginalFilename().equals("")) { FileUploadUtils.uploadFile(request,myProduct.getFile(),myProduct.getCode()); } return "redirect:/manage/products?operation=product"; } //Activate Or Deactivate Product @RequestMapping(value="/product/{id}/activation",method=RequestMethod.POST) @ResponseBody public String handleProductActivationOrDeactivation(@PathVariable("id") int productId){ System.out.println("Activate Or Deactivate Product "+ productId); Product product = productDAO.get(productId); boolean isActive = product.isActive(); product.setActive(!product.isActive()); productDAO.updateProduct(product); if(isActive) { return "You Have Successfully Deactivated Product "+productId; } return "You Have Successfully Activated Product "+productId; } @RequestMapping(value="/{id}/product",method=RequestMethod.GET) public ModelAndView showProductForUpdate(@PathVariable(name="id") int productId) { ModelAndView mv = new ModelAndView("page"); mv.addObject("userClickManageProducts", true); mv.addObject("title", "Manage Products"); Product updateProduct = productDAO.get(productId); mv.addObject("product",updateProduct); return mv; } @RequestMapping(value="/category",method=RequestMethod.POST) public String handleCategorySubmission(@ModelAttribute("category") Category category) { categoryDAO.addCategory(category); return "redirect:/manage/products?operation=category"; } }
[ "roshanbhavsar3543@gmail.com" ]
roshanbhavsar3543@gmail.com
a2c8bbe74d16c505df2f5a445a3138f8513e61da
9e51ddd808ff217b4f815575ca416953a94b4bb9
/src/test/java/com/toyRobot/controller/PlaceCommandContollerTest.java
93af514acbcfcf97449196bf2132d6c1870efe12
[]
no_license
supu1585/toyRobot
c3ae848e9e9f70ccde8b310de44fa352d40e7a3e
18c37df0d8ac91808b4e8f707da49df4ff8948d3
refs/heads/master
2022-03-23T12:03:26.769026
2020-01-06T12:04:52
2020-01-06T12:04:52
232,065,794
0
0
null
null
null
null
UTF-8
Java
false
false
2,186
java
package com.toyRobot.controller; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.web.client.RestTemplate; import com.toyRobot.service.MoveCommandService; @SpringBootTest public class PlaceCommandContollerTest { public PlaceCommandContollerTest() { // TODO Auto-generated constructor stub } @Autowired MoveCommandService moveCommandService; String expected = null; RestTemplate restTemplate = new RestTemplate(); HttpHeaders headers = new HttpHeaders(); @Test public void placeRobotOnTable_MoveCommandTest() { expected = "Robot placed at 0, 0, NORTH"; HttpEntity<String> entity = new HttpEntity<String>(null, headers); ResponseEntity<String> response = restTemplate.exchange(("http://localhost:8080/place/0/0/NORTH"), HttpMethod.POST, entity, String.class); assertEquals(expected, response.getBody()); } @Test public void placeRobotOffTable_X_MoveCommandTest() { HttpEntity<String> entity = new HttpEntity<String>(null, headers); assertThrows(IllegalArgumentException.class, () -> restTemplate .exchange((";http://localhost:8080/place/6/4/NORTH"), HttpMethod.POST, entity, String.class)); } @Test public void placeRobotOffTable_Y_MoveCommandTest() { HttpEntity<String> entity = new HttpEntity<String>(null, headers); assertThrows(IllegalArgumentException.class, () -> restTemplate .exchange((";http://localhost:8080/place/4/6/NORTH"), HttpMethod.POST, entity, String.class)); } @Test public void placeRobotWithInvalidDirection_MoveCommandTest() { HttpEntity<String> entity = new HttpEntity<String>(null, headers); assertThrows(IllegalArgumentException.class, () -> restTemplate .exchange((";http://localhost:8080/place/4/6/NOR"), HttpMethod.POST, entity, String.class)); } }
[ "supu1585@gmail.com" ]
supu1585@gmail.com
fa4f1665ea36c0621f4a0d257809cb40ea02b22a
3a23fcf7e7c2a3058fd92c84fc390b0f196bb790
/sample/build/generated/not_namespaced_r_class_sources/debug/r/com/pnikosis/materialishprogress/R.java
4bedf7f951401433758fcbdf6a3b927928828e7b
[]
no_license
MHuuuu/app_peise
f881061d6c6798a5bb0e1e9f258330e8bfc7f1f4
fe47aac12de3287c908587fdbe9e2eb270442a6c
refs/heads/master
2022-12-08T14:04:03.214086
2020-08-26T18:03:13
2020-08-26T18:03:13
267,610,934
0
0
null
null
null
null
UTF-8
Java
false
false
63,674
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 com.pnikosis.materialishprogress; 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_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 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 background = 0x7f020031; public static final int backgroundSplit = 0x7f020032; public static final int backgroundStacked = 0x7f020033; public static final int barColor = 0x7f020036; public static final int barSpinCycleTime = 0x7f020038; public static final int barWidth = 0x7f020039; public static final int buttonBarButtonStyle = 0x7f02003b; public static final int buttonBarStyle = 0x7f02003f; public static final int buttonGravity = 0x7f020040; public static final int circleRadius = 0x7f020049; public static final int closeIcon = 0x7f02004a; public static final int closeItemLayout = 0x7f02004b; public static final int collapseIcon = 0x7f02004d; public static final int color = 0x7f02004e; public static final int colorAccent = 0x7f02004f; public static final int colorButtonNormal = 0x7f020051; public static final int colorControlActivated = 0x7f020052; public static final int colorControlHighlight = 0x7f020053; public static final int colorControlNormal = 0x7f020054; public static final int colorPrimary = 0x7f020056; public static final int colorPrimaryDark = 0x7f020057; public static final int colorSwitchThumbNormal = 0x7f020058; public static final int commitIcon = 0x7f020059; public static final int contentInsetEnd = 0x7f02005b; public static final int contentInsetLeft = 0x7f02005d; public static final int contentInsetRight = 0x7f02005e; public static final int contentInsetStart = 0x7f02005f; public static final int customNavigationLayout = 0x7f020063; public static final int displayOptions = 0x7f020068; public static final int divider = 0x7f020069; public static final int dividerHorizontal = 0x7f02006a; public static final int dividerPadding = 0x7f02006b; public static final int dividerVertical = 0x7f02006c; public static final int drawableSize = 0x7f02006d; public static final int drawerArrowStyle = 0x7f02006e; public static final int dropDownListViewStyle = 0x7f02006f; public static final int dropdownListPreferredItemHeight = 0x7f020070; public static final int editTextBackground = 0x7f020071; public static final int editTextColor = 0x7f020072; public static final int elevation = 0x7f020074; public static final int expandActivityOverflowButtonDrawable = 0x7f020075; public static final int fillRadius = 0x7f020076; public static final int gapBetweenBars = 0x7f020084; public static final int goIcon = 0x7f020085; public static final int height = 0x7f020086; public static final int hideOnContentScroll = 0x7f020087; public static final int homeAsUpIndicator = 0x7f020088; public static final int homeLayout = 0x7f020089; public static final int icon = 0x7f02008a; public static final int iconifiedByDefault = 0x7f02008d; public static final int indeterminateProgressStyle = 0x7f02008f; public static final int initialActivityCount = 0x7f020090; public static final int isLightTheme = 0x7f020091; public static final int itemPadding = 0x7f020092; public static final int layout = 0x7f020095; public static final int listChoiceBackgroundIndicator = 0x7f02009d; public static final int listPopupWindowStyle = 0x7f0200a2; public static final int listPreferredItemHeight = 0x7f0200a3; public static final int listPreferredItemHeightLarge = 0x7f0200a4; public static final int listPreferredItemHeightSmall = 0x7f0200a5; public static final int listPreferredItemPaddingLeft = 0x7f0200a6; public static final int listPreferredItemPaddingRight = 0x7f0200a7; public static final int logo = 0x7f0200a8; public static final int maxButtonHeight = 0x7f0200aa; public static final int measureWithLargestChild = 0x7f0200ab; public static final int navigationContentDescription = 0x7f0200ad; public static final int navigationIcon = 0x7f0200ae; public static final int navigationMode = 0x7f0200af; public static final int overlapAnchor = 0x7f0200b1; public static final int paddingEnd = 0x7f0200b3; public static final int paddingStart = 0x7f0200b4; public static final int panelBackground = 0x7f0200b6; public static final int panelMenuListTheme = 0x7f0200b7; public static final int panelMenuListWidth = 0x7f0200b8; public static final int popupMenuStyle = 0x7f0200bb; public static final int popupTheme = 0x7f0200bc; public static final int popupWindowStyle = 0x7f0200bd; public static final int preserveIconSpacing = 0x7f0200be; public static final int progressBarPadding = 0x7f0200bf; public static final int progressBarStyle = 0x7f0200c0; public static final int progressIndeterminate = 0x7f0200c1; public static final int queryBackground = 0x7f0200c2; public static final int queryHint = 0x7f0200c3; public static final int rimColor = 0x7f0200c8; public static final int rimWidth = 0x7f0200c9; public static final int searchIcon = 0x7f0200cc; public static final int searchViewStyle = 0x7f0200cd; public static final int selectableItemBackground = 0x7f0200cf; public static final int selectableItemBackgroundBorderless = 0x7f0200d0; public static final int showAsAction = 0x7f0200d1; public static final int showDividers = 0x7f0200d2; public static final int showText = 0x7f0200d3; public static final int spinBars = 0x7f0200d6; public static final int spinSpeed = 0x7f0200d7; public static final int spinnerDropDownItemStyle = 0x7f0200d8; public static final int spinnerStyle = 0x7f0200d9; public static final int splitTrack = 0x7f0200da; public static final int state_above_anchor = 0x7f0200dc; public static final int submitBackground = 0x7f0200df; public static final int subtitle = 0x7f0200e0; public static final int subtitleTextAppearance = 0x7f0200e1; public static final int subtitleTextStyle = 0x7f0200e3; public static final int suggestionRowLayout = 0x7f0200e4; public static final int switchMinWidth = 0x7f0200e5; public static final int switchPadding = 0x7f0200e6; public static final int switchStyle = 0x7f0200e7; public static final int switchTextAppearance = 0x7f0200e8; public static final int textAllCaps = 0x7f0200e9; public static final int textAppearanceLargePopupMenu = 0x7f0200ea; public static final int textAppearanceListItem = 0x7f0200eb; public static final int textAppearanceListItemSmall = 0x7f0200ed; public static final int textAppearanceSearchResultSubtitle = 0x7f0200ef; public static final int textAppearanceSearchResultTitle = 0x7f0200f0; public static final int textAppearanceSmallPopupMenu = 0x7f0200f1; public static final int textColorSearchUrl = 0x7f0200f3; public static final int theme = 0x7f0200f4; public static final int thickness = 0x7f0200f5; public static final int thumbTextPadding = 0x7f0200f6; public static final int title = 0x7f0200fe; public static final int titleMarginBottom = 0x7f020100; public static final int titleMarginEnd = 0x7f020101; public static final int titleMarginStart = 0x7f020102; public static final int titleMarginTop = 0x7f020103; public static final int titleMargins = 0x7f020104; public static final int titleTextAppearance = 0x7f020105; public static final int titleTextStyle = 0x7f020107; public static final int toolbarNavigationButtonStyle = 0x7f020109; public static final int toolbarStyle = 0x7f02010a; public static final int track = 0x7f02010e; public static final int voiceIcon = 0x7f020113; public static final int windowActionBar = 0x7f020114; public static final int windowActionBarOverlay = 0x7f020115; public static final int windowActionModeOverlay = 0x7f020116; public static final int windowFixedHeightMajor = 0x7f020117; public static final int windowFixedHeightMinor = 0x7f020118; public static final int windowFixedWidthMajor = 0x7f020119; public static final int windowFixedWidthMinor = 0x7f02011a; } public static final class bool { private bool() {} public static final int abc_action_bar_embed_tabs = 0x7f030000; 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_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 accent_material_dark = 0x7f040018; public static final int accent_material_light = 0x7f040019; public static final int background_floating_material_dark = 0x7f04001a; public static final int background_floating_material_light = 0x7f04001b; public static final int background_material_dark = 0x7f04001c; public static final int background_material_light = 0x7f04001d; public static final int bright_foreground_disabled_material_dark = 0x7f040020; public static final int bright_foreground_disabled_material_light = 0x7f040021; public static final int bright_foreground_inverse_material_dark = 0x7f040022; public static final int bright_foreground_inverse_material_light = 0x7f040023; public static final int bright_foreground_material_dark = 0x7f040024; public static final int bright_foreground_material_light = 0x7f040025; public static final int button_material_dark = 0x7f040026; public static final int button_material_light = 0x7f040027; public static final int dim_foreground_disabled_material_dark = 0x7f040029; public static final int dim_foreground_disabled_material_light = 0x7f04002a; public static final int dim_foreground_material_dark = 0x7f04002b; public static final int dim_foreground_material_light = 0x7f04002c; public static final int highlighted_text_material_dark = 0x7f040035; public static final int highlighted_text_material_light = 0x7f040036; public static final int material_blue_grey_800 = 0x7f040038; public static final int material_blue_grey_900 = 0x7f04003a; public static final int material_blue_grey_950 = 0x7f04003c; public static final int material_deep_teal_200 = 0x7f04003e; public static final int material_deep_teal_500 = 0x7f040040; public static final int primary_dark_material_dark = 0x7f04004a; public static final int primary_dark_material_light = 0x7f04004b; public static final int primary_material_dark = 0x7f04004c; public static final int primary_material_light = 0x7f04004d; public static final int primary_text_default_material_dark = 0x7f04004e; public static final int primary_text_default_material_light = 0x7f04004f; public static final int primary_text_disabled_material_dark = 0x7f040050; public static final int primary_text_disabled_material_light = 0x7f040051; public static final int ripple_material_dark = 0x7f040054; public static final int ripple_material_light = 0x7f040055; public static final int secondary_text_default_material_dark = 0x7f040056; public static final int secondary_text_default_material_light = 0x7f040057; public static final int secondary_text_disabled_material_dark = 0x7f040058; public static final int secondary_text_disabled_material_light = 0x7f040059; public static final int switch_thumb_normal_material_dark = 0x7f040060; public static final int switch_thumb_normal_material_light = 0x7f040061; } public static final class dimen { private dimen() {} public static final int abc_action_bar_default_height_material = 0x7f050002; public static final int abc_action_bar_icon_vertical_padding_material = 0x7f050006; 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_config_prefDialogWidth = 0x7f050017; public static final int abc_control_inset_material = 0x7f050019; public static final int abc_control_padding_material = 0x7f05001a; 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_panel_menu_list_width = 0x7f050031; public static final int abc_search_view_preferred_width = 0x7f050034; 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_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 disabled_alpha_material_dark = 0x7f050054; public static final int disabled_alpha_material_light = 0x7f050055; } public static final class drawable { private drawable() {} public static final int abc_btn_check_material = 0x7f060003; public static final int abc_btn_check_to_on_mtrl_000 = 0x7f060004; public static final int abc_btn_check_to_on_mtrl_015 = 0x7f060005; public static final int abc_btn_radio_material = 0x7f060008; public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f060009; public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f06000a; public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f06000b; public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f06000c; public static final int abc_cab_background_internal_bg = 0x7f06000d; public static final int abc_cab_background_top_material = 0x7f06000e; public static final int abc_cab_background_top_mtrl_alpha = 0x7f06000f; public static final int abc_edit_text_material = 0x7f060012; public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f060016; public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f060018; public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f060019; public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f06001b; public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f06001c; public static final int abc_ic_menu_share_mtrl_alpha = 0x7f06001d; public static final int abc_item_background_holo_dark = 0x7f060026; public static final int abc_item_background_holo_light = 0x7f060027; public static final int abc_list_divider_mtrl_alpha = 0x7f060029; public static final int abc_list_focused_holo = 0x7f06002a; public static final int abc_list_longpressed_holo = 0x7f06002b; public static final int abc_list_pressed_holo_dark = 0x7f06002c; public static final int abc_list_pressed_holo_light = 0x7f06002d; public static final int abc_list_selector_background_transition_holo_dark = 0x7f06002e; public static final int abc_list_selector_background_transition_holo_light = 0x7f06002f; public static final int abc_list_selector_disabled_holo_dark = 0x7f060030; public static final int abc_list_selector_disabled_holo_light = 0x7f060031; public static final int abc_list_selector_holo_dark = 0x7f060032; public static final int abc_list_selector_holo_light = 0x7f060033; public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f060034; public static final int abc_popup_background_mtrl_mult = 0x7f060035; public static final int abc_spinner_mtrl_am_alpha = 0x7f060041; public static final int abc_switch_thumb_material = 0x7f060043; public static final int abc_switch_track_mtrl_alpha = 0x7f060044; public static final int abc_tab_indicator_material = 0x7f060045; public static final int abc_tab_indicator_mtrl_alpha = 0x7f060046; public static final int abc_textfield_activated_mtrl_alpha = 0x7f06004e; public static final int abc_textfield_default_mtrl_alpha = 0x7f06004f; public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f060050; public static final int abc_textfield_search_default_mtrl_alpha = 0x7f060051; public static final int abc_textfield_search_material = 0x7f060052; public static final int ic_launcher = 0x7f06005a; } 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_context_bar = 0x7f07000e; 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 activity_chooser_view_content = 0x7f070018; public static final int always = 0x7f07001c; public static final int beginning = 0x7f07001f; public static final int bottom = 0x7f070021; public static final int checkbox = 0x7f070027; public static final int collapseActionView = 0x7f07002b; public static final int decor_content_parent = 0x7f070034; public static final int default_activity_button = 0x7f070035; public static final int disableHome = 0x7f070036; public static final int edit_query = 0x7f070037; public static final int end = 0x7f070038; public static final int expand_activities_button = 0x7f07003c; public static final int expanded_menu = 0x7f07003d; public static final int home = 0x7f070043; public static final int homeAsUp = 0x7f070044; public static final int icon = 0x7f070045; public static final int ifRoom = 0x7f070047; public static final int image = 0x7f070048; public static final int listMode = 0x7f07004e; public static final int list_item = 0x7f07004f; public static final int middle = 0x7f070055; public static final int never = 0x7f070057; public static final int none = 0x7f070058; public static final int normal = 0x7f070059; public static final int progress_circular = 0x7f07005f; public static final int progress_horizontal = 0x7f070061; public static final int radio = 0x7f070062; 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 shortcut = 0x7f070075; public static final int showCustom = 0x7f070076; public static final int showHome = 0x7f070077; public static final int showTitle = 0x7f070078; public static final int split_action_bar = 0x7f07007a; public static final int submit_area = 0x7f070080; public static final int tabMode = 0x7f070084; public static final int title = 0x7f07008d; public static final int top = 0x7f070091; public static final int up = 0x7f07009d; public static final int useLogo = 0x7f07009e; public static final int withText = 0x7f0700a2; public static final int wrap_content = 0x7f0700a3; } 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_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_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 support_simple_spinner_dropdown_item = 0x7f090027; } public static final class string { private string() {} public static final int abc_action_bar_home_description = 0x7f0a0001; public static final int abc_action_bar_up_description = 0x7f0a0002; public static final int abc_action_menu_overflow_description = 0x7f0a0003; public static final int abc_action_mode_done = 0x7f0a0004; public static final int abc_activity_chooser_view_see_all = 0x7f0a0005; public static final int abc_activitychooserview_choose_application = 0x7f0a0006; public static final int abc_searchview_description_clear = 0x7f0a0020; public static final int abc_searchview_description_query = 0x7f0a0021; public static final int abc_searchview_description_search = 0x7f0a0022; public static final int abc_searchview_description_submit = 0x7f0a0023; public static final int abc_searchview_description_voice = 0x7f0a0024; public static final int abc_shareactionprovider_share_with = 0x7f0a0025; public static final int abc_shareactionprovider_share_with_application = 0x7f0a0026; public static final int app_name = 0x7f0a0028; } public static final class style { private style() {} public static final int Base_TextAppearance_AppCompat = 0x7f0b000c; public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0b000d; public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0b000e; public static final int Base_TextAppearance_AppCompat_Button = 0x7f0b000f; public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0b0010; public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0b0011; public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0b0012; public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0b0013; public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0b0014; public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0b0015; public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0b0016; public static final int Base_TextAppearance_AppCompat_Large = 0x7f0b0017; public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0b0018; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0b0019; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0b001a; public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0b001b; public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0b001c; public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0b001d; public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0b001e; public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0b001f; public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0b0020; public static final int Base_TextAppearance_AppCompat_Small = 0x7f0b0021; public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0b0022; public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0b0023; public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0b0024; public static final int Base_TextAppearance_AppCompat_Title = 0x7f0b0025; public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0b0026; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0b0028; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0b0029; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0b002a; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0b002b; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0b002c; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0b002d; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0b002e; public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0b0033; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0b0035; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0b0036; public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0b0037; public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0b0039; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0b003a; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0b003b; public static final int Base_ThemeOverlay_AppCompat = 0x7f0b004a; public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0b004b; public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0b004c; public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0b004d; public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0b0050; public static final int Base_Theme_AppCompat = 0x7f0b003c; public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0b003d; public static final int Base_Theme_AppCompat_Dialog = 0x7f0b003e; public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0b0042; public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0b0040; public static final int Base_Theme_AppCompat_Light = 0x7f0b0043; public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0b0044; public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0b0045; public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0b0049; public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0b0047; public static final int Base_V21_Theme_AppCompat = 0x7f0b0051; public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0b0052; public static final int Base_V21_Theme_AppCompat_Light = 0x7f0b0053; public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0b0054; public static final int Base_V7_Theme_AppCompat = 0x7f0b005f; public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0b0060; public static final int Base_V7_Theme_AppCompat_Light = 0x7f0b0061; public static final int Base_Widget_AppCompat_ActionBar = 0x7f0b0067; public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0b0068; public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0b0069; public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0b006a; public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0b006b; public static final int Base_Widget_AppCompat_ActionButton = 0x7f0b006c; public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0b006d; public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0b006e; public static final int Base_Widget_AppCompat_ActionMode = 0x7f0b006f; public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0b0070; public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0b0071; public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0b007c; public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0b007d; public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0b007f; public static final int Base_Widget_AppCompat_EditText = 0x7f0b0080; public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0b0082; public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0b0083; public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0b0084; public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0b0085; public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0b0086; public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0b0087; public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0b0088; public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0b0089; public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0b008b; public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0b008d; public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0b008e; public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0b008f; public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0b0090; public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0b0091; public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0b0092; public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0b0093; public static final int Base_Widget_AppCompat_SearchView = 0x7f0b0097; public static final int Base_Widget_AppCompat_Spinner = 0x7f0b009b; public static final int Base_Widget_AppCompat_Toolbar = 0x7f0b009e; public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0b009f; public static final int Platform_AppCompat = 0x7f0b00a0; public static final int Platform_AppCompat_Light = 0x7f0b00a1; public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0b00ab; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0b00ad; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0b00ae; public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0b00b1; public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0b00b8; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0b00b3; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0b00b4; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0b00b5; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0b00b6; public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0b00b7; public static final int TextAppearance_AppCompat = 0x7f0b00bb; public static final int TextAppearance_AppCompat_Body1 = 0x7f0b00bc; public static final int TextAppearance_AppCompat_Body2 = 0x7f0b00bd; public static final int TextAppearance_AppCompat_Button = 0x7f0b00be; public static final int TextAppearance_AppCompat_Caption = 0x7f0b00bf; public static final int TextAppearance_AppCompat_Display1 = 0x7f0b00c0; public static final int TextAppearance_AppCompat_Display2 = 0x7f0b00c1; public static final int TextAppearance_AppCompat_Display3 = 0x7f0b00c2; public static final int TextAppearance_AppCompat_Display4 = 0x7f0b00c3; public static final int TextAppearance_AppCompat_Headline = 0x7f0b00c4; public static final int TextAppearance_AppCompat_Inverse = 0x7f0b00c5; public static final int TextAppearance_AppCompat_Large = 0x7f0b00c6; public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0b00c7; public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0b00c8; public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0b00c9; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0b00ca; public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0b00cb; public static final int TextAppearance_AppCompat_Medium = 0x7f0b00cc; public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0b00cd; public static final int TextAppearance_AppCompat_Menu = 0x7f0b00ce; public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0b00cf; public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0b00d0; public static final int TextAppearance_AppCompat_Small = 0x7f0b00d1; public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0b00d2; public static final int TextAppearance_AppCompat_Subhead = 0x7f0b00d3; public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0b00d4; public static final int TextAppearance_AppCompat_Title = 0x7f0b00d5; public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0b00d6; public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0b00d8; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0b00d9; public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0b00da; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0b00db; public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0b00dc; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0b00dd; public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0b00de; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0b00df; public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0b00e0; public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0b00e5; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0b00e7; public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0b00e8; public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0b00e9; public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0b00f0; public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0b00f1; public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0b00f2; public static final int ThemeOverlay_AppCompat = 0x7f0b0108; public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0b0109; public static final int ThemeOverlay_AppCompat_Dark = 0x7f0b010a; public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0b010b; public static final int ThemeOverlay_AppCompat_Light = 0x7f0b010e; public static final int Theme_AppCompat = 0x7f0b00f3; public static final int Theme_AppCompat_CompactMenu = 0x7f0b00f4; public static final int Theme_AppCompat_Dialog = 0x7f0b00fc; public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0b00ff; public static final int Theme_AppCompat_Light = 0x7f0b0100; public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0b0101; public static final int Theme_AppCompat_Light_Dialog = 0x7f0b0102; public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0b0105; public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0b0106; public static final int Theme_AppCompat_NoActionBar = 0x7f0b0107; public static final int Widget_AppCompat_ActionBar = 0x7f0b010f; public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0b0110; public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0b0111; public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0b0112; public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0b0113; public static final int Widget_AppCompat_ActionButton = 0x7f0b0114; public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0b0115; public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0b0116; public static final int Widget_AppCompat_ActionMode = 0x7f0b0117; public static final int Widget_AppCompat_ActivityChooserView = 0x7f0b0118; public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0b0119; public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0b0124; public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0b0125; public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0b0126; public static final int Widget_AppCompat_EditText = 0x7f0b0127; public static final int Widget_AppCompat_Light_ActionBar = 0x7f0b0129; public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0b012a; public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0b012b; public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0b012c; public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0b012d; public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0b012e; public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0b012f; public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0b0130; public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0b0131; public static final int Widget_AppCompat_Light_ActionButton = 0x7f0b0132; public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0b0133; public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0b0134; public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0b0135; public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0b0136; public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0b0137; public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0b0138; public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0b0139; public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0b013a; public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0b013b; public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0b013c; public static final int Widget_AppCompat_Light_SearchView = 0x7f0b013d; public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0b013e; public static final int Widget_AppCompat_ListPopupWindow = 0x7f0b0140; public static final int Widget_AppCompat_ListView_DropDown = 0x7f0b0142; public static final int Widget_AppCompat_ListView_Menu = 0x7f0b0143; public static final int Widget_AppCompat_PopupMenu = 0x7f0b0144; public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0b0145; public static final int Widget_AppCompat_PopupWindow = 0x7f0b0146; public static final int Widget_AppCompat_ProgressBar = 0x7f0b0147; public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0b0148; public static final int Widget_AppCompat_SearchView = 0x7f0b014c; public static final int Widget_AppCompat_Spinner = 0x7f0b0150; public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0b0151; public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0b0152; public static final int Widget_AppCompat_Toolbar = 0x7f0b0155; public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0b0156; } public static final class styleable { private styleable() {} public static final int[] ActionBar = { 0x7f020031, 0x7f020032, 0x7f020033, 0x7f02005b, 0x7f02005c, 0x7f02005d, 0x7f02005e, 0x7f02005f, 0x7f020060, 0x7f020063, 0x7f020068, 0x7f020069, 0x7f020074, 0x7f020086, 0x7f020087, 0x7f020088, 0x7f020089, 0x7f02008a, 0x7f02008f, 0x7f020092, 0x7f0200a8, 0x7f0200af, 0x7f0200bc, 0x7f0200bf, 0x7f0200c0, 0x7f0200e0, 0x7f0200e3, 0x7f0200fe, 0x7f020107 }; 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, 0x7f02004b, 0x7f020086, 0x7f0200e3, 0x7f020107 }; 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 = { 0x7f020075, 0x7f020090 }; public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 0; public static final int ActivityChooserView_initialActivityCount = 1; public static final int[] DrawerArrowToggle = { 0x7f020029, 0x7f02002a, 0x7f020037, 0x7f02004e, 0x7f02006d, 0x7f020084, 0x7f0200d6, 0x7f0200f5 }; 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[] LinearLayoutCompat = { 0x10100af, 0x10100c4, 0x1010126, 0x1010127, 0x1010128, 0x7f020069, 0x7f02006b, 0x7f0200ab, 0x7f0200d2 }; 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, 0x7f02005a, 0x7f02008b, 0x7f02008c, 0x7f0200b0, 0x7f0200d1, 0x7f02010d }; 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, 0x7f0200be, 0x7f0200de }; 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, 0x7f0200b1 }; 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 = { 0x7f0200dc }; public static final int PopupWindowBackgroundState_state_above_anchor = 0; public static final int[] ProgressWheel = { 0x7f020036, 0x7f020038, 0x7f020039, 0x7f020049, 0x7f020076, 0x7f0200c1, 0x7f0200c8, 0x7f0200c9, 0x7f0200d7 }; public static final int ProgressWheel_barColor = 0; public static final int ProgressWheel_barSpinCycleTime = 1; public static final int ProgressWheel_barWidth = 2; public static final int ProgressWheel_circleRadius = 3; public static final int ProgressWheel_fillRadius = 4; public static final int ProgressWheel_progressIndeterminate = 5; public static final int ProgressWheel_rimColor = 6; public static final int ProgressWheel_rimWidth = 7; public static final int ProgressWheel_spinSpeed = 8; public static final int[] SearchView = { 0x10100da, 0x101011f, 0x1010220, 0x1010264, 0x7f02004a, 0x7f020059, 0x7f020064, 0x7f020085, 0x7f02008d, 0x7f020095, 0x7f0200c2, 0x7f0200c3, 0x7f0200cb, 0x7f0200cc, 0x7f0200df, 0x7f0200e4, 0x7f020113 }; 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, 0x7f0200bc }; 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[] SwitchCompat = { 0x1010124, 0x1010125, 0x1010142, 0x7f0200d3, 0x7f0200da, 0x7f0200e5, 0x7f0200e6, 0x7f0200e8, 0x7f0200f6, 0x7f0200f7, 0x7f0200f8, 0x7f02010e, 0x7f02010f, 0x7f020110 }; 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[] Toolbar = { 0x10100af, 0x1010140, 0x7f020040, 0x7f02004c, 0x7f02004d, 0x7f02005b, 0x7f02005c, 0x7f02005d, 0x7f02005e, 0x7f02005f, 0x7f020060, 0x7f0200a8, 0x7f0200a9, 0x7f0200aa, 0x7f0200ad, 0x7f0200ae, 0x7f0200bc, 0x7f0200e0, 0x7f0200e1, 0x7f0200e2, 0x7f0200fe, 0x7f0200ff, 0x7f020100, 0x7f020101, 0x7f020102, 0x7f020103, 0x7f020104, 0x7f020105, 0x7f020106 }; 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, 0x7f0200b3, 0x7f0200b4, 0x7f0200f4 }; 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[] 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; } }
[ "644093581@qq.com" ]
644093581@qq.com
5a3612951337c2e46991a405dbf4a8c89fe0f4f8
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutUpdateAnimation.java
202b9c616aff7d472064b720c7c03be254be653c
[]
no_license
redpicasso/fluffy-octo-robot
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
b2b62d7344da65af7e35068f40d6aae0cd0835a6
refs/heads/master
2022-11-15T14:43:37.515136
2020-07-01T22:19:16
2020-07-01T22:19:16
276,492,708
0
0
null
null
null
null
UTF-8
Java
false
false
882
java
package com.facebook.react.uimanager.layoutanimation; import android.view.View; import android.view.animation.Animation; import javax.annotation.Nullable; class LayoutUpdateAnimation extends AbstractLayoutAnimation { private static final boolean USE_TRANSLATE_ANIMATION = false; LayoutUpdateAnimation() { } boolean isValid() { return this.mDurationMs > 0; } @Nullable Animation createAnimationImpl(View view, int i, int i2, int i3, int i4) { Object obj = null; Object obj2 = (view.getX() == ((float) i) && view.getY() == ((float) i2)) ? null : 1; if (!(view.getWidth() == i3 && view.getHeight() == i4)) { obj = 1; } if (obj2 == null && obj == null) { return null; } return new PositionAndSizeAnimation(view, i, i2, i3, i4); } }
[ "aaron@goodreturn.org" ]
aaron@goodreturn.org
2f9ac80fd865fb5d8c72f205e3feaac22f588dee
f86938ea6307bf6d1d89a07b5b5f9e360673d9b8
/CodeComment_Data/Code_Jam/train/Magic_Trick/S/Main(57).java
f015d6b8b6090054b55f680be8b706d7157e1f9a
[]
no_license
yxh-y/code_comment_generation
8367b355195a8828a27aac92b3c738564587d36f
2c7bec36dd0c397eb51ee5bd77c94fa9689575fa
refs/heads/master
2021-09-28T18:52:40.660282
2018-11-19T14:54:56
2018-11-19T14:54:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,672
java
package methodEmbedding.Magic_Trick.S.LYD708; import java.io.*; /** * Created by danim_000 on 4/13/14. */ public class Main { public static void main(String [ ] args){ //read from file line by line String file_name = "input.txt"; try { BufferedReader br = new BufferedReader(new FileReader(file_name)); File file = new File("outfinal.txt"); BufferedWriter output = new BufferedWriter(new FileWriter(file)); String line = br.readLine(); int nr_tests = Integer.parseInt(line); for(int i=1; i<= nr_tests; i++) { int nr_found = 0; // 0 - nu am gasit // -1 - duplicate // >0 found //citimi row line = br.readLine(); int nr_row = Integer.parseInt(line); //citim 4x4 String[] numbers_one = new String[5]; for(int r=1; r<=4;r++){ line = br.readLine(); if(r == nr_row){ numbers_one = line.split(" "); } } //citim row 2 line = br.readLine(); nr_row = Integer.parseInt(line); //citim 4x4 for(int r=1; r<=4;r++){ line = br.readLine(); if(r == nr_row){ String[] numbers_two = line.split(" "); for(String number_two:numbers_two){ for(String number_one:numbers_one){ if(number_one.equals(number_two)){ if(nr_found == 0){ nr_found = Integer.parseInt(number_one); } else { nr_found = -1; } } } } } } String out = "Case #" + i + ": "; if(nr_found == 0){ out += "Volunteer cheated!"; } else if(nr_found == -1){ out += "Bad magician!"; } else { out += nr_found + ""; } out += "\n"; output.write(out); System.out.println(out); } br.close(); output.close(); } catch (IOException e) { e.printStackTrace(); } /**/ } }
[ "liangyuding@sjtu.edu.cn" ]
liangyuding@sjtu.edu.cn
396681793f92842aeb9e047580f0284c3a1c31b6
60e7ad4f18109c73c93856436b2188c2691c34d5
/receiver/src/main/java/top/marchand/container/receiver/executionOrderModel/ExecutionOrderModel.java
78a7c46988f2215c474a5a6658c3cbc6ab2743e4
[]
no_license
cmarchand/poc-container
65e0709a0a40a1bbd8c5a520f64650a9ea92886c
8c7fea5e0cea97e7c6bf9ec51d506c0cf03ceeec
refs/heads/master
2020-04-14T14:18:24.426802
2019-01-23T23:06:47
2019-01-23T23:06:47
163,892,707
0
0
null
null
null
null
UTF-8
Java
false
false
1,350
java
/* * MPL 2.0 */ package top.marchand.container.receiver.executionOrderModel; import java.util.HashMap; import java.util.Map; /** * * @author cmarchand */ public class ExecutionOrderModel { private final TinyArtifact component; private TinyArtifact environnement; private TinyArtifact business; private final Map<String, ParameterModel> parameters; public ExecutionOrderModel(TinyArtifact component) { super(); this.component=component; parameters = new HashMap<>(); } public void addParameter(ParameterModel p) { parameters.put(p.getName(), p); } public String getParameterValue(String name) { ParameterModel p = parameters.get(name); if(p!=null) return p.getValue(); else return null; } public TinyArtifact getComponent() { return component; } public TinyArtifact getEnvironnement() { return environnement; } public TinyArtifact getBusiness() { return business; } public Map<String, ParameterModel> getParameters() { return parameters; } public void setEnvironnement(TinyArtifact environnement) { this.environnement = environnement; } public void setBusiness(TinyArtifact business) { this.business = business; } }
[ "christophe@marchand.top" ]
christophe@marchand.top
b358c90d86b29ee27f5796f01f82b21d9f65157b
60d88d5d2e4a63d8d6a8b4946c78935fc7692e6d
/src/exercise/UI/WordLike/app/src/main/java/com/example/wordlike/PreviewPopUpWord.java
1dbe160d8a35e740313c00f4bcdfdafb604658ef
[]
no_license
kook1932/Making_Vocabulary_List
9232fb90d678e8abf027674340fbcb259d4b94f4
31970f4be9be25efc57ed5d792b8fe4b4a84837d
refs/heads/master
2020-07-23T19:50:43.429510
2019-06-25T01:49:37
2019-06-25T01:49:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
352
java
package com.example.wordlike; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class PreviewPopUpWord extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_preview_pop_up_word); } }
[ "48195130+poetree77@users.noreply.github.com" ]
48195130+poetree77@users.noreply.github.com
591a0260fd81726c32dd17b0a7afb4a4b2a1d21c
ebb880c4d4495599495387d7e629efea5cbde127
/src/main/java/com/shangshufang/apiservice/mapper/CompanyAccountMapper.java
553e6c9a826476004809f0c4d120b8ecc3771a27
[]
no_license
ShangShuFang/shangshufang.apiservice
18463052a2097cf1403b0da97e761ccba93dba43
3d86910238511e674b799623ff5d6e29fb437ddd
refs/heads/master
2021-06-27T19:52:49.113326
2021-03-05T08:13:01
2021-03-05T08:13:01
219,971,237
0
0
null
null
null
null
UTF-8
Java
false
false
697
java
package com.shangshufang.apiservice.mapper; import com.shangshufang.apiservice.entity.CompanyAccountEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; @Mapper public interface CompanyAccountMapper extends BaseMapper<CompanyAccountEntity> { int searchTotalCount(@Param("companyID") int companyID); List<CompanyAccountEntity> searchList(int startIndex, int pageSize, int companyID); CompanyAccountEntity login(@Param("cellphone") String cellphone, @Param("password") String password); int checkCellphoneExist(String cellphone); int delete(int companyID, int accountID); }
[ "johnny.q.zhang@outlook.com" ]
johnny.q.zhang@outlook.com
c20229880b6636236a7daef6bdeb3e0909e9b968
d682bf5a026d194c4910d6da8826a0cc8ce6758c
/src/com/pratik/datastructures/stack/LongestParenthesisSubstring.java
d7d5801a20d47e505c766e32a4f15b52e01cebdb
[]
no_license
pratikmurali/DataStructures
a8a59dae2e9c37c9e8ccfdae763677702f604e45
b942e1f2bbb4e5369d8df2bc5ba6de09655a91b3
refs/heads/master
2020-06-10T04:01:41.840206
2018-10-28T05:42:32
2018-10-28T05:42:32
76,091,589
0
0
null
null
null
null
UTF-8
Java
false
false
1,448
java
package com.pratik.datastructures.stack; public class LongestParenthesisSubstring { public static int maxLenMatchingParen(String s) { // use last to store the last matched index int len = s.length(), maxLen = 0, last = -1; if (len == 0 || len == 1) return 0; // use this stack to store the index of '(' Stack<Integer> stack = new Stack<Integer>(); for (int i = 0; i < len; i++) { if (s.charAt(i) == '(') stack.push(i); else { // if stack is empty, it means that we already found a complete valid combo // update the last index. if (stack.isEmpty()) { last = i; } else { stack.pop(); // found a complete valid combo and calculate max length if (stack.isEmpty()) maxLen = Math.max(maxLen, i - last); else // calculate current max length maxLen = Math.max(maxLen, i - stack.peek()); } } } return maxLen; } public static void main(String[] args) { String s1 = "()"; String s2 = "((())"; String s3 = "()(())"; String s4 = "(((("; String s5 = ")))"; System.out.println("Maximum length substring =" + maxLenMatchingParen(s1)); System.out.println("Maximum length substring ="+maxLenMatchingParen(s2)); System.out.println("Maximum length substring ="+maxLenMatchingParen(s3)); System.out.println("Maximum length substring ="+maxLenMatchingParen(s4)); System.out.println("Maximum length substring ="+maxLenMatchingParen(s5)); } }
[ "pratik.murali@gmail.com" ]
pratik.murali@gmail.com
44862bba1c5dd17520830713a158642b25095e61
83a5b01975fd2f25487e3b8d41c2499d996f2795
/src/main/java/com/br/example/patterns/templatemethod/example1/Main.java
10a9f66f4af991e535f145cf730a843128948c1c
[]
no_license
fernandoTorresan/Desing-Patterns
dd348426459e0b62b40e452260dabfb0d7dcb1d6
0b1b621356c8a48103403e48c7c0ba3f9d443516
refs/heads/master
2020-03-07T11:17:24.921128
2018-07-23T01:58:28
2018-07-23T01:58:28
127,451,847
1
0
null
null
null
null
UTF-8
Java
false
false
81
java
package com.br.example.patterns.templatemethod.example1; public class Main { }
[ "fernandotdo61@gmail.com" ]
fernandotdo61@gmail.com
ab810ac7bc49d8d14d74b858b872f210219d6221
4dc6778ca991683f155084e2ddb9841668c397ed
/Axcalo/src/main/java/com/shaobig/languages/shizproject/services/core/logic/LangLogic.java
f9720f0b2d3ed0547913bdc6a5e11e5637a37344
[]
no_license
shaobig/Axcalo
9f6fe6dd953700f3a81160a91b7e17d0ae594cd9
9702242316818744a495409a9ed22679baa2c3fd
refs/heads/master
2023-03-09T13:20:39.322227
2021-02-23T19:06:45
2021-02-23T19:06:45
341,661,130
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package com.shaobig.languages.shizproject.services.core.logic; public abstract class LangLogic implements LangLogicable, Summator, Translator { private String text; public LangLogic(String text) { this.text = text; } public String getText() { return text; } public void setText(String text) { this.text = text; } }
[ "54940461+shaobig@users.noreply.github.com" ]
54940461+shaobig@users.noreply.github.com
247a6f6611c47e1b5fb14b4cd7394b6d328c2b03
c82f89b0e6d1547c2829422e7de7664b378c1039
/src/com/hongyu/dao/ReceiptDepositStoreDao.java
2d90cc14f7f6d946874cf883b7dbf75b79a6d37a
[]
no_license
chenxiaoyin3/shetuan_backend
1bab5327cafd42c8086c25ade7e8ce08fda6a1ac
e21a0b14a2427c9ad52ed00f68d5cce2689fdaeb
refs/heads/master
2022-05-15T14:52:07.137000
2022-04-07T03:30:57
2022-04-07T03:30:57
250,762,749
1
2
null
null
null
null
UTF-8
Java
false
false
188
java
package com.hongyu.dao; import com.grain.dao.BaseDao; import com.hongyu.entity.ReceiptDepositStore; public interface ReceiptDepositStoreDao extends BaseDao<ReceiptDepositStore, Long> { }
[ "925544714@qq.com" ]
925544714@qq.com
d01633d77fa48c5205f051f8a192e8639265a482
c731e07174dcb7b5abff344d1be5168e1f321f03
/src/com/jookershop/linefriend/game/HistoryItemAdapter.java
1a4b1dbabdc029ccecd4a36c5f47055470514c82
[]
no_license
pennyweng/linefriend_en_client
154a7e9f2ec12e7e33b0894f53f07743ceb75a76
5b53251ad9a027c4b1833594e7cf72eba57dd4a0
refs/heads/master
2016-09-06T18:45:07.269071
2015-01-19T17:25:13
2015-01-19T17:25:13
29,482,312
0
0
null
null
null
null
UTF-8
Java
false
false
3,624
java
package com.jookershop.linefriend.game; import java.net.URLEncoder; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import org.json.JSONArray; import android.app.Activity; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.content.Context; import android.content.DialogInterface; import android.content.SharedPreferences; import android.support.v4.app.FragmentActivity; import android.text.Html; import android.util.Log; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import com.jookershop.linefriend.Constants; import com.jookershop.linefriend.MainActivity; import com.jookershop.linefriend.util.AccountUtil; import com.jookershop.linefriend.util.ImageHelper; import com.jookershop.linefriend.util.Message; import com.jookershop.linefriend3en.R; import com.koushikdutta.async.http.AsyncHttpClient; import com.koushikdutta.async.http.AsyncHttpGet; import com.koushikdutta.async.http.AsyncHttpResponse; import com.nostra13.universalimageloader.core.DisplayImageOptions; public class HistoryItemAdapter extends ArrayAdapter<HistoryItem> { private Context mContext; private SimpleDateFormat formatter; private String gameType; public HistoryItemAdapter(Context context, ArrayList<HistoryItem> interestItems) { super(context, R.layout.category_item, interestItems); mContext = context; formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); } public int getHeight(int dip) { return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dip, mContext.getResources().getDisplayMetrics()); } @Override public View getView(int position, View convertView, ViewGroup parent) { final HistoryItem postItem = getItem(position); View rowView = convertView; if (rowView == null) { rowView = LayoutInflater.from(getContext()).inflate( R.layout.game_history_item, parent, false); ViewHolder viewHolder = new ViewHolder(); viewHolder.user = (ImageView) rowView .findViewById(R.id.imageView1); viewHolder.guess = (TextView) rowView .findViewById(R.id.textView1); viewHolder.desc = (TextView) rowView.findViewById(R.id.textView2); viewHolder.issueTime = (TextView) rowView.findViewById(R.id.textView3); rowView.setTag(viewHolder); } ViewHolder holder = (ViewHolder) rowView.getTag(); MainActivity.imageLoader.displayImage(Constants.IMAGE_BASE_URL + "account/image?uid=" + postItem.getUid(), holder.user, ImageHelper.emptyHeadOptions); holder.user.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { AccountUtil.showInfo(mContext, postItem.getUid()); } }); if(postItem.getGtype().equals(GameItem.TYPE_GUESS)) holder.guess.setText("我的終極密碼:" + postItem.getGuess()); else if(postItem.getGtype().equals(GameItem.TYPE_AB)) holder.guess.setText("我的猜AB數字:" + postItem.getGuess()); else holder.guess.setText(postItem.getGuess()); holder.desc.setText(postItem.getDesc()); holder.issueTime.setText(formatter.format(new Date(postItem.getTs()))); return rowView; } static class ViewHolder { protected ImageView user; protected TextView guess; protected TextView desc; protected TextView issueTime; } }
[ "penny_weng@htc.com" ]
penny_weng@htc.com
7e5cbb70f029a9335bbed44c7b38c8d3186ea756
9ba823ec29cf59aadf49a1464c81d48202e81e63
/server/src/main/java/com/messagebus/server/daemon/RunPolicy.java
0c7dde21a78e3b799f76291cec4e0b20b2d1d9de
[ "Apache-2.0" ]
permissive
yuechuanbingzhi163/banyan
eb081210f1496b2c4e47a1ad94cc2dd77707cce7
b2b74803445558cc8a2300b27692e2a1377286fe
refs/heads/master
2021-01-22T14:46:07.578137
2015-03-31T09:04:38
2015-03-31T09:04:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
164
java
package com.messagebus.server.daemon; public enum RunPolicy { ONCE, //执行一次 CYCLE_SCHEDULED //周期性得循环执行 }
[ "yanghua1127@gmail.com" ]
yanghua1127@gmail.com
3a8cbb2d6aaaca1ec010dd4e11b84b4c4f66ac21
56dd99a1802e0cd3e99c997aa459978ee1f1e207
/app/src/main/java/testapp/com/testappdemo/models/MatrimonialModel.java
56483bd157daea65cb3f135921a752815c7e7734
[]
no_license
sudhir6yadav/testworkspace
c91046f760da2974a15b261f10e2bf46b94decfa
2838419ee70087d2c415e4e0889b2f52209177d7
refs/heads/master
2020-04-15T05:12:58.650970
2019-01-08T15:46:19
2019-01-08T15:46:19
164,413,114
0
0
null
null
null
null
UTF-8
Java
false
false
629
java
package testapp.com.testappdemo.models; import java.util.List; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class MatrimonialModel { @SerializedName("results") @Expose private List<Result> results = null; @SerializedName("info") @Expose private Info info; public List<Result> getResults() { return results; } public void setResults(List<Result> results) { this.results = results; } public Info getInfo() { return info; } public void setInfo(Info info) { this.info = info; } }
[ "sudhir6yadav@gmail.com" ]
sudhir6yadav@gmail.com
d8ffc63398725ce15813ba61dd2e0253206a2e70
2f485cd7accd9d6b761aaf7c8323e1860b8ca5ea
/src/test/java/nl/hu/cisq1/lingo/trainer/presentation/TrainerControllerIntegrationTest.java
2cce33e205764bd0b3e0e7f4b4865e6fb5511baf
[]
no_license
RaymonvdBrink/lingo-raymon
cc272d52226ba8964c2fd06c417db19fb9bdebf5
e1e1fc233440b3c1a803246a1bcc17053cf6dc90
refs/heads/main
2023-06-28T10:48:05.388425
2021-04-08T14:31:28
2021-04-08T14:31:28
335,280,602
0
1
null
2021-07-27T06:25:10
2021-02-02T12:24:55
Java
UTF-8
Java
false
false
1,490
java
package nl.hu.cisq1.lingo.trainer.presentation; import nl.hu.cisq1.lingo.CiTestConfiguration; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Import; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.RequestBuilder; import org.springframework.test.web.servlet.ResultMatcher; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import static org.junit.jupiter.api.Assertions.*; import static org.hamcrest.Matchers.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; @SpringBootTest @AutoConfigureMockMvc @Import(CiTestConfiguration.class) class TrainerControllerIntegrationTest { @Autowired private MockMvc mockMvc; @Test @DisplayName("Start een nieuw game plus een nieuwe ronde") void testNewGame() throws Exception { RequestBuilder request = MockMvcRequestBuilders.post("/trainer/game/newGame"); mockMvc.perform(request) .andExpect(status().isOk()) .andExpect(jsonPath("$.score", is(0))) .andExpect(jsonPath("$.hints", hasSize(1))) .andExpect(jsonPath("$.roundNumber", is(1))) ; } }
[ "57092807+RaymonvdBrink@users.noreply.github.com" ]
57092807+RaymonvdBrink@users.noreply.github.com
77953d05864d865d643c0c34c165be94ef6fdb41
fbbbb1d63568af00664dcfbf2a1cb12ac35943f7
/app/src/main/java/com/example/official/WorkshopsListAdapter.java
3620c8ca8b1b0f24b1b7088c567aa46741093ee3
[]
no_license
Jairam1998/New_workshops
e2b5e17ff217cd9669f24db602bf36d1c93a7962
6c25946883545a1008df48cc9809a1b8d39cab3f
refs/heads/master
2020-11-25T11:07:54.743123
2019-12-17T14:18:29
2019-12-17T14:18:29
228,631,991
0
0
null
null
null
null
UTF-8
Java
false
false
1,504
java
package com.example.official; import android.content.ClipData; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import java.util.List; public class WorkshopsListAdapter extends ArrayAdapter<WorkshopListItem> { private int resourceLayout; private Context mContext; public WorkshopsListAdapter(Context context, int resource, List<WorkshopListItem> items) { super(context, resource, items); this.resourceLayout = resource; this.mContext = context; } @Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { LayoutInflater vi; vi = LayoutInflater.from(mContext); v = vi.inflate(resourceLayout, null); } WorkshopListItem p = getItem(position); if (p != null) { TextView tt1 = (TextView) v.findViewById(R.id.name); TextView tt2 = (TextView) v.findViewById(R.id.orderID); TextView tt3 = (TextView) v.findViewById(R.id.status); if (tt1 != null) { tt1.setText(p.getName()); } if (tt2 != null) { tt2.setText(p.getOrderID()); } if (tt3 != null) { tt3.setText(p.getStatus()); } } return v; } }
[ "vaidehijayaram00@gmail.com" ]
vaidehijayaram00@gmail.com
430696f619d988195a8603522b217bd9373885db
af9133828ecaaa59bd3288727a13650f996f9bd4
/android/app/src/main/java/com/meme_feed/MainApplication.java
83d2d21d0a0a794f412dd90badd3f263c1b405bc
[]
no_license
shekarpuid/Meme_Feed
6f542c8d953d5277ae6f21120301cc17e1f7755d
8deabdaefcdb6c39ebb895b85252ad7d86edc4ca
refs/heads/master
2023-03-08T04:26:25.596942
2021-02-19T19:17:17
2021-02-19T19:17:17
340,466,240
0
0
null
null
null
null
UTF-8
Java
false
false
2,769
java
package com.meme_feed; import android.app.Application; import android.content.Context; import com.facebook.react.PackageList; import com.facebook.react.ReactApplication; import com.RNFetchBlob.RNFetchBlobPackage; import com.imagepicker.ImagePickerPackage; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; import java.lang.reflect.InvocationTargetException; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List<ReactPackage> packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); return packages; } @Override protected String getJSMainModuleName() { return "index"; } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } @Override public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); } /** * Loads Flipper in React Native templates. Call this in the onCreate method with something like * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); * * @param context * @param reactInstanceManager */ private static void initializeFlipper( Context context, ReactInstanceManager reactInstanceManager) { if (BuildConfig.DEBUG) { try { /* We use reflection here to pick up the class that initializes Flipper, since Flipper library is not available in release mode */ Class<?> aClass = Class.forName("com.meme_feed.ReactNativeFlipper"); aClass .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) .invoke(null, context, reactInstanceManager); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } } }
[ "39290179+sidsravan@users.noreply.github.com" ]
39290179+sidsravan@users.noreply.github.com
b7137116ee9ed3a003bb4c221d343316c924b9c4
27afe4ad7020e3b1f1b887e851125869283fcb71
/src/main/java/com/metservice/kanban/charts/burnup/HistoricDatasetPopulator.java
f62b7cfca0be86d0d453094a89fc9e397ba6397b
[]
no_license
kanban/kanban-app
48f6fdc80811df561b7ed87eaaf725aa487bb80c
ef081ff99366fbfcdfd82cd241729ec0fa16c701
refs/heads/master
2021-01-11T03:19:04.621095
2017-11-14T22:03:23
2017-11-14T22:03:23
1,997,891
23
20
null
2017-11-14T22:03:24
2011-07-04T23:29:42
Java
UTF-8
Java
false
false
981
java
package com.metservice.kanban.charts.burnup; import static com.metservice.kanban.charts.burnup.BurnUpChartSeriesNames.BACKLOG; import static com.metservice.kanban.charts.burnup.BurnUpChartSeriesNames.COMPLETE; import static com.metservice.kanban.charts.burnup.BurnUpChartSeriesNames.IN_PROGRESS; import org.jfree.data.category.DefaultCategoryDataset; import org.joda.time.LocalDate; public final class HistoricDatasetPopulator { private final BurnUpDataModel model; public HistoricDatasetPopulator(BurnUpDataModel model) { this.model = model; } public void populateDataset(DefaultCategoryDataset dataset) { for (LocalDate date : model.getWorkingDays()) { dataset.addValue(model.getCompletedSizeOnDate(date), COMPLETE, date); dataset.addValue(model.getInProgressSizeOnDate(date), IN_PROGRESS, date); dataset.addValue(model.getBacklogSizeOnDate(date), BACKLOG, date); } } }
[ "bharat.sangekar@metservice.com" ]
bharat.sangekar@metservice.com
b849425d17166fe9a9a844f7b8013a558f01280a
b8c41e1e8874a8bc01de075df84664256aabb001
/app/src/main/java/com/hado/myexample/instagram/InstagramApp.java
f8ecb84c9144c71b9ab0968215dc0d8e7d689dab
[]
no_license
ngohado/My-Example
6d762679116039aa0ece594c955241adcecab603
6592d8f9b208727382a3ca9fd5ac6c8ea4cdc5b5
refs/heads/master
2020-04-12T03:55:21.463146
2016-10-05T03:39:24
2016-10-05T03:39:24
61,310,008
0
0
null
2016-10-05T03:39:24
2016-06-16T16:40:52
Java
UTF-8
Java
false
false
8,330
java
package com.hado.myexample.instagram; import android.app.ProgressDialog; import android.content.Context; import android.os.Handler; import android.os.Message; import android.util.Log; import org.json.JSONObject; import org.json.JSONTokener; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java.net.URL; /** * Created by Ngo Hado on 07-Jul-16. */ public class InstagramApp { private InstagramSession mSession; private InstagramDialog mDialog; private OAuthAuthenticationListener mListener; private ProgressDialog mProgress; private String mAuthUrl; private String mTokenUrl; private String mAccessToken; private Context mCtx; private String mClientId; private String mClientSecret; private static int WHAT_FINALIZE = 0; private static int WHAT_ERROR = 1; private static int WHAT_FETCH_INFO = 2; /** * Callback url, as set in 'Manage OAuth Costumers' page * (https://developer.github.com/) */ public static String mCallbackUrl = ""; private static final String AUTH_URL = "https://api.instagram.com/oauth/authorize/"; private static final String TOKEN_URL = "https://api.instagram.com/oauth/access_token"; private static final String API_URL = "https://api.instagram.com/v1"; private static final String TAG = "InstagramAPI"; public InstagramApp(Context context, String clientId, String clientSecret, String callbackUrl) { mClientId = clientId; mClientSecret = clientSecret; mCtx = context; mSession = new InstagramSession(context); mAccessToken = mSession.getAccessToken(); mCallbackUrl = callbackUrl; mTokenUrl = TOKEN_URL + "?client_id=" + clientId + "&client_secret=" + clientSecret + "&redirect_uri=" + mCallbackUrl + "&grant_type=authorization_code"; mAuthUrl = AUTH_URL + "?client_id=" + clientId + "&redirect_uri=" + mCallbackUrl + "&response_type=code&display=touch&scope=likes+comments+relationships"; InstagramDialog.OAuthDialogListener listener = new InstagramDialog.OAuthDialogListener() { @Override public void onComplete(String code) { getAccessToken(code); } @Override public void onError(String error) { mListener.onFail("Authorization failed"); } }; mDialog = new InstagramDialog(context, mAuthUrl, listener); mProgress = new ProgressDialog(context); mProgress.setCancelable(false); } private void getAccessToken(final String code) { mProgress.setMessage("Getting access token ..."); mProgress.show(); new Thread() { @Override public void run() { Log.i(TAG, "Getting access token"); int what = WHAT_FETCH_INFO; try { URL url = new URL(TOKEN_URL); Log.i(TAG, "Opening Token URL " + url.toString()); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setRequestMethod("POST"); urlConnection.setDoInput(true); urlConnection.setDoOutput(true); OutputStreamWriter writer = new OutputStreamWriter(urlConnection.getOutputStream()); writer.write("client_id=" + mClientId + "&client_secret=" + mClientSecret + "&grant_type=authorization_code" + "&redirect_uri=" + mCallbackUrl + "&code=" + code); writer.flush(); String response = streamToString(urlConnection.getInputStream()); Log.i(TAG, "response " + response); JSONObject jsonObj = (JSONObject) new JSONTokener(response).nextValue(); mAccessToken = jsonObj.getString("access_token"); Log.i(TAG, "Got access token: " + mAccessToken); String id = jsonObj.getJSONObject("user").getString("id"); String user = jsonObj.getJSONObject("user").getString("username"); String name = jsonObj.getJSONObject("user").getString("full_name"); mSession.storeAccessToken(mAccessToken, id, user, name); } catch (Exception ex) { what = WHAT_ERROR; ex.printStackTrace(); } mHandler.sendMessage(mHandler.obtainMessage(what, 1, 0)); } }.start(); } private void fetchUserName() { mProgress.setMessage("Finalizing ..."); new Thread() { @Override public void run() { Log.i(TAG, "Fetching user info"); int what = WHAT_FINALIZE; try { URL url = new URL(API_URL + "/users/" + mSession.getId() + "/?access_token=" + mAccessToken); Log.d(TAG, "Opening URL " + url.toString()); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setRequestMethod("GET"); urlConnection.setDoInput(true); urlConnection.connect(); String response = streamToString(urlConnection.getInputStream()); System.out.println(response); JSONObject jsonObj = (JSONObject) new JSONTokener(response).nextValue(); String name = jsonObj.getJSONObject("data").getString("full_name"); String bio = jsonObj.getJSONObject("data").getString("bio"); Log.i(TAG, "Got name: " + name + ", bio [" + bio + "]"); } catch (Exception ex) { what = WHAT_ERROR; ex.printStackTrace(); } mHandler.sendMessage(mHandler.obtainMessage(what, 2, 0)); } }.start(); } private Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { if (msg.what == WHAT_ERROR) { mProgress.dismiss(); if (msg.arg1 == 1) { mListener.onFail("Failed to get access token"); } else if (msg.arg1 == 2) { mListener.onFail("Failed to get user information"); } } else if (msg.what == WHAT_FETCH_INFO) { fetchUserName(); } else { mProgress.dismiss(); mListener.onSuccess(); } } }; public boolean hasAccessToken() { return (mAccessToken == null) ? false : true; } public void setListener(OAuthAuthenticationListener listener) { mListener = listener; } public String getUserName() { return mSession.getUsername(); } public String getId() { return mSession.getId(); } public String getName() { return mSession.getName(); } public void authorize() { mDialog.show(); } private String streamToString(InputStream is) throws IOException { String str = ""; if (is != null) { StringBuilder sb = new StringBuilder(); String line; try { BufferedReader reader = new BufferedReader( new InputStreamReader(is)); while ((line = reader.readLine()) != null) { sb.append(line); } reader.close(); } finally { is.close(); } str = sb.toString(); } return str; } public void resetAccessToken() { if (mAccessToken != null) { mSession.resetAccessToken(); mAccessToken = null; } } public interface OAuthAuthenticationListener { public abstract void onSuccess(); public abstract void onFail(String error); } }
[ "doannh_tt@runsystem.net" ]
doannh_tt@runsystem.net
550bb786b5f66fdbc73963fd7c33c4145c60db34
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project493/src/main/java/org/gradle/test/performance/largejavamultiproject/project493/p2469/Production49382.java
2116d888affdd54cf885de2939dfe28d31cf3b3b
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,890
java
package org.gradle.test.performance.largejavamultiproject.project493.p2469; public class Production49382 { private String property0; public String getProperty0() { return property0; } public void setProperty0(String value) { property0 = value; } private String property1; public String getProperty1() { return property1; } public void setProperty1(String value) { property1 = value; } private String property2; public String getProperty2() { return property2; } public void setProperty2(String value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
634e4f239b878897d9ec0fa99173a7f981b50ca1
c79b13544f6e4d0508e7ffc208cdfde0e385423d
/weather/src/main/java/weathermachine/WateringMachine.java
60e66a94e9eb6115d80470039a90ce0e77227633
[]
no_license
tofdragon/refactor
2c1d6acbc457477549b369a50e08ed67fa5b3890
3e64a2f1c6d31d5f9dc32315de803fe0a3776c33
refs/heads/master
2022-12-22T09:09:06.050970
2020-12-06T10:01:37
2020-12-06T10:01:37
183,640,424
0
0
null
2022-12-16T03:33:44
2019-04-26T14:12:32
Java
UTF-8
Java
false
false
1,064
java
package weathermachine; import java.util.function.Predicate; public class WateringMachine implements WeatherObserver { private boolean status; private Predicate<ChangeEvent> predicate; public WateringMachine() { predicate = changeEvent -> { final int temp2Value = 10; return changeEvent.getTemp() > temp2Value; }; predicate = predicate.and(changeEvent -> { final int humidity2Value = 55; return changeEvent.getHumidity() < humidity2Value; }); predicate = predicate.and(changeEvent -> { final int windPowerValue = 4; return changeEvent.getWindPower() < windPowerValue; }); predicate = predicate.and(changeEvent -> { this.start(); return true; }); } public boolean getStatus() { return status; } public void start() { status = true; } @Override public void observer(ChangeEvent changeEvent) { predicate.test(changeEvent); } }
[ "sunjing@sinobest.cn" ]
sunjing@sinobest.cn
cb3608ccfc44f0aca9eaf8e5a7e62cb32a528db3
6be39fc2c882d0b9269f1530e0650fd3717df493
/weixin反编译/sources/com/tencent/mm/pluginsdk/ui/preference/HeadImgNewPreference.java
2a8450024ed259d94bc94d2071ea2938c8c203d6
[]
no_license
sir-deng/res
f1819af90b366e8326bf23d1b2f1074dfe33848f
3cf9b044e1f4744350e5e89648d27247c9dc9877
refs/heads/master
2022-06-11T21:54:36.725180
2020-05-07T06:03:23
2020-05-07T06:03:23
155,177,067
5
0
null
null
null
null
UTF-8
Java
false
false
2,696
java
package com.tencent.mm.pluginsdk.ui.preference; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import com.tencent.mm.R; import com.tencent.mm.pluginsdk.ui.a.b; import com.tencent.mm.ui.base.preference.Preference; public final class HeadImgNewPreference extends Preference { private int height; public ImageView jSg; public OnClickListener ugx; public boolean vAa; private boolean vAb; private View vvy; private TextView vzY; public String vzZ; public HeadImgNewPreference(Context context, AttributeSet attributeSet) { this(context, attributeSet, 0); } public HeadImgNewPreference(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); this.height = -1; this.vAa = false; this.vAb = false; setLayoutResource(R.i.dnz); } protected final View onCreateView(ViewGroup viewGroup) { View onCreateView = super.onCreateView(viewGroup); ViewGroup viewGroup2 = (ViewGroup) onCreateView.findViewById(R.h.content); viewGroup2.removeAllViews(); if (this.vAb) { View.inflate(this.mContext, R.i.doA, viewGroup2); } else { View.inflate(this.mContext, R.i.dnH, viewGroup2); } this.jSg = (ImageView) onCreateView.findViewById(R.h.cpj); this.vzY = (TextView) onCreateView.findViewById(R.h.cAz); this.vvy = onCreateView.findViewById(R.h.cvc); return onCreateView; } protected final void onBindView(View view) { super.onBindView(view); if (this.jSg == null) { this.jSg = (ImageView) view.findViewById(R.h.cpj); } if (this.vzY == null) { this.vzY = (TextView) view.findViewById(R.h.cAz); } if (this.vvy == null) { this.vvy = view.findViewById(R.h.cvc); } if (this.ugx != null) { this.vvy.setOnClickListener(this.ugx); } if (this.vzZ != null) { b.a(this.jSg, this.vzZ); this.vzZ = null; } if (this.vAa) { this.vzY.setVisibility(8); this.vvy.setVisibility(0); } else { this.vvy.setVisibility(8); this.vzY.setVisibility(0); } RelativeLayout relativeLayout = (RelativeLayout) view.findViewById(R.h.cwt); if (this.height != -1) { relativeLayout.setMinimumHeight(this.height); } } }
[ "denghailong@vargo.com.cn" ]
denghailong@vargo.com.cn
b4a94df4509b5946ae5e6337967706fb6fcf9bbb
94ccab478b3cd5bafe58d32f8c69fb2396053249
/ch02/src/ch02/Ch02Ex02_05.java
962682f332427b10d43de766b0dbc1bd65162493
[]
no_license
dudgks/work_java
9c52e546b7d20e79b8ec1cc48c688d58891f49e0
b699447031e4db1462a5a520939243d2a21c2de6
refs/heads/master
2021-08-07T23:11:06.200802
2018-08-03T10:57:56
2018-08-03T10:57:56
134,249,201
0
0
null
null
null
null
UTF-8
Java
false
false
1,045
java
package ch02; import java.util.Scanner; public class Ch02Ex02_05 { public static void main(String[] args) { // 1. Scanner 객체 생성 , system.in은 키보드 Scanner scanner = new Scanner(System.in); // 2. 하나의 정수와 하나의 실수를 문자열로 입력받기 String strNum1 = scanner.nextLine(); String strNum2 = scanner.nextLine(); // 3. 입력받은 두 문자열을 각각 정수(int)와 실수(float)로 변경하기 int num1 = Integer.parseInt(strNum1); float num2 = Float.parseFloat(strNum2); // 4. num1, num2 변수를 이용하여 계산하기* float result = num1 * num2; // 5. num1, num2, result 변수를 이용하여 출력하기 ( %와 f 사이에 '.' 을 붙이면 소수점 n자리까지 출력가능) System.out.printf("%d * %.6f = %.6f", num1, num2, result); // 1. num과 B를 곱한 값을 저장한 변수 생성 // 2. num과 B, 1번에서 생성한 변수를 이용해서 출력 } }
[ "KOITT@KOITT-PC" ]
KOITT@KOITT-PC
e52c5815f5b2e0fe9bd95aba6c47c2cb07b28e18
e102baf786efce6b83d8096a0a43a64f20e73268
/app/src/main/java/com/example/zq/kanfang/tools/HttpUtil.java
5f7b27c98ce5806c4712eb7f5526575af24fb57a
[]
no_license
qiangzhen/Kanfang
42b585229ec16fccc5c8b916ec5bb77169344501
f3a3a13759b60e4fcbb58568a3beb73a35df1b40
refs/heads/master
2021-01-21T13:30:07.402383
2016-05-25T09:55:41
2016-05-25T09:55:41
43,999,466
0
0
null
null
null
null
UTF-8
Java
false
false
1,458
java
package com.example.zq.kanfang.tools; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; /** * Created by zq on 2015/9/22. */ public class HttpUtil { /** * 根据指定的地址获取字节数组数据 * * @param path 获取数据的url地址 * @return */ public static byte[] get(String path) { try { URL url = new URL(path); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setConnectTimeout(5000); connection.setDoInput(true); InputStream inputStream = null; ByteArrayOutputStream bos = new ByteArrayOutputStream(); if (connection.getResponseCode() == 200) { inputStream = connection.getInputStream(); int len = 0; byte[] buffer = new byte[1024]; while ((len = inputStream.read(buffer)) != -1) { bos.write(buffer, 0, len); } } //返回字节数组 return bos.toByteArray(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; } }
[ "978823884@qq.com" ]
978823884@qq.com
aeccda246b579ac4108a06e1a817b1a1a24a0539
b9822f984590b503d4ada0036d378c8e3c451c5e
/src/main/java/com/likang/auth/ApiSignature.java
ab4c6e71cfca7d7c989945b733a5e35229c52176
[]
no_license
LiLane/AutoTrade
59e0d8c8603874326432ad102766f2d894a1e0d3
b0e706a9b5678e3162e0756d697c77145a75d612
refs/heads/master
2021-09-05T05:39:19.582295
2018-01-24T13:25:01
2018-01-24T13:25:01
114,240,948
0
0
null
null
null
null
UTF-8
Java
false
false
4,379
java
package com.likang.auth; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.time.Instant; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.Base64; import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; /** * API签名,签名规范: * <p> * http://docs.aws.amazon.com/zh_cn/general/latest/gr/signature-version-2.html * * @author liaoxuefeng */ public class ApiSignature { final Logger log = LoggerFactory.getLogger(getClass()); static final DateTimeFormatter DT_FORMAT = DateTimeFormatter.ofPattern("uuuu-MM-dd'T'HH:mm:ss"); static final ZoneId ZONE_GMT = ZoneId.of("Z"); /** * 创建一个有效的签名。该方法为客户端调用,将在传入的params中添加AccessKeyId、Timestamp、SignatureVersion、SignatureMethod、Signature参数。 * * @param appKey AppKeyId. * @param appSecretKey AppKeySecret. * @param method 请求方法,"GET"或"POST" * @param host 请求域名,例如"be.huobi.com" * @param uri 请求路径,注意不含?以及后的参数,例如"/v1/api/info" * @param params 原始请求参数,以Key-Value存储,注意Value不要编码 */ public void createSignature(String appKey, String appSecretKey, String method, String host, String uri, Map<String, String> params) { StringBuilder sb = new StringBuilder(1024); sb.append(method.toUpperCase()).append('\n') // GET .append(host.toLowerCase()).append('\n') // Host .append(uri).append('\n'); // /path params.remove("Signature"); params.put("AccessKeyId", appKey); params.put("SignatureVersion", "2"); params.put("SignatureMethod", "HmacSHA256"); params.put("Timestamp", gmtNow()); // build signature: SortedMap<String, String> map = new TreeMap<>(params); for (Map.Entry<String, String> entry : map.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); sb.append(key).append('=').append(urlEncode(value)).append('&'); } // remove last '&': sb.deleteCharAt(sb.length() - 1); // sign: Mac hmacSha256 = null; try { hmacSha256 = Mac.getInstance("HmacSHA256"); SecretKeySpec secKey = new SecretKeySpec(appSecretKey.getBytes(StandardCharsets.UTF_8), "HmacSHA256"); hmacSha256.init(secKey); } catch (NoSuchAlgorithmException e) { throw new RuntimeException("No such algorithm: " + e.getMessage()); } catch (InvalidKeyException e) { throw new RuntimeException("Invalid key: " + e.getMessage()); } String payload = sb.toString(); byte[] hash = hmacSha256.doFinal(payload.getBytes(StandardCharsets.UTF_8)); String actualSign = Base64.getEncoder().encodeToString(hash); params.put("Signature", actualSign); if (log.isDebugEnabled()) { log.debug("Dump parameters:"); for (Map.Entry<String, String> entry : params.entrySet()) { log.debug(" key: " + entry.getKey() + ", value: " + entry.getValue()); } } } /** * 使用标准URL Encode编码。注意和JDK默认的不同,空格被编码为%20而不是+。 * * @param s String字符串 * @return URL编码后的字符串 */ public static String urlEncode(String s) { if (s == null) { return ""; } try { return URLEncoder.encode(s, "UTF-8").replaceAll("\\+", "%20"); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException("UTF-8 encoding not supported!"); } } /** * Return epoch seconds */ long epochNow() { return Instant.now().getEpochSecond(); } String gmtNow() { return Instant.ofEpochSecond(epochNow()).atZone(ZONE_GMT).format(DT_FORMAT); } }
[ "likang02@meituan.com" ]
likang02@meituan.com
b06a94b09d3a53668d5bde58e33da6ff890ccefb
4db23693350928ecead170ed1ec59b792533aeff
/tiiimmo/admin/src/main/java/com/linln/admin/quality/controller/BadPCBController.java
eb90a721a700cb3759bb0cd3c013d3a3e6d2e1e9
[ "Apache-2.0" ]
permissive
ckshe/siui
ca931980ab742f6e63c84c93371617f11e867e2e
4064cbbc97093f202de44cc925bb0cd57e2a8fde
refs/heads/master
2022-12-20T09:38:33.940471
2020-08-05T01:13:06
2020-08-05T01:13:06
301,584,374
0
0
null
null
null
null
UTF-8
Java
false
false
3,833
java
package com.linln.admin.quality.controller; import com.linln.admin.quality.domain.BadPCB; import com.linln.admin.quality.service.BadPCBService; import com.linln.admin.quality.validator.BadPCBValid; import com.linln.common.enums.StatusEnum; import com.linln.common.utils.EntityBeanUtil; import com.linln.common.utils.ResultVoUtil; import com.linln.common.utils.StatusUtil; import com.linln.common.vo.ResultVo; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Example; import org.springframework.data.domain.ExampleMatcher; import org.springframework.data.domain.Page; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; /** * @author 风陵苑主 * @date 2020/05/21 */ @Controller @RequestMapping("/quality/badPCB") public class BadPCBController { @Autowired private BadPCBService badPCBService; /** * 列表页面 */ @GetMapping("/index") @RequiresPermissions("quality:badPCB:index") public String index(Model model, BadPCB badPCB) { // 创建匹配器,进行动态查询匹配 ExampleMatcher matcher = ExampleMatcher.matching() .withMatcher("manufactureCode", match -> match.contains()); // 获取数据列表 Example<BadPCB> example = Example.of(badPCB, matcher); Page<BadPCB> list = badPCBService.getPageList(example); // 封装数据 model.addAttribute("list", list.getContent()); model.addAttribute("page", list); return "/quality/badPCB/index"; } /** * 跳转到添加页面 */ @GetMapping("/add") @RequiresPermissions("quality:badPCB:add") public String toAdd() { return "/quality/badPCB/add"; } /** * 跳转到编辑页面 */ @GetMapping("/edit/{id}") @RequiresPermissions("quality:badPCB:edit") public String toEdit(@PathVariable("id") BadPCB badPCB, Model model) { model.addAttribute("badPCB", badPCB); return "/quality/badPCB/add"; } /** * 保存添加/修改的数据 * @param valid 验证对象 */ @PostMapping("/save") @RequiresPermissions({"quality:badPCB:add", "quality:badPCB:edit"}) @ResponseBody public ResultVo save(@Validated BadPCBValid valid, BadPCB badPCB) { // 复制保留无需修改的数据 if (badPCB.getId() != null) { BadPCB beBadPCB = badPCBService.getById(badPCB.getId()); EntityBeanUtil.copyProperties(beBadPCB, badPCB); } // 保存数据 badPCBService.save(badPCB); return ResultVoUtil.SAVE_SUCCESS; } /** * 跳转到详细页面 */ @GetMapping("/detail/{id}") @RequiresPermissions("quality:badPCB:detail") public String toDetail(@PathVariable("id") BadPCB badPCB, Model model) { model.addAttribute("badPCB",badPCB); return "/quality/badPCB/detail"; } /** * 设置一条或者多条数据的状态 */ @RequestMapping("/status/{param}") @RequiresPermissions("quality:badPCB:status") @ResponseBody public ResultVo status( @PathVariable("param") String param, @RequestParam(value = "ids", required = false) List<Long> ids) { // 更新状态 StatusEnum statusEnum = StatusUtil.getStatusEnum(param); if (badPCBService.updateStatus(statusEnum, ids)) { return ResultVoUtil.success(statusEnum.getMessage() + "成功"); } else { return ResultVoUtil.error(statusEnum.getMessage() + "失败,请重新操作"); } } }
[ "853804912@qq.com" ]
853804912@qq.com
8d6898d6106a5edb8f14c9d997a3c212bb03d618
79f003e820130eabc3955fe06bb8d080768e9dc5
/app/src/main/java/com/example/dobit/rplife/Home/ChatTempAdapter.java
9edf2a0942c851b9f2d65566846cdc8e120f209a
[]
no_license
jeremysantillan/RPLIFE
0a2450378207bc282c1cb5d0fa0b281e37d6df3e
7ab3f460c3e6edd7183f0e57a53df67735c1dca4
refs/heads/master
2021-06-21T13:48:40.024293
2016-12-05T14:43:21
2016-12-05T14:43:21
100,262,350
0
0
null
null
null
null
UTF-8
Java
false
false
3,782
java
package com.example.dobit.rplife.Home; /** * Created by dobit on 12/3/2016. */ import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.example.dobit.rplife.R; import java.util.ArrayList; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.example.dobit.rplife.R; import java.util.ArrayList; /** * Created by dobit on 12/3/2016. */ public class ChatTempAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { public static int ITEM_TYPE_LEFT = 0; public static int ITEM_TYPE_RIGHT = 1; Context context; ArrayList<ChatModel> data; LayoutInflater inflater; public ChatTempAdapter(Context context, ArrayList<ChatModel> data) { this.context = context; this.data = data; inflater = LayoutInflater.from(context); } @Override public int getItemViewType(int position) { if(position == 1 || position == 4){ return ITEM_TYPE_RIGHT; } else return ITEM_TYPE_LEFT; } @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if(viewType == ITEM_TYPE_LEFT){ View leftView = inflater.inflate(R.layout.chat_row, parent, false); ChatViewHolder chatViewHolder = new ChatViewHolder(leftView); return chatViewHolder; } else { View rightView = inflater.inflate(R.layout.chat_row_right, parent, false); ChatRightHolder chatRightHolder = new ChatRightHolder(rightView); return chatRightHolder; } } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { final int itemType = getItemViewType(position); if(itemType == ITEM_TYPE_LEFT){ ((ChatViewHolder)holder).face.setImageResource(data.get(position).image); ((ChatViewHolder)holder).message.setText(data.get(position).message); ((ChatViewHolder)holder).chatBubbleLeft.setImageResource(data.get(position).imageBubble); } else{ ((ChatRightHolder)holder).rightFace.setImageResource(data.get(position).image); ((ChatRightHolder)holder).rightMessage.setText(data.get(position).message); ((ChatRightHolder)holder).chatBubbleRight.setImageResource(data.get(position).imageBubble); } } @Override public int getItemCount() { return data.size(); } class ChatViewHolder extends RecyclerView.ViewHolder{ ImageView face; ImageView chatBubbleLeft; TextView message; public ChatViewHolder(View itemView) { super(itemView); chatBubbleLeft = (ImageView) itemView.findViewById(R.id.ivChatBubble); face = (ImageView) itemView.findViewById(R.id.ivFace); message = (TextView) itemView.findViewById(R.id.tvMessages); } } class ChatRightHolder extends RecyclerView.ViewHolder{ ImageView rightFace; ImageView chatBubbleRight; TextView rightMessage; public ChatRightHolder(View itemView) { super(itemView); chatBubbleRight = (ImageView) itemView.findViewById(R.id.ivRightChatBubble); rightFace = (ImageView) itemView.findViewById(R.id.ivRightFace); rightMessage = (TextView) itemView.findViewById(R.id.tvRightChat); } } }
[ "junndobit123@gmail.com" ]
junndobit123@gmail.com
e6475e4b8e167d0ef42fc81e6280ad12924903fd
ab09885bf024ecb5af6b4062faa0a9a4e4f2be6e
/HibernateEx/src/com/sjsu/MinElement.java
dd9bc4c467e9f046456ab88de83fc11829dfd4ea
[]
no_license
agarwalharshit/MyWorkspaces
2b63d666d79b5849d223038c40e9652d51876d24
0e7f665af79fa7c516262949aae91d2eaf68fbc7
refs/heads/master
2021-01-12T02:33:32.335411
2017-02-18T00:34:29
2017-02-18T00:34:29
78,069,989
0
0
null
null
null
null
UTF-8
Java
false
false
450
java
package com.sjsu; public class MinElement { public static void main(String[] args) { try{ //int[] arr={56,78,89,4,12,23,34,44}; int[] arr={8,1,2,3,4,5,6,7}; int minElement=-1; for(int i=0;i<(arr.length-1);i++){ if(arr[i+1]<arr[i]){ minElement=arr[i+1]; break; } } if(minElement==-1){ minElement=arr[0]; } System.out.println(minElement); }catch(Exception e){ System.out.println(e.getMessage()); } } }
[ "Harshit@harshit.local" ]
Harshit@harshit.local
9afa8f6991567ec48a30d45f36a1991667552513
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/aiccs-20191015/src/main/java/com/aliyun/aiccs20191015/models/GetSkillGroupServiceStatusResponse.java
f073af37252d428b96f9549002d75a1d9d18caf1
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,479
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.aiccs20191015.models; import com.aliyun.tea.*; public class GetSkillGroupServiceStatusResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public GetSkillGroupServiceStatusResponseBody body; public static GetSkillGroupServiceStatusResponse build(java.util.Map<String, ?> map) throws Exception { GetSkillGroupServiceStatusResponse self = new GetSkillGroupServiceStatusResponse(); return TeaModel.build(map, self); } public GetSkillGroupServiceStatusResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public GetSkillGroupServiceStatusResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public GetSkillGroupServiceStatusResponse setBody(GetSkillGroupServiceStatusResponseBody body) { this.body = body; return this; } public GetSkillGroupServiceStatusResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
60f4d04e94291f3f1632767fcb553451e12380a0
d22924b7b0edf470f63f1d53cc2417af1090a9cb
/Array1/src/Array9/Array9.java
00ad9de239124b2012e631c6a7a46bf3b3f51a51
[]
no_license
MariaGonca/I.E.-6.1.-Programaci-n-Arrays-
dc671801f855a050d975fbfc971698cc1d9e18b4
747cbde8a7f0e89d9d90190ebf0a9ebafc83ca99
refs/heads/master
2023-02-19T19:52:54.597620
2021-01-18T20:41:15
2021-01-18T20:41:15
330,779,311
0
0
null
null
null
null
ISO-8859-1
Java
false
false
788
java
package Array9; import java.util.Scanner; /** * * @author mcgca * */ public class Array9 { static Scanner sc = new Scanner(System.in); /** * Elabore un programa que permita introducir 20 elementos de tipo entero en un arreglo, el programa mostrara impreso el arreglo en orden inverso. * @param args */ public static void main(String[] args) { //Se crea el vector de 20 números int[] vector9 = new int[20]; int i=0; System.out.println("Inserte un arreglo de 20 números: "); for(i=0; i<vector9.length; i++){ vector9[i]=sc.nextInt(); } //Mostrar el arreglo en orden inverso System.out.println("Imprimiendo orden inverso."); for (i = vector9.length - 1; i >= 0 ; i--) { System.out.print(vector9[i] + " "); } } }
[ "mariadelcarmen.gonzalezcarranza@nervion.salesianas.org" ]
mariadelcarmen.gonzalezcarranza@nervion.salesianas.org
896a6640606ec2a732554398184d91d48293769a
c7bdefcaa4b2c7d1a857bfd5253c556df0159cbc
/SLOTGAMES/src/test/java/stepDefinition_SeaPearl/SeaPearl_Balance_Check_MaxBet_WinAmount_AddedTo_Balance.java
26dff79994eb139a18f558821ce52bb8cb77b016
[]
no_license
pavanysecit/SLOTGAMES_MOBILES
62a97bded1f4d0df0f50fc2176e473ce3dac267b
80bb25d81feda93b3f9137080bd2f0922e882da6
refs/heads/master
2021-02-15T04:56:59.388043
2021-01-07T09:36:44
2021-01-07T09:36:44
244,863,982
0
0
null
2020-10-13T20:03:05
2020-03-04T09:52:42
Java
UTF-8
Java
false
false
5,287
java
package stepDefinition_SeaPearl; import org.junit.Assert; import org.openqa.selenium.By; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import cucumber.api.java.en.Given; import cucumber.api.java.en.Then; import cucumber.api.java.en.When; import io.appium.java_client.AppiumDriver; import io.appium.java_client.MobileElement; public class SeaPearl_Balance_Check_MaxBet_WinAmount_AddedTo_Balance { AppiumDriver<MobileElement> driver; public SeaPearl_Balance_Check_MaxBet_WinAmount_AddedTo_Balance() throws InterruptedException { this.driver = SeaPearl_URL_Login.getDriver(); //this.driver = SeaPearl_URL_TryNow.getDriver(); } @Given("^Chrome browser, valid URL, valid login details, Sea Pearl slot game, balance, spin button, gamble collect, max credit and bet value, win amount added to balance$") public void chrome_browser_valid_URL_valid_login_details_Sea_Pearl_slot_game_balance_spin_button_gamble_collect_max_credit_and_bet_value_win_amount_added_to_balance() throws Throwable { } @When("^Open the Sea Pearl slot game by entering the valid URL in browser, enter the valid login details, spin till player wins, gamble screen, gamble collect, win amount added to main balance$") public void open_the_Sea_Pearl_slot_game_by_entering_the_valid_URL_in_browser_enter_the_valid_login_details_spin_till_player_wins_gamble_screen_gamble_collect_win_amount_added_to_main_balance() throws Throwable { WebDriverWait wait = new WebDriverWait(driver, 60); wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("hud_Hud_txtBalance1"))); //Storing the value before spin or win String preWin = driver.findElement(By.id("hud_Hud_txtBalance1")).getText(); System.out.println("Current balance of the account: " +preWin); //Getting the bet value and Bet amount MobileElement creditValue = driver.findElement(By.id("hud_txtCredit")); Thread.sleep(1000); creditValue.click(); Thread.sleep(1000); MobileElement credit4 = driver.findElement(By.id("hud_CreditPopup40.5")); credit4.click(); Thread.sleep(2000); MobileElement creditValue4 = driver.findElement(By.id("hud_txtCredit")); String crdt4 =creditValue4.getText(); System.out.println("Selected credit value is: " +crdt4); //Selecting bet amount as 100 driver.findElement(By.id("hud_txtBetAmount")).click(); Thread.sleep(2000); MobileElement bet4_5 = driver.findElement(By.id("hud_BetPopup5100")); bet4_5.click(); Thread.sleep(2000); MobileElement maxbet = driver.findElement(By.id("hud_txtBetAmount")); String maxbetval =maxbet.getText(); System.out.println("Selected max betvalue is: " +maxbetval); // Start reel spin MobileElement start = driver.findElement(By.id("hud_btnSpin")); start.click(); Thread.sleep(8000); MobileElement winE = driver.findElement(By.id("hud_Hud_txtWin1")); String prewin = winE.getText(); String winTex= winE.getText(); while(prewin.isEmpty()){ start.click(); Thread.sleep(8000); winTex = winE.getText(); prewin= prewin+winTex; System.out.println(winTex.isEmpty()); } System.out.println("Win amount:"+winTex); Thread.sleep(1000); MobileElement winAmt = driver.findElement(By.id("hud_Hud_txtWin1")); String Winamt =winAmt.getText(); String winTex1 = Winamt.replaceAll(",", ""); System.out.println("Win amount after replacing ',' from win amount: "+ winTex1); Thread.sleep(1000); String postWin = driver.findElement(By.id("hud_Hud_txtBalance1")).getText(); System.out.println("Balance before adding win amount is: "+" "+postWin); String postWin1 = postWin.replaceAll(",", ""); System.out.println("Balance before win amount :"+postWin1); Thread.sleep(2000); //Clicking on Collect button driver.findElement(By.id("hud_btnGamble")).click(); Thread.sleep(3000); //Clicking on Collect button driver.findElement(By.id("gamble_btnCollect")).click(); Thread.sleep(3000); String Balance = driver.findElement(By.id("hud_Hud_txtBalance1")).getText(); String bal1 = Balance.replaceAll(",", ""); System.out.println("Balance after win amount :"+bal1); Thread.sleep(2000); // add the balance with win amount double conValue = Double.parseDouble(postWin1) + Double.parseDouble(winTex1); String dbi = String.format("%.2f", conValue); System.out.println("Balance after adding win amount: "+dbi); Thread.sleep(2000); //Validate the balance after win amount added to balance Assert.assertEquals(dbi, bal1); Thread.sleep(2000); //Spin the reels after win amount is added to balance wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("hud_btnSpin"))); System.out.println("Spin button is present on the screen"); start.click(); Thread.sleep(4000); System.out.println("User is able to spin after the winamount added to balance"); System.out.println("Test case pass"); } @Then("^MaxBet Win amount should get added to the main balance after win and balance should get increased with win amount in Sea Pearl slot game$") public void maxbet_Win_amount_should_get_added_to_the_main_balance_after_win_and_balance_should_get_increased_with_win_amount_in_Sea_Pearl_slot_game() throws Throwable { Thread.sleep(2000); driver.quit(); } }
[ "pavan.kumar@ysecit.com" ]
pavan.kumar@ysecit.com
91f4aaff899f330e8fb8d5658593d504cc03e85a
0bcfbf8eed2de3438a4a74f22871e222f36da7b2
/backend_project2/src/main/java/com/niit/model/ProfilePicture.java
bda1c3f487b90ac6fa6882977db17940091b0ee0
[]
no_license
Aditinair2/Project-
17160ed658a4a1757c18f88fd8c7e514c44a360b
1bbb4089a25b0bf5378cc3a6fde397eb55f6fbfb
refs/heads/master
2020-12-02T23:51:33.319603
2017-10-10T09:16:50
2017-10-10T09:16:50
95,955,211
0
0
null
null
null
null
UTF-8
Java
false
false
520
java
package com.niit.model; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Lob; import javax.persistence.Table; @Entity @Table(name="profilepicture") public class ProfilePicture { @Id private String username; @Lob private byte[] image; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public byte[] getImage() { return image; } public void setImage(byte[] image) { this.image = image; } }
[ "aditi7493@gmail.com" ]
aditi7493@gmail.com
cf076829ea541bd5811224b2b373644b6c0d9058
0c2e2e06c56ec0e05ddb74679fdfe6c4404274b1
/java-advanced/src/main/java/com/sda/advanced/oop/polymorphism/static1/Human.java
64a220dd276e6d545ef951519925b0a142faccd9
[]
no_license
cosminbucur/sda-upskill
d9ef46237c3cc93a25219b9ecbca60d0b7d5d14b
71fcab3705a8fb8c72bfa7dfa33d17fbde6a31fd
refs/heads/master
2023-08-11T20:19:51.710710
2021-09-11T20:16:18
2021-09-11T20:16:18
333,095,665
0
1
null
null
null
null
UTF-8
Java
false
false
305
java
package com.sda.advanced.oop.polymorphism.static1; public class Human { public void walk() { System.out.println("human walks"); } public final void run() { System.out.println("human runs"); } private void sing() { System.out.println("human sings"); } }
[ "cosmin.bucur@kambi.com" ]
cosmin.bucur@kambi.com
3845a15577c4fae534d04945e643287f03f4e3ca
7e6c65c2a27fa25f85c0a6a78c5de2c7cbd92d36
/JAICore/jaicore-search/src/jaicore/search/algorithms/standard/core/SolutionAnnotationEvent.java
b852432e65814d1a0e9d7f90aafca331bad4cc9c
[]
no_license
mirkojuergens/AILibs
1481592b4c2568b162f4c646b55aa48d4c078e52
82fb70c75c68f92a562f8b7a3674e836d175abd6
refs/heads/master
2020-03-19T03:37:11.275050
2018-10-23T06:50:42
2018-10-23T06:50:42
135,744,730
0
0
null
2018-06-04T13:15:38
2018-06-01T17:16:21
Java
UTF-8
Java
false
false
667
java
package jaicore.search.algorithms.standard.core; import java.util.List; public class SolutionAnnotationEvent<T, V extends Comparable<V>> { private final List<T> solution; private final String annotationName; private final Object annotationValue; public SolutionAnnotationEvent(List<T> solution, String annotationName, Object annotationValue) { super(); this.solution = solution; this.annotationName = annotationName; this.annotationValue = annotationValue; } public List<T> getSolution() { return solution; } public String getAnnotationName() { return annotationName; } public Object getAnnotationValue() { return annotationValue; } }
[ "fmohr@mail.upb.de" ]
fmohr@mail.upb.de
6205404879cd5839f999eb1bea87a6fcc89367ab
7e0a8d9fbd45cd45c0ba928f0bf0682fdfc3c933
/src/main/java/com/mypractice/assistancetracker/dao/UserDetailsDao.java
7ce184fd1916a0269efadecbc6524108c30f1eb4
[]
no_license
Nasruddinkhan/AssistanceTracker
0a3135cacdc59970e6ea32c9ba52b80bc28b61a3
bd5a53547ab1d91d3327d9c54d36c2d323f19a72
refs/heads/master
2022-09-14T01:52:52.473839
2020-05-28T15:40:30
2020-05-28T15:40:30
250,590,307
0
0
null
null
null
null
UTF-8
Java
false
false
187
java
package com.mypractice.assistancetracker.dao; import com.mypractice.assistancetracker.model.User; public interface UserDetailsDao { User findUserByUsername(String username); }
[ "nasruddinkhan44@gmail.com" ]
nasruddinkhan44@gmail.com
8e24061cdc468a702ee02a120b5972f553810b59
492b7e6e4941c0435515c06e6f4a01ef50b4067d
/src/main/java/com/genrs/webdataservice/repository/server/PlayerCredentialsRepository.java
34d1f33ff50d4c1b62fda1dc9976338aa2eaaef7
[]
no_license
filenote/webdataservice
3217c12e9b25fc2acf50335b8e8ff926df49397e
0427d1a78c4865ef6cb0e8e177a013dd2c061e43
refs/heads/master
2020-04-08T04:01:56.645268
2018-11-25T05:06:39
2018-11-25T05:06:39
158,999,704
0
0
null
null
null
null
UTF-8
Java
false
false
1,218
java
package com.genrs.webdataservice.repository.server; import com.genrs.webdataservice.model.server.entity.PlayerCredentials; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; import javax.swing.text.html.Option; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.UUID; @Repository public class PlayerCredentialsRepository { @Autowired private JdbcTemplate jdbcTemplate; public Optional<PlayerCredentials> findPlayerByUsername(String username) { String sql = "SELECT BIN_TO_UUID(id), username, password FROM user WHERE user.username = ?"; List<PlayerCredentials> credentialsList = jdbcTemplate.query(sql, preparedStatement -> preparedStatement.setString(1, username), (resultSet, i) -> new PlayerCredentials( UUID.fromString(resultSet.getString(1)), resultSet.getString(2), resultSet.getString(3) )); return credentialsList.size() == 1 ? Optional.of(credentialsList.get(0)) : Optional.empty(); } }
[ "prodriguez.eh@gmail.com" ]
prodriguez.eh@gmail.com
8f2b1459edd40dfc01cc9c7ef3b652dabc0b0cb6
2c6d68bfd7cfbb8e7f20a5644654c613418fe483
/src/main/java/pl/coderslab/hib/day1/Book.java
6a9c435fe0685ebee1e5a1efe8aff1f1522581c6
[]
no_license
arek-jozwiak-coderslab/gdajees02sf
043d5364ff92ec00bf0c5a0deba8e3741f22f341
866e0a0d8939647badfa24453bc9c949460c87ff
refs/heads/master
2020-03-25T13:59:40.363256
2018-10-05T05:29:50
2018-10-05T05:29:50
143,850,796
0
0
null
2018-08-20T12:10:28
2018-08-07T09:28:54
Java
UTF-8
Java
false
false
1,599
java
package pl.coderslab.hib.day1; import javax.persistence.*; @Entity @Table(name = "books") public class Book { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String title; @ManyToOne private Author author; private String isbnA; private String publisher; private String description; public Author getAuthor() { return author; } public void setAuthor(Author author) { this.author = author; } public String getPublisher() { return publisher; } public void setPublisher(String publisher) { this.publisher = publisher; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public int getRating() { return rating; } public void setRating(int rating) { this.rating = rating; } private int rating; public String getIsbnA() { return isbnA; } public void setIsbnA(String isbnA) { this.isbnA = isbnA; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @Override public String toString() { return "Book{" + "id=" + id + ", title='" + title + '\'' + ", isbnA='" + isbnA + '\'' + '}'; } }
[ "arek@arcyro.pl" ]
arek@arcyro.pl
b607d3a7be7ec7874cb6184f88565704ca1cb7cc
dca09898aa503c3f25d0692b4aa267dade7449ac
/JavaChatB13/src/MultiClient6.java
ce24d42a501b35b7a5eabfcb97bb7649df359994
[]
no_license
chihi430/20190802
b1deb2525b9f19c1a5da99fdf17a3fecc28d0756
43e70d553643b38f14b297d6edbb0e4ba4b4b911
refs/heads/master
2020-06-28T06:10:51.785498
2019-09-06T03:45:44
2019-09-06T03:45:44
200,160,635
0
0
null
null
null
null
UTF-8
Java
false
false
1,050
java
import java.io.*; import java.net.*; import java.util.Scanner; public class MultiClient6 { public static void main(String[] args) throws UnknownHostException, IOException { System.out.println("이름을 입력해 주세요"); Scanner s = new Scanner(System.in); String s_name = s.nextLine(); try { String ServerIP = "localhost"; //String ServerIP = args[0]; //if(args.length>0) // ip주소 찾아가는거 // ServerIP = args[0]; Socket socket = new Socket(ServerIP, 9999); System.out.println("서버와 연결이 되었습니다....."); //서버에서 보내는 메시지를 사용자의 콘솔에 출력하는 쓰레드 Thread receiver = new Reciver6(socket); receiver.start(); //사용자로부터 얻은 문자열을 서버로 전송해주는 역할을 하는 쓰레드 // Thread sender = new Sender5(socket, s_name); // sender.start(); new ChatWin(socket,s_name); } catch (Exception e) { System.out.println("예외[MultiClient class:]" + e); } } }
[ "chigi430@gmail.com" ]
chigi430@gmail.com
0f89abae401711c946c46c2f02b707894633bf3b
bc387efdc4b9c842d9d899b4199888b0907fe8cd
/code/coreJava/src/lesson3/Point.java
45862ba01a631594ed1fce57d0d03501f851242a
[]
no_license
tofu1983123/java-study
ffe5436dcaf9be1ec6013e345c846e19f324e065
5836ccbf553aa6128032c718acffb25e05dcfd9c
refs/heads/master
2021-01-02T08:13:55.823405
2015-06-06T14:00:24
2015-06-06T14:00:24
31,314,204
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package lesson3; public class Point { private double x,y;// public Point(){} public Point(double x, double y) { this.x = x; this.y = y; } public double getX() { return x; } public void setX(double x) { this.x = x; } public double getY() { return y; } public void setY(double y) { this.y = y; } public double getDistance(){ return Math.sqrt(x*x+y*y); } public double getDistance(Point p){ return Math.sqrt((this.x-p.x)*(this.x-p.x)+(this.y-p.y)*(this.y-p.y)); } }
[ "tofu1983@163.com" ]
tofu1983@163.com
07b74ae420fe71a307eeee33520615fad51ad1d5
2715c912406f5b6ede91ff92317f034ca20b4bd3
/backend/src/main/java/com/techprimers/db/controller/UsersController.java
4e3ce9d9a1ff9c92354baf25417fa529db7bb3e0
[ "MIT" ]
permissive
Magic-Fang/course-register-web
2c22b1ca1f84c6de0d162bee6e82ed7408698fd9
97fd1ad20723019d2f2763f02153ccfc100fdd0c
refs/heads/master
2020-05-16T12:56:54.479373
2019-04-25T03:25:07
2019-04-25T03:25:07
183,059,847
0
1
null
null
null
null
UTF-8
Java
false
false
713
java
package com.techprimers.db.controller; import com.techprimers.db.model.Users; import com.techprimers.db.repository.UsersRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @RequestMapping(value = "/rest/users") public class UsersController { @Autowired UsersRepository usersRepository; @GetMapping(value = "/all") public List<Users> getAll() { return usersRepository.findAll(); } @PostMapping(value = "/load") public List<Users> persist(@RequestBody final Users users) { usersRepository.save(users); return usersRepository.findAll(); } }
[ "fangzhou@lawn-143-215-90-200.lawn.gatech.edu" ]
fangzhou@lawn-143-215-90-200.lawn.gatech.edu
d491a5185f86432653cde0f56b7541442eb42d22
48c18a3d9810338912e74f4f233c351fb8d1b947
/src/main/java/org/tempuri/zmlq/GetAllCompanysResponse.java
68a7c47e97a2a52ff7f9884484701b410c503a48
[]
no_license
hjshiwbd/menjin-web
1d1a7637ecdaf2c75a0051751badbd1264ca260d
1156d467508b2190499dc7086ad1c137ca0ad9e9
refs/heads/master
2021-01-10T10:02:15.296458
2016-04-06T15:54:19
2016-04-06T15:54:19
49,773,068
1
1
null
null
null
null
UTF-8
Java
false
false
1,686
java
package org.tempuri.zmlq; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>anonymous complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="out-result" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "outResult" }) @XmlRootElement(name = "GetAllCompanysResponse") public class GetAllCompanysResponse { @XmlElementRef(name = "out-result", type = JAXBElement.class, required = false) protected JAXBElement<String> outResult; /** * 获取outResult属性的值。 * * @return * possible object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public JAXBElement<String> getOutResult() { return outResult; } /** * 设置outResult属性的值。 * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public void setOutResult(JAXBElement<String> value) { this.outResult = value; } }
[ "34489659@qq.com" ]
34489659@qq.com
132ca5aa9a0c4aeb411b21d66fe1a8a883a61e5f
b2b465990de865d63021551e14fb99e4453a6bab
/src/main/java/wait/FluentWaitServices.java
f71cf00a839c3a4ae68c8df9d0f6bcf123c356e9
[]
no_license
arifcakir/javaDockerSeleniumGrid
03edbb8bfc31e52802a12489e93220b904f610c2
118dcd04f43c69181746b86af6783e7d20635388
refs/heads/master
2023-03-30T06:13:29.874365
2021-04-11T14:33:33
2021-04-11T14:33:33
356,890,286
0
0
null
null
null
null
UTF-8
Java
false
false
1,046
java
package wait; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.ui.FluentWait; import java.util.concurrent.TimeUnit; public class FluentWaitServices extends WaitService { FluentWaitServices() { fluentWebDriverWait = new FluentWait<WebDriver>(webdriver) .withTimeout(30, TimeUnit.SECONDS) .pollingEvery(500, TimeUnit.MILLISECONDS); } FluentWaitServices(int timeOutSeconds, int poolingEverySeconds) { fluentWebDriverWait = new FluentWait<WebDriver>(webdriver) .withTimeout(timeOutSeconds, TimeUnit.SECONDS) .pollingEvery(poolingEverySeconds, TimeUnit.SECONDS); } FluentWaitServices(int timeOutSeconds, int poolingEverySeconds, Exception ignoreException) { fluentWebDriverWait = new FluentWait<WebDriver>(webdriver) .withTimeout(timeOutSeconds, TimeUnit.SECONDS) .pollingEvery(poolingEverySeconds, TimeUnit.SECONDS) .ignoring(ignoreException.getClass()); } }
[ "arif.cakir@kizilay.org.tr" ]
arif.cakir@kizilay.org.tr
b42de81801db3df0968a65af95f2d3c094d15193
b9bde20d3b2abaefd057d240dbb5a3f71389a117
/app/src/main/java/com/aa183/firmansyah/TampilBook.java
19b0f327bf4f444856639f1a2aa95ae7e4ddf6ef
[]
no_license
dickyfirmansyah616/UAS_180030064_1
1e1f4f65e9d78badadc39c81a64158eefe2fa4c1
fe46bf53855936958013a2332da93c33902b6213
refs/heads/master
2022-09-18T21:24:56.671468
2020-05-31T04:33:12
2020-05-31T04:33:12
268,207,811
0
0
null
null
null
null
UTF-8
Java
false
false
1,939
java
package com.aa183.firmansyah; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; public class TampilBook extends AppCompatActivity { private ImageView imgBook; private TextView tvJudul, tvPenulis, tvGenre, tvTanggal, tvIsiSinopsis; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tampil_book); imgBook = findViewById(R.id.iv_book); tvJudul = findViewById(R.id.tv_judul); tvPenulis = findViewById(R.id.tv_penulis); tvGenre = findViewById(R.id.tv_genre); tvTanggal = findViewById(R.id.tv_tanggal); tvIsiSinopsis = findViewById(R.id.tv_sinopsis); Intent terimaDataBook = getIntent(); tvJudul.setText(terimaDataBook.getStringExtra("JUDUL")); tvPenulis.setText(terimaDataBook.getStringExtra("PENULIS")); tvGenre.setText(terimaDataBook.getStringExtra("GENRE")); tvTanggal.setText(terimaDataBook.getStringExtra("TANGGAL")); tvIsiSinopsis.setText(terimaDataBook.getStringExtra("ISI_SINOPSIS")); String imgLocation = terimaDataBook.getStringExtra("GAMBAR"); try { File file = new File(imgLocation); Bitmap bitmap = BitmapFactory.decodeStream(new FileInputStream(file)); imgBook.setImageBitmap(bitmap); imgBook.setContentDescription(imgLocation); } catch (FileNotFoundException er){ er.printStackTrace(); Toast.makeText(this, "Gagal mengambil gambar dari media penyimpanan", Toast.LENGTH_SHORT).show(); } } }
[ "anakshot01@gmail.com" ]
anakshot01@gmail.com
1f08fbb60de352bc9dd051444d4196d586f83dd7
6e3a0d0d21a7e5fcb6e4a859434cf79765826d75
/app/src/main/java/org/cookingpatterns/Parsing/CookNode.java
c07d4ab6ea121d55d8732c8afe465050465e8d41
[]
no_license
Valkyrja/CookingPatterns
151579b2b4ea77e2052ee9ee5a6a98ad3a72b470
21eaa613633c3f17580b040fdecf4ce356d00b89
refs/heads/master
2021-01-17T04:36:19.125286
2015-12-09T13:38:49
2015-12-09T13:38:49
45,673,914
1
0
null
null
null
null
UTF-8
Java
false
false
299
java
package org.cookingpatterns.Parsing; import org.cookingpatterns.Interfaces.ISyntaxTreeVisitor; /** * Created by Andreas on 02.12.2015. */ public class CookNode extends Node { @Override public void acceptVisitor(ISyntaxTreeVisitor visitor) { visitor.VisitCookNode(this); } }
[ "andreas.gladik@gmail.com" ]
andreas.gladik@gmail.com
2c3e46893bcba634552845e27e1a95fb0eedfd9f
11e6fba7577ec6d6ce30e59ddb73b7292b01df2b
/src/main/java/com/jorgefeitosa/cursomc/domain/Pagamento.java
f93f5f22c2b44107b07a0c14bfb65fa6d3336b26
[]
no_license
jfeitosamm/cursomc
3bb4d231b64629040a349f2622f96c9f092f7a2f
2ac8917b84839361a6f17856a3f11551168a25f6
refs/heads/master
2022-12-12T21:26:23.425769
2020-08-30T02:32:58
2020-08-30T02:32:58
283,920,222
0
0
null
null
null
null
UTF-8
Java
false
false
1,832
java
package com.jorgefeitosa.cursomc.domain; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.JoinColumn; import javax.persistence.MapsId; import javax.persistence.OneToOne; import com.fasterxml.jackson.annotation.JsonIgnore; import com.jorgefeitosa.cursomc.domain.enums.EstadoPagamento; @Entity @Inheritance(strategy = InheritanceType.JOINED) public abstract class Pagamento implements Serializable{ private static final long serialVersionUID = 1L; @Id private Integer id; private Integer estado; @JsonIgnore @OneToOne @JoinColumn(name = "pedido_id") @MapsId private Pedido pedido; public Pagamento() { } public Pagamento(Integer id, EstadoPagamento estado, Pedido pedido) { super(); this.id = id; this.estado = estado.getCod(); this.pedido = pedido; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public EstadoPagamento getEstado() { return EstadoPagamento.toEnum(estado); } public void setEstado(EstadoPagamento estado) { this.estado = estado.getCod(); } public Pedido getPedido() { return pedido; } public void setPedido(Pedido pedido) { this.pedido = pedido; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Pagamento other = (Pagamento) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } }
[ "jorgefeitosa.btu@gmail.com" ]
jorgefeitosa.btu@gmail.com
19753470bf6d8fd4d2c6ab49445b8f0552b9c526
4729acfca28e8ff347564129581444639efc188c
/app/src/main/java/com/example/quanlinhanvien/Danh_Sach.java
e7b7369cbbb2bbaa9a816bab153b45e907d781b6
[]
no_license
minhtien99tn/MinhTien
eac6e81b14d74719941cdf0b8f36b4e3952dcb81
53a33987650770bb574d9437330ae8ee2ea90aec
refs/heads/master
2022-04-11T01:00:28.729376
2020-04-11T09:43:44
2020-04-11T09:43:44
254,833,422
0
0
null
null
null
null
UTF-8
Java
false
false
3,432
java
package com.example.quanlinhanvien; import androidx.appcompat.app.AppCompatActivity; import android.app.Dialog; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.Toast; import java.util.ArrayList; import java.util.List; public class Danh_Sach extends AppCompatActivity { public ListView lvDanhSach; public ListNhanVienAdapter adapter; private ArrayList<NhanVien> arrayList; String table_name = "nhanvien"; public int maNV ; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_danh__sach); lvDanhSach = findViewById(R.id.lvDanhSach); loadData(table_name); clickListView(); } private void clickListView() { lvDanhSach.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // Intent intent = new Intent(Danh_Sach.this,ChiTietNhanVien.class); // Bundle bundle = new Bundle(); // bundle.putInt("id",arrayList.get(position).getMaNV()); // intent.putExtras(bundle); // startActivity(intent); // Log.e("id gui", String.valueOf(arrayList.get(position).getMaNV())); // get id nhân viên maNV = arrayList.get(position).getMaNV(); ShowDiaLogConfirm(); } }); } private void ShowDiaLogConfirm() { final Dialog dialog = new Dialog(this); dialog.setContentView(R.layout.custom_dialog_layout); Button btSua = dialog.findViewById(R.id.lvSua); Button btXoa = dialog.findViewById(R.id.lvXoa); dialog.show(); btSua.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(Danh_Sach.this,ChiTietNhanVien.class); Bundle bundle = new Bundle(); bundle.putInt("id",maNV); intent.putExtras(bundle); startActivity(intent); Log.e("id gui", String.valueOf(maNV)); dialog.cancel(); } }); btXoa.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Xoa(); dialog.cancel(); } }); } private void Xoa() { Database_NV database_nv = new Database_NV(this); database_nv.delete_ID_NV(maNV,table_name); adapter.notifyDataSetChanged(); arrayList.clear(); loadData(table_name); } // đổ dữ liệu lên list view private void loadData(String table_name) { arrayList = new ArrayList<>(); Database_NV database_nv = new Database_NV(this); arrayList = database_nv.getAllNhanVien(table_name); adapter = new ListNhanVienAdapter(this,R.layout.item,arrayList); lvDanhSach.setAdapter(adapter); database_nv.close(); } }
[ "=" ]
=
217edd6351041e3ca991de247c09141b676f3b80
e04e0051145da059ccac7ed72d4c158b6df08f02
/Java/codility/src/lesson5.java
59f8c7a3fb8e310f626fa7562ce72f42ed07acf0
[]
no_license
bnerDY/ACM
4cea2060b085c7c938ba5a603deff778da7da2a2
4114cf26d68b27f52a2871b4419a46604c5dc876
refs/heads/master
2021-01-17T04:08:01.020771
2019-04-16T15:12:42
2019-04-16T15:12:42
17,503,371
0
1
null
null
null
null
UTF-8
Java
false
false
1,258
java
/** * Created by Martin on 15/11/2015. */ public class lesson5 { //Prefix Sums. /** * Given three integers A, B and K, * returns the number of integers within the range [A..B] that * are divisible by K, i.e.: * { i : A ≤ i ≤ B, i mod K = 0 } * For example, for A = 6, B = 11 and K = 2, your function * should return 3, because there are three numbers divisible * by 2 within the range [6..11], namely 6, 8 and 10. * @param A * @param B * @param K * @return */ public static int countDiv(int A, int B, int K) { // write your code in Java SE 8 // poor complexity // int res = 0; // if(K == 0) { // return (-1); // } // if(K > B) { // return 0; // } // while (A < B) { // if (A % K == 0) { // res += 1; // } // A++; // } // return res; int count = 0; int div1 = 0; int div2 = 0; div1 = A / K; div2 = B / K; count = div2 - div1; if (A % K == 0) count++; return count; } public static void main(String[] args) { System.out.println(countDiv(6,11,2)); } }
[ "dingxin.yu@uqconnect.edu.au" ]
dingxin.yu@uqconnect.edu.au
502d8292fffd176a72fd1e94761560b5b04c0e9d
5a5f0f473a3994380b8f03a5500934990154ef0c
/Övning91/src/övning91/Övning91.java
d05473f32ea5279e65f57a9aa2ae7fba072c8248
[]
no_license
rappos/Gymnasiet-Programmering-1
89b4af1b78a4749ad3ec7fb8c5ae3b6dc757abae
0ae705dab78775b319dd75eb5fb3f4455a2cb76e
refs/heads/master
2023-05-30T20:17:12.639608
2023-04-28T12:06:23
2023-04-28T12:06:23
232,209,584
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
package övning91; import java.util.Scanner; public class Övning91 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Radie: "); int radie = input.nextInt(); double svar = basytaCylinder(radie); System.out.println(svar); } static double basytaCylinder(double radie) { double area = (radie * radie * 3.14); return area; } }
[ "emilemail4@gmail.com" ]
emilemail4@gmail.com
25b04225485f7c0d06d81a82763b6871dac506d6
229d69924cfb01e6cd5cf46577f3e6beaef6bdfe
/12-graphs/src/main/java/com/arunav/dsalgo/graphsv2/operations/undirected/DFSPaths.java
f925e39f0ce1c1042ff8aac0581c1f01d556b523
[]
no_license
arunav-b/dsalgo
c0cbb9f195c06918bf9146c285745401c3b48721
0bd0a6f7af0f3545eedb02e19981447c441b3dd5
refs/heads/master
2023-08-15T02:30:47.473614
2021-09-28T23:01:18
2021-09-28T23:01:18
255,022,169
1
0
null
null
null
null
UTF-8
Java
false
false
969
java
package com.arunav.dsalgo.graphsv2.operations.undirected; import com.arunav.dsalgo.graphsv2.structure.Graph; import java.util.Map; // This class is to find paths in a graph with respect to a source vertex using DFS public class DFSPaths<T extends Comparable<T>> extends AbstractPaths<T> { // Find all paths in graph reachable from source public DFSPaths(Graph<T> graph, T source) { super(graph, source); dfs(source, isVisited, pathArray, pathMap); } private void dfs(T source, boolean[] isVisited, T[] pathArray, Map<T, T> pathMap) { isVisited[graph.getIndexOf(source)] = true; for (T vertex : graph.adjVertices(source)) { int currVertexIdx = graph.getIndexOf(vertex); if (!isVisited[currVertexIdx]) { pathArray[currVertexIdx] = source; pathMap.put(vertex, source); dfs(vertex, isVisited, pathArray, pathMap); } } } }
[ "itsarunav4u@gmail.com" ]
itsarunav4u@gmail.com