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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0b71202d8309af014417ca8fc3c34eb44d977e9d
|
1f07a675ed2cf86a0d9aa6dda44f2f912d901271
|
/app/src/main/java/ly/pp/addsongs/C0998at.java
|
bc6a8a1b1d32db42dc23a15adcd1a6c2e9ea1e2f
|
[] |
no_license
|
2953298096/JPapplication
|
f6d0287e629a64ebc4869c9253aecdbebfc0be29
|
e1425acac26b588d75483c70ec51bdce12a281ce
|
refs/heads/master
| 2020-07-01T07:03:18.963303
| 2019-05-03T04:37:46
| 2019-05-03T04:37:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 786
|
java
|
package ly.pp.addsongs;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.widget.Toast;
/* renamed from: ly.pp.addsongs.at */
final class C0998at implements OnClickListener {
private final Login f5130a;
C0998at(Login login) {
f5130a = login;
}
public final void onClick(DialogInterface dialogInterface, int i) {
Intent intent = new Intent();
intent.setClass(f5130a, OLMainMode.class);
Toast.makeText(f5130a, "登陆成功!本版本由梦魂☆梦回出品" + f5130a.f4182h + "!", Toast.LENGTH_SHORT).show();
f5130a.startActivity(intent);
dialogInterface.dismiss();
f5130a.finish();
}
}
|
[
"2431548195@qq.com"
] |
2431548195@qq.com
|
1606433c8c700a363840377513ed035066ccc2d3
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/19/19_74629e2fc4cf985bb834cb1752dc117233a97639/ArmyManager/19_74629e2fc4cf985bb834cb1752dc117233a97639_ArmyManager_s.java
|
5d128b20a8095bbf8b43a883f76074996a93491e
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,966
|
java
|
package fr.abu.newlab.adg.client.manager;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import com.google.gwt.core.client.GWT;
import fr.abu.newlab.adg.client.constants.AdgUIConstants;
import fr.abu.thelab.common.model.adg.AdgArmy;
import fr.abu.thelab.common.model.adg.AdgCorps;
import fr.abu.thelab.common.model.adg.AdgGeneral;
import fr.abu.thelab.common.model.adg.AdgRule;
import fr.abu.thelab.common.model.adg.AdgTroop;
public class ArmyManager {
private final static Logger LOG = Logger.getLogger(ArmyManager.class
.getName());
private static VersionManager vm = VersionManager.getInstance();
private static BudgetManager bm = BudgetManager.getInstance();
private static AdgUIConstants uiConstants = GWT
.create(AdgUIConstants.class);
private static ArmyManager INSTANCE;
private final AdgArmy army;
private static final int headerArmySize = 7;
private static final int fixedCorpsSize = 5;
private ArmyManager() {
LOG.info("instanciation");
army = createDefaultArmy();
}
public AdgArmy getArmy() {
return army;
}
public static ArmyManager getInstance() {
if (INSTANCE == null) {
INSTANCE = new ArmyManager();
}
return INSTANCE;
}
private AdgArmy createDefaultArmy() {
AdgArmy army = new AdgArmy();
AdgRule rule = new AdgRule();
rule.setBudget(bm.defaultBudget());
rule.setVersion(vm.defaultVersion());
army.setRule(rule);
army.setTerrain1(uiConstants.terrains()[0]);
army.setTerrain2(uiConstants.terrains()[0]);
army.setTerrain3(uiConstants.terrains()[0]);
army.setTerrain4(uiConstants.terrains()[0]);
for (int index = 0; index < bm.getCorpsQty(); index++) {
AdgCorps corps = createCorps(index);
army.addCorps(corps);
}
return army;
}
private AdgCorps createCorps(int index) {
AdgCorps corps = new AdgCorps(uiConstants.corpsNames()[index]);
AdgGeneral general = new AdgGeneral();
general.setQuality(uiConstants.generalQualities()[0]);
general.setType(uiConstants.generalTypes()[0]);
corps.setGeneral(general);
List<AdgTroop> troops = new ArrayList<AdgTroop>();
int troopQty = uiConstants.defaultTroopQty();
for (int troopIndex = 0; troopIndex < troopQty; troopIndex++) {
troops.add(createNewTroop());
}
corps.setTroops(troops);
return corps;
}
private AdgTroop createNewTroop() {
AdgTroop troop = new AdgTroop();
troop.setQuality(uiConstants.troopQualities()[1]);
return troop;
}
public void addCorps(int index) {
army.addCorps(createCorps(index));
}
public void removeLastCorps() {
army.removeLastCorps();
}
public List<AdgCorps> getCorpsList() {
return army.getCorpsList();
}
public int computeCorpsRowIndex(int corpsIndex) {
int troopSize = computeTroopsSize(corpsIndex - 1, -1);
return headerArmySize + corpsIndex * fixedCorpsSize + troopSize;
}
public List<AdgTroop> getTroops(int corpsIndex) {
return army.getCorps(corpsIndex).getTroops();
}
public int computeTroopRowIndex(int corpsIndex, int troopIndex) {
return computeCorpsRowIndex(corpsIndex) + troopIndex + 3;
}
private int computeTroopsSize(int corpsIndex, int troopIndex) {
int troopSize = 0;
for(int i = 0; i <= corpsIndex; i++) {
troopSize += army.getCorps(i).getTroops().size();
}
return troopSize + troopIndex + 1;
}
public AdgCorps getCorps(int corpsIndex) {
return army.getCorps(corpsIndex);
}
public AdgTroop addNewTroop(int corpsIndex) {
AdgTroop troop = createNewTroop();
getCorps(corpsIndex).getTroops().add(troop);
return troop;
}
public int computeCorpsRowCount(int corpsIndex) {
int troopSize = getCorps(corpsIndex).getTroops().size();
return troopSize + fixedCorpsSize;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
92c846c8d333c1c3fed530df201eb821e9b30070
|
ec5434c59602998930840d8deb4aa5d202088ef8
|
/flutter_app9/lib/taginclude/app/src/main/java/com/example/taginclude/imageAdapter.java
|
1db7ff78ce87bff1224801ceb986802704b1a99f
|
[] |
no_license
|
hemanth-431/My-WorkSpace
|
1aa090b5c6d1548d8f9548ff4cba5f1d9da6fb7d
|
65447efb1d134a88af5380895a2b248ed5896cc1
|
refs/heads/master
| 2023-06-14T01:16:49.756523
| 2021-07-14T16:49:02
| 2021-07-14T16:49:02
| 386,007,166
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,177
|
java
|
package com.example.taginclude;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.GridLayout;
import android.widget.GridView;
import android.widget.ImageView;
public class imageAdapter extends BaseAdapter {
private Context context;
public int[] imagearray={R.drawable.one,R.drawable.two,R.drawable.three,R.drawable.four,R.drawable.five,R.drawable.six};
public imageAdapter(Context context) {
this.context = context;
}
@Override
public int getCount() {
return imagearray.length;
}
@Override
public Object getItem(int position) {
return imagearray[position];
}
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ImageView imageView=new ImageView(context);
imageView.setImageResource(imagearray[position]);
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
imageView.setLayoutParams(new GridView.LayoutParams(340,350));
return imageView;
}
}
|
[
"bandlavhemanth@gmail.com"
] |
bandlavhemanth@gmail.com
|
fce4f7a3e8102b90fd6fc879c0ce54edfcebb883
|
21f5e817ed3cb1d9cdd5cfabf450d28ecf9bed07
|
/src/main/java/com/hankcs/hanlp/dictionary/CoreDictionaryTransformMatrixDictionary.java
|
972dedfa67e0206cedd9f1f9c838e15ea43c9296
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
ml-distribution/HanLP
|
70fbc260bc3a64eef72b55f6ddece039844c3834
|
aae47b06bd636dbde69e491c2e45680a753243fe
|
refs/heads/master
| 2021-01-18T14:05:37.904980
| 2015-07-24T08:47:54
| 2015-07-24T08:47:54
| 39,621,542
| 11
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,567
|
java
|
/*
* <summary></summary>
* <author>He Han</author>
* <email>hankcs.cn@gmail.com</email>
* <create-date>2014/11/19 14:16</create-date>
*
* <copyright file="CoreDictionaryTransformMatrixDictionary.java" company="上海林原信息科技有限公司">
* Copyright (c) 2003-2014, 上海林原信息科技有限公司. All Right Reserved, http://www.linrunsoft.com/
* This source is subject to the LinrunSpace License. Please contact 上海林原信息科技有限公司 to get more information.
* </copyright>
*/
package com.hankcs.hanlp.dictionary;
import com.hankcs.hanlp.HanLP;
import com.hankcs.hanlp.corpus.tag.Nature;
import static com.hankcs.hanlp.utility.Predefine.logger;
/**
* 核心词典词性转移矩阵
* @author hankcs
*/
public class CoreDictionaryTransformMatrixDictionary
{
public static TransformMatrixDictionary<Nature> transformMatrixDictionary;
static
{
transformMatrixDictionary = new TransformMatrixDictionary<Nature>(Nature.class);
long start = System.currentTimeMillis();
if (!transformMatrixDictionary.load(HanLP.Config.CoreDictionaryTransformMatrixDictionaryPath))
{
System.err.println("加载核心词典词性转移矩阵" + HanLP.Config.CoreDictionaryTransformMatrixDictionaryPath + "失败");
System.exit(-1);
}
else
{
logger.info("加载核心词典词性转移矩阵" + HanLP.Config.CoreDictionaryTransformMatrixDictionaryPath + "成功,耗时:" + (System.currentTimeMillis() - start) + " ms");
}
}
}
|
[
"wanggang@zxisl.com"
] |
wanggang@zxisl.com
|
5d56aeaf98f351d18a29c419dbe78dbf3c38b017
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes6.dex_source_from_JADX/com/facebook/reportaproblem/base/bugreport/file/BugReportDeleteDirectoryTask.java
|
5d258c7228e62fc6d935fc0162bd399ac0a72c85
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 366
|
java
|
package com.facebook.reportaproblem.base.bugreport.file;
import android.os.AsyncTask;
import java.io.File;
/* compiled from: shareTracking */
public class BugReportDeleteDirectoryTask extends AsyncTask<File, Void, Void> {
protected Object doInBackground(Object[] objArr) {
BugReportFileHelper.m7048a(((File[]) objArr)[0]);
return null;
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
84b542e848c5d317d01238b74bcf0a5a8cba3264
|
4bfedfe1ef1cd14f03cfaa2b76a54cc307cb75a3
|
/src/lesani/image/xdatahiding/runlength/core/NoMoreRunPairException.java
|
5f779d43db357853ea1ff34b1d118ae521ba3c44
|
[] |
no_license
|
XiaoLi0614/Secure_Partition
|
ad2c2b57c2eeb876bbc76214af2b09fbcd41acd9
|
5e5c519b9a9f2e924d647507d0049a8b2a38b268
|
refs/heads/master
| 2023-08-22T01:06:59.272088
| 2021-09-21T19:06:27
| 2021-09-21T19:06:27
| 303,326,552
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 270
|
java
|
package lesani.image.xdatahiding.runlength.core;
/**
* Created by IntelliJ IDEA.
* User: Mohsen Lesani
* Date: Jun 11, 2005
* Time: 11:36:19 AM
*/
public class NoMoreRunPairException extends Exception
{
public NoMoreRunPairException(String s)
{
super(s);
}
}
|
[
"xli289@ucr.edu"
] |
xli289@ucr.edu
|
ce5eef3bce6bbc24cc1b63917ee0db97d9e4294f
|
e835b0d2ce3a7260f039f4d1adca4d1891d721b0
|
/ShoppingHall-master/app/src/main/java/com/upgrate/manage/Download.java
|
3d4e0cf3adba2c5fd3c9a5012d17c3e7a46db343
|
[] |
no_license
|
heshicaihao/GN_Gou
|
134e36718e7b44766200afaaf93d1cddf3e37965
|
cc39c0fb859f6df1ed9453f40063d34f9c0161cc
|
refs/heads/master
| 2022-04-10T03:04:04.234546
| 2020-03-29T08:57:40
| 2020-03-29T08:57:40
| 116,622,031
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,683
|
java
|
package com.upgrate.manage;
import java.io.File;
import org.json.JSONObject;
import android.content.Context;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import com.gionee.client.model.HttpConstants;
import com.upgrate.download.DownloadProgressListener;
import com.upgrate.download.FileDownloader;
public class Download {
private boolean mIsDownloadComplete = false;
private static Download sDownload;
private Context mContext;
public static final String FILEFOLDER = "/GN_GOU/upgrate/";
public static final String FILENAMEPREFIX = "gngou_";
private int mMaxLength;
private Handler mHandler;
public FileDownloader mLoader;
public boolean mIsHasStarDownload = false;
public int mSize = 0;
private Download(Context context) {
mContext = context;
}
public static Download getInstance(Context context) {
if (sDownload == null) {
sDownload = new Download(context);
}
return sDownload;
}
public void setHandler(Handler handler) {
this.mHandler = handler;
}
public Handler getHandler() {
return mHandler;
}
public boolean isDownloadComplete() {
return mIsDownloadComplete;
}
public void setDownloadComplete(boolean isDownloadComplete) {
this.mIsDownloadComplete = isDownloadComplete;
}
public void downloadUrl(JSONObject upgrateData) {
// TODO Auto-generated method stub
if (mIsHasStarDownload) {
return;
}
if (!getExit()) {
return;
}
setIsExit(false);
if (mIsDownloadComplete) {
return;// 假如下载完成,则不执行
}
if (!Environment.getExternalStorageState().equals(
Environment.MEDIA_MOUNTED)) {
// Toast.makeText(mActivity, R.string.sdcarderror, 1).show();
return;
}
String url = upgrateData
.optString(HttpConstants.Data.Upgrate.UPGRATE_URL_S);
String versionName = upgrateData
.optString(HttpConstants.Data.Upgrate.VERSION_NAME_S);
File dir = new File(Environment.getExternalStorageDirectory()
.getAbsoluteFile().getPath()
+ FILEFOLDER);// 文件保存目录
String filename = FILENAMEPREFIX + versionName + ".apk";
download(url, dir, filename, versionName);
}
public void download(final String url, final File dir,
final String filename, final String versionName) {
// TODO Auto-generated method stub
new NetRequestTimeThread().start();
mSize = 0;
new Thread(new Runnable() {
@Override
public void run() {
try {
mIsDownloadComplete = false;
mIsHasStarDownload = true;
UpgrateDataManage.saveIsStartDownload(mContext,
versionName, mIsHasStarDownload);
UpgrateDataManage.saveFileDownloadComplete(mContext,
versionName, false);
mLoader = new FileDownloader(Download.this, mContext, url,
dir, filename, 3, versionName);
int length = mLoader.getFileSize();// 获取文件的长度
// Log.i("kkkkkk", "length:" + length);
setmLength(length, versionName);
mLoader.download(new DownloadProgressListener() {
@Override
public void onDownloadSize(int size) {
// 可以实时得到文件下载的长度
Message msg = new Message();
msg.what = UpgrateDownloadManage.DOWNLOAD_SIZE;
mSize = size;
msg.getData().putInt("size", size);
mHandler.sendMessage(msg);
UpgrateDataManage.saveApkDownloadSize(mContext,
versionName, size);
}
});
} catch (Exception e) {
Message msg = new Message();// 信息提示
msg.what = UpgrateDownloadManage.NETERROR_MSG;
// 如果下载错误,显示提示失败!
mHandler.sendMessage(msg);
exit();
Log.i("hhhhhh", "download error1");
}
}
}).start();// 开始
}
public void setmLength(int mLength, String versionName) {
this.mMaxLength = mLength;
UpgrateDataManage.saveApkAllSize(mContext, versionName, mLength);
}
public int getmLength() {
return mMaxLength;
}
public void exit() {
mIsHasStarDownload = false;
if (mLoader != null) {
mLoader.exit();
}
}
public boolean getExit() {
if (mLoader != null) {
return mLoader.getExit();
}
return true;
}
public void setIsExit(boolean isExit) {
if (mLoader != null) {
mLoader.setIsExit(isExit);
}
}
private class NetRequestTimeThread extends Thread {
@Override
public void run() {
// TODO Auto-generated method stub
super.run();
try {
Thread.sleep(20000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (mSize == 0) {
Message msg = new Message();// 信息提示
msg.what = -1;
// 如果下载错误,显示提示失败!
mHandler.sendMessage(msg);
exit();
}
}
}
}
|
[
"heshicaihao@163.com"
] |
heshicaihao@163.com
|
3b0fcf4765d2a7e8760b1008a1dbe4302c7efa68
|
776f7a8bbd6aac23678aa99b72c14e8dd332e146
|
/src/com/upsight/android/analytics/internal/configuration/ConfigurationResponseParser$ConfigResponseJson.java
|
cece0149f1992de943e237cefc8a2db834966350
|
[] |
no_license
|
arvinthrak/com.nianticlabs.pokemongo
|
aea656acdc6aa419904f02b7331f431e9a8bba39
|
bcf8617bafd27e64f165e107fdc820d85bedbc3a
|
refs/heads/master
| 2020-05-17T15:14:22.431395
| 2016-07-21T03:36:14
| 2016-07-21T03:36:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 479
|
java
|
package com.upsight.android.analytics.internal.configuration;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ConfigurationResponseParser$ConfigResponseJson
{
@JsonProperty("configurationList")
public ConfigurationResponseParser.ConfigJson[] configs;
}
/* Location:
* Qualified Name: com.upsight.android.analytics.internal.configuration.ConfigurationResponseParser.ConfigResponseJson
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
4c8fc92a9cd4a4cf728bde44ead19db3337f68a4
|
34675697a2419a3f2220a6c62fc13014b567521e
|
/demospringmvc/src/main/java/com/jaxio/demo/web/controller/AccountControllerWithPathVariable.java
|
d0c111563a8f86e81b297152e6a06169156641de
|
[] |
no_license
|
Aba-Dov/generated-projects
|
2bd70aceab57c1eec939425e669dece2dd85c94b
|
2722a69d14bf01b36e0c6402ea476879e684e0ea
|
refs/heads/master
| 2021-01-18T01:58:28.574492
| 2012-02-10T15:25:14
| 2012-02-10T15:25:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,622
|
java
|
/*
* (c) Copyright 2005-2012 JAXIO, www.jaxio.com
* Source code generated by Celerio, a Jaxio product
* Want to use Celerio within your company? email us at info@jaxio.com
* Follow us on twitter: @springfuse
* Template pack-mvc-3-sd:src/main/java/web/controller/controllerwithPathVariable.e.vm.java
*/
package com.jaxio.demo.web.controller;
import static org.springframework.web.bind.annotation.RequestMethod.DELETE;
import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;
import static org.springframework.web.bind.annotation.RequestMethod.PUT;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import com.jaxio.demo.domain.Account;
import com.jaxio.demo.repository.AccountRepository;
import com.jaxio.demo.repository.RoleRepository;
@Controller
@RequestMapping("/domain/account/")
public class AccountControllerWithPathVariable {
@Autowired
private AccountRepository accountRepository;
@Autowired
private RoleRepository roleRepository;
/**
* This method is invoked by Spring MVC before the handler methods.
* <p>
* The path variable is converted by SpringMVC to a Account via the {@link AccountFormatter}.
* Before being passed as an argument to the handler, SpringMVC binds the attributes on the resulting model,
* then each handler method may receive the entity, potentially modified, as an argument.
*/
@ModelAttribute
public Account getAccount(@PathVariable("pk") Account account) {
return account;
}
/**
* Serves the show view for the entity.
*/
@RequestMapping("show/{pk}")
public String show(@ModelAttribute Account account) {
return "domain/account/show";
}
/**
* Serves the update form view.
*/
@RequestMapping(value = "update/{pk}", method = GET)
public String update(Model model) {
bindListForSelectInputFields(model);
return "domain/account/update";
}
/**
* Performs the update action and redirect to the show view.
*/
@RequestMapping(value = "update/{pk}", method = { PUT, POST })
public String update(@Valid @ModelAttribute Account account, BindingResult bindingResult, Model model) {
if (bindingResult.hasErrors()) {
return update(model);
}
accountRepository.save(account);
return "redirect:/domain/account/show/" + account.getId();
}
/**
* Serves the delete form asking the user if the entity should be really deleted.
*/
@RequestMapping(value = "delete/{pk}", method = GET)
public String delete() {
return "domain/account/delete";
}
/**
* Performs the delete action and redirect to the search view.
*/
@RequestMapping(value = "delete/{pk}", method = { PUT, POST, DELETE })
public String delete(@ModelAttribute Account account) {
accountRepository.delete(account);
return "redirect:/domain/account/search";
}
/**
* Binds to the passed model the possible values for select input fields.
*/
private void bindListForSelectInputFields(Model model) {
model.addAttribute("roles", roleRepository.find());
}
}
|
[
"nromanetti@jaxio.com"
] |
nromanetti@jaxio.com
|
7ad5b1ebd1617cb655a598af8b4962c8f5bd419d
|
cf881a41872117c85c6f440138fa8368f8e5b289
|
/seminar-012/src/ro/ase/csie/cts/laborator/junit/Main.java
|
05915ec4083b10918bf1ad3930dc3a7f274c9050
|
[] |
no_license
|
vladescualexandra/cts-labs
|
d9f16bad1bab2564a77ec5238eb3eeb5099f8851
|
6d9e783b73dc344e70a30ba4309c30d4abd35883
|
refs/heads/master
| 2023-05-13T01:51:23.254927
| 2021-06-03T16:40:23
| 2021-06-03T16:40:23
| 341,537,644
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 580
|
java
|
package ro.ase.csie.cts.laborator.junit;
import ro.ase.csie.cts.laborator.junit.modele.OperatiiMatematice;
public class Main {
public static void main(String[] args) {
System.out.println("Aplicatia ruleaza...");
// int a = 5;
// int b = 6;
// int sumaAsteptata = 11;
// int sumaCalculata = OperatiiMatematice.aduna(a, b);
//
// if (sumaAsteptata == sumaCalculata) {
// System.out.println("Adunarea este corecta.");
// } else {
// System.out.println("Adunarea este gresita.");
// }
}
}
|
[
"vladescualexandra18@stud.ase.ro"
] |
vladescualexandra18@stud.ase.ro
|
7f24a2ea4712d78d4a83df6cb8f057c6b3fbda83
|
63bb953f15a8980387fa68f670c28b2a7153b77b
|
/Games/Mobile/Aku/RrgWTK/ShipDuel_3510i/src/com/igormaznitsa/GameAPI/Utils/Sine.java
|
fc2a8d3da20f2c9c8dd308d6755b46680c9f0af4
|
[
"Unlicense"
] |
permissive
|
raydac/old-stuff
|
867314f6dc042dd4f629f6b8d81082a096b98e3e
|
68f19ab3857bec5d87c12d23e257b6ccbe9579a6
|
refs/heads/master
| 2021-12-12T21:38:13.049479
| 2021-12-02T22:01:31
| 2021-12-02T22:01:31
| 162,352,496
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,393
|
java
|
package com.igormaznitsa.GameAPI.Utils;
public class Sine {
public final static int [] sineTable = new int[]{
0,6,12,18,25,31,37,43,49,56,62,68,74,80,86,
92,97,103,109,115,120,126,131,136,142,147,152,157,162,167,
171,176,181,185,189,193,197,201,205,209,212,216,219,222,225,
228,231,234,236,238,241,243,244,246,248,249,251,252,253,254,
254,255,255,255,256,255,255,255,254,254,253,252,251,249,248,
246,244,243,241,238,236,234,231,228,225,222,219,216,212,209,
205,201,197,193,189,185,181,176,171,167,162,157,152,147,142,
136,131,126,120,115,109,103,97,92,86,80,74,68,62,56,
49,43,37,31,25,18,12,6,0,-6,-12,-18,-25,-31,-37,
-43,-49,-56,-62,-68,-74,-80,-86,-92,-97,-103,-109,-115,-120,-126,
-131,-136,-142,-147,-152,-157,-162,-167,-171,-176,-181,-185,-189,-193,-197,
-201,-205,-209,-212,-216,-219,-222,-225,-228,-231,-234,-236,-238,-241,-243,
-244,-246,-248,-249,-251,-252,-253,-254,-254,-255,-255,-255
};
public static int xSine(int x, int index){
return (x*sineTable[index&127])>>8;
}
public static int xCoSine(int x, int index){
return (x*sineTable[(index&127)+64])>>8;
}
public static int xSineFloat(int x, int index){
return (x*sineTable[index&127]);
}
public static int xCoSineFloat(int x, int index){
return (x*sineTable[(index&127)+64]);
}
}
|
[
"rrg4400@gmail.com"
] |
rrg4400@gmail.com
|
d2fa84f5b60e2c24e82d3da63aab78a4248c40d1
|
843ea90fbeef9f3b58afdcc09f232bcdb1e4b057
|
/coremain/src/main/java/com/alisir/coremain/LoginSuccessActivity.java
|
e7a0abbd4c0f53a2d203277d7f7c485c43f26284
|
[] |
no_license
|
ALiSir/ModuleDemo
|
544f1838f95762f8ec10038a026a36d38feb7d50
|
b885f47ab8f00474312eb1e895fedbe50400a52b
|
refs/heads/master
| 2020-12-30T12:11:08.775844
| 2017-06-01T05:49:47
| 2017-06-01T05:49:47
| 91,408,085
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 438
|
java
|
package com.alisir.coremain;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.alibaba.android.arouter.facade.annotation.Route;
@Route(path = "/main/lgsu")
public class LoginSuccessActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login_success);
}
}
|
[
"1170884598@qq.com"
] |
1170884598@qq.com
|
b1e79a6f42539ad6d167994f29a27091617ca593
|
cd5dc0b9e9bbd8aa870f97dcc17c1b1802cf1362
|
/app/src/main/java/com/jeannypr/scientificstudy/Inventory/api/InventoryService.java
|
e101a19df298740b9d3e3e7340896d29278af9ab
|
[] |
no_license
|
SOFTSEER002/scientific-school-Android-SRG
|
ffa9a88fd5285be2857bf957485fba06cf2a95c6
|
453e96a20ab51c343fa7dbb44bf76b0ba4ef2fee
|
refs/heads/master
| 2022-12-20T12:46:43.197101
| 2020-10-13T09:50:01
| 2020-10-13T09:50:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,440
|
java
|
package com.jeannypr.scientificstudy.Inventory.api;
import com.jeannypr.scientificstudy.Base.Model.Bean;
import com.jeannypr.scientificstudy.Inventory.model.AccountGroupBean;
import com.jeannypr.scientificstudy.Inventory.model.AddLedgerBean;
import com.jeannypr.scientificstudy.Inventory.model.AddLedgerInputModel;
import com.jeannypr.scientificstudy.Inventory.model.AllLedgerBean;
import com.jeannypr.scientificstudy.Inventory.model.CreditLedgerBean;
import com.jeannypr.scientificstudy.Inventory.model.CurrentBalanceBean;
import com.jeannypr.scientificstudy.Inventory.model.DayBookBean;
import com.jeannypr.scientificstudy.Inventory.model.ItemDetailsBean;
import com.jeannypr.scientificstudy.Inventory.model.ItemsBean;
import com.jeannypr.scientificstudy.Inventory.model.LedgerReportBean;
import com.jeannypr.scientificstudy.Inventory.model.PartyAccountBean;
import com.jeannypr.scientificstudy.Inventory.model.PaymentReceiptInputModel;
import com.jeannypr.scientificstudy.Inventory.model.PaymentReceiptSummaryBean;
import com.jeannypr.scientificstudy.Inventory.model.PurchaseLedgerBean;
import com.jeannypr.scientificstudy.Inventory.model.PurchaseSaleItemBean;
import com.jeannypr.scientificstudy.Inventory.model.PurchaseSaleSummaryDateBean;
import com.jeannypr.scientificstudy.Inventory.model.PurchaseSaleSummaryBean;
import com.jeannypr.scientificstudy.Inventory.model.PurchaseSummaryBean;
import com.jeannypr.scientificstudy.Inventory.model.VoucharBean;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
public interface InventoryService {
@GET("inv/purchase/report")
Call<PurchaseSummaryBean> GetPurchaseSummary(@Query("startDate") String StartDate, @Query("endDate") String EndDate,
@Query("schoolid") int SchoolId, @Query("academicyearid") int Academicyearid);
@GET("inv/sale/report")
Call<PurchaseSummaryBean> GetSaleSummary(@Query("startDate") String StartDate, @Query("endDate") String EndDate,
@Query("schoolid") int SchoolId, @Query("academicyearid") int Academicyearid);
@GET("inv/payment/report")
Call<PaymentReceiptSummaryBean> GetPaymentReceiptSummary(@Query("startDate") String StartDate, @Query("endDate") String EndDate,
@Query("schoolid") int SchoolId, @Query("academicyearid") int Academicyearid, @Query("paymentType") String PaymentType);
@GET("account/day/book")
Call<DayBookBean> GetTransactionRecord(@Query("startDate") String StartDate, @Query("endDate") String EndDate,
@Query("schoolid") int SchoolId, @Query("academicyearid") int AcademicyearId);
@GET("inv/credit/ledgers")
Call<CreditLedgerBean> GetCreditLedgerRecord(@Query("schoolid") int SchoolId);
@GET("inv/vouchar/detail")
Call<VoucharBean> GetVoucharDetail(@Query("schoolid") int SchoolId, @Query("voucharType") String VoucharType, @Query("academicYearid") int AcademicId);// @Query("academicYearid") int AcademicId
@GET("inv/ledger/balance")
Call<CurrentBalanceBean> GetLedgerDetail(@Query("schoolid") int SchoolId, @Query("ledgerId") int LedegrId);
@GET("inv/all/ledgers")
Call<AllLedgerBean> GetAllLedgerDetail(@Query("schoolid") int SchoolId);
@GET("account/transaction/summary")
Call<PurchaseSaleSummaryBean> GetPurchaseSaleSummary(@Query("schoolid") int SchoolId, @Query("academicyearid") int AcademicyearId, @Query("voucherType") String VoucharType);
@GET("inv/itemdatewise/transaction/summary/date")
Call<PurchaseSaleItemBean> GetPurchaseSaleItemSummary(@Query("voucherType") String VoucharType, @Query("date") String Date,
@Query("schoolid") int SchoolId, @Query("academicYearid") int AcademicyearId);
@GET("inv/item/transaction/summary/month")
Call<PurchaseSaleSummaryDateBean> GetPurchaseSaleSummaryDate(@Query("schoolid") int SchoolId, @Query("academicyearid") int AcademicyearId,
@Query("voucherType") String VoucharType, @Query("monthId") int MonthId);
@POST("inv/payment/save")
Call<Bean> SavePaymentReceipt(@Body PaymentReceiptInputModel input);
@GET("account/ledger/report")
Call<LedgerReportBean> GetLedgerReport(@Query("startDate") String StarDate, @Query("endDate") String EndDate, @Query("schoolid") int SchoolId,
@Query("academicyearid") int AcademicyearId, @Query("ledgerId") int LedgerId);
@GET("account/party/accounts")
Call<PartyAccountBean> GetPartyAccountDetail(@Query("schoolid") int SchholId);
@GET("inv/purchase/ledgers")
Call<PurchaseLedgerBean> GetPurchaseLedgerDetail(@Query("schoolid") int SchoolId);
@GET("inv/items")
Call<ItemsBean> GetItems(@Query("schoolid") int SchoolId, @Query("academicYearid") int AcademicYearId);
@GET("inv/item/cost/price")
Call<ItemDetailsBean> GetItemDetails(@Query("schoolid") int SchoolId, @Query("academicyearid") int AcademicyearId, @Query("itemId") int ItemId);
@GET("inv/account/groups")
Call<AccountGroupBean> GetAccountGroupDetail(@Query("schoolid") int SchholId);
@POST("inv/add/ledger")
Call<AddLedgerBean> SaveLedger(@Body AddLedgerInputModel input);
}
|
[
"khungersourav30@gmail.com"
] |
khungersourav30@gmail.com
|
0324d46a891a504026521748ac401539f79682b9
|
00ee55a6598cdbac087ccfd26cc36a578dbb485e
|
/engine-api/src/main/java/pl/edu/icm/unity/engine/api/authn/remote/RemotelyAuthenticatedInput.java
|
848bff6f937c6d01110c0c311f795c92f9aaf1bc
|
[] |
no_license
|
ngohuusang/unity
|
c01672c9f94be235162a85def395a0c7f7ab6ecd
|
bbb56b56d5c6e980955c0c14de098f86b273fbc7
|
refs/heads/master
| 2021-05-12T13:24:38.096590
| 2017-11-02T18:11:43
| 2017-11-02T18:11:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,587
|
java
|
/*
* Copyright (c) 2013 ICM Uniwersytet Warszawski All rights reserved.
* See LICENCE.txt file for licensing information.
*/
package pl.edu.icm.unity.engine.api.authn.remote;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import pl.edu.icm.unity.engine.api.session.SessionParticipant;
/**
* Holds a raw information obtained from an upstream IdP. The purpose of this class is to provide a common interchange
* format between a pluggable upstream IdP implementation and a fixed code of RemoteVerficator.
* <p>
* The data in this class typically should not be translated, unless an upstream IdP strictly requires some translation
* to be able to populate the contents. The actual mapping of this data to the locally meaningful information
* is done using this class as an input.
*
* @author K. Benedyczak
*/
public class RemotelyAuthenticatedInput
{
private String idpName;
private Set<SessionParticipant> sessionParticipants = new HashSet<>();
private Map<String, RemoteGroupMembership> groups;
private Map<String, RemoteAttribute> attributes;
private Map<String, RemoteIdentity> identities;
public RemotelyAuthenticatedInput(String idpName)
{
this.idpName = idpName;
groups = new HashMap<>();
attributes = new HashMap<>();
identities = new LinkedHashMap<>();
}
public String getIdpName()
{
return idpName;
}
public void setIdpName(String idpName)
{
this.idpName = idpName;
}
public void setGroups(List<RemoteGroupMembership> groups)
{
for (RemoteGroupMembership gm: groups)
this.groups.put(gm.getName(), gm);
}
public void setAttributes(List<RemoteAttribute> attributes)
{
for (RemoteAttribute gm: attributes)
this.attributes.put(gm.getName(), gm);
}
public void setIdentities(List<RemoteIdentity> identities)
{
for (RemoteIdentity gm: identities)
this.identities.put(gm.getName(), gm);
}
public void addIdentity(RemoteIdentity gm)
{
this.identities.put(gm.getName(), gm);
}
public void addAttribute(RemoteAttribute attribute)
{
this.attributes.put(attribute.getName(), attribute);
}
public void addGroup(RemoteGroupMembership group)
{
this.groups.put(group.getName(), group);
}
public Map<String, RemoteGroupMembership> getGroups()
{
return groups;
}
public Map<String, RemoteAttribute> getAttributes()
{
return attributes;
}
public Map<String, RemoteIdentity> getIdentities()
{
return identities;
}
public Set<SessionParticipant> getSessionParticipants()
{
return sessionParticipants;
}
public void addSessionParticipant(SessionParticipant sessionParticipant)
{
this.sessionParticipants.add(sessionParticipant);
}
@Override
public String toString()
{
String identity = getIdentities().isEmpty() ? "unknown" :
(String)getIdentities().keySet().iterator().next();
return idpName + " - " + identity;
}
/**
* @return Multiline string with a complete contents
*/
public String getTextDump()
{
StringBuilder sb = new StringBuilder();
if (!identities.isEmpty())
{
sb.append("Identities:\n");
for (RemoteIdentity id: identities.values())
sb.append(" - ").append(id).append("\n");
}
if (!attributes.isEmpty())
{
sb.append("Attributes:\n");
for (RemoteAttribute at: attributes.values())
sb.append(" - ").append(at).append("\n");
}
if (!groups.isEmpty())
{
sb.append("Groups:\n");
for (RemoteGroupMembership gr: groups.values())
sb.append(" - ").append(gr).append("\n");
}
return sb.toString();
}
}
|
[
"golbi@unity-idm.eu"
] |
golbi@unity-idm.eu
|
77458d9fad71d8e904be490602739f1c04b29ac3
|
3fe2482943e834654b3edfc30c490111f23a1f52
|
/src/test/java/com/jcdev/cucumber/stepdefs/StepDefs.java
|
60bbbe08029bb4ee903266ddaa2f22bbf38ea899
|
[] |
no_license
|
jonascspontes/pagamentos
|
f4d83d65c920e285f703b8569e349a736f0b9b10
|
4c7ffb5c999bf62d5fcd5fdc4b25348ec7679613
|
refs/heads/master
| 2022-12-16T21:24:02.027121
| 2019-12-27T00:21:35
| 2019-12-27T00:21:35
| 230,345,156
| 0
| 0
| null | 2022-12-16T04:43:05
| 2019-12-27T00:21:19
|
Java
|
UTF-8
|
Java
| false
| false
| 172
|
java
|
package com.jcdev.cucumber.stepdefs;
import org.springframework.test.web.servlet.ResultActions;
public abstract class StepDefs {
protected ResultActions actions;
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
18e1d10ee13ad7e2dbb37972cb6a51d0a91f5138
|
560d5eb0b9c3d04d82c6f4dac2487b417ad4b5b3
|
/src/main/java/org/apache/ibatis/reflection/MetaClass.java
|
ed3a7d2d4b42307e589a64461af7d17df9bf492f
|
[] |
no_license
|
mickey0524/mybatis-source-analysis
|
caa48c4575f163f51ef586c0c698766719598cc1
|
9388a3a018193b6b62755bdf22fc9664a419c7f5
|
refs/heads/master
| 2020-11-25T11:45:11.935220
| 2020-03-26T11:58:28
| 2020-03-26T11:58:28
| 228,640,673
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,645
|
java
|
/**
* Copyright 2009-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.reflection;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Collection;
import org.apache.ibatis.reflection.invoker.GetFieldInvoker;
import org.apache.ibatis.reflection.invoker.Invoker;
import org.apache.ibatis.reflection.invoker.MethodInvoker;
import org.apache.ibatis.reflection.property.PropertyTokenizer;
/**
* @author Clinton Begin
*/
// 元类
public class MetaClass {
private final ReflectorFactory reflectorFactory;
private final Reflector reflector;
// 构造函数,type 是传入的类,reflectorFactory 是反射器工厂,用于生成类对应的反射器
private MetaClass(Class<?> type, ReflectorFactory reflectorFactory) {
this.reflectorFactory = reflectorFactory;
this.reflector = reflectorFactory.findForClass(type);
}
// 构造函数是 private 类型的,MetaClass 实例需要用 forClass 静态方法来创建
public static MetaClass forClass(Class<?> type, ReflectorFactory reflectorFactory) {
return new MetaClass(type, reflectorFactory);
}
// 构建 Class 中 Field 属性对应的 MetaClass
public MetaClass metaClassForProperty(String name) {
Class<?> propType = reflector.getGetterType(name); // 获取 type 类中 name 字段的类
return MetaClass.forClass(propType, reflectorFactory);
}
// 寻找属性
public String findProperty(String name) {
// 在此方法中创建 StringBuilder 实例是因为之后要递归调用
StringBuilder prop = buildProperty(name, new StringBuilder());
return prop.length() > 0 ? prop.toString() : null;
}
// 将 name 中的 _ 替换为空字符串
public String findProperty(String name, boolean useCamelCaseMapping) {
if (useCamelCaseMapping) {
name = name.replace("_", "");
}
return findProperty(name);
}
// 类中所有可读的属性
public String[] getGetterNames() {
return reflector.getGetablePropertyNames();
}
// 类中所有可写的属性
public String[] getSetterNames() {
return reflector.getSetablePropertyNames();
}
// 获取 name 对应的字段的类型
public Class<?> getSetterType(String name) {
PropertyTokenizer prop = new PropertyTokenizer(name);
if (prop.hasNext()) {
MetaClass metaProp = metaClassForProperty(prop.getName());
return metaProp.getSetterType(prop.getChildren());
} else {
return reflector.getSetterType(prop.getName());
}
}
// 获取 name 对应的字段的类型
public Class<?> getGetterType(String name) {
PropertyTokenizer prop = new PropertyTokenizer(name);
if (prop.hasNext()) {
MetaClass metaProp = metaClassForProperty(prop);
return metaProp.getGetterType(prop.getChildren());
}
// issue #506. Resolve the type inside a Collection Object
return getGetterType(prop);
}
// 生成属性的元类
private MetaClass metaClassForProperty(PropertyTokenizer prop) {
Class<?> propType = getGetterType(prop);
return MetaClass.forClass(propType, reflectorFactory);
}
private Class<?> getGetterType(PropertyTokenizer prop) {
Class<?> type = reflector.getGetterType(prop.getName());
if (prop.getIndex() != null && Collection.class.isAssignableFrom(type)) {
Type returnType = getGenericGetterType(prop.getName());
if (returnType instanceof ParameterizedType) {
Type[] actualTypeArguments = ((ParameterizedType) returnType).getActualTypeArguments();
if (actualTypeArguments != null && actualTypeArguments.length == 1) {
returnType = actualTypeArguments[0];
if (returnType instanceof Class) {
type = (Class<?>) returnType;
} else if (returnType instanceof ParameterizedType) {
type = (Class<?>) ((ParameterizedType) returnType).getRawType();
}
}
}
}
return type;
}
private Type getGenericGetterType(String propertyName) {
try {
Invoker invoker = reflector.getGetInvoker(propertyName);
if (invoker instanceof MethodInvoker) {
// MethodInvoker 中的 Field 字段为 private 类型的
Field _method = MethodInvoker.class.getDeclaredField("method");
_method.setAccessible(true);
Method method = (Method) _method.get(invoker);
return TypeParameterResolver.resolveReturnType(method, reflector.getType());
} else if (invoker instanceof GetFieldInvoker) {
Field _field = GetFieldInvoker.class.getDeclaredField("field");
_field.setAccessible(true);
Field field = (Field) _field.get(invoker);
return TypeParameterResolver.resolveFieldType(field, reflector.getType());
}
} catch (NoSuchFieldException | IllegalAccessException ignored) {
}
return null;
}
// 是否有 name 属性的 set 方法
public boolean hasSetter(String name) {
PropertyTokenizer prop = new PropertyTokenizer(name);
if (prop.hasNext()) {
if (reflector.hasSetter(prop.getName())) {
MetaClass metaProp = metaClassForProperty(prop.getName());
return metaProp.hasSetter(prop.getChildren());
} else {
return false;
}
} else {
return reflector.hasSetter(prop.getName());
}
}
// 是否有 name 属性的 get 方法
public boolean hasGetter(String name) {
PropertyTokenizer prop = new PropertyTokenizer(name);
if (prop.hasNext()) {
if (reflector.hasGetter(prop.getName())) {
MetaClass metaProp = metaClassForProperty(prop);
return metaProp.hasGetter(prop.getChildren());
} else {
return false;
}
} else {
return reflector.hasGetter(prop.getName());
}
}
// 获取 GetInvoker
public Invoker getGetInvoker(String name) {
return reflector.getGetInvoker(name);
}
// 获取 SetInvoker
public Invoker getSetInvoker(String name) {
return reflector.getSetInvoker(name);
}
// 递归生成属性名
private StringBuilder buildProperty(String name, StringBuilder builder) {
PropertyTokenizer prop = new PropertyTokenizer(name); // 实例化 PropertyTokenizer 对象,name 是属性名
if (prop.hasNext()) {
String propertyName = reflector.findPropertyName(prop.getName());
// 这里忽略了 PropertyTokenizer 中的 index
if (propertyName != null) {
builder.append(propertyName);
builder.append(".");
MetaClass metaProp = metaClassForProperty(propertyName);
metaProp.buildProperty(prop.getChildren(), builder);
}
} else {
// 如果 name 在 type 中被定义了,那么 propertyName 就不为 null
String propertyName = reflector.findPropertyName(name);
if (propertyName != null) {
builder.append(propertyName);
}
}
return builder;
}
// type 类是否定义了默认的构造函数
public boolean hasDefaultConstructor() {
return reflector.hasDefaultConstructor();
}
}
|
[
"buptbh@163.com"
] |
buptbh@163.com
|
1eaea9ddda2431f624df0d66e3ee36554bdb0512
|
d3f7a6b521a0ecaf8354dbbac94cf891cc982f55
|
/app/src/main/java/com/will/habit/utils/RetrofitClient.java
|
0d03149b3947311b62f91db2d26358311e1d1cd7
|
[
"Apache-2.0"
] |
permissive
|
dcn01/MVVMWill
|
ed3e532c6ab2001628861cc639b853dcebe778f5
|
08d36bb62984f7321c295acb3286b561627b7e6d
|
refs/heads/master
| 2022-11-01T07:24:01.430114
| 2020-05-30T15:05:12
| 2020-05-30T15:05:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,102
|
java
|
package com.will.habit.utils;
import android.content.Context;
import android.text.TextUtils;
import com.will.habit.BuildConfig;
import java.io.File;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import com.will.habit.http.cookie.CookieJarImpl;
import com.will.habit.http.cookie.store.PersistentCookieStore;
import com.will.habit.http.interceptor.BaseInterceptor;
import com.will.habit.http.interceptor.CacheInterceptor;
import com.will.habit.http.interceptor.logging.Level;
import com.will.habit.http.interceptor.logging.LoggingInterceptor;
import okhttp3.Cache;
import okhttp3.ConnectionPool;
import okhttp3.OkHttpClient;
import okhttp3.internal.platform.Platform;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* Created by goldze on 2017/5/10.
* RetrofitClient封装单例类, 实现网络请求
*/
public class RetrofitClient {
//超时时间
private static final int DEFAULT_TIMEOUT = 20;
//缓存时间
private static final int CACHE_TIMEOUT = 10 * 1024 * 1024;
//服务端根路径
public static String baseUrl = "https://www.oschina.net/";
private static Context mContext = Utils.getContext();
private static OkHttpClient okHttpClient;
private static Retrofit retrofit;
private Cache cache = null;
private File httpCacheDirectory;
private static class SingletonHolder {
private static RetrofitClient INSTANCE = new RetrofitClient();
}
public static RetrofitClient getInstance() {
return SingletonHolder.INSTANCE;
}
private RetrofitClient() {
this(baseUrl, null);
}
private RetrofitClient(String url, Map<String, String> headers) {
if (TextUtils.isEmpty(url)) {
url = baseUrl;
}
if (httpCacheDirectory == null) {
httpCacheDirectory = new File(mContext.getCacheDir(), "goldze_cache");
}
try {
if (cache == null) {
cache = new Cache(httpCacheDirectory, CACHE_TIMEOUT);
}
} catch (Exception e) {
KLog.e("Could not create http cache", e);
}
HttpsUtils.SSLParams sslParams = HttpsUtils.getSslSocketFactory();
okHttpClient = new OkHttpClient.Builder()
.cookieJar(new CookieJarImpl(new PersistentCookieStore(mContext)))
// .cache(cache)
.addInterceptor(new BaseInterceptor(headers))
.addInterceptor(new CacheInterceptor(mContext))
.sslSocketFactory(sslParams.sSLSocketFactory, sslParams.trustManager)
.addInterceptor(new LoggingInterceptor
.Builder()//构建者模式
.loggable(BuildConfig.DEBUG) //是否开启日志打印
.setLevel(Level.BASIC) //打印的等级
.log(Platform.INFO) // 打印类型
.request("Request") // request的Tag
.response("Response")// Response的Tag
.addHeader("log-header", "I am the log request header.") // 添加打印头, 注意 key 和 value 都不能是中文
.build()
)
.connectTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS)
.writeTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS)
.connectionPool(new ConnectionPool(8, 15, TimeUnit.SECONDS))
// 这里你可以根据自己的机型设置同时连接的个数和时间,我这里8个,和每个保持时间为10s
.build();
retrofit = new Retrofit.Builder()
.client(okHttpClient)
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.baseUrl(url)
.build();
}
/**
* create you ApiService
* Create an implementation of the API endpoints defined by the {@code service} interface.
*/
public <T> T create(final Class<T> service) {
if (service == null) {
throw new RuntimeException("Api service is null!");
}
return retrofit.create(service);
}
/**
* /**
* execute your customer API
* For example:
* MyApiService service =
* RetrofitClient.getInstance(MainActivity.this).create(MyApiService.class);
* <p>
* RetrofitClient.getInstance(MainActivity.this)
* .execute(service.lgon("name", "password"), subscriber)
* * @param subscriber
*/
public static <T> T execute(Observable<T> observable, Observer<T> subscriber) {
observable.subscribeOn(Schedulers.io())
.unsubscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(subscriber);
return null;
}
}
|
[
"545512533@qq.com"
] |
545512533@qq.com
|
d71dbbed023f1684f19d76c435a57a6c6e1828f2
|
98807791d3923b92c3628cb2664bb4da7c84e1a1
|
/src/com/cai310/lottery/support/dczc/DczcPasscountWork.java
|
07992cf923090b451352b80a59e279ec26d6f8ab
|
[] |
no_license
|
hanyuningxing/ticket
|
c25ec0784a157c5196e8bdaa516b97c4950f0ad3
|
9de859c649560b823f2cbe78d1bc724841fcd928
|
refs/heads/master
| 2021-01-25T05:16:22.445706
| 2016-09-23T03:13:55
| 2016-09-23T03:13:55
| 39,360,871
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,291
|
java
|
package com.cai310.lottery.support.dczc;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public abstract class DczcPasscountWork implements Serializable {
private static final long serialVersionUID = -5425385793316608633L;
/** 各个中奖组合中奖信息的分隔符 */
public static final String lineSeq = "\r\n";
// ===================================================================
/** 存放中奖的组合的MAP */
protected Map<String, CombinationBean> combinationMap = new HashMap<String, CombinationBean>();// 存放中奖的组合
/** 是否中奖 */
protected boolean won;
/** 选中的场次*/
protected int betCount;
/** 全中的注数 */
protected int wonCount;
protected int multiple=1;
// ===================================================================
protected void handle(PassType passType, List<DczcMatchItem> combList) {
handleCombinationMap(passType, combList);
}
protected void handleCombinationMap(PassType passType, List<DczcMatchItem> combList) {
CombinationBean combBean = new CombinationBean();
combBean.setPassTypeOrdinal(passType.ordinal());
combBean.setItems(combList);
combinationMap.put(combBean.generateKey(), combBean);
}
// ===================================================================
public Map<String, CombinationBean> getCombinationMap() {
return combinationMap;
}
public boolean isWon() {
return won;
}
/**
* @return the betCount
*/
public int getBetCount() {
return betCount;
}
/**
* @param betCount the betCount to set
*/
public void setBetCount(int betCount) {
this.betCount = betCount;
}
/**
* @return the wonCount
*/
public int getWonCount() {
return wonCount;
}
/**
* @param wonCount the wonCount to set
*/
public void setWonCount(int wonCount) {
this.wonCount = wonCount;
}
/**
* @param won the won to set
*/
public void setWon(boolean won) {
this.won = won;
}
/**
* @return the multiple
*/
public int getMultiple() {
return multiple;
}
/**
* @param multiple the multiple to set
*/
public void setMultiple(int multiple) {
this.multiple = multiple;
}
}
|
[
"513619336@163.com"
] |
513619336@163.com
|
e86f055a47ce04944148e4f72dedfb0a8aa48c04
|
6dd47adea2e0803a9f53f48a3b9bf50910ae1084
|
/src/main/java/se/model/ShoppingTrolley.java
|
36138b0f51997561e4c9bae5ac355ad08f4886fe
|
[] |
no_license
|
HWenTing/second-head-platform
|
2c36c5b20ed8819f94b623c41444706fb037843d
|
9417f424f1a9189c6634857f9115a88af29276a8
|
refs/heads/master
| 2023-02-03T18:44:08.256381
| 2020-12-27T12:11:39
| 2020-12-27T12:11:39
| 324,753,093
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 991
|
java
|
package se.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import lombok.Data;
/**
* 购物车
* @author HP
*
*/
@Data
@Entity
@Table(name="t_shopping_trolley")
public class ShoppingTrolley {
@Id
@GenericGenerator(name = "generator", strategy = "native")
@GeneratedValue(generator = "generator")
@Column(name = "id",length = 11)
private Integer id;
/**
* 用户id
*/
@Column(name = "user_id",length = 11)
private Integer userId;
/**
* 商品id
*/
@Column(name = "goods_id",length = 11)
private Integer goodsId;
/**
* 商品数目
*/
@Column(name = "goods_amount",length = 11)
private Integer amount;
/**
* 加入时间
*/
@Column(name = "add_time",length = 11)
private Date addTime;
}
|
[
"982740445@qq.com"
] |
982740445@qq.com
|
bf3f1cfbbc272395cf1ed7939099f8b3d5973e5d
|
b4c47b649e6e8b5fc48eed12fbfebeead32abc08
|
/com/android/internal/telephony/IccCardConstants.java
|
83eb056d7eb42cefd8d7a78c454be48615155d58
|
[] |
no_license
|
neetavarkala/miui_framework_clover
|
300a2b435330b928ac96714ca9efab507ef01533
|
2670fd5d0ddb62f5e537f3e89648d86d946bd6bc
|
refs/heads/master
| 2022-01-16T09:24:02.202222
| 2018-09-01T13:39:50
| 2018-09-01T13:39:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,492
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
package com.android.internal.telephony;
public class IccCardConstants
{
public static final class State extends Enum
{
public static State intToState(int i)
throws IllegalArgumentException
{
switch(i)
{
default:
throw new IllegalArgumentException();
case 0: // '\0'
return UNKNOWN;
case 1: // '\001'
return ABSENT;
case 2: // '\002'
return PIN_REQUIRED;
case 3: // '\003'
return PUK_REQUIRED;
case 4: // '\004'
return NETWORK_LOCKED;
case 5: // '\005'
return READY;
case 6: // '\006'
return NOT_READY;
case 7: // '\007'
return PERM_DISABLED;
case 8: // '\b'
return CARD_IO_ERROR;
case 9: // '\t'
return CARD_RESTRICTED;
}
}
public static State valueOf(String s)
{
return (State)Enum.valueOf(com/android/internal/telephony/IccCardConstants$State, s);
}
public static State[] values()
{
return $VALUES;
}
public boolean iccCardExist()
{
boolean flag;
boolean flag1;
flag = true;
flag1 = flag;
if(this == PIN_REQUIRED) goto _L2; else goto _L1
_L1:
if(this != PUK_REQUIRED) goto _L4; else goto _L3
_L3:
flag1 = flag;
_L2:
return flag1;
_L4:
flag1 = flag;
if(this != NETWORK_LOCKED)
{
flag1 = flag;
if(this != READY)
{
flag1 = flag;
if(this != PERM_DISABLED)
{
flag1 = flag;
if(this != CARD_IO_ERROR)
{
flag1 = flag;
if(this != CARD_RESTRICTED)
flag1 = false;
}
}
}
}
if(true) goto _L2; else goto _L5
_L5:
}
public boolean isPinLocked()
{
boolean flag = true;
boolean flag1 = flag;
if(this != PIN_REQUIRED)
if(this == PUK_REQUIRED)
flag1 = flag;
else
flag1 = false;
return flag1;
}
private static final State $VALUES[];
public static final State ABSENT;
public static final State CARD_IO_ERROR;
public static final State CARD_RESTRICTED;
public static final State NETWORK_LOCKED;
public static final State NOT_READY;
public static final State PERM_DISABLED;
public static final State PIN_REQUIRED;
public static final State PUK_REQUIRED;
public static final State READY;
public static final State UNKNOWN;
static
{
UNKNOWN = new State("UNKNOWN", 0);
ABSENT = new State("ABSENT", 1);
PIN_REQUIRED = new State("PIN_REQUIRED", 2);
PUK_REQUIRED = new State("PUK_REQUIRED", 3);
NETWORK_LOCKED = new State("NETWORK_LOCKED", 4);
READY = new State("READY", 5);
NOT_READY = new State("NOT_READY", 6);
PERM_DISABLED = new State("PERM_DISABLED", 7);
CARD_IO_ERROR = new State("CARD_IO_ERROR", 8);
CARD_RESTRICTED = new State("CARD_RESTRICTED", 9);
$VALUES = (new State[] {
UNKNOWN, ABSENT, PIN_REQUIRED, PUK_REQUIRED, NETWORK_LOCKED, READY, NOT_READY, PERM_DISABLED, CARD_IO_ERROR, CARD_RESTRICTED
});
}
private State(String s, int i)
{
super(s, i);
}
}
public IccCardConstants()
{
}
public static final String INTENT_KEY_ICC_STATE = "ss";
public static final String INTENT_KEY_LOCKED_REASON = "reason";
public static final String INTENT_VALUE_ABSENT_ON_PERM_DISABLED = "PERM_DISABLED";
public static final String INTENT_VALUE_ICC_ABSENT = "ABSENT";
public static final String INTENT_VALUE_ICC_CARD_IO_ERROR = "CARD_IO_ERROR";
public static final String INTENT_VALUE_ICC_CARD_RESTRICTED = "CARD_RESTRICTED";
public static final String INTENT_VALUE_ICC_IMSI = "IMSI";
public static final String INTENT_VALUE_ICC_INTERNAL_LOCKED = "INTERNAL_LOCKED";
public static final String INTENT_VALUE_ICC_LOADED = "LOADED";
public static final String INTENT_VALUE_ICC_LOCKED = "LOCKED";
public static final String INTENT_VALUE_ICC_NOT_READY = "NOT_READY";
public static final String INTENT_VALUE_ICC_READY = "READY";
public static final String INTENT_VALUE_ICC_UNKNOWN = "UNKNOWN";
public static final String INTENT_VALUE_LOCKED_NETWORK = "NETWORK";
public static final String INTENT_VALUE_LOCKED_ON_PIN = "PIN";
public static final String INTENT_VALUE_LOCKED_ON_PUK = "PUK";
}
|
[
"hosigumayuugi@gmail.com"
] |
hosigumayuugi@gmail.com
|
62f87ffa4c3e378000d0c92c021aa1eb842647d2
|
c88740e587336d0bdb77f7e45d6f077555e7d040
|
/src/control/ProjectingPlate.java
|
df086e4b07c1e973053c710670e7aacf9919ffb9
|
[] |
no_license
|
omarahmed10/CircusOfPlates
|
cf4442b1d2f16180663e7967cf2cea38cb50172e
|
7d2deb38d4654c72d67c0f0585d0bbac5b3e97db
|
refs/heads/master
| 2021-01-09T05:47:17.821810
| 2018-01-10T12:50:12
| 2018-01-10T12:50:12
| 80,834,434
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,355
|
java
|
package control;
import models.Plate;
public class ProjectingPlate implements Runnable {
private Plate currentPlate;
private int height;
private PlateFactory plateFactory;
private volatile boolean suspended, inGame;
private Thread t;
public ProjectingPlate(Plate p, int height, PlateFactory plateFactory) {
this.currentPlate = p;
this.height = height;
this.plateFactory = plateFactory;
inGame = true;
}
@Override
public void run() {
projectCurrentPlate();
}
private synchronized void projectCurrentPlate() {
while (inGame && !currentPlate.isCaptured()
&& currentPlate.getCurrentPosition().y < height) {
try {
// give move here any number because offset isn't used in
// projection.
currentPlate.move(0);
Thread.sleep(20);
synchronized (this) {
while (suspended) {
this.wait();
}
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
if (inGame && !currentPlate.isCaptured()) {
plateFactory.removePlate(currentPlate);
plateFactory.addReusablePlate(currentPlate);
}
}
public void start() {
if (t == null) {
t = new Thread(this, "plateProjector");
t.start();
}
}
public void suspend() {
suspended = true;
}
public void stop() {
inGame = false;
}
public synchronized void resume() {
suspended = false;
this.notify();
}
}
|
[
"you@example.com"
] |
you@example.com
|
7af0d42d4c3cdea4761c67dc03d0f63c4460a1cd
|
79a12b894892b3272e4d3fc3086b4720d77f96f2
|
/src/main/java/com/paladin/health/model/origin/OriginDiseaseKnowledgeContent.java
|
8da1adc04c3a4d1897cfcb921f1e66cc385381f5
|
[] |
no_license
|
health-program/paladin
|
a7508f1bdbae707f0f202446037528252b31bdca
|
32cefeca17b7a29e694bf273aa41cf9190035244
|
refs/heads/master
| 2022-10-05T04:53:03.899965
| 2019-02-25T09:28:24
| 2019-02-25T09:28:24
| 131,380,583
| 1
| 1
| null | 2022-09-01T22:50:14
| 2018-04-28T06:35:30
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 885
|
java
|
package com.paladin.health.model.origin;
import javax.persistence.Id;
public class OriginDiseaseKnowledgeContent {
public static final String COLUMN_FIELD_KNOWLEDGE_ID = "knowledgeId";
public static final String COLUMN_FIELD_DISEASE_KEY = "diseaseKey";
@Id
private Integer id;
private String diseaseKey;
private String content;
private Integer knowledgeId;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getDiseaseKey() {
return diseaseKey;
}
public void setDiseaseKey(String diseaseKey) {
this.diseaseKey = diseaseKey;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Integer getKnowledgeId() {
return knowledgeId;
}
public void setKnowledgeId(Integer knowledgeId) {
this.knowledgeId = knowledgeId;
}
}
|
[
"823498927@qq.com"
] |
823498927@qq.com
|
8878ffbbf6a3d490a1645aa3e55575cc495e34ca
|
220f30c1619d3c0eae10ecb6b721dfb13b18bc23
|
/app/src/main/java/com/cuileikun/androidbase/javaactivity/fourteen/day14_Regex/RegexDemo2.java
|
27e741f68a3eca55c105dc75b54b399d2514e79d
|
[] |
no_license
|
cuileikun/AndroidBase
|
d07d484b7c84e3538baeb9bf9a58c063788fb7ea
|
376e8f6f6d2b34c70167ea788dd67013db2cb306
|
refs/heads/master
| 2021-01-20T00:56:20.937349
| 2017-07-03T13:48:05
| 2017-07-03T13:48:05
| 89,213,523
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 836
|
java
|
package com.cuileikun.androidbase.javaactivity.fourteen.day14_Regex;
/*
* 正则表达式:符合一定规则的字符串。
*/
import java.util.Scanner;
public class RegexDemo2 {
public static void main(String[] args) {
// 创建键盘录入对象
Scanner sc = new Scanner(System.in);
System.out.println("请输入你的QQ号码:");
String qq = sc.nextLine();
System.out.println("checkQQ:" + checkQQ(qq));
}
public static boolean checkQQ(String qq) {
// String regex ="[1-9][0-9]{4,14}";
// //public boolean matches(String regex)告知此字符串是否匹配给定的正则表达式
// boolean flag = qq.matches(regex);
// return flag;
//return qq.matches("[1-9][0-9]{4,14}");
return qq.matches("[1-9]\\d{4,14}");
}
}
|
[
"583271702@qq.com"
] |
583271702@qq.com
|
759a3d26386213c7c99da9ea3ab547167d8a91b6
|
6be09f2a0e021e5834af02a5235ae9ccceff06a4
|
/SIGCP/src/pe/com/pacasmayo/sgcp/bean/impl/TipoMedioAlmacenamientoBeanImpl.java
|
56d7b2b275da40c6e92a661591a708aff76523ef
|
[] |
no_license
|
fbngeldres/sigcp
|
60e4f556c0c5555c136639a06bea85f0b1cad744
|
fc7d94c1e0d5b6abb5004d92a031355941884718
|
refs/heads/master
| 2021-01-11T22:33:13.669537
| 2017-03-07T16:19:41
| 2017-03-07T16:20:14
| 78,987,468
| 0
| 0
| null | null | null | null |
ISO-8859-3
|
Java
| false
| false
| 3,414
|
java
|
package pe.com.pacasmayo.sgcp.bean.impl;
/*
* SGCP (Sistema de Gestión y Control de la Producción)
* Archivo: TipoMedioAlmacenamientoBeanImpl.java
* Modificado: Feb 22, 2010 10:49:00 AM
* Autor: hector.longarte
*
* Copyright (C) DBAccess, 2010. All rights reserved.
*
* Developed by: DBAccess. http://www.dbaccess.com
*/
import java.util.HashSet;
import java.util.Set;
import pe.com.pacasmayo.sgcp.bean.TipoMedioAlmacenamientoBean;
import pe.com.pacasmayo.sgcp.bean.UnidadMedidaBean;
public class TipoMedioAlmacenamientoBeanImpl implements TipoMedioAlmacenamientoBean {
private Long codigo;
private UnidadMedidaBean unidada;
private String nombre;
private String descripcion;
private Set<?> mediosAlmacenamiento = new HashSet(0);
private Set registroMedicioness = new HashSet(0);
/*
* (non-Javadoc)
* @see
* pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#getCodigo()
*/
public Long getCodigo() {
return codigo;
}
/*
* (non-Javadoc)
* @see
* pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#setCodigo
* (java.lang.Long)
*/
public void setCodigo(Long codigo) {
this.codigo = codigo;
}
/*
* (non-Javadoc)
* @see
* pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#getUnidada()
*/
public UnidadMedidaBean getUnidada() {
return unidada;
}
/*
* (non-Javadoc)
* @see
* pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#setUnidada
* (pe.com.pacasmayo.sgcp.bean.UnidadMedidaBean)
*/
public void setUnidada(UnidadMedidaBean unidada) {
this.unidada = unidada;
}
/*
* (non-Javadoc)
* @see
* pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#getNombre()
*/
public String getNombre() {
return nombre;
}
/*
* (non-Javadoc)
* @see
* pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#setNombre
* (java.lang.String)
*/
public void setNombre(String nombre) {
this.nombre = nombre;
}
/*
* (non-Javadoc)
* @see
* pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#getDescripcion
* ()
*/
public String getDescripcion() {
return descripcion;
}
/*
* (non-Javadoc)
* @see
* pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#setDescripcion
* (java.lang.String)
*/
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
/*
* (non-Javadoc)
* @see pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#
* getMediosAlmacenamiento()
*/
public Set getMediosAlmacenamiento() {
return mediosAlmacenamiento;
}
/*
* (non-Javadoc)
* @see pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#
* setMediosAlmacenamiento(java.util.Set)
*/
public void setMediosAlmacenamiento(Set mediosAlmacenamiento) {
this.mediosAlmacenamiento = mediosAlmacenamiento;
}
/*
* (non-Javadoc)
* @see pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#
* getRegistroMedicioness()
*/
public Set getRegistroMedicioness() {
return registroMedicioness;
}
/*
* (non-Javadoc)
* @see pe.com.pacasmayo.sgcp.bean.impl.TipoMedioAlmacenamientoBean#
* setRegistroMedicioness(java.util.Set)
*/
public void setRegistroMedicioness(Set registroMedicioness) {
this.registroMedicioness = registroMedicioness;
}
}
|
[
"fbngeldres@gmail.com"
] |
fbngeldres@gmail.com
|
7f8f9cf10bfe035f9ccf34de704dcf86e540570c
|
daeca6aabfae0fad94050b2c53e1a7ea781fa5e2
|
/src/test/java/com/jh/application/web/rest/LogsResourceIntTest.java
|
9aae77fb3cf0d32934c61cca7419cb36b6fccba8
|
[] |
no_license
|
cedotoljic/jh
|
359678533db3d3a38b588910e2dee514f6f14787
|
7d500a11e542adb60fa5f62f5abf88140eed489b
|
refs/heads/master
| 2021-06-06T00:38:04.071411
| 2017-09-06T08:15:33
| 2017-09-06T08:15:33
| 102,582,089
| 0
| 1
| null | 2020-09-18T04:02:44
| 2017-09-06T08:15:29
|
Java
|
UTF-8
|
Java
| false
| false
| 2,439
|
java
|
package com.jh.application.web.rest;
import com.jh.application.JhApp;
import com.jh.application.web.rest.vm.LoggerVM;
import ch.qos.logback.classic.AsyncAppender;
import ch.qos.logback.classic.LoggerContext;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.MockitoAnnotations;
import org.slf4j.LoggerFactory;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Test class for the LogsResource REST controller.
*
* @see LogsResource
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = JhApp.class)
public class LogsResourceIntTest {
private MockMvc restLogsMockMvc;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
LogsResource logsResource = new LogsResource();
this.restLogsMockMvc = MockMvcBuilders
.standaloneSetup(logsResource)
.build();
}
@Test
public void getAllLogs()throws Exception {
restLogsMockMvc.perform(get("/management/logs"))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE));
}
@Test
public void changeLogs()throws Exception {
LoggerVM logger = new LoggerVM();
logger.setLevel("INFO");
logger.setName("ROOT");
restLogsMockMvc.perform(put("/management/logs")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(logger)))
.andExpect(status().isNoContent());
}
@Test
public void testLogstashAppender() {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
assertThat(context.getLogger("ROOT").getAppender("ASYNC_LOGSTASH")).isInstanceOf(AsyncAppender.class);
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
b178daf0d943fa0851185e4dd7164c00139cef3c
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Lang-1/org.apache.commons.lang3.math.NumberUtils/BBC-F0-opt-60/tests/7/org/apache/commons/lang3/math/NumberUtils_ESTest_scaffolding.java
|
4de1805696fc6a05d031b0fe76e535d00f58d769
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 3,307
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Oct 18 23:32:36 GMT 2021
*/
package org.apache.commons.lang3.math;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class NumberUtils_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang3.math.NumberUtils";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(NumberUtils_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.lang3.math.NumberUtils",
"org.apache.commons.lang3.StringUtils"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(NumberUtils_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.lang3.math.NumberUtils",
"org.apache.commons.lang3.StringUtils"
);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
62c22df94844c2afb30b7e1dcb64e0294d6df37d
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/11/11_6132da82ac930826f6406261307164df3b52cf0d/ModelloGeneratorTest/11_6132da82ac930826f6406261307164df3b52cf0d_ModelloGeneratorTest_t.java
|
33e897e9f4a85e44fae4c0fb137d5e136d966b1f
|
[] |
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
| 7,180
|
java
|
package org.codehaus.modello;
/*
* Copyright (c) 2004, Codehaus.org
*
* 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.
*/
import org.apache.maven.artifact.DefaultArtifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.settings.MavenSettingsBuilder;
import org.codehaus.plexus.PlexusTestCase;
import org.codehaus.plexus.compiler.Compiler;
import org.codehaus.plexus.compiler.CompilerConfiguration;
import org.codehaus.plexus.compiler.CompilerError;
import org.codehaus.plexus.compiler.javac.JavacCompiler;
import org.codehaus.plexus.util.FileUtils;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @version $Id$
*/
public abstract class ModelloGeneratorTest
extends PlexusTestCase
{
private List dependencies = new ArrayList();
private String name;
private List urls = new ArrayList();
private ArtifactRepository repository;
protected ModelloGeneratorTest( String name )
{
this.name = name;
}
public final void setUp()
throws Exception
{
super.setUp();
FileUtils.deleteDirectory( getGeneratedSources() );
assertTrue( getGeneratedSources().mkdirs() );
MavenSettingsBuilder builder = (MavenSettingsBuilder) container.lookup( MavenSettingsBuilder.ROLE );
ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) container.lookup(
ArtifactRepositoryLayout.ROLE, "default" );
String url = "file://" + builder.buildSettings().getActiveProfile().getLocalRepository();
repository = new ArtifactRepository( "local", url, repositoryLayout );
}
protected File getGeneratedSources()
{
return getTestFile( "target/" + getName() );
}
public void addDependency( String groupId, String artifactId, String version )
throws Exception
{
DefaultArtifact artifact = new DefaultArtifact( groupId, artifactId, version, "jar" );
File dependencyFile = new File( repository.getBasedir(), repository.pathOf( artifact ) );
assertTrue( "Cant find dependency: " + dependencyFile.getAbsolutePath(), dependencyFile.isFile() );
dependencies.add( dependencyFile );
addClassPathFile( dependencyFile );
}
public String getName()
{
return name;
}
public List getClasspath()
{
return dependencies;
}
protected void compile( File generatedSources, File destinationDirectory )
throws Exception
{
addDependency( "junit", "junit", "3.8.1" );
addDependency( "plexus", "plexus-utils", "1.0-alpha-2" );
// TODO: can read my own POM to set this!
addDependency( "org.codehaus.modello", "modello-test", "1.0-alpha-2-SNAPSHOT" );
String[] classPathElements = new String[dependencies.size() + 2];
classPathElements[0] = getTestPath( "target/classes" );
classPathElements[1] = getTestPath( "target/test-classes" );
for ( int i = 0; i < dependencies.size(); i++ )
{
classPathElements[i + 2] = ( (File) dependencies.get( i ) ).getAbsolutePath();
}
String[] sourceDirectories = new String[]{getTestPath( "src/test/verifiers/" + getName() ),
generatedSources.getAbsolutePath()};
Compiler compiler = new JavacCompiler();
CompilerConfiguration configuration = new CompilerConfiguration();
configuration.setClasspathEntries( Arrays.asList( classPathElements ) );
configuration.setSourceLocations( Arrays.asList( sourceDirectories ) );
configuration.setOutputLocation( destinationDirectory.getAbsolutePath() );
List messages = compiler.compile( configuration );
for ( Iterator it = messages.iterator(); it.hasNext(); )
{
CompilerError message = (CompilerError) it.next();
System.out.println( message.getFile() + "[" + message.getStartLine() + "," + message.getStartColumn() +
"]: " + message.getMessage() );
}
assertEquals( "There was compilation errors.", 0, messages.size() );
}
protected void verify( String className, String testName )
throws Throwable
{
addClassPathFile( getTestFile( "target/" + getName() + "/classes" ) );
addClassPathFile( getTestFile( "target/classes" ) );
addClassPathFile( getTestFile( "target/test-classes" ) );
URLClassLoader classLoader = URLClassLoader.newInstance( (URL[]) urls.toArray( new URL[urls.size()] ),
Thread.currentThread().getContextClassLoader() );
Class clazz = classLoader.loadClass( className );
Method verify = clazz.getMethod( "verify", new Class[0] );
if ( false )
{
printClasspath( classLoader );
}
try
{
verify.invoke( clazz.newInstance(), new Object[0] );
}
catch ( InvocationTargetException ex )
{
throw ex.getCause();
}
}
protected void addClassPathFile( File file )
throws Exception
{
assertTrue( "File doesn't exists: " + file.getAbsolutePath(), file.exists() );
urls.add( file.toURL() );
}
protected void printClasspath( URLClassLoader classLoader )
{
URL[] urls = classLoader.getURLs();
for ( int i = 0; i < urls.length; i++ )
{
URL url = urls[i];
System.out.println( url );
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
009e92521592f07bd4d9529b4a2cb0a7bb827297
|
602f6f274fe6d1d0827a324ada0438bc0210bc39
|
/spring-framework/src/main/java/org/springframework/jca/work/jboss/JBossWorkManagerUtils.java
|
cc141b2e2ca5e4804a78f975c74638ec7a6d4952
|
[
"Apache-2.0"
] |
permissive
|
1091643978/spring
|
c5db27b126261adf256415a0c56c4e7fbea3546e
|
c832371e96dffe8af4e3dafe9455a409bfefbb1b
|
refs/heads/master
| 2020-08-27T04:26:22.672721
| 2019-10-31T05:31:59
| 2019-10-31T05:31:59
| 217,243,879
| 0
| 0
|
Apache-2.0
| 2019-10-24T07:58:34
| 2019-10-24T07:58:31
| null |
UTF-8
|
Java
| false
| false
| 3,033
|
java
|
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.jca.work.jboss;
import java.lang.reflect.Method;
import javax.management.MBeanServerConnection;
import javax.management.MBeanServerInvocationHandler;
import javax.management.ObjectName;
import javax.naming.InitialContext;
import javax.resource.spi.work.WorkManager;
import org.springframework.util.Assert;
/**
* Utility class for obtaining the JBoss JCA WorkManager,
* typically for use in web applications.
*
* @author Juergen Hoeller
* @since 2.5.2
* @deprecated as of Spring 4.0, since there are no fully supported versions
* of JBoss that this class works with anymore
*/
@Deprecated
public abstract class JBossWorkManagerUtils {
private static final String JBOSS_WORK_MANAGER_MBEAN_CLASS_NAME = "org.jboss.resource.work.JBossWorkManagerMBean";
private static final String MBEAN_SERVER_CONNECTION_JNDI_NAME = "jmx/invoker/RMIAdaptor";
private static final String DEFAULT_WORK_MANAGER_MBEAN_NAME = "jboss.jca:service=WorkManager";
/**
* Obtain the default JBoss JCA WorkManager through a JMX lookup
* for the default JBossWorkManagerMBean.
* @see org.jboss.resource.work.JBossWorkManagerMBean
*/
public static WorkManager getWorkManager() {
return getWorkManager(DEFAULT_WORK_MANAGER_MBEAN_NAME);
}
/**
* Obtain the default JBoss JCA WorkManager through a JMX lookup
* for the JBossWorkManagerMBean.
* @param mbeanName the JMX object name to use
* @see org.jboss.resource.work.JBossWorkManagerMBean
*/
public static WorkManager getWorkManager(String mbeanName) {
Assert.hasLength(mbeanName, "JBossWorkManagerMBean name must not be empty");
try {
Class<?> mbeanClass = JBossWorkManagerUtils.class.getClassLoader().loadClass(JBOSS_WORK_MANAGER_MBEAN_CLASS_NAME);
InitialContext jndiContext = new InitialContext();
MBeanServerConnection mconn = (MBeanServerConnection) jndiContext.lookup(MBEAN_SERVER_CONNECTION_JNDI_NAME);
ObjectName objectName = ObjectName.getInstance(mbeanName);
Object workManagerMBean = MBeanServerInvocationHandler.newProxyInstance(mconn, objectName, mbeanClass, false);
Method getInstanceMethod = workManagerMBean.getClass().getMethod("getInstance");
return (WorkManager) getInstanceMethod.invoke(workManagerMBean);
}
catch (Exception ex) {
throw new IllegalStateException(
"Could not initialize JBossWorkManagerTaskExecutor because JBoss API is not available", ex);
}
}
}
|
[
"784990655@qq.com"
] |
784990655@qq.com
|
c753fc39ef227b8d47fc21596f730890bde15a83
|
d6e998009c764149ccbb10454ee545bf6a14264e
|
/src/com/sun/corba/se/spi/activation/RepositoryHolder.java
|
1eb1d0979e078d718b89b509fd4967b4d0522e0f
|
[] |
no_license
|
DierMeng/JDK8-Source-Chinese-Comments
|
23bded49355daf5439bdf4376ba5b69ce4bd0c23
|
e51336f82878dfa4084eaff3f18cf066d7055e21
|
refs/heads/master
| 2022-05-11T08:37:07.968017
| 2022-03-20T14:15:34
| 2022-03-20T14:15:34
| 242,528,069
| 6
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,064
|
java
|
package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/RepositoryHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u221/13320/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Thursday, July 4, 2019 4:38:18 AM PDT
*/
public final class RepositoryHolder implements org.omg.CORBA.portable.Streamable
{
public com.sun.corba.se.spi.activation.Repository value = null;
public RepositoryHolder ()
{
}
public RepositoryHolder (com.sun.corba.se.spi.activation.Repository initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = com.sun.corba.se.spi.activation.RepositoryHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
com.sun.corba.se.spi.activation.RepositoryHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return com.sun.corba.se.spi.activation.RepositoryHelper.type ();
}
}
|
[
"1375057013@qq.com"
] |
1375057013@qq.com
|
be609ca449e6107c310eaf5aa7cb2dd24ebb715f
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/com/yandex/mobile/ads/impl/md.java
|
9db6de449ec591b2cb565c2fee62c07a4b9e1ce5
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,744
|
java
|
package com.yandex.mobile.ads.impl;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.support.annotation.NonNull;
import android.widget.TextView;
import com.yandex.mobile.ads.nativeads.j;
public final class md extends mk<TextView, os> {
@NonNull
private final j a;
@NonNull
private final mr b;
public md(@NonNull TextView textView, @NonNull j jVar) {
super(textView);
this.a = jVar;
this.b = new mr(jVar);
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [android.view.View] */
@Override // com.yandex.mobile.ads.impl.mk
public final /* bridge */ /* synthetic */ void a(@NonNull TextView textView) {
super.a(textView);
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [android.view.View, java.lang.Object] */
@Override // com.yandex.mobile.ads.impl.mk
public final /* synthetic */ void b(@NonNull TextView textView, @NonNull os osVar) {
Bitmap a3;
TextView textView2 = textView;
ot a4 = osVar.a();
if (a4 != null && (a3 = this.a.a(a4)) != null) {
textView2.setBackground(new BitmapDrawable(textView2.getResources(), a3));
}
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [android.view.View, java.lang.Object] */
@Override // com.yandex.mobile.ads.impl.mk
public final /* synthetic */ boolean a(@NonNull TextView textView, @NonNull os osVar) {
TextView textView2 = textView;
ot a3 = osVar.a();
if (a3 == null) {
return true;
}
return this.b.a(textView2.getBackground(), a3);
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
b9bc5e15df22355c0bc39ec1c78afd11d269aa4b
|
9b8cf8ac14b85c5a4a1e40a22ffd97a0b28eb656
|
/pad/CommonCoreLib/src/main/java/com/common/core/utils/ContextProvider.java
|
27be523d6a813aa8299f59b682d7e29947817c57
|
[] |
no_license
|
Dwti/yxyl_old
|
901ce917591eab2d2d556a719bff8b69669128f6
|
b91be2c16ad42ef99356a75fdb5923c03d3a4d73
|
refs/heads/master
| 2020-03-17T20:08:17.738647
| 2018-05-18T03:03:50
| 2018-05-18T03:03:50
| 133,894,755
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,145
|
java
|
/**
* @Description :
*/
package com.common.core.utils;
import android.content.Context;
/**
* This class provide a global application context.
*
*/
public final class ContextProvider {
private static Context sContext = null;
public static void initIfNotInited(Context context) {
if (sContext == null) {
init(context);
}
}
/**
* NOTE This function should be invoked in Application while the
* application is been
* created.
* @param context
*/
public static void init(Context context) {
if (context == null) {
throw new NullPointerException(
"Can not use null initlialized application context");
}
sContext = context;
}
/**
* Get application context.
* @return
*/
public static Context getApplicationContext() {
if (sContext == null) {
throw new NullPointerException("Global application uninitialized");
}
return sContext;
}
private ContextProvider() {
}
public static void destoryContext(){
sContext = null;
}
}
|
[
"yangjunjian@yanxiu.com"
] |
yangjunjian@yanxiu.com
|
a1cf5c35a088b71b5146f083d40479b13f446a1c
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/18/18_d9af9c9d790d2c822442e41b5451aeedfd0638d0/CompareWithRevisionAction/18_d9af9c9d790d2c822442e41b5451aeedfd0638d0_CompareWithRevisionAction_t.java
|
2f94cd2f024a65dde76232d8f3e0f2af44a6f161
|
[] |
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,563
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui.actions;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.CompareUI;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.ICVSResource;
import org.eclipse.team.internal.ccvs.ui.*;
import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.ui.TeamUI;
import org.eclipse.team.ui.history.*;
/**
* Compare with revision will allow a user to browse the history of a file, compare with the
* other revisions and merge changes from other revisions into the workspace copy.
*/
public class CompareWithRevisionAction extends WorkspaceAction {
/*
* @see CVSAction#execute(IAction)
*/
public void execute(IAction action) throws InvocationTargetException, InterruptedException {
// Show the compare viewer
run(new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
if (isShowInDialog()) {
IFile file = (IFile) getSelectedResources()[0];
showCompareInDialog(getShell(), file);
} else {
IHistoryView view = TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), (IFile)getSelectedResources()[0], null);
IHistoryPage page = view.getHistoryPage();
if (page instanceof CVSHistoryPage){
CVSHistoryPage cvsHistoryPage = (CVSHistoryPage) page;
cvsHistoryPage.setClickAction(true);
}
}
}
}, false /* cancelable */, PROGRESS_BUSYCURSOR);
}
protected void showCompareInDialog(Shell shell, Object object){
IHistoryPageSource pageSource = HistoryPageSource.getHistoryPageSource(object);
if (pageSource != null && pageSource.canShowHistoryFor(object)) {
CompareConfiguration cc = new CompareConfiguration();
cc.setLeftEditable(true);
cc.setRightEditable(false);
HistoryPageCompareEditorInput input = new HistoryPageCompareEditorInput(cc, pageSource, object) {
public void saveChanges(IProgressMonitor monitor) throws CoreException {
super.saveChanges(monitor);
((CVSHistoryPage)getHistoryPage()).saveChanges(monitor);
setDirty(false);
}
};
CompareUI.openCompareDialog(input);
}
}
/**
* Return the text describing this action
*/
protected String getActionTitle() {
return CVSUIMessages.CompareWithRevisionAction_4;
}
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
*/
protected String getErrorTitle() {
return CVSUIMessages.CompareWithRevisionAction_compare;
}
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
*/
protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
return (!cvsResource.isFolder() && super.isEnabledForCVSResource(cvsResource));
}
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForMultipleResources()
*/
protected boolean isEnabledForMultipleResources() {
return false;
}
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForAddedResources()
*/
protected boolean isEnabledForAddedResources() {
return true;
}
protected boolean isEnabledForUnmanagedResources() {
return true;
}
protected boolean isEnabledForIgnoredResources() {
return true;
}
protected boolean isShowInDialog() {
return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_SHOW_COMPARE_REVISION_IN_DIALOG);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
b7747b6d4d57636f156005faab43a492b450a5f1
|
bb8c25ecf757892d798dd0ef97de645066d6612b
|
/src/design4_装饰者模式/sample_2/decorator/PersonCloth.java
|
ab650b51309fbe38bc48817ef3de6ead44a693f2
|
[] |
no_license
|
xiangyutian/DesignPattern
|
05be3d830efccea451052e460443fd3919982cd1
|
ae6a68736329cb3ffc5ee36ee9be14eddde39f96
|
refs/heads/master
| 2020-04-14T11:33:37.765305
| 2017-11-20T05:36:32
| 2017-11-20T05:36:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 933
|
java
|
package design4_装饰者模式.sample_2.decorator;
import design4_装饰者模式.sample_2.component.Person;
//装饰抽象类:表示人要穿的衣服
public abstract class PersonCloth extends Person{
/**
* 保持一个Person类的引用,方便调用具体被装饰对象中的方法
* 这样可以在不破坏原类层次结构的情况下为类添加一些功能,只需要在被装饰对象的相应方法
* 前或后增加相应的逻辑功能就行。
* 如果装饰物只有一个的话,不必声明一个抽象类作为装饰者抽象的提取。只要定义一个普通的类表示装饰者就行
*/
private Person person;
public PersonCloth(Person person) {
this.person = person;
}
@Override
public void dressed() {
person.dressed();//调用Person类型的dressed()方法
}
public Person getPerson() {
return person;
}
}
|
[
"1341520108@qq.com"
] |
1341520108@qq.com
|
a0b882e5ed78c6ed89cda9a870ce5f24fe5b17df
|
cfe621e8c36e6ac5053a2c4f7129a13ea9f9f66b
|
/AndroidApplications/com.zeptolab.ctr.ads-912244/src/com/google/android/gms/drive/a.java
|
4ea3f3273382bb88b4f934e7569dec4f447ee972
|
[] |
no_license
|
linux86/AndoirdSecurity
|
3165de73b37f53070cd6b435e180a2cb58d6f672
|
1e72a3c1f7a72ea9cd12048d9874a8651e0aede7
|
refs/heads/master
| 2021-01-11T01:20:58.986651
| 2016-04-05T17:14:26
| 2016-04-05T17:14:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,956
|
java
|
package com.google.android.gms.drive;
import android.os.Parcel;
import android.os.ParcelFileDescriptor;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.b;
import com.zeptolab.ctr.billing.google.utils.IabHelper;
import com.zeptolab.ctr.scorer.GoogleScorer;
public class a implements Creator {
static void a_(Contents contents, Parcel parcel, int i) {
int p = b.p(parcel);
b.c(parcel, 1, contents.wj);
b.a(parcel, (int)GoogleScorer.CLIENT_PLUS, contents.AC, i, false);
b.c(parcel, IabHelper.BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE, contents.CQ);
b.c(parcel, GoogleScorer.CLIENT_APPSTATE, contents.CR);
b.a(parcel, (int)IabHelper.BILLING_RESPONSE_RESULT_DEVELOPER_ERROR, contents.CS, i, false);
b.D(parcel, p);
}
public Contents[] ad(int i) {
return new Contents[i];
}
public /* synthetic */ Object createFromParcel(Parcel parcel) {
return y(parcel);
}
public /* synthetic */ Object[] newArray(int i) {
return ad(i);
}
public Contents y(Parcel parcel) {
DriveId driveId = null;
int i = 0;
int o = com.google.android.gms.common.internal.safeparcel.a.o(parcel);
int i2 = 0;
ParcelFileDescriptor parcelFileDescriptor = null;
int i3 = 0;
while (parcel.dataPosition() < o) {
int n = com.google.android.gms.common.internal.safeparcel.a.n(parcel);
switch (com.google.android.gms.common.internal.safeparcel.a.S(n)) {
case GoogleScorer.CLIENT_GAMES:
i3 = com.google.android.gms.common.internal.safeparcel.a.g(parcel, n);
break;
case GoogleScorer.CLIENT_PLUS:
parcelFileDescriptor = (ParcelFileDescriptor) com.google.android.gms.common.internal.safeparcel.a.a(parcel, n, ParcelFileDescriptor.CREATOR);
break;
case IabHelper.BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE:
i2 = com.google.android.gms.common.internal.safeparcel.a.g(parcel, n);
break;
case GoogleScorer.CLIENT_APPSTATE:
i = com.google.android.gms.common.internal.safeparcel.a.g(parcel, n);
break;
case IabHelper.BILLING_RESPONSE_RESULT_DEVELOPER_ERROR:
driveId = (DriveId) com.google.android.gms.common.internal.safeparcel.a.a(parcel, n, DriveId.CREATOR);
break;
default:
com.google.android.gms.common.internal.safeparcel.a.b(parcel, n);
break;
}
}
if (parcel.dataPosition() == o) {
return new Contents(i3, parcelFileDescriptor, i2, i, driveId);
}
throw new com.google.android.gms.common.internal.safeparcel.a.a("Overread allowed size end=" + o, parcel);
}
}
|
[
"jack.luo@mail.utoronto.ca"
] |
jack.luo@mail.utoronto.ca
|
ca55389f1f2d3ffe72e7054544bc2554c2596b78
|
9c430e5273c05856da6bfc989dc71f11776e522e
|
/Lesson03/HomeWork/PowCalculator.java
|
d9cca050cda18633a54b66311b44f6ba5b0d6690
|
[] |
no_license
|
AnatoliyDeveloper/Java.Start
|
731e9a2a5d0f5cb266a35e82bcf0bb25d6803ed5
|
4b7bd7b84f13510b7e749c3685b2ca69b75ceb5e
|
refs/heads/master
| 2021-01-21T08:37:35.044047
| 2017-01-22T10:55:16
| 2017-01-22T10:55:16
| 68,472,966
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 311
|
java
|
package JavaStart.Lesson03.HomeWork;
/**
* Created by Anatoliy on 11.09.2016.
*/
public class PowCalculator {
public static void main(String[] args) {
double x = ( 45 * Math.pow(10, 30) ) + ( 32 * Math.pow (10, 27) ) ;
System.out.println("x = " + x);
float f = 1.1f;
}
}
|
[
"sheroryaru@gmail.com"
] |
sheroryaru@gmail.com
|
d993bea643bd4505fcbc9338078b218b191248d1
|
d0c77686746a667d830c8d2b5d777f133f3b83f5
|
/JavaBase/ObjectOriented/54. 接口:让商品类型更丰富/code/src/com/geekbang/supermarket/GamePointCard.java
|
7ce87a415369e848d7b096c854740492b82618b2
|
[
"MIT"
] |
permissive
|
xiang12835/JavaLearning
|
ba8a473bb20ba8462b676b954c7fcc790e3c1bce
|
c86c2014b512c1ddaeb51e82dcb49367ed86235b
|
refs/heads/master
| 2023-03-15T20:15:35.191227
| 2022-04-23T13:36:40
| 2022-04-23T13:36:40
| 195,542,607
| 0
| 0
|
MIT
| 2023-03-08T17:35:10
| 2019-07-06T13:29:25
|
Java
|
UTF-8
|
Java
| false
| false
| 1,930
|
java
|
package com.geekbang.supermarket;
import java.util.Date;
// >> TODO 一个类只能继承一个父类,但是可以实现多个接口
// >> TODO 如果实现的接口里定义了一样的方法,那么也没问题。但是要求方法名,参数,返回值类型都必须一摸一样。
public class GamePointCard extends MerchandiseV2 implements ExpireDateMerchandise, VirtualMerchandise {
private Date produceDate;
private Date expirationDate;
public GamePointCard(String name, String id, int count, double soldPrice, double purchasePrice, Date produceDate, Date expirationDate) {
super(name, id, count, soldPrice, purchasePrice);
this.produceDate = produceDate;
this.expirationDate = expirationDate;
}
// >> TODO 一个类实现接口,就是从接口继承了抽象方法
public boolean notExpireInDays(int days) {
return daysBeforeExpire() > days;
}
public Date getProducedDate() {
return produceDate;
}
public Date getExpireDate() {
return expirationDate;
}
public double leftDatePercentage() {
return 1.0 * daysBeforeExpire() / (daysBeforeExpire() + daysAfterProduce());
}
public double actualValueNow(double leftDatePercentage) {
return soldPrice;
}
private long daysBeforeExpire() {
long expireMS = expirationDate.getTime();
long left = expireMS - System.currentTimeMillis();
if (left < 0) {
return -1;
}
// 返回值是long,是根据left的类型决定的
return left / (24 * 3600 * 1000);
}
private long daysAfterProduce() {
long expireMS = expirationDate.getTime();
long left = System.currentTimeMillis() - expireMS;
if (left < 0) {
return -1;
}
// 返回值是long,是根据left的类型决定的
return left / (24 * 3600 * 1000);
}
}
|
[
"yu.xiang@alibaba-inc.com"
] |
yu.xiang@alibaba-inc.com
|
dba8b7338a4f289e7afe2642d3fc755fd8ae1964
|
ccf82688f082e26cba5fc397c76c77cc007ab2e8
|
/Mage.Sets/src/mage/cards/g/GoldmawChampion.java
|
2ceb40c0df3d59d414088a1671ce96ae4758ca39
|
[
"MIT"
] |
permissive
|
magefree/mage
|
3261a89320f586d698dd03ca759a7562829f247f
|
5dba61244c738f4a184af0d256046312ce21d911
|
refs/heads/master
| 2023-09-03T15:55:36.650410
| 2023-09-03T03:53:12
| 2023-09-03T03:53:12
| 4,158,448
| 1,803
| 1,133
|
MIT
| 2023-09-14T20:18:55
| 2012-04-27T13:18:34
|
Java
|
UTF-8
|
Java
| false
| false
| 1,173
|
java
|
package mage.cards.g;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.keyword.BoastAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class GoldmawChampion extends CardImpl {
public GoldmawChampion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.DWARF);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Boast — {1}{W}: Tap target creature.
Ability ability = new BoastAbility(new TapTargetEffect(), "{1}{W}");
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
private GoldmawChampion(final GoldmawChampion card) {
super(card);
}
@Override
public GoldmawChampion copy() {
return new GoldmawChampion(this);
}
}
|
[
"theelk801@gmail.com"
] |
theelk801@gmail.com
|
7e4991e25c5765571e05b52c530be794294de811
|
1556686e784876ccbcfc8f30e5a38e074bb9b4df
|
/Java/spring/src/com/helloweenvsfei/spring/example/DaoExample.java
|
61c35a5a77424bca2ae3b5060a748df031f28497
|
[] |
no_license
|
smallchichen/pidos
|
fe5df8011424c7bb55cdb035ea87c89e3043c2fd
|
f7ef518f953a1aed0d467c21ee50df3bf3ccc46c
|
refs/heads/master
| 2023-01-10T16:46:00.467903
| 2020-03-31T17:15:42
| 2020-03-31T17:15:42
| 246,302,825
| 3
| 0
| null | 2023-01-07T16:07:55
| 2020-03-10T13:04:38
|
CSS
|
UTF-8
|
Java
| false
| false
| 433
|
java
|
package com.helloweenvsfei.spring.example;
import java.util.Calendar;
public class DaoExample {
public String sayHello(String name) {
int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
if (hour < 6)
return "凌晨早, " + name;
if (hour < 12)
return "早上好, " + name;
if (hour < 13)
return "中午好, " + name;
if (hour < 18)
return "下午好, " + name;
return "晚上好, " + name;
}
}
|
[
"you@example.com"
] |
you@example.com
|
f62a695c92f0a65a5f82c423b19ba018f740ba74
|
3da6f1593ae3c0d6fd0bef0f81825a6dcb4f562b
|
/spring-aop/src/main/java/org/springframework/aop/AopInvocationException.java
|
a6afde95ccbcca97559145f8eaeceebdf29bb142
|
[
"Apache-2.0"
] |
permissive
|
binfooo/spring
|
c784f3b49717bb65c6bdf0eb8db08f3f36852006
|
a1f1a3e6f0a7a26641fe5f925aae76a2d32e566c
|
refs/heads/master
| 2023-02-23T12:11:02.335887
| 2021-01-30T01:54:25
| 2021-01-30T01:54:25
| 334,065,384
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 724
|
java
|
package org.springframework.aop;
import org.springframework.core.NestedRuntimeException;
/**
* Exception that gets thrown when an AOP invocation failed
* because of misconfiguration or unexpected runtime issues.
*
* @author Juergen Hoeller
* @since 2.0
*/
@SuppressWarnings("serial")
public class AopInvocationException extends NestedRuntimeException {
/**
* Constructor for AopInvocationException.
* @param msg the detail message
*/
public AopInvocationException(String msg) {
super(msg);
}
/**
* Constructor for AopInvocationException.
* @param msg the detail message
* @param cause the root cause
*/
public AopInvocationException(String msg, Throwable cause) {
super(msg, cause);
}
}
|
[
"LinHJ090827"
] |
LinHJ090827
|
ea87a2b1de433c5bed0f2d95c7113c15f132a161
|
115ddee82aa7e11c3661d9cc5d8f7186475ceb37
|
/bus-all/src/main/java/org/aoju/bus/storage/provider/LocalFileProvider.java
|
3eb549a51a8d8d2421fa8deba483e7d673e3f09c
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
hunshikan/bus
|
afdcb699b9c3d02468f57b07872a6344fa754602
|
ca455555d0763e88c51bba3afcc8c06421762445
|
refs/heads/master
| 2020-09-22T02:43:11.932534
| 2019-11-30T08:33:01
| 2019-11-30T08:33:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,650
|
java
|
package org.aoju.bus.storage.provider;
import org.aoju.bus.core.utils.StreamUtils;
import org.aoju.bus.logger.Logger;
import org.aoju.bus.storage.Builder;
import org.aoju.bus.storage.Context;
import org.aoju.bus.storage.magic.Readers;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
/**
* 本地文件上传
*
* @author Kimi Liu
* @version 5.2.8
* @since JDK 1.8+
*/
public class LocalFileProvider extends AbstractProvider {
public LocalFileProvider(Context context) {
this.context = context;
}
@Override
public Readers download(String fileName) {
return new Readers(new File(fileName));
}
@Override
public Readers download(String bucket, String fileName) {
return null;
}
@Override
public Readers download(String bucket, String fileName, File file) {
return null;
}
@Override
public Readers download(String fileName, File file) {
return null;
}
@Override
public Readers list() {
return null;
}
@Override
public Readers rename(String oldName, String newName) {
return null;
}
@Override
public Readers rename(String bucket, String oldName, String newName) {
return null;
}
@Override
public Readers upload(String fileName, byte[] content) {
return null;
}
@Override
public Readers upload(String bucket, String fileName, InputStream content) {
try {
File dest = new File(bucket, fileName);
if (!new File(dest.getParent()).exists()) {
boolean result = new File(dest.getParent()).mkdirs();
if (!result) {
return new Readers(Builder.FAILURE);
}
}
OutputStream out = Files.newOutputStream(dest.toPath());
StreamUtils.copy(content, out);
content.close();
out.close();
return new Readers(Builder.SUCCESS);
} catch (IOException e) {
Logger.error("file upload failed", e.getMessage());
}
return new Readers(Builder.FAILURE);
}
@Override
public Readers upload(String bucket, String fileName, byte[] content) {
return null;
}
@Override
public Readers remove(String fileName) {
return null;
}
@Override
public Readers remove(String bucket, String fileName) {
return null;
}
@Override
public Readers remove(String bucket, Path path) {
return null;
}
}
|
[
"839536@qq.com"
] |
839536@qq.com
|
d4764e0b5444198a6502502d78f883c79343ddc0
|
80599fbe9c8361dd0d112229a51b775b53f8314f
|
/NetBeansWorkspace/Hardware/src/hardware/camera/ViewerCanvasSample.java
|
6e79949428e99cabe5c9bfa6349bc16f2b8a9391
|
[] |
no_license
|
ijeongsoo/TestRepository
|
155830c64f5c0b194fb2b6f7a7488f69b0d0b570
|
1cd86939a8729f443429646f4f98e1f25ac477d4
|
refs/heads/master
| 2021-01-20T00:45:41.780570
| 2017-07-10T07:11:08
| 2017-07-10T07:11:08
| 89,182,166
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 926
|
java
|
package hardware.camera;
import java.net.URL;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class ViewerCanvasSample extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
StackPane root = new StackPane();
ViewerCanvas viewer = new ViewerCanvas(320, 240);
viewer.setCurrentURL(new URL("http://192.168.3.36:50001/?action=stream"));
root.getChildren().add(viewer);
Scene scene = new Scene(root);
primaryStage.setScene(scene);
primaryStage.setWidth(320);
primaryStage.setHeight(240);
//primaryStage.setFullScreen(true);
//primaryStage.setFullScreenExitHint("");
primaryStage.setResizable(false);
primaryStage.setTitle("JavaFX - MjpegViewer");
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
|
[
"quintessence6083@gmail.com"
] |
quintessence6083@gmail.com
|
3409e8e71fc5a0a1cc3d7af65ddee2b59846a62d
|
bbfa56cfc81b7145553de55829ca92f3a97fce87
|
/plugins/org.ifc4emf.metamodel.ifc/src/IFC2X3/jaxb/IfcZoneImplAdapter.java
|
99d5bec6091eff6b339f9633e1a23ffbf698c22c
|
[] |
no_license
|
patins1/raas4emf
|
9e24517d786a1225344a97344777f717a568fdbe
|
33395d018bc7ad17a0576033779dbdf70fa8f090
|
refs/heads/master
| 2021-08-16T00:27:12.859374
| 2021-07-30T13:01:48
| 2021-07-30T13:01:48
| 87,889,951
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 227
|
java
|
package IFC2X3.jaxb;
import org.eclipse.emf.ecore.jaxb.EObjectImplAdapter;
import IFC2X3.IfcZone;
import IFC2X3.impl.IfcZoneImpl;
public class IfcZoneImplAdapter extends EObjectImplAdapter<IfcZoneImpl, IfcZone> {
}
|
[
"patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e"
] |
patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e
|
26da5bbb90f00ef3ba6fd5fc16892eebd9b62b9c
|
3f9965e1af3d12b3523dc6cde50f826a9c5b7840
|
/src/main/java/com/std/account/util/CalculationUtil.java
|
bbda24cefc96eb4ef2a5cde10467a6ca9be87149
|
[] |
no_license
|
yiwocao2017/dztstdaccount
|
b610b7d8fc68abc5ba1edc127dcba3f6e19f272f
|
d636f7f5805c30bc7874840181ea4d98b74d2b4f
|
refs/heads/master
| 2022-06-24T04:26:17.253794
| 2019-07-01T06:36:38
| 2019-07-01T06:36:38
| 194,613,983
| 0
| 0
| null | 2022-06-17T02:16:59
| 2019-07-01T06:36:37
|
Java
|
UTF-8
|
Java
| false
| false
| 846
|
java
|
package com.std.account.util;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import com.std.account.exception.BizException;
public class CalculationUtil {
public static String mult(String number) {
DecimalFormat df = new DecimalFormat(".00");
df.setRoundingMode(RoundingMode.FLOOR);
Double money;
try {
String m = df.format(Double.parseDouble(number));
money = Double.parseDouble(m) * 1000;
} catch (Exception e) {
throw new BizException("zc000001", "金额必须是数字类型");
}
return String.valueOf(money.longValue());
}
public static String divi(Long money) {
DecimalFormat df = new DecimalFormat("#0.00");
df.setRoundingMode(RoundingMode.FLOOR);
return df.format(money / 1000.0);
}
}
|
[
"admin@yiwocao.com"
] |
admin@yiwocao.com
|
9c9bd10472560203c8ce589af0cbeaf3dd42bc71
|
4b93c76909b85a9a999cab2a18cd010ccca8a7f3
|
/jpa-associations/src/main/java/com/mycompany/jpaassociations/manytomany/simplerelationship/exception/WriterNotFoundException.java
|
7ed71044c3dd493613ad3812339a00959bbcef83
|
[] |
no_license
|
tawrahim/springboot-jpa-studies
|
a578a549a0dd5c3e89ea4352086b4f5006f01933
|
a67b387556cf185e488767f6d20f337e84dee2d1
|
refs/heads/master
| 2020-09-06T05:45:19.059298
| 2019-09-03T11:39:17
| 2019-09-03T11:39:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 376
|
java
|
package com.mycompany.jpaassociations.manytomany.simplerelationship.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(HttpStatus.NOT_FOUND)
public class WriterNotFoundException extends RuntimeException {
public WriterNotFoundException(String message) {
super(message);
}
}
|
[
"ivan.franchin@takeaway.com"
] |
ivan.franchin@takeaway.com
|
0230841f8d9c2f735874e30de02178e8da1f2d1a
|
7200960674ffcaaf3939adfcf0258170e878622d
|
/app/src/main/java/cn/yuyun/yymy/ui/home/member/asset/AssetConsumeDialogAdapter.java
|
5e3e368889a712e15a0cab1da55e373624a36550
|
[] |
no_license
|
lizhongze123/YuYunMeiYe
|
f6742665d7d5cbcc5534ab50bf127178ae0f2634
|
69b82644ab945641c9f5ff15b73c8441c4b502fd
|
refs/heads/master
| 2021-05-12T00:15:33.411942
| 2019-03-21T09:13:14
| 2019-03-21T09:13:14
| 117,528,299
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,220
|
java
|
package cn.yuyun.yymy.ui.home.member.asset;
import android.content.Context;
import android.graphics.Color;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import cn.lzz.utils.DensityUtils;
import cn.lzz.utils.TextViewUtils;
import cn.yuyun.yymy.R;
import cn.yuyun.yymy.http.result.ResultAssetDetail.MemberAssetsInfoBean.PackageItemsInfoRspListBean;
import cn.yuyun.yymy.http.result.ResultBillManagerTypeDetail.BillAllInfoBean;
import cn.yuyun.yymy.utils.GlideHelper;
import cn.yuyun.yymy.view.RoundAngleImageView;
/**
* @author
* @desc
* @date
*/
public class AssetConsumeDialogAdapter extends RecyclerView.Adapter<AssetConsumeDialogAdapter.ViewHolder> {
private int RESOURCE_ID = R.layout.item_dialog_asset;
private Context mContext;
private List<PackageItemsInfoRspListBean> dataList = new ArrayList<>();
OnMyItemClickListener onItemClickListener;
public AssetConsumeDialogAdapter(Context context) {
this.mContext = context;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View rootView = LayoutInflater.from(mContext).inflate(RESOURCE_ID, parent, false);
return new ViewHolder(rootView, onItemClickListener);
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
holder.bindItem(dataList.get(position), position);
}
@Override
public int getItemCount() {
return dataList.size();
}
public void notifyDataSetChanged(List<PackageItemsInfoRspListBean> dataList) {
this.dataList.clear();
this.dataList.addAll(dataList);
notifyDataSetChanged();
}
public void addAll(List<PackageItemsInfoRspListBean> dataList) {
this.dataList.addAll(dataList);
notifyDataSetChanged();
}
public void clear() {
this.dataList.clear();
notifyDataSetChanged();
}
class ViewHolder extends RecyclerView.ViewHolder {
@BindView(R.id.iv_avatar)
RoundAngleImageView ivAvatar;
@BindView(R.id.tv_name)
TextView tvName;
@BindView(R.id.tv_type)
TextView tvType;
@BindView(R.id.tv_brand)
TextView tvBrand;
@BindView(R.id.tv_total)
TextView tvTotal;
@BindView(R.id.tv_can)
TextView tvCan;
ViewHolder(View v, OnMyItemClickListener onItemClickListener) {
super(v);
ButterKnife.bind(this, v);
}
private void bindItem(final PackageItemsInfoRspListBean bean, final int position) {
if(null != bean.goodRsp){
if(!TextUtils.isEmpty(bean.goodRsp.thumb_url)){
if(bean.goodRsp.thumb_url.startsWith(mContext.getString(R.string.HTTP))){
GlideHelper.displayImage(mContext, bean.goodRsp.thumb_url, ivAvatar);
}else{
GlideHelper.displayImage(mContext, mContext.getString(R.string.image_url_prefix) + bean.goodRsp.thumb_url, ivAvatar);
}
}else{
GlideHelper.displayImage(mContext, R.color.loadding_img_bg, ivAvatar);
}
TextViewUtils.setTextOrEmpty(tvName, bean.goodRsp.name);
TextViewUtils.setTextOrEmpty(tvType, "类型:" + bean.goodRsp.type_name);
TextViewUtils.setTextOrEmpty(tvBrand, "品牌:" + bean.goodRsp.brand_name);
TextViewUtils.setTextOrEmpty(tvTotal, "总次数" + bean.total_good_numbers);
TextViewUtils.setTextOrEmpty(tvCan, "可用次数" + bean.canbe_used_good_numbers);
}
}
}
public void setOnItemClickListener(OnMyItemClickListener onItemClickListener) {
this.onItemClickListener = onItemClickListener;
}
public interface OnMyItemClickListener {
void onItemClick(View view, BillAllInfoBean bean, int position);
}
}
|
[
"793223793@qq.com"
] |
793223793@qq.com
|
1f2bee22a18a58941f0aa3277d9d0bd299fd6d39
|
3f2a91bdf318dba2888692a931f1f3eb34f8cb0c
|
/src/main/java/org/yaml/snakeyaml/resolver/Resolver.java
|
f8ec36fa66cedc83a205b82391762da29ef31f91
|
[
"Apache-2.0"
] |
permissive
|
aosp-caf-upstream/platform_external_snakeyaml
|
43ed24df769e26f62087405711c4f7bb71293cbf
|
1bc636a306795fc40770bdd73ee01477ce1cb189
|
refs/heads/pie
| 2021-07-04T01:47:43.527040
| 2018-03-13T18:24:02
| 2018-03-13T18:24:02
| 188,864,487
| 0
| 0
|
NOASSERTION
| 2020-10-13T13:29:35
| 2019-05-27T15:03:21
|
Java
|
UTF-8
|
Java
| false
| false
| 5,714
|
java
|
/**
* Copyright (c) 2008, http://www.snakeyaml.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.yaml.snakeyaml.resolver;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import org.yaml.snakeyaml.nodes.NodeId;
import org.yaml.snakeyaml.nodes.Tag;
/**
* Resolver tries to detect a type by content (when the tag is implicit)
*/
public class Resolver {
public static final Pattern BOOL = Pattern
.compile("^(?:yes|Yes|YES|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)$");
/**
* The regular expression is taken from the 1.2 specification but '_'s are
* added to keep backwards compatibility
*/
public static final Pattern FLOAT = Pattern
.compile("^([-+]?(\\.[0-9]+|[0-9_]+(\\.[0-9_]*)?)([eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
public static final Pattern INT = Pattern
.compile("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[0-9a-fA-F_]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$");
public static final Pattern MERGE = Pattern.compile("^(?:<<)$");
public static final Pattern NULL = Pattern.compile("^(?:~|null|Null|NULL| )$");
public static final Pattern EMPTY = Pattern.compile("^$");
public static final Pattern TIMESTAMP = Pattern
.compile("^(?:[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]|[0-9][0-9][0-9][0-9]-[0-9][0-9]?-[0-9][0-9]?(?:[Tt]|[ \t]+)[0-9][0-9]?:[0-9][0-9]:[0-9][0-9](?:\\.[0-9]*)?(?:[ \t]*(?:Z|[-+][0-9][0-9]?(?::[0-9][0-9])?))?)$");
public static final Pattern VALUE = Pattern.compile("^(?:=)$");
public static final Pattern YAML = Pattern.compile("^(?:!|&|\\*)$");
protected Map<Character, List<ResolverTuple>> yamlImplicitResolvers = new HashMap<Character, List<ResolverTuple>>();
protected void addImplicitResolvers() {
addImplicitResolver(Tag.BOOL, BOOL, "yYnNtTfFoO");
/*
* INT must be before FLOAT because the regular expression for FLOAT
* matches INT (see issue 130)
* http://code.google.com/p/snakeyaml/issues/detail?id=130
*/
addImplicitResolver(Tag.INT, INT, "-+0123456789");
addImplicitResolver(Tag.FLOAT, FLOAT, "-+0123456789.");
addImplicitResolver(Tag.MERGE, MERGE, "<");
addImplicitResolver(Tag.NULL, NULL, "~nN\0");
addImplicitResolver(Tag.NULL, EMPTY, null);
addImplicitResolver(Tag.TIMESTAMP, TIMESTAMP, "0123456789");
// The following implicit resolver is only for documentation
// purposes.
// It cannot work
// because plain scalars cannot start with '!', '&', or '*'.
addImplicitResolver(Tag.YAML, YAML, "!&*");
}
public Resolver() {
addImplicitResolvers();
}
public void addImplicitResolver(Tag tag, Pattern regexp, String first) {
if (first == null) {
List<ResolverTuple> curr = yamlImplicitResolvers.get(null);
if (curr == null) {
curr = new ArrayList<ResolverTuple>();
yamlImplicitResolvers.put(null, curr);
}
curr.add(new ResolverTuple(tag, regexp));
} else {
char[] chrs = first.toCharArray();
for (int i = 0, j = chrs.length; i < j; i++) {
Character theC = Character.valueOf(chrs[i]);
if (theC == 0) {
// special case: for null
theC = null;
}
List<ResolverTuple> curr = yamlImplicitResolvers.get(theC);
if (curr == null) {
curr = new ArrayList<ResolverTuple>();
yamlImplicitResolvers.put(theC, curr);
}
curr.add(new ResolverTuple(tag, regexp));
}
}
}
public Tag resolve(NodeId kind, String value, boolean implicit) {
if (kind == NodeId.scalar && implicit) {
List<ResolverTuple> resolvers = null;
if (value.length() == 0) {
resolvers = yamlImplicitResolvers.get('\0');
} else {
resolvers = yamlImplicitResolvers.get(value.charAt(0));
}
if (resolvers != null) {
for (ResolverTuple v : resolvers) {
Tag tag = v.getTag();
Pattern regexp = v.getRegexp();
if (regexp.matcher(value).matches()) {
return tag;
}
}
}
if (yamlImplicitResolvers.containsKey(null)) {
for (ResolverTuple v : yamlImplicitResolvers.get(null)) {
Tag tag = v.getTag();
Pattern regexp = v.getRegexp();
if (regexp.matcher(value).matches()) {
return tag;
}
}
}
}
switch (kind) {
case scalar:
return Tag.STR;
case sequence:
return Tag.SEQ;
default:
return Tag.MAP;
}
}
}
|
[
"public.somov@gmail.com"
] |
public.somov@gmail.com
|
2f5fabece06c6007cc622360734cdd9546d16a71
|
d7de50fc318ff59444caabc38d274f3931349f19
|
/src/com/j256/ormlite/table/DatabaseTable.java
|
a64600611ff960739f8c9a614f87ddb632242681
|
[] |
no_license
|
reverseengineeringer/fr.dvilleneuve.lockito
|
7bbd077724d61e9a6eab4ff85ace35d9219a0246
|
ad5dbd7eea9a802e5f7bc77e4179424a611d3c5b
|
refs/heads/master
| 2021-01-20T17:21:27.500016
| 2016-07-19T16:23:04
| 2016-07-19T16:23:04
| 63,709,932
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 531
|
java
|
package com.j256.ormlite.table;
import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({java.lang.annotation.ElementType.TYPE})
public @interface DatabaseTable
{
Class<?> daoClass() default Void.class;
String tableName() default "";
}
/* Location:
* Qualified Name: com.j256.ormlite.table.DatabaseTable
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
a310da54c8c38e9f27177fa6b9e18ac86ca1f41e
|
5fdc49b03ce7429850eeeef9d310727521310a92
|
/ihakul_server/src/com/xiaoai/entity/Info.java
|
c5cc95c2000f1745472fb3a54d331bb4abd728f9
|
[] |
no_license
|
acaozixu123456/ihakul_server
|
790c9855cf3d799331225276ada43accb04353d0
|
baf94a331e6a2014dfa020926c494f99a86bb918
|
refs/heads/master
| 2020-12-13T04:32:23.335749
| 2017-07-11T16:02:15
| 2017-07-11T16:02:15
| 95,416,153
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,829
|
java
|
package com.xiaoai.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
/**
* @author ZERO
* @Data 2017-7-3 上午10:24:35
* @Description 公告实体类
*/
@Entity
@Table(name = "info", catalog = "xiaoi")
public class Info implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
public static final String ID="content";
public static final String CONTENT="content";
public static final String CREAT_TIME="creatTime";
public static final String CREATOR="creator";
public static final String PUSH_TIME="pushTime";
public static final String PUSH_STATE="pushState";
public static final String OTHER_CONTENT="otherContent";
private Integer id;
/**
* 公告推送的文本内容
*/
private String content;
/**
* 公告创建时间
*/
private Date creatTime;
/**
* 公告创建者
*/
private String creator;
/**
* 公告定时推送时间
*/
private Date pushTime;
/**
* 公告推送状态
*/
private Integer pushState;
/**
* 公告其他内容(图片地址等)
*/
private String otherContent;
@GenericGenerator(name = "generator", strategy = "increment")
@Id
@GeneratedValue(generator = "generator")
@Column(name = "id", unique = true, nullable = false)
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name = "content")
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Column(name = "creatTime")
public Date getCreatTime() {
return creatTime;
}
public void setCreatTime(Date creatTime) {
this.creatTime = creatTime;
}
@Column(name = "creator", length = 20)
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
@Column(name = "pushTime")
public Date getPushTime() {
return pushTime;
}
public void setPushTime(Date pushTime) {
this.pushTime = pushTime;
}
@Column(name = "pushState")
public Integer getPushState() {
return pushState;
}
public void setPushState(Integer pushState) {
this.pushState = pushState;
}
@Column(name = "otherContent",length=255)
public String getOtherContent() {
return otherContent;
}
public void setOtherContent(String otherContent) {
this.otherContent = otherContent;
}
@Override
public String toString() {
return "Info [id=" + id + ", content=" + content + ", creatTime="
+ creatTime + ", creator=" + creator + ", pushTime=" + pushTime
+ ", pushState=" + pushState + ", otherContent=" + otherContent
+ "]";
}
}
|
[
"1060589146@qq.com"
] |
1060589146@qq.com
|
2cca651ba571c645f5aa385affdeb19d5b088a88
|
ff79e46531d5ad204abd019472087b0ee67d6bd5
|
/components/db-main/src/och/comp/db/main/table/chat/host/CreateClientHostAccOwner.java
|
554ec1d3f86800755ffb3ce680cd952041ecd02a
|
[
"Apache-2.0"
] |
permissive
|
Frankie-666/live-chat-engine
|
24f927f152bf1ef46b54e3d55ad5cf764c37c646
|
3125d34844bb82a34489d05f1dc5e9c4aaa885a0
|
refs/heads/master
| 2020-12-25T16:36:00.156135
| 2015-08-16T09:16:57
| 2015-08-16T09:16:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,062
|
java
|
/*
* Copyright 2015 Evgeny Dolganov (evgenij.dolganov@gmail.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 och.comp.db.main.table.chat.host;
import static och.comp.db.main.table.MainTables.*;
import och.comp.db.base.universal.CreateRow;
import och.comp.db.main.table._f.HostId;
import och.comp.db.main.table._f.UserId;
public class CreateClientHostAccOwner extends CreateRow {
public CreateClientHostAccOwner(long hostId, long userId) {
super(client_hosts_acc_owners,
new HostId(hostId),
new UserId(userId));
}
}
|
[
"evgenij.dolganov@gmail.com"
] |
evgenij.dolganov@gmail.com
|
0ae921e5c14d9b7dc55714db9ec6911713b57721
|
502fa6f26b69a3769d711ff3e21d94e78a8a61b9
|
/Edianfa/unicorn2/src/main/java/com/chanlytech/unicorn/core/entity/UinBaseParcelableEntity.java
|
b341fabdfec4f8db1ed926fc84b0e5e97b924d7a
|
[] |
no_license
|
897903718/E-
|
3e9acaa0a11056dd3dde39b8578625510f3825fb
|
54605b136ac3fe567ac4bf890a9df1df5d5805cf
|
refs/heads/master
| 2020-03-26T08:47:54.680489
| 2016-06-13T01:52:47
| 2016-06-13T01:52:47
| 60,999,141
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 606
|
java
|
/*
* Copyright (c) 2014. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
* Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
* Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
* Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
* Vestibulum commodo. Ut rhoncus gravida arcu.
*/
package com.chanlytech.unicorn.core.entity;
import android.os.Parcelable;
/**
* Parcelable实体
* Created by higgses on 14-4-16.
*/
public abstract class UinBaseParcelableEntity implements Parcelable
{}
|
[
"511455842@qq.com"
] |
511455842@qq.com
|
651a8d0817c48f8e9ef7e0436e4ce8195349f9d2
|
2f4a058ab684068be5af77fea0bf07665b675ac0
|
/app/com/facebook/orca/threadview/ThreadViewAudioAttachmentView$1.java
|
05958e8a5f4aa87adfaa0a4a9bac4b2b7667f913
|
[] |
no_license
|
cengizgoren/facebook_apk_crack
|
ee812a57c746df3c28fb1f9263ae77190f08d8d2
|
a112d30542b9f0bfcf17de0b3a09c6e6cfe1273b
|
refs/heads/master
| 2021-05-26T14:44:04.092474
| 2013-01-16T08:39:00
| 2013-01-16T08:39:00
| 8,321,708
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 840
|
java
|
package com.facebook.orca.threadview;
import com.facebook.orca.audio.AudioClipPlayer.Callback;
import com.facebook.orca.audio.AudioClipPlayer.Event;
class ThreadViewAudioAttachmentView$1
implements AudioClipPlayer.Callback
{
public void a(AudioClipPlayer.Event paramEvent)
{
switch (ThreadViewAudioAttachmentView.5.a[paramEvent.ordinal()])
{
default:
case 1:
case 2:
case 3:
case 4:
case 5:
}
while (true)
{
return;
ThreadViewAudioAttachmentView.a(this.a);
continue;
this.a.c();
continue;
ThreadViewAudioAttachmentView.b(this.a);
}
}
}
/* Location: /data1/software/jd-gui/com.facebook.katana_2.0_liqucn.com-dex2jar.jar
* Qualified Name: com.facebook.orca.threadview.ThreadViewAudioAttachmentView.1
* JD-Core Version: 0.6.0
*/
|
[
"macluz@msn.com"
] |
macluz@msn.com
|
2df0280683cd8c3eca06225ef6765863d9149d19
|
9bb5c8ae2c8ec8e2fd38d43ef07c8772edb706e9
|
/app/src/main/java/com/lishu/e/c.java
|
6c8955b4be5afc7f8ec0fa604140243338951eb4
|
[] |
no_license
|
yucz/008xposed
|
0be57784b681b4495db224b9c509bcf5f6b08d38
|
3777608796054e389e30c9b543a2a1ac888f0a68
|
refs/heads/master
| 2021-05-11T14:32:57.902655
| 2017-09-29T16:57:34
| 2017-09-29T16:57:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,740
|
java
|
package com.lishu.e;
import java.security.Key;
import java.security.KeyFactory;
import java.security.spec.KeySpec;
import java.security.spec.X509EncodedKeySpec;
import javax.crypto.Cipher;
public final class c
{
static String a = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCBzuzNBKunvcW2mMbCnfo94p1cYbGUU9HNnqKp/9zN8ADXBacfUFUC7dO7+n5lGrZsrJ4yecYqO8Pr9pFspitiWD0UPz3B/RTidi3ONrAFQzrjbP4YfIQ7c/KVp/d313nIxhCh2+t1RfAVfcNxiEVi8gjkdh56j38QDgNsAsoAIwIDAQAB";
private static String b = "5ygTCo2JjGGGDvOkfVTo5A==";
public static String a(String paramString)
{
try
{
paramString = paramString.getBytes("UTF-8");
Object localObject = new X509EncodedKeySpec(a.a(a));
localObject = KeyFactory.getInstance("RSA").generatePublic((KeySpec)localObject);
Cipher localCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
localCipher.init(1, (Key)localObject);
paramString = b.a(localCipher.doFinal(paramString));
return paramString;
}
catch (Exception paramString) {}
return "";
}
public static String b(String paramString)
{
try
{
paramString = b.a(paramString.toCharArray());
Object localObject = new X509EncodedKeySpec(a.a(a));
localObject = KeyFactory.getInstance("RSA").generatePublic((KeySpec)localObject);
Cipher localCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
localCipher.init(2, (Key)localObject);
paramString = new String(localCipher.doFinal(paramString), "utf-8");
return paramString;
}
catch (Exception paramString) {}
return "";
}
}
/* Location: D:\AndroidKiller_v1.3.1\projects\008\ProjectSrc\smali\
* Qualified Name: com.lishu.Map.c
* JD-Core Version: 0.7.0.1
*/
|
[
"3450559631@qq.com"
] |
3450559631@qq.com
|
3946899b7ad8016e8084dbc9783d0b44de0abdce
|
14bcaa62c13dd8b5c973a897a8ed148605b92d99
|
/src/main/java/com/cve/model/test/Assert.java
|
de2a476af8f992188dfa3e24344078d791bb2345
|
[] |
no_license
|
curtcox/dbbrowser
|
b42b981d67a7eb0cf823fecbfdeba6ee42895941
|
fa024675fd9d1d41617128c7163d24658a8d1c3c
|
refs/heads/master
| 2016-08-11T14:34:47.376657
| 2015-12-15T01:47:08
| 2015-12-15T01:47:08
| 47,861,079
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 746
|
java
|
package com.cve.model.test;
/**
* This wraps JUnit assertions, so our tests can be run under either JUnit, or
* our own framework.
* @author curt
*/
public final class Assert {
public static Assertion notNull(Object o) {
org.junit.Assert.assertNotNull(o);
return Assertion.ofNotNull(o);
}
public static Assertion equals(Object a, Object b) {
org.junit.Assert.assertEquals(a,b);
return Assertion.ofEquality(a,b);
}
public static Assertion that(boolean condition) {
org.junit.Assert.assertTrue(condition);
return Assertion.ofTruth(condition);
}
public static Assertion failure() {
org.junit.Assert.fail();
return Assertion.ofFailure();
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
fa2507b6deab27c05623177a2ac9a5e87cfe8264
|
607f143cf0563480bfd9262f6e620df011e335e7
|
/at.o2xfs.xfs/src/main/java/at/o2xfs/xfs/cim/CashInItemType.java
|
23f9c51a5fec6e309d6eddf85135d20c6243a0da
|
[
"BSD-2-Clause"
] |
permissive
|
AndreasFagschlunger/O2Xfs
|
eab359419782b86103e46f96c8cbb571d7bb3de2
|
913b85b706a5882b17a21f92d57ee4a63d25adad
|
refs/heads/develop
| 2023-07-28T04:18:06.647414
| 2021-01-11T20:32:35
| 2021-01-11T20:32:35
| 4,018,481
| 52
| 33
| null | 2023-07-17T03:13:52
| 2012-04-13T17:30:38
|
Java
|
UTF-8
|
Java
| false
| false
| 1,993
|
java
|
/*
* Copyright (c) 2017, Andreas Fagschlunger. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package at.o2xfs.xfs.cim;
import at.o2xfs.xfs.XfsConstant;
public enum CashInItemType implements XfsConstant {
/*
* @since v3.02
*/
ALL(0x0001),
/*
* @since v3.02
*/
UNFIT(0x0002),
/*
* @since v3.02
*/
INDIVIDUAL(0x0004),
/*
* @since v3.02
*/
LEVEL3(0x0008),
/*
* @since v3.02
*/
LEVEL2(0x0010),
/*
* @since v3.20
*/
IPM(0x0020);
private final long value;
private CashInItemType(final long value) {
this.value = value;
}
@Override
public long getValue() {
return value;
}
}
|
[
"github@fagschlunger.co.at"
] |
github@fagschlunger.co.at
|
1e5bc46af297bdf65b68c64548e29b81db8fc7d5
|
b7bc39c604f7b83a7d7f0d750240fe86d8df7a5c
|
/java-basic/src/main/java/ch10/Test06.java
|
d2b3de43b2e85c73c316f795093646e9a06fdbb2
|
[] |
no_license
|
ppappikko/bitcamp-java-2018-12
|
e79e023a00c579519ae67ba9f997b615fb539e5c
|
bd2a0b87c20a716d2b1e8cafc2a9cd54f683a37f
|
refs/heads/master
| 2021-08-06T17:31:37.187323
| 2019-07-19T04:55:07
| 2019-07-19T04:55:07
| 163,650,729
| 0
| 0
| null | 2020-04-30T16:14:59
| 2018-12-31T08:01:24
|
Java
|
UTF-8
|
Java
| false
| false
| 1,399
|
java
|
// 인스턴스 필드의 초기화 - 생성자를 통해 필드를 초기화 하기
package ch10;
class Monitor4 {
// 초기화 문장?
// 변수를 선언할 때 값을 설정하는 것을 초기화 문장이라 부른다.
//
int bright; // 밝기 (0% ~ 100%)
int contrast; // 명암 (0% ~ 100%)
int widthRes; // 해상도 너비
int heightRes; // 해상도 높이
Monitor4() { // 생성자 <= 파라미터를 받지 않는 생성자를 기본 생성자(default constructor)라 부른다.
this.bright = 50;
this.contrast = 50;
this.widthRes = 1920;
this.heightRes = 1080;
}
void display() {
System.out.println("------------------------------------");
System.out.printf("밝기(%d)\n", this.bright);
System.out.printf("명암(%d)\n", this.contrast);
System.out.printf("해상도(%d x %d)\n", this.widthRes, this.heightRes);
System.out.println("------------------------------------");
}
}
public class Test06 {
public static void main(String[] args) {
// 모니터 인스턴스 생성
Monitor4 m1 = new Monitor4();
// 인스턴스 필드의 값이 생성자를 통해 유효한 기본 값들로
// 미리 초기화 되었기 때문에 바로 사용할 수 있다.
m1.display();
// 물론 특정 속성의 값을 바꾼 후에 사용해도 된다.
m1.bright = 40;
m1.display();
}
}
|
[
"sanghyun.dev@gmail.com"
] |
sanghyun.dev@gmail.com
|
372f7c83a5437d10078ba7fa1aeeff435cea7172
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/playstore_apps/com_spotify_music/source/bgp.java
|
0756d34904922352de152e2db6f8591f47f4d582
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 162
|
java
|
public final class bgp
implements bgo
{
public bgp() {}
public final bgn a(bgl paramBgl, bgm paramBgm)
{
return new bgs(paramBgl, paramBgm);
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
913f3bc061fa8fbbc692842385d7739f07324970
|
bb6929a3365adeaf22dbc0c6590206a8ce608e7c
|
/Code/xsd/test/com/accela/adapter/model/function/AddNewDocumentResponse.java
|
e1559fc159024c9762e0d15a06260cdccc5dd16b
|
[] |
no_license
|
accela-robinson/CERS
|
a33c7a58ae90d82f430fcb9188a7a32951c47d81
|
58624383e0cb9db8d2d70bc6134edca585610eba
|
refs/heads/master
| 2020-04-02T12:23:34.108097
| 2015-04-10T05:34:02
| 2015-04-10T05:34:02
| 30,371,654
| 2
| 1
| null | 2015-04-08T07:01:04
| 2015-02-05T18:39:49
|
Java
|
UTF-8
|
Java
| false
| false
| 2,446
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.12.04 at 06:33:27 PM CST
//
package com.accela.adapter.model.function;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for addNewDocumentResponse complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="addNewDocumentResponse">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="system" type="{}system" minOccurs="0"/>
* <element name="transactionResults" type="{}transactionResults" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "addNewDocumentResponse", propOrder = {
"system",
"transactionResults"
})
public class AddNewDocumentResponse {
protected System system;
protected TransactionResults transactionResults;
/**
* Gets the value of the system property.
*
* @return
* possible object is
* {@link System }
*
*/
public System getSystem() {
return system;
}
/**
* Sets the value of the system property.
*
* @param value
* allowed object is
* {@link System }
*
*/
public void setSystem(System value) {
this.system = value;
}
/**
* Gets the value of the transactionResults property.
*
* @return
* possible object is
* {@link TransactionResults }
*
*/
public TransactionResults getTransactionResults() {
return transactionResults;
}
/**
* Sets the value of the transactionResults property.
*
* @param value
* allowed object is
* {@link TransactionResults }
*
*/
public void setTransactionResults(TransactionResults value) {
this.transactionResults = value;
}
}
|
[
"rleung@accela.com"
] |
rleung@accela.com
|
6cc1bdeed5eb70f2e9a38bef5286680ab24771ca
|
39b7e86a2b5a61a1f7befb47653f63f72e9e4092
|
/src/main/java/com/alipay/api/response/AlipayEbppOrderItemCancelResponse.java
|
20a9145b2928cd668fde760df76edf800f4afb60
|
[
"Apache-2.0"
] |
permissive
|
slin1972/alipay-sdk-java-all
|
dbec0604c2d0b76d8a1ebf3fd8b64d4dd5d21708
|
63095792e900bbcc0e974fc242d69231ec73689a
|
refs/heads/master
| 2020-08-12T14:18:07.203276
| 2019-10-13T09:00:11
| 2019-10-13T09:00:11
| 214,782,009
| 0
| 0
|
Apache-2.0
| 2019-10-13T07:56:34
| 2019-10-13T07:56:34
| null |
UTF-8
|
Java
| false
| false
| 369
|
java
|
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.ebpp.order.item.cancel response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayEbppOrderItemCancelResponse extends AlipayResponse {
private static final long serialVersionUID = 8644248257998888643L;
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
857af542c6ae77778d24a5a7e2f75d5f396d7c21
|
addbc404a75281f8ad0d42889ffe507b72a2471e
|
/Day20190621/src/kr/co/bit/JazzangMain.java
|
775956f60a6260c68bba267daed43c0914a844d3
|
[] |
no_license
|
yongje93/bitcamp
|
81df3b0d954e57752243ecc339ccb92447d71561
|
16f105c4cd6baa5b876291b2504338b6acfb2938
|
refs/heads/master
| 2020-06-07T17:57:26.427322
| 2019-10-05T12:27:31
| 2019-10-05T12:27:31
| 193,066,923
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 509
|
java
|
package kr.co.bit;
import java.util.Scanner;
public class JazzangMain {
public static void main(String[] args) {
JazzangProcess jp = new JazzangProcess(); //1
Scanner input = new Scanner(System.in); //2
do {
System.out.println("찾을 상품 이름: ");
String sangpumName = input.next(); //3
boolean searchResult = jp.sangpumProcess(sangpumName); //4
if(searchResult) break;
System.out.println("찾는 상품이 없습니다.");
} while(true);
}
}
|
[
"48149636+yongje93@users.noreply.github.com"
] |
48149636+yongje93@users.noreply.github.com
|
bb1c98d6bf0ecfe1685495945ec07461cc2b197b
|
8d2df76ffc704cde55a6018317277f0e1a2627ee
|
/src/main/java/mcjty/gearswap/blocks/GhostSlot.java
|
0bf1de8fb24dd04e991fd41dfbc49a555a064bef
|
[
"MIT"
] |
permissive
|
McJty/GearSwapper
|
5fa1837d985ada685e9e3682a1a9d0650877a7f2
|
6b0fdc2cbb058b45b3813f6bb22a43114724ca55
|
refs/heads/master
| 2021-01-21T04:31:24.213525
| 2015-12-09T17:40:34
| 2015-12-09T17:40:34
| 43,303,370
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,290
|
java
|
package mcjty.gearswap.blocks;
import baubles.api.BaubleType;
import baubles.api.IBauble;
import mcjty.gearswap.GearSwap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class GhostSlot extends Slot {
public static final int ANY = -1;
public static final int ARMOR_HELMET = 0;
public static final int ARMOR_CHESTPLATE = 1;
public static final int ARMOR_LEGGINGS = 2;
public static final int ARMOR_BOOTS = 3;
public static final int BAUBLE_RING = 4;
public static final int BAUBLE_AMULET = 5;
public static final int BAUBLE_BELT = 6;
private int type;
public GhostSlot(IInventory inventory, int index, int x, int y, int type) {
super(inventory, index, x, y);
this.type = type;
}
@Override
public boolean canTakeStack(EntityPlayer player) {
return false;
}
@Override
public ItemStack decrStackSize(int amount) {
return null;
}
@Override
public int getSlotStackLimit() {
return 0;
}
@Override
public boolean isItemValid(ItemStack stack) {
Item item = stack.getItem();
if (type >= ARMOR_HELMET && type <= ARMOR_BOOTS) {
return item != null && item.isValidArmor(stack, type, null);
} else if (GearSwap.baubles && type >= BAUBLE_RING && type <= BAUBLE_BELT) {
if (item == null) {
return false;
}
if (!(item instanceof IBauble)) {
return false;
}
IBauble bauble = (IBauble) item;
BaubleType baubleType = bauble.getBaubleType(stack);
return (baubleType == BaubleType.AMULET && type == BAUBLE_AMULET) ||
(baubleType == BaubleType.RING && type == BAUBLE_RING) ||
(baubleType == BaubleType.BELT && type == BAUBLE_BELT);
} else {
return true;
}
}
@Override
public void putStack(ItemStack stack) {
// if (stack != null) {
// stack.stackSize = 1;
// }
inventory.setInventorySlotContents(getSlotIndex(), stack);
onSlotChanged();
}
}
|
[
"mcjty1@gmail.com"
] |
mcjty1@gmail.com
|
f728054f669212aa9f3b08484b0d815dfe16a375
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_5972.java
|
ccaeb971b3bfacb972b237493a55035664a593e0
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 354
|
java
|
/**
* Resets this stream and uses the given output stream for writing. This stream must be closed before resetting.
* @param out New output stream to be used for writing.
* @throws IllegalStateException If the stream isn't closed.
*/
public void reset(OutputStream out){
Assertions.checkState(closed);
this.out=out;
count=0;
closed=false;
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
b51765e9203daecb5b4f1b80fa13a910a21f9a1e
|
9e20645e45cc51e94c345108b7b8a2dd5d33193e
|
/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/skills/effects/EffectTargetMe.java
|
15b08eaed2023707527293b71c8b0df404ab0045
|
[] |
no_license
|
Enryu99/L2jMobius-01-11
|
2da23f1c04dcf6e88b770f6dcbd25a80d9162461
|
4683916852a03573b2fe590842f6cac4cc8177b8
|
refs/heads/master
| 2023-09-01T22:09:52.702058
| 2021-11-02T17:37:29
| 2021-11-02T17:37:29
| 423,405,362
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,116
|
java
|
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.l2jmobius.gameserver.model.skills.effects;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.model.Effect;
import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.instance.SiegeSummonInstance;
import org.l2jmobius.gameserver.model.skills.Env;
import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
/**
* @author eX1steam
*/
public class EffectTargetMe extends Effect
{
public EffectTargetMe(Env env, EffectTemplate template)
{
super(env, template);
}
@Override
public EffectType getEffectType()
{
return EffectType.TARGET_ME;
}
@Override
public void onStart()
{
if (getEffected() instanceof Playable)
{
if (getEffected() instanceof SiegeSummonInstance)
{
return;
}
if (getEffected().getTarget() != getEffector())
{
// Target is different - stop autoattack and break cast
getEffected().setTarget(getEffector());
getEffected().sendPacket(new MyTargetSelected(getEffector().getObjectId(), 0));
getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
}
getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, getEffector());
}
}
@Override
public void onExit()
{
}
@Override
public boolean onActionTime()
{
return false;
}
}
|
[
"MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b"
] |
MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b
|
e248a970d60a1b9aba64c432d87a7a110b4ddb66
|
b2f07f3e27b2162b5ee6896814f96c59c2c17405
|
/com/sun/xml/internal/ws/policy/ComplexAssertion.java
|
b2bc136d40fe45ecf90641bf3d68ab9c17149a7b
|
[] |
no_license
|
weiju-xi/RT-JAR-CODE
|
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
|
d5b2590518ffb83596a3aa3849249cf871ab6d4e
|
refs/heads/master
| 2021-09-08T02:36:06.675911
| 2018-03-06T05:27:49
| 2018-03-06T05:27:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,349
|
java
|
/* */ package com.sun.xml.internal.ws.policy;
/* */
/* */ import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
/* */ import java.util.Collection;
/* */
/* */ public abstract class ComplexAssertion extends PolicyAssertion
/* */ {
/* */ private final NestedPolicy nestedPolicy;
/* */
/* */ protected ComplexAssertion()
/* */ {
/* 44 */ this.nestedPolicy = NestedPolicy.createNestedPolicy(AssertionSet.emptyAssertionSet());
/* */ }
/* */
/* */ protected ComplexAssertion(AssertionData data, Collection<? extends PolicyAssertion> assertionParameters, AssertionSet nestedAlternative) {
/* 48 */ super(data, assertionParameters);
/* */
/* 50 */ AssertionSet nestedSet = nestedAlternative != null ? nestedAlternative : AssertionSet.emptyAssertionSet();
/* 51 */ this.nestedPolicy = NestedPolicy.createNestedPolicy(nestedSet);
/* */ }
/* */
/* */ public final boolean hasNestedPolicy()
/* */ {
/* 56 */ return true;
/* */ }
/* */
/* */ public final NestedPolicy getNestedPolicy()
/* */ {
/* 61 */ return this.nestedPolicy;
/* */ }
/* */ }
/* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar
* Qualified Name: com.sun.xml.internal.ws.policy.ComplexAssertion
* JD-Core Version: 0.6.2
*/
|
[
"yuexiahandao@gmail.com"
] |
yuexiahandao@gmail.com
|
e61dceec39a43f15fdf4d4d766f95ba57c0dbde7
|
8e5e2cfb1dcfb746b8d4feae18389f3dded9b4a4
|
/AccesoDatos/Tema1Repaso/src/Ejercicio4/Metodos.java
|
9b16bc7732a551102a38eabc92a506b2585e2a3c
|
[] |
no_license
|
alvarogomezmu/dam
|
739e8a75762f807e24806891ce30cd1ef8487867
|
ebfd55a43f4f3117b7ece35e698f75115b45ed39
|
refs/heads/master
| 2020-04-06T06:58:40.387939
| 2016-06-01T11:52:07
| 2016-06-01T11:52:07
| 42,882,043
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,468
|
java
|
package Ejercicio4;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Iterator;
/**
*
* @author Daniel Marcos Lorrio
*/
public class Metodos {
public static void escribirMenu() {
System.out.print("1) Volcado de ArrayList\n2) Mostrar el numero de la posicion 3\n3) Salir\nTu opcion: ");
}
public static int preguntarOpcion() throws IOException {
BufferedReader teclado = new BufferedReader(new InputStreamReader(System.in));
int opcion = Integer.parseInt(teclado.readLine());
return opcion;
}
public static ArrayList<String> arrayPar() {
ArrayList<String> ar = new ArrayList<String>();
int parActual = 1;
String par;
for (int i = 0; i < 100; i++) {
while (!(parActual % 2 == 0)) {
parActual++;
}
ar.add(Integer.toString(parActual));
parActual++;
}
return ar;
}
public static String preguntarFichero() throws IOException {
System.out.print("Elije el nombre del fichero: ");
BufferedReader teclado = new BufferedReader(new InputStreamReader(System.in));
String fichero = teclado.readLine();
return fichero;
}
public static void escribirArrayPares(ArrayList<String> ar, String fichero) throws IOException {
Iterator it = ar.iterator();
BufferedWriter escribir = new BufferedWriter(new FileWriter("C:\\Users\\Alumnot\\Documents\\" + fichero + ".txt"));
// Recorremos la coleccion e imprimimos todos los valores
while (it.hasNext()) {
escribir.write((String) it.next());
escribir.newLine();
}
escribir.close();
}
public static void mostrarTerceraPosicion(String fichero) throws IOException, FileNotFoundException {
BufferedReader file = new BufferedReader(new FileReader("C:\\Users\\Alumnot\\Documents\\" + fichero + ".txt"));
String linea = null;
int contador = 0;
while ((linea = file.readLine()) != null) {
if (contador == 3) {
System.out.println("La tercera posicion es " + linea);
break;
} else {
contador++;
}
}
}
}
|
[
"alvarog.m@hotmail.com"
] |
alvarog.m@hotmail.com
|
56a9ad95081ced42c963d6d100ca58306c41814b
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/com/hazelcast/map/MapRemoveAllTest.java
|
f2acfccd24848f20a2d2cb09f4084ee90d1a9ea2
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 4,369
|
java
|
/**
* Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hazelcast.map;
import TruePredicate.INSTANCE;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IMap;
import com.hazelcast.monitor.LocalMapStats;
import com.hazelcast.query.Predicate;
import com.hazelcast.query.SqlPredicate;
import com.hazelcast.test.HazelcastParallelClassRunner;
import com.hazelcast.test.HazelcastTestSupport;
import com.hazelcast.test.annotation.ParallelTest;
import com.hazelcast.test.annotation.QuickTest;
import java.util.Map;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
@RunWith(HazelcastParallelClassRunner.class)
@Category({ QuickTest.class, ParallelTest.class })
public class MapRemoveAllTest extends HazelcastTestSupport {
@Rule
public ExpectedException expectedException = ExpectedException.none();
private static final int MAP_SIZE = 1000;
private static final int NODE_COUNT = 3;
private HazelcastInstance member;
private HazelcastInstance[] instances;
@Test
public void throws_exception_whenPredicateNull() throws Exception {
expectedException.expect(NullPointerException.class);
expectedException.expectMessage("predicate cannot be null");
IMap<Integer, Integer> map = member.getMap("test");
map.removeAll(null);
}
@Test
public void removes_all_entries_whenPredicateTrue() throws Exception {
IMap<Integer, Integer> map = member.getMap("test");
for (int i = 0; i < (MapRemoveAllTest.MAP_SIZE); i++) {
map.put(i, i);
}
map.removeAll(INSTANCE);
Assert.assertEquals(0, map.size());
}
@Test
public void removes_no_entries_whenPredicateFalse() throws Exception {
IMap<Integer, Integer> map = member.getMap("test");
for (int i = 0; i < (MapRemoveAllTest.MAP_SIZE); i++) {
map.put(i, i);
}
map.removeAll(FalsePredicate.INSTANCE);
Assert.assertEquals(MapRemoveAllTest.MAP_SIZE, map.size());
}
@Test
public void removes_odd_keys_whenPredicateOdd() throws Exception {
IMap<Integer, Integer> map = member.getMap("test");
for (int i = 0; i < (MapRemoveAllTest.MAP_SIZE); i++) {
map.put(i, i);
}
map.removeAll(new MapRemoveAllTest.OddFinderPredicate());
Assert.assertEquals(500, map.size());
}
@Test
public void removes_same_number_of_entries_from_owner_and_backup() {
String mapName = "test";
IMap<Integer, Integer> map = member.getMap(mapName);
for (int i = 0; i < 1000; i++) {
map.put(i, i);
}
map.removeAll(new SqlPredicate("__key >= 100"));
HazelcastTestSupport.waitAllForSafeState(instances);
long totalOwnedEntryCount = 0;
for (HazelcastInstance instance : instances) {
LocalMapStats localMapStats = instance.getMap(mapName).getLocalMapStats();
totalOwnedEntryCount += localMapStats.getOwnedEntryCount();
}
long totalBackupEntryCount = 0;
for (HazelcastInstance instance : instances) {
LocalMapStats localMapStats = instance.getMap(mapName).getLocalMapStats();
totalBackupEntryCount += localMapStats.getBackupEntryCount();
}
Assert.assertEquals(100, totalOwnedEntryCount);
Assert.assertEquals(100, totalBackupEntryCount);
}
private static final class OddFinderPredicate implements Predicate<Integer, Integer> {
@Override
public boolean apply(Map.Entry<Integer, Integer> mapEntry) {
return ((mapEntry.getKey()) % 2) != 0;
}
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
5fcb7f9fcce8b716fd3507789b3ece5ca7b5ab25
|
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
|
/BASE/tags/M_SCT2_05/org.eclipselabs.mscript/plugins/org.eclipselabs.mscript.typesystem/src/org/eclipselabs/mscript/typesystem/ArrayDimension.java
|
849db36b4bdbbc116f69d722413c2f745eef3b6c
|
[] |
no_license
|
huybuidac20593/yakindu
|
377fb9100d7db6f4bb33a3caa78776c4a4b03773
|
304fb02b9c166f340f521f5e4c41d970268f28e9
|
refs/heads/master
| 2021-05-29T14:46:43.225721
| 2015-05-28T11:54:07
| 2015-05-28T11:54:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,529
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.mscript.typesystem;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Array Dimension Specification</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipselabs.mscript.typesystem.ArrayDimension#getSize <em>Size</em>}</li>
* </ul>
* </p>
*
* @see org.eclipselabs.mscript.typesystem.TypeSystemPackage#getArrayDimension()
* @model
* @generated
*/
public interface ArrayDimension extends EObject {
/**
* Returns the value of the '<em><b>Size</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Size</em>' containment reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Size</em>' containment reference.
* @see #setSize(Expression)
* @see org.eclipselabs.mscript.typesystem.TypeSystemPackage#getArrayDimension_Size()
* @model containment="true"
* @generated
*/
Expression getSize();
/**
* Sets the value of the '{@link org.eclipselabs.mscript.typesystem.ArrayDimension#getSize <em>Size</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Size</em>' containment reference.
* @see #getSize()
* @generated
*/
void setSize(Expression value);
} // ArrayDimensionSpecification
|
[
"terfloth@itemis.de"
] |
terfloth@itemis.de
|
5856a156e8bb12690b0160b559a0b69ed92698d6
|
7fa49925ed7c8517c65d9f9543621d08309bc2cf
|
/sources\kotlin\jvm\internal\markers\KMutableSet.java
|
340e85002fbf7a023c887508e56cf521cab0df3a
|
[] |
no_license
|
abtt-decompiled/abtracetogether_1.0.0.apk_disassembled
|
c8717a47f384fb7e8da076e48abe1e4ef8500837
|
d81b0ee1490911104ab36056d220be7fe3a19e1c
|
refs/heads/master
| 2022-06-24T02:51:29.783727
| 2020-05-08T21:05:20
| 2020-05-08T21:05:20
| 262,426,826
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 445
|
java
|
package kotlin.jvm.internal.markers;
import kotlin.Metadata;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\bf\u0018\u00002\u00020\u0001¨\u0006\u0002"}, d2 = {"Lkotlin/jvm/internal/markers/KMutableSet;", "Lkotlin/jvm/internal/markers/KMutableCollection;", "kotlin-stdlib"}, k = 1, mv = {1, 1, 15})
/* compiled from: KMarkers.kt */
public interface KMutableSet extends KMutableCollection {
}
|
[
"patrick.f.king+abtt@gmail.com"
] |
patrick.f.king+abtt@gmail.com
|
109001d866e5dfd389d7e001ab3b96b151744fc5
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12798-35-20-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/sheet/internal/SheetDocumentDisplayer_ESTest.java
|
65a5d116aa91bdd04d2fa751f0ac8a5d688a4e8b
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 575
|
java
|
/*
* This file was automatically generated by EvoSuite
* Mon Apr 06 20:36:19 UTC 2020
*/
package org.xwiki.sheet.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class SheetDocumentDisplayer_ESTest extends SheetDocumentDisplayer_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
1b3fe94a85bb32b3c1ef0ca1ada96dea24fd8698
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/28/28_27ec7464b23458ba4d987ca991c885b755aa7c1a/UtilityStep/28_27ec7464b23458ba4d987ca991c885b755aa7c1a_UtilityStep_s.java
|
af9f7bea852dd8dc317f7c522b7654a1934cbcee
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,940
|
java
|
/*===========================================================================
Copyright (C) 2008 by the Okapi Framework contributors
-----------------------------------------------------------------------------
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
See also the full LGPL text here: http://www.gnu.org/copyleft/lesser.html
============================================================================*/
package net.sf.okapi.applications.rainbow.utilities;
import net.sf.okapi.common.filters.FilterEvent;
import net.sf.okapi.common.pipeline.BasePipelineStep;
public class UtilityStep extends BasePipelineStep {
private IFilterDrivenUtility utility;
public UtilityStep (IFilterDrivenUtility utility) {
this.utility = utility;
}
public FilterEvent handleEvent (FilterEvent event) {
utility.handleEvent(event);
return event;
}
public void cancel () {
// Cancel needed here
}
public String getName () {
return utility.getName();
}
public void pause () {
}
public void postprocess () {
utility.postprocess();
}
public void preprocess () {
utility.preprocess();
}
public void resume() {
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
8778885bb3f20dc4c79948475ece570a2ed74c61
|
f9817d637c17d5e6a71f154b9ad9e90f2d63ad91
|
/374GuessNumberHigherOrLower.java
|
a04f6772d478c6bf1bc0bc023a13a3178479f377
|
[] |
no_license
|
samuelyo/Leetcode
|
b5710612013da8c939f659222d9ed340ae480285
|
19533a8d5fadce65a0d225c2309eaf2381fdc482
|
refs/heads/master
| 2021-01-19T10:31:46.544133
| 2019-12-23T15:58:19
| 2019-12-23T15:58:19
| 87,869,193
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 706
|
java
|
package com.leetcode.GuessNumberHigherOrLower;
public class GuessNumberHigherOrLower {
public static void main(String[] args) {
}
public static int guess(int num){
return -1;
}
/* The guess API is defined in the parent class GuessGame.
@param num, your guess
@return -1 if my number is lower, 1 if my number is higher, otherwise return 0
int guess(int num); */
public static int guessNumber(int n) {
int left = 0;
int right = n;
while(left <= right){
int middle = left + (right - left)/2;
if(guess(middle) == 0){
return middle;
}
if(guess(middle) == 1){
left = middle + 1;
}else{
right = middle - 1;
}
}
return right;
}
}
|
[
"1120780416@qq.com"
] |
1120780416@qq.com
|
ffca07d2082a0b234f49e998a9e4e6b36e2011a4
|
66e2f35b7b56865552616cf400e3a8f5928d12a2
|
/src/main/java/com/alipay/api/response/AlipayUserInvitetaskExchangeConfirmResponse.java
|
53e03bd4b92e3dadd5a321ac0fe7be976cbb8a9f
|
[
"Apache-2.0"
] |
permissive
|
xiafaqi/alipay-sdk-java-all
|
18dc797400847c7ae9901566e910527f5495e497
|
606cdb8014faa3e9125de7f50cbb81b2db6ee6cc
|
refs/heads/master
| 2022-11-25T08:43:11.997961
| 2020-07-23T02:58:22
| 2020-07-23T02:58:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 796
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.user.invitetask.exchange.confirm response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayUserInvitetaskExchangeConfirmResponse extends AlipayResponse {
private static final long serialVersionUID = 6428662366797327225L;
/**
* true-确认成功,可以进行下一步的代扣、发货
false-确认失败,不要进行下一步代扣
*/
@ApiField("confirm_result")
private Boolean confirmResult;
public void setConfirmResult(Boolean confirmResult) {
this.confirmResult = confirmResult;
}
public Boolean getConfirmResult( ) {
return this.confirmResult;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
8df0e03471ecd0a74fa7d612524ce26e7a25d4da
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/neo4j/learning/5468/LogPruningImpl.java
|
7ac2c82f382c6e0aadccf2ea6d8f6fd6d16cd659
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,076
|
java
|
/*
* Copyright (c) 2002-2018 "Neo4j,"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.impl.transaction.log.pruning;
import java.io.File;
import java.time.Clock;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.function.LongConsumer;
import org.neo4j.graphdb.factory.GraphDatabaseSettings;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.impl.transaction.log.files.LogFiles;
import org.neo4j.logging.Log;
import org.neo4j.logging.LogProvider;
/**
* This class listens for rotations and does log pruning.
*/
public class LogPruningImpl implements LogPruning
{
private final Lock pruneLock = new ReentrantLock();
private final FileSystemAbstraction fs;
private final LogFiles logFiles;
private final Log msgLog;
private final LogPruneStrategyFactory strategyFactory;
private final Clock clock;
private volatile LogPruneStrategy pruneStrategy;
public LogPruningImpl( FileSystemAbstraction fs,
LogFiles logFiles,
LogProvider logProvider,
LogPruneStrategyFactory strategyFactory,
Clock clock,
Config config )
{
this.fs = fs;
this.logFiles = logFiles;
this.msgLog = logProvider.getLog( getClass() ); this.strategyFactory = strategyFactory;
this.clock = clock;
this.pruneStrategy = strategyFactory.strategyFromConfigValue( fs, logFiles, clock, config.get( GraphDatabaseSettings.keep_logical_logs ) );
// Register listener for updates
config.registerDynamicUpdateListener( GraphDatabaseSettings.keep_logical_logs,
( prev, update ) -> updateConfiguration( update ) );
}
private static class CountingDeleter implements LongConsumer
{
private static final int NO_VERSION = -1;
private final LogFiles logFiles;
private final FileSystemAbstraction fs;
private final long upToVersion;
private long fromVersion;
private long toVersion;
private CountingDeleter( LogFiles logFiles, FileSystemAbstraction fs, long upToVersion )
{
this.logFiles = logFiles;
this.fs = fs;
this.upToVersion = upToVersion;
fromVersion = NO_VERSION;
toVersion = NO_VERSION;
}
@Override
public void accept( long version )
{
fromVersion = fromVersion == NO_VERSION ? version : Math.min( fromVersion, version );
toVersion = toVersion == NO_VERSION ? version : Math.max( toVersion, version );
File logFile = logFiles.getLogFileForVersion( version );
fs.deleteFile( logFile );
}
public String describeResult()
{
if ( fromVersion == NO_VERSION )
{
return "No log version pruned, last checkpoint was made in version " + upToVersion;
}
else
{
return "Pruned log versions " + fromVersion + "-" + toVersion +
", last checkpoint was made in version " + upToVersion;
}
}
}
private void updateConfiguration( String pruningConf )
{
this.pruneStrategy = strategyFactory.strategyFromConfigValue( fs, logFiles, clock, pruningConf );
msgLog.info( "Retention policy updated, value will take effect during the next evaluation." );
}
@Override
public void pruneLogs( long upToVersion )
{
// Only one is allowed to do pruning at any given time,
// and it's OK to skip pruning if another one is doing so right now.
if ( pruneLock.tryLock() )
{
try
{
CountingDeleter deleter = new CountingDeleter( logFiles, fs, upToVersion );
pruneStrategy.findLogVersionsToDelete( upToVersion ).forEachOrdered( deleter );
msgLog.info( deleter.describeResult() );
}
finally
{
pruneLock.unlock();
}
}
}
@Override
public boolean mightHaveLogsToPrune()
{
return pruneStrategy.findLogVersionsToDelete( logFiles.getHighestLogVersion() ).count() > 0;
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
e30b8197920e6ae5f636dd26fe6fe87fa060dbd2
|
7807b8ebb4e9314156603c902eac3a8813ca5df4
|
/src/com/javarush/test/level10/lesson11/home08/Solution.java
|
90424badc81216876e189c8bb2d37c248f4b1e82
|
[] |
no_license
|
sabonv/JavaRushHomeWork
|
f993275ca1346f466dc14ef2a8f657847d7d60c8
|
20f585eb210f9fe9937fbdc12413c20e9ed68013
|
refs/heads/master
| 2021-01-16T21:37:08.785290
| 2016-10-25T08:06:32
| 2016-10-25T08:06:32
| 63,629,492
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,228
|
java
|
package com.javarush.test.level10.lesson11.home08;
import java.util.ArrayList;
/* Массив списков строк
Создать массив, элементами которого будут списки строк. Заполнить массив любыми данными и вывести их на экран.
*/
public class Solution
{
public static void main(String[] args)
{
ArrayList<String>[] arrayOfStringList = createList();
printList(arrayOfStringList);
}
public static ArrayList<String>[] createList()
{
//напишите тут ваш код
ArrayList<String>[] tempE = new ArrayList[2];
for (int i = 0; i < 2; i++)
{
ArrayList<String> tempI = new ArrayList<String>();
for (int j = 0; j < 2; j++)
{
tempI.add("name"+i+" "+j);
}
tempE[i] = tempI;
}
return tempE;
}
public static void printList(ArrayList<String>[] arrayOfStringList)
{
for (ArrayList<String> list: arrayOfStringList)
{
for (String s : list)
{
System.out.println(s);
}
}
}
}
|
[
"znakomiymne@list.ru"
] |
znakomiymne@list.ru
|
5a9cca89821ab7638e0ada1f5029a57e0df7ffc0
|
f2e744082c66f270d606bfc19d25ecb2510e337c
|
/sources/androidx/leanback/widget/GuidanceStylist.java
|
7d77cc8fcffe1fc86680833fbc1f70d187a44bfe
|
[] |
no_license
|
AshutoshSundresh/OnePlusSettings-Java
|
365c49e178612048451d78ec11474065d44280fa
|
8015f4badc24494c3931ea99fb834bc2b264919f
|
refs/heads/master
| 2023-01-22T12:57:16.272894
| 2020-11-21T16:30:18
| 2020-11-21T16:30:18
| 314,854,903
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,872
|
java
|
package androidx.leanback.widget;
import android.animation.Animator;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.leanback.R$id;
import androidx.leanback.R$layout;
import java.util.List;
public class GuidanceStylist {
private TextView mBreadcrumbView;
private TextView mDescriptionView;
private View mGuidanceContainer;
private ImageView mIconView;
private TextView mTitleView;
public void onImeAppearing(List<Animator> list) {
}
public void onImeDisappearing(List<Animator> list) {
}
public static class Guidance {
private final String mBreadcrumb;
private final String mDescription;
private final Drawable mIconDrawable;
private final String mTitle;
public Guidance(String str, String str2, String str3, Drawable drawable) {
this.mBreadcrumb = str3;
this.mTitle = str;
this.mDescription = str2;
this.mIconDrawable = drawable;
}
public String getTitle() {
return this.mTitle;
}
public String getDescription() {
return this.mDescription;
}
public String getBreadcrumb() {
return this.mBreadcrumb;
}
public Drawable getIconDrawable() {
return this.mIconDrawable;
}
}
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Guidance guidance) {
View inflate = layoutInflater.inflate(onProvideLayoutId(), viewGroup, false);
this.mTitleView = (TextView) inflate.findViewById(R$id.guidance_title);
this.mBreadcrumbView = (TextView) inflate.findViewById(R$id.guidance_breadcrumb);
this.mDescriptionView = (TextView) inflate.findViewById(R$id.guidance_description);
this.mIconView = (ImageView) inflate.findViewById(R$id.guidance_icon);
this.mGuidanceContainer = inflate.findViewById(R$id.guidance_container);
TextView textView = this.mTitleView;
if (textView != null) {
textView.setText(guidance.getTitle());
}
TextView textView2 = this.mBreadcrumbView;
if (textView2 != null) {
textView2.setText(guidance.getBreadcrumb());
}
TextView textView3 = this.mDescriptionView;
if (textView3 != null) {
textView3.setText(guidance.getDescription());
}
if (this.mIconView != null) {
if (guidance.getIconDrawable() != null) {
this.mIconView.setImageDrawable(guidance.getIconDrawable());
} else {
this.mIconView.setVisibility(8);
}
}
View view = this.mGuidanceContainer;
if (view != null && TextUtils.isEmpty(view.getContentDescription())) {
StringBuilder sb = new StringBuilder();
if (!TextUtils.isEmpty(guidance.getBreadcrumb())) {
sb.append(guidance.getBreadcrumb());
sb.append('\n');
}
if (!TextUtils.isEmpty(guidance.getTitle())) {
sb.append(guidance.getTitle());
sb.append('\n');
}
if (!TextUtils.isEmpty(guidance.getDescription())) {
sb.append(guidance.getDescription());
sb.append('\n');
}
this.mGuidanceContainer.setContentDescription(sb);
}
return inflate;
}
public void onDestroyView() {
this.mBreadcrumbView = null;
this.mDescriptionView = null;
this.mIconView = null;
this.mTitleView = null;
}
public int onProvideLayoutId() {
return R$layout.lb_guidance;
}
}
|
[
"ashutoshsundresh@gmail.com"
] |
ashutoshsundresh@gmail.com
|
88d2ffed263814aed45a9dfe1525c011c0de774c
|
aa623c778fd88082cf59f442ad3cb671253ffc37
|
/src/main/java/com/tencentcloudapi/mps/v20190612/models/AiReviewTaskPoliticalAsrResult.java
|
dfb7233e5e03f62ef03a54fe9ec2fdaf95d270b8
|
[
"Apache-2.0"
] |
permissive
|
zjm9109/tencentcloud-sdk-java
|
1eac89cedd70c8111c300d050f2c2f2ab1839189
|
a31d2d50f75dc740457289db0bf93ed8b3994c73
|
refs/heads/master
| 2020-09-30T10:32:57.836303
| 2019-12-05T14:18:17
| 2019-12-05T14:18:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,631
|
java
|
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.mps.v20190612.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class AiReviewTaskPoliticalAsrResult extends AbstractModel{
/**
* 任务状态,有 PROCESSING,SUCCESS 和 FAIL 三种。
*/
@SerializedName("Status")
@Expose
private String Status;
/**
* 错误码,0:成功,其他值:失败。
*/
@SerializedName("ErrCode")
@Expose
private Long ErrCode;
/**
* 错误信息。
*/
@SerializedName("Message")
@Expose
private String Message;
/**
* 内容审核 Asr 文字鉴政任务输入。
*/
@SerializedName("Input")
@Expose
private AiReviewPoliticalAsrTaskInput Input;
/**
* 内容审核 Asr 文字鉴政任务输出。
注意:此字段可能返回 null,表示取不到有效值。
*/
@SerializedName("Output")
@Expose
private AiReviewPoliticalAsrTaskOutput Output;
/**
* 获取任务状态,有 PROCESSING,SUCCESS 和 FAIL 三种。
* @return Status 任务状态,有 PROCESSING,SUCCESS 和 FAIL 三种。
*/
public String getStatus() {
return this.Status;
}
/**
* 设置任务状态,有 PROCESSING,SUCCESS 和 FAIL 三种。
* @param Status 任务状态,有 PROCESSING,SUCCESS 和 FAIL 三种。
*/
public void setStatus(String Status) {
this.Status = Status;
}
/**
* 获取错误码,0:成功,其他值:失败。
* @return ErrCode 错误码,0:成功,其他值:失败。
*/
public Long getErrCode() {
return this.ErrCode;
}
/**
* 设置错误码,0:成功,其他值:失败。
* @param ErrCode 错误码,0:成功,其他值:失败。
*/
public void setErrCode(Long ErrCode) {
this.ErrCode = ErrCode;
}
/**
* 获取错误信息。
* @return Message 错误信息。
*/
public String getMessage() {
return this.Message;
}
/**
* 设置错误信息。
* @param Message 错误信息。
*/
public void setMessage(String Message) {
this.Message = Message;
}
/**
* 获取内容审核 Asr 文字鉴政任务输入。
* @return Input 内容审核 Asr 文字鉴政任务输入。
*/
public AiReviewPoliticalAsrTaskInput getInput() {
return this.Input;
}
/**
* 设置内容审核 Asr 文字鉴政任务输入。
* @param Input 内容审核 Asr 文字鉴政任务输入。
*/
public void setInput(AiReviewPoliticalAsrTaskInput Input) {
this.Input = Input;
}
/**
* 获取内容审核 Asr 文字鉴政任务输出。
注意:此字段可能返回 null,表示取不到有效值。
* @return Output 内容审核 Asr 文字鉴政任务输出。
注意:此字段可能返回 null,表示取不到有效值。
*/
public AiReviewPoliticalAsrTaskOutput getOutput() {
return this.Output;
}
/**
* 设置内容审核 Asr 文字鉴政任务输出。
注意:此字段可能返回 null,表示取不到有效值。
* @param Output 内容审核 Asr 文字鉴政任务输出。
注意:此字段可能返回 null,表示取不到有效值。
*/
public void setOutput(AiReviewPoliticalAsrTaskOutput Output) {
this.Output = Output;
}
/**
* 内部实现,用户禁止调用
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "Status", this.Status);
this.setParamSimple(map, prefix + "ErrCode", this.ErrCode);
this.setParamSimple(map, prefix + "Message", this.Message);
this.setParamObj(map, prefix + "Input.", this.Input);
this.setParamObj(map, prefix + "Output.", this.Output);
}
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
36a2255c42bce662f721588ee6802d96b9c714dd
|
b193b3cba80048d58d3c404ebaef26fd123f7afd
|
/spring-boot-base/spring-boot-mapstruct/src/main/java/com/mapstruct/mapping/StudentMappingMethod.java
|
8072dadaf9e20827b9ec6a24f2f09a01e1734b18
|
[] |
no_license
|
q258523454/spring-boot-test
|
7c33aeb892586c3cdab2dc6de9aba5b211e129d0
|
9a899e2bf3e3b2306e122af23ac8a2ee7242b774
|
refs/heads/master
| 2023-06-29T20:27:35.043110
| 2022-10-19T08:22:49
| 2022-10-19T08:22:49
| 171,869,319
| 0
| 0
| null | 2023-06-14T22:45:44
| 2019-02-21T12:38:59
|
Java
|
UTF-8
|
Java
| false
| false
| 254
|
java
|
package com.mapstruct.mapping;
/**
* @Description
* @date 2020-03-16 9:28
* @modify
*/
public class StudentMappingMethod {
public String strToString(String name) {
System.out.println("nameToName");
return name + ":self";
}
}
|
[
"258523454@qq.com"
] |
258523454@qq.com
|
a11f507bd79c0ae659e939b00825eb3b88536435
|
319a371ab83c04a9a2466b0ec1e2a67b93fa7f2f
|
/zj-chongqi-salary/src/main/java/com/apih5/mybatis/dao/ZjXmCqjxProjectSecretaryrAssistantDetailedMapper.java
|
f4d96e695cd9dab86b9a534d6f5bda40ad8aaac5
|
[] |
no_license
|
zhangrenyi666/apih5-2
|
0232faa65e2968551d55db47fb35f689e5a03996
|
afd9b7d574fab11410aab5e0465a0bd706bcf942
|
refs/heads/master
| 2023-08-01T13:11:51.678508
| 2021-09-10T05:52:34
| 2021-09-10T05:52:34
| 406,647,352
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,245
|
java
|
package com.apih5.mybatis.dao;
import java.util.List;
import com.apih5.mybatis.pojo.ZjXmCqjxAssistantReportBean;
import com.apih5.mybatis.pojo.ZjXmCqjxDeptLeaderAssistantDetailed;
import com.apih5.mybatis.pojo.ZjXmCqjxProjectSecretaryrAssistantDetailed;
public interface ZjXmCqjxProjectSecretaryrAssistantDetailedMapper {
int deleteByPrimaryKey(String key);
int insert(ZjXmCqjxProjectSecretaryrAssistantDetailed record);
int insertSelective(ZjXmCqjxProjectSecretaryrAssistantDetailed record);
ZjXmCqjxProjectSecretaryrAssistantDetailed selectByPrimaryKey(String key);
int updateByPrimaryKeySelective(ZjXmCqjxProjectSecretaryrAssistantDetailed record);
int updateByPrimaryKey(ZjXmCqjxProjectSecretaryrAssistantDetailed record);
List<ZjXmCqjxProjectSecretaryrAssistantDetailed> selectByZjXmCqjxProjectSecretaryrAssistantDetailedList(ZjXmCqjxProjectSecretaryrAssistantDetailed record);
int batchDeleteUpdateZjXmCqjxProjectSecretaryrAssistantDetailed(List<ZjXmCqjxProjectSecretaryrAssistantDetailed> recordList, ZjXmCqjxProjectSecretaryrAssistantDetailed record);
List<ZjXmCqjxAssistantReportBean> selectZjXmCqjxDeptLeaderDetailedRportListByQuarter(ZjXmCqjxDeptLeaderAssistantDetailed record);
}
|
[
"2267843676@qq.com"
] |
2267843676@qq.com
|
eca73c4b86512a77b5b1e013aeb5918061138645
|
863acb02a064a0fc66811688a67ce3511f1b81af
|
/sources/com/fasterxml/jackson/core/JsonStreamContext.java
|
69de85934f6dee2f98cc2105612d1366b1cd6866
|
[
"MIT"
] |
permissive
|
Game-Designing/Custom-Football-Game
|
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
|
47283462b2066ad5c53b3c901182e7ae62a34fc8
|
refs/heads/master
| 2020-08-04T00:02:04.876780
| 2019-10-06T06:55:08
| 2019-10-06T06:55:08
| 211,914,568
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,085
|
java
|
package com.fasterxml.jackson.core;
import com.fasterxml.jackson.core.p134io.CharTypes;
public abstract class JsonStreamContext {
protected int _index;
protected int _type;
public abstract String getCurrentName();
public abstract Object getCurrentValue();
public abstract JsonStreamContext getParent();
public abstract void setCurrentValue(Object obj);
protected JsonStreamContext() {
}
protected JsonStreamContext(JsonStreamContext base) {
this._type = base._type;
this._index = base._index;
}
protected JsonStreamContext(int type, int index) {
this._type = type;
this._index = index;
}
public final boolean inArray() {
return this._type == 1;
}
public final boolean inRoot() {
return this._type == 0;
}
public final boolean inObject() {
return this._type == 2;
}
public String typeDesc() {
int i = this._type;
if (i == 0) {
return "root";
}
if (i == 1) {
return "Array";
}
if (i != 2) {
return "?";
}
return "Object";
}
public final int getEntryCount() {
return this._index + 1;
}
public final int getCurrentIndex() {
int i = this._index;
if (i < 0) {
return 0;
}
return i;
}
public String toString() {
StringBuilder sb = new StringBuilder(64);
int i = this._type;
if (i == 0) {
sb.append("/");
} else if (i != 1) {
sb.append('{');
String currentName = getCurrentName();
if (currentName != null) {
sb.append('\"');
CharTypes.appendQuoted(sb, currentName);
sb.append('\"');
} else {
sb.append('?');
}
sb.append('}');
} else {
sb.append('[');
sb.append(getCurrentIndex());
sb.append(']');
}
return sb.toString();
}
}
|
[
"tusharchoudhary0003@gmail.com"
] |
tusharchoudhary0003@gmail.com
|
a2591a2fcdbf89bde1d71602f716d085af5fd314
|
ff2a1b6ce410d58b2268187837856b4a36d00946
|
/jvCodeBank/JVCodebase/wsadAll/Thames/wrkspc/work/ThamesEARWeb/JavaSource/com/idc/thames/xsl/JVMessage.java
|
840ada83a21beba5c567121f82fcca693bc775ea
|
[] |
no_license
|
johnvincentio/repo-codebank
|
5ce4ec3bb4efcad7f32bdfdc867889eff1ca9532
|
5055d1f53ec69e2e537aac3f4bec9de2953a90f0
|
refs/heads/master
| 2023-03-17T18:05:03.748283
| 2023-03-05T19:22:13
| 2023-03-05T19:22:13
| 84,678,871
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 382
|
java
|
package com.idc.thames.xsl;
public class JVMessage {
private String header;
private String text;
public JVMessage (String header, String text) {
this.header = header;
this.text = text;
}
public void setHeader(String msg) {header = msg;}
public String getHeader() {return header;}
public void setText(String msg) {text = msg;}
public String getText() {return text;}
}
|
[
"john@johnvincent.io"
] |
john@johnvincent.io
|
018635fe851bdb1bae4863f5912c39bd3abdbf8c
|
7016cec54fb7140fd93ed805514b74201f721ccd
|
/ui/web/main/src/java/com/echothree/ui/web/main/action/selector/selector/DescriptionDeleteAction.java
|
5569ef449dbb473569e34c629ae33b0ba3e38444
|
[
"MIT",
"Apache-1.1",
"Apache-2.0"
] |
permissive
|
echothreellc/echothree
|
62fa6e88ef6449406d3035de7642ed92ffb2831b
|
bfe6152b1a40075ec65af0880dda135350a50eaf
|
refs/heads/master
| 2023-09-01T08:58:01.429249
| 2023-08-21T11:44:08
| 2023-08-21T11:44:08
| 154,900,256
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,246
|
java
|
// --------------------------------------------------------------------------------
// Copyright 2002-2023 Echo Three, LLC
//
// 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.echothree.ui.web.main.action.selector.selector;
import com.echothree.control.user.selector.common.SelectorUtil;
import com.echothree.control.user.selector.common.form.DeleteSelectorDescriptionForm;
import com.echothree.ui.web.main.framework.ForwardConstants;
import com.echothree.ui.web.main.framework.MainBaseAction;
import com.echothree.ui.web.main.framework.ParameterConstants;
import com.echothree.view.client.web.struts.CustomActionForward;
import com.echothree.view.client.web.struts.sprout.annotation.SproutAction;
import com.echothree.view.client.web.struts.sprout.annotation.SproutForward;
import com.echothree.view.client.web.struts.sprout.annotation.SproutProperty;
import com.echothree.view.client.web.struts.sslext.config.SecureActionMapping;
import java.util.HashMap;
import java.util.Map;
import javax.naming.NamingException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
@SproutAction(
path = "/Selector/Selector/DescriptionDelete",
mappingClass = SecureActionMapping.class,
properties = {
@SproutProperty(property = "secure", value = "true")
},
forwards = {
@SproutForward(name = "Display", path = "/action/Selector/Selector/Description", redirect = true)
}
)
public class DescriptionDeleteAction
extends MainBaseAction<ActionForm> {
@Override
public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception {
String forwardKey;
String selectorKindName = request.getParameter(ParameterConstants.SELECTOR_KIND_NAME);
String selectorTypeName = request.getParameter(ParameterConstants.SELECTOR_TYPE_NAME);
String selectorName = request.getParameter(ParameterConstants.SELECTOR_NAME);
try {
String languageIsoName = request.getParameter(ParameterConstants.LANGUAGE_ISO_NAME);
DeleteSelectorDescriptionForm deleteSelectorDescriptionForm = SelectorUtil.getHome().getDeleteSelectorDescriptionForm();
deleteSelectorDescriptionForm.setSelectorKindName(selectorKindName);
deleteSelectorDescriptionForm.setSelectorTypeName(selectorTypeName);
deleteSelectorDescriptionForm.setSelectorName(selectorName);
deleteSelectorDescriptionForm.setLanguageIsoName(languageIsoName);
SelectorUtil.getHome().deleteSelectorDescription(getUserVisitPK(request), deleteSelectorDescriptionForm);
forwardKey = ForwardConstants.DISPLAY;
} catch (NamingException ne) {
forwardKey = ForwardConstants.ERROR_500;
}
CustomActionForward customActionForward = new CustomActionForward(mapping.findForward(forwardKey));
if(forwardKey.equals(ForwardConstants.DISPLAY)) {
Map<String, String> parameters = new HashMap<>(2);
parameters.put(ParameterConstants.SELECTOR_KIND_NAME, selectorKindName);
parameters.put(ParameterConstants.SELECTOR_TYPE_NAME, selectorTypeName);
parameters.put(ParameterConstants.SELECTOR_NAME, selectorName);
customActionForward.setParameters(parameters);
}
return customActionForward;
}
}
|
[
"rich@echothree.com"
] |
rich@echothree.com
|
f7cea500a9bb40e6109d0413ba6a2d7e132f63f2
|
8a146700b119415db60664d12b367cc447cbb619
|
/src/main/java/io/goodforgod/dummymaker/generator/simple/number/ByteGenerator.java
|
05b36fad5a90f09c9bb0505c7ec25884e54eeb9c
|
[
"MIT"
] |
permissive
|
GoodforGod/dummymaker
|
571495724283eb9760fbcd7a5d3a45f9a29a8ba5
|
94d235faca9c46028e7c5f94d311a17d642fb249
|
refs/heads/master
| 2023-04-27T03:19:39.598530
| 2023-04-18T20:09:12
| 2023-04-18T20:09:12
| 92,751,534
| 16
| 5
|
MIT
| 2023-04-18T20:09:14
| 2017-05-29T15:18:39
|
Java
|
UTF-8
|
Java
| false
| false
| 501
|
java
|
package io.goodforgod.dummymaker.generator.simple.number;
import io.goodforgod.dummymaker.generator.Generator;
import io.goodforgod.dummymaker.util.RandomUtils;
import org.jetbrains.annotations.NotNull;
/**
* Generates byte from -127 to 128
*
* @author Anton Kurako (GoodforGod)
* @since 04.11.2018
*/
public final class ByteGenerator implements Generator<Byte> {
@Override
public @NotNull Byte get() {
return (byte) RandomUtils.random(Byte.MIN_VALUE, Byte.MAX_VALUE);
}
}
|
[
"goodforgod.dev@gmail.com"
] |
goodforgod.dev@gmail.com
|
9265d0cf52350c7a24f463c993961e79a838441a
|
01546dd4e756646f7eba8e883bacc7192b0d8c2a
|
/src/main/java/samples/spring/mybatis/Application.java
|
4fec5d64c3731326831352883abbf499e36e7e16
|
[] |
no_license
|
izeye/samples-spring-mybatis
|
bc1f029b93336ed6dbf9167189f663345436bce1
|
66a30327fd57aa51f514e869271b8a0cd9ced3d8
|
refs/heads/master
| 2021-01-10T20:20:44.791524
| 2014-11-26T05:36:16
| 2014-11-26T05:36:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 729
|
java
|
package samples.spring.mybatis;
import org.springframework.context.support.GenericXmlApplicationContext;
import samples.spring.mybatis.dao.PersonDao;
import samples.spring.mybatis.domain.Person;
import java.util.Arrays;
/**
* Created by izeye on 2014. 11. 25..
*/
public class Application {
public static void main(String[] args) {
GenericXmlApplicationContext applicationContext =
new GenericXmlApplicationContext("classpath:applicationContext.xml");
PersonDao personDao = applicationContext.getBean(PersonDao.class);
Person person1 = new Person("Johnny", 34);
Person person2 = new Person("Alice", 20);
personDao.save(Arrays.asList(person1, person2));
}
}
|
[
"izeye@naver.com"
] |
izeye@naver.com
|
257129b850229097092c937bab1492c0cf25bc9c
|
41db913e9df0d55af2c3ed47f61e4d4659e81d38
|
/src/main/java/cn/ccb/pattern/behavioral/command/Command.java
|
c22cdf7aa636212f3658d6ef903ac098f6b2edd4
|
[] |
no_license
|
2568808909/desgin_pattern
|
522df720066b8e3c8d4a00b7aff762a45f1a8cb6
|
9bb56e1a77cd8e94fc851c44bdd9d64ddda17e7d
|
refs/heads/master
| 2020-07-26T09:06:32.255446
| 2020-06-21T13:05:50
| 2020-06-21T13:05:50
| 208,598,592
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 647
|
java
|
package cn.ccb.pattern.behavioral.command;
/**
* 命令模式
* 定义:将“请求”封装成对象,以便使用不同的请求。该模式解决了应用程序中对象的职责以及它们之间的通信方式。
* 类型:行为型
*
* 适用场景:
* 1)请求的调用者和请求接受者需要解耦,使得调用者和接收者不直接交互
* 2)需要抽象出等待执行的行为
*
* 优点:
* 1)降低耦合
* 2)容易扩展新命令或者一组命令
*
* 缺点:
* 1)命令的无限扩展会增加类的数量,提高系统的复杂度
*/
public interface Command {
void execute();
}
|
[
"2568808909@qq.com"
] |
2568808909@qq.com
|
51e369004a00381014f792d225b9726acead0e56
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_82441729dd69fc5d431cabc8b1ffa25e924b8bbe/BZip2Codec/12_82441729dd69fc5d431cabc8b1ffa25e924b8bbe_BZip2Codec_s.java
|
5ba43936b9c6a6d24eeb16028489b3b58e043311
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,353
|
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.avro.file;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
/** * Implements bzip2 compression and decompression. */
public class BZip2Codec extends Codec {
public static final int DEFAULT_BUFFER_SIZE = 64 * 1024;
private ByteArrayOutputStream outputBuffer;
static class Option extends CodecFactory {
@Override
protected Codec createInstance() {
return new BZip2Codec();
}
}
@Override
public String getName() { return DataFileConstants.BZIP2_CODEC; }
@Override
public ByteBuffer compress(ByteBuffer uncompressedData) throws IOException {
ByteArrayOutputStream baos = getOutputBuffer(uncompressedData.remaining());
BZip2CompressorOutputStream outputStream = new BZip2CompressorOutputStream(baos);
try {
outputStream.write(uncompressedData.array());
} finally {
outputStream.close();
}
ByteBuffer result = ByteBuffer.wrap(baos.toByteArray());
return result;
}
@Override
public ByteBuffer decompress(ByteBuffer compressedData) throws IOException {
ByteArrayInputStream bais = new ByteArrayInputStream(compressedData.array());
BZip2CompressorInputStream inputStream = new BZip2CompressorInputStream(bais);
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
int readCount = -1;
while ( (readCount = inputStream.read(buffer, compressedData.position(), buffer.length))> 0) {
baos.write(buffer, 0, readCount);
}
ByteBuffer result = ByteBuffer.wrap(baos.toByteArray());
return result;
} finally {
inputStream.close();
}
}
@Override public int hashCode() { return getName().hashCode(); }
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (getClass() != obj.getClass())
return false;
return true;
}
//get and initialize the output buffer for use.
private ByteArrayOutputStream getOutputBuffer(int suggestedLength) {
if (null == outputBuffer) {
outputBuffer = new ByteArrayOutputStream(suggestedLength);
}
outputBuffer.reset();
return outputBuffer;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
3af7a274c23950abb0c8a75c14d161b80ca8cf0a
|
872b4e84a5862215e3c90c7ac410509beb2088ca
|
/eweb/src/main/java/com/dsdl/eidea/base/web/controller/SettingsController.java
|
366ead76078ddfb4777656eb9482a9efbe78989a
|
[] |
no_license
|
chengbom/eidea4
|
9b219adaa5c762f40432734d8972c1309b431bf9
|
634da797bee45a80e0218676ab9519e45f66b5f4
|
refs/heads/master
| 2021-01-25T08:13:01.676456
| 2017-06-07T08:17:16
| 2017-06-07T08:17:16
| 93,729,671
| 1
| 0
| null | 2017-06-08T09:11:22
| 2017-06-08T09:11:22
| null |
UTF-8
|
Java
| false
| false
| 4,802
|
java
|
/**
* 版权所有 刘大磊 2013-07-01
* 作者:刘大磊
* 电话:13336390671
* email:ldlqdsd@126.com
*/
package com.dsdl.eidea.base.web.controller;
import com.dsdl.eidea.base.entity.po.SettingsPo;
import com.dsdl.eidea.base.service.SettingsService;
import com.dsdl.eidea.core.web.controller.BaseController;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.dsdl.eidea.core.web.def.WebConst;
import com.dsdl.eidea.core.web.result.JsonResult;
import com.dsdl.eidea.core.web.result.def.ErrorCodes;
import com.dsdl.eidea.core.web.util.SearchHelper;
import com.dsdl.eidea.core.web.vo.PagingSettingResult;
import com.googlecode.genericdao.search.Search;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.dsdl.eidea.core.dto.PaginationResult;
import com.dsdl.eidea.core.params.QueryParams;
import com.dsdl.eidea.core.params.DeleteParams;
import javax.servlet.http.HttpSession;
import java.util.List;
/**
* Created by 刘大磊 on 2017-05-06 07:51:36.
*/ @Controller
@RequestMapping("/base/settings")
public class SettingsController extends BaseController {
private static final String URI = "settings";
@Autowired
private SettingsService settingsService;
@RequestMapping(value = "/showList", method = RequestMethod.GET)
@RequiresPermissions("view")
public ModelAndView showList() {
ModelAndView modelAndView = new ModelAndView("/base/settings/settings");
modelAndView.addObject(WebConst.PAGING_SETTINGS, PagingSettingResult.getDbPaging());
modelAndView.addObject(WebConst.PAGE_URI, URI);
return modelAndView;
}
@RequestMapping(value = "/list", method = RequestMethod.POST)
@ResponseBody
@RequiresPermissions("view")
public JsonResult<PaginationResult<SettingsPo>> list(HttpSession session,@RequestBody QueryParams queryParams) {
Search search = SearchHelper.getSearchParam(URI, session);
PaginationResult<SettingsPo> paginationResult = settingsService.getSettingsListByPaging(search, queryParams);
return JsonResult.success(paginationResult);
}
@RequiresPermissions("view")
@RequestMapping(value = "/get", method = RequestMethod.GET)
@ResponseBody
public JsonResult<SettingsPo> get(String key) {
SettingsPo settingsPo = null;
if (key == null) {
return JsonResult.fail(ErrorCodes.VALIDATE_PARAM_ERROR.getCode(),getMessage("common.errror.get_object",getLabel("settings.title")));
} else {
settingsPo = settingsService.getSettings(key);
}
return JsonResult.success(settingsPo);
}
@RequiresPermissions("add")
@RequestMapping(value = "/create", method = RequestMethod.GET)
@ResponseBody
public JsonResult<SettingsPo> create() {
SettingsPo settingsPo = new SettingsPo();
return JsonResult.success(settingsPo);
}
/**
* @param settingsPo
* @return
*/
@RequiresPermissions("add")
@RequestMapping(value = "/saveForCreated", method = RequestMethod.POST)
@ResponseBody
public JsonResult<SettingsPo> saveForCreate(@Validated @RequestBody SettingsPo settingsPo) {
settingsService.saveSettings(settingsPo);
return get(settingsPo.getKey());
}
@RequiresPermissions("update")
@RequestMapping(value = "/saveForUpdated", method = RequestMethod.POST)
@ResponseBody
public JsonResult<SettingsPo> saveForUpdate(@Validated @RequestBody SettingsPo settingsPo) {
if(settingsPo.getKey() == null){
return JsonResult.fail(ErrorCodes.VALIDATE_PARAM_ERROR.getCode(), getMessage("common.errror.pk.required"));
}
settingsService.saveSettings(settingsPo);
return get(settingsPo.getKey());
}
@RequiresPermissions("delete")
@RequestMapping(value = "/deletes", method = RequestMethod.POST)
@ResponseBody
public JsonResult<PaginationResult<SettingsPo>> deletes(@RequestBody DeleteParams<String> deleteParams, HttpSession session) {
if (deleteParams.getIds() == null||deleteParams.getIds().length == 0) {
return JsonResult.fail(ErrorCodes.VALIDATE_PARAM_ERROR.getCode(), getMessage("common.error.delete.failure",getMessage("settings.title")));
}
settingsService.deletes(deleteParams.getIds());
return list(session,deleteParams.getQueryParams());
}
}
|
[
"ldlqdsdcn@gmail.com"
] |
ldlqdsdcn@gmail.com
|
956aae094d687a9639f42ee0f3ca848d94ed7cf8
|
b5db846dc817bc509692946c1ba78b46f32c1d89
|
/src/com/zyk/launcher/FocusIndicatorView.java
|
d8507cf50d9621b39e2fe023afae4ab022ebcc97
|
[
"Apache-2.0"
] |
permissive
|
yukun314/android-5.1.1_r29
|
74b14f2bb4073dd80f8ef7eb1d9ed48fad0a2102
|
dd3862935187874cfd29dd557048df1fd715c329
|
refs/heads/master
| 2021-01-21T12:58:17.592531
| 2016-06-02T10:01:46
| 2016-06-02T10:01:46
| 54,986,493
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,613
|
java
|
/*
* Copyright (C) 2011 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.zyk.launcher;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.util.Pair;
import android.view.View;
import android.view.ViewParent;
public class FocusIndicatorView extends View implements View.OnFocusChangeListener {
// It can be any number >0. The view is resized using scaleX and scaleY.
static final int DEFAULT_LAYOUT_SIZE = 100;
private static final float MIN_VISIBLE_ALPHA = 0.2f;
private static final long ANIM_DURATION = 150;
private static final int[] sTempPos = new int[2];
private static final int[] sTempShift = new int[2];
private final int[] mIndicatorPos = new int[2];
private final int[] mTargetViewPos = new int[2];
private ObjectAnimator mCurrentAnimation;
private ViewAnimState mTargetState;
private View mLastFocusedView;
private boolean mInitiated;
private Pair<View, Boolean> mPendingCall;
public FocusIndicatorView(Context context) {
this(context, null);
}
public FocusIndicatorView(Context context, AttributeSet attrs) {
super(context, attrs);
setAlpha(0);
setBackgroundColor(getResources().getColor(R.color.focused_background));
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
// Redraw if it is already showing. This avoids a bug where the height changes by a small
// amount on connecting/disconnecting a bluetooth keyboard.
if (mLastFocusedView != null) {
mPendingCall = Pair.create(mLastFocusedView, Boolean.TRUE);
invalidate();
}
}
@Override
public void onFocusChange(View v, boolean hasFocus) {
mPendingCall = null;
if (!mInitiated && (getWidth() == 0)) {
// View not yet laid out. Wait until the view is ready to be drawn, so that be can
// get the location on screen.
mPendingCall = Pair.create(v, hasFocus);
invalidate();
return;
}
if (!mInitiated) {
getLocationRelativeToParentPagedView(this, mIndicatorPos);
mInitiated = true;
}
if (hasFocus) {
int indicatorWidth = getWidth();
int indicatorHeight = getHeight();
endCurrentAnimation();
ViewAnimState nextState = new ViewAnimState();
nextState.scaleX = v.getScaleX() * v.getWidth() / indicatorWidth;
nextState.scaleY = v.getScaleY() * v.getHeight() / indicatorHeight;
getLocationRelativeToParentPagedView(v, mTargetViewPos);
nextState.x = mTargetViewPos[0] - mIndicatorPos[0] - (1 - nextState.scaleX) * indicatorWidth / 2;
nextState.y = mTargetViewPos[1] - mIndicatorPos[1] - (1 - nextState.scaleY) * indicatorHeight / 2;
if (getAlpha() > MIN_VISIBLE_ALPHA) {
mTargetState = nextState;
mCurrentAnimation = LauncherAnimUtils.ofPropertyValuesHolder(this,
PropertyValuesHolder.ofFloat(View.ALPHA, 1),
PropertyValuesHolder.ofFloat(View.TRANSLATION_X, mTargetState.x),
PropertyValuesHolder.ofFloat(View.TRANSLATION_Y, mTargetState.y),
PropertyValuesHolder.ofFloat(View.SCALE_X, mTargetState.scaleX),
PropertyValuesHolder.ofFloat(View.SCALE_Y, mTargetState.scaleY));
} else {
applyState(nextState);
mCurrentAnimation = LauncherAnimUtils.ofPropertyValuesHolder(this,
PropertyValuesHolder.ofFloat(View.ALPHA, 1));
}
mLastFocusedView = v;
} else {
if (mLastFocusedView == v) {
mLastFocusedView = null;
endCurrentAnimation();
mCurrentAnimation = LauncherAnimUtils.ofPropertyValuesHolder(this,
PropertyValuesHolder.ofFloat(View.ALPHA, 0));
}
}
if (mCurrentAnimation != null) {
mCurrentAnimation.setDuration(ANIM_DURATION).start();
}
}
private void endCurrentAnimation() {
if (mCurrentAnimation != null) {
mCurrentAnimation.cancel();
mCurrentAnimation = null;
}
if (mTargetState != null) {
applyState(mTargetState);
mTargetState = null;
}
}
private void applyState(ViewAnimState state) {
setTranslationX(state.x);
setTranslationY(state.y);
setScaleX(state.scaleX);
setScaleY(state.scaleY);
}
@Override
protected void onDraw(Canvas canvas) {
if (mPendingCall != null) {
onFocusChange(mPendingCall.first, mPendingCall.second);
}
}
/**
* Gets the location of a view relative in the window, off-setting any shift due to
* page view scroll
*/
private static void getLocationRelativeToParentPagedView(View v, int[] pos) {
getPagedViewScrollShift(v, sTempShift);
v.getLocationInWindow(sTempPos);
pos[0] = sTempPos[0] + sTempShift[0];
pos[1] = sTempPos[1] + sTempShift[1];
}
private static void getPagedViewScrollShift(View child, int[] shift) {
ViewParent parent = child.getParent();
if (parent instanceof PagedView) {
View parentView = (View) parent;
child.getLocationInWindow(sTempPos);
shift[0] = parentView.getPaddingLeft() - sTempPos[0];
shift[1] = -(int) child.getTranslationY();
} else if (parent instanceof View) {
getPagedViewScrollShift((View) parent, shift);
} else {
shift[0] = shift[1] = 0;
}
}
private static final class ViewAnimState {
float x, y, scaleX, scaleY;
}
}
|
[
"yukun314@126.com"
] |
yukun314@126.com
|
3d30173857e5e1444c66b540bf20ae695a602c48
|
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
|
/services/frs/src/main/java/com/huaweicloud/sdk/frs/v2/region/FrsRegion.java
|
befa07229387148b7becd6ea80cc3dc42457fba7
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java-v3
|
51b32a451fac321a0affe2176663fed8a9cd8042
|
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
|
refs/heads/master
| 2023-08-29T06:50:15.642693
| 2023-08-24T08:34:48
| 2023-08-24T08:34:48
| 262,207,545
| 91
| 57
|
NOASSERTION
| 2023-09-08T12:24:55
| 2020-05-08T02:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 2,297
|
java
|
package com.huaweicloud.sdk.frs.v2.region;
import com.huaweicloud.sdk.core.region.IRegionProvider;
import com.huaweicloud.sdk.core.region.Region;
import com.huaweicloud.sdk.core.region.RegionProviderChain;
import com.huaweicloud.sdk.core.utils.StringUtils;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public class FrsRegion {
public static final Region CN_NORTH_1 = new Region("cn-north-1", "https://face.cn-north-1.myhuaweicloud.com");
public static final Region CN_NORTH_4 = new Region("cn-north-4", "https://face.cn-north-4.myhuaweicloud.com");
public static final Region CN_SOUTH_1 = new Region("cn-south-1", "https://face.cn-south-1.myhuaweicloud.com");
public static final Region CN_EAST_3 = new Region("cn-east-3", "https://face.cn-east-3.myhuaweicloud.com");
public static final Region AP_SOUTHEAST_1 =
new Region("ap-southeast-1", "https://face.ap-southeast-1.myhuaweicloud.com");
public static final Region AP_SOUTHEAST_2 =
new Region("ap-southeast-2", "https://face.ap-southeast-2.myhuaweicloud.com");
private static final IRegionProvider PROVIDER = RegionProviderChain.getDefaultRegionProviderChain("FRS");
private static final Map<String, Region> STATIC_FIELDS = createStaticFields();
private static Map<String, Region> createStaticFields() {
Map<String, Region> map = new HashMap<>();
map.put("cn-north-1", CN_NORTH_1);
map.put("cn-north-4", CN_NORTH_4);
map.put("cn-south-1", CN_SOUTH_1);
map.put("cn-east-3", CN_EAST_3);
map.put("ap-southeast-1", AP_SOUTHEAST_1);
map.put("ap-southeast-2", AP_SOUTHEAST_2);
return Collections.unmodifiableMap(map);
}
public static Region valueOf(String regionId) {
if (StringUtils.isEmpty(regionId)) {
throw new IllegalArgumentException("Unexpected empty parameter: regionId.");
}
Region result = PROVIDER.getRegion(regionId);
if (Objects.nonNull(result)) {
return result;
}
result = STATIC_FIELDS.get(regionId);
if (Objects.nonNull(result)) {
return result;
}
throw new IllegalArgumentException("Unexpected regionId: " + regionId);
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
65faed5e5b9354c7d3311b4da84a9abef1f0366e
|
1b1053daa9733ff66935c71254a236ef0af5bb12
|
/ReactionCraftServer/src/net/minecraft/src/ItemPotion.java
|
9b4aa2cf4124ed1fbf16e5a77c76a9495d5a4aa6
|
[] |
no_license
|
Eragonn1490/Era---Mal-
|
54e693fef8150f841894e2ddcb8c1d8a7ef5d289
|
d207319951d61d66b2c1a5917990a741eefd259e
|
refs/heads/master
| 2016-09-06T09:42:06.892250
| 2012-06-08T02:05:36
| 2012-06-08T02:06:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,880
|
java
|
package net.minecraft.src;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
public class ItemPotion extends Item
{
/**
* Contains a map from integers to the list of potion effects that potions with that damage value confer (to prevent
* recalculating it).
*/
private HashMap effectCache = new HashMap();
public ItemPotion(int par1)
{
super(par1);
this.setMaxStackSize(1);
this.setHasSubtypes(true);
this.setMaxDamage(0);
}
/**
* Returns a list of potion effects for the specified itemstack.
*/
public List getEffects(ItemStack par1ItemStack)
{
return this.getEffects(par1ItemStack.getItemDamage());
}
/**
* Returns a list of effects for the specified potion damage value.
*/
public List getEffects(int par1)
{
List var2 = (List)this.effectCache.get(Integer.valueOf(par1));
if (var2 == null)
{
var2 = PotionHelper.getPotionEffects(par1, false);
this.effectCache.put(Integer.valueOf(par1), var2);
}
return var2;
}
public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
--par1ItemStack.stackSize;
if (!par2World.isRemote)
{
List var4 = this.getEffects(par1ItemStack);
if (var4 != null)
{
Iterator var5 = var4.iterator();
while (var5.hasNext())
{
PotionEffect var6 = (PotionEffect)var5.next();
par3EntityPlayer.addPotionEffect(new PotionEffect(var6));
}
}
}
if (par1ItemStack.stackSize <= 0)
{
return new ItemStack(Item.glassBottle);
}
else
{
par3EntityPlayer.inventory.addItemStackToInventory(new ItemStack(Item.glassBottle));
return par1ItemStack;
}
}
/**
* How long it takes to use or consume an item
*/
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 32;
}
/**
* returns the action that specifies what animation to play when the items is being used
*/
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.drink;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
if (isSplash(par1ItemStack.getItemDamage()))
{
--par1ItemStack.stackSize;
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(new EntityPotion(par2World, par3EntityPlayer, par1ItemStack.getItemDamage()));
}
return par1ItemStack;
}
else
{
par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));
return par1ItemStack;
}
}
/**
* Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
* True if something happen and false if it don't. This is for ITEMS, not BLOCKS !
*/
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7)
{
return false;
}
/**
* returns wether or not a potion is a throwable splash potion based on damage value
*/
public static boolean isSplash(int par0)
{
return (par0 & 16384) != 0;
}
}
|
[
"Chollis81@yahoo.com"
] |
Chollis81@yahoo.com
|
bb01bb0aa765dcde953f9e4bb67f5bde795a5993
|
43ca534032faa722e206f4585f3075e8dd43de6c
|
/src/com/instagram/android/service/AutoCompleteHashtagService.java
|
61e7df24d4aaad684f4f9b02f56ed4a49d2a414e
|
[] |
no_license
|
dnoise/IG-6.9.1-decompiled
|
3e87ba382a60ba995e582fc50278a31505109684
|
316612d5e1bfd4a74cee47da9063a38e9d50af68
|
refs/heads/master
| 2021-01-15T12:42:37.833988
| 2014-10-29T13:17:01
| 2014-10-29T13:17:01
| 26,952,948
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 589
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.instagram.android.service;
import android.app.IntentService;
import android.content.Intent;
import com.instagram.h.a.a;
public class AutoCompleteHashtagService extends IntentService
{
public AutoCompleteHashtagService()
{
super(com/instagram/android/service/AutoCompleteHashtagService.toString());
}
protected void onHandleIntent(Intent intent)
{
a.b();
}
}
|
[
"leo.sjoberg@gmail.com"
] |
leo.sjoberg@gmail.com
|
415967725042af86a7bcf75be8a5be312ac93a5d
|
536e101083f265217dc28d6360f18eb6f810c3e6
|
/tuples4j/src/main/java/com/mmnaseri/utils/tuples/impl/AbstractTuple.java
|
70129e20b1e75587b01455583be1acfb16b426e9
|
[
"MIT"
] |
permissive
|
mmnaseri/tuples4j
|
b7ffaac73e4f2ebbba3bbcf1c5dc9ae9e7a632ea
|
5e812c6993c2a525c650bfe97c0a0a6323c2664b
|
refs/heads/development
| 2023-05-14T14:22:22.784527
| 2021-01-17T04:14:26
| 2021-01-17T04:14:26
| 259,777,130
| 2
| 1
|
MIT
| 2023-05-09T18:48:11
| 2020-04-28T23:41:35
|
Java
|
UTF-8
|
Java
| false
| false
| 1,449
|
java
|
package com.mmnaseri.utils.tuples.impl;
import com.mmnaseri.utils.tuples.Tuple;
import com.mmnaseri.utils.tuples.utils.FluentList;
import java.util.List;
import java.util.Objects;
import static com.mmnaseri.utils.tuples.utils.TupleUtils.checkIndex;
import static java.util.stream.Collectors.joining;
/**
* The base class for the tuples. This class caches the list value for the tuple and uses that to
* calculate the hash code and string representation of the tuple.
*/
public abstract class AbstractTuple<Z> implements Tuple<Z> {
private static final String STRING_FORMAT = "<%s>";
private final String string;
private final int hashCode;
private final FluentList<Z> values;
protected AbstractTuple(List<? extends Z> values) {
this.values = FluentList.of(values);
string = String.format(STRING_FORMAT, stream().map(Objects::toString).collect(joining(", ")));
hashCode = Objects.hashCode(asList());
}
@Override
public FluentList<Z> asList() {
return values;
}
@Override
public int size() {
return values.size();
}
@Override
public Z get(final int i) {
checkIndex(i, size());
return values.get(i);
}
@Override
public String toString() {
return string;
}
@Override
public boolean equals(final Object obj) {
return obj instanceof Tuple && Objects.equals(asList(), ((Tuple<?>) obj).asList());
}
@Override
public int hashCode() {
return hashCode;
}
}
|
[
"m.m.naseri@gmail.com"
] |
m.m.naseri@gmail.com
|
f1823d2df5ba51b16ff3ec20876dd069916a2870
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/17/17_7548dd355da6e118c3b40e969c00428adb3d7b90/DashboardEventGenerator/17_7548dd355da6e118c3b40e969c00428adb3d7b90_DashboardEventGenerator_t.java
|
43360c9cf73696f972acf6af0fa4633e33330251
|
[] |
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,043
|
java
|
package main.origo.admin.event;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import main.origo.admin.annotations.Admin;
import main.origo.core.InterceptorRepository;
import main.origo.core.Node;
import main.origo.core.annotations.Provides;
import main.origo.core.internal.CachedAnnotation;
import main.origo.core.internal.ReflectionInvoker;
import main.origo.core.ui.Element;
import play.Logger;
import java.util.List;
import java.util.Set;
public class DashboardEventGenerator {
/*
* Convenience methods for hooks with DASHBOARD_ITEM type
*/
public static List<Element> triggerProvidesDashboardItemInterceptor(Node node, String withType) {
Set<CachedAnnotation> cachedAnnotations = findProvidersWithParent(Admin.Type.DASHBOARD_ITEM, withType);
List<Element> items = Lists.newArrayList();
for (CachedAnnotation cachedAnnotation : cachedAnnotations) {
items.add(ReflectionInvoker.<Element>execute(cachedAnnotation, node, withType, Maps.newHashMap()));
}
return items;
}
private static Set<CachedAnnotation> findProvidersWithParent(final String type, final String parent) {
Set<CachedAnnotation> providers = InterceptorRepository.getInterceptors(Provides.class, new CachedAnnotation.InterceptorSelector() {
@Override
public boolean isCorrectInterceptor(CachedAnnotation cachedAnnotation) {
Provides annotation = (Provides) cachedAnnotation.annotation;
return annotation.type().equals(type) &&
cachedAnnotation.relationship != null && cachedAnnotation.relationship.parent().equals(parent);
}
});
if (providers.isEmpty()) {
Logger.warn("Every type (specified by using attribute 'with') must have a class annotated with @Provides to instantiate an instance. Unable to find a provider for type \'" + type + "\'");
}
return providers;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
317021c064acbc3607f4410a9385dfed33b404b7
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.deviceauthserver-DeviceAuthServer/sources/com/android/org/bouncycastle/asn1/pkcs/EncryptedData.java
|
91be6496cabc95d9741e3630e563cf37f2391564
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 2,590
|
java
|
package com.android.org.bouncycastle.asn1.pkcs;
import com.android.org.bouncycastle.asn1.ASN1Encodable;
import com.android.org.bouncycastle.asn1.ASN1EncodableVector;
import com.android.org.bouncycastle.asn1.ASN1Integer;
import com.android.org.bouncycastle.asn1.ASN1Object;
import com.android.org.bouncycastle.asn1.ASN1ObjectIdentifier;
import com.android.org.bouncycastle.asn1.ASN1OctetString;
import com.android.org.bouncycastle.asn1.ASN1Primitive;
import com.android.org.bouncycastle.asn1.ASN1Sequence;
import com.android.org.bouncycastle.asn1.ASN1TaggedObject;
import com.android.org.bouncycastle.asn1.BERSequence;
import com.android.org.bouncycastle.asn1.BERTaggedObject;
import com.android.org.bouncycastle.asn1.x509.AlgorithmIdentifier;
public class EncryptedData extends ASN1Object {
ASN1Sequence data;
public static EncryptedData getInstance(Object obj) {
if (obj instanceof EncryptedData) {
return (EncryptedData) obj;
}
if (obj != null) {
return new EncryptedData(ASN1Sequence.getInstance(obj));
}
return null;
}
private EncryptedData(ASN1Sequence seq) {
if (((ASN1Integer) seq.getObjectAt(0)).getValue().intValue() == 0) {
this.data = ASN1Sequence.getInstance(seq.getObjectAt(1));
return;
}
throw new IllegalArgumentException("sequence not version 0");
}
public EncryptedData(ASN1ObjectIdentifier contentType, AlgorithmIdentifier encryptionAlgorithm, ASN1Encodable content) {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(contentType);
v.add(encryptionAlgorithm.toASN1Primitive());
v.add(new BERTaggedObject(false, 0, content));
this.data = new BERSequence(v);
}
public ASN1ObjectIdentifier getContentType() {
return ASN1ObjectIdentifier.getInstance(this.data.getObjectAt(0));
}
public AlgorithmIdentifier getEncryptionAlgorithm() {
return AlgorithmIdentifier.getInstance(this.data.getObjectAt(1));
}
public ASN1OctetString getContent() {
if (this.data.size() == 3) {
return ASN1OctetString.getInstance(ASN1TaggedObject.getInstance(this.data.getObjectAt(2)), false);
}
return null;
}
@Override // com.android.org.bouncycastle.asn1.ASN1Object, com.android.org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new ASN1Integer(0));
v.add(this.data);
return new BERSequence(v);
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
893e2eee021f6254ffb657f779f0201cb057e129
|
81d61e58e813e2ea2cfa1ae1186fa2c103090804
|
/core/target/generated-sources/messages/quickfix/field/BidSpotRate.java
|
29974326c864a6304dce1548109f4b59b04036fc
|
[
"BSD-2-Clause"
] |
permissive
|
donglinworld/simplefix
|
125f421ce4371e31465359e936482b77ab7e7958
|
8d9ab9200d508ba1ca441a34a5b0748e6a8ef9f8
|
refs/heads/master
| 2022-07-15T13:54:06.988916
| 2019-10-24T12:39:12
| 2019-10-24T12:39:12
| 34,051,037
| 0
| 0
|
NOASSERTION
| 2022-06-29T15:51:14
| 2015-04-16T11:07:10
|
Java
|
UTF-8
|
Java
| false
| false
| 1,235
|
java
|
/*******************************************************************************
* Copyright (c) quickfixengine.org All rights reserved.
*
* This file is part of the QuickFIX FIX Engine
*
* This file may be distributed under the terms of the quickfixengine.org
* license as defined by quickfixengine.org and appearing in the file
* LICENSE included in the packaging of this file.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
* THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE.
*
* See http://www.quickfixengine.org/LICENSE for licensing information.
*
* Contact ask@quickfixengine.org if any conditions of this licensing
* are not clear to you.
******************************************************************************/
package quickfix.field;
import quickfix.DecimalField;
public class BidSpotRate extends DecimalField {
static final long serialVersionUID = 20050617;
public static final int FIELD = 188;
public BidSpotRate() {
super(188);
}
public BidSpotRate(java.math.BigDecimal data) {
super(188, data);
}
public BidSpotRate(double data) {
super(188, new java.math.BigDecimal(data));
}
}
|
[
"donglin_world@hotmail.com@b05cb261-0605-1b5b-92d6-37ff6522ea18"
] |
donglin_world@hotmail.com@b05cb261-0605-1b5b-92d6-37ff6522ea18
|
18a6c75c5f89a90298bd9b21382fef8b04ff9dd5
|
ac82c09fd704b2288cef8342bde6d66f200eeb0d
|
/projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/trs/EquityTotalReturnSwapFunction.java
|
486ae9a3b2aa9d324cfa6e443684a17bd7727e1d
|
[
"Apache-2.0"
] |
permissive
|
cobaltblueocean/OG-Platform
|
88f1a6a94f76d7f589fb8fbacb3f26502835d7bb
|
9b78891139503d8c6aecdeadc4d583b23a0cc0f2
|
refs/heads/master
| 2021-08-26T00:44:27.315546
| 2018-02-23T20:12:08
| 2018-02-23T20:12:08
| 241,467,299
| 0
| 2
|
Apache-2.0
| 2021-08-02T17:20:41
| 2020-02-18T21:05:35
|
Java
|
UTF-8
|
Java
| false
| false
| 5,989
|
java
|
/**
* Copyright (C) 2014 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.financial.analytics.model.trs;
import static com.opengamma.core.value.MarketDataRequirementNames.MARKET_VALUE;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.opengamma.analytics.financial.equity.EquityTrsDataBundle;
import com.opengamma.analytics.financial.forex.method.FXMatrix;
import com.opengamma.analytics.financial.instrument.InstrumentDefinition;
import com.opengamma.analytics.financial.provider.description.interestrate.MulticurveProviderInterface;
import com.opengamma.core.convention.ConventionSource;
import com.opengamma.core.holiday.HolidaySource;
import com.opengamma.core.security.Security;
import com.opengamma.core.security.SecuritySource;
import com.opengamma.engine.ComputationTarget;
import com.opengamma.engine.function.FunctionCompilationContext;
import com.opengamma.engine.function.FunctionInputs;
import com.opengamma.engine.target.ComputationTargetType;
import com.opengamma.engine.value.ValuePropertyNames;
import com.opengamma.engine.value.ValueRequirement;
import com.opengamma.financial.OpenGammaCompilationContext;
import com.opengamma.financial.analytics.conversion.DefaultTradeConverter;
import com.opengamma.financial.analytics.conversion.EquityTotalReturnSwapSecurityConverter;
import com.opengamma.financial.analytics.conversion.FixedIncomeConverterDataProvider;
import com.opengamma.financial.analytics.model.discounting.DiscountingFunction;
import com.opengamma.financial.security.FinancialSecurityVisitor;
import com.opengamma.financial.security.swap.EquityTotalReturnSwapSecurity;
import com.opengamma.id.ExternalIdBundle;
/**
* Base function for equity total return swap pricing.
*/
public abstract class EquityTotalReturnSwapFunction extends DiscountingFunction {
/** The logger */
private static final Logger s_logger = LoggerFactory.getLogger(EquityTotalReturnSwapFunction.class);
/**
* @param valueRequirements The value requirement names, not null
*/
public EquityTotalReturnSwapFunction(final String... valueRequirements) {
super(valueRequirements);
}
@Override
protected DefaultTradeConverter getTargetToDefinitionConverter(final FunctionCompilationContext context) {
final ConventionSource conventionSource = OpenGammaCompilationContext.getConventionSource(context);
final HolidaySource holidaySource = OpenGammaCompilationContext.getHolidaySource(context);
final SecuritySource securitySource = OpenGammaCompilationContext.getSecuritySource(context);
final FinancialSecurityVisitor<InstrumentDefinition<?>> securityConverter = new EquityTotalReturnSwapSecurityConverter(conventionSource,
holidaySource, securitySource);
return new DefaultTradeConverter(securityConverter);
}
/**
* Base compiled function for equity total return swap pricing.
*/
protected abstract class EquityTotalReturnSwapCompiledFunction extends DiscountingCompiledFunction {
/**
* @param tradeToDefinitionConverter Converts targets to definitions, not null
* @param definitionToDerivativeConverter Converts definitions to derivatives, not null
* @param withCurrency True if the {@link ValuePropertyNames#CURRENCY} result property is set
*/
protected EquityTotalReturnSwapCompiledFunction(final DefaultTradeConverter tradeToDefinitionConverter,
final FixedIncomeConverterDataProvider definitionToDerivativeConverter, final boolean withCurrency) {
super(tradeToDefinitionConverter, definitionToDerivativeConverter, withCurrency);
}
@Override
public boolean canApplyTo(final FunctionCompilationContext context, final ComputationTarget target) {
return target.getTrade().getSecurity() instanceof EquityTotalReturnSwapSecurity;
}
@Override
public Set<ValueRequirement> getRequirements(final FunctionCompilationContext context, final ComputationTarget target, final ValueRequirement desiredValue) {
final Set<ValueRequirement> requirements = super.getRequirements(context, target, desiredValue);
if (requirements == null) {
return null;
}
final ValueRequirement spotRequirement = getEquityUnderlyingRequirement(context, target);
if (spotRequirement == null) {
return null;
}
requirements.add(spotRequirement);
return requirements;
}
/**
* Gets the underlying equity market data requirement.
* @param context The compilation context
* @param target The computation target
* @return The equity market data requirement
*/
@SuppressWarnings("synthetic-access")
protected ValueRequirement getEquityUnderlyingRequirement(final FunctionCompilationContext context, final ComputationTarget target) {
final SecuritySource securitySource = OpenGammaCompilationContext.getSecuritySource(context);
final EquityTotalReturnSwapSecurity security = (EquityTotalReturnSwapSecurity) target.getTrade().getSecurity();
final ExternalIdBundle equityId = security.getAssetId();
try {
final Security equitySecurity = securitySource.getSingle(equityId);
return new ValueRequirement(MARKET_VALUE, ComputationTargetType.SECURITY, equitySecurity.getUniqueId());
} catch (final Exception e) {
s_logger.error(e.getMessage());
return null;
}
}
/**
* Creates the data bundle required for equity total return swap pricing.
* @param inputs The function inputs
* @param matrix The FX matrix
* @return The data bundle
*/
protected EquityTrsDataBundle getDataBundle(final FunctionInputs inputs, final FXMatrix matrix) {
final MulticurveProviderInterface curves = getMergedProviders(inputs, matrix);
final double spotEquity = (Double) inputs.getValue(MARKET_VALUE);
return new EquityTrsDataBundle(spotEquity, curves);
}
}
}
|
[
"cobaltblue.ocean@gmail.com"
] |
cobaltblue.ocean@gmail.com
|
057140b90876c2272ec197529688975b349750a9
|
31d2ff5b2d70ad6afc047c31339875b4ab4e4975
|
/chrome/android/java/src/org/chromium/chrome/browser/download/home/DownloadManagerCoordinatorImpl.java
|
a3de2cd403f004a82c30a55b03e887f845f9d67e
|
[
"BSD-3-Clause"
] |
permissive
|
DalavanCloud/chromium
|
3d0934237ac6604158ed8db649d5e08d95e6c702
|
6a4703692d4e6f1480cc9d32a8677ff8c2a51c16
|
refs/heads/master
| 2023-01-01T17:13:36.512656
| 2018-07-13T14:37:55
| 2018-07-13T14:37:55
| 140,859,288
| 1
| 0
| null | 2018-07-13T14:48:30
| 2018-07-13T14:48:30
| null |
UTF-8
|
Java
| false
| false
| 3,551
|
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.download.home;
import android.content.Context;
import android.view.View;
import org.chromium.base.ObserverList;
import org.chromium.chrome.browser.download.home.filter.Filters;
import org.chromium.chrome.browser.download.home.filter.Filters.FilterType;
import org.chromium.chrome.browser.download.home.list.DateOrderedListCoordinator;
import org.chromium.chrome.browser.download.home.snackbars.DeleteUndoCoordinator;
import org.chromium.chrome.browser.download.items.OfflineContentAggregatorFactory;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.snackbar.SnackbarManager;
import java.io.Closeable;
/**
* The top level coordinator for the download home UI. This is currently an in progress class and
* is not fully fleshed out yet.
*/
class DownloadManagerCoordinatorImpl implements DownloadManagerCoordinator {
private final ObserverList<Observer> mObservers = new ObserverList<>();
private final DateOrderedListCoordinator mListCoordinator;
private final DeleteUndoCoordinator mDeleteCoordinator;
private boolean mMuteFilterChanges;
/** Builds a {@link DownloadManagerCoordinatorImpl} instance. */
public DownloadManagerCoordinatorImpl(Profile profile, Context context, boolean offTheRecord,
SnackbarManager snackbarManager) {
mDeleteCoordinator = new DeleteUndoCoordinator(snackbarManager);
mListCoordinator = new DateOrderedListCoordinator(context, offTheRecord,
OfflineContentAggregatorFactory.forProfile(profile),
mDeleteCoordinator::showSnackbar, this::notifyFilterChanged);
}
// DownloadManagerCoordinator implementation.
@Override
public void destroy() {
mDeleteCoordinator.destroy();
mListCoordinator.destroy();
}
@Override
public View getView() {
return mListCoordinator.getView();
}
@Override
public boolean onBackPressed() {
// TODO(dtrainor): Clear selection if multi-select is supported.
return false;
}
@Override
public void updateForUrl(String url) {
try (FilterChangeBlock block = new FilterChangeBlock()) {
mListCoordinator.setSelectedFilter(Filters.fromUrl(url));
}
}
@Override
public void showPrefetchSection() {
updateForUrl(Filters.toUrl(Filters.PREFETCHED));
}
@Override
public void addObserver(Observer observer) {
mObservers.addObserver(observer);
}
@Override
public void removeObserver(Observer observer) {
mObservers.removeObserver(observer);
}
private void notifyFilterChanged(@FilterType int filter) {
if (mMuteFilterChanges) return;
String url = Filters.toUrl(filter);
for (Observer observer : mObservers) observer.onUrlChanged(url);
}
/**
* Helper class to mute state changes when processing a state change request from an external
* source.
*/
private class FilterChangeBlock implements Closeable {
private final boolean mOriginalMuteFilterChanges;
public FilterChangeBlock() {
mOriginalMuteFilterChanges = mMuteFilterChanges;
mMuteFilterChanges = true;
}
@Override
public void close() {
mMuteFilterChanges = mOriginalMuteFilterChanges;
}
}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
39caae023ebe0f4b9c60329618d1fc4166626f93
|
3f62c9626daf2b1e8867f4df9421cec8306b4778
|
/src/main/java/pracainzynierska/domain/Authority.java
|
59adadf96b4ac20f3e49d98e3ea8d9a81686ab7d
|
[] |
no_license
|
UrszulaSlusarz/webapp
|
b8c475cc3b84d69d0566140ee11f4a7565978de8
|
5369e407930fe5c482495e68d43ca741179ebe67
|
refs/heads/master
| 2020-04-22T23:38:16.523977
| 2019-02-14T19:43:41
| 2019-02-14T19:43:41
| 170,748,050
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,292
|
java
|
package pracainzynierska.domain;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* An authority (a security role) used by Spring Security.
*/
@Entity
@Table(name = "jhi_authority")
public class Authority implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull
@Size(max = 50)
@Id
@Column(length = 50)
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Authority authority = (Authority) o;
return !(name != null ? !name.equals(authority.name) : authority.name != null);
}
@Override
public int hashCode() {
return name != null ? name.hashCode() : 0;
}
@Override
public String toString() {
return "Authority{" +
"name='" + name + '\'' +
"}";
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
af23dbf49ecfe9cdb40432dc97635a6ff6543a30
|
db2ca48fffaf6689c9db439abaf9d98729548e0b
|
/minsu-service/minsu-service-basedata/minsu-service-basedata-provider/src/main/java/com/ziroom/minsu/services/basedata/proxy/ConfTagServiceProxy.java
|
83aea978a8a14921c7bd760052a065a94e7ae232
|
[] |
no_license
|
majinwen/sojourn
|
46a950dbd64442e4ef333c512eb956be9faef50d
|
ab98247790b1951017fc7dd340e1941d5b76dc39
|
refs/heads/master
| 2020-03-22T07:07:05.299160
| 2018-03-18T13:45:23
| 2018-03-18T13:45:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,895
|
java
|
/**
* @FileName: ConfTagServiceProxy.java
* @Package com.ziroom.minsu.services.basedata.proxy
*
* @author zl
*
* Copyright 2011-2015 asura
*/
package com.ziroom.minsu.services.basedata.proxy;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Component;
import com.asura.framework.base.entity.DataTransferObject;
import com.asura.framework.base.paging.PagingResult;
import com.asura.framework.base.util.JsonEntityTransform;
import com.asura.framework.base.util.MessageSourceUtil;
import com.asura.framework.utils.LogUtil;
import com.ziroom.minsu.entity.conf.ConfTagEntity;
import com.ziroom.minsu.services.basedata.api.inner.ConfTagService;
import com.ziroom.minsu.services.basedata.dto.ConfTagRequest;
import com.ziroom.minsu.services.basedata.dto.ConfTagVo;
import com.ziroom.minsu.services.basedata.service.ConfTagServiceImpl;
import com.ziroom.minsu.services.common.constant.MessageConst;
import java.util.List;
/**
* <p>
* 标签
* </p>
*
* <PRE>
* <BR> 修改记录
* <BR>-----------------------------------------------
* <BR> 修改日期 修改人 修改内容
* </PRE>
*
* @author zl
* @since 1.0
* @version 1.0
*/
@Component("basedata.confTagServiceProxy")
public class ConfTagServiceProxy implements ConfTagService {
private static final Logger LOGGER = LoggerFactory.getLogger(ConfTagServiceProxy.class);
@Resource(name = "basedata.confTagServiceImpl")
private ConfTagServiceImpl confTagServiceImpl;
@Resource(name = "basedata.messageSource")
private MessageSource messageSource;
@Override
public String findByConfTagRequest(String paramJson) {
DataTransferObject dto = new DataTransferObject();
try {
ConfTagRequest params = JsonEntityTransform.json2Entity(paramJson, ConfTagRequest.class);
PagingResult<ConfTagVo> pagingResult = confTagServiceImpl.findByConfTagRequest(params);
dto.putValue("total", pagingResult.getTotal());
dto.putValue("list", pagingResult.getRows());
} catch (Exception e) {
LogUtil.error(LOGGER, "查询标签列表异常, error={}", e);
dto.setErrCode(MessageSourceUtil.getIntMessage(messageSource, MessageConst.ERROR_CODE));
dto.setMsg(MessageSourceUtil.getChinese(messageSource, MessageConst.ERROR_CODE));
}
return dto.toJsonString();
}
@Override
public String findByConfTagRequestList(String paramJson) {
DataTransferObject dto = new DataTransferObject();
try {
ConfTagRequest params = JsonEntityTransform.json2Entity(paramJson, ConfTagRequest.class);
List<ConfTagVo> list = confTagServiceImpl.findByConfTagRequestList(params);
dto.putValue("list",list);
}catch (Exception e){
LogUtil.error(LOGGER, "查询标签列表异常, error={}", e);
dto.setErrCode(MessageSourceUtil.getIntMessage(messageSource, MessageConst.ERROR_CODE));
dto.setMsg(MessageSourceUtil.getChinese(messageSource, MessageConst.ERROR_CODE));
}
return dto.toJsonString();
}
@Override
public String addConfTag(String paramJson) {
DataTransferObject dto = new DataTransferObject();
try {
ConfTagEntity entity = JsonEntityTransform.json2Entity(paramJson, ConfTagEntity.class);
Integer num = confTagServiceImpl.addConfTag(entity);
dto.putValue("result", num);
} catch (Exception e) {
LogUtil.error(LOGGER, "添加标签异常 error:{}", e);
dto.setErrCode(MessageSourceUtil.getIntMessage(messageSource, MessageConst.ERROR_CODE));
dto.setMsg(MessageSourceUtil.getChinese(messageSource, MessageConst.ERROR_CODE));
}
return dto.toJsonString();
}
@Override
public String modifyTagName(String paramJson) {
DataTransferObject dto = new DataTransferObject();
try {
ConfTagEntity entity = JsonEntityTransform.json2Entity(paramJson, ConfTagEntity.class);
Integer num = confTagServiceImpl.modifyTagName(entity);
dto.putValue("result", num);
} catch (Exception e) {
LogUtil.error(LOGGER, "修改标签名称异常 error:{}", e);
dto.setErrCode(MessageSourceUtil.getIntMessage(messageSource, MessageConst.ERROR_CODE));
dto.setMsg(MessageSourceUtil.getChinese(messageSource, MessageConst.ERROR_CODE));
}
return dto.toJsonString();
}
@Override
public String modifyTagStatus(String paramJson) {
DataTransferObject dto = new DataTransferObject();
try {
ConfTagEntity entity = JsonEntityTransform.json2Entity(paramJson, ConfTagEntity.class);
Integer num = confTagServiceImpl.modifyTagStatus(entity);
dto.putValue("result", num);
} catch (Exception e) {
LogUtil.error(LOGGER, "修改标签有效状态异常 error:{}", e);
dto.setErrCode(MessageSourceUtil.getIntMessage(messageSource, MessageConst.ERROR_CODE));
dto.setMsg(MessageSourceUtil.getChinese(messageSource, MessageConst.ERROR_CODE));
}
return dto.toJsonString();
}
}
|
[
"068411Lsp"
] |
068411Lsp
|
326a151878699228905c9c6c9fd9444f4e8f1e3b
|
716aaaafbe43df30f460e1c82c12e3c3d8b98892
|
/OnsetJava-API/src/main/java/net/onfirenetwork/onsetjava/api/entity/Door.java
|
dc34737bf1e1763a783d372241f02f5d385c6581
|
[] |
no_license
|
NxeGamingNetwork/OnsetJava
|
ac772a9bad8f51955d6f0fb1dd531e6680bd8686
|
49fd680a00094bf708cc848b842f556e726d0c63
|
refs/heads/master
| 2020-09-22T13:04:27.149086
| 2019-10-11T20:06:16
| 2019-10-11T20:06:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 460
|
java
|
package net.onfirenetwork.onsetjava.api.entity;
import net.onfirenetwork.onsetjava.api.Dimension;
import net.onfirenetwork.onsetjava.api.enums.DoorModel;
import net.onfirenetwork.onsetjava.api.util.Location;
public interface Door {
int getId();
Dimension getDimension();
void setOpen(boolean open);
boolean isOpen();
DoorModel getModel();
Location getLocation();
void setLocation(Location location);
void remove();
}
|
[
"jan@bebendorf.eu"
] |
jan@bebendorf.eu
|
e6d2541790ca7cd4d94f4c018977977820ca3431
|
f4ffae93e42b6ba9bf3812dac2901fbfda224f0b
|
/app/src/main/java/com/ntam/tech/eyecare/api/modelRequest/LoginRequest.java
|
501ece6361423fb2262e35f76127e2265651a7a6
|
[] |
no_license
|
ahmed-bassiouny/Eye-Care
|
6c14b7167ef5dffefcb51478c7217339cc75e912
|
8f28ab9d3f4901bd2a822da0c74670a5b855afaa
|
refs/heads/master
| 2021-05-08T03:46:04.898875
| 2017-10-25T17:52:17
| 2017-10-25T17:52:17
| 108,308,506
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 281
|
java
|
package com.ntam.tech.eyecare.api.modelRequest;
/**
* Created by ahmed on 10/10/17.
*/
public class LoginRequest{
public static final String TOKEN_KEY = "register_id";
public static final String EMAIL_KEY = "name";
public static final String CODE_KEY = "code";
}
|
[
"ahmedbassiouny26@gmail.com"
] |
ahmedbassiouny26@gmail.com
|
a9c809046b8e5cb98320f6f3c17425f01cc61d74
|
1a6c88aadd6f8e929bb8100f0667a9a189b30202
|
/app/src/main/java/com/copasso/cocobill/model/MonthDetailModel.java
|
a509f0b59a9977e0db30f0c08e6581f4b21a82bd
|
[] |
no_license
|
xiashilin/CocoBill
|
e3079a0051ef1524a52d538347213186cc06685d
|
31e03eb65bf236ff50d7f93fd6d0ef769272917a
|
refs/heads/master
| 2021-04-28T09:08:47.055520
| 2018-02-10T14:10:43
| 2018-02-10T14:10:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 275
|
java
|
package com.copasso.cocobill.model;
public interface MonthDetailModel {
/**
* 每月账单详情
*/
void getMonthDetailBills(String id, String year, String month);
/**
* 删除账单
*/
void delete(int id);
void onUnsubscribe();
}
|
[
"375027533@qq.com"
] |
375027533@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.