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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2c78640c6ed05121e0c46f5dbac6344f846c6e5d | 053952bb259d217c7ef070acb1c778cd2bfa9083 | /services/AdventureWorks2014/src/com/testserv_26oct/adventureworks2014/dao/JobCandidateDao.java | 6c5f2f594a11e6784978bd94efc8e9a53986fd97 | [] | no_license | Sushma-M/Project_diff_services | 0a477ca0f673d279253dae33673625d4f9edb14c | f19aefb7ec8a41ba5652772c3e98fdc6c14fe817 | refs/heads/master | 2020-06-10T18:18:31.040636 | 2016-12-08T06:50:12 | 2016-12-08T06:50:12 | 75,911,411 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,300 | java | /*Copyright (c) 2016-2017 wavemaker.com All Rights Reserved.
This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance
with the terms of the source code license agreement you entered into with wavemaker.com*/
package com.testserv_26oct.adventureworks2014.dao;
/*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.orm.hibernate4.HibernateTemplate;
import org.springframework.stereotype.Repository;
import com.wavemaker.runtime.data.dao.WMGenericDaoImpl;
import com.testserv_26oct.adventureworks2014.JobCandidate;
/**
* Specifies methods used to obtain and modify JobCandidate related information
* which is stored in the database.
*/
@Repository("AdventureWorks2014.JobCandidateDao")
public class JobCandidateDao extends WMGenericDaoImpl<JobCandidate, Integer> {
@Autowired
@Qualifier("AdventureWorks2014Template")
private HibernateTemplate template;
public HibernateTemplate getTemplate() {
return this.template;
}
}
| [
"root@414811d5a95a"
] | root@414811d5a95a |
d9e8662cd8f24bd5779db804946675be94f9df7c | 1c7592c23405f10c69683c4e81e02a2233d7c6d6 | /android/src/com/mojie/activity/ProjectExperiencePreviewActivity.java | 0e220b7256e83f5ee2e1036567eb7bfa3c969495 | [] | no_license | huchao2016/Test1 | beb4dfd24b4268787a748b9f96cf2641527e5ace | eaf172372ed04f5b90ff14ead149d21e4d02fb25 | refs/heads/master | 2021-01-19T01:17:19.730637 | 2016-11-17T04:29:22 | 2016-11-17T04:29:22 | 65,459,201 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,026 | java | package com.mojie.activity;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;
import org.json.JSONObject;
import com.mojie.network.ConnectPHPToGetJSON;
import com.mojie.utils.ConstUtils;
import android.os.Bundle;
import android.os.Handler;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;
public class ProjectExperiencePreviewActivity extends Activity implements OnClickListener{
private ImageView btnEditExperienceBack;
private EditText etProjectTitle;
private EditText etProjectIntroduce;
private EditText etProjectPeople;
private EditText etProjectMobile;
private Button btnEditExperienceSave;
private SharedPreferences shared;
private int uid;
// private String resumeid;
private ProgressDialog pd;
private String title;
private String description;
private String begindate;
private String enddate;
private String provedby;
private String provertel;
private String resume_id;
private String resumeid;
private String eid;
private EditText editProjectStartTime;
private EditText editProjectFinishTime;
private final static int DATE_DIALOG_START = 0;
private final static int DATE_DIALOG_FINISH = 1;
private Calendar c = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_preview_project_experience);
// shared = getSharedPreferences("userInfo", 0);
// uid = shared.getInt("id", 0);
// resume_id = shared.getString("resume_id", "");
// Log.v("lishide", "exper1234 resumeid "+resume_id);
Intent intent = getIntent();
resumeid = intent.getStringExtra("resumeid");
eid = intent.getStringExtra("id");
title = intent.getStringExtra("title");
begindate = intent.getStringExtra("begindate");
enddate = intent.getStringExtra("enddate");
provedby = intent.getStringExtra("provedby");
provertel = intent.getStringExtra("provertel");
description = intent.getStringExtra("description");
// Log.v("lishide", "intent>>>resumeid "+resume_id);
btnEditExperienceBack = (ImageView) findViewById(R.id.btn_edit_experience_back);
btnEditExperienceBack.setOnClickListener(this);
etProjectTitle = (EditText) findViewById(R.id.et_project_title_edit);
etProjectIntroduce = (EditText) findViewById(R.id.et_project_introduce_edit);
etProjectPeople = (EditText) findViewById(R.id.et_project_people_edit);
etProjectMobile = (EditText) findViewById(R.id.et_project_mobile_edit);
editProjectStartTime = (EditText) findViewById(R.id.edit_et_project_start_date);
editProjectFinishTime = (EditText) findViewById(R.id.edit_et_project_finish_date);
btnEditExperienceSave = (Button) findViewById(R.id.btn_edit_experience_save);
btnEditExperienceSave.setOnClickListener(this);
etProjectTitle.setText(title);
etProjectIntroduce.setText(description);
etProjectPeople.setText(provedby);
etProjectMobile.setText(provertel);
String begin = begindate.substring(0,10);
editProjectStartTime.setText(begin);
String end = enddate.substring(0,10);
editProjectFinishTime.setText(end);
// editProjectStartTime.setOnClickListener(new View.OnClickListener(){
// public void onClick(View v) {
// showDialog(DATE_DIALOG_START);
// }
// });
// editProjectFinishTime.setOnClickListener(new View.OnClickListener(){
// public void onClick(View v) {
// showDialog(DATE_DIALOG_FINISH);
// }
// });
}
@Override
public void onClick(View v) {
switch(v.getId()) {
case R.id.btn_edit_experience_back:
finish();
break;
case R.id.btn_edit_experience_save:
title = etProjectTitle.getText().toString();
// begindate = editProjectStartTime.getText().toString();
// enddate = editProjectFinishTime.getText().toString();
description = etProjectIntroduce.getText().toString();
provedby = etProjectPeople.getText().toString();
provertel = etProjectMobile.getText().toString();
if("".equals(title)) {
Toast.makeText(ProjectExperiencePreviewActivity.this,"请输入标题",Toast.LENGTH_SHORT).show();
break;
}else if("".equals(begindate)) {
Toast.makeText(ProjectExperiencePreviewActivity.this,"请输入项目开始时间",Toast.LENGTH_SHORT).show();
break;
}else if("".equals(enddate)) {
Toast.makeText(ProjectExperiencePreviewActivity.this,"请输入项目完成时间",Toast.LENGTH_SHORT).show();
break;
}else if("".equals(description)) {
Toast.makeText(ProjectExperiencePreviewActivity.this,"请输入项目简介",Toast.LENGTH_SHORT).show();
break;
}else if("".equals(provedby)) {
Toast.makeText(ProjectExperiencePreviewActivity.this,"请输入证明人姓名",Toast.LENGTH_SHORT).show();
break;
}else if("".equals(provertel)) {
Toast.makeText(ProjectExperiencePreviewActivity.this,"请输入证明人电话",Toast.LENGTH_SHORT).show();
break;
}
pd = new ProgressDialog(ProjectExperiencePreviewActivity.this);
pd.setMessage("请稍后…");
pd.show();
List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>();
params.add(new BasicNameValuePair("id", ""+eid));
params.add(new BasicNameValuePair("title", title));
params.add(new BasicNameValuePair("begindate", begindate));
params.add(new BasicNameValuePair("enddate", enddate));
params.add(new BasicNameValuePair("description", description));
params.add(new BasicNameValuePair("provedby", provedby));
params.add(new BasicNameValuePair("provertel", provertel));
new Thread(new ConnectPHPToGetJSON(URL_UPDATEEXPERIENCE,handler,params)).start();
break;
}
}
private String URL_UPDATEEXPERIENCE = ConstUtils.BASEURL + "updateresumeexperiencelist.php";
private Handler handler = new Handler() {
private int result;
public void handleMessage(android.os.Message msg) {
if (msg.obj == null) {// 获取数据失败
Toast.makeText(ProjectExperiencePreviewActivity.this, "网络连接失败",
Toast.LENGTH_SHORT).show();
} else {
try {
result = ((JSONObject) msg.obj).getInt("result");
if (result == 0) {
Toast.makeText(ProjectExperiencePreviewActivity.this, "更新项目经验成功",
Toast.LENGTH_SHORT).show();
finish();
} else if (result == 1) {
Toast.makeText(ProjectExperiencePreviewActivity.this, "更新项目经验失败",
Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
pd.dismiss();
super.handleMessage(msg);
};
};
/**
* 创建日期及时间选择对话框
*/
@Override
protected Dialog onCreateDialog(int id) {
Dialog dialog = null;
switch (id) {
case DATE_DIALOG_START:
c = Calendar.getInstance();
dialog = new DatePickerDialog(
this,
new DatePickerDialog.OnDateSetListener() {
public void onDateSet(DatePicker dp, int year,int month, int dayOfMonth) {
begindate = new StringBuilder().append(year + "" + format((month+1)) + "" + format(dayOfMonth) + "").toString();
editProjectStartTime.setText(new StringBuilder().append(year + "年" + format((month+1)) + "月" + format(dayOfMonth) + "日"));
}
},
c.get(Calendar.YEAR), // 传入年份
c.get(Calendar.MONTH), // 传入月份
c.get(Calendar.DAY_OF_MONTH) // 传入天数
);
break;
case DATE_DIALOG_FINISH:
c = Calendar.getInstance();
dialog = new DatePickerDialog(
this,
new DatePickerDialog.OnDateSetListener() {
public void onDateSet(DatePicker dp, int year,int month, int dayOfMonth) {
enddate = new StringBuilder().append(year + "" + format((month+1)) + "" + format(dayOfMonth) + "").toString();
editProjectFinishTime.setText(new StringBuilder().append(year + "年" + format((month+1)) + "月" + format(dayOfMonth) + "日"));
}
},
c.get(Calendar.YEAR), // 传入年份
c.get(Calendar.MONTH), // 传入月份
c.get(Calendar.DAY_OF_MONTH) // 传入天数
);
break;
}
return dialog;
}
private String format(int x) {
if (Integer.toString(x).length() == 1) {
return "0" + Integer.toString(x);
} else {
return Integer.toString(x);
}
}
}
| [
"18671585633@163.com"
] | 18671585633@163.com |
f66a9fcde59ce3364002c29985f0ad7f51afc0d3 | f43ee27457403cbbe654f9c00ef20859428628ca | /java/Algorithm-1-1-15/src/com/company/Main.java | d325f9db9a694dc10507963b24698ebdda6a6f66 | [] | no_license | jialinxie/Algorithm-4-th | 90ffcad7ce35be016845f0f6dabff2797ea09e22 | bf5f4e0340dceea696f42919e63f700d08bf22d1 | refs/heads/master | 2021-06-10T06:16:07.552461 | 2019-11-12T13:29:50 | 2019-11-12T13:29:50 | 83,691,730 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,597 | java | package com.company;
import edu.princeton.cs.introcs.In;
import edu.princeton.cs.introcs.Out;
import edu.princeton.cs.introcs.StdIn;
import edu.princeton.cs.introcs.StdOut;
import java.util.Arrays;
import java.util.Random;
/*
* Write a static method histogram() that takes an array a[] of int values and
an integer M as arguments and returns an array of length M whose ith entry is the num-
ber of times the integer i appeared in the argument array. If the values in a[] are all
between 0 and M�1, the sum of the values in the returned array should be equal to
a.length.
*/
public class Main {
public static int histogram(int[] array, int M) {
int[] Array = new int[M];
for (int i = 0; i < M; i++)
Array[i] = 0;
for (int j = 0; j < array.length; j++)
Array[array[j]]++;
int sum = 0;
for (int k = 0; k < M; k++) {
System.out.print(Array[k]);
System.out.print(" ");
sum += Array[k];
}
System.out.println("sum = " + sum + " length = " + array.length);
return sum;
}
public static void main(String[] args) {
int x = StdIn.readInt();
int M = 10;
int[] arr = new int[x];
Random rand = new Random(10);
System.out.println(x + " random number boundary with " + (M - 1) + " is ");
for (int i = 0; i < x; i++) {
arr[i] = rand.nextInt(M - 1);
System.out.print(arr[i] + " ");
}
System.out.println(" ");
histogram(arr, M);
}
} | [
"lin990033@gmail.com"
] | lin990033@gmail.com |
25d45c401d11560ab6d1e5d1b4cd068c3767d990 | 696a2f10ecfc62bbfcf8674b550f5abff6c7944a | /Home PC Practice/Alert79.java | 41874f047db14948b2250250ac48f56acd6f866a | [] | no_license | KuntanSutar/Home-PC-Practice | 79c82712d90e2ba2ce39c272fa974ebe89b8bd7d | bea5e3dc250af91022d49ac5212c9503fc4a65cc | refs/heads/master | 2020-04-17T13:55:51.721293 | 2019-01-20T11:13:12 | 2019-01-20T11:13:12 | 166,636,042 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 230 | java | //Conditional Operator (Ternary)
class Alert79
{
static public void main(String... kuntan)
{
int x=(10<20)?30:40;
System.out.println(x);
int y=(10>20)?30:((40>50)?60:70); // Nesting possible
System.out.println(y);
}
} | [
"sutarkuntan@gmail.com"
] | sutarkuntan@gmail.com |
adcb3c23dfea35c2f7d92cbeff57f1195a2e7533 | df7fe14f4e1107290d311150125770ba4746d0c1 | /CoreJavaSessionSeventeen/src/p1/Ex7_1.java | a000f11bdba4ccaffe45f3b670e51d6daad0c931 | [] | no_license | Reddy6361/Java_learning_Personal | a14e379b5121bc765e08b594cd1ba6a1562eeb4f | b65f8ffe14b50cfe9eb253711e62809f01b01508 | refs/heads/master | 2023-07-25T05:21:28.666199 | 2021-09-08T07:06:32 | 2021-09-08T07:06:32 | 399,961,017 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 118 | java | package p1;
public class Ex7_1 implements Ex7 {
@Override
public void test() {
System.out.println("100");
}
}
| [
"yoganreddy.jan.5.2000@gmail.com"
] | yoganreddy.jan.5.2000@gmail.com |
7b56b7528932230333b734cce18ffb6e0911e194 | f28af43e79c68f38365827572bee90a057dc593a | /app/src/main/java/com/golive/cinema/util/SerializerHelper.java | 2a2219a036daedeb64dae2d05cf643a4720d0fcd | [] | no_license | littlecat1988/Golive5.0 | 1ada775e24663be8cc3cdea64c73940e33940b17 | a4fb1d52dcc97c51433c2ed2977cf4833460cdc7 | refs/heads/master | 2021-07-09T21:57:49.632035 | 2017-10-10T09:20:47 | 2017-10-10T09:20:47 | 106,395,462 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,365 | java | package com.golive.cinema.util;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.Serializable;
public class SerializerHelper<T extends Serializable> {
/**
* 写对象到文件
*/
public boolean saveObject(T object, String path) {
OutputStream os = null;
ObjectOutput output = null;
try {
OutputStream file = new FileOutputStream(path);
os = new BufferedOutputStream(file);
output = new ObjectOutputStream(os);
output.writeObject(object);
return true;
} catch (Exception ex) {
ex.printStackTrace();
} finally {
if (output != null) {
try {
output.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (os != null) {
try {
os.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return false;
}
/**
* 从文件读取对象
*/
public T loadObject(String path) {
T object = null;
InputStream is = null;
ObjectInput input = null;
try {
InputStream file = new FileInputStream(path);
is = new BufferedInputStream(file);
input = new ObjectInputStream(is);
Object readObject = input.readObject();
object = (T) readObject;
} catch (Exception ex) {
ex.printStackTrace();
} finally {
if (input != null) {
try {
input.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (is != null) {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return object;
}
}
| [
"lixiang@golive-tv.com"
] | lixiang@golive-tv.com |
97a563d7824534e38433bf27d069c830deb7d189 | ae335dda4ea03ebd925d53e1516fe2795d253b87 | /WebService/src/entities/Client.java | cd6bf22aedb1a7791589b8083387ccd4af0de9f3 | [] | no_license | SergeyUniver/web_lab2.3 | a859e92b3364aceec6e80d8e0bf506c1f11852c9 | 9aeab75442a4b0bb7513b665f971d1d56cb2ddfe | refs/heads/master | 2021-01-21T17:31:53.080083 | 2017-05-21T21:23:19 | 2017-05-21T21:23:19 | 91,962,393 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,302 | java | package entities;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* Created by Serug on 30.04.2017.
*/
@XmlRootElement
public class Client {
private int id;
private String name;
public Client(){
}
public Client(int id, String name) {
this.id = id;
this.name = name;
}
public int getId() {
return id;
}
@XmlAttribute
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
@XmlElement
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Client that = (Client) o;
if (id != that.id) return false;
if (name != null ? !name.equals(that.name) : that.name != null) return false;
return true;
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + (name != null ? name.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "ID: " + id + " Name: " + name;
}
}
| [
"Devnock@gmail.com"
] | Devnock@gmail.com |
5936b9554c044dc4f845c1ff999ead3be4c1eca9 | 56d30c1563bb21428066f9e954bc9532afd191db | /src/main/java/zkl/service/SysResourceService.java | 1e05c102c21394637006e5ec434af815acefc9f8 | [] | no_license | a1468151338/springbootJDBC | 582543f6f139cb9ba5d538bb1c8f986dda219e69 | aaded809d988606ddd0b2c9cceefbf3aefc1414e | refs/heads/master | 2021-09-05T23:16:46.223540 | 2018-01-31T15:18:39 | 2018-01-31T15:18:39 | 119,390,234 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 742 | java | package zkl.service;
import zkl.common.service.BaseService;
import zkl.entity.SysResource;
import zkl.entity.SysRole;
import java.util.List;
import java.util.Objects;
/**
* Created by Administrator on 2017/12/27.
*/
public interface SysResourceService extends BaseService<SysResource>{
/**
* 角色拥有资源列表
* @param roleId
* @return
*/
public List<SysResource> findListByRoleId(Integer roleId) throws IllegalAccessException;
/**
* 为一个角色设置资源
* @param roleId
* @param resourceId
*/
public void saveRoleResource(Integer roleId, Object[] resourceId);
/**
* 转移
* @param ids
*/
public void move(Object[] ids,Integer parentId);
}
| [
"a1468151338@outlook.com"
] | a1468151338@outlook.com |
3387235a082beafe59eb46a920953ab621a86a0b | 97cda285663a8bbf751b39321b695d97b6f69474 | /Checkstyle/src/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheck.java | 44ed372d551d6c1e8af0f6bb493b4733c3de0759 | [] | no_license | clustercompare/clustercompare-data | 838c4de68645340546dd5e50b375dcf877591b3e | 163d05bdc5f4a03da8155ffb1f922a9421733589 | refs/heads/master | 2020-12-25T23:10:16.331657 | 2015-12-11T10:37:43 | 2015-12-11T10:37:43 | 39,699,972 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,832 | java | ////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2010 Oliver Burn
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle.checks;
import com.puppycrawl.tools.checkstyle.api.Check;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
/**
* Checks the style of array type definitions.
* Some like Java-style: <code>public static void main(String[] args)</code>
* and some like C-style: public static void main(String args[])
*
* By default the Check enforces Java style.
* @author lkuehne
*/
public class ArrayTypeStyleCheck extends Check
{
/** controls whether to use Java or C style */
private boolean mJavaStyle = true;
@Override
public int[] getDefaultTokens()
{
return new int[] {TokenTypes.ARRAY_DECLARATOR};
}
@Override
public void visitToken(DetailAST aAST)
{
final DetailAST typeAST = aAST.getParent();
if (typeAST.getType() != TokenTypes.TYPE) {
return;
}
final DetailAST declAST = typeAST.getParent();
if (declAST.getType() == TokenTypes.METHOD_DEF) {
// Do not check method's return type.
// We have no alternatives here.
return;
}
final DetailAST variableAST = typeAST.getNextSibling();
if (variableAST != null) {
final boolean isJavaStyle =
(variableAST.getLineNo() > aAST.getLineNo())
|| (variableAST.getColumnNo() > aAST.getColumnNo());
if (isJavaStyle != mJavaStyle) {
log(aAST.getLineNo(), aAST.getColumnNo(), "array.type.style");
}
}
}
/**
* Controls whether to check for Java or C style.
* @param aJavaStyle true if Java style should be used.
*/
public void setJavaStyle(boolean aJavaStyle)
{
mJavaStyle = aJavaStyle;
}
}
| [
"mail@jan-melcher.de"
] | mail@jan-melcher.de |
97c2b4639fea04448b69805a01030faf761ef0e5 | 83d56024094d15f64e07650dd2b606a38d7ec5f1 | /sicc_druida/fuentes/java/CarIndicValidLPStartUp.java | f6561b046ac84fedeb3c67b88c327386d628e0be | [] | no_license | cdiglesias/SICC | bdeba6af8f49e8d038ef30b61fcc6371c1083840 | 72fedb14a03cb4a77f62885bec3226dbbed6a5bb | refs/heads/master | 2021-01-19T19:45:14.788800 | 2016-04-07T16:20:51 | 2016-04-07T16:20:51 | null | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 23,559 | java | /*
INDRA/CAR/mmg
$Id: CarIndicValidLPStartUp.java,v 1.1 2009/12/03 18:34:39 pecbazalar Exp $
DESC
*/
import java.util.*;
import org.jaxen.dom.DOMXPath;
import org.w3c.dom.Element;
import es.indra.utils.*;
import es.indra.druida.Contexto;
import es.indra.druida.DruidaConector;
import es.indra.druida.belcorp.MMGDruidaBase;
import es.indra.druida.belcorp.MMGDruidaHelper;
import es.indra.druida.belcorp.MMGException;
import es.indra.druida.belcorp.MMGNoSessionException;
import es.indra.druida.belcorp.MMGNoLanguageException;
import es.indra.druida.dom.DruidaDOMObjeto;
import es.indra.mare.common.dto.MareDTO;
import es.indra.mare.common.dto.IMareDTO;
import es.indra.mare.common.mln.MareBusinessID;
import es.indra.belcorp.mso.*;
// Definicion de la clase
public class CarIndicValidLPStartUp extends MMGDruidaBase{
//Constantes que definen la altura de los formularios según el modo
public static final short QUERYFORM_SIZE = 118;
public static final short CREATEFORM_SIZE = 118;
public static final short UPDATEFORM_SIZE = 118;
public static final short VIEWFORM_SIZE = 118;
//Cosntantes que definene elementos de la lçogica de negocio de las entidada
//y de los elementos asociados a la entidad
public static final String BUSINESSID_QUERY = "MMGCarIndicValidQueryFromToUserPage";
//Hashtables con los valores estáticos de radiobuttons y combos
// Definicion del constructor
public CarIndicValidLPStartUp(){
super();
}
public void inicio() throws Exception {
pagina("CarIndicValidPage");
}
public void ejecucion() throws Exception {
try{
//Llamamos al metodo sobresctrito de la clase padre para ejecutar las acciones comunes:
//obtener configuración del mantenimiento
super.ejecucion();
//Activamos las trazas
setTrazaFichero();
//Establecemos el tamaño de la página
buildJsPageSize("CarIndicValid");
//Determinamos la acción y el origen
String accion = conectorParametro(PARAMETRO_GENERICO_ACCION);
String origen = conectorParametro(PARAMETRO_GENERICO_ORIGEN);
asignar("VAR",PARAMETRO_GENERICO_ACCION,accion);
asignar("VAR",PARAMETRO_GENERICO_ORIGEN,origen);
//Establecemos el valor del atributro cod de la pagina para que ponga el título i18nalizado
//y para que funcione de forma correcta la configuración del menú secundario
asignarAtributo("PAGINA", "CarIndicValidPage", "cod", "CarIndicValid." + accion + ".label");
//Ponemos en la página el idioma de usuario, el idioma de la pagina para mostrar los errores,
//y el codigo del idioma por defecto
asignar("VAR", VAR_IDIOMA, MMGDruidaHelper.getUserDefaultLanguage(this));
asignar("VAR", VAR_IDIOMA_XML, MMGDruidaHelper.getIdioma(this));
asignar("VAR", VAR_DEFAULT_LANGUAGE_CODE, MMGDruidaHelper.getUserDefaultLanguage(this));
//Establecemos los tamaños y posiciones de la capas de la pantalla
establecerSizeCapas(accion, origen);
//Limpiamos la botonera
limpiarBotoneraLista("carIndicValid", accion);
//Ejecutanos la acción solicitada
if(accion.equals(ACCION_LOV)) cmdLov();
else if(accion.equals(ACCION_QUERY)) cmdQuery();
else if(accion.equals(ACCION_CREATE)) cmdCreate();
else if(accion.equals(ACCION_REMOVE)) cmdRemove();
else if(accion.equals(ACCION_UPDATE) && origen.equals("menu")) cmdUpdate();
else if(accion.equals(ACCION_UPDATE) && origen.equals("pagina")) cmdPreUpdateForm();
else if(accion.equals(ACCION_UPDATE) && origen.equals("preupdate")) cmdUpdateForm();
else if(accion.equals(ACCION_VIEW) && origen.equals("pagina")) cmdPreView();
else if(accion.equals(ACCION_VIEW) && origen.equals("preview")) cmdView();
//Eliminamos los labels del modo view si no estamos en dicho modo.
//Si lo estamos, eliminamos los widgets
if(!accion.equals(ACCION_VIEW)) removeViewLabels();
else removeWidgets();
//Eliminamos los TRs del formulario que no tengan campos
eliminarTrsVacios(accion, origen);
}catch(Exception e){
handleException(e);
}
}
/**Acciones que se realizan cuando la pantalla se arranca en modo lov*/
protected void cmdLov() throws Exception{
//Establecemos los codigos de internacionalización para las etiquetas de los campos con búsqueda por intervalo
setIntervalSearchFromLavels();
//Cargamos las combos finales de las jerarquías de herencia
loadLeafDependenceCombos();
//Asignamos las validaciones
HashMap userProperties = MMGDruidaHelper.getUserProperties(this);
String datePattern = MMGDruidaHelper.getUserDatePattern(this);
String decimalSeparator = MMGDruidaHelper.getUserDecimalSeparator(this);
asignarAtributo("TEXT", "codIndiVali", "validacion", "ValidaLongitud(cdos_trim(valor), 1, 1)");
//Primero determianmos el nombre del campo en la entidad de oriegen donde se van a cargar los datos
asignar("VAR", "idAttributeLovOpener", conectorParametro(PARAMETRO_LOV_ATTRIBUTO));
asignar("VAR", "idEntityLovOpener", conectorParametro(PARAMETRO_LOV_ENTIDAD));
//asignarAtributo("CAPA", "carIndicValidLovLayer", "visibilidad", "visible");
asignarAtributo("PAGINA", "CarIndicValidPage", "onblur", "window.focus();");
//Borramos los elementos de internacionalización()
removeLocalizationElements();
removeNonSearchElements();
}
/**Acción previa para poder permitir la carga de datos en el formulario
de view con ventana oculta. Para ello simplemente redireccionamos al método*/
protected void cmdPreView() throws Exception{
//metemos en la sesión las query para realizar la requery
conectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION) != null?
conectorParametro(VAR_LAST_QUERY_TO_SESSION): "");
//Redirigimos a la acción de view pasando la accion, y la acción anterior y actulizando el origen
conectorAction("CarIndicValidLPStartUp");
conectorActionParametro("idSelection", conectorParametro("idSelection"));
conectorActionParametro(PARAMETRO_GENERICO_ACCION, conectorParametro(PARAMETRO_GENERICO_ACCION)!= null?
conectorParametro(PARAMETRO_GENERICO_ACCION): "");
conectorActionParametro(PARAMETRO_GENERICO_ORIGEN, "preview");
conectorActionParametro(VAR_ACCION_ANTERIOR, conectorParametro(VAR_ACCION_ANTERIOR) != null?
conectorParametro(VAR_ACCION_ANTERIOR): "");
}
/**Acciones que se realizan cunado la pantalla se arranca en modo view*/
protected void cmdView() throws Exception{
//Construimos el mso con los elementos de la búsqueda a partir del id que
//lo sacamos de la request
CarIndicValidData carIndicValidQuery= new CarIndicValidData();
carIndicValidQuery.setId(new Integer(conectorParametro("idSelection")));
//Asiganmos el valor a la variable de acción anterior para poder volver hacia atras y hacer requery
asignar("VAR", VAR_ACCION_ANTERIOR, conectorParametro(VAR_ACCION_ANTERIOR));
//Sacamos de la base de datos la entidad a visualizar
CarIndicValidData datosResult = (CarIndicValidData)getSingleObject(BUSINESSID_QUERY, carIndicValidQuery,
carIndicValidQuery.clone(), "carIndicValid");
//Comprobamos que haya datos. Si no indicamos la situación
if(datosResult == null) throw new MMGException(ERRORCODE_ELEMENTO_INEXISTENTE);
//Cargamos los combos y seleccionamos en los combos los valores correspondientes
setDependenceComboLabels(datosResult);
//Damos los valores a los labels del modo view
CarIndicValidData carIndicValid = datosResult;
asignarAtributo("LABELC", "lblViewCodIndiVali", "valor",
FormatUtils.formatObject(carIndicValid.getCodIndiVali(),
MMGDruidaHelper.getUserDecimalFormatPattern(this), MMGDruidaHelper.getUserDecimalFormatSymbols(this)));
//Ponemos la pagina en modo view: Eliminamos el botón de buscar
//Borramos tambien las celdas con los botones
//borramos tambien todos los elementos de from y to dejando sólo el campo simple
//Eliminamos los elementos correspondientes a la internacionalizacion
removeLovElements();
removeQueryElements();
removeLocalizationElements();
removeNonViewElements();
}
/**Acciones que se realizan cuando la pantalla se arranca en modo create*/
protected void cmdCreate() throws Exception{
//Cargamos las combos finales de las jerarquías de herencia
loadLeafDependenceCombos();
//Ponemos los campos requeridos a true
asignarAtributo("TEXT", "codIndiVali", "req", "S");
//Asiganamos a los campos internacionalizables la función de onblur para actualizar el
//valor del idioma por defecto
//Asignamos las validaciones
HashMap userProperties = MMGDruidaHelper.getUserProperties(this);
String datePattern = MMGDruidaHelper.getUserDatePattern(this);
String decimalSeparator = MMGDruidaHelper.getUserDecimalSeparator(this);
asignarAtributo("TEXT", "codIndiVali", "validacion", "ValidaLongitud(cdos_trim(valor), 1, 1)");
//Ponemos la pagina en modo view:
//Eliminamos el botón de buscar
//Borramos tambien las celdas con los botones
//borramos tambien todos los elementos de from y to dejando sólo el campo simple
removeLovElements();
removeQueryElements();
removeNonInsertElements();
}
/**Acciones a ejecutar cuando la ventana se abre en modo remove*/
protected void cmdRemove() throws Exception{
//Establecemos los codigos de internacionalización para las etiquetas de los campos con búsqueda por intervalo
setIntervalSearchFromLavels();
//Cargamos las combos finales de las jerarquías de herencia
loadLeafDependenceCombos();
//Asignamos las validaciones
HashMap userProperties = MMGDruidaHelper.getUserProperties(this);
String datePattern = MMGDruidaHelper.getUserDatePattern(this);
String decimalSeparator = MMGDruidaHelper.getUserDecimalSeparator(this);
asignarAtributo("TEXT", "codIndiVali", "validacion", "ValidaLongitud(cdos_trim(valor), 1, 1)");
//Actualizamos el legend del formulario para indicar criterios de búsqueda
asignarAtributo("LABEL", "legendLbl", "cod", "MMGGlobal.legend.searchcriteria.label");
//Eliminamos los elementos correspondientes a la internacionalizacion y lov
removeLocalizationElements();
removeLovElements();
removeNonSearchElements();
//Si hay que hacer requery por volver hacia a tras lo marcamos en las variables de la página
if(isPerformRequery()){
loadNonLeafDependenceCombosForRequery();
performActionForRequery();
}
}
/**Acciones a ejecutar cuando la ventana se abre en modo query*/
protected void cmdQuery() throws Exception{
//Establecemos los codigos de internacionalización para las etiquetas de los campos con búsqueda por intervalo
setIntervalSearchFromLavels();
//Cargamos las combos finales de las jerarquías de herencia
loadLeafDependenceCombos();
//Asignamos las validaciones
HashMap userProperties = MMGDruidaHelper.getUserProperties(this);
String datePattern = MMGDruidaHelper.getUserDatePattern(this);
String decimalSeparator = MMGDruidaHelper.getUserDecimalSeparator(this);
asignarAtributo("TEXT", "codIndiVali", "validacion", "ValidaLongitud(cdos_trim(valor), 1, 1)");
//Actualizamos el legend del formulario para indicar criterios de búsqueda
asignarAtributo("LABEL", "legendLbl", "cod", "MMGGlobal.legend.searchcriteria.label");
//Eliminamos los elementos correspondientes a la internacionalizacion
//elimnamos el botón lov de null selection
removeLocalizationElements();
removeLovElements();
removeNonSearchElements();
//Si hay que hacer requery por volver hacia a tras lo marcamos en las variables de la página
if(isPerformRequery()){
loadNonLeafDependenceCombosForRequery();
performActionForRequery();
}
}
/**Acciones a ejecutar cuando la ventana se abre en modo update*/
protected void cmdUpdate() throws Exception{
//Establecemos los codigos de internacionalización para las etiquetas de los campos con búsqueda por intervalo
setIntervalSearchFromLavels();
//Cargamos las combos finales de las jerarquías de herencia
loadLeafDependenceCombos();
//Asignamos las validaciones
HashMap userProperties = MMGDruidaHelper.getUserProperties(this);
String datePattern = MMGDruidaHelper.getUserDatePattern(this);
String decimalSeparator = MMGDruidaHelper.getUserDecimalSeparator(this);
asignarAtributo("TEXT", "codIndiVali", "validacion", "ValidaLongitud(cdos_trim(valor), 1, 1)");
//Actualizamos el legend del formulario para indicar criterios de búsqueda
asignarAtributo("LABEL", "legendLbl", "cod", "MMGGlobal.legend.searchcriteria.label");
//Simplemente elimnamos el botón lov de null selection y la internacionalización
removeLocalizationElements();
removeLovElements();
removeNonSearchElements();
//Si hay que hacer requery por volver hacia a tras lo marcamos en las variables de la página
if(isPerformRequery()){
loadNonLeafDependenceCombosForRequery();
performActionForRequery();
}
}
/**Acción previa para poder permitir la carga de datos en el formulario
de updatecon ventana oculta. Para ello simplemente redireccionamos al método*/
protected void cmdPreUpdateForm() throws Exception{
//metemos en la sesión las query para realizar la requery
conectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION) != null?
conectorParametro(VAR_LAST_QUERY_TO_SESSION): "");
//Redirigimos al update form
conectorAction("CarIndicValidLPStartUp");
conectorActionParametro("idSelection", conectorParametro("idSelection"));
conectorActionParametro(PARAMETRO_GENERICO_ACCION, conectorParametro("accion") != null?
conectorParametro("accion"): "");
conectorActionParametro(PARAMETRO_GENERICO_ORIGEN, "preupdate");
conectorActionParametro(VAR_ACCION_ANTERIOR, conectorParametro(VAR_ACCION_ANTERIOR) != null?
conectorParametro(VAR_ACCION_ANTERIOR): "");
}
/**Prepara el formualrio para mostrar los datos de un elemento de la entidad
y estos puedan ser modificados*/
protected void cmdUpdateForm() throws Exception{
//Asiganmos el valor a la variable de acción anterior para poder volver hacia atras y hacer requery
asignar("VAR", VAR_ACCION_ANTERIOR, conectorParametro(VAR_ACCION_ANTERIOR));
//Actualizamos el valor de enviar de forma oculta el formulario.
//asignarAtributo("FORMULARIO", "carIndicValidFrm", "oculto", "N");
//Ponemos los campos requeridos a true
asignarAtributo("TEXT", "codIndiVali", "req", "S");
//Asiganamos a los campos internacionalizables la función de onblur para actualizar el valor
//para el idioma por defecto
//Asignamos las validaciones
HashMap userProperties = MMGDruidaHelper.getUserProperties(this);
String datePattern = MMGDruidaHelper.getUserDatePattern(this);
String decimalSeparator = MMGDruidaHelper.getUserDecimalSeparator(this);
String codigoIdioma = MMGDruidaHelper.getUserDefaultLanguage(this);
asignarAtributo("TEXT", "codIndiVali", "validacion", "ValidaLongitud(cdos_trim(valor), 1, 1)");
//Obtenemos el id del elemento a seleccionar
traza("MMG::Creando CarIndicValid");
String id = conectorParametro("idSelection");
traza("MMG:: id del atributo a modificar: " + id);
//Construimos el mso con los elementos de la búsqueda
CarIndicValidData carIndicValidQuery= new CarIndicValidData();
carIndicValidQuery.setId(new Integer(id));
//Sacamos de la base de datos la entidad a modificar
CarIndicValidData datosResult = (CarIndicValidData)getSingleObject(BUSINESSID_QUERY, carIndicValidQuery,
carIndicValidQuery.clone(), "carIndicValid");
//Comprobamos que haya datos. Si no indicamos la situaciópn
if(datosResult == null) throw new MMGException(ERRORCODE_ELEMENTO_INEXISTENTE);
//Cargamos los combos y seleccionamos en los combos los valores correspondientes
loadLeafDependenceCombos();
loadNonLeafDependenceCombos(datosResult);
//Vamos cargamos los datos en el formulario. Muy importante es establecer id del elemento que estamos modificando
CarIndicValidData carIndicValid = datosResult;
asignar("VAR", "idSelection", id);
asignar("TEXT", "codIndiVali", FormatUtils.formatObject(carIndicValid.getCodIndiVali(),
MMGDruidaHelper.getUserDecimalFormatPattern(this), MMGDruidaHelper.getUserDecimalFormatSymbols(this)));
//Sacamos la información de los campos internacionalizables. Para cada campo internacionalizable
// Construimos el mso con los elementos de la búsqueda
// Creamos el dto y metemos la información necesaria para ejecutar la query
// Invocamos la lógica de negocio
//Sobreescribimos el valor de origen para que en la siguiente llamada de la acción
//vaya directamente al metodo que realmente modifica
asignar("VAR",PARAMETRO_GENERICO_ORIGEN,"pagina");
//Guardamos el timestamp del elemento que se está modificando
//Por ahora el timestamp no se usa ya que no existen bloqueos....(no comment)
//asignar("VAR","timestamp",Long.toString(carIndicValid.jdoGetTimeStamp()));
//Ponemos la pagina en modo view: Eliminamos el botón de buscar
//Borramos tambien las celdas con los botones
//borramos tambien todos los elementos de from y to dejando sólo el campo simple
//Borramos los elementos correspondientes a la internacionalización
removeLovElements();
removeQueryElements();
removeNonModifyFields();
}
/**Nos permite eliminar de la página todos los elementos correspondiente
a las internacionalizacion*/
protected void removeLocalizationElements() throws Exception{
}
protected void removeLovElements() throws Exception{
borrarNodo("TD","nombre","carIndicValidTdLovNullSelectionButton");
}
protected void removeQueryElements() throws Exception{
//Borramos los botones para realizar la búsuqeda
borrarNodo("TR","nombre","carIndicValidTrButtons");
//Borramos los elementos no necesarios de la búsqueda para los campos con búsquda
//por intervalo
}
/**
* Nos permite elimnar los campos del formulario que no deben aparecer en el formulario en el
* modo de remove
*/
protected void removeNonViewElements() throws Exception{
borrarCampo("id");
}
/**
* Nos permite elimnar los campos del formulario que no deben aparecer en el formulario en el
* modo de inserción
*/
protected void removeNonInsertElements() throws Exception{
borrarCampo("id");
}
/**
* Nos permite elimnar los campos del formulario que no deben aparecer en el formulario en el
* modo de remove
*/
protected void removeNonSearchElements() throws Exception{
borrarCampo("id");
}
/**
* Nos permite elimnar los campos del formulario que no deben aparecer en el formulario
* de modificación
*/
protected void removeNonModifyFields() throws Exception{
borrarCampo("id");
}
/**
* Nos permite establecer el tamaño de las capas de la pantalla según el modo
* Esto se debe a que dependiendo del modo aparecen unos campos u otros
*/
protected void establecerSizeCapas(String accion, String origen) throws Exception{
//Dependiendo del modo el tamaño del formualrio será uno u otro
int sizeForm = 0;
if(accion.equals(ACCION_LOV)) sizeForm = QUERYFORM_SIZE;
else if(accion.equals(ACCION_VIEW)) sizeForm = VIEWFORM_SIZE;
else if(accion.equals(ACCION_CREATE)) sizeForm = CREATEFORM_SIZE;
else if(accion.equals(ACCION_REMOVE)) sizeForm = QUERYFORM_SIZE;
else if(accion.equals(ACCION_QUERY)) sizeForm = QUERYFORM_SIZE;
else if(accion.equals(ACCION_UPDATE) && origen.equals("menu")) sizeForm = QUERYFORM_SIZE;
else if(accion.equals(ACCION_UPDATE) && origen.equals("pagina")) sizeForm = UPDATEFORM_SIZE;
else if(accion.equals(ACCION_UPDATE) && origen.equals("preupdate")) sizeForm = UPDATEFORM_SIZE;
//Establecemos el tamaño de la capa del formulario
asignarAtributo("CAPA","carIndicValidFormLayer", "alto", String.valueOf(sizeForm));
//Estabelcemos la posicion y de la capa correspondiente a la lista y de su botonera
asignarAtributo("CAPA","carIndicValidPreListLayer", "y", String.valueOf(sizeForm + 24));
asignarAtributo("CAPA","carIndicValidListLayer", "y", String.valueOf(sizeForm + 46));
asignarAtributo("CAPA","carIndicValidListButtonsLayer", "y", String.valueOf(sizeForm + 299));
}
/**
* Nos permite cargar las combos finales de la jerarquías de dependencia
*/
protected void loadLeafDependenceCombos() throws Exception{
//Seleccionamos en los combos de enitdades estructurales el valor asociado al usuario
/*
*/
}
/**
* Este método carga todos los combos de una jerarquía de dependencia. La carga se realiza c
* se realiza en función de los datos de un mso del mantenimiento.
* @param carIndicValid La el objetopar la cual se va a realizar la carga
*/
protected void loadNonLeafDependenceCombos(CarIndicValidData carIndicValid)
throws Exception{
}
/**
* Este método nos permite establecer el valor de los labels de una jerarquái de dependencia
*/
protected void setDependenceComboLabels(CarIndicValidData carIndicValid)
throws Exception{
}
/**
* Nos permite cargar los combos y seleccionar los elementos tal como estaban en la última query
*/
protected void loadNonLeafDependenceCombosForRequery() throws Exception{
//Priemero obtenemos lso objetos from y to con todos los datos de la búsqueda
CarIndicValidData carIndicValid =
(CarIndicValidData) conectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY_OBJ_FROM);
//Cargamos todos los objetos completos correspodnientes a los valores de los
//Campos que sean raiz de una jerarquía de combos dependientes
//Una vez que tenemos completo los datos de los atributos raices de jerarquías de dependencias
//cargamos las combos y seleccionamos elementos
loadNonLeafDependenceCombos(carIndicValid);
}
/**
* Por defecto en los campos que tienen la búsqueda por intervalo el label del campo es el label
* correspondiente a campos normal (como si no fuera un campo con intervalor). En los modos de busqueda
* (search, update search y remove search) tendremos que poner el label a la búsqueda "desde"
*/
protected void setIntervalSearchFromLavels() throws Exception{
}
/**
* Metodo que nos elimina los trs que quedan vacíos por no aparecer sus campos por el modo
*/
protected void eliminarTrsVacios(String accion, String origen) throws Exception{
if(accion.equals(ACCION_QUERY) || accion.equals(ACCION_LOV) ||
(accion.equals(ACCION_UPDATE) && origen.equals("menu")) ||
(accion.equals(ACCION_REMOVE) && origen.equals("menu"))){
borrarNodo("TR","nombre","formTr0");
borrarNodo("TR","nombre","formGapTr0");
}else if(accion.equals(ACCION_VIEW) && origen.equals("preview")){
borrarNodo("TR","nombre","formTr0");
borrarNodo("TR","nombre","formGapTr0");
}else if(accion.equals(ACCION_CREATE)){
borrarNodo("TR","nombre","formTr0");
borrarNodo("TR","nombre","formGapTr0");
}else if(accion.equals(ACCION_UPDATE) && origen.equals("preupdate")){
borrarNodo("TR","nombre","formTr0");
borrarNodo("TR","nombre","formGapTr0");
}
}
/**
* Este método nos permite eliminar los labels del modo view de la pantalla
*/
protected void removeViewLabels() throws Exception{
borrarNodo("TR", "nombre", "idViewLabelTrId");
borrarNodo("TR", "nombre", "codIndiValiViewLabelTrId");
}
/**
* Nos permite borrar los TR que contienen los widgets de los campos
*/
protected void removeWidgets() throws Exception{
borrarNodo("TR", "nombre", "idWidgetTrId");
borrarNodo("TR", "nombre", "codIndiValiWidgetTrId");
}
}
| [
"hp.vega@hotmail.com"
] | hp.vega@hotmail.com |
15b8fa776e88d74b1dc55cdf44ae03b946b42c1f | 5850aaf6913d40bfe675846f0a0895f2d5ff562e | /POS/src/com/pos/models/Student.java | 7c6a7573005d292e5aa30774ed74a3fdfdb15c61 | [] | no_license | gsp689/POSRepo | 6d16618dffada3a919dc059d868b1e29312f0bfb | d726345d2112f7d80e31444f63bc672165ffc534 | refs/heads/master | 2021-01-11T04:31:53.048946 | 2016-11-03T15:36:23 | 2016-11-03T15:36:23 | 71,170,907 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,254 | java | package com.pos.models;
public class Student {
public Student() {
}
public Student(int studentId, String name, String department, String emailId) {
this.studentId = studentId;
this.name = name;
this.department = department;
this.emailId = emailId;
}
private int studentId;
private String name;
private String department;
private String emailId;
public int getStudentId() {
return studentId;
}
public String getName() {
return name;
}
public String getDepartment() {
return department;
}
public String getEmailId() {
return emailId;
}
public void setStudentId(int studentId) {
this.studentId = studentId;
}
public void setName(String name) {
this.name = name;
}
public void setDepartment(String department) {
this.department = department;
}
public void setEmailId(String emailId) {
this.emailId = emailId;
}
} | [
"gsp689@gmail.com"
] | gsp689@gmail.com |
ac8aad84ad8e57fc7534a73856654d6be256e70d | 9ec75426dd906827bef13528a0c4b90cc53d2c21 | /couchdb/src/com/os/couchdb/client/document/Attachment.java | 49cdf0b6056e4f74a36014673fa1639b4c7e1830 | [] | no_license | Mmreddy/couchdb-gwt | 8bc8515683488add085a73843fc30bca4286fe8d | 224beaf86a29a0ca9917aeec558fc8a1d8cad08f | refs/heads/master | 2021-01-10T16:22:09.599219 | 2010-02-04T07:04:46 | 2010-02-04T07:04:46 | 36,537,161 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,629 | java | package com.os.couchdb.client.document;
import com.google.gwt.gears.client.blob.Blob;
import com.os.couchdb.client.model.BaseModel;
import com.os.couchdb.client.model.JSOModel;
import com.os.couchdb.share.Base64;
/**
* Represents a couchdb document attachment. The attachment mechanism mirrors
* the functionality present in couchdb itself. You will only be able to
* indirectly use the data property contained in {@link Attachment} to create
* attachments inlined with the document. When you query a document with
* attachments, the attachments will have a <code>null</code> data property and
* the stub property will be set to <code>true</code>.
*
* This limitation has its origin in the way couchdb works and is deliberately
* kept that way to not introduce additional queries.
*
*/
public class Attachment extends BaseModel {
public Attachment() {
super();
}
public Attachment(JSOModel pModel) {
super(pModel);
}
public Attachment(String pContentType, byte[] pData) {
super();
setContentType(pContentType);
setData(Base64.encode(pData));
}
public Attachment(String pContentType, Blob pData) {
super();
setContentType(pContentType);
setData(Base64.encode(pData.getBytes()));
}
public String getContentType() {
return super.get("content_type");
}
public void setContentType(String pContentType) {
super.getModel().set("content_type", pContentType);
}
/**
* Returns the Base64 encoded representation of this attachment's content.
* <em>note that you cannot read attachment data this way</em>. the property
* is only used internally to create inlined attachments and is set to
* <code>null</code> when reading documents.
*
* This limitation has its origin in the way couchdb works and is deliberately
* kept that way to not introduce additional queries.
*/
public String getData() {
return super.get("data");
}
public void setData(String pData) {
super.getModel().set("data", pData);
}
public long getLength() {
return super.getModel().getLong("length");
}
public void setLength(long pLength) {
super.getModel().set("length", pLength);
}
public boolean isStub() {
return super.getModel().getBoolean("stub");
}
/**
* Returns the revision position of this attachment that will change if the
* attachment gets updated.
*/
public String getRevPos() {
return super.get("revpos");
}
/**
* Sets the revision position of this attachment.
*/
public void setRevPos(String pRevPos) {
super.getModel().set("revpos", pRevPos);
}
} | [
"v.mitache@9754a8bc-10a4-11df-b42a-7dbe0d947131"
] | v.mitache@9754a8bc-10a4-11df-b42a-7dbe0d947131 |
340b3ecb42aba384136bdf73523cfd7956868ba4 | a0813fd61ec6e7fa431ffac16e1861defe73ef1d | /hw02/src/main/java/hr/fer/oprpp1/custom/scripting/lexer/SmartScriptLexerState.java | 9d68444db28b85cea6b90e47003a37bd66513745 | [] | no_license | dkablar/OPRPP1 | eae8d8717b372dc3a6552ec7459a48d12e7334db | e1ba823b2c94a8c3bbb21af2ba4d4de0804b2cc3 | refs/heads/main | 2023-04-06T19:41:24.665441 | 2021-04-12T22:14:30 | 2021-04-12T22:14:30 | 355,517,554 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 246 | java | package hr.fer.oprpp1.custom.scripting.lexer;
/**
* Enumeracija <code>SmartScriptLexerState</code> označava stanje lexera
*
* @author Dorian Kablar
*
*/
public enum SmartScriptLexerState {
// u text stanju
TEXT,
// u tag stanju
TAG
}
| [
"dk51866@fer.hr"
] | dk51866@fer.hr |
d2b2d7a390aa30bd4f8aac8bcd7526ec00437a37 | 0911c5c996813d3c3aca066f20f349152bd14a08 | /Lvschool/app/src/main/java/com/example/administrator/lvschool/Fragment/Dynamic_statefragment.java | 8877372eb1d6b6aea8c0596cd5d7c4baa27e9fbc | [] | no_license | mu0chen/Living_school | ed190d4bd65f464c7d6628bf5b80e09f3250e0d2 | 4e4475bb8f6dbe742481e3131c217e6d8eacedd7 | refs/heads/master | 2020-02-26T15:05:23.911079 | 2017-05-29T14:24:34 | 2017-05-29T14:24:34 | 83,545,910 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 832 | java | package com.example.administrator.lvschool.Fragment;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.administrator.lvschool.R;
/**
* Created by Administrator on 2017/2/15.
*/
public class Dynamic_statefragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
return inflaterAndSetupView(inflater,container,savedInstanceState, R.layout.dynamic_statefragment);
}
private View inflaterAndSetupView(LayoutInflater inflater,ViewGroup container,Bundle savedIstanceState,int layoutResourceID){
View layout = inflater.inflate(layoutResourceID,container,false);
return layout;
}
}
| [
"469408434@qq.com"
] | 469408434@qq.com |
c2933d9cb8a9287b06e00d7cf589a557c1084d6c | 663ca25d9428026676dad950c9d8e34125b6c02c | /app/src/main/java/org/apache/http/cookie/params/CookieSpecParamBean.java | 8d7f186bd9daed3e0716601a66336da4f3176370 | [] | no_license | GeekTangTT/MJT | 10fef1167959cfa39c1802eb0dd44c7e2e95908d | 74f1b56f74c0b02c956279fb050167001aca0343 | refs/heads/master | 2020-03-26T21:40:38.305237 | 2018-08-20T10:20:27 | 2018-08-20T10:20:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 640 | java | package org.apache.http.cookie.params;
import java.util.Collection;
import org.apache.http.params.HttpAbstractParamBean;
import org.apache.http.params.HttpParams;
@Deprecated
public class CookieSpecParamBean
extends HttpAbstractParamBean
{
public CookieSpecParamBean(HttpParams paramHttpParams)
{
super((HttpParams)null);
throw new RuntimeException("Stub!");
}
public void setDatePatterns(Collection<String> paramCollection)
{
throw new RuntimeException("Stub!");
}
public void setSingleHeader(boolean paramBoolean)
{
throw new RuntimeException("Stub!");
}
}
| [
"tangzhanqi@appssec.cn"
] | tangzhanqi@appssec.cn |
d8d0d5ed3790a08df5a2712503026dfb5286f64c | dfc2bc9e6fd843301c0aa7655f65918809c4aed5 | /GraduationProject_service/src/main/java/com/qwer/service/impl/MajorServiceImpl.java | d2ba9f183948fa9117d001137f7af3be1a692cd1 | [] | no_license | qweridiculous/gp | ef0c655d6fbf25effcc050c2da12329c405ebc24 | 8e5e8e9dff0d8004a20f8ef507509fcaf412ed30 | refs/heads/master | 2023-06-05T07:39:20.049944 | 2021-06-24T13:34:19 | 2021-06-24T13:34:19 | 379,918,109 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 861 | java | package com.qwer.service.impl;
import com.github.pagehelper.PageHelper;
import com.qwer.domain.Major;
import com.qwer.service.MajorService;
import com.qwer.dao.MajorDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class MajorServiceImpl implements MajorService {
@Autowired
private MajorDao majorDao;
@Override
public List<Major> findAll() throws Exception{
return majorDao.findAll();
}
@Override
public List<Major> findAlll(int page, int size) throws Exception{
PageHelper.startPage(page,size);
return majorDao.findAll();
}
@Override
public void delete(int id) {
majorDao.delete(id);
}
@Override
public void add(String name) {
majorDao.add(name);
}
}
| [
"1143209574@qq.com"
] | 1143209574@qq.com |
88b69f90259caf5cb49dd028c52145443f239a8e | 182b2f2eb5e3de91e72d847f51793f70331c7dce | /src/main/java/vajracode/calocal/client/auth/AuthView.java | 954693689ef924e91319b89d18a963342010d7fa | [] | no_license | BadgerPc/calocal | fb4243843991015f0da15f5f885c64e3a8773d5a | 8c62e138c24001874f0960bfa9d0c11e4d2147c3 | refs/heads/master | 2020-03-07T04:07:19.194900 | 2016-04-07T12:42:40 | 2016-04-07T12:42:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,703 | java | package vajracode.calocal.client.auth;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Widget;
import gwt.material.design.client.ui.MaterialTextBox;
import gwt.material.design.client.ui.MaterialTitle;
import vajracode.calocal.client.framework.CommonView;
/**
* Authentication page
*
*/
public class AuthView extends CommonView<AuthPresenter> {
private static ViewUiBinder uiBinder = GWT.create(ViewUiBinder.class);
interface ViewUiBinder extends UiBinder<Widget, AuthView> {}
@UiField MaterialTitle title;
@UiField MaterialTextBox siLogin, siPass, suLogin, suPass, passConfirm;
public AuthView() {
initWidget(uiBinder.createAndBindUi(this));
}
public void reset() {
title.setDescription("");
}
/*@UiHandler("fb")
public void onFbButton(ClickEvent event) {
//bus.getEventBus().startOAuthDanceSN(SocialNetwork.FB);
}
@UiHandler("vk")
public void onVkButton(ClickEvent event) {
//bus.getEventBus().startOAuthDanceSN(SocialNetwork.VK);
}*/
public void setTitle(String msg) {
title.setDescription(msg);
}
@UiHandler("signIn")
public void onSignInButton(ClickEvent event) {
getPresenter().signIn(siLogin.getText(), siPass.getText());
}
@UiHandler("signUp")
public void onSignUpButton(ClickEvent event) {
getPresenter().signUp(suLogin.getText(), suPass.getText(), passConfirm.getText());
}
public void resetPass() {
siPass.setText("");
suPass.setText("");
passConfirm.setText("");
suLogin.setText("");
}
}
| [
"ahaytukam@gmail.com"
] | ahaytukam@gmail.com |
b0e1b94532e6ef5b197bd3dc91478532b872fb55 | dcca47de58e7873a911799683f083d54e803c4b1 | /xgr-common-core/src/main/java/com/xbcraisins/wgr/xgrcommoncore/commons/config/RedisProperties.java | e0144f6efbaf3d86f16a6472697538fae4f8d1b5 | [] | no_license | xbcRaisins/xbcRaisins-get-rich | a31903bc42cda58da2cdaaef8170f9c79698cfe0 | ccd53adba1a4348bdc9c77a72ebd88b9d97bec9a | refs/heads/master | 2020-04-23T14:57:20.068376 | 2019-11-05T12:45:12 | 2019-11-05T12:45:12 | 171,248,980 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,830 | java | package com.xbcraisins.wgr.xgrcommoncore.commons.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* 描述:
*
* @author weizeng
* @date 2019/4/11 15:41
*/
@Component
@ConfigurationProperties(prefix = "xbc.cache.redis")
public class RedisProperties {
/**
* 缓存key 统一前缀
*/
private String prefix;
/**
* 缓存服务IP
*/
private String ip;
/**
* 端口
*/
private Integer port;
/**
* 密码
*/
private String password;
/**
* 最大空闲连接数
*/
private int maxIdle;
/**
* 最大连接数
*/
private int maxTotal;
/**
* 最大等待毫秒数
*/
private int maxWaitMillis;
public Integer getPort() {
return port;
}
public void setPort(Integer port) {
this.port = port;
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public int getMaxIdle() {
return maxIdle;
}
public void setMaxIdle(int maxIdle) {
this.maxIdle = maxIdle;
}
public int getMaxTotal() {
return maxTotal;
}
public void setMaxTotal(int maxTotal) {
this.maxTotal = maxTotal;
}
public int getMaxWaitMillis() {
return maxWaitMillis;
}
public void setMaxWaitMillis(int maxWaitMillis) {
this.maxWaitMillis = maxWaitMillis;
}
}
| [
"18550497663@sina.cn"
] | 18550497663@sina.cn |
e56e311dffeb76a6975a021c9de922cbaf1e3a2c | 470ce2a112f4a71b24502ff06961010a05c98de7 | /ContactsManager/src/contactsmanager/Contact.java | c5a2979c2ccf0e5a23d9f30014c30f859271c0fb | [] | no_license | Busroni/Praktikum_PBO | 8015250f91a06b69e3300a67f27a293228179f1b | 329e9e751e0a8f0c120114eab3c974ce1a619ef4 | refs/heads/main | 2023-06-09T23:32:46.025723 | 2021-06-30T05:57:52 | 2021-06-30T05:57:52 | 353,173,493 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 759 | 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 contactsmanager;
/**
*
* @author acer
*/
public class Contact {
String name;
String email;
String phoneNumber;
public void setName(String name){
this.name = name;
}
public void setEmail(String email){
this.email = email;
}
public void setPhoneNumber (String phoneNumber){
this.phoneNumber = phoneNumber;
}
public String getName(){
return name;
}
public String getEmail (){
return email;
}
public String getPhoneNumber (){
return phoneNumber;
}
}
| [
"busroni10@gmail.com"
] | busroni10@gmail.com |
cbbc62b018504e71d59530f13a43d8622e92e7d8 | e0fd2e65c14f6236385f19a3ccadf3bf59cf2503 | /MSAS_Web/MSAS_MVC/src/main/java/com/msas/MSAS/UIControllers/UsefulModules/GridCells/MSRenderer.java | e721e0ee1b59afc1f589511ae024cd57f24d85d5 | [
"Apache-2.0"
] | permissive | siagung/msas | 0a147e312bfe97d0d42833038e89e6858c3bd042 | a94634da7134b1a351dcc19dcf7cbb6f522a3250 | refs/heads/master | 2023-06-06T09:32:09.091284 | 2019-08-04T21:21:56 | 2019-08-04T21:21:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 727 | java | package com.msas.MSAS.UIControllers.UsefulModules.GridCells;
import com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.data.renderer.ComponentRenderer;
public abstract class MSRenderer<T> extends
ComponentRenderer<VerticalLayout, T> {
private static final long serialVersionUID = -2644059608683361516L;
@Override
public VerticalLayout createComponent(T item) {
VerticalLayout layout = new VerticalLayout();
layout.setDefaultHorizontalComponentAlignment(Alignment.CENTER);
layout.setWidthFull();
layout.addClassName("p-0");
return layout;
}
public abstract String getColumnKey();
}
| [
"mssm199996@gmail.com"
] | mssm199996@gmail.com |
a44e343817557f5d929d1c4b94b6c847cd21aaf1 | 174b4fd659289f1f86d2f41b8cb7937b753ab28f | /java-criando-entidades-db/src/main/java/com/challenge/entity/Challenge.java | 76f05d4abd1b4563892e5fcf8336d527a53c4aac | [] | no_license | bianavic/java-semana-4 | 06db82bedfbffae8f48f771d63cd3043b3f0aef9 | 9e429c1ebd4e89cefb1c8ab3c1158c2d42ba9a3b | refs/heads/master | 2022-10-23T23:33:42.540642 | 2020-06-17T22:53:05 | 2020-06-17T22:53:05 | 273,093,648 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,222 | java | package com.challenge.entity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.Set;
@Getter
@Setter
@Entity
@AllArgsConstructor
@NoArgsConstructor
@EntityListeners(AuditingEntityListener.class)
public class Challenge {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
@Column
@NotNull
@Size(max = 100)
private String name;
@Column
@NotNull
@Size(max = 50)
private String slug;
@Column
@NotNull
@CreatedDate
private Date createdAt;
@OneToMany
private Set<Acceleration> accelerations;
@OneToMany
private Set<Submission> submissions;
}
| [
"bianavic@gmail.com"
] | bianavic@gmail.com |
26f4329b8ae5bbe9ef0d62e7baf6f7d7647c18e3 | 3cfd4964c715b6bd46e3bc0bab4ffbe19d093334 | /app/src/main/java/com/example/bxt140930/foodieninja/SQLiteJDBCforCredential.java | 6232f2fc63065c00a9886542ec6c49998983a064 | [] | no_license | comets2016/Foodie-Ninja-App | 9c1dab5a03abd4eec6b44e4d5b847d241a5dae30 | 789688a52f1e6ef93ee541a8e00d2fe3a3e22fd9 | refs/heads/master | 2021-01-16T23:09:45.287979 | 2016-11-16T01:41:12 | 2016-11-16T01:41:12 | 72,293,665 | 0 | 2 | null | 2016-11-29T00:44:16 | 2016-10-29T15:42:07 | Java | UTF-8 | Java | false | false | 4,465 | java | package com.example.bxt140930.foodieninja;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
/**
* Created by jxj050100 on 11/14/2016.
*/
public class SQLiteJDBCforCredential extends SQLiteOpenHelper {
private static final int DATABASE_VERSION = 1;
// Database Name
private static final String DATABASE_NAME = "userandpassword";
// Contacts table name
private static String TABLE_CREDENTIAL = "";
// Contacts Table Columns names
private static String KEY_ID = "username";
private static String KEY_PASSWORD = "password";
public SQLiteJDBCforCredential(Context context, String tableName) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
TABLE_CREDENTIAL = tableName;
}
// public boolean createDB(String tableName)
// {
// try {
// Class.forName("org.sqlite.JDBC");
// c = DriverManager.getConnection("jdbc:sqlite:credential.db");
// }catch(Exception e)
// {
// System.err.println( e.getClass().getName() + ": " + e.getMessage() );
// System.exit(0);
// db = false;
// }
// System.out.println("Opened database successfully");
// db = true;
// return db;
// }
// public boolean createTable(String tableName) {
// try {
//
// stmt = c.createStatement();
//
// String sql = "CREATE TABLE IF NOT EXISTS " + tableName +
// " (ID TEXT PRIMARY KEY NOT NULL," +
// " PASSWORD TEXT NOT NULL)";
//
// stmt.executeUpdate(sql);
// stmt.close();
// c.close();
//
// } catch (Exception e) {
// System.err.println(e.getClass().getName() + ": " + e.getMessage());
// System.exit(0);
// db = false;
// }
// System.out.println("Table created successfully");
// db = true;
// return db;
// }
// public void insertIntoTable(String tableName, String user, String password)
// {
// try{
// c.setAutoCommit(false);
// stmt = c.createStatement();
// String sql = "INSERT INTO " + tableName + " (ID,PASSWORD) " +
// "VALUES ('" + user + "'," + "'" + password + "');";
// stmt.executeUpdate(sql);
// stmt.close();
// c.commit();
// c.close();
// }
// catch (Exception e)
// {
// System.err.println( e.getClass().getName() + ": " + e.getMessage() );
// System.exit(0);
// }
// System.out.println("Records created successfully");
// }
// Creating Tables
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
String CREATE_CREDENTIAL_TABLE = "CREATE TABLE " + TABLE_CREDENTIAL + "("
+ KEY_ID + " TEXT PRIMARY KEY," + KEY_PASSWORD + " TEXT)";
sqLiteDatabase.execSQL(CREATE_CREDENTIAL_TABLE);
}
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
// Drop older table if existed
sqLiteDatabase.execSQL("DROP TABLE IF EXISTS " + TABLE_CREDENTIAL);
onCreate(sqLiteDatabase);
}
public void addCredential(Credential credential) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(KEY_ID, credential.getUsername()); // User's id
values.put(KEY_PASSWORD, credential.getPassword()); // User's password
// Inserting Row
db.insert(TABLE_CREDENTIAL, null, values);
db.close(); // Closing database connection
}
public Credential getAllContacts() {
Credential credential = new Credential();
// Select All Query
String selectQuery = "SELECT * FROM " + TABLE_CREDENTIAL;
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(selectQuery, null);
// looping through all rows and adding to list
if (cursor.moveToFirst()) {
do {
credential.setUsername(cursor.getString(0));
credential.setPassword(cursor.getString(1));
break;
} while (cursor.moveToNext());
}
// return contact list
return credential;
}
}
| [
"jxj050100@utdallas.edu"
] | jxj050100@utdallas.edu |
117b8d9c133e4933e43059e1338808d83370aea3 | 36ba7792e0cccfe9c217a2fe58700292af6d2204 | /in_dev_npc_combat_b/Kurask106Combat.java | bfea3da5420a5199cbf2b3682e770822426bed14 | [] | no_license | danielsojohn/BattleScape-Server-NoMaven | 92a678ab7d0e53a68b10d047638c580c902673cb | 793a1c8edd7381a96db0203b529c29ddf8ed8db9 | refs/heads/master | 2020-09-09T01:55:54.517436 | 2019-11-15T05:08:02 | 2019-11-15T05:08:02 | 221,307,980 | 0 | 0 | null | 2019-11-12T20:41:54 | 2019-11-12T20:41:53 | null | UTF-8 | Java | false | false | 7,231 | java | package script.npc.combat;
import java.util.Arrays;
import java.util.List;
import com.palidino.osrs.io.cache.NpcId;
import com.palidino.osrs.model.npc.combat.NpcCombatDefinition;
import com.palidino.osrs.model.npc.combat.NpcCombatDrop;
import com.palidino.osrs.model.npc.combat.NpcCombatDropTable;
import com.palidino.osrs.model.npc.combat.NpcCombatDropTableDrop;
import com.palidino.osrs.model.item.RandomItem;
import com.palidino.osrs.io.cache.ItemId;
import com.palidino.osrs.model.npc.combat.NpcCombatHitpoints;
import com.palidino.osrs.model.npc.combat.NpcCombatStats;
import com.palidino.osrs.model.CombatBonus;
import com.palidino.osrs.model.npc.combat.NpcCombatSlayer;
import com.palidino.osrs.model.npc.combat.NpcCombatAggression;
import com.palidino.osrs.model.npc.combat.NpcCombatImmunity;
import com.palidino.osrs.model.npc.combat.style.NpcCombatStyle;
import com.palidino.osrs.model.npc.combat.style.NpcCombatStyleType;
import com.palidino.osrs.model.npc.combat.style.NpcCombatDamage;
import com.palidino.osrs.model.npc.combat.style.NpcCombatProjectile;
import com.palidino.osrs.model.npc.combat.NpcCombat;
import lombok.var;
public class Kurask106Combat extends NpcCombat {
@Override
public List<NpcCombatDefinition> getCombatDefinitions() {
var drop = NpcCombatDrop.builder().rareDropTableRate(NpcCombatDropTable.CHANCE_1_IN_256);
var dropTable = NpcCombatDropTable.builder().chance(0.03);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.KURASK_HEAD)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(0.29);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.LEAF_BLADED_BATTLEAXE)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(0.58);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.MYSTIC_ROBE_TOP_LIGHT)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_1_IN_128);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.CLUE_SCROLL_HARD)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(0.79);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.LEAF_BLADED_SWORD)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_UNCOMMON);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.POISON_IVY_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.CACTUS_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.KWUARM_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.CADANTINE_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.LANTADYME_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.DWARF_WEED_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.SNAPDRAGON_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.TORSTOL_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.RUNE_LONGSWORD)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.ADAMANT_PLATEBODY)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.RUNE_AXE)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_IRIT_LEAF, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_AVANTOE, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_KWUARM, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_CADANTINE, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_DWARF_WEED, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_RANARR_WEED, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_LANTADYME, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.PAPAYA_FRUIT_NOTED, 10)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.WHITE_BERRIES_NOTED, 12)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.COCONUT_NOTED, 10)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_COMMON);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_GUAM_LEAF, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_MARRENTILL, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_TARROMIN, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_HARRALANDER, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.COINS, 44, 5000)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.LIMPWURT_ROOT_NOTED, 10, 20)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.FLAX_NOTED, 100)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.BIG_BONES_NOTED, 20)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.MITHRIL_KITESHIELD)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.NATURE_RUNE, 5, 30)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.BELLADONNA_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.TOADFLAX_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.IRIT_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.AVANTOE_SEED)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_ALWAYS);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.BONES)));
drop.table(dropTable.build());
var combat = NpcCombatDefinition.builder();
combat.id(NpcId.KURASK_106);
combat.hitpoints(NpcCombatHitpoints.total(97));
combat.stats(NpcCombatStats.builder().attackLevel(67).defenceLevel(105).bonus(CombatBonus.DEFENCE_SLASH, 20).bonus(CombatBonus.DEFENCE_CRUSH, 20).build());
combat.slayer(NpcCombatSlayer.builder().level(70).superiorId(NpcId.KING_KURASK_295).build());
combat.aggression(NpcCombatAggression.PLAYERS);
combat.immunity(NpcCombatImmunity.builder().poison(true).build());
combat.deathAnimation(1513).blockAnimation(1514);
combat.drop(drop.build());
var style = NpcCombatStyle.builder();
style.type(NpcCombatStyleType.melee(CombatBonus.ATTACK_CRUSH));
style.damage(NpcCombatDamage.maximum(11));
style.animation(1512).attackSpeed(4);
style.projectile(NpcCombatProjectile.id(335));
combat.style(style.build());
return Arrays.asList(combat.build());
}
}
| [
"palidino@Daltons-MacBook-Air.local"
] | palidino@Daltons-MacBook-Air.local |
9d3af2b52f2253e61f645293060e1ff28727b708 | f405276d39225bcba925667b35b6006797d42f92 | /pepcoding/BuyAndSellStocks -OneTransactionAllowed.java | 4c532b5b0d830e33e485eb3759cc7dfcef0bd9f8 | [] | no_license | Luv8436/Programming | cd30f9f2b94a0b0ebf0d41da19a6f66c4a59f9bc | a36793b1ff11200a7928348fee107a60da7a20cf | refs/heads/master | 2021-06-22T05:31:19.765024 | 2021-05-19T17:54:34 | 2021-05-19T17:54:34 | 221,635,429 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,269 | java | // 1. You are given a number n, representing the number of days.
// 2. You are given n numbers, where ith number represents price of stock on ith day.
// 3. You are required to print the maximum profit you can make if you are allowed a single transaction.
// Input Format
// A number n
// .. n more elements
// Output Format
// A number representing the maximum profit you can make if you are allowed a single transaction.
// Sample Input
// 9
// 11
// 6
// 7
// 19
// 4
// 1
// 6
// 18
// 4
// Sample Output
// 17
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// write your code here
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int arr[] = new int[n];
for(int i=0;i<n;i++){
arr[i] = scn.nextInt();
}
int small = arr[0];
int profit = 0 ;
for(int i=1;i<n;i++){
if(arr[i]<small ){
small = arr[i];
}
else{
int curr_profit = arr[i] - small;
if(curr_profit>profit){
profit = curr_profit;
}
}
}
System.out.println(profit);
}
} | [
"luvkumar8436@gmail.com"
] | luvkumar8436@gmail.com |
fa33e64708d8a4ba5cda50886614bf6bcd40371f | d6844cac6d5311b51b82e0a487a4c989b5ca0701 | /src/com/challengepost/flashdelivery/BaseActivity.java | 6b0e2c024ffe6f2cd258802142cbde3576040dd0 | [] | no_license | BrianNgo/FlashDelivery | b843a770165851335a0ddaae61430a052c218f33 | 45563921bc99e0729630b1f889ff72bc67237fff | refs/heads/master | 2021-01-22T16:18:30.857401 | 2015-01-09T21:07:34 | 2015-01-09T21:07:34 | 29,047,870 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,669 | java | package com.challengepost.flashdelivery;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.IBinder;
import android.support.v4.app.FragmentActivity;
import android.view.MenuItem;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
public class BaseActivity extends FragmentActivity {
// public boolean onCreateOptionsMenu(Menu menu) {
// return true;
// }
public void startActivity(Intent intent, boolean animate) {
super.startActivity(intent);
if(animate)
overridePendingTransition(R.anim.animation_slide_from_right, R.anim.animation_slide_to_left);
}
public void startActivityForResult(Intent intent, int requestCode, boolean animate) {
super.startActivityForResult(intent, requestCode);
if(animate)
overridePendingTransition(R.anim.animation_slide_from_right, R.anim.animation_slide_to_left);
}
public void finish(boolean animate) {
super.finish();
if(animate)
overridePendingTransition(R.anim.animation_slide_from_left, R.anim.animation_slide_to_right);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case android.R.id.home:
onBackPressed();
}
return super.onOptionsItemSelected(item);
}
@Override
public void onBackPressed() {
finish(true);
}
public void back(View v) {
onBackPressed();
}
public void showLoading() {
View loading = (View)findViewById(R.id.loading_indicator);
loading.setVisibility(View.VISIBLE);
}
public void hideLoading() {
View loading = (View)findViewById(R.id.loading_indicator);
loading.setVisibility(View.GONE);
}
public void showKeyboard(View view) {
InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
imm.showSoftInput(view, 0);
}
public void hideKeyboard(IBinder token) {
InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(token, 0);
}
public void showSeriesMessages(final Context context, final String title, final String[] messages, final int messageIndex) {
AlertDialog.Builder alertBuilder = new AlertDialog.Builder(context);
alertBuilder.setTitle(title);
alertBuilder.setMessage(messages[messageIndex]);
alertBuilder.setPositiveButton(messageIndex == messages.length-1? "Ok": "Next", new AlertDialog.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if(messageIndex < messages.length-1)
showSeriesMessages(context, title, messages, messageIndex+1);
}
});
alertBuilder.create().show();
}
}
| [
"lamhuunguyen@gmail.com"
] | lamhuunguyen@gmail.com |
e2cc560e18fa48288c7f4c38ceb5a07ea4308765 | 5fc4808297e2ba6816a7b9f15725ebe69da1965c | /src/main/java/com/demo/websocket/modules/user/entity/User.java | 4c65ca5b7ab10ba04a03d92eba2a26da8ae91e00 | [] | no_license | PurpleEyeEmilia/websocket | 0aad13012444cc1f01bc215f1f9d83c25596616e | 92ddf3e924cc4d56f734b44d1b967464ade8368f | refs/heads/master | 2021-06-10T03:05:07.831863 | 2021-05-07T10:05:57 | 2021-05-07T10:05:57 | 135,135,800 | 0 | 0 | null | 2021-04-20T03:09:02 | 2018-05-28T08:57:21 | Java | UTF-8 | Java | false | false | 788 | java | package com.demo.websocket.modules.user.entity;
import com.demo.websocket.common.BaseObject;
/**
* Copyright (c) 2017-2018 Company LTD.
* All rights reserved.
*
* @Description:
* @Date: Created in 2018 2018/1/20 17:55
* @Author: pengnian
*/
public class User extends BaseObject {
private String name;
private String phone;
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
}
| [
"pengnian@guahao.com"
] | pengnian@guahao.com |
ec8fd9e625605d0bac56323a409c82ea291b562b | 9bdf0c463a2a2d4be92741c7509fa7a9cab11342 | /CINE_Recuperacion/src/main/java/dao/VentaFacade.java | 5c0e6df199139e4340fe1611667490f700ba420d | [] | no_license | CarlosFranTorresMartinez/EXAMEN | f015a07713d71251e1c543739d919a503c4d8148 | 7a7645759e00be824b4d770a4ad48596ed3ca5e1 | refs/heads/master | 2020-09-10T14:42:31.152221 | 2019-12-12T22:24:28 | 2019-12-12T22:24:28 | 221,724,191 | 0 | 0 | null | 2019-12-14T20:47:11 | 2019-11-14T15:04:24 | HTML | UTF-8 | Java | false | false | 707 | 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 dao;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import modelo.Venta;
/**
*
* @author PC09
*/
@Stateless
public class VentaFacade extends AbstractFacade<Venta> {
@PersistenceContext(unitName = "com.mycompany_CINE_Recuperacion_war_1.0-SNAPSHOTPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public VentaFacade() {
super(Venta.class);
}
}
| [
"ldelacruz@vallegrande.edu.pe"
] | ldelacruz@vallegrande.edu.pe |
08afa5489cb576ea559630614358e30f4e5d589a | d93a47a7c64fae6e5fa62184ca95f7831c3c20ed | /src/com/wenjing/entity/AttractionLevel.java | 139773eff3b35ee43331b7db285f638c8f02147f | [] | no_license | cfy202/intertrips | b5ace01f0c7f7ab4f9753be4f3ab5d457102d263 | f3810e8018b5c3f15c2f72b281e9a462fe0d4cb0 | refs/heads/master | 2020-04-29T11:37:20.753331 | 2019-12-04T03:12:11 | 2019-12-04T03:12:11 | 176,105,219 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 762 | java | /**
*
*/
package com.wenjing.entity;
import java.io.Serializable;
/**
* 类说明
* @author xiejin
* @date 2015-9-25
* @date 2015-9-25 下午2:09:56
*/
public class AttractionLevel implements Serializable{
private static final long serialVersionUID = -2920880765426813428L;
private String id;
private String description;
private int level;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
}
| [
"cfy871222@163.com"
] | cfy871222@163.com |
c216eacb6e9083944d7482c5389e2fcbb275e0c3 | d20a22f8f8c4d621a8046f2a3366cadd816e7f9c | /app/src/main/java/mcm/edu/ph/takumicorporation_inheritancerpg20/MainActivity.java | eb1a4c8b0f5dfe2c8699411de33e9fe817a45795 | [] | no_license | TakumiVargas/TakumiCorporationsRPGInheritance | 955799907754d24c527dd0856fa20c82e3af0677 | 94984000c025ad8df61473fafbc32743a610227b | refs/heads/master | 2023-04-02T07:30:16.121244 | 2021-03-28T01:24:06 | 2021-03-28T01:24:06 | 352,214,875 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,187 | java | package mcm.edu.ph.takumicorporation_inheritancerpg20;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageButton btnHeroes = findViewById(R.id.btnHeroes);
ImageButton btnMonsters = findViewById(R.id.btnMonsters);
btnHeroes.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent int1 = new Intent(MainActivity.this,Heroes.class);
startActivity(int1);
}
});
btnMonsters.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent int2 = new Intent(MainActivity.this,Monster.class);
startActivity(int2);
}
});
}
} | [
"vargastakumi123456789@gmail.com"
] | vargastakumi123456789@gmail.com |
b7bd6dc0423e1811046d915a2db72d732aa36ec1 | 2dcb01708a69665235d032a833f61ea20ef292ab | /omod/src/main/java/org/openmrs/module/mohbilling/web/controller/MohBillingInsuranceServiceCategoryListController.java | cb31ed022d238759db076e2a8ee95e0d8050ae40 | [] | no_license | rash-tiwari/openmrs-module-imbbilling | 419c84d5f91ebc1b7d043a988c57097ad271bc78 | d84fded03572eae0922544808e55ae799c208add | refs/heads/master | 2020-12-24T11:10:34.042292 | 2016-06-01T08:09:44 | 2016-06-01T08:09:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,531 | java | /**
*
*/
package org.openmrs.module.mohbilling.web.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.openmrs.api.context.Context;
import org.openmrs.module.mohbilling.service.BillingService;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.ParameterizableViewController;
import org.springframework.web.servlet.view.RedirectView;
/**
* @author Yves GAKUBA
*
* This controller backs the
* /web/module/mohBillingInsuranceServiceCategory.jsp page. This
* controller is tied to that jsp page in the
* /metadata/moduleApplicationContext.xml file
*/
public class MohBillingInsuranceServiceCategoryListController extends
ParameterizableViewController {
/** Logger for this class and subclasses */
protected final Log log = LogFactory.getLog(getClass());
@Override
protected ModelAndView handleRequestInternal(HttpServletRequest request,
HttpServletResponse response) throws Exception {
ModelAndView mav = new ModelAndView();
mav.setViewName(getViewName());
try {
mav.addObject("insurance", Context.getService(BillingService.class)
.getInsurance(
Integer
.valueOf(request
.getParameter("insuranceId"))));
} catch (Exception e) {
e.printStackTrace();
return new ModelAndView(new RedirectView("insurance.list"));
}
return mav;
}
}
| [
"mseaton@pih.org"
] | mseaton@pih.org |
fdec5d18ba06471274760b8037cec1c72c0d9cfb | 396533a26dc26aba7232921f09ce9ee143dec519 | /TestListView/src/com/luke/testlistview/MainActivity.java | 01308b9917d0257cda1c4c61fd13f302a1a37691 | [] | no_license | AsianSeeds/AndroidLearning | 7392b60123915574cfe46bdce90cb6417aad6867 | 46c36c034bf0848d1731d4a7e41aa417c2e05ac7 | refs/heads/master | 2016-09-01T10:08:26.325124 | 2016-01-06T01:55:49 | 2016-01-06T01:55:49 | 49,104,965 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,823 | java | package com.luke.testlistview;
import java.util.ArrayList;
import java.util.List;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
public class MainActivity extends ActionBarActivity implements OnItemClickListener,OnItemLongClickListener{
private ListView mListView;
private List<String> map = new ArrayList<String>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mListView = new ListView(this);
mListView.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_expandable_list_item_1,getData()));
mListView.setOnItemClickListener(this);
mListView.setOnItemLongClickListener(this);
setContentView(mListView);
}
private List<String> getData(){
map.add("line1");
map.add("line2");
map.add("line3");
map.add("line4");
map.add("line5");
return map;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
if(map.get(arg2).equals("line1")){
Toast.makeText(this, "element 1 selected", Toast.LENGTH_SHORT).show();
}
if(map.get(arg2).equals("line2")){
Toast.makeText(this, "element 2 selected", Toast.LENGTH_SHORT).show();
}
if(map.get(arg2).equals("line3")){
Toast.makeText(this, "element 3 selected", Toast.LENGTH_SHORT).show();
}
if(map.get(arg2).equals("line4")){
Toast.makeText(this, "element 4 selected", Toast.LENGTH_SHORT).show();
}
if(map.get(arg2).equals("line5")){
Toast.makeText(this, "element 5 selected", Toast.LENGTH_SHORT).show();
}
}
@Override
public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
if(map.get(arg2).equals("list1")){
Toast.makeText(this, "element 1 selected Deeply", Toast.LENGTH_SHORT).show();
}
return true;
}
}
| [
"luzy@mapbar.com"
] | luzy@mapbar.com |
ae7ea74c9337d021119cfe96d1289e9ca8748291 | e84056719732f54638d5bfbdadfbe02c6048ac5a | /ly-user/ly-user-service/src/main/java/com/leyou/LyUserApplication.java | 3b9b4ebc60988fa46027c7c5b765688d1bafdfd4 | [] | no_license | jialiangjie696/le_you | 689153fb66a4e9157897d71b08c9cf5383ba2b19 | f02a3cb4bc097cc666a3a7b15efcdab79b1d5dba | refs/heads/master | 2022-12-13T20:42:48.225265 | 2019-10-23T03:14:43 | 2019-10-23T03:14:43 | 210,604,408 | 0 | 0 | null | 2022-12-10T05:38:53 | 2019-09-24T13:01:57 | Java | UTF-8 | Java | false | false | 557 | java | package com.leyou;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import tk.mybatis.spring.annotation.MapperScan;
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.leyou.user.mapper")
public class LyUserApplication {
public static void main(String[] args) {
SpringApplication.run(LyUserApplication.class,args);
}
}
| [
"jialiangjie@yeah.net"
] | jialiangjie@yeah.net |
0e19a2578eb51999faaa6f1d7294672b86acc5a6 | d3a1845c9db556f7627808e56ade5768fe411397 | /cf-spring/src/test/java/cf/spring/servicebroker/AnnotationCatalogAccessorProviderTest.java | d73372f73da0eee0d709755f8ae727098f59b97f | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | tdemande/cf-java-component | c4a4fb1536145d046563b15dd7189f3650ce0829 | a45419e0c15b9c58eb2ecb8c4049137bff57ed3d | refs/heads/master | 2021-01-22T13:23:18.257569 | 2014-11-16T21:16:00 | 2014-11-16T21:16:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,968 | java | /*
* Copyright (c) 2014 Intellectual Reserve, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package cf.spring.servicebroker;
import static org.testng.Assert.*;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import cf.spring.servicebroker.Catalog.CatalogService;
import cf.spring.servicebroker.Catalog.Plan;
/**
* @author Sebastien Gerard
*/
public class AnnotationCatalogAccessorProviderTest extends AbstractServiceBrokerTest {
private static final String BROKER_ID = "some-broker-id-1";
private static final String SERVICE_NAME = "test-broker";
private static final String SERVICE_DESCRIPTION = "This is for testing";
private static final String PLAN_ID = "plan-id-2";
private static final String PLAN_NAME = "test-plan";
private static final String PLAN_DESCRIPTION = "Some test plan for testing.";
@Configuration
@EnableAutoConfiguration
@EnableServiceBroker(username = USERNAME, password = PASSWORD)
@ServiceBroker(
@Service(id = BROKER_ID, name = SERVICE_NAME, description = SERVICE_DESCRIPTION, plans = {
@ServicePlan(id = PLAN_ID, name = PLAN_NAME, description = PLAN_DESCRIPTION)
}))
static class ServiceBrokerConfiguration {
@Provision
public ProvisionResponse provision(ProvisionRequest request) {
return new ProvisionResponse("url");
}
@Bind
public BindResponse bind(BindRequest request) {
return new BindResponse("cred");
}
@Unbind
public void unbind(UnbindRequest request) {
}
@Deprovision
public void deprovision(DeprovisionRequest request) {
}
}
private ConfigurableApplicationContext context;
@BeforeClass
public void init() {
final SpringApplication application = new SpringApplication(ServiceBrokerConfiguration.class);
context = application.run();
}
@AfterClass
public void cleanup() throws Exception {
context.close();
}
@Test
public void catalog() {
final BrokerServiceAccessor serviceAccessor = getProvider().getCatalogAccessor().getServiceAccessor(BROKER_ID);
final CatalogService serviceDescription = serviceAccessor.getServiceDescription();
assertEquals(BROKER_ID, serviceDescription.getId());
assertEquals(SERVICE_NAME, serviceDescription.getName());
assertEquals(SERVICE_DESCRIPTION, serviceDescription.getDescription());
assertEquals(1, serviceDescription.getPlans().size());
final Plan plan = serviceDescription.getPlans().get(0);
assertEquals(PLAN_ID, plan.getId());
assertEquals(PLAN_NAME, plan.getName());
assertEquals(PLAN_DESCRIPTION, plan.getDescription());
}
@Test(expectedExceptions = NotFoundException.class)
public void serviceNotExist() {
getProvider().getCatalogAccessor().getServiceAccessor("1234");
}
private AnnotationCatalogAccessorProvider getProvider() {
return context.getBean(AnnotationCatalogAccessorProvider.class);
}
}
| [
"me@sgerard.be"
] | me@sgerard.be |
4cab00ace56c49f43479b754e8e195a67a5ad2c6 | d729958568fef45bca149a03f2dc7ccc8192a745 | /taotao-portal/src/main/java/com/taotao/portal/service/impl/OrderServiceImpl.java | 24f5f90f5aa33f035d8cafa52b0b65b8caaf273e | [] | no_license | langgithub/taotao | 3d797b8c390980f2d3ca1b91c1e18486957b28f3 | dc37a81ffb655d498fd4fa589c2ecbe1aeeda52e | refs/heads/master | 2020-05-07T12:51:26.394793 | 2019-04-10T07:18:26 | 2019-04-10T07:18:26 | 180,521,000 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,053 | java | package com.taotao.portal.service.impl;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.taotao.common.pojo.TaotaoResult;
import com.taotao.common.util.HttpClientUtil;
import com.taotao.common.util.JsonUtils;
import com.taotao.portal.pojo.Order;
import com.taotao.portal.service.OrderService;
@Service
public class OrderServiceImpl implements OrderService {
@Value("${ORDER_BASE_URL}")
private String ORDER_BASE_URL;
@Value("${ORDER_CREATE_URL}")
private String ORDER_CREATE_URL;
@Override
public String createOrder(Order order) {
//调用taotao-order的服务提交订单。
System.out.println(ORDER_BASE_URL + ORDER_CREATE_URL);
String json = HttpClientUtil.doPostJson(ORDER_BASE_URL + ORDER_CREATE_URL, JsonUtils.objectToJson(order));
//把json转换成taotaoResult
TaotaoResult taotaoResult = TaotaoResult.format(json);
if (taotaoResult.getStatus() == 200) {
Object orderId =taotaoResult.getData();
return orderId.toString();
}
return "";
}
}
| [
"S8rf70h43p"
] | S8rf70h43p |
760b4d321b8509e8913b8e2a89614daa7492050f | 74c7178838cc734db025931cd729f7002eae2d57 | /app/src/main/java/com/pavan/myapplication/BackgroundTasks.java | 0816aeac74656031564189432fc74d7f0fcab46d | [] | no_license | pavanbhat/Login_Form | 3f40238e6955232116fecd8f4707262a94012113 | 4a38a340ba7283224ab2afeb72fd31c4a39b0f08 | refs/heads/master | 2020-12-25T14:14:45.252062 | 2016-09-04T15:49:42 | 2016-09-04T15:49:42 | 67,353,220 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,656 | java | package com.pavan.myapplication;
import android.content.Context;
import android.os.AsyncTask;
import android.widget.Toast;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
/**
* Created by pavan on 8/9/2016.
*/
public class BackgroundTasks extends AsyncTask<String, Void, String> {
Context c;
BackgroundTasks(Context c) {
this.c = c;
}
@Override
protected void onPreExecute() {
super.onPreExecute();
}
@Override
protected String doInBackground(String... params) {
String reg_url = "http://10.0.2.2/webapp/register.php";
String login_url = "http://10.0.2.2/webapp/login.php";
String method = params[0];
if (method == "register") {
String name = params[1];
String user_name = params[2];
String user_pass = params[3];
try {
URL url = new URL(reg_url);
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setDoOutput(true);
OutputStream os = httpURLConnection.getOutputStream();
BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(os, "UTF-8"));
String data = URLEncoder.encode("user", "UTF-8") + "=" + URLEncoder.encode(name, "UTF-8") + "&" +
URLEncoder.encode("user_name", "UTF-8") + "=" + URLEncoder.encode(user_name, "UTF-8") + "&" +
URLEncoder.encode("user_pass", "UTF-8") + "=" + URLEncoder.encode(user_pass, "UTF-8");
bufferedWriter.write(data);
bufferedWriter.flush();
bufferedWriter.close();
os.close();
InputStream is = httpURLConnection.getInputStream();
is.close();
return "Registration Success...";
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
return null;
}
@Override
protected void onProgressUpdate(Void... values) {
super.onProgressUpdate(values);
}
@Override
protected void onPostExecute(String result) {
Toast.makeText(c, result, Toast.LENGTH_LONG).show();
super.onPostExecute(result);
}
}
| [
"pavanbhat90@gmail.com"
] | pavanbhat90@gmail.com |
c54f41f82209982685066f4c1b4cb418cd6dd503 | ab5e3cf04b7fed46c93007cf04c5ff421acc2f94 | /src/com/servlet/collect/AddCollectByUserIdAndCyclopediaId.java | 1b6ec6b48a4821ea0a157b6c0b2e8dd9e863b2a2 | [] | no_license | sunruibing/Test-backup | 9b7a890f866a787dadf2cbbce56256cb9c422f3d | c18f29d3f6830d0410bcf2adea6507ef317d6112 | refs/heads/master | 2021-01-11T12:08:38.619497 | 2016-12-17T03:00:11 | 2016-12-17T03:00:11 | 76,528,990 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,201 | java | package com.servlet.collect;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Date;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.po.Collect;
import com.service.CollectService;
import com.service.CyclopediaService;
import com.util.DateUtil;
/**
* 根据用户id和文章id来添加收藏
*@author FFFF
* Put
* undefined
* The's Not me want.
* insert in
* angel
* nice
* 2016年9月21日
*/
@WebServlet(name="AddCollectByUserIdAndCyclopediaId", urlPatterns={"/AddCollectByUserIdAndCyclopediaId"})
public class AddCollectByUserIdAndCyclopediaId extends HttpServlet {
private static final long serialVersionUID = 6229812275952466609L;
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
Integer userId = Integer.parseInt(request.getParameter("userId"));
Integer cyclopediaId = Integer.parseInt(request.getParameter("cyclopediaId"));
Collect collect = new Collect();
collect.setUserId(userId);
collect.setCyclopediaId(cyclopediaId);
collect.setTime(DateUtil.DateToString(new Date()));
CollectService collectService = new CollectService();
int msg = collectService.insertCollectByUserIdAndCyclopediaId(collect);
if(1 == msg){
response.getWriter().print(0);//success
int count =+ collectService.queryCollectCount(cyclopediaId);
new CyclopediaService().insertCollectCount(count, cyclopediaId);;
}else{
response.getWriter().print(2);//SQL error SQL执行报错
}
}catch (NumberFormatException e) {
e.printStackTrace();
response.getWriter().println(2);//NumberFormat error 类型转换报错
}catch (SQLException e) {
e.printStackTrace();
response.getWriter().print(2);//SQL error SQL执行报错
}
}
}
| [
"sun13608170152@yeah.net"
] | sun13608170152@yeah.net |
abd4e2db289652a802a8e015884215c7d6ba72f4 | 4707a19a2d60c862c73b7780ff77139cc428805b | /src/main/java/Menu.java | 148163294e2239fe6c8a8445ed5c7cb895a2f333 | [] | no_license | kerrdennis272/frame-data-retriever-ggst | 00e7915430443a1a2c4bb09935f5c53880d6b967 | 925f76a5239e228274cb82c034376e29642e4e3c | refs/heads/main | 2023-08-10T17:51:53.801050 | 2021-09-20T20:04:13 | 2021-09-20T20:04:13 | 399,285,980 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,928 | java | import java.util.List;
import java.util.Scanner;
public class Menu {
private Scanner scanner;
public Menu () {
this.scanner = new Scanner(System.in);
}
public void displayMenuOptions(List<String> options) {
int i = 1;
for (String option : options) {
System.out.println(i + ")" + option);
i++;
}
}
public String getCharacterChoiceFromUser(List<String> options) {
displayMenuOptions(options);
System.out.println("Please Select a character by the option number (0 to exit): ");
String userInput = scanner.nextLine();
String choice = null;
try {
int selectedCharacter = Integer.valueOf(userInput);
if (selectedCharacter == 0) {
return "0";
}
choice = options.get(selectedCharacter - 1);
} catch (NumberFormatException e) {
System.out.println("\n\n**Please input the number corresponding to the character**\n\n");
} catch (IndexOutOfBoundsException ex) {
System.out.println("\n\n**Please input the number corresponding to the character**\n\n");
}
return choice;
}
public String getMenuChoiceFromUser(List<String> options) {
displayMenuOptions(options);
String userInput = scanner.nextLine();
String choice = null;
try {
int selectedOption = Integer.valueOf(userInput);
if (selectedOption == 0) {
return "0";
}
choice = options.get(selectedOption - 1);
} catch (NumberFormatException e) {
System.out.println("\n\n**Please input the number corresponding to the option**\n\n");
} catch (IndexOutOfBoundsException ex) {
System.out.println("\n\n**Please input the number corresponding to the option**\n\n");
}
return choice;
}
}
| [
"nimbus272@gmail.com"
] | nimbus272@gmail.com |
f0f7c86923fb7c9d8b501169ab172120709f6c93 | 66a580b1b94559bf403a41926d01a7b21bcb74ed | /myutilities/testbase/src/main/java/javarefcheck/TestPhantomReference.java | 7b163c1fedef0e3ee880bc8074fb11bf801812e9 | [] | no_license | deepnighttwo/deepnighttwo | d9d83b3dceebc052a5d409f22b2e7910f7205dfe | baeee505d1d48a92adaff874552c0db08f32e6bb | refs/heads/master | 2021-01-17T07:46:51.648070 | 2016-12-01T12:18:32 | 2016-12-01T12:18:32 | 1,887,469 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,207 | java | package javarefcheck;
import java.lang.ref.PhantomReference;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
public class TestPhantomReference {
/**
* @param args
* @throws NoSuchFieldException
* @throws SecurityException
* @throws IllegalAccessException
* @throws IllegalArgumentException
* @throws InterruptedException
*/
public static void main(String[] args) throws SecurityException,
NoSuchFieldException, IllegalArgumentException,
IllegalAccessException, InterruptedException {
List l = new ArrayList();
ReferenceQueue<Big> rq = new ReferenceQueue<Big>();
int size = 1;
for (int i = 0; i < size; i++) {
Big b = new Big();
PhantomReference<Big> pf = new PhantomReference<Big>(b, rq);
b = null;
// need to make sure the PhantomReference is not GCed. Otherwise, it
// will never be enqueued.
l.add(pf);
}
List<Big> l2 = new ArrayList<Big>();
for (int i = 0; i < size * 10; i++) {
Big b = new Big();
l2.add(b);
}
// pf = null;
System.gc();
for (int i = 0; i < size; i++) {
Reference<? extends Big> pf2 = rq.remove();
if (pf2 != null) {
System.gc();
Thread.yield();
System.gc();
// pf2.clear();
System.gc();
System.gc();
Thread.yield();
System.gc();
System.gc();
Field fs = Reference.class.getDeclaredField("referent");
fs.setAccessible(true);
Big obj = (Big) fs.get(pf2);
System.out.println(obj);
obj.initArray();
obj.checksum();
}
System.gc();
}
// for (Big bbb : l2) {
// bbb.checksum();
// }
}
}
class Big {
int[][] data = new int[1024][1024];
public void initArray() {
System.out.println("initialing");
for (int i = 0; i < 1024; i++) {
for (int j = 0; j < 1024; j++) {
data[i][j] = i + j;
}
}
System.out.println("initialed");
}
public void checksum() {
int sum = 0;
System.out.println("suming");
for (int i = 0; i < 1024; i++) {
for (int j = 0; j < 1024; j++) {
sum += data[i][j];
}
}
System.out.println("sum:" + sum);
}
protected void finalize() {
System.out.println("Big Finalized.");
}
}
| [
"DeepNightTwo@gmail.com"
] | DeepNightTwo@gmail.com |
363de0990b1eb3215e24ea1215f19f093fbbba3d | a5fbbecbaeadad77495208ab3062aa8f1c3c906b | /src/main/java/com/boot/social/api/facebook/Feed.java | e7c9b5baa8909bd75e60fe4144c9c7c13676a6b4 | [] | no_license | mvalchev/social | bcb45223d6aaf1d236d16b52fe809e0f7d1180b9 | df848bcb076cb4937a7e10b47c400ecb871f7a9d | refs/heads/master | 2020-06-14T05:55:28.917259 | 2019-07-03T19:45:03 | 2019-07-03T19:45:03 | 194,925,192 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 149 | java | package com.boot.social.api.facebook;
import java.util.List;
import lombok.Data;
@Data
public class Feed
{
private List<Post> data;
}
| [
"Admin@Mariyan"
] | Admin@Mariyan |
e24c89b5b89cf142588d1002813efca51b514df0 | bcd4762b1961dfa3cdebe8d24ab20760eb1a9732 | /phloc-appbasics/src/main/java/com/phloc/appbasics/datetime/IHasLastModificationInfo.java | e3209b1fe1821f98d9e7505d4174e912ce109bd7 | [] | no_license | phlocbg/phloc-webbasics | 4d7d773f7d8fc90349432982e647d66aa2b322b8 | c1a4c5ffab91c89abf27e080601b509061e9cf47 | refs/heads/master | 2023-07-20T01:39:32.772637 | 2023-07-14T16:23:00 | 2023-07-14T16:23:00 | 41,255,519 | 0 | 0 | null | 2022-12-06T00:05:48 | 2015-08-23T15:42:00 | Java | UTF-8 | Java | false | false | 1,211 | java | /**
* Copyright (C) 2006-2014 phloc systems
* http://www.phloc.com
* office[at]phloc[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.phloc.appbasics.datetime;
import javax.annotation.Nullable;
import com.phloc.datetime.IHasLastModificationDateTime;
/**
* Base interface for an object that has a date time and a user ID.
*
* @author Philip Helger
*/
public interface IHasLastModificationInfo extends IHasLastModificationDateTime
{
/**
* @return The user ID who last modified the object or <code>null</code> if
* this object has not yet been modified.
*/
@Nullable
String getLastModificationUserID ();
}
| [
"ph@phloc.com@224af017-8982-1a56-601f-39e8d6e75726"
] | ph@phloc.com@224af017-8982-1a56-601f-39e8d6e75726 |
a3acfdd9044972567d9ea87a752b827f2f2651fd | bb11065e6390d9705b8f4a650effd931254c445b | /src/java1/Search.java | 70a5f28d4c287627c2e51f3e3d4825b2b2e62ddc | [
"MIT"
] | permissive | r-kapoor/Leetcode | b7c0b78ad671cb55cef5e0f12540330cdd0ac701 | 3fb1ce165ee65e4c1e99c196c4a4577732fc8ef4 | refs/heads/master | 2021-09-09T23:07:55.622833 | 2018-03-20T06:22:29 | 2018-03-20T06:22:29 | 125,966,386 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 602 | java | package java1;
public class Search {
public static void main(String args[]){
int []elements = {-2, 0, 3, 4, 6};
int target = 3;
System.out.println(sorted_search(elements, target));
}
static int sorted_search(int elements[], int target){
if(elements == null || elements.length <= 0){
return -1;
}
int left = 0, right = elements.length - 1;
while(left < right){
int middle = (left + right + 1)/2;
if(elements[middle] > target){
right = middle - 1;
}
else{
left = middle + 1;
}
}
if (elements[right] == target){
return right;
}
return -1;
}
}
| [
"rahulkapoor.bits@gmail.com"
] | rahulkapoor.bits@gmail.com |
05b36f2a4dcac6fd0952045a645e1e099ece7977 | a0a4b4d8d6eff2b369b89968bce5f34fec42243b | /Java/PetIntelligence/src/com/gustavo/web/models/Dog.java | 1bdb9b6c047696599e2712408a60655900ba57d8 | [] | no_license | gVigueras/FullStackJava | 031165793b1a75332d374440559fba5235753039 | c46785555d632e44c1648c741578eaf386dfa941 | refs/heads/master | 2020-12-22T12:36:10.718781 | 2020-09-07T00:38:52 | 2020-09-07T00:38:52 | 236,783,005 | 0 | 1 | null | null | null | null | WINDOWS-1250 | Java | false | false | 375 | java | package com.gustavo.web.models;
public class Dog extends Animal implements Pet {
public Dog(String name, String breed, int weight) {
super(name, breed, weight);
}
@Override
public String showAffection() {
if(this.getWeight()<30)
return (this.getName()+" saltó emocionado a tus brazos!");
else
return (this.getName()+" se pasea entre tus piernas.");
}
}
| [
"g.vigueras01@ufromail.cl"
] | g.vigueras01@ufromail.cl |
8e6bd6441a8ee67ed02b97107e72f57964517301 | 62180ba412196056a257d11e855501a8a9a7cf70 | /app/src/main/java/com/michael/navigationbasicdemo/MainFragment.java | 3bf12a257b3e38423af534e18d3de81858f4aa19 | [
"Apache-2.0"
] | permissive | ruidian/NavigationBasicDemo | 3e9b75f32cc96e71078c0d1db9861276fb57604a | c788186d75ee53b181da098527ea5b71693268dc | refs/heads/master | 2022-01-05T11:44:30.591502 | 2019-06-17T18:05:19 | 2019-06-17T18:05:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,156 | java | package com.michael.navigationbasicdemo;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.navigation.Navigation;
public class MainFragment extends Fragment
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View view = inflater.inflate(R.layout.fragment_main, container, false);
//方法一
view.findViewById(R.id.btnToSecondFragment).setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Navigation.findNavController(v).navigate(R.id.action_mainFragment_to_secondFragment);
}
});
//方法二
view.findViewById(R.id.btnToSecondFragment).setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_mainFragment_to_secondFragment));
return view;
}
}
| [
"Michaelye1988@gmail.com"
] | Michaelye1988@gmail.com |
ded2ecca387a2d2a8e1807499579a3028cb28b14 | adfd9407b5f4e0cedbe440907873a7cef4b33294 | /app/src/main/java/com/example/ronakshah/hackforchange/locate.java | 7118aad9f7665fa03d45c416c4f388cffdb6939c | [] | no_license | karan413255/ElderCare | 7a7449e8923cd4854895f15d382bd70ec606e4c7 | d822008c45a4b15ce52efb52ecd92c464389bb12 | refs/heads/master | 2021-01-12T01:08:05.226846 | 2017-01-08T14:28:34 | 2017-01-08T14:28:34 | 78,347,789 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,898 | java | package com.example.ronakshah.hackforchange;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.roughike.bottombar.BottomBar;
import com.roughike.bottombar.OnMenuTabSelectedListener;
public class locate extends AppCompatActivity
{
private WebView wv;
private CoordinatorLayout coordinatorLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_locate);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
wv = (WebView)findViewById(R.id.webView);
wv.setWebViewClient(new MyBrowser());
wv.getSettings().setLoadsImagesAutomatically(true);
wv.getSettings().setJavaScriptEnabled(true);
wv.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
wv.getSettings().setDisplayZoomControls(true);
wv.loadUrl("https://www.google.co.in/maps/search/hospitals+near+me/@19.1197427,72.8521395,13z");
coordinatorLayout = (CoordinatorLayout) findViewById(R.id.four_button);
BottomBar bottomBar = BottomBar.attach(this, savedInstanceState);
bottomBar.setItemsFromMenu(R.menu.four_buttons_menu, new OnMenuTabSelectedListener() {
@Override
public void onMenuItemSelected(int itemId) {
switch (itemId) {
case R.id.health_item:
Intent inr = new Intent(getApplicationContext(),MainActivity.class);
startActivity(inr);
break;
case R.id.reminder_item:
Intent i = new Intent(getApplicationContext(), ReminderActivity.class);
startActivity(i);
break;
case R.id.location_item:
Snackbar.make(coordinatorLayout, "Location Item Selected", Snackbar.LENGTH_LONG).show();
break;
case R.id.videos_item: {
Intent in = new Intent(getApplicationContext(), Video.class);
startActivity(in);
break;
}
}
}
});
bottomBar.setActiveTabColor("#C2185B");
}
private class MyBrowser extends WebViewClient
{
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
}
| [
"ronakshah983@gmail.com"
] | ronakshah983@gmail.com |
6c0cce1978fe0625616dd6d2fd2eb964ed24a14e | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/3/3_9dafd5526517ac1466019f58b04f2774cb7dfb24/ReferenceCounting/3_9dafd5526517ac1466019f58b04f2774cb7dfb24_ReferenceCounting_s.java | 65adbf8f416cb84e3e3c1664855a236034ede477 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 35,725 | java | /*
* Copyright (c) 2004-2009 XMLVM --- An XML-based Programming Language
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 675 Mass
* Ave, Cambridge, MA 02139, USA.
*
* For more information, visit the XMLVM Home Page at http://www.xmlvm.org
*/
package org.xmlvm.refcount;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.jdom.Attribute;
import org.jdom.DataConversionException;
import org.jdom.Element;
import org.jdom.Namespace;
import org.xmlvm.Log;
import org.xmlvm.refcount.optimizations.RegisterSizeAndNullingOptimization;
import org.xmlvm.refcount.optimizations.ExcessRetainsOptimization;
import org.xmlvm.refcount.optimizations.RefCountOptimization;
import org.xmlvm.refcount.optimizations.DeferredNullingOptimization;
/**
* Overview:
*
* This class uses reference counting to simulate the effects of a JVM garbage
* collector. It operates on the output of the DEX XMLVM process which is a XML
* based representation of a compiled java class that has been transformed from
* a stack machine to a register machine. This class manages object lifespan
* using a reference counting approach. For example, when an object is created
* it is given a reference count of 1. During the lifespan of the object the
* reference count is incremented as other objects store away pointers to the
* object in question. Eventually, the reference count is set to zero and the
* memory for the object is released.
*
* This class is interesting because manages these reference counts without any
* client programmer intervention to simulate the effects of a garbage. This is
* done by following a few simple rules: 1) Each pointer to an object always has
* a 'retain' associated with it. For example, if a register variable points
* toward an object then the following pattern would occur: Register r1 =
* object1; [r1 retain];
*
* When the pointer's end of life occurred, we would release the object
* reference [r1 release]; r1 = null;
*
* The same concept holds for other classes of pointer including, arrays, static
* references to objects, as well as instance references. In general the
* following invariant always holds true:
*
* If there is a pointer to an object, than that pointer has associated with it
* an increment for the objects reference count. If that pointer is overwritten
* for any reason, that reference is released.
*
* Based on this invariant, we know that when we can no longer point to an
* object all of its reference count increments will be gone and hence it will
* be freed by the runtime.
*
* Usage: For a <dex:method/> represented as a jdom.Element, call Process.
*/
public class ReferenceCounting {
Namespace dex = InstructionProcessor.dex;
Namespace vm = InstructionProcessor.vm;
String tmpRegNameSuffix = "tmp";
/**
* The entry point to this class. This function takes a method element and
* processes it, adding instructions to release and retain objects as
* needed. For the command set that it adds, see the InstructionProcessor
* class.
*/
@SuppressWarnings("unchecked")
public void process(Element method) throws DataConversionException, ReferenceCountingException {
Attribute isAbstract = method.getAttribute("isAbstract");
Attribute isNative = method.getAttribute("isNative");
// abstract and native methods do not require processing
if (isAbstract != null && isAbstract.getBooleanValue()) {
return;
}
if (isNative != null && isNative.getBooleanValue()) {
return;
}
Element codeElement = method.getChild("code", dex);
int numReg = codeElement.getAttribute("register-size").getIntValue();
processRecStart(numReg, (List<Element>) codeElement.getChildren(), codeElement);
}
/**
* Set the expected frees that we must do before any optimizations have
* removed them.
*/
private void setWillFree(Map<Element, InstructionActions> beenTo)
throws ReferenceCountingException, DataConversionException {
{
for (Map.Entry<Element, InstructionActions> e : beenTo.entrySet()) {
RegisterSet objectRegs = e.getValue().getObjectRegs();
if (!e.getValue().getConflict().isEmpty()) {
throw new ReferenceCountingException(
"Ambigious register contents possible: Conflict: "
+ e.getValue().getConflict());
}
InstructionUseInfo useInfo = e.getValue().useInfo;
RegisterSet toFree;
if (e.getKey().getName().startsWith("return")) {
// we want to free everything except what this instruction
// uses.
toFree = objectRegs.andNot(useInfo.usedReg());
} else {
// we free any register reference that is overwritten by
// this
// instruction
toFree = objectRegs.and(useInfo.allWrites());
}
useInfo.willFree = toFree;
useInfo.willNull = toFree.clone();
}
}
}
/**
* This is the last step in the release/retain markup process. It processes
* all of the DEX instructions that we have traversed in a method, looking
* at how they have been marked up. Based on how they have been marked up it
* adds required release/retains or other commands to the body of the method
* being processed.
*
* Returns whether this method needs to have a temp register defined.
*/
private boolean processReleaseRetain(Map<Element, InstructionActions> beenTo)
throws ReferenceCountingException, DataConversionException {
boolean needsTmpReg = false;
for (Map.Entry<Element, InstructionActions> e : beenTo.entrySet()) {
if (!e.getValue().getConflict().isEmpty()) {
throw new ReferenceCountingException(
"Ambigious register contents possible: Conflict: "
+ e.getValue().getConflict());
}
InstructionUseInfo useInfo = e.getValue().useInfo;
// if we are writing into an object, we may need to free.
// All objects in registers are held with a reference, so we will
// need to release.
List<Element> toAddBefore = new ArrayList<Element>();
List<Element> toAddAfter = new ArrayList<Element>();
// Release last -- because other wise we can get into odd situations
// where we don't to a required retain before the release.
List<Element> toReleaseLast = new ArrayList<Element>();
RegisterSet toFree;
toFree = useInfo.willFree;
// for the registers we want to free
for (int oneReg : toFree) {
// If we use the object in the instruction as an argument and
// overwrite it, we must be careful to preserve it until after
// the call is done.
// Example of true case
// tmp = f1;
// f1 = func(f1);
// [release tmp];
// Example of false case:
// f1 = func(f1);
// [release f1]
if (!useInfo.usesAsObj().and(useInfo.allWrites()).isEmpty()) {
if (useInfo.freeTmpAfter) {
throw new ReferenceCountingException("Conflict, tmp register used twice.");
}
Element tmpR = new Element(InstructionProcessor.cmd_tmp_equals_r, vm);
tmpR.setAttribute("reg", oneReg + "");
toAddBefore.add(tmpR);
needsTmpReg = true;
Element releaseTmp = new Element(InstructionProcessor.cmd_release, vm);
releaseTmp.setAttribute("reg", tmpRegNameSuffix);
toReleaseLast.add(releaseTmp);
Element nullTmp = new Element(InstructionProcessor.cmd_set_null, vm);
nullTmp.setAttribute("num", tmpRegNameSuffix);
toReleaseLast.add(nullTmp);
} else {
// No need to use tmp
Element release = new Element(InstructionProcessor.cmd_release, vm);
release.setAttribute("reg", oneReg + "");
toAddBefore.add(release);
if (useInfo.willNull.has(oneReg)) {
Element nullTmp = new Element(InstructionProcessor.cmd_set_null, vm);
nullTmp.setAttribute("num", oneReg + "");
toAddBefore.add(nullTmp);
}
}
}
if (useInfo.putRelease != null) {
if (!useInfo.usesAsObj().and(useInfo.allWrites()).isEmpty()) {
needsTmpReg = true;
throw new ReferenceCountingException(
"We do not handle the case where a release is "
+ "made in a x = foo(x) situation because it "
+ " hasn't showed up so far");
} else {
toAddBefore.add(useInfo.putRelease);
}
}
// Add any necessary retains.
for (int oneReg : useInfo.requiresRetain) {
Element retain = new Element(InstructionProcessor.cmd_retain, vm);
retain.setAttribute("reg", oneReg + "");
toAddAfter.add(retain);
}
// This handles the case where xmlvm2objc.xsl has set the temp reg
// to a value because a function call was made, but the result was
// not used by the program.
if (useInfo.freeTmpAfter) {
Element releaseTmp = new Element(InstructionProcessor.cmd_release, vm);
releaseTmp.setAttribute("reg", tmpRegNameSuffix);
toAddAfter.add(releaseTmp);
needsTmpReg = true;
}
toAddAfter.addAll(toReleaseLast);
// At this point toAddBefore and toAddAfter have been filled with
// whatever instructions we need to add before and after this
// specific element. The helper function adds them.
addBeforeAndAfter(e.getKey(), toAddBefore, toAddAfter);
}
return needsTmpReg;
}
/**
* This is here because the jdom XML API is dumb enough that it cannot
* easily find the element before element X, or the element after element X.
*
* This function adds some elements before and after a particular element.
*
* TODO: if we believe prevElement map and nextElement map are correct, then
* we can use them instead to make this run faster.
*/
@SuppressWarnings("unchecked")
void addBeforeAndAfter(Element toAddTo, List<Element> toAddBefore, List<Element> toAddAfter)
throws ReferenceCountingException {
Element parent = toAddTo.getParentElement();
List<Object> con = parent.getContent();
// go through the parents elements looking for this element
for (int x = 0; x < con.size(); x++) {
if (con.get(x).equals(toAddTo)) {
// order here matters so we don't screw up the index for the
// before add.
parent.addContent(x + 1, toAddAfter);
parent.addContent(x, toAddBefore);
return;
}
}
throw new ReferenceCountingException("Impossible");
}
/**
* label id to label element. Used for construction of code paths.
*/
Map<Integer, Element> labels = new HashMap<Integer, Element>();
/**
* What is the next and previous element for a particular element ?
*/
Map<Element, Element> nextElement = new HashMap<Element, Element>();
Map<Element, Element> prevElement = new HashMap<Element, Element>();
/**
* Represents a single run of the reference counter. We have this because we
* currently use a two pass implementation and don't want any interactions
* between the passes.
*
* TODO: We could prevent having to do a whole lot of work in the second
* pass if we care to.
*/
class RunState {
public List<CodePath> allCodePaths = new ArrayList<CodePath>();
/*
* What we label the next code path as
*/
public int codePathId = 0;
/*
* List of all the elements that we have visited in the method.
*/
public Map<Element, InstructionActions> beenTo = new HashMap<Element, InstructionActions>();
/*
* What are the conflicted registers on this run?
*/
public RegisterSet allConflict = RegisterSet.none();
/*
* Used so we don't have to use stack recursion, which apparently causes
* big problems in the JVM.
*/
LinkedList<OneRecusiveCall> callsToDo = new LinkedList<OneRecusiveCall>();
}
/*
* Our current run context. TODO: pass this down the stack instead of having
* it be an instance variable.
*/
RunState curRun;
/**
* This adds any labels it finds to our labels map. It also populates our
* previous and next element hashes.
*/
private void addToNextPrevElement(List<Element> toProcess) throws DataConversionException {
Element prev = null;
for (int k = 0; k < toProcess.size(); k++) {
Element cur = toProcess.get(k);
if (cur.getName().equals("label")) {
labels.put(cur.getAttribute("id").getIntValue(), cur);
}
if (prev != null) {
nextElement.put(prev, cur);
prevElement.put(cur, prev);
}
prev = cur;
}
}
@SuppressWarnings("unchecked")
private void processRecStart(int numReg, List<Element> toProcess, Element codeElement)
throws DataConversionException, ReferenceCountingException {
addToNextPrevElement(toProcess);
for (Element x : toProcess) {
if (x.getName().equals("try-catch")) {
// Try catches are special: we must descend into them to
// mark up their code.
addToNextPrevElement(x.getChild("try", dex).getChildren());
for (Element catchE : (List<Element>) x.getChildren("catch", dex)) {
addToNextPrevElement(catchE.getChildren());
}
}
}
doMarkup(toProcess);
curRun.allConflict = RegisterSet.none();
for (Entry<Element, InstructionActions> x : curRun.beenTo.entrySet()) {
curRun.allConflict.orEq(x.getValue().getConflict());
}
// the method element.
Element parent = toProcess.get(0).getParentElement();
// We found some code paths that end up with a register that has an
// object OR a primitive at a point where we think we need to do a
// object release. This is bad, so we must split the register so that
// the primitive is always separate from the object.
if (!curRun.allConflict.isEmpty()) {
int newRegSize = splitConflictedRegisters(numReg, curRun.allConflict, curRun.beenTo);
parent.getAttribute("register-size").setValue(newRegSize + "");
doMarkup(toProcess);
}
Log.debug("ref", "Conflict is: " + curRun.allConflict);
setWillFree(curRun.beenTo);
// Start going through optimizations before generating change
RefCountOptimization.ReturnValue ret = new RegisterSizeAndNullingOptimization().Process(
curRun.allCodePaths, curRun.beenTo, codeElement);
new DeferredNullingOptimization().Process(curRun.allCodePaths, curRun.beenTo, codeElement);
//TODO fix this optimization
//new ExcessRetainsOptimization().Process(curRun.allCodePaths, curRun.beenTo, codeElement);
toProcess.addAll(0, ret.functionInit);
addExTempReg(toProcess);
clearReleaseRetainOnSyntheticMembers(curRun, codeElement);
// Now we want to follow the paths to find unambiguous ones so that we
// can determine
// where to do release/retain to prevent ambiguity.
// we do this by tracking which branch we are on by explicitly
// constructing paths through the code during
// our normal traversal.
boolean usesTemp = processReleaseRetain(curRun.beenTo);
if (usesTemp) {
Element setupTmp = new Element(InstructionProcessor.cmd_define_register,
InstructionProcessor.vm);
setupTmp.setAttribute("vartype", InstructionProcessor.cmd_define_register_attr_temp);
toProcess.add(0, setupTmp);
}
}
/*
* Synthetics help create cycles so we don't do releases or retains on them.
*/
@SuppressWarnings("unchecked")
private void clearReleaseRetainOnSyntheticMembers(RunState curRun,
Element codeElement) throws DataConversionException {
// Find the synthetic members of the class;
Element classElement = codeElement.getParentElement()
.getParentElement();
HashSet<String> hashSet = new HashSet<String>();
for (Element elem : (List<Element>) classElement.getChildren()) {
if (elem.getName().equals("field")
&& elem.getAttribute("isSynthetic") != null
&& elem.getAttributeValue("isSynthetic").equals("true")) {
hashSet.add(elem.getAttributeValue("name"));
}
}
for (Map.Entry<Element, InstructionActions> e : curRun.beenTo
.entrySet()) {
String instructionElementName = e.getKey().getName();
if ((instructionElementName.equals("iput-object") || instructionElementName
.equals("iput"))
&& e.getKey().getAttribute("member-name") != null
&& hashSet.contains(e.getKey().getAttributeValue(
"member-name"))) {
InstructionUseInfo useInfo = e.getValue().useInfo;
// We don't want to release what was in there because it was not
// retained
useInfo.putRelease = null;
useInfo.requiresRetain = RegisterSet.none();
}
}
}
/**
* Adds definition for exception register if needed.
*/
private void addExTempReg(List<Element> toProcess) {
boolean useEx = false;
boolean useTmp = false;
for (Element e : curRun.beenTo.keySet()) {
if (e.getName().equals("throw") || e.getName().equals("try-catch")) {
useEx = true;
}
if (useEx && useTmp) {
break; // early quit
}
}
if (useEx) {
Element setupEx = new Element(InstructionProcessor.cmd_define_register,
InstructionProcessor.vm);
setupEx
.setAttribute("vartype",
InstructionProcessor.cmd_define_register_attr_exception);
toProcess.add(0, setupEx);
}
for (Element e : curRun.beenTo.keySet()) {
if (e.getName().startsWith("return")) {
e.setAttribute("catchesException", useEx + "");
}
}
}
/**
* Determines conflicts and retain/release for the method.
*/
private void doMarkup(List<Element> toProcess) throws DataConversionException {
// create a new run of the processor, prime the recursion, and then
// run it until its complete.
curRun = new RunState();
processRecAdd(RegisterSet.none(), RegisterSet.none(), toProcess.get(0),
createNewCodePath(null));
processWhileCallsToDo();
// Debug print for state at this stage.
printInstSeq(toProcess);
}
/*
* Purely for debug, shows the instructions as well as our what we have
* calculated about them.
*/
@SuppressWarnings("unchecked")
private void printInstSeq(List<Element> toProcess) {
Log.debug("ref", "All " + toProcess.size() + " instructions been to "
+ curRun.beenTo.size());
for (Element x : toProcess) {
if (curRun.beenTo.containsKey(x)) {
String startStr = curRun.beenTo.get(x).useInfo + "";
if (x.getName().equals("label")) {
Log.debug("ref", startStr + " ID = " + x.getAttributeValue("id"));
} else {
Log.debug("ref", startStr + "");
}
if (x.getName().equals("try-catch")) {
printInstSeq(x.getChild("try", dex).getChildren());
}
}
}
}
/**
* In certain cases, DEX will create a code path where we think we need to
* do a release of an object on a particular register which may or may not
* hold an object depending on the particular path through the code taken at
* runtime. There are several ways to approach this issue, the most simple
* is to split a conflicted register into two new registers. Conceptually,
* this is done by defining a function that maps RX to RY or RZ depending on
* whether RX is known to hold an object or a primitive.
*
* The following code implements this mapping, with the slight optimization
* that instead of mapping RX to RY and RZ, it maps it to RX and RY. This is
* because it keeps the sequence of registers intact with no holes, and
* because it allows us to deal with function parameters more easily.
*
* We return the total number of registers required for this method.
*/
int splitConflictedRegisters(int numReg, RegisterSet allConflict,
Map<Element, InstructionActions> beenTo) throws DataConversionException,
ReferenceCountingException {
for (int reg : allConflict) {
int newReg = numReg++;
// When dealing with a passed parameter that has a conflict, we want
// to make sure to not change the register that the parameter is
// originally inserted into.
int regObj = reg;
int regNonObj = newReg;
for (Element varE : beenTo.keySet()) {
if (varE.getName().equals("var")) {
InstructionUseInfo varUi = this.curRun.beenTo.get(varE).useInfo;
if (varUi.isWrite) {
if (!varUi.writesObj().isEmpty()) {
regObj = reg;
regNonObj = newReg;
break;
} else if (!varUi.writesNonObj().isEmpty()) {
regObj = newReg;
regNonObj = reg;
} else {
throw new ReferenceCountingException("impossible");
}
}
}
}
Log.debug("ref", reg + " -> o:" + regObj + ":" + regNonObj);
// Go through all the instructions in the method, replacing any
// that use the conflicted value with the new register or the old
// register depending on whether the instruction expects the
// register to contain an object or a primitive.
for (Map.Entry<Element, InstructionActions> beenToKv : beenTo.entrySet()) {
InstructionUseInfo ui = beenToKv.getValue().useInfo;
for (Map.Entry<Attribute, Boolean> kv : ui.typeIsObj.entrySet()) {
if (kv.getKey().getIntValue() == reg) {
if (kv.getValue()) {
// its an object
kv.getKey().setValue(regObj + "");
} else {
kv.getKey().setValue(regNonObj + "");
}
}
}
}
}
return numReg;
}
/**
* Given a parent code path, create a child.
*/
private CodePath createNewCodePath(CodePath curPath) {
CodePath c;
c = new CodePath(curRun.codePathId++, curPath);
curRun.allCodePaths.add(c);
if (curPath != null) {
curPath.subPaths.add(c);
}
return c;
}
/**
* Class representing collected parameters for one execution of the body of
* ProcessWhileCallsToDo
*/
class OneRecusiveCall {
RegisterSet regHoldingObject;
RegisterSet regNotHoldingObject;
Element currentElement;
CodePath codePath;
}
/**
* Helper to add to the list of recursive calls to do.
*/
private void processRecAdd(RegisterSet regHoldingObject, RegisterSet regNotHoldingObject,
Element currentElement, CodePath codePath) throws DataConversionException {
OneRecusiveCall oneCall = new OneRecusiveCall();
oneCall.regHoldingObject = regHoldingObject;
oneCall.regNotHoldingObject = regNotHoldingObject;
oneCall.currentElement = currentElement;
oneCall.codePath = codePath;
this.curRun.callsToDo.add(oneCall);
}
/**
* This function creates a representation of the different execution paths
* through the method. At the same time, it gathers information on how
* particular instructions are making use of registers. This is an
* implementation of a recursive function, however when implemented as a
* directly recursive function (without the calls to do) the JVM blows up
* for lack of stack space. Because modifying stack space available to a
* thread in the JVM (even if you create a new thread) is a pain, we just
* switched to using a heap list for the recursive stack.
*
* In most cases this is *not* tail recursion, so don't try and make a loop
* out of it.
*/
@SuppressWarnings("unchecked")
private void processWhileCallsToDo() throws DataConversionException {
int maxSize = 0;
while (this.curRun.callsToDo.size() != 0) {
maxSize = Math.max(maxSize, this.curRun.callsToDo.size());
OneRecusiveCall thisTime = this.curRun.callsToDo.removeFirst();
// Arguments to the recursive function.
RegisterSet regHoldingObject = thisTime.regHoldingObject;
RegisterSet regNotHoldingObject = thisTime.regNotHoldingObject;
Element currentElement = thisTime.currentElement;
CodePath codePath = thisTime.codePath;
if (currentElement == null) {
continue; // base case
}
InstructionActions actions = beenHereBefore(this.curRun.beenTo, regHoldingObject,
regNotHoldingObject, currentElement, codePath);
if (actions == null) {
continue; // base case
}
InstructionUseInfo useInfo = actions.useInfo;
Element nextInstruction;
if (currentElement.getName().startsWith("goto")) {
nextInstruction = labels.get(currentElement.getAttribute("target").getIntValue());
} else {
nextInstruction = nextElement.get(currentElement);
if (nextInstruction == null
&& currentElement.getParentElement().getName().equals("try")) {
// Exited the try, move to the element after the
// try terminates.
nextInstruction = nextElement.get(currentElement.getParentElement()
.getParentElement());
}
}
// the ones we came in with
RegisterSet ourObjUse = regHoldingObject.clone();
// plus the ones that we write obj to
ourObjUse.orEq(useInfo.writesObj());
// minus the ones we write non obj into
ourObjUse.andEqNot(useInfo.writesNonObj());
RegisterSet ourNonObjUse = regNotHoldingObject.clone();
ourNonObjUse.orEq(useInfo.writesNonObj());
ourNonObjUse.andEqNot(useInfo.writesObj());
if (currentElement.getName().startsWith("return")) {
continue;
}
if (currentElement.getName().equals("try-catch")) {
processRecAdd(ourObjUse, ourNonObjUse, (Element) currentElement
.getChild("try", dex).getChildren().get(0), createNewCodePath(codePath));
for (Element caught : (List<Element>) currentElement.getChildren("catch", dex)) {
Element nextInst = labels.get(caught.getAttribute("target").getIntValue());
processRecAdd(ourObjUse, ourNonObjUse, nextInst, createNewCodePath(codePath));
}
} else if (currentElement.getName().equals("packed-switch")
|| currentElement.getName().equals("sparse-switch")) {
processRecAdd(ourObjUse, ourNonObjUse, nextInstruction, createNewCodePath(codePath));
for (Element target : (List<Element>) currentElement.getChildren("case", dex)) {
processRecAdd(ourObjUse, ourNonObjUse, labels.get(target.getAttribute("label")
.getIntValue()), createNewCodePath(codePath));
}
} else if (currentElement.getName().startsWith("if")) {
processRecAdd(ourObjUse, ourNonObjUse, nextInstruction, createNewCodePath(codePath));
processRecAdd(ourObjUse, ourNonObjUse, labels.get(currentElement.getAttribute(
"target").getIntValue()), createNewCodePath(codePath));
} else if (currentElement.getName().equals("label")) {
// It will be useful in the future to have labels treated as
// creating a new code path.
processRecAdd(ourObjUse, ourNonObjUse, nextInstruction, createNewCodePath(codePath));
} else {
// straight line code.
processRecAdd(ourObjUse, ourNonObjUse, nextInstruction, codePath);
}
}
Log.debug("ref", "Max recusrive depth " + maxSize);
}
/**
* This thing is used to determine whether or not our recursion keeps going
* It terminates the recursion if we have been to this instruction with the
* exact same state before. We return information collected about the
* current instruction to the caller.
*/
private static InstructionActions beenHereBefore(Map<Element, InstructionActions> beenTo,
RegisterSet regHoldingObject, RegisterSet regNotHoldingObject, Element currentElement,
CodePath c) throws DataConversionException {
InstructionActions toRet;
if (beenTo.containsKey(currentElement)) {
// Visited here on another code branch
toRet = beenTo.get(currentElement);
} else {
// Haven't been here yet.
toRet = new InstructionActions();
toRet.useInfo = processElement(currentElement);
beenTo.put(currentElement, toRet);
}
// Labels are not code, and thus do not belong in code paths.
if (!currentElement.getName().equals("label")) {
c.path.add(new OnePathInstructionRegisterContents(currentElement, regHoldingObject,
regNotHoldingObject));
}
boolean enteredNotHolding = false;
// figure out if we have been here before with the same
// enteredNotHolding state
for (RegisterSet m : toRet.enteredNot) {
if (m.equals(regNotHoldingObject)) {
enteredNotHolding = true;
break;
}
}
boolean enteredHolding = false;
// figure out if we have been here before with the same enteredHolding
// state.
for (RegisterSet m : toRet.enteredHoldingObj) {
if (m.equals(regHoldingObject)) {
enteredHolding = true;
break;
}
}
if (enteredNotHolding && enteredHolding) {
// We were here before with the exact same state: time to terminate
// the search along this path.
return null;
}
// Add info about the state we were in when we got to here along this
// code path.
if (!enteredHolding) {
toRet.enteredHoldingObj.add(regHoldingObject);
}
if (!enteredNotHolding) {
toRet.enteredNot.add(regNotHoldingObject);
}
return toRet;
}
/**
* This function creates a InstructionUseInfo based on the current element
* TODO: if anyone really cares this can be made faster by not using
* reflection.
*/
private static InstructionUseInfo processElement(Element element)
throws DataConversionException {
InstructionUseInfo use = new InstructionUseInfo(element);
// If we find the instruction using the generic handler, return
// immediately.
if (InstructionProcessor.processGeneric(element, use)) {
return use;
} else {
// Otherwise, we need to hit the correct processor function:
String todo = "process_" + element.getName().replace("-", "_");
Method method;
try {
method = InstructionProcessor.class.getMethod(todo, Element.class,
InstructionUseInfo.class);
method.invoke(null, element, use);
} catch (Exception ex) {
throw new DataConversionException(ex.getMessage(), "When attempting to: " + todo);
}
}
return use;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
d7263af7adadd2b9bbf6d63a0b11451821b6fee4 | 5b5ba0d3ceaab05dbeeb16aa4d0a785214441019 | /model/src/main/java/com/wat/model/dto/DeleteDoctorSurgeryDTO.java | 5da1b9eec08d9f0d4772b98c5a11168ea5c92f4b | [] | no_license | Lucas4088/zpm | b75bb3c65dc8afa595935bf9a895f8af3afd9335 | 6b48868d6a39703773df0fed89f86a8bda2fe712 | refs/heads/master | 2020-04-19T12:56:35.955362 | 2019-01-29T18:24:38 | 2019-01-29T18:24:38 | 168,204,995 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 275 | java | package com.wat.model.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DeleteDoctorSurgeryDTO {
Integer doctorId;
Integer surgeryId;
Integer medicalCentreId;
}
| [
"salamonikp@wp.pl"
] | salamonikp@wp.pl |
7a28f4e6b5d24eef6901fb227e4acf981fcc6e0a | 871474c49d50461ddefbfe4236982eef6f24d7ad | /server/chat/chat-service/src/main/java/com/nodecollege/cloud/service/GroupService.java | 341c42aa1a2a3797e0decb85b5f2e4d7281b5992 | [
"Apache-2.0"
] | permissive | MartyZaneOS/nodecollege-upms | 636ce46099c74d8150cf3de7e01c96fb8f3ca644 | f7c831fb362622285ae831829cc1826cc4037e60 | refs/heads/master | 2023-03-03T00:58:48.594978 | 2021-02-09T08:44:51 | 2021-02-09T08:44:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,394 | java | package com.nodecollege.cloud.service;
import com.nodecollege.cloud.common.model.QueryVO;
import com.nodecollege.cloud.common.model.po.ChatGroup;
import com.nodecollege.cloud.common.model.po.ChatGroupUser;
import com.nodecollege.cloud.common.model.vo.AddGroupVO;
import java.util.List;
/**
* @author LC
* @date 2020/2/22 18:34
*/
public interface GroupService {
/**
* 查询群组信息
*
* @param queryVO
* @return
*/
List<ChatGroupUser> getGroupList(QueryVO<ChatGroupUser> queryVO);
/**
* 添加群组
*
* @param addGroupVO
*/
ChatGroup addGroup(AddGroupVO addGroupVO);
/**
* 添加租户群
*
* @param addGroupVO
* @return
*/
ChatGroup addTenantGroup(AddGroupVO addGroupVO);
/**
* 添加辩论群
*
* @param addGroupVO
* @return
*/
ChatGroup addDebateGroup(AddGroupVO addGroupVO);
/**
* 修改群组
*
* @param groupUser
*/
ChatGroup updateGroup(ChatGroupUser groupUser);
/**
* 删除群组
*
* @param groupUser
*/
void delGroup(ChatGroupUser groupUser);
/**
* 根据群id获取群信息
* @param groupId
* @return
*/
ChatGroup getChatGroupById(Long groupId);
/**
* 清除群组缓存
* @param groupId
*/
void clearGroupCache(Long groupId);
}
| [
"1131435616@qq.com"
] | 1131435616@qq.com |
92759324a68e40cc9fb6033b5ae8d82cb541afc6 | c9c9e225b1108cc1136ef8f1d06b5e3af2054cb6 | /src/desafio5ques2/Desafio5ques2.java | 6c2749d69f7c5f25fc9819059c38d169b92dc208 | [] | no_license | MarcusDsilva/desafio5ques2 | aac820b8086b98b3f3efc9120853386315db0033 | aacf29b5a440868c6cc8fccb0574854d87f02e78 | refs/heads/master | 2022-11-12T05:43:16.454815 | 2020-07-06T15:32:08 | 2020-07-06T15:32:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 884 | 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 desafio5ques2;
import java.util.Scanner;
import javax.swing.JOptionPane;
/**
*
* @author Admin
*/
public class Desafio5ques2 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int numero, acusimanum;
Scanner teclado = new Scanner (System.in);
numero = 1; acusimanum =0;
while(numero != 0){
numero = Integer.parseInt(JOptionPane.
showInputDialog("Informe um numero ou zero para sair:"));
acusimanum = acusimanum +numero;
}
JOptionPane.showMessageDialog(null, "A soma de todos os valores digitados é:"+acusimanum);
}
}
| [
"Admin@10.0.0.104"
] | Admin@10.0.0.104 |
8255fdd15ea3a34a3b256ba5c674b4ddf75b5f4f | 685aa5b24568c847b90211fa67f17a6612b93fa2 | /activiti-rest/src/main/java/org/activiti/rest/service/api/runtime/process/BaseProcessInstanceResource.java | 4bb9de7d1c2e8241c03499b86d4ee375f47e29a1 | [
"Apache-2.0"
] | permissive | ShirishKulkarni/activiti-compatibility | d8cc27a6a0e6f18798e1be55e5cf7ca00b27641e | 72faad7a631d3c5a6cb7cd8180251b2abdb43462 | refs/heads/master | 2020-08-10T07:37:54.290845 | 2017-09-29T17:21:41 | 2017-09-29T17:21:41 | 214,295,470 | 0 | 0 | Apache-2.0 | 2019-10-10T22:17:48 | 2019-10-10T22:17:47 | null | UTF-8 | Java | false | false | 7,977 | java | /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.activiti.rest.service.api.runtime.process;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.activiti.engine.ActivitiIllegalArgumentException;
import org.activiti.engine.ActivitiObjectNotFoundException;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.impl.ProcessInstanceQueryProperty;
import org.activiti.engine.query.QueryProperty;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.runtime.ProcessInstanceQuery;
import org.activiti.rest.common.api.DataResponse;
import org.activiti.rest.service.api.RestResponseFactory;
import org.activiti.rest.service.api.engine.variable.QueryVariable;
import org.activiti.rest.service.api.engine.variable.QueryVariable.QueryVariableOperation;
import org.springframework.beans.factory.annotation.Autowired;
/**
*/
public class BaseProcessInstanceResource {
private static Map<String, QueryProperty> allowedSortProperties = new HashMap<String, QueryProperty>();
static {
allowedSortProperties.put("processDefinitionId", ProcessInstanceQueryProperty.PROCESS_DEFINITION_ID);
allowedSortProperties.put("processDefinitionKey", ProcessInstanceQueryProperty.PROCESS_DEFINITION_KEY);
allowedSortProperties.put("id", ProcessInstanceQueryProperty.PROCESS_INSTANCE_ID);
allowedSortProperties.put("tenantId", ProcessInstanceQueryProperty.TENANT_ID);
}
@Autowired
protected RestResponseFactory restResponseFactory;
@Autowired
protected RuntimeService runtimeService;
protected DataResponse getQueryResponse(ProcessInstanceQueryRequest queryRequest, Map<String, String> requestParams) {
ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery();
// Populate query based on request
if (queryRequest.getProcessInstanceId() != null) {
query.processInstanceId(queryRequest.getProcessInstanceId());
}
if (queryRequest.getProcessDefinitionKey() != null) {
query.processDefinitionKey(queryRequest.getProcessDefinitionKey());
}
if (queryRequest.getProcessDefinitionId() != null) {
query.processDefinitionId(queryRequest.getProcessDefinitionId());
}
if (queryRequest.getProcessBusinessKey() != null) {
query.processInstanceBusinessKey(queryRequest.getProcessBusinessKey());
}
if (queryRequest.getInvolvedUser() != null) {
query.involvedUser(queryRequest.getInvolvedUser());
}
if (queryRequest.getSuspended() != null) {
if (queryRequest.getSuspended()) {
query.suspended();
} else {
query.active();
}
}
if (queryRequest.getSubProcessInstanceId() != null) {
query.subProcessInstanceId(queryRequest.getSubProcessInstanceId());
}
if (queryRequest.getSuperProcessInstanceId() != null) {
query.superProcessInstanceId(queryRequest.getSuperProcessInstanceId());
}
if (queryRequest.getExcludeSubprocesses() != null) {
query.excludeSubprocesses(queryRequest.getExcludeSubprocesses());
}
if (queryRequest.getIncludeProcessVariables() != null) {
if (queryRequest.getIncludeProcessVariables()) {
query.includeProcessVariables();
}
}
if (queryRequest.getVariables() != null) {
addVariables(query, queryRequest.getVariables());
}
if (queryRequest.getTenantId() != null) {
query.processInstanceTenantId(queryRequest.getTenantId());
}
if (queryRequest.getTenantIdLike() != null) {
query.processInstanceTenantIdLike(queryRequest.getTenantIdLike());
}
if (Boolean.TRUE.equals(queryRequest.getWithoutTenantId())) {
query.processInstanceWithoutTenantId();
}
return new ProcessInstancePaginateList(restResponseFactory).paginateList(requestParams, queryRequest, query, "id", allowedSortProperties);
}
protected void addVariables(ProcessInstanceQuery processInstanceQuery, List<QueryVariable> variables) {
for (QueryVariable variable : variables) {
if (variable.getVariableOperation() == null) {
throw new ActivitiIllegalArgumentException("Variable operation is missing for variable: " + variable.getName());
}
if (variable.getValue() == null) {
throw new ActivitiIllegalArgumentException("Variable value is missing for variable: " + variable.getName());
}
boolean nameLess = variable.getName() == null;
Object actualValue = restResponseFactory.getVariableValue(variable);
// A value-only query is only possible using equals-operator
if (nameLess && variable.getVariableOperation() != QueryVariableOperation.EQUALS) {
throw new ActivitiIllegalArgumentException("Value-only query (without a variable-name) is only supported when using 'equals' operation.");
}
switch (variable.getVariableOperation()) {
case EQUALS:
if (nameLess) {
processInstanceQuery.variableValueEquals(actualValue);
} else {
processInstanceQuery.variableValueEquals(variable.getName(), actualValue);
}
break;
case EQUALS_IGNORE_CASE:
if (actualValue instanceof String) {
processInstanceQuery.variableValueEqualsIgnoreCase(variable.getName(), (String) actualValue);
} else {
throw new ActivitiIllegalArgumentException("Only string variable values are supported when ignoring casing, but was: " + actualValue.getClass().getName());
}
break;
case NOT_EQUALS:
processInstanceQuery.variableValueNotEquals(variable.getName(), actualValue);
break;
case NOT_EQUALS_IGNORE_CASE:
if (actualValue instanceof String) {
processInstanceQuery.variableValueNotEqualsIgnoreCase(variable.getName(), (String) actualValue);
} else {
throw new ActivitiIllegalArgumentException("Only string variable values are supported when ignoring casing, but was: " + actualValue.getClass().getName());
}
break;
case LIKE:
if (actualValue instanceof String) {
processInstanceQuery.variableValueLike(variable.getName(), (String) actualValue);
} else {
throw new ActivitiIllegalArgumentException("Only string variable values are supported for like, but was: " + actualValue.getClass().getName());
}
break;
case GREATER_THAN:
processInstanceQuery.variableValueGreaterThan(variable.getName(), actualValue);
break;
case GREATER_THAN_OR_EQUALS:
processInstanceQuery.variableValueGreaterThanOrEqual(variable.getName(), actualValue);
break;
case LESS_THAN:
processInstanceQuery.variableValueLessThan(variable.getName(), actualValue);
break;
case LESS_THAN_OR_EQUALS:
processInstanceQuery.variableValueLessThanOrEqual(variable.getName(), actualValue);
break;
default:
throw new ActivitiIllegalArgumentException("Unsupported variable query operation: " + variable.getVariableOperation());
}
}
}
protected ProcessInstance getProcessInstanceFromRequest(String processInstanceId) {
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
if (processInstance == null) {
throw new ActivitiObjectNotFoundException("Could not find a process instance with id '" + processInstanceId + "'.");
}
return processInstance;
}
}
| [
"elias.demedeiros@alfresco.com"
] | elias.demedeiros@alfresco.com |
4eb5efeb7f546ad2dd332104baeac41d409a6193 | 9568d41a03876fb9f3f3d8862b57061877feede6 | /src/java_20190725/step3/StopNanoWatch.java | 343c343e8dffca9678bb622391b675d91746cbe2 | [] | no_license | ksh8194/Java_Fundamental | e1414ec9dffdd5d6a74b9cc67e0482686bd51f27 | 6d075998cc048fd7db1faf50fb94c651d0afa97e | refs/heads/master | 2020-06-21T17:48:53.935783 | 2019-08-14T08:41:26 | 2019-08-14T08:41:26 | 197,150,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 337 | java | package java_20190725.step3;
public class StopNanoWatch {
long startTime;
long endTime;
public void start() {
startTime = System.nanoTime();
}
public void stop() {
endTime = System.nanoTime();
}
public double getElapsedTime() {
return (double) (endTime - startTime) / (double) 1000000000;
}
}
| [
"story3388@naver.com"
] | story3388@naver.com |
6ff3a8c81e87babf080cbf654aa368b21d70560c | d9fa42e94bccd7f1066af9bff3bf7cca7e9eaebc | /src/Kattio.java | a72d586674db0d826c3891c6c61d1b03e0cfaaba | [] | no_license | JStonevalley/avalg14_proj2 | 26d515617e9fefefa49e30f763fabc6a6dfbdd46 | 68e5a3547f72fb71b037a9c1a64d8ab17d0614e0 | refs/heads/master | 2020-05-20T11:10:48.285525 | 2014-12-07T10:53:30 | 2014-12-07T10:53:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,070 | java | /** Simple yet moderately fast I/O routines.
*
* Example usage:
*
* Kattio io = new Kattio(System.in, System.out);
*
* while (io.hasMoreTokens()) {
* int n = io.getInt();
* double d = io.getDouble();
* double ans = d*n;
*
* io.println("Answer: " + ans);
* }
*
* io.close();
*
*
* Some notes:
*
* - When done, you should always do io.close() or io.flush() on the
* Kattio-instance, otherwise, you may lose output.
*
* - The getInt(), getDouble(), and getLong() methods will throw an
* exception if there is no more data in the input, so it is generally
* a good idea to use hasMoreTokens() to check for end-of-file.
*
* @author: Kattis
*/
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.OutputStream;
public class Kattio extends PrintWriter {
public Kattio(InputStream i) {
super(new BufferedOutputStream(System.out));
r = new BufferedReader(new InputStreamReader(i));
}
public Kattio(InputStream i, OutputStream o) {
super(new BufferedOutputStream(o));
r = new BufferedReader(new InputStreamReader(i));
}
public boolean hasMoreTokens() {
return peekToken() != null;
}
public int getInt() {
return Integer.parseInt(nextToken());
}
public double getDouble() {
return Double.parseDouble(nextToken());
}
public long getLong() {
return Long.parseLong(nextToken());
}
public String getWord() {
return nextToken();
}
private BufferedReader r;
private String line;
private StringTokenizer st;
private String token;
private String peekToken() {
if (token == null)
try {
while (st == null || !st.hasMoreTokens()) {
line = r.readLine();
if (line == null) return null;
st = new StringTokenizer(line);
}
token = st.nextToken();
} catch (IOException e) { }
return token;
}
private String nextToken() {
String ans = peekToken();
token = null;
return ans;
}
} | [
"johan.arnor@gmail.com"
] | johan.arnor@gmail.com |
5cf537db00f83562ae882a36ae45febc045b3869 | 6645e931c6b28cf03984d4e88aa6c4526e8bf8a5 | /Chapter4/src/chapter4/Chapter4.java | d8ac0e4f0e00c6bb39868409571f0481917d837d | [] | no_license | Yongzhen/Cracking_the_Coding_Interview_Unofficial_Solution | 314fd2e9c7944fdc64d9dd65e747176d696d5e01 | db39970689d1c6b09feac03d6fc7e31853b1834c | refs/heads/master | 2020-04-05T23:02:12.219599 | 2015-03-15T21:44:40 | 2015-03-15T21:44:40 | 29,480,464 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,919 | java | package chapter4;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Chapter4 {
public static void main(String[] args) {
testCheckBinarySearchTree();
testProblem1();
testProblem3();
testProblem4();
testProblem5();
testProblem6();
testProblem7();
testProblem8();
}
private static void testCheckBinarySearchTree() {
System.out.println("\n\nTest Check Binary Search Tree:\n");
Tree root = generateTestTree();;
printTree(root);
System.out.println("Check BST: " + Tree.checkBST(root));
root.left.right.addRight(9);
printTree(root);
System.out.println("Check BST: " + Tree.checkBST(root));
}
private static void testProblem1() {
System.out.println("\n\nProblem1 test:\n");
Tree root = generateTestTree();;
printTree(root);
System.out.println("Check balanced: " + root.checkBalance());
root.right.right.right.addRight(22);
printTree(root);
System.out.println("Check balanced: " + root.checkBalance());
}
private static void testProblem3() {
System.out.println("\n\nProblem3 test:\n");
int[] sortedArray = {1, 2, 3, 4, 5, 6};
int[] sortedArray2 = {1, 2, 3, 4, 5, 6, 7};
printTree(Tree.BSTreeFromSortedArray(sortedArray));
printTree(Tree.BSTreeFromSortedArray(sortedArray2));
}
private static void testProblem4() {
System.out.println("\n\nProblem4 test:\n");
int[] sortedArray = {1, 2, 3, 4, 5, 6, 7};
Tree root = Tree.BSTreeFromSortedArray(sortedArray);
printTree(root);
ArrayList<Node> linkedLists = Tree.linkedListsPerDepth(root);
for(Node node : linkedLists) {
printNodeLinkedList(node);
}
}
private static void testProblem5() {
System.out.println("\n\nProblem5 test:\n");
Tree root = generateTestTree();;
printTree(root);
System.out.println("Find Successer of " + root.data + " : " + Tree.findSuccessor(root).data);
System.out.println("Find Successer of " + root.right.data + " : " + Tree.findSuccessor(root.right).data);
System.out.println("Find Successer of " + root.left.right.data + " : " + Tree.findSuccessor(root.left.right).data);
}
private static void testProblem6() {
System.out.println("\n\nProblem6 test:\n");
Tree root = generateTestTree();;
printTree(root);
System.out.println("First Commen Ancestor of 0 and 3 : " + Tree.findFirstCommenAncestor(root.left.left, root.left.right.left).data);
System.out.println("First Commen Ancestor of 7 and 20 : " + Tree.findFirstCommenAncestor(root.right.left, root.right.right.right).data);
System.out.println("First Commen Ancestor of 5 and 20 : " + Tree.findFirstCommenAncestor(root, root.right.right.right).data);
}
private static void testProblem7() {
System.out.println("\n\nProblem7 test:\n");
Tree root = generateTestTree();;
System.out.println("Main Tree:");
printTree(root);
Tree testSubTree1 = new Tree(5);
testSubTree1.addRight(10);
testSubTree1.right.addLeft(7);
System.out.println("\nTest subTree1:");
printTree(testSubTree1);
System.out.println("Result: " + Tree.checkContaining(root, testSubTree1));
testSubTree1.addLeft(2);
testSubTree1.left.addLeft(1);
System.out.println("\nTest subTree2:");
printTree(testSubTree1);
System.out.println("Result: " + Tree.checkContaining(root, testSubTree1));
Tree testSubTree2 = new Tree(15);
testSubTree2.addRight(20);
System.out.println("\nTest subTree3:");
printTree(testSubTree2);
System.out.println("Result: " + Tree.checkContaining(root, testSubTree2));
}
private static void testProblem8() {
System.out.println("\n\nProblem7 test:\n");
Tree root = new Tree(1);
root.addLeft(-1);
root.addRight(0);
root.left.addLeft(1);
root.left.addRight(2);
root.left.right.addRight(-1);
root.right.addLeft(0);
root.right.addRight(10);
root.right.right.addRight(-1);
System.out.println("Test Tree:");
printTree(root);
System.out.println("Find all paths sum to 1");
Tree.printPathsEqualToSum(root, 1);
}
private static Tree generateTestTree() {
Tree root = new Tree(5);
root.addLeft(2);
root.addRight(10);
Tree left = root.left;
Tree right = root.right;
left.addLeft(0);
left.addRight(4);
left.right.addLeft(3);
right.addLeft(7);
right.addRight(15);
right.right.addRight(20);
return root;
}
public static void printTree(Tree root) {
printTreeInternal(Collections.singletonList(root), 1, root.getHeight() + 1);
}
//Reference: http://stackoverflow.com/questions/4965335/how-to-print-binary-tree-diagram
private static void printTreeInternal(List<Tree> nodes, int level, int maxLevel) {
if(nodes.isEmpty() || isAllElementsNull(nodes)) {
return;
}
int floor = maxLevel - level;
int endgeLines = (int) Math.pow(2, (Math.max(floor - 1, 0)));
int firstSpaces = (int) Math.pow(2, (floor)) - 1;
int betweenSpaces = (int) Math.pow(2, (floor + 1)) - 1;
printWhitespaces(firstSpaces);
List<Tree> newNodes = new ArrayList<Tree>();
for(Tree node : nodes) {
if(node != null) {
System.out.print(node.data);
newNodes.add(node.left);
newNodes.add(node.right);
} else {
System.out.print(" ");
newNodes.add(null);
newNodes.add(null);
}
printWhitespaces(betweenSpaces);
}
System.out.println();
for(int i = 1; i <= endgeLines; i++) {
for(int j = 0; j < nodes.size(); j++) {
printWhitespaces(firstSpaces - i);
if (nodes.get(j) == null) {
printWhitespaces(endgeLines + endgeLines + i + 1);
continue;
}
if (nodes.get(j).left != null) {
System.out.print("/");
} else {
printWhitespaces(1);
}
printWhitespaces(i + i - 1);
if (nodes.get(j).right != null) {
System.out.print("\\");
} else {
printWhitespaces(1);
}
printWhitespaces(endgeLines + endgeLines - i);
}
System.out.println();
}
printTreeInternal(newNodes, level + 1, maxLevel);
}
private static boolean isAllElementsNull(List<Tree> list) {
for (Tree node : list) {
if (node != null)
return false;
}
return true;
}
public static void printWhitespaces(int count) {
for (int i = 0; i < count; i++)
System.out.print(" ");
}
public static void printNodeLinkedList(Node head) {
if(head != null) {
System.out.print(head.data);
Node currentNode = head;
while(currentNode.next != null) {
currentNode = currentNode.next;
System.out.print("--->" + currentNode.data);
}
System.out.println();
}
}
}
| [
"yqiu19@hawk.iit.edu"
] | yqiu19@hawk.iit.edu |
55aef194df21e9d4cfe8a94f888730df962c9cbb | f6e001e58168f47ed24efbb14a45eb5a5c96aa5c | /coreLib/src/main/java/com/android_mobile/core/ui/listener/IMediaPicturesListener.java | 5ece8293e21ac5f409b7394fe0270d924012f51b | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | ieewbbwe/FastApp | b6d1fb234da6bacf630bc0a6afd3a01a8421d7d3 | 2eeaf3a73e01c637ca4b5f69dd201e1fdf6c25c8 | refs/heads/master | 2021-01-19T10:05:34.747296 | 2019-05-05T08:20:25 | 2019-05-05T08:20:25 | 82,166,739 | 7 | 1 | null | null | null | null | UTF-8 | Java | false | false | 140 | java | package com.android_mobile.core.ui.listener;
public interface IMediaPicturesListener {
public void mediaPicturePath(String imagePath);
}
| [
"634666275@qq.com"
] | 634666275@qq.com |
7e19847692cd5ee6785af889d768367576156051 | 4f8181a1adbae5dae60d9b1c845d759255af2234 | /src/prob4/Sparrow.java | baa5afe92012dca4ffdd77d0b4bf5896183c82a2 | [] | no_license | LeeJeun/java-practice05 | 23e2e454da97cf04c624da24b0ed85cda8b93424 | 94ba10c6d31969400289d243e5bb316fc2ad8994 | refs/heads/master | 2020-07-03T10:04:29.809829 | 2019-09-11T06:29:41 | 2019-09-11T06:29:41 | 201,874,157 | 0 | 0 | null | 2019-08-12T06:50:14 | 2019-08-12T06:50:13 | null | UTF-8 | Java | false | false | 131 | java | package prob4;
public class Sparrow implements Soundable{
@Override
public String sound() {
return "짹짹";
}
}
| [
"bit@DESKTOP-0JMIVLH"
] | bit@DESKTOP-0JMIVLH |
b5863a557e16f42dfc50f1aaac0ce8afcf43bdb4 | 8e3ae23df3d02da3b9bb68f1f590fbd43dd2f6e2 | /app/src/main/java/com/example/finalprojectpro/ProfileFragment.java | 0a04cff7cbfb93421738a514a3e73a5aceb08e02 | [] | no_license | menasehk13/FinalProjectPro | b317712dc31d8e4b5bdbd93330c1ab4a93e0db41 | e26a3c0014040a6621c33a8e595d512cce910747 | refs/heads/master | 2022-12-27T14:02:23.694243 | 2020-10-17T12:40:08 | 2020-10-17T12:40:08 | 304,350,366 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 569 | java | package com.example.finalprojectpro;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
public class ProfileFragment extends Fragment {
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_profile_view,container,false);
}
}
| [
"53655445+menasehk13@users.noreply.github.com"
] | 53655445+menasehk13@users.noreply.github.com |
ba0de5779246ca3d2896d00a92e8a4fb4c6f4d32 | b8ad5132f813e4001ade885b76951b39fc1dd0de | /smart-framework-web-demo/src/main/java/com/smart/framwork/demo/service/solo/impl/ShopCategoryServiceImpl.java | 7a0cc96bb72a5c2611b4d5d39d3849b156cd34bc | [] | no_license | SteveFrank/spring-smart-framework | 37d27bbc4c4a046d2a9f49e7f648550ed24869d2 | 7c727befb6cb71b6ee6612970ec7858397d563dc | refs/heads/main | 2023-02-21T01:15:46.580494 | 2021-01-24T23:38:09 | 2021-01-24T23:38:09 | 325,760,457 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 989 | java | package com.smart.framwork.demo.service.solo.impl;
import com.smart.framwork.demo.entity.bo.ShopCategory;
import com.smart.framwork.demo.entity.dto.Result;
import com.smart.framwork.demo.service.solo.ShopCategoryService;
import java.util.List;
/**
* @author yangqian
* @date 2021/1/1
*/
public class ShopCategoryServiceImpl implements ShopCategoryService {
@Override
public Result<Boolean> addShopCategory(ShopCategory shopCategory) {
return null;
}
@Override
public Result<Boolean> removeShopCategory(int shopCategoryId) {
return null;
}
@Override
public Result<Boolean> modifyShopCategory(ShopCategory shopCategory) {
return null;
}
@Override
public Result<ShopCategory> queryShopCategoryById(int shopCategoryId) {
return null;
}
@Override
public Result<List<ShopCategory>> queryShopCategory(ShopCategory shopCategoryCondition, int pageIndex, int pageSize) {
return null;
}
}
| [
"yangqian3@staff.weibo.com"
] | yangqian3@staff.weibo.com |
29e26e409835c689402926fb20a38edfd0695289 | 9bb999f1d34b19f10d6e4ae923040948a39007ca | /src/main/java/org/jplus/hyberbin/excel/utils/Message.java | 30c47aa8c9317db6e72deee21fdd2a38ff1f9591 | [
"Apache-2.0"
] | permissive | fannyfinal/J-Excel | 42008c3456533521643364865032d47f45f99dc4 | 5795b12b94decbe36b0a21f1dbb050364bd6982f | refs/heads/master | 2021-01-18T10:00:19.472507 | 2015-07-31T03:33:26 | 2015-07-31T03:33:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,216 | java | /*
* Copyright 2015 www.hyberbin.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Email:hyberbin@qq.com
*/
package org.jplus.hyberbin.excel.utils;
/**
* @author Hyberbin
*/
public class Message {
/**
* 模块名
*/
private static final String MODULE_NAME = "commons.excel";
private static final String DOT = ".";
private static final String ERROR = "error";
private static final String WARN = "warn";
private static final String INFO = "info";
private static final String SUCCESS = "success";
/**
* 错误信息前缀
*/
private static final String MSG_ERROR = MODULE_NAME + DOT + ERROR;
/**
* 警告信息前缀
*/
private static final String MSG_WARN = MODULE_NAME + DOT + WARN;
/**
* 一般信息前缀
*/
private static final String MSG_INFO = MODULE_NAME + DOT + INFO;
/**
* 成功信息前缀
*/
private static final String MSG_SUCCESS = MODULE_NAME + DOT + SUCCESS;
public static final String COLUMN_ERROR = MSG_ERROR + "column.error";
public static final String ROW_ERROR = MSG_ERROR + "row.error";
public static final String HEAD_ERROR = MSG_ERROR + "head.error";
public static final String VO_INSTANCE_ERROR = MSG_ERROR + "vo.instance.error";
public static final String FIELD_SET_ERROR = MSG_ERROR + "field.set.error";
public static final String FIELD_NULL_ERROR = MSG_ERROR + "field.null.error";
public static final String FIELD_GET_ERROR = MSG_ERROR + "field.get.error";
public static final String INPUT_CELL_DATA_ERROR = MSG_ERROR + "input.cell.data.error";
public static final String DATE_TYPE_ERROR = MSG_ERROR + "date.type.error";
public static final String EXCEL_VO_ERROR = MSG_ERROR + "excel.vo.error";
public static final String INPUT_TEMPLATE = MSG_INFO + "input.template";
public static final String ERROR_IMPORT = MSG_ERROR + "import";
public static final String SUCCESS_IMPORT = MSG_SUCCESS + "import";
public static final String ERROR_EXPORT = MSG_ERROR + "export";
public static final String FLAG_ERROR = MSG_ERROR + "flag.error";
public static final String DIC_ERROR = MSG_ERROR + "dic.error";
public static final String VALUE_MAX_ERROR = MSG_ERROR + "value.max";
public static final String LENGTH_MAX_ERROR = MSG_ERROR + "length.max";
public static final String REGX_ERROR = MSG_ERROR + "regx";
public static final String VALUE_MIN_ERROR = MSG_ERROR + "value.min";
public static final String LENGTH_MIN_ERROR = MSG_ERROR + "length.min";
public static final String SUCCESS_EXPORT = MSG_SUCCESS + "export";
public static final String TIP = MSG_INFO + "warn.tip";
}
| [
"464863696@qq.com"
] | 464863696@qq.com |
0ec1fa5117d3480e4f0124353703b75750d99b12 | 49a6b12b6115833d078c4b33c9cbc7e16905a9dd | /app/src/main/java/com/efunhub/pickpriceadmin/Adapter/ProductDealerListAdapter.java | 56e4b5febb48ef533d0b2d6398ebd344f989f1ac | [] | no_license | vivekp18/PickPriceAdmin | d9a43a88733bad1abd9023a60fc7aff36960a64c | 4f8e3393c0ca94daaa2830da8f8568b5330f0648 | refs/heads/master | 2020-04-21T01:58:50.328814 | 2019-02-05T12:53:51 | 2019-02-05T12:53:51 | 169,240,573 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,694 | java | package com.efunhub.pickpriceadmin.Adapter;
import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.efunhub.pickpriceadmin.Activity.ProductListActivity;
import com.efunhub.pickpriceadmin.R;
import com.ramotion.foldingcell.FoldingCell;
import java.util.ArrayList;
public class ProductDealerListAdapter extends RecyclerView.Adapter<ProductDealerListAdapter.ItemViewHolder> {
private Context mContext;
private ArrayList<String> arrayList;
public ProductDealerListAdapter(Context mContext, ArrayList<String> arrayList) {
this.mContext = mContext;
this.arrayList = arrayList;
}
@Override
public ItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.product_dealer_list_itme, null);
return new ItemViewHolder(view);
}
@Override
public void onBindViewHolder(ItemViewHolder holder, int position) {
}
@Override
public int getItemCount() {
return arrayList.size();
}
class ItemViewHolder extends RecyclerView.ViewHolder {
private ImageView ivProfilePic;
ItemViewHolder(View itemView) {
super(itemView);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mContext.startActivity(new Intent(mContext, ProductListActivity.class));
}
});
}
}
}
| [
"vivekpagar18@gmail.com"
] | vivekpagar18@gmail.com |
de74e4830b61a91cf5cf8d6639a9cee9b6212cf3 | 4dd767709eb2fdf3ebff1e237579ac2c5f812c1c | /JPA2/src/control/LoginController.java | 21718bacb00a0d0bd2dace296a5785b84b1e2804 | [] | no_license | DanieleDT/DatabaseJPA | cd5375f0a3df90f0c79ea629f850d7328a17a659 | dd560eaad33034dd6847a1a072c6cd654bd2e088 | refs/heads/master | 2020-03-21T18:48:20.949483 | 2018-07-09T21:08:37 | 2018-07-09T21:08:37 | 138,914,216 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 440 | java | package control;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import model.Utente;
public class LoginController {
public Utente loadUtente(String username) {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("JPA");
EntityManager em = emf.createEntityManager();
Utente utente = em.find(Utente.class, username );
return utente;
}
}
| [
"danieledt@Xubuntu-16.04"
] | danieledt@Xubuntu-16.04 |
0c4815f45a3e23305d7fb17ead4403c9415f1535 | 62fad8fdfb680e4587083d44e0d12b8daa2000ee | /common/src/main/java/com/hvost/commons/CommonEntity.java | 91f4336ae80d1e24d4cd5fd639b87c49fe85e911 | [] | no_license | bochdm/hvost | bad37547157fe754b79cce9f6991e52ad12a6a00 | fcf70b79a52bcf6dbcb26ef0b5cc4d9dad366928 | refs/heads/master | 2021-01-17T13:28:21.460879 | 2016-03-29T19:19:36 | 2016-03-29T19:19:36 | 29,826,046 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 930 | java | package com.hvost.commons;
import org.hibernate.annotations.Type;
import javax.persistence.*;
import java.io.Serializable;
/**
* Created by kseniaselezneva on 25/10/15.
*/
@Entity
@Table(name = "COMMONS")
public class CommonEntity implements Serializable {
public CommonEntity() {
}
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
@Column
private String title;
@Column
@Type(type="text")
private String text;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public Integer getId() {
return id;
}
@Override
public String toString() {
return "CommonEntity{" +
"id=" + id +
", title='" + title + '\'' +
", text='" + text + '\'' +
'}';
}
}
| [
"bochkanov.dm@gmail.com"
] | bochkanov.dm@gmail.com |
92897e5ad9fbb03d817b63ce4896f497cfbe74cc | 1dcb6610d7adcbff924bb2a18a8e45523a88c7cc | /src/Thread06.java | 864842ec8694c6b597dab87c7819ea8d0cbc07ce | [] | no_license | HayleyLee/JAVA_Tools | a1e1b997e607acf2e3b4233dcc4d1f4f6626f480 | 91aee061b3d01eb55363c86a0a2cc46de22c4fcb | refs/heads/master | 2021-07-01T02:37:56.871003 | 2021-01-04T10:03:54 | 2021-01-04T10:03:54 | 205,130,417 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 216 | java | public class Thread06 extends Thread{
public void run(){
JDBC j = new JDBC();
if(j.instrOrderClientType(25000, 30000)==1){
System.out.println("线程6执行完毕");
}
}
}
| [
"lqh906545016@gmail.com"
] | lqh906545016@gmail.com |
a857b67e1dca96b6cdbe0220ef0627ee246dca36 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/flink/2017/12/ExecutionGraphTestUtils.java | b1ee3cc1c7de39c31899b68ca263bbf84d851ac4 | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Java | false | false | 16,527 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.runtime.executiongraph;
import org.apache.flink.api.common.ExecutionConfig;
import org.apache.flink.api.common.JobID;
import org.apache.flink.api.common.time.Time;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.metrics.groups.UnregisteredMetricsGroup;
import org.apache.flink.runtime.akka.AkkaUtils;
import org.apache.flink.runtime.blob.PermanentBlobService;
import org.apache.flink.runtime.blob.VoidBlobWriter;
import org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory;
import org.apache.flink.runtime.clusterframework.types.AllocationID;
import org.apache.flink.runtime.clusterframework.types.ResourceID;
import org.apache.flink.runtime.deployment.TaskDeploymentDescriptor;
import org.apache.flink.runtime.execution.ExecutionState;
import org.apache.flink.runtime.executiongraph.failover.FailoverRegion;
import org.apache.flink.runtime.executiongraph.restart.NoRestartStrategy;
import org.apache.flink.runtime.executiongraph.restart.RestartStrategy;
import org.apache.flink.runtime.executiongraph.utils.SimpleAckingTaskManagerGateway;
import org.apache.flink.runtime.executiongraph.utils.SimpleSlotProvider;
import org.apache.flink.runtime.instance.BaseTestingActorGateway;
import org.apache.flink.runtime.instance.HardwareDescription;
import org.apache.flink.runtime.instance.Instance;
import org.apache.flink.runtime.instance.InstanceID;
import org.apache.flink.runtime.instance.SimpleSlot;
import org.apache.flink.runtime.jobmaster.slotpool.SlotProvider;
import org.apache.flink.runtime.jobgraph.JobGraph;
import org.apache.flink.runtime.jobgraph.JobStatus;
import org.apache.flink.runtime.jobgraph.JobVertex;
import org.apache.flink.runtime.jobgraph.JobVertexID;
import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
import org.apache.flink.runtime.jobmanager.scheduler.Scheduler;
import org.apache.flink.runtime.instance.SimpleSlotContext;
import org.apache.flink.runtime.jobmaster.SlotOwner;
import org.apache.flink.runtime.jobmanager.slots.TaskManagerGateway;
import org.apache.flink.runtime.messages.Acknowledge;
import org.apache.flink.runtime.messages.TaskMessages.CancelTask;
import org.apache.flink.runtime.messages.TaskMessages.FailIntermediateResultPartitions;
import org.apache.flink.runtime.messages.TaskMessages.SubmitTask;
import org.apache.flink.runtime.taskmanager.TaskManagerLocation;
import org.apache.flink.runtime.testingUtils.TestingUtils;
import org.apache.flink.runtime.testtasks.NoOpInvokable;
import org.apache.flink.util.SerializedValue;
import akka.actor.Status;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.Field;
import java.net.InetAddress;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeoutException;
import scala.concurrent.ExecutionContext;
import scala.concurrent.ExecutionContext$;
import static org.apache.flink.util.Preconditions.checkArgument;
import static org.apache.flink.util.Preconditions.checkNotNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
/**
* A collection of utility methods for testing the ExecutionGraph and its related classes.
*/
public class ExecutionGraphTestUtils {
private static final Logger TEST_LOGGER = LoggerFactory.getLogger(ExecutionGraphTestUtils.class);
// ------------------------------------------------------------------------
// reaching states
// ------------------------------------------------------------------------
/**
* Waits until the job has reached a certain state.
*
* <p>This method is based on polling and might miss very fast state transitions!
*/
public static void waitUntilJobStatus(ExecutionGraph eg, JobStatus status, long maxWaitMillis)
throws TimeoutException {
checkNotNull(eg);
checkNotNull(status);
checkArgument(maxWaitMillis >= 0);
// this is a poor implementation - we may want to improve it eventually
final long deadline = maxWaitMillis == 0 ? Long.MAX_VALUE : System.nanoTime() + (maxWaitMillis * 1_000_000);
while (eg.getState() != status && System.nanoTime() < deadline) {
try {
Thread.sleep(2);
} catch (InterruptedException ignored) {}
}
if (System.nanoTime() >= deadline) {
throw new TimeoutException();
}
}
/**
* Waits until the Execution has reached a certain state.
*
* <p>This method is based on polling and might miss very fast state transitions!
*/
public static void waitUntilExecutionState(Execution execution, ExecutionState state, long maxWaitMillis)
throws TimeoutException {
checkNotNull(execution);
checkNotNull(state);
checkArgument(maxWaitMillis >= 0);
// this is a poor implementation - we may want to improve it eventually
final long deadline = maxWaitMillis == 0 ? Long.MAX_VALUE : System.nanoTime() + (maxWaitMillis * 1_000_000);
while (execution.getState() != state && System.nanoTime() < deadline) {
try {
Thread.sleep(2);
} catch (InterruptedException ignored) {}
}
if (System.nanoTime() >= deadline) {
throw new TimeoutException();
}
}
public static void waitUntilFailoverRegionState(FailoverRegion region, JobStatus status, long maxWaitMillis)
throws TimeoutException {
checkNotNull(region);
checkNotNull(status);
checkArgument(maxWaitMillis >= 0);
// this is a poor implementation - we may want to improve it eventually
final long deadline = maxWaitMillis == 0 ? Long.MAX_VALUE : System.nanoTime() + (maxWaitMillis * 1_000_000);
while (region.getState() != status && System.nanoTime() < deadline) {
try {
Thread.sleep(2);
} catch (InterruptedException ignored) {}
}
if (System.nanoTime() >= deadline) {
throw new TimeoutException();
}
}
/**
* Takes all vertices in the given ExecutionGraph and switches their current
* execution to RUNNING.
*/
public static void switchAllVerticesToRunning(ExecutionGraph eg) {
for (ExecutionVertex vertex : eg.getAllExecutionVertices()) {
vertex.getCurrentExecutionAttempt().switchToRunning();
}
}
/**
* Takes all vertices in the given ExecutionGraph and attempts to move them
* from CANCELING to CANCELED.
*/
public static void completeCancellingForAllVertices(ExecutionGraph eg) {
for (ExecutionVertex vertex : eg.getAllExecutionVertices()) {
vertex.getCurrentExecutionAttempt().cancelingComplete();
}
}
/**
* Takes all vertices in the given ExecutionGraph and switches their current
* execution to FINISHED.
*/
public static void finishAllVertices(ExecutionGraph eg) {
for (ExecutionVertex vertex : eg.getAllExecutionVertices()) {
vertex.getCurrentExecutionAttempt().markFinished();
}
}
/**
* Checks that all execution are in state DEPLOYING and then switches them
* to state RUNNING
*/
public static void switchToRunning(ExecutionGraph eg) {
// check that all execution are in state DEPLOYING
for (ExecutionVertex ev : eg.getAllExecutionVertices()) {
final Execution exec = ev.getCurrentExecutionAttempt();
final ExecutionState executionState = exec.getState();
assert executionState == ExecutionState.DEPLOYING : "Expected executionState to be DEPLOYING, was: " + executionState;
}
// switch executions to RUNNING
for (ExecutionVertex ev : eg.getAllExecutionVertices()) {
final Execution exec = ev.getCurrentExecutionAttempt();
exec.switchToRunning();
}
}
// ------------------------------------------------------------------------
// state modifications
// ------------------------------------------------------------------------
public static void setVertexState(ExecutionVertex vertex, ExecutionState state) {
try {
Execution exec = vertex.getCurrentExecutionAttempt();
Field f = Execution.class.getDeclaredField("state");
f.setAccessible(true);
f.set(exec, state);
}
catch (Exception e) {
throw new RuntimeException("Modifying the state failed", e);
}
}
public static void setVertexResource(ExecutionVertex vertex, SimpleSlot slot) {
Execution exec = vertex.getCurrentExecutionAttempt();
if(!exec.tryAssignResource(slot)) {
throw new RuntimeException("Could not assign resource.");
}
}
// ------------------------------------------------------------------------
// Mocking Slots
// ------------------------------------------------------------------------
public static SimpleSlot createMockSimpleSlot(TaskManagerGateway gateway) {
final TaskManagerLocation location = new TaskManagerLocation(
ResourceID.generate(), InetAddress.getLoopbackAddress(), 6572);
final SimpleSlotContext allocatedSlot = new SimpleSlotContext(
new AllocationID(),
location,
0,
gateway);
return new SimpleSlot(
allocatedSlot,
mock(SlotOwner.class),
0);
}
// ------------------------------------------------------------------------
// Mocking ExecutionGraph
// ------------------------------------------------------------------------
/**
* Creates an execution graph with on job vertex of parallelism 10 that does no restarts.
*/
public static ExecutionGraph createSimpleTestGraph() throws Exception {
return createSimpleTestGraph(new NoRestartStrategy());
}
/**
* Creates an execution graph with on job vertex of parallelism 10, using the given
* restart strategy.
*/
public static ExecutionGraph createSimpleTestGraph(RestartStrategy restartStrategy) throws Exception {
JobVertex vertex = createNoOpVertex(10);
return createSimpleTestGraph(new JobID(), new SimpleAckingTaskManagerGateway(), restartStrategy, vertex);
}
/**
* Creates an execution graph containing the given vertices.
*
* <p>The execution graph uses {@link NoRestartStrategy} as the restart strategy.
*/
public static ExecutionGraph createSimpleTestGraph(JobID jid, JobVertex... vertices) throws Exception {
return createSimpleTestGraph(jid, new SimpleAckingTaskManagerGateway(), new NoRestartStrategy(), vertices);
}
/**
* Creates an execution graph containing the given vertices and the given restart strategy.
*/
public static ExecutionGraph createSimpleTestGraph(
JobID jid,
TaskManagerGateway taskManagerGateway,
RestartStrategy restartStrategy,
JobVertex... vertices) throws Exception {
int numSlotsNeeded = 0;
for (JobVertex vertex : vertices) {
numSlotsNeeded += vertex.getParallelism();
}
SlotProvider slotProvider = new SimpleSlotProvider(jid, numSlotsNeeded, taskManagerGateway);
return createSimpleTestGraph(jid, slotProvider, restartStrategy, vertices);
}
public static ExecutionGraph createSimpleTestGraph(
JobID jid,
SlotProvider slotProvider,
RestartStrategy restartStrategy,
JobVertex... vertices) throws Exception {
return createExecutionGraph(jid, slotProvider, restartStrategy, TestingUtils.defaultExecutor(), vertices);
}
public static ExecutionGraph createExecutionGraph(
JobID jid,
SlotProvider slotProvider,
RestartStrategy restartStrategy,
ScheduledExecutorService executor,
JobVertex... vertices) throws Exception {
return createExecutionGraph(jid, slotProvider, restartStrategy, executor, Time.seconds(10L), vertices);
}
public static ExecutionGraph createExecutionGraph(
JobID jid,
SlotProvider slotProvider,
RestartStrategy restartStrategy,
ScheduledExecutorService executor,
Time timeout,
JobVertex... vertices) throws Exception {
checkNotNull(jid);
checkNotNull(restartStrategy);
checkNotNull(vertices);
checkNotNull(timeout);
return ExecutionGraphBuilder.buildGraph(
null,
new JobGraph(jid, "test job", vertices),
new Configuration(),
executor,
executor,
slotProvider,
ExecutionGraphTestUtils.class.getClassLoader(),
new StandaloneCheckpointRecoveryFactory(),
timeout,
restartStrategy,
new UnregisteredMetricsGroup(),
1,
VoidBlobWriter.getInstance(),
TEST_LOGGER);
}
public static JobVertex createNoOpVertex(int parallelism) {
JobVertex vertex = new JobVertex("vertex");
vertex.setInvokableClass(NoOpInvokable.class);
vertex.setParallelism(parallelism);
return vertex;
}
// ------------------------------------------------------------------------
// utility mocking methods
// ------------------------------------------------------------------------
public static Instance getInstance(final TaskManagerGateway gateway) throws Exception {
return getInstance(gateway, 1);
}
public static Instance getInstance(final TaskManagerGateway gateway, final int numberOfSlots) throws Exception {
ResourceID resourceID = ResourceID.generate();
HardwareDescription hardwareDescription = new HardwareDescription(4, 2L*1024*1024*1024, 1024*1024*1024, 512*1024*1024);
InetAddress address = InetAddress.getByName("127.0.0.1");
TaskManagerLocation connection = new TaskManagerLocation(resourceID, address, 10001);
return new Instance(gateway, connection, new InstanceID(), hardwareDescription, numberOfSlots);
}
@SuppressWarnings("serial")
public static class SimpleActorGateway extends BaseTestingActorGateway {
public SimpleActorGateway(ExecutionContext executionContext){
super(executionContext);
}
@Override
public Object handleMessage(Object message) {
if (message instanceof SubmitTask) {
SubmitTask submitTask = (SubmitTask) message;
return Acknowledge.get();
} else if(message instanceof CancelTask) {
return Acknowledge.get();
} else if(message instanceof FailIntermediateResultPartitions) {
return new Object();
} else {
return null;
}
}
}
@SuppressWarnings("serial")
public static class SimpleActorGatewayWithTDD extends SimpleActorGateway {
public TaskDeploymentDescriptor lastTDD;
private final PermanentBlobService blobCache;
public SimpleActorGatewayWithTDD(ExecutionContext executionContext, PermanentBlobService blobCache) {
super(executionContext);
this.blobCache = blobCache;
}
@Override
public Object handleMessage(Object message) {
if(message instanceof SubmitTask) {
SubmitTask submitTask = (SubmitTask) message;
lastTDD = submitTask.tasks();
try {
lastTDD.loadBigData(blobCache);
return Acknowledge.get();
} catch (Exception e) {
e.printStackTrace();
return new Status.Failure(e);
}
} else {
return super.handleMessage(message);
}
}
}
@SuppressWarnings("serial")
public static class SimpleFailingActorGateway extends BaseTestingActorGateway {
public SimpleFailingActorGateway(ExecutionContext executionContext) {
super(executionContext);
}
@Override
public Object handleMessage(Object message) throws Exception {
if(message instanceof SubmitTask) {
throw new Exception(ERROR_MESSAGE);
} else if (message instanceof CancelTask) {
CancelTask cancelTask = (CancelTask) message;
return Acknowledge.get();
} else {
return null;
}
}
}
public static final String ERROR_MESSAGE = "test_failure_error_message";
public static ExecutionJobVertex getExecutionVertex(
JobVertexID id, ScheduledExecutorService executor)
throws Exception {
JobVertex ajv = new JobVertex("TestVertex", id);
ajv.setInvokableClass(mock(AbstractInvokable.class).getClass());
ExecutionGraph graph = new ExecutionGraph(
executor,
executor,
new JobID(),
"test job",
new Configuration(),
new SerializedValue<>(new ExecutionConfig()),
AkkaUtils.getDefaultTimeout(),
new NoRestartStrategy(),
new Scheduler(ExecutionContext$.MODULE$.fromExecutor(executor)));
return spy(new ExecutionJobVertex(graph, ajv, 1, AkkaUtils.getDefaultTimeout()));
}
public static ExecutionJobVertex getExecutionVertex(JobVertexID id) throws Exception {
return getExecutionVertex(id, TestingUtils.defaultExecutor());
}
}
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
ca536032b76f62a8efdfc85e7efe160d1364f5d3 | a2765790a69383a202eff4a05cdaa8bc486ebe8e | /src/main/java/dao/UsuarioDAO.java | 02ae7e8913e0bf4e74bca42fcb57126e18482b83 | [] | no_license | tiagoluzh607/BancoDeDadosEmJavaHibernate | 5e327e147854f79c016019768a717ceb33d37a1b | f6fc87422af4edf71cb5c2438be314e8ddb8c2c1 | refs/heads/master | 2022-12-04T21:25:13.276614 | 2019-12-27T21:33:10 | 2019-12-27T21:33:10 | 210,472,761 | 0 | 0 | null | 2022-11-24T03:35:43 | 2019-09-23T23:52:17 | Java | UTF-8 | Java | false | false | 2,191 | 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 dao;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.Query;
import model.Usuario;
/**
*
* @author tiago
*/
public class UsuarioDAO {
private final EntityManager em;
public UsuarioDAO(EntityManager em) {
this.em = em;
}
public Usuario insert(Usuario usuario){
em.persist(usuario);
return usuario;
}
public Usuario update(Usuario usuario){
em.merge(usuario);
em.persist(usuario);
return usuario;
}
public Usuario insertOrUpdate(Usuario usuario){
if(usuario.getId() > 0){
return this.update(usuario);
}
return insert(usuario);
}
public void delete(Usuario usuario){
em.merge(usuario);
em.remove(usuario);
}
public List<Usuario> selectAll(){
//SQL, JPQL
String jpql = "select u from Usuario as u";
Query query = em.createQuery(jpql);
return retornarListaComBaseNaConsulta(query);
}
private List<Usuario> retornarListaComBaseNaConsulta(Query query) {
List<Usuario> usuarios;
try{
usuarios = query.getResultList();
}catch(NoResultException e){
usuarios = new ArrayList<Usuario>();
}
return usuarios;
}
public boolean existeNoBancoPorUsuarioESenha(Usuario usuarioNovo){
String jpql = "select u from Usuario as u "
+ "where u.usuario = :pUsuario and u.senha = :pSenha";
Query query = em.createQuery(jpql);
query.setParameter("pUsuario", usuarioNovo.getUsuario());
query.setParameter("pSenha", usuarioNovo.getSenha());
return !retornarListaComBaseNaConsulta(query).isEmpty();
}
public Usuario selectPorId(Usuario usuario){
return em.find(Usuario.class, usuario);
}
}
| [
"tiagoluz.h607@gmail.com"
] | tiagoluz.h607@gmail.com |
93dd0626c5dd2eb6636a0e9123a0756b3b8875c6 | 20e1f82afb05c5ddd7def98b7edf6e76982b9ca8 | /AndroidApp/app/src/main/java/com/example/danny/drivesafe/MainActivity.java | 76c8bb4b254539cce45d90a6ead501e481aaecec | [
"MIT"
] | permissive | anant-j/DriveSafe | 9f218f2d199c1a3a65a05702f7c6e795a52366fa | a70e77b8b95f683df793422003a31bcdd6c4157b | refs/heads/master | 2021-06-16T17:11:45.087185 | 2021-01-27T21:40:26 | 2021-01-27T21:40:26 | 149,930,878 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,549 | java | package com.example.danny.drivesafe;
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.ListView;
import android.widget.TextView;
import java.util.ArrayList;
public class MainActivity extends AppCompatActivity {
private TextView mPoints;
private ListView mListView;
private Button map;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mPoints = findViewById(R.id.mPoints);
mListView = findViewById(R.id.mOutput);
map = findViewById(R.id.mMaps);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setIcon(R.drawable.icon);
//Test , not going to be in final version
Session d1 = new Session(true,100,"Sept 20 2018");
Session d2 = new Session(true,200, "Sept 21 2018");
ArrayList<Session> data = new ArrayList<>();
data.add(d1);//test code
data.add(d2);//test code
MyAdapter adapter = new MyAdapter(this,data);
mListView.setAdapter(adapter);
map = findViewById(R.id.mMaps);
map.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(MainActivity.this, MapsActivity.class);
startActivity(i);
}
});
}
}
| [
"anant.j2409@gmail.com"
] | anant.j2409@gmail.com |
fa0bc46a3705c4c991f15a4a6f1f4a673656f11d | 690f8951fceca09e2d8cb6bf9abb2a6c17f32d6d | /src/esocial-esquemas/src/main/java/br/jus/tst/esocial/esquemas/eventos/benprrp/TSIndRRA.java | 5f3663aa0652cbbb38794458d47a6775b20a9ed7 | [
"BSD-3-Clause"
] | permissive | lldias/esocial | f5af6198738f3557e175d37ed57c3eb44616be1e | 80db222dc493e4f6dbcdbc1c3142a77e2c033c7d | refs/heads/master | 2023-03-08T08:38:30.459805 | 2022-11-25T17:34:24 | 2022-11-25T17:34:24 | 143,428,870 | 0 | 0 | null | 2018-08-03T13:10:04 | 2018-08-03T13:10:02 | null | UTF-8 | Java | false | false | 1,091 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2022.10.24 at 05:04:31 PM BRT
//
package br.jus.tst.esocial.esquemas.eventos.benprrp;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for TS_indRRA.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="TS_indRRA">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="S"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "TS_indRRA")
@XmlEnum
public enum TSIndRRA {
/**
* Sim
*
*/
S;
public String value() {
return name();
}
public static TSIndRRA fromValue(String v) {
return valueOf(v);
}
}
| [
"tiago.bento@tst.jus.br"
] | tiago.bento@tst.jus.br |
6fc436f98eada6d4e705e28f8a3bdb8b361320e5 | bb011c7cbb83fc3104599fad660211f42f4d64f8 | /src/study/chapter01/practice/Memory.java | c3d1724a4f597fc8c1e6dffb50f1c9f5f0bfcc15 | [] | no_license | donghyeok-dev/programing-study | 90d7b627b4889a2363d082b83e869fd8494a22d2 | 2e6d9f5cf9980fda52338797c2badfc967f6d112 | refs/heads/master | 2023-05-28T05:39:28.110475 | 2021-06-13T14:39:57 | 2021-06-13T14:39:57 | 357,589,511 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,209 | java | package study.chapter01.practice;
import study.other.TestDto;
public class Memory {
static int a = 0;
public static void main(String[] args) {
String msg = "Hello"; // Heap Segment에 저장됨.
TestDto dto = new TestDto();
dto.setName("My");
addMethod(msg, dto);
/*
참조 객체로 전달된 dto만 메서드 내에서 변경한 값을 유지하고,
값 복사로 새롭게 생성된 변수는 메서드 내부에서 결과를 출력하고 함수 종료와 함께 GC 대상이 된다.
*/
System.out.println("[Main] dto: " + dto.getName()); // My Love~
System.out.println("[Main] msg: " + msg); // Hello
}
/**
* @param msg : call-by-value : 새로운 객체를 생성한다.
* @param dto : call-by-reference : 기존 객체를 참조하고 있는 참조 객체를 생성한다.(포인터 개념)
*/
public static void addMethod(String msg, TestDto dto) {
dto.setName(dto.getName() + " Love~");
msg += " world!";
System.out.println("[addMethod] dto: " + dto.getName()); // My Love~
System.out.println("[addMethod] msg: " + msg); // Hello world!
}
}
| [
"donghyeok.jh@gmail.com"
] | donghyeok.jh@gmail.com |
c13ceef0e2cf169fae0a2a01140a2b30fa18695d | bae10122e511c64966b33345c2cbe191e01de01a | /src/main/java/com/softwareag/vidhya/aop/logging/LoggingAspect.java | 1a7c25e618133404e2d9b1a2187bff82b042e370 | [] | no_license | vidhya03/scanfix | 4d32d79df69b30a53ade3a4a774fcbfec00cce4c | 979b8a85b8085e97876a06329215c31403597e04 | refs/heads/master | 2023-06-27T16:30:26.438760 | 2020-12-04T06:20:22 | 2020-12-04T06:20:22 | 318,806,202 | 0 | 0 | null | 2021-08-03T20:06:56 | 2020-12-05T14:17:55 | TypeScript | UTF-8 | Java | false | false | 4,165 | java | package com.softwareag.vidhya.aop.logging;
import io.github.jhipster.config.JHipsterConstants;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
import java.util.Arrays;
/**
* Aspect for logging execution of service and repository Spring components.
*
* By default, it only runs with the "dev" profile.
*/
@Aspect
public class LoggingAspect {
private final Environment env;
public LoggingAspect(Environment env) {
this.env = env;
}
/**
* Pointcut that matches all repositories, services and Web REST endpoints.
*/
@Pointcut("within(@org.springframework.stereotype.Repository *)" +
" || within(@org.springframework.stereotype.Service *)" +
" || within(@org.springframework.web.bind.annotation.RestController *)")
public void springBeanPointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
/**
* Pointcut that matches all Spring beans in the application's main packages.
*/
@Pointcut("within(com.softwareag.vidhya.repository..*)"+
" || within(com.softwareag.vidhya.service..*)"+
" || within(com.softwareag.vidhya.web.rest..*)")
public void applicationPackagePointcut() {
// Method is empty as this is just a Pointcut, the implementations are in the advices.
}
/**
* Retrieves the {@link Logger} associated to the given {@link JoinPoint}.
*
* @param joinPoint join point we want the logger for.
* @return {@link Logger} associated to the given {@link JoinPoint}.
*/
private Logger logger(JoinPoint joinPoint) {
return LoggerFactory.getLogger(joinPoint.getSignature().getDeclaringTypeName());
}
/**
* Advice that logs methods throwing exceptions.
*
* @param joinPoint join point for advice.
* @param e exception.
*/
@AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e")
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))) {
logger(joinPoint)
.error(
"Exception in {}() with cause = \'{}\' and exception = \'{}\'",
joinPoint.getSignature().getName(),
e.getCause() != null ? e.getCause() : "NULL",
e.getMessage(),
e
);
} else {
logger(joinPoint)
.error(
"Exception in {}() with cause = {}",
joinPoint.getSignature().getName(),
e.getCause() != null ? e.getCause() : "NULL"
);
}
}
/**
* Advice that logs when a method is entered and exited.
*
* @param joinPoint join point for advice.
* @return result.
* @throws Throwable throws {@link IllegalArgumentException}.
*/
@Around("applicationPackagePointcut() && springBeanPointcut()")
public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
Logger log = logger(joinPoint);
if (log.isDebugEnabled()) {
log.debug("Enter: {}() with argument[s] = {}", joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs()));
}
try {
Object result = joinPoint.proceed();
if (log.isDebugEnabled()) {
log.debug("Exit: {}() with result = {}", joinPoint.getSignature().getName(), result);
}
return result;
} catch (IllegalArgumentException e) {
log.error("Illegal argument: {} in {}()", Arrays.toString(joinPoint.getArgs()), joinPoint.getSignature().getName());
throw e;
}
}
}
| [
"vde@softwareag.com"
] | vde@softwareag.com |
cb6286bd669a7eb29649e88182d62baffb1f4dc4 | 981b56fd16b363c499605140fc59dca03aeddfe2 | /app/src/main/java/com/example/mygamelist/MainActivity.java | 7310a919ef37fef2c1d2c320f4926ffa12ecf9ae | [] | no_license | EternalLoren/MyGameList_FINAL | 0b6c334ef886f1be507c618f56e33d5b1520667e | bfb18dc37794ef45c89cb16a21a5f68cd1bd8015 | refs/heads/master | 2022-07-13T20:17:35.956430 | 2020-05-14T20:10:32 | 2020-05-14T20:10:32 | 264,014,716 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,256 | java | package com.example.mygamelist;
import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.ViewPager;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.Toast;
import android.widget.Button;
import android.widget.NumberPicker;
import android.app.Dialog;
import android.util.Log;
import android.content.ContentValues;
import java.util.ArrayList;
public class MainActivity extends AppCompatActivity implements NumberPicker.OnValueChangeListener {
public static ArrayList<String> arrRate = new ArrayList<>(100);
ViewPager pager;
DatabaseHelper dbHelper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
dbHelper = new DatabaseHelper(this);
initializeArrRate();
while (fetchData.done != true) {}
pager = (ViewPager) findViewById(R.id.pagerList);
pager.setAdapter(new CustomPagerAdapter(this, fetchData.arrPic, fetchData.arrText, fetchData.arrName, arrRate));
pager.setVisibility(View.VISIBLE);
pager.setCurrentItem(0);
}
public void onRateClicked(View view) {
show();
}
@Override
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
Log.i("value is",""+newVal);
}
public void show() {
final Dialog dialog = new Dialog(MainActivity.this);
dialog.setTitle("NumberPicker");
dialog.setContentView(R.layout.dialog);
Button button_set = (Button) dialog.findViewById(R.id.button_set);
Button button_cancel = (Button) dialog.findViewById(R.id.button_cancel);
final NumberPicker np = (NumberPicker) dialog.findViewById(R.id.numberPicker);
np.setMaxValue(10);
np.setMinValue(0);
np.setWrapSelectorWheel(false);
np.setOnValueChangedListener(this);
button_set.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v) {
SQLiteDatabase database = dbHelper.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(DatabaseHelper.KEY_RATE, String.valueOf(np.getValue()));
database.update(DatabaseHelper.TABLE_RATES, contentValues, "_id = ?",
new String[] { String.valueOf(pager.getCurrentItem() + 1) });
Cursor cursor = database.query(DatabaseHelper.TABLE_RATES, null, null, null, null, null, null);
if (cursor.moveToFirst()) {
int idIndex = cursor.getColumnIndex(DatabaseHelper.KEY_ID);
int nameIndex = cursor.getColumnIndex(DatabaseHelper.KEY_RATE);
do {
Log.d("mLog", "ID = " + cursor.getInt(idIndex) +
", rate = " + cursor.getString(nameIndex));
} while (cursor.moveToNext());
} else
Log.d("mLog","0 rows");
cursor.close();
dbHelper.close();
Toast toast = Toast.makeText(getApplicationContext(),"This game is rated!", Toast.LENGTH_SHORT);
toast.setGravity(Gravity.TOP, 0, 0);
toast.show();
dialog.dismiss();
}
});
button_cancel.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
dialog.show();
}
public void initializeArrRate() {
SQLiteDatabase database = dbHelper.getWritableDatabase();
Cursor cursor = database.query(DatabaseHelper.TABLE_RATES, null, null, null, null, null, null);
if (cursor.moveToFirst()) {
int rateIndex = cursor.getColumnIndex(DatabaseHelper.KEY_RATE);
do {
arrRate.add(cursor.getString(rateIndex));
} while (cursor.moveToNext());
} else
Log.d("mLog","0 rows");
cursor.close();
}
}
| [
"bleakentity@yandex.ru"
] | bleakentity@yandex.ru |
2cefbfd5d5b295196083ffbe13d80559425c92c8 | 40292ec578809f8b7cff00a7ca400b81dd15ddc0 | /order-rules/src/main/java/com/sample/model/注文ヘッダテストケース.java | 973e994bad658fc7d3e297a8226e6ee4e1ea8bfc | [] | no_license | riry111/BRMS_Sample | a63a33e454df467c08b1a913cbdf82299f470f93 | e396d152eee91136179223d54d534fc37aab0861 | refs/heads/master | 2021-01-19T09:44:34.076815 | 2015-08-11T08:48:42 | 2015-08-11T08:48:42 | 37,641,871 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 597 | java | package com.sample.model;
import java.io.Serializable;
import com.example.order.model.注文ヘッダ;
public class 注文ヘッダテストケース implements Serializable {
private int caseNo;
private String type;
private 注文ヘッダ fact;
public int getCaseNo() {
return caseNo;
}
public void setCaseNo(int caseNo) {
this.caseNo = caseNo;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public 注文ヘッダ getFact() {
return fact;
}
public void setFact(注文ヘッダ fact) {
this.fact = fact;
}
}
| [
"riry111@gmail.com"
] | riry111@gmail.com |
4e3e6ec8cec26570a1cb82a10b483507632bca7a | d7de50fc318ff59444caabc38d274f3931349f19 | /src/android/support/v4/widget/ScrollerCompat.java | ef7a34214eaad3e465918c306936f73f51aaf041 | [] | no_license | reverseengineeringer/fr.dvilleneuve.lockito | 7bbd077724d61e9a6eab4ff85ace35d9219a0246 | ad5dbd7eea9a802e5f7bc77e4179424a611d3c5b | refs/heads/master | 2021-01-20T17:21:27.500016 | 2016-07-19T16:23:04 | 2016-07-19T16:23:04 | 63,709,932 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 11,730 | java | package android.support.v4.widget;
import android.content.Context;
import android.os.Build.VERSION;
import android.view.animation.Interpolator;
import android.widget.Scroller;
public final class ScrollerCompat
{
static final int CHASE_FRAME_TIME = 16;
private static final String TAG = "ScrollerCompat";
ScrollerCompatImpl mImpl;
Object mScroller;
private ScrollerCompat(int paramInt, Context paramContext, Interpolator paramInterpolator)
{
if (paramInt >= 14) {
mImpl = new ScrollerCompatImplIcs();
}
for (;;)
{
mScroller = mImpl.createScroller(paramContext, paramInterpolator);
return;
if (paramInt >= 9) {
mImpl = new ScrollerCompatImplGingerbread();
} else {
mImpl = new ScrollerCompatImplBase();
}
}
}
public static ScrollerCompat create(Context paramContext)
{
return create(paramContext, null);
}
public static ScrollerCompat create(Context paramContext, Interpolator paramInterpolator)
{
return new ScrollerCompat(Build.VERSION.SDK_INT, paramContext, paramInterpolator);
}
public void abortAnimation()
{
mImpl.abortAnimation(mScroller);
}
public boolean computeScrollOffset()
{
return mImpl.computeScrollOffset(mScroller);
}
public void fling(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8)
{
mImpl.fling(mScroller, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8);
}
public void fling(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10)
{
mImpl.fling(mScroller, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8, paramInt9, paramInt10);
}
public float getCurrVelocity()
{
return mImpl.getCurrVelocity(mScroller);
}
public int getCurrX()
{
return mImpl.getCurrX(mScroller);
}
public int getCurrY()
{
return mImpl.getCurrY(mScroller);
}
public int getFinalX()
{
return mImpl.getFinalX(mScroller);
}
public int getFinalY()
{
return mImpl.getFinalY(mScroller);
}
public boolean isFinished()
{
return mImpl.isFinished(mScroller);
}
public boolean isOverScrolled()
{
return mImpl.isOverScrolled(mScroller);
}
public void notifyHorizontalEdgeReached(int paramInt1, int paramInt2, int paramInt3)
{
mImpl.notifyHorizontalEdgeReached(mScroller, paramInt1, paramInt2, paramInt3);
}
public void notifyVerticalEdgeReached(int paramInt1, int paramInt2, int paramInt3)
{
mImpl.notifyVerticalEdgeReached(mScroller, paramInt1, paramInt2, paramInt3);
}
public boolean springBack(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
{
return mImpl.springBack(mScroller, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6);
}
public void startScroll(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
{
mImpl.startScroll(mScroller, paramInt1, paramInt2, paramInt3, paramInt4);
}
public void startScroll(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5)
{
mImpl.startScroll(mScroller, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5);
}
static abstract interface ScrollerCompatImpl
{
public abstract void abortAnimation(Object paramObject);
public abstract boolean computeScrollOffset(Object paramObject);
public abstract Object createScroller(Context paramContext, Interpolator paramInterpolator);
public abstract void fling(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8);
public abstract void fling(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10);
public abstract float getCurrVelocity(Object paramObject);
public abstract int getCurrX(Object paramObject);
public abstract int getCurrY(Object paramObject);
public abstract int getFinalX(Object paramObject);
public abstract int getFinalY(Object paramObject);
public abstract boolean isFinished(Object paramObject);
public abstract boolean isOverScrolled(Object paramObject);
public abstract void notifyHorizontalEdgeReached(Object paramObject, int paramInt1, int paramInt2, int paramInt3);
public abstract void notifyVerticalEdgeReached(Object paramObject, int paramInt1, int paramInt2, int paramInt3);
public abstract boolean springBack(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6);
public abstract void startScroll(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4);
public abstract void startScroll(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5);
}
static class ScrollerCompatImplBase
implements ScrollerCompat.ScrollerCompatImpl
{
public void abortAnimation(Object paramObject)
{
((Scroller)paramObject).abortAnimation();
}
public boolean computeScrollOffset(Object paramObject)
{
return ((Scroller)paramObject).computeScrollOffset();
}
public Object createScroller(Context paramContext, Interpolator paramInterpolator)
{
if (paramInterpolator != null) {
return new Scroller(paramContext, paramInterpolator);
}
return new Scroller(paramContext);
}
public void fling(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8)
{
((Scroller)paramObject).fling(paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8);
}
public void fling(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10)
{
((Scroller)paramObject).fling(paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8);
}
public float getCurrVelocity(Object paramObject)
{
return 0.0F;
}
public int getCurrX(Object paramObject)
{
return ((Scroller)paramObject).getCurrX();
}
public int getCurrY(Object paramObject)
{
return ((Scroller)paramObject).getCurrY();
}
public int getFinalX(Object paramObject)
{
return ((Scroller)paramObject).getFinalX();
}
public int getFinalY(Object paramObject)
{
return ((Scroller)paramObject).getFinalY();
}
public boolean isFinished(Object paramObject)
{
return ((Scroller)paramObject).isFinished();
}
public boolean isOverScrolled(Object paramObject)
{
return false;
}
public void notifyHorizontalEdgeReached(Object paramObject, int paramInt1, int paramInt2, int paramInt3) {}
public void notifyVerticalEdgeReached(Object paramObject, int paramInt1, int paramInt2, int paramInt3) {}
public boolean springBack(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
{
return false;
}
public void startScroll(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
{
((Scroller)paramObject).startScroll(paramInt1, paramInt2, paramInt3, paramInt4);
}
public void startScroll(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5)
{
((Scroller)paramObject).startScroll(paramInt1, paramInt2, paramInt3, paramInt4, paramInt5);
}
}
static class ScrollerCompatImplGingerbread
implements ScrollerCompat.ScrollerCompatImpl
{
public void abortAnimation(Object paramObject)
{
ScrollerCompatGingerbread.abortAnimation(paramObject);
}
public boolean computeScrollOffset(Object paramObject)
{
return ScrollerCompatGingerbread.computeScrollOffset(paramObject);
}
public Object createScroller(Context paramContext, Interpolator paramInterpolator)
{
return ScrollerCompatGingerbread.createScroller(paramContext, paramInterpolator);
}
public void fling(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8)
{
ScrollerCompatGingerbread.fling(paramObject, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8);
}
public void fling(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10)
{
ScrollerCompatGingerbread.fling(paramObject, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8, paramInt9, paramInt10);
}
public float getCurrVelocity(Object paramObject)
{
return 0.0F;
}
public int getCurrX(Object paramObject)
{
return ScrollerCompatGingerbread.getCurrX(paramObject);
}
public int getCurrY(Object paramObject)
{
return ScrollerCompatGingerbread.getCurrY(paramObject);
}
public int getFinalX(Object paramObject)
{
return ScrollerCompatGingerbread.getFinalX(paramObject);
}
public int getFinalY(Object paramObject)
{
return ScrollerCompatGingerbread.getFinalY(paramObject);
}
public boolean isFinished(Object paramObject)
{
return ScrollerCompatGingerbread.isFinished(paramObject);
}
public boolean isOverScrolled(Object paramObject)
{
return ScrollerCompatGingerbread.isOverScrolled(paramObject);
}
public void notifyHorizontalEdgeReached(Object paramObject, int paramInt1, int paramInt2, int paramInt3)
{
ScrollerCompatGingerbread.notifyHorizontalEdgeReached(paramObject, paramInt1, paramInt2, paramInt3);
}
public void notifyVerticalEdgeReached(Object paramObject, int paramInt1, int paramInt2, int paramInt3)
{
ScrollerCompatGingerbread.notifyVerticalEdgeReached(paramObject, paramInt1, paramInt2, paramInt3);
}
public boolean springBack(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
{
return ScrollerCompatGingerbread.springBack(paramObject, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6);
}
public void startScroll(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
{
ScrollerCompatGingerbread.startScroll(paramObject, paramInt1, paramInt2, paramInt3, paramInt4);
}
public void startScroll(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5)
{
ScrollerCompatGingerbread.startScroll(paramObject, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5);
}
}
static class ScrollerCompatImplIcs
extends ScrollerCompat.ScrollerCompatImplGingerbread
{
public float getCurrVelocity(Object paramObject)
{
return ScrollerCompatIcs.getCurrVelocity(paramObject);
}
}
}
/* Location:
* Qualified Name: android.support.v4.widget.ScrollerCompat
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
69748ebd244271f1c0d2a9aee384fc4f5b8f5b78 | 6efe82c95a7eb541fa8fc88fe338ad4352c5efe9 | /src/main/java/ru/roafo/market/dto/PriceHistoryByDateDTO.java | a02b8786ec9e1fd951df6aee003f743e21d32d57 | [] | no_license | roafo1989/market | 6f8fb5be3d8cc053887c3714f4a272e620af262b | c43f0dde67aa308fd2cf94647b7c1e5a7296d3cb | refs/heads/master | 2023-01-22T21:36:37.223467 | 2020-11-22T18:56:53 | 2020-11-22T18:56:53 | 314,978,055 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 560 | java | package ru.roafo.market.dto;
import java.time.LocalDate;
public class PriceHistoryByDateDTO {
private LocalDate date;
private Integer frequency;
public PriceHistoryByDateDTO(LocalDate date, Integer frequency) {
this.date = date;
this.frequency = frequency;
}
public LocalDate getDate() {
return date;
}
public Integer getFrequency() {
return frequency;
}
@Override
public String toString() {
return "\"date\": " + date.toString() + ", \"frequency\": " + frequency;
}
}
| [
"r.afonin@okenit.ru"
] | r.afonin@okenit.ru |
ceab73d73ac832b8809300f3380f14a1f9789f4f | e229b6a544a1e580dde46b70a1f98f58ac931f84 | /app/src/main/java/com/example/tangshisongci/module/tangshi/TangshiDetailView.java | 44ef3b4e23eb6f6c0fa978c1c2734e4a796687a6 | [] | no_license | guohuanwen/tangshisongci_new | 4e24ad4e420fc9e289e9e86d446cdc65418c2a13 | 731be3f480f94382c07ce92f9617b6752530230e | refs/heads/master | 2021-01-21T04:51:07.638629 | 2016-05-22T06:13:32 | 2016-05-22T06:13:32 | 51,069,944 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,110 | java | package com.example.tangshisongci.module.tangshi;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.example.tangshisongci.R;
import com.example.tangshisongci.model.ChinaTang;
import com.example.tangshisongci.model.base.BaseModel;
import com.example.tangshisongci.model.base.MyDataBase;
import java.util.List;
/**
* Created by bigwen on 2016/1/29.
*/
public class TangshiDetailView extends LinearLayout {
private Context mContext;
private TextView name;
private TextView poet;
private TextView text;
private TextView note;
private TextView explain;
private int id;
public TangshiDetailView(Context context) {
super(context);
mContext = context;
}
public TangshiDetailView(Context context, int id) {
super(context);
mContext = context;
this.id = id;
init();
}
public TangshiDetailView(Context context, AttributeSet attrs) {
super(context, attrs);
mContext = context;
}
private void init() {
LayoutInflater.from(mContext).inflate(R.layout.tangshi_detail_view, this);
name = (TextView) findViewById(R.id.tangshi_detail_view_name);
poet = (TextView) findViewById(R.id.tangshi_detail_view_poet);
text = (TextView) findViewById(R.id.tangshi_detail_view_text);
note = (TextView) findViewById(R.id.tangshi_detail_view_note);
explain = (TextView) findViewById(R.id.tangshi_detail_view_explain);
loadDB(id);
}
private void loadDB(int parentID) {
MyDataBase.getInstence().loadFromDBAsyn(
" select * from " + new ChinaTang().getTableName() + " where parentID = ? ",
new String[]{parentID + ""},
new ChinaTang(), new MyDataBase.FindFinish() {
@Override
public void success(final List<BaseModel> baseModels) {
setView(baseModels);
}
@Override
public void error(Exception e) {
}
});
}
public void setView(List<BaseModel> baseModels) {
if (baseModels.size() == 0) {
return;
}
BaseModel baseModel = baseModels.get(0);
if (!(baseModel instanceof ChinaTang)) {
return;
}
ChinaTang chinaTang = (ChinaTang) baseModel;
name.setText(chinaTang.getTitle());
poet.setText(chinaTang.getAuthor());
String t = chinaTang.getYunyi();
t = t.replace(",", ",\n");
t = t.replace("。", "。\n");
t = t.replace("?", "?\n");
t = t.replace("!", "!\n");
t = t.replace(";", ";\n");
t = t.replaceAll(" ", "");
String n = chinaTang.getNote();
n = n.replaceAll("。", "。\n");
n = n.replaceAll(" ", "");
text.setText(t);
note.setText(n);
explain.setText(chinaTang.getDescription());
}
}
| [
"1179636441@qq.com"
] | 1179636441@qq.com |
2bbff58cfb828b6c9ed5c9a336547de6e0e147f4 | 99ea8dcfe4335ca4212bbcb5ed38f4144d40db82 | /src/main/java/com/geekbrains/geek/market/entities/Product.java | b2dbdd33ef4ba1fe9b3c5b2fe142731ea1c36360 | [] | no_license | 1t0XX/geek-market-spring-boot | d62bed75dd23577db1d806d84d1f036f5f87015b | 9f6c55d63432fc7ba14c89c64e5800847eabadce | refs/heads/master | 2022-12-26T18:08:12.344900 | 2020-10-02T17:36:04 | 2020-10-02T17:36:04 | 300,715,352 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 639 | java | package com.geekbrains.geek.market.entities;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Cascade;
import javax.persistence.*;
import java.util.List;
@Entity
@Table(name = "products")
@Data
@NoArgsConstructor
public class Product {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
@Column(name = "title")
private String title;
@OneToMany(mappedBy = "product", orphanRemoval = true)
private List<Order> orders;
@Column(name = "price")
private int price;
}
| [
"53831070+1t0XX@users.noreply.github.com"
] | 53831070+1t0XX@users.noreply.github.com |
7fb617cc576bfbab75119ccca94208e95a7204d4 | 76a7c720f8c0c5babd092093708e7323dd941aa4 | /bubing_camera/src/main/java/com/bubing/camera/result/TakeResult.java | 4cc495848c0a295cf1267b3db57dbf50d7bc4980 | [] | no_license | General757/BubingTools | 13b2622a65cdba982a8f5ab2b6d6541ce4f1d14a | 550af7395935e3f2e1411a9c80eed6698343a607 | refs/heads/master | 2023-02-23T03:53:10.106504 | 2020-11-02T03:35:04 | 2020-11-02T03:35:04 | 260,145,210 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,339 | java | package com.bubing.camera.result;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
/**
* @ClassName: TakeResult
* @Description: java类作用描述
* @Author: bubing
* @Date: 2020-05-09 15:24
*/
public class TakeResult {
private static final String TAG = TakeResult.class.getName();
private TakeResult() {
}
public static HolderFragment get(FragmentActivity activity) {
return new TakeResult().getHolderFragment(activity.getSupportFragmentManager());
}
public static HolderFragment get(Fragment fragment) {
return new TakeResult().getHolderFragment(fragment.getChildFragmentManager());
}
private HolderFragment getHolderFragment(FragmentManager fragmentManager) {
HolderFragment holderFragment = findHolderFragment(fragmentManager);
if (holderFragment == null) {
holderFragment = new HolderFragment();
fragmentManager.beginTransaction().add(holderFragment, TAG).commitAllowingStateLoss();
fragmentManager.executePendingTransactions();
}
return holderFragment;
}
private HolderFragment findHolderFragment(FragmentManager fragmentManager) {
return (HolderFragment) fragmentManager.findFragmentByTag(TAG);
}
}
| [
"1183561804@qq.com"
] | 1183561804@qq.com |
fd88cc388de0cb613d20b5dc194615aa869b4cff | 0bd124239b205dd2ce1cffd5a800e3ef4185f988 | /src/main/java/com/minal/scheduler/controller/HomepageRecruiterController.java | 0a296b7f233909bdfa7e4ddca30dfaf97733a0e2 | [] | no_license | minalpatil95/ACMS_Interview-Scheduler | 3eda925151bec9929d4b7d566798f05162a1ddfb | da15a678c4c8f38294937bdd2557fb754dca60aa | refs/heads/master | 2022-06-26T18:45:35.976434 | 2020-04-21T19:02:38 | 2020-04-21T19:02:38 | 126,979,505 | 0 | 1 | null | 2022-06-20T23:37:01 | 2018-03-27T11:58:19 | CSS | UTF-8 | Java | false | false | 2,108 | java | package com.minal.scheduler.controller;
import com.minal.scheduler.dao.EventDao;
import com.minal.scheduler.model.Employee;
import com.minal.scheduler.model.Event;
import com.minal.scheduler.utils.TokenAuth;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
@WebServlet(name = "HomepageRecruiterController")
public class HomepageRecruiterController extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
Cookie[] cookies = request.getCookies();
Employee employee = null;
if(cookies != null){
for(Cookie cookie: cookies){
if(cookie.getName().equals("authToken")){
employee = TokenAuth.getEmployeeFromToken(cookie.getValue());
}
}
}
if( employee == null){
RequestDispatcher rd = request.getRequestDispatcher("jsp/login.jsp");
rd.forward(request,response );
}
else {
Collection<Event> events = Event.getAllRecruitersEvent(employee.getId());
ArrayList<Boolean> check = new ArrayList<Boolean>();
for(Event e: events) {
Boolean b = EventDao.findEvent(e.getId());
check.add(b);
}
request.setAttribute("check",check);
request.setAttribute("employee", employee);
request.setAttribute("events",events);
//System.out.println(events);
RequestDispatcher rd = request.getRequestDispatcher("jsp/homepageRecruiter.jsp");
rd.forward(request,response);
}
}
}
| [
"minalpatil95@gmail.com"
] | minalpatil95@gmail.com |
304ba0b20db5c70f019aa60f5f5b77dc2fb10bed | f6df33a0d507e9cc619471159923e32f1943be15 | /DesignPatternsNew/composite-pattern-app/src/com/techlabs/dom/IHTMLElement.java | c3d953a6d0c7f5b4aae1875adaa9f2a462f7cd72 | [] | no_license | walavalkaronkar/SwabhavRepo | b1c4bab88add96c21c024793b7372c54d44be809 | 237e853dca69838ac0b5e69a3c309ba099f75e09 | refs/heads/master | 2023-01-08T23:07:07.818112 | 2019-09-30T07:14:13 | 2019-09-30T07:14:13 | 183,374,282 | 0 | 0 | null | 2023-01-07T23:07:23 | 2019-04-25T06:51:50 | Java | UTF-8 | Java | false | false | 88 | java | package com.techlabs.dom;
public interface IHTMLElement {
public String generate();
}
| [
"walavalkaronkar@gmail.com"
] | walavalkaronkar@gmail.com |
b8992d2ef910cd8e146926ad21fc59d63c7617ee | 6ce2e2483d460e6b9637985043cbd0ef14d3a129 | /src/main/java/com/langmy/music/model/Album.java | 534090a951f4d6a81e37fd603b917696b3d2e95a | [] | no_license | zhaozhedan/musicJFinal | d41de315782d7fc8aea91a69bacf887536895e93 | 0376fc5e9410083cf3b12427bc77a8ebcb59c37f | refs/heads/master | 2021-01-13T01:58:13.310801 | 2018-03-07T08:44:54 | 2018-03-07T08:44:54 | 35,020,718 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 690 | java | package com.langmy.music.model;
import java.util.List;
import com.jfinal.plugin.activerecord.Model;
/**
* 相册
*
* @author ZZD
*
*/
public class Album extends Model<Album> {
/**
*
*/
private static final long serialVersionUID = -2735162091472598491L;
public static final Album dao = new Album();
public Long getSize() {
String sql = "SELECT count(*) count from picture pi where pi.state=1 and pi.album=?";
return Picture.dao.findFirst(sql, get("id")).getLong("count");
}
public List<Picture> getPictures() {
String sql = "SELECT p.* from picture p where p.state=1 and p.album=? ORDER BY P.upload_time DESC";
return Picture.dao.find(sql, get("id"));
}
}
| [
"2212590882@qq.com"
] | 2212590882@qq.com |
1d65fd336e001eb0ef5ff8bd59268c7d317129bf | 8754678eb0e1a9d4c3408ce4b9f18709db09bcd2 | /src/main/java/upeu/edu/pe/employees/service/impl/EmployeeServiceImpl.java | 75470591a46d3c971fe2a3f8d93955461dd762d1 | [] | no_license | Collantes/employees | d674e2f795f09c33603aa329158456933f99fd84 | 20abf8bde9e42a6c754ef139d05b9896d0750016 | refs/heads/main | 2023-09-04T19:09:19.981912 | 2021-11-25T11:16:47 | 2021-11-25T11:16:47 | 424,485,387 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,440 | 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 upeu.edu.pe.employees.service.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import upeu.edu.pe.employees.entity.Employee;
import upeu.edu.pe.employees.repository.EmployeeRepository;
import upeu.edu.pe.employees.service.EmployeeService;
/**
*
* @author Desarrollo
*/
@Service
public class EmployeeServiceImpl implements EmployeeService {
@Autowired
private EmployeeRepository employeeRepository;
@Transactional(readOnly = true)
@Override
public List<Employee> findAll() {
return (List<Employee>) employeeRepository.findAll();
}
@Override
public Employee findById(Long id) {
return employeeRepository.findById(id).orElse(null);
}
@Override
public Employee save(Employee employee) {
return employeeRepository.save(employee);
}
@Override
public void delete(Employee employee) {
employeeRepository.delete(employee);
}
@Override
public List<Employee> findAll(String query, String sortBy) {
Sort sort;
if (!sortBy.equals("")) {/*sortBy = COLUMNA|ASC O DESC idEmployee|ASC*/
String sortColumn = sortBy.split("\\|")[0];
String sortDirection = sortBy.split("\\|")[1].toUpperCase();
sort = Sort.by(sortDirection.equals("DESC") ? Direction.DESC : Direction.ASC, sortColumn);
} else {
sort = Sort.by(Direction.ASC, "idEmployee");
}
return employeeRepository.findAll("%" + query.toUpperCase() + "%", sort);
}
@Override
public HashMap<String, Object> findAll(String query, int page, int limit, String sortBy) {
HashMap<String, Object> result = new HashMap<>();
Pageable pageable;
if (!sortBy.equals("")) {
String sortColumn = sortBy.split("\\|")[0];
String sortDirection = sortBy.split("\\|")[1].toUpperCase();
Sort sort = Sort.by(sortDirection.equals("DESC") ? Direction.DESC : Direction.ASC, sortColumn);
pageable = PageRequest.of(page - 1, limit, sort);
} else {
Sort sort = Sort.by(Direction.ASC, "idEmployee");
pageable = PageRequest.of(page - 1, limit, sort);
}
Page<Employee> data = employeeRepository.findAllParams("%" + query.toUpperCase() + "%", pageable);
if (!data.getContent().isEmpty()) {
result.put("items", data.getContent());
} else {
result.put("items", new ArrayList<Employee>());
}
result.put("totalPage", data.getTotalPages());
result.put("totalRows", data.getNumberOfElements());
result.put("page", page);
result.put("limit", limit);
return result;
}
@Override
public void deleteById(Long id) {
employeeRepository.deleteById(id);
}
}
| [
"hitler.collantes@lim.upeu.edu.pe"
] | hitler.collantes@lim.upeu.edu.pe |
77384a8136b6d9cc19b4e2e3e85506dc2f8f75c0 | 2fb6ad484f873a79401583d64dcd7e51031a9d25 | /src/hash_map/OtherTypesHashMap.java | 914e656f0fcedd881ec8c8e4e7b2de6e39a41b41 | [] | no_license | riazul701/java-w3schools-com | 888d41a67ba66e3522565e01d9f45e218d75b3e8 | 6bd807e8f0a9ed4ad6b0e9d219203d94529bd5c1 | refs/heads/master | 2023-03-27T11:47:48.478335 | 2021-03-24T08:27:43 | 2021-03-24T08:27:43 | 350,009,752 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 510 | java | package hash_map;
// Import the HashMap class
import java.util.HashMap;
public class OtherTypesHashMap {
public static void main(String[] args) {
// Create a HashMap object called people
HashMap<String, Integer> people = new HashMap<String, Integer>();
// Add keys and values (Name, Age)
people.put("John", 32);
people.put("Steve", 30);
people.put("Angie", 33);
for (String i : people.keySet()) {
System.out.println("Name: " + i + " Age: " + people.get(i));
}
}
}
| [
"riazul701@gmail.com"
] | riazul701@gmail.com |
d8b151be777d7c952d85954592fbd835c0b7443f | 23d343c5a7d982697ba539de76c24a03e6fd9b0d | /96/Solution (2).java | 1741bbdaaf03d6a93f930d37ca3e30d06a195261 | [] | no_license | yanglin0883/leetcode | 5050e4062aea6c3070a54843e07d5a09a592eda2 | 851d3bec58d61ed908d8c33c31d309ff204e1643 | refs/heads/master | 2022-12-05T23:50:39.822841 | 2020-08-21T17:13:16 | 2020-08-21T17:13:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 296 | java | class Solution {
public int numTrees(int n) {
// if(n<1) return 1;
if(n<=1) return 1;
int res=0;
int a, b;
for(int i=0;i<n;i++){
a=numTrees(i-0);
b=numTrees(n-i-1);
res += a * b;
}
return res;
}
} | [
"yanglin0883@gmail.com"
] | yanglin0883@gmail.com |
e045a148da3446999029b8df44cfd48645153a0a | 1100078afc1a6c962763ea2fe2266a46d67d08fb | /src/main/java/entity/Activity.java | f8bcff7d98713757e244e2661f6afc7011fd831c | [] | no_license | petertoth/smart-home | 68009edebe3e9945e7501393dea47aa9e4023f59 | 3e8a3886538cf9049a51a1707614df178857fc89 | refs/heads/master | 2021-05-12T03:36:02.779474 | 2018-01-15T04:09:04 | 2018-01-15T04:09:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 73 | java | package entity;
public enum Activity {
SHOPPING, SPORT, REPAIRING
}
| [
"marek.dlugos@gmail.com"
] | marek.dlugos@gmail.com |
e70d4909a273fb1c0c19a8e76782f0115d600962 | 8165ad8532eaf6cbee49e3d051eb5af17569e56f | /TetsUnit/src/test/java/com/talento/TetsUnit/TestSuma.java | e0beb43f77a52bd14bb4e73d7f135c36fb19bda1 | [] | no_license | maxdrusso/prueba | 9ae34d4696445835b311f7c68727d35775fae669 | b2836cf76d20d4d5cf704e5f1e459761eba5178a | refs/heads/master | 2022-12-26T22:57:36.607183 | 2020-10-03T01:25:01 | 2020-10-03T01:25:01 | 300,762,029 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 259 | java | package com.talento.TetsUnit;
import junit.framework.TestCase;
public class TestSuma extends TestCase {
public void testSuma () {
Suma suma = new Suma();
double resultado = suma.sumar(1.0, 1.0);
assertEquals(2.0, resultado);
}
}
| [
"Max@Max-PC"
] | Max@Max-PC |
350cb4db259f865a1733378238a28c88a1e4ffa8 | 0edd0d91942a6f8a9d6fa503e3b05c35014350d6 | /src/BluetalonExeption.java | b6fc84f0a6b3aa25ce7dd2c6510fc23ffe44fb26 | [] | no_license | vinairamm/Test1 | 270760f8c4087a4daff4a83248702712f6ee8758 | 80dcd6bb1eac973f2a0c2459a020c6090c99d576 | refs/heads/master | 2022-04-27T01:08:43.300846 | 2020-05-02T04:33:11 | 2020-05-02T04:33:11 | 260,612,939 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 142 | java |
public class BluetalonExeption extends Throwable {
String a;
public static BluetalonExeption(String a) {
this.a = a;
}
}
| [
"svinayram9493@gmail.com"
] | svinayram9493@gmail.com |
1181278c3eaf54260c1a29641de157dc66ff8da9 | 2df8bdc373ff9805fb543bf895c8aa39413da8d6 | /SNS_mobile/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r/android/support/customview/R.java | fc9f76ae4ed897d1da30d2e84fa71cdafeb73f1d | [] | no_license | abib3097/SNS | d58f4598fbd54329b1c643a521cb10ee8739c27d | feea46c647080f5574ab7d5a489e55b5e28adf4c | refs/heads/master | 2020-03-31T10:20:05.482688 | 2018-12-18T01:27:32 | 2018-12-18T01:27:32 | 152,130,962 | 0 | 1 | null | 2018-10-08T21:03:39 | 2018-10-08T18:58:34 | JavaScript | UTF-8 | Java | false | false | 10,457 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package android.support.customview;
public final class R {
private R() {}
public static final class attr {
private attr() {}
public static final int alpha = 0x7f030027;
public static final int font = 0x7f0300e2;
public static final int fontProviderAuthority = 0x7f0300e4;
public static final int fontProviderCerts = 0x7f0300e5;
public static final int fontProviderFetchStrategy = 0x7f0300e6;
public static final int fontProviderFetchTimeout = 0x7f0300e7;
public static final int fontProviderPackage = 0x7f0300e8;
public static final int fontProviderQuery = 0x7f0300e9;
public static final int fontStyle = 0x7f0300ea;
public static final int fontVariationSettings = 0x7f0300eb;
public static final int fontWeight = 0x7f0300ec;
public static final int ttcIndex = 0x7f03021c;
}
public static final class color {
private color() {}
public static final int notification_action_color_filter = 0x7f050075;
public static final int notification_icon_bg_color = 0x7f050076;
public static final int ripple_material_light = 0x7f050081;
public static final int secondary_text_default_material_light = 0x7f050083;
}
public static final class dimen {
private dimen() {}
public static final int compat_button_inset_horizontal_material = 0x7f060050;
public static final int compat_button_inset_vertical_material = 0x7f060051;
public static final int compat_button_padding_horizontal_material = 0x7f060052;
public static final int compat_button_padding_vertical_material = 0x7f060053;
public static final int compat_control_corner_material = 0x7f060054;
public static final int compat_notification_large_icon_max_height = 0x7f060055;
public static final int compat_notification_large_icon_max_width = 0x7f060056;
public static final int notification_action_icon_size = 0x7f0600c3;
public static final int notification_action_text_size = 0x7f0600c4;
public static final int notification_big_circle_margin = 0x7f0600c5;
public static final int notification_content_margin_start = 0x7f0600c6;
public static final int notification_large_icon_height = 0x7f0600c7;
public static final int notification_large_icon_width = 0x7f0600c8;
public static final int notification_main_column_padding_top = 0x7f0600c9;
public static final int notification_media_narrow_margin = 0x7f0600ca;
public static final int notification_right_icon_size = 0x7f0600cb;
public static final int notification_right_side_padding_top = 0x7f0600cc;
public static final int notification_small_icon_background_padding = 0x7f0600cd;
public static final int notification_small_icon_size_as_large = 0x7f0600ce;
public static final int notification_subtext_size = 0x7f0600cf;
public static final int notification_top_pad = 0x7f0600d0;
public static final int notification_top_pad_large_text = 0x7f0600d1;
}
public static final class drawable {
private drawable() {}
public static final int notification_action_background = 0x7f070083;
public static final int notification_bg = 0x7f070084;
public static final int notification_bg_low = 0x7f070085;
public static final int notification_bg_low_normal = 0x7f070086;
public static final int notification_bg_low_pressed = 0x7f070087;
public static final int notification_bg_normal = 0x7f070088;
public static final int notification_bg_normal_pressed = 0x7f070089;
public static final int notification_icon_background = 0x7f07008a;
public static final int notification_template_icon_bg = 0x7f07008b;
public static final int notification_template_icon_low_bg = 0x7f07008c;
public static final int notification_tile_bg = 0x7f07008d;
public static final int notify_panel_notification_icon_bg = 0x7f07008e;
}
public static final class id {
private id() {}
public static final int action_container = 0x7f08000f;
public static final int action_divider = 0x7f080011;
public static final int action_image = 0x7f080012;
public static final int action_text = 0x7f080018;
public static final int actions = 0x7f080019;
public static final int async = 0x7f080021;
public static final int blocking = 0x7f080027;
public static final int chronometer = 0x7f080030;
public static final int forever = 0x7f08005b;
public static final int icon = 0x7f080064;
public static final int icon_group = 0x7f080065;
public static final int info = 0x7f080069;
public static final int italic = 0x7f08006b;
public static final int line1 = 0x7f080071;
public static final int line3 = 0x7f080072;
public static final int normal = 0x7f080085;
public static final int notification_background = 0x7f080086;
public static final int notification_main_column = 0x7f080087;
public static final int notification_main_column_container = 0x7f080088;
public static final int right_icon = 0x7f080096;
public static final int right_side = 0x7f080097;
public static final int tag_transition_group = 0x7f0800c6;
public static final int tag_unhandled_key_event_manager = 0x7f0800c7;
public static final int tag_unhandled_key_listeners = 0x7f0800c8;
public static final int text = 0x7f0800ca;
public static final int text2 = 0x7f0800cb;
public static final int time = 0x7f0800d3;
public static final int title = 0x7f0800d4;
}
public static final class integer {
private integer() {}
public static final int status_bar_notification_info_maxnum = 0x7f09000f;
}
public static final class layout {
private layout() {}
public static final int notification_action = 0x7f0b0034;
public static final int notification_action_tombstone = 0x7f0b0035;
public static final int notification_template_custom_big = 0x7f0b003c;
public static final int notification_template_icon_group = 0x7f0b003d;
public static final int notification_template_part_chronometer = 0x7f0b0041;
public static final int notification_template_part_time = 0x7f0b0042;
}
public static final class string {
private string() {}
public static final int status_bar_notification_info_overflow = 0x7f0e0052;
}
public static final class style {
private style() {}
public static final int TextAppearance_Compat_Notification = 0x7f0f0118;
public static final int TextAppearance_Compat_Notification_Info = 0x7f0f0119;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0f011b;
public static final int TextAppearance_Compat_Notification_Time = 0x7f0f011e;
public static final int TextAppearance_Compat_Notification_Title = 0x7f0f0120;
public static final int Widget_Compat_NotificationActionContainer = 0x7f0f01c7;
public static final int Widget_Compat_NotificationActionText = 0x7f0f01c8;
}
public static final class styleable {
private styleable() {}
public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f030027 };
public static final int ColorStateListItem_android_color = 0;
public static final int ColorStateListItem_android_alpha = 1;
public static final int ColorStateListItem_alpha = 2;
public static final int[] FontFamily = { 0x7f0300e4, 0x7f0300e5, 0x7f0300e6, 0x7f0300e7, 0x7f0300e8, 0x7f0300e9 };
public static final int FontFamily_fontProviderAuthority = 0;
public static final int FontFamily_fontProviderCerts = 1;
public static final int FontFamily_fontProviderFetchStrategy = 2;
public static final int FontFamily_fontProviderFetchTimeout = 3;
public static final int FontFamily_fontProviderPackage = 4;
public static final int FontFamily_fontProviderQuery = 5;
public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f0300e2, 0x7f0300ea, 0x7f0300eb, 0x7f0300ec, 0x7f03021c };
public static final int FontFamilyFont_android_font = 0;
public static final int FontFamilyFont_android_fontWeight = 1;
public static final int FontFamilyFont_android_fontStyle = 2;
public static final int FontFamilyFont_android_ttcIndex = 3;
public static final int FontFamilyFont_android_fontVariationSettings = 4;
public static final int FontFamilyFont_font = 5;
public static final int FontFamilyFont_fontStyle = 6;
public static final int FontFamilyFont_fontVariationSettings = 7;
public static final int FontFamilyFont_fontWeight = 8;
public static final int FontFamilyFont_ttcIndex = 9;
public static final int[] GradientColor = { 0x101019d, 0x101019e, 0x10101a1, 0x10101a2, 0x10101a3, 0x10101a4, 0x1010201, 0x101020b, 0x1010510, 0x1010511, 0x1010512, 0x1010513 };
public static final int GradientColor_android_startColor = 0;
public static final int GradientColor_android_endColor = 1;
public static final int GradientColor_android_type = 2;
public static final int GradientColor_android_centerX = 3;
public static final int GradientColor_android_centerY = 4;
public static final int GradientColor_android_gradientRadius = 5;
public static final int GradientColor_android_tileMode = 6;
public static final int GradientColor_android_centerColor = 7;
public static final int GradientColor_android_startX = 8;
public static final int GradientColor_android_startY = 9;
public static final int GradientColor_android_endX = 10;
public static final int GradientColor_android_endY = 11;
public static final int[] GradientColorItem = { 0x10101a5, 0x1010514 };
public static final int GradientColorItem_android_color = 0;
public static final int GradientColorItem_android_offset = 1;
}
}
| [
"bibamcinstallers@gmail.com"
] | bibamcinstallers@gmail.com |
1d254795ffb9813df2cf861257dd07601bcdb879 | f4926323ff095085459939c429f9e8607759482f | /Lab-MethodParameters/src/MethodParams.java | 1e584737c514c8b3f18f31d836c93a83cfc25b24 | [] | no_license | PhilatPlay/RevAssignments | 43b5b7a218df9e9919829ff32c1fc881f2fc0492 | 5084e88aa330e88e819cd5faad2a243e6c36c9ae | refs/heads/main | 2023-06-27T17:06:06.130110 | 2021-07-23T20:42:45 | 2021-07-23T20:42:45 | 385,925,998 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 849 | java |
public class MethodParams {
public static void main(String[] args) {
//create a class instance
MethodParams mp = new MethodParams();
//call your method here
double d = mp.convertIntToDouble(44);
//print the value to the console
System.out.println(d);
System.out.println(mp.sum(1.0, 2, 3));
System.out.println(mp.sum(1.0, 2.5, 3));
System.out.println(mp.sum(1.0, 5, 3));
}
//create your first method here
public double convertIntToDouble(int num){
return (double)num;
}
// original one here*****************
public double sum(double num1, int num2, int num3){
return num1 + num2 + num3;
}
//new sum method here
public double sum(double num1, double num2, int num3){
return num1 + num2 + num3;
}
}
| [
"philip.polo@yahoo.com"
] | philip.polo@yahoo.com |
4e63a69aa1ac9f9b25c9e8683af4330af20691a5 | 67f03b9fd28393790ee51eb10dcab7fbaf7f2181 | /BomWeatherApplication/src/main/java/com/bomWeather/messageManagement/awsIoT/WeatherTopicPublisher.java | 67d5980c0c5d6596a059932e164dc315000ef030 | [] | no_license | szeyick/AlexaWeatherApp | c9156bade72310629b696b585b5f5473ffc98afc | 27bb54a68c97a6ce297af7aa6cae3b2359c4bf79 | refs/heads/master | 2020-12-02T11:04:50.940623 | 2017-07-08T09:46:45 | 2017-07-08T09:46:45 | 96,597,473 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,853 | java | package com.bomWeather.messageManagement.awsIoT;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.amazonaws.services.iot.client.AWSIotException;
import com.amazonaws.services.iot.client.AWSIotMessage;
import com.amazonaws.services.iot.client.AWSIotMqttClient;
import com.amazonaws.services.iot.client.AWSIotQos;
/**
* The WeatherTopicPublisher.
* <p>
* This publisher is responsible for sending messages back to AWS-IoT
* on a specified topic.
* <p>
* <b>Warning: </b>None.
* @author szeyick
* @version 0.0.1
*/
public class WeatherTopicPublisher {
/**
* The logger.
*/
private Logger LOGGER = LoggerFactory.getLogger(NonBlockingPublishListener.class.getSimpleName());
/**
* A reference to the AWS-IoT client.
*/
private final AWSIotMqttClient awsIotClient;
/**
* The topic to publish to.
*/
private String publishToTopic;
/**
* Constructor.
* @param awsIotClient - The AWS-IoT Client.
* @param topic - The topic to publish to.
*/
public WeatherTopicPublisher(AWSIotMqttClient awsIotClient, String topic) {
this.awsIotClient = awsIotClient;
publishToTopic = topic;
}
/**
* @param jsonPayload - The payload to send to the topic as a JSON string.
*/
public void publish(String jsonPayload) {
AWSIotMessage message = new NonBlockingPublishListener(publishToTopic, AWSIotQos.QOS0, jsonPayload);
try {
awsIotClient.publish(message);
} catch (AWSIotException e) {
LOGGER.info(System.currentTimeMillis() + ": Publish Failed - " + jsonPayload);
}
}
/**
* The NonBlockingPublishListener.
* <p>
* This class is responsible for listening to the message that has been published and
* updating the status.
* <p>
* <b>Warning: <b>None.
* <p>
* @author szeyick
* @version 0.0.1
*/
private class NonBlockingPublishListener extends AWSIotMessage {
/**
* The logger.
*/
private Logger LOGGER = LoggerFactory.getLogger(NonBlockingPublishListener.class.getSimpleName());
/**
* Constructor.
* @param topic - The topic to listen to.
* @param qos - The QoS variable.
* @param payload - The message to send.
*/
public NonBlockingPublishListener(String topic, AWSIotQos qos, String payload) {
super(topic, qos, payload);
}
/**
* {@inheritDoc}
*/
@Override
public void onSuccess() {
LOGGER.info(System.currentTimeMillis() + ": Message Successfully Sent - " + getStringPayload());
}
/**
* {@inheritDoc}
*/
@Override
public void onFailure() {
LOGGER.info(System.currentTimeMillis() + ": Message Failed To Publish - " + getStringPayload());
}
/**
* {@inheritDoc}
*/
@Override
public void onTimeout() {
LOGGER.info(System.currentTimeMillis() + ": Publish Timeout - " + getStringPayload());
}
}
} | [
"szeyick@gmail.com"
] | szeyick@gmail.com |
c3a62279d618baeee5d49a5378c0535dffbc3344 | ab4068b559f6da9f4e0f91c5a5e826ee01781794 | /app/src/main/java/com/soopercode/pingapp/AddAndPingActivity.java | 8a3052db29104a90a03617f938aae0f5ba1dbab0 | [] | no_license | schlumpf2009/PingApp_Demo | e2a7b220a2e09802402dc99154eaedfb0e4369db | f2964b3fae36bac53ef0c451d349bb9958bffa05 | refs/heads/master | 2021-01-23T04:34:27.582334 | 2016-01-23T14:06:31 | 2016-01-23T14:06:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,663 | java | package com.soopercode.pingapp;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.soopercode.pingapp.utils.HttpPinger;
import com.soopercode.pingapp.utils.StupidUserException;
import com.soopercode.pingapp.utils.Utility;
/**
* Created by ria on 1/17/16-4.
*/
public class AddAndPingActivity extends AppCompatActivity implements View.OnClickListener {
private static final String TAG = AddAndPingActivity.class.getSimpleName();
private static int dummyCounter = 0;
private EditText usersHost;
private TextView prompt;
private String validatedHost;
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_ping);
// initialize toolbar
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_add_ping);
setSupportActionBar(toolbar);
usersHost = (EditText) findViewById(R.id.usersHost);
prompt = (TextView) findViewById(R.id.promptDisplay);
// set up buttons
findViewById(R.id.buttonPingNow).setOnClickListener(this);
findViewById(R.id.buttonAdd).setOnClickListener(this);
findViewById(R.id.buttonErase).setOnClickListener(this);
}
@Override
protected void onStart() {
super.onStart();
if (dummyCounter != 0) {
setPromptTextAppearance(R.style.defaultStyle);
prompt.setText(R.string.promptDisplay);
dummyCounter = 0;
}
}
/*
Because the method is deprecated in API 23+
*/
private void setPromptTextAppearance(final int style){
if (Build.VERSION.SDK_INT < 23) {
prompt.setTextAppearance(this, style);
} else {
prompt.setTextAppearance(style);
}
}
/**
* Verifies whether the text entered by the user constitutes a valid URL,
* returns true if it does, or alerts the user if it does not.
*
* @param hostname The text entered by the user
* @return true if a valid URL has been obtained
*/
private boolean validateHostname(final String hostname) {
try {
validatedHost = Utility.validateHostname(hostname);
usersHost.setText(validatedHost);
//check the dummy-state:
if (dummyCounter != 0) {
setPromptTextAppearance(R.style.defaultStyle);
prompt.setText(R.string.promptDisplay);
dummyCounter = 0;
}
return true;
} catch (StupidUserException sue) {
switch (dummyCounter) {
case 0:
prompt.setText(" Oops! Try again...");
setPromptTextAppearance(R.style.negativeStyle);
dummyCounter++;
break;
case 1:
prompt.setText(" Come on, it can't be that hard!");
dummyCounter++;
break;
case 2:
prompt.setText(" uhm... sure you wanna do this??");
dummyCounter++;
break;
case 3:
prompt.setText(" Urrgh, I give up!");
dummyCounter++;
break;
default:
prompt.setText(getString(R.string.promptDisplay));
setPromptTextAppearance(R.style.defaultStyle);
dummyCounter = 0;
}
usersHost.requestFocus();
Log.e(TAG, sue.toString(), sue);
return false;
}
}
/**
* AsyncTask that handles all operations necessary for
* pinging the host in the text field, including
* operations that run on a background thread.
*
* @author Ria
*/
private class QuickPing extends AsyncTask<String, Void, Bundle> {
private ProgressDialog progressDialog;
/**
* Sets up a progress wheel to indicate to the user that
* pinging is being performed. Runs on the UI thread.
*/
@Override
protected void onPreExecute() {
progressDialog = new ProgressDialog(AddAndPingActivity.this);
progressDialog.setMessage(getString(R.string.async_progress));
progressDialog.show();
}
/**
* Pings the specified host using a background thread.
* The specified parameters are those passed to {@link #execute}
* when MainActivity starts this task. In this case it will always
* be a single {@code String} representing the URL to be pinged.
*
* @param hostnames The URL to be pinged
* @return A Bundle containing response code
* and response message
*/
@Override
protected Bundle doInBackground(final String... hostnames) {
return new HttpPinger().getResponse(hostnames[0]);
}
/**
* Runs on the UI thread after {@link #doInBackground}. The specified
* parameter is the value returned by {@link #doInBackground}. [SDK quote]
* Starts {@link DisplayResponseActivity}, passing it the {@code Bundle}
* containing response code and response message.
*
* @param response A Bundle containing response code and response message
*/
@Override
protected void onPostExecute(final Bundle response) {
if (progressDialog.isShowing()) {
progressDialog.dismiss();
}
final Intent displayResponse = new Intent(AddAndPingActivity.this, DisplayResponseActivity.class);
displayResponse.putExtra("response", response);
startActivity(displayResponse);
}
}
@Override
public void onClick(final View view) {
switch (view.getId()) {
case R.id.buttonErase:
usersHost.setText("");
if (dummyCounter == 0) {
prompt.setText(R.string.promptDisplay);
setPromptTextAppearance(R.style.defaultStyle);
}
break;
case R.id.buttonPingNow:
if (validateHostname(usersHost.getText().toString())) {
// if we have a valid hostname: ping it
if (Utility.isConnected(this)) {
new QuickPing().execute(validatedHost);
} else {
Toast.makeText(this, getString(R.string.offline_toast), Toast.LENGTH_SHORT).show();
}
}
break;
case R.id.buttonAdd:
final String hostname = usersHost.getText().toString();
// validate hostname before we do anything:
if (validateHostname(hostname)) {
Log.d(TAG, "finish with new hostname: " + validatedHost);
final Intent intent = new Intent();
intent.putExtra(MainActivity.EXTRA_HOSTNAME, validatedHost);
setResult(RESULT_OK, intent);
finish();
} else {
Log.d(TAG, "validation returned false");
}
break;
}
}
}
| [
"ria.korngiebel@quartett-mobile.de"
] | ria.korngiebel@quartett-mobile.de |
8872aba51e8f9e57f2d037398efe2f27065eba11 | 63bdd09785b045f510dad5575a59704ba267cc68 | /com/class4/Task1.java | 4107892e1c8022c0d5da978fa33f80ae0c240548 | [] | no_license | ekizoglu/JavaClasses | 926fd8ad26baad90b08080592deae8bb0596a77b | d408b48a965b34b35a8d989f4a6dbb14f532519f | refs/heads/master | 2020-09-04T21:01:05.823071 | 2019-12-27T07:20:02 | 2019-12-27T07:20:02 | 219,890,966 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 647 | java | package com.class4;
public class Task1 {
public static void main(String[] args) {
/*
* we need to check if student completed the quiz
* if yes --> good job, if not --> not good
* if they completed we will check score:
* if more than 90 --> you got an A
* if more than 80 --> you got a B
* anything below --> you should study more
*/
boolean quiz = true;
int score = 89;
if (quiz)
{
System.out.println("Good job!");
if(score>=90)
{
System.out.println("You got an A");
}
else if(score>=80) {
System.out.println("You got a B");
}
}else {
System.out.println("Not good");
}
}
}
| [
"meekizoglu@gmail.com"
] | meekizoglu@gmail.com |
0732a3de3d41e71ac9d195b67ebc3259690c5b86 | 1efcc13e41fc932413c88bb00ed181c77da8cebc | /gobiiproject/gobii-model/src/main/java/org/gobiiproject/gobiimodel/dto/container/ExperimentDTO.java | 8d7590cdffd9ab257fd49bbe1f6edbb5837ebc4e | [
"MIT"
] | permissive | gobiiproject/GOBii-System | 466478089ec8ca12f7e560996f3409afae205c88 | cab3432ddec4546140a29b157e767f71456531ec | refs/heads/master | 2021-01-11T23:25:58.902840 | 2018-07-13T01:03:38 | 2018-07-13T01:03:38 | 78,578,773 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,465 | java | package org.gobiiproject.gobiimodel.dto.container;
import org.gobiiproject.gobiimodel.dto.DtoMetaData;
import org.gobiiproject.gobiimodel.dto.annotations.GobiiEntityColumn;
import org.gobiiproject.gobiimodel.dto.annotations.GobiiEntityParam;
import java.util.Date;
/**
* Created by Angel on 4/13/2016.
*/
public class ExperimentDTO extends DtoMetaData {
public ExperimentDTO() {
}
public ExperimentDTO(ProcessType processType) {
super(processType);
}
private Integer experimentId;
private String experimentName = null;
private String experimentCode = null;
private String experimentDataFile = null;
private Integer projectId;
private Integer platformId;
private String platformName;
private Integer manifestId;
private Integer createdBy;
private Date createdDate;
private Integer modifiedBy;
private Date modifiedDate;
private Integer status;
@GobiiEntityParam(paramName = "experimentId")
public Integer getExperimentId() {
return experimentId;
}
@GobiiEntityColumn(columnName = "experiment_id")
public void setExperimentId(Integer experimentId) {
this.experimentId = experimentId;
}
@GobiiEntityParam(paramName = "experimentName")
public String getExperimentName() {
return experimentName;
}
@GobiiEntityColumn(columnName = "name")
public void setExperimentName(String experimentName) {
this.experimentName = experimentName;
}
@GobiiEntityParam(paramName = "experimentCode")
public String getExperimentCode() {
return experimentCode;
}
@GobiiEntityColumn(columnName = "code")
public void setExperimentCode(String experimentCode) {
this.experimentCode = experimentCode;
}
@GobiiEntityParam(paramName = "experimentDataFile")
public String getExperimentDataFile() {
return experimentDataFile;
}
@GobiiEntityColumn(columnName = "data_file")
public void setExperimentDataFile(String dataFile) {
this.experimentDataFile = dataFile;
}
@GobiiEntityParam(paramName = "projectId")
public Integer getProjectId() {
return projectId;
}
@GobiiEntityColumn(columnName = "project_id")
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
@GobiiEntityParam(paramName = "platformId")
public Integer getPlatformId() {
return platformId;
}
@GobiiEntityColumn(columnName = "platform_id")
public void setPlatformId(Integer platformId) {
this.platformId = platformId;
}
@GobiiEntityParam(paramName = "platformName")
public String getPlatformName() {
return platformName;
}
@GobiiEntityColumn(columnName = "platform_name")
public void setPlatformName(String platformName) {
this.platformName = platformName;
}
@GobiiEntityParam(paramName = "manifestId")
public Integer getManifestId() {
return manifestId;
}
@GobiiEntityColumn(columnName = "manifest_id")
public void setManifestId(Integer manifestId) {
this.manifestId = manifestId;
}
@GobiiEntityParam(paramName = "createdBy")
public Integer getCreatedBy() {
return createdBy;
}
@GobiiEntityColumn(columnName = "created_by")
public void setCreatedBy(Integer createdBy) {
this.createdBy = createdBy;
}
@GobiiEntityParam(paramName = "createDate")
public Date getCreatedDate() {
return createdDate;
}
@GobiiEntityColumn(columnName = "created_date")
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
@GobiiEntityParam(paramName = "modifiedBy")
public Integer getModifiedBy() {
return modifiedBy;
}
@GobiiEntityColumn(columnName = "modified_by")
public void setModifiedBy(Integer modifiedBy) {
this.modifiedBy = modifiedBy;
}
@GobiiEntityParam(paramName = "modifiedDate")
public Date getModifiedDate() {
return modifiedDate;
}
@GobiiEntityColumn(columnName = "modified_date")
public void setModifiedDate(Date modifiedDate) {
this.modifiedDate = modifiedDate;
}
@GobiiEntityParam(paramName = "status")
public Integer getStatus() {
return status;
}
@GobiiEntityColumn(columnName = "status")
public void setStatus(Integer status) {
this.status = status;
}
}
| [
"jdl232@cornell.edu"
] | jdl232@cornell.edu |
8b2e2e20466c8375b756cd19078a9d80f932eaf8 | 8b3f90bd32f9b97ed408625b84f32a3c52e734c2 | /MKOFFICE_FINAL/src/main/java/br/com/mkoffice/business/exception/ValidationFormAbstractException.java | 7f29293a01da440afc3c823b80b7e3dba5c98a98 | [] | no_license | christopherscotini/projetofinal | 7b6bd2e65df41826dbd6010ba6c1827b6916cabd | ff32ae3c180ba624d48af087b99e426f21ca8df5 | refs/heads/master | 2021-01-02T08:19:19.757586 | 2014-12-03T19:18:56 | 2014-12-03T19:18:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 516 | java | package br.com.mkoffice.business.exception;
import javax.ejb.ApplicationException;
import br.com.mkoffice.exceptions.BusinessException;
@ApplicationException(rollback=true)
public abstract class ValidationFormAbstractException extends BusinessException {
private static final long serialVersionUID = -1375463370969538895L;
public ValidationFormAbstractException(String message, Throwable cause) {
super(message, cause);
}
public ValidationFormAbstractException(String message) {
super(message);
}
}
| [
"christopherscotini@hotmail.com"
] | christopherscotini@hotmail.com |
78afcef26331a7042bc93e74e77c52709633dde3 | b5443ddf6db2f5d4b24b26dd994acc50c17b6026 | /src/test/java/ua/phonebook/test/integration/dao/file/FileUserRepositoryIntegrationTest.java | 138ba3ca990d406e54d15952e6a9b2d409e7dfea | [] | no_license | bondom/phonebook | 4c68b5723eb0c5f3951b0bf4ac832c0f4b652b3d | e74049134aa681e443de0e519cffa71c11770035 | refs/heads/master | 2021-01-16T23:09:48.231823 | 2017-01-13T18:42:28 | 2017-01-13T18:42:28 | 72,275,345 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,029 | java | package ua.phonebook.test.integration.dao.file;
import static org.junit.Assert.*;
import java.io.File;
import java.io.IOException;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;
import ua.phonebook.dao.BaseUserRepository;
import ua.phonebook.model.User;
/**
* This class does integration tests with files, paths to them are represented in
* {@code TestPropertySource}.
*/
@RunWith(SpringRunner.class)
@ContextConfiguration(classes = FileRepositoryIntegrationConfiguration.class)
@TestPropertySource(properties = {"filestorage.phonebookrecords.path=D:/phonebookrepotest.json",
"filestorage.users.path=D:/userrepotest.json"})
@ActiveProfiles({"file","filerepotest"})
public class FileUserRepositoryIntegrationTest {
@Value("${filestorage.users.path}")
private String filePath;
@Value("${filestorage.phonebookrecords.path}")
private String filePathToPhoneBookRecords;
@Autowired
private BaseUserRepository fileRepo;
private File temporaryStorage;
//we use this variable only for deleting file, created
//by @PostConstruct of repository implementation
private static File temporaryRecordsStorage;
private User firstUser;
@Before
public void getInstanceOfTemporaryStoragesAndSaveOneUser() throws IOException, NoSuchFieldException,
SecurityException, IllegalArgumentException, IllegalAccessException{
temporaryStorage = new File(filePath);
temporaryRecordsStorage = new File(filePathToPhoneBookRecords);
temporaryStorage.createNewFile();
firstUser = new User("InBefore","InBefore");
firstUser.setFullName("Tolik");
fileRepo.saveAndFlush(firstUser);
}
@After
public void deleteTemporaryStorages(){
temporaryStorage.delete();
}
@AfterClass
public static void deleteUsersStorageCreatedByRepoImpl(){
//because this is integration test, we are doing autowiring,
//and all file repository implementations are initialized by Spring
//so we must delete storage, which is created by @PostConstruct method
temporaryRecordsStorage.delete();
}
@Test
public void testSaveAndFlush(){
User newUser = new User("login", "password");
newUser.setFullName("testfullName");
User savedUser = fileRepo.saveAndFlush(newUser);
assertArrayEquals(new String[]{newUser.getLogin()}, new String[]{savedUser.getLogin()});
assertTrue(savedUser.getId()>1);
}
@Test
public void testGetUser(){
User userFromFile = fileRepo.getUserByLogin(firstUser.getLogin());
assertArrayEquals(new String[]{userFromFile.getLogin(),userFromFile.getFullName()},
new String[]{firstUser.getLogin(),firstUser.getFullName()});
}
}
| [
"alpachino48@gmail.com"
] | alpachino48@gmail.com |
c61b0bc9530142745c0a1e076fe79b3ac604cefd | 2a25139e5b92a557a2023f63cff184c2242ef4bd | /account-api/src/main/java/fr/jg/account/controllers/estate/cashAccount/CategoryController.java | 501d4facb8e24208fe1cbd35b8a5c583d9b025e9 | [] | no_license | J-GG/account | b767bb4507c30b403c9d9f1843686d21343e6e65 | 2148a12fb53c80a7dbe27afd58a9f4efe0d2b475 | refs/heads/master | 2022-11-08T07:57:17.588872 | 2020-06-28T10:19:43 | 2020-06-28T10:19:43 | 270,422,697 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,052 | java | package fr.jg.account.controllers.estate.cashAccount;
import fr.jg.account.domain.estate.cashAccount.Category;
import fr.jg.account.dto.estate.cashAccount.CategoryDto;
import fr.jg.account.mappers.estate.cashAccount.CategoryMapper;
import fr.jg.account.ports.primary.estate.cashAccount.CategoryBusiness;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.hateoas.CollectionModel;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo;
@RestController
@RequestMapping("/categories")
public class CategoryController {
@Autowired
private CategoryBusiness categoryBusiness;
@Autowired
private CategoryMapper categoryMapper;
@GetMapping
public CollectionModel<CategoryDto> getCategories() {
final CollectionModel<CategoryDto> categoryDtos = CollectionModel.of(this.categoryMapper.domainToDto(this.categoryBusiness.getAll()));
categoryDtos.add(linkTo(CategoryController.class).withSelfRel());
return categoryDtos;
}
@GetMapping("/{id}")
public CategoryDto getCategory(@PathVariable("id") final Long categoryId) {
return this.categoryMapper.domainToDto(this.categoryBusiness.get(categoryId));
}
@GetMapping("/{id}/children")
public CollectionModel<CategoryDto> getCategoryChildren(@PathVariable("id") final Long categoryId) throws NoSuchMethodException {
final List<Category> category = this.categoryBusiness.get(categoryId).getChildren();
final CollectionModel<CategoryDto> categoryDtos = CollectionModel.of(this.categoryMapper.domainToDto(category));
categoryDtos.add(linkTo(CategoryController.class.getMethod("getCategoryChildren", Long.class), categoryId).withSelfRel());
return categoryDtos;
}
} | [
"jeangabriel.genest@gmail.com"
] | jeangabriel.genest@gmail.com |
ebfa024a5d6d3742cd94633753ce896bd585d589 | c755ac87127d13ae6f93f84a83557ecfbefda9a5 | /app/build/generated/source/r/xiaomi/release/android/support/v7/appcompat/R.java | 292f02dc80a662faf6e1330cf7a79a2eb8ef568a | [
"Apache-2.0"
] | permissive | jiangxj/loan-android | 380d28bfe0cf2156be606f3c320747df1364c42d | d3c6feeb1672b3b2e0a3df96a7ed04e71136a9b8 | refs/heads/master | 2021-07-14T12:16:02.261879 | 2017-10-19T11:19:38 | 2017-10-19T11:19:38 | 107,536,516 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 92,560 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package android.support.v7.appcompat;
public final class R {
public static final class anim {
public static final int abc_fade_in = 0x7f050000;
public static final int abc_fade_out = 0x7f050001;
public static final int abc_grow_fade_in_from_bottom = 0x7f050002;
public static final int abc_popup_enter = 0x7f050003;
public static final int abc_popup_exit = 0x7f050004;
public static final int abc_shrink_fade_out_from_bottom = 0x7f050005;
public static final int abc_slide_in_bottom = 0x7f050006;
public static final int abc_slide_in_top = 0x7f050007;
public static final int abc_slide_out_bottom = 0x7f050008;
public static final int abc_slide_out_top = 0x7f050009;
}
public static final class attr {
public static final int actionBarDivider = 0x7f0100c3;
public static final int actionBarItemBackground = 0x7f0100c4;
public static final int actionBarPopupTheme = 0x7f0100bd;
public static final int actionBarSize = 0x7f0100c2;
public static final int actionBarSplitStyle = 0x7f0100bf;
public static final int actionBarStyle = 0x7f0100be;
public static final int actionBarTabBarStyle = 0x7f0100b9;
public static final int actionBarTabStyle = 0x7f0100b8;
public static final int actionBarTabTextStyle = 0x7f0100ba;
public static final int actionBarTheme = 0x7f0100c0;
public static final int actionBarWidgetTheme = 0x7f0100c1;
public static final int actionButtonStyle = 0x7f0100dd;
public static final int actionDropDownStyle = 0x7f0100d9;
public static final int actionLayout = 0x7f01006f;
public static final int actionMenuTextAppearance = 0x7f0100c5;
public static final int actionMenuTextColor = 0x7f0100c6;
public static final int actionModeBackground = 0x7f0100c9;
public static final int actionModeCloseButtonStyle = 0x7f0100c8;
public static final int actionModeCloseDrawable = 0x7f0100cb;
public static final int actionModeCopyDrawable = 0x7f0100cd;
public static final int actionModeCutDrawable = 0x7f0100cc;
public static final int actionModeFindDrawable = 0x7f0100d1;
public static final int actionModePasteDrawable = 0x7f0100ce;
public static final int actionModePopupWindowStyle = 0x7f0100d3;
public static final int actionModeSelectAllDrawable = 0x7f0100cf;
public static final int actionModeShareDrawable = 0x7f0100d0;
public static final int actionModeSplitBackground = 0x7f0100ca;
public static final int actionModeStyle = 0x7f0100c7;
public static final int actionModeWebSearchDrawable = 0x7f0100d2;
public static final int actionOverflowButtonStyle = 0x7f0100bb;
public static final int actionOverflowMenuStyle = 0x7f0100bc;
public static final int actionProviderClass = 0x7f010071;
public static final int actionViewClass = 0x7f010070;
public static final int activityChooserViewStyle = 0x7f0100e5;
public static final int alertDialogButtonGroupStyle = 0x7f010108;
public static final int alertDialogCenterButtons = 0x7f010109;
public static final int alertDialogStyle = 0x7f010107;
public static final int alertDialogTheme = 0x7f01010a;
public static final int allowStacking = 0x7f01002a;
public static final int arrowHeadLength = 0x7f010049;
public static final int arrowShaftLength = 0x7f01004a;
public static final int autoCompleteTextViewStyle = 0x7f01010f;
public static final int background = 0x7f01000c;
public static final int backgroundSplit = 0x7f01000e;
public static final int backgroundStacked = 0x7f01000d;
public static final int backgroundTint = 0x7f01012c;
public static final int backgroundTintMode = 0x7f01012d;
public static final int barLength = 0x7f01004b;
public static final int borderlessButtonStyle = 0x7f0100e2;
public static final int buttonBarButtonStyle = 0x7f0100df;
public static final int buttonBarNegativeButtonStyle = 0x7f01010d;
public static final int buttonBarNeutralButtonStyle = 0x7f01010e;
public static final int buttonBarPositiveButtonStyle = 0x7f01010c;
public static final int buttonBarStyle = 0x7f0100de;
public static final int buttonPanelSideLayout = 0x7f01001f;
public static final int buttonStyle = 0x7f010110;
public static final int buttonStyleSmall = 0x7f010111;
public static final int buttonTint = 0x7f01003d;
public static final int buttonTintMode = 0x7f01003e;
public static final int checkboxStyle = 0x7f010112;
public static final int checkedTextViewStyle = 0x7f010113;
public static final int closeIcon = 0x7f010085;
public static final int closeItemLayout = 0x7f01001c;
public static final int collapseContentDescription = 0x7f010123;
public static final int collapseIcon = 0x7f010122;
public static final int color = 0x7f010045;
public static final int colorAccent = 0x7f010100;
public static final int colorButtonNormal = 0x7f010104;
public static final int colorControlActivated = 0x7f010102;
public static final int colorControlHighlight = 0x7f010103;
public static final int colorControlNormal = 0x7f010101;
public static final int colorPrimary = 0x7f0100fe;
public static final int colorPrimaryDark = 0x7f0100ff;
public static final int colorSwitchThumbNormal = 0x7f010105;
public static final int commitIcon = 0x7f01008a;
public static final int contentInsetEnd = 0x7f010017;
public static final int contentInsetLeft = 0x7f010018;
public static final int contentInsetRight = 0x7f010019;
public static final int contentInsetStart = 0x7f010016;
public static final int controlBackground = 0x7f010106;
public static final int customNavigationLayout = 0x7f01000f;
public static final int defaultQueryHint = 0x7f010084;
public static final int dialogPreferredPadding = 0x7f0100d7;
public static final int dialogTheme = 0x7f0100d6;
public static final int displayOptions = 0x7f010005;
public static final int divider = 0x7f01000b;
public static final int dividerHorizontal = 0x7f0100e4;
public static final int dividerPadding = 0x7f01006d;
public static final int dividerVertical = 0x7f0100e3;
public static final int drawableSize = 0x7f010047;
public static final int drawerArrowStyle = 0x7f010000;
public static final int dropDownListViewStyle = 0x7f0100f6;
public static final int dropdownListPreferredItemHeight = 0x7f0100da;
public static final int editTextBackground = 0x7f0100eb;
public static final int editTextColor = 0x7f0100ea;
public static final int editTextStyle = 0x7f010114;
public static final int elevation = 0x7f01001a;
public static final int expandActivityOverflowButtonDrawable = 0x7f01001e;
public static final int gapBetweenBars = 0x7f010048;
public static final int goIcon = 0x7f010086;
public static final int height = 0x7f010001;
public static final int hideOnContentScroll = 0x7f010015;
public static final int homeAsUpIndicator = 0x7f0100dc;
public static final int homeLayout = 0x7f010010;
public static final int icon = 0x7f010009;
public static final int iconifiedByDefault = 0x7f010082;
public static final int imageButtonStyle = 0x7f0100ec;
public static final int indeterminateProgressStyle = 0x7f010012;
public static final int initialActivityCount = 0x7f01001d;
public static final int isLightTheme = 0x7f010002;
public static final int itemPadding = 0x7f010014;
public static final int layout = 0x7f010081;
public static final int listChoiceBackgroundIndicator = 0x7f0100fd;
public static final int listDividerAlertDialog = 0x7f0100d8;
public static final int listItemLayout = 0x7f010023;
public static final int listLayout = 0x7f010020;
public static final int listPopupWindowStyle = 0x7f0100f7;
public static final int listPreferredItemHeight = 0x7f0100f1;
public static final int listPreferredItemHeightLarge = 0x7f0100f3;
public static final int listPreferredItemHeightSmall = 0x7f0100f2;
public static final int listPreferredItemPaddingLeft = 0x7f0100f4;
public static final int listPreferredItemPaddingRight = 0x7f0100f5;
public static final int logo = 0x7f01000a;
public static final int logoDescription = 0x7f010126;
public static final int maxButtonHeight = 0x7f010121;
public static final int measureWithLargestChild = 0x7f01006b;
public static final int multiChoiceItemLayout = 0x7f010021;
public static final int navigationContentDescription = 0x7f010125;
public static final int navigationIcon = 0x7f010124;
public static final int navigationMode = 0x7f010004;
public static final int overlapAnchor = 0x7f010079;
public static final int paddingEnd = 0x7f01012a;
public static final int paddingStart = 0x7f010129;
public static final int panelBackground = 0x7f0100fa;
public static final int panelMenuListTheme = 0x7f0100fc;
public static final int panelMenuListWidth = 0x7f0100fb;
public static final int popupMenuStyle = 0x7f0100e8;
public static final int popupTheme = 0x7f01001b;
public static final int popupWindowStyle = 0x7f0100e9;
public static final int preserveIconSpacing = 0x7f010072;
public static final int progressBarPadding = 0x7f010013;
public static final int progressBarStyle = 0x7f010011;
public static final int queryBackground = 0x7f01008c;
public static final int queryHint = 0x7f010083;
public static final int radioButtonStyle = 0x7f010115;
public static final int ratingBarStyle = 0x7f010116;
public static final int searchHintIcon = 0x7f010088;
public static final int searchIcon = 0x7f010087;
public static final int searchViewStyle = 0x7f0100f0;
public static final int seekBarStyle = 0x7f010117;
public static final int selectableItemBackground = 0x7f0100e0;
public static final int selectableItemBackgroundBorderless = 0x7f0100e1;
public static final int showAsAction = 0x7f01006e;
public static final int showDividers = 0x7f01006c;
public static final int showText = 0x7f010095;
public static final int singleChoiceItemLayout = 0x7f010022;
public static final int spinBars = 0x7f010046;
public static final int spinnerDropDownItemStyle = 0x7f0100db;
public static final int spinnerStyle = 0x7f010118;
public static final int splitTrack = 0x7f010094;
public static final int state_above_anchor = 0x7f01007a;
public static final int submitBackground = 0x7f01008d;
public static final int subtitle = 0x7f010006;
public static final int subtitleTextAppearance = 0x7f01011b;
public static final int subtitleTextColor = 0x7f010128;
public static final int subtitleTextStyle = 0x7f010008;
public static final int suggestionRowLayout = 0x7f01008b;
public static final int switchMinWidth = 0x7f010092;
public static final int switchPadding = 0x7f010093;
public static final int switchStyle = 0x7f010119;
public static final int switchTextAppearance = 0x7f010091;
public static final int textAllCaps = 0x7f010027;
public static final int textAppearanceLargePopupMenu = 0x7f0100d4;
public static final int textAppearanceListItem = 0x7f0100f8;
public static final int textAppearanceListItemSmall = 0x7f0100f9;
public static final int textAppearanceSearchResultSubtitle = 0x7f0100ee;
public static final int textAppearanceSearchResultTitle = 0x7f0100ed;
public static final int textAppearanceSmallPopupMenu = 0x7f0100d5;
public static final int textColorAlertDialogListItem = 0x7f01010b;
public static final int textColorSearchUrl = 0x7f0100ef;
public static final int theme = 0x7f01012b;
public static final int thickness = 0x7f01004c;
public static final int thumbTextPadding = 0x7f010090;
public static final int title = 0x7f010003;
public static final int titleMarginBottom = 0x7f010120;
public static final int titleMarginEnd = 0x7f01011e;
public static final int titleMarginStart = 0x7f01011d;
public static final int titleMarginTop = 0x7f01011f;
public static final int titleMargins = 0x7f01011c;
public static final int titleTextAppearance = 0x7f01011a;
public static final int titleTextColor = 0x7f010127;
public static final int titleTextStyle = 0x7f010007;
public static final int toolbarNavigationButtonStyle = 0x7f0100e7;
public static final int toolbarStyle = 0x7f0100e6;
public static final int track = 0x7f01008f;
public static final int voiceIcon = 0x7f010089;
public static final int windowActionBar = 0x7f0100ae;
public static final int windowActionBarOverlay = 0x7f0100b0;
public static final int windowActionModeOverlay = 0x7f0100b1;
public static final int windowFixedHeightMajor = 0x7f0100b5;
public static final int windowFixedHeightMinor = 0x7f0100b3;
public static final int windowFixedWidthMajor = 0x7f0100b2;
public static final int windowFixedWidthMinor = 0x7f0100b4;
public static final int windowMinWidthMajor = 0x7f0100b6;
public static final int windowMinWidthMinor = 0x7f0100b7;
public static final int windowNoTitle = 0x7f0100af;
}
public static final class bool {
public static final int abc_action_bar_embed_tabs = 0x7f090003;
public static final int abc_action_bar_embed_tabs_pre_jb = 0x7f090001;
public static final int abc_action_bar_expanded_action_views_exclusive = 0x7f090004;
public static final int abc_allow_stacked_button_bar = 0x7f090000;
public static final int abc_config_actionMenuItemAllCaps = 0x7f090005;
public static final int abc_config_allowActionMenuItemTextWithIcon = 0x7f090002;
public static final int abc_config_closeDialogWhenTouchOutside = 0x7f090006;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f090007;
}
public static final class color {
public static final int abc_background_cache_hint_selector_material_dark = 0x7f0d0052;
public static final int abc_background_cache_hint_selector_material_light = 0x7f0d0053;
public static final int abc_color_highlight_material = 0x7f0d0054;
public static final int abc_input_method_navigation_guard = 0x7f0d0000;
public static final int abc_primary_text_disable_only_material_dark = 0x7f0d0055;
public static final int abc_primary_text_disable_only_material_light = 0x7f0d0056;
public static final int abc_primary_text_material_dark = 0x7f0d0057;
public static final int abc_primary_text_material_light = 0x7f0d0058;
public static final int abc_search_url_text = 0x7f0d0059;
public static final int abc_search_url_text_normal = 0x7f0d0001;
public static final int abc_search_url_text_pressed = 0x7f0d0002;
public static final int abc_search_url_text_selected = 0x7f0d0003;
public static final int abc_secondary_text_material_dark = 0x7f0d005a;
public static final int abc_secondary_text_material_light = 0x7f0d005b;
public static final int accent_material_dark = 0x7f0d0004;
public static final int accent_material_light = 0x7f0d0005;
public static final int background_floating_material_dark = 0x7f0d0006;
public static final int background_floating_material_light = 0x7f0d0007;
public static final int background_material_dark = 0x7f0d0008;
public static final int background_material_light = 0x7f0d0009;
public static final int bright_foreground_disabled_material_dark = 0x7f0d000b;
public static final int bright_foreground_disabled_material_light = 0x7f0d000c;
public static final int bright_foreground_inverse_material_dark = 0x7f0d000d;
public static final int bright_foreground_inverse_material_light = 0x7f0d000e;
public static final int bright_foreground_material_dark = 0x7f0d000f;
public static final int bright_foreground_material_light = 0x7f0d0010;
public static final int button_material_dark = 0x7f0d0011;
public static final int button_material_light = 0x7f0d0012;
public static final int dim_foreground_disabled_material_dark = 0x7f0d001f;
public static final int dim_foreground_disabled_material_light = 0x7f0d0020;
public static final int dim_foreground_material_dark = 0x7f0d0021;
public static final int dim_foreground_material_light = 0x7f0d0022;
public static final int foreground_material_dark = 0x7f0d0023;
public static final int foreground_material_light = 0x7f0d0024;
public static final int highlighted_text_material_dark = 0x7f0d0025;
public static final int highlighted_text_material_light = 0x7f0d0026;
public static final int hint_foreground_material_dark = 0x7f0d0027;
public static final int hint_foreground_material_light = 0x7f0d0028;
public static final int material_blue_grey_800 = 0x7f0d002a;
public static final int material_blue_grey_900 = 0x7f0d002b;
public static final int material_blue_grey_950 = 0x7f0d002c;
public static final int material_deep_teal_200 = 0x7f0d002d;
public static final int material_deep_teal_500 = 0x7f0d002e;
public static final int material_grey_100 = 0x7f0d002f;
public static final int material_grey_300 = 0x7f0d0030;
public static final int material_grey_50 = 0x7f0d0031;
public static final int material_grey_600 = 0x7f0d0032;
public static final int material_grey_800 = 0x7f0d0033;
public static final int material_grey_850 = 0x7f0d0034;
public static final int material_grey_900 = 0x7f0d0035;
public static final int primary_dark_material_dark = 0x7f0d0036;
public static final int primary_dark_material_light = 0x7f0d0037;
public static final int primary_material_dark = 0x7f0d0038;
public static final int primary_material_light = 0x7f0d0039;
public static final int primary_text_default_material_dark = 0x7f0d003a;
public static final int primary_text_default_material_light = 0x7f0d003b;
public static final int primary_text_disabled_material_dark = 0x7f0d003c;
public static final int primary_text_disabled_material_light = 0x7f0d003d;
public static final int ripple_material_dark = 0x7f0d003e;
public static final int ripple_material_light = 0x7f0d003f;
public static final int secondary_text_default_material_dark = 0x7f0d0040;
public static final int secondary_text_default_material_light = 0x7f0d0041;
public static final int secondary_text_disabled_material_dark = 0x7f0d0042;
public static final int secondary_text_disabled_material_light = 0x7f0d0043;
public static final int switch_thumb_disabled_material_dark = 0x7f0d0044;
public static final int switch_thumb_disabled_material_light = 0x7f0d0045;
public static final int switch_thumb_material_dark = 0x7f0d005c;
public static final int switch_thumb_material_light = 0x7f0d005d;
public static final int switch_thumb_normal_material_dark = 0x7f0d0046;
public static final int switch_thumb_normal_material_light = 0x7f0d0047;
}
public static final class dimen {
public static final int abc_action_bar_content_inset_material = 0x7f0a000d;
public static final int abc_action_bar_default_height_material = 0x7f0a0001;
public static final int abc_action_bar_default_padding_end_material = 0x7f0a000e;
public static final int abc_action_bar_default_padding_start_material = 0x7f0a000f;
public static final int abc_action_bar_icon_vertical_padding_material = 0x7f0a0019;
public static final int abc_action_bar_overflow_padding_end_material = 0x7f0a001a;
public static final int abc_action_bar_overflow_padding_start_material = 0x7f0a001b;
public static final int abc_action_bar_progress_bar_size = 0x7f0a0002;
public static final int abc_action_bar_stacked_max_height = 0x7f0a001c;
public static final int abc_action_bar_stacked_tab_max_width = 0x7f0a001d;
public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f0a001e;
public static final int abc_action_bar_subtitle_top_margin_material = 0x7f0a001f;
public static final int abc_action_button_min_height_material = 0x7f0a0020;
public static final int abc_action_button_min_width_material = 0x7f0a0021;
public static final int abc_action_button_min_width_overflow_material = 0x7f0a0022;
public static final int abc_alert_dialog_button_bar_height = 0x7f0a0000;
public static final int abc_button_inset_horizontal_material = 0x7f0a0023;
public static final int abc_button_inset_vertical_material = 0x7f0a0024;
public static final int abc_button_padding_horizontal_material = 0x7f0a0025;
public static final int abc_button_padding_vertical_material = 0x7f0a0026;
public static final int abc_config_prefDialogWidth = 0x7f0a0005;
public static final int abc_control_corner_material = 0x7f0a0027;
public static final int abc_control_inset_material = 0x7f0a0028;
public static final int abc_control_padding_material = 0x7f0a0029;
public static final int abc_dialog_fixed_height_major = 0x7f0a0006;
public static final int abc_dialog_fixed_height_minor = 0x7f0a0007;
public static final int abc_dialog_fixed_width_major = 0x7f0a0008;
public static final int abc_dialog_fixed_width_minor = 0x7f0a0009;
public static final int abc_dialog_list_padding_vertical_material = 0x7f0a002a;
public static final int abc_dialog_min_width_major = 0x7f0a000a;
public static final int abc_dialog_min_width_minor = 0x7f0a000b;
public static final int abc_dialog_padding_material = 0x7f0a002b;
public static final int abc_dialog_padding_top_material = 0x7f0a002c;
public static final int abc_disabled_alpha_material_dark = 0x7f0a002d;
public static final int abc_disabled_alpha_material_light = 0x7f0a002e;
public static final int abc_dropdownitem_icon_width = 0x7f0a002f;
public static final int abc_dropdownitem_text_padding_left = 0x7f0a0030;
public static final int abc_dropdownitem_text_padding_right = 0x7f0a0031;
public static final int abc_edit_text_inset_bottom_material = 0x7f0a0032;
public static final int abc_edit_text_inset_horizontal_material = 0x7f0a0033;
public static final int abc_edit_text_inset_top_material = 0x7f0a0034;
public static final int abc_floating_window_z = 0x7f0a0035;
public static final int abc_list_item_padding_horizontal_material = 0x7f0a0036;
public static final int abc_panel_menu_list_width = 0x7f0a0037;
public static final int abc_search_view_preferred_width = 0x7f0a0038;
public static final int abc_search_view_text_min_width = 0x7f0a000c;
public static final int abc_seekbar_track_background_height_material = 0x7f0a0039;
public static final int abc_seekbar_track_progress_height_material = 0x7f0a003a;
public static final int abc_select_dialog_padding_start_material = 0x7f0a003b;
public static final int abc_switch_padding = 0x7f0a0017;
public static final int abc_text_size_body_1_material = 0x7f0a003c;
public static final int abc_text_size_body_2_material = 0x7f0a003d;
public static final int abc_text_size_button_material = 0x7f0a003e;
public static final int abc_text_size_caption_material = 0x7f0a003f;
public static final int abc_text_size_display_1_material = 0x7f0a0040;
public static final int abc_text_size_display_2_material = 0x7f0a0041;
public static final int abc_text_size_display_3_material = 0x7f0a0042;
public static final int abc_text_size_display_4_material = 0x7f0a0043;
public static final int abc_text_size_headline_material = 0x7f0a0044;
public static final int abc_text_size_large_material = 0x7f0a0045;
public static final int abc_text_size_medium_material = 0x7f0a0046;
public static final int abc_text_size_menu_material = 0x7f0a0047;
public static final int abc_text_size_small_material = 0x7f0a0048;
public static final int abc_text_size_subhead_material = 0x7f0a0049;
public static final int abc_text_size_subtitle_material_toolbar = 0x7f0a0003;
public static final int abc_text_size_title_material = 0x7f0a004a;
public static final int abc_text_size_title_material_toolbar = 0x7f0a0004;
public static final int disabled_alpha_material_dark = 0x7f0a005f;
public static final int disabled_alpha_material_light = 0x7f0a0060;
public static final int highlight_alpha_material_colored = 0x7f0a0061;
public static final int highlight_alpha_material_dark = 0x7f0a0062;
public static final int highlight_alpha_material_light = 0x7f0a0063;
public static final int notification_large_icon_height = 0x7f0a0065;
public static final int notification_large_icon_width = 0x7f0a0066;
public static final int notification_subtext_size = 0x7f0a0067;
}
public static final class drawable {
public static final int abc_ab_share_pack_mtrl_alpha = 0x7f020000;
public static final int abc_action_bar_item_background_material = 0x7f020001;
public static final int abc_btn_borderless_material = 0x7f020002;
public static final int abc_btn_check_material = 0x7f020003;
public static final int abc_btn_check_to_on_mtrl_000 = 0x7f020004;
public static final int abc_btn_check_to_on_mtrl_015 = 0x7f020005;
public static final int abc_btn_colored_material = 0x7f020006;
public static final int abc_btn_default_mtrl_shape = 0x7f020007;
public static final int abc_btn_radio_material = 0x7f020008;
public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f020009;
public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f02000a;
public static final int abc_btn_rating_star_off_mtrl_alpha = 0x7f02000b;
public static final int abc_btn_rating_star_on_mtrl_alpha = 0x7f02000c;
public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f02000d;
public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f02000e;
public static final int abc_cab_background_internal_bg = 0x7f02000f;
public static final int abc_cab_background_top_material = 0x7f020010;
public static final int abc_cab_background_top_mtrl_alpha = 0x7f020011;
public static final int abc_control_background_material = 0x7f020012;
public static final int abc_dialog_material_background_dark = 0x7f020013;
public static final int abc_dialog_material_background_light = 0x7f020014;
public static final int abc_edit_text_material = 0x7f020015;
public static final int abc_ic_ab_back_mtrl_am_alpha = 0x7f020016;
public static final int abc_ic_clear_mtrl_alpha = 0x7f020017;
public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f020018;
public static final int abc_ic_go_search_api_mtrl_alpha = 0x7f020019;
public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f02001a;
public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f02001b;
public static final int abc_ic_menu_moreoverflow_mtrl_alpha = 0x7f02001c;
public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f02001d;
public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f02001e;
public static final int abc_ic_menu_share_mtrl_alpha = 0x7f02001f;
public static final int abc_ic_search_api_mtrl_alpha = 0x7f020020;
public static final int abc_ic_voice_search_api_mtrl_alpha = 0x7f020021;
public static final int abc_item_background_holo_dark = 0x7f020022;
public static final int abc_item_background_holo_light = 0x7f020023;
public static final int abc_list_divider_mtrl_alpha = 0x7f020024;
public static final int abc_list_focused_holo = 0x7f020025;
public static final int abc_list_longpressed_holo = 0x7f020026;
public static final int abc_list_pressed_holo_dark = 0x7f020027;
public static final int abc_list_pressed_holo_light = 0x7f020028;
public static final int abc_list_selector_background_transition_holo_dark = 0x7f020029;
public static final int abc_list_selector_background_transition_holo_light = 0x7f02002a;
public static final int abc_list_selector_disabled_holo_dark = 0x7f02002b;
public static final int abc_list_selector_disabled_holo_light = 0x7f02002c;
public static final int abc_list_selector_holo_dark = 0x7f02002d;
public static final int abc_list_selector_holo_light = 0x7f02002e;
public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f02002f;
public static final int abc_popup_background_mtrl_mult = 0x7f020030;
public static final int abc_ratingbar_full_material = 0x7f020031;
public static final int abc_scrubber_control_off_mtrl_alpha = 0x7f020032;
public static final int abc_scrubber_control_to_pressed_mtrl_000 = 0x7f020033;
public static final int abc_scrubber_control_to_pressed_mtrl_005 = 0x7f020034;
public static final int abc_scrubber_primary_mtrl_alpha = 0x7f020035;
public static final int abc_scrubber_track_mtrl_alpha = 0x7f020036;
public static final int abc_seekbar_thumb_material = 0x7f020037;
public static final int abc_seekbar_track_material = 0x7f020038;
public static final int abc_spinner_mtrl_am_alpha = 0x7f020039;
public static final int abc_spinner_textfield_background_material = 0x7f02003a;
public static final int abc_switch_thumb_material = 0x7f02003b;
public static final int abc_switch_track_mtrl_alpha = 0x7f02003c;
public static final int abc_tab_indicator_material = 0x7f02003d;
public static final int abc_tab_indicator_mtrl_alpha = 0x7f02003e;
public static final int abc_text_cursor_material = 0x7f02003f;
public static final int abc_textfield_activated_mtrl_alpha = 0x7f020040;
public static final int abc_textfield_default_mtrl_alpha = 0x7f020041;
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f020042;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f020043;
public static final int abc_textfield_search_material = 0x7f020044;
public static final int notification_template_icon_bg = 0x7f02004a;
}
public static final class id {
public static final int action0 = 0x7f0e0084;
public static final int action_bar = 0x7f0e0069;
public static final int action_bar_activity_content = 0x7f0e0000;
public static final int action_bar_container = 0x7f0e0068;
public static final int action_bar_root = 0x7f0e0064;
public static final int action_bar_spinner = 0x7f0e0001;
public static final int action_bar_subtitle = 0x7f0e004a;
public static final int action_bar_title = 0x7f0e0049;
public static final int action_context_bar = 0x7f0e006a;
public static final int action_divider = 0x7f0e0088;
public static final int action_menu_divider = 0x7f0e0002;
public static final int action_menu_presenter = 0x7f0e0003;
public static final int action_mode_bar = 0x7f0e0066;
public static final int action_mode_bar_stub = 0x7f0e0065;
public static final int action_mode_close_button = 0x7f0e004b;
public static final int activity_chooser_view_content = 0x7f0e004c;
public static final int alertTitle = 0x7f0e0058;
public static final int always = 0x7f0e0041;
public static final int beginning = 0x7f0e003f;
public static final int buttonPanel = 0x7f0e0053;
public static final int cancel_action = 0x7f0e0085;
public static final int checkbox = 0x7f0e0061;
public static final int chronometer = 0x7f0e008b;
public static final int collapseActionView = 0x7f0e0042;
public static final int contentPanel = 0x7f0e0059;
public static final int custom = 0x7f0e005f;
public static final int customPanel = 0x7f0e005e;
public static final int decor_content_parent = 0x7f0e0067;
public static final int default_activity_button = 0x7f0e004f;
public static final int disableHome = 0x7f0e0016;
public static final int edit_query = 0x7f0e006b;
public static final int end = 0x7f0e0028;
public static final int end_padder = 0x7f0e0090;
public static final int expand_activities_button = 0x7f0e004d;
public static final int expanded_menu = 0x7f0e0060;
public static final int home = 0x7f0e0004;
public static final int homeAsUp = 0x7f0e0017;
public static final int icon = 0x7f0e0051;
public static final int ifRoom = 0x7f0e0043;
public static final int image = 0x7f0e004e;
public static final int info = 0x7f0e008f;
public static final int line1 = 0x7f0e0089;
public static final int line3 = 0x7f0e008d;
public static final int listMode = 0x7f0e0013;
public static final int list_item = 0x7f0e0050;
public static final int media_actions = 0x7f0e0087;
public static final int middle = 0x7f0e0040;
public static final int multiply = 0x7f0e002e;
public static final int never = 0x7f0e0044;
public static final int none = 0x7f0e0018;
public static final int normal = 0x7f0e0014;
public static final int parentPanel = 0x7f0e0055;
public static final int progress_circular = 0x7f0e0006;
public static final int progress_horizontal = 0x7f0e0007;
public static final int radio = 0x7f0e0063;
public static final int screen = 0x7f0e002f;
public static final int scrollIndicatorDown = 0x7f0e005d;
public static final int scrollIndicatorUp = 0x7f0e005a;
public static final int scrollView = 0x7f0e005b;
public static final int search_badge = 0x7f0e006d;
public static final int search_bar = 0x7f0e006c;
public static final int search_button = 0x7f0e006e;
public static final int search_close_btn = 0x7f0e0073;
public static final int search_edit_frame = 0x7f0e006f;
public static final int search_go_btn = 0x7f0e0075;
public static final int search_mag_icon = 0x7f0e0070;
public static final int search_plate = 0x7f0e0071;
public static final int search_src_text = 0x7f0e0072;
public static final int search_voice_btn = 0x7f0e0076;
public static final int select_dialog_listview = 0x7f0e0077;
public static final int shortcut = 0x7f0e0062;
public static final int showCustom = 0x7f0e0019;
public static final int showHome = 0x7f0e001a;
public static final int showTitle = 0x7f0e001b;
public static final int spacer = 0x7f0e0054;
public static final int split_action_bar = 0x7f0e0008;
public static final int src_atop = 0x7f0e0030;
public static final int src_in = 0x7f0e0031;
public static final int src_over = 0x7f0e0032;
public static final int status_bar_latest_event_content = 0x7f0e0086;
public static final int submit_area = 0x7f0e0074;
public static final int tabMode = 0x7f0e0015;
public static final int text = 0x7f0e008e;
public static final int text2 = 0x7f0e008c;
public static final int textSpacerNoButtons = 0x7f0e005c;
public static final int time = 0x7f0e008a;
public static final int title = 0x7f0e0052;
public static final int title_template = 0x7f0e0057;
public static final int topPanel = 0x7f0e0056;
public static final int up = 0x7f0e0009;
public static final int useLogo = 0x7f0e001c;
public static final int withText = 0x7f0e0045;
public static final int wrap_content = 0x7f0e0048;
}
public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f0c0002;
public static final int abc_config_activityShortDur = 0x7f0c0003;
public static final int abc_max_action_buttons = 0x7f0c0000;
public static final int cancel_button_image_alpha = 0x7f0c0004;
public static final int status_bar_notification_info_maxnum = 0x7f0c0005;
}
public static final class layout {
public static final int abc_action_bar_title_item = 0x7f040000;
public static final int abc_action_bar_up_container = 0x7f040001;
public static final int abc_action_bar_view_list_nav_layout = 0x7f040002;
public static final int abc_action_menu_item_layout = 0x7f040003;
public static final int abc_action_menu_layout = 0x7f040004;
public static final int abc_action_mode_bar = 0x7f040005;
public static final int abc_action_mode_close_item_material = 0x7f040006;
public static final int abc_activity_chooser_view = 0x7f040007;
public static final int abc_activity_chooser_view_list_item = 0x7f040008;
public static final int abc_alert_dialog_button_bar_material = 0x7f040009;
public static final int abc_alert_dialog_material = 0x7f04000a;
public static final int abc_dialog_title_material = 0x7f04000b;
public static final int abc_expanded_menu_layout = 0x7f04000c;
public static final int abc_list_menu_item_checkbox = 0x7f04000d;
public static final int abc_list_menu_item_icon = 0x7f04000e;
public static final int abc_list_menu_item_layout = 0x7f04000f;
public static final int abc_list_menu_item_radio = 0x7f040010;
public static final int abc_popup_menu_item_layout = 0x7f040011;
public static final int abc_screen_content_include = 0x7f040012;
public static final int abc_screen_simple = 0x7f040013;
public static final int abc_screen_simple_overlay_action_mode = 0x7f040014;
public static final int abc_screen_toolbar = 0x7f040015;
public static final int abc_search_dropdown_item_icons_2line = 0x7f040016;
public static final int abc_search_view = 0x7f040017;
public static final int abc_select_dialog_material = 0x7f040018;
public static final int notification_media_action = 0x7f040026;
public static final int notification_media_cancel_action = 0x7f040027;
public static final int notification_template_big_media = 0x7f040028;
public static final int notification_template_big_media_narrow = 0x7f040029;
public static final int notification_template_lines = 0x7f04002a;
public static final int notification_template_media = 0x7f04002b;
public static final int notification_template_part_chronometer = 0x7f04002c;
public static final int notification_template_part_time = 0x7f04002d;
public static final int select_dialog_item_material = 0x7f04002e;
public static final int select_dialog_multichoice_material = 0x7f04002f;
public static final int select_dialog_singlechoice_material = 0x7f040030;
public static final int support_simple_spinner_dropdown_item = 0x7f040031;
}
public static final class string {
public static final int abc_action_bar_home_description = 0x7f080000;
public static final int abc_action_bar_home_description_format = 0x7f080001;
public static final int abc_action_bar_home_subtitle_description_format = 0x7f080002;
public static final int abc_action_bar_up_description = 0x7f080003;
public static final int abc_action_menu_overflow_description = 0x7f080004;
public static final int abc_action_mode_done = 0x7f080005;
public static final int abc_activity_chooser_view_see_all = 0x7f080006;
public static final int abc_activitychooserview_choose_application = 0x7f080007;
public static final int abc_capital_off = 0x7f080008;
public static final int abc_capital_on = 0x7f080009;
public static final int abc_search_hint = 0x7f08000a;
public static final int abc_searchview_description_clear = 0x7f08000b;
public static final int abc_searchview_description_query = 0x7f08000c;
public static final int abc_searchview_description_search = 0x7f08000d;
public static final int abc_searchview_description_submit = 0x7f08000e;
public static final int abc_searchview_description_voice = 0x7f08000f;
public static final int abc_shareactionprovider_share_with = 0x7f080010;
public static final int abc_shareactionprovider_share_with_application = 0x7f080011;
public static final int abc_toolbar_collapse_description = 0x7f080012;
public static final int status_bar_notification_info_overflow = 0x7f080013;
}
public static final class style {
public static final int AlertDialog_AppCompat = 0x7f0b0080;
public static final int AlertDialog_AppCompat_Light = 0x7f0b0081;
public static final int Animation_AppCompat_Dialog = 0x7f0b0082;
public static final int Animation_AppCompat_DropDownUp = 0x7f0b0083;
public static final int Base_AlertDialog_AppCompat = 0x7f0b0087;
public static final int Base_AlertDialog_AppCompat_Light = 0x7f0b0088;
public static final int Base_Animation_AppCompat_Dialog = 0x7f0b0089;
public static final int Base_Animation_AppCompat_DropDownUp = 0x7f0b008a;
public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f0b008c;
public static final int Base_DialogWindowTitle_AppCompat = 0x7f0b008b;
public static final int Base_TextAppearance_AppCompat = 0x7f0b0032;
public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0b0033;
public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0b0034;
public static final int Base_TextAppearance_AppCompat_Button = 0x7f0b001b;
public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0b0035;
public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0b0036;
public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0b0037;
public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0b0038;
public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0b0039;
public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0b003a;
public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0b0005;
public static final int Base_TextAppearance_AppCompat_Large = 0x7f0b003b;
public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0b0006;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0b003c;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0b003d;
public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0b003e;
public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0b0007;
public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0b003f;
public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0b008d;
public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0b0040;
public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0b0041;
public static final int Base_TextAppearance_AppCompat_Small = 0x7f0b0042;
public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0b0008;
public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0b0043;
public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0b0009;
public static final int Base_TextAppearance_AppCompat_Title = 0x7f0b0044;
public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0b000a;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0b0045;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0b0046;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0b0047;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0b0048;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0b0049;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0b004a;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0b004b;
public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f0b004c;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0b007c;
public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0b008e;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0b004d;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0b004e;
public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0b004f;
public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0b0050;
public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0b008f;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0b0051;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0b0052;
public static final int Base_ThemeOverlay_AppCompat = 0x7f0b0098;
public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0b0099;
public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0b009a;
public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0b009b;
public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0b009c;
public static final int Base_Theme_AppCompat = 0x7f0b0053;
public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0b0090;
public static final int Base_Theme_AppCompat_Dialog = 0x7f0b000b;
public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0b0002;
public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f0b0091;
public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0b0092;
public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f0b0093;
public static final int Base_Theme_AppCompat_Light = 0x7f0b0054;
public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0b0094;
public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0b000c;
public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0b0003;
public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f0b0095;
public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0b0096;
public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0b0097;
public static final int Base_V11_Theme_AppCompat_Dialog = 0x7f0b000d;
public static final int Base_V11_Theme_AppCompat_Light_Dialog = 0x7f0b000e;
public static final int Base_V12_Widget_AppCompat_AutoCompleteTextView = 0x7f0b0017;
public static final int Base_V12_Widget_AppCompat_EditText = 0x7f0b0018;
public static final int Base_V21_Theme_AppCompat = 0x7f0b0055;
public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0b0056;
public static final int Base_V21_Theme_AppCompat_Light = 0x7f0b0057;
public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0b0058;
public static final int Base_V22_Theme_AppCompat = 0x7f0b007a;
public static final int Base_V22_Theme_AppCompat_Light = 0x7f0b007b;
public static final int Base_V23_Theme_AppCompat = 0x7f0b007d;
public static final int Base_V23_Theme_AppCompat_Light = 0x7f0b007e;
public static final int Base_V7_Theme_AppCompat = 0x7f0b009d;
public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0b009e;
public static final int Base_V7_Theme_AppCompat_Light = 0x7f0b009f;
public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0b00a0;
public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0b00a1;
public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0b00a2;
public static final int Base_Widget_AppCompat_ActionBar = 0x7f0b00a3;
public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0b00a4;
public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0b00a5;
public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0b0059;
public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0b005a;
public static final int Base_Widget_AppCompat_ActionButton = 0x7f0b005b;
public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0b005c;
public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0b005d;
public static final int Base_Widget_AppCompat_ActionMode = 0x7f0b00a6;
public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0b00a7;
public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0b0019;
public static final int Base_Widget_AppCompat_Button = 0x7f0b005e;
public static final int Base_Widget_AppCompat_ButtonBar = 0x7f0b0062;
public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0b00a9;
public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f0b005f;
public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f0b0060;
public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0b00a8;
public static final int Base_Widget_AppCompat_Button_Colored = 0x7f0b007f;
public static final int Base_Widget_AppCompat_Button_Small = 0x7f0b0061;
public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f0b0063;
public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f0b0064;
public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0b00aa;
public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0b0000;
public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0b00ab;
public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0b0065;
public static final int Base_Widget_AppCompat_EditText = 0x7f0b001a;
public static final int Base_Widget_AppCompat_ImageButton = 0x7f0b0066;
public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0b00ac;
public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0b00ad;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0b00ae;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0b0067;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0b0068;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0b0069;
public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0b006a;
public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0b006b;
public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0b006c;
public static final int Base_Widget_AppCompat_ListView = 0x7f0b006d;
public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0b006e;
public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0b006f;
public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0b0070;
public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0b0071;
public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0b00af;
public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0b000f;
public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0b0010;
public static final int Base_Widget_AppCompat_RatingBar = 0x7f0b0072;
public static final int Base_Widget_AppCompat_SearchView = 0x7f0b00b0;
public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0b00b1;
public static final int Base_Widget_AppCompat_SeekBar = 0x7f0b0073;
public static final int Base_Widget_AppCompat_Spinner = 0x7f0b0074;
public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f0b0004;
public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f0b0075;
public static final int Base_Widget_AppCompat_Toolbar = 0x7f0b00b2;
public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0b0076;
public static final int Platform_AppCompat = 0x7f0b0011;
public static final int Platform_AppCompat_Light = 0x7f0b0012;
public static final int Platform_ThemeOverlay_AppCompat = 0x7f0b0077;
public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f0b0078;
public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f0b0079;
public static final int Platform_V11_AppCompat = 0x7f0b0013;
public static final int Platform_V11_AppCompat_Light = 0x7f0b0014;
public static final int Platform_V14_AppCompat = 0x7f0b001c;
public static final int Platform_V14_AppCompat_Light = 0x7f0b001d;
public static final int Platform_Widget_AppCompat_Spinner = 0x7f0b0015;
public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f0b0023;
public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0b0024;
public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f0b0025;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0b0026;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0b0027;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0b0028;
public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0b002e;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0b0029;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0b002a;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0b002b;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0b002c;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0b002d;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f0b002f;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f0b0030;
public static final int TextAppearance_AppCompat = 0x7f0b00b7;
public static final int TextAppearance_AppCompat_Body1 = 0x7f0b00b8;
public static final int TextAppearance_AppCompat_Body2 = 0x7f0b00b9;
public static final int TextAppearance_AppCompat_Button = 0x7f0b00ba;
public static final int TextAppearance_AppCompat_Caption = 0x7f0b00bb;
public static final int TextAppearance_AppCompat_Display1 = 0x7f0b00bc;
public static final int TextAppearance_AppCompat_Display2 = 0x7f0b00bd;
public static final int TextAppearance_AppCompat_Display3 = 0x7f0b00be;
public static final int TextAppearance_AppCompat_Display4 = 0x7f0b00bf;
public static final int TextAppearance_AppCompat_Headline = 0x7f0b00c0;
public static final int TextAppearance_AppCompat_Inverse = 0x7f0b00c1;
public static final int TextAppearance_AppCompat_Large = 0x7f0b00c2;
public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0b00c3;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0b00c4;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0b00c5;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0b00c6;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0b00c7;
public static final int TextAppearance_AppCompat_Medium = 0x7f0b00c8;
public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0b00c9;
public static final int TextAppearance_AppCompat_Menu = 0x7f0b00ca;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0b00cb;
public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0b00cc;
public static final int TextAppearance_AppCompat_Small = 0x7f0b00cd;
public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0b00ce;
public static final int TextAppearance_AppCompat_Subhead = 0x7f0b00cf;
public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0b00d0;
public static final int TextAppearance_AppCompat_Title = 0x7f0b00d1;
public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0b00d2;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0b00d3;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0b00d4;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0b00d5;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0b00d6;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0b00d7;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0b00d8;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0b00d9;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0b00da;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0b00db;
public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0b00dc;
public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0b00dd;
public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0b00de;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0b00df;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0b00e0;
public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0b00e1;
public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0b00e2;
public static final int TextAppearance_StatusBar_EventContent = 0x7f0b001e;
public static final int TextAppearance_StatusBar_EventContent_Info = 0x7f0b001f;
public static final int TextAppearance_StatusBar_EventContent_Line2 = 0x7f0b0020;
public static final int TextAppearance_StatusBar_EventContent_Time = 0x7f0b0021;
public static final int TextAppearance_StatusBar_EventContent_Title = 0x7f0b0022;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0b00ea;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0b00eb;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0b00ec;
public static final int ThemeOverlay_AppCompat = 0x7f0b00fb;
public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0b00fc;
public static final int ThemeOverlay_AppCompat_Dark = 0x7f0b00fd;
public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0b00fe;
public static final int ThemeOverlay_AppCompat_Light = 0x7f0b00ff;
public static final int Theme_AppCompat = 0x7f0b00ed;
public static final int Theme_AppCompat_CompactMenu = 0x7f0b00ee;
public static final int Theme_AppCompat_Dialog = 0x7f0b00ef;
public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0b00f2;
public static final int Theme_AppCompat_Dialog_Alert = 0x7f0b00f0;
public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0b00f1;
public static final int Theme_AppCompat_Light = 0x7f0b00f3;
public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0b00f4;
public static final int Theme_AppCompat_Light_Dialog = 0x7f0b00f5;
public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0b00f8;
public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0b00f6;
public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0b00f7;
public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0b00f9;
public static final int Theme_AppCompat_NoActionBar = 0x7f0b00fa;
public static final int Widget_AppCompat_ActionBar = 0x7f0b0100;
public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0b0101;
public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0b0102;
public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0b0103;
public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0b0104;
public static final int Widget_AppCompat_ActionButton = 0x7f0b0105;
public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0b0106;
public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0b0107;
public static final int Widget_AppCompat_ActionMode = 0x7f0b0108;
public static final int Widget_AppCompat_ActivityChooserView = 0x7f0b0109;
public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0b010a;
public static final int Widget_AppCompat_Button = 0x7f0b010b;
public static final int Widget_AppCompat_ButtonBar = 0x7f0b0111;
public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0b0112;
public static final int Widget_AppCompat_Button_Borderless = 0x7f0b010c;
public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f0b010d;
public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0b010e;
public static final int Widget_AppCompat_Button_Colored = 0x7f0b010f;
public static final int Widget_AppCompat_Button_Small = 0x7f0b0110;
public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f0b0113;
public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f0b0114;
public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0b0115;
public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0b0116;
public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0b0117;
public static final int Widget_AppCompat_EditText = 0x7f0b0118;
public static final int Widget_AppCompat_ImageButton = 0x7f0b0119;
public static final int Widget_AppCompat_Light_ActionBar = 0x7f0b011a;
public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0b011b;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0b011c;
public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0b011d;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0b011e;
public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0b011f;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0b0120;
public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0b0121;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0b0122;
public static final int Widget_AppCompat_Light_ActionButton = 0x7f0b0123;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0b0124;
public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0b0125;
public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0b0126;
public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0b0127;
public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0b0128;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0b0129;
public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0b012a;
public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0b012b;
public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0b012c;
public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0b012d;
public static final int Widget_AppCompat_Light_SearchView = 0x7f0b012e;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0b012f;
public static final int Widget_AppCompat_ListPopupWindow = 0x7f0b0130;
public static final int Widget_AppCompat_ListView = 0x7f0b0131;
public static final int Widget_AppCompat_ListView_DropDown = 0x7f0b0132;
public static final int Widget_AppCompat_ListView_Menu = 0x7f0b0133;
public static final int Widget_AppCompat_PopupMenu = 0x7f0b0134;
public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0b0135;
public static final int Widget_AppCompat_PopupWindow = 0x7f0b0136;
public static final int Widget_AppCompat_ProgressBar = 0x7f0b0137;
public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0b0138;
public static final int Widget_AppCompat_RatingBar = 0x7f0b0139;
public static final int Widget_AppCompat_SearchView = 0x7f0b013a;
public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f0b013b;
public static final int Widget_AppCompat_SeekBar = 0x7f0b013c;
public static final int Widget_AppCompat_Spinner = 0x7f0b013d;
public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0b013e;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0b013f;
public static final int Widget_AppCompat_Spinner_Underlined = 0x7f0b0140;
public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f0b0141;
public static final int Widget_AppCompat_Toolbar = 0x7f0b0142;
public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0b0143;
}
public static final class styleable {
public static final int[] ActionBar = { 0x7f010001, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e, 0x7f01000f, 0x7f010010, 0x7f010011, 0x7f010012, 0x7f010013, 0x7f010014, 0x7f010015, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001a, 0x7f01001b, 0x7f0100dc };
public static final int[] ActionBarLayout = { 0x010100b3 };
public static final int ActionBarLayout_android_layout_gravity = 0;
public static final int ActionBar_background = 10;
public static final int ActionBar_backgroundSplit = 12;
public static final int ActionBar_backgroundStacked = 11;
public static final int ActionBar_contentInsetEnd = 21;
public static final int ActionBar_contentInsetLeft = 22;
public static final int ActionBar_contentInsetRight = 23;
public static final int ActionBar_contentInsetStart = 20;
public static final int ActionBar_customNavigationLayout = 13;
public static final int ActionBar_displayOptions = 3;
public static final int ActionBar_divider = 9;
public static final int ActionBar_elevation = 24;
public static final int ActionBar_height = 0;
public static final int ActionBar_hideOnContentScroll = 19;
public static final int ActionBar_homeAsUpIndicator = 26;
public static final int ActionBar_homeLayout = 14;
public static final int ActionBar_icon = 7;
public static final int ActionBar_indeterminateProgressStyle = 16;
public static final int ActionBar_itemPadding = 18;
public static final int ActionBar_logo = 8;
public static final int ActionBar_navigationMode = 2;
public static final int ActionBar_popupTheme = 25;
public static final int ActionBar_progressBarPadding = 17;
public static final int ActionBar_progressBarStyle = 15;
public static final int ActionBar_subtitle = 4;
public static final int ActionBar_subtitleTextStyle = 6;
public static final int ActionBar_title = 1;
public static final int ActionBar_titleTextStyle = 5;
public static final int[] ActionMenuItemView = { 0x0101013f };
public static final int ActionMenuItemView_android_minWidth = 0;
public static final int[] ActionMenuView = { };
public static final int[] ActionMode = { 0x7f010001, 0x7f010007, 0x7f010008, 0x7f01000c, 0x7f01000e, 0x7f01001c };
public static final int ActionMode_background = 3;
public static final int ActionMode_backgroundSplit = 4;
public static final int ActionMode_closeItemLayout = 5;
public static final int ActionMode_height = 0;
public static final int ActionMode_subtitleTextStyle = 2;
public static final int ActionMode_titleTextStyle = 1;
public static final int[] ActivityChooserView = { 0x7f01001d, 0x7f01001e };
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
public static final int ActivityChooserView_initialActivityCount = 0;
public static final int[] AlertDialog = { 0x010100f2, 0x7f01001f, 0x7f010020, 0x7f010021, 0x7f010022, 0x7f010023 };
public static final int AlertDialog_android_layout = 0;
public static final int AlertDialog_buttonPanelSideLayout = 1;
public static final int AlertDialog_listItemLayout = 5;
public static final int AlertDialog_listLayout = 2;
public static final int AlertDialog_multiChoiceItemLayout = 3;
public static final int AlertDialog_singleChoiceItemLayout = 4;
public static final int[] AppCompatTextView = { 0x01010034, 0x7f010027 };
public static final int AppCompatTextView_android_textAppearance = 0;
public static final int AppCompatTextView_textAllCaps = 1;
public static final int[] ButtonBarLayout = { 0x7f01002a };
public static final int ButtonBarLayout_allowStacking = 0;
public static final int[] CompoundButton = { 0x01010107, 0x7f01003d, 0x7f01003e };
public static final int CompoundButton_android_button = 0;
public static final int CompoundButton_buttonTint = 1;
public static final int CompoundButton_buttonTintMode = 2;
public static final int[] DrawerArrowToggle = { 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c };
public static final int DrawerArrowToggle_arrowHeadLength = 4;
public static final int DrawerArrowToggle_arrowShaftLength = 5;
public static final int DrawerArrowToggle_barLength = 6;
public static final int DrawerArrowToggle_color = 0;
public static final int DrawerArrowToggle_drawableSize = 2;
public static final int DrawerArrowToggle_gapBetweenBars = 3;
public static final int DrawerArrowToggle_spinBars = 1;
public static final int DrawerArrowToggle_thickness = 7;
public static final int[] LinearLayoutCompat = { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x7f01000b, 0x7f01006b, 0x7f01006c, 0x7f01006d };
public static final int[] LinearLayoutCompat_Layout = { 0x010100b3, 0x010100f4, 0x010100f5, 0x01010181 };
public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static final int LinearLayoutCompat_Layout_android_layout_height = 2;
public static final int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static final int LinearLayoutCompat_Layout_android_layout_width = 1;
public static final int LinearLayoutCompat_android_baselineAligned = 2;
public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static final int LinearLayoutCompat_android_gravity = 0;
public static final int LinearLayoutCompat_android_orientation = 1;
public static final int LinearLayoutCompat_android_weightSum = 4;
public static final int LinearLayoutCompat_divider = 5;
public static final int LinearLayoutCompat_dividerPadding = 8;
public static final int LinearLayoutCompat_measureWithLargestChild = 6;
public static final int LinearLayoutCompat_showDividers = 7;
public static final int[] ListPopupWindow = { 0x010102ac, 0x010102ad };
public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static final int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 };
public static final int MenuGroup_android_checkableBehavior = 5;
public static final int MenuGroup_android_enabled = 0;
public static final int MenuGroup_android_id = 1;
public static final int MenuGroup_android_menuCategory = 3;
public static final int MenuGroup_android_orderInCategory = 4;
public static final int MenuGroup_android_visible = 2;
public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f01006e, 0x7f01006f, 0x7f010070, 0x7f010071 };
public static final int MenuItem_actionLayout = 14;
public static final int MenuItem_actionProviderClass = 16;
public static final int MenuItem_actionViewClass = 15;
public static final int MenuItem_android_alphabeticShortcut = 9;
public static final int MenuItem_android_checkable = 11;
public static final int MenuItem_android_checked = 3;
public static final int MenuItem_android_enabled = 1;
public static final int MenuItem_android_icon = 0;
public static final int MenuItem_android_id = 2;
public static final int MenuItem_android_menuCategory = 5;
public static final int MenuItem_android_numericShortcut = 10;
public static final int MenuItem_android_onClick = 12;
public static final int MenuItem_android_orderInCategory = 6;
public static final int MenuItem_android_title = 7;
public static final int MenuItem_android_titleCondensed = 8;
public static final int MenuItem_android_visible = 4;
public static final int MenuItem_showAsAction = 13;
public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x7f010072 };
public static final int MenuView_android_headerBackground = 4;
public static final int MenuView_android_horizontalDivider = 2;
public static final int MenuView_android_itemBackground = 5;
public static final int MenuView_android_itemIconDisabledAlpha = 6;
public static final int MenuView_android_itemTextAppearance = 1;
public static final int MenuView_android_verticalDivider = 3;
public static final int MenuView_android_windowAnimationStyle = 0;
public static final int MenuView_preserveIconSpacing = 7;
public static final int[] PopupWindow = { 0x01010176, 0x7f010079 };
public static final int[] PopupWindowBackgroundState = { 0x7f01007a };
public static final int PopupWindowBackgroundState_state_above_anchor = 0;
public static final int PopupWindow_android_popupBackground = 0;
public static final int PopupWindow_overlapAnchor = 1;
public static final int[] SearchView = { 0x010100da, 0x0101011f, 0x01010220, 0x01010264, 0x7f010081, 0x7f010082, 0x7f010083, 0x7f010084, 0x7f010085, 0x7f010086, 0x7f010087, 0x7f010088, 0x7f010089, 0x7f01008a, 0x7f01008b, 0x7f01008c, 0x7f01008d };
public static final int SearchView_android_focusable = 0;
public static final int SearchView_android_imeOptions = 3;
public static final int SearchView_android_inputType = 2;
public static final int SearchView_android_maxWidth = 1;
public static final int SearchView_closeIcon = 8;
public static final int SearchView_commitIcon = 13;
public static final int SearchView_defaultQueryHint = 7;
public static final int SearchView_goIcon = 9;
public static final int SearchView_iconifiedByDefault = 5;
public static final int SearchView_layout = 4;
public static final int SearchView_queryBackground = 15;
public static final int SearchView_queryHint = 6;
public static final int SearchView_searchHintIcon = 11;
public static final int SearchView_searchIcon = 10;
public static final int SearchView_submitBackground = 16;
public static final int SearchView_suggestionRowLayout = 14;
public static final int SearchView_voiceIcon = 12;
public static final int[] Spinner = { 0x01010176, 0x0101017b, 0x01010262, 0x7f01001b };
public static final int Spinner_android_dropDownWidth = 2;
public static final int Spinner_android_popupBackground = 0;
public static final int Spinner_android_prompt = 1;
public static final int Spinner_popupTheme = 3;
public static final int[] SwitchCompat = { 0x01010124, 0x01010125, 0x01010142, 0x7f01008f, 0x7f010090, 0x7f010091, 0x7f010092, 0x7f010093, 0x7f010094, 0x7f010095 };
public static final int SwitchCompat_android_textOff = 1;
public static final int SwitchCompat_android_textOn = 0;
public static final int SwitchCompat_android_thumb = 2;
public static final int SwitchCompat_showText = 9;
public static final int SwitchCompat_splitTrack = 8;
public static final int SwitchCompat_switchMinWidth = 6;
public static final int SwitchCompat_switchPadding = 7;
public static final int SwitchCompat_switchTextAppearance = 5;
public static final int SwitchCompat_thumbTextPadding = 4;
public static final int SwitchCompat_track = 3;
public static final int[] TextAppearance = { 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x01010161, 0x01010162, 0x01010163, 0x01010164, 0x7f010027 };
public static final int TextAppearance_android_shadowColor = 4;
public static final int TextAppearance_android_shadowDx = 5;
public static final int TextAppearance_android_shadowDy = 6;
public static final int TextAppearance_android_shadowRadius = 7;
public static final int TextAppearance_android_textColor = 3;
public static final int TextAppearance_android_textSize = 0;
public static final int TextAppearance_android_textStyle = 2;
public static final int TextAppearance_android_typeface = 1;
public static final int TextAppearance_textAllCaps = 8;
public static final int[] Theme = { 0x01010057, 0x010100ae, 0x7f0100ae, 0x7f0100af, 0x7f0100b0, 0x7f0100b1, 0x7f0100b2, 0x7f0100b3, 0x7f0100b4, 0x7f0100b5, 0x7f0100b6, 0x7f0100b7, 0x7f0100b8, 0x7f0100b9, 0x7f0100ba, 0x7f0100bb, 0x7f0100bc, 0x7f0100bd, 0x7f0100be, 0x7f0100bf, 0x7f0100c0, 0x7f0100c1, 0x7f0100c2, 0x7f0100c3, 0x7f0100c4, 0x7f0100c5, 0x7f0100c6, 0x7f0100c7, 0x7f0100c8, 0x7f0100c9, 0x7f0100ca, 0x7f0100cb, 0x7f0100cc, 0x7f0100cd, 0x7f0100ce, 0x7f0100cf, 0x7f0100d0, 0x7f0100d1, 0x7f0100d2, 0x7f0100d3, 0x7f0100d4, 0x7f0100d5, 0x7f0100d6, 0x7f0100d7, 0x7f0100d8, 0x7f0100d9, 0x7f0100da, 0x7f0100db, 0x7f0100dc, 0x7f0100dd, 0x7f0100de, 0x7f0100df, 0x7f0100e0, 0x7f0100e1, 0x7f0100e2, 0x7f0100e3, 0x7f0100e4, 0x7f0100e5, 0x7f0100e6, 0x7f0100e7, 0x7f0100e8, 0x7f0100e9, 0x7f0100ea, 0x7f0100eb, 0x7f0100ec, 0x7f0100ed, 0x7f0100ee, 0x7f0100ef, 0x7f0100f0, 0x7f0100f1, 0x7f0100f2, 0x7f0100f3, 0x7f0100f4, 0x7f0100f5, 0x7f0100f6, 0x7f0100f7, 0x7f0100f8, 0x7f0100f9, 0x7f0100fa, 0x7f0100fb, 0x7f0100fc, 0x7f0100fd, 0x7f0100fe, 0x7f0100ff, 0x7f010100, 0x7f010101, 0x7f010102, 0x7f010103, 0x7f010104, 0x7f010105, 0x7f010106, 0x7f010107, 0x7f010108, 0x7f010109, 0x7f01010a, 0x7f01010b, 0x7f01010c, 0x7f01010d, 0x7f01010e, 0x7f01010f, 0x7f010110, 0x7f010111, 0x7f010112, 0x7f010113, 0x7f010114, 0x7f010115, 0x7f010116, 0x7f010117, 0x7f010118, 0x7f010119 };
public static final int Theme_actionBarDivider = 23;
public static final int Theme_actionBarItemBackground = 24;
public static final int Theme_actionBarPopupTheme = 17;
public static final int Theme_actionBarSize = 22;
public static final int Theme_actionBarSplitStyle = 19;
public static final int Theme_actionBarStyle = 18;
public static final int Theme_actionBarTabBarStyle = 13;
public static final int Theme_actionBarTabStyle = 12;
public static final int Theme_actionBarTabTextStyle = 14;
public static final int Theme_actionBarTheme = 20;
public static final int Theme_actionBarWidgetTheme = 21;
public static final int Theme_actionButtonStyle = 49;
public static final int Theme_actionDropDownStyle = 45;
public static final int Theme_actionMenuTextAppearance = 25;
public static final int Theme_actionMenuTextColor = 26;
public static final int Theme_actionModeBackground = 29;
public static final int Theme_actionModeCloseButtonStyle = 28;
public static final int Theme_actionModeCloseDrawable = 31;
public static final int Theme_actionModeCopyDrawable = 33;
public static final int Theme_actionModeCutDrawable = 32;
public static final int Theme_actionModeFindDrawable = 37;
public static final int Theme_actionModePasteDrawable = 34;
public static final int Theme_actionModePopupWindowStyle = 39;
public static final int Theme_actionModeSelectAllDrawable = 35;
public static final int Theme_actionModeShareDrawable = 36;
public static final int Theme_actionModeSplitBackground = 30;
public static final int Theme_actionModeStyle = 27;
public static final int Theme_actionModeWebSearchDrawable = 38;
public static final int Theme_actionOverflowButtonStyle = 15;
public static final int Theme_actionOverflowMenuStyle = 16;
public static final int Theme_activityChooserViewStyle = 57;
public static final int Theme_alertDialogButtonGroupStyle = 92;
public static final int Theme_alertDialogCenterButtons = 93;
public static final int Theme_alertDialogStyle = 91;
public static final int Theme_alertDialogTheme = 94;
public static final int Theme_android_windowAnimationStyle = 1;
public static final int Theme_android_windowIsFloating = 0;
public static final int Theme_autoCompleteTextViewStyle = 99;
public static final int Theme_borderlessButtonStyle = 54;
public static final int Theme_buttonBarButtonStyle = 51;
public static final int Theme_buttonBarNegativeButtonStyle = 97;
public static final int Theme_buttonBarNeutralButtonStyle = 98;
public static final int Theme_buttonBarPositiveButtonStyle = 96;
public static final int Theme_buttonBarStyle = 50;
public static final int Theme_buttonStyle = 100;
public static final int Theme_buttonStyleSmall = 101;
public static final int Theme_checkboxStyle = 102;
public static final int Theme_checkedTextViewStyle = 103;
public static final int Theme_colorAccent = 84;
public static final int Theme_colorButtonNormal = 88;
public static final int Theme_colorControlActivated = 86;
public static final int Theme_colorControlHighlight = 87;
public static final int Theme_colorControlNormal = 85;
public static final int Theme_colorPrimary = 82;
public static final int Theme_colorPrimaryDark = 83;
public static final int Theme_colorSwitchThumbNormal = 89;
public static final int Theme_controlBackground = 90;
public static final int Theme_dialogPreferredPadding = 43;
public static final int Theme_dialogTheme = 42;
public static final int Theme_dividerHorizontal = 56;
public static final int Theme_dividerVertical = 55;
public static final int Theme_dropDownListViewStyle = 74;
public static final int Theme_dropdownListPreferredItemHeight = 46;
public static final int Theme_editTextBackground = 63;
public static final int Theme_editTextColor = 62;
public static final int Theme_editTextStyle = 104;
public static final int Theme_homeAsUpIndicator = 48;
public static final int Theme_imageButtonStyle = 64;
public static final int Theme_listChoiceBackgroundIndicator = 81;
public static final int Theme_listDividerAlertDialog = 44;
public static final int Theme_listPopupWindowStyle = 75;
public static final int Theme_listPreferredItemHeight = 69;
public static final int Theme_listPreferredItemHeightLarge = 71;
public static final int Theme_listPreferredItemHeightSmall = 70;
public static final int Theme_listPreferredItemPaddingLeft = 72;
public static final int Theme_listPreferredItemPaddingRight = 73;
public static final int Theme_panelBackground = 78;
public static final int Theme_panelMenuListTheme = 80;
public static final int Theme_panelMenuListWidth = 79;
public static final int Theme_popupMenuStyle = 60;
public static final int Theme_popupWindowStyle = 61;
public static final int Theme_radioButtonStyle = 105;
public static final int Theme_ratingBarStyle = 106;
public static final int Theme_searchViewStyle = 68;
public static final int Theme_seekBarStyle = 107;
public static final int Theme_selectableItemBackground = 52;
public static final int Theme_selectableItemBackgroundBorderless = 53;
public static final int Theme_spinnerDropDownItemStyle = 47;
public static final int Theme_spinnerStyle = 108;
public static final int Theme_switchStyle = 109;
public static final int Theme_textAppearanceLargePopupMenu = 40;
public static final int Theme_textAppearanceListItem = 76;
public static final int Theme_textAppearanceListItemSmall = 77;
public static final int Theme_textAppearanceSearchResultSubtitle = 66;
public static final int Theme_textAppearanceSearchResultTitle = 65;
public static final int Theme_textAppearanceSmallPopupMenu = 41;
public static final int Theme_textColorAlertDialogListItem = 95;
public static final int Theme_textColorSearchUrl = 67;
public static final int Theme_toolbarNavigationButtonStyle = 59;
public static final int Theme_toolbarStyle = 58;
public static final int Theme_windowActionBar = 2;
public static final int Theme_windowActionBarOverlay = 4;
public static final int Theme_windowActionModeOverlay = 5;
public static final int Theme_windowFixedHeightMajor = 9;
public static final int Theme_windowFixedHeightMinor = 7;
public static final int Theme_windowFixedWidthMajor = 6;
public static final int Theme_windowFixedWidthMinor = 8;
public static final int Theme_windowMinWidthMajor = 10;
public static final int Theme_windowMinWidthMinor = 11;
public static final int Theme_windowNoTitle = 3;
public static final int[] Toolbar = { 0x010100af, 0x01010140, 0x7f010003, 0x7f010006, 0x7f01000a, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001b, 0x7f01011a, 0x7f01011b, 0x7f01011c, 0x7f01011d, 0x7f01011e, 0x7f01011f, 0x7f010120, 0x7f010121, 0x7f010122, 0x7f010123, 0x7f010124, 0x7f010125, 0x7f010126, 0x7f010127, 0x7f010128 };
public static final int Toolbar_android_gravity = 0;
public static final int Toolbar_android_minHeight = 1;
public static final int Toolbar_collapseContentDescription = 19;
public static final int Toolbar_collapseIcon = 18;
public static final int Toolbar_contentInsetEnd = 6;
public static final int Toolbar_contentInsetLeft = 7;
public static final int Toolbar_contentInsetRight = 8;
public static final int Toolbar_contentInsetStart = 5;
public static final int Toolbar_logo = 4;
public static final int Toolbar_logoDescription = 22;
public static final int Toolbar_maxButtonHeight = 17;
public static final int Toolbar_navigationContentDescription = 21;
public static final int Toolbar_navigationIcon = 20;
public static final int Toolbar_popupTheme = 9;
public static final int Toolbar_subtitle = 3;
public static final int Toolbar_subtitleTextAppearance = 11;
public static final int Toolbar_subtitleTextColor = 24;
public static final int Toolbar_title = 2;
public static final int Toolbar_titleMarginBottom = 16;
public static final int Toolbar_titleMarginEnd = 14;
public static final int Toolbar_titleMarginStart = 13;
public static final int Toolbar_titleMarginTop = 15;
public static final int Toolbar_titleMargins = 12;
public static final int Toolbar_titleTextAppearance = 10;
public static final int Toolbar_titleTextColor = 23;
public static final int[] View = { 0x01010000, 0x010100da, 0x7f010129, 0x7f01012a, 0x7f01012b };
public static final int[] ViewBackgroundHelper = { 0x010100d4, 0x7f01012c, 0x7f01012d };
public static final int ViewBackgroundHelper_android_background = 0;
public static final int ViewBackgroundHelper_backgroundTint = 1;
public static final int ViewBackgroundHelper_backgroundTintMode = 2;
public static final int[] ViewStubCompat = { 0x010100d0, 0x010100f2, 0x010100f3 };
public static final int ViewStubCompat_android_id = 0;
public static final int ViewStubCompat_android_inflatedId = 2;
public static final int ViewStubCompat_android_layout = 1;
public static final int View_android_focusable = 1;
public static final int View_android_theme = 0;
public static final int View_paddingEnd = 3;
public static final int View_paddingStart = 2;
public static final int View_theme = 4;
}
}
| [
"jay.jiang@xiaoi.com"
] | jay.jiang@xiaoi.com |
638744acdfcb52cc998b2be870b26dce26a8de5e | f018700e44ea9901f989e3445c347fa463b9d7ac | /jhipster/src/main/java/tpiut/jhipster/tp/config/JacksonConfiguration.java | 524c81c464e7a3885e90e1da2a5a132ec1778b84 | [] | no_license | allansoule/tp-iut | 988e96d530a64b08b76ecfb5a1e1bf5974e7a8e6 | c237a169d7ae990fd19e5b901a1ec06532f8bd8c | refs/heads/master | 2020-04-11T18:12:33.244410 | 2018-12-21T20:43:12 | 2018-12-21T20:43:12 | 161,989,801 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,646 | java | package tpiut.jhipster.tp.config;
import com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.zalando.problem.ProblemModule;
import org.zalando.problem.violations.ConstraintViolationProblemModule;
@Configuration
public class JacksonConfiguration {
/**
* Support for Java date and time API.
* @return the corresponding Jackson module.
*/
@Bean
public JavaTimeModule javaTimeModule() {
return new JavaTimeModule();
}
@Bean
public Jdk8Module jdk8TimeModule() {
return new Jdk8Module();
}
/*
* Support for Hibernate types in Jackson.
*/
@Bean
public Hibernate5Module hibernate5Module() {
return new Hibernate5Module();
}
/*
* Jackson Afterburner module to speed up serialization/deserialization.
*/
@Bean
public AfterburnerModule afterburnerModule() {
return new AfterburnerModule();
}
/*
* Module for serialization/deserialization of RFC7807 Problem.
*/
@Bean
ProblemModule problemModule() {
return new ProblemModule();
}
/*
* Module for serialization/deserialization of ConstraintViolationProblem.
*/
@Bean
ConstraintViolationProblemModule constraintViolationProblemModule() {
return new ConstraintViolationProblemModule();
}
}
| [
"allan.soule@outlook.fr"
] | allan.soule@outlook.fr |
6e7450c4ca06633cf1314638815132f207fd94c1 | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/com/bytedance/sdk/openadsdk/utils/C3802x.java | 312a453ac0c706d60d18b46ed5aab83ddd8bffee | [] | no_license | Phantoms007/zhihuAPK | 58889c399ae56b16a9160a5f48b807e02c87797e | dcdbd103436a187f9c8b4be8f71bdf7813b6d201 | refs/heads/main | 2023-01-24T01:34:18.716323 | 2020-11-25T17:14:55 | 2020-11-25T17:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,398 | java | package com.bytedance.sdk.openadsdk.utils;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import com.baidu.mobads.interfaces.utils.IXAdSystemUtils;
import com.p438f.p439a.p441b.Hodor;
import com.zhihu.android.api.model.LiveVideoModel;
/* renamed from: com.bytedance.sdk.openadsdk.utils.x */
/* compiled from: NetworkUtils */
public class C3802x {
/* renamed from: a */
public static boolean m18954a(Context context) {
NetworkInfo[] allNetworkInfo;
try {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
if (!(connectivityManager == null || (allNetworkInfo = connectivityManager.getAllNetworkInfo()) == null)) {
for (NetworkInfo networkInfo : allNetworkInfo) {
if (networkInfo.getState() == NetworkInfo.State.CONNECTED || networkInfo.getState() == NetworkInfo.State.CONNECTING) {
return true;
}
}
}
} catch (Throwable unused) {
}
return false;
}
/* renamed from: b */
public static int m18956b(Context context) {
int c = m18957c(context);
if (c == 1) {
return 0;
}
switch (c) {
case 4:
return 1;
case 5:
return 4;
default:
return c;
}
}
/* renamed from: c */
public static int m18957c(Context context) {
try {
NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
if (activeNetworkInfo == null) {
return 0;
}
if (!activeNetworkInfo.isAvailable()) {
return 0;
}
switch (activeNetworkInfo.getType()) {
case 0:
switch (((TelephonyManager) Hodor.f17380a.mo27336a("phone", "com.zhihu.android.third:adpangolin")).getNetworkType()) {
case 1:
case 2:
case 4:
case 7:
case 11:
case 16:
return 2;
case 3:
case 5:
case 6:
case 8:
case 9:
case 10:
case 12:
case 14:
case 15:
case 17:
return 3;
case 13:
case 18:
case 19:
return 5;
default:
String subtypeName = activeNetworkInfo.getSubtypeName();
if (TextUtils.isEmpty(subtypeName) || (!subtypeName.equalsIgnoreCase("TD-SCDMA") && !subtypeName.equalsIgnoreCase("WCDMA") && !subtypeName.equalsIgnoreCase("CDMA2000"))) {
return 1;
}
return 3;
}
case 1:
return 4;
default:
return 1;
}
} catch (Throwable unused) {
return 1;
}
}
/* renamed from: d */
public static boolean m18958d(Context context) {
return m18957c(context) == 4;
}
/* renamed from: e */
public static boolean m18959e(Context context) {
return m18957c(context) == 5;
}
/* renamed from: f */
public static String m18960f(Context context) {
switch (m18957c(context)) {
case 2:
return "2g";
case 3:
return "3g";
case 4:
return IXAdSystemUtils.NT_WIFI;
case 5:
return "4g";
default:
return LiveVideoModel.MOBILE;
}
}
/* renamed from: a */
public static boolean m18955a(String str) {
return !TextUtils.isEmpty(str) && (str.startsWith("http://") || str.startsWith("https://"));
}
}
| [
"seasonpplp@qq.com"
] | seasonpplp@qq.com |
b1e043f72c21ccf2c790085c47704031283f47da | 97524f5559a53e151719ad2099e092c09ee8d30b | /02_FONTES/core/seguranca-core/src/test/java/br/gov/to/sefaz/seg/business/general/service/validator/UsuarioPrincipalEmpresaLoggedUserIsLegalRepresentativeValidatorTest.java | 4f5aa1e7e891718307e1b58ff39f3423656cf138 | [] | no_license | fredsilva/sistema | 46a4809e96b016f733c715da3c8f57e47996ccbd | 14dad24f7be8561611d3cdf5d7a8460b1c4300f6 | refs/heads/master | 2021-01-12T04:40:34.493234 | 2016-12-20T14:44:51 | 2016-12-20T14:44:51 | 77,699,605 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,156 | java | package br.gov.to.sefaz.seg.business.general.service.validator;
import br.gov.to.sefaz.business.service.validation.ValidationContext;
import br.gov.to.sefaz.business.service.validation.violation.CustomViolation;
import br.gov.to.sefaz.seg.business.authentication.handler.AuthenticatedUserHandler;
import br.gov.to.sefaz.seg.business.gestao.service.validator.UsuarioPrincipalEmpresaLoggedUserIsLegalRepresentativeValidator;
import br.gov.to.sefaz.seg.persistence.entity.UsuarioPrincipalEmpresa;
import br.gov.to.sefaz.seg.persistence.repository.UsuarioPrincipalEmpresaRepository;
import br.gov.to.sefaz.util.message.SourceBundle;
import org.apache.commons.lang3.StringUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import java.util.Set;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.powermock.api.mockito.PowerMockito.mock;
import static org.powermock.api.mockito.PowerMockito.mockStatic;
import static org.powermock.api.mockito.PowerMockito.when;
/**
* Teste para a classe
* {@link br.gov.to.sefaz.seg.business.gestao.
* service.validator.UsuarioPrincipalEmpresaLoggedUserIsLegalRepresentativeValidator}.
*
* @author <a href="mailto:thiago.luz@ntconsult.com.br">thiago.luz</a>
* @since 09/08/2016 11:14:00
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({SourceBundle.class,AuthenticatedUserHandler.class})
public class UsuarioPrincipalEmpresaLoggedUserIsLegalRepresentativeValidatorTest {
@Mock
private UsuarioPrincipalEmpresaRepository usuarioPrincipalEmpresaRepository;
@InjectMocks
private UsuarioPrincipalEmpresaLoggedUserIsLegalRepresentativeValidator validator;
@Before
public void setUp() {
mockStatic(SourceBundle.class);
mockStatic(AuthenticatedUserHandler.class);
}
@Test
public void shouldFailSupportWhenObjectNotUsuarioPrincipalEmpresa() {
// given
Object notUsuarioPrincipalEmpresa = new Object();
assertFalse(validator.support(notUsuarioPrincipalEmpresa.getClass(), ValidationContext.SAVE));
}
@Test
public void shouldFailSupportWhenContextNotExists() {
// given
UsuarioPrincipalEmpresa usuarioPrincipalEmpresa = getUsuarioPrincipalEmpresaMock();
assertFalse(validator.support(usuarioPrincipalEmpresa.getClass(), StringUtils.EMPTY));
}
@Test
public void shouldFailWhenLoggedUsuarioNotCompanyRepresentative() {
UsuarioPrincipalEmpresa usuarioPrincipalEmpresa = getUsuarioPrincipalEmpresaMock();
when(AuthenticatedUserHandler.isAuthenticated()).thenReturn(true);
when(AuthenticatedUserHandler.getCpf()).thenReturn("11111111111");
when(usuarioPrincipalEmpresa.getCnpjEmpresa()).thenReturn("0000000000000");
when(usuarioPrincipalEmpresaRepository.isLegalRepresentative(usuarioPrincipalEmpresa.getCnpjEmpresa()
.substring(0,8), "22222222222")).thenReturn(false);
Set<CustomViolation> violationSet = validator.validate(usuarioPrincipalEmpresa);
assertFalse(violationSet.isEmpty());
}
@Test
public void shouldFailWhenLoggedUsuarioIsCompanyRepresentative() {
UsuarioPrincipalEmpresa usuarioPrincipalEmpresa = getUsuarioPrincipalEmpresaMock();
when(AuthenticatedUserHandler.isAuthenticated()).thenReturn(true);
when(AuthenticatedUserHandler.getCpf()).thenReturn("11111111111");
when(usuarioPrincipalEmpresa.getCnpjEmpresa()).thenReturn("0000000000000");
when(usuarioPrincipalEmpresaRepository.isLegalRepresentative(usuarioPrincipalEmpresa.getCnpjEmpresa()
.substring(0,8), "11111111111")).thenReturn(true);
Set<CustomViolation> violationSet = validator.validate(usuarioPrincipalEmpresa);
assertTrue(violationSet.isEmpty());
}
private UsuarioPrincipalEmpresa getUsuarioPrincipalEmpresaMock() {
return mock(UsuarioPrincipalEmpresa.class);
}
} | [
"cristiano.luis@ntconsult.com.br"
] | cristiano.luis@ntconsult.com.br |
6a41411f7db3041d376251463285367b264142e1 | cc6c0621a3cec4f441b8821c649ecc75e57913ca | /oozie-rest-client/src/main/java/com/smelser/code/hadoop/oozie/client/entities/Coordinator.java | 85b22677a5a74a61a9c90ff9669ac83919aa5a93 | [] | no_license | paulsmelser/oozie-console | c704c28bbfee459b969d54d2dcf504722e83d54f | 97a23cf0909dd7172807a6be91c21ab62bdda507 | refs/heads/master | 2021-01-19T01:41:11.717142 | 2016-09-01T20:30:10 | 2016-09-01T20:30:10 | 43,586,508 | 2 | 0 | null | 2016-09-22T03:01:19 | 2015-10-03T03:26:35 | JavaScript | UTF-8 | Java | false | false | 5,005 | java | package com.smelser.code.hadoop.oozie.client.entities;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
public class Coordinator {
private String total;
private Date pauseTime;
private String coordJobName;
private String coordJobPath;
private String timeZone;
private int frequency;
private Configuration conf;
private Date endTime;
private String executionPolicy;
private Date startTime;
private String timeUnit;
private String concurrency;
private String coordJobId;
private String lastAction;
private String status;
private String acl;
private String mat_throttling;
private int timeOut;
private String nextMaterializedTime;
private String bundleId;
private String toString;
private String coordExternalId;
private String group;
private String user;
private String consoleUrl;
private Collection<CoordinatorAction> actions = new ArrayList<CoordinatorAction>();
public String getTotal() {
return total;
}
public void setTotal(String total) {
this.total = total;
}
public Date getPauseTime() {
return pauseTime;
}
public void setPauseTime(Date pauseTime) {
this.pauseTime = pauseTime;
}
public String getCoordJobName() {
return coordJobName;
}
public void setCoordJobName(String coordJobName) {
this.coordJobName = coordJobName;
}
public String getCoordJobPath() {
return coordJobPath;
}
public void setCoordJobPath(String coordJobPath) {
this.coordJobPath = coordJobPath;
}
public String getTimeZone() {
return timeZone;
}
public void setTimeZone(String timeZone) {
this.timeZone = timeZone;
}
public int getFrequency() {
return frequency;
}
public void setFrequency(int frequency) {
this.frequency = frequency;
}
public Configuration getConf() {
return conf;
}
public void setConf(Configuration conf) {
this.conf = conf;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getExecutionPolicy() {
return executionPolicy;
}
public void setExecutionPolicy(String executionPolicy) {
this.executionPolicy = executionPolicy;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public String getTimeUnit() {
return timeUnit;
}
public void setTimeUnit(String timeUnit) {
this.timeUnit = timeUnit;
}
public String getConcurrency() {
return concurrency;
}
public void setConcurrency(String concurrency) {
this.concurrency = concurrency;
}
public String getCoordJobId() {
return coordJobId;
}
public void setCoordJobId(String coordJobId) {
this.coordJobId = coordJobId;
}
public String getLastAction() {
return lastAction;
}
public void setLastAction(String lastAction) {
this.lastAction = lastAction;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getAcl() {
return acl;
}
public void setAcl(String acl) {
this.acl = acl;
}
public String getMat_throttling() {
return mat_throttling;
}
public void setMat_throttling(String mat_throttling) {
this.mat_throttling = mat_throttling;
}
public int getTimeOut() {
return timeOut;
}
public void setTimeOut(int timeOut) {
this.timeOut = timeOut;
}
public String getNextMaterializedTime() {
return nextMaterializedTime;
}
public void setNextMaterializedTime(String nextMaterializedTime) {
this.nextMaterializedTime = nextMaterializedTime;
}
public String getBundleId() {
return bundleId;
}
public void setBundleId(String bundleId) {
this.bundleId = bundleId;
}
public String getToString() {
return toString;
}
public void setToString(String toString) {
this.toString = toString;
}
public String getCoordExternalId() {
return coordExternalId;
}
public void setCoordExternalId(String coordExternalId) {
this.coordExternalId = coordExternalId;
}
public String getGroup() {
return group;
}
public void setGroup(String group) {
this.group = group;
}
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
public String getConsoleUrl() {
return consoleUrl;
}
public void setConsoleUrl(String consoleUrl) {
this.consoleUrl = consoleUrl;
}
public Collection<CoordinatorAction> getActions() {
return actions;
}
public void setActions(Collection<CoordinatorAction> actions) {
this.actions = actions;
}
public String print(){
return String.format("%10s |%10s |%10s |%10s |", getCoordJobId(), getCoordJobName(), getStartTime(), getEndTime());
}
}
| [
"paul.smelser@gmail.com"
] | paul.smelser@gmail.com |
bf43941a2aa4dc4f3ce2a91d55a38530538f8c04 | 4eae83e44c9a0b95b2f2bb85b3b635f0b81672cb | /app/src/main/java/org/helllabs/android/xmp/browser/BasePlaylistActivity.java | 21b5252ac25c818a381cff51dc869cd353694329 | [] | no_license | JakeCracknell/xmp-android-fork | 7c0e859f85b6c6cfc55a2cae9b6e2080928308ac | df29d32c15f26bf342259e9f90c15859dafe516f | refs/heads/master | 2021-05-16T03:11:03.470010 | 2016-01-26T21:12:47 | 2016-01-26T21:12:47 | 42,744,271 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,108 | java | package org.helllabs.android.xmp.browser;
import java.util.ArrayList;
import java.util.List;
import org.helllabs.android.xmp.R;
import org.helllabs.android.xmp.XmpApplication;
import org.helllabs.android.xmp.browser.playlist.PlaylistAdapter;
import org.helllabs.android.xmp.browser.playlist.PlaylistUtils;
import org.helllabs.android.xmp.modarchive.Search;
import org.helllabs.android.xmp.player.PlayerActivity;
import org.helllabs.android.xmp.preferences.Preferences;
import org.helllabs.android.xmp.service.ModInterface;
import org.helllabs.android.xmp.service.PlayerService;
import org.helllabs.android.xmp.util.InfoCache;
import org.helllabs.android.xmp.util.Log;
import org.helllabs.android.xmp.util.Message;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
import android.preference.PreferenceManager;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.RecyclerView;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.ImageButton;
import android.widget.ListView;
public abstract class BasePlaylistActivity extends ActionBarActivity {
private static final String TAG = "PlaylistActivity";
private static final int SETTINGS_REQUEST = 45;
private static final int PLAY_MOD_REQUEST = 669;
private static final int SEARCH_REQUEST = 47;
private boolean mShowToasts;
private ModInterface mModPlayer;
private List<String> mAddList;
protected SharedPreferences mPrefs;
protected PlaylistAdapter mPlaylistAdapter;
private boolean refresh;
private final OnClickListener playAllButtonListener = new OnClickListener() {
@Override
public void onClick(final View view) {
final List<String> list = getAllFiles();
if (list.isEmpty()) {
Message.toast(BasePlaylistActivity.this, R.string.error_no_files_to_play);
} else {
playModule(list);
}
}
};
private final OnClickListener toggleLoopButtonListener = new OnClickListener() {
@Override
public void onClick(final View view) {
boolean loopMode = isLoopMode();
loopMode ^= true;
((ImageButton)view).setImageResource(loopMode ?
R.drawable.list_loop_on : R.drawable.list_loop_off);
if (mShowToasts) {
Message.toast(view.getContext(), loopMode ? R.string.msg_loop_on : R.string.msg_loop_off);
}
setLoopMode(loopMode);
}
};
private final OnClickListener toggleShuffleButtonListener = new OnClickListener() {
@Override
public void onClick(final View view) {
boolean shuffleMode = isShuffleMode();
shuffleMode ^= true;
((ImageButton)view).setImageResource(shuffleMode ? R.drawable.list_shuffle_on : R.drawable.list_shuffle_off);
if (mShowToasts) {
Message.toast(view.getContext(), shuffleMode ? R.string.msg_shuffle_on : R.string.msg_shuffle_off);
}
setShuffleMode(shuffleMode);
}
};
// Connection
private final ServiceConnection connection = new ServiceConnection() {
public void onServiceConnected(final ComponentName className, final IBinder service) {
mModPlayer = ModInterface.Stub.asInterface(service);
try {
mModPlayer.add(mAddList);
} catch (RemoteException e) {
Message.toast(BasePlaylistActivity.this, R.string.error_adding_mod);
}
unbindService(connection);
}
public void onServiceDisconnected(final ComponentName className) {
mModPlayer = null; // NOPMD
}
};
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
mShowToasts = mPrefs.getBoolean(Preferences.SHOW_TOAST, true);
// Action bar icon navigation
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
@Override
public void onResume() {
super.onResume();
if (refresh) {
update();
}
}
protected abstract void setShuffleMode(boolean shuffleMode);
protected abstract void setLoopMode(boolean loopMode);
protected abstract boolean isShuffleMode();
protected abstract boolean isLoopMode();
protected abstract List<String> getAllFiles();
public abstract void update();
protected void setupButtons() {
final ImageButton playAllButton = (ImageButton)findViewById(R.id.play_all);
final ImageButton toggleLoopButton = (ImageButton)findViewById(R.id.toggle_loop);
final ImageButton toggleShuffleButton = (ImageButton)findViewById(R.id.toggle_shuffle);
playAllButton.setImageResource(R.drawable.list_play);
playAllButton.setOnClickListener(playAllButtonListener);
toggleLoopButton.setImageResource(isLoopMode() ? R.drawable.list_loop_on : R.drawable.list_loop_off);
toggleLoopButton.setOnClickListener(toggleLoopButtonListener);
toggleShuffleButton.setImageResource(isShuffleMode() ? R.drawable.list_shuffle_on : R.drawable.list_shuffle_off);
toggleShuffleButton.setOnClickListener(toggleShuffleButtonListener);
}
public void onItemClick(final PlaylistAdapter adapter, final View view, final int position) {
final String filename = adapter.getItem(position).getFile().getPath();
final int mode = Integer.parseInt(mPrefs.getString(Preferences.PLAYLIST_MODE, "1"));
/* Test module again if invalid, in case a new file format is added to the
* player library and the file was previously unrecognized and cached as invalid.
*/
if (InfoCache.testModuleForceIfInvalid(filename)) {
switch (mode) {
case 1: // play all starting at this one
final int count = position - adapter.getDirectoryCount();
if (count >= 0) {
playModule(adapter.getFilenameList(), count, isShuffleMode());
}
break;
case 2: // play this one
playModule(filename);
break;
case 3: // add to queue
addToQueue(filename);
Message.toast(this, "Added to queue");
break;
}
} else {
Message.toast(this, "Unrecognized file format");
}
}
/*
// Item click
protected void setOnItemClickListener(final RecyclerView list) {
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(final AdapterView<?> list, final View view, final int position, final long id) {
onListItemClick(list, view, position, id);
}
});
}
*/
// Play this module
protected void playModule(final String mod) {
final List<String> modList = new ArrayList<String>();
modList.add(mod);
playModule(modList, 0, false);
}
// Play all modules in list and honor default shuffle mode
protected void playModule(final List<String> modList) {
playModule(modList, 0, false);
}
protected void playModule(final List<String> modList, final int start) {
playModule(modList, start, false);
}
protected void playModule(final List<String> modList, final int start, final boolean keepFirst) {
final Intent intent = new Intent(this, PlayerActivity.class);
((XmpApplication)getApplication()).setFileList(modList);
intent.putExtra(PlayerActivity.PARM_SHUFFLE, isShuffleMode());
intent.putExtra(PlayerActivity.PARM_LOOP, isLoopMode());
intent.putExtra(PlayerActivity.PARM_START, start);
intent.putExtra(PlayerActivity.PARM_KEEPFIRST, keepFirst);
//intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // prevent screen flicker when starting player activity
Log.i(TAG, "Start Player activity");
startActivityForResult(intent, PLAY_MOD_REQUEST);
}
@Override
protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
Log.i(TAG, "Activity result " + requestCode + "," + resultCode);
switch (requestCode) {
case SETTINGS_REQUEST:
update();
mShowToasts = mPrefs.getBoolean(Preferences.SHOW_TOAST, true);
break;
case PLAY_MOD_REQUEST:
if (resultCode != RESULT_OK) {
update();
}
break;
case SEARCH_REQUEST:
refresh = true;
break;
}
}
protected void addToQueue(final String filename) {
if (InfoCache.testModule(filename)) {
if (PlayerService.isAlive) {
final Intent service = new Intent(this, PlayerService.class);
mAddList = new ArrayList<String>();
mAddList.add(filename);
bindService(service, connection, 0);
} else {
playModule(filename);
}
}
}
protected void addToQueue(final List<String> list) {
final List<String> realList = new ArrayList<String>();
int realSize = 0;
boolean invalid = false;
for (final String filename : list) {
if (InfoCache.testModule(filename)) {
realList.add(filename);
realSize++;
} else {
invalid = true;
}
}
if (invalid) {
Message.toast(this, R.string.msg_only_valid_files_sent);
}
if (realSize > 0) {
if (PlayerService.isAlive) {
final Intent service = new Intent(this, PlayerService.class);
mAddList = realList;
bindService(service, connection, 0);
} else {
playModule(realList);
}
}
}
// Menu
@Override
public boolean onCreateOptionsMenu(final Menu menu) {
final MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.options_menu, menu);
// Calling super after populating the menu is necessary here to ensure that the
// action bar helpers have a chance to handle this event.
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(final MenuItem item) {
switch(item.getItemId()) {
case android.R.id.home:
final Intent intent = new Intent(this, PlaylistMenu.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
return true;
case R.id.menu_new_playlist:
PlaylistUtils.newPlaylistDialog(this);
break;
case R.id.menu_prefs:
startActivityForResult(new Intent(this, Preferences.class), SETTINGS_REQUEST);
break;
case R.id.menu_refresh:
update();
break;
case R.id.menu_download:
startActivityForResult(new Intent(this, Search.class), SEARCH_REQUEST);
break;
}
return super.onOptionsItemSelected(item);
}
}
| [
"cmatsuoka@gmail.com"
] | cmatsuoka@gmail.com |
bc60836b8ca9fef5429bde9c97ca2ba71cff53ca | 0303abf7cf8b2f8ae00f0621075f20823177caa7 | /SEGP-09/src/Home.java | 8fb07f6a90bdd70d1996153bfde36c9923415538 | [] | no_license | UmerMalik91/SEGP_09 | 299c9c4c71d1b4de2da6cab46e2a5903c27c62f6 | c4bd726d6c66f79893bb312f0c16866ba34423f7 | refs/heads/master | 2021-06-09T09:48:09.616531 | 2016-11-01T05:20:13 | 2016-11-01T05:20:13 | 72,227,765 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 25,898 | java | import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.FileNotFoundException;
import java.lang.reflect.Array;
import java.util.ArrayList;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JFileChooser;
import java.awt.Font;
import java.awt.Color;
public class Home extends JPanel implements ActionListener{
private JTable tableOfTeacher;
private DefaultTableModel dtm;
private JTextField tTEmail;
private JTextField tTPersonalContact;
private JTextField tTName;
private JTextField tTAllocationLoad;
private JTextField tTDepartment;
private JPanel currentSubPanel;
ArrayList<ArrayList<String>> PAT_Data=new ArrayList<ArrayList<String>>();
Object[][] Pat_Table_data=null;
private JTextField tTOfficeNo;
private String selectedPatID;
private String selectedPatName;
JButton btnAllocatedStudent;
String sDepartment;
String sYear;
JPanel panel_2;
JCheckBox sort ;
JTable currentTable=null;
JPanel panel;
JScrollPane scrollPaneTeacher,currentSrollPane;
JCheckBox cbTEnableEditing;
JButton save;
String beforeEditContact,afterEditContact;
/**
* Create the panel.
*/
public Home() {
GetData data=new GetData();
PAT_Data=data.getData("PAT_data", "select * from pats_information;");
Pat_Table_data=new String[PAT_Data.size()-1][2];
for(int i=1;i<PAT_Data.size();i++){
for(int j=0;j<PAT_Data.get(i).size();j++){
if(j==1){
Pat_Table_data[i-1][j-1]=PAT_Data.get(i).get(j);
}
else if(j==6){
Pat_Table_data[i-1][j-5]=PAT_Data.get(i).get(j);
}
}
}
// TableData tableData=new TableData();
// Pat_Table_data=tableData.getPATData(PAT_Data,"Name","Department");
setLayout(null);
JMenuBar menuBar = new JMenuBar();
menuBar.setBounds(0, 0, 736, 61);
add(menuBar);
JMenu mnPat = new JMenu("PAT");
mnPat.setBackground(Color.BLACK);
mnPat.setFont(new Font("Times New Roman", Font.BOLD, 19));
menuBar.add(mnPat);
mnPat.addMouseListener(new MouseListener() {
@Override
public void mouseReleased(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mousePressed(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mouseExited(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mouseEntered(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mouseClicked(MouseEvent e) {
new Home();
panel_2.setBounds(currentSubPanel.getBounds());
remove(currentSubPanel);
currentSubPanel=panel_2;
add(panel_2);
revalidate();
repaint();
}
});
JMenu mnStudent = new JMenu("Student");
mnStudent.setFont(new Font("Times New Roman", Font.BOLD, 19));
menuBar.add(mnStudent);
JMenu mnYear = new JMenu("Year-4");
mnStudent.add(mnYear);
JMenuItem mntmCs = new JMenuItem("CS");
mnYear.add(mntmCs);
mntmCs.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent e) {
JMenuItem menuItem = (JMenuItem)e.getSource();
JMenuItem jmi = (JMenuItem) e.getSource();
JPopupMenu jpm = (JPopupMenu) jmi.getParent();
JMenu menu = (JMenu) jpm.getInvoker();
sDepartment=menuItem.getText();
sYear=menu.getText();
Student std=new Student();
changepanel(std);
std.stdDataPerYear(sYear,sDepartment);
// TODO Auto-generated method stub
}
});
JMenuItem mntmEe = new JMenuItem("EE");
mnYear.add(mntmEe);
mntmEe.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent e) {
JMenuItem menuItem = (JMenuItem)e.getSource();
JMenuItem jmi = (JMenuItem) e.getSource();
JPopupMenu jpm = (JPopupMenu) jmi.getParent();
JMenu menu = (JMenu) jpm.getInvoker();
sDepartment=menuItem.getText();
sYear=menu.getText();
Student std=new Student();
changepanel(std);
std.stdDataPerYear(sYear,sDepartment);
// TODO Auto-generated method stub
}
});
JMenu mnYear_1 = new JMenu("Year-3");
mnStudent.add(mnYear_1);
JMenuItem mntmCs_1 = new JMenuItem("CS");
mnYear_1.add(mntmCs_1);
mntmCs_1.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent e) {
JMenuItem menuItem = (JMenuItem)e.getSource();
JMenuItem jmi = (JMenuItem) e.getSource();
JPopupMenu jpm = (JPopupMenu) jmi.getParent();
JMenu menu = (JMenu) jpm.getInvoker();
sDepartment=menuItem.getText();
sYear=menu.getText();
Student std=new Student();
changepanel(std);
std.stdDataPerYear(sYear,sDepartment);
// TODO Auto-generated method stub
}
});
JMenuItem mntmEe_1 = new JMenuItem("EE");
mnYear_1.add(mntmEe_1);
mntmEe_1.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent e) {
JMenuItem menuItem = (JMenuItem)e.getSource();
JMenuItem jmi = (JMenuItem) e.getSource();
JPopupMenu jpm = (JPopupMenu) jmi.getParent();
JMenu menu = (JMenu) jpm.getInvoker();
sDepartment=menuItem.getText();
sYear=menu.getText();
Student std=new Student();
changepanel(std);
std.stdDataPerYear(sYear,sDepartment);
// TODO Auto-generated method stub
}
});
JMenu mnYear_2 = new JMenu("Year-2");
mnStudent.add(mnYear_2);
JMenuItem mntmCs_2 = new JMenuItem("CS");
mnYear_2.add(mntmCs_2);
mntmCs_2.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent e) {
JMenuItem menuItem = (JMenuItem)e.getSource();
JMenuItem jmi = (JMenuItem) e.getSource();
JPopupMenu jpm = (JPopupMenu) jmi.getParent();
JMenu menu = (JMenu) jpm.getInvoker();
sDepartment=menuItem.getText();
sYear=menu.getText();
Student std=new Student();
changepanel(std);
std.stdDataPerYear(sYear,sDepartment);
// TODO Auto-generated method stub
}
});
JMenuItem mntmEe_2 = new JMenuItem("EE");
mnYear_2.add(mntmEe_2);
mntmEe_2.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent e) {
JMenuItem menuItem = (JMenuItem)e.getSource();
JMenuItem jmi = (JMenuItem) e.getSource();
JPopupMenu jpm = (JPopupMenu) jmi.getParent();
JMenu menu = (JMenu) jpm.getInvoker();
sDepartment=menuItem.getText();
sYear=menu.getText();
Student std=new Student();
changepanel(std);
std.stdDataPerYear(sYear,sDepartment);
// TODO Auto-generated method stub
}
});
JMenu mnImportData = new JMenu("Import Data");
mnImportData.setFont(new Font("Times New Roman", Font.BOLD, 19));
menuBar.add(mnImportData);
JMenuItem mntmStudentData = new JMenuItem("Student Data");
mnImportData.add(mntmStudentData);
mntmStudentData.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ev) {
FileChooser fileChooser=new FileChooser();
String path=fileChooser.getPath();
if(path.equals("Not Valid")){
JOptionPane.showMessageDialog(null, "File is not supported", "Warning",
JOptionPane.WARNING_MESSAGE);
}
else
{
JOptionPane.showMessageDialog(null,
"All data is imported");
StudentData studentData=new StudentData();
try {
studentData.enter_records(path);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
});
JMenuItem mntmPatData = new JMenuItem("PAT Data");
mnImportData.add(mntmPatData);
mntmPatData.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ev) {
FileChooser fileChooser=new FileChooser();
String path=fileChooser.getPath();
if(path.equals("Not Valid")){
JOptionPane.showMessageDialog(null, "File is not supported", "Warning",
JOptionPane.WARNING_MESSAGE);
}
else
{
JOptionPane.showMessageDialog(null,
"All data is imported");
PatData patData=new PatData();
try {
patData.enter_records(path);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
});
JMenu mnCreatePdf = new JMenu("Create PDF");
mnCreatePdf.setFont(new Font("Times New Roman", Font.BOLD, 19));
menuBar.add(mnCreatePdf);
JMenu mnNotification = new JMenu("Notification");
mnNotification.setFont(new Font("Times New Roman", Font.BOLD, 19));
menuBar.add(mnNotification);
menuBar.add(Box.createHorizontalGlue());
JMenu mnLogOut = new JMenu("LogOut");
mnLogOut.setBackground(Color.BLACK);
mnLogOut.setFont(new Font("Times New Roman", Font.BOLD, 19));
menuBar.add(mnLogOut);
mnLogOut.addMouseListener(new MouseListener() {
@Override
public void mouseReleased(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mousePressed(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mouseExited(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mouseEntered(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mouseClicked(MouseEvent e) {
Main2 logIn=new Main2();
logIn.setBounds(getBounds());
removeAll();
add(logIn);
revalidate();
repaint();
}
});
JMenuItem mntmPatList = new JMenuItem("PAT List");
mnCreatePdf.add(mntmPatList);
mntmPatList.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
GetData data=new GetData();
CreatePDF pdf=new CreatePDF ();
pdf.createPDF(data.getData("PAT_data", "select * from pats_information;"),"PAT.pdf");
// TODO Auto-generated method stub
}
});
JMenu mnStudentList = new JMenu("Student List");
mnCreatePdf.add(mnStudentList);
JMenuItem mntmBatch = new JMenuItem("Batch 2017");
mnStudentList.add(mntmBatch);
mntmBatch.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
GetData data=new GetData();
CreatePDF pdf=new CreatePDF ();
pdf.createPDF(data.getData("Student_data", "select * from student_information where year=4;"),"Year_4.pdf");
// TODO Auto-generated method stub
}
});
JMenuItem mntmBatch_1 = new JMenuItem("Batch 2018");
mnStudentList.add(mntmBatch_1);
mntmBatch_1.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
GetData data=new GetData();
CreatePDF pdf=new CreatePDF ();
pdf.createPDF(data.getData("Student_data", "select * from student_information where year=3;"),"Year_3.pdf");
// TODO Auto-generated method stub
}
});
JMenuItem mntmBatch_2 = new JMenuItem("Batch 2019");
mnStudentList.add(mntmBatch_2);
mntmBatch_2.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
GetData data=new GetData();
CreatePDF pdf=new CreatePDF ();
pdf.createPDF(data.getData("Student_data", "select * from student_information where year=2;"),"Year_2.pdf");
// TODO Auto-generated method stub
}
});
JMenuItem mntmAllStudent = new JMenuItem("All Student");
mnStudentList.add(mntmAllStudent);
mntmAllStudent.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
GetData data=new GetData();
CreatePDF pdf=new CreatePDF ();
pdf.createPDF(data.getData("Student_data", "select * from student_information ;"),"All_Student.pdf");
// TODO Auto-generated method stub
}
});
JMenu mnAllocatedStudentOf = new JMenu("Allocated Student of");
mnCreatePdf.add(mnAllocatedStudentOf);
JMenu mnComputerScience = new JMenu("Computer Science");
mnAllocatedStudentOf.add(mnComputerScience);
JMenuItem mntmDrmalikJahanKhan = new JMenuItem("DR.Malik Jahan Khan");
mnComputerScience.add(mntmDrmalikJahanKhan);
mntmDrmalikJahanKhan.addActionListener(this);
JMenuItem mntmDrNomanJaved = new JMenuItem("Dr. Noman Javed");
mnComputerScience.add(mntmDrNomanJaved);
mnComputerScience.addActionListener(this);
JMenuItem mntmDrMuhammadAdil = new JMenuItem("Dr. Muhammad Adil Raja");
mnComputerScience.add(mntmDrMuhammadAdil);
mntmDrMuhammadAdil.addActionListener(this);
JMenuItem mntmDrjunaidAktar = new JMenuItem("Dr.Junaid Aktar");
mnComputerScience.add(mntmDrjunaidAktar);
mntmDrjunaidAktar.addActionListener(this);
JMenuItem mntmDrAdnanIqbal = new JMenuItem("Dr. Adnan Iqbal");
mnComputerScience.add(mntmDrAdnanIqbal);
mntmDrAdnanIqbal.addActionListener(this);
JMenuItem mntmMuhammadSarmadAli = new JMenuItem("Muhammad Sarmad Ali");
mnComputerScience.add(mntmMuhammadSarmadAli);
mntmMuhammadSarmadAli.addActionListener(this);
JMenuItem mntmAmbreenHanif = new JMenuItem("Ambreen Hanif");
mnComputerScience.add(mntmAmbreenHanif);
mntmAmbreenHanif.addActionListener(this);
JMenuItem mntmMuhammadSherazAnjam = new JMenuItem("Muhammad Sheraz Anjam");
mnComputerScience.add(mntmMuhammadSherazAnjam);
mntmMuhammadSherazAnjam.addActionListener(this);
JMenuItem mntmDrSyedAsad = new JMenuItem("Dr. Syed Asad Alam");
mnComputerScience.add(mntmDrSyedAsad);
mntmDrSyedAsad.addActionListener(this);
JMenu mnEe = new JMenu("EE");
mnAllocatedStudentOf.add(mnEe);
JMenuItem mntmNewMenuItem = new JMenuItem("Dr.Muhammad Naeem Ayyaz");
mnEe.add(mntmNewMenuItem);
mntmNewMenuItem.addActionListener(this);
JMenuItem mntmDr = new JMenuItem("Dr.Amir Khurrum Rashid");
mnEe.add(mntmDr);
mntmDr.addActionListener(this);
JMenuItem mntmDrMuhammadSaqib = new JMenuItem("Dr. Muhammad Saqib Ilyas");
mnEe.add(mntmDrMuhammadSaqib);
mntmDrMuhammadSaqib.addActionListener(this);
JMenuItem mntmDrIsrarAli = new JMenuItem("Dr. Israr Ali Khan");
mnEe.add(mntmDrIsrarAli);
mntmDrIsrarAli.addActionListener(this);
JMenuItem mntmDrJalaluddinQureshi = new JMenuItem("Dr. Jalaluddin Qureshi");
mnEe.add(mntmDrJalaluddinQureshi);
mntmDrJalaluddinQureshi.addActionListener(this);
JMenuItem mntmDrAishaMahmood = new JMenuItem("Dr. Aisha Mahmood");
mnEe.add(mntmDrAishaMahmood);
mntmDrAishaMahmood.addActionListener(this);
JMenuItem mntmMuhammadHanif = new JMenuItem("Muhammad Hanif");
mnEe.add(mntmMuhammadHanif);
mntmMuhammadHanif.addActionListener(this);
JMenuItem mntmMuhammadFayyazKashif = new JMenuItem("Muhammad Fayyaz Kashif");
mnEe.add(mntmMuhammadFayyazKashif);
mntmMuhammadFayyazKashif.addActionListener(this);
JMenuItem mntmIramAziz = new JMenuItem("Iram Aziz");
mnEe.add(mntmIramAziz);
mntmIramAziz.addActionListener(this);
JMenuItem mntmFaiqaAli = new JMenuItem("Faiqa Ali");
mnEe.add(mntmFaiqaAli);
mntmFaiqaAli.addActionListener(this);
JMenuItem mntmAbberahAhmad = new JMenuItem("Abbirah Ahmed");
mnEe.add(mntmAbberahAhmad);
mntmAbberahAhmad.addActionListener(this);
JMenu mnEnglish = new JMenu("English");
mnAllocatedStudentOf.add(mnEnglish);
JMenuItem mntmZameerNawaz = new JMenuItem("Muhammad Zameer Nawaz");
mnEnglish.add(mntmZameerNawaz);
mntmZameerNawaz.addActionListener(this);
JMenuItem mntmIrfanNadeem = new JMenuItem("Muhammad Irfan Nadeem");
mnEnglish.add(mntmIrfanNadeem);
mntmIrfanNadeem.addActionListener(this);
panel_2 = new JPanel();
panel_2.setBounds(10, 60, 750, 381);
add(panel_2);
currentSubPanel=panel_2;
panel_2.setLayout(null);
JLabel lblNewLabel = new JLabel("PAT List");
lblNewLabel.setFont(new Font("Times New Roman", Font.PLAIN, 16));
lblNewLabel.setBounds(0, 7, 150, 25);
panel_2.add(lblNewLabel);
Object colm[]={"Name","Department"};
// Object row[][]={{"Adil Raja","CS"},{"Sarmad Ali","CS"}};
dtm = new DefaultTableModel(Pat_Table_data,colm);
panel = new JPanel();
panel.setBounds(0, 36, 266, 330);
panel_2.add(panel);
panel.setLayout(null);
tableOfTeacher = new JTable(Pat_Table_data,colm);
tableOfTeacher.setFont(new Font("Tahoma", Font.PLAIN, 11));
currentTable=tableOfTeacher;
scrollPaneTeacher = new JScrollPane(tableOfTeacher);
currentSrollPane=scrollPaneTeacher;
scrollPaneTeacher.setBounds(0, 0, 266, 330);
panel.add(scrollPaneTeacher);
tableOfTeacher.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
@Override
public void valueChanged(ListSelectionEvent arg0) {
// if(sort.isSelected()==true){
// GetData data=new GetData();
// PAT_Data=data.getData("PAT_data", "select * from pats_information order by name;");
// Pat_Table_data=new String[PAT_Data.size()-1][2];
//
// for(int i=1;i<PAT_Data.size();i++){
// for(int j=0;j<PAT_Data.get(i).size();j++){
//
// if(j==1){
// Pat_Table_data[i-1][j-1]=PAT_Data.get(i).get(j);
// }
// else if(j==6){
// Pat_Table_data[i-1][j-5]=PAT_Data.get(i).get(j);
//
// }
//
//
// }
// }
// updateTable();
// }
cbTEnableEditing.setEnabled(true);
btnAllocatedStudent.setEnabled(true);
info_detail(tableOfTeacher.getValueAt(tableOfTeacher.getSelectedRow(), 0).toString());
// TODO Auto-generated method stub
}
});
JPanel panel_1 = new JPanel();
panel_1.setBounds(276, 36, 448, 330);
panel_2.add(panel_1);
panel_1.setLayout(null);
JLabel lTName = new JLabel("Name");
lTName.setFont(new Font("Times New Roman", Font.PLAIN, 16));
lTName.setBounds(138, 24, 57, 21);
panel_1.add(lTName);
JLabel lTDepartment = new JLabel("Department");
lTDepartment.setFont(new Font("Times New Roman", Font.PLAIN, 17));
lTDepartment.setBounds(138, 61, 110, 21);
panel_1.add(lTDepartment);
tTEmail = new JTextField();
tTEmail.setEditable(false);
tTEmail.setBounds(259, 101, 179, 29);
panel_1.add(tTEmail);
tTEmail.setColumns(10);
JButton btnNewButton = new JButton("New button");
btnNewButton.setBounds(10, 11, 118, 114);
panel_1.add(btnNewButton);
tTPersonalContact = new JTextField();
tTPersonalContact.setEditable(false);
tTPersonalContact.setBounds(259, 143, 179, 29);
panel_1.add(tTPersonalContact);
tTPersonalContact.setColumns(10);
JLabel lTEmail = new JLabel("Email");
lTEmail.setFont(new Font("Times New Roman", Font.PLAIN, 17));
lTEmail.setBounds(138, 101, 77, 21);
panel_1.add(lTEmail);
JLabel lTContact = new JLabel("Contact #");
lTContact.setFont(new Font("Times New Roman", Font.PLAIN, 17));
lTContact.setBounds(138, 144, 104, 21);
panel_1.add(lTContact);
JLabel lLoaded = new JLabel("Allocated Load");
lLoaded.setFont(new Font("Times New Roman", Font.PLAIN, 17));
lLoaded.setBounds(138, 214, 127, 21);
panel_1.add(lLoaded);
tTName = new JTextField();
tTName.setEditable(false);
tTName.setBounds(259, 22, 179, 29);
panel_1.add(tTName);
tTName.setColumns(10);
btnAllocatedStudent = new JButton("Allocated Students");
btnAllocatedStudent.setFont(new Font("Times New Roman", Font.PLAIN, 16));
btnAllocatedStudent.setBounds(152, 294, 153, 29);
panel_1.add(btnAllocatedStudent);
btnAllocatedStudent.setEnabled(false);
btnAllocatedStudent.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
Student p2=new Student();
p2.setBounds(currentSubPanel.getBounds());
remove(currentSubPanel);
p2.setPatInfo(selectedPatID,selectedPatName);
currentSubPanel=p2;
add(p2);
revalidate();
repaint();
// TODO Auto-generated method stub
}
});
cbTEnableEditing = new JCheckBox("Enable Editing");
cbTEnableEditing.setEnabled(false);
cbTEnableEditing.setFont(new Font("Times New Roman", Font.PLAIN, 18));
cbTEnableEditing.setBounds(10, 294, 136, 29);
panel_1.add(cbTEnableEditing);
cbTEnableEditing.addItemListener(new ItemListener(){
@Override
public void itemStateChanged(ItemEvent e) {
if(e.getStateChange() == ItemEvent.SELECTED){
tTPersonalContact.setEditable(true);
save.setEnabled(true);
beforeEditContact=tTPersonalContact.getText();
}
else if(e.getStateChange() == ItemEvent.DESELECTED){
tTPersonalContact.setEditable(false);
}
validate();
repaint();
}
});
tTAllocationLoad = new JTextField();
tTAllocationLoad.setEditable(false);
tTAllocationLoad.setBounds(259, 215, 179, 29);
panel_1.add(tTAllocationLoad);
tTAllocationLoad.setColumns(10);
tTDepartment = new JTextField();
tTDepartment.setToolTipText("");
tTDepartment.setEditable(false);
tTDepartment.setBounds(258, 62, 180, 29);
panel_1.add(tTDepartment);
tTDepartment.setColumns(10);
JLabel lOfficeNo = new JLabel("Office #");
lOfficeNo.setFont(new Font("Times New Roman", Font.PLAIN, 17));
lOfficeNo.setBounds(138, 180, 91, 21);
panel_1.add(lOfficeNo);
tTOfficeNo = new JTextField();
tTOfficeNo.setEditable(false);
tTOfficeNo.setBounds(259, 179, 179, 29);
panel_1.add(tTOfficeNo);
tTOfficeNo.setColumns(10);
save = new JButton("Save");
save.setEnabled(false);
save.setFont(new Font("Times New Roman", Font.PLAIN, 16));
save.setBounds(309, 294, 89, 28);
panel_1.add(save);
save.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
afterEditContact=tTPersonalContact.getText();
if(afterEditContact.equals(beforeEditContact)==false){
GetData data=new GetData();
data.setUpdate( "update pats_information set personal_contact=\""
+afterEditContact+"\" where Email_address=\""+tTEmail.getText()+"\";");
}
// TODO Auto-generated method stub
}
});
sort = new JCheckBox("Sort");
sort.setFont(new Font("Times New Roman", Font.PLAIN, 16));
sort.setBounds(187, 7, 97, 23);
panel_2.add(sort);
sort.addItemListener(new ItemListener(){
@Override
public void itemStateChanged(ItemEvent e) {
GetData data=new GetData();
PAT_Data=data.getData("PAT_data", "select * from pats_information order by name;");
Pat_Table_data=new String[PAT_Data.size()-1][2];
for(int i=1;i<PAT_Data.size();i++){
for(int j=0;j<PAT_Data.get(i).size();j++){
if(j==1){
Pat_Table_data[i-1][j-1]=PAT_Data.get(i).get(j);
}
else if(j==6){
Pat_Table_data[i-1][j-5]=PAT_Data.get(i).get(j);
}
}
}
updateTable();
validate();
repaint();
}
});
}
public void info_detail(String Name){
for(int row=0;row<PAT_Data.size();row++){
for(int colm=0;colm<PAT_Data.get(row).size();colm++){
if(PAT_Data.get(row).get(colm).equals(Name)){
selectedPatID=PAT_Data.get(row).get(0);
selectedPatName=PAT_Data.get(row).get(colm);
tTName.setText(PAT_Data.get(row).get(colm));
colm++;
tTEmail.setText(PAT_Data.get(row).get(colm));
colm++;
tTAllocationLoad.setText(PAT_Data.get(row).get(colm));
colm++;
tTOfficeNo.setText(PAT_Data.get(row).get(colm));
colm++;
tTPersonalContact.setText(PAT_Data.get(row).get(colm));
colm++;
tTDepartment.setText(PAT_Data.get(row).get(colm));
beforeEditContact=tTPersonalContact.getText();
break;
}
}
}
}
public void changepanel(JPanel panelToReplace){
panelToReplace.setBounds(currentSubPanel.getBounds());
remove(currentSubPanel);
currentSubPanel=panelToReplace;
add(panelToReplace);
revalidate();
repaint();
}
@Override
public void actionPerformed(ActionEvent e) {
String s=e.getSource().toString();
String PatName=s.substring(s.indexOf("text=")+5,s.length()-1);
GetData data=new GetData();
CreatePDF pdf=new CreatePDF ();
pdf.createPDF(data.pat_ID(s.substring(s.length()-8,s.length()-3)),"Allocated_Student_"+PatName+".pdf");
// TODO Auto-generated method stub
}
public void updateTable(){
Object colm[]={"Name","Department"};
dtm = new DefaultTableModel(Pat_Table_data,colm);
panel.remove(scrollPaneTeacher);
tableOfTeacher = new JTable(Pat_Table_data,colm);
tableOfTeacher.setBounds(currentTable.getBounds());
JScrollPane scrollPaneTeacher = new JScrollPane(tableOfTeacher);
scrollPaneTeacher.setBounds(0, 0, 266, 330);
panel.remove(currentSrollPane);
panel.add(scrollPaneTeacher);
panel.revalidate();
panel.repaint();
currentTable=tableOfTeacher;
}
}
| [
"saleem.namalian@gmail.com"
] | saleem.namalian@gmail.com |
2348f3ab15b6c9cef85df21ce87a6f62aaa96f62 | dbb0163bf6037bc8469e0f0c6aee2faf3b81f00a | /src/StrategyPattern/RocketVehicle.java | d75686b909b9d98a57891e17e63a384cc56679aa | [] | no_license | sanjay51/DesignPatternExamples | 6ea0d49986b76902181d43ab788444cb727d6900 | 0293b6e0329aec1ecaaf56e43c6070dc6e06011a | refs/heads/master | 2021-01-01T03:39:05.186880 | 2016-05-15T16:16:45 | 2016-05-15T16:16:45 | 58,804,850 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 207 | java | package StrategyPattern;
/**
* Created by sanjav on 5/15/16.
*/
public class RocketVehicle extends Vehicle {
public RocketVehicle() {
this.setGoAlgorithm(new GoByFlyingRocketSpeed());
}
}
| [
"sanjay.verma.nitk@gmail.com"
] | sanjay.verma.nitk@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.