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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c4bf93fa6aa0c99329d7261eda96cdf42f96a1ef
|
a8ecc1424182200da5769f361ea6cc6496a0db79
|
/app/src/main/java/com/footballcitymobileandroid/Controller/Club/ClubNumberPlace.java
|
cf889fa91795f1c528856b2baedf5a5bc6072771
|
[] |
no_license
|
tempest1/FootballCityMobileAndroid
|
c74cdf9c4ffd43866efd4717d172a4513ae10b4e
|
d44d74659d295392660a60d1f72f76b4bd7f9ad6
|
refs/heads/master
| 2020-05-30T08:44:57.736963
| 2016-09-22T07:37:09
| 2016-09-22T07:37:09
| 68,896,455
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,199
|
java
|
package com.footballcitymobileandroid.Controller.Club;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.footballcitymobileandroid.BLL.Adapter.ClubAdapter.ClubNumberPlaceAdapter;
import com.footballcitymobileandroid.BLL.Interface.ActionCallBackListener;
import com.footballcitymobileandroid.BLL.Interface.AppAction;
import com.footballcitymobileandroid.BLL.Interface.Factory;
import com.footballcitymobileandroid.DAL.Data.LogUtil.LogUtils;
import com.footballcitymobileandroid.DAL.Data.Uri.Params;
import com.footballcitymobileandroid.Entity.Base.BaseEntity;
import com.footballcitymobileandroid.Entity.ClubEntity.club.ClubList;
import com.footballcitymobileandroid.Entity.ClubEntity.club.ClubMemb;
import com.footballcitymobileandroid.R;
import java.io.Serializable;
import java.util.List;
/**
* Created by zhoudi on 16/6/27.
*/
public class ClubNumberPlace extends Activity implements View.OnClickListener{
int times;
Button back;
Intent intent;
Bundle bunder;
TextView add_door,add_later,add_center,add_leader,detail_title_center;
ClubNumberPlaceAdapter leaderAdapter,doorAdapter,centerAdapter,laterAdapter;
ClubList clubList;
List<ClubMemb> clubMemb;
private ListView door_list,later_list,center_list,head_list,null_list;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.club_number_place);
init();
}
@Override
protected void onStart() {
super.onStart();
if (times!=0)
{
doit_checkClubMemb();
}
times++;
}
private void setAdapter()
{
leaderAdapter=new ClubNumberPlaceAdapter(this,clubMemb,"1");//前锋
doorAdapter=new ClubNumberPlaceAdapter(this,clubMemb,"4");//门将
centerAdapter=new ClubNumberPlaceAdapter(this,clubMemb,"2");//中锋
laterAdapter=new ClubNumberPlaceAdapter(this,clubMemb,"3");//后卫
door_list.setAdapter(doorAdapter);
center_list.setAdapter(centerAdapter);
later_list.setAdapter(laterAdapter);
head_list.setAdapter(leaderAdapter);
}
private void init()
{
times=0;
clubList= (ClubList) getIntent().getSerializableExtra("clublist"); //本俱乐部信息
clubMemb= (List<ClubMemb>) getIntent().getSerializableExtra("clubmemb"); //成员信息
back=(Button)findViewById(R.id.back);
back.setOnClickListener(this);
add_door=(TextView)findViewById(R.id.add_door);
add_later=(TextView)findViewById(R.id.add_later);
add_center=(TextView)findViewById(R.id.add_center);
add_leader=(TextView)findViewById(R.id.add_leader);
add_door.setOnClickListener(this);
add_later.setOnClickListener(this);
add_center.setOnClickListener(this);
add_leader.setOnClickListener(this);
detail_title_center=(TextView)findViewById(R.id.detail_title_center);
detail_title_center.setText("球员位置信息");
door_list=(ListView)findViewById(R.id.door_list);
later_list=(ListView)findViewById(R.id.later_list);
center_list=(ListView)findViewById(R.id.center_list);
head_list=(ListView)findViewById(R.id.head_list);
for (int i=0;i<clubMemb.size();i++) {
LogUtils.e(clubMemb.get(i).toString());
}
setAdapter();
}
@Override
public void onBackPressed() {
super.onBackPressed();
overridePendingTransition(R.anim.in_from_left, R.anim.out_from_right);
}
Bundle bundle=new Bundle();
@Override
public void onClick(View v) {
switch (v.getId())
{
case R.id.back:
this.finish();
overridePendingTransition(R.anim.in_from_left,R.anim.out_from_right);
break;
case R.id.add_door:
intent = new Intent();
intent.setClass(this, ClubNumberPlaceChoose.class);
bundle.putSerializable("clubList",clubList);
bundle.putSerializable("clubMemb", (Serializable) clubMemb);
bundle.putSerializable("position","4");
// bunder = new Bundle();
// bunder.putString("title", "门将");
intent.putExtras( bundle );
startActivity(intent);
overridePendingTransition(R.anim.in_from_right, R.anim.out_from_left);
break;
case R.id.add_later:
intent = new Intent();
intent.setClass(this, ClubNumberPlaceChoose.class);
// Bundle bundle = new Bundle();
// bundle.putSerializable("club", data);
// intent.putExtras(bundle);
// Bundle bundles=new Bundle();
bundle.putSerializable("clubList",clubList);
bundle.putSerializable("clubMemb", (Serializable) clubMemb);
bundle.putSerializable("position","3");
// bunder= new Bundle();
// bunder.putString("title", "后卫");
intent.putExtras( bundle );
startActivity(intent);
overridePendingTransition(R.anim.in_from_right, R.anim.out_from_left);
break;
case R.id.add_center:
intent = new Intent();
intent.setClass(this, ClubNumberPlaceChoose.class);
// Bundle bundle = new Bundle();
// bundle.putSerializable("club", data);
// intent.putExtras(bundle);
// bunder= new Bundle();
// bunder.putString("title", "中场");
// intent.putExtras( bunder );
bundle.putSerializable("clubList",clubList);
bundle.putSerializable("clubMemb", (Serializable) clubMemb);
bundle.putSerializable("position","2");
intent.putExtras( bundle );
startActivity(intent);
overridePendingTransition(R.anim.in_from_right, R.anim.out_from_left);
break;
case R.id.add_leader:
intent = new Intent();
intent.setClass(this, ClubNumberPlaceChoose.class);
// Bundle bundle = new Bundle();
// bundle.putSerializable("club", data);
// intent.putExtras(bundle);
// bunder= new Bundle();
// bunder.putString("title", "前锋");
// intent.putExtras( bunder );
bundle.putSerializable("clubList",clubList);
bundle.putSerializable("clubMemb", (Serializable) clubMemb);
bundle.putSerializable("position","1");
intent.putExtras( bundle );
startActivity(intent);
overridePendingTransition(R.anim.in_from_right, R.anim.out_from_left);
break;
}
}
private void doit_checkClubMemb(){
AppAction appAction= Factory.createAppActionImpl(this);
appAction.fc_checkClubMemb(clubList.getClubID(), Params.fc_checkClubMemb,clublisten);
}
public ActionCallBackListener<BaseEntity<ClubMemb>> clublisten=new ActionCallBackListener<BaseEntity<ClubMemb>>(){
/**
* 处理成功
*
* @param data 返回数据
*/
@Override
public void onSuccess(BaseEntity<ClubMemb> data) {
clubMemb=data.getResponse().getClubMemb();
Toast toast = Toast.makeText(getApplicationContext(), "俱乐部球员信息获取成功", Toast.LENGTH_LONG);
setAdapter();
toast.show();
}
/**
* 请求失败
*
* @param e_Type 错误码
* @param e_Msg 错误详情
*/
@Override
public void onFailure(String e_Type, String e_Msg) {
Toast toast = Toast.makeText(getApplicationContext(), "俱乐部球员信息"+e_Msg, Toast.LENGTH_LONG);
toast.show();
}
};
}
|
[
"505675592@qq.com"
] |
505675592@qq.com
|
a03b3478c63199a1cc68357fdb1724b730da1fd1
|
2efce0a208bbf13942e9e8205da44ecfc4055e58
|
/Java-8/src/cn/ccsu/functioninterface/Main.java
|
0d04e2e8a1c97c61357ae68e2d485fdb36690147
|
[] |
no_license
|
ZanderYan-cloud/MyProject
|
8226c7f64469eb98df64b3c5e05c5e96601ad71d
|
11a451ae3f7bbe03e7ac710fe7c7eee2d1881fe7
|
refs/heads/master
| 2021-09-15T11:41:33.401772
| 2018-05-31T12:59:29
| 2018-05-31T12:59:29
| 104,723,868
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 248
|
java
|
package cn.ccsu.functioninterface;
public class Main {
public static void main(String[] args) {
IHandler h = (x)->(x*x*x);
System.out.println(h.getValue(100));
System.out.println(new Double[0].getClass().getSuperclass());
}
}
|
[
"913010012@qq.com"
] |
913010012@qq.com
|
d88aba16c8eb892a984911caaead7ff1d2e71c29
|
939eca99c5b48cc2c15b9699e6cbb0f13c8ce6d5
|
/DatBot.ProtocolBuilder/Utils/types/game/presets/CharacterCharacteristicForPreset.java
|
8b33274398928fa4fcfe0f00ba33d055ab6c1db4
|
[
"MIT"
] |
permissive
|
ProjectBlackFalcon/DatBot
|
032a2ec70725ed497556480fd2d10907347dce69
|
1dd1af94c550272417a4b230e805988698cfbf3c
|
refs/heads/master
| 2022-07-22T11:01:58.837303
| 2022-07-12T09:10:30
| 2022-07-12T09:10:30
| 111,686,347
| 7
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,281
|
java
|
package protocol.network.types.game.presets;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import protocol.utils.ProtocolTypeManager;
import protocol.network.util.types.BooleanByteWrapper;
import protocol.network.NetworkMessage;
import protocol.network.util.DofusDataReader;
import protocol.network.util.DofusDataWriter;
import protocol.network.Network;
import protocol.network.types.game.presets.SimpleCharacterCharacteristicForPreset;
@SuppressWarnings("unused")
public class CharacterCharacteristicForPreset extends SimpleCharacterCharacteristicForPreset {
public static final int ProtocolId = 539;
private int stuff;
public int getStuff() { return this.stuff; }
public void setStuff(int stuff) { this.stuff = stuff; };
public CharacterCharacteristicForPreset(){
}
public CharacterCharacteristicForPreset(int stuff){
this.stuff = stuff;
}
@Override
public void Serialize(DofusDataWriter writer) {
try {
super.Serialize(writer);
writer.writeVarShort(this.stuff);
} catch (Exception e){
e.printStackTrace();
}
}
@Override
public void Deserialize(DofusDataReader reader) {
try {
super.Deserialize(reader);
this.stuff = reader.readVarShort();
} catch (Exception e){
e.printStackTrace();
}
}
}
|
[
"baptiste.beduneau@reseau.eseo.fr"
] |
baptiste.beduneau@reseau.eseo.fr
|
bf21206fb99e8463a09bc0f9549028d4c5e72b8b
|
47798511441d7b091a394986afd1f72e8f9ff7ab
|
/src/main/java/com/alipay/api/domain/AntMerchantExpandIndirectTiansuoQueryModel.java
|
6888e63f2340f128626dbf37b8d6f182c62fcdda
|
[
"Apache-2.0"
] |
permissive
|
yihukurama/alipay-sdk-java-all
|
c53d898371032ed5f296b679fd62335511e4a310
|
0bf19c486251505b559863998b41636d53c13d41
|
refs/heads/master
| 2022-07-01T09:33:14.557065
| 2020-05-07T11:20:51
| 2020-05-07T11:20:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 713
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 间连天梭查询接口
*
* @author auto create
* @since 1.0, 2019-08-13 12:56:31
*/
public class AntMerchantExpandIndirectTiansuoQueryModel extends AlipayObject {
private static final long serialVersionUID = 4438598972358652855L;
/**
* 间连商户入驻时填写的营业执照号
*/
@ApiField("business_license_no")
private String businessLicenseNo;
public String getBusinessLicenseNo() {
return this.businessLicenseNo;
}
public void setBusinessLicenseNo(String businessLicenseNo) {
this.businessLicenseNo = businessLicenseNo;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
37947331e6fa28d672143523daed11badbae51fc
|
70c968df577bc62647ca5ae5d78f85113a30d572
|
/java/core/day5-demos/src/main/java/com/revature/abstractions/Animal.java
|
44616c049a4759ccb66186ba42a1a266c3c1e30b
|
[] |
no_license
|
200727-java-ng-usf/demos
|
b65323584a24d437722ce13bba80f7aaad03ae1b
|
86e190137e15a104b4cd148a9cd82e73929d131e
|
refs/heads/master
| 2023-06-03T17:13:49.061610
| 2021-06-04T22:26:55
| 2021-06-04T22:26:55
| 282,066,419
| 0
| 0
| null | 2020-09-17T21:02:32
| 2020-07-23T22:10:53
|
Java
|
UTF-8
|
Java
| false
| false
| 1,631
|
java
|
package com.revature.abstractions;
/*
Abstract classes
- Cannot be instantiated directly, must be have a concrete implementation
by means of one or more subclasses.
+ all abstract methods must be implemented by concrete subclasses
- Still has constructors, because subclasses will leverage these for their own
instantiation.
- Can have zero or more abstract methods contained within its declaration
+ abstract methods are simply methods that do not have an implementation,
also called "method stubs"
*/
public abstract class Animal {
public int numberOfLives = 1;
// protected declarations are visible to any class in the same package, and subclasses anywhere in the app
protected String value = "some value";
// package-private ("default access") declarations are only visible to types in the same package
String thing;
public Animal() {
super();
System.out.println("Animal constructor called!");
}
public Animal(int lives) {
numberOfLives = lives;
}
public void exist() {
System.out.println("The animal exists...");
}
// concrete method, meaning it has an implementation; not required to be overridden
// by subclasses - though they can if they choose (unless declared final)
public int getNumberOfLives() {
return numberOfLives;
}
// abstract method, also known as a method stub; all concrete subclasses will be
// required to override this method to provide a implementation.
public abstract void makeSound();
}
|
[
"wezley.singleton@gmail.com"
] |
wezley.singleton@gmail.com
|
61c50c0f7ebd13a3859b78de70008bbf4cfb378a
|
04b1803adb6653ecb7cb827c4f4aa616afacf629
|
/chrome/android/java/src/org/chromium/chrome/browser/preferences/developer/TracingCategoriesPreferences.java
|
8f2e47149bd64f5f37197cdf73f7c37541229998
|
[
"BSD-3-Clause"
] |
permissive
|
Samsung/Castanets
|
240d9338e097b75b3f669604315b06f7cf129d64
|
4896f732fc747dfdcfcbac3d442f2d2d42df264a
|
refs/heads/castanets_76_dev
| 2023-08-31T09:01:04.744346
| 2021-07-30T04:56:25
| 2021-08-11T05:45:21
| 125,484,161
| 58
| 49
|
BSD-3-Clause
| 2022-10-16T19:31:26
| 2018-03-16T08:07:37
| null |
UTF-8
|
Java
| false
| false
| 3,279
|
java
|
// Copyright 2018 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.preferences.developer;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference;
import org.chromium.chrome.browser.preferences.PreferenceUtils;
import org.chromium.chrome.browser.tracing.TracingController;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* Settings fragment that configures chrome tracing categories of a specific type. The type is
* passed to the fragment via an extra (EXTRA_CATEGORY_TYPE).
*/
public class TracingCategoriesPreferences
extends PreferenceFragment implements Preference.OnPreferenceChangeListener {
public static final String EXTRA_CATEGORY_TYPE = "type";
private @TracingPreferences.CategoryType int mType;
private Set<String> mEnabledCategories;
// Non-translated strings:
private static final String MSG_CATEGORY_SELECTION_TITLE = "Select categories";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActivity().setTitle(MSG_CATEGORY_SELECTION_TITLE);
PreferenceUtils.addPreferencesFromResource(this, R.xml.blank_preference_fragment_screen);
getPreferenceScreen().setOrderingAsAdded(true);
mType = getArguments().getInt(EXTRA_CATEGORY_TYPE);
mEnabledCategories = new HashSet<>(TracingPreferences.getEnabledCategories(mType));
List<String> sortedCategories =
new ArrayList<>(TracingController.getInstance().getKnownCategories());
Collections.sort(sortedCategories);
for (String category : sortedCategories) {
if (TracingPreferences.getCategoryType(category) == mType) createPreference(category);
}
}
private void createPreference(String category) {
CheckBoxPreference preference = new ChromeBaseCheckBoxPreference(getActivity(), null);
preference.setKey(category);
preference.setTitle(category.startsWith(TracingPreferences.NON_DEFAULT_CATEGORY_PREFIX)
? category.substring(
TracingPreferences.NON_DEFAULT_CATEGORY_PREFIX.length())
: category);
preference.setChecked(mEnabledCategories.contains(category));
preference.setPersistent(false); // We persist the preference value ourselves.
preference.setOnPreferenceChangeListener(this);
getPreferenceScreen().addPreference(preference);
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
boolean value = (boolean) newValue;
if (value) {
mEnabledCategories.add(preference.getKey());
} else {
mEnabledCategories.remove(preference.getKey());
}
TracingPreferences.setEnabledCategories(mType, mEnabledCategories);
return true;
}
}
|
[
"sunny.nam@samsung.com"
] |
sunny.nam@samsung.com
|
8050b32d1b9c573eda0cca836a36efb291fffdc0
|
5e58d4baa556388b027dce852d65c7cd0dec3856
|
/citychoose/src/main/java/com/hbb/coder/citychoose/adapter/GridListAdapter.java
|
c5c759cdebdef2a108d860680f6372509a88eeed
|
[] |
no_license
|
StoneBang/RunningApp
|
0b45dca58ac25a67df925d6131cd54345cd23801
|
df0ca825ae9e45c587e4ba14bb6dd33a344af4b7
|
refs/heads/master
| 2021-04-09T14:27:05.429767
| 2018-06-09T02:19:33
| 2018-06-09T02:19:33
| 125,604,949
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,223
|
java
|
package com.hbb.coder.citychoose.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;
import com.hbb.coder.citychoose.R;
import com.hbb.coder.citychoose.bean.City;
import com.hbb.coder.citychoose.bean.HotCity;
import com.hbb.coder.citychoose.listener.InnerListener;
import java.util.List;
/**
*/
public class GridListAdapter extends RecyclerView.Adapter<GridListAdapter.GridViewHolder>{
public static final int SPAN_COUNT = 3;
private Context mContext;
private List<HotCity> mData;
private InnerListener mInnerListener;
public GridListAdapter(Context context, List<HotCity> data) {
this.mContext = context;
this.mData = data;
}
@Override
public GridViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(mContext).inflate(R.layout.cp_grid_item_layout, parent,
false);
return new GridViewHolder(view);
}
@Override
public void onBindViewHolder(GridViewHolder holder, int position) {
final int pos = holder.getAdapterPosition();
final City data = mData.get(pos);
if (data == null){
return;
}
//设置item宽高
DisplayMetrics dm = mContext.getResources().getDisplayMetrics();
int screenWidth = dm.widthPixels;
TypedValue typedValue = new TypedValue();
mContext.getTheme().resolveAttribute(R.attr.cpGridItemSpace, typedValue, true);
int space = mContext.getResources().getDimensionPixelSize(typedValue.resourceId);
int padding = mContext.getResources().getDimensionPixelSize(R.dimen.cp_default_padding);
int indexBarWidth = mContext.getResources().getDimensionPixelSize(R.dimen.cp_index_bar_width);
int itemWidth = (screenWidth - padding - space * (SPAN_COUNT - 1) - indexBarWidth) / SPAN_COUNT;
ViewGroup.LayoutParams lp = holder.container.getLayoutParams();
lp.width = itemWidth;
lp.height = ViewGroup.LayoutParams.WRAP_CONTENT;
holder.container.setLayoutParams(lp);
holder.name.setText(data.getName());
holder.container.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mInnerListener != null){
mInnerListener.dismiss(pos, data);
}
}
});
}
@Override
public int getItemCount() {
return mData == null ? 0 : mData.size();
}
public static class GridViewHolder extends RecyclerView.ViewHolder{
FrameLayout container;
TextView name;
public GridViewHolder(View itemView) {
super(itemView);
container = itemView.findViewById(R.id.cp_grid_item_layout);
name = itemView.findViewById(R.id.cp_gird_item_name);
}
}
public void setInnerListener(InnerListener listener){
this.mInnerListener = listener;
}
}
|
[
"111111"
] |
111111
|
307ebfdf7ce186b74eab76fb41e5513cb6997463
|
7ab26d4bc788b5d437cb69992ea94b56a4899b6c
|
/jPSICS/src/org/catacomb/interlish/service/ScriptInfo.java
|
09731c33ec0d8a3c0a3bae6f441ccf4ce6a3ace7
|
[] |
no_license
|
MattNolanLab/PSICS
|
d8e777d9a18e332231de244c23431b34c655cfa5
|
68b4f17e9aef2e6c7ca3c23da2a175eeaeb7251f
|
refs/heads/master
| 2021-05-27T02:01:24.747112
| 2014-05-13T16:19:21
| 2014-05-13T16:19:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 200
|
java
|
package org.catacomb.interlish.service;
import java.io.File;
public interface ScriptInfo {
public boolean hasTypeScripts(File fxml);
public boolean hasModelScripts(File fxml);
}
|
[
"robert@textensor.com"
] |
robert@textensor.com
|
9d294785232e611a2b1381dbc96c2dcbe6cd34e4
|
67a1b5e8dc998ce3594c1c3bb2ec89c30850dee7
|
/GooglePlay6.0.5/app/src/main/java/com/google/android/finsky/download/DownloadQueue.java
|
08ad98785827b32890245c2a8c14e59c735293fd
|
[
"Apache-2.0"
] |
permissive
|
matrixxun/FMTech
|
4a47bd0bdd8294cc59151f1bffc6210567487bac
|
31898556baad01d66e8d87701f2e49b0de930f30
|
refs/heads/master
| 2020-12-29T01:31:53.155377
| 2016-01-07T04:39:43
| 2016-01-07T04:39:43
| 49,217,400
| 2
| 0
| null | 2016-01-07T16:51:44
| 2016-01-07T16:51:44
| null |
UTF-8
|
Java
| false
| false
| 1,328
|
java
|
package com.google.android.finsky.download;
import android.net.Uri;
import java.util.List;
public abstract interface DownloadQueue
{
public abstract void add(Download paramDownload);
public abstract void addListener(DownloadQueueListener paramDownloadQueueListener);
public abstract void addRecoveredDownload(Download paramDownload);
public abstract void cancel(Download paramDownload);
public abstract Download getByPackageName(String paramString1, String paramString2);
public abstract Download getDownloadByContentUri(Uri paramUri);
public abstract DownloadManagerFacade getDownloadManager();
public abstract List<DownloadProgress> getRunningDownloads();
public abstract void notifyClicked(Download paramDownload);
public abstract void notifyProgress(Download paramDownload, DownloadProgress paramDownloadProgress);
public abstract void release(Uri paramUri);
public abstract void removeListener(DownloadQueueListener paramDownloadQueueListener);
public abstract void setDownloadState(Download paramDownload, int paramInt);
}
/* Location: F:\apktool\apktool\Google_Play_Store6.0.5\classes-dex2jar.jar
* Qualified Name: com.google.android.finsky.download.DownloadQueue
* JD-Core Version: 0.7.0.1
*/
|
[
"jiangchuna@126.com"
] |
jiangchuna@126.com
|
aa3bfcecb03462e35b1f17626c4f95607fed301c
|
1b90d937fe4073fd8ee96a00440947512d8b1bba
|
/src/main/java/org/rythmengine/conf/package-info.java
|
b630827848d1b9fc4be190c2783a3e73ae8c5155
|
[
"Apache-2.0"
] |
permissive
|
nice-redbull/rythmengine
|
61a1aea6a416ad80680e89d3c9ab391ce0d965bb
|
64ec39580482345aa125785eb80925703b9d6930
|
refs/heads/master
| 2020-03-29T01:52:14.893143
| 2018-07-16T04:34:49
| 2018-07-16T04:34:49
| 149,410,973
| 0
| 0
|
Apache-2.0
| 2018-09-19T10:35:43
| 2018-09-19T07:34:55
|
Java
|
UTF-8
|
Java
| false
| false
| 312
|
java
|
/**
* Copyright (C) 2013-2016 The Rythm Engine project
* for LICENSE and other details see:
* https://github.com/rythmengine/rythmengine
*/
/**
* <a href="http://rythmengine.org/doc/developer_guide.md#Configuration">Configuration</a> classes
* <p>
* @see org.rythmengine
*/
package org.rythmengine.conf;
|
[
"wf@bitplan.com"
] |
wf@bitplan.com
|
5a45120a25a447ae8e25e9b59dbc3ce465a79681
|
8f39e073261112e6e3047fbdb34a6a210487780e
|
/hzz_core/src/main/java/com/saili/hzz/core/vo/LocalBasicDataStatsVo.java
|
e4ebf45e58912321179de0d44470f7c64549d8c1
|
[] |
no_license
|
fisher-hub/hzz
|
4c88846a8d6168027c490331c94a686ccfe08b46
|
0be1569e517c865cf265d6ff0908cf8e1b1b6973
|
refs/heads/master
| 2020-12-10T06:49:48.892278
| 2019-11-05T01:10:18
| 2019-11-05T01:10:18
| 233,527,357
| 1
| 1
| null | 2020-01-13T06:32:55
| 2020-01-13T06:32:54
| null |
UTF-8
|
Java
| false
| false
| 260
|
java
|
package com.saili.hzz.core.vo;
import com.saili.hzz.core.domain.BasicDataStatsDo;
/***
* 本级基础数据统计 vo
* @author: whuab_mc
* @date: 2019-10-07 11:25:11:25
* @version: V1.0
*/
public class LocalBasicDataStatsVo extends BasicDataStatsDo {
}
|
[
"whuab_mc@163.com"
] |
whuab_mc@163.com
|
422e85445ed9d886d7fbf0bd125974c504e87bc1
|
affe223efe18ba4d5e676f685c1a5e73caac73eb
|
/clients/webservice/src/main/java/com/vmware/vim25/VmFailedToRebootGuestEvent.java
|
60cb9e82fc2372761c3365ba29a3cf65314b809a
|
[] |
no_license
|
RohithEngu/VM27
|
486f6093e0af2f6df1196115950b0d978389a985
|
f0f4f177210fd25415c2e058ec10deb13b7c9247
|
refs/heads/master
| 2021-01-16T00:42:30.971054
| 2009-08-14T19:58:16
| 2009-08-14T19:58:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,115
|
java
|
/**
* VmFailedToRebootGuestEvent.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.vmware.vim25;
public class VmFailedToRebootGuestEvent extends com.vmware.vim25.VmEvent
implements java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private com.vmware.vim25.LocalizedMethodFault reason;
public VmFailedToRebootGuestEvent() {
}
public VmFailedToRebootGuestEvent(java.lang.String dynamicType,
com.vmware.vim25.DynamicProperty[] dynamicProperty, int key,
int chainId, java.util.Calendar createdTime,
java.lang.String userName,
com.vmware.vim25.DatacenterEventArgument datacenter,
com.vmware.vim25.ComputeResourceEventArgument computeResource,
com.vmware.vim25.HostEventArgument host,
com.vmware.vim25.VmEventArgument vm,
com.vmware.vim25.DatastoreEventArgument ds,
com.vmware.vim25.NetworkEventArgument net,
com.vmware.vim25.DvsEventArgument dvs,
java.lang.String fullFormattedMessage, java.lang.String changeTag,
boolean template, com.vmware.vim25.LocalizedMethodFault reason) {
super(dynamicType, dynamicProperty, key, chainId, createdTime,
userName, datacenter, computeResource, host, vm, ds, net, dvs,
fullFormattedMessage, changeTag, template);
this.reason = reason;
}
/**
* Gets the reason value for this VmFailedToRebootGuestEvent.
*
* @return reason
*/
public com.vmware.vim25.LocalizedMethodFault getReason() {
return reason;
}
/**
* Sets the reason value for this VmFailedToRebootGuestEvent.
*
* @param reason
*/
public void setReason(com.vmware.vim25.LocalizedMethodFault reason) {
this.reason = reason;
}
private java.lang.Object __equalsCalc = null;
@Override
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof VmFailedToRebootGuestEvent)) {
return false;
}
VmFailedToRebootGuestEvent other = (VmFailedToRebootGuestEvent) obj;
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj)
&& ((this.reason == null && other.getReason() == null) || (this.reason != null && this.reason
.equals(other.getReason())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
@Override
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getReason() != null) {
_hashCode += getReason().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
VmFailedToRebootGuestEvent.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("urn:vim25",
"VmFailedToRebootGuestEvent"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("reason");
elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25",
"reason"));
elemField.setXmlType(new javax.xml.namespace.QName("urn:vim25",
"LocalizedMethodFault"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType, java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return new org.apache.axis.encoding.ser.BeanSerializer(_javaType,
_xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType, java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return new org.apache.axis.encoding.ser.BeanDeserializer(_javaType,
_xmlType, typeDesc);
}
}
|
[
"sankarachary@intalio.com"
] |
sankarachary@intalio.com
|
128482096dcab3bf03502eba6a262cc6accbade0
|
6af93edbea8c0dd16186ae6a286b14e41fc963cd
|
/app/src/main/java/spinc/spmmvp/google_vision/ocrReader/OcrGraphic.java
|
edd237f93a297c47878aab58641f29ff4d8eee85
|
[] |
no_license
|
spdobest/android_mvp
|
88911f70c81944abcc7d130634fc6a0d89e4fe4d
|
e8e29a38a2fc37f02129a43762c597ed8a434224
|
refs/heads/master
| 2021-01-21T15:57:48.819353
| 2017-03-02T13:47:38
| 2017-03-02T13:47:38
| 81,633,129
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,049
|
java
|
/*
* Copyright (C) The Android Open Source Project
*
* 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 spinc.spmmvp.google_vision.ocrReader;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import com.google.android.gms.vision.text.Text;
import com.google.android.gms.vision.text.TextBlock;
import java.util.List;
import spinc.spmmvp.google_vision.ocrReader.ui.camera.GraphicOverlay;
/**
* Graphic instance for rendering TextBlock position, size, and ID within an associated graphic
* overlay view.
*/
public class OcrGraphic extends GraphicOverlay.Graphic {
private int mId;
private static final int TEXT_COLOR = Color.WHITE;
private static Paint sRectPaint;
private static Paint sTextPaint;
private final TextBlock mText;
OcrGraphic(GraphicOverlay overlay, TextBlock text) {
super(overlay);
mText = text;
if (sRectPaint == null) {
sRectPaint = new Paint();
sRectPaint.setColor(TEXT_COLOR);
sRectPaint.setStyle(Paint.Style.STROKE);
sRectPaint.setStrokeWidth(4.0f);
}
if (sTextPaint == null) {
sTextPaint = new Paint();
sTextPaint.setColor(TEXT_COLOR);
sTextPaint.setTextSize(54.0f);
}
// Redraw the overlay, as this graphic has been added.
postInvalidate();
}
public int getId() {
return mId;
}
public void setId(int id) {
this.mId = id;
}
public TextBlock getTextBlock() {
return mText;
}
/**
* Checks whether a point is within the bounding box of this graphic.
* The provided point should be relative to this graphic's containing overlay.
* @param x An x parameter in the relative context of the canvas.
* @param y A y parameter in the relative context of the canvas.
* @return True if the provided point is contained within this graphic's bounding box.
*/
public boolean contains(float x, float y) {
TextBlock text = mText;
if (text == null) {
return false;
}
RectF rect = new RectF(text.getBoundingBox());
rect.left = translateX(rect.left);
rect.top = translateY(rect.top);
rect.right = translateX(rect.right);
rect.bottom = translateY(rect.bottom);
return (rect.left < x && rect.right > x && rect.top < y && rect.bottom > y);
}
/**
* Draws the text block annotations for position, size, and raw value on the supplied canvas.
*/
@Override
public void draw(Canvas canvas) {
TextBlock text = mText;
if (text == null) {
return;
}
// Draws the bounding box around the TextBlock.
RectF rect = new RectF(text.getBoundingBox());
rect.left = translateX(rect.left);
rect.top = translateY(rect.top);
rect.right = translateX(rect.right);
rect.bottom = translateY(rect.bottom);
canvas.drawRect(rect, sRectPaint);
// Break the text into multiple lines and draw each one according to its own bounding box.
List<? extends Text> textComponents = text.getComponents();
for(Text currentText : textComponents) {
float left = translateX(currentText.getBoundingBox().left);
float bottom = translateY(currentText.getBoundingBox().bottom);
canvas.drawText(currentText.getValue(), left, bottom, sTextPaint);
}
}
}
|
[
"sp.dobest@gmail.com"
] |
sp.dobest@gmail.com
|
0c261fa7af84d94d9be745bcb71f40590d595d16
|
50ae1352d8f795ef05643fa4cf5234e9424a14b4
|
/spring-boot-starter-forest/src/test/java/com/dtflys/forest/springboot/test/logging/TestLogHandler.java
|
8e98d17504a164b48ce012097124595c9fd3ddc2
|
[
"MIT"
] |
permissive
|
Alexscari7/forest
|
544bb433c91808469af6a72eac84401816d3da05
|
90974391f4cbf7fe7d1c75e90945b637185eb93c
|
refs/heads/master
| 2023-02-20T12:53:59.817929
| 2021-01-08T10:29:49
| 2021-01-08T10:29:49
| 328,343,873
| 1
| 0
|
MIT
| 2021-01-10T09:14:12
| 2021-01-10T09:14:12
| null |
UTF-8
|
Java
| false
| false
| 2,337
|
java
|
package com.dtflys.forest.springboot.test.logging;
import com.dtflys.forest.http.ForestResponse;
import com.dtflys.forest.logging.DefaultLogHandler;
import com.dtflys.forest.logging.RequestLogMessage;
import com.dtflys.forest.logging.ResponseLogMessage;
import com.dtflys.forest.utils.StringUtils;
public class TestLogHandler extends DefaultLogHandler {
@Override
public void logContent(String content) {
super.logContent("[Test] " + content);
}
/**
* 该方法生成Forest请求的日志内容字符串
* @param requestLogMessage 请求日志字符串
* @return 日志内容字符串
*/
@Override
protected String requestLoggingContent(RequestLogMessage requestLogMessage) {
StringBuilder builder = new StringBuilder();
builder.append("请求: \n\t");
builder.append(retryContent(requestLogMessage));
builder.append(proxyContent(requestLogMessage));
builder.append(requestTypeChangeHistory(requestLogMessage));
builder.append(requestLogMessage.getRequestLine());
String headers = requestLoggingHeaders(requestLogMessage);
if (StringUtils.isNotEmpty(headers)) {
builder.append("\n\t请求头: \n");
builder.append(headers);
}
String body = requestLoggingBody(requestLogMessage);
if (StringUtils.isNotEmpty(body)) {
builder.append("\n\t请求体: \n");
builder.append(body);
}
return builder.toString();
}
/**
* 该方法生成Forest请求响应结果的日志内容字符串
* @param responseLogMessage 请求响应日志字符串
* @return 日志内容字符串
*/
@Override
protected String responseLoggingContent(ResponseLogMessage responseLogMessage) {
ForestResponse response = responseLogMessage.getResponse();
if (response != null && response.getException() != null) {
return "[网络错误]: " + response.getException().getMessage();
}
int status = responseLogMessage.getStatus();
if (status >= 0) {
return "请求响应: 状态码: " + responseLogMessage.getStatus() + ", 耗时: " + responseLogMessage.getTime() + "ms";
} else {
return "[网络错误]: 未知的网络错误!";
}
}
}
|
[
"dt_flys@hotmail.com"
] |
dt_flys@hotmail.com
|
b395efa8ac8372e2f1097480ea7956e75fb09bcc
|
aca457909ef8c4eb989ba23919de508c490b074a
|
/DialerJADXDecompile/defpackage/czz.java
|
e09ed26d33088012913e5fb508bfd9b33c29d4cb
|
[] |
no_license
|
KHikami/ProjectFiCallingDeciphered
|
bfccc1e1ba5680d32a4337746de4b525f1911969
|
cc92bf6d4cad16559a2ecbc592503d37a182dee3
|
refs/heads/master
| 2021-01-12T17:50:59.643861
| 2016-12-08T01:20:34
| 2016-12-08T01:23:04
| 71,650,754
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 388
|
java
|
package defpackage;
import java.util.Map.Entry;
/* compiled from: PG */
/* renamed from: czz */
final class czz extends dbn {
private /* synthetic */ dbn a;
czz(czy czy, dbn dbn) {
this.a = dbn;
}
public final boolean hasNext() {
return this.a.hasNext();
}
public final Object next() {
return ((Entry) this.a.next()).getKey();
}
}
|
[
"chu.rachelh@gmail.com"
] |
chu.rachelh@gmail.com
|
b2c707496b36daafe41930d0c9ffbd7b84fcb367
|
1f5c9b19b09f0fad775a5bb07473690ae6b0c814
|
/salequotation/src/client/nc/ui/so/salequotation/billref/mz3/MZ3Ref4310Dlg.java
|
b1ff329b6827bd086510af077f850b883e97f13d
|
[] |
no_license
|
hdulqs/NC65_SCM_SO
|
8e622a7bb8c2ccd1b48371eedd50591001cd75c0
|
aaf762285b10e7fef525268c2c90458aa4290bf6
|
refs/heads/master
| 2020-05-19T01:23:50.824879
| 2018-07-04T09:41:39
| 2018-07-04T09:41:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 519
|
java
|
package nc.ui.so.salequotation.billref.mz3;
import java.awt.Container;
import nc.ui.pub.pf.BillSourceVar;
import nc.ui.pubapp.billref.src.view.SourceRefDlg;
public class MZ3Ref4310Dlg extends SourceRefDlg {
/**
*
*/
private static final long serialVersionUID = -5941749394140338864L;
public MZ3Ref4310Dlg(Container parent, BillSourceVar bsVar) {
super(parent, bsVar, true);
}
@Override
public String getRefBillInfoBeanPath() {
return "nc/ui/so/salequotation/billref/mz3/MZ3Ref4310Info.xml";
}
}
|
[
"944482059@qq.com"
] |
944482059@qq.com
|
7e33a189cae2b09f8b76009fe1818b208c8d20d0
|
7474fb283980452a24e3a961f9ea21edf2abb5e3
|
/ecps-common/src/main/java/com/ecps/common/util/HttpClientUtil.java
|
95fd02e07a981580f838648ad2c4bf663dd34ba8
|
[] |
no_license
|
liudongdong0909/ecps
|
e6ce717c15833cbd3162cbdab2ea201856af6edc
|
1bed34bc8b80cbe37476b54057748d175a3c4a27
|
refs/heads/master
| 2020-03-18T19:40:18.231633
| 2018-05-28T13:48:04
| 2018-05-28T13:48:04
| 58,317,499
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,575
|
java
|
package com.ecps.common.util;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* HttpClient工具类
*
* @author IT_donggua
* @version V1.0
* @create 2017-02-20 下午 02:03
*/
public class HttpClientUtil {
public static String doGet(String url, Map<String, String> param) {
// 创建Httpclient对象
CloseableHttpClient httpclient = HttpClients.createDefault();
String resultString = "";
CloseableHttpResponse response = null;
try {
// 创建uri
URIBuilder builder = new URIBuilder(url);
if (param != null) {
for (String key : param.keySet()) {
builder.addParameter(key, param.get(key));
}
}
URI uri = builder.build();
// 创建http GET请求
HttpGet httpGet = new HttpGet(uri);
// 执行请求
response = httpclient.execute(httpGet);
// 判断返回状态是否为200
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (response != null) {
response.close();
}
httpclient.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return resultString;
}
public static String doGet(String url) {
return doGet(url, null);
}
public static String doPost(String url, Map<String, String> param) {
// 创建Httpclient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = null;
String resultString = "";
try {
// 创建Http Post请求
HttpPost httpPost = new HttpPost(url);
// 创建参数列表
if (param != null) {
List<NameValuePair> paramList = new ArrayList<>();
for (String key : param.keySet()) {
paramList.add(new BasicNameValuePair(key, param.get(key)));
}
// 模拟表单
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(paramList);
httpPost.setEntity(entity);
}
// 执行http请求
response = httpClient.execute(httpPost);
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
response.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return resultString;
}
public static String doPost(String url) {
return doPost(url, null);
}
public static String doPostJson(String url, String json) {
// 创建Httpclient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = null;
String resultString = "";
try {
// 创建Http Post请求
HttpPost httpPost = new HttpPost(url);
// 创建请求内容
StringEntity entity = new StringEntity(json, ContentType.APPLICATION_JSON);
httpPost.setEntity(entity);
// 执行http请求
response = httpClient.execute(httpPost);
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
response.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return resultString;
}
}
|
[
"liudongdong0909@yeah.net"
] |
liudongdong0909@yeah.net
|
aeb51438f27c4b3799a97153b15a5311b90354e4
|
9a8c10504a250d8a518fc9f8b51c5c6095271cfb
|
/Lecture/Evening_lectures/Lecture9/src/main/java/timing/IReadFile.java
|
f33dfa6bf19feb0dac3a81b41f80f06a348ddb35
|
[] |
no_license
|
sharonzidi/cs5004_object_oriented_design
|
5c51c2ac96239b49002aa5504b699ee8b015f425
|
c0cbe1dd762d8e6b908798d602189084a8a4468f
|
refs/heads/main
| 2023-08-29T07:55:15.937750
| 2021-10-27T19:42:54
| 2021-10-27T19:42:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 253
|
java
|
package timing;
public interface IReadFile {
/**
* Reads a file and returns the time taken in nanoseconds.
* @param filePath The file to read.
* @return The time taken in nanoseconds.
*/
long readAndTime(String filePath);
}
|
[
"xia.zid@northeastern.edu"
] |
xia.zid@northeastern.edu
|
df76024622ef0df2c303003dcd62c39d984679f0
|
7201a64a8f2380d4ec58edfa0f4c3526c9c3b0fe
|
/app/src/main/java/com/jc/utils/UmengShareUtils.java
|
f241891ae5c05335ba25ced2d28ab7354affcb28
|
[] |
no_license
|
bsty2015/hsdandroid
|
3a37a729eb025e563e6beb2927dfbff82b7fcb79
|
8f16c356c5be0481e023c49e3a02d6afb51c9776
|
refs/heads/master
| 2021-01-10T12:54:06.555882
| 2015-11-27T08:01:17
| 2015-11-27T08:01:17
| 46,967,090
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,004
|
java
|
package com.jc.utils;
import android.app.Activity;
import android.content.Intent;
import android.graphics.BitmapFactory;
import com.jc.base.CustomApplication;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.controller.UMServiceFactory;
import com.umeng.socialize.controller.UMSocialService;
import com.umeng.socialize.media.QQShareContent;
import com.umeng.socialize.media.QZoneShareContent;
import com.umeng.socialize.media.SinaShareContent;
import com.umeng.socialize.media.UMImage;
import com.umeng.socialize.sso.QZoneSsoHandler;
import com.umeng.socialize.sso.SinaSsoHandler;
import com.umeng.socialize.sso.UMQQSsoHandler;
import com.umeng.socialize.sso.UMSsoHandler;
import com.umeng.socialize.weixin.controller.UMWXHandler;
import com.umeng.socialize.weixin.media.CircleShareContent;
import com.umeng.socialize.weixin.media.WeiXinShareContent;
/**
* 友盟分享工具类
*
* @author
*
*/
public class UmengShareUtils {
private Activity mActivity;
/** 友盟分享服务 */
private final UMSocialService mController = UMServiceFactory.getUMSocialService("com.umeng.share");
/**QQ app id*/
private static final String QQAppId = "1104770411";
/**QQ app key*/
private static final String QQAppKey = "SzKRkeFcrW8Hp1cL";
// 注意:在微信授权的时候,必须传递appSecret
// wx967daebe835fbeac是你在微信开发平台注册应用的AppID, 这里需要替换成你注册的AppID
private final String WXAppId = "wxa30c063a7ca028a0";
private final String WXAppSecret = "1ed0de3ea25817349a1333402c0af740";
/**要分享的内容*/
private String content;
/**分享的url*/
private String url = "https://m.jicai.com/invite?code=";
/**分享的标题*/
private static final String title = "集财,更懂你的理财产品";
public UmengShareUtils(Activity mActivity,String content) {
this.mActivity = mActivity;
this.content = content;
configPlatforms();
setShareContent();
//设置分享面板显示的内容
mController.getConfig().setPlatforms(SHARE_MEDIA.WEIXIN,
SHARE_MEDIA.WEIXIN_CIRCLE, SHARE_MEDIA.QQ
// SHARE_MEDIA.SINA
);
}
/**调用分享面板*/
public void share(){
mController.openShare(mActivity, false);
}
/**
* 如需使用sso需要在onActivity中调用此方法
* @param requestCode
* @param resultCode
* @param data
*/
public void authSSO(int requestCode, int resultCode, Intent data){
/** 使用SSO授权必须添加如下代码 */
UMSsoHandler ssoHandler = mController.getConfig().getSsoHandler(
requestCode);
if (ssoHandler != null) {
ssoHandler.authorizeCallBack(requestCode, resultCode, data);
}
}
private void configPlatforms() {
// 添加新浪SSO授权
mController.getConfig().setSsoHandler(new SinaSsoHandler());
// 添加QQ、QZone平台
addQQQZonePlatform();
// 添加微信、微信朋友圈平台
addWXPlatform();
}
/**
* @功能描述 : 添加QQ平台支持 QQ分享的内容, 包含四种类型, 即单纯的文字、图片、音乐、视频. 参数说明 : title, summary,
* image url中必须至少设置一个, targetUrl必须设置,网页地址必须以"http://"开头 . title :
* 要分享标题 summary : 要分享的文字概述 image url : 图片地址 [以上三个参数至少填写一个] targetUrl
* : 用户点击该分享时跳转到的目标地址 [必填] ( 若不填写则默认设置为友盟主页 )
* @return
*/
private void addQQQZonePlatform() {
// 添加QQ支持, 并且设置QQ分享内容的target url
UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(mActivity, QQAppId, QQAppKey);
qqSsoHandler.setTitle(content);
qqSsoHandler.addToSocialSDK();
// 添加QZone平台
QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(mActivity, QQAppId, QQAppKey);
qZoneSsoHandler.addToSocialSDK();
}
/**
* @功能描述 : 添加微信平台分享
* @return
*/
private void addWXPlatform() {
// 添加微信平台
UMWXHandler wxHandler = new UMWXHandler(mActivity, WXAppId, WXAppSecret);
wxHandler.addToSocialSDK();
// 支持微信朋友圈
UMWXHandler wxCircleHandler = new UMWXHandler(mActivity, WXAppId,WXAppSecret);
wxCircleHandler.setToCircle(true);
wxCircleHandler.addToSocialSDK();
}
/**
* 根据不同的平台设置不同的分享内容</br>
*/
private void setShareContent() {
//分享图片
UMImage urlImage = new UMImage(mActivity, BitmapFactory.decodeResource(mActivity.getResources(), com.jc.R.mipmap.ic_launcher));
if(CustomApplication.user != null){
url = url+CustomApplication.user.getUserKey();
}
//设置微信分享内容
WeiXinShareContent weixinContent = new WeiXinShareContent();
weixinContent.setShareContent(content);
weixinContent.setTitle(title);
weixinContent.setTargetUrl(url);
weixinContent.setShareMedia(urlImage);
mController.setShareMedia(weixinContent);
// 设置朋友圈分享的内容
CircleShareContent circleMedia = new CircleShareContent();
circleMedia.setShareContent(content);
circleMedia.setTitle(title);
circleMedia.setTargetUrl(url);
circleMedia.setShareMedia(urlImage);
mController.setShareMedia(circleMedia);
// 设置QQ空间分享内容
QZoneShareContent qzone = new QZoneShareContent();
qzone.setShareContent(content);
qzone.setTitle(title);
qzone.setTargetUrl(url);
qzone.setShareMedia(urlImage);
mController.setShareMedia(qzone);
//设置QQ分享内容
QQShareContent qqShareContent = new QQShareContent();
qqShareContent.setTitle(title);
qqShareContent.setShareContent(content);
qqShareContent.setTargetUrl(url);
qqShareContent.setShareMedia(urlImage);
mController.setShareMedia(qqShareContent);
//设置新浪分享内容
SinaShareContent sinaContent = new SinaShareContent();
sinaContent.setShareContent(content);
sinaContent.setTitle(title);
sinaContent.setTargetUrl(url);
sinaContent.setShareMedia(urlImage);
mController.setShareMedia(sinaContent);
}
}
|
[
"xxx@xxx.com"
] |
xxx@xxx.com
|
9a992a8eba5672ec93bcbbd0fc811897dc0258e8
|
a8c47a4f7ea6503c093efce41f755cfe42b1cc27
|
/HammerMod-DZ/com/jtrent238/hammermod/items/hammers/ItemRubyHammer.java
|
fdc090659a7e6ec9675f8be000a7521eb01a2cb8
|
[] |
no_license
|
hidalgoarlene60/HammerMod-DangerZone
|
1e9cc43772397829adb9a95d8dae6b8db7d19dc7
|
c8a1cefa975547e2b575c1d12163c7c55532a2dd
|
refs/heads/master
| 2020-03-30T00:00:36.381768
| 2018-09-06T14:21:25
| 2018-09-06T14:21:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 561
|
java
|
package com.jtrent238.hammermod.items.hammers;
import dangerzone.gui.InventoryMenus;
import dangerzone.items.Item;
public class ItemRubyHammer extends Item {
public ItemRubyHammer(String n, String txt) {
//TODO: Fill in INFO!!!
super(n, txt);
maxstack = 1;
attackstrength = 2;
stonestrength = Math.round(attackstrength / 2);
maxuses = Math.round((attackstrength * stonestrength) * 2);
burntime = 15;
hold_straight = true;
flopped = false;
menu = InventoryMenus.HARDWARE;
this.showInInventory = true;
}
}
|
[
"jtrent238@outlook.com"
] |
jtrent238@outlook.com
|
44b8d986bc2255ba03a6b78c10f1c76fd8415466
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Time/19/org/joda/time/tz/CachedDateTimeZone_getInfo_147.java
|
60fb3ebab189a1fc31044b67c2ab1f87b457f664
|
[] |
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
| 697
|
java
|
org joda time
improv perform request time zone offset kei
cach result time zone simpl rule fix
cach improv perform
cach date time zone cacheddatetimezon thread safe immut
author brian neill o'neil
cach date time zone cacheddatetimezon date time zone datetimezon
info info getinfo milli
period milli
info cach info cach iinfocach
index period info cach mask cinfocachemask
info info cach index
info info period start iperiodstart period
info creat info createinfo milli
cach index info
info
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
6afa488e01d835969c678feb405a8fb3218cb81f
|
2509c4ceea15ae1b3d6f0708e4123ab13a1a83be
|
/highcharts/src/main/java/fi/gekkio/splake/highcharts/RawJson.java
|
0037ab8f89bd2709b3bd3b660b390ab8f095c856
|
[
"Apache-2.0"
] |
permissive
|
Gekkio/splake
|
5ae6715b793e88c753599fb1956e3fc988789d0b
|
69e3dac630dd49c608ceeddecbf84c2ee93ccfcc
|
refs/heads/master
| 2020-12-24T13:52:36.605130
| 2013-06-04T18:35:00
| 2013-06-04T18:35:00
| 8,167,705
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 491
|
java
|
package fi.gekkio.splake.highcharts;
import java.util.List;
import java.util.Map;
import org.zkoss.json.JSONAware;
public interface RawJson {
Object get(String key);
void putAll(Map<String, ?> values);
void put(String key, JSONAware value);
void put(String key, int value);
void put(String key, double value);
void put(String key, String value);
void put(String key, Map<String, ?> values);
void put(String key, List<? extends JSONAware> values);
}
|
[
"joonas.javanainen@gmail.com"
] |
joonas.javanainen@gmail.com
|
7981094f802b53092bdb5e223ee3e0e5939bc0f9
|
f805f2b3b154bc274aa60aedebdbddcb69264981
|
/bank2/src/zrc/servlet/TransferServlet.java
|
3e440cdffcb477b76ce326e79dc849c5bdcce32a
|
[] |
no_license
|
ZrcLeibniz/TestJava
|
8386da1417e281c9f587aca06a1c48678b5c2eae
|
4f9d146d472d49a3dba22b614a87da075f686d37
|
refs/heads/master
| 2021-06-30T12:30:19.630040
| 2021-01-09T02:28:31
| 2021-01-09T02:28:31
| 208,540,177
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,319
|
java
|
package zrc.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import zrc.pojo.Account;
import zrc.service.AccountService;
import zrc.service.impl.AccountServiceImpl;
public class TransferServlet extends HttpServlet{
private AccountService accService = new AccountServiceImpl();
@Override
protected void service(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
req.setCharacterEncoding("utf-8");
resp.setContentType("text/html;charset=utf-8");
Account accOut = new Account();
accOut.setAccno(req.getParameter("accOutAccNo"));
accOut.setPassword(Integer.parseInt(req.getParameter("accOutPassword")));
accOut.setBalance(Double.parseDouble(req.getParameter("accOutBalance")));
Account accIn = new Account();
accIn.setAccno(req.getParameter("accInAccNo"));
accIn.setName(req.getParameter("accInName"));
int index2 = accService.transfer(accIn, accOut);
if(index2==AccountService.SUCCESS) {
resp.sendRedirect("ss");
}else {
HttpSession session = req.getSession();
session.setAttribute("code",index2);
resp.sendRedirect("error.jsp");
}
}
}
|
[
"2834511920@qq.com"
] |
2834511920@qq.com
|
92b78f49210a189fb63dcc8531c6ef3d7c135735
|
44d041667d54d8eaaa89bfced19fac0ddb6f76c8
|
/airavata-kubernetes/modules/api-resource/src/main/java/org/apache/airavata/k8s/api/resources/task/type/TaskOutPortTypeResource.java
|
ad274ca9f8da9a63274faed138bd43139af031ad
|
[] |
no_license
|
apache/airavata-sandbox
|
7f2bc0550fe64ee1ee8ad40d6a5abb2a44be596a
|
fabf8b7d753570f2404f2d9830c59786a8c78468
|
refs/heads/master
| 2023-09-04T06:34:34.830828
| 2023-03-27T18:33:51
| 2023-03-27T19:03:58
| 20,473,416
| 3
| 43
| null | 2023-09-06T20:29:39
| 2014-06-04T07:00:07
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 759
|
java
|
package org.apache.airavata.k8s.api.resources.task.type;
/**
* TODO: Class level comments please
*
* @author dimuthu
* @since 1.0.0-SNAPSHOT
*/
public class TaskOutPortTypeResource {
private long id;
private String name;
private int order = 0;
public long getId() {
return id;
}
public TaskOutPortTypeResource setId(long id) {
this.id = id;
return this;
}
public String getName() {
return name;
}
public TaskOutPortTypeResource setName(String name) {
this.name = name;
return this;
}
public int getOrder() {
return order;
}
public TaskOutPortTypeResource setOrder(int order) {
this.order = order;
return this;
}
}
|
[
"smarru@apache.org"
] |
smarru@apache.org
|
fa77799cabc0b041fe3dcb40a959997ab80e7bc0
|
d02c4d9e048a4f0afd3975bdc0e464acbed63f67
|
/spring-sample/24-annotation-bean/src/main/java/com/moon/springsample/annotation/MyBean.java
|
6c60dd30aa3b972fc0d93037a570ff5c55d52750
|
[] |
no_license
|
MooNkirA/spring-note
|
8bed779ab4abeb9949abb1c7fc9590c3df6c3fc1
|
80a62cbef071e45ed12625992f5d501fe9414140
|
refs/heads/main
| 2023-06-07T21:20:58.469063
| 2022-09-05T13:48:14
| 2022-09-05T13:48:14
| 226,762,962
| 0
| 0
| null | 2022-09-05T13:48:15
| 2019-12-09T01:54:45
|
Java
|
UTF-8
|
Java
| false
| false
| 532
|
java
|
package com.moon.springsample.annotation;
import org.springframework.context.annotation.Bean;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 使用@Bean注解作为元注解,自定义注解实现@Bean注解相同的功能
*
* @author MooNkirA
* @version 1.0
* @date 2020-8-29 10:12
* @description
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Bean
public @interface MyBean {
}
|
[
"lje888@126.com"
] |
lje888@126.com
|
6f22bd5e45a40881027c11006737e80fa2790030
|
8dacd081d9c72da0410842a977a2eddb4802e911
|
/jsp/src/test/java/io/undertow/test/jsp/basic/SimpleJspTestCase.java
|
d484bb5a16d526ed3aa6f645170507e73f950238
|
[
"Apache-2.0"
] |
permissive
|
ALRubinger/undertow
|
16b22e487e36588ca879975c8b0b54c4c0617dea
|
1cbca9e3e9e109ac71652d6e05dc1357c7096933
|
refs/heads/master
| 2021-01-15T23:53:43.405316
| 2012-12-03T09:29:43
| 2012-12-04T01:54:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,167
|
java
|
/*
* JBoss, Home of Professional Open Source.
* Copyright 2012 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.undertow.test.jsp.basic;
import java.io.IOException;
import java.util.HashMap;
import javax.servlet.ServletException;
import io.undertow.jsp.HackInstanceManager;
import io.undertow.jsp.JspServletBuilder;
import io.undertow.server.handlers.CookieHandler;
import io.undertow.server.handlers.PathHandler;
import io.undertow.server.session.InMemorySessionManager;
import io.undertow.server.session.SessionAttachmentHandler;
import io.undertow.servlet.api.DeploymentInfo;
import io.undertow.servlet.api.DeploymentManager;
import io.undertow.servlet.api.ServletContainer;
import io.undertow.servlet.test.util.TestClassIntrospector;
import io.undertow.servlet.test.util.TestResourceLoader;
import io.undertow.test.utils.DefaultServer;
import io.undertow.test.utils.HttpClientUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.jasper.deploy.JspPropertyGroup;
import org.apache.jasper.deploy.TagLibraryInfo;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* @author Stuart Douglas
*/
@RunWith(DefaultServer.class)
public class SimpleJspTestCase {
public static final String KEY = "io.undertow.message";
@BeforeClass
public static void setup() throws ServletException {
final CookieHandler cookieHandler = new CookieHandler();
final SessionAttachmentHandler session = new SessionAttachmentHandler(new InMemorySessionManager());
cookieHandler.setNext(session);
final PathHandler servletPath = new PathHandler();
session.setNext(servletPath);
final ServletContainer container = ServletContainer.Factory.newInstance();
DeploymentInfo builder = new DeploymentInfo()
.setClassLoader(SimpleJspTestCase.class.getClassLoader())
.setContextPath("/servletContext")
.setClassIntrospecter(TestClassIntrospector.INSTANCE)
.setDeploymentName("servletContext.war")
.setResourceLoader(new TestResourceLoader(SimpleJspTestCase.class))
.addServlet(JspServletBuilder.createServlet("Default Jsp Servlet", "*.jsp"));
JspServletBuilder.setupDeployment(builder, new HashMap<String, JspPropertyGroup>(), new HashMap<String, TagLibraryInfo>(), new HackInstanceManager());
DeploymentManager manager = container.addDeployment(builder);
manager.deploy();
servletPath.addPath(builder.getContextPath(), manager.start());
DefaultServer.setRootHandler(cookieHandler);
System.setProperty(KEY, "Hello JSP!");
}
@AfterClass
public static void after(){
System.getProperties().remove(KEY);
}
@Test
public void testSimpleHttpServlet() throws IOException {
DefaultHttpClient client = new DefaultHttpClient();
try {
HttpGet get = new HttpGet(DefaultServer.getDefaultServerAddress() + "/servletContext/a.jsp");
HttpResponse result = client.execute(get);
Assert.assertEquals(200, result.getStatusLine().getStatusCode());
final String response = HttpClientUtils.readResponse(result);
Assert.assertEquals("<HTML><BODY> Message:Hello JSP!</BODY></HTML>", response);
} finally {
client.getConnectionManager().shutdown();
}
}
}
|
[
"stuart.w.douglas@gmail.com"
] |
stuart.w.douglas@gmail.com
|
51a8b25766ea27a9f7d1b6f7b4a397f563af1d43
|
cee14d52631fa096c6119048e60b4cfd44e1aee9
|
/src/main/java/com/factly/cricstats/config/ThymeleafConfiguration.java
|
48f3416762b94ba5411d8863255be7e7fdc3fb72
|
[] |
no_license
|
deshetti/cricstats
|
692adc9ba00173929f692fcfa806d05ffe37dbb1
|
798b00a2299bd01d669fa219e5b6e65d5419f5d2
|
refs/heads/master
| 2020-03-18T15:39:40.244820
| 2018-05-26T02:06:16
| 2018-05-26T02:06:16
| 134,921,372
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 989
|
java
|
package com.factly.cricstats.config;
import org.apache.commons.lang3.CharEncoding;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.*;
import org.thymeleaf.templateresolver.ClassLoaderTemplateResolver;
@Configuration
public class ThymeleafConfiguration {
@SuppressWarnings("unused")
private final Logger log = LoggerFactory.getLogger(ThymeleafConfiguration.class);
@Bean
@Description("Thymeleaf template resolver serving HTML 5 emails")
public ClassLoaderTemplateResolver emailTemplateResolver() {
ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver();
emailTemplateResolver.setPrefix("mails/");
emailTemplateResolver.setSuffix(".html");
emailTemplateResolver.setTemplateMode("HTML5");
emailTemplateResolver.setCharacterEncoding(CharEncoding.UTF_8);
emailTemplateResolver.setOrder(1);
return emailTemplateResolver;
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
2015a5190eb9812b7db337637a035051b4ae6342
|
aaabffe8bf55973bfb1390cf7635fd00ca8ca945
|
/src/main/java/com/microsoft/graph/requests/extensions/IEducationUserCollectionPage.java
|
a5cf989753018ee7a60a91dc7510ead56ac561ea
|
[
"MIT"
] |
permissive
|
rgrebski/msgraph-sdk-java
|
e595e17db01c44b9c39d74d26cd925b0b0dfe863
|
759d5a81eb5eeda12d3ed1223deeafd108d7b818
|
refs/heads/master
| 2020-03-20T19:41:06.630857
| 2018-03-16T17:31:43
| 2018-03-16T17:31:43
| 137,648,798
| 0
| 0
| null | 2018-06-17T11:07:06
| 2018-06-17T11:07:05
| null |
UTF-8
|
Java
| false
| false
| 1,046
|
java
|
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.requests.extensions;
import com.microsoft.graph.concurrency.*;
import com.microsoft.graph.core.*;
import com.microsoft.graph.models.extensions.*;
import com.microsoft.graph.models.generated.*;
import com.microsoft.graph.http.*;
import com.microsoft.graph.requests.extensions.*;
import com.microsoft.graph.requests.generated.*;
import com.microsoft.graph.options.*;
import com.microsoft.graph.serializer.*;
import java.util.Arrays;
import java.util.EnumSet;
// This file is available for extending, afterwards please submit a pull request.
/**
* The interface for the Education User Collection Page.
*/
public interface IEducationUserCollectionPage extends IBaseEducationUserCollectionPage {
}
|
[
"caitbal@microsoft.com"
] |
caitbal@microsoft.com
|
ea499bc6e11ddf7d2b1ae927a54dc2aaad29452a
|
d0d09ed624d72d9917e787c51529b2c52870f729
|
/app/src/main/java/com/appian/footballnewsdaily/util/CustomTextView.java
|
5c599f82fd9191544c7a11f806c237dc970b71f2
|
[] |
no_license
|
phuongbkatp/onpitch
|
35cda500b7b8ff191903a43f6f68760c01e419f4
|
69115602918d99dbd1acdd2a34d32647849047c4
|
refs/heads/master
| 2020-05-18T13:22:15.153246
| 2019-05-25T05:19:37
| 2019-05-25T05:19:37
| 184,436,585
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,048
|
java
|
package com.appian.footballnewsdaily.util;
import android.content.Context;
import android.graphics.Typeface;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.appian.footballnewsdaily.R;
/**
* Created by phuongbkatp on 10/5/2018.
*/
public class CustomTextView extends LinearLayout {
public CustomTextView(Context context, String content, boolean isHead) {
super(context);
initView(context, content, isHead);
}
private void initView(Context context,String content,boolean isHead) {
View view = inflate(context, R.layout.custom_text__view, null);
TextView textView = view.findViewById(R.id.content);
textView.setText(content);
if (isHead) {
textView.setTypeface(textView.getTypeface(), Typeface.BOLD_ITALIC);
}
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
addView(view, params);
}
}
|
[
"32545917+phuongbkatp@users.noreply.github.com"
] |
32545917+phuongbkatp@users.noreply.github.com
|
f6a713bbb206a17b6a4b324fb287a573afb295ae
|
b54d71ab43202905b71a3c4e52cd69b84a17f12a
|
/modules/ecommerce/ec-studio-lib/src/main/java/com/coremedia/ecommerce/studio/rest/model/Store.java
|
5285b7c0a7e4a834a2b8e9bf9c5dcd37c13a4cc0
|
[] |
no_license
|
HongBitgrip/livecontext
|
515db791643ea98678032776b190b864d8cefd86
|
f0c64e5a0cebc57ed51dbd90bfd2558f9df8ecce
|
refs/heads/master
| 2021-04-15T11:50:32.698228
| 2018-08-09T15:25:51
| 2018-08-09T15:25:51
| 126,187,383
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,932
|
java
|
package com.coremedia.ecommerce.studio.rest.model;
import com.coremedia.blueprint.base.livecontext.ecommerce.common.CurrentCommerceConnection;
import com.coremedia.livecontext.ecommerce.catalog.Catalog;
import com.coremedia.livecontext.ecommerce.catalog.CatalogService;
import com.coremedia.livecontext.ecommerce.catalog.Category;
import com.coremedia.livecontext.ecommerce.common.CommerceConnection;
import com.coremedia.livecontext.ecommerce.common.CommerceObject;
import com.coremedia.livecontext.ecommerce.common.StoreContext;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import static java.util.Collections.emptyList;
import static java.util.stream.Collectors.toList;
public class Store implements CommerceObject {
private StoreContext context;
public Store(StoreContext context) {
this.context = context;
}
public String getId() {
return "store-" + context.getStoreName();
}
public StoreContext getContext() {
return context;
}
/**
* @return Returns the web URL of the commerce system's management tool
*/
@Nonnull
public Optional<String> getVendorUrl() {
return getConnectionAttribute(CommerceConnection::getVendorUrl);
}
@Nonnull
public Optional<String> getVendorVersion() {
return getConnectionAttribute(CommerceConnection::getVendorVersion);
}
@Nonnull
public Optional<String> getVendorName() {
return getConnectionAttribute(CommerceConnection::getVendorName);
}
@Nonnull
private static Optional<String> getConnectionAttribute(Function<CommerceConnection, String> getter) {
return CurrentCommerceConnection.find().map(getter);
}
@Nonnull
public Optional<Catalog> getDefaultCatalog() {
CatalogService catalogService = getCatalogService();
if (catalogService == null || !hasStoreName()) {
return Optional.empty();
}
return catalogService.getDefaultCatalog(context);
}
@Nonnull
public List<Catalog> getCatalogs() {
CatalogService catalogService = getCatalogService();
if (catalogService == null || !hasStoreName()) {
return emptyList();
}
return catalogService.getCatalogs(context);
}
@Nonnull
public List<Category> getRootCategories() {
CatalogService catalogService = getCatalogService();
if (catalogService == null || !hasStoreName()) {
return emptyList();
}
return catalogService.getCatalogs(context).stream()
.map(Catalog::getRootCategory)
.filter(Objects::nonNull)
.collect(toList());
}
@Nullable
private static CatalogService getCatalogService() {
return CurrentCommerceConnection.find()
.map(CommerceConnection::getCatalogService)
.orElse(null);
}
private boolean hasStoreName() {
return context.getStoreName() != null;
}
}
|
[
"hong.nguyen@bitgrip.de"
] |
hong.nguyen@bitgrip.de
|
f8e70da76ae2739ec1ab4b4b0c5fd7135b9b6381
|
a6a1d61a6a090eac94070308d13e0feda6ba43fb
|
/javasource/oracleconnector/actions/SetInParameterDecimal.java
|
eedc898cc498acaec1e4854cd6531fcb9e9c5f61
|
[
"Apache-2.0"
] |
permissive
|
ako/OracleConnector
|
b62c683ebc5e906134b2938cf5d453dc46b72c60
|
efdf613874e0a25db07d656a6073deacf65f530e
|
refs/heads/master
| 2021-09-23T18:48:43.527226
| 2021-09-22T08:01:47
| 2021-09-22T08:01:47
| 74,787,993
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,445
|
java
|
// This file was generated by Mendix Modeler.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
// Special characters, e.g., é, ö, à, etc. are supported in comments.
package oracleconnector.actions;
import com.mendix.core.Core;
import com.mendix.logging.ILogNode;
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.webui.CustomJavaAction;
import oracleconnector.impl.JdbcConnector;
public class SetInParameterDecimal extends CustomJavaAction<java.lang.Boolean>
{
private java.math.BigDecimal DecimalValue;
public SetInParameterDecimal(IContext context, java.math.BigDecimal DecimalValue)
{
super(context);
this.DecimalValue = DecimalValue;
}
@Override
public java.lang.Boolean executeAction() throws Exception
{
// BEGIN USER CODE
connector.setInParameterDecimal(this.DecimalValue);
return true;
// END USER CODE
}
/**
* Returns a string representation of this action
*/
@Override
public java.lang.String toString()
{
return "SetInParameterDecimal";
}
// BEGIN EXTRA CODE
private final ILogNode logNode = Core.getLogger(JdbcConnector.LOGNAME);
private final JdbcConnector connector = new JdbcConnector(logNode);
// END EXTRA CODE
}
|
[
"andrej@koelewijn.net"
] |
andrej@koelewijn.net
|
b92f7dee83994d9dbd0b375fd66769795cfa3251
|
b3337cb53040a58dbb905942f82aeed6a822407f
|
/BTVNTuan4/app/src/main/java/com/example/btvntuan4/Product.java
|
454f0e57bc364817f9747f86a5ab597c1e45152b
|
[] |
no_license
|
nguyennhatminh230801/Bai-Tap-Android
|
5d139f2296be32fe38ad19a196b576440b8741f7
|
3a3d07f684d57c8153937662f550f37bbf073736
|
refs/heads/main
| 2023-03-22T06:43:36.275534
| 2021-03-17T13:06:35
| 2021-03-17T13:06:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,691
|
java
|
package com.example.btvntuan4;
import android.os.Parcel;
import android.os.Parcelable;
import java.io.Serializable;
public class Product implements Parcelable, Serializable, Comparable<Product>{
int ImageItem;
String nameItem;
int Price;
int Amount;
int IncreaseItem;
int DecreaseItem;
public Product() {
}
public Product(int imageItem, String nameItem, int price, int amount, int increaseItem, int decreaseItem) {
ImageItem = imageItem;
this.nameItem = nameItem;
Price = price;
Amount = amount;
IncreaseItem = increaseItem;
DecreaseItem = decreaseItem;
}
public int getImageItem() {
return ImageItem;
}
public void setImageItem(int imageItem) {
ImageItem = imageItem;
}
public String getNameItem() {
return nameItem;
}
public void setNameItem(String nameItem) {
this.nameItem = nameItem;
}
public int getPrice() {
return Price;
}
public void setPrice(int price) {
Price = price;
}
public int getAmount() {
return Amount;
}
public void setAmount(int amount) {
Amount = amount;
}
public int getIncreaseItem() {
return IncreaseItem;
}
public void setIncreaseItem(int increaseItem) {
IncreaseItem = increaseItem;
}
public int getDecreaseItem() {
return DecreaseItem;
}
public void setDecreaseItem(int decreaseItem) {
DecreaseItem = decreaseItem;
}
protected Product(Parcel in) {
ImageItem = in.readInt();
nameItem = in.readString();
Price = in.readInt();
Amount = in.readInt();
IncreaseItem = in.readInt();
DecreaseItem = in.readInt();
}
public static final Creator<Product> CREATOR = new Creator<Product>() {
@Override
public Product createFromParcel(Parcel in) {
return new Product(in);
}
@Override
public Product[] newArray(int size) {
return new Product[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(ImageItem);
dest.writeString(nameItem);
dest.writeInt(Price);
dest.writeInt(Amount);
dest.writeInt(IncreaseItem);
dest.writeInt(DecreaseItem);
}
@Override
public int compareTo(Product object) {
String str1 = this.getNameItem().toLowerCase().trim();
String str2 = object.getNameItem().toLowerCase().trim();
return str1.compareTo(str2);
}
}
|
[
"="
] |
=
|
10e4c36f25acbf368ce3d85d6edabf83eccade1e
|
ae9efe033a18c3d4a0915bceda7be2b3b00ae571
|
/jambeth/jambeth-merge/src/main/java/com/koch/ambeth/merge/orm/LinkConfig.java
|
a4df65385693d54dd4074d16dc444382e9d5e53b
|
[
"Apache-2.0"
] |
permissive
|
Dennis-Koch/ambeth
|
0902d321ccd15f6dc62ebb5e245e18187b913165
|
8552b210b8b37d3d8f66bdac2e094bf23c8b5fda
|
refs/heads/develop
| 2022-11-10T00:40:00.744551
| 2017-10-27T05:35:20
| 2017-10-27T05:35:20
| 88,013,592
| 0
| 4
|
Apache-2.0
| 2022-09-22T18:02:18
| 2017-04-12T05:36:00
|
Java
|
UTF-8
|
Java
| false
| false
| 1,486
|
java
|
package com.koch.ambeth.merge.orm;
/*-
* #%L
* jambeth-merge
* %%
* Copyright (C) 2017 Koch Softwaredevelopment
* %%
* 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.
* #L%
*/
import com.koch.ambeth.util.ParamChecker;
public class LinkConfig implements ILinkConfig {
protected String source;
protected String alias;
protected CascadeDeleteDirection cascadeDeleteDirection = CascadeDeleteDirection.NONE;
public LinkConfig(String source) {
ParamChecker.assertParamNotNull(source, "source");
this.source = source;
}
protected LinkConfig() {
}
@Override
public String getSource() {
return source;
}
@Override
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
@Override
public CascadeDeleteDirection getCascadeDeleteDirection() {
return cascadeDeleteDirection;
}
public void setCascadeDeleteDirection(CascadeDeleteDirection cascadeDeleteDirection) {
this.cascadeDeleteDirection = cascadeDeleteDirection;
}
}
|
[
"dennis.koch@bruker.com"
] |
dennis.koch@bruker.com
|
7dca195d0677a6010d495a7945778d5367e7a54f
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava8/Foo569Test.java
|
da1ae01a2fe05c49dea783dd414f4647521da3e0
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 481
|
java
|
package applicationModulepackageJava8;
import org.junit.Test;
public class Foo569Test {
@Test
public void testFoo0() {
new Foo569().foo0();
}
@Test
public void testFoo1() {
new Foo569().foo1();
}
@Test
public void testFoo2() {
new Foo569().foo2();
}
@Test
public void testFoo3() {
new Foo569().foo3();
}
@Test
public void testFoo4() {
new Foo569().foo4();
}
@Test
public void testFoo5() {
new Foo569().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
61f8ce5c6cd993acb7a30ed2b1bb58584ea81165
|
bfd3d71cdb79eb1c9ce6a3269617ec4ed1b02b31
|
/app/src/main/java/com/shoppay/jinma/bean/VipPayMsg.java
|
ba2395a2c96885c4a5d0a6626fd3e1703965edbb
|
[] |
no_license
|
yy471101598/jinma
|
9731c5d277835588fe3699614feda0e03aef6871
|
d622814e6aff6a8cd1d9ee555225c044dbf01b36
|
refs/heads/master
| 2020-04-05T17:16:45.733142
| 2018-11-20T14:46:14
| 2018-11-20T14:46:14
| 157,052,869
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,406
|
java
|
package com.shoppay.jinma.bean;
/**
* Created by songxiaotao on 2017/7/13.
*/
public class VipPayMsg {
/**
* 会员卡号
* */
public String vipCard;
/**
* 会员卡id
* */
public String vipId;
/**
* 会员姓名
* */
public String vipName;
/**
* 消费获取积分
* */
public String obtainJifen;
/**
* 消费金额
* */
public String xfMoney;
/**
* 折后金额
* */
public String zhMoney;
/**
* 使用积分支付
* */
public int isJifen;
/**
* 使用余额支付
* */
public int isYue;
/**
* 使用现金支付
* */
public int isMoney;
/**
* 积分抵扣金额
* */
public String jifenDkmoney;
/**
* 消费使用积分
* */
public String useJifen;
/**
* 消费余额
* */
public String yueMoney;
/**
* 消费现金
* */
public String xjMoney;
/**
* 卡内余额
* */
public String vipYue;
/**
* 卡内剩余积分
* */
public String vipSyJifen;
/**
* 节省金额
* */
public String jieshengMoney;
/**
* 商品种类个数
* */
public String dataLength;
/**
* 微信支付
* */
public int isWx;
/**
* 微信支付金额
* */
public String wxMoney;
}
|
[
"471101598@qq.com"
] |
471101598@qq.com
|
453329ec47ae59f8811db630ca29d07eee074a0b
|
3924e5de3aba3ab87ead1eca11686fead659a5a3
|
/android/app/src/main/java/abi16_0_0/host/exp/exponent/modules/api/WebBrowserModule.java
|
153b4ff1813f9af2c0f2c01b2fc454f9874ec89e
|
[
"BSD-3-Clause",
"MIT",
"CC-BY-4.0",
"Apache-2.0"
] |
permissive
|
kenwheeler/expo
|
33885f4cb24be39ccaf9a6cfe5f3cb6fea8bfc66
|
f29e4d7f64c36a855ae7d83785e729f0db81c2dd
|
refs/heads/master
| 2023-08-16T05:43:52.485877
| 2017-05-12T22:39:03
| 2017-05-12T22:44:05
| 91,467,669
| 1
| 0
| null | 2017-05-16T14:26:14
| 2017-05-16T14:26:14
| null |
UTF-8
|
Java
| false
| false
| 3,114
|
java
|
// Copyright 2015-present 650 Industries. All rights reserved.
package abi16_0_0.host.exp.exponent.modules.api;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.support.annotation.Nullable;
import android.support.customtabs.CustomTabsIntent;
import abi16_0_0.com.facebook.infer.annotation.Assertions;
import abi16_0_0.com.facebook.react.bridge.Arguments;
import abi16_0_0.com.facebook.react.bridge.Promise;
import abi16_0_0.com.facebook.react.bridge.ReactApplicationContext;
import abi16_0_0.com.facebook.react.bridge.ReactContextBaseJavaModule;
import abi16_0_0.com.facebook.react.bridge.ReactMethod;
import abi16_0_0.com.facebook.react.bridge.WritableMap;
import de.greenrobot.event.EventBus;
import host.exp.exponent.chrometabs.ChromeTabsManagerActivity;
import host.exp.expoview.Exponent;
public class WebBrowserModule extends ReactContextBaseJavaModule {
private final static String ERROR_CODE = "EXWebBrowser";
private @Nullable Promise mOpenBrowserPromise;
public WebBrowserModule(ReactApplicationContext reactContext) {
super(reactContext);
}
@Override
public String getName() {
return "ExponentWebBrowser";
}
@ReactMethod
public void openBrowserAsync(final String url, final Promise promise) {
if (mOpenBrowserPromise != null) {
WritableMap result = Arguments.createMap();
result.putString("type", "cancel");
mOpenBrowserPromise.resolve(result);
return;
}
mOpenBrowserPromise = promise;
final Activity activity = Exponent.getInstance().getCurrentActivity();
if (activity == null) {
promise.reject(ERROR_CODE, "No activity");
mOpenBrowserPromise = null;
return;
}
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
CustomTabsIntent customTabsIntent = builder.build();
Intent intent = customTabsIntent.intent;
intent.setData(Uri.parse(url));
intent.putExtra(CustomTabsIntent.EXTRA_TITLE_VISIBILITY_STATE, CustomTabsIntent.NO_TITLE);
EventBus.getDefault().register(this);
activity.startActivity(
ChromeTabsManagerActivity.createStartIntent(activity, intent));
}
@ReactMethod
public void dismissBrowser() {
if (mOpenBrowserPromise == null) {
return;
}
final Activity activity = Exponent.getInstance().getCurrentActivity();
if (activity == null) {
mOpenBrowserPromise.reject(ERROR_CODE, "No activity");
mOpenBrowserPromise = null;
return;
}
WritableMap result = Arguments.createMap();
result.putString("type", "dismiss");
mOpenBrowserPromise.resolve(result);
mOpenBrowserPromise = null;
activity.startActivity(
ChromeTabsManagerActivity.createDismissIntent(activity));
}
public void onEvent(ChromeTabsManagerActivity.ChromeTabsDismissedEvent event) {
EventBus.getDefault().unregister(this);
Assertions.assertNotNull(mOpenBrowserPromise);
WritableMap result = Arguments.createMap();
result.putString("type", "cancel");
mOpenBrowserPromise.resolve(result);
mOpenBrowserPromise = null;
}
}
|
[
"aurora@exp.host"
] |
aurora@exp.host
|
65525edeb142db184874fc86537b168868847302
|
d2daf95d2eea900b2a5e78142075c335715efb86
|
/src/main/java/com/fwtai/service/UserService.java
|
1c4589aa7f4809d1440c802046a1116b3d26c3b1
|
[] |
no_license
|
gzstyp/security_frontend_backend
|
4ae8f0d6e39af723d2732c074bf926eb949230f9
|
e662e9e65fc02c394edfd14dd3b7772d3d7998b6
|
refs/heads/master
| 2023-01-22T15:22:01.704245
| 2020-11-24T16:51:42
| 2020-11-24T16:51:42
| 314,872,946
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 310
|
java
|
package com.fwtai.service;
import com.fwtai.dao.UserDao;
import com.fwtai.entity.User;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class UserService {
@Resource
private UserDao userDao;
public void save(final User user) {
userDao.save(user);
}
}
|
[
"444141300@qq.com"
] |
444141300@qq.com
|
896b340291bedd0f9df40142e1672669a70155ce
|
ccf55b8a4acc7fd7a940f7ea189cec173a52c825
|
/src/main/java/net/techcable/techutils/inventory/PlayerPlayerData.java
|
cbc6aad86e9c260f39a056dc7dfb02e97c0075b7
|
[
"MIT"
] |
permissive
|
terminalsin/TechUtils
|
1e6a7b58f9e29907d36aeab0c24dddad80715acb
|
cb0dc30bd41f88cce7fcf699e0fb2548242feee6
|
refs/heads/master
| 2022-11-04T21:53:33.979223
| 2020-06-21T15:48:31
| 2020-06-21T15:48:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,833
|
java
|
/**
* The MIT License
* Copyright (c) 2014-2015 Techcable
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package net.techcable.techutils.inventory;
import lombok.*;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import net.techcable.techutils.Reflection;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
@AllArgsConstructor
@Getter
class PlayerPlayerData implements PlayerData {
private Player player;
@Override
public ItemStack getHelmet() {
return getInventory().getHelmet();
}
@Override
public ItemStack getChestplate() {
return getInventory().getChestplate();
}
@Override
public ItemStack getLeggings() {
return getInventory().getLeggings();
}
@Override
public ItemStack getBoots() {
return getInventory().getBoots();
}
@Override
public void setHelmet(ItemStack helmet) {
getInventory().setHelmet(helmet);
}
@Override
public void setChestplate(ItemStack chestplate) {
getInventory().setChestplate(chestplate);
}
@Override
public void setLeggings(ItemStack leggings) {
getInventory().setLeggings(leggings);
}
@Override
public void setBoots(ItemStack boots) {
getInventory().setBoots(boots);
}
@Override
public float getExp() {
return getPlayer().getExp();
}
@Override
public void setExp(float exp) {
getPlayer().setExp(exp);
}
@Override
public int getLevel() {
return getPlayer().getLevel();
}
@Override
public void setLevel(int level) {
getPlayer().setLevel(level);
}
@Override
public float getHealth() {
return (float) getPlayer().getHealth();
}
private static final Method setHealthMethod = Reflection.makeMethod(Reflection.getNmsClass("EntityLiving"), "setHealth", float.class);
@Override
public void setHealth(float health) {
Reflection.callMethod(setHealthMethod, Reflection.getHandle(player), health); // Don't kill the player at zero health
}
@Override
public int getFoodLevel() {
return getPlayer().getFoodLevel();
}
@Override
public void setFoodLevel(int foodLevel) {
getPlayer().setFoodLevel(foodLevel);
}
@Override
public float getSaturation() {
return getPlayer().getSaturation();
}
@Override
public void setSaturation(float saturation) {
getPlayer().setSaturation(saturation);
}
@Override
public float getExhaustion() {
return getPlayer().getExhaustion();
}
@Override
public void setExhaustion(float exhaustion) {
getPlayer().setExhaustion(exhaustion);
}
@Override
public void setEnderchestItem(int slot, ItemStack item) {
getPlayer().getEnderChest().setItem(slot, item);
}
@Override
public ItemStack getEnderchestItem(int slot) {
return getPlayer().getEnderChest().getItem(slot);
}
@Override
public ItemStack getItem(int slot) {
return getInventory().getItem(slot);
}
@Override
public void setItem(int slot, ItemStack item) {
getInventory().setItem(slot, item);
}
@Override
public int getFireTicks() {
return getPlayer().getFireTicks();
}
@Override
public void setFireTicks(int ticks) {
getPlayer().setFireTicks(ticks);
}
@Override
public int getAir() {
return getPlayer().getRemainingAir();
}
@Override
public void setAir(int air) {
getPlayer().setRemainingAir(air);
}
@Override
public World getWorld() {
return getLocation().getWorld();
}
@Override
public Location getLocation() {
return getPlayer().getLocation();
}
@Override
public void load() {
}
@Override
public void save() {
getPlayer().saveData();
}
@Override
public void addPotionEffect(PotionEffect effect) {
getPlayer().addPotionEffect(effect);
}
@Override
public void addPotionEffects(Collection<PotionEffect> effects) {
getPlayer().addPotionEffects(effects);
}
@Override
public Collection<PotionEffect> getPotionEffects() {
return getPlayer().getActivePotionEffects();
}
@Override
public void removePotionEffect(PotionEffectType type) {
getPlayer().removePotionEffect(type);
}
public PlayerInventory getInventory() {
return getPlayer().getInventory();
}
@Override
public List<ItemStack> getArmor() {
return Arrays.asList(getPlayer().getInventory().getArmorContents());
}
@Override
public void setArmor(List<? extends ItemStack> armor) {
getPlayer().getInventory().setArmorContents(armor.toArray(new ItemStack[4]));
}
@Override
public List<ItemStack> getEnderchest() {
return Arrays.asList(getPlayer().getEnderChest().getContents());
}
@Override
public void setEnderchest(List<ItemStack> enderchest) {
getPlayer().getEnderChest().setContents(enderchest.toArray(new ItemStack[enderchest.size()]));
}
@Override
public List<ItemStack> getItems() {
return Arrays.asList(getInventory().getContents());
}
@Override
public void setItems(List<ItemStack> items) {
getPlayer().getInventory().setContents(items.toArray(new ItemStack[items.size()]));
}
@Override
public PlayerData getSnapshot() {
return new PlayerDataSnapshot(this);
}
}
|
[
"Techcable@outlook.com"
] |
Techcable@outlook.com
|
8bd1bb6e26dac198164024173a532ad3620df4e2
|
810e3c3db656b3c6b1096d3dd4b3edd4bf59d2ef
|
/src/bfs/PalindromePartitioningUsingMap.java
|
a33f0e852f78a8dcaa13c4c5947ec6e5dc181f35
|
[] |
no_license
|
MinaShar/JAVA_problems
|
852a1a2ceacc2ef4c459629efba39213a7754cb3
|
53001c2f4792bd16a66a99a100196c1bb48acd76
|
refs/heads/main
| 2023-04-11T18:54:17.214014
| 2021-04-23T02:07:06
| 2021-04-23T02:07:06
| 360,736,086
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,438
|
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 bfs;
import java.util.HashMap;
/**
*
* @author misaac
*/
public class PalindromePartitioningUsingMap {
String _string;
public PalindromePartitioningUsingMap(String s){
this._string = s;
System.out.println("Min cuts : " + Solve(0, this._string.length()-1 , new HashMap<String,Integer>() ) );
}
public boolean is_palindrome(int from , int to){
while(this._string.charAt(from) == this._string.charAt(to) && from < to){
from++;
to--;
}
if(from >= to){
return true;
}else{
return false;
}
}
public int Solve(int from, int to,HashMap<String,Integer> memo){
if(from >= to){
return 0;
}
if(memo.containsKey( Integer.toString(from)+","+Integer.toString(to) ) ){
return memo.get(Integer.toString(from)+","+Integer.toString(to));
}else if(from == to){
return 0;
}else if(is_palindrome(from, to)){
return 0;
}
int minimum = Integer.MAX_VALUE;
for(int i=from;i<to;i++){
int left_min = Integer.MAX_VALUE;int right_min = Integer.MAX_VALUE;
if( memo.containsKey(Integer.toString(from)+","+Integer.toString(i) ) ){
left_min = memo.get( Integer.toString(from)+","+Integer.toString(i) );
}else{
left_min = Solve(from, i, memo);
memo.put(Integer.toString(from)+","+Integer.toString(i) , left_min );
}
if( memo.containsKey( Integer.toString(i+1)+","+Integer.toString(to) ) ){
right_min = memo.get(Integer.toString(i+1)+","+Integer.toString(to) );
}else{
right_min = Solve(i+1, to, memo);
memo.put(Integer.toString(i+1)+","+Integer.toString(to) , right_min );
}
if(left_min + right_min + 1 < minimum ){
minimum = left_min + right_min + 1;
}
}
memo.put(Integer.toString(from)+","+Integer.toString(to) , minimum );
return minimum;
}
}
|
[
"t"
] |
t
|
19035a03b84e620ecbf301ecfa220241f2cbf9ec
|
9bf8493aa9aa2caa9adaf2660eafae0256affce4
|
/app/src/main/java/sinia/com/linkfarm/adapter/MyCouponsAdapter.java
|
b45e28618dd5e4f7829ade5bc46628e4d8c0e6bc
|
[] |
no_license
|
jackvvv/ChainFarm
|
305ac2db71f93fab2a55ec0dc856e1e4713b22b7
|
4fd5f45bd4f925a9812cf1068b22b3118a8de301
|
refs/heads/master
| 2021-01-19T01:06:23.542827
| 2016-08-08T12:18:24
| 2016-08-08T12:18:24
| 65,162,726
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,157
|
java
|
package sinia.com.linkfarm.adapter;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;
import sinia.com.linkfarm.R;
import sinia.com.linkfarm.activity.PayActivity;
import sinia.com.linkfarm.utils.ViewHolder;
/**
* Created by 忧郁的眼神 on 2016/8/5.
*/
public class MyCouponsAdapter extends BaseAdapter {
private Context context;
public MyCouponsAdapter(Context context) {
this.context = context;
}
@Override
public int getCount() {
return 5;
}
@Override
public Object getItem(int i) {
return null;
}
@Override
public long getItemId(int i) {
return 0;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
if (view == null) {
view = LayoutInflater.from(context).inflate(R.layout.item_my_coupons, null);
}
TextView tv_money = ViewHolder.get(view, R.id.tv_money);
return view;
}
}
|
[
"954828748@qq.com"
] |
954828748@qq.com
|
0ee095f444c874969af0ca7fbd3ca2c464fa5571
|
4ef8d51a73380f7b527392545f818e9c6f73f836
|
/src/Leetcode/No135.java
|
a36e6383c0a9ed7a529da6f512d4617a2ade8ea2
|
[] |
no_license
|
zhangyan-1997/leetcode
|
936ad2ffb3bce8ba00374fd4f1ed74ee4f165f38
|
6e73d1cd92cf60519c315d2387380b034111189d
|
refs/heads/master
| 2023-08-16T03:31:58.735918
| 2021-09-29T08:35:55
| 2021-09-29T08:35:55
| 378,876,590
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 800
|
java
|
package Leetcode;
import java.util.Arrays;
/**
* <h3>leetcode</h3>
* <p>分发糖果</p>
*
* @author : 张严
* @date : 2021-06-11 21:07
**/
public class No135 {
public int candy(int[] ratings) {
int[] left = new int[ratings.length];
int[] right = new int[ratings.length];
Arrays.fill(left,1);
Arrays.fill(right,1);
for (int i = 1; i < ratings.length; i++) {
if(ratings[i]>ratings[i-1]) left[i] = left[i-1] + 1;
}
for (int i = ratings.length-2; i >= 0; i--) {
if(ratings[i]>ratings[i+1]) right[i] = right[i+1] + 1;
}
int count = left[left.length-1];
for (int i = left.length-2; i >= 0; i--) {
count += Math.max(left[i],right[i]);
}
return count;
}
}
|
[
"yan15534007822@stu.xjtu.edu.cn"
] |
yan15534007822@stu.xjtu.edu.cn
|
8ea657ad44244c8a78562e2ac98f4baec2b670b6
|
6e47cd560a31c20bb483c8b692134068110473d0
|
/core/src/net/mgsx/dl10/engine/model/inputs/PlatformerInputs.java
|
ec3dc15b969d2ba37e3e5b8563325219205d5972
|
[] |
no_license
|
Jgoga/dl10
|
84a847cd3513dc19b479d9f1a40201ae622114a2
|
04857389b1b3673b13e3cc2fc59ab273fa801257
|
refs/heads/master
| 2022-03-21T04:44:41.137539
| 2019-12-29T21:23:12
| 2019-12-29T21:23:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,436
|
java
|
package net.mgsx.dl10.engine.model.inputs;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.Preferences;
import net.mgsx.dl10.engine.inputs.InputManager;
import net.mgsx.dl10.engine.model.entities.Player;
public class PlatformerInputs extends InputManager
{
public static enum PlayerCommand {
LEFT, RIGHT, JUMP, DOWN
}
public PlatformerInputs(Preferences prefs) {
super(prefs);
}
@Override
protected void setDefault() {
super.setDefault();
addCommand(PlayerCommand.LEFT, "left", "Move left");
addCommand(PlayerCommand.RIGHT, "right", "Move right");
addCommand(PlayerCommand.JUMP, "jump", "Jump");
addCommand(PlayerCommand.DOWN, "down", "Down");
// default keys
addKeys(PlayerCommand.LEFT, Input.Keys.LEFT, Input.Keys.Q, Input.Keys.A);
addKeys(PlayerCommand.RIGHT, Input.Keys.RIGHT, Input.Keys.D);
addKeys(PlayerCommand.JUMP, Input.Keys.UP, Input.Keys.Z, Input.Keys.W);
addKeys(PlayerCommand.DOWN, Input.Keys.DOWN, Input.Keys.S);
}
public void update(Player player)
{
if(controller.isOn(PlayerCommand.LEFT)){
player.velocityTarget.x = -1;
}else if(controller.isOn(PlayerCommand.RIGHT)){
player.velocityTarget.x = 1;
}else{
player.velocityTarget.x = 0;
}
if(controller.isOn(PlayerCommand.JUMP)){
player.jumpOn();
}else{
player.jumpOff();
}
if(controller.isOn(PlayerCommand.DOWN)){
player.down = true;
}else{
player.down = false;
}
}
}
|
[
"germain.aubert@gmail.com"
] |
germain.aubert@gmail.com
|
1ae1c30aa121ae3c7c691d39816885acc2ec2430
|
31a7c7509039d4d2b637068cb7f44ebc24f0517a
|
/src/main/java/org/kohsuke/github/GHEvent.java
|
8c255988b3b9b0b254e3dc0bede53621855b5330
|
[] |
no_license
|
johnou/github-api
|
026ba2ed906b0f0ce0b0586977cda4a30e2af92a
|
bf1b0edfd2843e4fe754495487fd2373752bec14
|
refs/heads/master
| 2021-01-15T21:15:19.295995
| 2013-01-06T08:34:15
| 2013-01-06T08:34:15
| 7,462,325
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 393
|
java
|
package org.kohsuke.github;
/**
* Hook event type.
*
* See http://developer.github.com/v3/events/types/
*
* @author Kohsuke Kawaguchi
*/
public enum GHEvent {
COMMIT_COMMENT,
CREATE,
DELETE,
DOWNLOAD,
FOLLOW,
FORK,
FORK_APPLY,
GIST,
GOLLUM,
ISSUE_COMMENT,
ISSUES,
MEMBER,
PUBLIC,
PULL_REQUEST,
PUSH,
TEAM_ADD,
WATCH
}
|
[
"kk@kohsuke.org"
] |
kk@kohsuke.org
|
8d3bd24023419e1b6ae87b70d56552ea996a5e49
|
e737a537195a431fe255fa3839a1e337d806a372
|
/java/src/concurrencies/fundamentals/basic/threads/SynchronizedCounter.java
|
0bea4f876932994a1c1fb12b0773ee1145dfa279
|
[] |
no_license
|
iceleeyo/concurrency
|
132e9444fe20e5c80efd5c13d477af7e5c3a5d13
|
fa8a1d1ccad92330c17ae4b7e34d17c65076a7a4
|
refs/heads/master
| 2023-05-09T09:11:36.706861
| 2020-09-10T10:52:15
| 2020-09-10T10:52:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 370
|
java
|
package basic.threads;
/**
* Project: BeginningJava8LanguageFeatures
* FileName: SynchronizedCounter
* Date: 2017-06-12
* Time: 오전 11:37
* Author: user
* Note:
* To change this template use File | Settings | File Templates.
*/
public class SynchronizedCounter {
private long value;
public synchronized long next() {
return ++value;
}
}
|
[
"tinvuquang@admicro.vn"
] |
tinvuquang@admicro.vn
|
cee61de883cf92d8fbaf129a05faa1b28b26cb67
|
3637342fa15a76e676dbfb90e824de331955edb5
|
/2s/pojo/src/test/java/com/bcgogo/utils/WXPayTest.java
|
abe9a950964c94f5bcfb4659930b49a616ea378c
|
[] |
no_license
|
BAT6188/bo
|
6147f20832263167101003bea45d33e221d0f534
|
a1d1885aed8cf9522485fd7e1d961746becb99c9
|
refs/heads/master
| 2023-05-31T03:36:26.438083
| 2016-11-03T04:43:05
| 2016-11-03T04:43:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,931
|
java
|
package com.bcgogo.utils;
import com.bcgogo.appPay.wxPay.utils.WXPaySignUtil;
import org.apache.commons.io.IOUtils;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;
/**
* Created by IntelliJ IDEA
* User: ztyu
* Date: 2015/11/29
* Time: 17:55.
*/
public class WXPayTest {
public static void main(String[] args){
try{
// Configure and open a connection to the site you will send the request
URL url = new URL("https://api.mch.weixin.qq.com/pay/unifiedorder");
URLConnection urlConnection = url.openConnection();
// 设置doOutput属性为true表示将使用此urlConnection写入数据
urlConnection.setDoOutput(true);
// 定义待写入数据的内容类型,我们设置为application/x-www-form-urlencoded类型
urlConnection.setRequestProperty("content-type", "application/xml");
// 得到请求的输出流对象
OutputStreamWriter out = new OutputStreamWriter(urlConnection.getOutputStream());
// 把数据写入请求的Body
String test = WXPaySignUtil.postXML("1", "heh", "2015102734086092860");
System.out.print(test);
out.write(test);
out.flush();
out.close();
// 从服务器读取响应
InputStream inputStream = urlConnection.getInputStream();
String encoding = urlConnection.getContentEncoding();
String body = IOUtils.toString(inputStream, encoding);
try {
Map map = XMLParser.parseXml(body);
System.out.print(map);
}catch(Exception e){
System.out.print(e.getMessage());
}
}catch(IOException e){
System.out.print(e.getMessage());
}
}
}
|
[
"ndong211@163.com"
] |
ndong211@163.com
|
5d9aaf50c1ef32d0e3aa4d856f7353d3e9a30ed2
|
3d3c49414adb244d8339e2fef182cc789c0ac517
|
/lesson-03-spring-mvc/src/main/java/ru/geekbrains/persist/User.java
|
9d117238ffa244a573a1f202231b454e9d961952
|
[] |
no_license
|
Aleksei-Mo/OOP_Practice_7_Task_1
|
1c86429df32cdf80ba133521b8fed5fe9d0d4ea5
|
a463fa2d5d23a1dff65f4daa09ac6ec140b01797
|
refs/heads/master
| 2023-07-05T20:08:55.064609
| 2021-08-04T18:27:35
| 2021-08-04T18:27:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 789
|
java
|
package ru.geekbrains.persist;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
public class User {
private Long id;
@NotBlank
private String username;
@Min(value = 18)
private Integer age;
public User() {
}
public User(String username, Integer age) {
this.username = username;
this.age = age;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
}
|
[
"usharik@mail.ru"
] |
usharik@mail.ru
|
b2283f1ad3d3f42e481193ae2e0a2f1598b728b0
|
99f3951bd06f70769cfd4c9b48f902eadd60679c
|
/shop-core/src/main/java/com/enation/app/shop/promotion/fulldiscount/tag/PromotionByActivityIdTag.java
|
aae4e603393bc3699c271c80d6fad998bef2f5da
|
[] |
no_license
|
chenzijin6/java-shop
|
de8e47c8616386421098d7819ba6e3947cb219f2
|
e21c6cd3c7ec3e90a3a6fcddcd78847f926931e0
|
refs/heads/master
| 2020-12-02T00:40:24.875439
| 2018-01-25T22:33:37
| 2018-01-25T22:33:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,947
|
java
|
package com.enation.app.shop.promotion.fulldiscount.tag;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.enation.app.shop.promotion.bonus.model.StoreBonusType;
import com.enation.app.shop.promotion.bonus.service.IB2b2cBonusManager;
import com.enation.app.shop.promotion.fulldiscount.model.po.FullDiscountGift;
import com.enation.app.shop.promotion.fulldiscount.model.vo.FullDiscountVo;
import com.enation.app.shop.promotion.fulldiscount.service.IFullDiscountGiftManager;
import com.enation.app.shop.promotion.fulldiscount.service.IFullDiscountManager;
import com.enation.framework.cache.ICache;
import com.enation.framework.taglib.BaseFreeMarkerTag;
import freemarker.template.TemplateModelException;
/**
* 根据活动id读取参与的活动信息
* @author zjp
* @since v6.4
* @version v1.0
*/
@Component
public class PromotionByActivityIdTag extends BaseFreeMarkerTag{
@Autowired
private ICache cache;
@Autowired
private IB2b2cBonusManager bonusManager;
@Autowired
private IFullDiscountGiftManager fullDiscountGiftManager;
@Autowired
private IFullDiscountManager fullDiscountManager;
@Override
protected Object exec(Map params) throws TemplateModelException {
Integer activity_id = (Integer) params.get("activity_id");
Integer shop_id = (Integer) params.get("shop_id");
FullDiscountVo fullDiscountVo = fullDiscountManager.get(activity_id);
Map map = new HashMap();
map.put("activity", fullDiscountVo);
if(fullDiscountVo.getIs_send_bonus() == 1) {
StoreBonusType storeBonusType = bonusManager.get(fullDiscountVo.getBonus_id());
map.put("bonus", storeBonusType);
}
if(fullDiscountVo.getIs_send_gift() == 1) {
FullDiscountGift fullDiscountGift = fullDiscountGiftManager.get(fullDiscountVo.getGift_id());
map.put("gift", fullDiscountGift);
}
return map;
}
}
|
[
"king0ver@yeah.net"
] |
king0ver@yeah.net
|
b3d36ad91b74eb81ae833790f50503c0961367e6
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/DVC-AN20_EMUI10.1.1/src/main/java/android/telephony/ims/ImsException.java
|
d77fd19e954044b49da5e90a42dff7181a53ba62
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,186
|
java
|
package android.telephony.ims;
import android.annotation.SystemApi;
import android.text.TextUtils;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@SystemApi
public final class ImsException extends Exception {
public static final int CODE_ERROR_SERVICE_UNAVAILABLE = 1;
public static final int CODE_ERROR_UNSPECIFIED = 0;
public static final int CODE_ERROR_UNSUPPORTED_OPERATION = 2;
private int mCode = 0;
@Retention(RetentionPolicy.SOURCE)
public @interface ImsErrorCode {
}
public ImsException(String message) {
super(getMessage(message, 0));
}
public ImsException(String message, int code) {
super(getMessage(message, code));
this.mCode = code;
}
public ImsException(String message, int code, Throwable cause) {
super(getMessage(message, code), cause);
this.mCode = code;
}
public int getCode() {
return this.mCode;
}
private static String getMessage(String message, int code) {
if (!TextUtils.isEmpty(message)) {
return message + " (code: " + code + ")";
}
return "code: " + code;
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
ddf1eb271f8eac54d5cc1da14b7c7544a126a088
|
e1b2e534eaad26e7423e3778297e7483faf1693a
|
/src/test/java/ru/excbt/datafuse/nmk/data/service/ContManagementServiceTest.java
|
517465ad4f111c901aa58d675a98257b2bc435cd
|
[] |
no_license
|
excbt/rusmetrics
|
8072ddbcf7536255ac2d50dbec352d688aaa316a
|
7f447a027da62ac852842f17002d84db5035dbde
|
refs/heads/master
| 2023-03-03T16:58:03.889675
| 2021-02-11T15:07:29
| 2021-02-11T15:07:29
| 337,735,597
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,734
|
java
|
package ru.excbt.datafuse.nmk.data.service;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.List;
import org.joda.time.LocalDate;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration;
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
import org.springframework.transaction.annotation.Transactional;
import ru.excbt.datafuse.nmk.config.jpa.JpaSupportTest;
import ru.excbt.datafuse.nmk.data.model.ContManagement;
import ru.excbt.datafuse.nmk.data.model.ContObject;
import ru.excbt.datafuse.nmk.data.support.TestConstants;
@EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class,
SpringApplicationAdminJmxAutoConfiguration.class, RepositoryRestMvcAutoConfiguration.class, WebMvcAutoConfiguration.class})
@Transactional
public class ContManagementServiceTest extends JpaSupportTest {
private static final Logger logger = LoggerFactory.getLogger(ContManagementServiceTest.class);
@Autowired
private ContManagementService contManagementService;
@Autowired
private ContObjectService contObjectService;
@Test
@Transactional
public void testIzhevskManagement() {
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy");
LocalDate defaultBeginDate = formatter.parseLocalDate("01/01/2014");
// contManagementService.selectActiveManagement(contObjectId,
// TestConstants.ORGANIZATION_TEST_IZH)
List<ContObject> list = contObjectService.findContObjectsByFullName("%Ижевск%");
if (list.size() == 0) {
return;
}
for (ContObject co : list) {
logger.info("Find Izhevsk ContObject: id:{}; fullAddress:{}", co.getId(), co.getFullAddress());
List<ContManagement> managementList = contManagementService.selectActiveManagement(co.getId());
if (managementList.size() == 0) {
ContManagement contManagement = contManagementService.createManagement(co.getId(),
TestConstants.ORGANIZATION_TEST_IZH, defaultBeginDate);
assertNotNull(contManagement);
List<ContManagement> checkList = contManagementService.selectContManagement(co.getId(),
TestConstants.ORGANIZATION_TEST_IZH);
assertTrue(checkList.size() > 0);
}
break;
}
}
}
|
[
"a.kovtonyk@excbt.ru"
] |
a.kovtonyk@excbt.ru
|
f1acb989f43b9baad0ee6a2c12141f9e09cdd26e
|
876848ad205c7b9902612dc0bc9d7c5e1f6dc838
|
/app/src/main/java/app/nisargapp/hotelorderapp/Adapter/CartAdapterTwo.java
|
ce59e971944abc92dd513ddb8c4c0f37eb727e91
|
[] |
no_license
|
nisargtrivedi/HotelOrderApp
|
5b0904ff8d2d4f5285293a7a6eccdf7c624b02e5
|
a7bdc055ef6dfedd4c3807dd349b9aeb124a5d60
|
refs/heads/main
| 2023-01-07T00:30:33.477983
| 2020-11-10T06:30:58
| 2020-11-10T06:30:58
| 311,567,145
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,479
|
java
|
package app.nisargapp.hotelorderapp.Adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.squareup.picasso.Picasso;
import java.util.List;
import app.nisargapp.hotelorderapp.Model.tblCart;
import app.nisargapp.hotelorderapp.R;
public class CartAdapterTwo extends RecyclerView.Adapter<CartAdapterTwo.ViewHolder> {
public List<tblCart> list;
Context context;
public String name;
OnCartItemManagement onCartItemManagement;
public void ItemCLick(OnCartItemManagement onCartItemManagement){
this.onCartItemManagement=onCartItemManagement;
}
public CartAdapterTwo(Context context, List<tblCart> list) {
this.context = context;
this.list = list;
}
public class ViewHolder extends RecyclerView.ViewHolder {
public TextView name,qty,total,plus,minus,topping;
public ImageView img;
public LinearLayout cv;
public Button delete;
public ViewHolder(View view) {
super(view);
name = view.findViewById(R.id.name);
img = view.findViewById(R.id.img);
qty= view.findViewById(R.id.qty);
total= view.findViewById(R.id.price);
}
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(context)
.inflate(R.layout.row_two, parent, false);
return new ViewHolder(itemView);
}
@Override
public void onBindViewHolder(final ViewHolder holder, final int position) {
// setFadeAnimation(holder.itemView);
final tblCart task = list.get(position);
try {
holder.name.setText(task.NAME+"\n"+task.EXTRA_DETAILS);
holder.qty.setText(task.QUANTITY+"");
holder.total.setText("Rs. "+((task.QUANTITY*task.PRICE)));
}catch (Exception ex){
}
}
@Override
public int getItemCount() {
return list.size();
}
public void setFadeAnimation(View view) {
AlphaAnimation anim = new AlphaAnimation(0.0f, 1.0f);
anim.setDuration(500);
view.startAnimation(anim);
}
}
|
[
"nisarg.trivedi@vovance.com"
] |
nisarg.trivedi@vovance.com
|
4f4a188f678fa46ac969de91bd9f5852f65d3cf9
|
f492b061b94a69b127844ad61c3fdc9fa2f3298f
|
/zk-common/src/main/java/com/zk/monitor/common/sensitive/SensitiveInfo.java
|
11667ebbee348e6f8f35b78ebbbefaa520bbe949
|
[] |
no_license
|
iosdouble/zk-monitor
|
b4cb0c0a15cf9cbc8cb1d73c0cffe0ba6574973d
|
a4fe6a0cdc5b328969a49875a39158c3586a5810
|
refs/heads/master
| 2023-01-14T15:01:30.928811
| 2020-11-18T08:55:10
| 2020-11-18T08:55:10
| 312,130,740
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 577
|
java
|
package com.zk.monitor.common.sensitive;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* com.zk.monitor.common.sensitive
* create by admin nihui
* create time 2020/11/12
* version 1.0
* TODO 脱敏注解类
**/
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotationsInside
@JsonSerialize(using = SensitiveInfoSerialize.class)
public @interface SensitiveInfo {
public SensitiveType value();
}
|
[
"18202504057@163.com"
] |
18202504057@163.com
|
235efbff902d6d9624bfd8b68cd89f1926cd28ac
|
f490119b5f7eea314c3049fc212ff77dd29a1e67
|
/core/src/main/java/com/alibaba/alink/operator/batch/nlp/Word2VecPredictBatchOp.java
|
5c1496d9684f163ff9a4e8fd6a7af8109f88be4d
|
[
"Apache-2.0"
] |
permissive
|
lethetann/Alink
|
b4cb3ddab211baa77e3a93a9b099ddcde662b903
|
a483a8a25ecd136ad4e18709c17c5a242c7e76fa
|
refs/heads/master
| 2021-10-27T17:11:40.158889
| 2021-10-08T10:05:41
| 2021-10-08T10:05:41
| 229,357,943
| 0
| 0
|
Apache-2.0
| 2020-08-06T01:30:39
| 2019-12-21T00:55:32
|
Java
|
UTF-8
|
Java
| false
| false
| 1,244
|
java
|
package com.alibaba.alink.operator.batch.nlp;
import org.apache.flink.ml.api.misc.param.Params;
import com.alibaba.alink.operator.batch.utils.ModelMapBatchOp;
import com.alibaba.alink.operator.common.nlp.Word2VecModelMapper;
import com.alibaba.alink.params.nlp.Word2VecPredictParams;
/**
* Word2vec is a group of related models that are used to produce word embeddings.
* These models are shallow, two-layer neural networks that are trained to reconstruct
* linguistic contexts of words.
*
* <p>reference:
* <p>https://en.wikipedia.org/wiki/Word2vec
* <p>Mikolov, Tomas; et al. (2013). "Efficient Estimation of Word Representations in Vector Space"
* <p>Mikolov, Tomas; Sutskever, Ilya; Chen, Kai; Corrado, Greg S.; Dean, Jeff (2013).
* Distributed representations of words and phrases and their compositionality.
* <p>https://code.google.com/archive/p/word2vec/
*/
public class Word2VecPredictBatchOp extends ModelMapBatchOp <Word2VecPredictBatchOp>
implements Word2VecPredictParams <Word2VecPredictBatchOp> {
private static final long serialVersionUID = 1415195739005424277L;
public Word2VecPredictBatchOp() {
this(null);
}
public Word2VecPredictBatchOp(Params params) {
super(Word2VecModelMapper::new, params);
}
}
|
[
"xuyang1706@gmail.com"
] |
xuyang1706@gmail.com
|
ef8ac2b9f899d03eaca08e039c6fb5759722af82
|
a51778ee2a96630785541ce331e178ce15bdc7c4
|
/skola/Fel_bc/1.semestr/Algoritmizace/PrikladyPrednasky2007/Alg7/src/alg7/KontejnerRadku.java
|
6c62b80282a8e4bf731d52a0b27d2468e11d5ae1
|
[] |
no_license
|
majacQ/migrace_databaze
|
45ed405ab0f0fc31578264c983a4f2e4beacb528
|
51cc735d7db6db1a6454e51ae596e09711783104
|
refs/heads/master
| 2023-05-08T19:01:09.294920
| 2021-05-24T20:15:33
| 2021-05-24T20:15:33
| null | 0
| 0
| null | null | null | null |
WINDOWS-1250
|
Java
| false
| false
| 611
|
java
|
package alg7;
import java.util.ArrayList;
import java.util.*;
public class KontejnerRadku {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList radky = new ArrayList();
System.out.println("zadejte řádky zakončené prázdným řádkem");
String radek = sc.nextLine();
while (!radek.equals("")) {
radky.add(radek);
radek = sc.nextLine();
}
System.out.println("výpis řádků v opačném pořadí");
for (int i=radky.size()-1; i>=0; i--)
System.out.println(radky.get(i));
String prvni = (String)radky.get(0);
}
}
|
[
"wox2@seznam.cz"
] |
wox2@seznam.cz
|
f4174438ad335e7589d30f881cb497ba3829a436
|
40a6d17d2fd7bd7f800d5562d8bb9a76fb571ab4
|
/pxlab/src/main/java/de/hardcode/jxinput/virtual/VirtualAxis.java
|
2b6b976f0c3d37248209191c5f95fc60c4efd47a
|
[
"MIT"
] |
permissive
|
manuelgentile/pxlab
|
cb6970e2782af16feb1f8bf8e71465ebc48aa683
|
c8d29347d36c3e758bac4115999fc88143c84f87
|
refs/heads/master
| 2021-01-13T02:26:40.208893
| 2012-08-08T13:49:53
| 2012-08-08T13:49:53
| 5,121,970
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,476
|
java
|
//**********************************************************************************************
// (C) Copyright 2002 by Dipl. Phys. Joerg Plewe, HARDCODE Development
// All rights reserved. Copying, modification,
// distribution or publication without the prior written
// consent of the author is prohibited.
//
// Created on 11. April 2002, 23:40
//**********************************************************************************************
package de.hardcode.jxinput.virtual;
import de.hardcode.jxinput.Axis;
import de.hardcode.jxinput.Button;
import java.security.InvalidParameterException;
/**
*
* @author J�rg Plewe
*/
public class VirtualAxis implements Axis {
private int mType = Axis.TRANSLATION;
private final int mID;
private String mName = "VirtualAxis";
private double mCurrentValue = 0;
private Button mButtonIncrease = null;
private Button mButtonDecrease = null;
private double mSpeed = 1.0 / 500.0;
private double mSpringSpeed = 1.0 / 500.0;
/**
* Creates a new instance of VirtualAxis.
*/
public VirtualAxis(int id) {
mID = id;
}
/**
* Set the type of this axis to be either <code>Axis.ROTATION</code>,
* <code>Axis.TRANSLATION</code> or <code>Axis.SLIDER</code>.
*/
public void setType(int type) {
if (Axis.ROTATION != type && Axis.TRANSLATION != type
&& Axis.SLIDER != type)
throw new InvalidParameterException("Invalid type for axis!");
mType = type;
}
/**
* Update features under my control.
*/
final void update(long deltaT) {
double change = mSpeed * deltaT;
double springchange = mSpringSpeed * deltaT;
boolean doincrease = (null != mButtonIncrease && mButtonIncrease
.getState());
boolean dodecrease = (null != mButtonDecrease && mButtonDecrease
.getState());
boolean iscontrolled = doincrease || dodecrease;
double controlledchange = 0.0;
if (doincrease)
controlledchange += change;
if (dodecrease)
controlledchange -= change;
mCurrentValue += controlledchange;
if (mCurrentValue > 0.0 && !doincrease) {
springchange = Math.min(mCurrentValue, springchange);
mCurrentValue -= springchange;
}
if (mCurrentValue < 0.0 && !dodecrease) {
springchange = Math.min(-mCurrentValue, springchange);
mCurrentValue += springchange;
}
//
// Hold value within range
//
if (mCurrentValue > 1.0)
mCurrentValue = 1.0;
double lowerlimit = Axis.SLIDER == mType ? 0.0 : -1.0;
if (mCurrentValue < lowerlimit)
mCurrentValue = lowerlimit;
}
/**
* Set the button to increase the axis for a single button axis.
*/
public final void setIncreaseButton(Button b) {
if (null == b)
throw new InvalidParameterException("Button may not be null!");
mButtonIncrease = b;
}
/**
* Set the buttons to increase and descrease the axis.
*/
public final void setButtons(Button increase, Button decrease) {
if (null == increase || null == decrease)
throw new InvalidParameterException("Buttons may not be null!");
mButtonIncrease = increase;
mButtonDecrease = decrease;
}
public final void setSpeed(double speed) {
mSpeed = speed;
}
public final void setSpringSpeed(double springspeed) {
mSpringSpeed = springspeed;
}
public final void setTimeFor0To1(int ms) {
if (0 >= ms)
mSpeed = 0.0;
else
mSpeed = 1.0 / ms;
}
public final void setTimeFor1To0(int ms) {
if (0 >= ms)
mSpringSpeed = 0.0;
else
mSpringSpeed = 1.0 / ms;
}
public final void setName(String name) {
mName = name;
}
// *********************************************************************************************
//
// Implement Axis
//
// *********************************************************************************************
/**
* Features may have a name provided e.g. by the driver.
*/
public String getName() {
return mName;
}
/**
* Inform about the resolution of the axis.
*
* @return resolution, e.g. 2^-16
*/
public double getResolution() {
return 1.0 / 65536.0;
}
/**
* Retrieve the type of the axis.
*
* @return [ TRANSLATION | ROTATION | SLIDER ]
*/
public int getType() {
return mType;
}
/**
* Returns the current value of the axis. The range of the result depends on
* the axis type.
*
* @return value [-1.0,1.0] or [0.0,1.0]
*/
public double getValue() {
return mCurrentValue;
}
/**
* Denote wether this feature has changed beyond it's resolution since it
* got last updated.
*/
public boolean hasChanged() {
return true;
}
}
|
[
"manuelgentile@gmail.com"
] |
manuelgentile@gmail.com
|
49a4c76eff2025dc82e5b7234a731f63742557aa
|
e652d775c8443b399ecfaec6fe427583aa6e7d94
|
/Molap/Molap-Core/agitar/test/com/huawei/unibi/molap/datastorage/store/impl/key/compressed/CompressedSingleArrayKeyInMemoryStoreAgitarTest.java
|
3516b026dfaf78ba91eed942f4562581cd40a992
|
[] |
no_license
|
gvramana/carbondata
|
52d95dcb44546b71630c0680b42f8f76dacf9f96
|
3e7af59daa726d61d6437e0ed74efe4f28e1a249
|
refs/heads/master
| 2020-12-28T09:28:04.153050
| 2016-03-14T14:24:12
| 2016-03-14T14:24:12
| 54,021,189
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,174
|
java
|
/**
* Generated by Agitar build: AgitarOne Version 5.3.0.000022 (Build date: Jan 04, 2012) [5.3.0.000022]
* JDK Version: 1.6.0_14
*
* Generated on 29 Jul, 2013 2:29:40 PM
* Time to generate: 00:14.507 seconds
*
*/
package com.huawei.unibi.molap.datastorage.store.impl.key.compressed;
import com.agitar.lib.junit.AgitarTestCase;
import com.huawei.unibi.molap.datastorage.store.FileHolder;
import com.huawei.unibi.molap.datastorage.store.impl.FileHolderImpl;
import java.nio.ByteBuffer;
public class CompressedSingleArrayKeyInMemoryStoreAgitarTest extends AgitarTestCase {
public Class getTargetClass() {
return CompressedSingleArrayKeyInMemoryStore.class;
}
public void testConstructor() throws Throwable {
CompressedSingleArrayKeyInMemoryStore compressedSingleArrayKeyInMemoryStore = new CompressedSingleArrayKeyInMemoryStore(100, 1000);
assertEquals("compressedSingleArrayKeyInMemoryStore.totalNumberOfElements", 100, compressedSingleArrayKeyInMemoryStore.totalNumberOfElements);
assertEquals("compressedSingleArrayKeyInMemoryStore.sizeOfEachElement", 1000, compressedSingleArrayKeyInMemoryStore.sizeOfEachElement);
assertEquals("compressedSingleArrayKeyInMemoryStore.datastore.length", 100000, compressedSingleArrayKeyInMemoryStore.datastore.length);
}
public void testConstructor1() throws Throwable {
CompressedSingleArrayKeyInMemoryStore compressedSingleArrayKeyInMemoryStore = new CompressedSingleArrayKeyInMemoryStore(0, 100, 100L, "testCompressedSingleArrayKeyInMemoryStoreFilePath", new FileHolderImpl(), 1000);
assertEquals("compressedSingleArrayKeyInMemoryStore.totalNumberOfElements", 0, compressedSingleArrayKeyInMemoryStore.totalNumberOfElements);
assertEquals("compressedSingleArrayKeyInMemoryStore.datastore.length", 1000, compressedSingleArrayKeyInMemoryStore.datastore.length);
assertEquals("compressedSingleArrayKeyInMemoryStore.sizeOfEachElement", 100, compressedSingleArrayKeyInMemoryStore.sizeOfEachElement);
}
public void testConstructorThrowsIllegalArgumentException() throws Throwable {
FileHolder fileHolder = new FileHolderImpl();
try {
new CompressedSingleArrayKeyInMemoryStore(0, 100, 100L, "testCompressedSingleArrayKeyInMemoryStoreFilePath", fileHolder, -1);
fail("Expected IllegalArgumentException to be thrown");
} catch (IllegalArgumentException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertThrownBy(ByteBuffer.class, ex);
}
}
public void testConstructorThrowsNegativeArraySizeException() throws Throwable {
try {
new CompressedSingleArrayKeyInMemoryStore(100, -1);
fail("Expected NegativeArraySizeException to be thrown");
} catch (NegativeArraySizeException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertThrownBy(AbstractCompressedSingleArrayStore.class, ex);
}
}
public void testConstructorThrowsNegativeArraySizeException1() throws Throwable {
FileHolder fileHolder = new FileHolderImpl();
try {
new CompressedSingleArrayKeyInMemoryStore(100, -1, 100L, "testCompressedSingleArrayKeyInMemoryStoreFilePath", fileHolder, 1000);
fail("Expected NegativeArraySizeException to be thrown");
} catch (NegativeArraySizeException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertThrownBy(AbstractCompressedSingleArrayStore.class, ex);
}
}
public void testConstructorThrowsNullPointerException() throws Throwable {
try {
new CompressedSingleArrayKeyInMemoryStore(0, 100, 100L, "testCompressedSingleArrayKeyInMemoryStoreFilePath", null, 1000);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertThrownBy(CompressedSingleArrayKeyInMemoryStore.class, ex);
}
}
}
|
[
"chenliang613@huawei.com"
] |
chenliang613@huawei.com
|
5f231ad64f99c1a7a0cf39ab9435a92b4db7b8fa
|
a1f9c390703c613f0ba91f2a065cb6c99de22de5
|
/src/_00_practice_java/treeset/TestTreeset.java
|
5870c615ffddefb9c65fad6e025fb8c0cf62bcbf
|
[] |
no_license
|
thanhtai18021994/C1220G2_BuiThanhTai_Module2
|
b85010f3ffa274cb583773a48406c6c60cc033c3
|
9cd6d69d0e341e2fb26300da31cfb98993305192
|
refs/heads/main
| 2023-03-24T09:41:35.398648
| 2021-03-16T10:14:22
| 2021-03-16T10:14:22
| 334,828,733
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 661
|
java
|
package _00_practice_java.treeset;
import _00_practice_java._00_comparator_comparable.compararator.Person;
import java.util.ArrayList;
import java.util.List;
import java.util.TreeMap;
import java.util.TreeSet;
public class TestTreeset<P> {
public static void main(String[] args) {
TreeSet<Person> treeSet=new TreeSet<>();
List<Person> people=new ArrayList<>();
people.add(new Person(45,"nam",345));
people.add(new Person(45,"nam",345));
people.add(new Person(45,"tan",345));
for (int i=0;i<people.size();i++){
treeSet.add(people.get(i));
}
System.out.println(treeSet);
}
}
|
[
"taibui18021994@gmail.com"
] |
taibui18021994@gmail.com
|
412a3127224e204229d606eddbe20d6a298729ba
|
e623146ee848f27bb81601ff3f85b8010c097dfd
|
/src/main/java/org/jetlinks/core/metadata/ValueWrapper.java
|
bfd4e6859467b4341a4fe8f72b49cd7a5ccc9f0d
|
[] |
no_license
|
heibaifu/jetlinks-core
|
4f22ecbf3238a2658d07027b68bdb700dab2fa3d
|
88906bf4f10f2510e78d8c2fbb2a76a65be52b85
|
refs/heads/master
| 2020-08-15T23:46:16.849947
| 2019-09-09T12:22:56
| 2019-09-09T12:22:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 626
|
java
|
package org.jetlinks.core.metadata;
import java.util.List;
import java.util.Optional;
import java.util.function.Supplier;
/**
* @author zhouhao
* @since 1.0.0
*/
public interface ValueWrapper {
Optional<Object> value();
Optional<String> asString();
Optional<Integer> asInteger();
Optional<Boolean> asBoolean();
<T> Optional<T> as(Class<T> type);
<T> Optional<List<T>> asList(Class<T> type);
default ValueWrapper notPresent(Supplier<ValueWrapper> supplier) {
if (!isPresent()) {
return supplier.get();
}
return this;
}
boolean isPresent();
}
|
[
"admin@hsweb.me"
] |
admin@hsweb.me
|
d5b3d4f6deadaf01c564ad828a35ab45e745869e
|
c585888f406869d0e0182be8557b3e33ce743ff0
|
/src/main/java/com/android/tools/r8/cf/code/CfMultiANewArray.java
|
2209a805ffeb37909c6dc797725f92e70666466e
|
[
"BSD-3-Clause",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
Yinkozi/R8
|
25623bfa8d67f553ea737472d6835740f9fc8099
|
af71090436ca05106ff3ac08c9533ed524163029
|
refs/heads/main
| 2023-01-04T00:13:30.647859
| 2020-10-21T10:40:00
| 2020-10-21T10:40:00
| 305,987,826
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,699
|
java
|
// Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.cf.code;
import com.android.tools.r8.cf.CfPrinter;
import com.android.tools.r8.graph.AppView;
import com.android.tools.r8.graph.CfCompareHelper;
import com.android.tools.r8.graph.DexClassAndMethod;
import com.android.tools.r8.graph.DexItemFactory;
import com.android.tools.r8.graph.DexProgramClass;
import com.android.tools.r8.graph.DexType;
import com.android.tools.r8.graph.GraphLens;
import com.android.tools.r8.graph.InitClassLens;
import com.android.tools.r8.graph.ProgramMethod;
import com.android.tools.r8.graph.UseRegistry;
import com.android.tools.r8.ir.conversion.CfSourceCode;
import com.android.tools.r8.ir.conversion.CfState;
import com.android.tools.r8.ir.conversion.IRBuilder;
import com.android.tools.r8.ir.conversion.LensCodeRewriterUtils;
import com.android.tools.r8.ir.optimize.Inliner.ConstraintWithTarget;
import com.android.tools.r8.ir.optimize.InliningConstraints;
import com.android.tools.r8.naming.NamingLens;
import com.android.tools.r8.utils.InternalOptions;
import java.util.Comparator;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
public class CfMultiANewArray extends CfInstruction {
private final DexType type;
private final int dimensions;
public CfMultiANewArray(DexType type, int dimensions) {
this.type = type;
this.dimensions = dimensions;
}
public DexType getType() {
return type;
}
public int getDimensions() {
return dimensions;
}
@Override
public int getCompareToId() {
return Opcodes.MULTIANEWARRAY;
}
@Override
public int internalCompareTo(CfInstruction other, CfCompareHelper helper) {
return Comparator.comparingInt(CfMultiANewArray::getDimensions)
.thenComparing(CfMultiANewArray::getType, DexType::slowCompareTo)
.compare(this, ((CfMultiANewArray) other));
}
@Override
public void write(
AppView<?> appView,
ProgramMethod context,
DexItemFactory dexItemFactory,
GraphLens graphLens,
InitClassLens initClassLens,
NamingLens namingLens,
LensCodeRewriterUtils rewriter,
MethodVisitor visitor) {
DexType rewrittenType = graphLens.lookupType(getType());
visitor.visitMultiANewArrayInsn(namingLens.lookupInternalName(rewrittenType), dimensions);
}
@Override
public void print(CfPrinter printer) {
printer.print(this);
}
@Override
void internalRegisterUse(UseRegistry registry, DexClassAndMethod context) {
registry.registerTypeReference(type);
}
@Override
public boolean canThrow() {
return true;
}
@Override
public void buildIR(IRBuilder builder, CfState state, CfSourceCode code) {
InternalOptions options = builder.appView.options();
assert !options.isGeneratingDex();
int[] dimensions = state.popReverse(this.dimensions);
builder.addMultiNewArray(type, state.push(type).register, dimensions);
}
@Override
public ConstraintWithTarget inliningConstraint(
InliningConstraints inliningConstraints, DexProgramClass context) {
return inliningConstraints.forInvokeMultiNewArray(type, context);
}
@Override
public void evaluate(
CfFrameVerificationHelper frameBuilder,
DexType context,
DexType returnType,
DexItemFactory factory,
InitClassLens initClassLens) {
// ..., count1, [count2, ...] →
// ..., arrayref
for (int i = 0; i < dimensions; i++) {
frameBuilder.pop(factory.intType);
}
frameBuilder.push(type);
}
}
|
[
"zavidan@gmail.com"
] |
zavidan@gmail.com
|
5989bf2f535cf316cebe3d9a491bb0a510bb8ce7
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/27/27_b4787cef39bcbd37c0e01d38efdeca1192504902/VarDecl/27_b4787cef39bcbd37c0e01d38efdeca1192504902_VarDecl_s.java
|
df5d14eb5f7cc6876a08d6f096e904e43ec4b77d
|
[] |
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
| 2,474
|
java
|
package syntaxtree;
import bytecode.*;
import bytecode.CodeStruct;
import bytecode.CodeFile;
import bytecode.CodeProcedure;
import bytecode.type.*;
public class VarDecl extends Decl {
String name;
String type;
public VarDecl (String name, String type) {
this.name = name;
this.type = type;
}
/*
@Override
public void generateCode(CodeFile file, CodeStruct struct, CodeProcedure proc){
CodeType ct;
if(type.equals("float"))
ct = new FloatType();
else if(type.equals("int"))
ct = new IntType();
else if(type.equals("boolean"))
ct = new BoolType();
else if(type.equals("string"))
ct = new StringType();
else
ct = new CodeType(); //correct? what if typeof some object?
if(struct != null){//if program class/struct
struct.addVariable(name, ct);
}else{//if program procedure
prod.addVariable(name, ct);
}
}
*/
// Add variable to CodeStruct
@Override
public void generateCode(CodeFile file, CodeStruct struct, CodeProcedure proc) {
//Only CodeFile given, assume global variable
if ((file != null) && (struct == null) && (proc == null) ){
System.out.println("ADDING VAR '" + this.name + "' TO GLOBAL SCOPE");
file.addVariable(this.name);
}
// If struct is given we assume struct declaration
else if (struct != null) {
System.out.println("ADDING VAR '" + this.name + "' TO STRUCT");
if(type.equals("float"))
struct.addVariable(this.name, FloatType.TYPE);
else if(type.equals("int"))
struct.addVariable(this.name, IntType.TYPE);
else if(type.equals("boolean"))
struct.addVariable(this.name, BoolType.TYPE);
else if(type.equals("string"))
struct.addVariable(this.name, StringType.TYPE);
}
}
@Override
public String semanticChecker(SymbolTable table){
//go to top symboltable level
SymbolTable top = table;
SymbolTable test;
while(top.ascend() != null){
top = top.ascend();
}
test = null;
//check if variable exist
if(top.locate(name) != null || (test = table.locate(name)) != null){
return "semantic error"; //syntaxError
}
//create new entry
table.newEntry(type, name);
return type; //yeah baby!
}
@Override
public String printAst(int offset) {
return spaces(offset) + "(VAR_DECL (TYPE " + type + ") (NAME " + name +"))\n";
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
3e93e50820f2e43f1ff179111b3a446b0bb4a4b8
|
b111b77f2729c030ce78096ea2273691b9b63749
|
/db-example-large-multi-project/project60/src/main/java/org/gradle/test/performance/mediumjavamultiproject/project60/p300/Production6007.java
|
044d66482dabdd58e4851e87b106f9f8bb95b5bc
|
[] |
no_license
|
WeilerWebServices/Gradle
|
a1a55bdb0dd39240787adf9241289e52f593ccc1
|
6ab6192439f891256a10d9b60f3073cab110b2be
|
refs/heads/master
| 2023-01-19T16:48:09.415529
| 2020-11-28T13:28:40
| 2020-11-28T13:28:40
| 256,249,773
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,968
|
java
|
package org.gradle.test.performance.mediumjavamultiproject.project60.p300;
public class Production6007 {
private Production6004 property0;
public Production6004 getProperty0() {
return property0;
}
public void setProperty0(Production6004 value) {
property0 = value;
}
private Production6005 property1;
public Production6005 getProperty1() {
return property1;
}
public void setProperty1(Production6005 value) {
property1 = value;
}
private Production6006 property2;
public Production6006 getProperty2() {
return property2;
}
public void setProperty2(Production6006 value) {
property2 = value;
}
private String property3;
public String getProperty3() {
return property3;
}
public void setProperty3(String value) {
property3 = value;
}
private String property4;
public String getProperty4() {
return property4;
}
public void setProperty4(String value) {
property4 = value;
}
private String property5;
public String getProperty5() {
return property5;
}
public void setProperty5(String value) {
property5 = value;
}
private String property6;
public String getProperty6() {
return property6;
}
public void setProperty6(String value) {
property6 = value;
}
private String property7;
public String getProperty7() {
return property7;
}
public void setProperty7(String value) {
property7 = value;
}
private String property8;
public String getProperty8() {
return property8;
}
public void setProperty8(String value) {
property8 = value;
}
private String property9;
public String getProperty9() {
return property9;
}
public void setProperty9(String value) {
property9 = value;
}
}
|
[
"nateweiler84@gmail.com"
] |
nateweiler84@gmail.com
|
d45cc7d0ad01a3136a40f36086a701d29087d88e
|
2d62bbd24ebc6c2b109d39378b1e75985afbed81
|
/bundles/Toometa/toometa.options/src/options/DecisionStatusEnum.java
|
d1c8035b35461f20168651448a9fccbe41f35fdd
|
[
"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
| 7,434
|
java
|
/**
*/
package options;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Decision Status Enum</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see options.OptionsPackage#getDecisionStatusEnum()
* @model
* @generated
*/
public enum DecisionStatusEnum implements Enumerator {
/**
* The '<em><b>Open</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OPEN_VALUE
* @generated
* @ordered
*/
OPEN(0, "open", "open"),
/**
* The '<em><b>Taken</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TAKEN_VALUE
* @generated
* @ordered
*/
TAKEN(1, "taken", "taken"),
/**
* The '<em><b>Reviewed</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #REVIEWED_VALUE
* @generated
* @ordered
*/
REVIEWED(2, "reviewed", "reviewed"),
/**
* The '<em><b>Obsolete</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OBSOLETE_VALUE
* @generated
* @ordered
*/
OBSOLETE(3, "obsolete", "obsolete"),
/**
* The '<em><b>Replaced</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #REPLACED_VALUE
* @generated
* @ordered
*/
REPLACED(4, "replaced", "replaced"),
/**
* The '<em><b>In Conflict</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #IN_CONFLICT_VALUE
* @generated
* @ordered
*/
IN_CONFLICT(5, "inConflict", "inConflict");
/**
* The '<em><b>Open</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Open</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #OPEN
* @model name="open"
* @generated
* @ordered
*/
public static final int OPEN_VALUE = 0;
/**
* The '<em><b>Taken</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Taken</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TAKEN
* @model name="taken"
* @generated
* @ordered
*/
public static final int TAKEN_VALUE = 1;
/**
* The '<em><b>Reviewed</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Reviewed</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #REVIEWED
* @model name="reviewed"
* @generated
* @ordered
*/
public static final int REVIEWED_VALUE = 2;
/**
* The '<em><b>Obsolete</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Obsolete</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #OBSOLETE
* @model name="obsolete"
* @generated
* @ordered
*/
public static final int OBSOLETE_VALUE = 3;
/**
* The '<em><b>Replaced</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Replaced</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #REPLACED
* @model name="replaced"
* @generated
* @ordered
*/
public static final int REPLACED_VALUE = 4;
/**
* The '<em><b>In Conflict</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>In Conflict</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #IN_CONFLICT
* @model name="inConflict"
* @generated
* @ordered
*/
public static final int IN_CONFLICT_VALUE = 5;
/**
* An array of all the '<em><b>Decision Status Enum</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final DecisionStatusEnum[] VALUES_ARRAY =
new DecisionStatusEnum[] {
OPEN,
TAKEN,
REVIEWED,
OBSOLETE,
REPLACED,
IN_CONFLICT,
};
/**
* A public read-only list of all the '<em><b>Decision Status Enum</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<DecisionStatusEnum> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Decision Status Enum</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param literal the literal.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static DecisionStatusEnum get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
DecisionStatusEnum result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Decision Status Enum</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name the name.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static DecisionStatusEnum getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
DecisionStatusEnum result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Decision Status Enum</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the integer value.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static DecisionStatusEnum get(int value) {
switch (value) {
case OPEN_VALUE: return OPEN;
case TAKEN_VALUE: return TAKEN;
case REVIEWED_VALUE: return REVIEWED;
case OBSOLETE_VALUE: return OBSOLETE;
case REPLACED_VALUE: return REPLACED;
case IN_CONFLICT_VALUE: return IN_CONFLICT;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private DecisionStatusEnum(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //DecisionStatusEnum
|
[
"layornos@gmail.com"
] |
layornos@gmail.com
|
1ab3c50c2fba04c4948a1131dbcdc76262ebd4cb
|
a6a6fb681bc0222e16454bb3ddb79696e6ea1ad5
|
/disassembly_2020-07-06/sources/com/google/android/gms/common/internal/GmsClient.java
|
93406248205871be7c2649fd37fc9ed448abdb56
|
[] |
no_license
|
ThePBone/GalaxyBudsLive-Disassembly
|
6f9c1bf03c0fd27689dcc2440f754039ac54b7a1
|
ad119a91b20904f8efccc797f3084005811934c8
|
refs/heads/master
| 2022-11-23T13:20:54.555338
| 2020-07-28T21:33:30
| 2020-07-28T21:33:30
| 282,281,940
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,101
|
java
|
package com.google.android.gms.common.internal;
import android.accounts.Account;
import android.content.Context;
import android.os.Handler;
import android.os.IInterface;
import android.os.Looper;
import com.google.android.gms.common.Feature;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.common.api.Api;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.Scope;
import com.google.android.gms.common.internal.BaseGmsClient;
import com.google.android.gms.common.internal.GmsClientEventManager;
import java.util.Set;
public abstract class GmsClient<T extends IInterface> extends BaseGmsClient<T> implements Api.Client, GmsClientEventManager.GmsClientEventState {
private final Set<Scope> mScopes;
private final ClientSettings zaet;
private final Account zax;
public Feature[] getRequiredFeatures() {
return new Feature[0];
}
/* access modifiers changed from: protected */
public Set<Scope> validateScopes(Set<Scope> set) {
return set;
}
protected GmsClient(Context context, Handler handler, int i, ClientSettings clientSettings) {
this(context, handler, GmsClientSupervisor.getInstance(context), GoogleApiAvailability.getInstance(), i, clientSettings, (GoogleApiClient.ConnectionCallbacks) null, (GoogleApiClient.OnConnectionFailedListener) null);
}
protected GmsClient(Context context, Looper looper, int i, ClientSettings clientSettings, GoogleApiClient.ConnectionCallbacks connectionCallbacks, GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
this(context, looper, GmsClientSupervisor.getInstance(context), GoogleApiAvailability.getInstance(), i, clientSettings, (GoogleApiClient.ConnectionCallbacks) Preconditions.checkNotNull(connectionCallbacks), (GoogleApiClient.OnConnectionFailedListener) Preconditions.checkNotNull(onConnectionFailedListener));
}
protected GmsClient(Context context, Looper looper, int i, ClientSettings clientSettings) {
this(context, looper, GmsClientSupervisor.getInstance(context), GoogleApiAvailability.getInstance(), i, clientSettings, (GoogleApiClient.ConnectionCallbacks) null, (GoogleApiClient.OnConnectionFailedListener) null);
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
protected GmsClient(Context context, Looper looper, GmsClientSupervisor gmsClientSupervisor, GoogleApiAvailability googleApiAvailability, int i, ClientSettings clientSettings, GoogleApiClient.ConnectionCallbacks connectionCallbacks, GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
super(context, looper, gmsClientSupervisor, googleApiAvailability, i, zaa(connectionCallbacks), zaa(onConnectionFailedListener), clientSettings.getRealClientClassName());
this.zaet = clientSettings;
this.zax = clientSettings.getAccount();
this.mScopes = zaa(clientSettings.getAllRequestedScopes());
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
protected GmsClient(Context context, Handler handler, GmsClientSupervisor gmsClientSupervisor, GoogleApiAvailability googleApiAvailability, int i, ClientSettings clientSettings, GoogleApiClient.ConnectionCallbacks connectionCallbacks, GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
super(context, handler, gmsClientSupervisor, googleApiAvailability, i, zaa(connectionCallbacks), zaa(onConnectionFailedListener));
this.zaet = (ClientSettings) Preconditions.checkNotNull(clientSettings);
this.zax = clientSettings.getAccount();
this.mScopes = zaa(clientSettings.getAllRequestedScopes());
}
private final Set<Scope> zaa(Set<Scope> set) {
Set<Scope> validateScopes = validateScopes(set);
for (Scope contains : validateScopes) {
if (!set.contains(contains)) {
throw new IllegalStateException("Expanding scopes is not permitted, use implied scopes instead");
}
}
return validateScopes;
}
public final Account getAccount() {
return this.zax;
}
/* access modifiers changed from: protected */
public final ClientSettings getClientSettings() {
return this.zaet;
}
/* access modifiers changed from: protected */
public final Set<Scope> getScopes() {
return this.mScopes;
}
private static BaseGmsClient.BaseConnectionCallbacks zaa(GoogleApiClient.ConnectionCallbacks connectionCallbacks) {
if (connectionCallbacks == null) {
return null;
}
return new zaf(connectionCallbacks);
}
private static BaseGmsClient.BaseOnConnectionFailedListener zaa(GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
if (onConnectionFailedListener == null) {
return null;
}
return new zag(onConnectionFailedListener);
}
public int getMinApkVersion() {
return super.getMinApkVersion();
}
}
|
[
"thebone.main@gmail.com"
] |
thebone.main@gmail.com
|
9d16e01c6d63838c5ddc2693fa69433338e52725
|
5ade3f1d3d3429e90025035cb49bf1bba5ad52e8
|
/compass-interface/src/main/java/com/shifeng/controller/purchase/PurchaseController.java
|
4b0a18320f1330ffd5ad27f79bbbb32d752678e8
|
[] |
no_license
|
0dayso/dataCompass
|
2270523fc793b231ffa08a33b6fd96257529a1b6
|
2c64fb7033fc8fb452fa12a65d8eff9f2b9d671a
|
refs/heads/master
| 2021-06-23T23:21:18.104730
| 2017-09-09T14:53:49
| 2017-09-09T14:53:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,667
|
java
|
package com.shifeng.controller.purchase;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Resource;
import com.shifeng.entity.purchase.PurchaseCancel;
import com.shifeng.ip.IPSeeker;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.shifeng.entity.purchase.Purchase;
import com.shifeng.service.purchase.PurchaseService;
import com.shifeng.util.Const;
import com.shifeng.util.DateUtil;
/**
* 购买控制器
*
* @author Yan
*
*/
@Controller
@RequestMapping(value = "/purchase")
public class PurchaseController {
@Resource(name = "purchaseServiceImpl")
PurchaseService purchaseServiceImpl;
protected Logger logger = Logger.getLogger(this.getClass());
/**
* 购买
*
* @param
* @return
*/
@RequestMapping(value = "/buy", method = RequestMethod.POST)
@ResponseBody
public Map<String, String> buy(Purchase p) {
Map<String, String> map = new HashMap<String, String>();
map.put(Const.REQ_CODE, "500");
if (p.getUserid() == null) {
map.put(Const.REQ_MSG, "用户ID不能为空");
return map;
}
if (StringUtils.isEmpty(p.getIp())) {
map.put(Const.REQ_MSG, "用户IP不能为空");
return map;
}
if (StringUtils.isEmpty(p.getSku())) {
map.put(Const.REQ_MSG, "SKU不能为空");
return map;
}
if (StringUtils.isEmpty(p.getNumber())) {
map.put(Const.REQ_MSG, "数量不能为空");
return map;
}
if (p.getAmount() == null) {
map.put(Const.REQ_MSG, "金额不能为空");
return map;
}
if (StringUtils.isEmpty(p.getPurchasetime())
|| !DateUtil.isValidDateYYYY_MM_DD_HH_MM_SS(p.getPurchasetime())) {
map.put(Const.REQ_MSG, "请输入正确格式的时间(YYYY-MM-DD HH:mm:ss)");
return map;
}
if (p.getStatus() == null) {
map.put(Const.REQ_MSG, "状态不能为空");
return map;
}
if (p.getType() == null) {
map.put(Const.REQ_MSG, "站点来源不能为空");
return map;
}
if (p.getShopId() == null) {
map.put(Const.REQ_MSG, "店铺ID不能为空");
return map;
}
if (StringUtils.isEmpty(p.getOrderId())) {
map.put(Const.REQ_MSG, "订单ID不能为空");
return map;
}
if(p.getProductId() == null){
map.put(Const.REQ_MSG, "商品ID不能为空");
return map;
}
String county = IPSeeker.I.getAddress(p.getIp());
p.setCounty(county);
try {
purchaseServiceImpl.buy(map, p);
} catch (Exception e) {
logger.error("新增[购买]接口异常;异常信息:" + e.toString());
}
return map;
}
/**
* 取消订单
*
* @return
*/
@RequestMapping(value = "/cancel", method = RequestMethod.POST)
@ResponseBody
public Map<String, String> cancel(PurchaseCancel p) {
Map<String, String> map = new HashMap<String, String>();
map.put(Const.REQ_CODE, "500");
if (p.getUserid() == null) {
map.put(Const.REQ_MSG, "用户ID不能为空");
return map;
}
if (StringUtils.isEmpty(p.getIp())) {
map.put(Const.REQ_MSG, "用户IP不能为空");
return map;
}
if (StringUtils.isEmpty(p.getSku())) {
map.put(Const.REQ_MSG, "SKU不能为空");
return map;
}
if (StringUtils.isEmpty(p.getNumber())) {
map.put(Const.REQ_MSG, "数量不能为空");
return map;
}
if (p.getAmount() == null) {
map.put(Const.REQ_MSG, "金额不能为空");
return map;
}
if (StringUtils.isEmpty(p.getPurchasetime())
|| !DateUtil.isValidDateYYYY_MM_DD_HH_MM_SS(p.getPurchasetime())) {
map.put(Const.REQ_MSG, "请输入正确格式的时间(YYYY-MM-DD HH:mm:ss)");
return map;
}
if (p.getStatus() == null) {
map.put(Const.REQ_MSG, "状态不能为空");
return map;
}
if (p.getType() == null) {
map.put(Const.REQ_MSG, "站点来源不能为空");
return map;
}
if (p.getShopId() == null) {
map.put(Const.REQ_MSG, "店铺ID不能为空");
return map;
}
if (StringUtils.isEmpty(p.getOrderId())) {
map.put(Const.REQ_MSG, "订单ID不能为空");
return map;
}
if(p.getProductId() == null){
map.put(Const.REQ_MSG, "商品ID不能为空");
return map;
}
if(p.getReasontype() == null){
map.put(Const.REQ_MSG, "订单取消类型不能为空");
return map;
}
String county = IPSeeker.I.getAddress(p.getIp());
p.setCounty(county);
try {
purchaseServiceImpl.cancel(map, p);
} catch (Exception e) {
logger.error("新增[取消订单]接口异常;异常信息:" + e.toString());
}
return map;
}
}
|
[
"tw l"
] |
tw l
|
e5acf7527c417c2d6c822d7c5639d354d7f7e38e
|
d1f18a98261ef1d870afb5b705387a34fa1ae8d4
|
/offer-algorithm/src/main/java/leetcode/problems/Test0168_Excel表列名称.java
|
ac9da328188535a1cb3f279364c3f8b9daa36b67
|
[] |
no_license
|
luguanxing/Offer-Algorithm
|
6472cca1bcd4b51a9b603226a787f18acfe521a9
|
7ec579a5359295b4f1b23f0afd551f434184a61e
|
refs/heads/master
| 2023-09-01T05:36:46.417275
| 2023-09-01T02:18:56
| 2023-09-01T02:18:56
| 244,928,773
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,149
|
java
|
package leetcode.problems;
public class Test0168_Excel表列名称 {
public static void main(String[] args) {
System.out.println(new Solution().convertToTitle(1));
System.out.println(new Solution().convertToTitle(28));
System.out.println(new Solution().convertToTitle(701));
System.out.println(new Solution().convertToTitle(2147483647));
System.out.println(new Solution().convertToTitle(52));
System.out.println(new Solution().convertToTitle(676));
}
static class Solution {
public String convertToTitle(int columnNumber) {
String res = "";
while (columnNumber >= 26) {
int last = columnNumber % 26;
if (last == 0) {
res = 'Z' + res;
columnNumber--;
} else {
res = (char) (last - 1 + 'A') + res;
}
columnNumber = (columnNumber - last) / 26;
}
if (columnNumber > 0) {
res = (char) (columnNumber % 26 - 1 + 'A') + res;
}
return res;
}
}
}
|
[
"651571925@qq.com"
] |
651571925@qq.com
|
22800a9ff312b7ad7675b5cf5bdf4e1c9f6ada03
|
d1f0e8fbfc019c5e0d4b837157a63d7f341b6a56
|
/smartmon-smartstor/src/main/java/smartmon/smartstor/infra/remote/pbdata/types/lun/PalPmtLunInfoBackendRes.java
|
52ccdf795c36706a64be28cddfa7c449b0966d8b
|
[] |
no_license
|
java404/pbdata
|
cd9579c0b1c23cb5802374eecd2de48ffb06faab
|
18e689b402dd7aef7f90a31ab898a6b939de49ac
|
refs/heads/master
| 2021-05-25T13:04:22.616809
| 2020-04-08T10:49:30
| 2020-04-08T10:49:30
| 253,765,170
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 400
|
java
|
package smartmon.smartstor.infra.remote.pbdata.types.lun;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class PalPmtLunInfoBackendRes {
@JsonProperty("data_dev_name")
private String dataDevName;
@JsonProperty("data_disk_name")
private String dataDiskName;
@JsonProperty("pool_name")
private String poolName;
}
|
[
"qingwen_wang@pbdata.com.cn"
] |
qingwen_wang@pbdata.com.cn
|
c95bb700cf2017cf4c469c1cebefa6edb3fcccde
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/22/22_37a7ac4b9bc3e06ec6418400ff8b6589cfce6905/SimpleURLRegistryTest/22_37a7ac4b9bc3e06ec6418400ff8b6589cfce6905_SimpleURLRegistryTest_t.java
|
3e75bc581ee1905e02702f70501158b0faf9b056
|
[] |
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
| 5,470
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.synapse.registry.url;
import junit.framework.TestCase;
import org.apache.axiom.om.*;
import org.apache.axiom.om.xpath.AXIOMXPath;
import org.apache.commons.io.output.NullOutputStream;
import org.apache.synapse.config.Entry;
import org.apache.synapse.registry.Registry;
import org.custommonkey.xmlunit.XMLAssert;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.util.Properties;
public class SimpleURLRegistryTest extends TestCase {
private static final String FILE = "target/text.xml";
private static final String FILE2 = "target/large_file.xml";
private static final String TEXT_1 = "<text1 />";
private static final String TEXT_2 = "<text2 />";
public void setUp() throws Exception {
writeToFile(TEXT_1);
OMFactory factory = OMAbstractFactory.getOMFactory();
OMElement root = factory.createOMElement("root", null);
for (int i=0; i<1000; i++) {
OMElement child = factory.createOMElement("child", null);
child.setText("some text");
root.addChild(child);
}
FileOutputStream out = new FileOutputStream(FILE2);
root.serialize(out);
out.close();
}
public void testRegistry() throws Exception {
Registry reg = new SimpleURLRegistry();
Properties props = new Properties();
props.put("root", "file:./");
props.put("cachableDuration", "1500");
reg.init(props);
Entry prop = new Entry();
prop.setType(Entry.REMOTE_ENTRY);
prop.setKey(FILE);
// initial load of file from registry
XMLAssert.assertXMLEqual(TEXT_1, reg.getResource(prop, new Properties()).toString());
// sleep 1 sec
Thread.sleep(1000);
XMLAssert.assertXMLEqual(TEXT_1, reg.getResource(prop, new Properties()).toString());
// sleep another 1 sec, has expired in cache, but content hasnt changed
Thread.sleep(1000);
XMLAssert.assertXMLEqual(TEXT_1, reg.getResource(prop, new Properties()).toString());
// the renewed cache should be valid for another 1.5 secs
// change the file now and change next cache duration
writeToFile(TEXT_2);
props.put("cachableDuration", "100");
reg.init(props);
// still cached content should be available and valid
XMLAssert.assertXMLEqual(TEXT_1, reg.getResource(prop, new Properties()).toString());
// now sleep ~1 sec, still cache should be valid
Thread.sleep(800);
XMLAssert.assertXMLEqual(TEXT_1, reg.getResource(prop, new Properties()).toString());
// sleep another 1 sec.. cache should expire and new content should be loaded
Thread.sleep(1000);
XMLAssert.assertXMLEqual(TEXT_2, reg.getResource(prop, new Properties()).toString());
// change content back to original
writeToFile(TEXT_1);
// sleep for .5 sec, now the new content should be loaded as new expiry time
// is .1 sec
Thread.sleep(500);
XMLAssert.assertXMLEqual(TEXT_1, reg.getResource(prop, new Properties()).toString());
}
public void testLargeFile() throws Exception {
Registry reg = new SimpleURLRegistry();
Properties props = new Properties();
props.put("root", "file:./");
props.put("cachableDuration", "1500");
reg.init(props);
OMNode node = reg.lookup(FILE2);
node.serialize(new NullOutputStream());
}
public void testXPathEvaluationOnRegistryResource() throws Exception {
SimpleURLRegistry registry = new SimpleURLRegistry();
OMNode omNode =
registry.lookup(
"file:src/test/resources/org/apache/synapse/core/registry/resource.xml");
assertNotNull(omNode);
AXIOMXPath xpath = new AXIOMXPath("//table/entry[@id='one']/value/child::text()");
OMNode node = (OMNode) xpath.selectSingleNode(omNode);
assertNotNull(node);
assertTrue(node instanceof OMText);
assertEquals("ValueOne", ((OMText) node).getText());
}
public void tearDown() throws Exception {
new File(FILE).delete();
new File(FILE2).delete();
}
private void writeToFile(String content) throws Exception {
BufferedWriter out = new BufferedWriter(new FileWriter(new File(FILE)));
out.write(content);
out.close();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a6a2144ad32ca9ebab4027c20d5218fbe82266fe
|
6000edbe01f35679b1cf510575d547a6bb5e430c
|
/core/src/main/java/org/apache/logging/log4j/core/pattern/FileLocationPatternConverter.java
|
304aab52d49aa762a12a8ba258dde556c17576ce
|
[
"Apache-2.0"
] |
permissive
|
JavaQualitasCorpus/log4j-2.0-beta
|
7cdd1a06e6b786bca3180c1fe1d077d0044b2b40
|
1aec5ba88965528ce8c3649b5d6f0136dc942c74
|
refs/heads/master
| 2023-08-12T09:29:17.392341
| 2020-06-02T18:02:37
| 2020-06-02T18:02:37
| 167,004,977
| 0
| 0
|
Apache-2.0
| 2022-12-16T01:21:49
| 2019-01-22T14:08:39
|
Java
|
UTF-8
|
Java
| false
| false
| 2,061
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache license, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the license for the specific language governing permissions and
* limitations under the license.
*/
package org.apache.logging.log4j.core.pattern;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.config.plugins.Plugin;
/**
* Returns the event's line location information in a StringBuffer.
*/
@Plugin(name = "FileLocationPatternConverter", type = "Converter")
@ConverterKeys({"F", "file" })
public final class FileLocationPatternConverter extends LogEventPatternConverter {
/**
* Singleton.
*/
private static final FileLocationPatternConverter INSTANCE =
new FileLocationPatternConverter();
/**
* Private constructor.
*/
private FileLocationPatternConverter() {
super("File Location", "file");
}
/**
* Obtains an instance of pattern converter.
*
* @param options options, may be null.
* @return instance of pattern converter.
*/
public static FileLocationPatternConverter newInstance(final String[] options) {
return INSTANCE;
}
/**
* {@inheritDoc}
*/
@Override
public void format(final LogEvent event, final StringBuilder output) {
final StackTraceElement element = event.getSource();
if (element != null) {
output.append(element.getFileName());
}
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
d5f0d52e2af6fbf1cf8ca9b99e7491db23c421a4
|
aaa9649c3e52b2bd8e472a526785f09e55a33840
|
/EquationCommonStubs/src/com/misys/equation/common/test/pv/N1R01R.java
|
6359c7233ab610f031eb18106f4e099d5b31b98c
|
[] |
no_license
|
jcmartin2889/Repo
|
dbfd02f000e65c96056d4e6bcc540e536516d775
|
259c51703a2a50061ad3c99b8849477130cde2f4
|
refs/heads/master
| 2021-01-10T19:34:17.555112
| 2014-04-29T06:01:01
| 2014-04-29T06:01:01
| 19,265,367
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 440
|
java
|
package com.misys.equation.common.test.pv;
import com.misys.equation.common.test.EquationTestCasePVMetaData;
public class N1R01R extends EquationTestCasePVMetaData
{
// This attribute is used to store cvs version information.
public static final String _revision = "$Id: N1R01R.java 7610 2010-06-01 17:10:41Z MACDONP1 $";
@Override
public void setUp() throws Exception
{
super.setUp();
validCCN = "CB";
invalidCCN = "ZZ";
}
}
|
[
"jomartin@MAN-D7R8ZYY1.misys.global.ad"
] |
jomartin@MAN-D7R8ZYY1.misys.global.ad
|
0b7dc507cab916684a31fa0a638aa07946003d49
|
414d900046822beda3f01b94b8117eef2bb7925b
|
/app/src/main/java/com/example/mbcloud_cuilk/cuilkvedioplayer/utils/encoder/CEFormatException.java
|
d7c1c5007b9bf9bba3538190aa1d77c8d6fdb11c
|
[] |
no_license
|
cuileikun/CuiMedia
|
69b0ecd0edcbbdfd3a29ebf2d636140bd39c5ac0
|
172a3b47b5677e8601623c2de30d4fcc9ff8ffb1
|
refs/heads/master
| 2020-03-27T10:29:49.619381
| 2018-12-27T02:38:44
| 2018-12-27T02:38:44
| 146,423,815
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 205
|
java
|
package com.example.mbcloud_cuilk.cuilkvedioplayer.utils.encoder;
import java.io.IOException;
public class CEFormatException extends IOException
{
public CEFormatException(String s)
{
super(s);
}
}
|
[
"583271702@qq.com"
] |
583271702@qq.com
|
2998a77505095bb34a52652d0dbe7a301f7f245c
|
0d858dabd74e1f1e8497a8ae7a376942feff684f
|
/SeleniumProject/src/day5/Drag_DropOps.java
|
0f5fffa63558b4e7a406d53f01cdf4bf248ac994
|
[] |
no_license
|
shaath/FastTrack
|
f9e704f8c7dc5eb2ce129dc93a0c6a2c2213ccfb
|
527b543f38c205aeb9b509e3265184fc4ab94f39
|
refs/heads/master
| 2021-01-12T01:39:18.723183
| 2017-01-09T09:44:30
| 2017-01-09T09:44:30
| 78,414,646
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 671
|
java
|
package day5;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
public class Drag_DropOps {
public static void main(String[] args)
{
WebDriver driver=new FirefoxDriver();
driver.get("http://jqueryui.com/droppable/");
driver.manage().window().maximize();
driver.switchTo().frame(0);
WebElement drag=driver.findElement(By.id("draggable"));
WebElement drop=driver.findElement(By.id("droppable"));
Actions act=new Actions(driver);
act.dragAndDrop(drag, drop).build().perform();
}
}
|
[
"you@example.com"
] |
you@example.com
|
277ed88a7000f840f585b0751a5075121ba6732f
|
6533922a5a9fd4d130318a8c1d8fabe52c6be5e6
|
/src/main/java/com/github/lindenb/ngsproject/model/Model.java
|
68af3b367bb44d75608340eabdd5bde2c5a48d8e
|
[] |
no_license
|
lindenb/ngsproject
|
4d8337f897c5cda60591cdd3a2c79a36a2c28ede
|
016bd1491e1871f301fea46a0d3e75cd92894094
|
refs/heads/master
| 2020-06-07T06:53:15.194795
| 2013-06-17T15:21:26
| 2013-06-17T15:21:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,122
|
java
|
package com.github.lindenb.ngsproject.model;
import java.util.List;
import javax.sql.DataSource;
import net.sf.picard.reference.IndexedFastaSequenceFile;
public interface Model
{
public abstract DataSource getDataSource();
/** GROUP ******************************************************************************/
public abstract Group getGroupByName(String s);
public abstract Group getGroupById(long id);
/** SAMPLE ******************************************************************************/
public abstract Sample getSampleById(long id);
public abstract Sample getSampleByName(String s);
public abstract List<Sample> getAllSamples();
/** User ******************************************************************************/
public abstract User getUserById(long id);
public abstract User getUserByName(String s);
public abstract List<User> getAllUsers();
/** Project ******************************************************************************/
public abstract Project getProjectById(long id);
public abstract Project getProjectByName(String s);
public abstract List<Project> getAllProjects();
/** get project visible by this user */
public abstract List<Project> getProjects(User user);
public abstract List<Group> getAllGroups();
/** Reference ******************************************************************************/
public abstract Reference getReferenceById(long id);
public abstract Reference getReferenceByName(String s);
public abstract List<Reference> getAllReferences();
/** VCF ******************************************************************************/
public abstract VCF getVcfById(long id);
public abstract VCF getVcfByPath(String path);
public abstract List<VCF> getAllVCFs();
/** Bam ******************************************************************************/
public abstract Bam getBamById(long id);
public abstract Bam getBamByPath(String path);
public abstract List<Bam> getAllBams();
public abstract IndexedFastaSequenceFile getIndexedFastaSequenceFileByPath(
String fastaPath);
public abstract void dispose();
}
|
[
"plindenbaum@yahoo.fr"
] |
plindenbaum@yahoo.fr
|
4a627973b1a6296086d3a81376b9ac6298a4b896
|
fe0d7937fd3a6b2f01394d8ae185b3f4b45f1f1c
|
/nim_demo/demo/src/com/netease/nim/zcm/session/viewholder/MsgViewHolderSticker.java
|
7dd4560dc147f435dedcab42e20d52f9f54b37f5
|
[] |
no_license
|
shuishang/liaotian
|
0e0b8e12bb15a0a12c41d27982dc4926403cfa27
|
b393277c1662afd5554a6e363b117ed76fafbc26
|
refs/heads/master
| 2020-12-05T07:00:32.733428
| 2019-08-12T03:01:02
| 2019-08-12T03:01:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,933
|
java
|
package com.netease.nim.zcm.session.viewholder;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.netease.nim.zcm.R;
import com.netease.nim.zcm.session.extension.StickerAttachment;
import com.netease.nim.uikit.business.session.emoji.StickerManager;
import com.netease.nim.uikit.business.session.viewholder.MsgViewHolderBase;
import com.netease.nim.uikit.business.session.viewholder.MsgViewHolderThumbBase;
import com.netease.nim.uikit.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter;
/**
* Created by zhoujianghua on 2015/8/7.
*/
public class MsgViewHolderSticker extends MsgViewHolderBase {
private ImageView baseView;
public MsgViewHolderSticker(BaseMultiItemFetchLoadAdapter adapter) {
super(adapter);
}
@Override
protected int getContentResId() {
return R.layout.nim_message_item_sticker;
}
@Override
protected void inflateContentView() {
baseView = findViewById(R.id.message_item_sticker_image);
baseView.setMaxWidth(MsgViewHolderThumbBase.getImageMaxEdge());
}
@Override
protected void bindContentView() {
StickerAttachment attachment = (StickerAttachment) message.getAttachment();
if (attachment == null) {
return;
}
Glide.with(context)
.load(StickerManager.getInstance().getStickerUri(attachment.getCatalog(), attachment.getChartlet()))
.apply(new RequestOptions()
.error(com.netease.nim.uikit.R.drawable.nim_default_img_failed)
.diskCacheStrategy(DiskCacheStrategy.NONE))
.into(baseView);
}
@Override
protected int leftBackground() {
return 0;
}
@Override
protected int rightBackground() {
return 0;
}
}
|
[
"317335277@qq.com"
] |
317335277@qq.com
|
6bb5f890b6ee8e824f92dfa226b04f23dd104367
|
776b3f77f5dbd5501b94ffdc4c37d96889b6b8f9
|
/rsademo/src/main/java/news/fan/rsademo/rsa/MD5Builder.java
|
3b468bed0d4bd1acce6a6dc24b306e4cde1c0bf4
|
[] |
no_license
|
kisdy502/FanNews
|
98d4d2da609e53831a8a09ba72dd12e8fa6be79c
|
24ebd204ab8e013e280e1720bd22b193abc1f19e
|
refs/heads/master
| 2021-04-27T00:22:01.863913
| 2018-04-04T09:58:19
| 2018-04-04T09:58:19
| 123,800,598
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,301
|
java
|
package news.fan.rsademo.rsa;
import android.util.Log;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* 主要用于生成照耀digest
* Created by Administrator on 2018/3/17.
*/
public class MD5Builder {
private final static String TAG = "md5";
// 用来将字节转换成 16 进制表示的字符
static char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8',
'9', 'a', 'b', 'c', 'd', 'e', 'f'};
/**
* 对文件全文生成MD5摘要
*
* @param file 要加密的文件
* @return MD5摘要码
*/
public static String getMD5(File file) {
FileInputStream fis = null;
try {
MessageDigest md = MessageDigest.getInstance("MD5");
Log.d(TAG, "MD5摘要长度:" + md.getDigestLength());
fis = new FileInputStream(file);
byte[] buffer = new byte[2048];
int length = -1;
Log.d(TAG, "开始生成摘要");
long s = System.currentTimeMillis();
while ((length = fis.read(buffer)) != -1) {
md.update(buffer, 0, length);
}
Log.d(TAG, "摘要生成成功,总用时: "
+ (System.currentTimeMillis() - s) + "ms");
byte[] b = md.digest();
return byteToHexString(b);
// 16位加密
// return buf.toString().substring(8, 24);
} catch (Exception ex) {
ex.printStackTrace();
} finally {
IoUtil.close(fis);
}
return null;
}
/**
* 对一段String生成MD5加密信息
*
* @param message 要加密的String
* @return 生成的MD5信息
*/
public static String getMD5(String message) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
Log.d(TAG, "MD5摘要长度:" + md.getDigestLength());
byte[] b = md.digest(message.getBytes());
return byteToHexString(b);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return null;
}
}
/**
* 把byte[]数组转换成十六进制字符串表示形式
*
* @param tmp 要转换的byte[]
* @return 十六进制字符串表示形式
*/
private static String byteToHexString(byte[] tmp) {
String s;
// 用字节表示就是 16 个字节
char str[] = new char[16 * 2]; // 每个字节用 16 进制表示的话,使用两个字符,
// 所以表示成 16 进制需要 32 个字符
int k = 0; // 表示转换结果中对应的字符位置
for (int i = 0; i < 16; i++) { // 从第一个字节开始,对 MD5 的每一个字节
// 转换成 16 进制字符的转换
byte byte0 = tmp[i]; // 取第 i 个字节
str[k++] = hexDigits[byte0 >>> 4 & 0xf]; // 取字节中高 4 位的数字转换,
// >>> 为逻辑右移,将符号位一起右移
str[k++] = hexDigits[byte0 & 0xf]; // 取字节中低 4 位的数字转换
}
s = new String(str); // 换后的结果转换为字符串
return s;
}
}
|
[
"bwply2009@163.com"
] |
bwply2009@163.com
|
3d7b275b7cc61e1b415920fef5337242e2329aaf
|
fc6133ebbc1a1b38f7b46c29c53ad362b51a0746
|
/PrinterServer/src/b1b/erp/js/utils/Date2StringUtils.java
|
add8d1f26da0278e9682ffd00fbcc71c2a30c99e
|
[] |
no_license
|
hub-zjy1024/EEServer
|
05fa295a650dadf455aa7135bc6f4e627e3b8e71
|
1769010c32b9c3789ece4927d2d0e7fb1d3edcd2
|
refs/heads/master
| 2021-06-06T08:39:57.393652
| 2018-11-02T09:48:07
| 2018-11-02T09:48:07
| 132,119,082
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 267
|
java
|
package b1b.erp.js.utils;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Date2StringUtils {
public static String style1() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
return sdf.format(new Date());
}
}
|
[
"851280963@qq.com"
] |
851280963@qq.com
|
a3ba68033b9595cabb6d3720c47c7ee6e0e1c992
|
2b0694f0563192e2d148d130164e94faf3b4e12f
|
/Android应用开发揭秘-杨丰盛/第6章/Examples_06_01/src/aom/yarin/android/Examples_06_01/Activity01.java
|
26bba707e6700fa16afc2e2f7e2e8b92a85e4941
|
[] |
no_license
|
bxh7425014/BookCode
|
4757956275cf540e9996b9064d981f6da75c9602
|
8996b36e689861d55662d15c5db8b0eb498c864b
|
refs/heads/master
| 2020-05-23T00:48:51.430340
| 2017-02-06T01:04:25
| 2017-02-06T01:04:25
| 84,735,079
| 9
| 3
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,005
|
java
|
package aom.yarin.android.Examples_06_01;
import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.KeyEvent;
import android.widget.TextView;
public class Activity01 extends Activity
{
private MIDIPlayer mMIDIPlayer = null;
private boolean mbMusic = false;
private TextView mTextView = null;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mTextView = (TextView) this.findViewById(R.id.TextView01);
mMIDIPlayer = new MIDIPlayer(this);
/* 装载数据 */
// 取得活动的preferences对象.
SharedPreferences settings = getPreferences(Activity.MODE_PRIVATE);
// 取得值.
mbMusic = settings.getBoolean("bmusic", false);
if (mbMusic)
{
mTextView.setText("当前音乐状态:开");
mbMusic = true;
mMIDIPlayer.PlayMusic();
}
else
{
mTextView.setText("当前音乐状态:关");
}
}
public boolean onKeyUp(int keyCode, KeyEvent event)
{
switch (keyCode)
{
case KeyEvent.KEYCODE_DPAD_UP:
mTextView.setText("当前音乐状态:开");
mbMusic = true;
mMIDIPlayer.PlayMusic();
break;
case KeyEvent.KEYCODE_DPAD_DOWN:
mTextView.setText("当前音乐状态:关");
mbMusic = false;
mMIDIPlayer.FreeMusic();
break;
}
return true;
}
public boolean onKeyDown(int keyCode, KeyEvent event)
{
if (keyCode == KeyEvent.KEYCODE_BACK)
{
/* 这里我们在推出应用程序时保存数据 */
// 取得活动的preferences对象.
SharedPreferences uiState = getPreferences(0);
// 取得编辑对象
SharedPreferences.Editor editor = uiState.edit();
// 添加值
editor.putBoolean("bmusic", mbMusic);
// 提交保存
editor.commit();
if ( mbMusic )
{
mMIDIPlayer.FreeMusic();
}
this.finish();
return true;
}
return super.onKeyDown(keyCode, event);
}
}
|
[
"bxh7425014@163.com"
] |
bxh7425014@163.com
|
fb04896d3fc7e90945db09a29371890b1010c65c
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/96/org/apache/commons/math/linear/RealVectorImpl_append_1066.java
|
fd85138b6cc22eca3c8ab100eef5617ae1f9afb7
|
[] |
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,649
|
java
|
org apach common math linear
link real vector realvector arrai
version revis date
real vector impl realvectorimpl real vector realvector serializ
inherit doc inheritdoc
real vector realvector append real vector realvector
append real vector impl realvectorimpl
class cast except classcastexcept cce
real vector impl realvectorimpl real vector impl realvectorimpl
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
9e4545319db5a1a71749c5eb8d361855768e30dd
|
e63e88395c42fc5109c7549be7e09facf14f9068
|
/src/org/acm/seguin/uml/refactor/RenameFieldDialog.java
|
203941f1236bd64f944da704d6cbbaef47e18d74
|
[] |
no_license
|
lyestoo/jrefactory
|
2e1671f4a1afc4b2c01202fbc73e57be8a931a48
|
188a18b54a2798d10fa4718fd586e82fe2d90308
|
refs/heads/master
| 2021-01-19T09:57:27.527513
| 2015-07-08T20:27:10
| 2015-07-08T20:27:10
| 38,776,938
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,103
|
java
|
/* ====================================================================
* The JRefactory License, Version 1.0
*
* Copyright (c) 2001 JRefactory. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* JRefactory (http://www.sourceforge.org/projects/jrefactory)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "JRefactory" must not be used to endorse or promote
* products derived from this software without prior written
* permission. For written permission, please contact seguin@acm.org.
*
* 5. Products derived from this software may not be called "JRefactory",
* nor may "JRefactory" appear in their name, without prior written
* permission of Chris Seguin.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CHRIS SEGUIN OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of JRefactory. For more information on
* JRefactory, please see
* <http://www.sourceforge.org/projects/jrefactory>.
*/
package org.acm.seguin.uml.refactor;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import org.acm.seguin.refactor.Refactoring;
import org.acm.seguin.refactor.RefactoringException;
import org.acm.seguin.refactor.RefactoringFactory;
import org.acm.seguin.refactor.field.RenameFieldRefactoring;
import org.acm.seguin.summary.FieldSummary;
import org.acm.seguin.summary.TypeSummary;
import org.acm.seguin.uml.UMLPackage;
/**
* Creates a dialog box to prompt for the new package name
*
*@author Chris Seguin
*@created September 12, 2001
*/
public class RenameFieldDialog extends ClassNameDialog {
// Instance Variables
private FieldSummary fieldSummary;
/**
* Constructor for RenameFieldDialog
*
*@param init Description of Parameter
*@param field Description of the Parameter
*/
public RenameFieldDialog(UMLPackage init, FieldSummary field) {
super(init, 1);
fieldSummary = field;
setTitle(getWindowTitle());
setDefaultName(field);
}
/**
* Returns the window title
*
*@return the title
*/
public String getWindowTitle() {
if (fieldSummary == null) {
return "Rename field";
} else {
return "Rename field: " + fieldSummary.getName();
}
}
/**
* Gets the label for the text
*
*@return the text for the label
*/
public String getLabelText() {
return "New Name:";
}
/**
* Creates a refactoring to be performed
*
*@return the refactoring
*/
protected Refactoring createRefactoring() {
RenameFieldRefactoring rfr = RefactoringFactory.get().renameField();
rfr.setClass((TypeSummary) fieldSummary.getParent());
rfr.setField(fieldSummary.getName());
rfr.setNewName(getClassName());
return rfr;
}
/**
* Rename the type summary that has been influenced
*/
protected void updateSummaries() {
fieldSummary.setName(getClassName());
}
/**
* Sets the suggested name of this parameter
*
*@param initVariable The new defaultName value
*/
private void setDefaultName(FieldSummary initVariable)
{
try {
HungarianNamer namer = new HungarianNamer();
setClassName(namer.getDefaultName(initVariable, "m_"));
}
catch (Exception exc) {
exc.printStackTrace();
setClassName(initVariable.getName());
}
}
}
|
[
"lahmar.elyes@gmail.com"
] |
lahmar.elyes@gmail.com
|
df244ae33b8656093b664445b9e5c377b577cf78
|
a224a98532ddb4f802523dc3dd1e3e73c85e8277
|
/src/test/java/com/jsoniter/TestDemo.java
|
40ba5e6edf0d0138b9077bbbb37973aba267bd4a
|
[
"MIT"
] |
permissive
|
huohuaMJ/java
|
0e60a185b5394b7b0a4d73fc889c4cb894b7cebb
|
27f6b018c20187cc7f1a312cde702b1a515410ea
|
refs/heads/master
| 2021-01-12T06:42:53.125780
| 2016-12-27T02:09:30
| 2016-12-27T02:09:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,257
|
java
|
package com.jsoniter;
import com.jsoniter.spi.Decoder;
import com.jsoniter.spi.EmptyExtension;
import com.jsoniter.spi.ExtensionManager;
import com.jsoniter.spi.TypeLiteral;
import junit.framework.TestCase;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.Date;
public class TestDemo extends TestCase {
public void test_bind_api() throws IOException {
JsonIterator iter = JsonIterator.parse("[0,1,2,3]");
int[] val = iter.read(int[].class);
System.out.println(val[3]);
}
public void test_any_api() throws IOException {
JsonIterator iter = JsonIterator.parse("[0,1,2,3]");
System.out.println(iter.readAny().toInt(3));
}
public void test_iterator_api() throws IOException {
JsonIterator iter = JsonIterator.parse("[0,1,2,3]");
int total = 0;
while (iter.readArray()) {
total += iter.readInt();
}
System.out.println(total);
}
public static class ABC {
public Any a;
}
public void test_abc() throws IOException {
JsonIterator iter = JsonIterator.parse("{'a': {'b': {'c': 'd'}}}".replace('\'', '"'));
ABC abc = iter.read(ABC.class);
System.out.println(abc.a.get("b", "c"));
}
public void test_iterator_api_and_bind() throws IOException {
JsonIterator iter = JsonIterator.parse("[123, {'name': 'taowen', 'tags': ['crazy', 'hacker']}]".replace('\'', '"'));
iter.readArray();
int userId = iter.readInt();
iter.readArray();
User user = iter.read(User.class);
user.userId = userId;
iter.readArray(); // end of array
System.out.println(user);
}
public void test_empty_array_as_null() throws IOException {
ExtensionManager.registerExtension(new EmptyExtension() {
@Override
public Decoder createDecoder(final String cacheKey, final Type type) {
if (cacheKey.endsWith(".original")) {
// avoid infinite loop
return null;
}
if (type != Date.class) {
return null;
}
return new Decoder() {
@Override
public Object decode(JsonIterator iter1) throws IOException {
if (iter1.whatIsNext() == ValueType.ARRAY) {
if (iter1.readArray()) {
// none empty array
throw iter1.reportError("decode [] as null", "only empty array is expected");
} else {
return null;
}
} else {
// just use original decoder
TypeLiteral typeLiteral = new TypeLiteral(type, cacheKey + ".original",
TypeLiteral.generateEncoderCacheKey(type));
return iter1.read(typeLiteral);
}
}
};
}
});
JsonIterator iter = JsonIterator.parse("[]");
assertNull(iter.read(Date.class));
}
}
|
[
"taowen@gmail.com"
] |
taowen@gmail.com
|
de1e3720dc34b3e7cf5515c9317dcf0ac61e6d83
|
c634236c7fb442dde4913c665f89a46a5703583b
|
/Eem/app/src/main/java/com/byt/eem/base/MBaseLazyFragmentBHor.java
|
c89e6555a68980762045cf8e4a0d61f3f4732658
|
[] |
no_license
|
souja/EEM
|
117850a4089e1bf95ee7a6d7e813bc0775503bf4
|
5f875eb0045260cd7bc0366c2ff0cb72e6a89fe7
|
refs/heads/master
| 2020-05-03T02:02:01.711413
| 2019-09-24T02:27:17
| 2019-09-24T02:27:17
| 178,355,871
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,637
|
java
|
package com.byt.eem.base;
import android.support.v7.app.AlertDialog;
import com.byt.eem.util.HttpUtil;
import com.souja.lib.base.BaseLazyFragmentB;
import com.souja.lib.inter.IHttpCallBack;
import org.xutils.http.RequestParams;
/**
* ClassName
* Created by Ydz on 2019/3/21 0021 15:54
*/
public abstract class MBaseLazyFragmentBHor extends BaseLazyFragmentB {
public <T> void Post(AlertDialog dialog, String url, RequestParams params,
final Class<T> dataClass, IHttpCallBack callBack) {
addRequest(HttpUtil.Post(dialog, url, params, dataClass, callBack));
}
public <T> void Post(String url, final Class<T> dataClass, IHttpCallBack callBack) {
Post(null, url, new RequestParams(), dataClass, callBack);
}
public <T> void Post(String url, RequestParams params, final Class<T> dataClass, IHttpCallBack callBack) {
Post(null, url, params, dataClass, callBack);
}
public <T> void Post(AlertDialog dialog, String url,
final Class<T> dataClass, IHttpCallBack callBack) {
Post(dialog, url, new RequestParams(), dataClass, callBack);
}
public <T> void Get(AlertDialog dialog, String url, RequestParams params,
final Class<T> dataClass, IHttpCallBack callBack) {
addRequest(HttpUtil.Get(dialog, url, params, dataClass, callBack));
}
public <T> void Delete(AlertDialog dialog, String url, RequestParams params,
final Class<T> dataClass, IHttpCallBack callBack) {
addRequest(HttpUtil.Delete(dialog, url, params, dataClass, callBack));
}
}
|
[
"782579195@qq.com"
] |
782579195@qq.com
|
e2ff1a6e4d677aa5109427f56d68306fca18e8ef
|
cfc60fc1148916c0a1c9b421543e02f8cdf31549
|
/src/testcases/CWE477_Obsolete_Functions/CWE477_Obsolete_Functions__DataInputStream_readLine_01.java
|
a0c8698881a194292cd1113669222bfda590ed94
|
[
"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
| 3,372
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE477_Obsolete_Functions__DataInputStream_readLine_01.java
Label Definition File: CWE477_Obsolete_Functions.label.xml
Template File: point-flaw-01.tmpl.java
*/
/*
* @description
* CWE: 477 Use of Obsolete Functions
* Sinks: DataInputStream_readLine
* GoodSink: Use of prefered java.io.BufferedReader(InputStreamReader)
* BadSink : Use of deprecated java.io.DataInputStream.readLine() method
* Flow Variant: 01 Baseline
*
* */
package testcases.CWE477_Obsolete_Functions;
import testcasesupport.*;
import java.net.*;
import java.text.*;
import java.util.*;
import java.io.*;
import javax.servlet.http.*;
public class CWE477_Obsolete_Functions__DataInputStream_readLine_01 extends AbstractTestCase
{
public void bad() throws Throwable
{
java.util.logging.Logger log2 = java.util.logging.Logger.getLogger("local-logger");
DataInputStream dis = null;
try
{
/* FLAW: Use of deprecated DataInputStream.readLine() method */
dis = new DataInputStream(System.in);
String cmd = dis.readLine();
}
catch( Exception e )
{
log2.warning("Error reading from console");
}
finally
{
try
{
if( dis != null )
{
dis.close();
}
}
catch(IOException e)
{
log2.warning("Error closing dis");
}
}
}
public void good() throws Throwable
{
good1();
}
private void good1() throws Throwable
{
java.util.logging.Logger log2 = java.util.logging.Logger.getLogger("local-logger");
BufferedReader bufread2 = null;
InputStreamReader inread2 = null;
try
{
/* FIX: Use prefered BufferedReader(InputStreamReader) constructor */
inread2 = new InputStreamReader(System.in);
bufread2 = new BufferedReader(inread2);
String cmd = bufread2.readLine();
}
catch( Exception e )
{
log2.warning("Error reading from console");
}
finally
{
try
{
if( bufread2 != null )
{
bufread2.close();
}
}
catch( IOException e )
{
log2.warning("Error closing bufread2");
}
finally
{
try
{
if( inread2 != null )
{
inread2.close();
}
}
catch( IOException e )
{
log2.warning("Error closing inread2");
}
}
}
}
/* 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
|
64957e4e3f70a787034a1db24a9275458f251c9d
|
24e89d11b56007d7025b6d03b490a07e8e9c9583
|
/src/main/java/tech/mlsql/common/utils/collect/SortedIterables.java
|
24a2e07d7ca19a50814799a5ef076181c304730b
|
[] |
no_license
|
hellozepp/common-utils
|
d37c53086d0974802760b0c6a127e21a8f06e15f
|
798e9a9a1340851a4e13087c135f82724fec8e32
|
refs/heads/master
| 2023-06-24T00:59:51.692802
| 2021-07-22T05:45:47
| 2021-07-22T05:45:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,407
|
java
|
package tech.mlsql.common.utils.collect;
import java.util.Comparator;
import java.util.SortedSet;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Utilities for dealing with sorted collections of all types.
*
* @author Louis Wasserman
*/
final class SortedIterables {
private SortedIterables() {}
/**
* Returns {@code true} if {@code elements} is a sorted collection using an ordering equivalent
* to {@code comparator}.
*/
public static boolean hasSameComparator(Comparator<?> comparator, Iterable<?> elements) {
checkNotNull(comparator);
checkNotNull(elements);
Comparator<?> comparator2;
if (elements instanceof SortedSet) {
comparator2 = comparator((SortedSet<?>) elements);
} else if (elements instanceof SortedIterable) {
comparator2 = ((SortedIterable<?>) elements).comparator();
} else {
return false;
}
return comparator.equals(comparator2);
}
@SuppressWarnings("unchecked")
// if sortedSet.comparator() is null, the set must be naturally ordered
public static <E> Comparator<? super E> comparator(SortedSet<E> sortedSet) {
Comparator<? super E> result = sortedSet.comparator();
if (result == null) {
result = (Comparator<? super E>) Ordering.natural();
}
return result;
}
}
|
[
"allwefantasy@gmail.com"
] |
allwefantasy@gmail.com
|
82929588ddf83dbd20bfd5043800c12605529c58
|
702a611aac878e0a64933a86c9fc44568bfecca0
|
/web/src/main/java/com/jt/web/controller/MemberController.java
|
4a293dbd3e6bb801e44e797b9581098763cafeb0
|
[
"Apache-2.0"
] |
permissive
|
jt120/my-cabin
|
404d240b9b4a6111fa5b27b0b67d9754cee68c6c
|
fa6655999cbf6f1878d48094f7c02af43f30924e
|
refs/heads/master
| 2016-09-08T00:24:16.421015
| 2015-05-27T04:11:28
| 2015-05-27T04:11:28
| 31,362,861
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 496
|
java
|
package com.jt.web.controller;
import com.jt.web.model.Member;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* Created by ze.liu on 2014/7/25.
*/
@Controller
@RequestMapping("/member")
public class MemberController {
@RequestMapping("/show")
public void show(@RequestBody Member member) {
System.out.println(member);
}
}
|
[
"jt120lz@gmail.com"
] |
jt120lz@gmail.com
|
4aa2bb3274f84f67ee08e903929660b9ce367168
|
62a1719c9c932db99334dc937e71365fb732b363
|
/javax/annotation/OverridingMethodsMustInvokeSuper.java
|
7cf01f33dc221e4260ab6b2698324ce889253447
|
[] |
no_license
|
GamerHun1238/liambuddy
|
37fd77c6ff81752e87e693728e12a27c368b9f25
|
a1a9a319dc401c527414c850f11732b431e75208
|
refs/heads/main
| 2023-06-12T10:12:15.787917
| 2021-07-06T17:14:56
| 2021-07-06T17:14:56
| 383,539,574
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 381
|
java
|
package javax.annotation;
import java.lang.annotation.Annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Documented
@Target({java.lang.annotation.ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface OverridingMethodsMustInvokeSuper {}
|
[
"gamerhun1253@gmail.com"
] |
gamerhun1253@gmail.com
|
bcb78ad50b0f5b769a2c951d460ced5844947c85
|
a2c0a2defe7886352fb7b724eabddafaa33ae09d
|
/SyntaxPro/src/level17/task1715/Piano.java
|
aad862c66a858b4204733775532f4541effe37c4
|
[] |
no_license
|
VadHead/JRSyntaxPro
|
54eba224a25f100d43e2a923694d6aa9749b61ae
|
3a89e7208b17909774e8a17359032d9d33e6b438
|
refs/heads/master
| 2023-09-02T07:17:54.540966
| 2021-11-19T16:39:12
| 2021-11-19T16:39:12
| 429,866,387
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 170
|
java
|
package level17.task1715;
public class Piano implements MusicalInstrument {
@Override
public void play() {
System.out.println("Играет пианино.");
}
}
|
[
"vadhead@gmail.com"
] |
vadhead@gmail.com
|
5b7adc086da40aaa67b057aefc9988fccb8e8cdf
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/20/20_fee75e175445d3a1e9904c92ff0491a269a10c11/Utility/20_fee75e175445d3a1e9904c92ff0491a269a10c11_Utility_s.java
|
74d5dce17692bf3860eab689bbc385f9f8783509
|
[] |
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
| 4,158
|
java
|
package weatherapp;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GraphicsEnvironment;
import java.awt.GridBagConstraints;
import java.awt.Image;
import java.awt.Insets;
import java.net.URL;
import javax.swing.ImageIcon;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
public class Utility {
public static URL loadResource( String resourceName ) {
return ClassLoader.getSystemResource( resourceName );
}
public static ImageIcon prepareScaledIcon( String name, int width,
int height ) {
ImageIcon originalIcon = new ImageIcon( loadResource( name ) );
return new ImageIcon( originalIcon.getImage().getScaledInstance( width,
height, Image.SCALE_SMOOTH ) );
}
public static ImageIcon prepareScaledIcon( String name, Dimension dimension ) {
return prepareScaledIcon( name, dimension.width, dimension.height );
}
public static void performSetup() throws ClassNotFoundException,
InstantiationException, IllegalAccessException,
UnsupportedLookAndFeelException {
// OS X menubars
if ( System.getProperty( "os.name" ).equals( "Mac OS X" ) ) {
System.setProperty( "apple.laf.useScreenMenuBar", "true" );
System.setProperty( "com.apple.mrj.application.apple.menu.about.name", Information.getAppName() );
}
// Look and feel
UIManager.
setLookAndFeel( "com.seaglasslookandfeel.SeaGlassLookAndFeel" );
// Fonts
String[] allFonts =
GraphicsEnvironment.getLocalGraphicsEnvironment().
getAvailableFontFamilyNames();
String selectedFont = null;
for ( String fontName : allFonts ) {
if ( fontName.equals( "Helvetica Neue" ) ) {
selectedFont = "Helvetica Neue";
break;
} else if ( fontName.equals( "Helvetica" ) ) {
selectedFont = "Helvetica";
break;
} else if ( fontName.equals( "Arial" ) ) {
selectedFont = "Arial";
break;
}
}
if ( selectedFont == null ) {
selectedFont = "SansSerif";
}
// Set all resources
Font uiFont = new Font( selectedFont, Font.PLAIN, 13 );
UIManager.put( "Button.font", uiFont );
UIManager.put( "ToggleButton.font", uiFont );
UIManager.put( "RadioButton.font", uiFont );
UIManager.put( "CheckBox.font", uiFont );
UIManager.put( "ColorChooser.font", uiFont );
UIManager.put( "ComboBox.font", uiFont );
UIManager.put( "Label.font", uiFont );
UIManager.put( "List.font", uiFont );
UIManager.put( "MenuBar.font", uiFont );
UIManager.put( "MenuItem.font", uiFont );
UIManager.put( "RadioButtonMenuItem.font", uiFont );
UIManager.put( "CheckBoxMenuItem.font", uiFont );
UIManager.put( "Menu.font", uiFont );
UIManager.put( "PopupMenu.font", uiFont );
UIManager.put( "OptionPane.font", uiFont );
UIManager.put( "Panel.font", uiFont );
UIManager.put( "ProgressBar.font", uiFont );
UIManager.put( "ScrollPane.font", uiFont );
UIManager.put( "Viewport.font", uiFont );
UIManager.put( "TabbedPane.font", uiFont );
UIManager.put( "Table.font", uiFont );
UIManager.put( "TableHeader.font", uiFont );
UIManager.put( "TextField.font", uiFont );
UIManager.put( "PasswordField.font", uiFont );
UIManager.put( "TextArea.font", uiFont );
UIManager.put( "TextPane.font", uiFont );
UIManager.put( "EditorPane.font", uiFont );
UIManager.put( "TitledBorder.font", uiFont );
UIManager.put( "ToolBar.font", uiFont );
UIManager.put( "ToolTip.font", uiFont );
UIManager.put( "Tree.font", uiFont );
// Apple menu bar
}
public static void resetConstraints( GridBagConstraints constraints ) {
// Reset to default constraints
constraints.gridx = GridBagConstraints.RELATIVE;
constraints.gridy = GridBagConstraints.RELATIVE;
constraints.gridwidth = 1;
constraints.gridheight = 1;
constraints.weightx = 0;
constraints.weighty = 0;
constraints.anchor = GridBagConstraints.CENTER;
constraints.fill = GridBagConstraints.NONE;
constraints.insets = new Insets( 0, 0, 0, 0 );
constraints.ipadx = 0;
constraints.ipady = 0;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
f31e165f6913fe559baefbc820a3af4602c1a9de
|
0eea992a6acc1702d96d5ae2e3e272bad529292f
|
/src/main/java/cn/client/ui/admin/DistributeCompanyTaskDialogController.java
|
8b00088aaaa7622b685870dfd64cd749a3a9c03a
|
[] |
no_license
|
llgeill/new_outsourc_project
|
a849e5f9e9e2c8572720e5251cddbbf748ab8f6e
|
65f1dd0a89bf46176d8c0c2026ff8ab514dd5e3e
|
refs/heads/master
| 2020-03-09T11:51:46.176645
| 2018-04-09T12:53:14
| 2018-04-09T12:53:14
| 128,771,255
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,816
|
java
|
package cn.client.ui.admin;
import cn.client.pojo.Company;
import cn.client.pojo.CompanyTask;
import cn.client.util.AlertProxy;
import cn.client.util.MyUtil;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.stage.Stage;
import java.util.List;
public class DistributeCompanyTaskDialogController extends Dialog {
@FXML
private DialogPane distributeCompanyTaskDialogPane;
@FXML
private ComboBox<String> distributeCompanyTask;
@FXML
private ImageView closeImage;
public Company company;
private CompanyTask companyTask=null;
public List<Company> list;
private Stage stage;
@FXML
private void initialize(){
closeImage.setImage(new Image("static/image/uiImage/window/window_close_normal.png"));
closeImage.setOnMouseClicked(event -> {
closeImage.setImage(new Image("static/image/uiImage/window/window_close_press.png"));
stage.close();
});
closeImage.setOnMouseEntered(event -> {
closeImage.setImage(new Image("static/image/uiImage/window/window_close_hover.png"));
});
closeImage.setOnMouseExited(event -> {
closeImage.setImage(new Image("static/image/uiImage/window/window_close_normal.png"));
});
}
public void setStage(Stage stage) {
this.stage = stage;
}
public void initializeAll(){
submit();
String json=MyUtil.doJsonPost("findAllCompany","");
list=MyUtil.parseJSONArray(json,Company.class);
distributeCompanyTask.getItems().add("请选择任务所属公司");
distributeCompanyTask.setValue("请选择任务所属公司");
String id="";
if(MyUtil.getCompanyTaskUI().getCp()!=null){id=MyUtil.getCompanyTaskUI().getCp().getId();}
for(Company company:list){
if(company.getCompanyTask()!=null){
if(company.getCompanyTask().getId().equals(id))this.company=company;
}else{
distributeCompanyTask.getItems().add(company.getName());
}
}
}
public void personSubmit(){
if(company!=null&&company.getCompanyTask()!=null){
company.setCompanyTask(companyTask);
MyUtil.doJsonPost("saveCompany",MyUtil.toJSON(company));
}
}
public int submit(){
ButtonType buttonType1=distributeCompanyTaskDialogPane.getButtonTypes().get(0);
Button butoon1= (Button) distributeCompanyTaskDialogPane.lookupButton(buttonType1);
butoon1.setStyle("-fx-background-color:#3BBA7D;-fx-text-fill:#f9fffc");
ButtonType buttonType=distributeCompanyTaskDialogPane.getButtonTypes().get(1);
Button butoon= (Button) distributeCompanyTaskDialogPane.lookupButton(buttonType);
butoon.setStyle("-fx-background-color:#3BBA7D;-fx-text-fill:#f9fffc");
butoon.setText("保存");
butoon.addEventFilter(ActionEvent.ACTION, event-> {
if(distributeCompanyTask.getValue().equals("请选择任务所属公司")){
AlertProxy.showErrorAlert("没有选择任务所属公司!");
event.consume();
}else{
for(Company company:list){
if(distributeCompanyTask.getValue().equals(company.getName())){
company.setCompanyTask(companyTask);
MyUtil.doJsonPost("saveCompany",MyUtil.toJSON(company));
}
}
}
});
return 0;
}
public CompanyTask getCompanyTask() {
return companyTask;
}
public void setCompanyTask(CompanyTask companyTask) {
this.companyTask = companyTask;
}
}
|
[
"903857227@qq.com"
] |
903857227@qq.com
|
74b8784dda3b8b4f1cf511da214068b6efa1e209
|
639bda98e96b9be75a0255e76b8cfdac98cdad56
|
/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlaybackControlView.java
|
47d60e02330ced4cefeae20852038dbce1bfb07f
|
[
"Apache-2.0"
] |
permissive
|
amzn/exoplayer-amazon-port
|
bcfd022e914715514f4ee64b992d7c9124ab2e2c
|
e2a7039682e75343f4cd1713ff15d74cc983e397
|
refs/heads/amazon/r2.10.6
| 2023-06-25T22:18:40.942866
| 2018-01-08T11:19:12
| 2019-11-07T14:40:56
| 50,205,742
| 179
| 94
|
Apache-2.0
| 2019-12-10T09:57:32
| 2016-01-22T20:28:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,979
|
java
|
/*
* Copyright (C) 2016 The Android Open Source Project
*
* 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.google.android.exoplayer2.ui;
import android.content.Context;
import android.util.AttributeSet;
/** @deprecated Use {@link PlayerControlView}. */
@Deprecated
public class PlaybackControlView extends PlayerControlView {
/** @deprecated Use {@link com.google.android.exoplayer2.ControlDispatcher}. */
@Deprecated
public interface ControlDispatcher extends com.google.android.exoplayer2.ControlDispatcher {}
@Deprecated
@SuppressWarnings("deprecation")
private static final class DefaultControlDispatcher
extends com.google.android.exoplayer2.DefaultControlDispatcher implements ControlDispatcher {}
/** @deprecated Use {@link com.google.android.exoplayer2.DefaultControlDispatcher}. */
@Deprecated
@SuppressWarnings("deprecation")
public static final ControlDispatcher DEFAULT_CONTROL_DISPATCHER = new DefaultControlDispatcher();
public PlaybackControlView(Context context) {
super(context);
}
public PlaybackControlView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PlaybackControlView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public PlaybackControlView(
Context context, AttributeSet attrs, int defStyleAttr, AttributeSet playbackAttrs) {
super(context, attrs, defStyleAttr, playbackAttrs);
}
}
|
[
"olly@google.com"
] |
olly@google.com
|
f6f2c3a0697a34faa7fbea496c29747b70e3314d
|
2efb7173445a829835409fabefe0ee3504423ee9
|
/ph-settings/src/main/java/com/helger/settings/exchange/xml/SettingsMicroDocumentConverter.java
|
ea2206dc427b8a5c674c88e962ab49fb431863a3
|
[
"Apache-2.0"
] |
permissive
|
phax/ph-commons
|
207f6d6be4b004a3decea7d40967270cd604909d
|
f6798b311d9ad7dbda7717f1216145dbb2bc785a
|
refs/heads/master
| 2023-08-28T01:01:56.141949
| 2023-08-22T12:51:40
| 2023-08-22T12:51:40
| 23,062,279
| 35
| 15
|
Apache-2.0
| 2023-03-29T09:58:08
| 2014-08-18T07:21:36
|
Java
|
UTF-8
|
Java
| false
| false
| 4,454
|
java
|
/*
* Copyright (C) 2014-2023 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.settings.exchange.xml;
import java.util.Comparator;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.helger.commons.ValueEnforcer;
import com.helger.commons.string.StringHelper;
import com.helger.commons.typeconvert.TypeConverter;
import com.helger.settings.ISettings;
import com.helger.settings.factory.ISettingsFactory;
import com.helger.xml.microdom.IMicroElement;
import com.helger.xml.microdom.IMicroQName;
import com.helger.xml.microdom.MicroElement;
import com.helger.xml.microdom.MicroQName;
import com.helger.xml.microdom.convert.IMicroTypeConverter;
public class SettingsMicroDocumentConverter <T extends ISettings> implements IMicroTypeConverter <T>
{
private static final String ELEMENT_SETTING = "setting";
private static final IMicroQName ATTR_NAME = new MicroQName ("name");
private static final IMicroQName ATTR_IS_NULL = new MicroQName ("is-null");
private final ISettingsFactory <T> m_aSettingFactory;
/**
* Constructor that uses the default settings factory.
*
* @param aSettingsFactory
* Settings factory to be used. May not be <code>null</code>.
*/
public SettingsMicroDocumentConverter (@Nonnull final ISettingsFactory <T> aSettingsFactory)
{
m_aSettingFactory = ValueEnforcer.notNull (aSettingsFactory, "SettingsFactory");
}
@Nonnull
public ISettingsFactory <T> getSettingsFactory ()
{
return m_aSettingFactory;
}
@Nonnull
public IMicroElement convertToMicroElement (@Nonnull final T aObject,
@Nullable final String sNamespaceURI,
@Nonnull final String sTagName)
{
final IMicroElement eRoot = new MicroElement (sNamespaceURI, sTagName);
eRoot.setAttribute (ATTR_NAME, aObject.getName ());
// Sort fields to have them deterministic
for (final Map.Entry <String, Object> aEntry : aObject.getSortedByKey (Comparator.naturalOrder ()).entrySet ())
{
final String sFieldName = aEntry.getKey ();
final Object aValue = aEntry.getValue ();
final IMicroElement eSetting = eRoot.appendElement (sNamespaceURI, ELEMENT_SETTING);
eSetting.setAttribute (ATTR_NAME, sFieldName);
if (aValue == null)
eSetting.setAttribute (ATTR_IS_NULL, true);
else
{
final String sValue = TypeConverter.convert (aValue, String.class);
eSetting.appendText (sValue);
}
}
return eRoot;
}
@Nonnull
public T convertToNative (final IMicroElement aElement)
{
// Create new settings object
final String sSettingsName = aElement.getAttributeValue (ATTR_NAME);
if (StringHelper.hasNoText (sSettingsName))
throw new IllegalStateException ("Settings 'name' is missing or empty");
final T aSettings = m_aSettingFactory.apply (sSettingsName);
// settings are only on the top-level
for (final IMicroElement eSetting : aElement.getAllChildElements ())
{
final String sFieldName = eSetting.getAttributeValue (ATTR_NAME);
final String sValue;
if (eSetting.hasAttribute (ATTR_IS_NULL))
{
// Special case for null
sValue = null;
}
else
{
// Backwards compatibility
final IMicroElement eValue = eSetting.getFirstChildElement ("value");
if (eValue != null)
sValue = eValue.getTextContent ();
else
sValue = eSetting.getTextContent ();
}
// Use "put" instead of "putIn" to avoid that the callbacks are invoked!
// Use "putIn" to ensure that the custom value modifiers are applied and
// that it is consistent with the properties implementation
aSettings.putIn (sFieldName, sValue);
}
return aSettings;
}
}
|
[
"philip@helger.com"
] |
philip@helger.com
|
9bc00d8e31c8ef75337b348933e8bf6befa6009f
|
a64ff1a666936e374a6028d510003ce3dba007d4
|
/src/main/java/dz/elit/jhipster/application/web/rest/util/HeaderUtil.java
|
4a03cea3454cf2bc9fcb57dd482c9bc8673c43b3
|
[] |
no_license
|
hayadi/jhipster-project
|
912ff25fc1fa6126dbab37aae42f590fa0f2f7e8
|
0a9f92fbc953fc98e1fa61991b888342dcfce882
|
refs/heads/master
| 2020-05-15T23:09:43.737537
| 2019-04-21T14:22:10
| 2019-04-21T14:22:10
| 182,543,019
| 0
| 0
| null | 2019-04-21T14:26:07
| 2019-04-21T14:22:00
|
Java
|
UTF-8
|
Java
| false
| false
| 1,669
|
java
|
package dz.elit.jhipster.application.web.rest.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
/**
* Utility class for HTTP headers creation.
*/
public final class HeaderUtil {
private static final Logger log = LoggerFactory.getLogger(HeaderUtil.class);
private static final String APPLICATION_NAME = "projectJHipsterApp";
private HeaderUtil() {
}
public static HttpHeaders createAlert(String message, String param) {
HttpHeaders headers = new HttpHeaders();
headers.add("X-" + APPLICATION_NAME + "-alert", message);
headers.add("X-" + APPLICATION_NAME + "-params", param);
return headers;
}
public static HttpHeaders createEntityCreationAlert(String entityName, String param) {
return createAlert(APPLICATION_NAME + "." + entityName + ".created", param);
}
public static HttpHeaders createEntityUpdateAlert(String entityName, String param) {
return createAlert(APPLICATION_NAME + "." + entityName + ".updated", param);
}
public static HttpHeaders createEntityDeletionAlert(String entityName, String param) {
return createAlert(APPLICATION_NAME + "." + entityName + ".deleted", param);
}
public static HttpHeaders createFailureAlert(String entityName, String errorKey, String defaultMessage) {
log.error("Entity processing failed, {}", defaultMessage);
HttpHeaders headers = new HttpHeaders();
headers.add("X-" + APPLICATION_NAME + "-error", "error." + errorKey);
headers.add("X-" + APPLICATION_NAME + "-params", entityName);
return headers;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
08238371f0df73ca965ab96ee4ee714ff74c911e
|
b59aeb1c72857f39b1d3807246dc03ef7e791ffb
|
/src/main/java/me/limeglass/khoryl/elements/entity/events/EvtCombustByBlock.java
|
7d3a7fe2f04743042e05431c96983f02a6d10848
|
[
"Apache-2.0"
] |
permissive
|
TheLimeGlass/Khoryl
|
64b2c1b39ce7700b6d7168b58ba0d61241277a01
|
ac61e69e35b957d2dc97eeabd0e9d47ca46bff25
|
refs/heads/master
| 2023-07-10T19:26:50.187972
| 2023-07-03T22:45:22
| 2023-07-03T22:45:22
| 211,148,118
| 5
| 1
|
Apache-2.0
| 2023-09-11T22:28:03
| 2019-09-26T17:44:28
|
Java
|
UTF-8
|
Java
| false
| false
| 2,439
|
java
|
package me.limeglass.khoryl.elements.entity.events;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.entity.Entity;
import org.bukkit.event.Event;
import org.bukkit.event.entity.EntityCombustByBlockEvent;
import org.eclipse.jdt.annotation.Nullable;
import ch.njol.skript.Skript;
import ch.njol.skript.aliases.ItemType;
import ch.njol.skript.doc.Description;
import ch.njol.skript.doc.Name;
import ch.njol.skript.doc.Since;
import ch.njol.skript.lang.Literal;
import ch.njol.skript.lang.SkriptEvent;
import ch.njol.skript.lang.SkriptParser.ParseResult;
import ch.njol.skript.registrations.Classes;
import ch.njol.skript.registrations.EventValues;
import ch.njol.skript.util.Getter;
import ch.njol.util.Checker;
@Name("Entity Combust By Block")
@Description("Called when a block causes an entity to combust (aka burn or take fire damage).")
@Since("1.0.6")
public class EvtCombustByBlock extends SkriptEvent {
static {
Skript.registerEvent("combust by block", EvtCombustByBlock.class, EntityCombustByBlockEvent.class, "entit(y|ies) combust[ing] (from|by) (%-itemtypes/blockdatas%|block)");
EventValues.registerEventValue(EntityCombustByBlockEvent.class, Entity.class, new Getter<Entity, EntityCombustByBlockEvent>() {
@Override
public @Nullable Entity get(EntityCombustByBlockEvent event) {
return event.getEntity();
}
}, 0);
}
private Literal<Object> types;
@SuppressWarnings("unchecked")
@Override
public boolean init(Literal<?>[] args, int matchedPattern, ParseResult parseResult) {
types = (Literal<Object>) args[0];
return true;
}
@Override
public boolean check(Event e) {
if (types == null)
return true;
EntityCombustByBlockEvent event = (EntityCombustByBlockEvent) e;
return types.check(event, new Checker<Object>() {
@Override
public boolean check(Object object) {
Block combuster = event.getCombuster();
if (combuster == null)
return false;
if (object instanceof ItemType)
return ((ItemType) object).isOfType(combuster);
else if (combuster instanceof BlockData)
return combuster.getBlockData().matches(((BlockData) object));
return false;
}
});
}
@Override
public String toString(@Nullable Event event, boolean debug) {
if (event == null || debug || types == null)
return "entity combusting by block";
return "entity combusting by itemtypes/blockdatas " + Classes.toString(types);
}
}
|
[
"seantgrover@gmail.com"
] |
seantgrover@gmail.com
|
049193297b4496057b4fda113db74c3d41fd45bb
|
dec20d76616f40658a89243c5016d5d389cda955
|
/src/com/attilax/console/Ksl.java
|
eccd0828a3ec843e77e8e19a8e11555eb87c5f91
|
[] |
no_license
|
attilax/vod2
|
25930b87607f4625d07cf6ea5aa4e26b40eb8913
|
05249e18976b17ecc4a9c1fff307a879da2bd341
|
refs/heads/master
| 2021-01-10T21:15:41.546684
| 2015-02-21T17:41:06
| 2015-02-21T17:41:06
| 30,624,384
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,392
|
java
|
package com.attilax.console;
import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;
/** GvCycleQueue entity. @author MyEclipse Persistence Tools */
@DynamicInsert @DynamicUpdate
@Entity @Table(name = "konsoli") public class Ksl implements java.io.Serializable {
// Fields
/**
* * @author attilax 老哇的爪子
*@since o8q 0_a_o$
*/
private static final long serialVersionUID = -8094268729574940010L;
private Integer id;
private Integer cirTimes;
// @in
private Timestamp createtime;
private String rectype;
private Integer del;
private String rltRecId;
String sendRetMsg;
/**
// attilax 老哇的爪子 1_48_o o8r
* @return the sendMsg
*/
public String getSendMsg() {
return sendMsg;
}
/**
// attilax 老哇的爪子 1_48_o o8r
* @param sendMsg the sendMsg to set
*/
public void setSendMsg(String sendMsg) {
this.sendMsg = sendMsg;
}
String sendMsg;
/**
// attilax 老哇的爪子 h_q_z o8r
* @return the lastSuccRetMsg
*/
@Column(name="lastSuccRetMsg")
public String getLastSuccRetMsg() {
return lastSuccRetMsg;
}
/**
// attilax 老哇的爪子 h_q_z o8r
* @param lastSuccRetMsg the lastSuccRetMsg to set
*/
public void setLastSuccRetMsg(String lastSuccRetMsg) {
this.lastSuccRetMsg = lastSuccRetMsg;
}
String lastSuccRetMsg;
private Timestamp lastSuccTime;
private Integer retryTimes;
// String sendRetMsg;
/**
// attilax 老哇的爪子 h_q_z o8r
* @return the lastSuccTime
*/
@Column(name="lastSuccTime")
public Timestamp getLastSuccTime() {
return lastSuccTime;
}
/**
// attilax 老哇的爪子 m_r_t o8r
* @param lastSuccTime the lastSuccTime to set
*/
public void setLastSuccTime(Timestamp lastSuccTime) {
this.lastSuccTime = lastSuccTime;
}
public Integer getRetryTimes() {
return retryTimes;
}
public void setRetryTimes(Integer retryTimes) {
this.retryTimes = retryTimes;
}
/**
// attilax 老哇的爪子 0_0_4 o8q
* @return the sendRetMsg
*/
@Column(name="SendRetMsg")
public String getSendRetMsg() {
return sendRetMsg;
}
/**
// attilax 老哇的爪子 0_0_4 o8q
* @param sendRetMsg the sendRetMsg to set
*/
public void setSendRetMsg(String sendRetMsg) {
this.sendRetMsg = sendRetMsg;
}
// Constructors
/** default constructor */
public Ksl() {}
/** minimal constructor */
public Ksl(Integer cirTimes, Timestamp createtime, String rectype, Integer del) {
this.cirTimes = cirTimes;
this.createtime = createtime;
this.rectype = rectype;
this.del = del;
}
/** full constructor */
public Ksl(Integer cirTimes, Timestamp createtime, String rectype, Integer del, String rltRecId) {
this.cirTimes = cirTimes;
this.createtime = createtime;
this.rectype = rectype;
this.del = del;
this.rltRecId = rltRecId;
}
// Property accessors
@GenericGenerator(name = "generator", strategy = "native")
@Id @GeneratedValue(generator = "generator") @Column(name = "id", unique = true, nullable = false) public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name = "cirTimes", nullable = false) public Integer getCirTimes() {
return this.cirTimes;
}
public void setCirTimes(Integer cirTimes) {
this.cirTimes = cirTimes;
}
@Column(name = "createtime", nullable = false, length = 23) public Timestamp getCreatetime() {
return this.createtime;
}
public void setCreatetime(Timestamp createtime) {
this.createtime = createtime;
}
@Column(name = "rectype", nullable = false, length = 50) public String getRectype() {
return this.rectype;
}
public void setRectype(String rectype) {
this.rectype = rectype;
}
@Column(name = "del", nullable = false) public Integer getDel() {
return this.del;
}
public void setDel(Integer del) {
this.del = del;
}
@Column(name = "rltRecID", length = 50) public String getRltRecId() {
return this.rltRecId;
}
public void setRltRecId(String rltRecId) {
this.rltRecId = rltRecId;
}
}
|
[
"1466519819@qq.com"
] |
1466519819@qq.com
|
e049d48fef87df57c9591cdb0902a14ebfc6c4f9
|
8fecdb518e299603c8b9ffc10180822d9d8fa9ce
|
/src/main/java/com/hubspot/jackson/datatype/protobuf/builtin/serializers/NullValueSerializer.java
|
d623ac814dd4c5c4bd65b9d2a7a5d156df22932a
|
[
"Apache-2.0"
] |
permissive
|
HubSpot/jackson-datatype-protobuf
|
ca9bfb08de8f25330498cf2f4e3ae2707c059367
|
cc78f11d7babe20ccdedeb04b1496c185e110cd1
|
refs/heads/master
| 2023-08-27T19:45:16.083587
| 2023-07-19T18:38:12
| 2023-07-19T18:38:12
| 13,889,412
| 102
| 88
|
Apache-2.0
| 2023-07-20T14:40:33
| 2013-10-26T19:18:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,259
|
java
|
package com.hubspot.jackson.datatype.protobuf.builtin.serializers;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import com.google.protobuf.NullValue;
import com.hubspot.jackson.datatype.protobuf.ProtobufJacksonConfig;
import java.io.IOException;
public class NullValueSerializer extends StdSerializer<NullValue> {
/**
* @deprecated use {@link #NullValueSerializer(ProtobufJacksonConfig)}
*/
@Deprecated
public NullValueSerializer() {
this(ProtobufJacksonConfig.getDefaultInstance());
}
public NullValueSerializer(ProtobufJacksonConfig config) {
super(NullValue.class);
}
@Override
public void serialize(NullValue value, JsonGenerator gen, SerializerProvider provider)
throws IOException {
gen.writeNull();
}
@Override
public void acceptJsonFormatVisitor(
JsonFormatVisitorWrapper visitor,
JavaType typeHint
) throws JsonMappingException {
visitor.expectNullFormat(typeHint);
}
}
|
[
"jhaber@hubspot.com"
] |
jhaber@hubspot.com
|
80f45aed506be62916608b5331e94d72e9043368
|
3bf6d4a745e6d4d6f8dfcc83400ae9079da62a58
|
/source/gotosea/trunk/common/src/main/java/com/hyhl/common/exception/type/OrderError.java
|
46870e6b4145c642ba4af2fdfeadd24dcba176d5
|
[] |
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
| 1,561
|
java
|
package com.hyhl.common.exception.type;
import com.hyhl.common.exception.IBaseBusinessError;
import java.util.Locale;
public enum OrderError implements IBaseBusinessError {
ORDER_NOT_FOUND(404,"订单不存在","ORDER_NOT_FOUND"),
TIME_INVALID(400,"出行时间不能小于当前时间","TIME_INVALID"),
UNSUPPOT_COUPON(400,"该服务不支持使用优惠券","UNSUPPOT_COUPON"),
SALE_OUT(401,"本服务于所选日期已售罄","SALE_OUT"),
UNBELONG(403,"该优惠券非本人持有","UNBELONG"),
NON_COUPON(402,"无可用优惠券","NON_COUPON"),
INVALID_COUPON(402,"无效的优惠券","INVALID_COUPON"),
DISSATIFY(403,"下单未达到满减金额","DISSATIFY"),
NOT_IN_EFFECT(402,"未生效的优惠券","NOT_IN_EFFECT"),
PAY_FAIL(405,"支付失败","PAY_FAIL"),
ORDER_OVERTIME(405,"订单超时","ORDER_OVERTIME"),
PAYFEE_WRONG(400,"支付金额错误","PAYFEE_WRONG"),
INVALID_SERVE(401,"服务未生效或已过期","INVALID_SERVE")
;
int status;
String message;
String code;
OrderError(int status,String message,String code){
this.status = status;
this.message = message;
this.code = code;
}
@Override
public int getStatus() {
return this.status;
}
@Override
public String getMessage() {
return this.message;
}
@Override
public String getCode() {
return String.valueOf(this.status);
}
@Override
public String getMessage(Locale locale) {
return this.message;
}
}
|
[
"joker2580136@126.com"
] |
joker2580136@126.com
|
23afd93b91af5297d726e4f24a24b8a8b9855fbe
|
39e32f672b6ef972ebf36adcb6a0ca899f49a094
|
/dcm4chee-web/tags/DCM4CHEE_WEB_3_0_0_TEST1/dcm4chee-web-war/src/main/java/org/dcm4chee/web/war/common/EditDicomObjectPage.java
|
513c1c2b316baec6c638be7b21b47e0fecfb2225
|
[
"Apache-2.0"
] |
permissive
|
medicayun/medicayundicom
|
6a5812254e1baf88ad3786d1b4cf544821d4ca0b
|
47827007f2b3e424a1c47863bcf7d4781e15e814
|
refs/heads/master
| 2021-01-23T11:20:41.530293
| 2017-06-05T03:11:47
| 2017-06-05T03:11:47
| 93,123,541
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,657
|
java
|
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is part of dcm4che, an implementation of DICOM(TM) in
* Java(TM), hosted at http://sourceforge.net/projects/dcm4che.
*
* The Initial Developer of the Original Code is
* Agfa-Gevaert AG.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* See listed authors below.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
package org.dcm4chee.web.war.common;
import org.apache.wicket.Page;
import org.apache.wicket.ResourceReference;
import org.apache.wicket.markup.html.CSSPackageResource;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.resources.CompressedResourceReference;
import org.dcm4chee.web.common.base.BaseWicketPage;
import org.dcm4chee.web.war.common.model.AbstractEditableDicomModel;
/**
* @author Gunter Zeilinger <gunterze@gmail.com>
* @author Franz Willer <franz.willer@gmail.com>
* @version $Revision$ $Date$
* @since Nov 12, 2009
*/
public class EditDicomObjectPage extends WebPage {
private static final ResourceReference BaseCSS = new CompressedResourceReference(BaseWicketPage.class, "base-style.css");
private static final ResourceReference CSS = new CompressedResourceReference(EditDicomObjectPage.class, "edit-style.css");
public EditDicomObjectPage(final Page page, final AbstractEditableDicomModel model) {
if (EditDicomObjectPage.BaseCSS != null)
add(CSSPackageResource.getHeaderContribution(EditDicomObjectPage.BaseCSS));
if (EditDicomObjectPage.CSS != null)
add(CSSPackageResource.getHeaderContribution(EditDicomObjectPage.CSS));
add(new EditDicomObjectPanel("dicomobject", model.getDataset(), model.getClass().getSimpleName()) {
private static final long serialVersionUID = 1L;
@Override
protected void onCancel() {
setResponsePage(page);
}
@Override
protected void onApply() {
model.update(getDicomObject());
}
@Override
protected void onSubmit() {
model.update(getDicomObject());
setResponsePage(page);
}
});
}
}
|
[
"liliang_lz@icloud.com"
] |
liliang_lz@icloud.com
|
905ccde2a7dcdfa4e6d5708b7dc03e1649cd8d46
|
e034eadd636b4a43f6c7b97627af7d718dec58ff
|
/ngpm/com.sap.runlet.apps.opportunitymanagement.ui/gxt/src/com/extjs/gxt/ui/client/core/MarkupBase.java
|
c7ef1703851ded277bb36991841956b89f4c371b
|
[] |
no_license
|
FURCAS-dev/FURCAS
|
ed89b3152a56466fee04285fa02b09d3124adf8f
|
1f5651283f45666792b4747c5ce97128807761f1
|
refs/heads/master
| 2020-06-03T21:46:35.150521
| 2017-08-09T10:20:45
| 2017-08-09T10:20:45
| 1,083,639
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,139
|
java
|
/*
* Ext GWT - Ext for GWT
* Copyright(c) 2007-2009, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
package com.extjs.gxt.ui.client.core;
import com.extjs.gxt.ui.client.GXT;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
public class MarkupBase implements Markup {
static {
GXT.init();
}
private String html;
private Element rootElement;
public static Element createRootElement(String html) {
Element rootElement = DOM.createDiv();
rootElement.setInnerHTML(html);
if (rootElement.getFirstChild() != null) {
rootElement = rootElement.getFirstChildElement().cast();
}
return rootElement;
}
public String getHtml() {
return html;
}
/**
* for use by the generator only
*/
public void init(String html, Element rootElement) {
this.html = html;
this.rootElement = rootElement;
}
public Element select(String selector) {
assert rootElement != null : "rootElement is null";
return DomQuery.selectNode(selector, rootElement);
}
public Element getRootElement() {
return rootElement;
}
}
|
[
"goldschm@.fzi.de"
] |
goldschm@.fzi.de
|
01c2df5483e83effe37015af169233ef479788e3
|
1f0a896d12afa98b937f546b352046deef3326fd
|
/src/test/java/edu/msstate/nsparc/wings/integration/tests/trade/TC_01_96_Trade_Enrollment_Expenditures_Edit_Remove_Security.java
|
ccea57aaface1323c46db24e0fb8262f243f492d
|
[] |
no_license
|
allaallala/wings_maven
|
8e3f2fc9e9a789664b4f4ccf4e506895cf595853
|
8f33c3cb567ffde08921e22a91d8dc75efbc97cb
|
refs/heads/master
| 2022-01-26T06:30:26.290273
| 2019-06-04T13:12:17
| 2019-06-04T13:12:17
| 190,203,243
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,720
|
java
|
package edu.msstate.nsparc.wings.integration.tests.trade;
import edu.msstate.nsparc.wings.integration.base.BaseWingsTest;
import edu.msstate.nsparc.wings.integration.enums.Roles;
import edu.msstate.nsparc.wings.integration.forms.expendituresEncumbrances.ManageExpenditureEncumbrancesForm;
import edu.msstate.nsparc.wings.integration.models.trade.ExpenditureEncumbrance;
import edu.msstate.nsparc.wings.integration.models.trade.trainings.TradeTraining;
import edu.msstate.nsparc.wings.integration.steps.TradeEnrollmentSteps;
import edu.msstate.nsparc.wings.integration.storage.TradeEnrollmentObjects;
import edu.msstate.nsparc.xray.info.TestCase;
@TestCase(id = "WINGS-10530")
public class TC_01_96_Trade_Enrollment_Expenditures_Edit_Remove_Security extends BaseWingsTest {
public void main() {
TradeTraining tradeTraining = TradeEnrollmentObjects.getCreatedTradeTraining();
ExpenditureEncumbrance expenditureEncumbrance = new ExpenditureEncumbrance();
TradeEnrollmentSteps.addExpenditureEncumbrance(tradeTraining.getTradeEnrollment(), expenditureEncumbrance);
logStep("Log in as Trade Director and open Expenditure/Encumbrance managing page");
TradeEnrollmentSteps.openManageExpenditurePage(tradeTraining.getTradeEnrollment(), Roles.TRADEDIRECTOR);
logStep("Fill out some search criteria fields with any data");
ManageExpenditureEncumbrancesForm manageExpenditureEncumbrancesForm = new ManageExpenditureEncumbrancesForm();
manageExpenditureEncumbrancesForm.performSearch(expenditureEncumbrance);
logStep("Validate that Remove and Edit buttons are inactive");
manageExpenditureEncumbrancesForm.validateDisabledButtons();
}
}
|
[
"B2eQa&udeg"
] |
B2eQa&udeg
|
8c8eeb36a45cf1fca17fc5b64db8dc5e3d42d810
|
728aa6545b7fa2052822c49f2ff705bd2b5173eb
|
/src/main/java/com/questv/api/security/SecurityConstants.java
|
b73b42017f08ca508f09438f5852cf981b34449f
|
[] |
no_license
|
GersonSales/questv-api
|
9718bce14ead636aec8bcbb9385aff1623e05419
|
1d2e368e17911f7395963963213f58260ec8cd29
|
refs/heads/master
| 2022-07-13T00:38:43.637630
| 2020-05-19T20:04:03
| 2020-05-19T20:04:03
| 163,969,909
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 657
|
java
|
package com.questv.api.security;
public class SecurityConstants {
public static final String SECRET = "SecretKeyToGenJWTs";
public static final long EXPIRATION_TIME = 864_000_000; // 10 days
public static final String TOKEN_PREFIX = "Bearer ";
public static final String HEADER_STRING = "Authorization";
public static final String SIGN_UP_URL = "/users/sign-up";
public static final String SERIES_URL = "/series/**" ;
public static final String SEASONS_URL = "/seasons";
public static final String EPISODES_URL = "/episodes";
public static final String QUESTIONS_URL = "/questions";
public static final String HEROKU_URL = "/**";
}
|
[
"gerson.junior@ccc.ufcg.edu.br"
] |
gerson.junior@ccc.ufcg.edu.br
|
1eaf1ffd046610fd3c766e956293ca855637fe50
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XWIKI-14599-10-23-Single_Objective_GGA-WeightedSum/org/xwiki/extension/jar/internal/handler/JarExtensionJobFinishingListener_ESTest_scaffolding.java
|
7cdf4323cc46ebb1dea05a40f5ed906dca995e43
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 477
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Apr 01 10:51:20 UTC 2020
*/
package org.xwiki.extension.jar.internal.handler;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class JarExtensionJobFinishingListener_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
a80544441544e46cb3928c549ac3a0f685d13ab5
|
069fdf4c2fd476058844525f7d52ebf42fc7be4e
|
/src/main/java/com/fz/service/BaseService.java
|
1b2bc4735c0c6b688e668af774b1d4cd603a7b48
|
[] |
no_license
|
NDCFL/LZSendMail
|
719cdaaa8df1eacd037917f86bfdf08f8b2c935d
|
97084278b31e4ffcef86a3ad482209e932797d64
|
refs/heads/master
| 2021-05-06T17:10:24.095414
| 2017-12-02T09:08:12
| 2017-12-02T09:08:12
| 111,791,945
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 500
|
java
|
package com.fz.service;
import com.fz.comment.PageQuery;
import com.fz.comment.StatusQuery;
import java.util.List;
import java.util.Map;
/**
* Created by Administrator on 2017/9/6.
*/
public interface BaseService<T> {
public T queryById(long id);
public void update(T t);
public void add(T t);
public void delete(long id);
public List<T> pagelist(PageQuery pageQuery);
public void updateStatus(StatusQuery statusQuery);
public int count(PageQuery pageQuery);
}
|
[
"275300091@qq.com"
] |
275300091@qq.com
|
ac96377895547fdcfa535277ede204d1da8e8dcd
|
d55b044ce60c06d69325b4634ddb1a46eedc6e1e
|
/valley/src/main/java/com/hn/d/valley/main/friend/PhoneContactItem.java
|
6e41a2887acd09123451c37a0ade549dd0a5d8b3
|
[] |
no_license
|
AppSecAI-TEST/UIView2
|
dc40b8554fe130a3e08bc15a0282f3d4ae046e8a
|
b6e4f10e4e51206c9d76954fa27e185362738495
|
refs/heads/master
| 2021-01-16T11:41:44.850053
| 2017-08-11T06:13:09
| 2017-08-11T06:13:09
| 100,001,170
| 0
| 0
| null | 2017-08-11T06:53:18
| 2017-08-11T06:53:18
| null |
UTF-8
|
Java
| false
| false
| 562
|
java
|
package com.hn.d.valley.main.friend;
import com.angcyo.uiview.utils.ContactsPickerHelper;
/**
* Created by hewking on 2017/3/23.
*/
public class PhoneContactItem extends AbsContactItem {
private ContactsPickerHelper.ContactsInfo contactsInfo;
public PhoneContactItem(ContactsPickerHelper.ContactsInfo info) {
this.contactsInfo = info;
groupText = info.letter;
itemType = ItemTypes.PHONECOTACT;
}
public ContactsPickerHelper.ContactsInfo getContactsInfo() {
return contactsInfo;
}
}
|
[
"angcyo@126.com"
] |
angcyo@126.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.