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
a501cb1bc5e2b0030d3b9d88d4e0da312d8cbfed
c59595ed3e142591f6668d6cf68267ee6378bf58
/android/src/main/java/com/google/android/gms/internal/C0242s.java
9fc81c5896982ddb4b8b17b88c0b8e3967af25cc
[]
no_license
BBPL/ardrone
4c713a2e4808ddc54ae23c3bcaa4252d0f7b4b36
712c277850477b1115d5245885a4c5a6de3d57dc
refs/heads/master
2021-04-30T05:08:05.372486
2018-02-13T16:46:48
2018-02-13T16:46:48
121,408,031
1
1
null
null
null
null
UTF-8
Java
false
false
1,158
java
package com.google.android.gms.internal; public final class C0242s { public static void m1202a(boolean z) { if (!z) { throw new IllegalStateException(); } } public static void m1203a(boolean z, Object obj) { if (!z) { throw new IllegalStateException(String.valueOf(obj)); } } public static void m1204a(boolean z, String str, Object... objArr) { if (!z) { throw new IllegalArgumentException(String.format(str, objArr)); } } public static <T> T m1205b(T t, Object obj) { if (t != null) { return t; } throw new NullPointerException(String.valueOf(obj)); } public static void m1206b(boolean z, Object obj) { if (!z) { throw new IllegalArgumentException(String.valueOf(obj)); } } public static void m1207c(boolean z) { if (!z) { throw new IllegalArgumentException(); } } public static <T> T m1208d(T t) { if (t != null) { return t; } throw new NullPointerException("null reference"); } }
[ "feber.sm@gmail.com" ]
feber.sm@gmail.com
fd7715f139a87fb8af7b711de03c96b05a9b78ac
2c1544e5da0d8964abab8a99894c412b392990e0
/googleplay3/src/main/java/com/syl/googleplay3/holder/ItemInfoHolder.java
9c251f5304ca6db2ecb480613db9f796cc9fea6b
[]
no_license
Icarours/MyApplication1
d32026b5eb2c78ad8cdd858d21b6cbef98f10606
856010b6b652fab4e7d2333253c6ac1ef1455146
refs/heads/master
2021-07-17T20:03:36.756777
2018-12-04T15:58:55
2018-12-04T15:58:55
142,513,624
0
0
null
null
null
null
UTF-8
Java
false
false
8,673
java
package com.syl.googleplay3.holder; import android.view.View; import android.widget.ImageView; import android.widget.RatingBar; import android.widget.TextView; import com.bumptech.glide.Glide; import com.syl.googleplay3.R; import com.syl.googleplay3.base.BaseHolder; import com.syl.googleplay3.bean.DownLoadInfo; import com.syl.googleplay3.bean.ItemInfoBean; import com.syl.googleplay3.config.Constants; import com.syl.googleplay3.config.MyApplication; import com.syl.googleplay3.manager.DownloadManger; import com.syl.googleplay3.utils.CommonUtils; import com.syl.googleplay3.utils.PrintDownLoadInfo; import com.syl.googleplay3.utils.StringUtils; import com.syl.googleplay3.utils.UIUtils; import com.syl.googleplay3.view.ProgressView; import java.io.File; import butterknife.Bind; import butterknife.ButterKnife; import butterknife.OnClick; /** * Created by Bright on 2018/7/31. * * @Describe 1.提供视图, 2, 提供数据, 3.视图和数据的绑定 * @Called */ public class ItemInfoHolder extends BaseHolder<ItemInfoBean> implements DownloadManger.DownLoadInfoObserver{ @Bind(R.id.item_appinfo_iv_icon) ImageView mItemAppinfoIvIcon; @Bind(R.id.item_appinfo_tv_title) TextView mItemAppinfoTvTitle; @Bind(R.id.item_appinfo_rb_stars) RatingBar mItemAppinfoRbStars; @Bind(R.id.item_appinfo_tv_size) TextView mItemAppinfoTvSize; @Bind(R.id.item_appinfo_progressview) ProgressView mProgressview; @Bind(R.id.item_appinfo_tv_des) TextView mItemAppinfoTvDes; private ItemInfoBean mItemInfoBean; //初始化视图 public View initHolderView() { View holderView = View.inflate(UIUtils.getContext(), R.layout.item_info, null); ButterKnife.bind(this, holderView); return holderView; } //视图和数据的绑定 @Override public void refreshHolderView(ItemInfoBean itemInfoBean) { //保存数据到成员变量 mItemInfoBean = itemInfoBean; //data 局部变量 //view 成员变量 //view+data mItemAppinfoTvDes.setText(itemInfoBean.getDes()); mItemAppinfoTvSize.setText(StringUtils.formatFileSize(itemInfoBean.getSize())); mItemAppinfoTvTitle.setText(itemInfoBean.getName()); //重置itemInfoBean中progress的进度 mProgressview.setProgress(0); //评分的展示 mItemAppinfoRbStars.setRating(itemInfoBean.getStars()); //图片的加载 Glide.with(UIUtils.getContext()) .load(Constants.URLS.IMAGEBASEURL + itemInfoBean.getIconUrl()) .into(mItemAppinfoIvIcon); /*------------------ 2.根据不同的状态给用户提示 -----------------*/ //得到state-->得到DownloadInfoManager-->DownloadInfo DownLoadInfo downLoadInfo = DownloadManger.getInstance().getDownLoadInfo(itemInfoBean); refreshProgressViewUI(downLoadInfo); } private void refreshProgressViewUI(DownLoadInfo downLoadInfo) { int state = downLoadInfo.state; switch (state) { case DownloadManger.STATE_UNDOWNLOAD://如果是未下载,提示图标下载 mProgressview.setTvNote("下载"); mProgressview.setIvIcon(R.drawable.ic_download); break; case DownloadManger.STATE_DOWNLOADING://如果是下载中,提示图标暂停下载 mProgressview.setIvIcon(R.drawable.ic_pause); mProgressview.setIsProgressEnable(true); int index = (int) (downLoadInfo.progress * 100.0f / downLoadInfo.max + .5f); mProgressview.setTvNote(index + "%"); mProgressview.setMax(downLoadInfo.max); mProgressview.setProgress(downLoadInfo.progress); break; case DownloadManger.STATE_PAUSEDOWNLOAD://如果是暂停下载,提示图标继续下载 mProgressview.setIvIcon(R.drawable.ic_resume); mProgressview.setTvNote("继续下载"); break; case DownloadManger.STATE_WAITINGDOWNLOAD://如果是等待下载,提示图标暂停下载 mProgressview.setIvIcon(R.drawable.ic_pause); mProgressview.setTvNote("等待中"); break; case DownloadManger.STATE_DOWNLOADFAILED://如果是下载失败,提示图标重试 mProgressview.setIvIcon(R.drawable.ic_redownload); mProgressview.setTvNote("重试"); break; case DownloadManger.STATE_DOWNLOADED://如果是下载完成,提示图标已安装 mProgressview.setIvIcon(R.drawable.ic_install); mProgressview.setTvNote("安装"); mProgressview.setIsProgressEnable(false); break; case DownloadManger.STATE_INSTALLED://如果是已安装,提示图标已安装 mProgressview.setIvIcon(R.drawable.ic_install); mProgressview.setTvNote("打开"); break; default: break; } } @OnClick(R.id.item_appinfo_progressview) public void clickProgressView(View view) { /*------------------ 3.根据不同的状态触发不同的操作 -----------------*/ //得到state-->得到DownloadInfoManager-->DownloadInfo DownLoadInfo downLoadInfo = DownloadManger.getInstance().getDownLoadInfo(mItemInfoBean); int state = downLoadInfo.state; switch (state) { case DownloadManger.STATE_UNDOWNLOAD://如果是未下载,去下载 doDownload(downLoadInfo); break; case DownloadManger.STATE_DOWNLOADING://如果是下载中,暂停下载 pauseDownload(downLoadInfo); break; case DownloadManger.STATE_PAUSEDOWNLOAD://如果是暂停下载,断点继续下载 doDownload(downLoadInfo); break; case DownloadManger.STATE_WAITINGDOWNLOAD://如果是等待下载,取消下载 cancelDownload(downLoadInfo); break; case DownloadManger.STATE_DOWNLOADFAILED://如果是下载失败,重试下载 doDownload(downLoadInfo); break; case DownloadManger.STATE_DOWNLOADED://如果是下载完成,安装应用 installApk(downLoadInfo); break; case DownloadManger.STATE_INSTALLED://如果是已安装,打开应用 openApk(downLoadInfo); break; default: break; } } /** * 打开apk * * @param downLoadInfo */ private void openApk(DownLoadInfo downLoadInfo) { CommonUtils.openApp(UIUtils.getContext(), downLoadInfo.packageName); } /** * 安装apk * * @param downLoadInfo */ private void installApk(DownLoadInfo downLoadInfo) { String savePath = downLoadInfo.savePath; File saveFile = new File(savePath); CommonUtils.installApp(UIUtils.getContext(), saveFile); } /** * 取消下载 * * @param downLoadInfo */ private void cancelDownload(DownLoadInfo downLoadInfo) { DownloadManger.getInstance().cancelDownLoad(downLoadInfo); } /** * 暂停下载 * * @param downLoadInfo */ private void pauseDownload(DownLoadInfo downLoadInfo) { DownloadManger.getInstance().pauseDownLoad(downLoadInfo); } /** * 1.开始下载,2.断点继续下载,3.重试 * * @param downLoadInfo */ private void doDownload(DownLoadInfo downLoadInfo) { DownloadManger.getInstance().downLoad(downLoadInfo); } /** * 收到DownLoadInfo改变的通知 * 发布消息在子线程,收到消息也在子线程 * 发布消息在主线程,收到消息也在子线程 * * @param downLoadInfo */ @Override public void onDownLoadInfoUpdate(final DownLoadInfo downLoadInfo) { PrintDownLoadInfo.printDownLoadInfo(downLoadInfo); //过滤观察者downLoadInfo,被观察者会通知所有的观察者更新UI.我们只需要当前的观察者接收到通知,并更新UI.否则,直接返回 if (!downLoadInfo.packageName.equals(mItemInfoBean.getPackageName())) { return; } //将更新UI的任务交给主线程,添加到子线程的handler中. MyApplication.getMainThreadHandler().post(new Runnable() { @Override public void run() { refreshProgressViewUI(downLoadInfo); } }); } }
[ "j376787348@163.com" ]
j376787348@163.com
6242e2e28aad846384d6246ebfbf5439026459b4
493a8065cf8ec4a4ccdf136170d505248ac03399
/net.sf.ictalive.coordination.wfannotation.bpel.diagram.diagram/src/net/sf/ictalive/coordination/wfannotation/bpel/diagram/bpeldiag/diagram/edit/policies/Validate9ItemSemanticEditPolicy.java
5807fa33b45f07447d14c19f82ea9118ff3ff5a9
[]
no_license
ignasi-gomez/aliveclipse
593611b2d471ee313650faeefbed591c17beaa50
9dd2353c886f60012b4ee4fe8b678d56972dff97
refs/heads/master
2021-01-14T09:08:24.839952
2014-10-09T14:21:01
2014-10-09T14:21:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,574
java
package net.sf.ictalive.coordination.wfannotation.bpel.diagram.bpeldiag.diagram.edit.policies; import net.sf.ictalive.coordination.wfannotation.bpel.diagram.bpeldiag.diagram.providers.BpeldiagElementTypes; import org.eclipse.emf.ecore.EAnnotation; import org.eclipse.gef.commands.Command; import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand; import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand; import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand; import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; import org.eclipse.gmf.runtime.notation.View; /** * @generated */ public class Validate9ItemSemanticEditPolicy extends BpeldiagBaseItemSemanticEditPolicy { /** * @generated */ public Validate9ItemSemanticEditPolicy() { super(BpeldiagElementTypes.Validate_3224); } /** * @generated */ protected Command getDestroyElementCommand(DestroyElementRequest req) { View view = (View) getHost().getModel(); CompositeTransactionalCommand cmd = new CompositeTransactionalCommand( getEditingDomain(), null); cmd.setTransactionNestingEnabled(false); EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$ if (annotation == null) { // there are indirectly referenced children, need extra commands: false addDestroyShortcutsCommand(cmd, view); // delete host element cmd.add(new DestroyElementCommand(req)); } else { cmd.add(new DeleteCommand(getEditingDomain(), view)); } return getGEFWrapper(cmd.reduce()); } }
[ "salvarez@lsi.upc.edu" ]
salvarez@lsi.upc.edu
5ca31b877c207cd85b955e0a8b2ea968e290320d
58a45011b5308ff90b5f3204124fd2fb9e1227b6
/app/src/main/java/com/webmyne/connect/Utils/PrefUtils.java
70dd4046a85889fb8323e0632c51f72d54bfaa76
[]
no_license
rsv355/Connect
d2b9cb3e73349d2929efeb4590b6a372538521e4
fbb453b95764c951d07c38510a13e1bd0f409085
refs/heads/master
2021-01-19T03:17:09.542973
2016-07-08T13:48:36
2016-07-08T13:48:36
51,826,245
0
0
null
null
null
null
UTF-8
Java
false
false
667
java
package com.webmyne.connect.Utils; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; /** * Created by Android on 23-02-2015. */ public class PrefUtils { public static boolean isActiveLead(Context context) { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context); return sp.getBoolean("ActiveLeadStatus", false); } public static void setActiveLead(Context context, boolean val) { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context); sp.edit().putBoolean("ActiveLeadStatus", val).commit(); } }
[ "softeng.krishna@gmail.com" ]
softeng.krishna@gmail.com
43b891c2cedcf367750584606b4a89f0e408510f
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app71/source/com/fastfun/sdk/mmlog318/h.java
5b56ec4c4646ccc88f73c80c731171d414e989b2
[ "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
4,316
java
package com.fastfun.sdk.mmlog318; import android.util.Base64; import java.io.ByteArrayOutputStream; import java.security.KeyFactory; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; import java.security.spec.PKCS8EncodedKeySpec; import java.security.spec.X509EncodedKeySpec; import javax.crypto.Cipher; public final class h { private static RSAPrivateKey a; private static RSAPublicKey b; public h() {} private static void a() { if ((b == null) || (a == null)) { localObject = null; } try { KeyPairGenerator localKeyPairGenerator = KeyPairGenerator.getInstance("RSA"); localObject = localKeyPairGenerator; } catch (NoSuchAlgorithmException localNoSuchAlgorithmException) { for (;;) { localNoSuchAlgorithmException.printStackTrace(); } } ((KeyPairGenerator)localObject).initialize(1024, new SecureRandom()); Object localObject = ((KeyPairGenerator)localObject).generateKeyPair(); b = (RSAPublicKey)((KeyPair)localObject).getPublic(); a = (RSAPrivateKey)((KeyPair)localObject).getPrivate(); } public static byte[] a(byte[] paramArrayOfByte, String paramString) { if ((paramArrayOfByte != null) && (paramString != null)) { paramString = new X509EncodedKeySpec(Base64.decode(paramString, 0)); paramString = KeyFactory.getInstance("RSA").generatePublic(paramString); Cipher localCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); localCipher.init(1, paramString); int k = paramArrayOfByte.length; ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream(); int i = 0; int j = 0; if (k - i <= 0) { paramArrayOfByte = localByteArrayOutputStream.toByteArray(); localByteArrayOutputStream.close(); return paramArrayOfByte; } if (k - i > 117) {} for (paramString = localCipher.doFinal(paramArrayOfByte, i, 117);; paramString = localCipher.doFinal(paramArrayOfByte, i, k - i)) { localByteArrayOutputStream.write(paramString, 0, paramString.length); j += 1; i = j * 117; break; } } throw new IllegalArgumentException("encryptByPublicKey data||publicKey is null"); } private static String b() { return Base64.encodeToString(a.getEncoded(), 2); } private static byte[] b(byte[] paramArrayOfByte, String paramString) { Object localObject2 = null; int i = 0; if (paramString == null) { return null; } Object localObject1 = localObject2; Cipher localCipher; int k; ByteArrayOutputStream localByteArrayOutputStream; int j; try { paramString = new PKCS8EncodedKeySpec(Base64.decode(paramString, 0)); localObject1 = localObject2; paramString = KeyFactory.getInstance("RSA").generatePrivate(paramString); localObject1 = localObject2; localCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); localObject1 = localObject2; localCipher.init(2, paramString); localObject1 = localObject2; k = paramArrayOfByte.length; localObject1 = localObject2; localByteArrayOutputStream = new ByteArrayOutputStream(); j = 0; if (k - i <= 0) { localObject1 = localObject2; paramArrayOfByte = localByteArrayOutputStream.toByteArray(); localObject1 = paramArrayOfByte; localByteArrayOutputStream.close(); return paramArrayOfByte; } } catch (Exception paramArrayOfByte) { paramArrayOfByte.printStackTrace(); return localObject1; } if (k - i > 128) { localObject1 = localObject2; } for (paramString = localCipher.doFinal(paramArrayOfByte, i, 128);; paramString = localCipher.doFinal(paramArrayOfByte, i, k - i)) { localObject1 = localObject2; localByteArrayOutputStream.write(paramString, 0, paramString.length); j += 1; i = j * 128; break; localObject1 = localObject2; } } private static String c() { return Base64.encodeToString(b.getEncoded(), 2); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
fc862b2abf0f9b07c4357c18b8c7a9d90c342bce
05e5bee54209901d233f4bfa425eb6702970d6ab
/net/minecraft/server/v1_7_R4/EnchantmentProtection.java
62f52ffef54ec65dae647553e1aa94d4515810e4
[]
no_license
TheShermanTanker/PaperSpigot-1.7.10
23f51ff301e7eb05ef6a3d6999dd2c62175c270f
ea9d33bcd075e00db27b7f26450f9dc8e6d18262
refs/heads/master
2022-12-24T10:32:09.048106
2020-09-25T15:43:22
2020-09-25T15:43:22
298,614,646
0
1
null
null
null
null
UTF-8
Java
false
false
3,958
java
/* */ package net.minecraft.server.v1_7_R4; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class EnchantmentProtection /* */ extends Enchantment /* */ { /* 14 */ private static final String[] E = new String[] { "all", "fire", "fall", "explosion", "projectile" }; /* */ /* */ /* */ /* 18 */ private static final int[] F = new int[] { 1, 10, 5, 5, 3 }; /* */ /* */ /* */ /* 22 */ private static final int[] G = new int[] { 11, 8, 6, 8, 6 }; /* */ /* */ /* */ /* 26 */ private static final int[] H = new int[] { 20, 12, 10, 12, 15 }; /* */ /* */ /* */ public final int a; /* */ /* */ /* */ public EnchantmentProtection(int paramInt1, int paramInt2, int paramInt3) { /* 33 */ super(paramInt1, paramInt2, EnchantmentSlotType.ARMOR); /* 34 */ this.a = paramInt3; /* */ /* 36 */ if (paramInt3 == 2) { /* 37 */ this.slot = EnchantmentSlotType.ARMOR_FEET; /* */ } /* */ } /* */ /* */ /* */ public int a(int paramInt) { /* 43 */ return F[this.a] + (paramInt - 1) * G[this.a]; /* */ } /* */ /* */ /* */ public int b(int paramInt) { /* 48 */ return a(paramInt) + H[this.a]; /* */ } /* */ /* */ /* */ public int getMaxLevel() { /* 53 */ return 4; /* */ } /* */ /* */ /* */ public int a(int paramInt, DamageSource paramDamageSource) { /* 58 */ if (paramDamageSource.ignoresInvulnerability()) return 0; /* */ /* 60 */ float f = (6 + paramInt * paramInt) / 3.0F; /* */ /* 62 */ if (this.a == 0) return MathHelper.d(f * 0.75F); /* 63 */ if (this.a == 1 && paramDamageSource.o()) return MathHelper.d(f * 1.25F); /* 64 */ if (this.a == 2 && paramDamageSource == DamageSource.FALL) return MathHelper.d(f * 2.5F); /* 65 */ if (this.a == 3 && paramDamageSource.isExplosion()) return MathHelper.d(f * 1.5F); /* 66 */ if (this.a == 4 && paramDamageSource.a()) return MathHelper.d(f * 1.5F); /* 67 */ return 0; /* */ } /* */ /* */ /* */ public String a() { /* 72 */ return "enchantment.protect." + E[this.a]; /* */ } /* */ /* */ /* */ public boolean a(Enchantment paramEnchantment) { /* 77 */ if (paramEnchantment instanceof EnchantmentProtection) { /* 78 */ EnchantmentProtection enchantmentProtection = (EnchantmentProtection)paramEnchantment; /* */ /* 80 */ if (enchantmentProtection.a == this.a) { /* 81 */ return false; /* */ } /* 83 */ if (this.a == 2 || enchantmentProtection.a == 2) { /* 84 */ return true; /* */ } /* 86 */ return false; /* */ } /* 88 */ return super.a(paramEnchantment); /* */ } /* */ /* */ public static int a(Entity paramEntity, int paramInt) { /* 92 */ int i = EnchantmentManager.getEnchantmentLevel(Enchantment.PROTECTION_FIRE.id, paramEntity.getEquipment()); /* */ /* 94 */ if (i > 0) { /* 95 */ paramInt -= MathHelper.d(paramInt * i * 0.15F); /* */ } /* */ /* 98 */ return paramInt; /* */ } /* */ /* */ public static double a(Entity paramEntity, double paramDouble) { /* 102 */ int i = EnchantmentManager.getEnchantmentLevel(Enchantment.PROTECTION_EXPLOSIONS.id, paramEntity.getEquipment()); /* */ /* 104 */ if (i > 0) { /* 105 */ paramDouble -= MathHelper.floor(paramDouble * (i * 0.15F)); /* */ } /* */ /* 108 */ return paramDouble; /* */ } /* */ } /* Location: D:\Paper-1.7.10\PaperSpigot-1.7.10-R0.1-SNAPSHOT-latest.jar!\net\minecraft\server\v1_7_R4\EnchantmentProtection.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
3bd38af66826683afb9f1bf565b50c2d1a69b851
14746c4b8511abe301fd470a152de627327fe720
/soroush-android-1.10.0_source_from_JADX/mobi/mmdt/ott/lib_webservicescomponent/retrofit/webservices/payment/create/CreatePaymentResponse.java
3f2850df3dc1a8825188d006ab4ea781ea7308f9
[]
no_license
maasalan/soroush-messenger-apis
3005c4a43123c6543dbcca3dd9084f95e934a6f4
29867bf53a113a30b1aa36719b1c7899b991d0a8
refs/heads/master
2020-03-21T21:23:20.693794
2018-06-28T19:57:01
2018-06-28T19:57:01
139,060,676
3
2
null
null
null
null
UTF-8
Java
false
false
672
java
package mobi.mmdt.ott.lib_webservicescomponent.retrofit.webservices.payment.create; import com.google.p164b.p165a.C1902a; import com.google.p164b.p165a.C1904c; import mobi.mmdt.ott.lib_webservicescomponent.retrofit.webservices.base.data_models.BaseResponse; public class CreatePaymentResponse extends BaseResponse { @C1902a @C1904c(a = "PaymentId") private String paymentId; public CreatePaymentResponse(int i, String str, String str2) { super(i, str); this.paymentId = str2; } public String getPaymentId() { return this.paymentId; } public void setPaymentId(String str) { this.paymentId = str; } }
[ "Maasalan@riseup.net" ]
Maasalan@riseup.net
63191b7a20343d25aca76b99c95ccf05fa5fa12c
c9cd80e3adca2a79f5ead19666d50403f022575c
/L2J_DataPack/dist/game/data/scripts/handlers/effecthandlers/CallPc.java
a054972202c9e02e7cd27b15dd98044fc4055e5b
[]
no_license
soultobe/ZersiaHi5_FinalEdition
38206f6db200476a93588a4d416f284c75a5db7a
5b17cb59ea306857800a409f8ce740c2cd7ef002
refs/heads/master
2021-01-16T18:29:21.730050
2015-09-24T07:19:28
2015-09-24T07:19:28
39,416,518
0
0
null
null
null
null
UTF-8
Java
false
false
6,294
java
/* * Copyright (C) 2004-2015 L2J DataPack * * This file is part of L2J DataPack. * * L2J DataPack 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. * * L2J DataPack 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 handlers.effecthandlers; import com.l2jserver.Config; import com.l2jserver.gameserver.SevenSigns; import com.l2jserver.gameserver.instancemanager.InstanceManager; import com.l2jserver.gameserver.model.StatsSet; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.conditions.Condition; import com.l2jserver.gameserver.model.effects.AbstractEffect; import com.l2jserver.gameserver.model.entity.Instance; import com.l2jserver.gameserver.model.entity.TvTEvent; import com.l2jserver.gameserver.model.holders.SummonRequestHolder; import com.l2jserver.gameserver.model.skills.BuffInfo; import com.l2jserver.gameserver.model.zone.ZoneId; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ConfirmDlg; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; /** * Call Pc effect implementation. * @author Adry_85 */ public final class CallPc extends AbstractEffect { private final int _itemId; private final int _itemCount; public CallPc(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params) { super(attachCond, applyCond, set, params); _itemId = params.getInt("itemId", 0); _itemCount = params.getInt("itemCount", 0); } @Override public boolean isInstant() { return true; } @Override public void onStart(BuffInfo info) { if (info.getEffected() == info.getEffector()) { return; } L2PcInstance target = info.getEffected().getActingPlayer(); L2PcInstance activeChar = info.getEffector().getActingPlayer(); if (checkSummonTargetStatus(target, activeChar)) { if ((_itemId != 0) && (_itemCount != 0)) { if (target.getInventory().getInventoryItemCount(_itemId, 0) < _itemCount) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_REQUIRED_FOR_SUMMONING); sm.addItemName(_itemId); target.sendPacket(sm); return; } target.getInventory().destroyItemByItemId("Consume", _itemId, _itemCount, activeChar, target); SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_DISAPPEARED); sm.addItemName(_itemId); target.sendPacket(sm); } target.addScript(new SummonRequestHolder(activeChar, info.getSkill())); final ConfirmDlg confirm = new ConfirmDlg(SystemMessageId.C1_WISHES_TO_SUMMON_YOU_FROM_S2_DO_YOU_ACCEPT.getId()); confirm.addCharName(activeChar); confirm.addZoneName(activeChar.getX(), activeChar.getY(), activeChar.getZ()); confirm.addTime(30000); confirm.addRequesterId(activeChar.getObjectId()); target.sendPacket(confirm); } } public static boolean checkSummonTargetStatus(L2PcInstance target, L2PcInstance activeChar) { if (target == activeChar) { return false; } if (target.isAlikeDead()) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_DEAD_AT_THE_MOMENT_AND_CANNOT_BE_SUMMONED); sm.addPcName(target); activeChar.sendPacket(sm); return false; } if (target.isInStoreMode()) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_CURRENTLY_TRADING_OR_OPERATING_PRIVATE_STORE_AND_CANNOT_BE_SUMMONED); sm.addPcName(target); activeChar.sendPacket(sm); return false; } if (target.isRooted() || target.isInCombat()) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_ENGAGED_IN_COMBAT_AND_CANNOT_BE_SUMMONED); sm.addPcName(target); activeChar.sendPacket(sm); return false; } if (target.isInOlympiadMode()) { activeChar.sendPacket(SystemMessageId.YOU_CANNOT_SUMMON_PLAYERS_WHO_ARE_IN_OLYMPIAD); return false; } if (target.isFestivalParticipant() || target.isFlyingMounted() || target.isCombatFlagEquipped() || !TvTEvent.onEscapeUse(target.getObjectId())) { activeChar.sendPacket(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING); return false; } if (target.inObserverMode()) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_STATE_FORBIDS_SUMMONING); sm.addCharName(target); activeChar.sendPacket(sm); return false; } if (target.isInsideZone(ZoneId.NO_SUMMON_FRIEND) || target.isInsideZone(ZoneId.JAIL)) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IN_SUMMON_BLOCKING_AREA); sm.addString(target.getName()); activeChar.sendPacket(sm); return false; } if (activeChar.getInstanceId() > 0) { Instance summonerInstance = InstanceManager.getInstance().getInstance(activeChar.getInstanceId()); if (!Config.ALLOW_SUMMON_IN_INSTANCE || !summonerInstance.isSummonAllowed()) { activeChar.sendPacket(SystemMessageId.YOU_MAY_NOT_SUMMON_FROM_YOUR_CURRENT_LOCATION); return false; } } // TODO: on retail character can enter 7s dungeon with summon friend, but should be teleported away by mobs, because currently this is not working in L2J we do not allowing summoning. if (activeChar.isIn7sDungeon()) { int targetCabal = SevenSigns.getInstance().getPlayerCabal(target.getObjectId()); if (SevenSigns.getInstance().isSealValidationPeriod()) { if (targetCabal != SevenSigns.getInstance().getCabalHighestScore()) { activeChar.sendPacket(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING); return false; } } else if (targetCabal == SevenSigns.CABAL_NULL) { activeChar.sendPacket(SystemMessageId.YOUR_TARGET_IS_IN_AN_AREA_WHICH_BLOCKS_SUMMONING); return false; } } return true; } }
[ "kim@tsnet-j.co.jp" ]
kim@tsnet-j.co.jp
6c45d4ee5c4a05a930476ca72d3d5be12a4e3a94
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/fc/acct/rec/FC_ACCT_7001_LCURLISTRecord.java
9b2feb62734834711ad3917ea4e384c9fa2e1331
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
3,425
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 독자우대-구독신청 * 작성일자 : 2007-05-22 * 작성자 : 김대섭 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.fc.acct.rec; import java.sql.*; import chosun.ciis.fc.acct.dm.*; import chosun.ciis.fc.acct.ds.*; /** * */ public class FC_ACCT_7001_LCURLISTRecord extends java.lang.Object implements java.io.Serializable{ public String card_mang_no; public String card_no; public String use_pers_emp_no; public String use_pers_emp_nm; public String issu_dt; public String mtry_dt; public String decid_dd; public String wste_dt; public String dlco_cd; public String decid_bank_cd; public String bank_nm; public String memb_dnmn; public String use_yn; public String corp_card_clsf; public FC_ACCT_7001_LCURLISTRecord(){} public void setCard_mang_no(String card_mang_no){ this.card_mang_no = card_mang_no; } public void setCard_no(String card_no){ this.card_no = card_no; } public void setUse_pers_emp_no(String use_pers_emp_no){ this.use_pers_emp_no = use_pers_emp_no; } public void setUse_pers_emp_nm(String use_pers_emp_nm){ this.use_pers_emp_nm = use_pers_emp_nm; } public void setIssu_dt(String issu_dt){ this.issu_dt = issu_dt; } public void setMtry_dt(String mtry_dt){ this.mtry_dt = mtry_dt; } public void setDecid_dd(String decid_dd){ this.decid_dd = decid_dd; } public void setWste_dt(String wste_dt){ this.wste_dt = wste_dt; } public void setDlco_cd(String dlco_cd){ this.dlco_cd = dlco_cd; } public void setDecid_bank_cd(String decid_bank_cd){ this.decid_bank_cd = decid_bank_cd; } public void setBank_nm(String bank_nm){ this.bank_nm = bank_nm; } public void setMemb_dnmn(String memb_dnmn){ this.memb_dnmn = memb_dnmn; } public void setUse_yn(String use_yn){ this.use_yn = use_yn; } public void setCorp_card_clsf(String corp_card_clsf){ this.corp_card_clsf = corp_card_clsf; } public String getCard_mang_no(){ return this.card_mang_no; } public String getCard_no(){ return this.card_no; } public String getUse_pers_emp_no(){ return this.use_pers_emp_no; } public String getUse_pers_emp_nm(){ return this.use_pers_emp_nm; } public String getIssu_dt(){ return this.issu_dt; } public String getMtry_dt(){ return this.mtry_dt; } public String getDecid_dd(){ return this.decid_dd; } public String getWste_dt(){ return this.wste_dt; } public String getDlco_cd(){ return this.dlco_cd; } public String getDecid_bank_cd(){ return this.decid_bank_cd; } public String getBank_nm(){ return this.bank_nm; } public String getMemb_dnmn(){ return this.memb_dnmn; } public String getUse_yn(){ return this.use_yn; } public String getCorp_card_clsf(){ return this.corp_card_clsf; } } /* 작성시간 : Fri Mar 06 13:21:09 KST 2009 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
ae3655d5dc8549ccc36f30a3ca32e7e4df3348ab
a88404e860f9e81f175d80c51b8e735fa499c93c
/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/model/Property.java
f1c7d597de5473beac0d0fdcdd55dd15c85af2be
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
sabri0/hapi-fhir
4a53409d31b7f40afe088aa0ee8b946860b8372d
c7798fee4880ee8ffc9ed2e42c29c3b8f6753a1c
refs/heads/master
2020-06-07T20:02:33.258075
2019-06-18T09:40:00
2019-06-18T09:40:00
193,081,738
2
0
Apache-2.0
2019-06-21T10:46:17
2019-06-21T10:46:17
null
UTF-8
Java
false
false
3,350
java
package org.hl7.fhir.dstu2016may.model; import java.util.ArrayList; import java.util.List; /** * A child element or property defined by the FHIR specification * This class is defined as a helper class when iterating the * children of an element in a generic fashion * * At present, iteration is only based on the specification, but * this may be changed to allow profile based expression at a * later date * * note: there's no point in creating one of these classes outside this package */ public class Property { /** * The name of the property as found in the FHIR specification */ private String name; /** * The type of the property as specified in the FHIR specification (e.g. type|type|Reference(Name|Name) */ private String typeCode; /** * The formal definition of the element given in the FHIR specification */ private String definition; /** * The minimum allowed cardinality - 0 or 1 when based on the specification */ private int minCardinality; /** * The maximum allowed cardinality - 1 or MAX_INT when based on the specification */ private int maxCardinality; /** * The actual elements that exist on this instance */ private List<Base> values = new ArrayList<Base>(); /** * For run time, if/once a property is hooked up to it's definition */ private StructureDefinition structure; /** * Internal constructor */ public Property(String name, String typeCode, String definition, int minCardinality, int maxCardinality, Base value) { super(); this.name = name; this.typeCode = typeCode; this.definition = definition; this.minCardinality = minCardinality; this.maxCardinality = maxCardinality; this.values.add(value); } /** * Internal constructor */ public Property(String name, String typeCode, String definition, int minCardinality, int maxCardinality, List<? extends Base> values) { super(); this.name = name; this.typeCode = typeCode; this.definition = definition; this.minCardinality = minCardinality; this.maxCardinality = maxCardinality; if (values != null) this.values.addAll(values); } /** * @return The name of this property in the FHIR Specification */ public String getName() { return name; } /** * @return The stated type in the FHIR specification */ public String getTypeCode() { return typeCode; } /** * @return The definition of this element in the FHIR spec */ public String getDefinition() { return definition; } /** * @return the minimum cardinality for this element */ public int getMinCardinality() { return minCardinality; } /** * @return the maximum cardinality for this element */ public int getMaxCardinality() { return maxCardinality; } /** * @return the actual values - will only be 1 unless maximum cardinality == MAX_INT */ public List<Base> getValues() { return values; } public boolean hasValues() { for (Base e : getValues()) if (e != null) return true; return false; } public StructureDefinition getStructure() { return structure; } public void setStructure(StructureDefinition structure) { this.structure = structure; } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
3363a9f054b2b4d71b8971967f4d5f54376247fd
a72ad34928ec9242732e123d7f0acdd6bc53d5f9
/Cadma/src/br/com/cadma/Produtos.java
405f00631f4dad7eb3212286e6aa2527776ba16a
[]
no_license
lcarrafabr/cadma
2e35c6e30541ff21cc26a0229675d826cb17617f
fe3925301d1b0157965768f5f587a06befe57bee
refs/heads/master
2020-04-23T05:04:11.113235
2019-02-15T21:13:18
2019-02-15T21:13:18
170,928,660
0
0
null
null
null
null
UTF-8
Java
false
false
7,095
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package br.com.cadma; import java.io.Serializable; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.JOptionPane; /** * * @author Vitiazze */ public class Produtos implements Serializable { private static final long serialVersionUID = 1L; private Integer codProduto; private String produto; private Float quantidade; private String especificacao; private Double valorUnit; public Produtos() { } public Produtos(Integer codProduto) { this.codProduto = codProduto; } public Integer getCodProduto() { return codProduto; } public void setCodProduto(Integer codProduto) { this.codProduto = codProduto; } public String getProduto() { return produto; } public void setProduto(String produto) { this.produto = produto; } public Float getQuantidade() { return quantidade; } public void setQuantidade(Float quantidade) { this.quantidade = quantidade; } public String getEspecificacao() { return especificacao; } public void setEspecificacao(String especificacao) { this.especificacao = especificacao; } public Double getValorUnit() { return valorUnit; } public void setValorUnit(double valorUnit) { this.valorUnit = valorUnit; } @Override public int hashCode() { int hash = 0; hash += (codProduto != null ? codProduto.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Produtos)) { return false; } Produtos other = (Produtos) object; if ((this.codProduto == null && other.codProduto != null) || (this.codProduto != null && !this.codProduto.equals(other.codProduto))) { return false; } return true; } @Override public String toString() { return "br.com.cadma.Produtos[codProduto=" + codProduto + "]"; } void setCadastrar(ClassConecta conexao){ try{ String comando = "INSERT INTO produtos "+ " (codProduto, "+ " produto, "+ " quantidade, "+ " especificacao, "+ " valorUnit "+ " ) "+ " VALUES "+ " (null, "+ " ?, "+ " ?, "+ " ?," + " ? "+ " ); " ; System.out.println("Executando operação..."); PreparedStatement stmt = (PreparedStatement) conexao.con.prepareStatement(comando); stmt.setString(1,getProduto()); stmt.setFloat(2,getQuantidade()); stmt.setString(3,getEspecificacao()); stmt.setDouble(4,getValorUnit()); stmt.execute(); //System.out.println("Transação Concluída"); //JOptionPane.showMessageDialog(null, "Transação Concluída", "ATENÇÃO", JOptionPane.WARNING_MESSAGE); }catch(Exception e){ System.err.println("Erro na Transação\n"+e); JOptionPane.showMessageDialog(null, "Erro na Transação", "ATENÇÃO", JOptionPane.ERROR_MESSAGE); } } public ResultSet getConsultar(ClassConecta conexao) throws SQLException { ResultSet resultSet = null; try { String comando; comando = "select * " + "from produtos "+ "where codProduto = codProduto "; int quantParam = 0; if (getCodProduto() != null){ comando = comando + " AND codProduto = ? "; } comando = comando + " order by codProduto "; //O parâmetro resultSetType define se o ResultSet irá ser navegável e posicionado ou não: //ResultSet.TYPE_FORWARD_ONLY: com este parâmetro o ResultSet não poderá ser navegável, ou seja, poderemos somente avançar no objeto ResultSet para poder buscar valores. //ResultSet.TYPE_SCROLL_INSENSITIVE: com este parâmetro o ResultSet poderá ser navegável em qualquer direção, para frente e para trás, e será insensível a mudanças feitas por outras transações ou por outros Statements da mesma transação. //ResultSet.TYPE_SCROLL_SENSITIVE: com este parâmetro o ResultSet poderá ser navegável para qualquer direção, e será sensível a mudanças feitas por outras transações ou por outros Statements da mesma transação. java.sql.PreparedStatement stmtQuery = conexao.con.prepareStatement(comando); if (getCodProduto() != null){ quantParam = quantParam +1; stmtQuery.setInt(quantParam, getCodProduto()); } resultSet = stmtQuery.executeQuery(); } catch (SQLException sqlex) { JOptionPane.showMessageDialog(null,"Não foi Possivél executar o comando sql" + sqlex); } return resultSet; } void setAlterar(ClassConecta conexao){ try{ //ClassConecta conexao = new ClassConecta(); //conexao.conecta(); String comando = "UPDATE produtos "+ " SET "+ " produto = ?, "+ " quantidade = ?, "+ " valorUnit = ?, "+ " especificacao = ? "+ " WHERE "+ " codProduto = ?"; System.out.println("Executando operação..."); PreparedStatement stmt = (PreparedStatement) conexao.con.prepareStatement(comando); stmt.setString(1, getProduto()); stmt.setFloat(2, getQuantidade()); stmt.setDouble(3, getValorUnit()); stmt.setString(4, getEspecificacao()); stmt.setInt(5, getCodProduto()); stmt.executeUpdate(); System.out.println("Transação Concluída"); JOptionPane.showMessageDialog(null, "O REGISTRO foi salvo com sucesso.", "ATENÇÃO", JOptionPane.INFORMATION_MESSAGE); }catch(Exception e){ System.err.println("Erro na Transação\n"+e); JOptionPane.showMessageDialog(null, "Erro na Transação", "ATENÇÃO", JOptionPane.ERROR_MESSAGE); } } void setExcluir(ClassConecta conexao){ try{ //ClassConecta conexao = new ClassConecta(); //conexao.conecta(); String comando = " DELETE FROM produtos "+ " WHERE "+ " codProduto = ? "; PreparedStatement stmt = (PreparedStatement) conexao.con.prepareStatement(comando); //Formatar data Prevista stmt.setInt(1,getCodProduto()); stmt.executeUpdate(); //System.out.println("Transação Concluída"); JOptionPane.showMessageDialog(null, "O REGISTRO foi excluído com sucesso.", "ATENÇÃO", JOptionPane.INFORMATION_MESSAGE); }catch(Exception e){ System.err.println("Erro na Transação\n"+e); JOptionPane.showMessageDialog(null, "Erro na Transação", "ATENÇÃO", JOptionPane.ERROR_MESSAGE); } } }
[ "lcarrafa.br@gmail.com" ]
lcarrafa.br@gmail.com
375aa0a79f71aa3fa2976599a1afdb289032c01e
7d169e796639b01c6b652f12effa1d59951b8345
/src/java/org/jaudiotagger/utils/tree/TreeModel.java
12709e5a3442350da5d70ba1392b157991b904e4
[ "Apache-2.0" ]
permissive
dubenju/javay
65555744a895ecbd345df07e5537072985095e3b
29284c847c2ab62048538c3973a9fb10090155aa
refs/heads/master
2021-07-09T23:44:55.086890
2020-07-08T13:03:50
2020-07-08T13:03:50
47,082,846
7
1
null
null
null
null
UTF-8
Java
false
false
5,125
java
/* * @(#)TreeModel.java 1.27 10/03/23 * * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org.jaudiotagger.utils.tree; /** * The model used by <code>JTree</code>. * <p/> * <code>JTree</code> and its related classes make extensive use of * <code>TreePath</code>s for indentifying nodes in the <code>TreeModel</code>. * If a <code>TreeModel</code> returns the same object, as compared by * <code>equals</code>, at two different indices under the same parent * than the resulting <code>TreePath</code> objects will be considered equal * as well. Some implementations may assume that if two * <code>TreePath</code>s are equal, they identify the same node. If this * condition is not met, painting problems and other oddities may result. * In other words, if <code>getChild</code> for a given parent returns * the same Object (as determined by <code>equals</code>) problems may * result, and it is recommended you avoid doing this. * <p/> * Similarly <code>JTree</code> and its related classes place * <code>TreePath</code>s in <code>Map</code>s. As such if * a node is requested twice, the return values must be equal * (using the <code>equals</code> method) and have the same * <code>hashCode</code>. * <p/> * For further information on tree models, * including an example of a custom implementation, * see <a * href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a> * in <em>The Java Tutorial.</em> * * @author Rob Davis * @author Ray Ryan * @version 1.27 03/23/10 * @see TreePath */ public interface TreeModel { /** * Returns the root of the tree. Returns <code>null</code> * only if the tree has no nodes. * * @return the root of the tree */ public Object getRoot(); /** * Returns the child of <code>parent</code> at index <code>index</code> * in the parent's * child array. <code>parent</code> must be a node previously obtained * from this data source. This should not return <code>null</code> * if <code>index</code> * is a valid index for <code>parent</code> (that is <code>index >= 0 && * index < getChildCount(parent</code>)). * * @param parent a node in the tree, obtained from this data source * @return the child of <code>parent</code> at index <code>index</code> */ public Object getChild(Object parent, int index); /** * Returns the number of children of <code>parent</code>. * Returns 0 if the node * is a leaf or if it has no children. <code>parent</code> must be a node * previously obtained from this data source. * * @param parent a node in the tree, obtained from this data source * @return the number of children of the node <code>parent</code> */ public int getChildCount(Object parent); /** * Returns <code>true</code> if <code>node</code> is a leaf. * It is possible for this method to return <code>false</code> * even if <code>node</code> has no children. * A directory in a filesystem, for example, * may contain no files; the node representing * the directory is not a leaf, but it also has no children. * * @param node a node in the tree, obtained from this data source * @return true if <code>node</code> is a leaf */ public boolean isLeaf(Object node); /** * Messaged when the user has altered the value for the item identified * by <code>path</code> to <code>newValue</code>. * If <code>newValue</code> signifies a truly new value * the model should post a <code>treeNodesChanged</code> event. * * @param path path to the node that the user has altered * @param newValue the new value from the TreeCellEditor */ public void valueForPathChanged(TreePath path, Object newValue); /** * Returns the index of child in parent. If either <code>parent</code> * or <code>child</code> is <code>null</code>, returns -1. * If either <code>parent</code> or <code>child</code> don't * belong to this tree model, returns -1. * * @param parent a node in the tree, obtained from this data source * @param child the node we are interested in * @return the index of the child in the parent, or -1 if either * <code>child</code> or <code>parent</code> are <code>null</code> * or don't belong to this tree model */ public int getIndexOfChild(Object parent, Object child); // // Change Events // /** * Adds a listener for the <code>TreeModelEvent</code> * posted after the tree changes. * * @param l the listener to add * @see #removeTreeModelListener */ void addTreeModelListener(TreeModelListener l); /** * Removes a listener previously added with * <code>addTreeModelListener</code>. * * @param l the listener to remove * @see #addTreeModelListener */ void removeTreeModelListener(TreeModelListener l); }
[ "dubenju@163.com" ]
dubenju@163.com
5367fa7657f99d2eadcbad65e4539e0d3045575a
6264146e655c160d7fab24a9aba10299da85cb6b
/app/src/main/java/com/app/cbonelo/mobile/AgentBatchesReceived/Page.java
ecde5b286c5d8a94d033ac84e24e498d81733314
[]
no_license
priyankagiri14/cbonelo_cellular
474445431606fe740c06d5eb9e89098d87221ac1
5cf4aa18211c3ed8fe52ae5886860b392a499066
refs/heads/master
2020-09-25T14:01:36.705273
2020-02-18T11:56:02
2020-02-18T11:56:02
226,017,879
0
0
null
null
null
null
UTF-8
Java
false
false
1,489
java
package com.app.cbonelo.mobile.AgentBatchesReceived; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class Page { @SerializedName("numberOfElements") @Expose private Integer numberOfElements; @SerializedName("totalElements") @Expose private Integer totalElements; @SerializedName("totalPages") @Expose private Integer totalPages; @SerializedName("size") @Expose private Integer size; @SerializedName("pageNumber") @Expose private Integer pageNumber; public Integer getNumberOfElements() { return numberOfElements; } public void setNumberOfElements(Integer numberOfElements) { this.numberOfElements = numberOfElements; } public Integer getTotalElements() { return totalElements; } public void setTotalElements(Integer totalElements) { this.totalElements = totalElements; } public Integer getTotalPages() { return totalPages; } public void setTotalPages(Integer totalPages) { this.totalPages = totalPages; } public Integer getSize() { return size; } public void setSize(Integer size) { this.size = size; } public Integer getPageNumber() { return pageNumber; } public void setPageNumber(Integer pageNumber) { this.pageNumber = pageNumber; } }
[ "priyanka@ontrackis.com" ]
priyanka@ontrackis.com
78c50cac68a05fb545292a05d3ac40e28f8eb14c
56cd6c71083ea0ca4df72bf957bd7d637b575309
/mediatek/basic/src/com/mediatek/gallerybasic/base/MediaMember.java
5897d4451eaec0505f1854b511636b2450e99350
[]
no_license
fuchao/mtkgalleryO
2c69623a3901828a31de04fd2430686fb8653aec
8fd356b42b95006efb57d1a7e75ad2c5a7044411
refs/heads/master
2020-04-12T18:52:40.440057
2018-05-22T08:20:06
2018-05-22T08:20:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,748
java
package com.mediatek.gallerybasic.base; import android.content.Context; import android.content.res.Resources; import com.mediatek.gallerybasic.gl.GLIdleExecuter; public class MediaMember { protected Context mContext; protected GLIdleExecuter mGLExecuter; protected Resources mResources; protected int mPriority = Integer.MIN_VALUE; protected MediaCenter mMediaCenter; private int mType; /** * Constructor. * @param context * Current applicaction context * @param exe * Executer for opengl */ public MediaMember(Context context, GLIdleExecuter exe, Resources res) { mContext = context; mGLExecuter = exe; mResources = res; } /** * Constructor. * @param context * Current applicaction context */ public MediaMember(Context context) { mContext = context; } public boolean isMatching(MediaData md) { return true; } public Player getPlayer(MediaData md, ThumbType type) { return null; } public Generator getGenerator() { return null; } public Layer getLayer() { return null; } public ExtItem getItem(MediaData md) { return new ExtItem(mContext, md); } public final void setType(int type) { mType = type; onTypeObtained(mType); } public final int getType() { return mType; } public int getPriority() { return mPriority; } public boolean isShelled() { return false; } protected void onTypeObtained(int type) { } public void setMediaCenter(MediaCenter mediaCenter) { mMediaCenter = mediaCenter; } }
[ "gulincheng@droi.com" ]
gulincheng@droi.com
6034f5f474d248691aad4bd8c005da1c443f43f4
432cfc9e00872a82fac298ff92a0b528c9f909a9
/database-common/src/main/java/com/scsvision/database/manager/impl/PackageVersionManagerImpl.java
31c2a372642412e7c6ada2bb0c3cf008d0ea2b28
[]
no_license
maninyellow/cms20
31f30da1bb148820d0f51931fe830bb0dc68531a
ba29e7b29c967dcce3ab8a5cf4d1d373fe9ca013
refs/heads/master
2021-01-10T07:51:26.808640
2016-03-29T01:38:23
2016-03-29T01:38:23
50,329,768
0
1
null
null
null
null
UTF-8
Java
false
false
1,782
java
package com.scsvision.database.manager.impl; import java.util.LinkedHashMap; import java.util.List; import javax.ejb.EJB; import javax.ejb.Stateless; import javax.ejb.TransactionManagement; import javax.ejb.TransactionManagementType; import javax.interceptor.Interceptors; import com.scsvision.cms.interceptor.CacheInterceptor; import com.scsvision.database.dao.PackageVersionDAO; import com.scsvision.database.entity.PackageVersion; import com.scsvision.database.manager.PackageVersionManager; @Stateless @TransactionManagement(TransactionManagementType.CONTAINER) @Interceptors(CacheInterceptor.class) public class PackageVersionManagerImpl implements PackageVersionManager { @EJB(name = "PackageVersionDTOImple") private PackageVersionDAO packageVersionDAO; @Override public Long getResourceIdByPackageType(String type) { Long resourceId = null; PackageVersion packageVersion = packageVersionDAO.loadByType(type); if (null != packageVersion) { resourceId = packageVersion.getResoureId(); } return resourceId; } @Override public void updateOrSavePackageVersion(Long resourceId, String name,String type, String packageVersion) { PackageVersion packaversion = new PackageVersion(); PackageVersion packageV = packageVersionDAO.loadByType(type); if (null != packageV) { packaversion.setName(name); packaversion.setResoureId(resourceId); packaversion.setVersion(packageVersion); packaversion.setType(type); packaversion.setId(packageV.getId()); packageVersionDAO.update(packaversion); } else { packaversion.setName(name); packaversion.setId(resourceId); packaversion.setResoureId(resourceId); packaversion.setVersion(packageVersion); packaversion.setType(type); packageVersionDAO.save(packaversion); } } }
[ "hbj@scsvision.com" ]
hbj@scsvision.com
cd6d1fc89f780e6e3f9a7a84926cb33f38cbe0dc
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/29/29_55d7c7ed8e5536d5dd164ae70df0beeb9fec848b/ClozeTestPane/29_55d7c7ed8e5536d5dd164ae70df0beeb9fec848b_ClozeTestPane_s.java
e20f1c05cb9eed0f877e73a69ada58b25e474a57
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,114
java
/* * Copyright (c) 2012 Fabian Hirschmann <fabian@hirschm.net> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.github.fhirschmann.clozegen.gui; import com.github.fhirschmann.clozegen.lib.imf.IntermediateFormat; import com.google.common.collect.Ranges; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Matcher; import javax.swing.JTextPane; import javax.swing.SwingUtilities; import javax.swing.Timer; import javax.swing.text.BadLocationException; import javax.swing.text.DefaultHighlighter; import javax.swing.text.Highlighter.HighlightPainter; /** * * @author Fabian Hirschmann <fabian@hirschm.net> */ public class ClozeTestPane extends JTextPane { /** * The painter used to highlight enabled gaps. */ private static final HighlightPainter ENABLED_HP = new DefaultHighlighter.DefaultHighlightPainter(new Color(181, 255, 166)); /** * The painter used to highlight disabled gaps. */ private static final HighlightPainter DISABLED_HP = new DefaultHighlighter.DefaultHighlightPainter(new Color(255, 200, 140)); /** * The update interval in ms. */ public static final int UPDATE_INTERVAL = 2000; /** * The current language of the pane. */ private String language; /** * Creates a new ClozeTestPane. */ public ClozeTestPane() { super(); Timer timer = new Timer(UPDATE_INTERVAL, new ActionListener() { @Override public void actionPerformed(final ActionEvent ae) { update(); } }); timer.start(); language = "en"; } /** * Toggles the gap at the current caret position on or off. */ public void toggleGap() { Matcher matcher = IntermediateFormat.PATTERN.matcher(getText()); int pos = getCaretPosition(); while (matcher.find()) { if (Ranges.closed(matcher.start(), matcher.end()).contains(pos)) { if (matcher.group(3).equals("")) { setText(getText().substring(0, matcher.end()) + "d" + getText().substring(matcher.end())); } else { setText(getText().substring(0, matcher.end() - 1) + getText().substring(matcher.end())); } setCaretPosition(pos); update(); } } } /** * Updates the highlighted gaps. */ public void update() { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { int selStart = getSelectionStart(); int selEnd = getSelectionEnd(); int pos = getCaretPosition(); Matcher matcher = IntermediateFormat.PATTERN.matcher(getText()); getHighlighter().removeAllHighlights(); while (matcher.find()) { try { getHighlighter().addHighlight(matcher.start(), matcher.end(), matcher.group(3).equals("") ? ENABLED_HP : DISABLED_HP); } catch (BadLocationException ex) { Logger.getLogger(ClozeTestPane.class.getName()). log(Level.SEVERE, null, ex); } } setCaretPosition(pos); setSelectionStart(selStart); setSelectionEnd(selEnd); } }); } /** * @return the language */ public String getLanguage() { return language; } /** * @param language the language to set */ public void setLanguage(String language) { this.language = language; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5a91e6c4233df92823a364ebb60f49c7c6dc6403
eb10b1a1a9efa12ec92fa709729436c3aedbb3d2
/src/main/java/org/earthtime/dataDictionaries/SampleRegistries.java
326746e5313c4baea0b03d195d1a420c3c56d708
[ "Apache-2.0" ]
permissive
ben-muldrow/ET_Redux
b0851614a6f485f40044bb26515f95c82f0e4438
c31c0821b1541d135ab0be83294ab410a2f60edb
refs/heads/master
2021-01-16T22:18:25.030269
2016-08-03T16:02:40
2016-08-03T16:02:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,905
java
/* * SampleRegistries.java * * * Copyright 2006-2015 James F. Bowring and www.Earth-Time.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.earthtime.dataDictionaries; import org.earthtime.archivingTools.URIHelper; /** * * @author James F. Bowring */ public enum SampleRegistries { // Sample Registries /** * */ /** * */ SESAR( "SESAR", "SSR", "http://app.geosamples.org/webservices/display.php?igsn=" ), /** * */ GeochronID( "GeochronID", "GCH", "http://www.geochron.org/igsnexists.php?igsn=");// "http://www.geochronid.org/display.php?geochronid=" ), //EARTHTIME_ID( "EARTHTIME-ID", "ERT", "" ); private String name; private String code; private String connectionString; private SampleRegistries ( String name, String code, String connectionString ) { this.name = name; this.code = code; this.connectionString = connectionString; } /** * * @return */ public String getName () { return name; } /** * * @return */ public String getCode () { return code; } /** * * @return */ public String getConnectionString () { return connectionString; } /** * * @return */ public static String[] getNames () { String[] retVal = new String[SampleRegistries.values().length]; for (int i = 0; i < SampleRegistries.values().length; i ++) { retVal[i] = SampleRegistries.values()[i].getName(); } return retVal; } /** * * @return */ public static String[] getCodes () { String[] retVal = new String[SampleRegistries.values().length]; for (int i = 0; i < SampleRegistries.values().length; i ++) { retVal[i] = SampleRegistries.values()[i].getCode(); } return retVal; } /** * * @param checkCode * @return */ public static SampleRegistries getRegistryIfLegalCode ( String checkCode ) { SampleRegistries retVal = null; for (int i = 0; i < SampleRegistries.values().length; i ++) { if ( SampleRegistries.values()[i].getCode().equalsIgnoreCase( checkCode ) ) { retVal = SampleRegistries.values()[i]; break; } } return retVal; } /** * * @param sampleID * @return */ public static String updateSampleID ( String sampleID ) { String retVal = sampleID; if ( !sampleID.contains(".") ) { retVal = GeochronID.code + "." + sampleID; } return retVal; } /** * * @param sampleID * @return */ public static boolean isSampleIdentifierValidAtRegistry ( String sampleID ) { // if missing or bad registry code, default to SampleRegistries.GeochronID boolean retVal = false; String[] parsed = new String[2]; SampleRegistries registry = null; if ( ! sampleID.toUpperCase().contains( "NONE" ) ) { if ( sampleID.contains(".") ) { parsed = sampleID.split( "\\." ); registry = getRegistryIfLegalCode( parsed[0] ); } // quick and dirty for now org.w3c.dom.Document doc; if ((parsed.length > 1) && ( registry != null ) ){ String connectionString = registry.getConnectionString(); try { doc = URIHelper.RetrieveXMLfromServerAsDOMdocument( connectionString + parsed[1].trim() ); } catch (Exception e) { doc = null; } if ( doc != null ) { if ( doc.hasChildNodes() ) { // sept 2012, now geochron uses <results>yes</results> boolean resultsElementPresent = doc.getFirstChild().getNodeName().equalsIgnoreCase( "results" ); if (resultsElementPresent){ // geochron if (registry.equals( (SampleRegistries.GeochronID)) ){ retVal = doc.getFirstChild().getTextContent().equalsIgnoreCase( "yes"); } else if (registry.equals( (SampleRegistries.SESAR)) ){ retVal = doc.getElementsByTagName( "error" ).getLength() == 0; } } // // // As of Aug 15 2011 SESAR uses <results>, GeochronID uses <sample> for positive result // // however, both use <results><error> for negative result // boolean resultsElementPresent = doc.getFirstChild().getNodeName().equalsIgnoreCase( "results" ); // // for now, take negative approach // if ( resultsElementPresent ) { // retVal = doc.getElementsByTagName( "error" ).getLength() == 0; // } else { // // got GeochronID <sample> // retVal = true; // } } } } } return retVal; } }
[ "bowring@gmail.com" ]
bowring@gmail.com
1dd9e1070ba429e19b64a846d90ad97ed0efe545
62e3f2e7c08c6e005c63f51bbfa61a637b45ac20
/B-Genius_AdFree/app/src/main/java/com/badlogic/gdx/graphics/glutils/IndexData.java
4df2700a1f8e5585f11415fbe8507e78dcdd9462
[]
no_license
prasad-ankit/B-Genius
669df9d9f3746e34c3e12261e1a55cf5c59dd1c6
1139ec152b743e30ec0af54fe1f746b57b0152bf
refs/heads/master
2021-01-22T21:00:04.735938
2016-05-20T19:03:46
2016-05-20T19:03:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
832
java
package com.badlogic.gdx.graphics.glutils; import com.badlogic.gdx.utils.Disposable; import java.nio.ShortBuffer; public abstract interface IndexData extends Disposable { public abstract void bind(); public abstract void dispose(); public abstract ShortBuffer getBuffer(); public abstract int getNumIndices(); public abstract int getNumMaxIndices(); public abstract void invalidate(); public abstract void setIndices(ShortBuffer paramShortBuffer); public abstract void setIndices(short[] paramArrayOfShort, int paramInt1, int paramInt2); public abstract void unbind(); } /* Location: C:\Users\KSHITIZ GUPTA\Downloads\apktool-install-windws\dex2jar-0.0.9.15\dex2jar-0.0.9.15\classes_dex2jar.jar * Qualified Name: com.badlogic.gdx.graphics.glutils.IndexData * JD-Core Version: 0.6.0 */
[ "kshitiz1208@gmail.com" ]
kshitiz1208@gmail.com
60e0dacdceb64c80ad6a0436df2f1742d7731d09
8ec2cbabd6125ceeb00e0c6192c3ce84477bdde6
/com.alcatel.as.calloutagent/src/com/nextenso/proxylet/engine/ProxyletUtils.java
2930f7c5e0b86d1ded281c7a6ce9ac96a8ac2780
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
nokia/osgi-microfeatures
2cc2b007454ec82212237e012290425114eb55e6
50120f20cf929a966364550ca5829ef348d82670
refs/heads/main
2023-08-28T12:13:52.381483
2021-11-12T20:51:05
2021-11-12T20:51:05
378,852,173
1
1
null
null
null
null
UTF-8
Java
false
false
3,889
java
// Copyright 2000-2021 Nokia // // Licensed under the Apache License 2.0 // SPDX-License-Identifier: Apache-2.0 // package com.nextenso.proxylet.engine; import java.util.Enumeration; import java.util.Hashtable; import java.util.Map; import org.apache.log4j.Logger; import alcatel.tess.hometop.gateways.utils.Config; import alcatel.tess.hometop.gateways.utils.ConfigException; import com.nextenso.proxylet.ProxyletConfig; public class ProxyletUtils { private final static Logger LOGGER = Logger.getLogger("calloutserver.util.proxylet"); private static class PxletClientLicenseMgr { private final static PxletClientLicenseMgr LICENSE_MANAGER = new PxletClientLicenseMgr(); private final static String PX_CLIENT_SUFFIX = ".Output"; // Contains the counters of the different licensed componants having performed a request // Key is the componant name suffixed by the keyword pxclient (componant_name".PxletClient") - Value is a Long corresponding to the counter value private static final Map<String, Long> COMPONENT_COUNTERS = new Hashtable<String, Long>(1); // Contains the licenses // Key is an Integer representing the licenseId - Value is the componant name (without PxletClient suffix) private final static Map<Integer, String> LICENCE_IDS = new Hashtable<Integer, String>(1); private PxletClientLicenseMgr() { } public static PxletClientLicenseMgr getPxletClientLicenseMgr() { return LICENSE_MANAGER; } /** * Method called by the different clients (HttpClient, SmsClient...) to * check if the given componant is allowed to send request. * * @return true if the given componant is allowed to send request (http, sms * or whatever). False if componantName is null. * @throw NoValidLicenseException if the given componant is not allowed to * send request */ public static boolean maySendRequest(String componentName) { return true; } /** * Method called by the different clients before sending a request in order * to update component counters. */ public static void sendRequest(String componentName) { } /** * @see com.nextenso.licensemgr.interfaces.ThroughputListener#getThroughputCounter(java.lang.String) */ public long getThroughputCounter(String key) { int size = COMPONENT_COUNTERS.size(); if (size == 0) { return 0; } synchronized (COMPONENT_COUNTERS) { Long counter = COMPONENT_COUNTERS.get(key); if (counter != null) { return counter.longValue(); } return 0; } } } public static boolean maySendRequest(String componentName) throws Exception { return true; } public static void sendRequest(String componentName) { if (componentName == null) { return; } PxletClientLicenseMgr.sendRequest(componentName); } /** * Gets Config object from a ProxyletConfig object */ public static Config getConfig(ProxyletConfig cnf) { Config config = new Config(); Enumeration enumer = cnf.getParameterNames(); while (enumer.hasMoreElements()) { String name = (String) enumer.nextElement(); config.setProperty(name, cnf.getStringParameter(name, null)); } // we purge the changes try { config.notifyListeners(); } catch (ConfigException e) { // cannot happen - no listeners } return config; } private static boolean IS_IN_LAUNCHER_MODE = false; public static void setIsInAgentMode(boolean isInAgentMode) { IS_IN_LAUNCHER_MODE = isInAgentMode; } public static boolean isInLauncherMode() { return (IS_IN_LAUNCHER_MODE || Boolean.getBoolean("agent.launcherMode")); } public static boolean isInAgentMode() { return (!isInLauncherMode()); } }
[ "pierre.de_rop@nokia.com" ]
pierre.de_rop@nokia.com
601f09c57becf5ea466a18ec33d81c22130fd552
23b80fc3c46d68ddfd6268ae6cb402869a5162fc
/app/src/main/java/com/gxg/administrator/mydemo7/headscroll/adapter/HeadScrollAdapter.java
ee43facf744b82e19aad0fc88d1903a35f2091f8
[]
no_license
EzzalddeenAli/myDemo7
7852ebf5f3b7e80c1c55e2f78e59bbdd53656d8c
543ca4f9076eff52cc49746854839ee738b21d2e
refs/heads/master
2021-09-24T15:31:40.754781
2018-10-11T01:36:02
2018-10-11T01:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
892
java
package com.gxg.administrator.mydemo7.headscroll.adapter; import android.support.annotation.Nullable; import android.widget.ImageView; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.gxg.administrator.mydemo7.R; import com.gxg.administrator.mydemo7.headscroll.bean.HeadBean; import java.util.List; /** * Created by gaoxuge on 2017/8/16 at 19:03. * */ public class HeadScrollAdapter extends BaseQuickAdapter<HeadBean,BaseViewHolder>{ public HeadScrollAdapter(@Nullable List<HeadBean> data) { super(R.layout.item_head_horizontal,data); } @Override protected void convert(BaseViewHolder helper, HeadBean item) { ImageView imageView = helper.getView(R.id.item_head_iv); imageView.setImageResource(item.getImg()); helper.addOnClickListener(R.id.item_head_iv); } }
[ "android_gaoxuge@163.com" ]
android_gaoxuge@163.com
bbbe24517c11d3d832defdda506631e40d1ebf43
3328c43e0fc892cde9ff574c9af269fc61e86704
/Acebal/ExamenEnero/enero2018_parte1/src/main/AppVersion3.java
459460ae62bba36b20d011b6b6d592838dbe564e
[]
no_license
mistermboy/DS
7ebcb8ce91e7d4ce292e3f24f1e233f28e9001ce
d1855cb2697373b0bd833d2db0e66edbc3e74404
refs/heads/master
2021-07-24T18:47:24.902711
2019-01-16T10:38:52
2019-01-16T10:38:52
103,942,125
2
0
null
null
null
null
UTF-8
Java
false
false
916
java
package main; import java.util.*; import model.*; import server.*; public class AppVersion3 { public static void main(String[] args) { AppVersion3 store = new AppVersion3(); store.openWindow(); } public void openWindow() { Server server = new Server(); List<CompactDisc> discs = server.downloadCompactDiscs(); List<Book> books = server.downloadBooks(); // Mostrar en una misma tabla los discos y los libros // (que ponga "Título" y "Autor" en la cabecera) /* +--------------------+----------------+ | Título | Autor | +--------------------+----------------+ | Despacito | Luis Fonsi | | Dragon's Kiss | Marty Friedman | | El Código Da Vinci | Dan Brown | | Design Patterns | Erich Gamma | +--------------------+----------------+ */ server.uploadCompactDiscs(discs); server.uploadBooks(books); } }
[ "pabloyo97@hotmail.com" ]
pabloyo97@hotmail.com
24a085766f9116706ed769a4d68171d383c6f73b
6f581e209761374a5fa4d49730cff4e8fedc06cb
/src/main/java/ru/epam/javacore/lesson_18_19_20_java_8/homework/cargo/service/CargoServiceImpl.java
5a524c9051aa54529f95b9b49506b03c7c2d8081
[]
no_license
DmitryYusupov/epamjavacore
b4cfe78ba608e05d855568704b13d696d357474a
6f5009c89d372dbeb7dd5daffaed47e383ad93c0
refs/heads/master
2022-02-14T00:42:11.032705
2020-02-13T08:31:15
2020-02-13T08:31:15
225,563,013
0
10
null
2022-01-21T23:37:23
2019-12-03T07:59:48
Java
UTF-8
Java
false
false
2,606
java
package ru.epam.javacore.lesson_18_19_20_java_8.homework.cargo.service; import ru.epam.javacore.lesson_18_19_20_java_8.homework.cargo.domain.Cargo; import ru.epam.javacore.lesson_18_19_20_java_8.homework.cargo.exception.unckecked.CargoDeleteConstraintViolationException; import ru.epam.javacore.lesson_18_19_20_java_8.homework.cargo.repo.CargoRepo; import ru.epam.javacore.lesson_18_19_20_java_8.homework.cargo.search.CargoSearchCondition; import ru.epam.javacore.lesson_18_19_20_java_8.homework.transportation.domain.Transportation; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; public class CargoServiceImpl implements CargoService { private CargoRepo cargoRepo; public CargoServiceImpl(CargoRepo cargoRepo) { this.cargoRepo = cargoRepo; } @Override public void save(Cargo cargo) { cargoRepo.save(cargo); } @Override public Optional<Cargo> findById(Long id) { if (id != null) { return cargoRepo.findById(id); } return Optional.empty(); } @Override public Optional<Cargo> getByIdFetchingTransportations(Long id) { if (id != null) { return cargoRepo.getByIdFetchingTransportations(id); } return Optional.empty(); } @Override public List<Cargo> getAll() { return cargoRepo.getAll(); } @Override public int countAll() { return this.cargoRepo.countAll(); } @Override public List<Cargo> findByName(String name) { Cargo[] found = cargoRepo.findByName(name); return (found == null || found.length == 0) ? Collections.emptyList() : Arrays.asList(found); } @Override public boolean deleteById(Long id) { Optional<Cargo> cargoOptional = this.getByIdFetchingTransportations(id); if (cargoOptional.isPresent()) { List<Transportation> transportations = cargoOptional.get().getTransportations(); boolean hasTransportations = transportations != null && transportations.size() > 0; if (hasTransportations) { throw new CargoDeleteConstraintViolationException(id); } return cargoRepo.deleteById(id); } else { return false; } } @Override public void printAll() { List<Cargo> allCargos = cargoRepo.getAll(); for (Cargo cargo : allCargos) { System.out.println(cargo); } } @Override public boolean update(Cargo cargo) { if (cargo != null) { return cargoRepo.update(cargo); } return false; } @Override public List<Cargo> search(CargoSearchCondition cargoSearchCondition) { return cargoRepo.search(cargoSearchCondition); } }
[ "Dmitry_Yusupov@epam.com" ]
Dmitry_Yusupov@epam.com
5d6bcf231ce5c6f95ebbc38a675528069a5379ec
ebc27101c70c4ccd418df22d5d6b86987ae5ad42
/smartmining/src/main/java/com/seater/smartmining/service/ProjectScheduleLogServiceI.java
b5e29d303597babeabf1c890132aceafe2018779
[]
no_license
KanadeSong/webserver
f555210a443c8023bfca3fe7cb49f372a3779801
b464c21d5eb33108573a2319ffd982473a489752
refs/heads/master
2022-03-31T03:07:10.023485
2019-12-31T09:59:55
2019-12-31T09:59:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
981
java
package com.seater.smartmining.service; import com.fasterxml.jackson.core.JsonProcessingException; import com.seater.smartmining.entity.ProjectScheduleLog; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; import java.io.IOException; import java.util.List; /** * @Description: * @Author yueyuzhe * @Email 87167070@qq.com * @Date 2019/7/23 0023 10:13 */ public interface ProjectScheduleLogServiceI { ProjectScheduleLog get(Long id) throws IOException; ProjectScheduleLog save(ProjectScheduleLog log) throws JsonProcessingException; void delete(Long id); Page<ProjectScheduleLog> query(); Page<ProjectScheduleLog> query(Specification<ProjectScheduleLog> spec); Page<ProjectScheduleLog> query(Pageable pageable); Page<ProjectScheduleLog> query(Specification<ProjectScheduleLog> spec, Pageable pageable); List<ProjectScheduleLog> getAll(); }
[ "545430154@qq.com" ]
545430154@qq.com
5f2dbc18d4f72cf88aadb981a334e7eaf4b3d400
17e212bb79e4238e0c5bb57bc500352de3a50635
/ConfigurationMismatchDetector/src/de/uni_hildesheim/sse/smell/filter/input/ConditionBlockReader.java
849b3b1c03fb6c08ade9429444e620fcdc7dd72f
[ "Apache-2.0" ]
permissive
SSE-LinuxAnalysis/ConfigurationMismatchDetector
7e94f6a13a2e845ddabaaf5501ceb6dadd3682a0
96a4b1cd340ea794f4a0f3820f564c9e031786da
refs/heads/master
2021-01-22T19:31:26.276195
2017-08-16T06:21:13
2017-08-16T06:21:13
85,208,589
0
0
null
null
null
null
UTF-8
Java
false
false
1,677
java
package de.uni_hildesheim.sse.smell.filter.input; import java.io.FileNotFoundException; import de.uni_hildesheim.sse.smell.data.ConditionBlock; import de.uni_hildesheim.sse.smell.data.ConditionType; import de.uni_hildesheim.sse.smell.data.IDataElement; /** * A filter that ignore all input and reads {@link ConditionBlock}s from a CSV file. * <br /> * <b>Input</b>: nothing<br /> * <b>Output</b>: {@link ConditionBlock}s<br /> * * @author Adam Krafczyk */ public class ConditionBlockReader extends AbstractCsvReaderFilter { private static final int FILENAME = 0; private static final int LINE_START = 1; private static final int LINE_END = 2; private static final int TYPE = 3; private static final int INDENTATION = 4; private static final int STARTING_IF = 5; private static final int CONDITION = 6; private static final int NORMALIZED = 7; /** * @param filename The file to read from. * @param skipFirstLine Whether the first line (possibly header) should be skipped. * @throws FileNotFoundException If the file cannot be opened. */ public ConditionBlockReader(String filename, boolean skipFirstLine) throws FileNotFoundException { super(filename, skipFirstLine); } @Override public IDataElement readLine(String[] fields) { return new ConditionBlock(fields[FILENAME], Integer.parseInt(fields[LINE_START]), Integer.parseInt(fields[LINE_END]), ConditionType.getConditionType(fields[TYPE]), Integer.parseInt(fields[INDENTATION]), Integer.parseInt(fields[STARTING_IF]), fields[CONDITION], fields[NORMALIZED]); } }
[ "elscha@sse.uni-hildesheim.de" ]
elscha@sse.uni-hildesheim.de
9629ca6f6de9ab83a35d0e1f42fd68dba5f3b7fe
5593669533a9933c03540388c028975619b75214
/src/main/java/top/zywork/dto/ArticleDTO.java
e581b5ac1619807937d69f29110ab925819ce152
[]
no_license
xiaopohou/zywork-app
a23d71e4727864579156e16b3cd7d44b1aae795a
7ccdabaa2e6e08c9147e2913bd42ff0cdea2ae17
refs/heads/master
2020-06-02T23:00:57.539911
2019-06-10T09:35:40
2019-06-10T09:35:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,470
java
package top.zywork.dto; import java.math.BigDecimal; import java.util.Date; /** * ArticleDTO数据传输对象类<br/> * * 创建于2019-02-21<br/> * * @author http://zywork.top 王振宇 * @version 1.0 */ public class ArticleDTO extends BaseDTO { private static final long serialVersionUID = -9223372035090998868L; // 文章编号 private Long id; // 类别编号 private Long categoryId; // 文章标题 private String title; // 封面图片 private String coverImg; // 文章摘要 private String summary; // 文章内容 private String content; // 阅读量 private Integer viewCount; // 版本号 private Integer version; // 创建人编号 private Long createId; // 创建时间 private Date createTime; // 更新时间 private Date updateTime; // 是否激活 private Byte isActive; public ArticleDTO () {} public ArticleDTO (Long id, Long categoryId, String title, String coverImg, String summary, String content, Integer viewCount, Integer version, Long createId, Date createTime, Date updateTime, Byte isActive) { this.id = id; this.categoryId = categoryId; this.title = title; this.coverImg = coverImg; this.summary = summary; this.content = content; this.viewCount = viewCount; this.version = version; this.createId = createId; this.createTime = createTime; this.updateTime = updateTime; this.isActive = isActive; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getCategoryId() { return categoryId; } public void setCategoryId(Long categoryId) { this.categoryId = categoryId; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getCoverImg() { return coverImg; } public void setCoverImg(String coverImg) { this.coverImg = coverImg; } public String getSummary() { return summary; } public void setSummary(String summary) { this.summary = summary; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public Integer getViewCount() { return viewCount; } public void setViewCount(Integer viewCount) { this.viewCount = viewCount; } public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } public Long getCreateId() { return createId; } public void setCreateId(Long createId) { this.createId = createId; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public Byte getIsActive() { return isActive; } public void setIsActive(Byte isActive) { this.isActive = isActive; } @Override public String toString() { return "ArticleDTO {" + "id = " + id + ", categoryId = " + categoryId + ", title = " + title + ", coverImg = " + coverImg + ", summary = " + summary + ", content = " + content + ", viewCount = " + viewCount + ", version = " + version + ", createId = " + createId + ", createTime = " + createTime + ", updateTime = " + updateTime + ", isActive = " + isActive + " }"; } }
[ "847315251@qq.com" ]
847315251@qq.com
6008593c30fafa862d8bb6a2d276b4374bd4f2c0
fea07f0dd2555f7b51e3cdd15e96812820499aea
/test-clients/src/main/java/com/hedera/services/bdd/spec/PropertySource.java
40d8729b772ebd8e26bf3e356611d0b9fd8203d2
[ "Apache-2.0" ]
permissive
Vinci-zZ/hedera-services
e663c3dc1aae8742d92b0031727861c5fb323c97
afa3afb5041a908a783fc0b91c61facc532a7463
refs/heads/master
2023-02-28T03:44:11.524812
2021-02-06T06:26:00
2021-02-06T06:26:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,717
java
package com.hedera.services.bdd.spec; /*- * ‌ * Hedera Services Test Clients * ​ * Copyright (C) 2018 - 2020 Hedera Hashgraph, 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. * ‍ */ import com.hederahashgraph.api.proto.java.AccountID; import com.hederahashgraph.api.proto.java.ContractID; import com.hederahashgraph.api.proto.java.Duration; import com.hederahashgraph.api.proto.java.FileID; import com.hederahashgraph.api.proto.java.RealmID; import com.hederahashgraph.api.proto.java.ShardID; import com.hedera.services.bdd.spec.keys.KeyFactory; import java.util.stream.Stream; public interface PropertySource { String get(String property); default HapiApiSpec.CostSnapshotMode getCostSnapshotMode(String property) { return HapiApiSpec.CostSnapshotMode.valueOf(get(property)); } default FileID getFile(String property) { try { return asFile(get(property)); } catch (Exception ignore) {} return FileID.getDefaultInstance(); } default AccountID getAccount(String property) { try { return asAccount(get(property)); } catch (Exception ignore) {} return AccountID.getDefaultInstance(); } default ContractID getContract(String property) { try { return asContract(get(property)); } catch (Exception ignore) {} return ContractID.getDefaultInstance(); } default RealmID getRealm(String property) { return RealmID.newBuilder().setRealmNum(Long.parseLong(get(property))).build(); } default ShardID getShard(String property) { return ShardID.newBuilder().setShardNum(Long.parseLong(get(property))).build(); } default long getLong(String property) { return Long.parseLong(get(property)); } default int getInteger(String property) { return Integer.parseInt(get(property)); } default Duration getDurationFromSecs(String property) { return Duration.newBuilder().setSeconds(getInteger(property)).build(); } default boolean getBoolean(String property) { return Boolean.parseBoolean(get(property)); } default byte[] getBytes(String property) { return get(property).getBytes(); } default KeyFactory.KeyType getKeyType(String property) { return KeyFactory.KeyType.valueOf(get(property)); } static AccountID asAccount(String v) { long[] nativeParts = asDotDelimitedLongArray(v); return AccountID.newBuilder() .setShardNum(nativeParts[0]) .setRealmNum(nativeParts[1]) .setAccountNum(nativeParts[2]) .build(); } static String asAccountString(AccountID account) { return String.format("%d.%d.%d", account.getShardNum(), account.getRealmNum(), account.getAccountNum()); } static ContractID asContract(String v) { long[] nativeParts = asDotDelimitedLongArray(v); return ContractID.newBuilder() .setShardNum(nativeParts[0]) .setRealmNum(nativeParts[1]) .setContractNum(nativeParts[2]) .build(); } static FileID asFile(String v) { long[] nativeParts = asDotDelimitedLongArray(v); return FileID.newBuilder() .setShardNum(nativeParts[0]) .setRealmNum(nativeParts[1]) .setFileNum(nativeParts[2]) .build(); } static long[] asDotDelimitedLongArray(String s) { String[] parts = s.split("[.]"); return Stream.of(parts).mapToLong(Long::valueOf).toArray(); } }
[ "michael.tinker@hedera.com" ]
michael.tinker@hedera.com
62e022f6f4039331a0f650e8a90ebc5cbdb0c32e
4a9618d3506c869a27fff61174e7bcd13c7ce47e
/org.eclipse.e4.xwt/bundles/org.eclipse.e4.xwt.tools.ui.palette/src/org/eclipse/e4/xwt/tools/ui/palette/page/resources/IPaletteLabelProvider.java
08a6e717138805d42385ff5eb0d82fb2f9dcc542
[]
no_license
renaudpawlak/tura
ce4d2ca9c21fa096081ca4d4fb9f5acb27bee1f7
bbcfbaeb9a0286912712004b67966cb639b9cb5f
refs/heads/master
2021-05-08T08:20:14.259297
2013-08-07T21:57:43
2013-08-07T21:57:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
936
java
/******************************************************************************* * Copyright (c) 2006, 2010 Soyatec (http://www.soyatec.com) 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: * Soyatec - initial API and implementation *******************************************************************************/ package org.eclipse.e4.xwt.tools.ui.palette.page.resources; import org.eclipse.jface.resource.ImageDescriptor; /** * @author jliu (jin.liu@soyatec.com) */ public interface IPaletteLabelProvider { ImageDescriptor getSmallIcon(Object obj); ImageDescriptor getLargeIcon(Object obj); String getToolTip(Object obj); String getName(Object obj); String getContent(Object obj); }
[ "isakovarseniy@gmail.com" ]
isakovarseniy@gmail.com
4cfa349e91b6d455df83edcf141b352964ac7656
85bdd78080bec5243ca0da3b6fae6453215bf85a
/wms-mbg/src/test/java/com/zlsrj/wms/mbg/mapper/TenantSmsMapperTest.java
ca47ceeba26f4b36d8f141343e7c8cf08c1dea1e
[]
no_license
myxland/wms-cloud
67404ea41e02c3b1507ff89120dacae639bc6b6e
10eb69bde00707bd79ed241c8400cbbed1bda378
refs/heads/master
2021-05-22T16:05:06.048111
2020-03-19T13:12:24
2020-03-19T13:12:24
252,992,797
0
3
null
2020-04-04T12:37:09
2020-04-04T12:37:08
null
UTF-8
Java
false
false
1,961
java
package com.zlsrj.wms.mbg.mapper; import java.util.List; import javax.annotation.Resource; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.zlsrj.wms.common.test.TestCaseUtil; import com.zlsrj.wms.api.entity.TenantSms; import cn.hutool.core.util.RandomUtil; import lombok.extern.slf4j.Slf4j; @RunWith(SpringRunner.class) @SpringBootTest @Slf4j public class TenantSmsMapperTest { @Resource private TenantSmsMapper tenantSmsMapper; @Test public void selectByIdTest() { Long id = 1L; TenantSms tenantSms = tenantSmsMapper.selectById(id); log.info(tenantSms.toString()); } @Test public void selectList() { QueryWrapper<TenantSms> queryWrapper = new QueryWrapper<TenantSms>(); List<TenantSms> tenantSmsList = tenantSmsMapper.selectList(queryWrapper); tenantSmsList.forEach(e -> { log.info(e.toString()); }); } @Test public void insert() { TenantSms tenantSms = TenantSms.builder()// .id(TestCaseUtil.id())// 编号ID .tenantId(RandomUtil.randomLong())// 租户编号 .smsSignature(RandomUtil.randomString(4))// 短信签名 .smsSpService(RandomUtil.randomString(4))// 短信SP服务商 .smsReadSendOn(RandomUtil.randomInt(0,1+1))// 是否启用抄表账单通知短信(启用/不启用) .smsChargeSendOn(RandomUtil.randomInt(0,1+1))// 是否启用缴费成功通知短信(启用/不启用) .smsQfSendOn(RandomUtil.randomInt(0,1+1))// 是否启用欠费通知短信(启用/不启用) .smsQfSendAfterDays(RandomUtil.randomInt(0,1000+1))// 欠费通知短信发送间隔天数(欠费多少天后,催费多少天后仍然未缴) .build(); int count = tenantSmsMapper.insert(tenantSms); log.info("count={}",count); log.info("tenantSms={}",tenantSms); } }
[ "378297869@qq.com" ]
378297869@qq.com
cb4a8c40551fe5124a47744a4687e36665632db7
28a519955bb864144e6cc254a5012e62ad56cd4a
/ProyectoCorpElectricaLima/src/gui/Busca.java
1c29c816169523afd052ec0cb7277da3b4771a98
[]
no_license
gcorreageek/proCEL
fc4709e1ca1fe8d9121ac6be6e82e95e6aff6d65
f364c524f84762998739f2bc5db35487b749eb66
refs/heads/master
2020-05-19T13:11:21.466284
2012-05-29T19:32:48
2012-05-29T19:32:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,256
java
package gui; // Clase de Buscar import java.awt.*; import javax.swing.*; import java.awt.event.*; class Busca extends JDialog implements ActionListener { JLabel LBus=new JLabel("Buscar:"); JTextField TPalabra=new JTextField(10); JButton Buscar=new JButton("Buscar Siguiente"); int Posicion; Editor ed; MenuPrincipal men; public Busca(JInternalFrame DBuscar,String s,boolean b) { super(); ed=(Editor)DBuscar; Buscar.addActionListener(this); setLayout(new GridLayout(1,3)); setLayout(new FlowLayout()); add(LBus); add(TPalabra); add(Buscar); setTitle("Buscar..."); setSize(325,75); setResizable(false); setLocation(100,100); setVisible(true); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==Buscar) { ed.Texto.requestFocus(); String Palabra=""; String TextoBusc=""; Palabra=TPalabra.getText().toLowerCase(); TextoBusc=ed.Texto.getText().toLowerCase(); Posicion=TextoBusc.indexOf(Palabra,Posicion); if(Posicion!=-1) ed.Texto.select(Posicion,Posicion + Palabra.length()); else JOptionPane.showMessageDialog(this,"No se ha encontrado: " + Palabra); Posicion++; } setVisible(true); } }
[ "gcorreageek@gmail.com" ]
gcorreageek@gmail.com
8f18dd6e2259be5f993d18e8894b86d3e4c9ee00
72d75321938b65ec0eb86685f5c539fd6a50a67c
/src/test/java/org/decimal4j/op/AbstractDecimalUnknownDecimalToDecimalTest.java
acbf661dfd979a8cf9c1160d94ef6d82f4cf0a54
[ "MIT" ]
permissive
tools4j/decimal4j
01178aef39fefff0174abaae9a98c8d940886f67
a2f36d70c126f9b28b439e9e071f6ff956f06ac0
refs/heads/master
2023-09-02T01:21:25.448872
2022-08-06T05:39:03
2022-08-06T05:39:03
30,149,926
140
19
null
2015-05-26T01:33:34
2015-02-01T15:26:28
Java
UTF-8
Java
false
false
4,020
java
/* * The MIT License (MIT) * * Copyright (c) 2015-2022 decimal4j (tools4j), Marco Terzer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.decimal4j.op; import java.math.BigDecimal; import org.decimal4j.api.Decimal; import org.decimal4j.api.DecimalArithmetic; import org.decimal4j.factory.Factories; import org.decimal4j.scale.ScaleMetrics; import org.decimal4j.test.ArithmeticResult; /** * Base class for tests comparing the result of some binary operation of the * {@link Decimal} with a wildcard {@code Decimal<?>}. The expected result is * produced by the equivalent operation of the {@link BigDecimal}. */ abstract public class AbstractDecimalUnknownDecimalToDecimalTest extends AbstractRandomAndSpecialValueTest { protected final int unknownDecimalScale; public AbstractDecimalUnknownDecimalToDecimalTest(DecimalArithmetic arithmetic, int unknownDecimalScale) { super(arithmetic); this.unknownDecimalScale = unknownDecimalScale; } abstract protected BigDecimal expectedResult(BigDecimal a, BigDecimal b); abstract protected <S extends ScaleMetrics> Decimal<S> actualResult(Decimal<S> a, Decimal<?> b); @Override protected <S extends ScaleMetrics> void runRandomTest(S scaleMetrics, int index) { final Decimal<S> dOpA = randomDecimal(scaleMetrics); final Decimal<?> dOpB = Factories.getDecimalFactory(unknownDecimalScale).valueOfUnscaled(nextLongOrInt()); runTest(scaleMetrics, "[" + index + "]", dOpA, dOpB); } @Override protected <S extends ScaleMetrics> void runSpecialValueTest(S scaleMetrics) { final long[] specialValues = getSpecialValues(scaleMetrics); for (int i = 0; i < specialValues.length; i++) { for (int j = 0; j < specialValues.length; j++) { final Decimal<S> dOpA = newDecimal(scaleMetrics, specialValues[i]); final Decimal<?> dOpB = Factories.getDecimalFactory(unknownDecimalScale).valueOfUnscaled(specialValues[j]); runTest(scaleMetrics, "[" + i + ", " + j + "]", dOpA, dOpB); } } } protected <S extends ScaleMetrics> void runTest(S scaleMetrics, String name, Decimal<S> dOpA, Decimal<?> dOpB) { final String messagePrefix = getClass().getSimpleName() + name + ": " + dOpA + " " + operation() + " " + dOpB; final BigDecimal bdOpA = toBigDecimal(dOpA); final BigDecimal bdOpB = toBigDecimal(dOpB); // expected ArithmeticResult<Long> expected; try { expected = ArithmeticResult.forResult(arithmetic, expectedResult(bdOpA, bdOpB)); } catch (ArithmeticException e) { expected = ArithmeticResult.forException(e); } catch (IllegalArgumentException e) { expected = ArithmeticResult.forException(e); } // actual ArithmeticResult<Long> actual; try { actual = ArithmeticResult.forResult(actualResult(dOpA, dOpB)); } catch (ArithmeticException e) { actual = ArithmeticResult.forException(e); } catch (IllegalArgumentException e) { actual = ArithmeticResult.forException(e); } // assert actual.assertEquivalentTo(expected, messagePrefix); } }
[ "terzerm@gmail.com" ]
terzerm@gmail.com
1b8ac3b5f24355363afe628fbf01d54fd88686ce
0f20a8033577aa561678325ec276daa8947742a5
/src/test/java/com/mpen/api/controller/MedalControllerTest.java
91fdd06fdf3ad9881ff57e8d4fa03077291ec9d0
[]
no_license
wangyue-whaty/mpen-test
e28bb27df51fc0bf7b0d8abd4a7287d0aa074ac5
ea9f58d61d1eac237bcd45223fdf89a7afc7a619
refs/heads/master
2020-04-04T23:45:38.010893
2018-11-12T04:57:45
2018-11-12T04:57:45
156,370,640
1
0
null
null
null
null
UTF-8
Java
false
false
1,216
java
package com.mpen.api.controller; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.test.context.junit4.SpringRunner; import com.mpen.TestBase; /** * 勋章测试类 * */ @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) public class MedalControllerTest extends TestBase { private static final String MEDAL_USERECORD_URI = "/v1/medal/userRecord"; private static final String userName = "18931334240"; private static final String password = "2329403848055-1536284387332-59dba675cb32945849ffb6ff29e7ddbc"; /** * 勋章测试 */ @Test public void testMedal() { // 获取用户佩戴的勋章信息的测试 this.getControllerTest(userName, password, MEDAL_USERECORD_URI + "?action=integralList"); // 用户佩戴测试 this.postControllerTest(userName, password, myMedalWear(), MEDAL_USERECORD_URI); // 用户取下勋章的测试 this.postControllerTest(userName, password, myMedalOff(), MEDAL_USERECORD_URI); } }
[ "wangyue@mpen.com.cn" ]
wangyue@mpen.com.cn
2d7db9a81868a0989e156303997398db67b7ece7
ff90aedaff2b3adab50e68b2f3eef3a74f3f2b0d
/src/android/support/v4/view/InputDeviceCompat.java
10baab0954e10fbc8b6c1c9545f50685ad5243bd
[]
no_license
rrabit42/Malware_Project_EWHA
cf81ab0d6cdc64cf0fb722e9427f7307da3689ab
3865c1c393a9873915ec07389afb799573d5d135
refs/heads/master
2020-11-24T06:42:17.435890
2019-12-16T20:48:04
2019-12-16T20:48:04
228,010,763
0
1
null
null
null
null
UTF-8
Java
false
false
1,211
java
package android.support.v4.view; public final class InputDeviceCompat { public static final int SOURCE_ANY = -256; public static final int SOURCE_CLASS_BUTTON = 1; public static final int SOURCE_CLASS_JOYSTICK = 16; public static final int SOURCE_CLASS_MASK = 255; public static final int SOURCE_CLASS_NONE = 0; public static final int SOURCE_CLASS_POINTER = 2; public static final int SOURCE_CLASS_POSITION = 8; public static final int SOURCE_CLASS_TRACKBALL = 4; public static final int SOURCE_DPAD = 513; public static final int SOURCE_GAMEPAD = 1025; public static final int SOURCE_HDMI = 33554433; public static final int SOURCE_JOYSTICK = 16777232; public static final int SOURCE_KEYBOARD = 257; public static final int SOURCE_MOUSE = 8194; public static final int SOURCE_ROTARY_ENCODER = 4194304; public static final int SOURCE_STYLUS = 16386; public static final int SOURCE_TOUCHPAD = 1048584; public static final int SOURCE_TOUCHSCREEN = 4098; public static final int SOURCE_TOUCH_NAVIGATION = 2097152; public static final int SOURCE_TRACKBALL = 65540; public static final int SOURCE_UNKNOWN = 0; }
[ "gegiraffe@gmail.com" ]
gegiraffe@gmail.com
b0b81349b82e1c4603636ee425e6f0dcfc2338d2
684e018ce44456ad860b9bbd01ca0fcf40be296d
/src/main/java/com/leetcode/offer/No10/frog/Solution.java
f03552c4b1ed88864bfa65458c74b567850db854
[]
no_license
Nagisa12321/LeetCode
ebcfc5d9508e9e5feb1a9d44932f28f19d1ac3e2
14d0bd9e95fe1eef57678e3dbf3fb6751ee196d1
refs/heads/master
2023-07-15T21:32:51.265786
2021-08-29T03:37:14
2021-08-29T03:37:14
316,138,604
1
0
null
null
null
null
UTF-8
Java
false
false
436
java
package com.leetcode.offer.No10.frog; /** * @author jtchen * @version 1.0 * @date 2021/2/10 9:22 */ public class Solution { public int numWays(int n) { if (n == 0 || n == 1) return 1; int[] dp = new int[n + 1]; dp[0] = 1; dp[1] = 1; for (int i = 2; i <= n; i++) { dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007; } return dp[n]; } }
[ "1216414009@qq.com" ]
1216414009@qq.com
4d7b388554024478cc42c5e24264f43a63dd8ed1
0bd5c37401ee4971411084967dcebd4b98f166d8
/src/main/java/com/lijl/carbon/hadoop/bd/CarBonDbConfig.java
33430c8841a66192d860a7232fbe40f89cc5844c
[]
no_license
lijl4520/carbondata-examples
7e75920a7c9081b1ff62e071a672b2d2e17747d2
395d757b139764006edc088d3439f14a8cfd7c1f
refs/heads/master
2023-04-24T12:11:53.833729
2021-05-13T02:54:00
2021-05-13T02:54:00
352,919,910
0
0
null
null
null
null
UTF-8
Java
false
false
2,869
java
package com.lijl.carbon.hadoop.bd; /** * @Author Lijl * @ClassName CarBonDbConfig * @Description 连接池实体 * @Date 2021/3/29 17:10 * @Version 1.0 */ public class CarBonDbConfig { /** * 连接驱动 */ private String driver; /** * 连接地址 */ private String url; /** * 空闲连接池,最小连接数,默认为5 */ private final Integer MIN_FREE_CONNECTIONS = 5; private Integer minFreeConnections = MIN_FREE_CONNECTIONS; /** * 空闲连接池,最大连接数,默认为10 */ private final static Integer MAX_FREE_CONNECTIONS = 10; private Integer maxFreeConnections = MAX_FREE_CONNECTIONS; /** * 活跃连接池,最大连接数,默认为10 */ private final Integer MAX_ACTIVE_CONNECTIONS = 10; private Integer maxActiveConnection = MAX_ACTIVE_CONNECTIONS; /** * 初始化连接数,默认为5个 */ private final Integer INIT_CONNECTIONS = 5; private Integer initConnections = INIT_CONNECTIONS; /** * 连接超时时间,默认为20分钟 */ private final Long CONNECTION_TIME_OUT = 1000*60*20L; private Long connectionTimeOut = CONNECTION_TIME_OUT; /** * 自检循环时间,默认为60秒 */ private final Long RECHECK_TIME = 1000*60L; private Long recheckTime = RECHECK_TIME; public String getDriver() { return driver; } public void setDriver(String driver) { this.driver = driver; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public Integer getMinFreeConnections() { return minFreeConnections; } public void setMinFreeConnections(Integer minFreeConnections) { this.minFreeConnections = minFreeConnections; } public Integer getMaxFreeConnections() { return maxFreeConnections; } public void setMaxFreeConnections(Integer maxFreeConnections) { this.maxFreeConnections = maxFreeConnections; } public Integer getMaxActiveConnection() { return maxActiveConnection; } public void setMaxActiveConnection(Integer maxActiveConnection) { this.maxActiveConnection = maxActiveConnection; } public Integer getInitConnections() { return initConnections; } public void setInitConnections(Integer initConnections) { this.initConnections = initConnections; } public Long getConnectionTimeOut() { return connectionTimeOut; } public void setConnectionTimeOut(Long connectionTimeOut) { this.connectionTimeOut = connectionTimeOut; } public Long getRecheckTime() { return recheckTime; } public void setRecheckTime(Long recheckTime) { this.recheckTime = recheckTime; } }
[ "admin@example.com" ]
admin@example.com
b4d969767d4deb9100a93c0ac396636849634533
b44a7447c76f75190993f79c0604c3da27bda2a9
/stetho/src/main/java/com/facebook/stetho/server/http/HttpHeaders.java
8f72e83bd1c1ef37ce303b4b1f1c95d81ccf065c
[ "BSD-3-Clause", "LicenseRef-scancode-unknown" ]
permissive
aadsm/stetho
af7e4ea39134cae19fb4df5ed04f76c0cc2f45ad
6f9652bf6b5932891d4d114054d9fbfa4c09ebaf
refs/heads/master
2021-04-27T10:47:47.437502
2018-02-22T23:31:54
2018-02-22T23:31:54
122,547,911
0
0
BSD-3-Clause
2018-02-22T23:27:48
2018-02-22T23:27:48
null
UTF-8
Java
false
false
468
java
/* * Copyright (c) 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ package com.facebook.stetho.server.http; public interface HttpHeaders { String CONTENT_TYPE = "Content-Type"; String CONTENT_LENGTH = "Content-Length"; }
[ "jasta@devtcg.org" ]
jasta@devtcg.org
8c634dc4ed401ea2d3876b87b99a9d5a7b6b299f
c8c0e12bb5ffd8054268edea240b0f1380283496
/TeamView/src/main/java/com/dc/core/controller/Status.java
e2e94d85fab2cb0e39286aba84782290313e4a86
[]
no_license
DC-Joney/Simples
5431400623585d8bf68211358a1475d2479465c7
fbb49597b31736603c3ebfed3cfeea7529232d81
refs/heads/master
2021-01-15T21:39:10.262652
2016-09-25T16:05:23
2016-09-25T16:05:23
68,460,137
0
0
null
null
null
null
UTF-8
Java
false
false
247
java
package com.dc.core.controller; /** * Created by in IntelliJ IDEA. * EnuM * * @author Joney * @create 2016-09-22-14:29 */ //USY(忙碌)、FREE(空闲)、VOCATION(度假) public enum Status { USY, FREE, VOCATION; }
[ "1050617313@qq.com" ]
1050617313@qq.com
74b6dabde93416b4c8ba140aaa6893947db5d3e1
76852b1b29410436817bafa34c6dedaedd0786cd
/sources-2020-07-19-tempmail/sources/com/google/android/gms/internal/measurement/z.java
4f1dc8ea75a86fe35111030328d78f7fdc0c83da
[]
no_license
zteeed/tempmail-apks
040e64e07beadd8f5e48cd7bea8b47233e99611c
19f8da1993c2f783b8847234afb52d94b9d1aa4c
refs/heads/master
2023-01-09T06:43:40.830942
2020-11-04T18:55:05
2020-11-04T18:55:05
310,075,224
0
0
null
null
null
null
UTF-8
Java
false
false
1,018
java
package com.google.android.gms.internal.measurement; import android.app.Activity; import android.os.RemoteException; import com.google.android.gms.dynamic.ObjectWrapper; import com.google.android.gms.internal.measurement.zzag; /* compiled from: com.google.android.gms:play-services-measurement-sdk-api@@17.4.3 */ final class z extends zzag.a { /* renamed from: f reason: collision with root package name */ private final /* synthetic */ Activity f9531f; private final /* synthetic */ zzt g; private final /* synthetic */ zzag.b h; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ z(zzag.b bVar, Activity activity, zzt zzt) { super(zzag.this); this.h = bVar; this.f9531f = activity; this.g = zzt; } /* access modifiers changed from: package-private */ public final void a() throws RemoteException { zzag.this.i.onActivitySaveInstanceState(ObjectWrapper.b0(this.f9531f), this.g, this.f9554c); } }
[ "zteeed@minet.net" ]
zteeed@minet.net
94fa6ecdf4c5a8c5bed80f2038fb0adb2c681c01
e4e3dc49a1e92195d97f61c5c8f36178214e12c2
/src/net/wit/service/CartItemService.java
ac109b119360bd755d8ee1614920a42ff322cbeb
[]
no_license
pologood/FMCG
1a393fcc4c7942ca932a2ee5c169c3bf630145e0
690cb06da198fb6a3dec98c1ed7b4886b716a40b
refs/heads/master
2021-01-09T20:08:09.461153
2017-02-06T09:27:48
2017-02-06T09:27:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
338
java
/* * Copyright 2005-2013 rsico. All rights reserved. * Support: http://www.rsico.cn * License: http://www.rsico.cn/license */ package net.wit.service; import net.wit.entity.CartItem; /** * Service - 购物车项 * * @author rsico Team * @version 3.0 */ public interface CartItemService extends BaseService<CartItem, Long> { }
[ "hujun519191086@163.com" ]
hujun519191086@163.com
335e5c16a6cd5f60cb23237e5e719aeb637821c5
0592f165cb20e4f809920549a7090e8efe08c4da
/src/main/java/com/github/tukenuke/tuske/expressions/customenchantments/ExprLoreName.java
47ea5f25fdbdc310354de1c5114f0f54d6e0d100
[]
no_license
Tuke-Nuke/TuSKe
1f33c4e51b859433a3530f228550c41eaf3fe06a
41ef394cfd99352220fa08293edfe6ec4530fe31
refs/heads/master
2022-02-09T22:56:56.942900
2022-01-26T14:28:20
2022-01-26T14:28:20
67,299,518
26
64
null
2017-12-30T05:19:19
2016-09-03T16:14:05
Java
UTF-8
Java
false
false
1,768
java
package com.github.tukenuke.tuske.expressions.customenchantments; import javax.annotation.Nullable; import com.github.tukenuke.tuske.util.Registry; import org.bukkit.event.Event; import ch.njol.skript.classes.Changer; import ch.njol.skript.classes.Changer.ChangeMode; import ch.njol.skript.expressions.base.SimplePropertyExpression; import ch.njol.util.coll.CollectionUtils; import com.github.tukenuke.tuske.manager.customenchantment.CEnchant; import com.github.tukenuke.tuske.manager.customenchantment.CustomEnchantment; import com.github.tukenuke.tuske.manager.customenchantment.EnchantConfig; public class ExprLoreName extends SimplePropertyExpression<CEnchant, String>{ static { Registry.newProperty(ExprLoreName.class, "lore name", "customenchantment"); } @Override public Class<? extends String> getReturnType() { return String.class; } @Override @Nullable public String convert(CEnchant ce) { return ce.getEnchant().getName(); } @Override protected String getPropertyName() { return "lore name"; } public void change(Event e, Object[] delta, Changer.ChangeMode mode){ CEnchant ce = getExpr().getSingle(e); if (ce != null && delta != null){ CustomEnchantment cc = CustomEnchantment.getByID((String)delta[0]); if (cc == null) cc = CustomEnchantment.getByName((String)delta[0]); if (cc != null && !cc.equalsById(ce.getEnchant())) return; ce.getEnchant().setName((String)delta[0]); EnchantConfig.y.set("Enchantments." + ce.getEnchant().getId() + ".Name", ((String)delta[0])); EnchantConfig.save(); } } @SuppressWarnings("unchecked") public Class<?>[] acceptChange(final Changer.ChangeMode mode) { if (mode == ChangeMode.SET) return CollectionUtils.array(String.class); return null; } }
[ "leandro.p.alencar@gmail.com" ]
leandro.p.alencar@gmail.com
e3f28772c2d40791234372463496a2fbdd64f0cd
f16b6c17d0499e55303c30c7754b0e798a2ac307
/app/src/main/java/com/spark/chiefwallet/ui/popup/PositionCloseOnekeyPopup.java
13fc6c9c99c801cfcdbeb55763ef98c69c9fdf61
[]
no_license
ios1024/chiefwallet
d79d48631cf32c95d143a5f975a5f8494e5d5175
55ec04eac5aef916bda5b200ea7b7b14ed6e72c4
refs/heads/master
2022-02-14T21:19:37.162030
2019-08-15T03:42:10
2019-08-15T03:42:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,384
java
package com.spark.chiefwallet.ui.popup; import android.content.Context; import android.support.annotation.NonNull; import android.support.v4.content.ContextCompat; import android.view.View; import android.widget.TextView; import com.example.modulecfd.CfdClient; import com.example.modulecfd.pojo.CfdOrderPostBean; import com.example.modulecfd.pojo.CfdPositionResult; import com.lxj.xpopup.core.BottomPopupView; import com.spark.chiefwallet.App; import com.spark.chiefwallet.R; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import me.spark.mvvm.utils.LogUtils; import me.spark.mvvm.utils.SpanUtils; /** * ================================================ * 作 者:v1ncent * 版 本:1.0.0 * 创建日期:2019/5/5 * 描 述: * 修订历史: * ================================================ */ public class PositionCloseOnekeyPopup extends BottomPopupView { @BindView(R.id.profit_num) TextView mProfitNum; @BindView(R.id.loss_num) TextView mLossNum; @BindView(R.id.confirm) TextView mConfirm; @BindView(R.id.cancel) TextView mCancel; private Context mContext; private int mProfit, mLoss; private List<CfdPositionResult.DataBean> mDataBeanList; public PositionCloseOnekeyPopup(@NonNull Context context, int profit, int loss, List<CfdPositionResult.DataBean> dataBeanList) { super(context); this.mContext = context; this.mProfit = profit; this.mLoss = loss; this.mDataBeanList = dataBeanList; } @Override protected int getImplLayoutId() { return R.layout.popup_postion_close_one_key; } @Override protected void onCreate() { super.onCreate(); ButterKnife.bind(this); initView(); } private void initView() { CharSequence profitText = new SpanUtils() .append(String.valueOf(mProfit)) .setForegroundColor(ContextCompat.getColor(mContext, R.color.green)) .append(App.getInstance().getString(R.string.str_count)) .create(); CharSequence lossText = new SpanUtils() .append(String.valueOf(mLoss)) .setForegroundColor(ContextCompat.getColor(mContext, R.color.red)) .append(App.getInstance().getString(R.string.str_count)) .create(); mProfitNum.setText(profitText); mLossNum.setText(lossText); } @OnClick({R.id.confirm, R.id.cancel}) public void onClick(View view) { switch (view.getId()) { case R.id.confirm: CfdOrderPostBean cfdOrderPostBean = new CfdOrderPostBean(); StringBuffer stringBuffer = new StringBuffer(); for (CfdPositionResult.DataBean dataBean : mDataBeanList) { stringBuffer.append(",").append(dataBean.getId()); } LogUtils.e("v1ncent",stringBuffer.toString().substring(1)); cfdOrderPostBean.setCloseType(2); cfdOrderPostBean.setId(stringBuffer.toString().substring(1)); CfdClient.getInstance().orderClose(cfdOrderPostBean); dismiss(); break; case R.id.cancel: dismiss(); break; } } }
[ "1041066648@qq.com" ]
1041066648@qq.com
914e6a4ec96508d754b4488a9784b683e52aac7a
e32479a53c8ade548fd7e100e6dd4ceba9f92f8e
/experiments/subjects/math_46/fuzzing/src/test/org/apache/commons/math/linear/FieldDecompositionSolver.java
e458122135f29fe6cdbc781b5d6adc7397d2d93a
[ "MIT" ]
permissive
yannicnoller/hydiff
5d4981006523c6a7ce6afcc0f44017799359c65c
4df7df1d2f00bf28d6fb2e2ed7a14103084c39f3
refs/heads/master
2021-08-28T03:42:09.297288
2021-08-09T07:02:18
2021-08-09T07:02:18
207,993,923
24
4
null
null
null
null
UTF-8
Java
false
false
3,847
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 test.org.apache.commons.math.linear; import test.org.apache.commons.math.FieldElement; /** * Interface handling decomposition algorithms that can solve A &times; X = B. * <p>Decomposition algorithms decompose an A matrix has a product of several specific * matrices from which they can solve A &times; X = B in least squares sense: they find X * such that ||A &times; X - B|| is minimal.</p> * <p>Some solvers like {@link LUDecomposition} can only find the solution for * square matrices and when the solution is an exact linear solution, i.e. when * ||A &times; X - B|| is exactly 0. Other solvers can also find solutions * with non-square matrix A and with non-null minimal norm. If an exact linear * solution exists it is also the minimal norm solution.</p> * * @param <T> the type of the field elements * @version $Id$ * @since 2.0 */ public interface FieldDecompositionSolver<T extends FieldElement<T>> { /** Solve the linear equation A &times; X = B for matrices A. * <p>The A matrix is implicit, it is provided by the underlying * decomposition algorithm.</p> * @param b right-hand side of the equation A &times; X = B * @return a vector X that minimizes the two norm of A &times; X - B * @throws test.org.apache.commons.math.exception.DimensionMismatchException * if the matrices dimensions do not match. * @throws SingularMatrixException * if the decomposed matrix is singular. */ T[] solve(final T[] b); /** Solve the linear equation A &times; X = B for matrices A. * <p>The A matrix is implicit, it is provided by the underlying * decomposition algorithm.</p> * @param b right-hand side of the equation A &times; X = B * @return a vector X that minimizes the two norm of A &times; X - B * @throws test.org.apache.commons.math.exception.DimensionMismatchException * if the matrices dimensions do not match. * @throws SingularMatrixException * if the decomposed matrix is singular. */ FieldVector<T> solve(final FieldVector<T> b); /** Solve the linear equation A &times; X = B for matrices A. * <p>The A matrix is implicit, it is provided by the underlying * decomposition algorithm.</p> * @param b right-hand side of the equation A &times; X = B * @return a matrix X that minimizes the two norm of A &times; X - B * @throws test.org.apache.commons.math.exception.DimensionMismatchException * if the matrices dimensions do not match. * @throws SingularMatrixException * if the decomposed matrix is singular. */ FieldMatrix<T> solve(final FieldMatrix<T> b); /** * Check if the decomposed matrix is non-singular. * @return true if the decomposed matrix is non-singular */ boolean isNonSingular(); /** Get the inverse (or pseudo-inverse) of the decomposed matrix. * @return inverse matrix * @throws SingularMatrixException * if the decomposed matrix is singular. */ FieldMatrix<T> getInverse(); }
[ "nolleryc@gmail.com" ]
nolleryc@gmail.com
df2947f1de5adb41388c542c5c93065dc011bdb6
1b50dbd2e87d2c17c5d695cfc50781a458402a38
/src/goryachev/fxtexteditor/op/MoveUp.java
380f1d724e9714beaf4875706247fbdc73fff6df
[ "Apache-2.0" ]
permissive
rrohm/FxTextEditor
104d7d29d46719e98c371e53424c8fb46d936bf8
2b973fb503a54c08b941fddfedb636826d0603f4
refs/heads/master
2023-06-26T11:52:34.914364
2021-08-02T02:52:23
2021-08-02T02:52:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,134
java
// Copyright © 2020-2021 Andy Goryachev <andy@goryachev.com> package goryachev.fxtexteditor.op; import goryachev.common.log.Log; import goryachev.fxtexteditor.FxTextEditor; import goryachev.fxtexteditor.Marker; import goryachev.fxtexteditor.WrapPos; import goryachev.fxtexteditor.internal.NavigationAction; import goryachev.fxtexteditor.internal.WrapInfo; /** * Moves the cursor up. */ public class MoveUp extends NavigationAction { protected static final Log log = Log.get("MoveUp"); public MoveUp(FxTextEditor ed) { super(ed); } protected Marker move(Marker m) { int pos = m.getCharIndex(); int line = m.getLine(); int col = updatePhantomColumn(line, pos); WrapInfo wr = wrapInfo(line); int wrapRow = wr.getWrapRowForCharIndex(pos); WrapPos wp = vflow().advance(line, wrapRow, -1); int newLine = wp.getLine(); int newWrapRow = wp.getRow(); wr = wrapInfo(newLine); int newPos = wr.getCharIndexForColumn(newWrapRow, col); log.debug("col=%d line=%d pos=%d", col, newLine, newPos); return editor().newMarker(newLine, newPos); } }
[ "andy@goryachev.com" ]
andy@goryachev.com
61401389e8251202acb429c571bb16374cc7d831
995e655293513d0b9f93d62e28f74b436245ae74
/src/com/htc/lib1/cc/view/viewpager/b/a/b.java
2e2ee9fb0fb7b03312d187b8ff4723a336eb11db
[]
no_license
JALsnipe/HTC-RE-YouTube-Live-Android
796e7c97898cac41f0f53120e79cde90d3f2fab1
f941b64ad6445c0a0db44318651dc76715291839
refs/heads/master
2021-01-17T09:46:50.725810
2015-01-09T23:32:14
2015-01-09T23:32:14
29,039,855
3
0
null
null
null
null
UTF-8
Java
false
false
607
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.htc.lib1.cc.view.viewpager.b.a; // Referenced classes of package com.htc.lib1.cc.view.viewpager.b.a: // e, f class b extends e { b() { } public void a(Object obj, int i) { f.a(obj, i); } public void a(Object obj, CharSequence charsequence) { f.a(obj, charsequence); } public void a(Object obj, boolean flag) { f.a(obj, flag); } }
[ "josh.lieberman92@gmail.com" ]
josh.lieberman92@gmail.com
b568c373c6e2e052fc718f40f26e69f81204491b
627dafa165ee4420680b4144c849e141596ae0b0
/wecardio/project/src/main/java/com/hiteam/common/web/template/freemarker/FreemarkerUtils.java
650be18d47a5070a3c8d5ba3ec04cda0f541fa0f
[]
no_license
tan-tian/wecardio
97339383a00ecd090dd952ea3c4c3f32dac8a6f2
5e291d19bce2d4cebd43040e4195a26d18d947c3
refs/heads/master
2020-04-03T01:01:57.429064
2018-10-25T15:26:50
2018-10-25T15:26:50
154,917,227
0
0
null
null
null
null
UTF-8
Java
false
false
7,110
java
package com.hiteam.common.web.template.freemarker; import com.hiteam.common.util.bean.EnumConverter; import com.hiteam.common.util.spring.SpringUtils; import freemarker.core.Environment; import freemarker.template.*; import freemarker.template.utility.DeepUnwrap; import org.apache.commons.beanutils.ConvertUtilsBean; import org.apache.commons.beanutils.Converter; import org.apache.commons.beanutils.converters.ArrayConverter; import org.apache.commons.beanutils.converters.DateConverter; import org.springframework.context.ApplicationContext; import org.springframework.util.Assert; import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer; import java.io.IOException; import java.io.Serializable; import java.io.StringReader; import java.io.StringWriter; import java.util.Date; import java.util.Map; import java.util.Map.Entry; /** * freemarker工具类 * @author wengsiwei * */ public final class FreemarkerUtils { private static final ConvertUtilsBean convertUtils; static { convertUtils = new ConvertUtilsBean() { @Override public String convert(Object value) { if (value != null) { Class<?> type = value.getClass(); if (type.isEnum() && super.lookup(type) == null) { super.register(new EnumConverter(type), type); } else if (type.isArray() && type.getComponentType().isEnum()) { if (super.lookup(type) == null) { ArrayConverter arrayConverter = new ArrayConverter(type, new EnumConverter(type.getComponentType()), 0); arrayConverter.setOnlyFirstToString(false); super.register(arrayConverter, type); } Converter converter = super.lookup(type); return ((String) converter.convert(String.class, value)); } } return super.convert(value); } @SuppressWarnings("rawtypes") @Override public Object convert(String value, Class clazz) { if (clazz.isEnum() && super.lookup(clazz) == null) { super.register(new EnumConverter(clazz), clazz); } return super.convert(value, clazz); } @SuppressWarnings("rawtypes") @Override public Object convert(String[] values, Class clazz) { if (clazz.isArray() && clazz.getComponentType().isEnum() && super.lookup(clazz.getComponentType()) == null) { super.register(new EnumConverter(clazz.getComponentType()), clazz.getComponentType()); } return super.convert(values, clazz); } @SuppressWarnings("rawtypes") @Override public Object convert(Object value, Class targetType) { if (super.lookup(targetType) == null) { if (targetType.isEnum()) { super.register(new EnumConverter(targetType), targetType); } else if (targetType.isArray() && targetType.getComponentType().isEnum()) { ArrayConverter arrayConverter = new ArrayConverter(targetType, new EnumConverter(targetType.getComponentType()), 0); arrayConverter.setOnlyFirstToString(false); super.register(arrayConverter, targetType); } } return super.convert(value, targetType); } }; DateConverter dateConverter = new DateConverter(); dateConverter.setPatterns(CommonAttributes.DATE_PATTERNS); convertUtils.register(dateConverter, Date.class); } /** * 不可实例化 */ private FreemarkerUtils() {} /** * 解析模板 * @param template 模板 * @param model 数据 * @return * @throws java.io.IOException * @throws TemplateException */ public static String process(String template, Map<String, ?> model) throws IOException, TemplateException { Configuration configuration = null; ApplicationContext applicationContext = SpringUtils.getApplicationContext(); if (applicationContext != null) { FreeMarkerConfigurer freeMarkerConfigurer = SpringUtils.getBean("freeMarkerConfigurer"); if (freeMarkerConfigurer != null) { configuration = freeMarkerConfigurer.getConfiguration(); } } return process(template, model, configuration); } public static <T extends Serializable> String process2(String template, T model) throws IOException, TemplateException { if (template == null) { return null; } Configuration configuration = null; ApplicationContext applicationContext = SpringUtils.getApplicationContext(); if (applicationContext != null) { FreeMarkerConfigurer freeMarkerConfigurer = SpringUtils.getBean("freeMarkerConfigurer"); if (freeMarkerConfigurer != null) { configuration = freeMarkerConfigurer.getConfiguration(); } } StringWriter out = new StringWriter(); new Template("template", new StringReader(template), configuration).process(model, out); return out.toString(); } /** * 解析模板 * @param template 模板 * @param model 数据 * @param configuration freemarker配置 * @return * @throws java.io.IOException * @throws TemplateException */ public static String process(String template, Map<String, ?> model, Configuration configuration) throws IOException, TemplateException { if (template == null) { return null; } if (configuration == null) { configuration = new Configuration(); } StringWriter out = new StringWriter(); new Template("template", new StringReader(template), configuration).process(model, out); return out.toString(); } /** * 获取参数 * @param name 参数名 * @param type 类型 * @param params 参数 * @return * @throws TemplateModelException */ @SuppressWarnings("unchecked") public static <T> T getParameter(String name, Class<T> type, Map<String, TemplateModel> params) throws TemplateModelException { Assert.hasText(name); Assert.notNull(type); Assert.notNull(params); TemplateModel templateModel = params.get(name); if (templateModel == null) { return null; } Object value = DeepUnwrap.unwrap(templateModel); return (T) convertUtils.convert(value, type); } /** * 获取变量 * @param name 名称 * @param env * @return * @throws TemplateModelException */ public static TemplateModel getVariable(String name, Environment env) throws TemplateModelException { Assert.hasText(name); Assert.notNull(env); return env.getVariable(name); } /** * 设置变量 * @param name * @param value * @param env * @throws TemplateException */ public static void setVariable(String name, Object value, Environment env) throws TemplateException { Assert.hasText(name); Assert.notNull(env); if (value instanceof TemplateModel) { env.setVariable(name, (TemplateModel) value); } else { env.setVariable(name, ObjectWrapper.BEANS_WRAPPER.wrap(value)); } } /** * 设置变量 * @param variables * @param env * @throws TemplateException */ public static void setVariables(Map<String, Object> variables, Environment env) throws TemplateException { Assert.notNull(variables); Assert.notNull(env); for (Entry<String, Object> entry : variables.entrySet()) { String name = entry.getKey(); Object value = entry.getValue(); if (value instanceof TemplateModel) { env.setVariable(name, (TemplateModel) value); } else { env.setVariable(name, ObjectWrapper.BEANS_WRAPPER.wrap(value)); } } } }
[ "tantiant@126.com" ]
tantiant@126.com
e2d6881cb351095dc55b41cc1375703731356de6
3a2d73197371628bd3c1d578d27c30cf389cb1b5
/android/app/src/main/java/com/onemeter/activity/DingYueActivity.java
9f426a4fdfe28f432bf185aacf38fe9aaa788bb3
[]
no_license
ybw977709134/android
7838ccdb167ffda830c231ee0826def12a041c14
9b74f0f4ba41b633abab78f725f8c8cdd07da846
refs/heads/master
2020-03-29T09:50:02.284072
2018-09-21T14:39:27
2018-09-21T14:39:27
149,775,933
0
0
null
null
null
null
UTF-8
Java
false
false
6,960
java
package com.onemeter.activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import android.view.View; import android.widget.ImageView; import android.widget.RadioButton; import android.widget.RadioGroup; import com.onemeter.R; import com.onemeter.app.BaseActivity; import com.onemeter.app.MyApplication; import com.onemeter.fragment.MyDingYueFragment; import com.onemeter.fragment.TuiJianDingYueFragment; import com.onemeter.view.AlwaysMarqueeTextView; import java.util.ArrayList; import java.util.List; /** * 描述:订阅show页面 * 项目名称:zhaosb_project * 作者:angelyin * 时间:2016/2/16 16:06 * 备注: */ public class DingYueActivity extends BaseActivity implements RadioGroup.OnCheckedChangeListener { List<Fragment> list = null; private RadioGroup fragment_dy_radioGroup_title; private RadioButton fragment_dy_rb_tuijian; private RadioButton fragment_dy_rb_my; private View dy_view_cursor_1, dy_view_cursor_2; private ViewPager fragment_dy_vp; private ImageView activity_app_dingyue_img_return; private AlwaysMarqueeTextView dingyue_dingwei; String islogin; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.activity_ding_yue_main); islogin = MyApplication.islogin.get(0); initView(); } /** * 描述: 初始化组件 * 作者:$angelyin * 时间:2016/2/16 16:20 */ private void initView() { dingyue_dingwei = (AlwaysMarqueeTextView) findViewById(R.id.dingyue_dingwei); dingyue_dingwei.setText(MyApplication.dingweiLocation); activity_app_dingyue_img_return = (ImageView) findViewById(R.id.activity_app_dingyue_img_return); activity_app_dingyue_img_return.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); overridePendingTransition(R.anim.activity_move_in, R.anim.activity_move_out); } }); fragment_dy_radioGroup_title = (RadioGroup) findViewById(R.id.fragment_dy_radioGroup_title); fragment_dy_rb_tuijian = (RadioButton) findViewById(R.id.fragment_dy_rb_tuijian); fragment_dy_rb_my = (RadioButton) findViewById(R.id.fragment_dy_rb_my); dy_view_cursor_1 = findViewById(R.id.dy_view_cursor_1); dy_view_cursor_2 = findViewById(R.id.dy_view_cursor_2); dy_view_cursor_1.setVisibility(View.VISIBLE); dy_view_cursor_2.setVisibility(View.INVISIBLE); dy_view_cursor_2 = findViewById(R.id.dy_view_cursor_2); fragment_dy_vp = (ViewPager) findViewById(R.id.fragment_dy_vp); list = new ArrayList<Fragment>(); TuiJianDingYueFragment tjdy = new TuiJianDingYueFragment(); list.add(tjdy); if(islogin.equals("已登录")){ MyDingYueFragment mdy = new MyDingYueFragment(); list.add(mdy); } ViewPagerAdapter vpdt = new ViewPagerAdapter(getSupportFragmentManager(), list); fragment_dy_vp.setAdapter(vpdt); vpdt.notifyDataSetChanged(); fragment_dy_radioGroup_title.setOnCheckedChangeListener(this); fragment_dy_rb_tuijian.setChecked(true); //滑动切换 fragment_dy_vp.setOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageSelected(int arg0) { switch (arg0) { case 0: fragment_dy_rb_tuijian.setChecked(true); dy_view_cursor_1.setVisibility(View.VISIBLE); dy_view_cursor_2.setVisibility(View.INVISIBLE); break; case 1: if (islogin.equals("已登录")) { fragment_dy_rb_my.setChecked(true); dy_view_cursor_2.setVisibility(View.VISIBLE); dy_view_cursor_1.setVisibility(View.INVISIBLE); } else { //未登录 isLoginDialog(); } break; } } @Override public void onPageScrolled(int arg0, float arg1, int arg2) { } @Override public void onPageScrollStateChanged(int arg0) { } }); } /** * 未登录的对话框 */ private void isLoginDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("您还没有登录,是否现在去登录?"); builder.setPositiveButton("确认", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { finish(); Intent intent = new Intent(DingYueActivity.this, UserLoginActivity.class); startActivity(intent); dialog.dismiss(); } }); builder.setNegativeButton("取消", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { fragment_dy_rb_tuijian.setChecked(true); dialog.dismiss(); } }); builder.create().show(); } @Override public void onCheckedChanged(RadioGroup group, int checkedId) { if (fragment_dy_rb_tuijian.getId() == checkedId) { fragment_dy_vp.setCurrentItem(0); dy_view_cursor_1.setVisibility(View.VISIBLE); dy_view_cursor_2.setVisibility(View.INVISIBLE); } else if (fragment_dy_rb_my.getId() == checkedId) { if (islogin.equals("已登录")) { fragment_dy_vp.setCurrentItem(1); dy_view_cursor_2.setVisibility(View.VISIBLE); dy_view_cursor_1.setVisibility(View.INVISIBLE); } else { isLoginDialog(); } } } class ViewPagerAdapter extends FragmentStatePagerAdapter { List<Fragment> list; public ViewPagerAdapter(FragmentManager fm, List<Fragment> list) { super(fm); this.list = list; } @Override public Fragment getItem(int arg0) { return list.get(arg0); } @Override public int getCount() { return list.size(); } } }
[ "977709134@qq.com" ]
977709134@qq.com
7f1ee09aa2c987172c4fdabd35afed41281d41b3
2ebb107ce1e7c64db650f8602aab721f665dd487
/src/main/java/org/mvel2/asm/Handler.java
90310b28378f074fc1355638195af6e653b4fc18
[]
no_license
lstarby/mvelx
387e6cf995e2e974ca374883736222d3698527fa
fc58db4ea66259167e5cceb1c9a80956cf5144c8
refs/heads/master
2021-09-08T12:18:21.982459
2017-03-02T07:21:07
2017-03-02T07:21:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,144
java
/*** * ASM: a very small and fast Java bytecode manipulation framework * Copyright (c) 2000-2011 INRIA, France Telecom * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ package org.mvel2.asm; /** * Information about an exception handler block. * * @author Eric Bruneton */ class Handler { /** * Beginning of the exception handler's scope (inclusive). */ Label start; /** * End of the exception handler's scope (exclusive). */ Label end; /** * Beginning of the exception handler's code. */ Label handler; /** * Internal name of the type of exceptions handled by this handler, or * <tt>null</tt> to catch any exceptions. */ String desc; /** * Constant pool index of the internal name of the type of exceptions * handled by this handler, or 0 to catch any exceptions. */ int type; /** * Next exception handler block info. */ Handler next; /** * Removes the range between start and end from the given exception * handlers. * * @param h an exception handler list. * @param start the start of the range to be removed. * @param end the end of the range to be removed. Maybe null. * @return the exception handler list with the start-end range removed. */ static Handler remove(Handler h, Label start, Label end) { if(h == null) { return null; } else { h.next = remove(h.next, start, end); } int hstart = h.start.position; int hend = h.end.position; int s = start.position; int e = end == null ? Integer.MAX_VALUE : end.position; // if [hstart,hend[ and [s,e[ intervals intersect... if(s < hend && e > hstart) { if(s <= hstart) { if(e >= hend) { // [hstart,hend[ fully included in [s,e[, h removed h = h.next; } else { // [hstart,hend[ minus [s,e[ = [e,hend[ h.start = end; } } else if(e >= hend) { // [hstart,hend[ minus [s,e[ = [hstart,s[ h.end = start; } else { // [hstart,hend[ minus [s,e[ = [hstart,s[ + [e,hend[ Handler g = new Handler(); g.start = end; g.end = h.end; g.handler = h.handler; g.desc = h.desc; g.type = h.type; g.next = h.next; h.end = start; h.next = g; } } return h; } }
[ "www@iflym.com" ]
www@iflym.com
53adf2bab91ebd7e14ff9729b684e8bd34b32202
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/plugin/sns/lucky/a/e.java
00519405336dbccecea70de22f6f0c481afaaf35
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
207
java
package com.tencent.mm.plugin.sns.lucky.a; public final class e { private static e qRo = null; private static String qRp = ""; StringBuffer kmW = new StringBuffer(); public int level = 0; }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
22120f3927f68d805116fcd09ced72d1c21ddbcc
f6beb7535dd2843dece84854c4cd354f782987d2
/payments/src/main/java/pl/wipek/payments/transfers/converters/DomesticTransferConverter.java
b37244797d3302d2323902c1036fffca1b930f3a
[]
no_license
WiPeK/JavaEE-Bank
b86f85e1e93371d8f9aa292746f0cec6bcc82378
5446e1c0fc87b7d4ef28e89bd3c5542de62ecaa7
refs/heads/master
2021-09-05T14:36:55.765139
2018-01-28T12:58:47
2018-01-28T12:58:47
110,385,594
0
2
null
null
null
null
UTF-8
Java
false
false
1,582
java
package pl.wipek.payments.transfers.converters; import pl.wipek.payments.transfers.requests.DomesticTransferRequest; import pl.wipek.shared.domain.entity.Beneficiary; import pl.wipek.shared.domain.entity.DomesticTransfer; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.HashSet; import java.util.List; import java.util.Set; public class DomesticTransferConverter { public static pl.wipek.shared.domain.entity.DomesticTransfer convertFromRequest(DomesticTransferRequest domesticTransferRequest) { pl.wipek.shared.domain.entity.DomesticTransfer domesticTransfer = new DomesticTransfer(); domesticTransfer.setAccount(domesticTransferRequest.getUserAccount()); List<Beneficiary> beneficiaries = domesticTransferRequest.getBeneficiary(); Set<Beneficiary> beneficiarySet= new HashSet<>(); beneficiarySet.addAll(beneficiaries); domesticTransfer.setBeneficiaries(beneficiarySet); domesticTransfer.setAmount(domesticTransferRequest.getAmount()); domesticTransfer.setTitle(domesticTransferRequest.getTitle()); DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); try { domesticTransfer.setDate(formatter.parse(domesticTransferRequest.getDate())); } catch (ParseException e) { e.printStackTrace(); } domesticTransfer.setTemplate(domesticTransferRequest.isTemplate()); domesticTransfer.setType(domesticTransferRequest.getType()); return domesticTransfer; } }
[ "wipekxxx@gmail.com" ]
wipekxxx@gmail.com
51525b7fe3e18607fb9e21d845ca41de8471d0c0
c827bfebbde82906e6b14a3f77d8f17830ea35da
/Development3.0/TeevraServer/platform/businessobject/src/main/java/com/headstrong/fusion/bo/java/generated/fixml_5_0_sp2/IOIMessageTBeanAccessor.java
656e7cbcbe96c1121109897e4c9ed591450f818d
[]
no_license
GiovanniPucariello/TeevraCore
13ccf7995c116267de5c403b962f1dc524ac1af7
9d755cc9ca91fb3ebc5b227d9de6bcf98a02c7b7
refs/heads/master
2021-05-29T18:12:29.174279
2013-04-22T07:44:28
2013-04-22T07:44:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,204
java
package com.headstrong.fusion.bo.java.generated.fixml_5_0_sp2; import javax.annotation.Generated; import com.headstrong.fusion.bo.java.BeanAccessor; import org.fixprotocol.fixml_5_0_sp2.IOIMessageT; import org.fixprotocol.fixml_5_0_sp2.MessageHeaderT; import org.fixprotocol.fixml_5_0_sp2.ApplicationSequenceControlBlockT; import org.fixprotocol.fixml_5_0_sp2.IOITransTypeEnumT; import javax.xml.datatype.XMLGregorianCalendar; import org.fixprotocol.fixml_5_0_sp2.FinancingDetailsBlockT; import org.fixprotocol.fixml_5_0_sp2.IOINaturalFlagEnumT; import java.math.BigInteger; import org.fixprotocol.fixml_5_0_sp2.YieldDataBlockT; import org.fixprotocol.fixml_5_0_sp2.IOIQltyIndEnumT; import java.math.BigDecimal; import org.fixprotocol.fixml_5_0_sp2.OrderQtyDataBlockT; import org.fixprotocol.fixml_5_0_sp2.SpreadOrBenchmarkCurveDataBlockT; import org.fixprotocol.fixml_5_0_sp2.InstrumentBlockT; import com.headstrong.fusion.bo.impl.exception.AttributeNotFoundException; import com.headstrong.fusion.bo.java.JavaBusinessObject; //This file was generated on Fri Feb 25 20:32:47 IST 2011 @Generated(value = { "bo-accessor-generator" }, date="Fri Feb 25 20:32:47 IST 2011") public class IOIMessageTBeanAccessor implements BeanAccessor<IOIMessageT> { private IOIMessageT bean; @Override public Object get(String accessPath) throws AttributeNotFoundException { if("qltyInd".equalsIgnoreCase(accessPath)){ return this.bean.getQltyInd(); } else if("ccy".equalsIgnoreCase(accessPath)){ return this.bean.getCcy(); } else if("pxTyp".equalsIgnoreCase(accessPath)){ return this.bean.getPxTyp(); } else if("yield".equalsIgnoreCase(accessPath)){ return this.bean.getYield(); } else if("sprdBnchmkCurve".equalsIgnoreCase(accessPath)){ return this.bean.getSprdBnchmkCurve(); } else if("txt".equalsIgnoreCase(accessPath)){ return this.bean.getTxt(); } else if("finDetls".equalsIgnoreCase(accessPath)){ return this.bean.getFinDetls(); } else if("txnTm".equalsIgnoreCase(accessPath)){ return this.bean.getTxnTm(); } else if("side".equalsIgnoreCase(accessPath)){ return this.bean.getSide(); } else if("transTyp".equalsIgnoreCase(accessPath)){ return this.bean.getTransTyp(); } else if("qtyTyp".equalsIgnoreCase(accessPath)){ return this.bean.getQtyTyp(); } else if("ordQty".equalsIgnoreCase(accessPath)){ return this.bean.getOrdQty(); } else if("undly".equalsIgnoreCase(accessPath)){ return this.bean.getUndly(); } else if("validUntilTm".equalsIgnoreCase(accessPath)){ return this.bean.getValidUntilTm(); } else if("stip".equalsIgnoreCase(accessPath)){ return this.bean.getStip(); } else if("applSeqCtrl".equalsIgnoreCase(accessPath)){ return this.bean.getApplSeqCtrl(); } else if("hdr".equalsIgnoreCase(accessPath)){ return this.bean.getHdr(); } else if("encTxt".equalsIgnoreCase(accessPath)){ return this.bean.getEncTxt(); } else if("pty".equalsIgnoreCase(accessPath)){ return this.bean.getPty(); } else if("uRL".equalsIgnoreCase(accessPath)){ return this.bean.getURL(); } else if("qty".equalsIgnoreCase(accessPath)){ return this.bean.getQty(); } else if("instrmt".equalsIgnoreCase(accessPath)){ return this.bean.getInstrmt(); } else if("iD".equalsIgnoreCase(accessPath)){ return this.bean.getID(); } else if("rtg".equalsIgnoreCase(accessPath)){ return this.bean.getRtg(); } else if("natFlag".equalsIgnoreCase(accessPath)){ return this.bean.getNatFlag(); } else if("encTxtLen".equalsIgnoreCase(accessPath)){ return this.bean.getEncTxtLen(); } else if("iOI".equalsIgnoreCase(accessPath)){ return this.bean.getIOI(); } else if("px".equalsIgnoreCase(accessPath)){ return this.bean.getPx(); } else if("refID".equalsIgnoreCase(accessPath)){ return this.bean.getRefID(); } else if("qual".equalsIgnoreCase(accessPath)){ return this.bean.getQual(); } throw new AttributeNotFoundException(accessPath, new JavaBusinessObject(bean)); } @Override public void set(String accessPath, Object obj)throws AttributeNotFoundException { if("qltyInd".equalsIgnoreCase(accessPath)){ if(obj.toString().trim().equals("")){ return; } this.bean.setQltyInd(IOIQltyIndEnumT.valueOf(obj.toString())); return; } else if("ccy".equalsIgnoreCase(accessPath)){ this.bean.setCcy((String) obj); return; } else if("applSeqCtrl".equalsIgnoreCase(accessPath)){ this.bean.setApplSeqCtrl((ApplicationSequenceControlBlockT) obj); return; } else if("hdr".equalsIgnoreCase(accessPath)){ this.bean.setHdr((MessageHeaderT) obj); return; } else if("pxTyp".equalsIgnoreCase(accessPath)){ this.bean.setPxTyp((BigInteger) obj); return; } else if("encTxt".equalsIgnoreCase(accessPath)){ this.bean.setEncTxt((String) obj); return; } else if("yield".equalsIgnoreCase(accessPath)){ this.bean.setYield((YieldDataBlockT) obj); return; } else if("uRL".equalsIgnoreCase(accessPath)){ this.bean.setURL((String) obj); return; } else if("qty".equalsIgnoreCase(accessPath)){ this.bean.setQty((String) obj); return; } else if("instrmt".equalsIgnoreCase(accessPath)){ this.bean.setInstrmt((InstrumentBlockT) obj); return; } else if("iD".equalsIgnoreCase(accessPath)){ this.bean.setID((String) obj); return; } else if("sprdBnchmkCurve".equalsIgnoreCase(accessPath)){ this.bean.setSprdBnchmkCurve((SpreadOrBenchmarkCurveDataBlockT) obj); return; } else if("txt".equalsIgnoreCase(accessPath)){ this.bean.setTxt((String) obj); return; } else if("natFlag".equalsIgnoreCase(accessPath)){ if(obj.toString().trim().equals("")){ return; } this.bean.setNatFlag(IOINaturalFlagEnumT.valueOf(obj.toString())); return; } else if("finDetls".equalsIgnoreCase(accessPath)){ this.bean.setFinDetls((FinancingDetailsBlockT) obj); return; } else if("encTxtLen".equalsIgnoreCase(accessPath)){ this.bean.setEncTxtLen((BigInteger) obj); return; } else if("px".equalsIgnoreCase(accessPath)){ this.bean.setPx((BigDecimal) obj); return; } else if("side".equalsIgnoreCase(accessPath)){ this.bean.setSide((String) obj); return; } else if("refID".equalsIgnoreCase(accessPath)){ this.bean.setRefID((String) obj); return; } else if("txnTm".equalsIgnoreCase(accessPath)){ this.bean.setTxnTm((XMLGregorianCalendar) obj); return; } else if("transTyp".equalsIgnoreCase(accessPath)){ if(obj.toString().trim().equals("")){ return; } this.bean.setTransTyp(IOITransTypeEnumT.valueOf(obj.toString())); return; } else if("ordQty".equalsIgnoreCase(accessPath)){ this.bean.setOrdQty((OrderQtyDataBlockT) obj); return; } else if("qtyTyp".equalsIgnoreCase(accessPath)){ this.bean.setQtyTyp((BigInteger) obj); return; } else if("validUntilTm".equalsIgnoreCase(accessPath)){ this.bean.setValidUntilTm((XMLGregorianCalendar) obj); return; } throw new AttributeNotFoundException(accessPath, new JavaBusinessObject(bean)); } @Override public void setTarget(IOIMessageT obj) { this.bean = obj; } }
[ "ritwik.bose@headstrong.com" ]
ritwik.bose@headstrong.com
3e9bee2ed1d1c4dd0dd15d19cf2a984634022892
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/131/364/CWE191_Integer_Underflow__int_File_sub_61b.java
b6543d5085df932698ad0dcf0bd0aa2d8782f170
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
6,965
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE191_Integer_Underflow__int_File_sub_61b.java Label Definition File: CWE191_Integer_Underflow__int.label.xml Template File: sources-sinks-61b.tmpl.java */ /* * @description * CWE: 191 Integer Underflow * BadSource: File Read data from file (named c:\data.txt) * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: sub * GoodSink: Ensure there will not be an underflow before subtracting 1 from data * BadSink : Subtract 1 from data, which can cause an Underflow * Flow Variant: 61 Data flow: data returned from one method to another in different classes in the same package * * */ import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.FileInputStream; import java.io.File; import java.io.IOException; import java.util.logging.Level; public class CWE191_Integer_Underflow__int_File_sub_61b { public int badSource() throws Throwable { int data; data = Integer.MIN_VALUE; /* Initialize data */ { File file = new File("C:\\data.txt"); FileInputStream streamFileInput = null; InputStreamReader readerInputStream = null; BufferedReader readerBuffered = null; try { /* read string from file into data */ streamFileInput = new FileInputStream(file); readerInputStream = new InputStreamReader(streamFileInput, "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data from a file */ /* This will be reading the first "line" of the file, which * could be very long if there are little or no newlines in the file */ String stringNumber = readerBuffered.readLine(); if (stringNumber != null) /* avoid NPD incidental warnings */ { try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* Close stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } try { if (streamFileInput != null) { streamFileInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } } return data; } /* goodG2B() - use goodsource and badsink */ public int goodG2BSource() throws Throwable { int data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; return data; } /* goodB2G() - use badsource and goodsink */ public int goodB2GSource() throws Throwable { int data; data = Integer.MIN_VALUE; /* Initialize data */ { File file = new File("C:\\data.txt"); FileInputStream streamFileInput = null; InputStreamReader readerInputStream = null; BufferedReader readerBuffered = null; try { /* read string from file into data */ streamFileInput = new FileInputStream(file); readerInputStream = new InputStreamReader(streamFileInput, "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data from a file */ /* This will be reading the first "line" of the file, which * could be very long if there are little or no newlines in the file */ String stringNumber = readerBuffered.readLine(); if (stringNumber != null) /* avoid NPD incidental warnings */ { try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* Close stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } try { if (streamFileInput != null) { streamFileInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } } return data; } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
47cc768d17bbc99c306b4dfbcba511005a4e1730
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_1114d7084fbaef83d187062c63efddd26e849528/JDataChoosePage/13_1114d7084fbaef83d187062c63efddd26e849528_JDataChoosePage_t.java
648ac4fa28c7ca4da9dd69ff4e5aa7e980b0e211
[]
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,379
java
/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2002-2008, Open Source Geospatial Foundation (OSGeo) * * 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; * version 2.1 of the License. * * 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. */ package org.geotools.swing.data; import java.awt.Component; import java.awt.Font; import java.util.ArrayList; import java.util.Iterator; import javax.swing.DefaultListCellRenderer; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.ListCellRenderer; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import net.miginfocom.swing.MigLayout; import org.geotools.data.DataStoreFactorySpi; import org.geotools.data.DataStoreFinder; import org.geotools.swing.wizard.JPage; /** * A wizard page that will allow the user to choose a format (ie DataAccess factory). * * @source $URL: http://svn.osgeo.org/geotools/branches/2.6.x/modules/unsupported/swing/src/main/java/org/geotools/swing/data/JDataStorePage.java $ */ public class JDataChoosePage extends JPage { /** * Factory for which we are collection connection parameters */ protected DataStoreFactorySpi format; /** max line length of parameter description labels (chars) */ private final int MAX_DESCRIPTION_WIDTH = 60; private JList list; public JDataChoosePage() { this(null); } public JDataChoosePage(DataStoreFactorySpi format) { this.format = format; } @SuppressWarnings("serial") @Override public JPanel createPanel() { final JPanel page = super.createPanel(); page.setLayout(new MigLayout()); JLabel title = new JLabel("Choose DataStore"); Font titleFont = new Font("Arial", Font.BOLD, 14); title.setFont(titleFont); page.add(title, "span"); JLabel description = new JLabel("Available DataStores on your classpath"); page.add(description, "grow, span"); java.util.List<DataStoreFactorySpi> factoryList = new ArrayList<DataStoreFactorySpi>(); for( Iterator<DataStoreFactorySpi> iter = DataStoreFinder.getAvailableDataStores(); iter.hasNext();){ factoryList.add( iter.next() ); } list = new JList( factoryList.toArray() ); ListCellRenderer cellRenderer = new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); DataStoreFactorySpi factory = (DataStoreFactorySpi) value; setText( factory.getDisplayName() ); setToolTipText( factory.getDescription() ); return this; } }; list.setCellRenderer(cellRenderer); list.addListSelectionListener( new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { format = (DataStoreFactorySpi) list.getSelectedValue(); } }); JScrollPane scroll = new JScrollPane( list ); page.add( scroll, "growx,growy,span"); return page; } @Override public void preDisplayPanel() { list.addListSelectionListener( getJWizard().getController() ); } @Override public void preClosePanel() { list.addListSelectionListener( getJWizard().getController() ); JDataStoreWizard dataStoreWizard = (JDataStoreWizard) getJWizard(); dataStoreWizard.setFormat( format ); } @Override public boolean isValid() { return format != null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2d704d1c977af51c6619588047da43335dc479ad
f20cd0d84e61cc162b824ae908c55f637bac63b2
/src/main/java/zmaster587/mechanicalutilities/items/ItemHydroGen.java
01e0ba8f1a03f5673e2559555d40ee7140cace4f
[]
no_license
Jorch72/MechanicalUtilities
2956e0915949a96f39bb784bd6ac34ad81334146
454e6dd8a112e8261fe8612be39bc494eb80eb1c
refs/heads/master
2020-03-29T11:22:53.055198
2014-12-01T06:43:18
2014-12-01T06:43:18
149,849,227
0
0
null
null
null
null
UTF-8
Java
false
false
613
java
package zmaster587.mechanicalutilities.items; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemHydroGen extends ItemBlock { private final static String[] subNames = { "Basic", "LV", "MV" }; public ItemHydroGen(Block id) { super(id); setHasSubtypes(true); setUnlocalizedName("hydroPower"); } @Override public int getMetadata (int damageValue) { return damageValue; } @Override public String getUnlocalizedName(ItemStack itemstack) { return getUnlocalizedName() + "." + subNames[itemstack.getItemDamage()]; } }
[ "zmasterfun@gmail.com" ]
zmasterfun@gmail.com
dd204f4e7596992a249ea86419e7081aee975cef
fd49852c3426acf214b390c33927b5a30aeb0e0a
/aosp/javalib/android/hardware/fingerprint/FingerprintManager$CryptoObject.java
48c42c8ce01fbc267053c6d6140f28c0112d4a16
[]
no_license
HanChangHun/MobilePlus-Prototype
fb72a49d4caa04bce6edb4bc060123c238a6a94e
3047c44a0a2859bf597870b9bf295cf321358de7
refs/heads/main
2023-06-10T19:51:23.186241
2021-06-26T08:28:58
2021-06-26T08:28:58
333,411,414
0
0
null
null
null
null
UTF-8
Java
false
false
1,013
java
package android.hardware.fingerprint; import android.hardware.biometrics.CryptoObject; import android.security.identity.IdentityCredential; import java.security.Signature; import javax.crypto.Cipher; import javax.crypto.Mac; @Deprecated public final class CryptoObject extends CryptoObject { public CryptoObject(Signature paramSignature) { super(paramSignature); } public CryptoObject(Cipher paramCipher) { super(paramCipher); } public CryptoObject(Mac paramMac) { super(paramMac); } public Cipher getCipher() { return super.getCipher(); } public IdentityCredential getIdentityCredential() { return super.getIdentityCredential(); } public Mac getMac() { return super.getMac(); } public Signature getSignature() { return super.getSignature(); } } /* Location: /home/chun/Desktop/temp/!/android/hardware/fingerprint/FingerprintManager$CryptoObject.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "ehwjs1914@naver.com" ]
ehwjs1914@naver.com
caff9c13026c5ef421fb107064a72e3843115477
4cc6fb1fde80a1730b660ba5ec13ad5f3228ea5c
/java-lihongjie/thinking-in-java-4-code/src/main/java/concurrency/CaptureUncaughtException.java
0bedc336fa320c4b24aec75fb1069172365cecb0
[ "MIT" ]
permissive
lihongjie/tutorials
c598425b085549f5f7a29b1c7bf0c86ae9823c94
c729ae0eac90564e6366bc4907dcb8a536519956
refs/heads/master
2023-08-19T05:03:23.754199
2023-08-11T08:25:29
2023-08-11T08:25:29
124,048,964
0
0
MIT
2018-04-01T06:26:19
2018-03-06T08:51:04
Java
UTF-8
Java
false
false
1,529
java
package concurrency;//: concurrency/CaptureUncaughtException.java import java.util.concurrent.*; class ExceptionThread2 implements Runnable { public void run() { Thread t = Thread.currentThread(); System.out.println("run() by " + t); System.out.println( "eh = " + t.getUncaughtExceptionHandler()); throw new RuntimeException(); } } class MyUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler { public void uncaughtException(Thread t, Throwable e) { System.out.println("caught " + e); } } class HandlerThreadFactory implements ThreadFactory { public Thread newThread(Runnable r) { System.out.println(this + " creating new Thread"); Thread t = new Thread(r); System.out.println("created " + t); t.setUncaughtExceptionHandler( new MyUncaughtExceptionHandler()); System.out.println( "eh = " + t.getUncaughtExceptionHandler()); return t; } } public class CaptureUncaughtException { public static void main(String[] args) { ExecutorService exec = Executors.newCachedThreadPool( new HandlerThreadFactory()); exec.execute(new ExceptionThread2()); } } /* Output: (90% match) HandlerThreadFactory@de6ced creating new Thread created Thread[Thread-0,5,main] eh = MyUncaughtExceptionHandler@1fb8ee3 run() by Thread[Thread-0,5,main] eh = MyUncaughtExceptionHandler@1fb8ee3 caught java.lang.RuntimeException *///:~
[ "you@example.com" ]
you@example.com
761b31a1c6d48aa8ab3cd483dc5a8ea224522bc7
e54587d52adda87cfd42fba78c3e6b21b4f23f5c
/asperteamapi/src/main/java/atproj/cyplay/com/asperteamapi/domain/interactor/SituationInteractorImpl.java
a9e64089800fa731aa4cf376d0d3cbd1cf0522f9
[]
no_license
altkachuk/asperteam
2d0e067ba6cc0a2c365d528f8dd73ce9dc9efdc8
ae8446b27ca77932efdf309d601b24fb74c765ff
refs/heads/master
2020-03-29T16:00:20.151174
2019-01-22T13:38:45
2019-01-22T13:38:45
150,092,202
0
0
null
null
null
null
UTF-8
Java
false
false
4,674
java
package atproj.cyplay.com.asperteamapi.domain.interactor; import atproj.cyplay.com.asperteamapi.domain.interactor.callback.ResourceRequestCallback; import atproj.cyplay.com.asperteamapi.domain.repository.AsperTeamApi; import atproj.cyplay.com.asperteamapi.model.Advice; import atproj.cyplay.com.asperteamapi.model.Situation; import atproj.cyplay.com.asperteamapi.model.SituationResource; import atproj.cyplay.com.asperteamapi.model.exception.BaseException; import atproj.cyplay.com.asperteamapi.model.exception.ExceptionType; import java.util.List; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; /** * Created by andre on 11-Apr-18. */ public class SituationInteractorImpl implements SituationInteractor { AsperTeamApi _asperTeamApi; public SituationInteractorImpl(AsperTeamApi asperTeamApi) { _asperTeamApi = asperTeamApi; } public void getSituations(String type, final ResourceRequestCallback<List<Situation>> callback) { final ResourceRequestCallback<List<Situation>> getSituationsCallback = callback; try { Call<List<Situation>> situationsCall = _asperTeamApi.getSituations(type); situationsCall.enqueue(new Callback<List<Situation>>() { @Override public void onResponse(Call<List<Situation>> call, Response<List<Situation>> response) { if (getSituationsCallback != null) { if (response.body() != null) getSituationsCallback.onSucess(response.body()); else getSituationsCallback.onError(new BaseException(ExceptionType.AUTHENTICATION)); } } @Override public void onFailure(Call<List<Situation>> call, Throwable t) { getSituationsCallback.onError(new BaseException(ExceptionType.TECHNICAL)); } }); } catch (Exception e) { getSituationsCallback.onError(new BaseException(ExceptionType.TECHNICAL)); } } public void getSituationResources(int situationId, final ResourceRequestCallback<List<SituationResource>> callback) { final ResourceRequestCallback<List<SituationResource>> getSituationResourcesCallback = callback; try { Call<List<SituationResource>> situationResourcesCall = _asperTeamApi.getSituationResources(situationId); situationResourcesCall.enqueue(new Callback<List<SituationResource>>() { @Override public void onResponse(Call<List<SituationResource>> call, Response<List<SituationResource>> response) { if (getSituationResourcesCallback != null) { if (response.body() != null) getSituationResourcesCallback.onSucess(response.body()); else getSituationResourcesCallback.onError(new BaseException(ExceptionType.AUTHENTICATION)); } } @Override public void onFailure(Call<List<SituationResource>> call, Throwable t) { getSituationResourcesCallback.onError(new BaseException(ExceptionType.TECHNICAL)); } }); } catch (Exception e) { getSituationResourcesCallback.onError(new BaseException(ExceptionType.TECHNICAL)); } } public void getAdvices(String dateTime, final ResourceRequestCallback<List<Advice>> callback) { final ResourceRequestCallback<List<Advice>> getAdviceCallback = callback; try { Call<List<Advice>> adviceCall = _asperTeamApi.getAdvices(dateTime); adviceCall.enqueue(new Callback<List<Advice>>() { @Override public void onResponse(Call<List<Advice>> call, Response<List<Advice>> response) { if (getAdviceCallback != null) { if (response.body() != null) getAdviceCallback.onSucess(response.body()); else getAdviceCallback.onError(new BaseException(ExceptionType.AUTHENTICATION)); } } @Override public void onFailure(Call<List<Advice>> call, Throwable t) { getAdviceCallback.onError(new BaseException(ExceptionType.TECHNICAL)); } }); } catch (Exception e) { getAdviceCallback.onError(new BaseException(ExceptionType.TECHNICAL)); } } }
[ "andreyltkachuk@gmail.com" ]
andreyltkachuk@gmail.com
951bf6091c2106945f0b4a23b7e0c7479bc02b61
905577649c283ae8a7fd1b2dc4338979f574fa4f
/src/main/java/com/model/LoggerUtility.java
d48bb93487fafc73f267f4b7c916bac5a842a6ed
[]
no_license
InnovationAndMe/JMSProjects
3e5c1c6900f5d8c8a631387f324c114a278d8619
88feab6122854ea837e314b23cfcb7e6ebd6bad5
refs/heads/master
2021-06-08T04:36:59.771564
2016-10-30T15:00:15
2016-10-30T15:00:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package main.java.com.model; import main.java.com.web.JMSReceiver; import main.java.com.web.JMSSender; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class LoggerUtility { private static final Logger senderLogger = LoggerFactory.getLogger(JMSSender.class); private static final Logger receiverLogger = LoggerFactory.getLogger(JMSReceiver.class); public static Logger getSenderlogger() { return senderLogger; } public static Logger getReceiverlogger() { return receiverLogger; } }
[ "Dell@Dell-PC" ]
Dell@Dell-PC
b7cc04367afc417127a6e24eff7a17c7e33f234a
bb1e8dacad7fa1577545938d7483c28a089e2eba
/Common/NhincLib/src/main/java/gov/hhs/fha/nhinc/util/UtilException.java
82d4a095650ac74dbffa3a0dd57091b28e6d5e96
[]
no_license
TATRC/KMR2
b060c79d4eb96cf98043924af61dfafca56e197e
f0cc3033ed974414e46c20e0fc0bbee5068c366b
refs/heads/master
2021-01-25T10:21:52.889217
2012-09-17T18:18:53
2012-09-17T18:18:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,707
java
/* * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION * Copyright (c) 2008, Nationwide Health Information Network (NHIN) Connect. All rights reserved. * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * - Neither the name of the NHIN Connect Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * END OF TERMS AND CONDITIONS */ package gov.hhs.fha.nhinc.util; /** * This exception is thrown when an error occurs accessing properties. * * @author Les Westberg */ public class UtilException extends Exception { private static final long serialVersionUID = 5796300225177957766L; /** * Default constructor. */ public UtilException() { super(); } /** * Constructor with an envloping exception. * * @param e The exception that caused this one. */ public UtilException(Exception e) { super(e); } /** * Constructor with the given exception and message. * * @param sMessage The message to place in the exception. * @param e The exception that triggered this one. */ public UtilException(String sMessage, Exception e) { super(sMessage, e); } /** * Constructor with a given message. * * @param sMessage The message for the exception. */ public UtilException(String sMessage) { super(sMessage); } }
[ "ferret@stormwoods.com" ]
ferret@stormwoods.com
9a274dbafe85c36e4dc2e9bd30775cfabf22e580
df4539abf5d521be6fddd25734ccd7d7ac461428
/01-JavaSE/day11-多态&抽象类&接口/案例/学员练习代码/myDuoTai/src/com/itheima_02/AnimalDemo.java
a28aab18a907fd4596dd6f690fb4cc52d0062f27
[]
no_license
muzierixao/Learning-Java
c9bf6d1d020fd5b6e55d99c50172c465ea06fec0
893d9a730d6429626d1df5613fa7f81aca5bdd84
refs/heads/master
2023-04-18T06:48:46.280665
2020-12-27T05:32:02
2020-12-27T05:32:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
212
java
package com.itheima_02; /* 测试类 */ public class AnimalDemo { public static void main(String[] args) { //有父类引用指向子类对象 Animal a = new Cat(); } }
[ "157514367@qq.com" ]
157514367@qq.com
88c4232f2cabae13bb32f19fb960dcbbe656aaa4
c9f25a37f52533850afd8bc09b3c187eefd31de2
/spring-boot-student-app/src/main/java/com/example/studentapp/exception/StudentAlreadyExistException.java
fa5fafebdc83e28a228e25f1d6eacf32307e324c
[]
no_license
ramanujds/br-java-spring-repo
eed844e7714e94a9bea8fe6403bd3de31e852b8c
63a58c089e9e29edbf1e62f3981700e2807131d7
refs/heads/master
2023-06-09T17:43:31.984610
2021-02-01T11:49:37
2021-02-01T11:49:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
199
java
package com.example.studentapp.exception; public class StudentAlreadyExistException extends RuntimeException { public StudentAlreadyExistException(String message) { super(message); } }
[ "ramanujds9@gmail.com" ]
ramanujds9@gmail.com
7df35c75394024b9ee57ad64a2c4043297b733c2
88c02d49d669c7637bbca9fd1f570cc7292f484f
/AndroidJniGenerate/GetJniCode/xwebruntime_javacode/org/xwalk/core/internal/XWalkViewRunQueue.java
c171bc6ab476284bf4eedba60f8b28c9fb814d08
[]
no_license
ghost461/AndroidMisc
1af360cf36ae212a81814f9a4057884290dbe12e
dfa4c9115c0198755c9ff6c5e5c9ea3b56c9daff
refs/heads/master
2020-09-07T19:17:00.028887
2019-11-11T02:55:33
2019-11-11T02:55:33
220,887,476
0
0
null
null
null
null
UTF-8
Java
false
false
2,623
java
package org.xwalk.core.internal; import java.util.Queue; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.chromium.base.ThreadUtils; public class XWalkViewRunQueue { public interface ChromiumHasStartedCallable { boolean hasStarted(); } private final ChromiumHasStartedCallable mChromiumHasStartedCallable; private final Queue mQueue; public XWalkViewRunQueue(ChromiumHasStartedCallable arg2) { super(); this.mQueue = new ConcurrentLinkedQueue(); this.mChromiumHasStartedCallable = arg2; } public void addTask(Runnable arg2) { this.mQueue.add(arg2); if(this.mChromiumHasStartedCallable.hasStarted()) { ThreadUtils.runOnUiThread(new Runnable() { public void run() { XWalkViewRunQueue.this.drainQueue(); } }); } } public boolean chromiumHasStarted() { return this.mChromiumHasStartedCallable.hasStarted(); } public void drainQueue() { if(this.mQueue != null) { if(this.mQueue.isEmpty()) { } else { Object v0; for(v0 = this.mQueue.poll(); v0 != null; v0 = this.mQueue.poll()) { ((Runnable)v0).run(); } return; } } } public Object runBlockingFuture(FutureTask arg4) { if(!this.chromiumHasStarted()) { throw new RuntimeException(new Throwable("Must be started before we block!")); } if(ThreadUtils.runningOnUiThread()) { throw new RuntimeException(new Throwable("This method should only be called off the UI thread")); } this.addTask(((Runnable)arg4)); long v0 = 1; try { return arg4.get(v0, TimeUnit.SECONDS); } catch(Exception v4) { throw new RuntimeException(new Throwable(v4.getMessage())); } catch(TimeoutException ) { throw new RuntimeException(new Throwable("Probable deadlock detected due to WebView API being called on incorrect thread while the UI thread is blocked.")); } } public Object runOnUiThreadBlocking(Callable arg2) { return this.runBlockingFuture(new FutureTask(arg2)); } public void runVoidTaskOnUiThreadBlocking(Runnable arg3) { this.runBlockingFuture(new FutureTask(arg3, null)); } }
[ "lingmilch@sina.com" ]
lingmilch@sina.com
25e163686777690fefbf96ec2c2cf842e7afa3fb
c80f25f9c8faa1ea9db5bb1b8e36c3903a80a58b
/laosiji-sources/feng2/sources/com/baidu/mapapi/map/DotOptions.java
e9c9db8a0298c69e216aed1449e821fa79d358a6
[]
no_license
wenzhaot/luobo_tool
05c2e009039178c50fd878af91f0347632b0c26d
e9798e5251d3d6ba859bb15a00d13f085bc690a8
refs/heads/master
2020-03-25T23:23:48.171352
2019-09-21T07:09:48
2019-09-21T07:09:48
144,272,972
0
0
null
null
null
null
UTF-8
Java
false
false
1,630
java
package com.baidu.mapapi.map; import android.os.Bundle; import android.support.v4.view.ViewCompat; import com.baidu.mapapi.model.LatLng; public final class DotOptions extends OverlayOptions { int a; boolean b = true; Bundle c; private LatLng d; private int e = ViewCompat.MEASURED_STATE_MASK; private int f = 5; Overlay a() { Overlay dot = new Dot(); dot.r = this.b; dot.q = this.a; dot.s = this.c; dot.b = this.e; dot.a = this.d; dot.c = this.f; return dot; } public DotOptions center(LatLng latLng) { if (latLng == null) { throw new IllegalArgumentException("dot center can not be null"); } this.d = latLng; return this; } public DotOptions color(int i) { this.e = i; return this; } public DotOptions extraInfo(Bundle bundle) { this.c = bundle; return this; } public LatLng getCenter() { return this.d; } public int getColor() { return this.e; } public Bundle getExtraInfo() { return this.c; } public int getRadius() { return this.f; } public int getZIndex() { return this.a; } public boolean isVisible() { return this.b; } public DotOptions radius(int i) { if (i > 0) { this.f = i; } return this; } public DotOptions visible(boolean z) { this.b = z; return this; } public DotOptions zIndex(int i) { this.a = i; return this; } }
[ "tanwenzhao@vipkid.com.cn" ]
tanwenzhao@vipkid.com.cn
84195b587919cb5d9093ca41969256c309f146b4
d6b21db31c312ecb0da1b52b955eac1c93c373a9
/JavaSpring_Projects/TicketAdvantage/CommonPackage/src/main/java/com/ticketadvantage/services/model/SpreadTransaction.java
910dcd66ae89987a69851fe29b3a851bbe2c66d2
[]
no_license
teja0009/Projects
84b366a0d0cb17245422c6e2aad5e65a5f7403ac
70a437a164cef33e42b65162f8b8c3cfaeda008b
refs/heads/master
2023-03-16T10:10:10.529062
2020-03-08T06:22:43
2020-03-08T06:22:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,605
java
/** * */ package com.ticketadvantage.services.model; import java.util.Set; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; /** * @author jmiller * */ @XmlRootElement(name = "spreadtransaction") @XmlAccessorType(XmlAccessType.NONE) public class SpreadTransaction { @XmlElement private SpreadRecordEvent spreadRecordEvent; @XmlElement private Set<Accounts> accounts; @XmlElement private Set<Groups> groups; /** * */ public SpreadTransaction() { } /** * @return the spreadRecordEvent */ public SpreadRecordEvent getSpreadRecordEvent() { return spreadRecordEvent; } /** * @param spreadRecordEvent the spreadRecordEvent to set */ public void setSpreadRecordEvent(SpreadRecordEvent spreadRecordEvent) { this.spreadRecordEvent = spreadRecordEvent; } /** * @return the accounts */ public Set<Accounts> getAccounts() { return accounts; } /** * @param accounts the accounts to set */ public void setAccounts(Set<Accounts> accounts) { this.accounts = accounts; } /** * @return the groups */ public Set<Groups> getGroups() { return groups; } /** * @param groups the groups to set */ public void setGroups(Set<Groups> groups) { this.groups = groups; } /* (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { return "SpreadTransaction [spreadRecordEvent=" + spreadRecordEvent + ", accounts=" + accounts + ", groups=" + groups + "]"; } }
[ "sinceregeneral@outlook.com" ]
sinceregeneral@outlook.com
d40de147d56ac8d4ef8538bf9faddfc89e7637d8
6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3
/src/com/inponsel/android/utils/Encryption$1.java
07b0ec1fa156b6fdce601205086a3e07f97a83a5
[]
no_license
alexivaner/GadgetX-Android-App
6d700ba379d0159de4dddec4d8f7f9ce2318c5cc
26c5866be12da7b89447814c05708636483bf366
refs/heads/master
2022-06-01T09:04:32.347786
2020-04-30T17:43:17
2020-04-30T17:43:17
260,275,241
0
0
null
null
null
null
UTF-8
Java
false
false
1,475
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.inponsel.android.utils; import android.os.AsyncTask; // Referenced classes of package com.inponsel.android.utils: // Encryption class llback extends AsyncTask { final Encryption this$0; private final llback val$callback; protected volatile transient Object doInBackground(Object aobj[]) { return doInBackground((String[])aobj); } protected transient String doInBackground(String as[]) { try { as = encrypt(as[0]); } // Misplaced declaration of an exception variable catch (String as[]) { val$callback.onError(as); return null; } if (as != null) { break MISSING_BLOCK_LABEL_33; } val$callback.onError(new Exception("Encrypt return null, it normally occurs when you send a null data")); return as; } protected volatile void onPostExecute(Object obj) { onPostExecute((String)obj); } protected void onPostExecute(String s) { super.onPostExecute(s); if (s != null) { val$callback.onSuccess(s); } } llback() { this$0 = final_encryption; val$callback = llback.this; super(); } }
[ "hutomoivan@gmail.com" ]
hutomoivan@gmail.com
7dbe170719c10a3cec567300411eecc2526a2978
36cf3a7e22faa8b0826a8affbb4ae9922f9d7890
/app/src/main/java/jurgen/example/moviecatalogue4/model/TvShowFavorite.java
02f08e87c71ce5f1493b939927c41bcbb1829cfb
[]
no_license
jurgenirgo/MovieCatalogue4
f5bf9363522beaa99a845178a447e673c9fe3348
233886ab61b91e6ce22f505f6b6c110e9ddbddf2
refs/heads/master
2021-05-26T11:49:23.400104
2020-04-08T15:04:03
2020-04-08T15:04:03
254,120,597
0
0
null
null
null
null
UTF-8
Java
false
false
1,564
java
package jurgen.example.moviecatalogue4.model; import android.arch.persistence.room.ColumnInfo; import android.arch.persistence.room.Entity; import android.arch.persistence.room.PrimaryKey; import java.io.Serializable; @Entity(tableName = "tbtvshowfavorite") public class TvShowFavorite implements Serializable { @PrimaryKey private int id; @ColumnInfo(name = "name") private String name; @ColumnInfo(name = "overview") private String overview; @ColumnInfo(name = "first_air_date") private String first_air_date; @ColumnInfo(name = "poster_path") private String poster_path; @ColumnInfo(name = "date") private String date; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getOverview() { return overview; } public void setOverview(String overview) { this.overview = overview; } public String getFirst_air_date() { return first_air_date; } public void setFirst_air_date(String first_air_date) { this.first_air_date = first_air_date; } public String getPoster_path() { return poster_path; } public void setPoster_path(String poster_path) { this.poster_path = poster_path; } public void setDate(String date){ this.date = date; } public String getDate() { return date; } }
[ "jurgenirgof@gmail.com" ]
jurgenirgof@gmail.com
4e1c6de9e81deda2a3ae87ad0ef25b78df844fc4
3c0aa9c066df71d8d07d3aeec6c781738efd19e3
/src/main/java/com/hushunjian/gradle/service/ImportantTaskService.java
951856bef6c296094cfe3c81069a20ee349a91db
[]
no_license
hushunjian/gradle
82d12569169bdbb99b447a23ecd9b6751179ea1b
e961635464cd1659361bd8a9816e82df56771f54
refs/heads/master
2020-03-17T13:58:23.882230
2019-11-01T08:41:52
2019-11-01T08:41:52
133,652,437
1
0
null
null
null
null
UTF-8
Java
false
false
2,654
java
package com.hushunjian.gradle.service; import java.time.ZonedDateTime; import java.util.List; import javax.transaction.Transactional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hushunjian.gradle.entity.ImportantTaskV2Entity; import com.hushunjian.gradle.entity.TaskV2Entity; import com.hushunjian.gradle.repo.ImportantTaskV2Repo; import com.hushunjian.gradle.repo.TaskV2Repo; @Service @Transactional public class ImportantTaskService { @Autowired private TaskV2Repo taskV2Repo; @Autowired private ImportantTaskV2Repo importantTaskV2Repo; /** * 添加任务 * * @param taskName * @return */ public TaskV2Entity addTaskV2(String taskName) { TaskV2Entity taskV2 = new TaskV2Entity(); taskV2.setTaskName(taskName); taskV2Repo.save(taskV2); return taskV2; } /** * 添加重点任务组 * * @param taskName * @return */ public ImportantTaskV2Entity addImportantTaskGroup(String importantTaskGroupName) { ImportantTaskV2Entity importantTaskV2 = new ImportantTaskV2Entity(); importantTaskV2.setImportantTaskName(importantTaskGroupName); importantTaskV2.setStartDate(ZonedDateTime.now()); importantTaskV2Repo.save(importantTaskV2); return importantTaskV2; } /** * 获取所有的任务列表 * * @return */ public List<TaskV2Entity> getAllTaskV2() { return taskV2Repo.findAll(); } /** * 获取所有的重点任务组数据 * * @return */ public List<ImportantTaskV2Entity> getAllImportantTaskV2Group() { List<ImportantTaskV2Entity> importantTaskV2s = importantTaskV2Repo.findByGroupIsNull(); return importantTaskV2s; } /** * 获取单个任务 * * @param taskId * @return */ public TaskV2Entity findTaskV2ById(Long taskId) { return taskV2Repo.findOne(taskId); } /** * 获取单个重点任务组数据 * * @param groupId * @return */ public ImportantTaskV2Entity findImportantGroupTaskV2ById(Long groupId) { return importantTaskV2Repo.findOne(groupId); } /** * 任务加入重点任务组 * * @param taskV2 * @param importantGroupTaskV2 */ public void joinTaskImportantTaskGroup(TaskV2Entity taskV2, ImportantTaskV2Entity importantGroupTaskV2) { ImportantTaskV2Entity member = new ImportantTaskV2Entity(); member.setGroup(importantGroupTaskV2); member.setImportantTaskName(taskV2.getTaskName()); member.setTaskV2(taskV2); importantGroupTaskV2.getMembers().add(member); importantTaskV2Repo.save(importantGroupTaskV2); } }
[ "hushunjian950420@163.com" ]
hushunjian950420@163.com
9d87bd4e32dbac09b080daba567d49c290ea42dd
78a89691ae32f9576143feb561cf127adf7a7a33
/ksh-sys/ksh-oauth2-client/src/main/java/com/fosung/ksh/oauth2/client/config/Oauth2ClientAutoConfiguration.java
9462fb94cbd33bcba5101d85c6a5292492a3b732
[]
no_license
zhenqun/fosung-ksh
e1a4aac4f08ab124018fc89548d7dc9c963afec7
36027ee33b5d56443aafa2fcfb3a02f7159845c2
refs/heads/master
2022-07-10T05:19:44.742151
2019-10-21T01:03:56
2019-10-21T01:03:56
215,750,234
0
0
null
2022-06-29T17:43:12
2019-10-17T09:10:08
Java
UTF-8
Java
false
false
634
java
package com.fosung.ksh.oauth2.client.config; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; /** * 灯塔web数据获取服务配置 * * @Author : liupeng * @Date : 2018-12-07 * @Modified By */ @Order(Ordered.HIGHEST_PRECEDENCE) @Slf4j @Configuration @EnableConfigurationProperties(Oauth2ClientProperties.class) public class Oauth2ClientAutoConfiguration { Oauth2ClientAutoConfiguration() { } }
[ "liuzq@hd100.com" ]
liuzq@hd100.com
24987e3a5ebd75649f0aee1c5dd65e8f6b786fff
a40e8647d702acb405f8da205e7f6e7daa7856c0
/org.jenetics/src/main/java/org/jenetics/engine/EvolutionIterator.java
28d5bde75fb6463daee30a1d77e9d69056917bc4
[ "Apache-2.0" ]
permissive
xiaoqshou/jenetics
ca8965d318f4147d23a98f9d0e908969c43d7799
b0bc2d4762873df8df9295cebc8728a4a87677b6
refs/heads/master
2021-01-21T08:44:31.782899
2015-01-12T17:51:33
2015-01-12T17:51:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,928
java
/* * Java Genetic Algorithm Library (@__identifier__@). * Copyright (c) @__year__@ Franz Wilhelmstötter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Author: * Franz Wilhelmstötter (franz.wilhelmstoetter@gmx.at) */ package org.jenetics.engine; import static java.util.Objects.requireNonNull; import java.util.Iterator; import java.util.function.Function; import java.util.function.Supplier; import org.jenetics.Gene; /** * @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a> * @since 3.0 * @version 3.0 &mdash; <em>$Date: 2014-09-21 $</em> */ final class EvolutionIterator< G extends Gene<?, G>, C extends Comparable<? super C> > implements Iterator<EvolutionResult<G, C>> { private final Function<EvolutionStart<G, C>, EvolutionResult<G, C>> _evolution; private final Supplier<EvolutionStart<G, C>> _initial; private EvolutionStart<G, C> _start; EvolutionIterator( final Function<EvolutionStart<G, C>, EvolutionResult<G, C>> evolution, final Supplier<EvolutionStart<G, C>> initial ) { _evolution = requireNonNull(evolution); _initial = requireNonNull(initial); } @Override public EvolutionResult<G, C> next() { if (_start == null) { _start = _initial.get(); } final EvolutionResult<G, C> result = _evolution.apply(_start); _start = result.next(); return result; } @Override public boolean hasNext() { return true; } }
[ "franz.wilhelmstoetter@gmail.com" ]
franz.wilhelmstoetter@gmail.com
366432f5798bf32d0240fad56c683adbce640df1
7ba074aaff5db3aa507df21ac8f421e41838ff24
/extjs-forestry/forestry/src/com/forestry/dao/sys/SensorLastDataDao.java
2d9794eb30c7c0d6e8dc29dbdae465f7ff1f0937
[]
no_license
eideo/framework
72ae19c53cded98bdeeb31b6460087ba3d3bad63
36b83a0a953c97025277eb434b972ad910ba30c1
refs/heads/master
2020-12-30T15:43:18.681234
2015-11-20T18:25:04
2015-11-20T18:25:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
package com.forestry.dao.sys; import com.forestry.model.sys.SensorLastData; import core.dao.Dao; /** * @框架唯一的升级和技术支持地址:http://shop111863449.taobao.com */ public interface SensorLastDataDao extends Dao<SensorLastData> { }
[ "1152695512@qq.com" ]
1152695512@qq.com
c87e1ae46aaefb28fa3ea0dfac069daffb0dc887
0ceafc2afe5981fd28ce0185e0170d4b6dbf6241
/AlgoKit (3rdp)/Code-store v1.0/yaal/archive/2011.10/2011.10.13 - NEERC Central Subregional/TaskD.java
29db38a41f1c0f95e28ad00c5db44a56de0d2040
[]
no_license
brainail/.happy-coooding
1cd617f6525367133a598bee7efb9bf6275df68e
cc30c45c7c9b9164095905cc3922a91d54ecbd15
refs/heads/master
2021-06-09T02:54:36.259884
2021-04-16T22:35:24
2021-04-16T22:35:24
153,018,855
2
1
null
null
null
null
UTF-8
Java
false
false
1,488
java
import net.egork.utils.Solver; import java.io.PrintWriter; public class TaskD implements Solver { public void solve(int testNumber, net.egork.utils.old.io.old.InputReader in, PrintWriter out) { int number = in.readInt(); char[] literals = in.readString().toCharArray(); char[] order = {'I', 'V', 'X', 'L', 'C', 'D', 'M'}; int[] count = new int[7]; for (char literal : literals) { for (int i = 0; i < 7; i++) { if (literal == order[i]) count[i]++; } } int[] value = {1, 5, 10, 50, 100, 500, 1000}; for (int i = 6; i >= 0; i--) { if (count[i] != 0) { if (!go(number - value[i] * count[i], i - 1, count, "", generate(order[i], count[i]), value, order, out)) out.println("NO"); return; } } } private boolean go(int number, int step, int[] count, String answerLeft, String answerRight, int[] value, char[] order, PrintWriter out) { if (step < 0) { if (number == 0) { out.println(answerLeft + answerRight); return true; } return false; } for (int i = 0; i <= count[step]; i++) { if (go(number - value[step] * (count[step] - 2 * i), step - 1, count, answerLeft + generate(order[step], i), answerRight + generate(order[step], count[step] - i), value, order, out)) return true; } return false; } private String generate(char c, int repetitions) { StringBuilder builder = new StringBuilder(repetitions); for (int i = 0; i < repetitions; i++) builder.append(c); return builder.toString(); } }
[ "wsemirz@gmail.com" ]
wsemirz@gmail.com
97806d39f8b3f53d8226473e246343f4c5d8de7c
3dd85926f28ef9338a64438ea4cd5b00fb47a7f2
/src/main/java/by/voloshchuk/controller/command/Command.java
9fce8ca63bc79cf4161acc1b27d24d4582d896ad
[]
no_license
VoloshchukD/teams
3de8f5e71a98f75d6eb769172d5a84c9394427f0
b6b58aa706eaafe4923817e21e73f4baf2699880
refs/heads/master
2023-07-30T15:29:10.658553
2021-09-10T08:03:46
2021-09-10T08:03:46
386,599,466
0
0
null
null
null
null
UTF-8
Java
false
false
586
java
package by.voloshchuk.controller.command; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Interface for sync commands. * * @author Daniil Voloshchuk */ public interface Command { /** * Method for sync command logics. * * @param request - users request * @param response - data to return to user * @return {@link CommandRouter} */ CommandRouter execute(HttpServletRequest request, HttpServletResponse response) throws ServletException; }
[ "voloshchukd7@gmail.com" ]
voloshchukd7@gmail.com
c92c817701e8340285a5deef0d0ad0487797f21d
69ed18f94b2c1caf9742d983f5daf28f40614ca2
/BomWebPortal/src/com/bomwebportal/service/WaiveServiceImpl.java
3c26c07e267dd47efd8da141962f0e895cf7d9d0
[]
no_license
RodexterMalinao/springBoard
d1b4f9d2f7e76f63e2690f414863096e3e271369
aa4bf03395b12d923d28767e1561049c45ee3261
refs/heads/master
2020-09-03T07:21:15.415737
2019-12-16T07:12:22
2019-12-16T07:12:22
219,409,720
0
1
null
2019-12-16T07:12:23
2019-11-04T03:28:03
Java
UTF-8
Java
false
false
1,374
java
package com.bomwebportal.service; import java.util.Date; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.bomwebportal.dao.WaiveDAO; import com.bomwebportal.dto.WaiveLkupDTO; import com.bomwebportal.exception.AppRuntimeException; import com.bomwebportal.exception.DAOException; public class WaiveServiceImpl implements WaiveService { protected final Log logger = LogFactory.getLog(getClass()); private WaiveDAO waiveDAO; public WaiveDAO getWaiveDAO() { return waiveDAO; } public void setWaiveDAO(WaiveDAO waiveDAO) { this.waiveDAO = waiveDAO; } public WaiveLkupDTO getWaiveLkupDTO(String reasonType, String reasonCd) { try { logger.info("getWaiveLkupDTO() is called in WaiveServiceImpl"); return waiveDAO.getWaiveLkupDTO(reasonType, reasonCd); } catch (DAOException de) { logger.error("Exception caught in getWaiveLkupDTO()", de); throw new AppRuntimeException(de); } } public List<WaiveLkupDTO> findWaiveLkupByReasonType(String reasonType, Date appDate) { try { logger.info("findWaiveLkupByReasonType() is called in WaiveServiceImpl"); return waiveDAO.findWaiveLkupByReasonType(reasonType, appDate); } catch (DAOException de) { logger.error("Exception caught in findWaiveLkupByReasonType()", de); throw new AppRuntimeException(de); } } }
[ "acer_08_06@yahoo.com" ]
acer_08_06@yahoo.com
47d67063e333623dd1fdaa140002e1cf469c94bb
d436fade2ee33c96f79a841177a6229fdd6303b7
/com/planet_ink/coffee_mud/Abilities/Fighter/Fighter_Rescue.java
3ef9cacc43dcf7ebc4dcc4228ee77b28393a8ace
[ "Apache-2.0" ]
permissive
SJonesy/UOMUD
bd4bde3614a6cec6fba0e200ac24c6b8b40a2268
010684f83a8caec4ea9d38a7d57af2a33100299a
refs/heads/master
2021-01-20T18:30:23.641775
2017-05-19T21:38:36
2017-05-19T21:38:36
90,917,941
0
0
null
null
null
null
UTF-8
Java
false
false
3,950
java
package com.planet_ink.coffee_mud.Abilities.Fighter; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2001-2017 Bo Zimmerman 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. */ public class Fighter_Rescue extends FighterSkill { @Override public String ID() { return "Fighter_Rescue"; } private final static String localizedName = CMLib.lang().L("Rescue"); @Override public String name() { return localizedName; } private static final String[] triggerStrings =I(new String[] {"RESCUE","RES"}); @Override public int abstractQuality(){return Ability.QUALITY_OK_OTHERS;} @Override public String[] triggerStrings(){return triggerStrings;} @Override protected int canAffectCode(){return 0;} @Override protected int canTargetCode(){return Ability.CAN_MOBS;} @Override public int classificationCode(){return Ability.ACODE_SKILL|Ability.DOMAIN_MARTIALLORE;} @Override public int usageType(){return USAGE_MOVEMENT;} @Override public long flags(){return FLAG_AGGROFYING;} @Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { if(mob==null) return false; final MOB imfighting=mob.getVictim(); MOB target=null; if((commands.size()==0) &&(imfighting!=null) &&(imfighting!=mob) &&(imfighting.getVictim()!=null) &&(imfighting.getVictim()!=mob)) target=imfighting.getVictim(); if(target==null) target=getTarget(mob,commands,givenTarget); if(target==null) return false; final MOB monster=target.getVictim(); if((target.amDead())||(monster==null)||(monster.amDead())) { mob.tell(L("@x1 isn't fighting anyone!",target.charStats().HeShe())); return false; } if(monster.getVictim()==mob) { mob.tell(L("You are already taking the blows from @x1.",monster.name())); return false; } if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final boolean success=proficiencyCheck(mob,0,auto); String str=null; if(success) { str=L("^F^<FIGHT^><S-NAME> rescue(s) <T-NAMESELF>!^</FIGHT^>^?"); final CMMsg msg=CMClass.getMsg(mob,target,this,CMMsg.MSG_NOISYMOVEMENT,str); CMLib.color().fixSourceFightColor(msg); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); monster.setVictim(mob); } } else { str=L("<S-NAME> attempt(s) to rescue <T-NAMESELF>, but fail(s)."); final CMMsg msg=CMClass.getMsg(mob,target,this,CMMsg.MSG_NOISYMOVEMENT,str); if(mob.location().okMessage(mob,msg)) mob.location().send(mob,msg); } return success; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
f76bc7670c993cf8a345586bd64f8b2564a55668
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/29/29_8213e54cd0f98b8fb1e553c27aee801efbbdf476/LEDFaviconAnimation/29_8213e54cd0f98b8fb1e553c27aee801efbbdf476_LEDFaviconAnimation_s.java
53c6615611d4c065ab38103d7776b99c0182cedd
[]
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,504
java
package com.partyrock.anim.ledpanel; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.EnumSet; import net.sf.image4j.codec.ico.ICODecoder; import org.eclipse.swt.widgets.Shell; import com.partyrock.LightMaster; import com.partyrock.anim.ElementAnimation; import com.partyrock.element.ElementController; import com.partyrock.element.ElementType; import com.partyrock.element.led.LEDPanelController; import com.partyrock.tools.PartyToolkit; import com.partyrock.tools.net.NetManager; public class LEDFaviconAnimation extends ElementAnimation { private BufferedImage favicon; public LEDFaviconAnimation(LightMaster master, int startTime, ArrayList<ElementController> panels) { super(master, startTime, panels); favicon = null; } /** * Called when the animation is run */ @Override public void trigger() { for (ElementController element : getElements()) { LEDPanelController panel = (LEDPanelController) element; for (int r = 0; r < panel.getPanelHeight(); r++) { for (int c = 0; c < panel.getPanelWidth(); c++) { int color = favicon.getRGB(c, r); panel.setColor(r, c, (color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF); } } } } @Override public void setup(Shell window) { String url = null; while (url == null || url.trim().equals("")) { url = PartyToolkit.openInput(window, "Enter the URL of the website to display the favicon of", "Favicon URL"); } if (!url.endsWith("favicon.ico")) { if (!url.endsWith("/")) { url += "/"; } url += "favicon.ico"; } if (!url.startsWith("http://") && !url.startsWith("https://")) { url = "http://" + url; } // Download the favicon to the computer File tmp_favicon = new File("tmp-favicon.ico"); NetManager.downloadURLToFile(url, tmp_favicon); // Read it in as a BufferedImage try { favicon = ICODecoder.read(tmp_favicon).get(0); if (favicon.getHeight() != 16 || favicon.getWidth() != 16) { favicon = (BufferedImage) favicon.getScaledInstance(16, 16, Image.SCALE_SMOOTH); } } catch (IOException e) { System.out.println("Error reading image file"); e.printStackTrace(); } } /** * Returns the types of elements this animation supports */ public static EnumSet<ElementType> getSupportedTypes() { return EnumSet.of(ElementType.LEDS); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
622953baada6b9faddbd53339f268c3bd7cb2383
1fd24d5925988856c87e18d87edc04df3853e743
/src/main/java/ua/com/clinicaltrials/controllers/MedicalFormController.java
b976d8a35ba0bdc6bb9f2286cfaabc6a6e58a88f
[]
no_license
lomk/clinicaltrials_rest
d7fc194d70bd730fc6c451590352ba25f009ff3d
97c9b0ac7b0e71ad08bbdcecaf1d2b41185268da
refs/heads/master
2021-09-11T17:54:58.041744
2018-04-10T15:59:30
2018-04-10T15:59:30
107,945,135
0
0
null
null
null
null
UTF-8
Java
false
false
2,229
java
package ua.com.clinicaltrials.controllers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import ua.com.clinicaltrials.domain.MedicalForm; import ua.com.clinicaltrials.errors.CustomErrorType; import ua.com.clinicaltrials.repositories.MedicalFormRepository; import java.util.List; import java.util.Optional; @RestController public class MedicalFormController { @Autowired MedicalFormRepository medicalFormRepository; @RequestMapping(value = "medical-form", method = RequestMethod.GET) public ResponseEntity<?> getAll( @RequestParam(value = "id", required = false) Optional<Integer> id, @RequestParam(value = "page", required = false) Optional<Integer> page ) { if (page.isPresent() && !id.isPresent()) { List<MedicalForm> medicalFormList = medicalFormRepository.findAll(); if (medicalFormList == null){ return new ResponseEntity<>(new CustomErrorType("No data found"), HttpStatus.NOT_FOUND); } return new ResponseEntity<>(medicalFormList, HttpStatus.OK); } if (id.isPresent() && !id.get().toString().isEmpty() && !page.isPresent()) { MedicalForm medicalForm = medicalFormRepository.findOne(id.get()); if (medicalForm == null){ try { return new ResponseEntity<>(new CustomErrorType( "MedicalForm with id " + id.get() + " not found."), HttpStatus.NOT_FOUND); } catch (Exception e){ e.printStackTrace(); } } return new ResponseEntity<>(medicalForm, HttpStatus.OK); } return new ResponseEntity<>(new CustomErrorType( "Bad parameters"), HttpStatus.NOT_ACCEPTABLE); } }
[ "materynko@gmail.com" ]
materynko@gmail.com
c2deec558d96dc57f85a7e8c1cc5086ffb941054
9159c6f20fe08ad7992a4cd044fc3206398f7c58
/corejava/src/com/tyss/javaapp/construtor/MIphone.java
3a069e5a21aad8fd91b83fafe81aac1107b7b918
[]
no_license
bhavanar315/ELF-06June19-tyss-bhavani
91def5b909f567536d04e69c9bb6193503398a04
e2ee506ee99e0e958fb72e3bdaaf6e3315b84975
refs/heads/master
2020-07-21T07:45:19.944727
2019-09-06T07:43:42
2019-09-06T07:43:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
133
java
package com.tyss.javaapp.construtor; public class MIphone extends Phone { void call() { System.out.println("Thankyou bro"); } }
[ "bhavanigmgowda@gmail.com" ]
bhavanigmgowda@gmail.com
fbe604ebffa8d28e52c3a4c9ceb08a16cc578558
e3162d976b3a665717b9a75c503281e501ec1b1a
/src/main/java/com/alipay/api/domain/MybankCreditSceneprodPlanQueryModel.java
e570aa029aecc9b4ad7fd7a9c28f4c8c7ea179d0
[ "Apache-2.0" ]
permissive
sunandy3/alipay-sdk-java-all
16b14f3729864d74846585796a28d858c40decf8
30e6af80cffc0d2392133457925dc5e9ee44cbac
refs/heads/master
2020-07-30T14:07:34.040692
2019-09-20T09:35:20
2019-09-20T09:35:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,224
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 场景金融贷款方案查询 * * @author auto create * @since 1.0, 2018-01-23 11:44:32 */ public class MybankCreditSceneprodPlanQueryModel extends AlipayObject { private static final long serialVersionUID = 7676975259371888528L; /** * 数据来源渠道,从服务窗调用开放平台接口的是OPENAPI, 手机端为APP,天猫调用是TMALL */ @ApiField("channel") private String channel; /** * 客户信息来源,该字段会写入到客户签署的网商合约中 */ @ApiField("customer_channel") private String customerChannel; /** * 扩展参数,针对不同的平台特殊业务场景,将需要的参数填入改字段,目前针对直租业务有以下参数:itemprice 车辆价格,lastprop 车辆残值率,extintamt 基础服务包+增值服务包,loantenor 贷款期数,creditamtprop 授信额度比例调整值; */ @ApiField("ext_param") private String extParam; /** * 机构编码,机构接入场景金融平台时分配,固定值 */ @ApiField("org_code") private String orgCode; /** * 产品编码,场景金融平台给机构提供的产品编码 */ @ApiField("product_code") private String productCode; /** * 场景码,通过该场景码确定需要验证的参数内容,以及返回的贷款方案的格式 */ @ApiField("scene") private String scene; /** * 本次请求流水号,全局唯一 */ @ApiField("seq_no") private String seqNo; /** * 外部站点,比如:ALIPAY:支付宝站点,MYBANK:银行会员,B2B_CN:B2B中文站,B2B_EN:B2B国际站,TAOBAO:淘宝 */ @ApiField("site") private String site; /** * 外部站点的userid,比如支付宝userid */ @ApiField("site_user_id") private String siteUserId; public String getChannel() { return this.channel; } public void setChannel(String channel) { this.channel = channel; } public String getCustomerChannel() { return this.customerChannel; } public void setCustomerChannel(String customerChannel) { this.customerChannel = customerChannel; } public String getExtParam() { return this.extParam; } public void setExtParam(String extParam) { this.extParam = extParam; } public String getOrgCode() { return this.orgCode; } public void setOrgCode(String orgCode) { this.orgCode = orgCode; } public String getProductCode() { return this.productCode; } public void setProductCode(String productCode) { this.productCode = productCode; } public String getScene() { return this.scene; } public void setScene(String scene) { this.scene = scene; } public String getSeqNo() { return this.seqNo; } public void setSeqNo(String seqNo) { this.seqNo = seqNo; } public String getSite() { return this.site; } public void setSite(String site) { this.site = site; } public String getSiteUserId() { return this.siteUserId; } public void setSiteUserId(String siteUserId) { this.siteUserId = siteUserId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
d741da000bc5dbc3063d66760525711dc6125775
04e80a25d4cb0d783434d056ca2b6b37bf8c5729
/CreditoGrupalEntidad/src/main/java/entidad/originacion/secuencias/GeneraSecuencias.java
a6fd576cf901afc6a3ae35e0e99870a66dfca4b7
[]
no_license
FyGIntegracionContinua/CIOFF
bfbd2040de503bacc44e376899bddcd4e3db9fd6
20c63dbc01fea60a426ebd49227efb7b8c413567
refs/heads/master
2021-01-15T11:03:31.184075
2017-08-18T20:12:05
2017-08-18T20:12:05
99,607,645
0
1
null
null
null
null
UTF-8
Java
false
false
3,872
java
package entidad.originacion.secuencias; import java.util.HashMap; import java.util.Map; import org.apache.ibatis.session.SqlSession; import utilitario.log.LogHandler; import entidad.conexiones.FabricaConexiones; /** * @author Juan Moreno * Encapsula las funciones de acceso a bd a traves de MyBatis * <ul> * <li>Obtener conexion</li> * </ul> */ public final class GeneraSecuencias { /** * Constructor */ private GeneraSecuencias() { } /** * mensaje OBTEN_VALOR_ACTUAL_SEC */ private static final String OBTEN_VALOR_ACTUAL_SEC = "obtenerValorActualSequencias"; /** * mensaje ACTUALIZA_SIGUIENTE_VALOR_SEC */ private static final String ACTUALIZA_SIGUIENTE_VALOR_SEC = "updateSequenciasSigValor"; /** * mapa secuencias */ @SuppressWarnings("unchecked") private static Map<Integer, Long>[] secuencias = (Map<Integer, Long>[]) new HashMap<?, ?>[3]; static { secuencias[0] = new HashMap<Integer, Long>(); secuencias[1] = new HashMap<Integer, Long>(); secuencias[2] = new HashMap<Integer, Long>(); } /** * cadena ACTUAL */ private static final String ACTUAL = "actual"; /** * cadena INCREMENTO */ private static final String INCREMENTO = "incremento"; /** * array indice */ private static Integer [ ]indice = new Integer[3]; /** * array tiposDesc */ private static String [ ]tiposDesc = {"PER", "CRE", "T24"}; /** * Variable persona */ private static int persona = 0; /** * Variable credito */ private static int credito = 1; /** * Variable T24 */ private static int t24 = 2; /** * Obtiene la secuecnia de las personas * @param uid tipo String * @return Sesion. * @throws IOException */ public static synchronized Long getSigSecuenciaPersonas( String uid ) { return getSecuencia( uid, persona ); } /** * Obtiene la secuencia de las solicitudes * @param uid tipo String * @return Sesion. * @throws IOException */ public static synchronized Long getSigSecuenciaCreditos(String uid) { return getSecuencia( uid, credito ); } /** * Obtiene la secuencia equivalente a credprod para T24 * @param uid ; * @return getSecuencia */ public static synchronized Long getSigSecuenciaT24(String uid) { return getSecuencia( uid, t24); } /** * @param uid tipo String * @param tipo Integer * @return secuencia */ private static Long getSecuencia(String uid, int tipo ) { SqlSession sesionTx = null; Long secuencia = null; if ( secuencias[tipo].size() == 0 ) { indice[tipo] = 1; try { //Recuperamos las secuencias sesionTx = FabricaConexiones.obtenerSesionTx( ); LogHandler.trace(uid, GeneraSecuencias.class, "==> getSecuencia - " + OBTEN_VALOR_ACTUAL_SEC ); Map<?, ?> data = (Map<?, ?>) sesionTx.selectOne( OBTEN_VALOR_ACTUAL_SEC, tiposDesc[tipo] ); String actual = (data.get(ACTUAL)).toString(); String incremento = (data.get(INCREMENTO)).toString(); long actuall = Long.valueOf(actual); for ( int i = 0; i < Integer.valueOf(incremento);) { secuencias[tipo].put( ++i, ++actuall ); } LogHandler.trace(uid, GeneraSecuencias.class, "==> getSecuencia - " + ACTUALIZA_SIGUIENTE_VALOR_SEC ); sesionTx.update( ACTUALIZA_SIGUIENTE_VALOR_SEC, tiposDesc[tipo]); sesionTx.commit( ); } catch (Exception e ) { //e.printStackTrace(); FabricaConexiones.rollBack( sesionTx ); secuencia = 0L; LogHandler.error(uid, GeneraSecuencias.class, "Existio un error al obtener la secuencia", e); } finally { FabricaConexiones.close( sesionTx ); } } if ( secuencia == null ) { secuencia = secuencias[tipo].get( indice[tipo] ); } else { secuencia = null; } //secuencia = secuencia == null ? secuencias[tipo].get( indice[tipo] ) : null; secuencias[tipo].remove( indice[tipo]++ ); return secuencia; } }
[ "christian.lopez@fygsolutions.com" ]
christian.lopez@fygsolutions.com
1a486f118db1b89f4d055eb25991208a242fb8a2
690cc376e33bed7655e412ceae68f1a0b927e382
/Java OOP Advanced/UnitTesting/Exer/src/main/java/PeopleDatabase.java
e0895d8ce3dcf12136a3de6780dbafe0561310b3
[]
no_license
VladimirBarzakov/Java-Fundamentals
6cabd0a26cf827917f9825056d1ab1ae48570927
5fb8dfd59aedb34ab4a90aaed5e07217759363e6
refs/heads/master
2020-03-27T03:09:46.156217
2018-08-23T11:09:15
2018-08-23T11:09:15
145,842,521
0
0
null
null
null
null
UTF-8
Java
false
false
2,256
java
import javax.naming.OperationNotSupportedException; import java.util.*; public class PeopleDatabase { private Map<Long, Person> peopleByID; private Map<String, Person> peopleByUserName; private ArrayDeque<Long> lastAddedID; public PeopleDatabase() { this.peopleByID = new LinkedHashMap<>(); this.peopleByUserName = new LinkedHashMap<>(); this.lastAddedID = new ArrayDeque<>(); } public void add(Person person) throws OperationNotSupportedException { if (person == null || this.lastAddedID.size() == 16 || person.getId() <= 0 || person.getUsername() == null || person.getUsername().length() == 0 || this.peopleByUserName.containsKey(person.getUsername()) || this.peopleByID.containsKey(person.getId())) { throw new OperationNotSupportedException(); } this.peopleByID.put(person.getId(), person); this.peopleByUserName.put(person.getUsername(), person); this.lastAddedID.addLast(person.getId()); } public Person remove() throws OperationNotSupportedException { if (this.lastAddedID.size() == 0) { throw new OperationNotSupportedException(); } Person person = this.peopleByID.remove(this.lastAddedID.removeLast()); this.peopleByID.remove(person.getId()); this.peopleByUserName.remove(person.getUsername()); return person; } public Person findByUsername(String userName) throws OperationNotSupportedException { if (userName==null || !this.peopleByUserName.containsKey(userName)){ throw new OperationNotSupportedException(); } return this.peopleByUserName.get(userName); } public Person findById(Long id) throws OperationNotSupportedException { if (!this.peopleByID.containsKey(id)){ throw new OperationNotSupportedException(); } return this.peopleByID.get(id); } public Person[] fetch() { Person[] output = new Person[this.lastAddedID.size()]; int cursor = 0; for (Person person:this.peopleByID.values()) { output[cursor++]=person; } return output; } }
[ "vlbarzakov@gmail.com" ]
vlbarzakov@gmail.com
b825774f127587ed1065e5d833f1d7b937800f68
fa68b453c8bf52b8558b16aa78fb2c0e910909fa
/src/main/java/com/mettl/disha/aadhar/web/rest/AccountResource.java
927af020e7070d03fe090542efb1765cedddf9a7
[]
no_license
mohitbhunwalia/myapplication
ad1d08a6c6d1eda5a2c170b76abb9b2efb1d3b73
d350cfd0b773e371ef56172297765f1cd55d0a4a
refs/heads/master
2020-03-18T19:16:36.729951
2018-05-28T10:15:42
2018-05-28T10:15:42
135,144,895
0
0
null
2018-05-28T10:39:24
2018-05-28T10:15:39
Java
UTF-8
Java
false
false
3,074
java
package com.mettl.disha.aadhar.web.rest; import com.mettl.disha.aadhar.domain.User; import com.mettl.disha.aadhar.web.rest.errors.InternalServerErrorException; import com.codahale.metrics.annotation.Timed; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.oauth2.provider.OAuth2Authentication; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import java.security.Principal; import java.util.*; import java.util.stream.Collectors; /** * REST controller for managing the current user's account. */ @RestController @RequestMapping("/api") public class AccountResource { private final Logger log = LoggerFactory.getLogger(AccountResource.class); /** * GET /authenticate : check if the user is authenticated, and return its login. * * @param request the HTTP request * @return the login if the user is authenticated */ @GetMapping("/authenticate") @Timed public String isAuthenticated(HttpServletRequest request) { log.debug("REST request to check if the current user is authenticated"); return request.getRemoteUser(); } /** * GET /account : get the current user. * * @param principal the current user; resolves to null if not authenticated * @return the current user * @throws InternalServerErrorException 500 (Internal Server Error) if the user couldn't be returned */ @GetMapping("/account") @Timed @SuppressWarnings("unchecked") public User getAccount(Principal principal) { return Optional.ofNullable(principal) .filter(it -> it instanceof OAuth2Authentication) .map(it -> ((OAuth2Authentication) it).getUserAuthentication()) .map(authentication -> { Map<String, Object> details = (Map<String, Object>) authentication.getDetails(); Boolean activated = false; if (details.get("email_verified") != null) { activated = (Boolean) details.get("email_verified"); } return new User( authentication.getName(), (String) details.get("given_name"), (String) details.get("family_name"), (String) details.get("email"), (String) details.get("langKey"), (String) details.get("picture"), activated, authentication.getAuthorities().stream() .map(GrantedAuthority::getAuthority) .collect(Collectors.toSet()) ); } ) .orElseThrow(() -> new InternalServerErrorException("User could not be found")); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
da2b6f8012c6f6cc9963d55a779ad69d9761969c
a13ab684732add3bf5c8b1040b558d1340e065af
/java7-src/javax/naming/InsufficientResourcesException.java
55a321cb2780d63a5d476f759ab1d6f1f5cb8566
[]
no_license
Alivop/java-source-code
554e199a79876343a9922e13ccccae234e9ac722
f91d660c0d1a1b486d003bb446dc7c792aafd830
refs/heads/master
2020-03-30T07:21:13.937364
2018-10-25T01:49:39
2018-10-25T01:51:38
150,934,150
5
2
null
null
null
null
UTF-8
Java
false
false
1,902
java
/* * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.naming; /** * This exception is thrown when resources are not available to complete * the requested operation. This might due to a lack of resources on * the server or on the client. There are no restrictions to resource types, * as different services might make use of different resources. Such * restrictions might be due to physical limits and/or adminstrative quotas. * Examples of limited resources are internal buffers, memory, network bandwidth. *<p> * InsufficientResourcesException is different from LimitExceededException in that * the latter is due to user/system specified limits. See LimitExceededException * for details. * <p> * Synchronization and serialization issues that apply to NamingException * apply directly here. * * @author Rosanna Lee * @author Scott Seligman * @since 1.3 */ public class InsufficientResourcesException extends NamingException { /** * Constructs a new instance of InsufficientResourcesException using an * explanation. All other fields default to null. * * @param explanation Possibly null additional detail about this exception. * @see java.lang.Throwable#getMessage */ public InsufficientResourcesException(String explanation) { super(explanation); } /** * Constructs a new instance of InsufficientResourcesException with * all name resolution fields and explanation initialized to null. */ public InsufficientResourcesException() { super(); } /** * Use serialVersionUID from JNDI 1.1.1 for interoperability */ private static final long serialVersionUID = 6227672693037844532L; }
[ "liulp@zjhjb.com" ]
liulp@zjhjb.com
7507458e8fc6582d12ca7ddd311a562b58fc8878
86db3e80e9d6d6dd72e003ad43ff042437248386
/gl_shop_datas/src/main/java/com/appabc/datas/cms/dao/tasks/OrderRequestMeta.java
c4cefbb81572ecc4eff5b25fd54429e719df4205
[]
no_license
RainerJava/gl_shop
35aee84aa806d0ee73ebdf041bb665c42ba0a8d7
ed3e0c53fb280347e35df1e5c6b709f57c662ef4
refs/heads/master
2021-01-17T20:20:33.994709
2015-10-20T06:19:16
2015-10-20T06:19:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,917
java
package com.appabc.datas.cms.dao.tasks; import com.appabc.bean.bo.OrderAllInfor; import org.springframework.jdbc.core.RowMapper; import java.sql.ResultSet; import java.sql.SQLException; /** * Created by zouxifeng on 12/11/14. */ public class OrderRequestMeta implements ITaskDaoMeta<OrderAllInfor> { public final static OrderRequestMeta INSTANCE = new OrderRequestMeta(); private final static String TABLE_ALIAS = "order_request"; @Override public String getJoinTableName() { return "T_ORDER_FIND"; } @Override public String getJoinTableAliasName() { return TABLE_ALIAS; } @Override public String[] getJoinTableFields() { return new String[] {"FID", "TITLE", "TYPE", "MATCHINGNUM", "CREATIME"}; } @Override public String getJoinTableIdFieldName() { return "FID"; } @Override public boolean requireCompanyAuthenticated() { return false; } @Override public RowMapper<OrderAllInfor> getJoinTableRowMapper() { return OrderRequestRowMapper.INSTANCE; } private static class OrderRequestRowMapper implements RowMapper<OrderAllInfor> { public final static OrderRequestRowMapper INSTANCE = new OrderRequestRowMapper(); private String composeFieldName(String name) { return TABLE_ALIAS + '.' + name; } @Override public OrderAllInfor mapRow(ResultSet rs, int rowNum) throws SQLException { OrderAllInfor obj = new OrderAllInfor(); obj.setId(rs.getString(composeFieldName("FID"))); obj.setTitle(rs.getString(composeFieldName("TITLE"))); obj.setType(rs.getInt(composeFieldName("TYPE"))); obj.setMatchingnum(rs.getInt(composeFieldName("MATCHINGNUM"))); obj.setCreatime(rs.getTimestamp(composeFieldName("CREATIME"))); return obj; } } }
[ "jianshaosky@126.com" ]
jianshaosky@126.com
2529ca785eafee2b05120c655ffe7da6bff19d6a
c4fc44747591d09c91870f6547b4258d4a73cdf2
/src/lanterna/com/googlecode/lanterna/terminal/AbstractTerminal.java
ab6edc73a449169b3d2dbfe1e493e32274bfad41
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
wknishio/variable-terminal
2c3aa7a182662df5c13e026471338d43142690a7
83eedc7ed37fed6859a5ed3355aa3685ed589f1a
refs/heads/master
2023-09-03T11:11:24.946980
2023-09-02T15:29:05
2023-09-02T15:29:05
37,862,908
1
0
null
null
null
null
UTF-8
Java
false
false
3,101
java
/* * This file is part of lanterna (https://github.com/mabe02/lanterna). * * lanterna 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 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * Copyright (C) 2010-2020 Martin Berglund */ package com.googlecode.lanterna.terminal; import com.googlecode.lanterna.TerminalSize; import com.googlecode.lanterna.graphics.TextGraphics; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * Containing a some very fundamental functionality that should be common (and usable) to all terminal implementations. * All the Terminal implementers within Lanterna extends from this class. * * @author Martin */ public abstract class AbstractTerminal implements Terminal { private final List<TerminalResizeListener> resizeListeners; private TerminalSize lastKnownSize; protected AbstractTerminal() { this.resizeListeners = new ArrayList<TerminalResizeListener>(); this.lastKnownSize = null; } public void addResizeListener(TerminalResizeListener listener) { if (listener != null) { resizeListeners.add(listener); } } public void removeResizeListener(TerminalResizeListener listener) { if (listener != null) { resizeListeners.remove(listener); } } /** * Call this method when the terminal has been resized or the initial size of the terminal has been discovered. It * will trigger all resize listeners, but only if the size has changed from before. * * @param columns Number of columns in the new size * @param rows Number of rows in the new size */ protected synchronized void onResized(int columns, int rows) { onResized(new TerminalSize(columns, rows)); } /** * Call this method when the terminal has been resized or the initial size of the terminal has been discovered. It * will trigger all resize listeners, but only if the size has changed from before. * * @param newSize Last discovered terminal size */ protected synchronized void onResized(TerminalSize newSize) { if (lastKnownSize == null || !lastKnownSize.equals(newSize)) { lastKnownSize = newSize; for (TerminalResizeListener resizeListener : resizeListeners) { resizeListener.onResized(this, lastKnownSize); } } } public TextGraphics newTextGraphics() throws IOException { return new TerminalTextGraphics(this); } }
[ "wknishio@gmail.com" ]
wknishio@gmail.com
bdd081dcbf75f094cf25c0e507c088acfbd1f055
ebdcaff90c72bf9bb7871574b25602ec22e45c35
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201802/mcm/ManagedCustomerLabelReturnValue.java
39fa7de8b9f1cfafa7313d9ff20a07764155bfe7
[ "Apache-2.0" ]
permissive
ColleenKeegan/googleads-java-lib
3c25ea93740b3abceb52bb0534aff66388d8abd1
3d38daadf66e5d9c3db220559f099fd5c5b19e70
refs/heads/master
2023-04-06T16:16:51.690975
2018-11-15T20:50:26
2018-11-15T20:50:26
158,986,306
1
0
Apache-2.0
2023-04-04T01:42:56
2018-11-25T00:56:39
Java
UTF-8
Java
false
false
2,952
java
// Copyright 2018 Google 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.google.api.ads.adwords.jaxws.v201802.mcm; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * A container for return values from {@link ManagedCustomerService#mutateLabel}. * <p>For successful {@linkplain ADD} operations, the input {@linkplain ManagedCustomerLabel} * is returned. * <p>For successful {@linkplain REMOVE} operations, the returned {@linkplain ManagedCustomerLabel} * will contain the customer ID and a null label ID. * * * <p>Java class for ManagedCustomerLabelReturnValue complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ManagedCustomerLabelReturnValue"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="value" type="{https://adwords.google.com/api/adwords/mcm/v201802}ManagedCustomerLabel" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ManagedCustomerLabelReturnValue", propOrder = { "value" }) public class ManagedCustomerLabelReturnValue { protected List<ManagedCustomerLabel> value; /** * Gets the value of the value property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the value property. * * <p> * For example, to add a new item, do as follows: * <pre> * getValue().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link ManagedCustomerLabel } * * */ public List<ManagedCustomerLabel> getValue() { if (value == null) { value = new ArrayList<ManagedCustomerLabel>(); } return this.value; } }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
82ffc8804b97de158a013cc95983a123b36339bf
2966b72f3f0e921da6de5a0e7556b6599337ee03
/io.mapzone.controller/src/io/mapzone/controller/ui/util/AssociationAdapter.java
4f65ecfe523f87c7a0dbff9bb64e190b6a048116
[]
no_license
Mapzone/mapzone
43d2092dbe24b88fc0d34c08c907d2384a196290
70c43fe25b5009722e2737baca1a4354a9a6b593
refs/heads/master
2021-03-22T03:26:46.227556
2018-12-05T17:18:06
2018-12-05T17:18:06
29,967,275
1
0
null
null
null
null
UTF-8
Java
false
false
2,885
java
package io.mapzone.controller.ui.util; import java.util.Map; import org.geotools.feature.NameImpl; import org.geotools.feature.type.AttributeDescriptorImpl; import org.geotools.feature.type.AttributeTypeImpl; import org.opengis.feature.Property; import org.opengis.feature.type.AttributeType; import org.opengis.feature.type.Name; import org.opengis.feature.type.PropertyDescriptor; import org.opengis.feature.type.PropertyType; import org.polymap.model2.Entity; import org.polymap.model2.runtime.PropertyInfo; /** * Adapts {@link org.polymap.model2.Association} to * {@link org.opengis.feature.Property} to be used by forms. * * @author <a href="http://www.polymap.de">Falko Bräutigam</a> */ public class AssociationAdapter implements Property { public static PropertyDescriptor descriptorFor( org.polymap.model2.Association prop ) { PropertyInfo info = prop.info(); NameImpl name = new NameImpl( info.getName() ); AttributeType type = new AttributeTypeImpl( name, info.getType(), true, false, null, null, null ); return new AttributeDescriptorImpl( type, name, 1, 1, false, null ); } public static PropertyDescriptor descriptorFor( String _name, Class binding ) { NameImpl name = new NameImpl( _name ); AttributeType type = new AttributeTypeImpl( name, binding, true, false, null, null, null ); return new AttributeDescriptorImpl( type, name, 1, 1, false, null ); } // instance ******************************************* private org.polymap.model2.Association delegate; public AssociationAdapter( org.polymap.model2.Association delegate ) { assert delegate != null; this.delegate = delegate; } @Override public Object getValue() { return delegate.get(); } @Override public void setValue( Object newValue ) { if (newValue != null && !delegate.info().getType().isAssignableFrom( newValue.getClass() )) { throw new ClassCastException( "Wrong value for Property of type '" + delegate.info().getType() + "': " + newValue.getClass() ); } delegate.set( (Entity)newValue ); } @Override public PropertyType getType() { return new AttributeTypeImpl( getName(), delegate.info().getType(), false, false, null, null, null ); } @Override public PropertyDescriptor getDescriptor() { // XXX Auto-generated method stub throw new RuntimeException( "not yet implemented." ); } @Override public Name getName() { return new NameImpl( delegate.info().getName() ); } @Override public boolean isNillable() { return delegate.info().isNullable(); } @Override public Map<Object, Object> getUserData() { throw new RuntimeException( "not yet implemented." ); } }
[ "falko@polymap.de" ]
falko@polymap.de
5252da8e71aa71fdcbfd0ac19a50b455dc667d1e
2cf9cbafdfd5df582a9a46dcf85e5162901ef337
/yatl-kmf/src/test/java/ocl/syntax/ast/expressions/OclMessageExpAS$Factory$Class.java
af2bb58944f0132a95b1c45ac999b398c8840aa0
[ "Apache-2.0" ]
permissive
opatrascoiu/jmf
918303cf7ff6a5428157ea5deedc863386f457fb
be597da51fa5964f07ee74213640894af8fff535
refs/heads/master
2022-02-28T08:57:39.220759
2019-10-17T08:48:14
2019-10-17T08:48:14
110,419,420
0
0
null
null
null
null
UTF-8
Java
false
false
1,400
java
/** * * Class OclMessageExpAS$Factory$Class.java * * Generated by KMFStudio at 25 November 2003 13:00:52 * Visit http://www.cs.ukc.ac.uk/kmf * */ package ocl.syntax.ast.expressions; public class OclMessageExpAS$Factory$Class extends ocl.syntax.SyntaxFactory$Class implements OclMessageExpAS$Factory { /** Default factory constructor */ public OclMessageExpAS$Factory$Class() { } public OclMessageExpAS$Factory$Class(ocl.syntax.repository.SyntaxRepository repository) { this.repository = repository; } /** Default build method */ public Object build() { OclMessageExpAS obj = new OclMessageExpAS$Class(); obj.setId(ocl.syntax.SyntaxFactory$Class.newId()); repository.addElement("syntax.ast.expressions.OclMessageExpAS", obj); return obj; } /** Specialized build method */ public Object build(Boolean isMarkedPre, String name, ocl.syntax.ast.expressions.OclMessageKindAS kind) { OclMessageExpAS obj = new OclMessageExpAS$Class(isMarkedPre, name, kind); obj.setId(ocl.syntax.SyntaxFactory$Class.newId()); repository.addElement("syntax.ast.expressions.OclMessageExpAS", obj); return obj; } /** Override toString method */ public String toString() { return "OclMessageExpAS_Factory"; } /** Accept 'ocl.syntax.ast.expressions.OclMessageExpAS$Visitor' */ public Object accept(ocl.syntax.SyntaxVisitor v, Object data) { return v.visit(this, data); } }
[ "opatrascoiu@yahoo.com" ]
opatrascoiu@yahoo.com
a1ad5687f38d391130250392a05500efc2302494
706179fe456d928f8ec0eadb6efa9e9d13278650
/core/ts.core/src/ts/client/quickinfo/ITypeScriptQuickInfoCollector.java
413249e6eb1db6788f504ce8116f38181c487c5a
[ "MIT" ]
permissive
ldxcf/typescript.java
f6bc1c9a17770ddde2054ba8846bb21147900888
ec08dccaae8d3016e213425ca3c59a667826c90d
refs/heads/master
2021-01-12T04:11:25.969825
2016-12-23T17:51:55
2016-12-23T17:51:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
319
java
package ts.client.quickinfo; import ts.client.ITypeScriptCollector; public interface ITypeScriptQuickInfoCollector extends ITypeScriptCollector { void setInfo(String kind, String kindModifiers, int startLine, int startOffset, int endLine, int endOffset, String displayString, String documentation); }
[ "angelo.zerr@gmail.com" ]
angelo.zerr@gmail.com
511694dabd11d3ac5d55a6775ece69188145e558
4dcfabba005ae9f3475c915cab5eaa43c21f5d49
/app/src/main/java/com/qiantang/smartparty/wxapi/WXPayEntryActivity.java
0d02f798c8005df4a0d8a51f7c0a043be580bdd6
[]
no_license
WhiteorBlack/SmartParty
7e4f850daf6d7c138694c44a3236645627e046cd
5ae8a9475039b37c68ffc033061cf6c2fbbecfa4
refs/heads/master
2021-08-06T15:04:18.661718
2018-09-21T06:37:49
2018-09-21T06:37:49
134,049,887
0
1
null
null
null
null
UTF-8
Java
false
false
1,552
java
package com.qiantang.smartparty.wxapi; import android.app.Activity; import android.app.AlertDialog; import android.content.Intent; import android.os.Bundle; import android.view.View; import com.qiantang.smartparty.config.Config; import com.tencent.mm.opensdk.constants.ConstantsAPI; import com.tencent.mm.opensdk.modelbase.BaseReq; import com.tencent.mm.opensdk.modelbase.BaseResp; import com.tencent.mm.opensdk.openapi.IWXAPI; import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler; import com.tencent.mm.opensdk.openapi.WXAPIFactory; import org.greenrobot.eventbus.EventBus; public class WXPayEntryActivity extends Activity implements IWXAPIEventHandler { private IWXAPI api; protected AlertDialog mDialog; protected View mDialogView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); api = WXAPIFactory.createWXAPI(this, Config.WX_APP_ID); api.handleIntent(getIntent(), this); } @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); setIntent(intent); } @Override public void onReq(BaseReq req) { switch (req.getType()) { case ConstantsAPI.COMMAND_GETMESSAGE_FROM_WX: break; case ConstantsAPI.COMMAND_SHOWMESSAGE_FROM_WX: break; default: break; } } @Override public void onResp(BaseResp resp) { EventBus.getDefault().post(resp); finish(); } }
[ "415082375@qq.com" ]
415082375@qq.com
4ecff098b90c1bf591e446a35a8a9b2957de63a2
0a12bd827c3c48add9f5f400763a87ea69631faf
/persistent/src/main/java/com/frameworkset/orm/engine/model/DerbyTest.java
a274dda70b2b05659c32affd84bb4a941f40543d
[]
no_license
sqidea/bboss
76c64dea2e0ecd2c8d4b7269021e37f58a5b4071
d889e252d2bbf57681072fcd250a9e4da42f5938
refs/heads/master
2021-01-18T18:50:21.077011
2013-10-15T15:31:53
2013-10-15T15:31:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,548
java
/* * Copyright 2008 biaoping.yin * * 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.frameworkset.orm.engine.model; import junit.framework.TestCase; import com.frameworkset.orm.engine.transform.XmlToAppData; import com.frameworkset.orm.platform.Platform; /** * <p>Title: DerbyTest.java</p> * * <p>Description: </p> * * <p>Copyright: Copyright (c) 2007</p> * @Date 2010-1-26 下午03:58:36 * @author biaoping.yin * @version 1.0 */ public class DerbyTest extends TestCase { private XmlToAppData xmlToAppData = null; private Database db = null; public DerbyTest(String name) { super(name); } protected void setUp() throws Exception { super.setUp(); xmlToAppData = new XmlToAppData("derby", "defaultpackage"); db = xmlToAppData.parseFile( "src/com/frameworkset/orm/engine/model/domaintest-schema.xml"); Platform pltf = db.getPlatform(); System.out.println(pltf); } protected void tearDown() throws Exception { xmlToAppData = null; super.tearDown(); } /** * test if the tables get the package name from the properties file */ public void testAllAttributes() throws Exception { Domain amount = db.getDomain("amount"); System.out.println("amount:"+amount); assertEquals(SchemaType.NUMERIC, amount.getType()); assertEquals("NUMERIC", amount.getSqlType()); assertEquals("10", amount.getSize()); assertEquals("2", amount.getScale()); assertEquals("0", amount.getDefaultValue()); assertEquals("amount domain", amount.getDescription()); } /** * test if the tables get the package name from the properties file */ public void testDomainColumn() throws Exception { Table table = db.getTable("product"); Column name = table.getColumn("name"); System.out.println("name:"+name); assertEquals("VARCHAR", name.getType()); assertEquals("VARCHAR", name.getDomain().getSqlType()); assertEquals("40", name.getSize()); assertEquals("name VARCHAR(40) ", name.getSqlString()); Column price = table.getColumn("price"); assertEquals("NUMERIC", price.getTorqueType()); assertEquals("NUMERIC", price.getType()); assertEquals("NUMERIC", price.getDomain().getSqlType()); assertEquals("10", price.getSize()); assertEquals("2", price.getScale()); assertEquals("0", price.getDefaultValue()); assertEquals("(10,2)", price.printSize()); assertEquals("price NUMERIC(10,2) default 0 ", price.getSqlString()); } /** * test if the tables get the package name from the properties file */ public void testExtendedDomainColumn() throws Exception { Table table = db.getTable("article"); Column price = table.getColumn("price"); assertEquals("NUMERIC", price.getTorqueType()); assertEquals("NUMERIC", price.getType()); assertEquals("NUMERIC", price.getDomain().getSqlType()); assertEquals("12", price.getSize()); assertEquals("2", price.getScale()); assertEquals("1000", price.getDefaultValue()); assertEquals("(12,2)", price.printSize()); assertEquals("price NUMERIC(12,2) default 1000 ", price.getSqlString()); } public void testDecimalColumn() throws Exception { Table table = db.getTable("article"); Column col = table.getColumn("decimal_col"); assertEquals("DECIMAL", col.getTorqueType()); assertEquals("DECIMAL", col.getType()); assertEquals("DECIMAL", col.getDomain().getSqlType()); assertEquals("10", col.getSize()); assertEquals("3", col.getScale()); assertEquals("(10,3)", col.printSize()); assertEquals("decimal_col DECIMAL(10,3) ", col.getSqlString()); } public void testDateColumn() throws Exception { Table table = db.getTable("article"); Column col = table.getColumn("date_col"); assertEquals("DATE", col.getTorqueType()); assertEquals("DATE", col.getType()); assertEquals("DATE", col.getDomain().getSqlType()); assertEquals("", col.printSize()); assertEquals("date_col DATE ", col.getSqlString()); } public void testNativeAutoincrement() throws Exception { Table table = db.getTable("native"); Column col = table.getColumn("native_id"); assertEquals("GENERATED BY DEFAULT AS IDENTITY", col.getAutoIncrementString()); assertEquals("native_id INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY", col.getSqlString()); col = table.getColumn("name"); assertEquals("", col.getAutoIncrementString()); } public void testIdBrokerAutoincrement() throws Exception { Table table = db.getTable("article"); Column col = table.getColumn("article_id"); assertEquals("", col.getAutoIncrementString()); assertEquals("article_id INTEGER NOT NULL ", col.getSqlString()); col = table.getColumn("name"); assertEquals("", col.getAutoIncrementString()); } public void testBooleanint() throws Exception { Table table = db.getTable("types"); Column col = table.getColumn("cbooleanint"); assertEquals("", col.getAutoIncrementString()); assertEquals("BOOLEANINT", col.getTorqueType()); assertEquals("INTEGER", col.getType()); assertEquals("INTEGER", col.getDomain().getSqlType()); assertEquals("cbooleanint INTEGER ", col.getSqlString()); } public void testBlob() throws Exception { Table table = db.getTable("types"); Column col = table.getColumn("cblob"); assertEquals("", col.getAutoIncrementString()); assertEquals("BLOB", col.getTorqueType()); assertEquals("BLOB", col.getDomain().getSqlType()); assertEquals("cblob BLOB ", col.getSqlString()); } }
[ "gao.tang@oceanwing.com" ]
gao.tang@oceanwing.com
2ddb98b65133815c6b47bb815c75a62c5cb7a93c
4b131d4c8ac00e09c4b3b5c5571b85d322a4a3da
/dom/src/main/java/xml/m0/Document.java
961cafa5013b3a9359713246a991993db65acbff
[ "Apache-2.0" ]
permissive
JanBessai/ecoop2021artifacts
856328da8ff86ed8db483bd65a7eba78e0e0febb
3d203eda40758b327d4eada082c78bebd3166608
refs/heads/main
2023-04-13T17:10:37.851893
2021-05-13T10:17:11
2021-05-13T10:17:11
348,146,194
0
0
null
null
null
null
UTF-8
Java
false
false
307
java
package xml.m0; public interface Document<FX,FT,FD> extends XML<FX,FT,FD> { FD getSelfDocument(); boolean sameRootElements(Document<FX,FT,FD> doc); Document<FX,FT,FD> deepClone(); default java.util.Optional<Tag<FX,FT,FD>> getRootTag() { return java.util.Optional.empty(); } }
[ "heineman@cs.wpi.edu" ]
heineman@cs.wpi.edu
2b4dd665f91ba7e7dafc3d6998d8ce4496ef8899
18e6da955719cff29d33ac4c0c5587d8f7b1188e
/apg-core/src/main/java/it/giunti/apg/shared/model/Abbonamenti.java
0a3beda0ee9fdf4792921b24758dbe5f58306f1b
[]
no_license
pynolo/backup-apg-project
5dde8def09a330298e981a0146b3f7e00295801f
36c427a6ea2242db433129dd1a17a4e7ed09438b
refs/heads/master
2023-01-23T19:56:18.519181
2020-12-02T11:05:17
2020-12-02T11:05:17
317,835,636
0
0
null
null
null
null
UTF-8
Java
false
false
4,051
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package it.giunti.apg.shared.model; import java.util.Date; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; /** * * @author paolo */ @Entity @Table(name = "abbonamenti") public class Abbonamenti extends BaseEntity { private static final long serialVersionUID = -106478567904196819L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "id", nullable = false) private Integer id; @Column(name = "codice_abbonamento", length = 16, nullable = false) private String codiceAbbonamento; @Basic(optional = false) @Column(name = "data_creazione", nullable = false) @Temporal(TemporalType.DATE) private Date dataCreazione; @Column(name = "data_modifica") @Temporal(TemporalType.TIMESTAMP) private Date dataModifica; @Basic(optional = false) @Column(name = "id_tipo_spedizione", length = 4, nullable=false) private String idTipoSpedizione; // @OneToMany(cascade = CascadeType.ALL, mappedBy = "idAbbonamento", fetch = FetchType.EAGER) // private List<IstanzeAbbonamenti> istanzeAbbonamentiList; @JoinColumn(name = "id_periodico", referencedColumnName = "id", nullable = false) @ManyToOne(optional = false, fetch = FetchType.EAGER) private Periodici periodico; @Column(name = "id_utente", length = 32, nullable = false) private String idUtente; @Transient private String idPeriodicoT; // @OneToMany(mappedBy = "idAbbonamento", fetch = FetchType.EAGER) // private List<Pagamenti> pagamentiList; // @OneToMany(cascade = CascadeType.ALL, mappedBy = "idAbbonamento", fetch = FetchType.EAGER) // private List<EvasioniFascicoli> evasioniFascicoliList; public Abbonamenti() { } public Abbonamenti(Integer id) { this.id = id; } public Abbonamenti(Integer id, Date dataCreazione) { this.id = id; this.dataCreazione = dataCreazione; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getCodiceAbbonamento() { return codiceAbbonamento; } public void setCodiceAbbonamento(String codiceAbbonamento) { this.codiceAbbonamento = codiceAbbonamento; } public Date getDataCreazione() { return dataCreazione; } public void setDataCreazione(Date dataCreazione) { this.dataCreazione = dataCreazione; } public Date getDataModifica() { return dataModifica; } public void setDataModifica(Date dataModifica) { this.dataModifica = dataModifica; } public Periodici getPeriodico() { return periodico; } public void setPeriodico(Periodici periodico) { this.periodico = periodico; } public String getIdUtente() { return idUtente; } public void setIdUtente(String idUtente) { this.idUtente = idUtente; } public String getIdPeriodicoT() { return idPeriodicoT; } public void setIdPeriodicoT(String idPeriodicoT) { this.idPeriodicoT = idPeriodicoT; } public String getIdTipoSpedizione() { return idTipoSpedizione; } public void setIdTipoSpedizione(String idTipoSpedizione) { this.idTipoSpedizione = idTipoSpedizione; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { if (!(object instanceof Abbonamenti)) { return false; } Abbonamenti other = (Abbonamenti) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; } @Override public String toString() { return "Abbonamenti[id=" + id + "] "+codiceAbbonamento; } }
[ "p.tacconi@giunti.it" ]
p.tacconi@giunti.it
8d27995c0107442844163b86aa8c7f632a1b49e7
3446120c21c6da9653ca410da7f26f30f0061189
/Test2OOPTasks/src/vinetki/Vehicle.java
39ef2cc56f4465418427894a1d4dcb7297962cb7
[]
no_license
BlagoyNikolov/ITTalentsWorkspace
32eed3c9fc88b241dd92c92334da153a3636100c
af7bd75d444cfc4274a641354788ca7cd2e77068
refs/heads/master
2021-01-23T05:35:30.607462
2018-01-18T20:05:29
2018-01-18T20:05:29
92,970,410
0
0
null
null
null
null
UTF-8
Java
false
false
809
java
package vinetki; import vinetki.Vinette.VehicleType; public abstract class Vehicle { protected String brand; protected String model; protected Vinette vinette; protected int year; public Vehicle(String brand, String model, Vinette vinette, int year) { this.brand = brand; this.model = model; this.vinette = vinette; this.year = year; } public String getBrand() { return brand; } public String getModel() { return model; } public Vinette getVinette() { return vinette; } public int getYear() { return year; } public void setVinette(Vinette vinette) { this.vinette = vinette; } public boolean hasVinette() { return this.vinette.isStuck(); } public abstract VehicleType getType(); // public VehicleType getType() { // return this.vinette.getType(); // } }
[ "nikolovblagoy@gmail.com" ]
nikolovblagoy@gmail.com
184c2e5d6f8ce44836df8cb19b2650874be6e8fc
9d22932fdbd20805cc4c78e7c96cad61c6a97ab3
/src/java0514/ex01_whileEX.java
865735b22f456a30707a4a2487f88bb75acbe8ad
[]
no_license
vnfmsthdnf58/java
b5b8247ecbede2091fe95d7f573bdef8b1249f48
f229dfdfa8407b4771a7e064b8c8caf343ecbfe4
refs/heads/master
2022-11-14T10:29:35.121575
2020-06-22T00:29:09
2020-06-22T00:29:09
263,823,126
0
0
null
null
null
null
UTF-8
Java
false
false
1,482
java
/* * Data : 2020.05.14 * Author : 김태석 * Description : whileEX * Version : 1.0 */ package java0514; import java.util.Scanner; public class ex01_whileEX { public static void main(String[] atgs) { int account= 0; // 통장만들기 0원 int balance; // Scanner sc = new Scanner(System.in); boolean run = true; // whuile문 사용하기 위해서 run(조건변수)선언, true초기화 // while문 사용 while(run) { System.out.println("----------------------------------"); System.out.println(" 1.예금 | 2.출금 | 3.잔고 | 4.종료 "); System.out.println("----------------------------------"); System.out.println("선택 >>"); int menu = sc.nextInt(); // menu 변수선언, 입력 // swutch-case문 사용 switch(menu) { case 1: System.out.print("예금액 >>"); // int a = sc.nextInt(); // account += a; account += sc.nextInt(); // 예금액 입력 break; // switch문 탈출 case 2: System.out.print("출금액 >>"); account -= sc.nextInt(); break; case 3: System.out.print("잔고액 >>"+ account); break; case 4: run = false; // 4 입력시 run값이 false로 변한다. //break; default: System.out.println("다시 입력해주세요."); break; } // switch문 종료 } // while문 종료 System.out.println("프로그램을 종료합니다."); } }
[ "1@1-PC" ]
1@1-PC
2456c50f06b1511cd6ea74ab3392ff517413c4e0
5f5e5103f7b76874189391d79e8881c742bd53ca
/src/test/resources/guava-src/com/google/common/util/concurrent/ForwardingBlockingQueue.java
f5575a15767c7a06b926544e0f2bbdc82d7062c7
[ "Apache-2.0" ]
permissive
ftomassetti/JavaCC2ANTLR
af4b36c8032fde1bf5f6e668967fadec4638d314
b5ef703f58791b5d2ab069d7eaa737526f5f84f4
refs/heads/master
2022-11-14T06:41:33.098557
2022-10-18T13:09:06
2022-10-18T13:09:06
114,538,751
18
12
Apache-2.0
2022-10-18T13:09:07
2017-12-17T13:33:09
Java
UTF-8
Java
false
false
2,753
java
/* * Copyright (C) 2010 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.common.util.concurrent; import com.google.common.annotations.GwtIncompatible; import com.google.common.collect.ForwardingQueue; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.Collection; import java.util.concurrent.BlockingQueue; import java.util.concurrent.TimeUnit; /** * A {@link BlockingQueue} which forwards all its method calls to another {@link BlockingQueue}. * Subclasses should override one or more methods to modify the behavior of the backing collection * as desired per the <a href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator * pattern</a>. * * <p><b>{@code default} method warning:</b> This class does <i>not</i> forward calls to {@code * default} methods. Instead, it inherits their default implementations. When those implementations * invoke methods, they invoke methods on the {@code ForwardingBlockingQueue}. * * @author Raimundo Mirisola * @param <E> the type of elements held in this collection * @since 4.0 */ @CanIgnoreReturnValue // TODO(cpovirk): Consider being more strict. @GwtIncompatible public abstract class ForwardingBlockingQueue<E> extends ForwardingQueue<E> implements BlockingQueue<E> { /** Constructor for use by subclasses. */ protected ForwardingBlockingQueue() {} @Override protected abstract BlockingQueue<E> delegate(); @Override public int drainTo(Collection<? super E> c, int maxElements) { return delegate().drainTo(c, maxElements); } @Override public int drainTo(Collection<? super E> c) { return delegate().drainTo(c); } @Override public boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException { return delegate().offer(e, timeout, unit); } @Override public E poll(long timeout, TimeUnit unit) throws InterruptedException { return delegate().poll(timeout, unit); } @Override public void put(E e) throws InterruptedException { delegate().put(e); } @Override public int remainingCapacity() { return delegate().remainingCapacity(); } @Override public E take() throws InterruptedException { return delegate().take(); } }
[ "federico@tomassetti.me" ]
federico@tomassetti.me
3f96015105224c316d3ee454ae268ce6acc3c61b
06ea1e1ec656bb145b3e05b7312aeed3ce9a0be9
/graduation-course/graduation-course-service/src/main/java/com/graduation/education/course/service/dao/impl/mapper/AdvMapper.java
1d2e3da4cfa0f05f347dcd30a7eedb8a618bfc8b
[]
no_license
CATTechnology/graduation_parent
11473733372e196ba5390a857d88030faf340b35
be0229f28a56b390a66b8128b4ddd90dca7681aa
refs/heads/master
2023-06-22T09:45:11.603346
2020-04-01T08:18:57
2020-04-01T08:18:57
252,122,429
0
1
null
2023-03-27T22:19:41
2020-04-01T08:55:28
Java
UTF-8
Java
false
false
945
java
package com.graduation.education.course.service.dao.impl.mapper; import com.graduation.education.course.service.dao.impl.mapper.entity.Adv; import com.graduation.education.course.service.dao.impl.mapper.entity.AdvExample; import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @Mapper public interface AdvMapper { int countByExample(AdvExample example); int deleteByExample(AdvExample example); int deleteByPrimaryKey(Long id); int insert(Adv record); int insertSelective(Adv record); List<Adv> selectByExample(AdvExample example); Adv selectByPrimaryKey(Long id); int updateByExampleSelective(@Param("record") Adv record, @Param("example") AdvExample example); int updateByExample(@Param("record") Adv record, @Param("example") AdvExample example); int updateByPrimaryKeySelective(Adv record); int updateByPrimaryKey(Adv record); }
[ "2221734739@qq.com" ]
2221734739@qq.com
66de89cb09612330b8c0148e443f6b4150eecfd7
6500848c3661afda83a024f9792bc6e2e8e8a14e
/gp_JADX/p046b/p047a/C0523g.java
7be49995607232c8efe41242583d5eb7dd316674
[]
no_license
enaawy/gproject
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
91cb88559c60ac741d4418658d0416f26722e789
refs/heads/master
2021-09-03T03:49:37.813805
2018-01-05T09:35:06
2018-01-05T09:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
541
java
package p046b.p047a; final class C0523g implements an { public boolean f3699a = true; public final /* synthetic */ StringBuffer f3700b; C0523g(StringBuffer stringBuffer) { this.f3700b = stringBuffer; } public final boolean mo947a(Object obj, Object obj2) { if (this.f3699a) { this.f3699a = false; } else { this.f3700b.append(","); } this.f3700b.append(obj); this.f3700b.append("="); this.f3700b.append(obj2); return true; } }
[ "genius.ron@gmail.com" ]
genius.ron@gmail.com
bf3187885adbac401beade590b2d4846245c8311
7cfc3643eb4df093b0292d1f9c2cae98477411b2
/src/main/java/com/google/a/f/d.java
692c62498f3915464ab5afda5579d40f543c00ff
[]
no_license
correaj418/PebbleAppGradle
7f934a2deb3f54fcc21b1c41900dfcb8344c337b
71b3312b59e9cd5fe7d58cf39212375f73cdcefb
refs/heads/master
2021-07-11T01:46:36.017905
2017-10-13T01:07:02
2017-10-13T01:07:02
106,761,390
1
0
null
null
null
null
UTF-8
Java
false
false
363
java
package com.google.a.f; import javax.annotation.CheckReturnValue; public final class d { @CheckReturnValue public static int a(byte b) { return b & 255; } public static byte a(long j) { if ((j >> 8) == 0) { return (byte) ((int) j); } throw new IllegalArgumentException("Out of range: " + j); } }
[ "correaj418@gmail.com" ]
correaj418@gmail.com
34087ebe5758149a82e1b3330e59ee9c1201a84d
471a1d9598d792c18392ca1485bbb3b29d1165c5
/jadx-MFP/src/main/java/com/google/ads/interactivemedia/v3/internal/qf.java
438d423b22fe832ddd1c0fd09425cbf1b619ae72
[]
no_license
reed07/MyPreferencePal
84db3a93c114868dd3691217cc175a8675e5544f
365b42fcc5670844187ae61b8cbc02c542aa348e
refs/heads/master
2020-03-10T23:10:43.112303
2019-07-08T00:39:32
2019-07-08T00:39:32
129,635,379
2
0
null
null
null
null
UTF-8
Java
false
false
1,357
java
package com.google.ads.interactivemedia.v3.internal; import com.google.ads.interactivemedia.v3.internal.js.a; /* compiled from: IMASDK */ final class qf extends mq { public qf(sf sfVar) { super(sfVar); } public final void a(bs bsVar) { js jsVar = bsVar.f; if (jsVar == null) { jsVar = null; } else { int a = jsVar.a(); int i = 0; int i2 = 0; while (true) { if (i2 >= a) { i2 = -1; break; } a a2 = jsVar.a(i2); if (a2 instanceof ku) { if (HlsMediaChunk.PRIV_TIMESTAMP_FRAME_OWNER.equals(((ku) a2).a)) { break; } } i2++; } if (i2 != -1) { if (a == 1) { jsVar = null; } else { a[] aVarArr = new a[(a - 1)]; while (i < a) { if (i != i2) { aVarArr[i < i2 ? i : i - 1] = jsVar.a(i); } i++; } jsVar = new js(aVarArr); } } } super.a(bsVar.a(jsVar)); } }
[ "anon@ymous.email" ]
anon@ymous.email
d1fe24e5dae18d4017f4a2f2b87988b07e0e10ad
0232c1cfd8d5455a7a8924013823f7da8c3d2d86
/algorithms/src/dynamicProgramming/LongestIncreasingSequence.java
4b48e32e64f6261739f2810174493d83e8e4ef87
[]
no_license
rajan-github/practice_and_fun
e1369b47e1e88dff0a0633fa4f52f368252c1a6a
0a415204afd190cccc09e9fbfcd8423d41607ec4
refs/heads/master
2023-01-02T00:35:49.834828
2020-10-25T10:33:52
2020-10-25T10:33:52
257,050,536
0
0
null
null
null
null
UTF-8
Java
false
false
2,896
java
package dynamicProgramming; import java.util.ArrayList; import java.util.List; import search.MergeSort; /** * Develop an algorithm to find the longest monotonically increasing subsequence * within a sequence of n numbers. * * @author rajan-c * */ public class LongestIncreasingSequence { /** * Find the longest monotonically increasing subsequence length. * * @param nums * @return */ public static int longestIncreasingSequence(int[] nums) { int[] sortedSequence = MergeSort.mergeSort(nums, 0, nums.length - 1); LISEntry[][] memory = new LISEntry[nums.length + 1][nums.length + 1]; rowInitialize(memory); colInitialize(memory); for (int i = 1; i < memory.length; i++) { for (int j = 1; j < memory.length; j++) { if (nums[i - 1] == sortedSequence[j - 1]) memory[i][j] = new LISEntry(1 + memory[i - 1][j - 1].getLength(), Direction.BACK_UP); else { if (memory[i - 1][j].getLength() >= memory[i][j - 1].getLength()) memory[i][j] = new LISEntry(memory[i - 1][j].getLength(), Direction.UP); else memory[i][j] = new LISEntry(memory[i][j - 1].getLength(), Direction.BACKWARD); } } } reconstructSolution(memory, nums); return memory[memory.length - 1][memory.length - 1].getLength(); } /** * Reconstruct the actual solution from the memory computed by * longestIncreasingSequence method. * * @param memory * @param sortedInput */ private static void reconstructSolution(LISEntry[][] memory, int[] nums) { int row = memory.length - 1, col = memory.length - 1; List<Integer> number = new ArrayList<>(); while (row > 0 && col > 0) { if (memory[row][col].getDirection().equals(Direction.BACK_UP)) { number.add(0, nums[row - 1]); row--; col--; } else if (memory[row][col].getDirection().equals(Direction.BACKWARD)) col--; else row--; } System.out.println(number); } private static void rowInitialize(LISEntry[][] memory) { for (int i = 0; i < memory.length; i++) memory[0][i] = new LISEntry(0, Direction.UP); } private static void colInitialize(LISEntry[][] memory) { for (int i = 0; i < memory.length; i++) memory[i][0] = new LISEntry(0, Direction.BACKWARD); } public static void main(String[] args) { System.out.println(longestIncreasingSequence(new int[] { 2, 4, 3, 5, 1, 7, 6, 9, 8 })); System.out.println(longestIncreasingSequence(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 })); } } class LISEntry { private int length; private Direction direction; public LISEntry(int len, Direction dir) { this.length = len; this.direction = dir; } public int getLength() { return length; } public void setLength(int length) { this.length = length; } public Direction getDirection() { return direction; } public void setDirection(Direction direction) { this.direction = direction; } } enum Direction { BACKWARD, UP, BACK_UP; }
[ "rajan-c@prod.hclpnp.com" ]
rajan-c@prod.hclpnp.com
dfd0477b65df8041d7b734b8e274961d57f345e6
072742f580167c59cb6ccf388dd74c486d8efbe7
/sources/net/sourceforge/pinyin4j/format/HanyuPinyinCaseType.java
0e0cdb7553094e88ef18f179f859e899a6dd6c35
[]
no_license
1989rat/libcan59-TsMainUI
3ff2034fc162943419998edab8ad4f1dd9dc8a02
9fe822b23d0f748dd8c6c109a5e93150f54458aa
refs/heads/master
2023-03-20T07:56:55.859764
2021-01-26T05:07:11
2021-01-26T05:07:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
555
java
package net.sourceforge.pinyin4j.format; public class HanyuPinyinCaseType { public static final HanyuPinyinCaseType LOWERCASE = new HanyuPinyinCaseType("LOWERCASE"); public static final HanyuPinyinCaseType UPPERCASE = new HanyuPinyinCaseType("UPPERCASE"); protected String name; protected HanyuPinyinCaseType(String str) { setName(str); } public String getName() { return this.name; } /* access modifiers changed from: protected */ public void setName(String str) { this.name = str; } }
[ "nicholas@prjkt.io" ]
nicholas@prjkt.io
ca531f73f8ca739b2926c9aeed0306131e6240b3
447520f40e82a060368a0802a391697bc00be96f
/apks/banking_set2/com.advantage.RaiffeisenBank/source/com/google/android/gms/internal/zzanz.java
a49ee33dd0b158ef761eae0f6fa2bbe395549cc6
[ "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
1,612
java
package com.google.android.gms.internal; import java.lang.reflect.Field; import java.util.Locale; public enum zzanz implements zzaoa { private zzanz() {} private static String zza(char paramChar, String paramString, int paramInt) { if (paramInt < paramString.length()) { paramString = String.valueOf(paramString.substring(paramInt)); return String.valueOf(paramString).length() + 1 + paramChar + paramString; } return String.valueOf(paramChar); } private static String zzbz(String paramString1, String paramString2) { StringBuilder localStringBuilder = new StringBuilder(); int i = 0; while (i < paramString1.length()) { char c = paramString1.charAt(i); if ((Character.isUpperCase(c)) && (localStringBuilder.length() != 0)) { localStringBuilder.append(paramString2); } localStringBuilder.append(c); i += 1; } return localStringBuilder.toString(); } private static String zzum(String paramString) { int i = 0; StringBuilder localStringBuilder = new StringBuilder(); char c = paramString.charAt(0); String str; if ((i >= paramString.length() - 1) || (Character.isLetter(c))) { if (i != paramString.length()) { break label70; } str = localStringBuilder.toString(); } label70: do { return str; localStringBuilder.append(c); i += 1; c = paramString.charAt(i); break; str = paramString; } while (Character.isUpperCase(c)); return zza(Character.toUpperCase(c), paramString, i + 1); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com