blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
⌀ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1403eb2954da5698c5c11361e31151dca0d85e1f
|
2f39a960a40c5e62afec99ebeefae241e7b984df
|
/HiveTV2.0/src/com/hiveview/tv/utils/JsonUtils.java
|
40e2357e79055b0ded552a07db8a72263939c8a0
|
[] |
no_license
|
zhaweijin/mySetting
|
5e773026a1777a01d05842991171b01a74bb9c0e
|
5d18e3abfafa54d639276123e3ae96453def70ce
|
refs/heads/master
| 2020-03-29T04:59:45.477027
| 2018-09-20T06:20:33
| 2018-09-20T06:20:33
| 149,559,981
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,362
|
java
|
package com.hiveview.tv.utils;
import java.lang.reflect.Field;
import java.util.ArrayList;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.util.Log;
import com.hiveview.tv.service.exception.ServiceException;
public class JsonUtils {
public static <T> T parseObject(String json, Class<T> clazz) throws ServiceException {
T t = null;
try {
t = clazz.newInstance();
JSONObject result = new JSONObject(json);
Field[] fields = clazz.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
Field field = fields[i];
Log.v("Field", "field"+field.getType());
field.setAccessible(true);
if (!result.isNull(field.getName())) {
field.set(t, result.get(field.getName()));
}
}
} catch (InstantiationException e) {
throw new ServiceException(e.getMessage());
} catch (IllegalAccessException e) {
throw new ServiceException(e.getMessage());
} catch (JSONException e) {
throw new ServiceException(e.getMessage());
} catch (Exception e) {
throw new ServiceException(e.getMessage());
} catch (Throwable throwable) {
throw new ServiceException(throwable.getMessage());
}
return t;
}
public static <T> ArrayList<T> parseArray(String json, Class<T> clazz) throws ServiceException {
ArrayList<T> list = new ArrayList<T>();
try {
JSONArray jsonArray = new JSONArray(json);
Field[] fields = clazz.getDeclaredFields();
for (int j = 0; j < jsonArray.length(); j++) {
T t = clazz.newInstance();
JSONObject result = jsonArray.getJSONObject(j);
for (int i = 0; i < fields.length; i++) {
Field field = fields[i];
field.setAccessible(true);
if (!result.isNull(field.getName())) {
if (result.has(field.getName())) {
field.set(t, result.get(field.getName()));
}
}
}
list.add(t);
}
} catch (InstantiationException e) {
throw new ServiceException(e.getMessage());
} catch (IllegalAccessException e) {
throw new ServiceException(e.getMessage());
} catch (JSONException e) {
throw new ServiceException(e.getMessage());
} catch (Exception e) {
throw new ServiceException(e.getMessage());
} catch (Throwable t) {
throw new ServiceException(t.getMessage());
}
return list;
}
}
|
[
"dm-md@carterdeMacBook-Pro.local"
] |
dm-md@carterdeMacBook-Pro.local
|
71897e1fbd3ea43eb7dd7ce6070a613eaffbba46
|
7913176ad5870cfd1b37308c935607941d6c2b4e
|
/app/src/main/java/com/example/lab/android/nuc/chat/Base/json/ReturnQuestion.java
|
d79eedcf2010c78ad14667f1c48831236f5fa9a0
|
[
"Apache-2.0"
] |
permissive
|
chineseliuyongchao/ChatWithChinese
|
e50f327a4a1bea2346adf13b260cba10ae176833
|
10136adda9298d09031a4fdaec27546639d156c6
|
refs/heads/master
| 2020-04-07T15:05:49.787484
| 2018-08-26T02:23:01
| 2018-08-26T02:23:01
| 158,473,061
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 449
|
java
|
package com.example.lab.android.nuc.chat.Base.json;
import java.util.ArrayList;
import java.util.List;
public class ReturnQuestion {
private List<Question> questions = new ArrayList<>();
public void add(Question question){
questions.add(question);
}
public List<Question> getQuestions() {
return questions;
}
public void setQuestions(List<Question> questions) {
this.questions = questions;
}
}
|
[
"1484290617@qq.com"
] |
1484290617@qq.com
|
97f90b32eae1f6beb2ff47d97dff7584faa6a62c
|
a404c74df2d6f8d7fb4fe4e58b4458d83c62101f
|
/JavaDataScienceCookbook/src/obtainingandcleaning/lesson14p41/TestDB.java
|
af8be8e47ca78fc28efc77e4c1b562e600118011
|
[] |
no_license
|
VictorLeonidovich/MyDataScienceLessons
|
5eeb7a6b04ae1957e79b01bc7031dc5e061826cb
|
20cc6bde4d815ceec48bb6fbe84bc4ebb64e0dcf
|
refs/heads/master
| 2020-04-01T13:54:26.980739
| 2018-10-16T11:20:42
| 2018-10-16T11:20:42
| 153,272,305
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,629
|
java
|
package obtainingandcleaning.lesson14p41;
import java.sql.Connection;
import java.sql.Date;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import com.mysql.cj.jdbc.MysqlDataSource;
public class TestDB {
private static final String USER_NAME = "root";
private static final String PASSWORD = "root";
private static final String SERVER_NAME = "localhost";
private static final String URL = "jdbc:mysql://localhost:3306/mydbdatascience?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC";
public static void main(String[] args) {
TestDB test = new TestDB();
test.readTable(USER_NAME, PASSWORD, SERVER_NAME);
}
private void readTable(String userName, String password, String serverName) {
MysqlDataSource dataSource = new MysqlDataSource();
dataSource.setUser(userName);
dataSource.setPassword(password);
dataSource.setServerName(serverName);
dataSource.setURL(URL);
try {
Connection conn = dataSource.getConnection();
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM mydbdatascience.books");
while (rs.next()) {
int id = rs.getInt("id");
String book = rs.getString("book_name");
String author = rs.getString("author_name");
Date dateCreated = rs.getDate("date_created");
System.out.format("%s, %s, %s, %s\n", id, book, author, dateCreated);
}
rs.close();
stmt.close();
conn.close();
} catch (SQLException e) {
System.err.println("SQLException");
e.printStackTrace();
}
}
}
|
[
"k-v-l@tut.by"
] |
k-v-l@tut.by
|
00d6eec016847a0d97a25f8989f468f1b0a30c26
|
8225e72cda5dd30879e4a6b03fa3b93f3d01072f
|
/src/com/app/history/medical/ViewHistoryActivity.java
|
b9e4645001ef3c253efdd4dcf40d68cc43c506dd
|
[] |
no_license
|
vemuvpk/MedicalInfo
|
4d59c980e2bb559bf58fac9c978a2ea88fe14d57
|
919051762e90ba2b40ce4190c124ef55949326fc
|
refs/heads/master
| 2021-01-23T01:26:29.540527
| 2017-03-23T04:56:25
| 2017-03-23T04:56:25
| 85,908,640
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,505
|
java
|
package com.app.history.medical;
import java.util.ArrayList;
import java.util.HashMap;
import org.json.JSONArray;
import org.json.JSONObject;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;
import com.app.history.medical.util.Constant;
import com.app.history.medical.util.MyHttpClient;
import com.app.history.medical.util.Refrence;
import com.app.history.medical.util.SlidingAct;
import com.flurry.android.FlurryAgent;
public class ViewHistoryActivity extends SlidingAct {
SharedPreferences prfs;
String first_name,last_name,User_Id,RelationType,UserType;
ListView History_listView;
SimpleAdapter adapter;
ImageView menubtn;
TextView TextMessage,NoOftimeInday;
ArrayList<HashMap<String, String>> historyList = new ArrayList<HashMap<String, String>>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.summary);
History_listView = (ListView) findViewById(R.id.History_listView);
TextMessage = (TextView) findViewById(R.id.textmessage);
NoOftimeInday = (TextView) findViewById(R.id.NoOftimeInday);
prfs = getSharedPreferences(Constant.PREFERENCE_NAME, MODE_PRIVATE);
User_Id = prfs.getString("user_id","").toString();
Intent intent = getIntent();
first_name = intent.getStringExtra("UserFirstName");
last_name = intent.getStringExtra("UserLastName");
RelationType = intent.getStringExtra("Relation");
UserType= intent.getStringExtra("TypeUser");
Log.d("UderId", ""+User_Id+" +first_name");
if(Refrence.isOnline(ViewHistoryActivity.this)){
new DisplayMedicalHistory().execute();
}else{
Toast.makeText(ViewHistoryActivity.this, "Please connect you internet first", Toast.LENGTH_LONG).show();
}
setBehindLeftContentView(R.layout.menubar);
this.setSlidingActionBarEnabled(true);
menubtn = (ImageView)findViewById(R.id.menuicon1);
menubtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
showMenu();
}
});
History_listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,int position, long id) {
String Name= historyList.get(position).get("drugname");
String ImageUrl= historyList.get(position).get("imageUrl");
String NoOfTime= historyList.get(position).get("NoOfTimes");
String NoOfDays= historyList.get(position).get("NoOfDays");
Log.d("HHHH","HHH"+ImageUrl);
Intent intent=new Intent(ViewHistoryActivity.this, ImageViewActivity.class);
intent.putExtra("UserFirstName", Name);
intent.putExtra("NoOfTime", NoOfTime);
intent.putExtra("NoOfDays", NoOfDays);
intent.putExtra("Image", ImageUrl);
startActivity(intent);
//Toast.makeText(getApplicationContext(),"Click ListItem Number " + position+" "+Name, Toast.LENGTH_LONG).show();
}
});
}
//===============Web services call for displaying user medical history==================
private class DisplayMedicalHistory extends AsyncTask<Void, Void, Boolean> {
private ProgressDialog dialog;
String success = "";
String MSG;
JSONObject json , json2;
JSONArray jArray;
String myImage="";
int count=0;
String time;
protected void onPreExecute() {
dialog = ProgressDialog.show(ViewHistoryActivity.this, "","Loading, please wait...", true);
}
@SuppressWarnings("unchecked")
protected Boolean doInBackground(Void... unused) {
//JSONObject mainObject;
try {
MyHttpClient client = new MyHttpClient(Constant.USER_History);
client.connectForMultipart();
client.addFormPart("user_id", User_Id);
client.addFormPart("name", first_name);
client.finishMultipart();
String data = client.getResponse();
Log.d("RESPONSE","Respone"+data);
json = new JSONObject(data);
//success = mainObject.getString("Response");
//Log.d("myResponse","myResponse"+success);
json2 = json.getJSONObject("response");
//MSG = json2.getString("msg");
success = json2.getString("code");
Log.d("Gurukant", "Gurukant"+success);
if (success.equalsIgnoreCase("200")) {
historyList.clear();
jArray = json2.getJSONArray("data");
for(int i=0;i<jArray.length();i++){
JSONObject json_data = jArray.getJSONObject(i);
if(json_data.get("morning").toString().equals("1") && json_data.get("afternoon").toString().equals("1") && json_data.get("night").toString().equals("1")){
count=3;
time="times a day";
}else if(json_data.get("morning").toString().equals("0") && json_data.get("afternoon").toString().equals("0")){
count=1;
time="time a day";
}else if(json_data.get("morning").toString().equals("0") && json_data.get("night").toString().equals("0")){
count=1;
time="time a day";
}else if(json_data.get("afternoon").toString().equals("0") && json_data.get("night").toString().equals("0")){
count=1;
time="time a day";
}else{
count=2;
time="times a day";
}
HashMap map = new HashMap<String, String>();
Log.d("Guru", "Guru"+json_data.get("drug_name").toString());
map.put("drugname","DrugName-:"+json_data.get("drug_name").toString());
map.put("datetime", json_data.get("pre_datetime").toString());
map.put("NoOfDays", json_data.get("no_time_in_day").toString());
map.put("NoOfTimes", count+" "+time);
map.put("Morning", json_data.get("morning").toString());
map.put("AfterNoon", json_data.get("afternoon").toString());
map.put("Night", json_data.get("night").toString());
if(json_data.get("image").toString().equals("")){
map.put("imageUrl", myImage);
}else{
map.put("imageUrl", json_data.get("image").toString());
myImage=json_data.get("image").toString();
}
historyList.add(map);
}
}
}
catch(Throwable t) {
t.printStackTrace();
return null;
}
return null;
}
protected void onPostExecute(Boolean unused) {
super.onPostExecute(unused);
dialog.dismiss();
Log.d("Hey","Hey"+historyList.size());
if (success.equalsIgnoreCase("200")) {
adapter = new SimpleAdapter(ViewHistoryActivity.this, historyList, R.layout.history_activity, new String[] { "drugname","datetime","NoOfTimes" },new int[]{R.id.textView_drugs,R.id.textViewdate,R.id.NoOftimeInday});
History_listView.setAdapter(adapter);
}else{
TextMessage.setVisibility(View.VISIBLE);
TextMessage.setText("No record exist");
}
}
}
//================End================
//============Flurry=====================
public void onStart(){
super.onStart();
FlurryAgent.onStartSession(this, "VZZFBN2NYBNTVX5VCYCQ");
}
public void onStop(){
super.onStop();
FlurryAgent.onEndSession(this);
}
//==============End=========================
}
|
[
"vemuvpk@outlook.com"
] |
vemuvpk@outlook.com
|
09816f35105e82645559fd9c23d9b6e3054f9a76
|
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
|
/aliyun-java-sdk-mpaas/src/main/java/com/aliyuncs/mpaas/model/v20200710/ListMcubeNebulaResourcesRequest.java
|
dae53d465e012e7c0c91e2877a439f596ad1d27d
|
[
"Apache-2.0"
] |
permissive
|
caojiele/aliyun-openapi-java-sdk
|
b6367cc95469ac32249c3d9c119474bf76fe6db2
|
ecc1c949681276b3eed2500ec230637b039771b8
|
refs/heads/master
| 2023-06-02T02:30:02.232397
| 2021-06-18T04:08:36
| 2021-06-18T04:08:36
| 172,076,930
| 0
| 0
|
NOASSERTION
| 2019-02-22T14:08:29
| 2019-02-22T14:08:29
| null |
UTF-8
|
Java
| false
| false
| 2,841
|
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 com.aliyuncs.mpaas.model.v20200710;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.mpaas.Endpoint;
/**
* @author auto create
* @version
*/
public class ListMcubeNebulaResourcesRequest extends RpcAcsRequest<ListMcubeNebulaResourcesResponse> {
private Integer pageNum;
private String h5Id;
private Integer pageSize;
private String tenantId;
private String appId;
private String workspaceId;
public ListMcubeNebulaResourcesRequest() {
super("mPaaS", "2020-07-10", "ListMcubeNebulaResources");
setMethod(MethodType.POST);
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}
public Integer getPageNum() {
return this.pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
if(pageNum != null){
putBodyParameter("PageNum", pageNum.toString());
}
}
public String getH5Id() {
return this.h5Id;
}
public void setH5Id(String h5Id) {
this.h5Id = h5Id;
if(h5Id != null){
putBodyParameter("H5Id", h5Id);
}
}
public Integer getPageSize() {
return this.pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
if(pageSize != null){
putBodyParameter("PageSize", pageSize.toString());
}
}
public String getTenantId() {
return this.tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
if(tenantId != null){
putBodyParameter("TenantId", tenantId);
}
}
public String getAppId() {
return this.appId;
}
public void setAppId(String appId) {
this.appId = appId;
if(appId != null){
putBodyParameter("AppId", appId);
}
}
public String getWorkspaceId() {
return this.workspaceId;
}
public void setWorkspaceId(String workspaceId) {
this.workspaceId = workspaceId;
if(workspaceId != null){
putBodyParameter("WorkspaceId", workspaceId);
}
}
@Override
public Class<ListMcubeNebulaResourcesResponse> getResponseClass() {
return ListMcubeNebulaResourcesResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
db990bddf1b1614635adc2ea5fff673f7fa6f50c
|
a82cbd9b6f694f2b21d13553e1b39a62a9c54fa1
|
/AndroidApp/Architecture/src/main/java/com/qiyei/architecture/viper/view/activity/MovieListActivity.java
|
ce019fa81b74afd8e371a596f54e7437536c3f5e
|
[] |
no_license
|
qiyei2015/EssayJoke
|
1fe49a7b5df24bbb4ba10c3c479cbe098baf88c3
|
0d56594aaeb89fe98e06293e283e6354d2dec9d3
|
refs/heads/master
| 2022-03-09T08:54:25.826988
| 2022-02-21T09:12:22
| 2022-02-21T09:12:22
| 89,912,628
| 72
| 31
| null | 2019-11-11T02:25:01
| 2017-05-01T09:38:48
|
Java
|
UTF-8
|
Java
| false
| false
| 2,520
|
java
|
package com.qiyei.architecture.viper.view.activity;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.os.Bundle;
import android.view.View;
import com.qiyei.architecture.R;
import com.qiyei.architecture.viper.contract.MainContract;
import com.qiyei.architecture.viper.data.entity.Movie;
import com.qiyei.architecture.viper.presenter.MoviePresenter;
import com.qiyei.architecture.viper.view.adapter.MovieListAdapter;
import com.qiyei.sdk.https.dialog.LoadingManager;
import com.qiyei.sdk.util.ToastUtil;
import java.util.List;
/**
* @author Created by qiyei2015 on 2020/2/16.
* @version: 1.0
* @email: 1273482124@qq.com
* @description:
*/
public class MovieListActivity extends AppCompatActivity implements View.OnClickListener,MainContract.View {
private static final String TAG = "MovieListActivity";
private RecyclerView mRecyclerView;
private MainContract.Presenter mPresenter;
private MovieListAdapter mMovieListAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_movie_list);
mRecyclerView = findViewById(R.id.recycler_view);
mMovieListAdapter = new MovieListAdapter(this,R.layout.recyclerview_item);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.setAdapter(mMovieListAdapter);
mPresenter = new MoviePresenter(this);
mPresenter.onViewCreated();
}
@Override
protected void onDestroy() {
super.onDestroy();
mPresenter.onDestroy();
}
@Override
public void onClick(View v) {
if (v.getId() == R.id.add_movie){
mPresenter.addMovieClick();
}
}
@Override
public void showLoading() {
mRecyclerView.setEnabled(false);
LoadingManager.showDialog(getSupportFragmentManager(),TAG);
}
@Override
public void hideLoading() {
mRecyclerView.setEnabled(true);
LoadingManager.dismissDialog(getSupportFragmentManager(),TAG);
}
@Override
public void showMessage(String msg) {
ToastUtil.showLongToast(msg);
}
@Override
public void displayMovieList(List<Movie> movieList) {
mMovieListAdapter.setData(movieList);
}
@Override
public void deleteMoviesClicked() {
//mPresenter.deleteMoviesClick();
}
}
|
[
"1273482124@qq.com"
] |
1273482124@qq.com
|
bc133cbfeca4a72f8d8791f70d1fea18697056c6
|
e6dbeb4f9aff8d5b94188c05c28caf02c9281376
|
/src/com/phoenixkahlo/networking/HashMapEncoder.java
|
3e3a2c84a9c14b2477eff4afe7e6be76502e85eb
|
[] |
no_license
|
gretchenfrage/Eclipse
|
b000355d76c770c97839fe3322d6dee4ae54a7dd
|
5250d06ccd71e6f5a6d8d0ad81c0e2361cbbd153
|
refs/heads/master
| 2021-04-06T18:16:56.636444
| 2016-08-20T20:18:22
| 2016-08-20T20:18:22
| 60,805,974
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,276
|
java
|
package com.phoenixkahlo.networking;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
public class HashMapEncoder implements EncodingProtocol {
private ArrayEncoder keyArrayEncoder;
private ArrayEncoder valueArrayEncoder;
public HashMapEncoder(EncodingProtocol keyItemEncoder, EncodingProtocol valueItemEncoder) {
keyArrayEncoder = new ArrayEncoder(Object.class, keyItemEncoder);
valueArrayEncoder = new ArrayEncoder(Object.class, valueItemEncoder);
}
@Override
public boolean canEncode(Object obj) {
if (obj == null)
return true;
return obj instanceof HashMap<?, ?>;
}
@Override
public void encode(Object obj, OutputStream out) throws IOException, IllegalArgumentException {
if (!canEncode(obj)) throw new IllegalArgumentException();
SerializationUtils.writeBoolean(obj == null, out);
if (obj == null)
return;
HashMap<?, ?> map = (HashMap<?, ?>) obj;
Object[] keys = map.keySet().toArray();
Object[] values = map.values().toArray();
keyArrayEncoder.encode(keys, out);
valueArrayEncoder.encode(values, out);
}
@Override
public DecodingProtocol toDecoder() {
return new HashMapDecoder(keyArrayEncoder.getItemEncoder().toDecoder(),
valueArrayEncoder.getItemEncoder().toDecoder());
}
}
|
[
"kahlo.phoenix@gmail.com"
] |
kahlo.phoenix@gmail.com
|
e19e3d69245399394d715b7ed131f6753c19fbd3
|
df48dc6e07cdf202518b41924444635f30d60893
|
/jinx-com4j/src/main/java/com/exceljava/com4j/excel/IChartGroups.java
|
4dfbf06623557f07e2f6df5b33e6afa549d5ccf7
|
[
"MIT"
] |
permissive
|
ashwanikaggarwal/jinx-com4j
|
efc38cc2dc576eec214dc847cd97d52234ec96b3
|
41a3eaf71c073f1282c2ab57a1c91986ed92e140
|
refs/heads/master
| 2022-03-29T12:04:48.926303
| 2020-01-10T14:11:17
| 2020-01-10T14:11:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,378
|
java
|
package com.exceljava.com4j.excel ;
import com4j.*;
@IID("{0002085A-0001-0000-C000-000000000046}")
public interface IChartGroups extends Com4jObject,Iterable<Com4jObject> {
// Methods:
/**
* <p>
* Getter method for the COM property "Application"
* </p>
* @return Returns a value of type com.exceljava.com4j.excel._Application
*/
@VTID(7)
com.exceljava.com4j.excel._Application getApplication();
/**
* <p>
* Getter method for the COM property "Creator"
* </p>
* @return Returns a value of type com.exceljava.com4j.excel.XlCreator
*/
@VTID(8)
com.exceljava.com4j.excel.XlCreator getCreator();
/**
* <p>
* Getter method for the COM property "Parent"
* </p>
* @return Returns a value of type com4j.Com4jObject
*/
@VTID(9)
@ReturnValue(type=NativeType.Dispatch)
com4j.Com4jObject getParent();
/**
* <p>
* Getter method for the COM property "Count"
* </p>
* @return Returns a value of type int
*/
@VTID(10)
int getCount();
/**
* @param index Mandatory java.lang.Object parameter.
* @return Returns a value of type com.exceljava.com4j.excel.ChartGroup
*/
@VTID(11)
com.exceljava.com4j.excel.ChartGroup item(
@MarshalAs(NativeType.VARIANT) java.lang.Object index);
/**
*/
@VTID(12)
java.util.Iterator<Com4jObject> iterator();
// Properties:
}
|
[
"tony@pyxll.com"
] |
tony@pyxll.com
|
e8d83ebba81f1d84ecde1fb875541307df171405
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/koelleChristian_trickytripper/app/src/main/java/de/koelle/christian/trickytripper/dataaccess/impl/tecbeans/PaymentReference.java
|
25348df8a2b316dfd3e9df0c2558ed3505769aa1
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
|
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
|
0564143d92f8024ff5fa6b659c2baebf827582b1
|
refs/heads/master
| 2020-07-13T13:53:40.297493
| 2019-01-11T11:51:18
| 2019-01-11T11:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,855
|
java
|
// isComment
package de.koelle.christian.trickytripper.dataaccess.impl.tecbeans;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import de.koelle.christian.trickytripper.model.Amount;
import de.koelle.christian.trickytripper.model.Participant;
import de.koelle.christian.trickytripper.model.Payment;
import de.koelle.christian.trickytripper.model.PaymentCategory;
public class isClassOrIsInterface {
private long isVariable;
private PaymentCategory isVariable;
private long isVariable;
private String isVariable;
private Date isVariable;
private List<PaymentParticipantRelationKey> isVariable = new ArrayList<>();
public isConstructor() {
}
public isConstructor(long isParameter, Payment isParameter) {
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr.isMethod();
this.isFieldAccessExpr = isNameExpr.isMethod();
this.isFieldAccessExpr = isNameExpr.isMethod();
this.isFieldAccessExpr = isNameExpr.isMethod();
for (Map.Entry<Participant, Amount> isVariable : isNameExpr.isMethod().isMethod()) {
isMethod(isNameExpr, true, isNameExpr, isNameExpr);
}
for (Map.Entry<Participant, Amount> isVariable : isNameExpr.isMethod().isMethod()) {
isMethod(isNameExpr, true, isNameExpr, isNameExpr);
}
}
private void isMethod(Entry<Participant, Amount> isParameter, boolean isParameter, List<PaymentParticipantRelationKey> isParameter, long isParameter) {
PaymentParticipantRelationKey isVariable = new PaymentParticipantRelationKey(isNameExpr, isNameExpr.isMethod().isMethod(), isNameExpr, isNameExpr.isMethod());
isNameExpr.isMethod(isNameExpr);
}
public long isMethod() {
return isNameExpr;
}
public PaymentCategory isMethod() {
return isNameExpr;
}
public long isMethod() {
return isNameExpr;
}
public String isMethod() {
return isNameExpr;
}
public Date isMethod() {
return isNameExpr;
}
public List<PaymentParticipantRelationKey> isMethod() {
return isNameExpr;
}
public void isMethod(long isParameter) {
this.isFieldAccessExpr = isNameExpr;
}
public void isMethod(PaymentCategory isParameter) {
this.isFieldAccessExpr = isNameExpr;
}
public void isMethod(long isParameter) {
this.isFieldAccessExpr = isNameExpr;
}
public void isMethod(String isParameter) {
this.isFieldAccessExpr = isNameExpr;
}
public void isMethod(Date isParameter) {
this.isFieldAccessExpr = isNameExpr;
}
public void isMethod(List<PaymentParticipantRelationKey> isParameter) {
this.isFieldAccessExpr = isNameExpr;
}
}
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
5b8ce594dd830b0cec53352b463e08ac180fc206
|
fff79f0ec90b05aaae3ca04ef0c47b2821578cef
|
/2º Semestre/Programacao_de_Computadores_I/Exercicios_03/src/Exercicio3/Exercicio3_Quest12.java
|
734b93c51cc3a2a3bb8d18636a5175abea76ea56
|
[] |
no_license
|
OseiasReis/Etec
|
92d6e578c90f5b04eb120a9c662faf04c07bd41a
|
a9ed642f8c9560bc241afb80e85c6e7a8158722c
|
refs/heads/master
| 2023-05-27T17:43:01.041559
| 2021-06-06T18:38:41
| 2021-06-06T18:38:41
| 255,802,724
| 0
| 0
| null | 2021-06-06T18:39:28
| 2020-04-15T04:16:13
|
Java
|
ISO-8859-1
|
Java
| false
| false
| 311
|
java
|
package Exercicio3;
public class Exercicio3_Quest12 {
public static void main( String[] args){
float i = 5.0f;
if (i > 1.99 && i < 5.99){
System.out.println("O numero digitado ESTA entre 1.99 e 5.99");
}else
System.out.println("O numero digitado NÃO esta entre os numeros 1.99 e 5.99");
}
}
|
[
"oseiasreis777@hotmail.com"
] |
oseiasreis777@hotmail.com
|
0b21c6a39d16e54ed42ba7e22fa2df43b1786082
|
491d8e1bc2cd8ab951bfc18b9b95828bcbe27d20
|
/src/main/java/net/adamcin/granite/client/packman/validation/ValidationResult.java
|
2cb49cf17d24e5f8ed963e2abaec0052aae00207
|
[
"Unlicense"
] |
permissive
|
huainiu/granite-client-packman
|
0912ea96ee141bee6865ead8fb6890548d7ec8b2
|
161eee69b90e89ba3efa09d58a22408a1be3b13a
|
refs/heads/master
| 2021-01-18T04:57:02.077971
| 2014-08-27T22:27:58
| 2014-08-27T22:27:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,513
|
java
|
/*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictions that recognize copyright laws, the author or authors
* of this software dedicate any and all copyright interest in the
* software to the public domain. We make this dedication for the benefit
* of the public at large and to the detriment of our heirs and
* successors. We intend this dedication to be an overt act of
* relinquishment in perpetuity of all present and future rights to this
* software under copyright law.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* For more information, please refer to <http://unlicense.org/>
*/
package net.adamcin.granite.client.packman.validation;
import net.adamcin.granite.client.packman.WspFilter;
import java.io.IOException;
import java.io.Serializable;
/**
* Encapsulation class for the various ways that a package validation can fail.
*/
public final class ValidationResult implements Serializable {
private static final ValidationResult VALID = new ValidationResult(Reason.SUCCESS);
private static final ValidationResult INVALID_META_INF = new ValidationResult(Reason.INVALID_META_INF);
private static final long serialVersionUID = 3183860341927890671L;
public static enum Reason {
SUCCESS,
FORBIDDEN_EXTENSION,
FAILED_TO_ID,
FAILED_TO_OPEN,
INVALID_META_INF,
ROOT_NOT_ALLOWED,
ROOT_MISSING_RULES
}
private final Reason reason;
private final String forbiddenEntry;
private final WspFilter.Root invalidRoot;
private final WspFilter.Root coveringRoot;
private final IOException cause;
protected ValidationResult(Reason reason) {
this(reason, null, null);
}
protected ValidationResult(Reason reason, WspFilter.Root invalidRoot, WspFilter.Root coveringRoot) {
this.reason = reason;
this.invalidRoot = invalidRoot;
this.coveringRoot = coveringRoot;
this.cause = null;
this.forbiddenEntry = null;
}
protected ValidationResult(Reason reason, IOException cause) {
this.reason = reason;
this.invalidRoot = null;
this.coveringRoot = null;
this.cause = cause;
this.forbiddenEntry = null;
}
protected ValidationResult(Reason reason, String forbiddenEntry) {
this.reason = reason;
this.invalidRoot = null;
this.coveringRoot = null;
this.cause = null;
this.forbiddenEntry = forbiddenEntry;
}
public Reason getReason() {
return reason;
}
public WspFilter.Root getInvalidRoot() {
return invalidRoot;
}
public WspFilter.Root getCoveringRoot() {
return coveringRoot;
}
public IOException getCause() {
return cause;
}
public String getForbiddenEntry() {
return forbiddenEntry;
}
public static ValidationResult success() {
return VALID;
}
public static ValidationResult invalidMetaInf() {
return INVALID_META_INF;
}
public static ValidationResult failedToId(IOException cause) {
return new ValidationResult(Reason.FAILED_TO_ID, cause);
}
public static ValidationResult failedToOpen(IOException cause) {
return new ValidationResult(Reason.FAILED_TO_OPEN, cause);
}
public static ValidationResult rootNotAllowed(WspFilter.Root invalidRoot) {
return new ValidationResult(Reason.ROOT_NOT_ALLOWED, invalidRoot, null);
}
public static ValidationResult rootMissingRules(WspFilter.Root invalidRoot, WspFilter.Root coveringRoot) {
return new ValidationResult(Reason.ROOT_MISSING_RULES, invalidRoot, coveringRoot);
}
public static ValidationResult forbiddenExtension(String forbiddenEntry) {
return new ValidationResult(Reason.FORBIDDEN_EXTENSION, forbiddenEntry);
}
}
|
[
"adamcin@gmail.com"
] |
adamcin@gmail.com
|
e1c21a3f1b19d1f44b35a23672d8a9f1062117cb
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/22/22_fca2369576b64e9e4d057e15e636370cbb45ac6a/HiveMailWriter/22_fca2369576b64e9e4d057e15e636370cbb45ac6a_HiveMailWriter_t.java
|
561bc2d22c6f2258fe3f05c81d224553da29dc72
|
[] |
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
| 3,170
|
java
|
/**
* Copyright 2012 Riparian Data
* http://www.ripariandata.com
* contact@ripariandata.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.ripariandata.timberwolf.hive;
import com.ripariandata.timberwolf.MailWriter;
import com.ripariandata.timberwolf.MailboxItem;
import java.net.URI;
import java.net.URISyntaxException;
import java.sql.SQLException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.sql.DriverManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HiveMailWriter implements MailWriter
{
private static final Logger LOG = LoggerFactory.getLogger(HiveMailWriter.class);
private URI hdfsUri;
private URI hiveUri;
private String tableName;
public HiveMailWriter(URI hdfs, URI hive, String table)
{
tableName = table;
hdfsUri = hdfs;
hiveUri = hive;
}
public HiveMailWriter(String hdfs, String hive, String table)
{
tableName = table;
try
{
hdfsUri = new URI(hdfs);
}
catch (URISyntaxException e)
{
HiveMailWriterException.log(LOG, new HiveMailWriterException(hdfs + " is not a valid URI.", e));
}
try
{
hiveUri = new URI(hive);
}
catch(URISyntaxException e)
{
HiveMailWriterException.log(LOG, new HiveMailWriterException(hive + " is not a valid URI.", e));
}
}
public void write(Iterable<MailboxItem> mail)
{
try
{
Connection hiveConn = DriverManager.getConnection(hiveUri.toString());
// TODO: How much sanitization do we need here? Check for * and |? Protect from all injection?
String showTableQuery = "show tables '" + tableName + "'";
LOG.trace("Verifying Hive table existence with query: " + showTableQuery);
ResultSet showTableResult = hiveConn.createStatement().executeQuery(showTableQuery);
if (!showTableResult.next())
{
// TODO: The table doesn't exist, create it.
}
}
catch (SQLException e)
{
// TODO: Log properly.
}
// TODO: Open HDFS connection (with `FileSystem.get`) to timberwolf's temporary folder.
// TODO: Write sequence file into that temp folder.
// TODO: Use Hive JDBC connection to use `load data` on the file we just wrote into the
// table from before.
// TODO: Dispose of everything.
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
0f377daac652a0adb781c4e3f69b51af195d944e
|
e50930e7d1f02b7face5829750633364e34d9c25
|
/cloud-provider-payment1/src/main/java/ac/cn/saya/payment/provider/controller/PaymentController.java
|
b2e33d957ab015cb5af5c34ea9709b93fc9eb948
|
[
"Apache-2.0"
] |
permissive
|
saya-ac-cn/spring-cloud-alibaba-study
|
34da6a4fd041472cbe8ba057f638ea7a151c7fbb
|
1a1276d9a0f9faa809318c70586fc81683615e84
|
refs/heads/master
| 2021-07-12T14:22:37.550991
| 2021-05-08T13:24:05
| 2021-05-08T13:24:05
| 245,814,516
| 0
| 0
|
Apache-2.0
| 2020-03-08T12:58:15
| 2020-03-08T12:57:06
|
Java
|
UTF-8
|
Java
| false
| false
| 2,230
|
java
|
package ac.cn.saya.payment.provider.controller;
import ac.cn.saya.alibaba.cloud.api.entity.PaymentEntity;
import ac.cn.saya.alibaba.cloud.api.entity.Result;
import ac.cn.saya.payment.provider.service.PaymentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.util.concurrent.TimeUnit;
/**
* @Title: PaymentController
* @ProjectName springcloudalibabastudy
* @Description: TODO
* @Author liunengkai
* @Date: 2020-03-07 15:23
* @Description:
*/
@RestController
@RequestMapping(value = "/payment")
public class PaymentController {
@Value("${server.port}")
private String serverPort;
@Autowired
private PaymentService paymentService;
/**
* 新增
* postman http://localhost:8001/payment/create?serial=atguigu002
*
* @param payment
* @return
*/
@PostMapping(value = "create")
public Result<Object> create(PaymentEntity payment) {
int result = paymentService.create(payment);
if (result > 0) {
return new Result<Object>(200, "插入数据库成功,serverPort:" + serverPort, result);
}
return new Result<Object>(500, "插入数据库失败", null);
}
/**
* 查询
* http://localhost:8001/payment/get/31
*
* @param id
* @return
*/
@GetMapping(value = "get/{id}")
public Result getPaymentById(@PathVariable("id") Long id) {
PaymentEntity payment = paymentService.getPaymentById(id);
if (payment != null) {
return new Result(200, "查询成功,serverPort:"+serverPort, payment);
}
return new Result(444, "没有对应记录,查询ID:" + id, null);
}
@GetMapping(value = "lb")
public String getPaymentLB() {
return serverPort;
}
@GetMapping(value = "feign/timeout")
public String paymentFeignTimeout() {
try {
// 暂停3秒钟
TimeUnit.SECONDS.sleep(3);
} catch (InterruptedException e) {
e.printStackTrace();
}
return "TimeUnit.SECONDS.sleep(3)";
}
}
|
[
"saya@saya.ac.cn"
] |
saya@saya.ac.cn
|
e0c849ea7736d828a77151d88a6239196121d8f0
|
066c3640aa155279b0b259f12f8fd926b8e9e72a
|
/emms_GXDD/src/com/knight/emms/web/action/InstallPriceSetAction.java
|
13ea93bc1386866dadfbbc271784efc46c7bfc5a
|
[] |
no_license
|
zjt0428/emms_GXDD
|
3eebe850533357e7e43858120cfa58a55d797f7c
|
9dd7af521efa613c9bba3ce8f7e1c706d8b94a50
|
refs/heads/master
| 2020-09-13T18:09:00.499402
| 2019-11-20T07:56:23
| 2019-11-20T07:56:23
| 222,864,042
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,398
|
java
|
package com.knight.emms.web.action;
import java.util.List;
import javax.annotation.Resource;
import com.knight.core.filter.QueryFilter;
import com.knight.core.util.GsonUtil;
import com.knight.core.web.action.BaseAction;
import com.knight.emms.model.InstallPriceSet;
import com.knight.emms.service.InstallPriceSetService;
import lombok.Getter;
import lombok.Setter;
public class InstallPriceSetAction extends BaseAction{
private static final long serialVersionUID = 1L;
@Getter
@Setter
private Long installPriceId;
@Getter
@Setter
private InstallPriceSet installPriceset;
@Resource
private InstallPriceSetService installPriceSetService;
public String list() {
QueryFilter filter = new QueryFilter(getRequest());
List<InstallPriceSet> list = installPriceSetService.queryTranslateAll(filter);
StringBuffer buff = new StringBuffer("{success:true,'totalCounts':").append(filter.getPagingBean().getTotalItems()).append(",result:");
buff.append(GsonUtil.toJson(list, false));
buff.append("}");
this.jsonString = buff.toString();
return SUCCESS;
}
public String load() {
InstallPriceSet ips = installPriceSetService.getTranslate(installPriceId);
StringBuffer sb = new StringBuffer("{success:true,data:[");
sb.append(GsonUtil.toJson(ips, GsonUtil.SINCE_VERSION_20, false));
sb.append("]}");
setJsonString(sb.toString());
return SUCCESS;
}
}
|
[
"3555673863@qq.com"
] |
3555673863@qq.com
|
89687117bf169330a02d3f78ba6be22cec59a352
|
40cd4da5514eb920e6a6889e82590e48720c3d38
|
/desktop/applis/apps/bean/bean_games/pokemonbean/src/test/java/aiki/beans/help/FightHelpBeanAbilitiesUserPowerTest.java
|
6b0710a326e2785f4a4559de92c17d99e8af8a90
|
[] |
no_license
|
Cardman/projects
|
02704237e81868f8cb614abb37468cebb4ef4b31
|
23a9477dd736795c3af10bccccb3cdfa10c8123c
|
refs/heads/master
| 2023-08-17T11:27:41.999350
| 2023-08-15T07:09:28
| 2023-08-15T07:09:28
| 34,724,613
| 4
| 0
| null | 2020-10-13T08:08:38
| 2015-04-28T10:39:03
|
Java
|
UTF-8
|
Java
| false
| false
| 2,040
|
java
|
package aiki.beans.help;
import aiki.beans.abilities.AikiBeansAbilitiesStd;
import aiki.facade.FacadeGame;
import aiki.fight.abilities.AbilityData;
import aiki.fight.util.TypeDamageBoost;
import aiki.instances.Instances;
import code.bean.nat.*;
import code.maths.Rate;
import code.util.StringList;
import code.util.StringMap;
import code.util.core.StringUtil;
import org.junit.Test;
public final class FightHelpBeanAbilitiesUserPowerTest extends InitDbFightHelp {
@Test
public void movesTypesDefWeatherInitTest() {
StringList ls_ = FightHelpBean.abilitiesUserPowerInit(db().getData());
assertEq(1,ls_.size());
assertTrue(StringUtil.contains(ls_,M_DAM));
}
@Test
public void init() {
assertSizeEq(1,callFightHelpBeanAbilitiesUserPowerGet(bean(db())));
}
@Test
public void tr() {
assertEq(M_DAM_TR,callFightHelpBeanGetTrAbilitiesUserPower(bean(db()),0));
}
@Test
public void cl1() {
assertEq(AikiBeansAbilitiesStd.WEB_HTML_ABILITY_DATA_HTML,click());
}
@Test
public void clId1() {
assertEq(M_DAM,clickId());
}
private String click() {
NaSt b_ = bean(db());
return toStr(callFightHelpBeanClickAbilitiesUserPower(b_,0));
}
private String clickId() {
NaSt b_ = bean(db());
callFightHelpBeanClickAbilitiesUserPower(b_,0);
return getValAbilityId(b_);
}
private static FacadeGame db() {
FacadeGame f_ = facade();
AbilityData t_ = Instances.newAbilityData();
t_.getChangingBoostTypes().addEntry(NULL_REF,new TypeDamageBoost(NULL_REF, Rate.one()));
f_.getData().completeMembers(M_DAM, t_);
f_.getData().completeMembers(M_STA, Instances.newAbilityData());
f_.getData().getTranslatedAbilities().addEntry(EN,new StringMap<String>());
f_.getData().getTranslatedAbilities().getVal(EN).addEntry(M_DAM,M_DAM_TR);
f_.getData().getTranslatedAbilities().getVal(EN).addEntry(M_STA,M_STA_TR);
return f_;
}
}
|
[
"f.desrochettes@gmail.com"
] |
f.desrochettes@gmail.com
|
cf471b9932fc2f9b877f7470bf7b40edcbaea15e
|
f140118cd3f1b4a79159154087e7896960ca0c88
|
/graphx/target/java/org/apache/spark/graphx/Graph$.java
|
bec7cdd69147e8bdb43985d3fc56755c1fac8be3
|
[] |
no_license
|
loisZ/miaomiaomiao
|
d45dc779355e2280fe6f505d959b5e5c475f9b9c
|
6236255e4062d1788d7a212fa49af1849965f22c
|
refs/heads/master
| 2021-08-24T09:22:41.648169
| 2017-12-09T00:56:41
| 2017-12-09T00:56:41
| 111,349,685
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,752
|
java
|
package org.apache.spark.graphx;
// no position
/**
* The Graph object contains a collection of routines used to construct graphs from RDDs.
*/
public class Graph$ implements scala.Serializable {
/**
* Static reference to the singleton instance of this Scala object.
*/
public static final Graph$ MODULE$ = null;
public Graph$ () { throw new RuntimeException(); }
/**
* Construct a graph from a collection of edges encoded as vertex id pairs.
* <p>
* @param rawEdges a collection of edges in (src, dst) form
* @param defaultValue the vertex attributes with which to create vertices referenced by the edges
* @param uniqueEdges if multiple identical edges are found they are combined and the edge
* attribute is set to the sum. Otherwise duplicate edges are treated as separate. To enable
* <code>uniqueEdges</code>, a {@link PartitionStrategy} must be provided.
* @param edgeStorageLevel the desired storage level at which to cache the edges if necessary
* @param vertexStorageLevel the desired storage level at which to cache the vertices if necessary
* <p>
* @return a graph with edge attributes containing either the count of duplicate edges or 1
* (if <code>uniqueEdges</code> is <code>None</code>) and vertex attributes containing the total degree of each vertex.
*/
public <VD extends java.lang.Object> org.apache.spark.graphx.Graph<VD, java.lang.Object> fromEdgeTuples (org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, java.lang.Object>> rawEdges, VD defaultValue, scala.Option<org.apache.spark.graphx.PartitionStrategy> uniqueEdges, org.apache.spark.storage.StorageLevel edgeStorageLevel, org.apache.spark.storage.StorageLevel vertexStorageLevel, scala.reflect.ClassTag<VD> evidence$16) { throw new RuntimeException(); }
/**
* Construct a graph from a collection of edges.
* <p>
* @param edges the RDD containing the set of edges in the graph
* @param defaultValue the default vertex attribute to use for each vertex
* @param edgeStorageLevel the desired storage level at which to cache the edges if necessary
* @param vertexStorageLevel the desired storage level at which to cache the vertices if necessary
* <p>
* @return a graph with edge attributes described by <code>edges</code> and vertices
* given by all vertices in <code>edges</code> with value <code>defaultValue</code>
*/
public <VD extends java.lang.Object, ED extends java.lang.Object> org.apache.spark.graphx.Graph<VD, ED> fromEdges (org.apache.spark.rdd.RDD<org.apache.spark.graphx.Edge<ED>> edges, VD defaultValue, org.apache.spark.storage.StorageLevel edgeStorageLevel, org.apache.spark.storage.StorageLevel vertexStorageLevel, scala.reflect.ClassTag<VD> evidence$17, scala.reflect.ClassTag<ED> evidence$18) { throw new RuntimeException(); }
/**
* Construct a graph from a collection of vertices and
* edges with attributes. Duplicate vertices are picked arbitrarily and
* vertices found in the edge collection but not in the input
* vertices are assigned the default attribute.
* <p>
* @tparam VD the vertex attribute type
* @tparam ED the edge attribute type
* @param vertices the "set" of vertices and their attributes
* @param edges the collection of edges in the graph
* @param defaultVertexAttr the default vertex attribute to use for vertices that are
* mentioned in edges but not in vertices
* @param edgeStorageLevel the desired storage level at which to cache the edges if necessary
* @param vertexStorageLevel the desired storage level at which to cache the vertices if necessary
*/
public <VD extends java.lang.Object, ED extends java.lang.Object> org.apache.spark.graphx.Graph<VD, ED> apply (org.apache.spark.rdd.RDD<scala.Tuple2<java.lang.Object, VD>> vertices, org.apache.spark.rdd.RDD<org.apache.spark.graphx.Edge<ED>> edges, VD defaultVertexAttr, org.apache.spark.storage.StorageLevel edgeStorageLevel, org.apache.spark.storage.StorageLevel vertexStorageLevel, scala.reflect.ClassTag<VD> evidence$19, scala.reflect.ClassTag<ED> evidence$20) { throw new RuntimeException(); }
/**
* Implicitly extracts the {@link GraphOps} member from a graph.
* <p>
* To improve modularity the Graph type only contains a small set of basic operations.
* All the convenience operations are defined in the {@link GraphOps} class which may be
* shared across multiple graph implementations.
*/
public <VD extends java.lang.Object, ED extends java.lang.Object> org.apache.spark.graphx.GraphOps<VD, ED> graphToGraphOps (org.apache.spark.graphx.Graph<VD, ED> g, scala.reflect.ClassTag<VD> evidence$21, scala.reflect.ClassTag<ED> evidence$22) { throw new RuntimeException(); }
}
|
[
"283802073@qq.com"
] |
283802073@qq.com
|
da138113ab62ae934a14039f303f019c7af3d2f4
|
4ead80ec478a9ae03c73c7408436bd507be7b6a9
|
/business/uc/crm-biz/src/main/java/study/daydayup/wolf/business/uc/crm/biz/customer/info/dal/dao/BankCardDAO.java
|
efc55b5aca957bcda9928a0936bc1f86bd086444
|
[
"MIT"
] |
permissive
|
timxim/wolf
|
cfea87e0efcd5c6e6ff76c85b3882ffce60dde07
|
207c61cd473d1433bf3e4fc5a591aaf3a5964418
|
refs/heads/master
| 2022-11-12T15:13:33.096567
| 2020-07-04T14:03:53
| 2020-07-04T14:03:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 602
|
java
|
package study.daydayup.wolf.business.uc.crm.biz.customer.info.dal.dao;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import study.daydayup.wolf.business.uc.crm.biz.customer.info.dal.dataobject.BankCardDO;
public interface BankCardDAO {
int deleteById(Long id);
int insert(BankCardDO record);
int insertSelective(BankCardDO record);
BankCardDO selectById(Long id);
int updateByIdSelective(BankCardDO record);
int updateById(BankCardDO record);
BankCardDO selectByAccountIdAndOrgId(@Param("accountId")Long accountId,@Param("orgId")Long orgId);
}
|
[
"winglechen@gmail.com"
] |
winglechen@gmail.com
|
e722116af6d7e41dd05316c286292ce614cade73
|
9a3afafaaa2313b9c0c3f52e0ddb3f9f7bd0ef98
|
/src/main/java/com/qiang/modules/sys/controller/GuestController.java
|
28e28668b11c61795829e3dfbf03d0b99caa3db8
|
[] |
no_license
|
tomray318/ac-blog
|
3ee88987186e23e2583a8465331277b53b30e333
|
9cfe83f07f45b8c09f59ab3e45b477c229ebcb45
|
refs/heads/master
| 2020-08-28T12:25:42.170654
| 2019-10-27T11:44:45
| 2019-10-27T11:44:45
| 217,699,183
| 1
| 0
| null | 2019-10-26T11:31:05
| 2019-10-26T11:31:05
| null |
UTF-8
|
Java
| false
| false
| 4,304
|
java
|
package com.qiang.modules.sys.controller;
import com.qiang.common.utils.BlogJSONResult;
import com.qiang.modules.sys.entity.GuestEntity;
import com.qiang.modules.sys.entity.GuestLikesEntity;
import com.qiang.modules.sys.entity.RepGuestEntity;
import com.qiang.modules.sys.entity.VO.UsersVOEntity;
import com.qiang.modules.sys.service.GuestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @Author: qiang
* @ProjectName: adminsystem
* @Package: com.qiang.modules.sys.controller
* @Description: 留言controller
* @Date: 2019/7/24 0024 17:00
**/
@RestController
public class GuestController {
@Autowired
private GuestService guestService;
/**
* 获取全部留言
* @return
*/
@GetMapping("/getAllGuest")
public BlogJSONResult getAllGuest(){
List<GuestEntity> allGuest = guestService.getAllGuest();
if(allGuest != null){
return BlogJSONResult.ok(allGuest);
}else{
return BlogJSONResult.errorMsg("无果");
}
}
/**
* 新增留言
* @param guest
* @param request
* @return
*/
@PostMapping("/insGuest")
public BlogJSONResult insGuest(@RequestBody GuestEntity guest,
HttpServletRequest request){
UsersVOEntity user = (UsersVOEntity) request.getSession().getAttribute("user");
if(user == null){
return BlogJSONResult.errorTokenMsg("用户已过期");
}
guest.setUserId(user.getId());
guest.setAuthorName(user.getUsername());
List<GuestEntity> guests = guestService.insGuest(guest);
return BlogJSONResult.ok(guests);
}
/**
* 新增留言评论
* @param repGuest
* @param request
* @return
*/
@PostMapping("/insRepGuest")
public BlogJSONResult insRepGuest(@RequestBody RepGuestEntity repGuest,
HttpServletRequest request){
UsersVOEntity user = (UsersVOEntity) request.getSession().getAttribute("user");
if(user == null){
return BlogJSONResult.errorTokenMsg("用户已过期");
}
repGuest.setRguestId(user.getId());
repGuest.setRepName(user.getUsername());
List<GuestEntity> guests = guestService.insRepGuest(repGuest);
if(guests != null){
return BlogJSONResult.ok(guests);
}else{
return BlogJSONResult.errorMsg("新增失败");
}
}
/**
* 点赞更新
* @param guestLikes
* @param request
* @return
*/
@PostMapping("/updGuestLikes")
public BlogJSONResult updGuestLikes(@RequestBody GuestLikesEntity guestLikes,
HttpServletRequest request){
UsersVOEntity user = (UsersVOEntity) request.getSession().getAttribute("user");
if(user == null){
return BlogJSONResult.errorTokenMsg("用户已过期");
}
guestLikes.setLikeName(user.getUsername());
boolean isLikes = guestService.findIsLikes(guestLikes);
if(isLikes){
// 已点过赞
List<GuestEntity> guests = guestService.updDesLikes(guestLikes.getGuestId());
if(guests != null){
guestService.delIsLikes(guestLikes);
return BlogJSONResult.ok(guests);
}else{
// 点赞失败
return BlogJSONResult.errorMsg("点赞失败");
}
}else{
// 未点过赞
List<GuestEntity> guests = guestService.insIsLikes(guestLikes);
if(guests != null){
// 点赞成功
return BlogJSONResult.ok(guests);
}else{
// 点赞失败
return BlogJSONResult.errorMsg("点赞失败");
}
}
}
}
|
[
"1158821459@qq.com"
] |
1158821459@qq.com
|
87096e000ac89ead57ecac3470d705cf3f6e9262
|
d314f4b6ad9715b12ca05b0966e6095c7053c5a0
|
/core/src/gwtcog/core/ml/world/grid/probability/GridStochasticProbability.java
|
2fba7fbfe107ac38886dbeaeb3f93fe1303a6ce1
|
[] |
no_license
|
MichielVdAnker/gwtcog
|
d2b46be0f27413e50b829b6d9cbcd16b5a2d2e54
|
795047ced68048e142561f7f4ad99a3dde9b63ee
|
refs/heads/master
| 2021-01-23T12:34:45.840098
| 2013-05-11T14:27:40
| 2013-05-11T14:27:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,260
|
java
|
/*
* Encog(tm) Core v3.2 - Java Version
* http://www.heatonresearch.com/encog/
* https://github.com/encog/encog-java-core
* Copyright 2008-2013 Heaton Research, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* For more information on Heaton Research copyrights, licenses
* and trademarks visit:
* http://www.heatonresearch.com/copyright
*/
package gwtcog.core.ml.world.grid.probability;
import gwtcog.core.Encog;
import gwtcog.core.ml.world.Action;
import gwtcog.core.ml.world.State;
import gwtcog.core.ml.world.SuccessorState;
import gwtcog.core.ml.world.WorldError;
import gwtcog.core.ml.world.grid.GridState;
import gwtcog.core.ml.world.grid.GridWorld;
import java.util.Set;
import java.util.TreeSet;
public class GridStochasticProbability extends GridAbstractProbability {
private double probabilitySuccess;
private double probabilitySame;
private double probabilityLeft;
private double probabilityRight;
private double probabilityReverse;
public GridStochasticProbability(GridWorld theWorld,
double theProbabilitySuccess, double theProbabilitySame,
double theProbabilityLeft, double theProbabilityRight,
double theProbabilityReverse) {
super(theWorld);
this.probabilitySuccess = theProbabilitySuccess;
this.probabilitySame = theProbabilitySame;
this.probabilityLeft = theProbabilityLeft;
this.probabilityRight = theProbabilityRight;
this.probabilityReverse = theProbabilityReverse;
}
public GridStochasticProbability(GridWorld theWorld) {
this(theWorld, 0.8, 0.0, 0.1, 0.1, 0.0);
}
/**
* @return the probabilitySuccess
*/
public double getProbabilitySuccess() {
return probabilitySuccess;
}
/**
* @param probabilitySuccess the probabilitySuccess to set
*/
public void setProbabilitySuccess(double probabilitySuccess) {
this.probabilitySuccess = probabilitySuccess;
}
/**
* @return the probabilitySame
*/
public double getProbabilitySame() {
return probabilitySame;
}
/**
* @param probabilitySame the probabilitySame to set
*/
public void setProbabilitySame(double probabilitySame) {
this.probabilitySame = probabilitySame;
}
/**
* @return the probabilityLeft
*/
public double getProbabilityLeft() {
return probabilityLeft;
}
/**
* @param probabilityLeft the probabilityLeft to set
*/
public void setProbabilityLeft(double probabilityLeft) {
this.probabilityLeft = probabilityLeft;
}
/**
* @return the probabilityRight
*/
public double getProbabilityRight() {
return probabilityRight;
}
/**
* @param probabilityRight the probabilityRight to set
*/
public void setProbabilityRight(double probabilityRight) {
this.probabilityRight = probabilityRight;
}
/**
* @return the probabilityReverse
*/
public double getProbabilityReverse() {
return probabilityReverse;
}
/**
* @param probabilityReverse the probabilityReverse to set
*/
public void setProbabilityReverse(double probabilityReverse) {
this.probabilityReverse = probabilityReverse;
}
@Override
public double calculate(State resultState, State previousState,
Action desiredAction) {
if (!(resultState instanceof GridState)
|| !(previousState instanceof GridState)) {
throw new WorldError("Must be instance of GridState");
}
GridState gridResultState = (GridState) resultState;
GridState gridPreviousState = (GridState) previousState;
Action resultingAction = determineResultingAction(gridPreviousState,
gridResultState);
GridState desiredState = determineActionState(gridPreviousState,
desiredAction);
// are we trying to move nowhere
if (gridResultState == gridPreviousState) {
if (GridWorld.isStateBlocked(desiredState))
return this.probabilitySuccess;
else
return 0.0;
}
if (resultingAction == desiredAction) {
return this.probabilitySuccess;
} else if (resultingAction == GridWorld.rightOfAction(desiredAction)) {
return this.probabilityRight;
} else if (resultingAction == GridWorld.leftOfAction(desiredAction)) {
return this.probabilityLeft;
} else if (resultingAction == GridWorld.reverseOfAction(desiredAction)) {
return this.probabilityReverse;
} else {
return 0.0;
}
}
@Override
public Set<SuccessorState> determineSuccessorStates(State state,
Action action) {
Set<SuccessorState> result = new TreeSet<SuccessorState>();
if (action != null) {
// probability of successful action
if (this.probabilitySuccess > Encog.DEFAULT_DOUBLE_EQUAL) {
State newState = determineActionState((GridState) state, action);
if( newState!=null )
result.add(new SuccessorState(newState, this.probabilitySuccess));
}
// probability of left
if (this.probabilityLeft > Encog.DEFAULT_DOUBLE_EQUAL) {
State newState = determineActionState((GridState) state,
GridWorld.leftOfAction(action));
if( newState!=null )
result.add(new SuccessorState(newState, this.probabilityLeft));
}
// probability of right
if (this.probabilityRight > Encog.DEFAULT_DOUBLE_EQUAL) {
State newState = determineActionState((GridState) state,
GridWorld.rightOfAction(action));
if( newState!=null )
result.add(new SuccessorState(newState, this.probabilityRight));
}
// probability of reverse
if (this.probabilityReverse > Encog.DEFAULT_DOUBLE_EQUAL) {
State newState = determineActionState((GridState) state,
GridWorld.reverseOfAction(action));
if( newState!=null )
result.add(new SuccessorState(newState, this.probabilityReverse));
}
}
return result;
}
}
|
[
"michiel.van.den.anker@gmail.com"
] |
michiel.van.den.anker@gmail.com
|
20764989b4ea64baf5ab31088b785083ad18fe14
|
666e4fe5ccf2b2b8c5860ce0edf6e7aed95a34e5
|
/app/src/main/java/com/czy/server/aidldemo2/ComputeImpl.java
|
7e0f7efae21b26f228d1c6e5d0814288e466d02c
|
[] |
no_license
|
ltpdev/AidlDemo2
|
b6f37cfb7060da0aad83fc3fe57099bec6b2a545
|
79a5983fb8df6f96413bc12c46e8f9702be056d5
|
refs/heads/master
| 2020-04-09T18:07:26.531093
| 2018-12-05T10:35:45
| 2018-12-05T10:35:45
| 160,502,152
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 219
|
java
|
package com.czy.server.aidldemo2;
import android.os.RemoteException;
public class ComputeImpl extends ICompute.Stub{
@Override
public int add(int a, int b) throws RemoteException {
return a+b;
}
}
|
[
"1776494277@qq.com"
] |
1776494277@qq.com
|
fd533511e227c778250fd2132637a890a51beb07
|
511a5e5b585be029dc61dd95390c812027c2413b
|
/newapp/src/main/java/com/tzpt/cloudlibrary/modle/remote/newdownload/SpeedCalculator.java
|
862635dd0f8726a5718d53614901ca8624fb3409
|
[] |
no_license
|
MengkZhang/ebook
|
60733cff344dd906c20ec657d95e4fa4d0789cf5
|
109101ebad3e8e5274e758c786013aab650c3ff1
|
refs/heads/master
| 2020-05-07T09:56:05.996761
| 2019-04-09T15:17:10
| 2019-04-09T15:17:10
| 180,392,558
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,979
|
java
|
package com.tzpt.cloudlibrary.modle.remote.newdownload;
import android.os.SystemClock;
import com.tzpt.cloudlibrary.modle.remote.newdownload.core.Util;
/**
* Created by Administrator on 2018/8/14.
*/
public class SpeedCalculator {
private long timestamp;
private long increaseBytes;
private long bytesPerSecond;
private long beginTimestamp;
private long endTimestamp;
private long allIncreaseBytes;
public synchronized void reset() {
timestamp = 0;
increaseBytes = 0;
bytesPerSecond = 0;
beginTimestamp = 0;
endTimestamp = 0;
allIncreaseBytes = 0;
}
private long nowMillis() {
return SystemClock.uptimeMillis();
}
public synchronized void downloading(long increaseBytes) {
if (timestamp == 0) {
this.timestamp = nowMillis();
this.beginTimestamp = timestamp;
}
this.increaseBytes += increaseBytes;
this.allIncreaseBytes += increaseBytes;
}
private synchronized void flush() {
final long nowMillis = nowMillis();
final long sinceNowIncreaseBytes = increaseBytes;
final long durationMillis = Math.max(1, nowMillis - timestamp);
increaseBytes = 0;
timestamp = nowMillis;
// precision loss
bytesPerSecond = (long) ((float) sinceNowIncreaseBytes / durationMillis * 1000f);
}
/**
* Get instant bytes per-second.
*/
private long getInstantBytesPerSecondAndFlush() {
flush();
return bytesPerSecond;
}
/**
* Get bytes per-second and only if duration is greater than or equal to 1 second will flush and
* re-calculate speed.
*/
private synchronized long getBytesPerSecondAndFlush() {
final long interval = nowMillis() - timestamp;
if (interval < 1000 && bytesPerSecond != 0) return bytesPerSecond;
// the first time we using 500 milliseconds to let speed valid more quick
if (bytesPerSecond == 0 && interval < 500) return 0;
return getInstantBytesPerSecondAndFlush();
}
private synchronized long getBytesPerSecondFromBegin() {
final long endTimestamp = this.endTimestamp == 0 ? nowMillis() : this.endTimestamp;
final long sinceNowIncreaseBytes = allIncreaseBytes;
final long durationMillis = Math.max(1, endTimestamp - beginTimestamp);
// precision loss
return (long) ((float) sinceNowIncreaseBytes / durationMillis * 1000f);
}
public synchronized void endTask() {
endTimestamp = nowMillis();
}
/**
* Get instant speed
*/
public String instantSpeed() {
return getSpeedWithSIAndFlush();
}
/**
* Get speed with at least one second duration.
*/
public String speed() {
return humanReadableSpeed(getBytesPerSecondAndFlush());
}
/**
* Get last time calculated speed.
*/
public String lastSpeed() {
return humanReadableSpeed(bytesPerSecond);
}
public synchronized long getInstantSpeedDurationMillis() {
return nowMillis() - timestamp;
}
/**
* With wikipedia: https://en.wikipedia.org/wiki/Kibibyte
* <p>
* 1KiB = 2^10B = 1024B
* 1MiB = 2^10KB = 1024KB
*/
public String getSpeedWithBinaryAndFlush() {
return humanReadableSpeed(getInstantBytesPerSecondAndFlush());
}
/**
* With wikipedia: https://en.wikipedia.org/wiki/Kilobyte
* <p>
* 1KB = 1000B
* 1MB = 1000KB
*/
public String getSpeedWithSIAndFlush() {
return humanReadableSpeed(getInstantBytesPerSecondAndFlush());
}
public String averageSpeed() {
return speedFromBegin();
}
public String speedFromBegin() {
return humanReadableSpeed(getBytesPerSecondFromBegin());
}
private static String humanReadableSpeed(long bytes) {
return Util.humanReadableBytes(bytes) + "/s";
}
}
|
[
"653651979@qq.com"
] |
653651979@qq.com
|
7969205e8e0c7e1264715fc0bbf81d4521a82b7f
|
5e34c548f8bbf67f0eb1325b6c41d0f96dd02003
|
/dataset/smallest_68eb0bb0_000/mutations/64/smallest_68eb0bb0_000.java
|
3c4e8a7428b7426f767316ad884963804647792b
|
[] |
no_license
|
mou23/ComFix
|
380cd09d9d7e8ec9b15fd826709bfd0e78f02abc
|
ba9de0b6d5ea816eae070a9549912798031b137f
|
refs/heads/master
| 2021-07-09T15:13:06.224031
| 2020-03-10T18:22:56
| 2020-03-10T18:22:56
| 196,382,660
| 1
| 1
| null | 2020-10-13T20:15:55
| 2019-07-11T11:37:17
|
Java
|
UTF-8
|
Java
| false
| false
| 2,147
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class smallest_68eb0bb0_000 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
smallest_68eb0bb0_000 mainClass = new smallest_68eb0bb0_000 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj a = new IntObj (), b = new IntObj (), c = new IntObj (), d =
new IntObj ();
output +=
(String.format ("Please enter 4 numbers separated by spaces > "));
a.value = scanner.nextInt ();
b.value = scanner.nextInt ();
c.value = scanner.nextInt ();
d.value = scanner.nextInt ();
if (a.value < b.value && a.value < c.value && a.value < d.value) {
output += (String.format ("%d is the smallest\n", a.value));
} else if (b.value < a.value && b.value < c.value && b.value < d.value) {
output += (String.format ("%d is the smallest\n", b.value));
} else if ((c.value) < (d.value)) {
output += (String.format ("%d is the smallest\n", c.value));
} else {
output += (String.format ("%d is the smallest\n", d.value));
}
if (true)
return;;
}
}
|
[
"bsse0731@iit.du.ac.bd"
] |
bsse0731@iit.du.ac.bd
|
8f4bdbbe90aac9710ef54e94292588b3d60f1ae4
|
b9bfebe568f1afd9b90f83f3067e2aa1f266a8ee
|
/LeetCode/struggle/src/zrc/leetcode/SurroundedRegions.java
|
d3c35541c39fb93a68f37e5b5402b96d4d851e07
|
[] |
no_license
|
ZrcLeibniz/Java
|
fa7c737840d33e572e5d8d87951b6ccd609a38af
|
cfc3119712844dd8856009101575c819874d89f0
|
refs/heads/master
| 2023-06-21T01:49:48.132730
| 2021-07-23T07:07:42
| 2021-07-23T07:07:42
| 267,491,828
| 0
| 0
| null | 2020-10-13T02:18:30
| 2020-05-28T04:20:10
|
Java
|
UTF-8
|
Java
| false
| false
| 2,400
|
java
|
package zrc.leetcode;
//给你一个 m x n 的矩阵 board ,由若干字符 'X' 和 'O' ,找到所有被 'X' 围绕的区域,并将这些区域里所有的 'O' 用 'X' 填充
//。
//
//
//
//
// 示例 1:
//
//
//输入:board = [["X","X","X","X"],["X","O","O","X"],["X","X","O","X"],["X","O","X"
//,"X"]]
//输出:[["X","X","X","X"],["X","X","X","X"],["X","X","X","X"],["X","O","X","X"]]
//解释:被围绕的区间不会存在于边界上,换句话说,任何边界上的 'O' 都不会被填充为 'X'。 任何不在边界上,或不与边界上的 'O' 相连的 'O' 最终都
//会被填充为 'X'。如果两个元素在水平或垂直方向相邻,则称它们是“相连”的。
//
//
// 示例 2:
//
//
//输入:board = [["X"]]
//输出:[["X"]]
//
//
//
//
// 提示:
//
//
// m == board.length
// n == board[i].length
// 1 <= m, n <= 200
// board[i][j] 为 'X' 或 'O'
//
//
//
// Related Topics 深度优先搜索 广度优先搜索 并查集
// 👍 503 👎 0
import java.util.ArrayList;
import java.util.List;
//leetcode submit region begin(Prohibit modification and deletion)
class SurroundedRegionsSolution {
public void solve(char[][] board) {
for (int i = 0; i < board[0].length; i++) {
process(board, 0, i);
}
for (int i = 0; i < board[0].length; i++) {
process(board, board.length - 1, i);
}
for (int i = 0; i < board.length; i++) {
process(board, i, 0);
}
for (int i = 0; i < board.length; i++) {
process(board, i, board[0].length - 1);
}
for (int i = 0; i < board.length; i++) {
for (int j = 0; j < board[i].length; j++) {
if (board[i][j] == '#') {
board[i][j] = 'O';
} else if (board[i][j] == 'O') {
board[i][j] = 'X';
}
}
}
}
public void process(char[][] board, int i, int j) {
if (i < 0 || i >= board.length || j < 0 || j >= board[0].length || board[i][j] == 'X' || board[i][j] == '#') {
return;
}
board[i][j] = '#';
process(board, i - 1, j);
process(board, i + 1, j);
process(board, i, j - 1);
process(board, i, j + 1);
}
}
//leetcode submit region end(Prohibit modification and deletion)
|
[
"2834511920@qq.com"
] |
2834511920@qq.com
|
e6d0e275b1bf242eabb30b7326533c4035935b82
|
66581bc32744f3a30be77c7638a534f024daddb6
|
/sakai-mini/2.8.0/sam/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/author/RemoveAttachmentListener.java
|
cb9fae473bb5daa8d855785f2ecc5bf03606eb30
|
[
"ECL-2.0"
] |
permissive
|
lijiangt/sakai
|
087be33a4f20fe199458fe6a4404f37c613f3fa2
|
2647ef7e93617e33d53b1756918e64502522636b
|
refs/heads/master
| 2021-01-10T08:44:39.756518
| 2012-03-05T14:40:08
| 2012-03-05T14:40:08
| 36,716,620
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,815
|
java
|
/**********************************************************************************
* $URL: https://source.sakaiproject.org/svn/sam/trunk/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/shared/RemoveMediaListener.java $
* $Id: RemoveMediaListener.java 9268 2006-05-10 21:27:24Z daisyf@stanford.edu $
***********************************************************************************
*
* Copyright (c) 2004, 2005, 2006, 2008 The Sakai Foundation
*
* Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.sakaiproject.tool.assessment.ui.listener.author;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
import org.sakaiproject.tool.assessment.data.ifc.assessment.AttachmentIfc;
import org.sakaiproject.tool.assessment.services.assessment.AssessmentService;
import org.sakaiproject.tool.assessment.ui.bean.author.AttachmentBean;
import org.sakaiproject.tool.assessment.ui.listener.util.ContextUtil;
/**
* <p>Title: Samigo</p>
* <p>Description: Sakai Assessment Manager</p>
* @version $Id: RemoveMediaListener.java 9268 2006-05-10 21:27:24Z daisyf@stanford.edu $
*/
public class RemoveAttachmentListener implements ActionListener
{
//private static Log log = LogFactory.getLog(RemoveAttachmentListener.class);
public RemoveAttachmentListener()
{
}
public void processAction(ActionEvent ae) throws AbortProcessingException
{
AttachmentBean attachmentBean = (AttachmentBean) ContextUtil.lookupBean(
"attachmentBean");
AssessmentService assessmentService = new AssessmentService();
// #1. get all the info need from bean
String attachmentId = attachmentBean.getAttachmentId().toString();
Long attachmentType = attachmentBean.getAttachmentType();
if ((AttachmentIfc.ITEM_ATTACHMENT).equals(attachmentType))
assessmentService.removeItemAttachment(attachmentId);
else if ((AttachmentIfc.SECTION_ATTACHMENT).equals(attachmentType))
assessmentService.removeSectionAttachment(attachmentId);
else if ((AttachmentIfc.ASSESSMENT_ATTACHMENT).equals(attachmentType))
assessmentService.removeAssessmentAttachment(attachmentId);
}
}
|
[
"lijiangt@gmail.com"
] |
lijiangt@gmail.com
|
fc070e79ce48fe34e5e40bba164adea05050087d
|
7ad843a5b11df711f58fdb8d44ed50ae134deca3
|
/JDK/JDK1.8/src/java/awt/font/LayoutPath.java
|
739341e03524b7eb0e20984454ff8fd25e95bf31
|
[
"MIT"
] |
permissive
|
JavaScalaDeveloper/java-source
|
f014526ad7750ad76b46ff475869db6a12baeb4e
|
0e6be345eaf46cfb5c64870207b4afb1073c6cd0
|
refs/heads/main
| 2023-07-01T22:32:58.116092
| 2021-07-26T06:42:32
| 2021-07-26T06:42:32
| 362,427,367
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,954
|
java
|
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* (C) Copyright IBM Corp. 2005, All Rights Reserved.
*/
package java.awt.font;
import java.awt.geom.Point2D;
/**
* LayoutPath provides a mapping between locations relative to the
* baseline and points in user space. Locations consist of an advance
* along the baseline, and an offset perpendicular to the baseline at
* the advance. Positive values along the perpendicular are in the
* direction that is 90 degrees clockwise from the baseline vector.
* Locations are represented as a <code>Point2D</code>, where x is the advance and
* y is the offset.
*
* @since 1.6
*/
public abstract class LayoutPath {
/**
* Convert a point in user space to a location relative to the
* path. The location is chosen so as to minimize the distance
* from the point to the path (e.g., the magnitude of the offset
* will be smallest). If there is more than one such location,
* the location with the smallest advance is chosen.
* @param point the point to convert. If it is not the same
* object as location, point will remain unmodified by this call.
* @param location a <code>Point2D</code> to hold the returned location.
* It can be the same object as point.
* @return true if the point is associated with the portion of the
* path preceding the location, false if it is associated with
* the portion following. The default, if the location is not at
* a break or sharp bend in the path, is to return true.
* @throws NullPointerException if point or location is null
* @since 1.6
*/
public abstract boolean pointToPath(Point2D point, Point2D location);
/**
* Convert a location relative to the path to a point in user
* coordinates. The path might bend abruptly or be disjoint at
* the location's advance. If this is the case, the value of
* 'preceding' is used to disambiguate the portion of the path
* whose location and slope is to be used to interpret the offset.
* @param location a <code>Point2D</code> representing the advance (in x) and
* offset (in y) of a location relative to the path. If location
* is not the same object as point, location will remain
* unmodified by this call.
* @param preceding if true, the portion preceding the advance
* should be used, if false the portion after should be used.
* This has no effect if the path does not break or bend sharply
* at the advance.
* @param point a <code>Point2D</code> to hold the returned point. It can be
* the same object as location.
* @throws NullPointerException if location or point is null
* @since 1.6
*/
public abstract void pathToPoint(Point2D location, boolean preceding,
Point2D point);
}
|
[
"panzha@dian.so"
] |
panzha@dian.so
|
17f729b711a89a59334ac25ea4e1512cbeacc122
|
0cfb56020fa9a2615062d44afe467c3c10df5d97
|
/src/lesson7/ShapeUtils.java
|
49816e594cf8e06debf93d7f2be37eb582141c53
|
[] |
no_license
|
ayakauleu/java-courses
|
1f12561ed5a59a94232c89500e93a090b4d556a1
|
57d30357efe954368d3aa92c29e5494adc125cc6
|
refs/heads/master
| 2021-01-23T00:02:04.367157
| 2018-08-19T14:43:02
| 2018-08-19T14:46:22
| 85,691,313
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 313
|
java
|
package lesson7;
import com.sun.org.apache.bcel.internal.generic.INSTANCEOF;
public class ShapeUtils {
public static boolean isRectangle(Shape shape) {
return shape instanceof Rectangle;
}
public static boolean isTriangle(Shape shape) {
return shape instanceof Triangle;
}
}
|
[
"="
] |
=
|
b489464c51561c34a247462d9164497a4700b8a6
|
3bf6d4a745e6d4d6f8dfcc83400ae9079da62a58
|
/source/gotosea/trunk/gotosea-core/src/main/java/com/hyhl/gotosea/core/prod/mapper/DetailSalesPlanMapper.java
|
8bfeeba302c5724fd51dd333b2346bc569331552
|
[] |
no_license
|
soldiers1989/truck
|
c56d481382b27ea7db51b83be4f8316f2a868089
|
ec888b26eeac107369c4ec73f8793b1d0a93900f
|
refs/heads/master
| 2020-03-29T04:28:24.666824
| 2017-09-07T07:47:20
| 2017-09-07T07:47:20
| 149,533,098
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 369
|
java
|
package com.hyhl.gotosea.core.prod.mapper;
import com.hyhl.gotosea.core.common.mapper.MyMapper;
import com.hyhl.gotosea.core.prod.po.DetailSalesPlan;
import java.util.Date;
public interface DetailSalesPlanMapper extends MyMapper<DetailSalesPlan> {
// DetailSalesPlan getPlanByDate(String date);
DetailSalesPlan selectOneMy(DetailSalesPlan detailSalesPlan);
}
|
[
"joker2580136@126.com"
] |
joker2580136@126.com
|
fea49200a8ce031dea3a62fc46073df6a3f037b8
|
e03d21d7f21f3a2136c6450b093ad53e1b021586
|
/kaipin-ent-old/src/com/enterprise/model/UserResume.java
|
1ea54288b8c2796dea7b6274144cfdc306e988c6
|
[] |
no_license
|
huagnkangjie/kaipin
|
d035da2bbda9bf1a125826a598962b443a7dfc3e
|
8e3dfb2203fb119b8de9636e73ceba2a4405e627
|
refs/heads/master
| 2018-12-11T08:32:20.792022
| 2018-09-12T15:06:02
| 2018-09-12T15:06:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,471
|
java
|
package com.enterprise.model;
public class UserResume {
private String id;
private String resumeName;
private String userId;
private String surname;
private String missSurname;
private String salary;
private Integer sex;
private String birthDate;
private String height;
private String weight;
private Integer isMarried;
private String politicalStance;
private String postCode;
private String liveAddress;
private String areaId;
private String phone;
private String email;
private String interest;
private String coverLetter;
private Integer followStatus;
private Integer status;
private String keywords;
private String createTime;
private String modifyTime;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getResumeName() {
return resumeName;
}
public void setResumeName(String resumeName) {
this.resumeName = resumeName;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
public String getMissSurname() {
return missSurname;
}
public void setMissSurname(String missSurname) {
this.missSurname = missSurname;
}
public String getSalary() {
return salary;
}
public void setSalary(String salary) {
this.salary = salary;
}
public Integer getSex() {
return sex;
}
public void setSex(Integer sex) {
this.sex = sex;
}
public String getBirthDate() {
return birthDate;
}
public void setBirthDate(String birthDate) {
this.birthDate = birthDate;
}
public String getHeight() {
return height;
}
public void setHeight(String height) {
this.height = height;
}
public String getWeight() {
return weight;
}
public void setWeight(String weight) {
this.weight = weight;
}
public Integer getIsMarried() {
return isMarried;
}
public void setIsMarried(Integer isMarried) {
this.isMarried = isMarried;
}
public String getPoliticalStance() {
return politicalStance;
}
public void setPoliticalStance(String politicalStance) {
this.politicalStance = politicalStance;
}
public String getPostCode() {
return postCode;
}
public void setPostCode(String postCode) {
this.postCode = postCode;
}
public String getLiveAddress() {
return liveAddress;
}
public void setLiveAddress(String liveAddress) {
this.liveAddress = liveAddress;
}
public String getAreaId() {
return areaId;
}
public void setAreaId(String areaId) {
this.areaId = areaId;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getInterest() {
return interest;
}
public void setInterest(String interest) {
this.interest = interest;
}
public String getCoverLetter() {
return coverLetter;
}
public void setCoverLetter(String coverLetter) {
this.coverLetter = coverLetter;
}
public Integer getFollowStatus() {
return followStatus;
}
public void setFollowStatus(Integer followStatus) {
this.followStatus = followStatus;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getKeywords() {
return keywords;
}
public void setKeywords(String keywords) {
this.keywords = keywords;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getModifyTime() {
return modifyTime;
}
public void setModifyTime(String modifyTime) {
this.modifyTime = modifyTime;
}
}
|
[
"1059976050@qq.com"
] |
1059976050@qq.com
|
f4cc555180653acb4535ff05dfa5bb8e8b49e0fb
|
38c10c01007624cd2056884f25e0d6ab85442194
|
/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/AsyncTabCreationParamsManager.java
|
bf860cb44d69df106e6e6c66f9adb8c15e841db5
|
[
"BSD-3-Clause"
] |
permissive
|
zenoalbisser/chromium
|
6ecf37b6c030c84f1b26282bc4ef95769c62a9b2
|
e71f21b9b4b9b839f5093301974a45545dad2691
|
refs/heads/master
| 2022-12-25T14:23:18.568575
| 2016-07-14T21:49:52
| 2016-07-23T08:02:51
| 63,980,627
| 0
| 2
|
BSD-3-Clause
| 2022-12-12T12:43:41
| 2016-07-22T20:14:04
| null |
UTF-8
|
Java
| false
| false
| 1,760
|
java
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.tabmodel.document;
import android.util.SparseArray;
import org.chromium.base.ThreadUtils;
/**
* Data that will be used later when a tab is opened via an intent. Often only the necessary
* subset of the data will be set. All data is removed once the tab finishes initializing.
*/
public class AsyncTabCreationParamsManager {
/** A map of tab IDs to AsyncTabCreationParams consumed by Activities started asynchronously. */
private static SparseArray<AsyncTabCreationParams> sAsyncTabCreationParams;
/**
* Stores AsyncTabCreationParams used when the tab with the given ID is launched via intent.
* @param tabId The ID of the tab that will be launched via intent.
* @param params The AsyncTabCreationParams to use when creating the Tab.
*/
public static void add(int tabId, AsyncTabCreationParams params) {
ensureInitialized();
sAsyncTabCreationParams.put(tabId, params);
}
/**
* @return Retrieves and removes AsyncTabCreationParams for a particular tab id.
*/
public static AsyncTabCreationParams remove(int tabId) {
ensureInitialized();
AsyncTabCreationParams data = sAsyncTabCreationParams.get(tabId);
sAsyncTabCreationParams.remove(tabId);
return data;
}
private static void ensureInitialized() {
ThreadUtils.assertOnUiThread();
if (sAsyncTabCreationParams == null) {
sAsyncTabCreationParams = new SparseArray<AsyncTabCreationParams>();
}
}
private AsyncTabCreationParamsManager() {
}
}
|
[
"zeno.albisser@hemispherian.com"
] |
zeno.albisser@hemispherian.com
|
71ca160160bf5e62c73b1b816e13fe2a264222c4
|
572ab44a5612fa7c48c1c3b29b5f4375f3b08ed1
|
/BIMfoBA.src/jsdai/SIfc4/EIfcelectricresistancemeasure.java
|
da1c91244b06ebdbaad3a3a4309e46474514a550
|
[] |
no_license
|
ren90/BIMforBA
|
ce9dd9e5c0b8cfd2dbd2b84f3e2bcc72bc8aa18e
|
4a83d5ecb784b80a217895d93e0e30735dc83afb
|
refs/heads/master
| 2021-01-12T20:49:32.561833
| 2015-03-09T11:00:40
| 2015-03-09T11:00:40
| 24,721,790
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 241
|
java
|
/* Generated by JSDAI Express Compiler, version 4.3.2, build 500, 2011-12-13 */
// Java interface implementing type IfcElectricResistanceMeasure
package jsdai.SIfc4;
import jsdai.lang.*;
public interface EIfcelectricresistancemeasure {
}
|
[
"renato.filipe.vieira@gmail.com"
] |
renato.filipe.vieira@gmail.com
|
688f2ef5b82264cda80e6ae8d27a1248e20799c4
|
832adcdeb34c5ba6ba7d9ac6f1be01619711579d
|
/src/day170821/CaptureInLambdas.java
|
1f6739edc84a178a774f8558de0ea6049bef892d
|
[] |
no_license
|
Duelist256/CoreJava
|
208d5281988350e3a178ddefbebdba21ed6473b9
|
1fb5461691a7ac47ebd97577a8d5dd22171adb74
|
refs/heads/master
| 2021-01-21T15:19:44.807973
| 2017-09-10T13:51:19
| 2017-09-10T13:51:19
| 95,383,213
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 604
|
java
|
package day170821;
public class CaptureInLambdas {
public static void main(String[] args) {
X x = new X();
x.m(30);
}
}
class X {
static int classField = 30;
int instanceField;
void m(int formalParameter) {
int localVariable = 10;
Runnable r = () -> {
System.out.println(localVariable + formalParameter + instanceField + classField);
instanceField = 0;
classField = 0;
// localVariable = 0; // compile error
// formalParameter = 0; // compile error
};
r.run();
}
}
|
[
"selykov.iw@yandex.ru"
] |
selykov.iw@yandex.ru
|
f39bc1f610b84423acc5c3379035fd8dad51a01b
|
9a9b8d42b3e2f7eec37eaa2836a42cabb241db3f
|
/src/test/java/com/hui/tpa/web/rest/errors/ExceptionTranslatorTestController.java
|
1b428369e9c10d6b56fba30ff758fa1ddac6241d
|
[] |
no_license
|
danialhui/tpa-application
|
2ca48e53a484c509e687939b62bef35fccbf0ed8
|
42006760910bfc542f3e037e414486f7fc852106
|
refs/heads/master
| 2020-04-03T14:45:00.602546
| 2018-10-30T06:16:24
| 2018-10-30T06:16:24
| 155,334,215
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,631
|
java
|
package com.hui.tpa.web.rest.errors;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.HashMap;
import java.util.Map;
@RestController
public class ExceptionTranslatorTestController {
@GetMapping("/test/concurrency-failure")
public void concurrencyFailure() {
throw new ConcurrencyFailureException("test concurrency failure");
}
@PostMapping("/test/method-argument")
public void methodArgument(@Valid @RequestBody TestDTO testDTO) {
}
@GetMapping("/test/parameterized-error")
public void parameterizedError() {
throw new CustomParameterizedException("test parameterized error", "param0_value", "param1_value");
}
@GetMapping("/test/parameterized-error2")
public void parameterizedError2() {
Map<String, Object> params = new HashMap<>();
params.put("foo", "foo_value");
params.put("bar", "bar_value");
throw new CustomParameterizedException("test parameterized error", params);
}
@GetMapping("/test/missing-servlet-request-part")
public void missingServletRequestPartException(@RequestPart String part) {
}
@GetMapping("/test/missing-servlet-request-parameter")
public void missingServletRequestParameterException(@RequestParam String param) {
}
@GetMapping("/test/access-denied")
public void accessdenied() {
throw new AccessDeniedException("test access denied!");
}
@GetMapping("/test/unauthorized")
public void unauthorized() {
throw new BadCredentialsException("test authentication failed!");
}
@GetMapping("/test/response-status")
public void exceptionWithReponseStatus() {
throw new TestResponseStatusException();
}
@GetMapping("/test/internal-server-error")
public void internalServerError() {
throw new RuntimeException();
}
public static class TestDTO {
@NotNull
private String test;
public String getTest() {
return test;
}
public void setTest(String test) {
this.test = test;
}
}
@ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status")
@SuppressWarnings("serial")
public static class TestResponseStatusException extends RuntimeException {
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
e7d2a39ecb08e549d75896a330445315aafe4275
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/102/org/apache/commons/math/stat/descriptive/DescriptiveStatistics_getKurtosis_218.java
|
c2c6c5f140c32d72802f9a6a4e35dbb233597c89
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,361
|
java
|
org apach common math stat descript
maintain dataset valu singl variabl comput descript
statist base store data link window size getwindows window size windows
properti set limit number valu store
dataset infinit window put limit size
dataset caution back store
grow bound larg dataset
link summari statist summarystatist store dataset
code window size windows code infinit window
valu ad store dataset valu
ad roll manner valu replac oldest valu
dataset
note threadsaf
link synchron descript statist synchronizeddescriptivestatist concurr access multipl
thread requir
version revis date
descript statist descriptivestatist statist summari statisticalsummari serializ
return kurtosi valu kurtosi
measur peaked distribut
kurtosi doubl nan valu ad
set
kurtosi getkurtosi
appli kurtosi impl kurtosisimpl
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
f8d2d6a48bd3e8026cf062cd05c7d9587235e991
|
66ff28616037e5c188d8c0cb7e576b4957a1813b
|
/eventuate-tram-consumer-common/src/main/java/io/eventuate/tram/consumer/common/MessageHandlerDecorator.java
|
f6831230c87d83d276ae7860b9d6b8f377b39f10
|
[
"Apache-2.0"
] |
permissive
|
zmyer/eventuate-tram-core
|
e8b70bf6080652aceeb580636c454b84af912576
|
6f3d3a65d21271297538a5094f8b0e96600c9b44
|
refs/heads/master
| 2020-03-24T22:48:19.603439
| 2019-07-19T12:02:24
| 2019-07-19T12:02:24
| 143,103,763
| 0
| 0
|
NOASSERTION
| 2019-07-19T12:02:26
| 2018-08-01T04:26:49
|
Java
|
UTF-8
|
Java
| false
| false
| 202
|
java
|
package io.eventuate.tram.consumer.common;
import java.util.function.BiConsumer;
public interface MessageHandlerDecorator extends BiConsumer<SubscriberIdAndMessage, MessageHandlerDecoratorChain> {
}
|
[
"chris@chrisrichardson.net"
] |
chris@chrisrichardson.net
|
1545603959b936b23044f6a07f1144a2701e0692
|
7c377882e4789809de9a72dd54c2b0581c418474
|
/roncoo-education-util/src/main/java/com/roncoo/education/util/enums/StatusIdEnum.java
|
397eb1955ee1535d5b255b267039f018bc0526c8
|
[
"MIT"
] |
permissive
|
husend/roncoo-education
|
bcc06f177f0d369507de19e342855fb1248ffcd4
|
8a5ecc3a61bf8c5c0cfc641b4dc76532f77f23e4
|
refs/heads/master
| 2022-09-10T14:11:16.542139
| 2019-11-07T10:27:14
| 2019-11-07T10:27:14
| 220,208,745
| 0
| 0
|
MIT
| 2022-06-17T02:37:16
| 2019-11-07T10:19:18
|
Java
|
UTF-8
|
Java
| false
| false
| 375
|
java
|
/**
* Copyright 2015-现在 广州市领课网络科技有限公司
*/
package com.roncoo.education.util.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author wujing
*/
@Getter
@AllArgsConstructor
public enum StatusIdEnum {
YES(1, "正常", ""), NO(0, "禁用", "red");
private Integer code;
private String desc;
private String color;
}
|
[
"1175674846@qq.com"
] |
1175674846@qq.com
|
35efbeb81600ca8410defe5bcd8c238effd284a0
|
751074944bd92b5e355b3dfe8f945fa208114e7a
|
/SpringXML/src/main/java/com/mtsmda/xml/work20052015/ExternalStorage.java
|
f9f024c8a20dc3495629024f960e087b9b5d562f
|
[] |
no_license
|
akbars95/springExperiments_03052015
|
f4ae64653cf87dbded361afbf9ee21af07def19c
|
7f89a215fda4ecf271fe2b28c1ba5288852feabe
|
refs/heads/master
| 2020-06-05T01:17:46.198821
| 2016-02-26T15:59:55
| 2016-02-26T16:00:02
| 34,976,279
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 606
|
java
|
package com.mtsmda.xml.work20052015;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* Created by c-DMITMINZ on 5/20/2015.
*/
@XmlRootElement(name = "ExternalStorage")
public class ExternalStorage {
private ConnectionPoints connectionPoints;
public ExternalStorage() {
}
@XmlElement(name = "ConnectionPoints")
public ConnectionPoints getConnectionPoints() {
return connectionPoints;
}
public void setConnectionPoints(ConnectionPoints connectionPoints) {
this.connectionPoints = connectionPoints;
}
}
|
[
"mynzat.dmitrii@gmail.com"
] |
mynzat.dmitrii@gmail.com
|
1d79c197126105ccd68cbf1dfe9d6c71efa3a13d
|
984142b31b636f285413296426aa5c46d7e7b726
|
/app/src/main/java/com/app/mak/cellular/FetchOneAgent/CommentsUser.java
|
8dbb63079c5b2fcf5507790661cf219ad78680f4
|
[] |
no_license
|
priyankagiri14/mak_cellular
|
c02eb00c3ff532b47fb4a6380c0f9d8a36dd3769
|
a5d85cc6c7e7a6a4a9b1a89a6415f2ffc2aa018d
|
refs/heads/master
| 2020-09-25T14:08:36.655883
| 2020-02-18T11:53:53
| 2020-02-18T11:53:53
| 226,019,832
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,985
|
java
|
package com.app.mak.cellular.FetchOneAgent;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class CommentsUser {
@SerializedName("id")
@Expose
private Integer id;
@SerializedName("customerId")
@Expose
private String customerId;
@SerializedName("title")
@Expose
private String title;
@SerializedName("firstName")
@Expose
private String firstName;
@SerializedName("lastName")
@Expose
private String lastName;
@SerializedName("username")
@Expose
private String username;
@SerializedName("enabled")
@Expose
private Boolean enabled;
@SerializedName("lastPasswordResetDate")
@Expose
private String lastPasswordResetDate;
@SerializedName("authority")
@Expose
private CommentsAuthority authority;
@SerializedName("attachments")
@Expose
private List<Object> attachments = null;
@SerializedName("companyId")
@Expose
private Integer companyId;
@SerializedName("warehouseId")
@Expose
private Integer warehouseId;
@SerializedName("balance")
@Expose
private Double balance;
@SerializedName("createdAt")
@Expose
private String createdAt;
@SerializedName("updatedAt")
@Expose
private String updatedAt;
@SerializedName("name")
@Expose
private String name;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getCustomerId() {
return customerId;
}
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public Boolean getEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
public String getLastPasswordResetDate() {
return lastPasswordResetDate;
}
public void setLastPasswordResetDate(String lastPasswordResetDate) {
this.lastPasswordResetDate = lastPasswordResetDate;
}
public CommentsAuthority getAuthority() {
return authority;
}
public void setAuthority(CommentsAuthority authority) {
this.authority = authority;
}
public List<Object> getAttachments() {
return attachments;
}
public void setAttachments(List<Object> attachments) {
this.attachments = attachments;
}
public Integer getCompanyId() {
return companyId;
}
public void setCompanyId(Integer companyId) {
this.companyId = companyId;
}
public Integer getWarehouseId() {
return warehouseId;
}
public void setWarehouseId(Integer warehouseId) {
this.warehouseId = warehouseId;
}
public Double getBalance() {
return balance;
}
public void setBalance(Double balance) {
this.balance = balance;
}
public String getCreatedAt() {
return createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public String getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(String updatedAt) {
this.updatedAt = updatedAt;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"priyanka@ontrackis.com"
] |
priyanka@ontrackis.com
|
91503dae4ba7e7f7da45e3854d27fd85f92e50e3
|
eef45ebc0891a1eb86e51faa1f4370d7d2f9f2f6
|
/src/com/butent/bee/shared/html/builder/elements/Menuitem.java
|
85ffc82afc5ace09583a0038dfef697c5153812c
|
[] |
no_license
|
ebagatavicius/bee
|
6ae4f0ec4fb2436a3b36bfc774a459331f2ae1fb
|
f558368a5257687d31913e874a7b24fd4930d11c
|
refs/heads/master
| 2020-06-06T00:18:57.455397
| 2017-12-14T17:12:42
| 2017-12-14T17:12:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,969
|
java
|
package com.butent.bee.shared.html.builder.elements;
import com.butent.bee.shared.html.Attributes;
import com.butent.bee.shared.html.builder.Element;
public class Menuitem extends Element {
private static final String TYPE_CHECK_BOX = "checkbox";
private static final String TYPE_COMMAND = "command";
private static final String TYPE_RADIO = "radior";
public Menuitem() {
super();
}
public Menuitem addClass(String value) {
super.addClassName(value);
return this;
}
public Menuitem checked() {
setAttribute(Attributes.CHECKED, true);
return this;
}
public Menuitem command(String value) {
setAttribute(Attributes.COMMAND, value);
return this;
}
public Menuitem disabled() {
setAttribute(Attributes.DISABLED, true);
return this;
}
public Menuitem enabled() {
setAttribute(Attributes.DISABLED, false);
return this;
}
public Menuitem htmlDefault() {
setAttribute(Attributes.DEFAULT, true);
return this;
}
public Menuitem icon(String value) {
setAttribute(Attributes.ICON, value);
return this;
}
public Menuitem id(String value) {
setId(value);
return this;
}
public Menuitem label(String value) {
setAttribute(Attributes.LABEL, value);
return this;
}
public Menuitem lang(String value) {
setLang(value);
return this;
}
public Menuitem radioGroup(String value) {
setAttribute(Attributes.RADIO_GROUP, value);
return this;
}
public Menuitem title(String value) {
setTitle(value);
return this;
}
public Menuitem typeCheckBox() {
setAttribute(Attributes.TYPE, TYPE_CHECK_BOX);
return this;
}
public Menuitem typeCommand() {
setAttribute(Attributes.TYPE, TYPE_COMMAND);
return this;
}
public Menuitem typeRadio() {
setAttribute(Attributes.TYPE, TYPE_RADIO);
return this;
}
}
|
[
"marius@butent.com"
] |
marius@butent.com
|
17a4066fe965599dd8ad49a6dbbf31c8f576831e
|
cfc60fc1148916c0a1c9b421543e02f8cdf31549
|
/src/testcases/CWE257_Storing_Password_Recoverable_Format/CWE257_Storing_Password_Recoverable_Format__Servlet_PropertiesFile_61a.java
|
399c05c4dbb9936e9974918be4f59ddc2fc260a2
|
[
"LicenseRef-scancode-public-domain"
] |
permissive
|
zhujinhua/GitFun
|
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
|
987f72fdccf871ece67f2240eea90e8c1971d183
|
refs/heads/master
| 2021-01-18T05:46:03.351267
| 2012-09-11T16:43:44
| 2012-09-11T16:43:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,309
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE257_Storing_Password_Recoverable_Format__Servlet_PropertiesFile_61a.java
Label Definition File: CWE257_Storing_Password_Recoverable_Format__Servlet.label.xml
Template File: sources-sinks-61a.tmpl.java
*/
/*
* @description
* CWE: 257 Storing passwords in a recoverable format
* BadSource: PropertiesFile Read a value from a .properties file (in property named data)
* GoodSource: A hardcoded string
* Sinks:
* GoodSink: one-way hash instead of symmetric crypto
* BadSink : symmetric encryption with an easy key
* Flow Variant: 61 Data flow: data returned from one method to another in different classes in the same package
*
* */
package testcases.CWE257_Storing_Password_Recoverable_Format;
import testcasesupport.*;
import java.sql.*;
import java.io.*;
import javax.servlet.http.*;
import java.security.MessageDigest;
import java.security.Security;
import javax.servlet.http.*;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class CWE257_Storing_Password_Recoverable_Format__Servlet_PropertiesFile_61a extends AbstractTestCaseServlet
{
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = (new CWE257_Storing_Password_Recoverable_Format__Servlet_PropertiesFile_61b()).bad_source(request, response);
/* NOTE: potential incidental issues with not setting secure or HttpOnly flag */
String fp = "../common/config.properties";
/* simple pre-set key makes the stored password recoverable */
String sharedKey = "0000000000000000";
byte[] input = data.getBytes();
SecretKeySpec key = new SecretKeySpec(sharedKey.getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding", "BC");
cipher.init(Cipher.ENCRYPT_MODE, key);
byte[] cipherText = cipher.doFinal(input);
/* FLAW: writing a recoverable password to a cookie */
response.addCookie(new Cookie("auth", new String(cipherText)));
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B(request, response);
goodB2G(request, response);
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = (new CWE257_Storing_Password_Recoverable_Format__Servlet_PropertiesFile_61b()).goodG2B_source(request, response);
/* NOTE: potential incidental issues with not setting secure or HttpOnly flag */
String fp = "../common/config.properties";
/* simple pre-set key makes the stored password recoverable */
String sharedKey = "0000000000000000";
byte[] input = data.getBytes();
SecretKeySpec key = new SecretKeySpec(sharedKey.getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding", "BC");
cipher.init(Cipher.ENCRYPT_MODE, key);
byte[] cipherText = cipher.doFinal(input);
/* FLAW: writing a recoverable password to a cookie */
response.addCookie(new Cookie("auth", new String(cipherText)));
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = (new CWE257_Storing_Password_Recoverable_Format__Servlet_PropertiesFile_61b()).goodB2G_source(request, response);
String prefix = "Tru3ly 0b$scUre";
MessageDigest hash = MessageDigest.getInstance("SHA512");
/* FIX: credentials hashed prior to setting in cookie */
byte[] hashv = hash.digest((prefix + data).getBytes());
response.addCookie(new Cookie("auth", IO.toHex(hashv)));
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"amitf@chackmarx.com"
] |
amitf@chackmarx.com
|
d3792af96502fdc9c81e530fbafd395eb524e81c
|
d66a4cbb0bb425b3d1bef9054e421a9ac1bf784b
|
/gmsc-app/app/src/main/java/cn/gmuni/sc/widget/clipimage/ClipImageBorderView.java
|
58db6dd6dc36e36672493cef15d01edbd2cbb230
|
[] |
no_license
|
zhuxin3230213/android
|
a0300e991189ba87d3617b8e2e316b1b616b9b1c
|
21c3faf7650de9c90cfe53e9af9bf200308e4282
|
refs/heads/master
| 2020-04-13T18:18:53.258699
| 2019-01-21T03:13:53
| 2019-01-21T03:13:53
| 161,720,843
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,205
|
java
|
package cn.gmuni.sc.widget.clipimage;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import cn.gmuni.sc.utils.PixelUtil;
public class ClipImageBorderView extends View {
public static final int LEFT_TOP = 0;
public static final int RIGHT_TOP = 1;
public static final int LEFT_BOTTOM = 2;
public static final int RIGHT_BOTTOM = 3;
private Context context;
//节点最小宽度
private int minWidth = PixelUtil.dp2px(54);
//距离左侧距离 默认为20dp
private float paddingLeft = PixelUtil.dp2px(50);
//距离顶部高度
private float paddingTop;
//中间的正方形的尺寸
private float width;
//内部矩形边框宽度
private int strokeWidth = PixelUtil.dp2px(1);
private Paint mPaint;
private float wrapLeft;
private float wrapRight;
private float wrapTop;
private float wrapBottom;
public ClipImageBorderView(Context context) {
this(context,null);
}
public ClipImageBorderView(Context context, @Nullable AttributeSet attrs) {
this(context, attrs,0);
}
public ClipImageBorderView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
this.context = context;
mPaint = new Paint();
mPaint.setAntiAlias(true);
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if(width==0){
width = getWidth() - paddingLeft*2;
paddingTop = (getHeight() - width)/2;
}
int fullHeight =getHeight();
int fullWidth = getWidth();
mPaint.setColor(Color.parseColor("#aa000000"));
mPaint.setStyle(Paint.Style.FILL);
// // 绘制左边
canvas.drawRect(0, paddingTop, paddingLeft, paddingTop+width, mPaint);
//绘制右边
canvas.drawRect(paddingLeft+width,paddingTop,fullHeight,paddingTop+width,mPaint);
//绘制上边
canvas.drawRect(0,0,fullWidth,paddingTop,mPaint);
//绘制下边
canvas.drawRect(0,paddingTop+width,fullWidth,fullHeight,mPaint);
//绘制边框
mPaint.setColor(Color.WHITE);
mPaint.setStrokeWidth(strokeWidth);
mPaint.setStyle(Paint.Style.STROKE);
canvas.drawRect(paddingLeft,paddingTop,paddingLeft+width,paddingTop+width,mPaint);
}
/**
* 向左位移size像素
* @param size
*/
public void moveLeft(int size){
paddingLeft -= size;
if(paddingLeft<=wrapLeft){
paddingLeft = wrapLeft;
}
this.invalidate();
}
public void moveTop(int size){
paddingTop -= size;
if(paddingTop<=wrapTop){
paddingTop = wrapTop;
}
this.invalidate();
}
public void moveRight(int size){
paddingLeft += size;
if(paddingLeft+width>wrapRight){
paddingLeft = wrapRight - width;
}
this.invalidate();
}
public void moveBottom(int size){
paddingTop+=size;
if(paddingTop+width > wrapBottom){
paddingTop = wrapBottom - width;
}
this.invalidate();
}
/**
* 从哪个顶点进行位置调整,从锚点开始往右往下为正数,否则为负数
* @param size
* @param point
*/
public void resize(float size,int point){
switch (point){
case LEFT_TOP:
case LEFT_BOTTOM:
//如果截取区域小于最小宽度
if(width - size < minWidth){
size = width - minWidth;
}
if(point==LEFT_TOP){
paddingTop += size;
}
paddingLeft += size;
width -= size;
break;
case RIGHT_TOP:
case RIGHT_BOTTOM:
//如果截取区域小于最小宽度
if(width + size < minWidth){
size = minWidth - width;
}
if(point == RIGHT_TOP){
paddingTop-=size;
}
width += size;
break;
}
this.invalidate();
}
public float getPdLeft(){
return paddingLeft;
}
public float getPdTop(){
return paddingTop;
}
/**
* 获取中间布局的尺寸
* @return
*/
public float getLayoutSize(){
return width;
}
/**
* 设置中间区域最小宽度
* @param width
*/
public void setMinWidth(int width){
this.minWidth = width;
}
public void setImageRound(float left,float right, float top ,float bottom){
this.wrapLeft = left;
this.wrapRight = right;
this.wrapTop = top;
this.wrapBottom = bottom;
}
/**
* 获取区域边界
* @return
*/
public float[] getWrapSize(){
return new float[]{wrapLeft,wrapRight,wrapTop,wrapBottom};
}
}
|
[
"zhuxin_123"
] |
zhuxin_123
|
f8460d04b29275f4d8791b5d0f3c2822d1d17a60
|
0deb0a9a5d627365179e8e6eb560b8ce5eb4462e
|
/java/src/test/java/com/yourtion/leetcode/medium/c0043/SolutionTest.java
|
ddbe6e127df2bd57610fa27bcacdbfc049608d55
|
[
"MIT"
] |
permissive
|
yourtion/LeetCode
|
511bdd344b2d5a6a436ae0a6c0458c73205d54da
|
61ee9fb1f97274e1621f8415dcdd8c7e424d20b3
|
refs/heads/master
| 2021-08-16T21:50:13.852242
| 2021-07-09T01:58:46
| 2021-07-09T01:58:46
| 231,171,224
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 896
|
java
|
package com.yourtion.leetcode.medium.c0043;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import java.util.stream.Stream;
import static org.junit.jupiter.params.provider.Arguments.arguments;
@DisplayName("43. 字符串相乘")
class SolutionTest {
static Stream<Arguments> testDataProvider() {
return Stream.of(
arguments("2", "3", "6"),
arguments("123", "456", "56088")
);
}
@ParameterizedTest()
@MethodSource("testDataProvider")
void multiply(String n1, String n2, String res) {
System.out.printf("runTest: %s %s , res: %s", n1, n2, res);
Assertions.assertEquals(res, new Solution().multiply(n1, n2));
}
}
|
[
"yourtion@gmail.com"
] |
yourtion@gmail.com
|
f335be92056f50482eb4855a2849f82beafa9141
|
d5ad317b7fc44ae0fc1f589fab48d4418b1aee9a
|
/src/main/java/io/airmate_tech/airmate/service/SocialService.java
|
31a759db71eee33c554737cd34d7c9bb11312ce1
|
[] |
no_license
|
BulkSecurityGeneratorProject/sdfa
|
e51b426321df2eafadfe8b693a34b6ed4843102d
|
507530dd0e04fab617bc53577aaf546b391d07fa
|
refs/heads/master
| 2022-12-14T04:47:27.302327
| 2017-08-10T18:52:45
| 2017-08-10T18:52:45
| 296,557,365
| 0
| 0
| null | 2020-09-18T08:12:31
| 2020-09-18T08:12:30
| null |
UTF-8
|
Java
| false
| false
| 5,664
|
java
|
package io.airmate_tech.airmate.service;
import io.airmate_tech.airmate.domain.Authority;
import io.airmate_tech.airmate.domain.User;
import io.airmate_tech.airmate.repository.AuthorityRepository;
import io.airmate_tech.airmate.repository.UserRepository;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.social.connect.Connection;
import org.springframework.social.connect.ConnectionRepository;
import org.springframework.social.connect.UserProfile;
import org.springframework.social.connect.UsersConnectionRepository;
import org.springframework.stereotype.Service;
import java.util.HashSet;
import java.util.Locale;
import java.util.Optional;
import java.util.Set;
@Service
public class SocialService {
private final Logger log = LoggerFactory.getLogger(SocialService.class);
private final UsersConnectionRepository usersConnectionRepository;
private final AuthorityRepository authorityRepository;
private final PasswordEncoder passwordEncoder;
private final UserRepository userRepository;
private final MailService mailService;
public SocialService(UsersConnectionRepository usersConnectionRepository, AuthorityRepository authorityRepository,
PasswordEncoder passwordEncoder, UserRepository userRepository,
MailService mailService) {
this.usersConnectionRepository = usersConnectionRepository;
this.authorityRepository = authorityRepository;
this.passwordEncoder = passwordEncoder;
this.userRepository = userRepository;
this.mailService = mailService;
}
public void deleteUserSocialConnection(String login) {
ConnectionRepository connectionRepository = usersConnectionRepository.createConnectionRepository(login);
connectionRepository.findAllConnections().keySet().stream()
.forEach(providerId -> {
connectionRepository.removeConnections(providerId);
log.debug("Delete user social connection providerId: {}", providerId);
});
}
public void createSocialUser(Connection<?> connection, String langKey) {
if (connection == null) {
log.error("Cannot create social user because connection is null");
throw new IllegalArgumentException("Connection cannot be null");
}
UserProfile userProfile = connection.fetchUserProfile();
String providerId = connection.getKey().getProviderId();
String imageUrl = connection.getImageUrl();
User user = createUserIfNotExist(userProfile, langKey, providerId, imageUrl);
createSocialConnection(user.getLogin(), connection);
mailService.sendSocialRegistrationValidationEmail(user, providerId);
}
private User createUserIfNotExist(UserProfile userProfile, String langKey, String providerId, String imageUrl) {
String email = userProfile.getEmail();
String userName = userProfile.getUsername();
if (!StringUtils.isBlank(userName)) {
userName = userName.toLowerCase(Locale.ENGLISH);
}
if (StringUtils.isBlank(email) && StringUtils.isBlank(userName)) {
log.error("Cannot create social user because email and login are null");
throw new IllegalArgumentException("Email and login cannot be null");
}
if (StringUtils.isBlank(email) && userRepository.findOneByLogin(userName).isPresent()) {
log.error("Cannot create social user because email is null and login already exist, login -> {}", userName);
throw new IllegalArgumentException("Email cannot be null with an existing login");
}
if (!StringUtils.isBlank(email)) {
Optional<User> user = userRepository.findOneByEmail(email);
if (user.isPresent()) {
log.info("User already exist associate the connection to this account");
return user.get();
}
}
String login = getLoginDependingOnProviderId(userProfile, providerId);
String encryptedPassword = passwordEncoder.encode(RandomStringUtils.random(10));
Set<Authority> authorities = new HashSet<>(1);
authorities.add(authorityRepository.findOne("ROLE_USER"));
User newUser = new User();
newUser.setLogin(login);
newUser.setPassword(encryptedPassword);
newUser.setFirstName(userProfile.getFirstName());
newUser.setLastName(userProfile.getLastName());
newUser.setEmail(email);
newUser.setActivated(true);
newUser.setAuthorities(authorities);
newUser.setLangKey(langKey);
newUser.setImageUrl(imageUrl);
return userRepository.save(newUser);
}
/**
* @return login if provider manage a login like Twitter or GitHub otherwise email address.
* Because provider like Google or Facebook didn't provide login or login like "12099388847393"
*/
private String getLoginDependingOnProviderId(UserProfile userProfile, String providerId) {
switch (providerId) {
case "twitter":
return userProfile.getUsername().toLowerCase();
default:
return userProfile.getEmail();
}
}
private void createSocialConnection(String login, Connection<?> connection) {
ConnectionRepository connectionRepository = usersConnectionRepository.createConnectionRepository(login);
connectionRepository.addConnection(connection);
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
f98f7d530af1af4b4a4ead8b326a319a8c143720
|
fd0440fc5b01470e02315e70049f3d9501e43ccf
|
/app/src/main/java/com/geekhive/studentsoft/beans/applicationform/ApplicationForm.java
|
b26ed0509a81f7ec73ab7da4cedcb8e7111cf9b8
|
[] |
no_license
|
dprasad554/StudentSoft
|
b073afefabef3436d920b1038c88eb3223b6112a
|
346b06f72af0e366c88ea3551ffb0896e4737e1d
|
refs/heads/master
| 2023-04-16T15:56:36.819080
| 2021-05-03T08:13:49
| 2021-05-03T08:13:49
| 363,860,002
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 399
|
java
|
package com.geekhive.studentsoft.beans.applicationform;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class ApplicationForm {
@SerializedName("result")
@Expose
private Result result;
public Result getResult() {
return result;
}
public void setResult(Result result) {
this.result = result;
}
}
|
[
"rohitkumar.kr92@gmail.com"
] |
rohitkumar.kr92@gmail.com
|
8f0c8d40298418dc917ffec466be6bb225f35310
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/148/119/CWE89_SQL_Injection__Property_execute_22a.java
|
4b88725bd275a74fbcc74d882d7167eac9ec78c7
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 3,527
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE89_SQL_Injection__Property_execute_22a.java
Label Definition File: CWE89_SQL_Injection.label.xml
Template File: sources-sinks-22a.tmpl.java
*/
/*
* @description
* CWE: 89 SQL Injection
* BadSource: Property Read data from a system property
* GoodSource: A hardcoded string
* Sinks: execute
* GoodSink: Use prepared statement and execute (properly)
* BadSink : data concatenated into SQL statement used in execute(), which could result in SQL Injection
* Flow Variant: 22 Control flow: Flow controlled by value of a public static variable. Sink functions are in a separate file from sources.
*
* */
public class CWE89_SQL_Injection__Property_execute_22a extends AbstractTestCase
{
/* The public static variable below is used to drive control flow in the sink function.
* The public static variable mimics a global variable in the C/C++ language family. */
public static boolean badPublicStatic = false;
public void bad() throws Throwable
{
String data = null;
/* get system property user.home */
/* POTENTIAL FLAW: Read data from a system property */
data = System.getProperty("user.home");
badPublicStatic = true;
(new CWE89_SQL_Injection__Property_execute_22b()).badSink(data );
}
/* The public static variables below are used to drive control flow in the sink functions.
* The public static variable mimics a global variable in the C/C++ language family. */
public static boolean goodB2G1PublicStatic = false;
public static boolean goodB2G2PublicStatic = false;
public static boolean goodG2BPublicStatic = false;
public void good() throws Throwable
{
goodB2G1();
goodB2G2();
goodG2B();
}
/* goodB2G1() - use badsource and goodsink by setting the static variable to false instead of true */
private void goodB2G1() throws Throwable
{
String data = null;
/* get system property user.home */
/* POTENTIAL FLAW: Read data from a system property */
data = System.getProperty("user.home");
goodB2G1PublicStatic = false;
(new CWE89_SQL_Injection__Property_execute_22b()).goodB2G1Sink(data );
}
/* goodB2G2() - use badsource and goodsink by reversing the blocks in the if in the sink function */
private void goodB2G2() throws Throwable
{
String data = null;
/* get system property user.home */
/* POTENTIAL FLAW: Read data from a system property */
data = System.getProperty("user.home");
goodB2G2PublicStatic = true;
(new CWE89_SQL_Injection__Property_execute_22b()).goodB2G2Sink(data );
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
String data = null;
/* FIX: Use a hardcoded string */
data = "foo";
goodG2BPublicStatic = true;
(new CWE89_SQL_Injection__Property_execute_22b()).goodG2BSink(data );
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
b983d53c3678173d99f6485cd61b31a8323f2bdc
|
779bd0d5701654585708dcb7593b256394c1d5a8
|
/it.unibo.xtext.intro19.Iot.ui/xtend-gen/it/unibo/xtext/intro19/ui/contentassist/IotProposalProvider.java
|
6b7677a8c16d127be9beb0bbe21dc3b76c3b37a6
|
[] |
no_license
|
anatali/iss2019Lab
|
95fd9df254b1649f5907784ff1124e576f335d23
|
9331c0f19b634a32d01621d55d20291cf255c57e
|
refs/heads/master
| 2022-12-14T20:21:23.145244
| 2019-10-30T10:08:45
| 2019-10-30T10:08:45
| 172,677,977
| 2
| 0
| null | 2022-12-09T03:53:41
| 2019-02-26T09:16:52
|
Jupyter Notebook
|
UTF-8
|
Java
| false
| false
| 418
|
java
|
/**
* generated by Xtext 2.16.0
*/
package it.unibo.xtext.intro19.ui.contentassist;
import it.unibo.xtext.intro19.ui.contentassist.AbstractIotProposalProvider;
/**
* See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#content-assist
* on how to customize the content assistant.
*/
@SuppressWarnings("all")
public class IotProposalProvider extends AbstractIotProposalProvider {
}
|
[
"antonio.natali@unibo.it"
] |
antonio.natali@unibo.it
|
a246129961093d17f2528e102833c6bf426fff82
|
bcdb4977de5e66270f6bbef18d1214bf2eeed192
|
/gmall-pms/src/main/java/com/atguigu/gmall/pms/service/impl/AttrGroupServiceImpl.java
|
801c610bed1101d02946201f85f2f00b074fe40e
|
[
"Apache-2.0"
] |
permissive
|
joedyli/gmall-0713
|
edc45fa4005c06588fae6ac3cd0de630213fbacb
|
dc881a419c8bb315a1d1c2bee9e2f778ace289cd
|
refs/heads/main
| 2023-02-17T10:27:59.926556
| 2021-01-10T07:53:57
| 2021-01-10T07:53:57
| 321,216,279
| 4
| 7
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,141
|
java
|
package com.atguigu.gmall.pms.service.impl;
import com.atguigu.gmall.pms.entity.AttrEntity;
import com.atguigu.gmall.pms.entity.SkuAttrValueEntity;
import com.atguigu.gmall.pms.entity.SpuAttrValueEntity;
import com.atguigu.gmall.pms.mapper.AttrMapper;
import com.atguigu.gmall.pms.mapper.SkuAttrValueMapper;
import com.atguigu.gmall.pms.mapper.SpuAttrValueMapper;
import com.atguigu.gmall.pms.vo.AttrValueVo;
import com.atguigu.gmall.pms.vo.ItemGroupVo;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.gmall.common.bean.PageResultVo;
import com.atguigu.gmall.common.bean.PageParamVo;
import com.atguigu.gmall.pms.mapper.AttrGroupMapper;
import com.atguigu.gmall.pms.entity.AttrGroupEntity;
import com.atguigu.gmall.pms.service.AttrGroupService;
import org.springframework.util.CollectionUtils;
@Service("attrGroupService")
public class AttrGroupServiceImpl extends ServiceImpl<AttrGroupMapper, AttrGroupEntity> implements AttrGroupService {
@Autowired
private AttrMapper attrMapper;
@Autowired
private SkuAttrValueMapper skuAttrValueMapper;
@Autowired
private SpuAttrValueMapper spuAttrValueMapper;
@Override
public PageResultVo queryPage(PageParamVo paramVo) {
IPage<AttrGroupEntity> page = this.page(
paramVo.getPage(),
new QueryWrapper<AttrGroupEntity>()
);
return new PageResultVo(page);
}
@Override
public List<AttrGroupEntity> queryGroupWithAttrsByCid(Long cid) {
// 根据分类id查询分组
List<AttrGroupEntity> groupEntities = this.list(new QueryWrapper<AttrGroupEntity>().eq("category_id", cid));
if (CollectionUtils.isEmpty(groupEntities)){
return null;
}
// 遍历分组,查询每个分组下的规格参数
groupEntities.forEach(group -> {
List<AttrEntity> attrEntities = this.attrMapper.selectList(new QueryWrapper<AttrEntity>().eq("group_id", group.getId()).eq("type", 1));
group.setAttrEntities(attrEntities);
});
return groupEntities;
}
@Override
public List<ItemGroupVo> queryGroupsWithAttrsAndValuesByCidAndSpuIdAndSkuId(Long cid, Long skuId, Long spuId) {
// 1.根据分类id查询分组
List<AttrGroupEntity> attrGroupEntities = this.list(new QueryWrapper<AttrGroupEntity>().eq("category_id", cid));
if (CollectionUtils.isEmpty(attrGroupEntities)){
return null;
}
// 2.遍历每一个分组查询组下的规格参数
return attrGroupEntities.stream().map(groupEntity -> {
ItemGroupVo groupVo = new ItemGroupVo();
groupVo.setId(groupEntity.getId());
groupVo.setName(groupEntity.getName());
// 查询组下的规格参数
List<AttrEntity> attrEntities = this.attrMapper.selectList(new QueryWrapper<AttrEntity>().eq("group_id", groupEntity.getId()));
if (!CollectionUtils.isEmpty(attrEntities)){
// 获取规格参数id集合
List<Long> attrIds = attrEntities.stream().map(AttrEntity::getId).collect(Collectors.toList());
List<AttrValueVo> bigAttrValueVos = new ArrayList<>();
// 3.查询销售属性的规格参数及值
List<SkuAttrValueEntity> skuAttrValueEntities = this.skuAttrValueMapper.selectList(new QueryWrapper<SkuAttrValueEntity>().in("attr_id", attrIds).eq("sku_id", skuId));
if (!CollectionUtils.isEmpty(skuAttrValueEntities)){
bigAttrValueVos.addAll(skuAttrValueEntities.stream().map(skuAttrValueEntity -> {
AttrValueVo attrValueVo = new AttrValueVo();
BeanUtils.copyProperties(skuAttrValueEntity, attrValueVo);
return attrValueVo;
}).collect(Collectors.toList()));
}
// 4.查询基本属性的规格参数及值
List<SpuAttrValueEntity> spuAttrValueEntities = this.spuAttrValueMapper.selectList(new QueryWrapper<SpuAttrValueEntity>().in("attr_id", attrIds).eq("spu_id", spuId));
if (!CollectionUtils.isEmpty(spuAttrValueEntities)){
bigAttrValueVos.addAll(spuAttrValueEntities.stream().map(spuAttrValueEntity -> {
AttrValueVo attrValueVo = new AttrValueVo();
BeanUtils.copyProperties(spuAttrValueEntity, attrValueVo);
return attrValueVo;
}).collect(Collectors.toList()));
}
groupVo.setAttrs(bigAttrValueVos);
}
return groupVo;
}).collect(Collectors.toList());
}
}
|
[
"joedy23@aliyun.com"
] |
joedy23@aliyun.com
|
d001d499360cbebec5699898210a299d4f87354e
|
61da317a7f6ccb601bb6f301d28a0919fb4c08cc
|
/flyway-core/src/main/java/com/googlecode/flyway/core/dbsupport/hsql/HsqlTable.java
|
02f0cb661314f4830e75c6bfeacbf80040815839
|
[
"Apache-2.0"
] |
permissive
|
tototoshi/flyway
|
54c03c783bd0891c9b9fe3eb9aeadd6c99d89eb9
|
3008dae3e2f4280f624e40eaff4ca980ddb89f13
|
refs/heads/master
| 2021-12-14T09:54:23.765189
| 2013-04-06T17:34:49
| 2013-04-06T17:34:49
| 9,269,014
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,909
|
java
|
/**
* Copyright (C) 2010-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.googlecode.flyway.core.dbsupport.hsql;
import com.googlecode.flyway.core.api.FlywayException;
import com.googlecode.flyway.core.dbsupport.DbSupport;
import com.googlecode.flyway.core.dbsupport.JdbcTemplate;
import com.googlecode.flyway.core.dbsupport.Schema;
import com.googlecode.flyway.core.dbsupport.Table;
import com.googlecode.flyway.core.util.logging.Log;
import com.googlecode.flyway.core.util.logging.LogFactory;
import java.sql.SQLException;
/**
* Hsql-specific table.
*/
public class HsqlTable extends Table {
private static final Log LOG = LogFactory.getLog(HsqlDbSupport.class);
/**
* Flag indicating whether we are running against the old Hsql 1.8 instead of the newer 2.x.
*/
private boolean version18;
/**
* Creates a new Hsql table.
*
* @param jdbcTemplate The Jdbc Template for communicating with the DB.
* @param dbSupport The database-specific support.
* @param schema The schema this table lives in.
* @param name The name of the table.
*/
public HsqlTable(JdbcTemplate jdbcTemplate, DbSupport dbSupport, Schema schema, String name) {
super(jdbcTemplate, dbSupport, schema, name);
try {
int majorVersion = jdbcTemplate.getMetaData().getDatabaseMajorVersion();
version18 = majorVersion < 2;
} catch (SQLException e) {
throw new FlywayException("Unable to determine the Hsql version", e);
}
}
@Override
protected void doDrop() throws SQLException {
jdbcTemplate.execute("DROP TABLE " + dbSupport.quote(schema.getName(), name) + " CASCADE");
}
@Override
protected boolean doExists() throws SQLException {
return exists(null, schema, name);
}
@Override
protected boolean doExistsNoQuotes() throws SQLException {
return exists(null, dbSupport.getSchema(schema.getName().toUpperCase()), name.toUpperCase());
}
@Override
protected void doLock() throws SQLException {
if (version18) {
LOG.debug("Unable to lock " + this + " as Hsql 1.8 does not support locking. No concurrent migration supported.");
} else {
jdbcTemplate.execute("LOCK TABLE " + this + " WRITE");
}
}
}
|
[
"business@axelfontaine.com"
] |
business@axelfontaine.com
|
b05bdbe8fa8501165bd584f0914d9a1a4847d3d3
|
043703eaf27a0d5e6f02bf7a9ac03c0ce4b38d04
|
/subject_systems/Struts2/src/struts-2.5.10.1/src/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
|
873c091eb79d5c0195b7b37639511bd519443ec5
|
[] |
no_license
|
MarceloLaser/arcade_console_test_resources
|
e4fb5ac4a7b2d873aa9d843403569d9260d380e0
|
31447aabd735514650e6b2d1a3fbaf86e78242fc
|
refs/heads/master
| 2020-09-22T08:00:42.216653
| 2019-12-01T21:51:05
| 2019-12-01T21:51:05
| 225,093,382
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 130
|
java
|
version https://git-lfs.github.com/spec/v1
oid sha256:61e8f41c39c96f2368e3654fbb3a4e51ab17f8beb6c93666673a065ea40275af
size 18362
|
[
"marcelo.laser@gmail.com"
] |
marcelo.laser@gmail.com
|
db67e815bfb93b8597f278d7bec091fe9fc51eff
|
a13ab684732add3bf5c8b1040b558d1340e065af
|
/java6-src/com/sun/jmx/snmp/IPAcl/JDMInformItem.java
|
34f449a60792903b152356860665dd22f44f4309
|
[] |
no_license
|
Alivop/java-source-code
|
554e199a79876343a9922e13ccccae234e9ac722
|
f91d660c0d1a1b486d003bb446dc7c792aafd830
|
refs/heads/master
| 2020-03-30T07:21:13.937364
| 2018-10-25T01:49:39
| 2018-10-25T01:51:38
| 150,934,150
| 5
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 830
|
java
|
/*
* %Z%file %M%
* %Z%author Sun Microsystems, Inc.
* %Z%version %I%
* %Z%date %D%
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/* Generated By:JJTree: Do not edit this line. JDMInformItem.java */
package com.sun.jmx.snmp.IPAcl;
class JDMInformItem extends SimpleNode {
protected JDMInformCommunity comm = null;
JDMInformItem(int id) {
super(id);
}
JDMInformItem(Parser p, int id) {
super(p, id);
}
public static Node jjtCreate(int id) {
return new JDMInformItem(id);
}
public static Node jjtCreate(Parser p, int id) {
return new JDMInformItem(p, id);
}
public JDMInformCommunity getCommunity(){
return comm;
}
}
|
[
"liulp@zjhjb.com"
] |
liulp@zjhjb.com
|
4fda3a1f6841541a4ba6abbf90575c9d3d871f4e
|
a9c378a6b5b51d42ec9515004d6680c481feb435
|
/snail/src/main/java/com/acgist/snail/net/torrent/peer/PeerMessageHandler.java
|
6a6f3db90a04504021fd8da5976cda681652864c
|
[
"Apache-2.0"
] |
permissive
|
guibiaoguo/snail
|
1ea9cce5d1648ebd5bb880394d53d659cbd8cf14
|
9dbfc5ba74732b185d90a7f36cb115e50a260201
|
refs/heads/master
| 2023-02-03T03:47:08.281130
| 2020-12-27T01:56:20
| 2020-12-27T01:56:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,548
|
java
|
package com.acgist.snail.net.torrent.peer;
import java.nio.ByteBuffer;
import com.acgist.snail.context.exception.NetException;
import com.acgist.snail.net.IMessageEncryptSender;
import com.acgist.snail.net.TcpMessageHandler;
/**
* <p>Peer消息代理</p>
*
* @author acgist
*/
public final class PeerMessageHandler extends TcpMessageHandler implements IMessageEncryptSender {
// private static final Logger LOGGER = LoggerFactory.getLogger(PeerMessageHandler.class);
/**
* <p>Peer消息代理</p>
*/
private final PeerSubMessageHandler peerSubMessageHandler;
/**
* <p>加密解密消息代理</p>
*/
private final PeerCryptMessageCodec peerCryptMessageCodec;
/**
* <p>服务端</p>
*/
public PeerMessageHandler() {
this(PeerSubMessageHandler.newInstance());
}
/**
* <p>客户端</p>
*
* @param peerSubMessageHandler Peer消息代理
*/
public PeerMessageHandler(PeerSubMessageHandler peerSubMessageHandler) {
this.peerSubMessageHandler = peerSubMessageHandler;
final var peerUnpackMessageCodec = new PeerUnpackMessageCodec(this.peerSubMessageHandler);
final var peerCryptMessageCodec = new PeerCryptMessageCodec(peerUnpackMessageCodec, this.peerSubMessageHandler);
this.messageCodec = peerCryptMessageCodec;
this.peerSubMessageHandler.messageEncryptSender(this);
this.peerCryptMessageCodec = peerCryptMessageCodec;
}
@Override
public void sendEncrypt(ByteBuffer buffer, int timeout) throws NetException {
this.peerCryptMessageCodec.encode(buffer);
this.send(buffer, timeout);
}
}
|
[
"289547414@qq.com"
] |
289547414@qq.com
|
fd77bc57eab5610efd8b2968b10c502ceaa3ac78
|
f8162917c6eadf05c7ac82a5e7a90a9ea871f5b2
|
/src/com/woodlight/Color.java
|
1ecb919a0212b2d05bd67adfa73aaa91caa4a578
|
[] |
no_license
|
LeafSpark/WoodLight
|
f211ff421e7989d3e9b53e697b0c84a6064d45d6
|
7e4a87c7df3028ed8c71a40db2b93da18537ef2a
|
refs/heads/master
| 2023-07-10T20:20:38.883390
| 2021-08-21T16:47:52
| 2021-08-21T16:47:52
| 390,479,726
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,945
|
java
|
package com.woodlight;
public enum Color {
RESET("\033[0m"),
BLACK("\033[0;30m"), // BLACK
RED("\033[0;31m"), // RED
GREEN("\033[0;32m"), // GREEN
YELLOW("\033[0;33m"), // YELLOW
BLUE("\033[0;34m"), // BLUE
MAGENTA("\033[0;35m"), // MAGENTA
CYAN("\033[0;36m"), // CYAN
WHITE("\033[0;37m"), // WHITE
// Bold
BLACK_BOLD("\033[1;30m"), // BLACK
RED_BOLD("\033[1;31m"), // RED
GREEN_BOLD("\033[1;32m"), // GREEN
YELLOW_BOLD("\033[1;33m"), // YELLOW
BLUE_BOLD("\033[1;34m"), // BLUE
MAGENTA_BOLD("\033[1;35m"), // MAGENTA
CYAN_BOLD("\033[1;36m"), // CYAN
WHITE_BOLD("\033[1;37m"), // WHITE
// Underline
BLACK_UNDERLINED("\033[4;30m"), // BLACK
RED_UNDERLINED("\033[4;31m"), // RED
GREEN_UNDERLINED("\033[4;32m"), // GREEN
YELLOW_UNDERLINED("\033[4;33m"), // YELLOW
BLUE_UNDERLINED("\033[4;34m"), // BLUE
MAGENTA_UNDERLINED("\033[4;35m"), // MAGENTA
CYAN_UNDERLINED("\033[4;36m"), // CYAN
WHITE_UNDERLINED("\033[4;37m"), // WHITE
// Background
BLACK_BACKGROUND("\033[40m"), // BLACK
RED_BACKGROUND("\033[41m"), // RED
GREEN_BACKGROUND("\033[42m"), // GREEN
YELLOW_BACKGROUND("\033[43m"), // YELLOW
BLUE_BACKGROUND("\033[44m"), // BLUE
MAGENTA_BACKGROUND("\033[45m"), // MAGENTA
CYAN_BACKGROUND("\033[46m"), // CYAN
WHITE_BACKGROUND("\033[47m"), // WHITE
// High Intensity
BLACK_BRIGHT("\033[0;90m"), // BLACK
RED_BRIGHT("\033[0;91m"), // RED
GREEN_BRIGHT("\033[0;92m"), // GREEN
YELLOW_BRIGHT("\033[0;93m"), // YELLOW
BLUE_BRIGHT("\033[0;94m"), // BLUE
MAGENTA_BRIGHT("\033[0;95m"), // MAGENTA
CYAN_BRIGHT("\033[0;96m"), // CYAN
WHITE_BRIGHT("\033[0;97m"), // WHITE
// Bold High Intensity
BLACK_BOLD_BRIGHT("\033[1;90m"), // BLACK
RED_BOLD_BRIGHT("\033[1;91m"), // RED
GREEN_BOLD_BRIGHT("\033[1;92m"), // GREEN
YELLOW_BOLD_BRIGHT("\033[1;93m"), // YELLOW
BLUE_BOLD_BRIGHT("\033[1;94m"), // BLUE
MAGENTA_BOLD_BRIGHT("\033[1;95m"), // MAGENTA
CYAN_BOLD_BRIGHT("\033[1;96m"), // CYAN
WHITE_BOLD_BRIGHT("\033[1;97m"), // WHITE
// High Intensity backgrounds
BLACK_BACKGROUND_BRIGHT("\033[0;100m"), // BLACK
RED_BACKGROUND_BRIGHT("\033[0;101m"), // RED
GREEN_BACKGROUND_BRIGHT("\033[0;102m"), // GREEN
YELLOW_BACKGROUND_BRIGHT("\033[0;103m"), // YELLOW
BLUE_BACKGROUND_BRIGHT("\033[0;104m"), // BLUE
MAGENTA_BACKGROUND_BRIGHT("\033[0;105m"), // MAGENTA
CYAN_BACKGROUND_BRIGHT("\033[0;106m"), // CYAN
WHITE_BACKGROUND_BRIGHT("\033[0;107m"); // WHITE
private final String code;
Color(String code) {
this.code = code;
}
@Override
public String toString() {
return code;
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
23b0c0359a275a7817040983e284ea49e7c6db49
|
af71555e266b2173aa5da91734d46122bf986897
|
/robobinding/src/main/java/org/robobinding/dynamicbinding/DynamicViewBinding.java
|
5a7a0d6477b4e1fe52bcd7a4fccaa78847e0de6a
|
[
"Apache-2.0"
] |
permissive
|
403462630/RoboBinding
|
de73581252540b76ec570245710c174aad8718b1
|
bfedc1ea56bbcc53833eb82e2b6b2a66e520bce4
|
refs/heads/master
| 2021-01-25T00:29:41.574975
| 2014-08-03T13:16:16
| 2014-08-03T13:16:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,605
|
java
|
package org.robobinding.dynamicbinding;
import org.robobinding.viewattribute.ViewBinding;
import org.robobinding.viewattribute.impl.BindingAttributeMappingsImpl;
import org.robobinding.viewattribute.impl.BindingAttributeMappingsWithCreate;
import android.view.View;
import com.google.common.base.Preconditions;
/**
*
* @since 1.0
* @version $Revision: 1.0 $
* @author Cheng Wei
*/
public class DynamicViewBinding {
public <T extends View> DynamicViewBindingDescription<T> forView(Class<T> viewClass) {
return newViewAttributeBinding(viewClass, new BindingAttributeMappingsImpl<T>());
}
@SuppressWarnings({ "rawtypes", "unchecked" })
public <T extends View> DynamicViewBindingDescription<T> extend(Class<? extends View> viewClass,
ViewBinding<T> existingBindingAttributeMapper) {
Preconditions.checkNotNull(existingBindingAttributeMapper, "existingViewBinding must not be null");
return newViewAttributeBinding(viewClass, new ExtensionBindingAttributeMappings(existingBindingAttributeMapper));
}
private <T extends View> DynamicViewBindingDescription<T> newViewAttributeBinding(Class<T> viewClass,
BindingAttributeMappingsWithCreate<T> bindingViewAttributeMappings) {
Preconditions.checkNotNull(viewClass, "viewClass must not be null");
ViewBindingApplierFactory<T> viewBindingApplierFactory = new ViewBindingApplierFactory<T>(viewClass);
return new DynamicViewBindingDescription<T>(bindingViewAttributeMappings,
new ViewPropertySetterLocator(viewClass),
viewBindingApplierFactory);
}
}
|
[
"weicheng112@gmail.com"
] |
weicheng112@gmail.com
|
88b2768b88c29546c9598c0e30ec9964071414d9
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/19/19_caefc77112729b23b563a9c228f02fd77a96dc01/JDINullValue/19_caefc77112729b23b563a9c228f02fd77a96dc01_JDINullValue_s.java
|
87ffaeaa15fc28601293839f0b0e0d7620eb6f76
|
[] |
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
| 1,354
|
java
|
package org.eclipse.jdt.internal.debug.core.model;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.util.Collections;
import java.util.List;
import org.eclipse.debug.core.DebugException;
import org.eclipse.jdt.debug.core.IJavaType;
/**
* Represents a value of "null"
*/
public class JDINullValue extends JDIValue {
public JDINullValue(JDIDebugTarget target) {
super(target, null);
}
protected List getVariablesList() {
return Collections.EMPTY_LIST;
}
/**
* @see IValue#getReferenceTypeName()
*/
public String getReferenceTypeName() {
return "null"; //$NON-NLS-1$
}
/**
* @see IValue#getValueString()
*/
public String getValueString() {
return "null"; //$NON-NLS-1$
}
/**
* @see IJavaValue#getSignature()
*/
public String getSignature() {
return null;
}
/**
* @see IJavaValue#getArrayLength()
*/
public int getArrayLength() {
return -1;
}
/**
* @see IJavaValue#getJavaType()
*/
public IJavaType getJavaType() throws DebugException {
return null;
}
/**
* @see Object#equals(Object)
*/
public boolean equals(Object obj) {
return obj instanceof JDINullValue;
}
/**
* @see Object#hashCode()
*/
public int hashCode() {
return getClass().hashCode();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
73cb762f5d54e77582325b01847a69f258c896d3
|
a3ac2fb9bc40c9c62824ee6d86d2be4450b8e54e
|
/spring/spring-rest/src/main/java/config/WebConfig.java
|
6a3905072830dffd7775d6ad7d1797e47d9f0bac
|
[] |
no_license
|
somyungsub/study-spring
|
452872ef653a742173ecf91eca6462c9759ee78a
|
16877566943f11aa432a28eeb50a62890040e239
|
refs/heads/master
| 2023-01-08T21:26:52.610273
| 2020-12-28T06:55:57
| 2020-12-28T06:55:57
| 136,273,305
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,093
|
java
|
package config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
@Configuration
public class WebConfig {
@Bean
public InternalResourceViewResolver internalResourceViewResolver() {
final InternalResourceViewResolver internalResourceViewResolver = new InternalResourceViewResolver();
internalResourceViewResolver.setPrefix("/WEB-INF/views/");
internalResourceViewResolver.setSuffix(".jsp");
return internalResourceViewResolver;
}
// @Bean
// public ObjectMapper objectMapper() {
// return new ObjectMapper();
// }
//
// @Bean
// public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
// MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
// converter.setObjectMapper(objectMapper());
// return converter;
// }
// @Bean
// public MockMvc mockMvc() {
// return new MockMvc(new TestDispatcherServlet(new XmlWebApplicationContext()));
// }
}
|
[
"gkdldy5@naver.com"
] |
gkdldy5@naver.com
|
8f30f6c01b439b065cbbe638d7fc994fc30477a3
|
91297ffb10fb4a601cf1d261e32886e7c746c201
|
/derby/test/unit/src/org/netbeans/modules/derby/DerbyOptionsTest.java
|
b2419f770c1710026a5614f747d23adafa8d67da
|
[] |
no_license
|
JavaQualitasCorpus/netbeans-7.3
|
0b0a49d8191393ef848241a4d0aa0ecc2a71ceba
|
60018fd982f9b0c9fa81702c49980db5a47f241e
|
refs/heads/master
| 2023-08-12T09:29:23.549956
| 2019-03-16T17:06:32
| 2019-03-16T17:06:32
| 167,005,013
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,035
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* Contributor(s):
*
* The Original Software is NetBeans. The Initial Developer of the Original
* Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
* Microsystems, Inc. All Rights Reserved.
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*/
package org.netbeans.modules.derby;
import java.io.File;
import java.io.IOException;
import org.netbeans.modules.derby.test.TestBase;
import org.openide.modules.InstalledFileLocator;
/**
*
* @author abadea
*/
public class DerbyOptionsTest extends TestBase {
File userdir;
File externalDerby;
public DerbyOptionsTest(String testName) {
super(testName);
}
public void setUp() throws Exception {
clearWorkDir();
userdir = new File(getWorkDir(), ".netbeans");
userdir.mkdirs();
// create a fake installation of an external derby database
externalDerby = new File(userdir, "derby");
createFakeDerbyInstallation(externalDerby);
}
public void testDerbyLocationIsNullWhenBundledDerbyNotInstalled() {
// assert the bundled derby is not installed
assertNull(DerbyOptions.getDefaultInstallLocation());
DerbyOptions.getDefault().setLocation(externalDerby.getAbsolutePath());
assertFalse(DerbyOptions.getDefault().isLocationNull());
DerbyOptions.getDefault().setLocation("");
assertTrue(DerbyOptions.getDefault().isLocationNull());
}
public void testDerbyLocationIsNotNullWhenBundledDerbyInstalled() throws Exception {
// create a fake bundled derby database installation
File bundledDerby = new File(userdir, DerbyOptions.INST_DIR);
createFakeDerbyInstallation(bundledDerby);
// create a IFL which will find the bundled derby
setLookup(new Object[] { new InstalledFileLocatorImpl(userdir) });
// assert the bundled derby is installed
String derbyLocation = DerbyOptions.getDefaultInstallLocation();
assertNotNull(derbyLocation);
DerbyOptions.getDefault().setLocation(externalDerby.getAbsolutePath());
assertFalse(DerbyOptions.getDefault().isLocationNull());
DerbyOptions.getDefault().setLocation(""); // this should set the location to the one of the bundled derby
assertFalse(DerbyOptions.getDefault().isLocationNull());
assertEquals(DerbyOptions.getDefault().getLocation(), derbyLocation);
}
public void testLocationWhenNDSHPropertySetIssue76908() throws IOException {
assertEquals("", DerbyOptions.getDefault().getSystemHome());
File ndshSystemHome = new File(getWorkDir(), ".netbeans-derby-ndsh");
if (!ndshSystemHome.mkdirs()) {
throw new IOException("Could not create " + ndshSystemHome);
}
File systemHome = new File(getWorkDir(), ".netbeans-derby");
if (!systemHome.mkdirs()) {
throw new IOException("Could not create " + systemHome);
}
// returning the value of the netbeans.derby.system.home property when systemHome is not set...
System.setProperty(DerbyOptions.NETBEANS_DERBY_SYSTEM_HOME, ndshSystemHome.getAbsolutePath());
assertEquals(ndshSystemHome.getAbsolutePath(), DerbyOptions.getDefault().getSystemHome());
// ... but returning systemHome when it is set
DerbyOptions.getDefault().setSystemHome(systemHome.getAbsolutePath());
assertEquals(systemHome.getAbsolutePath(), DerbyOptions.getDefault().getSystemHome());
}
private static final class InstalledFileLocatorImpl extends InstalledFileLocator {
private File userdir;
public InstalledFileLocatorImpl(File userdir) {
this.userdir = userdir;
}
public File locate(String relativePath, String codeNameBase, boolean localized) {
File f = new File(userdir, relativePath);
return f.exists() ? f : null;
}
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
a7b5f8764124b369bd831f108d8a72289525d0b7
|
c6d8805abdee76dcb729eaf7b62ac41a68d6ca91
|
/src/main/java/imrcp/geosrv/AHPSLocations.java
|
be60e250e52da6a6c62a2b9a73f7438de981f535
|
[] |
no_license
|
hmusavi/imrcp_mvn
|
34e0fbae85860825b92d6f51b459a3410eb147ff
|
04c403a75c91a5ad84052af59aeae094098869f3
|
refs/heads/main
| 2023-03-09T07:23:16.117096
| 2021-02-22T14:34:30
| 2021-02-22T14:34:30
| 341,216,470
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,115
|
java
|
/*
* Copyright 2018 Synesis-Partners.
*
* 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 imrcp.geosrv;
import imrcp.system.CsvReader;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Collections;
/**
*
* @author Federal Highway Administration
*/
public class AHPSLocations extends SensorLocations
{
private ArrayList<AHPSLocation> m_oLocationsByAHPSId = new ArrayList();
@Override
public boolean start() throws Exception
{
m_oLocations = new ArrayList<>();
try (CsvReader oIn = new CsvReader(new FileInputStream(m_oConfig.getString("file", ""))))
{
oIn.readLine();
while (oIn.readLine() > 0)
{
AHPSLocation oTemp = new AHPSLocation(oIn);
m_oLocations.add(oTemp);
m_oLocationsByAHPSId.add(oTemp);
}
}
Collections.sort(m_oLocations, SensorLocation.g_oIMRCPIDCOMP);
Collections.sort(m_oLocationsByAHPSId);
return true;
}
@Override
public void getSensorLocations(ArrayList<SensorLocation> oSensors, int nLat1, int nLat2, int nLon1, int nLon2)
{
int nIndex = m_oLocations.size();
while (nIndex-- > 0)
{
AHPSLocation oTemp = (AHPSLocation)m_oLocations.get(nIndex);
if (oTemp.m_nLat >= nLat1 && oTemp.m_nLat < nLat2 && oTemp.m_nLon >= nLon1 && oTemp.m_nLon < nLon2)
oSensors.add(oTemp);
}
}
public AHPSLocation getAHPSLocationByAHPSId(String sGaugeLID)
{
AHPSLocation oSearch = new AHPSLocation();
oSearch.m_sGaugeLID = sGaugeLID;
int nIndex = Collections.binarySearch(m_oLocationsByAHPSId, oSearch);
if (nIndex >= 0)
return m_oLocationsByAHPSId.get(nIndex);
return null;
}
}
|
[
"musavi_hamid@bah.com"
] |
musavi_hamid@bah.com
|
693f8389a580dd804ee3f44ed3a5fd80cfe7e0bb
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_40151.java
|
7437663637bb5ff7a210915330b81019e1193068
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,348
|
java
|
void buildFileType(){
String url="stdtypes.html#bltin-file-objects";
State table=BaseFile.table;
String[] methods_unknown={"__enter__","__exit__","__iter__","flush","readinto","truncate"};
for ( String m : methods_unknown) {
table.insert(m,newLibUrl(url),newFunc(),METHOD);
}
String[] methods_str={"next","read","readline"};
for ( String m : methods_str) {
table.insert(m,newLibUrl(url),newFunc(Type.STR),METHOD);
}
String[] num={"fileno","isatty","tell"};
for ( String m : num) {
table.insert(m,newLibUrl(url),newFunc(Type.INT),METHOD);
}
String[] methods_none={"close","seek","write","writelines"};
for ( String m : methods_none) {
table.insert(m,newLibUrl(url),newFunc(Type.NONE),METHOD);
}
table.insert("readlines",newLibUrl(url),newFunc(newList(Type.STR)),METHOD);
table.insert("xreadlines",newLibUrl(url),newFunc(Type.STR),METHOD);
table.insert("closed",newLibUrl(url),Type.INT,ATTRIBUTE);
table.insert("encoding",newLibUrl(url),Type.STR,ATTRIBUTE);
table.insert("errors",newLibUrl(url),Type.UNKNOWN,ATTRIBUTE);
table.insert("mode",newLibUrl(url),Type.INT,ATTRIBUTE);
table.insert("name",newLibUrl(url),Type.STR,ATTRIBUTE);
table.insert("softspace",newLibUrl(url),Type.INT,ATTRIBUTE);
table.insert("newlines",newLibUrl(url),newUnion(Type.STR,newTuple(Type.STR)),ATTRIBUTE);
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
1c753d91011d7a666e91b2c2b6a1a701cc0b030f
|
128da67f3c15563a41b6adec87f62bf501d98f84
|
/com/emt/proteus/duchampopt/cypx2s_513.java
|
41b03e724142ea9a595fb0554ed6b852125ec85f
|
[] |
no_license
|
Creeper20428/PRT-S
|
60ff3bea6455c705457bcfcc30823d22f08340a4
|
4f6601fb0dd00d7061ed5ee810a3252dcb2efbc6
|
refs/heads/master
| 2020-03-26T03:59:25.725508
| 2018-08-12T16:05:47
| 2018-08-12T16:05:47
| 73,244,383
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,029
|
java
|
/* */ package com.emt.proteus.duchampopt;
/* */
/* */ import com.emt.proteus.runtime.api.Env;
/* */ import com.emt.proteus.runtime.api.Frame;
/* */ import com.emt.proteus.runtime.api.Function;
/* */ import com.emt.proteus.runtime.api.MainMemory;
/* */
/* */ public final class cypx2s_513 extends com.emt.proteus.runtime.api.ImplementedFunction
/* */ {
/* */ public static final int FNID = Integer.MAX_VALUE;
/* 11 */ public static final Function _instance = new cypx2s_513();
/* 12 */ public final Function resolve() { return _instance; }
/* */
/* 14 */ public cypx2s_513() { super("cypx2s_513", 7, false); }
/* */
/* */ public int execute(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7)
/* */ {
/* 18 */ call(paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7);
/* 19 */ return 0;
/* */ }
/* */
/* */ public int execute(Env paramEnv, Frame paramFrame, int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4)
/* */ {
/* 24 */ int i = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 25 */ paramInt4 += 2;
/* 26 */ paramInt3--;
/* 27 */ int j = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 28 */ paramInt4 += 2;
/* 29 */ paramInt3--;
/* 30 */ int k = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 31 */ paramInt4 += 2;
/* 32 */ paramInt3--;
/* 33 */ int m = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 34 */ paramInt4 += 2;
/* 35 */ paramInt3--;
/* 36 */ int n = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 37 */ paramInt4 += 2;
/* 38 */ paramInt3--;
/* 39 */ int i1 = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 40 */ paramInt4 += 2;
/* 41 */ paramInt3--;
/* 42 */ int i2 = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 43 */ paramInt4 += 2;
/* 44 */ paramInt3--;
/* 45 */ call(i, j, k, m, n, i1, i2);
/* 46 */ return paramInt4;
/* */ }
/* */
/* */
/* */ public static void call(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7)
/* */ {
/* 52 */ int i = 0;
/* 53 */ int j = 0;
/* 54 */ int k = 0;
/* 55 */ int m = 0;
/* 56 */ int n = 0;
/* 57 */ double d = 0.0D;
/* 58 */ int i1 = 0;
/* */
/* */
/* */
/* */ try
/* */ {
/* 64 */ i = paramInt5 + 368;
/* 65 */ j = paramInt5 + 344;
/* 66 */ if (paramInt3 > 0)
/* */ {
/* 68 */ k = paramInt2 * paramInt4;
/* 69 */ m = 0;
/* */
/* */
/* */
/* 73 */ n = m * paramInt2;
/* 74 */ d = MainMemory.getF64(paramInt7 + (m * paramInt1 << 3)) + MainMemory.getF64(j);
/* 75 */ d = MainMemory.getF64(i) * d;
/* 76 */ i1 = 0;
/* */
/* */ for (;;)
/* */ {
/* 80 */ MainMemory.setF64(paramInt6 + (n + k * i1 << 3), d);
/* 81 */ i1 += 1;
/* 82 */ if (i1 == paramInt3)
/* */ {
/* 84 */ m += 1;
/* 85 */ if (m == paramInt4) {
/* */ break label161;
/* */ }
/* */
/* */
/* 90 */ break;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ break label161;
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ label161:
/* */
/* */
/* */
/* */
/* */
/* 112 */ return;
/* */ }
/* */ finally {}
/* */ }
/* */ }
/* Location: /home/jkim13/Desktop/emediatrack/codejar_s.jar!/com/emt/proteus/duchampopt/cypx2s_513.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"kimjoey79@gmail.com"
] |
kimjoey79@gmail.com
|
6763d00eca6980c8cd5ad43480c5a637ad402e82
|
434eeace9a2d4d19d8946499ad92331bca2e7c5f
|
/descent.core/src/descent/internal/compiler/ISourceElementRequestor.java
|
28d557ff748c19e0882b34c9585cafbcc56b38b8
|
[] |
no_license
|
jacob-carlborg/descent
|
bc9632d774c5d4b6b36ace5b63ab213e5040c6b6
|
4a78f1e441aa89632c4a7329fe894f9ed506b4ad
|
refs/heads/master
| 2021-03-12T23:27:42.290232
| 2011-08-26T17:42:07
| 2011-08-26T17:42:07
| 2,454,693
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,463
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package descent.internal.compiler;
import descent.core.compiler.IProblem;
/*
* Part of the source element parser responsible for building the output. It
* gets notified of structural information as they are detected, relying on the
* requestor to assemble them together, based on the notifications it got.
*
* The structural investigation includes: - package statement - import
* statements - top-level types: package member, member types (member types of
* member types...) - fields - methods
*
* If reference information is requested, then all source constructs are
* investigated and type, field & method references are provided as well.
*
* Any (parsing) problem encountered is also provided.
*
* All positions are relative to the exact source fed to the parser.
*
* Elements which are complex are notified in two steps: - enter <Element> :
* once the element header has been identified - exit <Element> : once the
* element has been fully consumed
*
* other simpler elements (package, import) are read all at once: - accept
* <Element>
*/
public interface ISourceElementRequestor {
public static class TypeInfo {
public int declarationStart;
public long modifiers;
public char[] name;
public int nameSourceStart;
public int nameSourceEnd;
public char[][] superinterfaces;
public TypeParameterInfo[] typeParameters;
public boolean isForwardDeclaration;
}
public static class TypeParameterInfo {
public int declarationStart;
public int declarationEnd;
public char[] name;
public char[] signature;
public char[] defaultValue;
public int nameSourceStart;
public int nameSourceEnd;
}
public static class MethodInfo {
public int declarationStart;
public long modifiers;
public char[] returnType;
public char[] name;
public int nameSourceStart;
public int nameSourceEnd;
public char[][] parameterTypes;
public char[][] parameterDefaultValues;
public char[][] parameterNames;
public TypeParameterInfo[] typeParameters;
public char[] signature;
}
public static class FieldInfo {
public int declarationStart;
public long modifiers;
public char[] type;
public char[] name;
public int nameSourceStart;
public int nameSourceEnd;
public char[] initializationSource;
}
void acceptConstructorReference(char[] typeName, int argCount, int sourcePosition);
void acceptFieldReference(char[] fieldName, int sourcePosition);
/**
* @param declarationStart
* This is the position of the first character of the import
* keyword.
* @param declarationEnd
* This is the position of the ';' ending the import statement or
* the end of the comment following the import.
* @param modifiers
* can be set to static from 1.5 on.
*/
void acceptImport(int declarationStart, int declarationEnd, String name, String alias, String[] selectiveImportsNames, String[] selectiveImportsAliases, long modifiers);
/*
* Table of line separator position. This table is passed once at the end of
* the parse action, so as to allow computation of normalized ranges.
*
* A line separator might corresponds to several characters in the source,
*
*/
void acceptLineSeparatorPositions(int[] positions);
void acceptMethodReference(char[] methodName, int argCount, int sourcePosition);
void acceptPackage(int declarationStart, int declarationEnd, char[] name, boolean safe);
void acceptProblem(IProblem problem);
void acceptTypeReference(char[][] typeName, int sourceStart, int sourceEnd);
void acceptTypeReference(char[] typeName, int sourcePosition);
void acceptUnknownReference(char[][] name, int sourceStart, int sourceEnd);
void acceptUnknownReference(char[] name, int sourcePosition);
void enterCompilationUnit();
void enterConditional(int declarationStart, long modifiers, char[] displayString);
void enterConditionalThen(int declarationStart);
void enterConditionalElse(int declarationStart);
void enterConstructor(MethodInfo methodInfo);
void enterField(FieldInfo fieldInfo);
void enterInitializer(int declarationStart, long modifiers, char[] displayString);
void enterMethod(MethodInfo methodInfo);
void enterType(TypeInfo typeInfo);
void exitCompilationUnit(int declarationEnd);
void exitConstructor(int declarationEnd);
/*
* initializationStart denotes the source start of the expression used for
* initializing the field if any (-1 if no initialization).
*/
void exitField(int initializationStart, int declarationEnd, int declarationSourceEnd);
void exitInitializer(int declarationEnd);
void exitConditional(int declarationEnd);
void exitConditionalThen(int declarationEnd);
void exitConditionalElse(int declarationEnd);
void exitMethod(int declarationEnd, int defaultValueStart, int defaultValueEnd);
void exitType(int declarationEnd);
}
|
[
"asterite@6538119e-2221-0410-ba12-9a5a7e5062c7"
] |
asterite@6538119e-2221-0410-ba12-9a5a7e5062c7
|
73f159b75572da0c9ebbc8a13a2c3f44b996d1d2
|
40a58b118d1cc654bfb27db5e406cc734f213217
|
/protractor/src/main/java/com/jprotractor/scripts/Evaluate.java
|
3e490837020c5f3114b863e03a004bad7b23ead4
|
[] |
no_license
|
serpro69/selenium_java
|
592c51efea5264afc84e77ee2fe68069f934584a
|
025849d60264e259905c2327cb13c9cca24c993e
|
refs/heads/master
| 2021-07-16T20:42:27.160266
| 2017-10-24T02:52:44
| 2017-10-24T02:52:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 247
|
java
|
package com.jprotractor.scripts;
/**
* @author Carlos Alexandro Becker (caarlos0@gmail.com)
*/
public final class Evaluate implements Script {
@Override
public String content() {
return new Loader("evaluate").content();
}
}
|
[
"kouzmine_serguei@yahoo.com"
] |
kouzmine_serguei@yahoo.com
|
5be4a992768a0e4ca5a04266de5c6610fdf04a4c
|
bfc034c23c494bebb0b844d4ee19da56533b9026
|
/src/main/java/com/sky/ddt/entity/LongStorageFee.java
|
5a1e96e449ee5c327b70242014963cdd582f83b8
|
[] |
no_license
|
skywhitebai/ddt
|
2b0b35194199abf2126e8297316ad16fec2186b9
|
750178a971c50370afec5855274dbd20e53cc331
|
refs/heads/main
| 2023-06-07T00:29:53.206163
| 2021-09-24T16:24:42
| 2021-09-24T16:24:42
| 311,826,029
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,826
|
java
|
package com.sky.ddt.entity;
import java.math.BigDecimal;
import java.util.Date;
public class LongStorageFee {
private Integer id;
private Integer financeId;
private Date snapshotDate;
private String sku;
private Integer shopSkuId;
private String fnsku;
private String asin;
private String productName;
private String conditionType;
private BigDecimal qtyCharged12MoLongTermStorageFee;
private BigDecimal perUnitVolume;
private String currency;
private BigDecimal mo12LongTermsStorageFee;
private BigDecimal qtyCharged6MoLongTermStorageFee;
private BigDecimal mo6LongTermsStorageFee;
private String volumeUnit;
private String country;
private String enrolledInSmallAndLight;
private Date createTime;
private Integer createBy;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getFinanceId() {
return financeId;
}
public void setFinanceId(Integer financeId) {
this.financeId = financeId;
}
public Date getSnapshotDate() {
return snapshotDate;
}
public void setSnapshotDate(Date snapshotDate) {
this.snapshotDate = snapshotDate;
}
public String getSku() {
return sku;
}
public void setSku(String sku) {
this.sku = sku == null ? null : sku.trim();
}
public Integer getShopSkuId() {
return shopSkuId;
}
public void setShopSkuId(Integer shopSkuId) {
this.shopSkuId = shopSkuId;
}
public String getFnsku() {
return fnsku;
}
public void setFnsku(String fnsku) {
this.fnsku = fnsku == null ? null : fnsku.trim();
}
public String getAsin() {
return asin;
}
public void setAsin(String asin) {
this.asin = asin == null ? null : asin.trim();
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName == null ? null : productName.trim();
}
public String getConditionType() {
return conditionType;
}
public void setConditionType(String conditionType) {
this.conditionType = conditionType == null ? null : conditionType.trim();
}
public BigDecimal getQtyCharged12MoLongTermStorageFee() {
return qtyCharged12MoLongTermStorageFee;
}
public void setQtyCharged12MoLongTermStorageFee(BigDecimal qtyCharged12MoLongTermStorageFee) {
this.qtyCharged12MoLongTermStorageFee = qtyCharged12MoLongTermStorageFee;
}
public BigDecimal getPerUnitVolume() {
return perUnitVolume;
}
public void setPerUnitVolume(BigDecimal perUnitVolume) {
this.perUnitVolume = perUnitVolume;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency == null ? null : currency.trim();
}
public BigDecimal getMo12LongTermsStorageFee() {
return mo12LongTermsStorageFee;
}
public void setMo12LongTermsStorageFee(BigDecimal mo12LongTermsStorageFee) {
this.mo12LongTermsStorageFee = mo12LongTermsStorageFee;
}
public BigDecimal getQtyCharged6MoLongTermStorageFee() {
return qtyCharged6MoLongTermStorageFee;
}
public void setQtyCharged6MoLongTermStorageFee(BigDecimal qtyCharged6MoLongTermStorageFee) {
this.qtyCharged6MoLongTermStorageFee = qtyCharged6MoLongTermStorageFee;
}
public BigDecimal getMo6LongTermsStorageFee() {
return mo6LongTermsStorageFee;
}
public void setMo6LongTermsStorageFee(BigDecimal mo6LongTermsStorageFee) {
this.mo6LongTermsStorageFee = mo6LongTermsStorageFee;
}
public String getVolumeUnit() {
return volumeUnit;
}
public void setVolumeUnit(String volumeUnit) {
this.volumeUnit = volumeUnit == null ? null : volumeUnit.trim();
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country == null ? null : country.trim();
}
public String getEnrolledInSmallAndLight() {
return enrolledInSmallAndLight;
}
public void setEnrolledInSmallAndLight(String enrolledInSmallAndLight) {
this.enrolledInSmallAndLight = enrolledInSmallAndLight == null ? null : enrolledInSmallAndLight.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getCreateBy() {
return createBy;
}
public void setCreateBy(Integer createBy) {
this.createBy = createBy;
}
}
|
[
"baixueping@rfchina.com"
] |
baixueping@rfchina.com
|
5c48a230a901c791113ee8629f3845ec10482405
|
bc1fbf89595dc5ddac694e2dde366ec405639567
|
/diagnosis-protal/src/main/java/com/eedu/diagnosis/protal/service/StudentClassworkService.java
|
b4dad7feddd7e420b8cce285d92f42092809bfa5
|
[] |
no_license
|
dingran9/b2b-diagnosis
|
5bd9396b45b815fa856d8f447567e81425e67b9e
|
147f7bb2ef3f0431638f076281cd74a9489f9c26
|
refs/heads/master
| 2021-05-06T07:47:14.230444
| 2017-12-18T09:44:08
| 2017-12-18T09:44:08
| 113,966,212
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 546
|
java
|
package com.eedu.diagnosis.protal.service;
import com.eedu.diagnosis.protal.model.request.StudentModel;
import java.util.List;
import java.util.Map;
/**
* Created by dqy on 2017/3/21.
*/
public interface StudentClassworkService {
/**
* 初始化作业主页面
* @param model
* @return
*/
List<Map<String,Object>> initClasswork(StudentModel model);
/**
* 按学科获取学生的作业列表
* @param model
* @return
*/
// List<StudentRecordModel> classworkList(StudentModel model);
}
|
[
"dingran@e-eduspace.com"
] |
dingran@e-eduspace.com
|
8646a208b9824008faeb6a4221a0efb2c442fdac
|
d4a877437612a282a31e9811bf7c4f3d0ad5a07f
|
/app/src/main/java/com/tns/espapp/fragment/AccountStatementFragment.java
|
d5b96b3cb0dae4e192797264b7142a70cd9cbe8a
|
[] |
no_license
|
deepak-tns/ESPAppLatest
|
cfa91f048f936220d934b96622232427523294b7
|
80aac7600a4b00b950fcff0fe4cd2f10e0e41652
|
refs/heads/master
| 2020-03-20T00:30:06.442833
| 2018-06-12T09:07:17
| 2018-06-12T09:07:17
| 137,046,168
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,269
|
java
|
package com.tns.espapp.fragment;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.tns.espapp.AppConstraint;
import com.tns.espapp.R;
import com.tns.espapp.Utility.SharedPreferenceUtils;
/**
* Created by GARIMA on 6/23/2017.
*/
public class AccountStatementFragment extends Fragment {
private View view;
private WebView webView;
private ProgressDialog pd;
private SharedPreferenceUtils sharedPreferences;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
view = inflater.inflate(R.layout.fragment_pernsonal_info, container, false);
getLayoutsId();
return view;
}
private void getLayoutsId() {
webView = (WebView) view.findViewById(R.id.webview);
pd = new ProgressDialog(getContext());
pd.setMessage("Please wait Loading...");
pd.show();
pd.setCancelable(false);
webView.setWebViewClient(new MyBrowser());
webView.getSettings().setLoadsImagesAutomatically(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
sharedPreferences = SharedPreferenceUtils.getInstance();
sharedPreferences.setContext(getContext());
String empId = sharedPreferences.getString(AppConstraint.EMPID);
webView.loadUrl("http://182.71.51.35/ESP/Info/AccountStatementWebView/"+empId);
}
private class MyBrowser extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
if (!pd.isShowing()) {
pd.show();
}
return true;
}
@Override
public void onPageFinished(WebView view, String url) {
System.out.println("on finish");
if (pd.isShowing()) {
pd.dismiss();
}
}
}
}
|
[
"deepaksachan8@gmail.com"
] |
deepaksachan8@gmail.com
|
86526398be842187083b631ff7ba731fad61de99
|
3af6963d156fc1bf7409771d9b7ed30b5a207dc1
|
/runtime/src/main/java/apple/uikit/UIBackgroundRefreshStatus.java
|
f939bcc9a5575dba09b4d210f6dcd2372ab2fb10
|
[
"Apache-2.0"
] |
permissive
|
yava555/j2objc
|
1761d7ffb861b5469cf7049b51f7b73c6d3652e4
|
dba753944b8306b9a5b54728a40ca30bd17bdf63
|
refs/heads/master
| 2020-12-30T23:23:50.723961
| 2015-09-03T06:57:20
| 2015-09-03T06:57:20
| 48,475,187
| 0
| 0
| null | 2015-12-23T07:08:22
| 2015-12-23T07:08:22
| null |
UTF-8
|
Java
| false
| false
| 972
|
java
|
package apple.uikit;
import java.io.*;
import java.nio.*;
import java.util.*;
import com.google.j2objc.annotations.*;
import com.google.j2objc.runtime.*;
import com.google.j2objc.runtime.block.*;
import apple.audiotoolbox.*;
import apple.corefoundation.*;
import apple.coregraphics.*;
import apple.coreservices.*;
import apple.foundation.*;
import apple.coreanimation.*;
import apple.coredata.*;
import apple.coreimage.*;
import apple.coretext.*;
import apple.corelocation.*;
/**
* @since Available in iOS 7.0 and later.
*/
@Library("UIKit/UIKit.h")
@Mapping("UIBackgroundRefreshStatus")
public final class UIBackgroundRefreshStatus extends ObjCEnum {
@GlobalConstant("UIBackgroundRefreshStatusRestricted")
public static final long Restricted = 0L;
@GlobalConstant("UIBackgroundRefreshStatusDenied")
public static final long Denied = 1L;
@GlobalConstant("UIBackgroundRefreshStatusAvailable")
public static final long Available = 2L;
}
|
[
"pchen@sellegit.com"
] |
pchen@sellegit.com
|
5d2c78f06ca189d51d4275e21698b118e25d4373
|
ae05ef291fd060f450c26a9fbb504aea777139ad
|
/src/main/java/com/escom/schoolsaes/ws/PruebaWebService.java
|
5447e35a3de6762c4fb742aee1837c0cb83d4925
|
[] |
no_license
|
Tonatiu/java_soap_server
|
9b4444b827766a0ad5dc67e4dc2cc02a8fef9a4f
|
4369994fdabbe7ac27e8ae6d22eb688fd045d4a0
|
refs/heads/master
| 2021-01-20T16:17:14.511348
| 2016-06-05T03:52:26
| 2016-06-05T03:52:26
| 60,326,796
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 342
|
java
|
package com.escom.schoolsaes.ws;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService
public class PruebaWebService {
@WebMethod(operationName="suma")
public double suma(@WebParam(name="a")double a, @WebParam(name="b")double b) {
System.out.println("Multiplica");
return a * b;
}
}
|
[
"root@localhost.localdomain"
] |
root@localhost.localdomain
|
c321e17f447a305800163eae6a3c4a55965ce730
|
1f207999be869a53c773c4b3dc4cff3d78f60aca
|
/ybg_base_jar/src/main/java/com/alipay/api/domain/AlipayEcoCplifePayResultQueryModel.java
|
7451b6d584930b20630832c20037a0467fe367d0
|
[] |
no_license
|
BrendaHub/quanmin_admin
|
8b4f1643112910b728adc172324b8fb8a2f672dc
|
866548dc219a2eaee0a09efbc3b6410eb3c2beb9
|
refs/heads/master
| 2021-05-09T04:17:03.818182
| 2018-01-28T15:00:12
| 2018-01-28T15:00:12
| 119,267,872
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,052
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 查询单笔物业费交易关联账单详情
*
* @author auto create
* @since 1.0, 2017-09-08 11:37:41
*/
public class AlipayEcoCplifePayResultQueryModel extends AlipayObject {
private static final long serialVersionUID = 8773779982314343289L;
/**
* 查询令牌,部分模式下用户缴物业费成功后由支付宝通过异步通知给到开发者系统,和trade_no二者传其一即可。
*/
@ApiField("query_token")
private String queryToken;
/**
* 用户完成物业缴费后由支付宝异步通知的支付宝交易号,和查询token参数二者传其一即可。
*/
@ApiField("trade_no")
private String tradeNo;
public String getQueryToken() {
return this.queryToken;
}
public void setQueryToken(String queryToken) {
this.queryToken = queryToken;
}
public String getTradeNo() {
return this.tradeNo;
}
public void setTradeNo(String tradeNo) {
this.tradeNo = tradeNo;
}
}
|
[
"13552666934@139.com"
] |
13552666934@139.com
|
37220ba1eab40769654dae57abaf740fab7f9e51
|
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
|
/flakiness-predicter/input_data/original_tests/joel-costigliola-assertj-core/nonFlakyMethods/org.assertj.core.error.ElementsShouldHave_create_Test-should_create_error_message.java
|
0682fa1478ae5bc812b06d3abc37bfe6646e2b12
|
[
"BSD-3-Clause"
] |
permissive
|
Taher-Ghaleb/FlakeFlagger
|
6fd7c95d2710632fd093346ce787fd70923a1435
|
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
|
refs/heads/main
| 2023-07-14T16:57:24.507743
| 2021-08-26T14:50:16
| 2021-08-26T14:50:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 275
|
java
|
@Test public void should_create_error_message(){
String message=factory.create(new TextDescription("Test"),new StandardRepresentation());
assertEquals("[Test] \nExpecting elements:\n<[\"Leia\"]>\n of \n<[\"Yoda\", \"Luke\", \"Leia\"]>\n to have <jedi power>",message);
}
|
[
"aalsha2@masonlive.gmu.edu"
] |
aalsha2@masonlive.gmu.edu
|
6ddc643e567d42a13a734eee97872208ad90ecf0
|
e2b6a07d1f5145ce89f4998ce998b9d03d44f931
|
/src/main/java/tech/jiangtao/backstage/model/ShortNews.java
|
c34e5d398f11909ad79aca1cde3acb09135addd7
|
[
"Apache-2.0"
] |
permissive
|
BosCattle/JMessage-Api
|
3f851652833aeab3c740e4c71633e246c87d2cc9
|
554c9f042a74a415c1bd1f2a0432371a5807ddeb
|
refs/heads/master
| 2021-06-16T00:38:04.301705
| 2017-05-08T19:42:30
| 2017-05-08T19:42:30
| 82,381,164
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,271
|
java
|
package tech.jiangtao.backstage.model;
import java.util.Date;
public class ShortNews {
private Long snid;
private Date publishingTime;
private String newsType;
private String author;
private String subject;
private String body;
public Long getSnid() {
return snid;
}
public void setSnid(Long snid) {
this.snid = snid;
}
public Date getPublishingTime() {
return publishingTime;
}
public void setPublishingTime(Date publishingTime) {
this.publishingTime = publishingTime;
}
public String getNewsType() {
return newsType;
}
public void setNewsType(String newsType) {
this.newsType = newsType == null ? null : newsType.trim();
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author == null ? null : author.trim();
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject == null ? null : subject.trim();
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body == null ? null : body.trim();
}
}
|
[
"jiangtao103cp@163.com"
] |
jiangtao103cp@163.com
|
eda5ba85f05be35fb1a9117af51ac04b6de16146
|
1ac9bccd95181a524c1c2091abc0819af03d5263
|
/jigsaw-framework/jigsaw-runtime-metrics/src/main/java/org/jigsaw/payment/metric/Histogram.java
|
98745f45839a923dfa7085281f7e34e7a6ff6f68
|
[
"Apache-2.0"
] |
permissive
|
Orangeletbear/jigsaw
|
3ed7d4dd9e4ea510b903f2337a19502a622177c2
|
585e2ed244407b55d4b93c42d003e58e92bf60b1
|
refs/heads/master
| 2022-12-23T00:14:02.201185
| 2019-06-28T12:59:47
| 2019-06-28T12:59:47
| 194,274,478
| 0
| 0
|
Apache-2.0
| 2022-12-16T08:44:49
| 2019-06-28T12:59:14
|
Java
|
UTF-8
|
Java
| false
| false
| 1,128
|
java
|
package org.jigsaw.payment.metric;
/**
* 持续统计。
* @author shamphone@gmail.com
* @version 1.0.0
* @date 2017年8月13日
*/
public class Histogram {
private long count;
private double average;
private Long max;
private Long min;
public synchronized void addValue(final long value) {
calculateAverage(value);
calculateMax(value);
calculateMin(value);
count++;
}
private void calculateAverage(long value) {
average = (getTotal() + value) / (count + 1);
}
private void calculateMin(long value) {
if (min != null) {
min = Math.min(min, value);
} else {
min = value;
}
}
private void calculateMax(long value) {
if (max != null) {
max = Math.max(max, value);
} else {
max = value;
}
}
private double getTotal() {
return average * count;
}
public double getAverage() {
return average;
}
public long getMax() {
return max;
}
public long getMin() {
return min;
}
}
|
[
"1471755989@qq.com"
] |
1471755989@qq.com
|
5e205b715a4f0cb975a5bf98277a0e2805eb354d
|
46550e65c345d091087811629b3c100f5a855a0b
|
/plugins/org.eclipse.osee.framework.jini/src/org/eclipse/osee/framework/jini/service/test/interfaces/INabitService.java
|
92b764ec9b544f9b831ca260c908dd8dcd25cc3a
|
[] |
no_license
|
LiZongZho/osee
|
041f843d6ac319322327411b864f955b52575d47
|
39c88c44190b5635e6f4806a5191f3b1bd6e7f71
|
refs/heads/master
| 2020-12-13T14:43:02.942558
| 2014-09-29T22:09:39
| 2014-09-29T22:09:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,134
|
java
|
/*******************************************************************************
* Copyright (c) 2004, 2007 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
package org.eclipse.osee.framework.jini.service.test.interfaces;
import java.rmi.RemoteException;
import java.util.List;
import org.eclipse.osee.framework.jini.service.interfaces.IService;
import org.eclipse.osee.framework.jini.util.IRemotePrintTarget;
public interface INabitService extends IService {
void runBashCommands(String[] cmds) throws RemoteException;
String getServiceName() throws RemoteException;
List<BuildTargetPair> getBuildTargetPairInfo() throws RemoteException;
void connectToMachine(String username, String password, String ip, IRemotePrintTarget callback) throws RemoteException;
}
|
[
"rbrooks@ee007c2a-0a25-0410-9ab9-bf268980928c"
] |
rbrooks@ee007c2a-0a25-0410-9ab9-bf268980928c
|
1dea459f346d34ce0348f025e48d64271e1297c9
|
ae0e0f3393fd5a3da70fb4727e763459b7cb152b
|
/swing/src/main/java/global/namespace/truelicense/swing/UpdatingConsumerLicenseManager.java
|
03c9583e1aa296bd6ebec2f728b9e2131be1b5bf
|
[
"Apache-2.0"
] |
permissive
|
christian-schlichtherle/truelicense
|
a3f530be6ffea070558300532452584f918feb89
|
242568d8a419495c9de122ff42d17a37a3971790
|
refs/heads/develop
| 2022-11-24T12:05:52.710546
| 2021-07-25T10:13:27
| 2021-07-25T10:13:45
| 104,300,497
| 260
| 65
|
Apache-2.0
| 2022-11-16T02:51:40
| 2017-09-21T04:10:41
|
Java
|
UTF-8
|
Java
| false
| false
| 1,823
|
java
|
/*
* Copyright (C) 2005 - 2019 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package global.namespace.truelicense.swing;
import global.namespace.truelicense.api.ConsumerLicenseManager;
import global.namespace.truelicense.swing.util.Enabler;
import javax.swing.*;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
/**
* A decorating consumer license manager which hosts an {@link Enabler}.
* This class is immutable.
*/
abstract class UpdatingConsumerLicenseManager
extends DecoratingConsumerLicenseManager
implements Serializable {
private final Enabler enabler;
UpdatingConsumerLicenseManager(final ConsumerLicenseManager manager, final Enabler enabler) {
super(manager);
assert null != enabler;
this.enabler = enabler;
}
final void enable() { enabled(true); }
final void disable() { enabled(false); }
final boolean enabled() {
class Action implements Runnable {
@SuppressWarnings("WeakerAccess")
boolean result;
@Override public void run() { result = enabler.enabled(); }
}
return runOnEventDispatchThread(new Action()).result;
}
final void enabled(final boolean value) { runOnEventDispatchThread(() -> enabler.enabled(value)); }
private <R extends Runnable> R runOnEventDispatchThread(R action) {
if (SwingUtilities.isEventDispatchThread()) {
action.run();
} else {
try {
SwingUtilities.invokeAndWait(action);
} catch (InterruptedException ex) {
action.run(); // never mind!
} catch (InvocationTargetException ex) {
throw new AssertionError(ex);
}
}
return action;
}
}
|
[
"christian@schlichtherle.de"
] |
christian@schlichtherle.de
|
23d6a745eafc52f249c0cb92b7b18bfdb5707dcb
|
be16632b9c4bf9a4f72239779ba9510511b309db
|
/Current/Product/Production/Packages/FitNesse/Install/Product/FitNesse/Dev/fitnesse-plugins/src/com/targetprocess/integration/userstory/RetrieveAttachedRequestsForUserStoryResponse.java
|
2f0d5b275cc3d8289036e3c30db46233f0aaaa0a
|
[] |
no_license
|
vardars/ci-factory
|
7430c2afb577937fb598b5af3709990e674e7d05
|
b83498949f48948d36dc488310cf280dbd98ecb7
|
refs/heads/master
| 2020-12-25T19:26:17.750522
| 2015-07-10T10:58:10
| 2015-07-10T10:58:10
| 38,868,165
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,070
|
java
|
package com.targetprocess.integration.userstory;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="RetrieveAttachedRequestsForUserStoryResult" type="{http://targetprocess.com}ArrayOfRequestGeneralDTO" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"retrieveAttachedRequestsForUserStoryResult"
})
@XmlRootElement(name = "RetrieveAttachedRequestsForUserStoryResponse")
public class RetrieveAttachedRequestsForUserStoryResponse {
@XmlElement(name = "RetrieveAttachedRequestsForUserStoryResult")
protected ArrayOfRequestGeneralDTO retrieveAttachedRequestsForUserStoryResult;
/**
* Gets the value of the retrieveAttachedRequestsForUserStoryResult property.
*
* @return
* possible object is
* {@link ArrayOfRequestGeneralDTO }
*
*/
public ArrayOfRequestGeneralDTO getRetrieveAttachedRequestsForUserStoryResult() {
return retrieveAttachedRequestsForUserStoryResult;
}
/**
* Sets the value of the retrieveAttachedRequestsForUserStoryResult property.
*
* @param value
* allowed object is
* {@link ArrayOfRequestGeneralDTO }
*
*/
public void setRetrieveAttachedRequestsForUserStoryResult(ArrayOfRequestGeneralDTO value) {
this.retrieveAttachedRequestsForUserStoryResult = value;
}
}
|
[
"cifactory@571f4c53-cd24-0410-92e9-33dde47f2f63"
] |
cifactory@571f4c53-cd24-0410-92e9-33dde47f2f63
|
b2da8f223d03a4fb7b6d3677934a833065d16cc4
|
350f50831472558c1412e5e45162c85fccd1c2e6
|
/src/main/java/com/eviware/soapui/support/swing/RSyntaxAreaPopupMenu.java
|
a352bda240dca341c1e59588df3c97e71560d4e7
|
[
"MIT"
] |
permissive
|
ZihengSun/suis4j
|
759b387adbc4daa0300a360ce78112ffcf606fbc
|
6b6a233e45f14f8482fa5599fb50f5f0055a6b07
|
refs/heads/master
| 2021-07-12T17:26:23.651375
| 2019-03-08T00:18:06
| 2019-03-08T00:18:06
| 119,863,920
| 5
| 3
|
MIT
| 2019-03-07T14:56:21
| 2018-02-01T16:42:40
|
Java
|
UTF-8
|
Java
| false
| false
| 5,766
|
java
|
/*
* SoapUI, Copyright (C) 2004-2016 SmartBear Software
*
* Licensed under the EUPL, Version 1.1 or - as soon as they will be approved by the European Commission - subsequent
* versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://ec.europa.eu/idabc/eupl
*
* Unless required by applicable law or agreed to in writing, software distributed under the Licence is
* distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the Licence for the specific language governing permissions and limitations
* under the Licence.
*/
package com.eviware.soapui.support.swing;
import com.eviware.soapui.support.UISupport;
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JPopupMenu;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
import java.awt.event.ActionEvent;
public final class RSyntaxAreaPopupMenu extends JPopupMenu implements PopupMenuListener {
private final RSyntaxTextArea textComponent;
private CutAction cutAction;
private CopyAction copyAction;
private PasteAction pasteAction;
private ClearAction clearAction;
private SelectAllAction selectAllAction;
private UndoAction undoAction;
private RedoAction redoAction;
public static RSyntaxAreaPopupMenu add(RSyntaxTextArea textComponent) {
// double-check
if (textComponent.getComponentPopupMenu() instanceof RSyntaxAreaPopupMenu) {
return (RSyntaxAreaPopupMenu) textComponent.getComponentPopupMenu();
}
RSyntaxAreaPopupMenu popupMenu = new RSyntaxAreaPopupMenu(textComponent);
textComponent.setComponentPopupMenu(popupMenu);
return popupMenu;
}
private RSyntaxAreaPopupMenu(RSyntaxTextArea textComponent) {
super("Edit");
this.textComponent = textComponent;
undoAction = new UndoAction();
add(undoAction);
redoAction = new RedoAction();
add(redoAction);
addSeparator();
cutAction = new CutAction();
add(cutAction);
copyAction = new CopyAction();
add(copyAction);
pasteAction = new PasteAction();
add(pasteAction);
clearAction = new ClearAction();
add(clearAction);
addSeparator();
selectAllAction = new SelectAllAction();
add(selectAllAction);
addPopupMenuListener(this);
}
private final class CutAction extends AbstractAction {
public CutAction() {
super("Cut");
putValue(Action.ACCELERATOR_KEY, UISupport.getKeyStroke("menu X"));
}
public void actionPerformed(ActionEvent e) {
textComponent.cut();
}
}
private final class CopyAction extends AbstractAction {
public CopyAction() {
super("Copy");
putValue(Action.ACCELERATOR_KEY, UISupport.getKeyStroke("menu C"));
}
public void actionPerformed(ActionEvent e) {
textComponent.copy();
}
}
private final class PasteAction extends AbstractAction {
public PasteAction() {
super("Paste");
putValue(Action.ACCELERATOR_KEY, UISupport.getKeyStroke("menu V"));
}
public void actionPerformed(ActionEvent e) {
if (!textComponent.hasFocus()) {
textComponent.requestFocusInWindow();
}
textComponent.paste();
}
}
private final class ClearAction extends AbstractAction {
public ClearAction() {
super("Clear");
}
public void actionPerformed(ActionEvent e) {
textComponent.setText("");
}
}
private final class SelectAllAction extends AbstractAction {
public SelectAllAction() {
super("Select All");
putValue(Action.ACCELERATOR_KEY, UISupport.getKeyStroke("menu A"));
}
public void actionPerformed(ActionEvent e) {
if (!textComponent.hasFocus()) {
textComponent.requestFocusInWindow();
}
textComponent.selectAll();
}
}
private final class UndoAction extends AbstractAction {
public UndoAction() {
super("Undo");
putValue(Action.ACCELERATOR_KEY, UISupport.getKeyStroke("menu Z"));
}
public void actionPerformed(ActionEvent e) {
textComponent.undoLastAction();
}
}
private final class RedoAction extends AbstractAction {
public RedoAction() {
super("Redo");
putValue(Action.ACCELERATOR_KEY, UISupport.getKeyStroke("menu Y"));
}
public void actionPerformed(ActionEvent e) {
textComponent.redoLastAction();
}
}
public void popupMenuCanceled(PopupMenuEvent e) {
}
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
}
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
// undoAction.setEnabled( textComponent.canUndo() );
// redoAction.setEnabled( textComponent.canRedo() );
cutAction.setEnabled(textComponent.getSelectionEnd() != textComponent.getSelectionStart());
copyAction.setEnabled(cutAction.isEnabled());
clearAction.setEnabled(cutAction.isEnabled());
selectAllAction.setEnabled(textComponent.getText().length() > 0);
}
}
|
[
"zsun@gmu.edu"
] |
zsun@gmu.edu
|
1ad4cb6090575d1437ea89ef73cece332ec422f2
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes10.dex_source_from_JADX/com/facebook/friending/profileshare/ProfileShareAdapter.java
|
3e959239d0cfa41c51704ae02652e2497f5057a7
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,392
|
java
|
package com.facebook.friending.profileshare;
import android.content.res.Resources;
import android.support.v7.widget.RecyclerView.Adapter;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import com.facebook.fbui.widget.layout.ImageBlockLayout;
import com.facebook.fbui.widget.text.caps.AllCapsTransformationMethod;
import com.facebook.inject.Assisted;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nullable;
import javax.inject.Inject;
/* compiled from: addAdminsDialog */
public class ProfileShareAdapter extends Adapter<ViewHolder> {
private final List<ProfileShareItem> f20246a = new ArrayList();
@Nullable
public OnClickListener f20247b;
private final AllCapsTransformationMethod f20248c;
private final Resources f20249d;
private final boolean f20250e;
/* compiled from: addAdminsDialog */
public class HeaderViewHolder extends ViewHolder {
public HeaderViewHolder(View view) {
super(view);
}
}
/* compiled from: addAdminsDialog */
public class PopupViewHolder extends ViewHolder {
public TextView f20244l;
public PopupViewHolder(View view) {
super(view);
this.f20244l = (TextView) view.findViewById(2131566407);
}
public void mo901a(int i, Object obj) {
this.a.setTag(i, obj);
}
}
/* compiled from: addAdminsDialog */
public class ImmersiveViewHolder extends PopupViewHolder {
private Button f20245l;
public ImmersiveViewHolder(View view) {
super(view);
this.f20245l = (Button) view.findViewById(2131566408);
}
public final void mo901a(int i, Object obj) {
super.mo901a(i, obj);
this.f20245l.setTag(i, obj);
}
}
@Retention(RetentionPolicy.SOURCE)
/* compiled from: addAdminsDialog */
public @interface ViewType {
}
@Inject
public ProfileShareAdapter(AllCapsTransformationMethod allCapsTransformationMethod, Resources resources, @Assisted boolean z) {
this.f20250e = z;
this.f20248c = allCapsTransformationMethod;
this.f20249d = resources;
}
public int getItemViewType(int i) {
return i == 0 ? 0 : 1;
}
public final ViewHolder m20535a(ViewGroup viewGroup, int i) {
View inflate;
if (!this.f20250e) {
inflate = LayoutInflater.from(viewGroup.getContext()).inflate(2130906480, viewGroup, false);
inflate.setOnClickListener(this.f20247b);
return new PopupViewHolder(inflate);
} else if (i == 0) {
return new HeaderViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(2130906478, viewGroup, false));
} else {
inflate = LayoutInflater.from(viewGroup.getContext()).inflate(2130906479, viewGroup, false);
inflate.setOnClickListener(this.f20247b);
Button button = (Button) inflate.findViewById(2131566408);
button.setText(this.f20248c.getTransformation(this.f20249d.getString(2131241364), null));
button.setOnClickListener(this.f20247b);
return new ImmersiveViewHolder(inflate);
}
}
public final void m20536a(ViewHolder viewHolder, int i) {
if (i != 0) {
ProfileShareItem profileShareItem = (ProfileShareItem) this.f20246a.get(i - 1);
if (viewHolder instanceof PopupViewHolder) {
PopupViewHolder popupViewHolder = (PopupViewHolder) viewHolder;
popupViewHolder.f20244l.setText(profileShareItem.f20277a);
popupViewHolder = (PopupViewHolder) viewHolder;
((ImageBlockLayout) popupViewHolder.a).setThumbnailDrawable(profileShareItem.f20278b);
((PopupViewHolder) viewHolder).mo901a(2131558805, profileShareItem);
}
}
}
public final int aZ_() {
return this.f20246a.size() + 1;
}
public final void m20537a(List<ProfileShareItem> list) {
this.f20246a.addAll(list);
notifyDataSetChanged();
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
d40c9e8ca656859a5c8de2238eaedcd27c8e8a08
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/com/alibaba/json/bvt/joda/JodaTest_7_DateTimeZone.java
|
cf8d611fd8ea9d9cced6f6253ec80c71e29e87dc
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 730
|
java
|
package com.alibaba.json.bvt.joda;
import com.alibaba.fastjson.JSON;
import junit.framework.TestCase;
import org.joda.time.DateTimeZone;
public class JodaTest_7_DateTimeZone extends TestCase {
public void test_for_joda_0() throws Exception {
JodaTest_7_DateTimeZone.Model m = new JodaTest_7_DateTimeZone.Model();
m.zone = DateTimeZone.forID("Asia/Shanghai");
String json = JSON.toJSONString(m);
TestCase.assertEquals("{\"zone\":\"Asia/Shanghai\"}", json);
JodaTest_7_DateTimeZone.Model m1 = JSON.parseObject(json, JodaTest_7_DateTimeZone.Model.class);
TestCase.assertEquals(m.zone, m1.zone);
}
public static class Model {
public DateTimeZone zone;
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
b0b0df0c09d3ac57c2f7de23a5586f95bb1124a5
|
53f5a941261609775dc3eedf0cb487956b734ab0
|
/com.samsung.accessory.atticmgr/sources/androidx/annotation/FractionRes.java
|
023ec5d355309e7028bc9b208b44495f1db3c27a
|
[] |
no_license
|
ThePBone/BudsProAnalysis
|
4a3ede6ba6611cc65598d346b5a81ea9c33265c0
|
5b04abcae98d1ec8d35335d587b628890383bb44
|
refs/heads/master
| 2023-02-18T14:24:57.731752
| 2021-01-17T12:44:58
| 2021-01-17T12:44:58
| 322,783,234
| 16
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 425
|
java
|
package androidx.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.LOCAL_VARIABLE})
@Documented
@Retention(RetentionPolicy.CLASS)
public @interface FractionRes {
}
|
[
"thebone.main@gmail.com"
] |
thebone.main@gmail.com
|
2f5ca55b8071a9474406c5f6d1cb4bf18c77f6da
|
a70bb22000cd7c6cfb01aa1db33164d92bf42a59
|
/rumo-springboot-rabbitmq-springxml/src/main/java/com/rumo/rabbitmq/topic/ReceiveLogsTopic2.java
|
2b983988d50097ed43f93d89ddfaaca947d51976
|
[] |
no_license
|
zixuncool/springboot-all
|
ef6cc0281a92b8a6a41706966aaec3aad6c1c04b
|
478333f32ff28477613e95ffdf11e7acc21fd488
|
refs/heads/master
| 2020-05-19T10:19:15.819966
| 2018-10-10T12:00:09
| 2018-10-10T12:00:09
| 184,964,876
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,871
|
java
|
package com.rumo.rabbitmq.topic;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.concurrent.TimeoutException;
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.DefaultConsumer;
import com.rabbitmq.client.Envelope;
import com.rumo.rabbitmq.ConnectionUtil;
public class ReceiveLogsTopic2 {
private static final String EXCHANGE_NAME = "topic_logs";
public static void main(String[] argv) throws IOException, TimeoutException {
Connection connection = ConnectionUtil.getConnection();
Channel channel = connection.createChannel();
// 声明一个匹配模式的交换器
channel.exchangeDeclare(EXCHANGE_NAME, "topic");
String queueName = channel.queueDeclare().getQueue();
// 路由关键字
String[] routingKeys = new String[]{"*.*.rabbit", "lazy.#"};
// 绑定路由关键字
for (String bindingKey : routingKeys) {
channel.queueBind(queueName, EXCHANGE_NAME, bindingKey);
System.out.println("ReceiveLogsTopic2 exchange:"+EXCHANGE_NAME+", queue:"+queueName+", BindRoutingKey:" + bindingKey);
}
System.out.println("ReceiveLogsTopic2 Waiting for messages");
DefaultConsumer consumer = new DefaultConsumer(channel) {
@Override
public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws UnsupportedEncodingException {
String message = new String(body, "UTF-8");
System.out.println("ReceiveLogsTopic2 Received '" + envelope.getRoutingKey() + "':'" + message + "'");
}
};
channel.basicConsume(queueName, true, consumer);
}
}
|
[
"xuchengfeifei@163.com"
] |
xuchengfeifei@163.com
|
9e77a01086087abad4ab3a938784c1b29631f506
|
889877dd2129c9717bafc77a84408f287fbbdbc3
|
/src/main/java/bjl/application/financialSummary/representation/FinancialSummaryRepresentation.java
|
cb72ed42a4de13678602662040402ef321c4bfdd
|
[] |
no_license
|
zhouxhhn/voto
|
3cf1405045e81230398cb273cfeaf9ee95b86ac5
|
66fc84c1b6b536be51b84895aa2be316618d3d49
|
refs/heads/master
| 2020-03-26T23:08:11.746765
| 2018-08-21T05:54:02
| 2018-08-21T05:54:02
| 145,513,289
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,362
|
java
|
package bjl.application.financialSummary.representation;
import java.math.BigDecimal;
import java.util.Date;
/**
* Created by dyp on 2017-12-27.
*/
public class FinancialSummaryRepresentation {
private String id;
private Integer version;
private Date createDate;
private Integer boot;//靴
private Integer bureau;//局
private BigDecimal playerScore;//闲投注表分
private BigDecimal bankerScore;//庄投注表分
private BigDecimal playerProportion;//闲占成
private BigDecimal bankerProportion;//庄占成
private BigDecimal playerMesaScore;//闲台面分
private BigDecimal bankerMesaScore;//庄台面分
private String result;//开奖结果
private BigDecimal mesaWinLoss;//台面分盈亏
private BigDecimal mesaWashCode;//台面分洗码
private BigDecimal zeroProfit ; //零数利润
private BigDecimal hedgeProfit ; //对冲利润
private BigDecimal proportionProfit ; //占成利润
private BigDecimal profitSummary;//利润汇总
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Integer getBoot() {
return boot;
}
public void setBoot(Integer boot) {
this.boot = boot;
}
public Integer getBureau() {
return bureau;
}
public void setBureau(Integer bureau) {
this.bureau = bureau;
}
public BigDecimal getPlayerScore() {
return playerScore;
}
public void setPlayerScore(BigDecimal playerScore) {
this.playerScore = playerScore;
}
public BigDecimal getBankerScore() {
return bankerScore;
}
public void setBankerScore(BigDecimal bankerScore) {
this.bankerScore = bankerScore;
}
public BigDecimal getPlayerProportion() {
return playerProportion;
}
public void setPlayerProportion(BigDecimal playerProportion) {
this.playerProportion = playerProportion;
}
public BigDecimal getBankerProportion() {
return bankerProportion;
}
public void setBankerProportion(BigDecimal bankerProportion) {
this.bankerProportion = bankerProportion;
}
public BigDecimal getPlayerMesaScore() {
return playerMesaScore;
}
public void setPlayerMesaScore(BigDecimal playerMesaScore) {
this.playerMesaScore = playerMesaScore;
}
public BigDecimal getBankerMesaScore() {
return bankerMesaScore;
}
public void setBankerMesaScore(BigDecimal bankerMesaScore) {
this.bankerMesaScore = bankerMesaScore;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public BigDecimal getMesaWinLoss() {
return mesaWinLoss;
}
public void setMesaWinLoss(BigDecimal mesaWinLoss) {
this.mesaWinLoss = mesaWinLoss;
}
public BigDecimal getMesaWashCode() {
return mesaWashCode;
}
public void setMesaWashCode(BigDecimal mesaWashCode) {
this.mesaWashCode = mesaWashCode;
}
public BigDecimal getZeroProfit() {
return zeroProfit;
}
public void setZeroProfit(BigDecimal zeroProfit) {
this.zeroProfit = zeroProfit;
}
public BigDecimal getHedgeProfit() {
return hedgeProfit;
}
public void setHedgeProfit(BigDecimal hedgeProfit) {
this.hedgeProfit = hedgeProfit;
}
public BigDecimal getProportionProfit() {
return proportionProfit;
}
public void setProportionProfit(BigDecimal proportionProfit) {
this.proportionProfit = proportionProfit;
}
public BigDecimal getProfitSummary() {
return profitSummary;
}
public void setProfitSummary(BigDecimal profitSummary) {
this.profitSummary = profitSummary;
}
}
|
[
"joey.zhou@siyue.cn"
] |
joey.zhou@siyue.cn
|
84f5dd6823a3287908cfab5286c8c6dea665e973
|
6cef7fc78cc935f733f3707fca94776effb94875
|
/siem/kraken-linux-sentry/src/main/java/org/krakenapps/sentry/linux/logger/LinuxCommandHandler.java
|
cf58233ca9363873548792d8af691830bfe70421
|
[] |
no_license
|
xeraph/kraken
|
1a5657d837caeaa8c6c045b24cd309d7184fd5b5
|
a2b6fe120b5c7d7cde0309ec1d4c3335abef17a1
|
refs/heads/master
| 2021-01-20T23:36:48.613826
| 2013-01-15T01:03:44
| 2013-01-15T01:03:44
| 7,766,261
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,790
|
java
|
/*
* Copyright 2010 NCHOVY
*
* 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.krakenapps.sentry.linux.logger;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Provides;
import org.krakenapps.sentry.SentryCommandHandler;
import org.krakenapps.sentry.SentryMethod;
import org.krakenapps.linux.api.ArpCache;
import org.krakenapps.linux.api.ArpEntry;
import org.krakenapps.linux.api.ConnectionInformation;
import org.krakenapps.linux.api.Process;
import org.krakenapps.linux.api.TcpConnectionInformation;
import org.krakenapps.linux.api.UdpConnectionInformation;
@Component(name = "sentry-linux-command-handler")
@Provides
public class LinuxCommandHandler implements SentryCommandHandler {
@Override
public Collection<String> getFeatures() {
return Arrays.asList("process-list", "arp-cache", "netstat");
}
@SentryMethod
public List<Object> getProcesses() {
List<Object> list = new ArrayList<Object>();
for (Process p : Process.getProcesses()) {
Map<String, Object> entryMap = new HashMap<String, Object>();
entryMap.put("pid", p.getPid());
entryMap.put("name", p.getName());
entryMap.put("cpu_usage", 0);
entryMap.put("working_set", 0);
list.add(entryMap);
}
return list;
}
@SentryMethod
public List<Object> getArpCache() throws FileNotFoundException {
List<Object> list = new ArrayList<Object>();
for (ArpEntry entry : ArpCache.getEntries()) {
Map<String, Object> entryMap = new HashMap<String, Object>();
entryMap.put("adapter", entry.getDevice());
entryMap.put("type", entry.getFlags().toLowerCase());
entryMap.put("mac", entry.getMac());
entryMap.put("ip", entry.getIp());
list.add(entryMap);
}
return list;
}
@SentryMethod
public Map<String, Object> getNetStat() {
Map<String, Object> m = new HashMap<String, Object>();
try {
m.put("tcp", marshal(TcpConnectionInformation.getTcpInformations()));
m.put("tcp6", marshal(TcpConnectionInformation.getTcp6Informations()));
m.put("udp", marshal(UdpConnectionInformation.getUdpInformations()));
m.put("udp6", marshal(UdpConnectionInformation.getUdp6Informations()));
} catch (IOException e) {
e.printStackTrace();
}
return m;
}
private List<Object> marshal(List<ConnectionInformation> infos) {
List<Object> list = new ArrayList<Object>();
for (ConnectionInformation info : infos) {
Map<String, Object> infoMap = new HashMap<String, Object>();
infoMap.put("local_ip", info.getLocal().getAddress().getHostAddress());
infoMap.put("local_port", info.getLocal().getPort());
if (info instanceof TcpConnectionInformation) {
infoMap.put("remote_ip", info.getRemote().getAddress().getHostAddress());
infoMap.put("remote_port", info.getRemote().getPort());
}
infoMap.put("state", info.getState().toString().toUpperCase());
infoMap.put("pid", info.getPid());
list.add(infoMap);
}
return list;
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
9ff83647564da971ee9d5ecaaee3c9866f60e595
|
6baa09045c69b0231c35c22b06cdf69a8ce227d6
|
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201607/express/BudgetSuggestionServiceInterface.java
|
3a4f5b9db3f0398b4798283b09961a1013020db8
|
[
"Apache-2.0"
] |
permissive
|
remotejob/googleads-java-lib
|
f603b47117522104f7df2a72d2c96ae8c1ea011d
|
a330df0799de8d8de0dcdddf4c317d6b0cd2fe10
|
refs/heads/master
| 2020-12-11T01:36:29.506854
| 2016-07-28T22:13:24
| 2016-07-28T22:13:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,100
|
java
|
package com.google.api.ads.adwords.jaxws.v201607.express;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
/**
*
* A service for budget suggestion.
*
*
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2.9-b130926.1035
* Generated source version: 2.1
*
*/
@WebService(name = "BudgetSuggestionServiceInterface", targetNamespace = "https://adwords.google.com/api/adwords/express/v201607")
@XmlSeeAlso({
com.google.api.ads.adwords.jaxws.v201607.cm.ObjectFactory.class,
com.google.api.ads.adwords.jaxws.v201607.express.ObjectFactory.class
})
public interface BudgetSuggestionServiceInterface {
/**
*
* Retrieves the budget suggestion for the specified criteria in the given selector based on
* co-trigger data.
* @param selector the selector specifying the budget suggestion to return
* @return budget suggestion identified by the selector
*
*
* @param selector
* @return
* returns com.google.api.ads.adwords.jaxws.v201607.express.BudgetSuggestion
* @throws ApiException
*/
@WebMethod
@WebResult(name = "rval", targetNamespace = "https://adwords.google.com/api/adwords/express/v201607")
@RequestWrapper(localName = "get", targetNamespace = "https://adwords.google.com/api/adwords/express/v201607", className = "com.google.api.ads.adwords.jaxws.v201607.express.BudgetSuggestionServiceInterfaceget")
@ResponseWrapper(localName = "getResponse", targetNamespace = "https://adwords.google.com/api/adwords/express/v201607", className = "com.google.api.ads.adwords.jaxws.v201607.express.BudgetSuggestionServiceInterfacegetResponse")
public BudgetSuggestion get(
@WebParam(name = "selector", targetNamespace = "https://adwords.google.com/api/adwords/express/v201607")
BudgetSuggestionSelector selector)
throws ApiException
;
}
|
[
"jradcliff@users.noreply.github.com"
] |
jradcliff@users.noreply.github.com
|
f249fc3651453cd9a1a9d72b0fdd5488beef92a6
|
14a9cfea324672bcb4e7e44f997e6c014efe9670
|
/quickblox-android-sdk-master/sample-core/src/main/java/com/quickblox/sample/core/utils/ImageUtils.java
|
a8129b0c1b8ae3ef75122ebb340a3e9bdf439b27
|
[
"BSD-2-Clause",
"BSD-3-Clause"
] |
permissive
|
Nazmul56/TestingProjects
|
a3cae3ae533147267ad41355dd2d5a3d3bb3390a
|
aaaf571ba2749061ad51c739f1f8d332741113d7
|
refs/heads/master
| 2022-05-02T10:02:34.947804
| 2022-03-24T16:53:32
| 2022-03-24T16:53:32
| 101,139,315
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,768
|
java
|
package com.quickblox.sample.core.utils;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.provider.MediaStore;
import android.support.v4.app.Fragment;
import com.quickblox.sample.core.CoreApp;
import com.quickblox.sample.core.R;
import com.quickblox.sample.core.utils.constant.MimeType;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class ImageUtils {
public static final int GALLERY_REQUEST_CODE = 183;
public static final int CAMERA_REQUEST_CODE = 212;
private static final String CAMERA_FILE_NAME_PREFIX = "CAMERA_";
private ImageUtils() {}
public static String saveUriToFile(Uri uri) throws Exception {
ParcelFileDescriptor parcelFileDescriptor = CoreApp.getInstance().getContentResolver().openFileDescriptor(uri, "r");
FileDescriptor fileDescriptor = parcelFileDescriptor.getFileDescriptor();
InputStream inputStream = new FileInputStream(fileDescriptor);
BufferedInputStream bis = new BufferedInputStream(inputStream);
File parentDir = StorageUtils.getAppExternalDataDirectoryFile();
String fileName = String.valueOf(System.currentTimeMillis()) + ".jpg";
File resultFile = new File(parentDir, fileName);
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(resultFile));
byte[] buf = new byte[2048];
int length;
try {
while ((length = bis.read(buf)) > 0) {
bos.write(buf, 0, length);
}
} catch (Exception e) {
throw new IOException("Can\'t save Storage API bitmap to a file!", e);
} finally {
parcelFileDescriptor.close();
bis.close();
bos.close();
}
return resultFile.getAbsolutePath();
}
public static void startImagePicker(Activity activity) {
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType(MimeType.IMAGE_MIME);
activity.startActivityForResult(Intent.createChooser(intent, activity.getString(R.string.dlg_choose_image_from)), GALLERY_REQUEST_CODE);
}
public static void startImagePicker(Fragment fragment) {
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType(MimeType.IMAGE_MIME);
fragment.startActivityForResult(Intent.createChooser(intent, fragment.getString(R.string.dlg_choose_image_from)), GALLERY_REQUEST_CODE);
}
public static void startCameraForResult(Activity activity) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (intent.resolveActivity(activity.getPackageManager()) == null) {
return;
}
File photoFile = getTemporaryCameraFile();
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoFile));
activity.startActivityForResult(intent, CAMERA_REQUEST_CODE);
}
public static void startCameraForResult(Fragment fragment) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (intent.resolveActivity(CoreApp.getInstance().getPackageManager()) == null) {
return;
}
File photoFile = getTemporaryCameraFile();
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoFile));
fragment.startActivityForResult(intent, CAMERA_REQUEST_CODE);
}
public static File getTemporaryCameraFile() {
File storageDir = StorageUtils.getAppExternalDataDirectoryFile();
File file = new File(storageDir, getTemporaryCameraFileName());
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
return file;
}
public static File getLastUsedCameraFile() {
File dataDir = StorageUtils.getAppExternalDataDirectoryFile();
File[] files = dataDir.listFiles();
List<File> filteredFiles = new ArrayList<>();
for (File file : files) {
if (file.getName().startsWith(CAMERA_FILE_NAME_PREFIX)) {
filteredFiles.add(file);
}
}
Collections.sort(filteredFiles);
if (!filteredFiles.isEmpty()) {
return filteredFiles.get(filteredFiles.size() - 1);
} else {
return null;
}
}
private static String getTemporaryCameraFileName() {
return CAMERA_FILE_NAME_PREFIX + System.currentTimeMillis() + ".jpg";
}
}
|
[
"nazmul.cste07@gmail.com"
] |
nazmul.cste07@gmail.com
|
2db79f05407fe05fed5cf3ca9470d4f1f4ff9e85
|
c1e0bbcddf2efee61d8d4bbdfaf200a6026524ce
|
/grouper-ws/grouper-ws/src/grouper-ws/edu/internet2/middleware/grouper/ws/rest/group/WsRestGroupDeleteLiteRequest.java
|
9ba1160a286d44d94d86024a9a13aab258bfe72e
|
[
"Apache-2.0"
] |
permissive
|
Internet2/grouper
|
094bb61f3f58d98e531684c205b884354db8d451
|
7a27d1460b45a79bf276fa05a726e83706f6ff65
|
refs/heads/GROUPER_4_BRANCH
| 2023-09-03T08:22:10.136126
| 2023-09-02T04:56:10
| 2023-09-02T04:56:10
| 21,910,720
| 74
| 82
|
NOASSERTION
| 2023-08-12T18:48:54
| 2014-07-16T17:42:37
|
Java
|
UTF-8
|
Java
| false
| false
| 5,612
|
java
|
/*******************************************************************************
* Copyright 2012 Internet2
*
* 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.
******************************************************************************/
/*
* @author mchyzer
* $Id: WsRestGroupDeleteLiteRequest.java,v 1.1 2008-03-30 09:01:03 mchyzer Exp $
*/
package edu.internet2.middleware.grouper.ws.rest.group;
import edu.internet2.middleware.grouper.ws.GrouperServiceLogic;
import edu.internet2.middleware.grouper.ws.rest.WsRequestBean;
import edu.internet2.middleware.grouper.ws.rest.method.GrouperRestHttpMethod;
/**
* lite bean that will be the data from rest request
* @see GrouperServiceLogic#getGroupsLite(edu.internet2.middleware.grouper.ws.GrouperWsVersion, String, String, String, edu.internet2.middleware.grouper.ws.member.WsMemberFilter, String, String, String, boolean, boolean, String, String, String, String, String)
* for lite method
*/
public class WsRestGroupDeleteLiteRequest implements WsRequestBean {
/** field */
private String groupName;
/** field */
private String groupUuid;
/** field */
private String includeGroupDetail;
/**
* field
*/
private String clientVersion;
/** field */
private String actAsSubjectId;
/** field */
private String actAsSubjectSourceId;
/** field */
private String actAsSubjectIdentifier;
/** field */
private String paramName0;
/** field */
private String paramValue0;
/** field */
private String paramName1;
/** field */
private String paramValue1;
/**
* field
* @return field
*/
public String getClientVersion() {
return this.clientVersion;
}
/**
* field
* @param clientVersion1
*/
public void setClientVersion(String clientVersion1) {
this.clientVersion = clientVersion1;
}
/**
* field
* @return field
*/
public String getActAsSubjectId() {
return this.actAsSubjectId;
}
/**
* field
* @param actAsSubjectId1
*/
public void setActAsSubjectId(String actAsSubjectId1) {
this.actAsSubjectId = actAsSubjectId1;
}
/**
* field
* @return field
*/
public String getActAsSubjectSourceId() {
return this.actAsSubjectSourceId;
}
/**
* field
* @param actAsSubjectSource1
*/
public void setActAsSubjectSourceId(String actAsSubjectSource1) {
this.actAsSubjectSourceId = actAsSubjectSource1;
}
/**
* field
* @return field
*/
public String getActAsSubjectIdentifier() {
return this.actAsSubjectIdentifier;
}
/**
* field
* @param actAsSubjectIdentifier1
*/
public void setActAsSubjectIdentifier(String actAsSubjectIdentifier1) {
this.actAsSubjectIdentifier = actAsSubjectIdentifier1;
}
/**
* field
* @return field
*/
public String getParamName0() {
return this.paramName0;
}
/**
* field
* @param _paramName0
*/
public void setParamName0(String _paramName0) {
this.paramName0 = _paramName0;
}
/**
* field
* @return field
*/
public String getParamValue0() {
return this.paramValue0;
}
/**
* field
* @param _paramValue0
*/
public void setParamValue0(String _paramValue0) {
this.paramValue0 = _paramValue0;
}
/**
* field
* @return field
*/
public String getParamName1() {
return this.paramName1;
}
/**
* field
* @param _paramName1
*/
public void setParamName1(String _paramName1) {
this.paramName1 = _paramName1;
}
/**
* field
* @return field
*/
public String getParamValue1() {
return this.paramValue1;
}
/**
* field
* @param _paramValue1
*/
public void setParamValue1(String _paramValue1) {
this.paramValue1 = _paramValue1;
}
/**
*
* @see edu.internet2.middleware.grouper.ws.rest.WsRequestBean#retrieveRestHttpMethod()
*/
public GrouperRestHttpMethod retrieveRestHttpMethod() {
return GrouperRestHttpMethod.DELETE;
}
/**
* @return the groupName
*/
public String getGroupName() {
return this.groupName;
}
/**
* field
* @param groupName1 the groupName to set
*/
public void setGroupName(String groupName1) {
this.groupName = groupName1;
}
/**
* field
* @return the groupUuid
*/
public String getGroupUuid() {
return this.groupUuid;
}
/**
* field
* @param groupUuid1 the groupUuid to set
*/
public void setGroupUuid(String groupUuid1) {
this.groupUuid = groupUuid1;
}
/**
* field
* @return the includeGroupDetail
*/
public String getIncludeGroupDetail() {
return this.includeGroupDetail;
}
/**
* field
* @param includeGroupDetail1 the includeGroupDetail to set
*/
public void setIncludeGroupDetail(String includeGroupDetail1) {
this.includeGroupDetail = includeGroupDetail1;
}
}
|
[
"mchyzer@isc.upenn.edu"
] |
mchyzer@isc.upenn.edu
|
c554f7c515faafe3bd467ba5c9ab21c4c86f2791
|
2b2fcb1902206ad0f207305b9268838504c3749b
|
/WakfuClientSources/srcx/class_24_aAE.java
|
27cd2d5d968e8723f43c3d836000c09419b811cf
|
[] |
no_license
|
shelsonjava/Synx
|
4fbcee964631f747efc9296477dee5a22826791a
|
0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d
|
refs/heads/master
| 2021-01-15T13:51:41.816571
| 2013-11-17T10:46:22
| 2013-11-17T10:46:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 883
|
java
|
import java.nio.ByteBuffer;
public class aAE
implements cxS
{
public int dTz = 0;
public static final int aL = 4;
public boolean g(ByteBuffer paramByteBuffer)
{
paramByteBuffer.putInt(this.dTz);
return true;
}
public boolean h(ByteBuffer paramByteBuffer) {
this.dTz = paramByteBuffer.getInt();
return true;
}
public void clear() {
this.dTz = 0;
}
public boolean b(ByteBuffer paramByteBuffer, int paramInt) {
return h(paramByteBuffer);
}
public int O()
{
return 4;
}
public final String toString()
{
StringBuilder localStringBuilder = new StringBuilder();
a(localStringBuilder, "");
return localStringBuilder.toString();
}
public final void a(StringBuilder paramStringBuilder, String paramString) {
paramStringBuilder.append(paramString).append("cannonId=").append(this.dTz).append('\n');
}
}
|
[
"music_inme@hotmail.fr"
] |
music_inme@hotmail.fr
|
93b15edcfd0f900095ed622a34a98d18d27340b1
|
3b22a684e1540d58d07bc6a12ab09584884c273d
|
/hybris/bin/ext-content/cmsfacades/testsrc/de/hybris/platform/cmsfacades/util/models/ContentSlotModelMother.java
|
84e498697f6371df5fc3d942a1d7448ffdea997c
|
[] |
no_license
|
ScottGledhill/HYB
|
955221b824b8f0d1b0e584d3f80c2e48bc0c19d9
|
0c91735fe889bc47878c851445220dbcae7ca281
|
refs/heads/master
| 2021-07-25T20:00:36.924559
| 2017-10-27T14:17:02
| 2017-10-27T14:17:02
| 108,548,668
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,618
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.cmsfacades.util.models;
import de.hybris.platform.catalog.model.CatalogVersionModel;
import de.hybris.platform.cms2.model.contents.contentslot.ContentSlotModel;
import de.hybris.platform.cms2.servicelayer.daos.CMSContentSlotDao;
import de.hybris.platform.cmsfacades.util.builder.ContentSlotModelBuilder;
import java.util.Collections;
import org.springframework.beans.factory.annotation.Required;
public class ContentSlotModelMother extends AbstractModelMother<ContentSlotModel>
{
public static final String UID_LOGO = "uid-contentslot-logo";
public static final String UID_HEADER = "uid-contentslot-header";
public static final String UID_FOOTER = "uid-contentslot-footer";
private CMSContentSlotDao cmsContentSlotDao;
private ParagraphComponentModelMother paragraphComponentModelMother;
private SimpleBannerComponentModelMother simpleBannerComponentModelMother;
private FlashComponentModelMother flashComponentModelMother;
private ABTestCMSComponentContainerModelMother abTestCMSComponentContainerModelMother;
public ContentSlotModel Logo_Slot(final CatalogVersionModel catalogVersion)
{
return getFromCollectionOrSaveAndReturn( //
() -> getCmsContentSlotDao().findContentSlotsByIdAndCatalogVersions(UID_LOGO,
Collections.singletonList(catalogVersion)), //
() -> ContentSlotModelBuilder.fromModel(defaultSlot(catalogVersion)) //
.withUid(UID_LOGO) //
.withCmsComponents( //
getSimpleBannerComponentModelMother().createHeaderLogoBannerComponentModel(catalogVersion)) //
.build());
}
public ContentSlotModel createFooterEmptySlot(final CatalogVersionModel catalogVersion)
{
return getFromCollectionOrSaveAndReturn( //
() -> getCmsContentSlotDao().findContentSlotsByIdAndCatalogVersions(UID_FOOTER,
Collections.singletonList(catalogVersion)), //
() -> ContentSlotModelBuilder.fromModel(defaultSlot(catalogVersion)) //
.withUid(UID_FOOTER) //
.build());
}
public ContentSlotModel createHeaderSlotWithParagraphAndBanner(final CatalogVersionModel catalogVersion)
{
return getFromCollectionOrSaveAndReturn( //
() -> getCmsContentSlotDao().findContentSlotsByIdAndCatalogVersions(UID_HEADER,
Collections.singletonList(catalogVersion)), //
() -> ContentSlotModelBuilder.fromModel(defaultSlot(catalogVersion)) //
.withUid(UID_HEADER) //
.withCmsComponents( //
getParagraphComponentModelMother().createHeaderParagraphComponentModel(catalogVersion), //
getSimpleBannerComponentModelMother().createHeaderLogoBannerComponentModel(catalogVersion)) //
.build());
}
public ContentSlotModel createPagesOfComponents(final CatalogVersionModel catalogVersion)
{
return getFromCollectionOrSaveAndReturn( //
() -> getCmsContentSlotDao().findContentSlotsByIdAndCatalogVersions(UID_HEADER,
Collections.singletonList(catalogVersion)), //
() -> ContentSlotModelBuilder.fromModel(defaultSlot(catalogVersion)) //
.withUid(UID_HEADER) //
.withCmsComponents( //
getParagraphComponentModelMother().createHeaderParagraphComponentModel(catalogVersion, ParagraphComponentModelMother.UID_HEADER+1, "Luke is good"), //
getParagraphComponentModelMother().createHeaderParagraphComponentModel(catalogVersion, ParagraphComponentModelMother.UID_HEADER+2, "abc"), //
getParagraphComponentModelMother().createHeaderParagraphComponentModel(catalogVersion, ParagraphComponentModelMother.UID_HEADER+3, "where is lUKe"), //
getParagraphComponentModelMother().createHeaderParagraphComponentModel(catalogVersion, ParagraphComponentModelMother.UID_HEADER+4, "def"), //
getParagraphComponentModelMother().createHeaderParagraphComponentModel(catalogVersion, ParagraphComponentModelMother.UID_HEADER+5, "ask LUKE how")) //
.build());
}
public ContentSlotModel createHeaderSlotWithParagraph(final CatalogVersionModel catalogVersion)
{
return getFromCollectionOrSaveAndReturn( //
() -> getCmsContentSlotDao().findContentSlotsByIdAndCatalogVersions(UID_HEADER,
Collections.singletonList(catalogVersion)), //
() -> ContentSlotModelBuilder.fromModel(defaultSlot(catalogVersion)) //
.withUid(UID_HEADER) //
.withCmsComponents( //
getParagraphComponentModelMother().createHeaderParagraphComponentModel(catalogVersion)) //
.build());
}
public ContentSlotModel createHeaderSlotWithFlashComponent(final CatalogVersionModel catalogVersion)
{
return getFromCollectionOrSaveAndReturn( //
() -> getCmsContentSlotDao().findContentSlotsByIdAndCatalogVersions(UID_HEADER,
Collections.singletonList(catalogVersion)), //
() -> ContentSlotModelBuilder.fromModel(defaultSlot(catalogVersion)) //
.withUid(UID_HEADER) //
.withCmsComponents( //
getFlashComponentModelMother().createHeaderFlashComponentModel(catalogVersion)) //
.build());
}
public ContentSlotModel createHeaderSlotWithABTestParagraphsContainer(final CatalogVersionModel catalogVersion)
{
return getFromCollectionOrSaveAndReturn( //
() -> getCmsContentSlotDao().findContentSlotsByIdAndCatalogVersions(UID_HEADER,
Collections.singletonList(catalogVersion)), //
() -> ContentSlotModelBuilder.fromModel(defaultSlot(catalogVersion)) //
.withUid(UID_HEADER) //
.withCmsComponents( //
getAbTestCMSComponentContainerModelMother().createHeaderParagraphsABTestContainerModel(catalogVersion)) //
.build());
}
protected ContentSlotModel defaultSlot(final CatalogVersionModel catalogVersion)
{
return ContentSlotModelBuilder.aModel() //
.withCatalogVersion(catalogVersion) //
.build();
}
public CMSContentSlotDao getCmsContentSlotDao()
{
return cmsContentSlotDao;
}
@Required
public void setCmsContentSlotDao(final CMSContentSlotDao cmsContentSlotDao)
{
this.cmsContentSlotDao = cmsContentSlotDao;
}
public ParagraphComponentModelMother getParagraphComponentModelMother()
{
return paragraphComponentModelMother;
}
@Required
public void setParagraphComponentModelMother(final ParagraphComponentModelMother paragraphComponentModelMother)
{
this.paragraphComponentModelMother = paragraphComponentModelMother;
}
public SimpleBannerComponentModelMother getSimpleBannerComponentModelMother()
{
return simpleBannerComponentModelMother;
}
@Required
public void setSimpleBannerComponentModelMother(final SimpleBannerComponentModelMother simpleBannerComponentModelMother)
{
this.simpleBannerComponentModelMother = simpleBannerComponentModelMother;
}
protected FlashComponentModelMother getFlashComponentModelMother()
{
return flashComponentModelMother;
}
@Required
public void setFlashComponentModelMother(final FlashComponentModelMother flashComponentModelMother)
{
this.flashComponentModelMother = flashComponentModelMother;
}
public ABTestCMSComponentContainerModelMother getAbTestCMSComponentContainerModelMother()
{
return abTestCMSComponentContainerModelMother;
}
@Required
public void setAbTestCMSComponentContainerModelMother(
final ABTestCMSComponentContainerModelMother abTestCMSComponentContainerModelMother)
{
this.abTestCMSComponentContainerModelMother = abTestCMSComponentContainerModelMother;
}
}
|
[
"ScottGledhill@hotmail.co.uk"
] |
ScottGledhill@hotmail.co.uk
|
921ba88d6cb87756625b8975952af2e9b1b8ab8e
|
f26c4ce1736cbd8763a66563a8d7b77175a669f8
|
/src/main/java/com/lzf/code/babasport/resp/OrderResp.java
|
ebddb6d1a6d82f36fd93aa7e6abc23b5322c21f0
|
[] |
no_license
|
15706058532/docker-maven-spring-boot-demo
|
a299cb2ab498ecfcd24b5b5e188a7f536fc76882
|
293a92b3245480d7ca53ce63e63b0f16cffdf103
|
refs/heads/master
| 2020-04-13T05:57:32.903433
| 2018-12-24T17:11:16
| 2018-12-24T17:11:16
| 163,007,888
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,902
|
java
|
package com.lzf.code.babasport.resp;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.io.Serializable;
/**
* 写点注释
* <br/>
* Created in 2018-12-22 20:08:59
* <br/>
*
* @author Li zhenfeng
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderResp implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 订单号
*/
private String orderNo;
/**
* 运费
*/
private Double deliverFee;
/**
* 应付金额
*/
private Double payableFee;
/**
* 订单金额
*/
private Double totalPrice;
/**
* 支付方式 0:到付 1:在线 2:邮局 3:公司转帐
*/
private Integer paymentWay;
/**
* 货到付款方式.1现金,2POS刷卡
*/
private Integer paymentCash;
/**
* 送货时间 0:只工作日送货(双休日,节假日不送) 1:只双休日,假日送货 2:工作日,双休日,假日均可送货
*/
private Integer delivery;
/**
* 是否电话确认 1:是 0: 否
*/
private Integer isConfirm;
/**
* 支付状态 :0到付1待付款,2已付款,3待退款,4退款成功,5退款失败
*/
private Integer isPaiy;
/**
* 订单状态 0:提交订单 1:仓库配货 2:商品出库 3:等待收货 4:完成 5待退货 6已退货
*/
private Integer state;
/**
* 订单生成时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 发货时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date deliverGoodsTime;
/**
* 预计送达时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date expectedDeliveryTime;
/**
* 附言
*/
private String note;
/**
* 用户Id
*/
private Long buyerId;
/**
* 地址Id
*/
private Long addrId;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo == null ? null : orderNo.trim();
}
public String getOrderNo() {
return orderNo;
}
public void setDeliverFee(Double deliverFee) {
this.deliverFee = deliverFee;
}
public Double getDeliverFee() {
return deliverFee;
}
public void setPayableFee(Double payableFee) {
this.payableFee = payableFee;
}
public Double getPayableFee() {
return payableFee;
}
public void setTotalPrice(Double totalPrice) {
this.totalPrice = totalPrice;
}
public Double getTotalPrice() {
return totalPrice;
}
public void setPaymentWay(Integer paymentWay) {
this.paymentWay = paymentWay;
}
public Integer getPaymentWay() {
return paymentWay;
}
public void setPaymentCash(Integer paymentCash) {
this.paymentCash = paymentCash;
}
public Integer getPaymentCash() {
return paymentCash;
}
public void setDelivery(Integer delivery) {
this.delivery = delivery;
}
public Integer getDelivery() {
return delivery;
}
public void setIsConfirm(Integer isConfirm) {
this.isConfirm = isConfirm;
}
public Integer getIsConfirm() {
return isConfirm;
}
public void setIsPaiy(Integer isPaiy) {
this.isPaiy = isPaiy;
}
public Integer getIsPaiy() {
return isPaiy;
}
public void setState(Integer state) {
this.state = state;
}
public Integer getState() {
return state;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getCreateTime() {
return createTime;
}
public void setDeliverGoodsTime(Date deliverGoodsTime) {
this.deliverGoodsTime = deliverGoodsTime;
}
public Date getDeliverGoodsTime() {
return deliverGoodsTime;
}
public void setExpectedDeliveryTime(Date expectedDeliveryTime) {
this.expectedDeliveryTime = expectedDeliveryTime;
}
public Date getExpectedDeliveryTime() {
return expectedDeliveryTime;
}
public void setNote(String note) {
this.note = note == null ? null : note.trim();
}
public String getNote() {
return note;
}
public void setBuyerId(Long buyerId) {
this.buyerId = buyerId;
}
public Long getBuyerId() {
return buyerId;
}
public void setAddrId(Long addrId) {
this.addrId = addrId;
}
public Long getAddrId() {
return addrId;
}
@Override
public String toString() {
return "OrderResp{" +
"id=" + id +
", orderNo='" + orderNo + '\'' +
", deliverFee=" + deliverFee +
", payableFee=" + payableFee +
", totalPrice=" + totalPrice +
", paymentWay=" + paymentWay +
", paymentCash=" + paymentCash +
", delivery=" + delivery +
", isConfirm=" + isConfirm +
", isPaiy=" + isPaiy +
", state=" + state +
", createTime=" + createTime +
", deliverGoodsTime=" + deliverGoodsTime +
", expectedDeliveryTime=" + expectedDeliveryTime +
", note='" + note + '\'' +
", buyerId=" + buyerId +
", addrId=" + addrId +
"}";
}
}
|
[
"15706058532@163.com"
] |
15706058532@163.com
|
4d3dcac48d67386bd6cae9f1019bd2b8a133c658
|
c75e6df08eb4065ab80fcc1dcc1cb38ac1256f72
|
/web/plugins/com.seekon.nextbi.mondrian/src/main/mondrian/olap/fun/RangeFunDef.java
|
fa8dbaced621a0da45323bfffb3abd1239f81fcf
|
[] |
no_license
|
jerome-nexedi/nextbi
|
7b219c1ec64b21bebf4ccf77c730e15a8ad1c6de
|
0179b30bf6a86ae6a070434a3161d7935f166b42
|
refs/heads/master
| 2021-01-10T09:06:15.838199
| 2012-11-14T11:59:53
| 2012-11-14T11:59:53
| 36,644,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,629
|
java
|
/*
// $Id: //open/mondrian/src/main/mondrian/olap/fun/RangeFunDef.java#19 $
// This software is subject to the terms of the Eclipse Public License v1.0
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2002-2002 Kana Software, Inc.
// Copyright (C) 2002-2011 Julian Hyde and others
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
//
// jhyde, 3 March, 2002
*/
package mondrian.olap.fun;
import mondrian.calc.*;
import mondrian.calc.impl.*;
import mondrian.mdx.ResolvedFunCall;
import mondrian.olap.Evaluator;
import mondrian.olap.Exp;
import mondrian.olap.Member;
import mondrian.olap.type.NullType;
import mondrian.resource.MondrianResource;
import mondrian.rolap.RolapMember;
/**
* Definition of the MDX <code><Member> : <Member></code> operator,
* which returns the set of members between a given pair of members.
*
* @author jhyde
* @since 3 March, 2002
* @version $Id: //open/mondrian/src/main/mondrian/olap/fun/RangeFunDef.java#19
* $
*/
class RangeFunDef extends FunDefBase {
static final RangeFunDef instance = new RangeFunDef();
private RangeFunDef() {
super(
":",
"<Member> : <Member>",
"Infix colon operator returns the set of members between a given pair of members.",
"ixmm");
}
/**
* Returns two membercalc objects, substituting nulls with the hierarchy null
* member of the other expression.
*
* @param exp0
* first expression
* @param exp1
* second expression
*
* @return two member calcs
*/
private MemberCalc[] compileMembers(Exp exp0, Exp exp1, ExpCompiler compiler) {
MemberCalc[] members = new MemberCalc[2];
if (exp0.getType() instanceof NullType) {
members[0] = null;
} else {
members[0] = compiler.compileMember(exp0);
}
if (exp1.getType() instanceof NullType) {
members[1] = null;
} else {
members[1] = compiler.compileMember(exp1);
}
// replace any null types with hierachy null member
// if both objects are null, throw exception
if (members[0] == null && members[1] == null) {
throw MondrianResource.instance().TwoNullsNotSupported.ex();
} else if (members[0] == null) {
Member nullMember = ((RolapMember) members[1].evaluate(null)).getHierarchy()
.getNullMember();
members[0] = (MemberCalc) ConstantCalc.constantMember(nullMember);
} else if (members[1] == null) {
Member nullMember = ((RolapMember) members[0].evaluate(null)).getHierarchy()
.getNullMember();
members[1] = (MemberCalc) ConstantCalc.constantMember(nullMember);
}
return members;
}
public Calc compileCall(final ResolvedFunCall call, ExpCompiler compiler) {
final MemberCalc[] memberCalcs = compileMembers(call.getArg(0), call.getArg(1),
compiler);
return new AbstractListCalc(call, new Calc[] { memberCalcs[0], memberCalcs[1] }) {
public TupleList evaluateList(Evaluator evaluator) {
final Member member0 = memberCalcs[0].evaluateMember(evaluator);
final Member member1 = memberCalcs[1].evaluateMember(evaluator);
if (member0.isNull() || member1.isNull()) {
return TupleCollections.emptyList(1);
}
if (member0.getLevel() != member1.getLevel()) {
throw evaluator.newEvalException(call.getFunDef(),
"Members must belong to the same level");
}
return new UnaryTupleList(FunUtil.memberRange(evaluator, member0, member1));
}
};
}
}
// End RangeFunDef.java
|
[
"undyliu@126.com"
] |
undyliu@126.com
|
c893b3dc9a170aed78d2cd5623225f3966a1b89a
|
4a55aec51d4809399fa1560021c569a478181c49
|
/xupdate-lib/src/main/java/com/xuexiang/xupdate/proxy/IPrompterProxy.java
|
6fdcd8c23bf6433337b02105bd8ad228f78dc235
|
[
"Apache-2.0"
] |
permissive
|
liushilong08/XUpdate
|
2ca0768f5b27c4358b05017ff5c8ab42d5bc5add
|
5628136a136ef37b38d4ae28ef402f40425d7835
|
refs/heads/master
| 2022-10-10T16:09:32.923426
| 2020-06-14T11:45:26
| 2020-06-14T11:45:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 805
|
java
|
package com.xuexiang.xupdate.proxy;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.xuexiang.xupdate.entity.UpdateEntity;
import com.xuexiang.xupdate.service.OnFileDownloadListener;
/**
* 版本更新提示器代理
*
* @author xuexiang
* @since 2020/6/9 12:16 AM
*/
public interface IPrompterProxy {
/**
* 开始下载更新
*
* @param updateEntity 更新信息
* @param downloadListener 文件下载监听
*/
void startDownload(@NonNull UpdateEntity updateEntity, @Nullable OnFileDownloadListener downloadListener);
/**
* 后台下载
*/
void backgroundDownload();
/**
* 取消下载
*/
void cancelDownload();
/**
* 资源回收
*/
void recycle();
}
|
[
"xuexiangjys@163.com"
] |
xuexiangjys@163.com
|
fbb7b669243f0f7baeba6eef36c3d3c6c39d88a9
|
091584472d29a75305706713d1988421cf402a6d
|
/Projects/FinalPharmacyManagementSystem/src/daoImp/UserDaoImp.java
|
030b55a5872fdf4f4869d825ce236d10f511ec70
|
[] |
no_license
|
shshetu/JavaSwing
|
f62303924c4394fa8dd8bf9f3ea530397cdf1096
|
0b492f61032cc31c492f54b9bc48dcbe69efca3b
|
refs/heads/master
| 2020-04-22T15:33:38.291204
| 2019-06-23T09:07:52
| 2019-06-23T09:07:52
| 170,481,382
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,730
|
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 daoImp;
import Connection.CustomDBConnection;
import dao.UserDao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import pojo.User;
/**
*
* @author shshe
*/
public class UserDaoImp implements UserDao {
Connection conn = CustomDBConnection.getConnection();
@Override
public void createTable() {
String sql = "create table if not exists user(user_id int(20) auto_increment primary key,role_name varchar(30),user_name varchar(30),dob date,address varchar(30),phone int(30),salary double,pass varchar(30))";
try {
PreparedStatement pstm = conn.prepareStatement(sql);
pstm.execute();
System.out.println("user table is created successfully!");
} catch (SQLException ex) {
Logger.getLogger(UserDaoImp.class.getName()).log(Level.SEVERE, null, ex);
}
}
@Override
public void insert(User us) {
String sql = "insert into user(role_name,user_name,dob,address ,phone,salary,pass) values(?,?,?,?,?,?,?)";
try {
PreparedStatement pstm = conn.prepareStatement(sql);
pstm.setString(1, us.getRoleName());
pstm.setString(2, us.getUserName());
pstm.setDate(3, us.getDob());
pstm.setString(4, us.getAddress());
pstm.setInt(5, us.getPhone());
pstm.setDouble(6, us.getSalary());
pstm.setString(7, us.getPass());
pstm.executeUpdate();
System.out.println("Data is inserted successfully into user table!");
} catch (SQLException ex) {
Logger.getLogger(UserDaoImp.class.getName()).log(Level.SEVERE, null, ex);
}
}
@Override
public void update(User us) {
//updated by user id
String sql = "update user set role_name = ?,user_name =?,dob =?,address=? ,phone =?,salary =?,pass=? where user_id =?";
try {
PreparedStatement pstm = conn.prepareStatement(sql);
pstm.setString(1, us.getRoleName());
pstm.setString(2, us.getUserName());
pstm.setDate(3, us.getDob());
pstm.setString(4, us.getAddress());
pstm.setInt(5, us.getPhone());
pstm.setDouble(6, us.getSalary());
pstm.setString(7, us.getPass());
pstm.setInt(8, us.getUserID());
pstm.executeUpdate();
System.out.println("Data is updated successfully into user table!");
} catch (SQLException ex) {
Logger.getLogger(UserDaoImp.class.getName()).log(Level.SEVERE, null, ex);
}
}
@Override
public void updatePass(User us) {
//updated by user id
String sql = "update user set pass=? where user_name =?";
try {
PreparedStatement pstm = conn.prepareStatement(sql);
pstm.setString(1, us.getPass());
pstm.setString(2, us.getUserName());
pstm.executeUpdate();
System.out.println("Data is updated successfully into user table!");
} catch (SQLException ex) {
Logger.getLogger(UserDaoImp.class.getName()).log(Level.SEVERE, null, ex);
}
}
@Override
public void delete(User us) {
//deleted by user id
String sql = "delete from user where user_id =?";
try {
PreparedStatement pstm = conn.prepareStatement(sql);
pstm.setInt(1, us.getUserID());
pstm.executeUpdate();
System.out.println("Data is deleted successfully from user table!");
} catch (SQLException ex) {
Logger.getLogger(UserDaoImp.class.getName()).log(Level.SEVERE, null, ex);
}
}
@Override
public User getUserById(int id) {
User user = null;
String sql = "select * from user where user_id = ?";
try {
PreparedStatement pstm = conn.prepareStatement(sql);
pstm.setInt(1, id);
ResultSet rs = pstm.executeQuery();
while (rs.next()) {
user = new User(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getDate(4), rs.getString(5), rs.getInt(6), rs.getInt(7), rs.getString(8));
}
} catch (SQLException ex) {
Logger.getLogger(UserDaoImp.class.getName()).log(Level.SEVERE, null, ex);
}
return user;
}
@Override
public User getUserByUserName(String name) {
User user = null;
String sql = "select * from user where user_name = ?";
try {
PreparedStatement pstm = conn.prepareStatement(sql);
pstm.setString(1, name);
ResultSet rs = pstm.executeQuery();
while (rs.next()) {
user = new User(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getDate(4), rs.getString(5), rs.getInt(6), rs.getInt(7), rs.getString(8));
}
} catch (SQLException ex) {
Logger.getLogger(UserDaoImp.class.getName()).log(Level.SEVERE, null, ex);
}
return user;
}
@Override
public User getUserByPhone(int phone) {
User user = null;
String sql = "select * from user where phone = ?";
try {
PreparedStatement pstm = conn.prepareStatement(sql);
pstm.setInt(1, phone);
ResultSet rs = pstm.executeQuery();
while (rs.next()) {
user = new User(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getDate(4), rs.getString(5), rs.getInt(6), rs.getInt(7), rs.getString(8));
}
} catch (SQLException ex) {
Logger.getLogger(UserDaoImp.class.getName()).log(Level.SEVERE, null, ex);
}
return user;
}
@Override
public List<User> getUser() {
List<User> list = new ArrayList<>();
String sql = "select * from user";
try {
PreparedStatement pstm = conn.prepareStatement(sql);
ResultSet rs = pstm.executeQuery();
while (rs.next()) {
User user = new User(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getDate(4), rs.getString(5), rs.getInt(6), rs.getInt(7), rs.getString(8));
list.add(user);
}
} catch (SQLException ex) {
Logger.getLogger(UserDaoImp.class.getName()).log(Level.SEVERE, null, ex);
}
return list;
}
}
|
[
"shshetu2017@gmail.com"
] |
shshetu2017@gmail.com
|
c8bd92a357e9161976f041013c79ae88f9106032
|
8c5e64d7000edf7a201179eeb1020c591d8fd0cd
|
/Minecraft/build/tmp/recompileMc/sources/net/minecraft/item/ItemEnchantedBook.java
|
cf7a20424cec9951de6a0b5b1d6be02c97776ceb
|
[
"LGPL-2.0-or-later",
"LGPL-2.1-only",
"BSD-3-Clause",
"MIT"
] |
permissive
|
shaw-wong/Malmo
|
1f1bec86ff5b2c8038540d029a9d2288201e0f3a
|
2683891206e8ab7f015d5d0feb6b5a967f02c94f
|
refs/heads/master
| 2021-06-25T13:14:30.097602
| 2018-06-03T14:25:19
| 2018-06-03T14:25:19
| 125,961,215
| 1
| 0
|
MIT
| 2018-04-10T05:34:35
| 2018-03-20T04:35:00
|
Java
|
UTF-8
|
Java
| false
| false
| 4,474
|
java
|
package net.minecraft.item;
import java.util.List;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentData;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class ItemEnchantedBook extends Item
{
/**
* Returns true if this item has an enchantment glint. By default, this returns
* <code>stack.isItemEnchanted()</code>, but other items can override it (for instance, written books always return
* true).
*
* Note that if you override this method, you generally want to also call the super version (on {@link Item}) to get
* the glint for enchanted items. Of course, that is unnecessary if the overwritten version always returns true.
*/
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack stack)
{
return true;
}
/**
* Checks isDamagable and if it cannot be stacked
*/
public boolean isEnchantable(ItemStack stack)
{
return false;
}
/**
* Return an item rarity from EnumRarity
*/
public EnumRarity getRarity(ItemStack stack)
{
return this.getEnchantments(stack).hasNoTags() ? super.getRarity(stack) : EnumRarity.UNCOMMON;
}
public NBTTagList getEnchantments(ItemStack stack)
{
NBTTagCompound nbttagcompound = stack.getTagCompound();
return nbttagcompound != null && nbttagcompound.hasKey("StoredEnchantments", 9) ? (NBTTagList)nbttagcompound.getTag("StoredEnchantments") : new NBTTagList();
}
/**
* allows items to add custom lines of information to the mouseover description
*/
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
{
super.addInformation(stack, playerIn, tooltip, advanced);
NBTTagList nbttaglist = this.getEnchantments(stack);
if (nbttaglist != null)
{
for (int i = 0; i < nbttaglist.tagCount(); ++i)
{
int j = nbttaglist.getCompoundTagAt(i).getShort("id");
int k = nbttaglist.getCompoundTagAt(i).getShort("lvl");
if (Enchantment.getEnchantmentByID(j) != null)
{
tooltip.add(Enchantment.getEnchantmentByID(j).getTranslatedName(k));
}
}
}
}
/**
* Adds an stored enchantment to an enchanted book ItemStack
*/
public void addEnchantment(ItemStack stack, EnchantmentData enchantment)
{
NBTTagList nbttaglist = this.getEnchantments(stack);
boolean flag = true;
for (int i = 0; i < nbttaglist.tagCount(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getCompoundTagAt(i);
if (Enchantment.getEnchantmentByID(nbttagcompound.getShort("id")) == enchantment.enchantmentobj)
{
if (nbttagcompound.getShort("lvl") < enchantment.enchantmentLevel)
{
nbttagcompound.setShort("lvl", (short)enchantment.enchantmentLevel);
}
flag = false;
break;
}
}
if (flag)
{
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
nbttagcompound1.setShort("id", (short)Enchantment.getEnchantmentID(enchantment.enchantmentobj));
nbttagcompound1.setShort("lvl", (short)enchantment.enchantmentLevel);
nbttaglist.appendTag(nbttagcompound1);
}
if (!stack.hasTagCompound())
{
stack.setTagCompound(new NBTTagCompound());
}
stack.getTagCompound().setTag("StoredEnchantments", nbttaglist);
}
/**
* Returns the ItemStack of an enchanted version of this item.
*/
public ItemStack getEnchantedItemStack(EnchantmentData data)
{
ItemStack itemstack = new ItemStack(this);
this.addEnchantment(itemstack, data);
return itemstack;
}
@SideOnly(Side.CLIENT)
public void getAll(Enchantment enchantment, List<ItemStack> list)
{
for (int i = enchantment.getMinLevel(); i <= enchantment.getMaxLevel(); ++i)
{
list.add(this.getEnchantedItemStack(new EnchantmentData(enchantment, i)));
}
}
}
|
[
"254664427@qq.com"
] |
254664427@qq.com
|
9b5ce7e2747750e96b5e7dd40555ea78f8f01495
|
5b018867e1842909c5321594aebd237e143ab815
|
/common/rebelkeithy/mods/atum/blocks/ItemBlockAtumSlab.java
|
254eafd7b2e2612e264afc1fa9a2d29b36b9a47f
|
[] |
no_license
|
AlexMVW10/Atum
|
12a5ac0210109856751715b5bff9286c71e5aeec
|
a6b65c368f838197cbc82fa0991e8d02ef7ae6ba
|
refs/heads/master
| 2020-12-25T17:03:26.251145
| 2013-04-07T22:11:15
| 2013-04-07T22:11:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,872
|
java
|
package rebelkeithy.mods.atum.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockHalfSlab;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemBlockAtumSlab extends ItemBlock
{
private final boolean isFullBlock;
/** Instance of BlockHalfSlab. */
private final BlockHalfSlab theHalfSlab;
/** The double-slab block corresponding to this item. */
private final BlockHalfSlab doubleSlab;
public ItemBlockAtumSlab(int par1, BlockHalfSlab par2BlockHalfSlab, BlockHalfSlab par3BlockHalfSlab, boolean par4)
{
super(par1);
this.theHalfSlab = par2BlockHalfSlab;
this.doubleSlab = par3BlockHalfSlab;
this.isFullBlock = par4;
this.setMaxDamage(0);
this.setHasSubtypes(true);
}
@SideOnly(Side.CLIENT)
/**
* Gets an icon index based on an item's damage value
*/
public Icon getIconFromDamage(int par1)
{
return Block.blocksList[this.itemID].getBlockTextureFromSideAndMetadata(2, par1);
}
/**
* Returns the metadata of the block which this Item (ItemBlock) can place
*/
public int getMetadata(int par1)
{
return par1;
}
/**
* Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
* different names based on their damage or NBT.
*/
public String getUnlocalizedName(ItemStack par1ItemStack)
{
return this.theHalfSlab.getFullSlabName(par1ItemStack.getItemDamage());
}
/**
* Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
* True if something happen and false if it don't. This is for ITEMS, not BLOCKS
*/
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
if (this.isFullBlock)
{
return super.onItemUse(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
}
else if (par1ItemStack.stackSize == 0)
{
return false;
}
else if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack))
{
return false;
}
else
{
int i1 = par3World.getBlockId(par4, par5, par6);
int j1 = par3World.getBlockMetadata(par4, par5, par6);
int k1 = j1 & 7;
boolean flag = (j1 & 8) != 0;
if ((par7 == 1 && !flag || par7 == 0 && flag) && i1 == this.theHalfSlab.blockID && k1 == par1ItemStack.getItemDamage())
{
if (par3World.checkIfAABBIsClear(this.doubleSlab.getCollisionBoundingBoxFromPool(par3World, par4, par5, par6)) && par3World.setBlock(par4, par5, par6, this.doubleSlab.blockID, k1, 3))
{
par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), this.doubleSlab.stepSound.getPlaceSound(), (this.doubleSlab.stepSound.getVolume() + 1.0F) / 2.0F, this.doubleSlab.stepSound.getPitch() * 0.8F);
--par1ItemStack.stackSize;
}
return true;
}
else
{
return this.func_77888_a(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7) ? true : super.onItemUse(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
}
}
}
@SideOnly(Side.CLIENT)
/**
* Returns true if the given ItemBlock can be placed on the given side of the given block position.
*/
public boolean canPlaceItemBlockOnSide(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer, ItemStack par7ItemStack)
{
int i1 = par2;
int j1 = par3;
int k1 = par4;
int l1 = par1World.getBlockId(par2, par3, par4);
int i2 = par1World.getBlockMetadata(par2, par3, par4);
int j2 = i2 & 7;
boolean flag = (i2 & 8) != 0;
if ((par5 == 1 && !flag || par5 == 0 && flag) && l1 == this.theHalfSlab.blockID && j2 == par7ItemStack.getItemDamage())
{
return true;
}
else
{
if (par5 == 0)
{
--par3;
}
if (par5 == 1)
{
++par3;
}
if (par5 == 2)
{
--par4;
}
if (par5 == 3)
{
++par4;
}
if (par5 == 4)
{
--par2;
}
if (par5 == 5)
{
++par2;
}
l1 = par1World.getBlockId(par2, par3, par4);
i2 = par1World.getBlockMetadata(par2, par3, par4);
j2 = i2 & 7;
flag = (i2 & 8) != 0;
return l1 == this.theHalfSlab.blockID && j2 == par7ItemStack.getItemDamage() ? true : super.canPlaceItemBlockOnSide(par1World, i1, j1, k1, par5, par6EntityPlayer, par7ItemStack);
}
}
private boolean func_77888_a(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7)
{
if (par7 == 0)
{
--par5;
}
if (par7 == 1)
{
++par5;
}
if (par7 == 2)
{
--par6;
}
if (par7 == 3)
{
++par6;
}
if (par7 == 4)
{
--par4;
}
if (par7 == 5)
{
++par4;
}
int i1 = par3World.getBlockId(par4, par5, par6);
int j1 = par3World.getBlockMetadata(par4, par5, par6);
int k1 = j1 & 7;
if (i1 == this.theHalfSlab.blockID && k1 == par1ItemStack.getItemDamage())
{
if (par3World.checkIfAABBIsClear(this.doubleSlab.getCollisionBoundingBoxFromPool(par3World, par4, par5, par6)) && par3World.setBlock(par4, par5, par6, this.doubleSlab.blockID, k1, 3))
{
par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), this.doubleSlab.stepSound.getPlaceSound(), (this.doubleSlab.stepSound.getVolume() + 1.0F) / 2.0F, this.doubleSlab.stepSound.getPitch() * 0.8F);
--par1ItemStack.stackSize;
}
return true;
}
else
{
return false;
}
}
}
|
[
"RebelKeithy@gmail.com"
] |
RebelKeithy@gmail.com
|
2f0c73bace6598cca500f826056e907d7d14f2d7
|
8d9abb3abeb48e30703b4ef6b3a1ee1895b963f4
|
/app/src/main/java/com/yxkj/controller/base/BaseObserver.java
|
a2d349b46de94d97c8698708a140158f7cdc7f8a
|
[] |
no_license
|
StoneInCHN/yxkj-controller-app
|
a0d544d27daaed43de4d34f4111a9a5a5048e8eb
|
717a630ddb24dcfbafe25aeebf77d69758cd6fde
|
refs/heads/master
| 2021-08-07T13:57:56.952351
| 2017-11-08T08:43:24
| 2017-11-08T08:43:24
| 103,118,087
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,114
|
java
|
package com.yxkj.controller.base;
import android.accounts.NetworkErrorException;
import com.yxkj.controller.util.LogUtil;
import com.yxkj.controller.util.ToastUtil;
import java.net.ConnectException;
import java.net.UnknownHostException;
import java.util.concurrent.TimeoutException;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
/**
* Observer基类
*/
public abstract class BaseObserver<T> implements Observer<BaseEntity<T>> {
protected BaseObserver() {
}
@Override
public void onSubscribe(Disposable d) {
LogUtil.e("onStart:");
}
@Override
public void onNext(BaseEntity<T> value) {
LogUtil.e("values " + value.toString());
if (value.code == 0000) {
T t = value.msg;
onHandleSuccess(t);
} else if (value.code == 1000) {
ToastUtil.showToast(value.desc);
T t = value.msg;
onHandleStockNotEnough(t);
} else {
onHandleError(value.desc);
}
}
@Override
public void onError(Throwable e) {
LogUtil.e("onError:" + e.toString());
ToastUtil.showToast("网络错误");
try {
if (e instanceof ConnectException
|| e instanceof TimeoutException
|| e instanceof NetworkErrorException
|| e instanceof UnknownHostException) {
onFailure(e, true);
} else {
onFailure(e, false);
}
} catch (Exception e1) {
e1.printStackTrace();
}
}
@Override
public void onComplete() {
LogUtil.e("onComplete");
}
protected void onHandleStockNotEnough(T value) {
}
protected void onHandleError(String msg) {
ToastUtil.showToast(msg);
}
protected abstract void onHandleSuccess(T t);
/**
* 返回失败
*
* @param e
* @param isNetWorkError 是否是网络错误
* @throws Exception
*/
protected abstract void onFailure(Throwable e, boolean isNetWorkError) throws Exception;
}
|
[
"zengqiang@yxsh-tech.com"
] |
zengqiang@yxsh-tech.com
|
424f3b814d4d6a1965923e5d8673989140297933
|
2d62bbd24ebc6c2b109d39378b1e75985afbed81
|
/bundles/Toometa/de.uka.ipd.sdq.dsexplore.qml.units/src/de/uka/ipd/sdq/dsexplore/qml/units/UnitsPackage.java
|
b9092012c42c8a2fa3f14ec53b2ec7c0e80825ab
|
[
"Apache-2.0"
] |
permissive
|
SebastianWeberKamp/KAMP
|
1cc11c83da882f5b0660fe1de6a6c80e13386841
|
818206ab33c9a2c4f3983d40943e2598d034d18e
|
refs/heads/master
| 2020-09-20T08:15:02.977029
| 2019-12-18T12:35:11
| 2019-12-18T12:35:11
| 224,419,712
| 0
| 0
|
Apache-2.0
| 2019-11-27T11:54:14
| 2019-11-27T11:54:13
| null |
UTF-8
|
Java
| false
| false
| 6,181
|
java
|
/**
*/
package de.uka.ipd.sdq.dsexplore.qml.units;
import de.uka.ipd.sdq.identifier.IdentifierPackage;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
/**
* <!-- begin-user-doc -->
* The <b>Package</b> for the model.
* It contains accessors for the meta objects to represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @see de.uka.ipd.sdq.dsexplore.qml.units.UnitsFactory
* @model kind="package"
* @generated
*/
public interface UnitsPackage extends EPackage {
/**
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNAME = "units";
/**
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_URI = "http://sdq.ipd.kit.edu/QML/units/1.0";
/**
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_PREFIX = "units";
/**
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
UnitsPackage eINSTANCE = de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitsPackageImpl.init();
/**
* The meta object id for the '{@link de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitImpl <em>Unit</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitImpl
* @see de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitsPackageImpl#getUnit()
* @generated
*/
int UNIT = 0;
/**
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__ID = IdentifierPackage.IDENTIFIER__ID;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT__NAME = IdentifierPackage.IDENTIFIER_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Unit</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT_FEATURE_COUNT = IdentifierPackage.IDENTIFIER_FEATURE_COUNT + 1;
/**
* The meta object id for the '{@link de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitRepositoryImpl <em>Unit Repository</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitRepositoryImpl
* @see de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitsPackageImpl#getUnitRepository()
* @generated
*/
int UNIT_REPOSITORY = 1;
/**
* The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT_REPOSITORY__ID = IdentifierPackage.IDENTIFIER__ID;
/**
* The feature id for the '<em><b>Units</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT_REPOSITORY__UNITS = IdentifierPackage.IDENTIFIER_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Unit Repository</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int UNIT_REPOSITORY_FEATURE_COUNT = IdentifierPackage.IDENTIFIER_FEATURE_COUNT + 1;
/**
* Returns the meta object for class '{@link de.uka.ipd.sdq.dsexplore.qml.units.Unit <em>Unit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Unit</em>'.
* @see de.uka.ipd.sdq.dsexplore.qml.units.Unit
* @generated
*/
EClass getUnit();
/**
* Returns the meta object for class '{@link de.uka.ipd.sdq.dsexplore.qml.units.UnitRepository <em>Unit Repository</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Unit Repository</em>'.
* @see de.uka.ipd.sdq.dsexplore.qml.units.UnitRepository
* @generated
*/
EClass getUnitRepository();
/**
* Returns the meta object for the containment reference list '{@link de.uka.ipd.sdq.dsexplore.qml.units.UnitRepository#getUnits <em>Units</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Units</em>'.
* @see de.uka.ipd.sdq.dsexplore.qml.units.UnitRepository#getUnits()
* @see #getUnitRepository()
* @generated
*/
EReference getUnitRepository_Units();
/**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/
UnitsFactory getUnitsFactory();
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @generated
*/
interface Literals {
/**
* The meta object literal for the '{@link de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitImpl <em>Unit</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitImpl
* @see de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitsPackageImpl#getUnit()
* @generated
*/
EClass UNIT = eINSTANCE.getUnit();
/**
* The meta object literal for the '{@link de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitRepositoryImpl <em>Unit Repository</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitRepositoryImpl
* @see de.uka.ipd.sdq.dsexplore.qml.units.impl.UnitsPackageImpl#getUnitRepository()
* @generated
*/
EClass UNIT_REPOSITORY = eINSTANCE.getUnitRepository();
/**
* The meta object literal for the '<em><b>Units</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference UNIT_REPOSITORY__UNITS = eINSTANCE.getUnitRepository_Units();
}
} //UnitsPackage
|
[
"layornos@gmail.com"
] |
layornos@gmail.com
|
d766fe1595b021f3a3fd4cdd006c8f95a8cf309c
|
f101055f70c0ceaf95a158273c8b05868db8895d
|
/app/src/main/java/com/lucevent/newsup/view/util/BottomNavigationViewHelper.java
|
d4c040ca8e4067bf9610ca31743e6646df2216ae
|
[] |
no_license
|
aartisoft/InstaNews
|
b89a8dd28b57c5c335c9e778f4020c3ade35b274
|
8060c8d54a6779c884f1913d7e24ad6f24b201ea
|
refs/heads/master
| 2021-09-21T04:44:51.140076
| 2018-08-20T17:57:00
| 2018-08-20T17:57:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,561
|
java
|
package com.lucevent.newsup.view.util;
/**
* Created by phuongbkatp on 8/20/2018.
*/
import android.annotation.SuppressLint;
import android.support.design.internal.BottomNavigationItemView;
import android.support.design.internal.BottomNavigationMenuView;
import android.support.design.widget.BottomNavigationView;
import android.util.Log;
import java.lang.reflect.Field;
public class BottomNavigationViewHelper {
@SuppressLint("RestrictedApi")
public static void removeShiftMode(BottomNavigationView view) {
BottomNavigationMenuView menuView = (BottomNavigationMenuView) view.getChildAt(0);
try {
Field shiftingMode = menuView.getClass().getDeclaredField("mShiftingMode");
shiftingMode.setAccessible(true);
shiftingMode.setBoolean(menuView, false);
shiftingMode.setAccessible(false);
for (int i = 0; i < menuView.getChildCount(); i++) {
BottomNavigationItemView item = (BottomNavigationItemView) menuView.getChildAt(i);
//noinspection RestrictedApi
item.setShiftingMode(false);
// set once again checked value, so view will be updated
//noinspection RestrictedApi
item.setChecked(item.getItemData().isChecked());
}
} catch (NoSuchFieldException e) {
Log.e("BottomNav", "Unable to get shift mode field", e);
} catch (IllegalAccessException e) {
Log.e("BottomNav", "Unable to change value of shift mode", e);
}
}
}
|
[
"32545917+phuongbkatp@users.noreply.github.com"
] |
32545917+phuongbkatp@users.noreply.github.com
|
d5bc23365fecb17445ad2d35495f0abf3f4cbaef
|
17e8438486cb3e3073966ca2c14956d3ba9209ea
|
/getAll/community/code/base/dso-crash-tests/tests.system/com/tctest/ConcurrentLockSystemTest.java
|
dbbc948224e87f269e85469f2988cb0b01a311ef
|
[] |
no_license
|
sirinath/Terracotta
|
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
|
00a7662b9cf530dfdb43f2dd821fa559e998c892
|
refs/heads/master
| 2021-01-23T05:41:52.414211
| 2015-07-02T15:21:54
| 2015-07-02T15:21:54
| 38,613,711
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,286
|
java
|
/*
* All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright
* notice. All rights reserved.
*/
package com.tctest;
import com.tc.config.schema.setup.TestConfigurationSetupManagerFactory;
import com.tc.test.restart.RestartTestHelper;
public class ConcurrentLockSystemTest extends TransparentTestBase {
private final int globalParticipantCount = 5;
private final int intensity = 1;
public ConcurrentLockSystemTest() {
super();
}
@Override
protected void customerizeRestartTestHelper(RestartTestHelper helper) {
super.customerizeRestartTestHelper(helper);
helper.getServerCrasherConfig().setRestartInterval(60 * 1000);
}
@Override
protected Class getApplicationClass() {
return ConcurrentLockSystemTestApp.class;
}
@Override
public void doSetUp(TransparentTestIface t) throws Exception {
t.getTransparentAppConfig().setClientCount(globalParticipantCount).setIntensity(intensity);
t.initializeTestRunner();
}
@Override
protected void setupConfig(TestConfigurationSetupManagerFactory configFactory) {
configFactory.setGCVerbose(true);
configFactory.setGCIntervalInSec(10);
}
@Override
protected boolean canRunCrash() {
return true;
}
}
|
[
"amaheshw@7fc7bbf3-cf45-46d4-be06-341739edd864"
] |
amaheshw@7fc7bbf3-cf45-46d4-be06-341739edd864
|
65916bb4dc9f9f9cf7cde98f4831b638f7f7b6e2
|
028cbe18b4e5c347f664c592cbc7f56729b74060
|
/external/modules/ant/1.6.5/src/main/org/apache/tools/ant/UnsupportedAttributeException.java
|
7b0328499fa91f72bc57028da1f3d327662d6dbe
|
[
"Apache-1.1",
"Apache-2.0",
"BSD-2-Clause",
"SAX-PD",
"LicenseRef-scancode-unknown-license-reference",
"W3C-19980720",
"W3C"
] |
permissive
|
dmatej/Glassfish-SVN-Patched
|
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
|
269e29ba90db6d9c38271f7acd2affcacf2416f1
|
refs/heads/master
| 2021-05-28T12:55:06.267463
| 2014-11-11T04:21:44
| 2014-11-11T04:21:44
| 23,610,469
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,384
|
java
|
/*
* Copyright 2004-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.tools.ant;
/**
* Used to report attempts to set an unsupported attribute
*
* @since Ant 1.6.3
*/
public class UnsupportedAttributeException extends BuildException {
private String attribute;
/**
* Constructs an unsupported attribute exception.
* @param msg The string containing the message.
* @param attribute The unsupported attribute.
*/
public UnsupportedAttributeException(String msg, String attribute) {
super(msg);
this.attribute = attribute;
}
/**
* Get the attribute that is wrong.
*
* @return the attribute name.
*/
public String getAttribute() {
return attribute;
}
}
|
[
"snajper@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] |
snajper@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
|
dc1ffe4c7d8475a8b1c27eb075ef06220e3b7371
|
d383eae25299467f33a15d606fdcf91e56fc3967
|
/xml/src/main/java/org/tipprunde/model/ws/openliga/GetMatchdataByLeagueDateTimeResponse.java
|
41e30c69003884dbf536b0e84d6132ba04b63e86
|
[] |
no_license
|
thorsten-k/tipprunde
|
6dc11424064d867c6009b8359d9e862c22a8767c
|
4bbc99784e642f88e46b58ee1ae92b380a2c2c25
|
refs/heads/master
| 2023-04-30T07:31:59.169857
| 2023-04-19T11:52:53
| 2023-04-19T11:52:53
| 71,550,240
| 0
| 0
| null | 2021-08-22T06:12:09
| 2016-10-21T09:20:05
|
Java
|
UTF-8
|
Java
| false
| false
| 1,869
|
java
|
package org.tipprunde.model.ws.openliga;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="GetMatchdataByLeagueDateTimeResult" type="{http://msiggi.de/Sportsdata/Webservices}ArrayOfMatchdata" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"getMatchdataByLeagueDateTimeResult"
})
@XmlRootElement(name = "GetMatchdataByLeagueDateTimeResponse")
public class GetMatchdataByLeagueDateTimeResponse {
@XmlElement(name = "GetMatchdataByLeagueDateTimeResult")
protected ArrayOfMatchdata getMatchdataByLeagueDateTimeResult;
/**
* Gets the value of the getMatchdataByLeagueDateTimeResult property.
*
* @return
* possible object is
* {@link ArrayOfMatchdata }
*
*/
public ArrayOfMatchdata getGetMatchdataByLeagueDateTimeResult() {
return getMatchdataByLeagueDateTimeResult;
}
/**
* Sets the value of the getMatchdataByLeagueDateTimeResult property.
*
* @param value
* allowed object is
* {@link ArrayOfMatchdata }
*
*/
public void setGetMatchdataByLeagueDateTimeResult(ArrayOfMatchdata value) {
this.getMatchdataByLeagueDateTimeResult = value;
}
}
|
[
"t.kisner@web.de"
] |
t.kisner@web.de
|
9581690a79c68775860843be7f66bc7a6c836fab
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/3/org/jfree/chart/LegendItem_getLineStroke_879.java
|
c663358e39b8a147c28c2da5b2e65c2baf7bd9db
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,399
|
java
|
org jfree chart
temporari storag object record properti legend item
consider layout issu
legend item legenditem cloneabl serializ
return line stroke seri
stroke code code
stroke line stroke getlinestrok
line stroke linestrok
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
4bf41c829e6147f1c36e06b362ae0d77c086a062
|
0a6773e906928f83969cf609a49e55bb472f4e21
|
/domain/main/src/main/java/com/netfinworks/site/domain/domain/info/Role.java
|
f85fd7ba6c77aa4eebfd713c8b0cb9b6e8666e80
|
[] |
no_license
|
tasfe/site-platform-root
|
ec078effb6509e5d2d2b2cd9722f986dd0d939dd
|
c366916d96289beb624b633283880b8bb94452b4
|
refs/heads/master
| 2021-01-15T08:19:19.176225
| 2017-02-28T05:37:11
| 2017-02-28T05:37:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,377
|
java
|
package com.netfinworks.site.domain.domain.info;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
/**
* <p>角色</p>
* @author eric
* @version $Id: Role.java, v 0.1 2013-7-16 下午7:14:35 Exp $
*/
public class Role {
/** 代码 */
private String code;
/** 名称 */
private String name;
/** 描述 */
private String description;
/** 是否可用 */
private boolean enable;
/** 备注 */
private String memo;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public boolean isEnable() {
return enable;
}
public void setEnable(boolean enable) {
this.enable = enable;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
}
|
[
"zhangweijieit@sina.com"
] |
zhangweijieit@sina.com
|
ba9baa7e260a52007183c35aaafb6c7d282b4401
|
6811fd178ae01659b5d207b59edbe32acfed45cc
|
/jira-project/jira-components/jira-tests-parent/jira-tests-unit/src/test/java/com/atlassian/jira/bc/issue/watcher/TestAutoWatchService.java
|
1cf19caac485c18925bece1f505b21b26b88be55
|
[] |
no_license
|
xiezhifeng/mysource
|
540b09a1e3c62614fca819610841ddb73b12326e
|
44f29e397a6a2da9340a79b8a3f61b3d51e331d1
|
refs/heads/master
| 2023-04-14T00:55:23.536578
| 2018-04-19T11:08:38
| 2018-04-19T11:08:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,388
|
java
|
package com.atlassian.jira.bc.issue.watcher;
import com.atlassian.event.api.EventPublisher;
import com.atlassian.jira.config.properties.ApplicationProperties;
import com.atlassian.jira.event.issue.IssueEvent;
import com.atlassian.jira.event.type.EventType;
import com.atlassian.jira.issue.comments.Comment;
import com.atlassian.jira.issue.comments.MockComment;
import com.atlassian.jira.junit.rules.AvailableInContainer;
import com.atlassian.jira.junit.rules.MockitoMocksInContainer;
import com.atlassian.jira.mock.issue.MockIssue;
import com.atlassian.jira.user.ApplicationUser;
import com.atlassian.jira.user.ApplicationUsers;
import com.atlassian.jira.user.MockApplicationUser;
import com.atlassian.jira.user.preferences.ExtendedPreferences;
import com.atlassian.jira.user.preferences.PreferenceKeys;
import com.atlassian.jira.user.preferences.UserPreferencesManager;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.RuleChain;
import org.mockito.Mock;
import org.mockito.Mockito;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
public class TestAutoWatchService
{
@Rule public final RuleChain mocksInContainer = MockitoMocksInContainer.forTest(this);
@Mock private EventPublisher eventPublisher;
@Mock private WatcherService watcherService;
@Mock private UserPreferencesManager userPreferencesManager;
@Mock private ExtendedPreferences preferences;
@Mock
@AvailableInContainer
private ApplicationProperties applicationProperties;
@Before
public void setUp() throws Exception
{
when(watcherService.isWatchingEnabled()).thenReturn(true);
}
@Test
public void testIssueCreatedIsAutowatched()
{
isAutowatchEvent(true, EventType.ISSUE_CREATED_ID);
}
@Test
public void testIssueCommentedIsAutowatched()
{
isAutowatchEvent(true, EventType.ISSUE_COMMENTED_ID);
}
@Test
public void testIssueUpdatedIsNotAutowatched()
{
isAutowatchEvent(false, EventType.ISSUE_UPDATED_ID);
}
@Test
public void testIssueUpdatedWithCommentIsAutowatched()
{
isAutowatchEvent(true, EventType.ISSUE_UPDATED_ID, new MockComment("", ""));
}
@Test
public void testIsEnabledWhenFalseSetting()
{
when(preferences.getBoolean(PreferenceKeys.USER_AUTOWATCH_DISABLED)).thenReturn(false);
isAutowatchEvent(true);
}
@Test
public void testNullUser()
{
isAutowatchEvent(false, null, null, null);
}
@Test
public void testIsEnabledWhenGlobalSettingIsEnabledAndUserSettingIsNotSet()
{
isAutowatchEnabled(true, true, null);
}
@Test
public void testIsEnabledWhenGlobalSettingIsDisabledAndUserSettingIsNotSet()
{
isAutowatchEnabled(false, false, null);
}
@Test
public void testIsEnabledWhenGlobalSettingIsSetAndUserSettingIsEnabled()
{
isAutowatchEnabled(true, false, true);
}
@Test
public void testIsEnabledWhenGlobalSettingIsSetAndUserSettingIsDisabled()
{
isAutowatchEnabled(false, true, false);
}
private void isAutowatchEvent(boolean expected)
{
isAutowatchEvent(expected, EventType.ISSUE_COMMENTED_ID);
}
private void isAutowatchEvent(boolean expected, Long eventType)
{
isAutowatchEvent(expected, eventType, null);
}
private void isAutowatchEvent(boolean expected, Long eventType, Comment comment)
{
isAutowatchEvent(expected, eventType, comment, new MockApplicationUser("user"));
}
private void isAutowatchEvent(boolean expected, Long eventType, Comment comment, ApplicationUser user)
{
final IssueEvent event = new IssueEvent(new MockIssue(), ApplicationUsers.toDirectoryUser(user), comment, null, null, null, eventType);
when(userPreferencesManager.getExtendedPreferences(user)).thenReturn(preferences);
new AutoWatchService(eventPublisher, watcherService, userPreferencesManager).onIssueEvent(event);
verify(watcherService, times(expected ? 1 : 0)).addWatcher(event.getIssue(), event.getUser(), event.getUser());
}
private void isAutowatchEnabled(boolean expected, boolean appAutoWatch, Boolean userAutoWatch)
{
final ApplicationUser user = new MockApplicationUser("user");
final ExtendedPreferences userPreferences = Mockito.mock(ExtendedPreferences.class);
if (userAutoWatch != null)
{
when(userPreferences.containsValue(PreferenceKeys.USER_AUTOWATCH_DISABLED)).thenReturn(true);
when(userPreferences.getBoolean(PreferenceKeys.USER_AUTOWATCH_DISABLED)).thenReturn(!userAutoWatch);
}
else
{
when(userPreferences.containsValue(PreferenceKeys.USER_AUTOWATCH_DISABLED)).thenReturn(false);
}
when(userPreferencesManager.getExtendedPreferences(user)).thenReturn(userPreferences);
when(applicationProperties.getOption(PreferenceKeys.USER_AUTOWATCH_DISABLED)).thenReturn(!appAutoWatch);
final AutoWatchService autoWatchService = new AutoWatchService(eventPublisher, watcherService, userPreferencesManager);
Assert.assertEquals(expected, autoWatchService.isAutoWatchEnabledForUser(user.getDirectoryUser()));
}
}
|
[
"moink635@gmail.com"
] |
moink635@gmail.com
|
080525a289361306e8d37d1de996836b653bc0ea
|
0eb9fbd5344e657e9ef0e54451a0bf1b471f8455
|
/test/com/test/file/PB_TEST.java
|
07df52cb3ed4a1e1d0708563a29726c4367d1e69
|
[] |
no_license
|
chenyuguxing/utils
|
aff0eda60ed2684845671148bd34b2cf626ae8c5
|
117d652ba566c747cfffe67921f1a83afedbbfc6
|
refs/heads/master
| 2016-09-15T16:41:25.311949
| 2016-04-23T07:28:41
| 2016-04-23T07:28:41
| 42,515,739
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 141
|
java
|
package com.test.file;
public class PB_TEST {
public static void main(String[] args) {
System.out.println("this is my first java");
}
}
|
[
"chenyuguxing@163.com"
] |
chenyuguxing@163.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.