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
ea0477c2c142ea95c8259ad3604f985f103704b4
6eb010ece91f1b2ef6b4a48c0f078f67401ccacd
/app/src/main/java/com/yapin/shanduo/model/GroupListLoadModel.java
c2b13dcdeaa0bc54945df6b7c5b26ee0356549c3
[]
no_license
CQ173/ShanDuo
d29cbc31e7cd2be1f3490f59c64b9fd7b8a97107
0ae5aad9571c7d2d5b27cbf5d26b3ff7e0457155
refs/heads/master
2020-04-01T17:04:04.284143
2018-10-17T07:12:59
2018-10-17T07:12:59
130,808,255
0
0
null
null
null
null
UTF-8
Java
false
false
317
java
package com.yapin.shanduo.model; import com.yapin.shanduo.model.entity.IMGroupInfo; import com.yapin.shanduo.presenter.OnLoadListener; import java.util.List; /** * 作者:L on 2018/6/16 0016 11:42 */ public interface GroupListLoadModel { void load(OnLoadListener<List<IMGroupInfo.GroupInfo>> listener); }
[ "1322127081@qq.com" ]
1322127081@qq.com
c2635ff1365f6c5a06e2687af73f3b97a3fc0e75
eef372565ca7a8ed8a9a0faeb79338a4edc8f094
/PTN_Client(2015)/src/com/nms/model/ptn/path/protect/ProtectRorateInfoService_MB.java
4bbb96d642708ca4f63a7470f1c9eba274224c50
[]
no_license
ptn2017/ptn2017
f42db27fc54c1fe5938407467b395e6b0a8721f7
7090e2c64b2ea7f38e530d58247dfba4b2906b9a
refs/heads/master
2021-09-04T08:12:08.639049
2018-01-17T07:24:44
2018-01-17T07:24:44
112,810,000
0
0
null
null
null
null
UTF-8
Java
false
false
1,241
java
package com.nms.model.ptn.path.protect; import java.util.List; import org.apache.ibatis.session.SqlSession; import com.nms.db.bean.ptn.path.protect.ProtectRorateInfo; import com.nms.db.dao.ptn.path.protect.ProtectRorateInfoMapper; import com.nms.model.util.ObjectService_Mybatis; import com.nms.ui.manager.ExceptionManage; public class ProtectRorateInfoService_MB extends ObjectService_Mybatis{ public void setPtnuser(String ptnuser) { super.ptnuser = ptnuser; } public void setSqlSession(SqlSession sqlSession) { super.sqlSession = sqlSession; } private ProtectRorateInfoMapper protectRorateInfoMapper; public ProtectRorateInfoMapper getProtectRorateInfoMapper() { return protectRorateInfoMapper; } public void setProtectRorateInfoMapper(ProtectRorateInfoMapper protectRorateInfoMapper) { this.protectRorateInfoMapper = protectRorateInfoMapper; } public List<ProtectRorateInfo> queryByProtectRorateInfo(ProtectRorateInfo protectRorateInfo)throws Exception{ List<ProtectRorateInfo> protectInfoList = null; try { protectInfoList = protectRorateInfoMapper.queryByCondition(protectRorateInfo); } catch (Exception e) { ExceptionManage.dispose(e,this.getClass()); } return protectInfoList; } }
[ "a18759149@qq.com" ]
a18759149@qq.com
e1b51d82ad45ddf94f6cf952224400514f0645c0
a36dce4b6042356475ae2e0f05475bd6aed4391b
/2005/julypersistenceEJB/ejbModule/com/hps/july/persistence/PIEDocNriHome.java
a9cd85510cb2d66d71d4c23d50ef0c3345c6e8c5
[]
no_license
ildar66/WSAD_NRI
b21dbee82de5d119b0a507654d269832f19378bb
2a352f164c513967acf04d5e74f36167e836054f
refs/heads/master
2020-12-02T23:59:09.795209
2017-07-01T09:25:27
2017-07-01T09:25:27
95,954,234
0
1
null
null
null
null
UTF-8
Java
false
false
1,365
java
package com.hps.july.persistence; /** * This is a Home interface for the Entity Bean */ public interface PIEDocNriHome extends javax.ejb.EJBHome { /** * * @return com.hps.july.persistence.PIEDocNri * @param argIdrecdoc int * @param argQuery int * @param argTypeDocNri short * @param argOwner int * @exception String The exception description. * @exception String The exception description. */ com.hps.july.persistence.PIEDocNri create(int argIdrecdoc, int argQuery, short argTypeDocNri, int argOwner) throws javax.ejb.CreateException, java.rmi.RemoteException; /** * findByPrimaryKey method comment * @return com.hps.july.persistence.PIEDocNri * @param key com.hps.july.persistence.PIEDocNriKey * @exception java.rmi.RemoteException The exception description. * @exception javax.ejb.FinderException The exception description. */ com.hps.july.persistence.PIEDocNri findByPrimaryKey(com.hps.july.persistence.PIEDocNriKey key) throws java.rmi.RemoteException, javax.ejb.FinderException; /** * This method was generated for supporting the association named PIEDocNri2query. * It will be deleted/edited when the association is deleted/edited. */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ java.util.Enumeration findPIEDocNrisByQuery(com.hps.july.persistence.PIEQueryKey inKey) throws java.rmi.RemoteException, javax.ejb.FinderException; }
[ "ildar66@inbox.ru" ]
ildar66@inbox.ru
74e35878626a5ba5a7a9c6f3c41835f2f4f5956c
5ebfe7bb05c0bf9a1f957eeb53b9d925038df0b7
/lightning-quarkus-examples/src/main/java/example/AppConfigLoader.java
f8f58dff166b5777aa4b1f4cab33123bca10c182
[ "MIT" ]
permissive
aoberoi/java-slack-sdk
0c0fba0f57fabbd1f5095176e7548649bede6435
807f4c12799326fe406e452532178f269f142a29
refs/heads/master
2020-12-22T05:02:15.520881
2020-01-27T21:36:39
2020-01-27T21:36:39
236,676,613
0
0
MIT
2020-01-28T06:59:53
2020-01-28T06:59:52
null
UTF-8
Java
false
false
1,012
java
package example; import com.slack.api.lightning.AppConfig; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.stream.Collectors; public class AppConfigLoader { public static final AppConfig load() throws IOException { AppConfig config = new AppConfig(); try (InputStream is = AppConfigLoader.class.getClassLoader().getResourceAsStream("appConfig.json"); InputStreamReader isr = new InputStreamReader(is)) { String json = new BufferedReader(isr).lines().collect(Collectors.joining()); JsonObject j = new Gson().fromJson(json, JsonElement.class).getAsJsonObject(); config.setSigningSecret(j.get("signingSecret").getAsString()); config.setSingleTeamBotToken(j.get("singleTeamBotToken").getAsString()); } return config; } }
[ "seratch@gmail.com" ]
seratch@gmail.com
7fb18db97849ace0a249a1aca47e7e16702ccacb
eb2690583fc03c0d9096389e1c07ebfb80e7f8d5
/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02188.java
232496a71f5fcafc4973da70463330defa1b456d
[]
no_license
leroy-habberstad/java-benchmark
126671f074f81bd7ab339654ed1b2d5d85be85dd
bce2a30bbed61a7f717a9251ca2cbb38b9e6a732
refs/heads/main
2023-03-15T03:02:42.714614
2021-03-23T00:03:36
2021-03-23T00:03:36
350,495,796
0
0
null
null
null
null
UTF-8
Java
false
false
3,617
java
/** * OWASP Benchmark Project v1.2 * * This file is part of the Open Web Application Security Project (OWASP) * Benchmark Project. For details, please see * <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>. * * The OWASP Benchmark 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, version 2. * * The OWASP Benchmark 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. * * @author Nick Sanidas <a href="https://www.aspectsecurity.com">Aspect Security</a> * @created 2015 */ package org.owasp.benchmark.testcode; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet(value="/sqli-04/BenchmarkTest02188") public class BenchmarkTest02188 extends HttpServlet { private static final long serialVersionUID = 1L; @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); String param = request.getParameter("BenchmarkTest02188"); if (param == null) param = ""; String bar = doSomething(request, param); String sql = "SELECT * from USERS where USERNAME='foo' and PASSWORD='"+ bar +"'"; try { java.sql.Statement statement = org.owasp.benchmark.helpers.DatabaseHelper.getSqlStatement(); java.sql.ResultSet rs = statement.executeQuery( sql ); org.owasp.benchmark.helpers.DatabaseHelper.printResults(rs, sql, response); } catch (java.sql.SQLException e) { if (org.owasp.benchmark.helpers.DatabaseHelper.hideSQLErrors) { response.getWriter().println( "Error processing request." ); return; } else throw new ServletException(e); } } // end doPost private static String doSomething(HttpServletRequest request, String param) throws ServletException, IOException { // Chain a bunch of propagators in sequence String a16667 = param; //assign StringBuilder b16667 = new StringBuilder(a16667); // stick in stringbuilder b16667.append(" SafeStuff"); // append some safe content b16667.replace(b16667.length()-"Chars".length(),b16667.length(),"Chars"); //replace some of the end content java.util.HashMap<String,Object> map16667 = new java.util.HashMap<String,Object>(); map16667.put("key16667", b16667.toString()); // put in a collection String c16667 = (String)map16667.get("key16667"); // get it back out String d16667 = c16667.substring(0,c16667.length()-1); // extract most of it String e16667 = new String( org.apache.commons.codec.binary.Base64.decodeBase64( org.apache.commons.codec.binary.Base64.encodeBase64( d16667.getBytes() ) )); // B64 encode and decode it String f16667 = e16667.split(" ")[0]; // split it on a space org.owasp.benchmark.helpers.ThingInterface thing = org.owasp.benchmark.helpers.ThingFactory.createThing(); String g16667 = "barbarians_at_the_gate"; // This is static so this whole flow is 'safe' String bar = thing.doSomething(g16667); // reflection return bar; } }
[ "jjohnson@gitlab.com" ]
jjohnson@gitlab.com
36ccd7a3bf7168a0e58458dfcaa52816e87bce4e
2a317cd5006075eeb8e9b282de69734aa6e2daf8
/com.bodaboda_source_code/sources/com/google/android/gms/drive/realtime/internal/zzf.java
82a2597b4733a220b244ab946c82159e05c793ea
[]
no_license
Akuku25/bodaapp
ee1ed22b0ad05c11aa8c8d4595f5b50da338fbe0
c4f54b5325d035b54d0288a402558aa1592a165f
refs/heads/master
2020-04-28T03:52:04.729338
2019-03-11T08:24:30
2019-03-11T08:24:30
174,954,616
0
0
null
null
null
null
UTF-8
Java
false
false
4,167
java
package com.google.android.gms.drive.realtime.internal; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; import com.google.android.gms.common.api.Status; import com.google.android.gms.common.data.DataHolder; public interface zzf extends IInterface { public static abstract class zza extends Binder implements zzf { private static class zza implements zzf { private IBinder zzle; zza(IBinder iBinder) { this.zzle = iBinder; } public IBinder asBinder() { return this.zzle; } public void zzb(DataHolder dataHolder) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.gms.drive.realtime.internal.IDataHolderCallback"); if (dataHolder != null) { obtain.writeInt(1); dataHolder.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.zzle.transact(1, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } public void zzm(Status status) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.gms.drive.realtime.internal.IDataHolderCallback"); if (status != null) { obtain.writeInt(1); status.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.zzle.transact(2, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } } public static zzf zzaj(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.drive.realtime.internal.IDataHolderCallback"); return (queryLocalInterface == null || !(queryLocalInterface instanceof zzf)) ? new zza(iBinder) : (zzf) queryLocalInterface; } public IBinder asBinder() { return this; } public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { Status status = null; switch (code) { case 1: DataHolder zzA; data.enforceInterface("com.google.android.gms.drive.realtime.internal.IDataHolderCallback"); if (data.readInt() != 0) { zzA = DataHolder.CREATOR.zzA(data); } zzb(zzA); reply.writeNoException(); return true; case 2: data.enforceInterface("com.google.android.gms.drive.realtime.internal.IDataHolderCallback"); if (data.readInt() != 0) { status = Status.CREATOR.createFromParcel(data); } zzm(status); reply.writeNoException(); return true; case 1598968902: reply.writeString("com.google.android.gms.drive.realtime.internal.IDataHolderCallback"); return true; default: return super.onTransact(code, data, reply, flags); } } } void zzb(DataHolder dataHolder) throws RemoteException; void zzm(Status status) throws RemoteException; }
[ "wanyama19@gmail.com" ]
wanyama19@gmail.com
b41765544601c0aeb45f93da29ffe2aac6ff3961
81f05cb51f809174c13024a7220e947017a27af4
/simple/javasource/src/main/java/com/ask/base/componet/params/MixtureParam.java
2e9d4ba97a69161bea1b08a9b5498004eb5aeaf3
[]
no_license
SuperRookieMam/askProject
210d73a9579172d669fd29f421c3a1935ce9534f
1edd95cd1feacc676772dc468df3742804019b46
refs/heads/master
2023-01-11T12:23:41.690525
2019-09-18T13:21:18
2019-09-18T13:21:18
195,639,877
0
0
null
2023-01-04T03:52:34
2019-07-07T10:49:28
Java
UTF-8
Java
false
false
423
java
package com.ask.base.componet.params; import lombok.Getter; import lombok.Setter; import java.io.Serializable; import java.util.List; @Getter @Setter public class MixtureParam implements Serializable{ private static final long serialVersionUID = 2994955292681520883L; //指定 and or String type; List<FlatParam> flatParams; List<BasicsParam> basicsParams; List<MixtureParam> mixtureParams; }
[ "422375723@qq.com" ]
422375723@qq.com
95b803b7026f633463271cec8d7d92ea45526b5d
89f3af52f5634bce05aaecc742b1e4bb0a009ff2
/trunk/fmps-web/src/main/java/cn/com/fubon/fo/customernewcarlicence/service/CustomerNewCarLicenceService.java
9861840b8c1f5b571f13c828efd5f2a74d6ac45d
[]
no_license
cash2one/fmps
d331391b7d6cb5b50645e823e1606c6ea236b8a2
b57c463943fec0da800e5374f306176914a39079
refs/heads/master
2021-01-21T06:42:45.275421
2016-06-21T12:47:46
2016-06-21T12:47:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
935
java
package cn.com.fubon.fo.customernewcarlicence.service; import java.util.List; import java.util.Map; import org.jeecgframework.core.common.service.CommonService; public interface CustomerNewCarLicenceService extends CommonService { /** * 从 ORACLE 数据库 查询新车列表 */ List<Map<String, Object>> getCustomerNewCarLicenceRecord(String identifynumber,String customercname , String framenoList); /** * 从mysql 数据库 查询已经上牌的新车 */ List<Map<String, Object>> getNewCarHasLicenceRecord(String identifynumber,String customercname); /** * 根据车架号 从 ORACLE 数据库中查询出 保单号 与 客户号 * @param identifynumber * @param customercname * @param frameno * @return */ Map<String, Object> getCustomerPolicyNoAndCustomerID(String identifynumber,String customercname,String frameno); public Map<String, Object> getWeiXinOpenId(String customerId); }
[ "fangfang.guo@fubon.com.cn" ]
fangfang.guo@fubon.com.cn
acfdb69db8cf36f48c66ad552a1b50e2e98f726a
58c361819489eeb34411ff84a7de089809f1a646
/communication-message-protocol/src/main/java/com/tigerjoys/communication/protocol/message/MessageEncoder.java
3e4c147835c2b054df88715e862085a0165e9d92
[]
no_license
qugemingzizhemefeijin/communication-frame
24d3f2d2dd696012c39438eb6d97f46c5e84ef78
353bfe64fa1cfbc3adc1fc8faf243492334c0e00
refs/heads/master
2023-04-01T00:09:06.529114
2021-04-09T13:15:59
2021-04-09T13:15:59
356,218,750
1
0
null
null
null
null
UTF-8
Java
false
false
692
java
package com.tigerjoys.communication.protocol.message; import com.tigerjoys.communication.protocol.Protocol; import com.tigerjoys.communication.protocol.ProtocolConst; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToByteEncoder; public class MessageEncoder extends MessageToByteEncoder<Protocol> { //private static final Logger LOGGER = LoggerFactory.getLogger(MessageEncoder.class); @Override protected void encode(ChannelHandlerContext ctx, Protocol p, ByteBuf out) throws Exception { out.writeBytes(ProtocolConst.P_START_TAG); out.writeBytes(p.toBytes()); out.writeBytes(ProtocolConst.P_END_TAG); } }
[ "172577882@qq.com" ]
172577882@qq.com
11461abfa9b96b568c56f09b6f0f3c2cc51492b6
64d8ec4256a5d2a020440c3312c005bb47f65a5d
/app/src/main/java/wai/wk/deliver/view/IMainFragView.java
6c9c2a113b54545816e695a51f2f4abb091b1bf9
[]
no_license
Finderchangchang/WKDeliver
b8a94bcf77d43bf4c2f684ca389b000b34fe93bf
e2a2c87801b7a68ad6d3606f7978b4e65d7bb9b6
refs/heads/master
2021-01-22T20:25:34.678461
2017-03-23T09:53:14
2017-03-23T09:53:14
85,320,217
0
0
null
null
null
null
UTF-8
Java
false
false
700
java
package wai.wk.deliver.view; import java.util.List; import wai.wk.deliver.model.ListModel; import wai.wk.deliver.model.OrderModel; /** * Created by Administrator on 2016/10/14. */ public interface IMainFragView { /** * 刷新后返回数据 * * @param list */ void refreshOrder(List<OrderModel> list); /** * 刷新处理结果 * * @param list 列表 */ void refresh(ListModel list); /** * 加载更多显示数据 * * @param list */ void loadMoreOrder(List<OrderModel> list); /** * 改变订单状态处理结果 * * @param result */ void changeStateResult(boolean result); }
[ "1031066280@qq.com" ]
1031066280@qq.com
b385d9bfcaf0bf8a03cde6f7c7536c7a525d1cde
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes/com/tencent/mobileqq/activity/aio/item/SystemItemBuilder.java
66a158156f1c78e4c3d355d55c52979df03ad2a5
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,009
java
package com.tencent.mobileqq.activity.aio.item; import android.content.Context; import android.view.View; import android.widget.BaseAdapter; import com.tencent.mobileqq.activity.aio.BaseBubbleBuilder; import com.tencent.mobileqq.activity.aio.BaseBubbleBuilder.ViewHolder; import com.tencent.mobileqq.activity.aio.BaseChatItemLayout; import com.tencent.mobileqq.activity.aio.OnLongClickAndTouchListener; import com.tencent.mobileqq.activity.aio.SessionInfo; import com.tencent.mobileqq.activity.aio.anim.AIOAnimationConatiner; import com.tencent.mobileqq.app.QQAppInterface; import com.tencent.mobileqq.data.ChatMessage; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tencent.mobileqq.utils.dialogutils.QQCustomMenuItem; import nqj; public class SystemItemBuilder extends BaseBubbleBuilder { public SystemItemBuilder(QQAppInterface paramQQAppInterface, BaseAdapter paramBaseAdapter, Context paramContext, SessionInfo paramSessionInfo, AIOAnimationConatiner paramAIOAnimationConatiner) { super(paramQQAppInterface, paramBaseAdapter, paramContext, paramSessionInfo, paramAIOAnimationConatiner); boolean bool = NotVerifyClass.DO_VERIFY_CLASS; } public int a(ChatMessage paramChatMessage) { return 0; } protected View a(ChatMessage paramChatMessage, BaseBubbleBuilder.ViewHolder paramViewHolder, View paramView, BaseChatItemLayout paramBaseChatItemLayout, OnLongClickAndTouchListener paramOnLongClickAndTouchListener) { return null; } protected BaseBubbleBuilder.ViewHolder a() { return new nqj(this); } protected String a(ChatMessage paramChatMessage) { return ""; } public void a(int paramInt, Context paramContext, ChatMessage paramChatMessage) {} public QQCustomMenuItem[] a(View paramView) { return null; } } /* Location: E:\apk\QQ_91\classes-dex2jar.jar!\com\tencent\mobileqq\activity\aio\item\SystemItemBuilder.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
8ac5c1f2c5b159366351a25801e796bfbd258843
d736fc72b21e648a287869c0d67e0b1b96cb1475
/Ex24FileInputOutput/src/StringInputOutput.java
a1fa607f6f8fc33470434388e37fc0f341d5ce95
[]
no_license
saythename17/Java
6653c2970d60f4e7d415344866ae1490e5be92fd
d05a94cc54a98316e0d05140ce4a62ae9573cd0c
refs/heads/master
2022-12-11T07:05:14.074425
2020-08-28T08:43:09
2020-08-28T08:43:09
290,993,434
0
0
null
null
null
null
UHC
Java
false
false
4,073
java
import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Scanner; public class StringInputOutput { public static void main(String[] args) { // 문자열 데이터를 한단어씩 입력받아 별도의 파일에 저장하고 읽어오는 프로그램 //사용자로부터 문자열 데이터 입력받기 Scanner scan=new Scanner(System.in); //사용자가 NO라는 글자를 입력할때까지 계속 입력 while(true) { System.out.print(" Input Word(NO->end) : "); String str=scan.nextLine(); if(str.equalsIgnoreCase("NO"))break; //문자열 비교:[==]사용불가 └대소문자 구분없이 비교 //파일은 프로그램에서 자동으로 만들어주지 않기에 명시적으로 파일 만들기 //별도의 파일에 저장하기 위한 File(해임달)객체 생성 //목표위치: "본인프로젝트폴더/files/bts.txt" //먼저 폴더위치가 지정된 File객체생성 File path= new File("files");//files라는 폴더명 생성 if(!path.exists()/*exists:존재여부*/) path.mkdirs(); //└폴더가 없으면 만듬//경로+파일명.확장자 를 가진 File객체생성 File file=new File(path,"bts.txt");//"files/bts.txt" //파일과 연결할 무지개로드(Stream)객체 생성 //단, byte stream(Output Stream)이 아닌 문자스트림(Writer)사용 //Writer중에서-File용으로 만들어진 FileWriter사용 try { FileWriter fw=new FileWriter(file,true);//append모드 fw.write(str+"\n");//줄바꿈 fw.flush();//Stream에 남아있을지 모르는 data밀어넣기 fw.close(); //데이터를 콘솔창화면에 출력하듯 더 쉽게 파일의 저장형태 제어 //보조 Writer class//기존 FileWriter보조 PrintWriter writer=new PrintWriter(fw); writer.println(str); writer.flush(); writer.close();//보조스트림을 닫으면 FileWriter도 같이 close() } catch (IOException e) { //문서가 없으면 자동으로 만들기 때문에 FilNotFound Exception은 발생X System.out.println(" 파일쓰기 작업중 ERROR발생"); } }//while System.out.println(" ======================"); System.out.println(" 저장된 파일의 데이터를 화면에 출력"); System.out.println(" ======================"); //파일에 한줄씩 저장되어 있는 문자열을 ArrayList에 추가기키기 ArrayList<String> datas=new ArrayList<String>(); //읽어올 File객체 생성 File file=new File("files/bts.txt");//해임달 //파일과 연결되는 무지개로드(Stream) 생성 try { FileReader fr=new FileReader(file); //┌한 글자씩 받아오려면 반복문 사용-줄마다 반복문의 횟수가 달라 복잡해짐.. //fr.read();//한글자씩 읽어옴: 영어-1byte //한글-2~3byte(언어마다 읽어들이는 바이트가 다르게 결정됨) //[Buffer:보관 상자≒레지스터] //키보드 버퍼:예)검색창,메신저-키보드에서 엔터누르기 전까지 담아놓는 곳 //입력을 편하게 한줄씩 입력받기 위한 보조스트림(BufferdReader)class //BufferedReader : FileReader가 한글자씩 준 데이터를 모아놓고 사용 BufferedReader reader=new BufferedReader(fr); //BufferedReader에게 저장된 데이터를 한줄씩 읽어달라 요청 String line=reader.readLine();//한줄읽기, 줄바꿈 문자는 포함 X while(line!=null) { datas.add(line);//ArrayList에추가 line=reader.readLine();//다음줄로 } //ArrayList에있는 문자열 차례로 출력 for(int i=0;i<datas.size();i++) System.out.println(" "+datas.get(i)); reader.close();//작업이 끝나면Stream 닫기 } catch (FileNotFoundException e) { System.out.println(" No File"); } catch (IOException e) { System.out.println(" Reading ERROR"); } }//main }//SIO
[ "zion.h719@gmail.com" ]
zion.h719@gmail.com
7143e844c0e631a5a4d341f041cd7e138b96f174
037a8221604a4291e0d1c1a9686d4b3bdbd4b876
/20170103/src/demo/TestNumber.java
d84c6eb98f6023c6c2fb197afbdfdf3169297364
[]
no_license
ltt19921124/Learningjavaworkspace
e3822744031a9896807bc3d2e8fcae3e875aab25
6e81c000fc6bbb05313c8049e9a827898dc062ea
refs/heads/master
2021-04-29T10:47:58.613099
2017-04-13T08:26:41
2017-04-13T08:26:41
77,837,535
0
0
null
null
null
null
GB18030
Java
false
false
363
java
package demo; public class TestNumber { /** * @param args * 这是打印出100到200所有的素数 * */ public static void main(String[] args) { for (int i = 100; i < 201; i++){ boolean b = false; for (int j = 2; j < i; j++) { int k = i % j; if(k == 0){ b = true; } } if(!b){ System.out.println(i); } } } }
[ "ltt19921124@163.com" ]
ltt19921124@163.com
483e354fad281b99c2de80ca593d9e0bbb391576
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-1.2/mule/src/java/org/mule/umo/TransactionException.java
ba2891279800642d3e770d830c71d5b80c969039
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-symphonysoft" ]
permissive
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
1,270
java
/* * $Header$ * $Revision$ * $Date$ * ------------------------------------------------------------------------------------------------------ * * Copyright (c) SymphonySoft Limited. All rights reserved. * http://www.symphonysoft.com * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. * */ package org.mule.umo; import org.mule.config.i18n.Message; /** * <p> * <code>TransactionException</code> is thrown when an exception occurs while * trying to create, start commit or rollback an exception * * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a> * @version $Revision$ */ public class TransactionException extends UMOException { /** * @param message the exception message */ public TransactionException(Message message) { super(message); } /** * @param message the exception message * @param cause the exception that cause this exception to be thrown */ public TransactionException(Message message, Throwable cause) { super(message, cause); } public TransactionException(Throwable cause) { super(cause); } }
[ "(no author)@bf997673-6b11-0410-b953-e057580c5b09" ]
(no author)@bf997673-6b11-0410-b953-e057580c5b09
0feedce7057aed8d8e4c892b71ebd929fbde01ef
14dfa130aa3ccf86a0c91da844151091c038065a
/examples/src/main/java/es/uc3m/programacion/bucles/anidados/ArbolNavidad.java
1deac6da56c06360deb26e82197adbff068907fc
[]
no_license
chemaar/java-programming-course
c67972dc7e06aa62c3d77d463b7b3e5337d45a5a
477a9a1a7e2156fb311794ee4125257cf753e9ed
refs/heads/master
2021-01-10T13:36:15.534190
2015-12-11T13:42:13
2015-12-11T13:42:13
43,778,283
1
0
null
null
null
null
UTF-8
Java
false
false
1,170
java
package es.uc3m.programacion.bucles.anidados; import java.io.IOException; import java.util.Scanner; /** * Escribir un programa para mostrar por pantalla la siguiente figura. * * * * *** ***** ******* ********* *********** ************* *************** *** *** *** */ public class ArbolNavidad { public static void main(String []args) throws IOException{ Scanner mc = new Scanner(System.in); int baseStars = 15; int halfBlankSpaces = 0; for (int i = 1; i<baseStars; i=i+2){ halfBlankSpaces = (baseStars-i)/2; for(int j=0; j<halfBlankSpaces;j++){ System.out.print(" "); } for(int k = 0; k<i;k++){ System.out.print("*"); } for(int j=0; j<halfBlankSpaces;j++){ System.out.print(" "); } System.out.println(""); } halfBlankSpaces = (baseStars/2)-1; for(int i = 0; i<3;i++){ for(int j=0; j<halfBlankSpaces;j++){ System.out.print(" "); } for(int k=0; k<3;k++){ System.out.print("*"); } for(int j=0; j<halfBlankSpaces;j++){ System.out.print(" "); } System.out.println(" "); } } }
[ "chema.ar@gmail.com" ]
chema.ar@gmail.com
9eb8168a73d9c3be85f760d91fe8e96b2ef015be
6be39fc2c882d0b9269f1530e0650fd3717df493
/weixin反编译/sources/com/tencent/mm/plugin/remittance/ui/RemittanceResultUI.java
b4fee573317244003f6ca74d3b8e7f0c1d354304
[]
no_license
sir-deng/res
f1819af90b366e8326bf23d1b2f1074dfe33848f
3cf9b044e1f4744350e5e89648d27247c9dc9877
refs/heads/master
2022-06-11T21:54:36.725180
2020-05-07T06:03:23
2020-05-07T06:03:23
155,177,067
5
0
null
null
null
null
UTF-8
Java
false
false
6,950
java
package com.tencent.mm.plugin.remittance.ui; import android.os.Bundle; import android.widget.Toast; import com.tencent.mm.ad.k; import com.tencent.mm.f.a.fl; import com.tencent.mm.plugin.remittance.model.n; import com.tencent.mm.plugin.wallet_core.model.Orders; import com.tencent.mm.plugin.wallet_core.model.Orders.Commodity; import com.tencent.mm.plugin.wxpay.a.c; import com.tencent.mm.pluginsdk.wallet.PayInfo; import com.tencent.mm.protocal.c.lg; import com.tencent.mm.sdk.b.b; import com.tencent.mm.sdk.platformtools.bi; import com.tencent.mm.sdk.platformtools.x; import com.tencent.mm.ui.base.a; import com.tencent.mm.wallet_core.ui.WalletBaseUI; @a(3) public class RemittanceResultUI extends WalletBaseUI { private Orders pVi; public void onCreate(Bundle bundle) { super.onCreate(bundle); if (boI()) { int i; boolean z; int i2; PayInfo payInfo; b flVar; uV(4); getWindow().setBackgroundDrawableResource(c.transparent); this.pVi = (Orders) this.vf.getParcelable("key_orders"); PayInfo payInfo2 = (PayInfo) this.vf.getParcelable("key_pay_info"); if (payInfo2 != null) { i = payInfo2.fDQ; } else { i = 0; } if (i == 31 || i == 5) { z = false; } else { z = true; } String str = "MicroMsg.RemittanceResultUI"; String str2 = "orders==null:%s, paysScene: %s, needFetchF2fData: %s"; Object[] objArr = new Object[3]; objArr[0] = Boolean.valueOf(this.pVi == null); objArr[1] = Integer.valueOf(i); objArr[2] = Boolean.valueOf(z); x.i(str, str2, objArr); if (this.pVi != null) { x.i("MicroMsg.RemittanceResultUI", "is_use_new_paid_succ_page: %s", Integer.valueOf(this.pVi.sUp)); if (this.pVi.sUp != 1) { z(RemittanceResultOldUI.class); } else if (z) { Orders orders = this.pVi; if (payInfo2 == null || payInfo2.vGl == null) { z(RemittanceResultNewUI.class); finish(); } else { x.i("MicroMsg.RemittanceResultUI", "fetch f2f data"); String string = payInfo2.vGl.getString("extinfo_key_11"); String str3 = ""; if (orders != null && orders.sUf.size() > 0) { str3 = ((Commodity) orders.sUf.get(0)).fvD; } int i3 = payInfo2.vGl.getInt("extinfo_key_15", 0); str2 = payInfo2.vGl.getString("extinfo_key_7"); String string2 = payInfo2.vGl.getString("extinfo_key_3"); int i4 = payInfo2.vGl.getInt("extinfo_key_12", 0); String string3 = payInfo2.vGl.getString("extinfo_key_13"); String string4 = payInfo2.vGl.getString("extinfo_key_14"); String string5 = payInfo2.vGl.getString("extinfo_key_16"); if (bi.oN(string5)) { string5 = str3; } x.i("MicroMsg.RemittanceResultUI", "fetchF2fData, f2fid: %s, transid: %s, amount: %s, payerDesc: %s, recvDesc: %s, scanScene: %s, paySuccSign: %s, paySuccExtend: %s, channel: %s, payscene: %s", string, string5, Integer.valueOf(i3), str2, string2, Integer.valueOf(i4), string3, string4, Integer.valueOf(payInfo2.fDM), Integer.valueOf(payInfo2.fDQ)); jl(2773); int i5 = payInfo2.fDM; int i6 = payInfo2.fDQ; l(new n(string, string5, i3, str2, string2, i5, i4, string3, string4)); } } i2 = 0; payInfo = (PayInfo) this.vf.getParcelable("key_pay_info"); if (payInfo != null) { i2 = payInfo.fDQ; } if (i2 != 33 || i2 == 32 || i2 == 48 || i2 == 31) { flVar = new fl(); flVar.fvB.fvC = payInfo.fvC; if (i2 != 31) { flVar.fvB.type = 0; } else if (i2 == 32 || i2 == 33) { flVar.fvB.type = 1; } if (!(this.pVi == null || this.pVi.sUf.isEmpty())) { flVar.fvB.fvD = ((Commodity) this.pVi.sUf.get(0)).fvD; } com.tencent.mm.sdk.b.a.xmy.m(flVar); } return; } z(RemittanceResultNewUI.class); finish(); i2 = 0; payInfo = (PayInfo) this.vf.getParcelable("key_pay_info"); if (payInfo != null) { i2 = payInfo.fDQ; } if (i2 != 33) { } flVar = new fl(); flVar.fvB.fvC = payInfo.fvC; if (i2 != 31) { flVar.fvB.type = 1; } else { flVar.fvB.type = 0; } flVar.fvB.fvD = ((Commodity) this.pVi.sUf.get(0)).fvD; com.tencent.mm.sdk.b.a.xmy.m(flVar); } } private void z(Class<?> cls) { if (cCT() == null) { a(cls, getIntent()); } else { cCT().c(this, cls, this.vf); } } protected boolean boI() { return true; } public boolean d(int i, int i2, String str, k kVar) { if (!(kVar instanceof n)) { return false; } x.i("MicroMsg.RemittanceResultUI", "on f2f succpage scene end, errType: %s, errCode: %s", Integer.valueOf(i), Integer.valueOf(i2)); n nVar = (n) kVar; if (i == 0 && i2 == 0) { lg lgVar = nVar.pQn; x.i("MicroMsg.RemittanceResultUI", "on f2f succpage scene end, retcode: %s, retmsg: %s, exposesureInfo: %s", Integer.valueOf(lgVar.lot), lgVar.lou, lgVar.sUS); if (lgVar.lot == 0) { try { this.vf.putByteArray("key_succpage_resp", lgVar.toByteArray()); } catch (Throwable e) { x.printErrStackTrace("MicroMsg.RemittanceResultUI", e, "pass succ page resp error: %s", e.getMessage()); } z(RemittanceResultNewUI.class); finish(); return true; } Toast.makeText(this, lgVar.lou, 1).show(); } z(RemittanceResultNewUI.class); finish(); return true; } public void onDestroy() { super.onDestroy(); jm(2773); } protected int getLayoutId() { return -1; } }
[ "denghailong@vargo.com.cn" ]
denghailong@vargo.com.cn
0810437ce9b68667c6bd0122a4dd030f1d4af136
88d3adf0d054afabe2bc16dc27d9e73adf2e7c61
/jcs/src/main/java/org/apache/jcs/admin/JCSAdminBean.java
864bd21af8a24834ba760b99dd1ced08bd0264e2
[ "Apache-2.0" ]
permissive
nntoan/vietspider
5afc8d53653a1bb3fc2e20fb12a918ecf31fdcdc
79d563afea3abd93f7fdff5bcecb5bac2162d622
refs/heads/master
2021-01-10T06:23:20.588974
2020-05-06T09:44:32
2020-05-06T09:44:32
54,641,132
0
2
null
2020-05-06T07:52:29
2016-03-24T12:45:02
Java
UTF-8
Java
false
false
6,908
java
package org.apache.jcs.admin; /* * 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. */ import java.io.IOException; import java.io.ObjectOutputStream; import java.io.Serializable; import java.text.DateFormat; import java.util.Arrays; import java.util.Date; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.jcs.engine.behavior.ICacheElement; import org.apache.jcs.engine.behavior.IElementAttributes; import org.apache.jcs.engine.control.CompositeCache; import org.apache.jcs.engine.control.CompositeCacheManager; import org.apache.jcs.engine.memory.behavior.IMemoryCache; /** * A servlet which provides HTTP access to JCS. Allows a summary of regions to be viewed, and * removeAll to be run on individual regions or all regions. Also provides the ability to remove * items (any number of key arguments can be provided with action 'remove'). Should be initialized * with a properties file that provides at least a classpath resource loader. */ public class JCSAdminBean { /** The logger. */ private static final Log log = LogFactory.getLog( JCSAdminBean.class ); /** The cache maanger. */ private CompositeCacheManager cacheHub = CompositeCacheManager.getInstance(); /** * Builds up info about each element in a region. * <p> * @param cacheName * @return List of CacheElementInfo objects * @throws Exception */ public LinkedList buildElementInfo( String cacheName ) throws Exception { CompositeCache cache = cacheHub.getCache( cacheName ); Object[] keys = cache.getMemoryCache().getKeyArray(); // Attempt to sort keys according to their natural ordering. If that // fails, get the key array again and continue unsorted. try { Arrays.sort( keys ); } catch ( Exception e ) { keys = cache.getMemoryCache().getKeyArray(); } LinkedList records = new LinkedList(); ICacheElement element; IElementAttributes attributes; CacheElementInfo elementInfo; DateFormat format = DateFormat.getDateTimeInstance( DateFormat.SHORT, DateFormat.SHORT ); long now = System.currentTimeMillis(); for ( int i = 0; i < keys.length; i++ ) { element = cache.getMemoryCache().getQuiet( (Serializable) keys[i] ); attributes = element.getElementAttributes(); elementInfo = new CacheElementInfo(); elementInfo.key = String.valueOf( keys[i] ); elementInfo.eternal = attributes.getIsEternal(); elementInfo.maxLifeSeconds = attributes.getMaxLifeSeconds(); elementInfo.createTime = format.format( new Date( attributes.getCreateTime() ) ); elementInfo.expiresInSeconds = ( now - attributes.getCreateTime() - ( attributes.getMaxLifeSeconds() * 1000 ) ) / -1000; records.add( elementInfo ); } return records; } /** * Builds up data on every region. * <p> * @TODO we need a most light weight method that does not count bytes. The byte counting can * really swamp a server. * @return list of CacheRegionInfo objects * @throws Exception */ public LinkedList buildCacheInfo() throws Exception { String[] cacheNames = cacheHub.getCacheNames(); Arrays.sort( cacheNames ); LinkedList cacheInfo = new LinkedList(); CacheRegionInfo regionInfo; CompositeCache cache; for ( int i = 0; i < cacheNames.length; i++ ) { cache = cacheHub.getCache( cacheNames[i] ); regionInfo = new CacheRegionInfo(); regionInfo.cache = cache; regionInfo.byteCount = getByteCount( cache ); cacheInfo.add( regionInfo ); } return cacheInfo; } /** * Tries to estimate how much data is in a region. This is expensive. If there are any non * serializable objects in the region, the count will stop when it encouters the first one. * <p> * @param cache * @return int * @throws Exception */ public int getByteCount( CompositeCache cache ) throws Exception { IMemoryCache memCache = cache.getMemoryCache(); Iterator iter = memCache.getIterator(); CountingOnlyOutputStream counter = new CountingOnlyOutputStream(); ObjectOutputStream out = new ObjectOutputStream( counter ); // non serializable objects will cause problems here // stop at the first non serializable exception. try { while ( iter.hasNext() ) { ICacheElement ce = (ICacheElement) ( (Map.Entry) iter.next() ).getValue(); out.writeObject( ce.getVal() ); } } catch ( Exception e ) { log.info( "Problem getting byte count. Likley cause is a non serilizable object." + e.getMessage() ); } // 4 bytes lost for the serialization header return counter.getCount() - 4; } /** * Clears all regions in the cache. * <p> * @throws IOException */ public void clearAllRegions() throws IOException { String[] names = cacheHub.getCacheNames(); for ( int i = 0; i < names.length; i++ ) { cacheHub.getCache( names[i] ).removeAll(); } } /** * Clears a particular cache region. * <p> * @param cacheName * @throws IOException */ public void clearRegion( String cacheName ) throws IOException { cacheHub.getCache( cacheName ).removeAll(); } /** * Removes a particular item from a particular region. * <p> * @param cacheName * @param key * @throws IOException */ public void removeItem( String cacheName, String key ) throws IOException { cacheHub.getCache( cacheName ).remove( key ); } }
[ "nntoan@users.noreply.github.com" ]
nntoan@users.noreply.github.com
0f0015e4bd6a53ba18fde35ae8c804c2870a7019
10c908df688f63bb50d54e523f97530bc5d11d39
/demos/spring-boot-demo/demo-dynamic-datasource/src/main/java/com/xkcoding/dynamic/datasource/config/MyMapper.java
13700d36707354859374c7370068b58a20854e4c
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
xinlc/elasticsearch-learning
4a97287b3b0685dc1f0128c5fc3d6ec703497feb
9269b7c613b95ba0866f199f20b8fd5e4b635984
refs/heads/master
2023-01-24T04:11:13.593418
2021-03-13T09:54:56
2021-03-13T09:54:56
238,639,635
4
1
MIT
2023-01-06T19:11:04
2020-02-06T08:19:33
HTML
UTF-8
Java
false
false
398
java
package com.xkcoding.dynamic.datasource.config; import tk.mybatis.mapper.annotation.RegisterMapper; import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.MySqlMapper; /** * <p> * 通用 mapper 自定义 mapper 文件 * </p> * * @author yangkai.shen * @date Created in 2019-09-04 16:23 */ @RegisterMapper public interface MyMapper<T> extends Mapper<T>, MySqlMapper<T> { }
[ "xinlichao2016@gmail.com" ]
xinlichao2016@gmail.com
d08ebbc27dd7158914a2ad3747edac8e6606ce4f
caefb3add4fb574553b47f4c0b669a0de4273ef2
/kie-wb-common-screens/kie-wb-common-project-explorer/kie-wb-common-project-explorer-client/src/main/java/org/kie/workbench/common/screens/explorer/client/widgets/BranchSelectorViewImpl.java
2cdb50e5ee153cda10ef30050a15d374f8459e70
[]
no_license
marcobattaglia/kie-wb-common
ed2549f3c067564667571e27b6d3ceaf49ef3408
9aef6ee5e6eefa1a33277a0c14ec103191d94e0f
refs/heads/master
2020-12-11T07:46:46.718559
2014-09-29T00:38:34
2014-09-29T00:38:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,578
java
/* * Copyright 2014 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kie.workbench.common.screens.explorer.client.widgets; import com.github.gwtbootstrap.client.ui.DropdownButton; import com.github.gwtbootstrap.client.ui.NavLink; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; public class BranchSelectorViewImpl extends DropdownButton implements BranchSelectorView { private Presenter presenter; @Override public void setPresenter(Presenter presenter) { this.presenter = presenter; } @Override public void setCurrentBranch(String currentBranch) { setText(currentBranch); } @Override public void addBranch(final String branch) { NavLink widget = new NavLink(branch); widget.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { presenter.onBranchSelected(branch); } }); add(widget); } }
[ "toni@rikkola.net" ]
toni@rikkola.net
b7bb1343b41be71e07f5370ab4b55cafed3a14bd
f8d52411b492576de89fbf5198f2091146e49f4e
/Mina_service/src/sendMsg/getJson.java
a7dacb27f2b42a3edf9c6e118664e6f804f2de97
[]
no_license
supercoeus/Mina
19c349696a44c8198ae94877a76a3194ea858ef7
f6ae74521a4ab69cdd082b14679aad6d89227489
refs/heads/master
2023-03-18T05:16:36.170936
2016-12-24T18:26:28
2016-12-24T18:26:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
914
java
package sendMsg; import org.json.JSONException; import org.json.JSONObject; import code.GetCode; public class getJson { public static String getMsg(String action,String from,String to,String msg,String type){ JSONObject jsonObject=new JSONObject(); try { jsonObject.put("action", action); jsonObject.put("from",from); jsonObject.put("to",to); jsonObject.put("msg",msg); jsonObject.put("type",type); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } return jsonObject.toString(); } public static String getCode(int code,String action){ JSONObject jsonObject=new JSONObject(); try { jsonObject.put("code", code); jsonObject.put("action", action); jsonObject.put("msg", GetCode.getCode(code)); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } return jsonObject.toString(); } }
[ "1043315346@qq.com" ]
1043315346@qq.com
c03feaf6b5f7ef1b815adb82745ecababdd9a9b8
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/TCA-Team_TumCampusApp/app/src/test/java/de/tum/in/tumcampusapp/activities/RoomFinderActivityTest.java
0e0f9419aafff621eb0dee7873bb06f8a9e28d51
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
565
java
// isComment package de.tum.in.tumcampusapp.activities; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; import de.tum.in.tumcampusapp.TestApp; @RunWith(RobolectricTestRunner.class) @Config(application = TestApp.class) public class isClassOrIsInterface extends BaseActivityTest { @Override @Test public void isMethod() { // isComment } @Test public void isMethod() throws InterruptedException { // isComment /*isComment*/ } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
946b9ce51b6553a4ab1e7e8d5a2bbdc4ccbfc78e
df755f1ad9f30e2968faaf65d5f203ac9de8dcf1
/mftcc-platform-web-master/src/main/java/app/component/eval/feign/AppPropertyFeign.java
33f2216b5f20708e94104fdafd3fa3631db52455
[]
no_license
gaoqiang9399/eclipsetogit
afabf761f77fe542b3da1535b15d4005274b8db7
03e02ef683929ea408d883ea35cbccf07a4c43e6
refs/heads/master
2023-01-22T16:42:32.813383
2020-11-23T07:31:23
2020-11-23T07:31:23
315,209,391
0
0
null
null
null
null
UTF-8
Java
false
false
3,083
java
package app.component.eval.feign; import java.util.List; import java.util.Map; import app.component.eval.entity.EvalScenceConfig; import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import app.base.ServiceException; import app.component.eval.entity.AppProperty; import app.util.toolkit.Ipage; /** * Title: AppPropertyBo.java * Description: * @author:@dhcc.com.cn * @Tue Mar 29 01:44:29 GMT 2016 **/ @FeignClient("mftcc-platform-factor") public interface AppPropertyFeign { @RequestMapping(value = "/appProperty/insert") public AppProperty insert(@RequestBody AppProperty appProperty) throws ServiceException; @RequestMapping(value = "/appProperty/delete") public void delete(@RequestBody AppProperty appProperty) throws ServiceException; @RequestMapping(value = "/appProperty/update") public void update(@RequestBody AppProperty appProperty) throws ServiceException; @RequestMapping(value = "/appProperty/updateSts") public int updateSts(@RequestBody AppProperty appProperty) throws ServiceException; @RequestMapping(value = "/appProperty/getById") public AppProperty getById(@RequestBody AppProperty appProperty) throws ServiceException; @RequestMapping(value = "/appProperty/findByPage") public Ipage findByPage(@RequestBody Ipage ipage,@RequestParam("appProperty") AppProperty appProperty) throws ServiceException; @RequestMapping(value = "/appProperty/getAll") public List<AppProperty> getAll(@RequestBody AppProperty appProperty) throws ServiceException; @RequestMapping(value = "/appProperty/getAppProperty") public List<AppProperty> getAppProperty(@RequestBody Map<String,String> map) throws ServiceException; /** * * 方法描述: 获得财务和定性的评级指标 * @param map * @return * @throws ServiceException * Map<String,Object> * @author 沈浩兵 * @date 2017-6-23 上午8:43:37 */ @RequestMapping(value = "/appProperty/getAppPropertyByTableFlag") public Map<String,Object> getAppPropertyByTableFlag(@RequestBody Map<String,String> map) throws ServiceException; /** *@Description: 获取使用该指标项的评级模型 *@Author: lyb *@date: 2019/8/29 */ @RequestMapping(value = "/appProperty/getEvalScenceConfigListByAppPro") public List<EvalScenceConfig> getEvalScenceConfigListByAppPro(@RequestBody AppProperty appProperty) throws ServiceException; @RequestMapping(value = "/appProperty/getTermValidity") int getTermValidity(@RequestParam("cusNo")String cusNo, @RequestParam("rptDate")String rptDate, @RequestParam("submitMonth")String submitMonth, @RequestParam("accountId")String accountId)throws ServiceException; @RequestMapping(value = "/appProperty/getExamineAccount") String getExamineAccount(@RequestParam("cusNo")String cusNo, @RequestParam("rptDate")String rptDate, @RequestParam("submitMonth")String submitMonth, @RequestParam("accountId")String accountId)throws ServiceException; }
[ "gaoqiang1@chenbingzhu.zgcGuaranty.net" ]
gaoqiang1@chenbingzhu.zgcGuaranty.net
0963c4983e15b1456d5da915656783e1097faa37
46d032112ccd547f0cbb6db17b8b1545b829911f
/cqhttp-spring-boot-starter/src/main/java/org/devefx/spring/boot/cqhttp/event/request/FriendRequestEvent.java
c4398d48e6fbc2c87b317ae669aa76aae730bfa5
[ "Apache-2.0" ]
permissive
devefx/spring-boot-starters
cb8833a30ae15c985b6aaf87a323a56b52f9eeab
d2f0a3ac7cefec852e96955ac70ed2bec6ea7e51
refs/heads/master
2022-07-20T05:00:58.539035
2022-07-01T14:01:47
2022-07-01T14:01:47
163,935,217
0
0
null
null
null
null
UTF-8
Java
false
false
288
java
package org.devefx.spring.boot.cqhttp.event.request; import lombok.ToString; import org.devefx.spring.boot.cqhttp.event.request.reply.FriendRequestReply; /** * 加好友请求 */ @ToString(callSuper = true) public class FriendRequestEvent extends RequestEvent<FriendRequestReply> { }
[ "devefx@163.com" ]
devefx@163.com
7923829b5cbbfe08e0bef0e63bfb8c7c89be9604
d099b49dc23a0af079ae1c172afb1b7b40b9fc30
/src/main/java/org/apache/camel/salesforce/dto/QueryRecordsTaskStatus.java
dd32380ae19f290594bd690bc22ea2714c84a947
[]
no_license
jorgecanoc/salesforce-demo
a5bea92dd33f7327d0694ebe03eb00987e586b50
5dfa7c1cb1bbbb88cc24dcbdd302006a86ad1d57
refs/heads/master
2021-01-10T09:21:54.522025
2016-03-04T19:29:39
2016-03-04T19:29:39
53,092,243
0
0
null
null
null
null
UTF-8
Java
false
false
687
java
/* * Salesforce Query DTO generated by camel-salesforce-maven-plugin * Generated on: Thu Feb 11 22:46:57 CST 2016 */ package org.apache.camel.salesforce.dto; import com.thoughtworks.xstream.annotations.XStreamImplicit; import org.apache.camel.component.salesforce.api.dto.AbstractQueryRecordsBase; import java.util.List; /** * Salesforce QueryRecords DTO for type TaskStatus */ public class QueryRecordsTaskStatus extends AbstractQueryRecordsBase { @XStreamImplicit private List<TaskStatus> records; public List<TaskStatus> getRecords() { return records; } public void setRecords(List<TaskStatus> records) { this.records = records; } }
[ "jorge.canoc@gmail.com" ]
jorge.canoc@gmail.com
d5c925b2dca0276cb3b09fb42332475f5f95bbcd
573a66e4f4753cc0f145de8d60340b4dd6206607
/JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/817694/guavav16/guava-16.0/guava/src/com/google/common/io/Closeables.java
e1d6dc303828b603976f1098f43d86c73178016a
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
mkaouer/Code-Smells-Detection-in-JavaScript
3919ec0d445637a7f7c5f570c724082d42248e1b
7130351703e19347884f95ce6d6ab1fb4f5cfbff
refs/heads/master
2023-03-09T18:04:26.971934
2022-03-23T22:04:28
2022-03-23T22:04:28
73,915,037
8
3
null
2023-02-28T23:00:07
2016-11-16T11:47:44
null
UTF-8
Java
false
false
2,787
java
/* * Copyright (C) 2007 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.io; import com.google.common.annotations.Beta; import com.google.common.annotations.VisibleForTesting; import java.io.Closeable; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nullable; /** * Utility methods for working with {@link Closeable} objects. * * @author Michael Lancaster * @since 1.0 */ @Beta public final class Closeables { @VisibleForTesting static final Logger logger = Logger.getLogger(Closeables.class.getName()); private Closeables() {} /** * Closes a {@link Closeable}, with control over whether an {@code IOException} may be thrown. * This is primarily useful in a finally block, where a thrown exception needs to be logged but * not propagated (otherwise the original exception will be lost). * * <p>If {@code swallowIOException} is true then we never throw {@code IOException} but merely log * it. * * <p>Example: <pre> {@code * * public void useStreamNicely() throws IOException { * SomeStream stream = new SomeStream("foo"); * boolean threw = true; * try { * // ... code which does something with the stream ... * threw = false; * } finally { * // If an exception occurs, rethrow it only if threw==false: * Closeables.close(stream, threw); * } * }}</pre> * * @param closeable the {@code Closeable} object to be closed, or null, in which case this method * does nothing * @param swallowIOException if true, don't propagate IO exceptions thrown by the {@code close} * methods * @throws IOException if {@code swallowIOException} is false and {@code close} throws an * {@code IOException}. */ public static void close(@Nullable Closeable closeable, boolean swallowIOException) throws IOException { if (closeable == null) { return; } try { closeable.close(); } catch (IOException e) { if (swallowIOException) { logger.log(Level.WARNING, "IOException thrown while closing Closeable.", e); } else { throw e; } } } }
[ "mmkaouer@umich.edu" ]
mmkaouer@umich.edu
edc2cf0811f7395987a0efdafe88dcbfecc72b74
db2ca48fffaf6689c9db439abaf9d98729548e0b
/zrp-service-trading/zrp-service-trading-consumer/src/main/java/com/ziroom/zrp/service/trading/valenum/ContractIsModifyEnum.java
ccfb92c59479d9de676336b283969f10ca74c24e
[]
no_license
majinwen/sojourn
46a950dbd64442e4ef333c512eb956be9faef50d
ab98247790b1951017fc7dd340e1941d5b76dc39
refs/heads/master
2020-03-22T07:07:05.299160
2018-03-18T13:45:23
2018-03-18T13:45:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
783
java
package com.ziroom.zrp.service.trading.valenum; /** * <p>合同是否可修改枚举</p> * <p> * <PRE> * <BR> 修改记录 * <BR>----------------------------------------------- * <BR> 修改日期 修改人 修改内容 * </PRE> * * @author lusp * @version 1.0 * @Date Created in 2017年11月1日 18:02 * @since 1.0 */ public enum ContractIsModifyEnum { KXG(1, "可修改"), BKXG(0, "不可修改"); private int code; private String name; ContractIsModifyEnum(int code, String name) { this.code = code; this.name = name; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "068411Lsp" ]
068411Lsp
ffc80ee9ef6834735fd5fb6b197abc4b4dc9e53e
8380b5eb12e24692e97480bfa8939a199d067bce
/FlexiSpy/Android/1.00.1/_build/source/process-main/build/src/com/vvt/phoenix/prot/command/GetActivationCode.java
66096f74ea68175f395e05707ab070a934263cd3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
RamadhanAmizudin/malware
788ee745b5bb23b980005c2af08f6cb8763981c2
62d0035db6bc9aa279b7c60250d439825ae65e41
refs/heads/master
2023-02-05T13:37:18.909646
2023-01-26T08:43:18
2023-01-26T08:43:18
53,407,812
873
291
null
2023-01-26T08:43:19
2016-03-08T11:44:21
C++
UTF-8
Java
false
false
195
java
package com.vvt.phoenix.prot.command; public class GetActivationCode implements CommandData{ @Override public int getCmd() { return CommandCode.REQUEST_ACTIVATION_CODE; } }
[ "rui@deniable.org" ]
rui@deniable.org
c0fdd05b7b981e60c320f6b3273bda459247a737
59e42688b277575a055cc5eff968a64d76a8ba28
/src/bus/uigen/introspect/ABeanInfoProxy.java
dcc8effe091b9bd1162b56a73f103f738c27b288
[]
no_license
pdewan/ObjectEditor
2dbd5bc6f4d4373fdf49945b51ca7b9e2d144261
71b4d1ebf931b125244f672e8e34660c5abb28f7
refs/heads/master
2022-05-01T17:44:42.368544
2022-03-23T22:43:26
2022-03-23T22:43:26
16,308,895
1
0
null
null
null
null
UTF-8
Java
false
false
5,707
java
package bus.uigen.introspect; import java.beans.BeanInfo; import java.beans.IndexedPropertyDescriptor; import java.beans.MethodDescriptor; import java.beans.PropertyDescriptor; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Set; import java.util.Vector; import util.trace.Tracer; import bus.uigen.reflect.ClassProxy; import bus.uigen.reflect.MethodProxy; public class ABeanInfoProxy implements BeanInfoProxy { ClassProxy classProxy; BeanInfo mainBeanInfo; Set<BeanInfo> allBeanInfos; MethodDescriptorProxy[] methodDescriptors; PropertyDescriptorProxy[] propertyDescriptors; BeanDescriptorProxy beanDescriptor; public ABeanInfoProxy (ClassProxy cls) { classProxy = cls; //BeanInfo binfo = AnIntrospectorProxy.getBeanInfo(cls); } public ABeanInfoProxy (BeanInfo theMainBeanInfo, Set<BeanInfo> theAllBeanInfos, ClassProxy theClassProxy) { mainBeanInfo = theMainBeanInfo; classProxy = theClassProxy; allBeanInfos = theAllBeanInfos; } public BeanInfo getJavaBeanInfo() { return mainBeanInfo; } @Override public BeanDescriptorProxy getBeanDescriptor() { if (beanDescriptor == null) { if (mainBeanInfo != null) { beanDescriptor = new ABeanDescriptorProxy(mainBeanInfo.getBeanDescriptor()); } else { Tracer.error("Bean info should never be null."); beanDescriptor = new ABeanDescriptorProxy(classProxy); } } return beanDescriptor; } @Override public MethodDescriptorProxy[] getMethodDescriptors() { if (methodDescriptors != null) return methodDescriptors; Set<MethodDescriptorProxy> methodDescriptorsSet = new HashSet(); for (BeanInfo beanInfo:allBeanInfos) { MethodDescriptor[] aMethodDescriptors = beanInfo.getMethodDescriptors(); for (MethodDescriptor aMethodDescriptor:aMethodDescriptors) { methodDescriptorsSet.add(new AMethodDescriptorProxy(aMethodDescriptor)); } } methodDescriptors = new MethodDescriptorProxy[0]; methodDescriptors = methodDescriptorsSet.toArray(methodDescriptors); return methodDescriptors; } @Override public PropertyDescriptorProxy[] getPropertyDescriptors() { if (propertyDescriptors != null) return propertyDescriptors; Collection<PropertyDescriptorProxy> propertyDescriptorsSet = new ArrayList(); for (BeanInfo beanInfo:allBeanInfos) { PropertyDescriptor[] aPropertyDescriptors = beanInfo.getPropertyDescriptors(); for (PropertyDescriptor aPropertyDescriptor:aPropertyDescriptors) { if (aPropertyDescriptor instanceof IndexedPropertyDescriptor) continue; PropertyDescriptorProxy newVal = new APropertyDescriptorProxy(aPropertyDescriptor); if (!propertyDescriptorsSet.contains(newVal)) propertyDescriptorsSet.add(newVal); } } propertyDescriptors = new PropertyDescriptorProxy[0]; propertyDescriptors = propertyDescriptorsSet.toArray(propertyDescriptors); return propertyDescriptors; } // not expected to used public static MethodDescriptorProxy[] methodDescriptorsFromMethods(ClassProxy classProxy) { MethodProxy[] methods = classProxy.getMethods(); MethodDescriptorProxy[] retVal = new MethodDescriptorProxy[methods.length]; for (int i = 0; i < methods.length; i++) { int modifiers = methods[i].getModifiers(); if (Modifier.isPublic(modifiers)) retVal[i] = new AMethodDescriptorProxy(methods[i]); } return retVal; } // not expected to used public static PropertyDescriptorProxy[] propertyDescriptorsFromMethods(ClassProxy classProxy) { PropertyDescriptorProxy[] retVal; Vector properties = IntrospectUtility.getAllPropertiesNamesVector(classProxy); retVal = new PropertyDescriptorProxy[properties.size()]; for (int i = 0; i < retVal.length; i++) { String propertyName = (String) properties.elementAt(i); MethodProxy readMethod = IntrospectUtility.getGetterMethod(classProxy, propertyName); MethodProxy writeMethod = IntrospectUtility.getSetterMethod(classProxy, propertyName); retVal[i] = new APropertyDescriptorProxy(propertyName, readMethod, writeMethod); } return retVal; } // @Override // public PropertyDescriptorProxy[] getPropertyDescriptors() { // // TODO Auto-generated method stub // if (propertyDescriptors == null) { // if (mainBeanInfo != null) { // PropertyDescriptor[] pds = mainBeanInfo.getPropertyDescriptors(); // propertyDescriptors = new PropertyDescriptorProxy[pds.length]; // for (int i = 0; i < pds.length; i++) { // propertyDescriptors[i] = new APropertyDescriptorProxy(pds[i]); // } // } else { // Vector properties = IntrospectUtility.getAllPropertiesNamesVector(classProxy); // propertyDescriptors = new PropertyDescriptorProxy[properties.size()]; // // for (int i = 0; i < propertyDescriptors.length; i++) { // String propertyName = (String) properties.elementAt(i); // MethodProxy readMethod = IntrospectUtility.getGetterMethod(classProxy, propertyName); // MethodProxy writeMethod = IntrospectUtility.getSetterMethod(classProxy, propertyName); // propertyDescriptors[i] = new APropertyDescriptorProxy(propertyName, readMethod, writeMethod); // } // //MethodProxy[] methods = classProxy.getMethods(); // //Message.fatalError("Need to extract properties"); // /* // methodDescriptors = new MethodDescriptorProxy[methods.length]; // for (int i = 0; i < methods.length; i++) { // methodDescriptors[i] = new AMethodDescriptorProxy(methods[i]); // } // */ // } // } // return propertyDescriptors; // } }
[ "dewan@DEWAN.cs.unc.edu" ]
dewan@DEWAN.cs.unc.edu
8929dbbf73549df60c7358d561dd8a29529df41f
badb58980b6b36f98c8172a20b61da94a6bdd3f7
/site/src/main/java/com/mootly/wcm/components/PollComponent.java
d907c9c69ffcf49c74516ff0a86255dca16c0d09
[]
no_license
runitmalik01/git
d246f415178ee717721b3265ff1e4b3654a9bd70
6b67cb7605f00a5bf516b216dafabef21a7a2302
refs/heads/master
2020-04-01T16:34:40.174723
2014-03-31T04:34:09
2014-03-31T04:34:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,641
java
/** * Copyright (C) 2010 Hippo B.V. * * 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.mootly.wcm.components; import javax.jcr.RepositoryException; import org.hippoecm.hst.core.component.HstComponentException; import org.hippoecm.hst.core.component.HstRequest; import org.hippoecm.hst.core.component.HstResponse; import org.onehippo.forge.poll.component.PollProvider; /** * User: vivek * Date: Jul 12, 2010 * Time: 11:49:45 AM */ public class PollComponent extends BaseComponent { private final PollProvider pollProvider = new PollProvider(this); @Override public void doBeforeRender(HstRequest request, HstResponse response) { super.doBeforeRender(request, response); pollProvider.doBeforeRender(request, response); } @Override public void doAction(HstRequest request, HstResponse response) { try { pollProvider.doAction(request, response, getPersistableSession(request)); } catch (RepositoryException e) { throw new HstComponentException(e); } } }
[ "amit@mootly.com" ]
amit@mootly.com
dd52b2052adba410aed85647545d068f228e767f
cf5ff8e0bbd93e0d3110169bc7f89e2a2b2be60d
/yzim-easeui-SDK_3.1.3/src/com/yz/im/ui/fragment/FindUserFragment.java
3482d39af36b3650e054c5a3a6732d89809a8921
[ "Apache-2.0" ]
permissive
yaolu0311/ThinkcooRefactor-2016526
993c09b50719322d9d89621f2d991e4687ab81f8
bfe011a0650ca0c80932dc45c2e60868966afda6
refs/heads/master
2020-09-26T05:30:24.155465
2016-09-05T07:12:13
2016-09-05T07:12:13
67,396,724
0
0
null
null
null
null
UTF-8
Java
false
false
2,002
java
package com.yz.im.ui.fragment; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.RelativeLayout; import com.hyphenate.easeui.R; import com.yz.im.IMHelper; import com.yz.im.ui.base.IMNavigator; public class FindUserFragment extends Fragment implements OnClickListener { private View rootView; private RelativeLayout userName; private RelativeLayout phone_number; private LinearLayout recommendUser; private IMNavigator mNavigator; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { rootView = inflater.inflate(R.layout.fragment_find_user, container, false); initView(); mNavigator = IMHelper.getInstance().getNavigator(); return rootView; } private void initView() { userName = (RelativeLayout) rootView.findViewById(R.id.layout_find_by_name); phone_number = (RelativeLayout) rootView.findViewById(R.id.layout_phone_number); recommendUser = (LinearLayout) rootView.findViewById(R.id.layout_recommend_user); recommendUser.setOnClickListener(this); phone_number.setOnClickListener(this); userName.setOnClickListener(this); } /** * Description: 自己填写 * @see OnClickListener#onClick(View) */ @Override public void onClick(View v) { int id = v.getId(); if (id == R.id.layout_find_by_name) { mNavigator.navigateToExactFindUserPage(getContext()); } else if (id == R.id.layout_phone_number) { mNavigator.navigateToTelephoneContactActivity(getContext()); } else if (id == R.id.layout_recommend_user) { mNavigator.navigateToRecommendUserListActivity(getContext()); } } }
[ "yaolu0311@163.com" ]
yaolu0311@163.com
0e76460a09c309356fb39470566b5061b414e4b5
3c4763922cda3f3a990b74cdba6f8a30b07467de
/src/main/java/students/vitaly_porsev/lesson_6/level_1/tasks/WhileDefinition4.java
444a8c193e7e0772d58d697da2658e7c684c7518
[]
no_license
VitalyPorsev/JavaGuru1
07db5a0cc122b097a20e56c9da431cd49d3c01ea
f3c25b6357309d4e9e8ac0047e51bb8031d14da8
refs/heads/main
2023-05-10T15:35:55.419713
2021-05-15T18:48:12
2021-05-15T18:48:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
243
java
package students.vitaly_porsev.lesson_6.level_1.tasks; class WhileDefinition4 { public static void main(String[] args) { int i = 1; while (i <= 100) { System.out.println(i); i++; } } }
[ "pointofview88@gmail.com" ]
pointofview88@gmail.com
7e051671868afd28431094707d3e7583f8c81949
ebd1c86225b7f8d463d992549085966eacb109f1
/gwfsecurityapp/src/main/java/com/gwf/security/app/SpringSocialConfigurerPostProcessor.java
7dc0c9abceb0c167d8bbcfc5bf2527cdbb5a932d
[]
no_license
walabank/gwfSecurity
66686a19a598960de706e0be6838ae3889b3cfd2
63d6dd8d82ed44c6cfc8356486de323dc25ce938
refs/heads/master
2020-03-18T00:56:57.498358
2018-05-15T11:12:18
2018-05-15T11:12:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,347
java
package com.gwf.security.app; import com.gwf.security.core.social.GwfSpringSocialConfigurer; import org.apache.commons.lang.StringUtils; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; /** * Created by gaowenfeng on 2017/12/10. */ @Component public class SpringSocialConfigurerPostProcessor implements BeanPostProcessor{ /** * 所有的bean初始化之前都要经过的方法 * @param bean * @param beanName * @return * @throws BeansException */ @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { return bean; } /** * 所有的bean初始化之后要经过的方法 * @param bean * @param beanName * @return * @throws BeansException */ @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if(StringUtils.equals(beanName,"gwfSocialConfigurer")){ GwfSpringSocialConfigurer configurer = (GwfSpringSocialConfigurer) bean; configurer.signupUrl("/social/signUp"); return configurer; } return bean; } }
[ "18722042639@163.com" ]
18722042639@163.com
949e8e4f07bb56a9b7f1f31ee24d4cc217ce7c3e
755da35585bd16e66430289a19eb994d01ed16ef
/src/main/java/ch/ethz/idsc/retina/util/math/ParametricResample.java
5b8ed44bcef1e5a14cf1e1949770b3598b0b01c7
[]
no_license
datahaki/retina
001f0ebe89d23a461ee95c946d93c3ba35bbdf25
b01b72aae54cca859b1f845748f70aa2c765f947
refs/heads/master
2020-09-01T08:32:54.658322
2019-10-27T12:25:36
2019-10-27T12:25:36
103,564,223
1
0
null
2018-10-20T02:02:24
2017-09-14T17:54:32
Matlab
UTF-8
Java
false
false
2,608
java
// code by jph package ch.ethz.idsc.retina.util.math; import java.io.Serializable; import java.util.LinkedList; import java.util.List; import ch.ethz.idsc.tensor.RealScalar; import ch.ethz.idsc.tensor.Scalar; import ch.ethz.idsc.tensor.Scalars; import ch.ethz.idsc.tensor.Tensor; import ch.ethz.idsc.tensor.Tensors; import ch.ethz.idsc.tensor.alg.Differences; import ch.ethz.idsc.tensor.red.Norm; /** method of equidistant resampling of a sequence of irregular spaced points */ public class ParametricResample implements Serializable { /** determines whether points are connected */ private final Scalar threshold; /** distance between samples after re-sampling */ private final Scalar ds; public int minLength = 2; /** the threshold * * @param threshold a common value is RealScalar.of(33) * @param ds distance between samples after re-sampling */ public ParametricResample(Scalar threshold, Scalar ds) { this.threshold = threshold; this.ds = ds; } /** @param points sequence of lidar points in ccw- or cw-direction * @return points grouped by connectivity and resampled equidistantly */ public ResampleResult apply(Tensor points) { Tensor dista = Tensor.of(points.stream().map(Norm._2::ofVector)); // distance of points from origin Tensor diffs = Differences.of(points); // displacement vectors Tensor delta = Tensor.of(diffs.stream().map(Norm._2::ofVector)); // length of displacement vectors List<Tensor> list = new LinkedList<>(); // return structure Tensor ret = Tensors.empty(); // initialize connected segment Scalar sum = RealScalar.ZERO; // parameter for (int index = 0; index < diffs.length(); ++index) { // iterate along displacement vectors boolean connected = Scalars.lessThan( // criterion if two adjacent points belong to connected region delta.Get(index).multiply(threshold), // dista.Get(index + 0).add(dista.Get(index + 1))); if (connected) { final Scalar length = delta.Get(index); while (Scalars.lessThan(sum, length)) { // 0 <= sum < length implies 0 <= sum / length < 1 ret.append(RealScalar.of(index).add(sum.divide(length))); sum = sum.add(ds); } sum = sum.subtract(length); } else { if (addPredicate(ret)) list.add(ret); ret = Tensors.empty(); sum = RealScalar.ZERO; } } if (addPredicate(ret)) list.add(ret); return new ResampleResult(points, list); } private boolean addPredicate(Tensor tensor) { return minLength <= tensor.length(); } }
[ "jan.hakenberg@gmail.com" ]
jan.hakenberg@gmail.com
5f8f45cfff0d8ace5e3a5a32ae0cd169ee6f4e4f
f77e8ce3033e35f962b3a0068476bc0d559f2a95
/02.DefiningClasses-Exercise/src/p02_creating_constructors/Main.java
95dd3b9734ca6a9ef7cb075a0e10b753024b45de
[]
no_license
CarlitoBG/JavaOOP-Basics
020b903f77d3370e37aa0d0ffb89f3152fc6cd92
a3939fb7f4ba461b8e4df7987388d227c339ccd3
refs/heads/master
2020-03-25T12:12:00.349138
2018-08-06T18:22:08
2018-08-06T18:22:08
143,763,987
0
0
null
null
null
null
UTF-8
Java
false
false
1,193
java
package p02_creating_constructors; import java.io.BufferedReader; import java.io.InputStreamReader; import java.lang.reflect.Constructor; public class Main { public static void main(String[] args) throws Exception { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(isr); Class<Person> personClass = Person.class; Constructor emptyCtor = personClass.getDeclaredConstructor(); Constructor ageCtor = personClass.getDeclaredConstructor(int.class); Constructor nameAgeCtor = personClass.getDeclaredConstructor(String.class, int.class); String name = reader.readLine(); int age = Integer.parseInt(reader.readLine()); Person basePerson = (Person) emptyCtor.newInstance(); Person personWithAge = (Person)ageCtor.newInstance(age); Person personFull = (Person) nameAgeCtor.newInstance(name, age); System.out.printf("%s %s%n", basePerson.getName(), basePerson.getAge()); System.out.printf("%s %s%n", personWithAge.getName(), personWithAge.getAge()); System.out.printf("%s %s%n", personFull.getName(), personFull.getAge()); } }
[ "dimitrov.dians@gmail.com" ]
dimitrov.dians@gmail.com
1c199b43d5016bcf4ee9cb9c4cd9bf8edfa33a38
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/app/hadoop-2.7.3-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRBuilderUtils.java
d21a4a29e9910a36af9b08803d998cb98907a69a
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
Java
false
false
735
java
package org.apache.hadoop.mapreduce.v2.util; import java.util.List; import org.apache.hadoop.mapreduce.v2.api.records.AMInfo; import org.apache.hadoop.mapreduce.v2.api.records.JobId; import org.apache.hadoop.mapreduce.v2.api.records.JobReport; import org.apache.hadoop.mapreduce.v2.api.records.JobState; import org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId; import org.apache.hadoop.mapreduce.v2.api.records.TaskId; import org.apache.hadoop.mapreduce.v2.api.records.TaskType; import org.apache.hadoop.yarn.api.records.ApplicationAttemptId; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.util.Records; public class MRBuilderUtils
[ "weilaidb@localhost.localdomain" ]
weilaidb@localhost.localdomain
770b12093220a1a1f35de0500709c81d67ecbaba
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_642834c49a50e8a23b229b0ef65437a3a4126a5e/Settings/25_642834c49a50e8a23b229b0ef65437a3a4126a5e_Settings_s.java
b2ba6c92087ea40e5977c335e925470cef8ec64c
[]
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,737
java
package neuralNets.matlab; import java.util.HashMap; /** * Represents settings for the program. * Used to modify how the program run from MATLAB. * @author Maarten Slenter */ public class Settings { /** * The settings */ private final HashMap<String, Object> settings = new HashMap<String, Object>(); /** * The default settings */ private final HashMap<String, Object> defaults = new HashMap<String, Object>(); /** * The category for upcoming puts */ private String category = ""; { //General defaults.put("nonConvergingGenCount", 50); defaults.put("runBatch", true); //Single runs defaults.put("renderUpdateTimeBase", 50); defaults.put("slowdownFactor", 10); defaults.put("testCaseUpdateTimeBase", 1); defaults.put("updateCountMax", 50); defaults.put("updateCountMin", 1); defaults.put("windowHeight", 800); defaults.put("windowWidth", 1500); //Batch runs defaults.put("runToTarget", false); defaults.put("solutionTarget", 25); defaults.put("threadCount", 4); //Test cases //CircleMoveToXYDirection defaults.put("circleMoveToXYDirection.crossOverRate", 0.7); defaults.put("circleMoveToXYDirection.goalX", 200); defaults.put("circleMoveToXYDirection.goalY", 200); defaults.put("circleMoveToXYDirection.mutationRate", 0.01); defaults.put("circleMoveToXYDirection.popSize", 100); defaults.put("circleMoveToXYDirection.visualizeAmount", 0); } /** * Sets a property * @param key The property to set * @param value The new value of the property */ public void set(String key, Object value) { if(!category.isEmpty()) { key = category + "." + key; } settings.put(key, value); } /** * Sets the category for all following property changes * @param category The new category */ public void setCategory(String category) { this.category = category; } /** * Clear the category */ public void clearCategory() { category = ""; } /** * Returns the value under key as an integer, or the default if no value is set. * @param key The key to fetch the value for * @return The value under the specified key, as an integer. */ public int getInt(String key) { Object value = getValue(key); if(value instanceof Number) { Number number = (Number) value; return number.intValue(); } throw new RuntimeException("The value under key '" + key + "' is not a number"); } /** * Returns the value under key as a double, or the default if no value is set. * @param key The key to fetch the value for * @return The value under the specified key, as a double. */ public double getDouble(String key) { Object value = getValue(key); if(value instanceof Number) { Number number = (Number) value; return number.doubleValue(); } throw new RuntimeException("The value under key '" + key + "' is not a number"); } /** * Returns the value under key as a boolean, or the default if no value is set. * @param key The key to fetch the value for * @return The value under the specified key, as a boolean. */ public boolean getBool(String key) { Object value = getValue(key); if(value instanceof Boolean) { return (Boolean) value; } throw new RuntimeException("The value under key '" + key + "' is not a boolean"); } /** * Returns the value under the key or the default is no value is set. * Throws an exception when the key doesn't exist. * @param key The key to fetch the value for * @return The value under the specified key */ private Object getValue(String key) { Object value; if(settings.containsKey(key)) { value = settings.get(key); } else if(settings.containsKey(key)) { value = defaults.get(key); } else { throw new IllegalArgumentException("Key '" + key + "' not found in settings"); } return value; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
118e00745ceed1f3bdccb031fc984e7c7dc4669d
092c76fcc6c411ee77deef508e725c1b8277a2fe
/hybris/bin/ext-addon/cisclienttest/src/com/hybris/cis/client/constants/CisclienttestConstants.java
519c2a43c59c2651d3d59e207a0bf86e1b978594
[ "MIT" ]
permissive
BaggaShivanshu2/hybris-bookstore-tutorial
4de5d667bae82851fe4743025d9cf0a4f03c5e65
699ab7fd8514ac56792cb911ee9c1578d58fc0e3
refs/heads/master
2022-11-28T12:15:32.049256
2020-08-05T11:29:14
2020-08-05T11:29:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
834
java
/* * [y] hybris Platform * * Copyright (c) 2000-2014 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package com.hybris.cis.client.constants; /** * Global class for all Cisclienttest constants. You can add global constants for your extension into this class. */ public final class CisclienttestConstants extends GeneratedCisclienttestConstants { public static final String EXTENSIONNAME = "cisclienttest"; private CisclienttestConstants() { //empty to avoid instantiating this constant class } // implement here constants used by this extension }
[ "xelilim@hotmail.com" ]
xelilim@hotmail.com
e30f50d961064562276526c96d9542fb001f21c1
a58c59e2b0317ddb85bf32996ecf765a1888658f
/filter/src/com/hfm/filter/HelloFilter.java
babc56ce397b5f0d38e5cc88234e9ea2f1aaf80d
[]
no_license
hfming/java_web
5c9403a6fe5c18d138b408e6ca5af8ce8e220f87
2246d9f2aa24112128b62da5881e1b3e8de1904e
refs/heads/master
2023-08-30T18:33:27.705276
2021-10-09T12:32:56
2021-10-09T12:32:56
286,909,469
1
0
null
null
null
null
UTF-8
Java
false
false
1,159
java
package com.hfm.filter; import javax.servlet.*; import java.io.IOException; /** * @author hfming2016@163.com * @version 1.01 2020-08-29 15:33 * @Description 实现 Filter 接口方式开发 Filter 过滤器 * @date 2020/8/29 */ public class HelloFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { System.out.println("过滤器 - 初始化方法"); } @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { System.out.println("过滤器 - 过滤方法"); // 只能获取ServletContext 参数,不能获取Servlet参数,因为 Filter 早于 Servlet之前创建,因此ServletConfig 对象不能够获取到 ServletContext servletContext = servletRequest.getServletContext(); System.out.println(servletContext.getInitParameter("AAA")); // 放行 filterChain.doFilter(servletRequest, servletResponse); } @Override public void destroy() { System.out.println("过滤器 - 销毁方法"); } }
[ "hfming2016@163.com" ]
hfming2016@163.com
8d270b1d6aebb779ef7b5cfc82b5bd68c504c77a
058d78c27d6f0213b919fd07421afbe070823260
/src/main/java/coding4fun/Problem47.java
fc855163c9a0323e85b78aa83da00b82e0bb4781
[ "MIT" ]
permissive
fredyw/coding4fun
2aff0cd80aebde692651cbf3a46c2485f6d10188
d97b41508fd1ef72bd2d634be3a187bc64d3aac4
refs/heads/master
2021-01-17T00:24:33.282258
2019-07-08T05:08:41
2019-07-08T05:08:41
17,426,611
1
1
null
null
null
null
UTF-8
Java
false
false
2,245
java
package coding4fun; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Finds the longest increasing subsequence. * * <pre> * Input : [2, 4, 4, 5, 6, 1, 2, 7, 6, 10] * Output: [2, 4, 5, 6, 7, 10] * * Input : [4, 4, 4, 5, 6, 1, 2, 3, 4, 7, 6, 10] * Output: [1, 2, 3, 4, 7, 10] * * Input : [1, 2, 13, 16, 6, 7, 10] * Output: [1, 2, 6, 7, 10] * </pre> */ public class Problem47 { private static List<Integer> longestIncreasingSubsequence(List<Integer> nums) { List<Integer> max = new ArrayList<>(); for (int i = 0; i < nums.size(); i++) { List<Integer> list = longestIncreasingSubsequence(nums, i, new HashMap<>()); list.add(nums.get(i)); Collections.reverse(list); if (max.size() < list.size()) { max = list; } } return max; } private static List<Integer> longestIncreasingSubsequence(List<Integer> nums, int idx, Map<Integer, List<Integer>> memo) { if (memo.containsKey(idx)) { return memo.get(idx); } List<Integer> max = new ArrayList<>(); int num = nums.get(idx); for (int i = idx + 1; i < nums.size(); i++) { if (num < nums.get(i)) { List<Integer> list = longestIncreasingSubsequence(nums, i, memo); List<Integer> newList = new ArrayList<>(list); newList.add(nums.get(i)); if (max.size() < newList.size()) { max = newList; } } } memo.put(idx, max); return max; } public static void main(String[] args) { System.out.println(longestIncreasingSubsequence( Arrays.asList(2, 4, 4, 5, 6, 1, 2, 7, 6, 10))); // [2, 4, 5, 6, 7, 10] System.out.println(longestIncreasingSubsequence( Arrays.asList(4, 4, 4, 5, 6, 1, 2, 3, 4, 7, 6, 10))); // [1, 2, 3, 4, 7, 10] System.out.println(longestIncreasingSubsequence( Arrays.asList(1, 2, 13, 16, 6, 7, 10))); // [1, 2, 6, 7, 10] } }
[ "fredy.wijaya@gmail.com" ]
fredy.wijaya@gmail.com
37f21df924189bdb872a4ed1b3f4ce594a122f1f
af302744fa016cedfe50c0a38771d2a78a1fe4b5
/src/test/java/com/example/bay01/employee/EmployeeControllerSpringBootTest.java
26f41767d84bdb93d860443911940db8d4d46c13
[]
no_license
up1/demo-springboot-testing
d93629a9787612177c6a7902e7e846f7174fc1d9
741417cec156b68aaf420230917e20415d212b5c
refs/heads/master
2020-07-04T05:02:13.564479
2020-01-27T09:38:26
2020-01-27T09:38:26
202,165,113
1
0
null
null
null
null
UTF-8
Java
false
false
1,244
java
package com.example.bay01.employee; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.test.context.junit4.SpringRunner; import static org.junit.Assert.*; import static org.mockito.BDDMockito.given; import static org.springframework.boot.test.context.SpringBootTest.*; @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) public class EmployeeControllerSpringBootTest { @Autowired private TestRestTemplate restTemplate; @MockBean private EmployeeService employeeService; @Test public void success_getEmployee_id_1() { // Arrange given(this.employeeService.getBy(1)) .willReturn(new EmployeeResponse(1, "Somkiat Pui")); // Act EmployeeResponse response = restTemplate.getForObject("/employee/1", EmployeeResponse.class); // Assert assertEquals(1, response.getId()); assertEquals("Somkiat Pui", response.getName()); } }
[ "somkiat.p@gmail.com" ]
somkiat.p@gmail.com
c3868071d9081babf8198455fcf6592cad29c3ca
8d9293642d3c12f81cc5f930e0147a9d65bd6efb
/src/main/java/net/minecraft/world/level/block/TntBlock.java
67f591b61bda5d3083dcdbab23ac1bef22007375
[]
no_license
NicholasBlackburn1/Blackburn-1.17
7c086591ac77cf433af248435026cf9275223daa
fd960b995b33df75ce61865ba119274d9b0e4704
refs/heads/main
2022-07-28T03:27:14.736924
2021-09-23T15:55:53
2021-09-23T15:55:53
399,960,376
5
0
null
null
null
null
UTF-8
Java
false
false
5,400
java
package net.minecraft.world.level.block; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.stats.Stats; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.item.PrimedTnt; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.projectile.Projectile; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Explosion; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.phys.BlockHitResult; public class TntBlock extends Block { public static final BooleanProperty UNSTABLE = BlockStateProperties.UNSTABLE; public TntBlock(BlockBehaviour.Properties p_57422_) { super(p_57422_); this.registerDefaultState(this.defaultBlockState().setValue(UNSTABLE, Boolean.valueOf(false))); } public void onPlace(BlockState p_57466_, Level p_57467_, BlockPos p_57468_, BlockState p_57469_, boolean p_57470_) { if (!p_57469_.is(p_57466_.getBlock())) { if (p_57467_.hasNeighborSignal(p_57468_)) { explode(p_57467_, p_57468_); p_57467_.removeBlock(p_57468_, false); } } } public void neighborChanged(BlockState p_57457_, Level p_57458_, BlockPos p_57459_, Block p_57460_, BlockPos p_57461_, boolean p_57462_) { if (p_57458_.hasNeighborSignal(p_57459_)) { explode(p_57458_, p_57459_); p_57458_.removeBlock(p_57459_, false); } } public void playerWillDestroy(Level p_57445_, BlockPos p_57446_, BlockState p_57447_, Player p_57448_) { if (!p_57445_.isClientSide() && !p_57448_.isCreative() && p_57447_.getValue(UNSTABLE)) { explode(p_57445_, p_57446_); } super.playerWillDestroy(p_57445_, p_57446_, p_57447_, p_57448_); } public void wasExploded(Level p_57441_, BlockPos p_57442_, Explosion p_57443_) { if (!p_57441_.isClientSide) { PrimedTnt primedtnt = new PrimedTnt(p_57441_, (double)p_57442_.getX() + 0.5D, (double)p_57442_.getY(), (double)p_57442_.getZ() + 0.5D, p_57443_.getSourceMob()); int i = primedtnt.getFuse(); primedtnt.setFuse((short)(p_57441_.random.nextInt(i / 4) + i / 8)); p_57441_.addFreshEntity(primedtnt); } } public static void explode(Level p_57434_, BlockPos p_57435_) { explode(p_57434_, p_57435_, (LivingEntity)null); } private static void explode(Level p_57437_, BlockPos p_57438_, @Nullable LivingEntity p_57439_) { if (!p_57437_.isClientSide) { PrimedTnt primedtnt = new PrimedTnt(p_57437_, (double)p_57438_.getX() + 0.5D, (double)p_57438_.getY(), (double)p_57438_.getZ() + 0.5D, p_57439_); p_57437_.addFreshEntity(primedtnt); p_57437_.playSound((Player)null, primedtnt.getX(), primedtnt.getY(), primedtnt.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F); p_57437_.gameEvent(p_57439_, GameEvent.PRIME_FUSE, p_57438_); } } public InteractionResult use(BlockState p_57450_, Level p_57451_, BlockPos p_57452_, Player p_57453_, InteractionHand p_57454_, BlockHitResult p_57455_) { ItemStack itemstack = p_57453_.getItemInHand(p_57454_); if (!itemstack.is(Items.FLINT_AND_STEEL) && !itemstack.is(Items.FIRE_CHARGE)) { return super.use(p_57450_, p_57451_, p_57452_, p_57453_, p_57454_, p_57455_); } else { explode(p_57451_, p_57452_, p_57453_); p_57451_.setBlock(p_57452_, Blocks.AIR.defaultBlockState(), 11); Item item = itemstack.getItem(); if (!p_57453_.isCreative()) { if (itemstack.is(Items.FLINT_AND_STEEL)) { itemstack.hurtAndBreak(1, p_57453_, (p_57425_) -> { p_57425_.broadcastBreakEvent(p_57454_); }); } else { itemstack.shrink(1); } } p_57453_.awardStat(Stats.ITEM_USED.get(item)); return InteractionResult.sidedSuccess(p_57451_.isClientSide); } } public void onProjectileHit(Level p_57429_, BlockState p_57430_, BlockHitResult p_57431_, Projectile p_57432_) { if (!p_57429_.isClientSide) { BlockPos blockpos = p_57431_.getBlockPos(); Entity entity = p_57432_.getOwner(); if (p_57432_.isOnFire() && p_57432_.mayInteract(p_57429_, blockpos)) { explode(p_57429_, blockpos, entity instanceof LivingEntity ? (LivingEntity)entity : null); p_57429_.removeBlock(blockpos, false); } } } public boolean dropFromExplosion(Explosion p_57427_) { return false; } protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_57464_) { p_57464_.add(UNSTABLE); } }
[ "nickblackburn02@gmail.com" ]
nickblackburn02@gmail.com
d5dee78a2a8f5d392c38610186906322c280ec25
33e8de3929d7b8f04c21acdde7762ea394f10d77
/mybatisdemo/src/main/java/com/example/mybatisdemo/config/MybatisConfiguration.java
425d627aa20f3268e1d23e81bd007b9823e3e32a
[]
no_license
lonelyCoder-jrbing/springCloud_dev
4aaee8bd243fd1f916789396f31dd3938b37bf4e
3dd9719d9bd4e09728bb3de8db83c978d8d72822
refs/heads/master
2022-12-20T20:06:54.968267
2020-03-12T09:00:35
2020-03-12T09:00:35
205,824,153
0
0
null
2022-12-16T05:08:14
2019-09-02T09:35:37
Java
UTF-8
Java
false
false
2,084
java
package com.example.mybatisdemo.config; import com.example.mybatisdemo.intercepters.page.PageInterceptor; import com.example.mybatisdemo.intercepters.sqlExecuteTimeCount.SqlExecuteTimeCountInterceptor; import com.example.mybatisdemo.intercepters.sqlExecuteTimeCount.SqlExecuteTimeCountInterceptor2; import org.apache.ibatis.executor.Executor; import org.apache.ibatis.executor.parameter.ParameterHandler; import org.apache.ibatis.executor.resultset.ResultSetHandler; import org.apache.ibatis.executor.statement.StatementHandler; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.reflection.MetaClass; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.defaults.DefaultSqlSession; import org.apache.ibatis.type.TypeHandler; import org.apache.ibatis.type.TypeHandlerRegistry; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ConfigurationClassPostProcessor; import java.util.Properties; /** * mybatis配置 */ @Configuration public class MybatisConfiguration { //https://blog.csdn.net/wuyuxing24/article/details/89343951 @Bean public PageInterceptor pageInterceptor() { PageInterceptor interceptor = new PageInterceptor(); Properties properties = new Properties(); properties.setProperty(PageInterceptor.PROPERTIES_KEY_DATABASE_TYPE, PageInterceptor.DATABASE_TYPE_MYSQL); properties.setProperty(PageInterceptor.PROPERTIES_KEY_PAGE_EXPRESSION_MATCHING, ".*Page.*"); properties.setProperty(PageInterceptor.PROPERTIES_KEY_COUNT_SUFFIX, "_COUNT"); interceptor.setProperties(properties); return interceptor; } @Bean public SqlExecuteTimeCountInterceptor timeCountInterceptor() { SqlExecuteTimeCountInterceptor interceptor = new SqlExecuteTimeCountInterceptor(); return interceptor; } @Bean public SqlExecuteTimeCountInterceptor2 timeCountInterceptor2(){ return new SqlExecuteTimeCountInterceptor2(); } }
[ "719203729@qq.com" ]
719203729@qq.com
1c3d54119f420180b7af58dc35904dc3ba4e3ab1
975945cf2c76b20d5d4448b89f7057e33d1a9ebc
/customer/src/main/java/com/shareshenghuo/app/user/network/response/HomeDataResponse.java
cdadce994bb8d2342e96f87d53cd924d7f77dacb
[]
no_license
gy121681/Share
aa64f67746f88d55e884e5ae48b3789422175f8f
031286dc1d2ce4ebe7fe2665ebd525d1946ad163
refs/heads/master
2021-01-15T12:02:34.908825
2017-08-08T03:01:07
2017-08-08T03:01:07
99,643,530
3
0
null
null
null
null
UTF-8
Java
false
false
431
java
package com.shareshenghuo.app.user.network.response; import java.util.List; import com.shareshenghuo.app.user.network.bean.ProdInfo; import com.shareshenghuo.app.user.network.bean.ShopInfo; public class HomeDataResponse extends BaseResponse { public HomeData data; public class HomeData { public List<ProdInfo> product_list_by_hot; //热门商品列表 public List<ShopInfo> shop_list_by_recomment;//人气好店 } }
[ "295306443@qq.com" ]
295306443@qq.com
ad9257acf1ae55e9e8495a9ab28fa0c340ce2b93
6319bdd51bbc8ef99ac270ec1c59569f569d40ba
/app/src/main/java/app/groceryapp/data/model/api/response/category/Category.java
a699f2dd2c6b62cdd16e9faeacaaa8f8fa65b048
[]
no_license
satishru/8874u4554_hKhhf_GrocShop
841dfde11d53bd141ec54bb3ccd0a057fe455c88
9314de50404a551e32b28a2bfe1f45a9960cabbf
refs/heads/master
2022-11-20T03:00:34.707184
2020-07-13T04:40:49
2020-07-13T04:40:49
274,701,813
0
0
null
null
null
null
UTF-8
Java
false
false
2,107
java
package app.groceryapp.data.model.api.response.category; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.List; public class Category { @SerializedName("category_id") @Expose private Integer categoryId; @SerializedName("category_name") @Expose private String categoryName; @SerializedName("category_description") @Expose private Object categoryDescription; @SerializedName("category_image") @Expose private String categoryImage; @SerializedName("is_active") @Expose private Integer isActive; @SerializedName("image_full_path") @Expose private String imageFullPath; @SerializedName("sub_category") @Expose private List<SubCategory> subCategoryList = null; public Integer getCategoryId() { return categoryId; } public void setCategoryId(Integer categoryId) { this.categoryId = categoryId; } public String getCategoryName() { return categoryName; } public void setCategoryName(String categoryName) { this.categoryName = categoryName; } public Object getCategoryDescription() { return categoryDescription; } public void setCategoryDescription(Object categoryDescription) { this.categoryDescription = categoryDescription; } public String getCategoryImage() { return categoryImage; } public void setCategoryImage(String categoryImage) { this.categoryImage = categoryImage; } public Integer getIsActive() { return isActive; } public void setIsActive(Integer isActive) { this.isActive = isActive; } public String getImageFullPath() { return imageFullPath; } public void setImageFullPath(String imageFullPath) { this.imageFullPath = imageFullPath; } public List<SubCategory> getSubCategoryList() { return subCategoryList; } public void setSubCategoryList(List<SubCategory> subCategory) { this.subCategoryList = subCategory; } }
[ "ujjammanavar.satish@gmail.com" ]
ujjammanavar.satish@gmail.com
f350e5c80c62dd5e51b4619b4adf772ba92771a6
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_149/Testnull_14846.java
1ff234078dded2883ba617ba256ce889bfc8dd4a
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_149; import static org.junit.Assert.*; public class Testnull_14846 { private final Productionnull_14846 production = new Productionnull_14846("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
0fd208293098bf5be4d7e499f41def0fa580d8df
ab648832da99f0153fe538949b2a45cab37a81e2
/src/main/java/com/vmware/vim25/mo/TaskHistoryCollector.java
fb32072c332694ba534c83a5120e4f34520e3256
[ "BSD-3-Clause" ]
permissive
stephenc/vijava
9429d3a0cce8f1a2ed533201160be55017a202ed
2148e00360796f13f24b8a2d8df1142c29024325
refs/heads/master
2023-06-15T23:25:06.777827
2015-02-17T11:38:59
2015-02-17T11:38:59
30,876,379
1
2
null
2015-03-10T11:26:33
2015-02-16T16:18:02
Java
UTF-8
Java
false
false
2,616
java
/*================================================================================ Copyright (c) 2008 VMware, Inc. 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 VMware, Inc. 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 VMWARE, INC. 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 com.vmware.vim25.mo; import java.rmi.RemoteException; import com.vmware.vim25.*; /** * The managed object class corresponding to the one defined in VI SDK API reference. * @author Steve JIN (http://www.doublecloud.org) */ public class TaskHistoryCollector extends HistoryCollector { public TaskHistoryCollector(ServerConnection serverConnection, ManagedObjectReference mor) { super(serverConnection, mor); } public TaskFilterSpec getFilter() { return (TaskFilterSpec) getCurrentProperty("filter"); } public TaskInfo[] getLatestPage() { return (TaskInfo[]) getCurrentProperty("latestPage"); } public TaskInfo[] readNextTasks(int maxCount) throws RuntimeFault, RemoteException { return getVimService().readNextTasks(getMOR(), maxCount); } public TaskInfo[] readPreviousTasks(int maxCount) throws RuntimeFault, RemoteException { return getVimService().readPreviousTasks(getMOR(), maxCount); } }
[ "stephen.alan.connolly@gmail.com" ]
stephen.alan.connolly@gmail.com
e9f4c95ee8543b08e46b539894de7fdab229600c
c5c1abf66986941bf7eb3c7ac2f795dac0d9ae34
/src/test/java/org/thoriumlang/compiler/ast/nodes/MethodSignatureTest.java
58180aadfa7ee64cbbccdc42c4213419561743b1
[ "Apache-2.0" ]
permissive
thoriumlang/thc
a6cc1713ac7d3a2e50ba6d7881cb14bd614ad211
89e0ffe8bd22d6934304a9425b167ec19839f405
refs/heads/master
2023-08-31T16:10:41.625307
2021-06-04T20:21:51
2021-06-04T20:21:51
194,316,129
2
1
Apache-2.0
2023-06-14T23:33:23
2019-06-28T18:16:23
Java
UTF-8
Java
false
false
7,687
java
/* * Copyright 2019 Christophe Pollet * * 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.thoriumlang.compiler.ast.nodes; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.thoriumlang.compiler.ast.visitor.BaseVisitor; import java.util.Collections; import java.util.stream.Collectors; class MethodSignatureTest { private NodeIdGenerator nodeIdGenerator; @BeforeEach void setup() { this.nodeIdGenerator = new NodeIdGenerator(); } @Test void constructor_nodeId() { try { new MethodSignature(null, Visibility.PRIVATE, "name", Collections.emptyList(), Collections.emptyList(), new TypeSpecSimple(nodeIdGenerator.next(), "test", Collections.emptyList())); } catch (NullPointerException e) { Assertions.assertThat(e.getMessage()) .isEqualTo("nodeId cannot be null"); return; } Assertions.fail("NPE not thrown"); } @Test void constructor_visibility() { try { new MethodSignature(nodeIdGenerator.next(), null, "name", Collections.emptyList(), Collections.emptyList(), new TypeSpecSimple(nodeIdGenerator.next(), "test", Collections.emptyList())); } catch (NullPointerException e) { Assertions.assertThat(e.getMessage()) .isEqualTo("visibility cannot be null"); return; } Assertions.fail("NPE not thrown"); } @Test void constructor_name() { try { new MethodSignature(nodeIdGenerator.next(), Visibility.PRIVATE, null, Collections.emptyList(), Collections.emptyList(), new TypeSpecSimple(nodeIdGenerator.next(), "test", Collections.emptyList())); } catch (NullPointerException e) { Assertions.assertThat(e.getMessage()) .isEqualTo("name cannot be null"); return; } Assertions.fail("NPE not thrown"); } @Test void constructor_typeParameters() { try { new MethodSignature( nodeIdGenerator.next(), Visibility.PRIVATE, "name", null, Collections.emptyList(), new TypeSpecSimple(nodeIdGenerator.next(), "test", Collections.emptyList()) ); } catch (NullPointerException e) { Assertions.assertThat(e.getMessage()) .isEqualTo("typeParameters cannot be null"); return; } Assertions.fail("NPE not thrown"); } @Test void constructor_parameters() { try { new MethodSignature( nodeIdGenerator.next(), Visibility.PRIVATE, "name", Collections.emptyList(), null, new TypeSpecSimple(nodeIdGenerator.next(), "test", Collections.emptyList()) ); } catch (NullPointerException e) { Assertions.assertThat(e.getMessage()) .isEqualTo("parameters cannot be null"); return; } Assertions.fail("NPE not thrown"); } @Test void constructor_returnType() { try { new MethodSignature( nodeIdGenerator.next(), Visibility.PRIVATE, "name", Collections.emptyList(), Collections.emptyList(), null ); } catch (NullPointerException e) { Assertions.assertThat(e.getMessage()) .isEqualTo("returnType cannot be null"); return; } Assertions.fail("NPE not thrown"); } @Test void accept() { Assertions.assertThat( new MethodSignature( nodeIdGenerator.next(), Visibility.PRIVATE, "name", Collections.singletonList(new TypeParameter(nodeIdGenerator.next(), "T")), Collections.singletonList(new Parameter( nodeIdGenerator.next(), "name", new TypeSpecSimple( nodeIdGenerator.next(), "type", Collections.emptyList() ) )), new TypeSpecSimple(nodeIdGenerator.next(), "test", Collections.emptyList()) ).accept(new BaseVisitor<String>() { @Override public String visit(MethodSignature node) { return String.format( "%s:%s:%s:[%s]:(%s):%s", node.getNodeId().toString(), node.getVisibility(), node.getName(), node.getTypeParameters().stream() .map(TypeParameter::toString) .collect(Collectors.joining(",")), node.getParameters().stream() .map(Parameter::toString) .collect(Collectors.joining(",")), node.getReturnType() ); } }) ).isEqualTo("#1:PRIVATE:name:[T]:(name: type[]):test[]"); } @Test void _toString() { Assertions.assertThat( new MethodSignature( nodeIdGenerator.next(), Visibility.PRIVATE, "name", Collections.singletonList(new TypeParameter(nodeIdGenerator.next(), "T")), Collections.singletonList(new Parameter( nodeIdGenerator.next(), "name", new TypeSpecSimple(nodeIdGenerator.next(), "type", Collections.emptyList()) )), new TypeSpecSimple(nodeIdGenerator.next(), "returnType", Collections.emptyList()) ).toString() ).isEqualTo("PRIVATE name [T] (name: type[]) : returnType[]"); } @Test void getContext() { Assertions.assertThat( new MethodSignature( nodeIdGenerator.next(), Visibility.PRIVATE, "name", Collections.emptyList(), Collections.emptyList(), new TypeSpecSimple(nodeIdGenerator.next(), "returnType", Collections.emptyList()) ).getContext() ).isNotNull(); } }
[ "cpollet@users.noreply.github.com" ]
cpollet@users.noreply.github.com
729a834ad125b6f8c120c70b119f6f6dfee4f094
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes5.dex_source_from_JADX/com/google/common/collect/Iterables$9.java
6095e0116c798b9222f30fa931668a3d30356c2b
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
512
java
package com.google.common.collect; import java.util.Iterator; import java.util.List; /* compiled from: button_icon_image */ final class Iterables$9 extends FluentIterable<T> { final /* synthetic */ List f7359a; final /* synthetic */ int f7360b; Iterables$9(List list, int i) { this.f7359a = list; this.f7360b = i; } public final Iterator<T> iterator() { return this.f7359a.subList(Math.min(this.f7359a.size(), this.f7360b), this.f7359a.size()).iterator(); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
f9d98fd302571fc1dea9873db91d0d3430cd9cb1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/32/32_5ed4ae346ee91e1f58bb604355ecef74dd33cb01/GeneralFragmentActivity/32_5ed4ae346ee91e1f58bb604355ecef74dd33cb01_GeneralFragmentActivity_t.java
1974486dae4314d1f47d2db7acc727918d17c8c9
[]
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,122
java
/* * Copyright (C) 2011 The CyanogenMod Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.cyanogenmod.settings.device; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference.PreferenceActivity; import android.preference.PreferenceFragment; import android.preference.PreferenceManager; import android.preference.PreferenceScreen; import android.util.Log; import com.cyanogenmod.settings.device.R; public class GeneralFragmentActivity extends PreferenceFragment { private static final String PREF_ENABLED = "1"; private static final String TAG = "GNexusParts_General"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.general_preferences); PreferenceScreen prefSet = getPreferenceScreen(); } @Override public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { String boxValue; String key = preference.getKey(); Log.w(TAG, "key: " + key); return true; } public static boolean isSupported(String FILE) { return Utils.fileExists(FILE); } public static void restore(Context context) { SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b655d9e8802bc5f4e55a88d52aecc48bef56fb67
52acbc630e80cf76a8a7c7b7c320b7e18d02c580
/src/main/java/sonar/logistics/server/address/Environment.java
9bb55d9bb85048f8927219d455ebed74cbc77bd9
[]
no_license
SonarSonic/Practical-Logistics-3
2f8d11a9a86545726182dc2121f459332f9c0215
bfd78dee190fef0964470549c3e023ddff3a2a61
refs/heads/master
2021-06-13T03:30:38.550886
2021-05-26T14:51:30
2021-05-26T14:51:30
254,422,436
2
0
null
null
null
null
UTF-8
Java
false
false
1,925
java
package sonar.logistics.server.address; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import sonar.logistics.common.multiparts.networking.INetworkedTile; import sonar.logistics.server.caches.network.PL3Network; import sonar.logistics.server.data.api.IData; import javax.annotation.Nonnull; import javax.annotation.Nullable; public class Environment { ///// ENVIRONMENT \\\\\ public final Address address; public World world; public BlockState state; public BlockPos pos; public Direction face; public TileEntity tile; public Entity entity; public PL3Network network; public INetworkedTile networkedTile; public IData data; public Environment(Address address) { this.address = address; } public void reset() { world = null; pos = null; state = null; face = null; tile = null; entity = null; network = null; networkedTile = null; data = null; } @Nonnull public Address address() { return address; } @Nullable public World world() { return world; } @Nullable public BlockState state() { return state; } @Nullable public BlockPos pos() { return pos; } @Nullable public Direction face() { return face; } @Nullable public TileEntity tile() { return tile; } @Nullable public PL3Network network() { return network; } @Nullable public Entity entity() { return entity; } @Nullable public INetworkedTile networkedTile() { return networkedTile; } @Nullable public IData data() { return data; } }
[ "ollielansdell@hotmail.co.uk" ]
ollielansdell@hotmail.co.uk
b08f23b4378715a3173c4bd098e77cc9615a3969
f1ffd11f81393fc626c9789a92154953b96f788d
/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/dialog/DialogResponse.java
c2efad146f6ebce04876e2768689a2961e057981
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-fujion-exception-to-apache-2.0" ]
permissive
carewebframework/carewebframework-core
4358a7c7d1daa06874aa779ebc0961ae7467966f
fa3252d4f7541dbe151b92c3d4f6f91433cd1673
refs/heads/master
2020-04-03T20:51:52.574637
2018-06-13T18:23:55
2018-06-13T18:23:55
8,866,638
4
4
null
2017-07-05T12:53:55
2013-03-18T23:30:59
Java
UTF-8
Java
false
false
5,356
java
package org.carewebframework.ui.dialog; import static org.carewebframework.ui.dialog.DialogConstants.LABEL_ID_CANCEL; import static org.carewebframework.ui.dialog.DialogConstants.LABEL_ID_OK; import java.util.ArrayList; import java.util.List; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.ObjectUtils; import org.fujion.common.StrUtil; /** * Wrapper for response object used by dialog for displaying and returning responses. * * @param <T> The type of response object */ public class DialogResponse<T> { private final T response; private final String label; private final boolean excluded; private final boolean ok; private final boolean cancel; private final boolean dflt; private final String flavor; /** * Returns list of response objects created from a string of vertical bar delimited captions. * * @param <T> The type of response object. * @param responses Response list. * @param exclusions Exclusion list (may be null). * @param dflt Default response (may be null). * @return List of response objects corresponding to response list. */ public static <T> List<DialogResponse<T>> toResponseList(T[] responses, T[] exclusions, T dflt) { List<DialogResponse<T>> list = new ArrayList<>(); boolean forceDefault = dflt == null && responses.length == 1; for (T response : responses) { DialogResponse<T> rsp = new DialogResponse<>(response, response.toString(), exclusions != null && ArrayUtils.contains(exclusions, response), forceDefault || response.equals(dflt)); list.add(rsp); } return list; } /** * Returns list of response objects created from a string of vertical bar delimited captions. * * @param <T> The type of response object. * @param responses Response list. * @param exclusions Exclusion list (may be null). * @param dflt Default response (may be null). * @return List of response objects corresponding to response list. */ public static <T> List<DialogResponse<T>> toResponseList(List<T> responses, List<T> exclusions, T dflt) { List<DialogResponse<T>> list = new ArrayList<>(); boolean forceDefault = dflt == null && responses.size() == 1; for (T response : responses) { DialogResponse<T> rsp = new DialogResponse<>(response, response.toString(), exclusions != null && exclusions.contains(response), forceDefault || response.equals(dflt)); list.add(rsp); } return list; } public DialogResponse(T response) { this(response, response.toString()); } public DialogResponse(T response, String label) { this(response, label, false, false); } public DialogResponse(T response, String label, boolean excluded, boolean dflt) { this(response, label, excluded, dflt, null); } public DialogResponse(T response, String label, boolean excluded, boolean dflt, String flavor) { this.response = response; this.label = label; this.ok = isResponseType(label, LABEL_ID_OK); this.cancel = isResponseType(label, LABEL_ID_CANCEL); this.excluded = excluded; this.dflt = dflt; this.flavor = flavor != null ? flavor : ok ? "success" : cancel ? "danger" : dflt ? "primary" : "default"; } /** * Returns the response object. * * @return The response object. */ public T getResponse() { return response; } /** * Returns true if this dialog response contains the specified response. * * @param response A response. * @return True if this dialog response contains the specified response. */ public boolean hasResponse(T response) { return ObjectUtils.equals(this.response, response); } /** * Returns the response label. * * @return The response label. */ public String getLabel() { return label; } /** * Returns true if the response is never to be saved. * * @return True to suppress saving of response. */ public boolean isExcluded() { return excluded; } /** * True if this response corresponds to an "OK" response. * * @return True if OK response. */ public boolean isOk() { return ok; } /** * True if this response corresponds to a "Cancel" response. * * @return True if cancel response. */ public boolean isCancel() { return cancel; } /** * True if this is the default response. * * @return True if default response. */ public boolean isDefault() { return dflt; } /** * Returns the button flavor (CSS class). * * @return The button flavor. */ public String getFlavor() { return flavor; } /** * Returns true if the text corresponds to a specific response type. * * @param text Text to test. * @param label The label. * @return True if represents the specified response type. */ private boolean isResponseType(String text, String label) { return label.equals(text) || StrUtil.formatMessage(label).equals(text); } }
[ "dkmartin@regenstrief.org" ]
dkmartin@regenstrief.org
6a2fadaca0285e4e21a9baa59c204efbbba813f7
73fd919211583d7adeeb8db0071a18b1a92a179d
/gmall-pms-interface/src/main/java/com/atguigu/gmall/pms/entity/SkuImagesEntity.java
020014ebded81a03bebd0803473358eb32f4fcb7
[ "Apache-2.0" ]
permissive
ksabu00/gmall
2dffae1d13b10050e8b1046590e53397556145db
ef98a49709adaebd4c7b610c38b48dc2cbc3d801
refs/heads/master
2022-12-20T10:32:47.505796
2019-11-16T16:08:30
2019-11-16T16:08:30
218,021,317
0
0
Apache-2.0
2022-12-16T14:50:33
2019-10-28T10:27:22
JavaScript
UTF-8
Java
false
false
1,146
java
package com.atguigu.gmall.pms.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.util.Date; import lombok.Data; /** * sku图片 * * @author ksabu00 * @email 2054693@qq.com * @date 2019-10-28 20:29:35 */ @ApiModel @Data @TableName("pms_sku_images") public class SkuImagesEntity implements Serializable { private static final long serialVersionUID = 1L; /** * id */ @TableId @ApiModelProperty(name = "id",value = "id") private Long id; /** * sku_id */ @ApiModelProperty(name = "skuId",value = "sku_id") private Long skuId; /** * 图片地址 */ @ApiModelProperty(name = "imgUrl",value = "图片地址") private String imgUrl; /** * 排序 */ @ApiModelProperty(name = "imgSort",value = "排序") private Integer imgSort; /** * 默认图[0 - 不是默认图,1 - 是默认图] */ @ApiModelProperty(name = "defaultImg",value = "默认图[0 - 不是默认图,1 - 是默认图]") private Integer defaultImg; }
[ "18229712137@189.cn" ]
18229712137@189.cn
7e54e0a7aa3056f3ef6e7b3bef7b4e8bbf5b9b44
14fec7d48aa2bd28ecbeb87e4e1d8aeb23e20635
/src/main/java/com/mht/service/impl/AppPartUpdateUserServiceImpl.java
c8480642c26561c7099eafccd4feb30d426ec8a2
[]
no_license
haoqiunie/api1
352a2d75ee77b98ff09f7e5a43bfc4f6cab98294
37bf9c55edda5e9b7a70a85f0851472dd8306280
refs/heads/master
2022-06-27T18:22:03.203863
2019-08-12T03:02:11
2019-08-12T03:02:11
201,601,048
0
0
null
2022-06-17T02:25:39
2019-08-10T08:17:18
Java
UTF-8
Java
false
false
526
java
package com.mht.service.impl; import com.mht.entity.AppPartUpdateUser; import com.mht.mapper.AppPartUpdateUserMapper; import com.mht.service.IAppPartUpdateUserService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; /** * <p> * 服务实现类 * </p> * * @author jobob * @since 2019-07-29 */ @Service public class AppPartUpdateUserServiceImpl extends ServiceImpl<AppPartUpdateUserMapper, AppPartUpdateUser> implements IAppPartUpdateUserService { }
[ "1778715299@qq.com" ]
1778715299@qq.com
38838d46356f5073e59fcba6f1ae97916f2462e8
51fa3cc281eee60058563920c3c9059e8a142e66
/Java/src/testcases/CWE89_SQL_Injection/s04/CWE89_SQL_Injection__URLConnection_executeBatch_54a.java
4d7a122324582d0f422d5e38d97f25ce26363af7
[]
no_license
CU-0xff/CWE-Juliet-TestSuite-Java
0b4846d6b283d91214fed2ab96dd78e0b68c945c
f616822e8cb65e4e5a321529aa28b79451702d30
refs/heads/master
2020-09-14T10:41:33.545462
2019-11-21T07:34:54
2019-11-21T07:34:54
223,105,798
1
4
null
null
null
null
UTF-8
Java
false
false
6,002
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE89_SQL_Injection__URLConnection_executeBatch_54a.java Label Definition File: CWE89_SQL_Injection.label.xml Template File: sources-sinks-54a.tmpl.java */ /* * @description * CWE: 89 SQL Injection * BadSource: URLConnection Read data from a web server with URLConnection * GoodSource: A hardcoded string * Sinks: executeBatch * GoodSink: Use prepared statement and executeBatch (properly) * BadSink : data concatenated into SQL statement used in executeBatch(), which could result in SQL Injection * Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package * * */ package testcases.CWE89_SQL_Injection.s04; import testcasesupport.*; import javax.servlet.http.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.URL; import java.net.URLConnection; import java.util.logging.Level; public class CWE89_SQL_Injection__URLConnection_executeBatch_54a extends AbstractTestCase { public void bad() throws Throwable { String data; data = ""; /* Initialize data */ /* read input from URLConnection */ { URLConnection urlConnection = (new URL("http://www.example.org/")).openConnection(); BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { readerInputStream = new InputStreamReader(urlConnection.getInputStream(), "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data from a web server with URLConnection */ /* This will be reading the first "line" of the response body, * which could be very long if there are no newlines in the HTML */ data = readerBuffered.readLine(); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up 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); } } } (new CWE89_SQL_Injection__URLConnection_executeBatch_54b()).badSink(data ); } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { String data; /* FIX: Use a hardcoded string */ data = "foo"; (new CWE89_SQL_Injection__URLConnection_executeBatch_54b()).goodG2BSink(data ); } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { String data; data = ""; /* Initialize data */ /* read input from URLConnection */ { URLConnection urlConnection = (new URL("http://www.example.org/")).openConnection(); BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { readerInputStream = new InputStreamReader(urlConnection.getInputStream(), "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data from a web server with URLConnection */ /* This will be reading the first "line" of the response body, * which could be very long if there are no newlines in the HTML */ data = readerBuffered.readLine(); } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up 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); } } } (new CWE89_SQL_Injection__URLConnection_executeBatch_54b()).goodB2GSink(data ); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "frank@fischer.com.mt" ]
frank@fischer.com.mt
af7e8efc88d829efc94ee5f1185efd1b185486ec
7fbc568f5f502eb0ae405022f7f34c79e0c49234
/baifei-logistics/src/main/java/org/baifei/modules/entity/request/dhl/DhlConsigneeAddress.java
6b0a97e475db1d670bb7b131ae171ac9d2e43e57
[ "MIT" ]
permissive
yourant/logistics
c6271bae3e2d6add20df0ee7c815652f423e50de
3989d2f7b3213c6973bc76e7031248b8643ab5b1
refs/heads/master
2023-03-23T16:44:34.938698
2020-07-03T04:42:31
2020-07-03T04:42:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
451
java
package org.baifei.modules.entity.request.dhl; import lombok.Data; @Data public class DhlConsigneeAddress { private String name; private String address1; private String address2; private String city; private String state; private String district; private String country; private String postCode; private String phone; private String email; private String idNumber; private String idType; }
[ "56526925@qq.com" ]
56526925@qq.com
527a4b0e1b3ec9ba07c33bb81e3585ce3a55f907
164d7a4a9126bbfeecf851717192a038fb198900
/user-server-consumer-feign-customizing/src/main/java/com/xuliugen/springcloud/controller/UserController.java
c15d8f0de43af9ace1f553f74cbe728d198884a0
[]
no_license
tangyj5004/springcloud-demo
c7b70f42483f504ab320711c3317072fbb5bae33
7e6335e9f6eedfd57cccc2df17ea5a656dd562f4
refs/heads/master
2020-04-24T08:00:35.574034
2017-09-01T05:15:25
2017-09-01T05:15:25
171,817,009
0
0
null
null
null
null
UTF-8
Java
false
false
1,355
java
package com.xuliugen.springcloud.controller; import com.xuliugen.springcloud.bean.User; import com.xuliugen.springcloud.client.UserFeignClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * Created by xuliugen on 2017/7/26. */ @RestController @RequestMapping(value = "/user/property") public class UserController { @Autowired private UserFeignClient userFeignClient; @Autowired private LoadBalancerClient loadBalancerClient; @GetMapping(value = "/{id}") public User getById(@PathVariable("id") String id) { return userFeignClient.getById(id); } /** * 使用负载均衡的方式显示消费的那一他主机的服务 */ @GetMapping(value = "/loadBalancerClient") public void loadBalancerClient() { ServiceInstance serviceInstance = loadBalancerClient.choose("user-server-provider"); System.out.println(serviceInstance.getHost() + ":" + serviceInstance.getPort()); } }
[ "1573876303@qq.com" ]
1573876303@qq.com
bae1b7df47fe281ba96c7006adf434e224b78cc9
f79556e9a4cdace2b24d68a27328a1629e085530
/教务管理系统/school/src/com/sevenEleven/javaBean/CMethod.java
d8a93eb82c52730d762a6f6f2503a55a1003c5db
[]
no_license
X-lun/Java-web
3274b5f4e1536573d70c4b515c96efcd8233cf90
f21b76d6b690d68a53366622a859551e1ebc0b40
refs/heads/master
2022-04-15T08:21:53.094414
2019-04-21T07:20:08
2019-04-21T07:20:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,599
java
package com.sevenEleven.javaBean; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; public class CMethod { private Connection conn; private ResultSet res; public CMethod() { connection(); // TODO Auto-generated constructor stub } public void connection() { // TODO Auto-generated method stub try { Class.forName("com.mysql.jdbc.Driver").newInstance(); String ur1 = "jdbc:mysql://localhost:3306/school?characterEncoding=utf-8"; String user1 = "root"; String pwd1 = ""; try { conn = DriverManager.getConnection(ur1, user1, pwd1); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (InstantiationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public ResultSet query(String sql) { try { res = conn.createStatement().executeQuery(sql); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return res; } public int Update(String sql) throws SQLException { int update = 0; try { update = conn.createStatement().executeUpdate(sql); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return update; } public void closeConn() throws SQLException { if (res != null) res.close(); } }
[ "3196614820@qq.com" ]
3196614820@qq.com
04cd4b9fdecb1a07a418aa5d0c743e1003c1a4c4
60563395b404723b1263bf7abc59ea1612dcab35
/java-in-action/wicket-test/src/main/java/com/test/web/HomePage.java
151fde29d6a8b8cd65ba4eed95e3b5b81c03a56c
[]
no_license
jayailluminated/Study
afc58f7715434ece86e9fab226974cba6525401a
6d078c8815f2f54ec5e51ca19dbe1ea128a0d989
refs/heads/master
2020-04-06T09:35:35.596588
2012-02-05T12:25:26
2012-02-05T12:25:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
685
java
package com.test.web; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.WebPage; /** * Homepage */ public class HomePage extends WebPage { private static final long serialVersionUID = 1L; // TODO Add any page properties or variables here /** * Constructor that is invoked when page is invoked without a session. * * @param parameters Page parameters */ public HomePage (final PageParameters parameters) { // Add the simplest type of label add(new Label("message", "If you see this message wicket is properly configured and running")); // TODO Add your page's components here } }
[ "moretajoo@gmail.com" ]
moretajoo@gmail.com
5c0aaedf7b8948db606eab72cec2a13096307f5c
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/MOCKITO-10b-4-24-Single_Objective_GGA-WeightedSum/org/mockito/internal/creation/MockSettingsImpl_ESTest.java
273740ee5eb231b3607e7f33856c98a486d9aecc
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
568
java
/* * This file was automatically generated by EvoSuite * Tue Mar 31 12:20:36 UTC 2020 */ package org.mockito.internal.creation; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class MockSettingsImpl_ESTest extends MockSettingsImpl_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
342908de8a6cefcf974647a6b4f99f3dac258bd3
074fc577a27d039c8e8bd7b218716e434de46bc2
/app/src/main/java/com/zhiyu/quanzhu/ui/adapter/OrderConfirmRecyclerAdapter.java
28c9aba1b02008c677379822012dcec64927004f
[]
no_license
leon6611wang/PinTaiHui
941d1844ffb1c8912d59b530af788610c2879350
20bb8af19789f50e34c7e83796a1039b0dd2388a
refs/heads/master
2020-12-18T20:58:50.265795
2020-08-07T05:40:46
2020-08-07T05:40:47
235,515,563
1
0
null
null
null
null
UTF-8
Java
false
false
7,705
java
package com.zhiyu.quanzhu.ui.adapter; import android.content.Context; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.bumptech.glide.Glide; import com.zhiyu.quanzhu.R; import com.zhiyu.quanzhu.model.bean.OrderConfirmShop; import com.zhiyu.quanzhu.ui.dialog.OrderConfirmUseCouponDialog; import com.zhiyu.quanzhu.utils.PriceParseUtils; import java.util.HashMap; import java.util.List; import java.util.Map; public class OrderConfirmRecyclerAdapter extends BaseRecyclerAdapter<OrderConfirmShop> { private Context context; private OrderConfirmUseCouponDialog useCouponDialog; private Map<Integer, Boolean> map = new HashMap<>(); public OrderConfirmRecyclerAdapter(Context context) { this.context = context; useCouponDialog = new OrderConfirmUseCouponDialog(context, R.style.dialog, new OrderConfirmUseCouponDialog.OnSelectCouponListener() { @Override public void onSelectCoupon(int index, boolean isUseCoupon) { if (null != onUseCouponListener) { onUseCouponListener.onUseCoupon(index, isUseCoupon); } map.put(index, isUseCoupon); notifyDataSetChanged(); } }); } @Override public int getItemCount() { return super.getItemCount(); } @Override public RecyclerView.ViewHolder onCreate(ViewGroup parent, int viewType) { return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_gouwuche_jiesuan, parent, false)); } @Override public void onBind(RecyclerView.ViewHolder viewHolder, final int RealPosition, final OrderConfirmShop data) { final ViewHolder holder = (ViewHolder) viewHolder; Glide.with(context).load(data.getIcon()).error(R.drawable.image_error).placeholder(R.drawable.image_error) .fallback(R.drawable.image_error).into(holder.iconImageView); holder.nameTextView.setText(data.getName()); holder.goodsCountTextView.setText(String.valueOf(data.getGoods_num())); long payPrice = 0; if (map.containsKey(RealPosition)) { if (map.get(RealPosition)) { holder.useCouponTextView.setText("组合优惠"); holder.discountPriceTextView.setText("-¥" + PriceParseUtils.getInstance().parsePrice(data.getDiscount_price())); payPrice = data.getPay_price(); } else { holder.useCouponTextView.setText("不使用优惠"); holder.discountPriceTextView.setText("-¥0.00"); payPrice = data.getAll_price() + data.getPostage_price(); } } else { holder.useCouponTextView.setText("组合优惠"); holder.discountPriceTextView.setText("-¥" + PriceParseUtils.getInstance().parsePrice(data.getDiscount_price())); payPrice = data.getPay_price(); } holder.zhengshuTextView.setText(PriceParseUtils.getInstance().getZhengShu(payPrice)); holder.xiaoshuTextView.setText(PriceParseUtils.getInstance().getXiaoShu(payPrice)); if (data.getDiscount_price() > 0) { holder.couponLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { useCouponDialog.show(); useCouponDialog.setIndex(RealPosition, data.getDiscount_price()); boolean use = true; if (map.containsKey(RealPosition)) { use = map.get(RealPosition); } useCouponDialog.setUseCoupon(use); } }); } String postage = ""; switch (data.getPostage_status()) { case 2: postage = "所有商品超出配送范围"; break; case 1: postage = "部分商品超出配送范围"; break; case 0: if (data.getPostage_price() == 0) { postage = "包邮"; } else if (data.getPostage_price() > 0) { postage = "¥" + PriceParseUtils.getInstance().parsePrice(data.getPostage_price()); } break; } holder.postagePriceTextView.setText(postage); holder.mRecyclerView.setLayoutManager(holder.linearLayoutManager); holder.adapter.setList(data.getList()); holder.remarkEditText.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { if (null != onRemarkEditListener) { onRemarkEditListener.onRemarkEdit(RealPosition, holder.remarkEditText.getText().toString().trim()); } } @Override public void afterTextChanged(Editable s) { } }); } class ViewHolder extends RecyclerView.ViewHolder { RecyclerView mRecyclerView; OrderConfirmItemRecyclerAdapter adapter; LinearLayoutManager linearLayoutManager; ImageView iconImageView; TextView nameTextView, goodsCountTextView, zhengshuTextView, xiaoshuTextView, discountPriceTextView, postagePriceTextView; EditText remarkEditText; LinearLayout couponLayout; TextView useCouponTextView; public ViewHolder(View itemView) { super(itemView); couponLayout = itemView.findViewById(R.id.couponLayout); useCouponTextView = itemView.findViewById(R.id.useCouponTextView); iconImageView = itemView.findViewById(R.id.iconImageView); nameTextView = itemView.findViewById(R.id.nameTextView); goodsCountTextView = itemView.findViewById(R.id.goodsCountTextView); zhengshuTextView = itemView.findViewById(R.id.zhengshuTextView); xiaoshuTextView = itemView.findViewById(R.id.xiaoshuTextView); mRecyclerView = itemView.findViewById(R.id.mRecyclerView); adapter = new OrderConfirmItemRecyclerAdapter(context); linearLayoutManager = new LinearLayoutManager(context); linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL); mRecyclerView.setAdapter(adapter); remarkEditText = itemView.findViewById(R.id.remarkEditText); discountPriceTextView = itemView.findViewById(R.id.discountPriceTextView); postagePriceTextView = itemView.findViewById(R.id.postagePriceTextView); } } private OnRemarkEditListener onRemarkEditListener; public void setOnRemarkEditListener(OnRemarkEditListener listener) { this.onRemarkEditListener = listener; } public interface OnRemarkEditListener { void onRemarkEdit(int position, String remark); } private OnUseCouponListener onUseCouponListener; public void setOnUseCouponListener(OnUseCouponListener listener) { this.onUseCouponListener = listener; } public interface OnUseCouponListener { void onUseCoupon(int position, boolean isUse); } }
[ "522218113@qq.com" ]
522218113@qq.com
4593e10f937d225b41d48d5d63031b82b8c4a8bc
b21d13e05d144bf46e3b0f764378fc12d6bf55e6
/core/transport/src/main/java/hera/util/TransportUtils.java
9503a506e53c8d565db2b83ffa3d62d60fe74e10
[ "MIT" ]
permissive
aergoio/heraj
557ffda977598be6bc2fc613f9dd5a9d8860d9ce
7a3b3d5a54d654235419b44a6c64b7ee2d2ce5f4
refs/heads/develop
2022-09-23T07:24:53.788548
2022-06-16T02:17:19
2022-06-19T12:34:21
142,944,814
23
8
MIT
2023-09-04T09:39:29
2018-07-31T01:10:55
Java
UTF-8
Java
false
false
4,964
java
/* * @copyright defined in LICENSE.txt */ package hera.util; import static hera.util.NumberUtils.byteArrayToPositive; import static hera.util.NumberUtils.positiveToByteArray; import com.google.protobuf.ByteString; import hera.annotation.ApiAudience; import hera.annotation.ApiStability; import hera.api.model.Aer; import hera.api.model.BlockHash; import hera.api.model.BytesValue; import hera.api.model.TxHash; @ApiAudience.Private @ApiStability.Unstable public class TransportUtils { /** * Transform a raw byte array to {@link ByteString} in protobuf. If either raw byte array is null * or raw byte array is empty, return {@link ByteString#EMPTY} * * @param rawBytes a raw bytes * @return protobuf {@link ByteString} */ public static ByteString copyFrom(final byte[] rawBytes) { if (null == rawBytes || 0 == rawBytes.length) { return ByteString.EMPTY; } return ByteString.copyFrom(rawBytes); } /** * Transform {@link BytesValue} to {@link ByteString} in protobuf. If either bytesValue or value * of bytesValue is null, return {@link ByteString#EMPTY} * * @param bytesValue {@link BytesValue} * @return protobuf {@link ByteString} */ public static ByteString copyFrom(final BytesValue bytesValue) { if (null == bytesValue || null == bytesValue.getValue()) { return ByteString.EMPTY; } return ByteString.copyFrom(bytesValue.getValue()); } /** * Transform {@link Aer} to {@link ByteString} in protobuf. If aer isn null, return {@link * ByteString#EMPTY}. * * @param aer an aer * @return protobuf {@link ByteString} */ public static ByteString copyFrom(final Aer aer) { if (null == aer || Aer.EMPTY == aer) { return ByteString.EMPTY; } return ByteString.copyFrom(positiveToByteArray(aer.getValue())); } /** * Convert long value to {@link ByteString} in a little endian form. * * @param longValue long value * @return converted protobuf {@link ByteString} in a little endian */ public static ByteString copyFrom(final long longValue) { final byte[] rawBytes = new byte[8]; rawBytes[0] = (byte) (0xFF & (longValue)); rawBytes[1] = (byte) (0xFF & (longValue >> 8)); rawBytes[2] = (byte) (0xFF & (longValue >> 16)); rawBytes[3] = (byte) (0xFF & (longValue >> 24)); rawBytes[4] = (byte) (0xFF & (longValue >> 32)); rawBytes[5] = (byte) (0xFF & (longValue >> 40)); rawBytes[6] = (byte) (0xFF & (longValue >> 48)); rawBytes[7] = (byte) (0xFF & (longValue >> 56)); return ByteString.copyFrom(rawBytes); } /** * Parse protobuf {@link ByteString} to {@link BytesValue}. * * @param bytesString a protobuf ByteString * @return parsed {@link BytesValue}. */ public static BytesValue parseToBytesValue(final ByteString bytesString) { if (null == bytesString || ByteString.EMPTY.equals(bytesString)) { return BytesValue.EMPTY; } return BytesValue.of(bytesString.toByteArray()); } /** * Parse raw aer to {@link Aer}. * * @param rawAer a raw aer * @return parsed {@link Aer}. */ public static Aer parseToAer(final byte[] rawAer) { if (null == rawAer || 0 == rawAer.length) { return Aer.EMPTY; } return Aer.of(byteArrayToPositive(rawAer)); } /** * Parse raw aer to {@link Aer}. * * @param rawAer a raw aer * @return parsed {@link Aer}. */ public static Aer parseToAer(final ByteString rawAer) { if (null == rawAer || ByteString.EMPTY.equals(rawAer)) { return Aer.EMPTY; } return parseToAer(rawAer.toByteArray()); } /** * Transform {@link ByteString} to {@link TxHash}. * * @param byteString a grpc byteString * @return txHash */ public static TxHash parseToTxHash(final ByteString byteString) { if (null == byteString || ByteString.EMPTY == byteString) { return TxHash.of(BytesValue.EMPTY); } return TxHash.of(BytesValue.of(byteString.toByteArray())); } /** * Transform {@link ByteString} to {@link BlockHash}. * * @param byteString a grpc byteString * @return blockHash */ public static BlockHash parseToBlockHash(final ByteString byteString) { if (null == byteString || ByteString.EMPTY == byteString) { return BlockHash.of(BytesValue.EMPTY); } return BlockHash.of(BytesValue.of(byteString.toByteArray())); } /** * Sha256 digest and return digested in hexa. * * @param string a string * @return a hexa encoded digested raw bytes */ public static String sha256AndEncodeHexa(final String string) { return sha256AndEncodeHexa(string.getBytes()); } /** * Sha256 digest and return digested in hexa. * * @param rawBytes a raw bytes. * @return a hexa encoded digested raw bytes */ public static String sha256AndEncodeHexa(final byte[] rawBytes) { return HexUtils.encode(Sha256Utils.digest(rawBytes)); } private TransportUtils() { } }
[ "sibera21@gmail.com" ]
sibera21@gmail.com
2c7a21b44fe3b2297785f4188d7a2efd3f47d5cd
03e38ebc5c1cb0663c000073a26602ea8e812494
/src/main/java/org/oddjob/rest/actions/FormAction.java
a431ea3a13237f5c3fa8ed9e1de5884d675456ae
[ "Apache-2.0" ]
permissive
robjg/oj-web
ea5fa0ada90397376f788640bfa574ab5208f472
e0910c22c710662d65313db5ac35f6141ce784d1
refs/heads/master
2023-07-05T20:21:10.421336
2023-06-26T06:37:22
2023-06-26T06:37:22
29,576,992
0
0
Apache-2.0
2023-06-13T23:12:23
2015-01-21T07:16:29
Java
UTF-8
Java
false
false
365
java
package org.oddjob.rest.actions; import java.util.Properties; import org.oddjob.rest.model.WebAction; abstract public class FormAction extends BaseAction implements WebAction<Properties> { @Override public Properties castParams(Object params) { return (Properties) params; } @Override public Class<?> getParamsType() { return Properties.class; } }
[ "rob@rgordon.co.uk" ]
rob@rgordon.co.uk
2b2c6bc2ded184a6f0eb9e39dd79fde0272dfd40
3c5f5789f16213b197f2e58da1d1c695d02c9ff4
/loginAuth_v3.0/src/test/java/com/cyan/authentication/tests/LoginTest.java
581f1c15364c470dcf1b58049ecc90ab65ee096b
[]
no_license
Mahnazshamissa/QA--Test-Automation-
4319c9e1d8f55e57ea71d2024b1ae38c58512b07
96986f511998e45b897e6d14144e325828f41433
refs/heads/main
2023-03-11T12:19:35.850005
2021-03-04T14:38:49
2021-03-04T14:38:49
337,232,910
0
0
null
null
null
null
UTF-8
Java
false
false
1,804
java
package com.cyan.authentication.tests; import com.cyan.authentication.common.Browser; import com.cyan.authentication.pages.Login; import org.openqa.selenium.WebDriver; import org.testng.Assert; import org.testng.annotations.AfterSuite; import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; public class LoginTest { public WebDriver driver; @BeforeSuite public void setUp(){ this.driver = Browser.getDriver(); } @AfterSuite public void tearDown(){ driver.close(); } @Test public void validUsernameAndValidPasswordLoginTest() throws InterruptedException { Login login = new Login(driver); login.perform("tomsmith", "SuperSecretPassword!"); Assert.assertTrue(login.getErrorMsg().contains("You logged into a secure area!")); } @Test public void validUsernameAndInvalidPasswordLoginTest() throws InterruptedException { Login login = new Login(driver); login.perform(" tomsmith", "LowSecretPassword"); Assert.assertTrue(login.getErrorMsg().contains("Your username is invalid!")); //Assert.assertTrue(login.getErrorMsg().contains("Your password is invalid!")); //Test failed with errorMsg of password but passed with errorMsg of username !!! } @Test public void invalidUsernameAndValidPasswordLoginTest() throws InterruptedException { Login login = new Login(driver); login.perform("MaxMustermann", "SuperSecretPassword!"); Assert.assertTrue(login.getErrorMsg().contains("Your username is invalid!")); } @Test public void invalidUsernameAndInvalidPasswordLoginTest() throws InterruptedException { Login login = new Login(driver); login.perform("MaxMustermann", "LowSecretPassword"); Assert.assertTrue(login.getErrorMsg().contains("Your username is invalid!")); } }
[ "f.bakhshiani@gmail.com" ]
f.bakhshiani@gmail.com
278cbde244314c224510ee698882e509430a791f
1c99931e81886ebecb758d68003f22e072951ff9
/alipay/api/domain/TemplateColumnInfoDTO.java
832c511d7e360efa4508fc36552bcb0c827bbfa7
[]
no_license
futurelive/vscode
f402e497933c12826ef73abb14506aab3c541c98
9f8d1da984cf4f9f330af2b75ddb21a7fff00eb9
refs/heads/master
2020-04-08T06:30:13.208537
2018-11-26T07:09:55
2018-11-26T07:09:55
159,099,314
0
0
null
null
null
null
UTF-8
Java
false
false
2,904
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-03-22 14:17:06 */ public class TemplateColumnInfoDTO extends AlipayObject { private static final long serialVersionUID = 7449592192246242327L; /** * 标准栏位:行为由支付宝统一定,同时已经分配标准Code BALANCE:会员卡余额 POINT:积分 LEVEL:等级 TELEPHONE:联系方式 自定义栏位:行为由商户定义,自定义Code码(只要无重复) */ @ApiField("code") private String code; /** * 若template_style_info.column_info_layout 的值为grid,此项为宫格项所属分组标题。可空。如果需要展示该项,还需支付宝内部进行特殊配置。 */ @ApiField("group_title") private String groupTitle; /** * 若template_style_info.column_info_layout 的值为grid,此项为宫格项的展示icon。通过接口(alipay.offline.material.image.upload)上传图片。 */ @ApiField("icon_id") private String iconId; /** * 扩展信息 */ @ApiField("more_info") private MoreInfoDTO moreInfo; /** * 1、openNative:打开二级页面,展现 more中descs 2、openWeb:打开URL 3、staticinfo:静态信息 注意: 不填则默认staticinfo; 标准code尽量使用staticinfo,例如TELEPHONE商家电话栏位就只支持staticinfo; */ @ApiField("operate_type") private String operateType; /** * 若template_style_info.column_info_layout 的值为grid,此项为宫格项标签。可空。 */ @ApiField("tag") private String tag; /** * 栏目的标题 */ @ApiField("title") private String title; /** * 卡包详情页面,卡栏位右边展现的值 TELEPHONE栏位的商家联系电话号码由此value字段传入 */ @ApiField("value") private String value; public String getCode() { return this.code; } public void setCode(String code) { this.code = code; } public String getGroupTitle() { return this.groupTitle; } public void setGroupTitle(String groupTitle) { this.groupTitle = groupTitle; } public String getIconId() { return this.iconId; } public void setIconId(String iconId) { this.iconId = iconId; } public MoreInfoDTO getMoreInfo() { return this.moreInfo; } public void setMoreInfo(MoreInfoDTO moreInfo) { this.moreInfo = moreInfo; } public String getOperateType() { return this.operateType; } public void setOperateType(String operateType) { this.operateType = operateType; } public String getTag() { return this.tag; } public void setTag(String tag) { this.tag = tag; } public String getTitle() { return this.title; } public void setTitle(String title) { this.title = title; } public String getValue() { return this.value; } public void setValue(String value) { this.value = value; } }
[ "1052418627@qq.com" ]
1052418627@qq.com
2e7b9215475dd4cf22f05ac27d370e8f3df3ef68
732ac04a2f64fb72c16408b8b980260ad806a74d
/src/com/sun/corba/se/spi/activation/ServerNotRegisteredHelper.java
519f059f25443fdde944d452716ab7c19ff5088c
[ "Apache-2.0" ]
permissive
Golde-nchow/jdk1.8-source-analysis
bb45a4d659ab02de37422b2fefbf452712de3b9e
e30ab95df7f147c261cc2f0c5723b6c530197ad2
refs/heads/master
2022-07-03T01:29:57.438319
2022-06-12T14:20:25
2022-06-12T14:20:25
210,581,079
0
0
Apache-2.0
2019-09-24T11:00:27
2019-09-24T11:00:26
null
UTF-8
Java
false
false
2,843
java
package com.sun.corba.se.spi.activation; /** * com/sun/corba/se/spi/activation/ServerNotRegisteredHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u151/9699/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl * Tuesday, September 5, 2017 7:35:43 PM PDT */ abstract public class ServerNotRegisteredHelper { private static String _id = "IDL:activation/ServerNotRegistered:1.0"; public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.spi.activation.ServerNotRegistered that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static com.sun.corba.se.spi.activation.ServerNotRegistered extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; private static boolean __active = false; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [1]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.corba.se.spi.activation.ServerIdHelper.id (), "ServerId", _tcOf_members0); _members0[0] = new org.omg.CORBA.StructMember ( "serverId", _tcOf_members0, null); __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.id (), "ServerNotRegistered", _members0); __active = false; } } } return __typeCode; } public static String id () { return _id; } public static com.sun.corba.se.spi.activation.ServerNotRegistered read (org.omg.CORBA.portable.InputStream istream) { com.sun.corba.se.spi.activation.ServerNotRegistered value = new com.sun.corba.se.spi.activation.ServerNotRegistered (); // read and discard the repository ID istream.read_string (); value.serverId = istream.read_long (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.spi.activation.ServerNotRegistered value) { // write the repository ID ostream.write_string (id ()); ostream.write_long (value.serverId); } }
[ "793514387@qq.com" ]
793514387@qq.com
90c34aaf8784853928eae22a41216ca3deec18fd
1e109337f4a2de0d7f9a33f11f029552617e7d2e
/modules/jcatapult-user-module/tags/1.0-RC13/src/java/test/integration/org/jcatapult/module/user/BaseIntegrationTest.java
1d470f1415bdbdae6a85482a85a887dba04fcd78
[]
no_license
Letractively/jcatapult
54fb8acb193bc251e5984c80eba997793844059f
f903b78ce32cc5468e48cd7fde220185b2deecb6
refs/heads/master
2021-01-10T16:54:58.441959
2011-12-29T00:43:26
2011-12-29T00:43:26
45,956,606
0
0
null
null
null
null
UTF-8
Java
false
false
4,285
java
/* * Copyright (c) 2001-2007, JCatapult.org, 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 org.jcatapult.module.user; import java.sql.SQLException; import org.jcatapult.config.EnvironmentAwareConfiguration; import org.jcatapult.email.EmailTestHelper; import org.jcatapult.module.user.domain.Address; import org.jcatapult.module.user.domain.DefaultRole; import org.jcatapult.module.user.domain.DefaultUser; import org.jcatapult.module.user.domain.Name; import org.jcatapult.module.user.domain.PhoneNumber; import org.jcatapult.module.user.service.DefaultUserConfiguration; import org.jcatapult.persistence.service.PersistenceService; import org.jcatapult.persistence.test.JPABaseTest; import org.jcatapult.test.MockConfiguration; import org.junit.Ignore; import com.google.inject.Inject; /** * <p> * This class is the base test case for the Jcatapult User module. * It sets up the security context. * </p> * * @author Brian Pontarelli */ @Ignore public class BaseIntegrationTest extends JPABaseTest { protected EnvironmentAwareConfiguration environmentAwareConfiguration; protected PersistenceService persistenceService; public BaseIntegrationTest() { EmailTestHelper.setup(this); } @Inject public void setServices(EnvironmentAwareConfiguration environmentAwareConfiguration, PersistenceService persistenceService) { this.environmentAwareConfiguration = environmentAwareConfiguration; this.persistenceService = persistenceService; } protected void clear() throws SQLException { clearTable("users_roles"); clearTable("users_addresses"); clearTable("addresses"); clearTable("users_phone_numbers"); clearTable("phone_numbers"); clearTable("users"); } /** * Makes a simple configuration where everything is enabled. * * @param registrationDisabled Determines if registration is disabled or not. * @return The configuration mock. */ protected MockConfiguration makeConfiguration(boolean registrationDisabled) { MockConfiguration configuration = new MockConfiguration(environmentAwareConfiguration); configuration.addParameter(DefaultUserConfiguration.REGISTRATION_DISABLED, registrationDisabled); configuration.addParameter(DefaultUserConfiguration.CAPTCHA, false); return configuration; } /** * Creates an User. This assumes that all relationship objects have seed values in the database. * If this isn't true, they should be created here. * * @param login The user login. * @return The User. */ protected DefaultUser makeUser(String login) { DefaultUser user = new DefaultUser(); user.setGuid("test-guid"); user.setUsername(login); user.setEmail(login); user.setPassword("test-password"); user.setCompanyName("test company name"); user.setName(new Name()); user.getName().setFirstName("test first name"); user.getName().setLastName("test first name"); user.getAddresses().put("home", new Address("test street", "test city", "test state", null, "test country", "test postal", "home")); user.getAddresses().put("work", new Address("test street", "test city", "test state", null, "test country", "test postal", "work")); user.getPhoneNumbers().put("work", new PhoneNumber("303-555-5555", "work")); user.getPhoneNumbers().put("home", new PhoneNumber("303-555-5555", "home")); user.getPhoneNumbers().put("cell", new PhoneNumber("303-555-5555", "cell")); user.addRole(persistenceService.findById(DefaultRole.class, 1)); persistenceService.persist(user); return user; } }
[ "bpontarelli@b10e9645-db3f-0410-a6c5-e135923ffca7" ]
bpontarelli@b10e9645-db3f-0410-a6c5-e135923ffca7
c745a42be3287a1d43ed21a90f4bded4aebbf98f
7d1609b510e3c97b2f00568e91cd9a51438275c8
/Java/Java Fundamentals/03.Java OOP Advanced - July 2018/01.02.Gernerics Exercises/src/p0709CustomList/Constants.java
9a51d6f4c6ce34aa204c43d9c7b26645442a6687
[ "MIT" ]
permissive
mgpavlov/SoftUni
80a5d2cbd0348e895f6538651e86fcff65dcebf5
cef1a7e4e475c69bbeb7bfdcaf7b3e64c88d604c
refs/heads/master
2021-01-24T12:36:57.475329
2019-04-30T00:06:15
2019-04-30T00:06:15
123,138,723
1
1
null
null
null
null
UTF-8
Java
false
false
596
java
package p0709CustomList; public final class Constants { public static final String TERMINATE_COMMAND = "END"; public static final String ADD = "Add"; public static final String MAX = "Max"; public static final String MIN = "Min"; public static final String GREATER = "Greater"; public static final String SWAP = "Swap"; public static final String CONTAINS = "Contains"; public static final String PRINT = "Print"; public static final String REMOVE = "Remove"; public static final String SORT = "Sort"; public static final int INITIAL_CAPACITY = 4; }
[ "30524177+mgpavlov@users.noreply.github.com" ]
30524177+mgpavlov@users.noreply.github.com
cd2bd796ed4443dacfbb0be84b36231c165b8a1b
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/88_jopenchart-de.progra.charting.model.JDBCPlotter-0.5-4/de/progra/charting/model/JDBCPlotter_ESTest_scaffolding.java
b3bf6ba9a36b14ee67a1ad410ac05a96c63c2f06
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Oct 29 12:25:30 GMT 2019 */ package de.progra.charting.model; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class JDBCPlotter_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
9273784766ec108f0da3c4f3e9e9c1387af445c3
f9c637ab9501b0a68fa0d18a061cbd555abf1f79
/test/import-data/ImportDataRedis/src/com/adr/bigdata/indexingrd/models/impl/WarehouseProductItemMappingModel.java
601a70c61f93a46611bc918f385aaa42fe8a79b3
[]
no_license
minha361/leanHTMl
c05000a6447b31f7869b75c532695ca2b0cd6968
dc760e7d149480c0b36f3c7064b97d0f3d4b3872
refs/heads/master
2022-06-01T02:54:46.048064
2020-08-11T03:20:34
2020-08-11T03:20:34
48,735,593
0
0
null
2022-05-20T20:49:57
2015-12-29T07:55:48
Java
UTF-8
Java
false
false
1,177
java
package com.adr.bigdata.indexingrd.models.impl; import com.adr.bigdata.indexingrd.models.RdCachedModel; public class WarehouseProductItemMappingModel extends RdCachedModel { public static final String WH_PI_MAPPING_ID = "id"; public static final String WH_PI_MAPPING_WH_ID = "warehouseId"; public static final String WH_PI_MAPPING_PRODUCT_ITEM_ID = "productItemId"; public static final String WH_PI_MAPPING_MERCHANT_ID = "merchantId"; public static final String WH_PI_MAPPING_QUANTITY = "quantity"; public static final String WH_PI_MAPPING_MERCHANT_SKU = "merchantSKU"; public static final String WH_PI_MAPPING_SELL_PRICE = "sellPrice"; public static final String WH_PI_MAPPING_ORIGINAL_PRICE = "originalPrice"; public static final String WH_PI_MAPPING_MERCHANT_PRODUCT_ITEM_STATUS = "merchantProductItemStatus"; public static final String WH_PI_MAPPING_SAFETY_STOCK = "safetyStock"; public static final String WH_PI_MAPPING_UPDATE_TIME = "updateTime"; public static final String WH_PI_MAPPING_IS_VISIBLE = "isVisible"; public static final String WH_PI_MAPPING_VAT_STATUS = "vatStatus"; public static final String WH_PI_MAPPING_PRICE_STATUS = "priceStatus"; }
[ "v.minhlq2@adayroi.com" ]
v.minhlq2@adayroi.com
688a16f3708856c83ac4020f4b41decf2359bf74
7b99a17947eef936b018efc452e3db1d8a3fdc41
/1907-java/src/f_inheri/BankApp.java
0a0821eed0e1bc18941a090ddc7e95086b3d5d13
[]
no_license
choi-hakgeun/1907-java
ff9ac3c91d815d7ef1922eb9a4b648b3fd848e1b
dc7fcd736c3a624735e4235ce97dafd293320886
refs/heads/master
2022-04-10T06:36:36.777594
2020-03-13T08:15:39
2020-03-13T08:15:39
null
0
0
null
null
null
null
UHC
Java
false
false
4,239
java
package f_inheri; import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.JMenuBar; import javax.swing.JMenu; import javax.swing.JMenuItem; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; public class BankApp extends JFrame { private JPanel contentPane; private JMenuBar menuBar; private JMenu menu; private JMenu menu_1; private JMenuItem mntmNewMenuItem; private JMenuItem mntmNewMenuItem_1; private JMenuItem mntmNewMenuItem_2; private JMenuItem mntmNewMenuItem_3; private JMenuItem mntmNewMenuItem_4; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { BankApp frame = new BankApp(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ public BankApp() { setTitle("\uC740\uD589\uAD00\uB9AC0.9"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 450, 300); setJMenuBar(getMenuBar_2()); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); contentPane.setLayout(new BorderLayout(0, 0)); setContentPane(contentPane); } private JMenuBar getMenuBar_2() { if (menuBar == null) { menuBar = new JMenuBar(); menuBar.add(getMenu()); menuBar.add(getMenu_1()); } return menuBar; } private JMenu getMenu() { if (menu == null) { menu = new JMenu("\uACC4\uC88C"); menu.add(getMntmNewMenuItem()); menu.add(getMntmNewMenuItem_4()); menu.add(getMntmNewMenuItem_3()); } return menu; } private JMenu getMenu_1() { if (menu_1 == null) { menu_1 = new JMenu("\uC785\uCD9C\uAE08"); menu_1.add(getMntmNewMenuItem_1()); menu_1.add(getMntmNewMenuItem_2()); } return menu_1; } private JMenuItem getMntmNewMenuItem() { if (mntmNewMenuItem == null) { mntmNewMenuItem = new JMenuItem("\uACC4\uC88C\uC0DD\uC131");//계정생성 mntmNewMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { contentPane.removeAll(); AccountCreate ac = new AccountCreate(); contentPane.add(ac); contentPane.updateUI(); } }); } return mntmNewMenuItem; } private JMenuItem getMntmNewMenuItem_1() { if (mntmNewMenuItem_1 == null) { mntmNewMenuItem_1 = new JMenuItem("\uC785\uAE08");//입금 mntmNewMenuItem_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { contentPane.removeAll(); Deposit dep = new Deposit(); contentPane.add(dep); contentPane.updateUI(); } }); } return mntmNewMenuItem_1; } private JMenuItem getMntmNewMenuItem_2() { if (mntmNewMenuItem_2 == null) { mntmNewMenuItem_2 = new JMenuItem("\uCD9C\uAE08");//출금 mntmNewMenuItem_2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { contentPane.removeAll(); Withdraw wd = new Withdraw(); contentPane.add(wd); contentPane.updateUI(); } }); } return mntmNewMenuItem_2; } private JMenuItem getMntmNewMenuItem_3() { if (mntmNewMenuItem_3 == null) { mntmNewMenuItem_3 = new JMenuItem("\uACC4\uC815\uC218\uC815");//계정수정 mntmNewMenuItem_3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { contentPane.removeAll(); AccountModify am = new AccountModify(); contentPane.add(am); contentPane.updateUI(); } }); } return mntmNewMenuItem_3; } private JMenuItem getMntmNewMenuItem_4() { if (mntmNewMenuItem_4 == null) { mntmNewMenuItem_4 = new JMenuItem("\uACC4\uC815\uBAA9\uB85D");//계정목록 mntmNewMenuItem_4.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { contentPane.removeAll(); AccountList a1 = new AccountList(); contentPane.add(a1); contentPane.updateUI(); } }); } return mntmNewMenuItem_4; } }
[ "JHTA@JHTA-PC" ]
JHTA@JHTA-PC
0428483f8d7ef4119ecccee3f520e38b5ed28db2
e471c3990167e8674a943ad519cf33b3ef7a5c0f
/network/com/ankamagames/dofus/network/messages/game/inventory/items/ObjectsDeletedMessage.java
929e43a68ce677f7496e5309392d0ab7effbef5e
[]
no_license
Romain-P/Dofus-2.44.0-JProtocol
379f4008acc5a15cd536ce2a23458f5a57348215
db79dab05c3bacc6ec67b40d83741a16328a1fae
refs/heads/master
2021-05-15T17:33:24.510521
2017-10-20T08:24:03
2017-10-20T08:24:03
107,510,404
0
0
null
null
null
null
UTF-8
Java
false
false
1,257
java
// Created by Heat the 2017-10-20 01:53:26+02:00 package com.ankamagames.dofus.network.messages.game.inventory.items; import org.heat.dofus.network.NetworkType; import org.heat.dofus.network.NetworkMessage; import org.heat.shared.io.DataWriter; import org.heat.shared.io.DataReader; import org.heat.shared.io.BooleanByteWrapper; import com.ankamagames.dofus.network.InternalProtocolTypeManager; @SuppressWarnings("all") public class ObjectsDeletedMessage extends NetworkMessage { public static final int PROTOCOL_ID = 6034; // array,vi32 public int[] objectUID; public ObjectsDeletedMessage() {} public ObjectsDeletedMessage(int[] objectUID) { this.objectUID = objectUID; } @Override public int getProtocolId() { return 6034; } @Override public void serialize(DataWriter writer) { writer.write_ui16(objectUID.length); writer.write_array_vi32(this.objectUID); } @Override public void deserialize(DataReader reader) { int objectUID_length = reader.read_ui16(); this.objectUID = reader.read_array_vi32(objectUID_length); } @Override public String toString() { return "ObjectsDeletedMessage(" + "objectUID=" + java.util.Arrays.toString(this.objectUID) + ')'; } }
[ "romain.pillot@epitech.eu" ]
romain.pillot@epitech.eu
81f2d676887591079a7307546f1887dcd8e50441
9b9b19971e805a9bd69aad7960b430b45d4670bb
/app/src/main/java/com/sofar/widget/recycler/cell/CityCell.java
703aab841a3a1f02ec084b7eb461c053c3382a9b
[]
no_license
hustersf/Sofar
edee609a12f6f51969d4f36a23776ea341f282bf
f3afdfb5cf0717a97d0436bae5adf7d850e4a562
refs/heads/master
2023-06-23T11:31:47.260784
2023-06-18T12:24:47
2023-06-18T12:24:47
220,133,278
0
0
null
null
null
null
UTF-8
Java
false
false
1,162
java
package com.sofar.widget.recycler.cell; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; import com.sofar.R; import com.sofar.widget.recycler.adapter.expand.ExpandableCell; import com.sofar.widget.recycler.model.College; import com.sofar.widget.recycler.model.CollegeZone; public class CityCell extends ExpandableCell<CollegeZone, College> { private TextView titleTv; private ImageView arrowIv; @Override protected View createView(@NonNull ViewGroup parent) { return LayoutInflater.from(parent.getContext()) .inflate(R.layout.college_city_item, parent, false); } @Override protected void onCreate(@NonNull View rootView) { super.onCreate(rootView); titleTv = rootView.findViewById(R.id.title); arrowIv = rootView.findViewById(R.id.arrow_image); } @Override protected void onBindGroup(@NonNull CollegeZone collegeZone, boolean expand) { super.onBindGroup(collegeZone, expand); titleTv.setText(collegeZone.name); arrowIv.setRotation(expand ? 0 : -90); } }
[ "sofarsogood001@163.com" ]
sofarsogood001@163.com
b2f5e1497c2e58ef55595d03237743337e885661
50baf46a384bae0c291aee25428cb1b180a4ba5f
/android/vida-research/app/src/main/java/com/heaven7/vida/research/utils/ExceptionVerifier.java
6f040d2a700d82905920c4f82fd96368fde18c86
[ "Apache-2.0" ]
permissive
LightSun/research-institute
9c84b5e6bb3005614cc923007ef436c621d33190
48eb3500a00b69bca78242fd648cc1f818b394b0
refs/heads/master
2021-05-15T00:24:18.066470
2019-09-07T07:35:29
2019-09-07T07:35:29
103,363,180
2
1
null
null
null
null
UTF-8
Java
false
false
2,097
java
package com.heaven7.vida.research.utils; /** * the class can help us to verify if VerifyException occurs or not. * * @param <Param> the param used to verify * @param <Result> the verify result, if verify success. */ public abstract class ExceptionVerifier<Param, Result> { /** * verify the exception . and return true if a VerifyException not occurs in run. * * @param params the params to run * @return true if verify success. */ public boolean verify(Param... params) { boolean success = false; Result result = null; try { result = run(params); success = true; } catch (VerifyException e) { onFailed(e); } finally { if (success) { onSuccess(result); } } return success; } /** * called when verify success. * see also: {@link #verify(Object[])} * * @param result the result of run/verify */ protected void onSuccess(Result result) { } /** * the main method to execute verification. * * @param params the params to run * @return the run result * @throws VerifyException if verify failed with VerifyException occurs. */ protected abstract Result run(Param[] params) throws VerifyException ; /** * called when verify failed. that means exception occured. * see also: {@link #verify(Object[])} * * @param e the Verify exception when run/verify throws. */ protected void onFailed(VerifyException e) { } /** * this class indicate verification failed . */ public static class VerifyException extends Exception{ public VerifyException() { } public VerifyException(String detailMessage) { super(detailMessage); } public VerifyException(String detailMessage, Throwable throwable) { super(detailMessage, throwable); } public VerifyException(Throwable throwable) { super(throwable); } } }
[ "978136772@qq.com" ]
978136772@qq.com
61a5f33c04e1d5d31719842821c47b64dd921b8d
0f0603535d370ee0377a27f04f2735a4e305e88f
/_BitManipulation/SmallestPowerOf2GreaterThanOrEqualToNum.java
8736a08c46fce1ef235e57f79b2a8ecc31767b7e
[]
no_license
ishu2/DS-and-Algorithms
a35f6983222f15c3273328bf74bfe79ff3261b96
3b400915ed011144e8d577e95a485e0a23f1e90c
refs/heads/master
2022-01-16T11:08:51.979218
2017-10-10T06:26:34
2017-10-10T06:26:34
106,179,778
0
0
null
null
null
null
UTF-8
Java
false
false
637
java
package GeeksForGeeks_BitManipulation; import java.util.Scanner; public class SmallestPowerOf2GreaterThanOrEqualToNum { public static int findNumber(int num) { if(num==0 || num==1) { return 1; } int i=1; int count=0; while(i<num) { count++; i=i<<1; } return count; } public static void main(String[] args) { Scanner s=new Scanner(System.in); System.out.println("enter num :"); int num=s.nextInt(); int res=findNumber(num); System.out.println("Smallest power of two greater than or equal to "+num+" :"); System.out.println(res); System.out.println("Number is :"+Math.pow(2, res)); } }
[ "rathiishita123@gmail.com" ]
rathiishita123@gmail.com
1263b0a5fb6dc730b8c805482314313dafddede7
2ab3272a5676eac57d0c10dfdec44a11e2446342
/bankProject_v2.1/src/bank/view/BankMenu.java
ce0a2d88171f1791247232212965bf9652158f7c
[]
no_license
godsungsoo/DongUk
bc128fbbce6416dfd090fcfa7426dc8d54ce4a10
b9a774914a318000f1f35098091238dca56889a7
refs/heads/master
2020-04-18T19:11:36.901220
2019-02-06T09:35:50
2019-02-06T09:35:50
167,706,227
0
0
null
null
null
null
UTF-8
Java
false
false
6,487
java
package bank.view; import java.util.ArrayList; import java.util.Scanner; import bank.controller.BankController; import bank.model.vo.Bank; public class BankMenu { //DI private Scanner sc = new Scanner(System.in); private BankController bController = new BankController(); public BankMenu() {} public void displayMenu() { do { System.out.println("*** 계좌 관리 프로그램 ***"); System.out.print("\n1. 관리자메뉴" + "\n2. 사용자메뉴" + "\n3. 프로그램 종료" + "\n메뉴 선택 :"); switch(sc.nextInt()) { case 1 :adminMenu(); break; case 2 :userMenu(); break; case 3 :System.out.print("종료(y), 취소(n) :"); if(sc.next().toLowerCase().charAt(0) == 'y') { return; } else { break; } default : System.out.println("잘못 입력하셨습니다."); System.out.println("확인 후 다시 입력하세요.\n"); break; } } while(true); } public void adminMenu() { do { System.out.println("*** 관리자 메뉴 ***"); System.out.print( "\n1. 신규고객 통장개설" + "\n2. 기존고객 통장개설" + "\n3. 전체 고객 통장 조회" + "\n4. 고객 이름으로 통장 조회" + "\n5. 계좌번호로 거래내역 조회" + "\n6. 고객 핸드폰 번호 변경" + "\n7. 통장삭제" + "\n8. 이전으로 돌아가기" + "\n메뉴 선택 :"); switch(sc.nextInt()) { case 1 :bController.bankNewInsert(bankNewInsert()); break; case 2 :bController.bankInsert(bankInsert()); break; case 3 :printInfo(bController.selectAll()); break; case 4 :printInfo(bController.selectName(inputUserName())); break; case 5 :printTrans(bController.selectAccount(inputAccountNo())); break; case 6 :bController.updatePhone(inputPhone()); break; case 7 :bController.deleteAccount(inputDeleteAccount()); break; case 8 :System.out.print("이전 메뉴로 돌아가시겠습니까(y,n) ? :"); if(sc.next().toLowerCase().charAt(0) == 'y') { return; } else { break; } default :System.out.println("잘못 입력하셨습니다."); System.out.println("확인 후 다시 입력하세요.\n"); break; } } while(true); } public void userMenu() { do { System.out.println("*** 사용자메뉴 ***"); System.out.print("\n\r1. 입금" + "\n2. 출금" + "\n3. 계좌이체" + "\n4. 계좌조회" + "\n5. 이전으로 돌아가기" + "\n메뉴 선택 :"); switch(sc.nextInt()) { case 1 :bController.insertDeposit(inputDeposit()); break; case 2 :bController.insertWithdraw(inputWithdraw()); break; case 3 :bController.insertTransaction(inputTransaction()); break; case 4 :printTrans(bController.selectAccount(inputAccountNo())); break;//출력용 메소드 하나 더 필요 case 5 :System.out.print("이전 메뉴로 돌아가시겠습니까(y,n) ? :"); if(sc.next().toLowerCase().charAt(0) == 'y') { return; } else { break; } default : System.out.println("잘못 입력하셨습니다."); System.out.println("확인 후 다시 입력하세요.\n"); break; } } while(true); } public Bank bankNewInsert() { Bank bank = new Bank(); System.out.print("고객명 입력 : "); bank.setUserName(sc.next()); System.out.print("주민번호 입력[-포함] : "); bank.setUserSsn(sc.next()); System.out.print("핸드폰 번호 입력[-포함] : "); bank.setPhone(sc.next()); System.out.print("첫 입금액 입력[1000원 이상] : "); bank.setDeposit(sc.nextInt()); return bank; } public Bank bankInsert() { Bank bank = new Bank(); System.out.print("고객명 입력 : "); bank.setUserName(sc.next()); System.out.print("주민번호 입력[-포함] : "); bank.setUserSsn(sc.next()); System.out.print("첫 입금액 입력 [1000원 이상] : "); bank.setDeposit(sc.nextInt()); return bank; } public void printInfo(ArrayList<Bank> bankList) { for(Bank bank : bankList) { System.out.println(bank.getUserNo()+", "+bank.getUserName()+", "+bank.getAccountNo()+", "+bank.getBalance()+", "+bank.getOpenDate()+", "+bank.getTransDate()+", "+bank.getPhone()); } } public void printTrans(ArrayList<Bank> bankList) { for(Bank bank : bankList) { System.out.println(bank); } } public Bank inputTransaction() { Bank bank = new Bank(); System.out.print("본인 계좌번호[-포함] : ");//로그인개념 bank.setAccountNo(sc.next()); System.out.print("계좌이체할 상대방 계좌[-포함] : "); bank.setTransAccountNo(sc.next()); System.out.print("금액 : "); bank.setWithdraw(sc.nextInt()); return bank; } public String inputAccountNo() { System.out.print("계좌번호[-포함] : "); return sc.next(); } public Bank inputUserName() { Bank bank = new Bank(); System.out.print("고객명 : "); bank.setUserName(sc.next()); System.out.print("주민번호 : "); bank.setUserSsn(sc.next()); return bank; } public Bank inputPhone() { Bank bank = new Bank(); System.out.print("고객명 : "); bank.setUserName(sc.next()); System.out.print("주민번호 입력[-포함] : "); bank.setUserSsn(sc.next()); System.out.print("바꿀 핸드폰 번호 입력[-포함] : "); bank.setPhone(sc.next()); return bank; } public Bank inputDeposit() { Bank bank = new Bank(); System.out.print("계좌번호 입력[-포함] : "); bank.setAccountNo(sc.next()); System.out.print("입금액 :"); bank.setDeposit(sc.nextInt()); return bank; } public Bank inputWithdraw() { Bank bank = new Bank(); System.out.print("계좌번호 입력[-포함] : "); bank.setAccountNo(sc.next()); System.out.print("출금액 :"); bank.setWithdraw(sc.nextInt()); return bank; } public Bank inputDeleteAccount() { Bank bank = new Bank(); System.out.print("고객명 : "); bank.setUserName(sc.next()); System.out.print("주민번호[-포함] : "); bank.setUserSsn(sc.next()); System.out.print("삭제할 계좌번호 : "); bank.setAccountNo(sc.next()); printInfo(bController.selectAccount(bank.getAccountNo())); System.out.println("삭제할 계좌가 해당 계좌가 맞습니까? [y/n] : "); if(sc.next().toLowerCase().charAt(0) == 'n') { System.out.println("관리자 메뉴로 돌아갑니다."); adminMenu(); } return bank; } }
[ "kdw912001@naver.com" ]
kdw912001@naver.com
8901540b9f1d2945b940eb81f888c6811fb51086
3b1a022b4e36227aa5f8a784289e44994ad87a0b
/src/me/fromgate/reactions/TpLoc.java
b4daf23a10f4c206955eb60ed9aa9c2088bba815
[]
no_license
wolfwork/ReActions
9d1bc0c1e6d7ade96727ee7ddc4d7e8550ac3d4f
f8f8fbc0f7eafb4bcd790c8af8ef466e350a8f60
refs/heads/master
2021-01-22T18:38:39.874231
2014-03-26T16:29:33
2014-03-26T16:29:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,331
java
/* * ReActions, Minecraft bukkit plugin * (c)2012-2013, fromgate, fromgate@gmail.com * http://dev.bukkit.org/server-mods/reactions/ * * * This file is part of ReActions. * * ReActions 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. * * ReActions 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 ReActions. If not, see <http://www.gnorg/licenses/>. * */ package me.fromgate.reactions; import java.text.DecimalFormat; import org.bukkit.Bukkit; import org.bukkit.Location; public class TpLoc { String world; double x; double y; double z; float yaw; float pitch; //int radius; public TpLoc (Location loc){ this.world = loc.getWorld().getName(); this.x = loc.getX(); this.y = loc.getY(); this.z = loc.getZ(); this.yaw= loc.getYaw(); this.pitch = loc.getPitch(); //this.radius = 0; } /*public RALoc (Location loc,int radius){ this.world = loc.getWorld().getName(); this.x = loc.getX(); this.y = loc.getY(); this.z = loc.getZ(); this.yaw= loc.getYaw(); this.pitch = loc.getPitch(); this.radius = radius; }*/ public TpLoc (String world, double x, double y, double z, float yaw, float pitch){ this.world = world; this.x = x; this.y = y; this.z = z; this.yaw= yaw; this.pitch = pitch; // this.radius = 0; } /*public RALoc (String world, double x, double y, double z, float yaw, float pitch, int radius){ this.world = world; this.x = x; this.y = y; this.z = z; this.yaw= yaw; this.pitch = pitch; this.radius = radius; }*/ public Location getLocation(){ return new Location (Bukkit.getWorld(world),x,y,z,yaw,pitch); } /* public Location getCentralLocation(){ return new Location (Bukkit.getWorld(world),x,y,z,yaw,pitch); } public Location getLocation(){ return Util.getRandomLocationInRadius(new Location (Bukkit.getWorld(world),x,y,z,yaw,pitch), this.radius); }*/ public boolean equalToLoc(Location loc){ return (loc.getWorld().getName().equalsIgnoreCase(this.world)&& (Math.round(loc.getX())==Math.round(x))&& (Math.round(loc.getY())==Math.round(y))&& (Math.round(loc.getZ())==Math.round(z))); } @Override public String toString(){ DecimalFormat fmt = new DecimalFormat("####0.##"); //return "["+this.world+"] "+fmt.format(x)+", "+fmt.format(y)+", "+fmt.format(z)+((this.radius>0)?" @R"+this.radius : ""); return "["+this.world+"] "+fmt.format(x)+", "+fmt.format(y)+", "+fmt.format(z); } }
[ "fromgate@gmail.com" ]
fromgate@gmail.com
dd0f5ccde82e5198987391f92b2fa23b82054cad
8025ab860e2f78883b2edd52039de766a99ff4f4
/Client/Class113.java
bc1522cd1d0c34a695245ee08549c66b0ffc3dcb
[ "Beerware" ]
permissive
Phynvi/CodeUSA-Deob
6198642937b1d2603de191197f4d7aec87e5bdaf
d4cc1e853f34158710d4b46d9dcc2ffdb9a60391
refs/heads/master
2020-12-06T04:11:01.504157
2018-06-24T11:03:36
2018-06-24T11:03:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,375
java
/* Class113 - Decompiled by JODE * Visit http://jode.sourceforge.net/ */ final class Class113 { static int anInt950; static int[] anIntArray951 = { 0, -1, 0, 1 }; static int anInt952; static Class143 aClass143_953; static long aLong954; int anInt955; static final Class85[] method2143(int i) { try { return (new Class85[] { Class6.aClass85_89, Class373_Sub3.aClass85_5474, ha_Sub1.aClass85_4299, Class98_Sub23.aClass85_4007, Class60.aClass85_471, Class133.aClass85_3454, Class98_Sub10_Sub16.aClass85_5621, SurfaceSkin.aClass85_332, Class79.aClass85_600, Class351.aClass85_2921, Class98_Sub11.aClass85_3868, Class246_Sub4_Sub2.aClass85_6186, Class64_Sub10.aClass85_3667, Class242.aClass85_1849, Class39.aClass85_362 }); } catch (RuntimeException runtimeexception) { throw Class64_Sub27.printError(runtimeexception, "hda.B(" + i + ')'); } } static final void method2144(int i, int i_0_) { try { if (i != -4365) method2144(88, -16); Class169.anInt1307 = -1; Class98_Sub40.anInt4197 = i_0_; Class169.anInt1307 = -1; aa_Sub1.method155(i + 4364); } catch (RuntimeException runtimeexception) { throw Class64_Sub27.printError(runtimeexception, "hda.C(" + i + ',' + i_0_ + ')'); } } public final String toString() { try { throw new IllegalStateException(); } catch (RuntimeException runtimeexception) { throw Class64_Sub27.printError(runtimeexception, "hda.toString(" + ')'); } } static final void method2145(byte i) { try { if (i != -46) aClass143_953 = null; Class98_Sub9.aBoolean3851 = true; } catch (RuntimeException runtimeexception) { throw Class64_Sub27.printError(runtimeexception, "hda.D(" + i + ')'); } } public static void method2146(byte i) { try { anIntArray951 = null; if (i > 106) aClass143_953 = null; } catch (RuntimeException runtimeexception) { throw Class64_Sub27.printError(runtimeexception, "hda.A(" + i + ')'); } } Class113(int i, int i_1_) { try { ((Class113) this).anInt955 = i_1_; } catch (RuntimeException runtimeexception) { throw Class64_Sub27.printError(runtimeexception, ("hda.<init>(" + i + ',' + i_1_ + ')')); } } static { anInt950 = -1; anInt952 = 0; aLong954 = -1L; } }
[ "andrew@codeusa523.org" ]
andrew@codeusa523.org
a5ee4b439614aee9055832675571ff24df989862
edea7ce5177e587980f6ad783310d566e90b3995
/FunnyTrip/src/jdbc/vo/GuideVO.java
22f5d068061a0cb8b541fcfb9ae5b9b5c1614a71
[]
no_license
hezekiah320/Hezekiah
7220c50dadabb4833ff53fdede94559aee537b6f
2416bec4cd7b1fec1d3847fc9f7b3c049feba3c5
refs/heads/master
2020-03-28T18:36:07.086983
2018-11-21T01:24:28
2018-11-21T01:24:28
148,894,750
0
0
null
null
null
null
UTF-8
Java
false
false
1,428
java
package jdbc.vo; public class GuideVO { Integer guideNumber, guideCount; String id, pw, name, gender, message, imgSrc,regDate; //regDate도 String으로 받는다. public GuideVO() { } /* guideNumber : seq , guideCount : default 0 , redDate : sysdate */ public GuideVO(String id, String pw, String name, String gender, String message, String imgSrc) { this.id = id; this.pw = pw; this.name = name; this.gender = gender; this.message = message; this.imgSrc = imgSrc; } public Integer getGuideNumber() { return guideNumber; } public Integer getGuideCount() { return guideCount; } public String getId() { return id; } public String getPw() { return pw; } public String getName() { return name; } public String getGender() { return gender; } public String getMessage() { return message; } public String getImgSrc() { return imgSrc; } public String getRegDate() { return regDate; } public void setGuideCount(Integer guideCount) { this.guideCount = guideCount; } public void setId(String id) { this.id = id; } public void setPw(String pw) { this.pw = pw; } public void setName(String name) { this.name = name; } public void setMessage(String message) { this.message = message; } public void setImgSrc(String imgSrc) { this.imgSrc = imgSrc; } }
[ "soldesk@soldesk-PC" ]
soldesk@soldesk-PC
937e69eabb0ff9a0c3ebe129564e23e4750e7e2f
95bca8b42b506860014f5e7f631490f321f51a63
/dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/package-info.java
9067265f766d1b77eddd9542ca08cebc1eeaf9ba
[ "BSD-3-Clause" ]
permissive
hispindia/HP-2.7
d5174d2c58423952f8f67d9846bec84c60dfab28
bc101117e8e30c132ce4992a1939443bf7a44b61
refs/heads/master
2022-12-25T04:13:06.635159
2020-09-29T06:32:53
2020-09-29T06:32:53
84,940,096
0
0
BSD-3-Clause
2022-12-15T23:53:32
2017-03-14T11:13:27
Java
UTF-8
Java
false
false
1,976
java
/* * Copyright (c) 2004-2012, University of Oslo * 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 HISP 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. */ /** * @author bobj */ @XmlSchema( namespace = "http://dhis2.org/schema/dxf/2.0", xmlns = { @XmlNs(namespaceURI = "http://dhis2.org/schema/dxf/2.0", prefix = "d") }, elementFormDefault = XmlNsForm.QUALIFIED) package org.hisp.dhis.expression; import javax.xml.bind.annotation.XmlSchema; import javax.xml.bind.annotation.XmlNs; import javax.xml.bind.annotation.XmlNsForm;
[ "mithilesh.hisp@gmail.com" ]
mithilesh.hisp@gmail.com
39dca35b5901c7cf2da4aa54b4089016b43e5a6b
872147bec4452dbdc6786cc04010a1455e08590d
/JavaBase/Practice/src/基础语法练习/多线程/基本使用/Runable实现/Test.java
8232a7953c52233a022d45c2a358b41627131b66
[]
no_license
yuanyyb/JavaStudy
f3eb26bf0383c9f8a327322987bd711cd7544319
5595b7ad893d11212a59e5c6c2d5ce12d0e91a3f
refs/heads/master
2022-12-02T00:42:21.787688
2020-07-30T10:15:10
2020-07-30T10:15:10
283,765,631
0
0
null
null
null
null
UTF-8
Java
false
false
292
java
package 基础语法练习.多线程.基本使用.Runable实现; public class Test { public static void main(String[] args) { MyThread mt = new MyThread(); Thread tr = new Thread(mt); tr.start(); Thread tr2 = new Thread(mt); tr2.start(); } }
[ "yuanyyb@hotmail.com" ]
yuanyyb@hotmail.com
7316aff1c5a51c5c211c98b47b975f94e3be813b
ba0657f835fe4a2fb0b0524ad2a38012be172bc8
/src/main/java/designpatterns/hf/creational/factory/pizzastylebystore/store/NYPizzaStore.java
1e772c21c1ccfff22865f1a3f9c58c3708a59d41
[]
no_license
jsdumas/java-dev-practice
bc2e29670dd6f1784b3a84f52e526a56a66bbba2
db85b830e7927fea863d95f5ea8baf8d3bdc448b
refs/heads/master
2020-12-02T16:28:41.081765
2017-12-08T23:10:53
2017-12-08T23:10:53
96,547,922
0
0
null
null
null
null
UTF-8
Java
false
false
914
java
package designpatterns.hf.creational.factory.pizzastylebystore.store; import designpatterns.hf.creational.factory.pizzastylebystore.pizza.NYStyleCheesePizza; import designpatterns.hf.creational.factory.pizzastylebystore.pizza.NYStyleClamPizza; import designpatterns.hf.creational.factory.pizzastylebystore.pizza.NYStylePepperoniPizza; import designpatterns.hf.creational.factory.pizzastylebystore.pizza.NYStyleVeggiePizza; import designpatterns.hf.creational.factory.pizzastylebystore.pizza.Pizza; public class NYPizzaStore extends PizzaStore { @Override Pizza createPizza(String item) { if (item.equals("cheese")) { return new NYStyleCheesePizza(); } else if (item.equals("veggie")) { return new NYStyleVeggiePizza(); } else if (item.equals("clam")) { return new NYStyleClamPizza(); } else if (item.equals("pepperoni")) { return new NYStylePepperoniPizza(); } else return null; } }
[ "jsdumas@free.fr" ]
jsdumas@free.fr
5426b01dad7ef901f261607b5dbf158161b38bbf
4c19b724f95682ed21a82ab09b05556b5beea63c
/XMSYGame/java2/server/web-manager/src/main/java/com/xmsy/server/zxyy/manager/modules/manager/userriskconfig/service/impl/UserRiskConfigServiceImpl.java
75afcdb67b133ae3299c44ce40c92b3e88662394
[]
no_license
angel-like/angel
a66f8fda992fba01b81c128dd52b97c67f1ef027
3f7d79a61dc44a9c4547a60ab8648bc390c0f01e
refs/heads/master
2023-03-11T03:14:49.059036
2022-11-17T11:35:37
2022-11-17T11:35:37
222,582,930
3
5
null
2023-02-22T05:29:45
2019-11-19T01:41:25
JavaScript
UTF-8
Java
false
false
740
java
package com.xmsy.server.zxyy.manager.modules.manager.userriskconfig.service.impl; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.xmsy.server.zxyy.manager.modules.manager.userriskconfig.dao.UserRiskConfigDao; import com.xmsy.server.zxyy.manager.modules.manager.userriskconfig.entity.UserRiskConfigEntity; import com.xmsy.server.zxyy.manager.modules.manager.userriskconfig.service.UserRiskConfigService; @Service("userRiskConfigService") public class UserRiskConfigServiceImpl extends ServiceImpl<UserRiskConfigDao, UserRiskConfigEntity> implements UserRiskConfigService { @Override public Long physicalDelete(Long id) { return baseMapper.physicalDelete(id); } }
[ "163@qq.com" ]
163@qq.com
3823fc0ca0abd92a001690bdae46e8324fb7d97a
112a579bcf27a2d63c367bf476b34fcf2faeb707
/base/src/main/java/prosayj/thinking/spring/_09_cglib_proxy/CglibProxyTest.java
03fcd15377668b46577c3c34315fc84ec4f4b708
[]
no_license
ProSayJ/think-in-spring
78b4a7d0b4f0e08bf42c16fcda48c451fcb41165
507a2bacd16af92b1320781fc4d1739118c8323d
refs/heads/main
2023-06-22T16:58:36.037144
2021-07-21T07:20:34
2021-07-21T07:20:34
332,664,184
0
0
null
null
null
null
UTF-8
Java
false
false
2,236
java
package prosayj.thinking.spring._09_cglib_proxy; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cglib.proxy.Enhancer; import org.springframework.cglib.proxy.MethodInterceptor; import org.springframework.cglib.proxy.MethodProxy; import java.lang.reflect.Method; /** * Cglib 实现动态代理 * <p>1. JDK动态代理 Proxy.newProxyInstance() 通过接口创建代理的实现类 * <br>2. Cglib动态代理 Enhancer 通过继承父类创建的代理类 * @author yangjian * @date 2021-07-04 下午 03:46 * @since 1.0.0 */ public class CglibProxyTest { public final Logger logger = LoggerFactory.getLogger(this.getClass()); /** * Cglib 实现动态代理 */ @Test @DisplayName("Cglib 实现动态代理") public void m1() { //1 创建原始对象 UserService userService = new UserService(); /* 2 通过cglib方式创建动态代理对象 Proxy.newProxyInstance(classloader,interface,invocationhandler) Enhancer.setClassLoader() Enhancer.setSuperClass() Enhancer.setCallback(); ---> MethodInterceptor(cglib) Enhancer.create() ---> 代理 */ Enhancer enhancer = new Enhancer(); enhancer.setClassLoader(CglibProxyTest.class.getClassLoader()); enhancer.setSuperclass(userService.getClass()); MethodInterceptor interceptor = new MethodInterceptor() { //等同于 InvocationHandler --- invoke @Override public Object intercept(Object o, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { logger.info("------cglib proxy log before --------"); Object ret = method.invoke(userService, args); logger.info("------cglib proxy log after --------"); return ret; } }; enhancer.setCallback(interceptor); UserService userServiceProxy = (UserService) enhancer.create(); userServiceProxy.createUser("李四", 24); userServiceProxy.login("张三", "123"); } }
[ "15665662468@163.com" ]
15665662468@163.com
181dba46ef53fb39f2f476295acd5535c457b1ab
0ac69eee3e890f9980fe9985dbd78b2402c3a08e
/20170413/src/yichang/ExceptionDemo3.java
32b604afaa29d272023896ecba831428a0c258e9
[]
no_license
ltt19921124/learnjava
f14f6c61139ea5ae1e15f6f596ec99aee16ef20b
4122013e8d75874fbd00009f684ac45e4c89c1ef
refs/heads/master
2021-01-19T14:29:13.925023
2017-05-24T10:48:31
2017-05-24T10:48:31
88,137,154
0
0
null
null
null
null
GB18030
Java
false
false
2,149
java
package yichang; /* * * 负数角标异常在java总并没有定义过 * 就按照java异常的创建思想,面向对象,将负数角标进行自定义描述,并封装成对象 * * 注意:让一个类称为异常类,必须继承异常体系,因为只有成为异常体系的子类才具有可抛性 * 才可以被两个关键字所操作 * * * 异常的分类: * 1,被检测异常:只要是Exception和其子类都是,除了特殊子类RuntimeException体系 * 这种问题出现,希望在编译时就进行检测,让这种问题有对应的处理方式 * * 2,编译时不检测异常(运行时异常):就是Exception中的RuntimeException和其子体系 * 这种问题的发生无法让功能继续,运算无法进行,更多是调用者的原因导致的,或者引发了内部状态 * 导致的。一般不处理,直接编译通过,在运行时,让调用者调用时强制停止,让调用者对代码进行修改 * * 自定义异常时,要么继承自Exception,要么继承自runtimeExeption * * throws:用在函数上,抛出的异常类,可以抛出多个,用逗号隔开 * * throw:用在函数内,抛出的是异常对象。引发一个异常 * * */ class FushujiaobiaoException extends Exception{ FushujiaobiaoException(){ } FushujiaobiaoException(String msg){ super(msg); } } class Demo_1 { public int method(int[] arr,int index) throws FushujiaobiaoException { // System.out.println(arr[index]); // System.out.println("haha"); if(arr == null) { throw new NullPointerException("数组引用不能为空"); } if (index >= arr.length) { throw new ArrayIndexOutOfBoundsException("数组" + index); } if (index < 0) { throw new FushujiaobiaoException("角标为负了"); } return arr[index]; } } public class ExceptionDemo3 { public static void main(String[] args) throws FushujiaobiaoException{ int[] arr = new int[3]; // arr = null; Demo_1 d = new Demo_1(); int num = d.method(null, -30); // d.method(arr, 3); System.out.println("num=" + num); System.out.println("over"); } }
[ "ltt19921124@163.com" ]
ltt19921124@163.com
7832c06f02e53bf8db5c71c7393dc4e45fafdaad
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/TemperatureController1089.java
1058397ccff6d8c02cd3438bcef1d6b1d7d74248
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
371
java
package syncregions; public class TemperatureController1089 { public int execute(int temperature1089, int targetTemperature1089) { //sync _bfpnFUbFEeqXnfGWlV1089, behaviour 1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
3f7ca6c4e7c891a95c89bac100c1aeecd99576d6
bf5d614b4731e00e1ced41a1e0b193fd7e39d32a
/src/com/axp/model/AbstractProxyZones.java
93c0441f005777f3663c0f6dc0136dca759a58cc
[]
no_license
sengeiou/dailyAI
7ecb9589a79c9297b1390bc5f1a07e5dc1479b66
8056240d213c7294ef5961dbae3ededc32e1565c
refs/heads/master
2021-10-19T07:15:59.303598
2019-02-19T03:12:36
2019-02-19T03:12:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,119
java
package com.axp.model; /** * AbstractProxyZones entity provides the base persistence definition of the * ProxyZones entity. @author MyEclipse Persistence Tools */ public abstract class AbstractProxyZones implements java.io.Serializable { // Fields private Integer id; private String name; private Boolean isvalid; private Integer parentId; // Constructors /** default constructor */ public AbstractProxyZones() { } /** full constructor */ public AbstractProxyZones(String name, Boolean isvalid, Integer parentId) { this.name = name; this.isvalid = isvalid; this.parentId = parentId; } // Property accessors public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public Boolean getIsvalid() { return this.isvalid; } public void setIsvalid(Boolean isvalid) { this.isvalid = isvalid; } public Integer getParentId() { return this.parentId; } public void setParentId(Integer parentId) { this.parentId = parentId; } }
[ "crazyda@outlook.com" ]
crazyda@outlook.com
9dbfa93e3b9dcb459ebea9cdcd3a9843363cb236
e709ec9e5cf6e9732b53e1d0d0e9f9eca3f23eb3
/core/src/main/java/com/yinmimoney/web/p2pnew/dto/base/BaseDto.java
61691274c9ecb508c1101c2bbd1e9e90257ce009
[]
no_license
OrmFor/coc
0ebeab287508c64ff6aec354c2388471bfcc19b4
970d3d2838be73395e630938ab6efa2abaf41ae4
refs/heads/master
2022-12-22T05:01:32.558308
2019-10-25T01:45:47
2019-10-25T01:45:47
217,427,407
0
0
null
2022-12-16T03:16:12
2019-10-25T01:39:11
JavaScript
UTF-8
Java
false
false
715
java
package com.yinmimoney.web.p2pnew.dto.base; /** * * @Description 基础参数 * @author wzq * @date 2018年8月16日 下午5:29:42 */ public class BaseDto { private Integer page = 1;// 某页,默认1 private Integer pageSize = 10;// 每页大小,固定10 private Integer beginIndex = 0;// sql,limit起始下标 public Integer getPage() { return page; } public void setPage(Integer page) { this.page = page; } public Integer getPageSize() { return pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; } public Integer getBeginIndex() { return beginIndex; } public void setBeginIndex(Integer beginIndex) { this.beginIndex = beginIndex; } }
[ "34675763+OrmFor@users.noreply.github.com" ]
34675763+OrmFor@users.noreply.github.com
c8c36fa507e9976fc374d1f445df6060a9fa35fd
e65722e4ef1eaba22b0197cb0af3bcac68775b84
/networking/java_net_url_example/src/org/academiadecodigo/porto/Main.java
49b28e7254b79d5c16de613a68be194d1c7c8563
[]
no_license
martimdLima/java-fundamentals
80aafd1f1745a0f8959146dcd8313c1dbfd3bb16
382d5f781665dd6514a0cb4fea014450b0160463
refs/heads/main
2022-12-29T03:24:14.523452
2020-10-13T00:02:49
2020-10-13T00:02:49
303,540,755
0
0
null
null
null
null
UTF-8
Java
false
false
2,627
java
package org.academiadecodigo.porto; import java.io.*; import java.net.HttpURLConnection; import java.net.URL; import java.util.Scanner; public class Main { private static void getContentFromUrl(String url) { String line; URL url2; InputStream urlStream; DataInputStream html; try { url2 = new URL(url); urlStream = url2.openStream(); html = new DataInputStream(urlStream); line = new String(html.readAllBytes()); System.out.println("***** URL content *****" + "\n"); while ((line != null)) { System.out.println(line); } } catch (Exception ex) { System.out.println("ex: " + ex); } } private static String getContentFromHttpUrl(URL url) throws IOException { HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); try { InputStream in = urlConnection.getInputStream(); Scanner scanner = new Scanner(in); scanner.useDelimiter("\\A"); boolean urlInput = scanner.hasNext(); String response = null; if (urlInput) { response = scanner.next(); } scanner.close(); return response; } catch(IOException ex) { ex.printStackTrace(); } finally { urlConnection.disconnect(); } return null; } private static void getContentFromHttpUrl2(URL url) { try { String inputLine; try (BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()))) { System.out.println("***** URL content *****" + "\n"); while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); } } }catch(IOException ex) { ex.printStackTrace(); } } public static void main(String[] args) { try { getContentFromUrl("https://www.sapo.pt"); String content = getContentFromHttpUrl(new URL("http", "www.google.com", "")); System.out.println("***** URL content *****" + "\n"); System.out.println(content); System.out.println(); getContentFromHttpUrl2(new URL("http", "www.google.com", "")); } catch (IOException ex) { ex.printStackTrace(); } } }
[ "martim.d.lima@protonmail.com" ]
martim.d.lima@protonmail.com
9e71142c7f75188a35648fb990d0179e876b0c5d
8022511ad71cf4b1eccbc4ce6ce6af1dd7c88bec
/oim-fx/src/test/java/com/oim/test/ui/WindowFrameTest.java
ba3ebe7fe3fa7abd5f08c4b3c0f7f4f9de3abdc1
[]
no_license
softfn/im-for-pc
f5411d88c172adbda75099582ae70dcd18e08958
e34a62c337e1b7f0c0fd39286353a8c71d5864ad
refs/heads/master
2020-07-16T23:53:31.585700
2016-11-17T01:59:15
2016-11-17T01:59:15
73,938,576
1
1
null
null
null
null
UTF-8
Java
false
false
587
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.oim.test.ui; import javafx.application.Application; import javafx.stage.Stage; /** * * @author Only */ public class WindowFrameTest extends Application { @Override public void start(Stage primaryStage) { new WindowFrame(); } /** * @param args the command line arguments */ public static void main(String[] args) { launch(args); } }
[ "softfn@hotmail.com" ]
softfn@hotmail.com
cb83fb7ad65098d7f448d977538adc03ac4894af
3bc62f2a6d32df436e99507fa315938bc16652b1
/tapestry/src/test/testData/AbstractComponent.java
72f916e3f60d761724c39197a6db6a261743876a
[ "Apache-2.0" ]
permissive
JetBrains/intellij-obsolete-plugins
7abf3f10603e7fe42b9982b49171de839870e535
3e388a1f9ae5195dc538df0d3008841c61f11aef
refs/heads/master
2023-09-04T05:22:46.470136
2023-06-11T16:42:37
2023-06-11T16:42:37
184,035,533
19
29
Apache-2.0
2023-07-30T14:23:05
2019-04-29T08:54:54
Java
UTF-8
Java
false
false
206
java
package com.testapp.base; import org.apache.tapestry5.annotations.Parameter; import java.text.DateFormat; public class AbstractComponent { public String getText() { return getInheritedText(); } }
[ "yuriy.artamonov@jetbrains.com" ]
yuriy.artamonov@jetbrains.com
45b05ae9d732e9eb25c310ccb90890a7c273c415
1cae4b6b150f0e72c8fc0dc2a60d9cd63c6273df
/src/main/java/com/jeeplus/modules/monitor/utils/SystemInfo.java
4f71b4f20609ba0c58dc0ad03e002d5113b78f9f
[]
no_license
huangzhibing/softwareComponents
fb5f6752c46c5d2b0d502e4fed93c761a3ecdae7
df6351b7851a4c4fdf36a32935c9a564ff1d8605
refs/heads/master
2020-04-25T22:23:50.345700
2019-03-04T08:12:16
2019-03-04T08:12:16
173,110,129
1
2
null
null
null
null
UTF-8
Java
false
false
1,849
java
package com.jeeplus.modules.monitor.utils; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; public class SystemInfo { public static Map SystemProperty() { Map<String, Comparable> monitorMap = new HashMap(); Runtime r = Runtime.getRuntime(); Properties props = System.getProperties(); InetAddress addr = null; String ip = ""; String hostName = ""; try { addr = InetAddress.getLocalHost(); } catch (UnknownHostException e) { ip = "无法获取主机IP"; hostName = "无法获取主机名"; } if (null != addr) { try { ip = addr.getHostAddress(); } catch (Exception e) { ip = "无法获取主机IP"; } try { hostName = addr.getHostName(); } catch (Exception e) { hostName = "无法获取主机名"; } } monitorMap.put("hostIp", ip);// 本地ip地址 monitorMap.put("hostName", hostName);// 本地主机名 monitorMap.put("osName", props.getProperty("os.name"));// 操作系统的名称 monitorMap.put("arch", props.getProperty("os.arch"));// 操作系统的构架 monitorMap.put("osVersion", props.getProperty("os.version"));// 操作系统的版本 monitorMap.put("processors", r.availableProcessors());// JVM可以使用的处理器个数 monitorMap.put("javaVersion", props.getProperty("java.version"));// Java的运行环境版本 monitorMap.put("vendor", props.getProperty("java.vendor"));// Java的运行环境供应商 monitorMap.put("javaUrl", props.getProperty("java.vendor.url"));// Java供应商的URL monitorMap.put("javaHome", props.getProperty("java.home"));// Java的安装路径 monitorMap.put("tmpdir", props.getProperty("java.io.tmpdir"));// 默认的临时文件路径 return monitorMap; } }
[ "745216570@qq.com" ]
745216570@qq.com
46b5a97b3a8cd4588724cb4ba4ce062e4d3c5095
81be6755cff2e3166e45f3827dbb998e69bebb53
/src/main/java/com/CIMthetics/jvulkan/Wayland/Enums/WlSeatCapability.java
1e804e23bb293249c4eb96c2878ce09796669561
[ "Apache-2.0" ]
permissive
dkaip/jvulkan
a48f461c42228c38f6f070e4e1be9962098e839a
ff3547ccc17b39e264b3028672849ccd4e59addc
refs/heads/master
2021-07-06T23:21:57.192034
2020-09-13T23:04:46
2020-09-13T23:04:46
183,513,821
0
0
null
null
null
null
UTF-8
Java
false
false
1,199
java
/* * Copyright 2019-2020 Douglas Kaip * * 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.CIMthetics.jvulkan.Wayland.Enums; public enum WlSeatCapability { POINTER(1), KEYBOARD(2), TOUCH(4); private int value; private WlSeatCapability(int value) { this.value = value; } public int valueOf() { return value; } static public WlSeatCapability fromValue(int value) { for(WlSeatCapability listValue : WlSeatCapability.values()) { if (listValue.valueOf() == value) { return listValue; } } return null; } }
[ "dkaip@earthlink.net" ]
dkaip@earthlink.net
5834ed3a10a62b1b4dfb25bfeda0a616760ba89a
ee711e756dc4472cf6780d2e05bced2cc753a98b
/GameEngine/src/main/java/com/devefx/edge/math/Mat4.java
4dc5504f9496946cd3f1803b712e4a5b1e7584ba
[]
no_license
devefx/tempSite
e4ec6561cf0c13820e5d2ae93bdde044dc7eeb73
a43d15ae483bc521d48b79d70c50cc3269254a9a
refs/heads/master
2020-12-24T22:29:12.607796
2016-12-15T10:28:58
2016-12-15T10:28:58
56,752,535
0
0
null
null
null
null
UTF-8
Java
false
false
5,732
java
package com.devefx.edge.math; import com.devefx.edge.base.types.Vec3; public class Mat4 { public float[] m = new float[16]; public Mat4() { loadIdentity(); } public Mat4(Mat4 mat) { set( mat.m[0], mat.m[1], mat.m[2], mat.m[3], mat.m[4], mat.m[5], mat.m[6], mat.m[7], mat.m[8], mat.m[9], mat.m[10], mat.m[11], mat.m[12], mat.m[13], mat.m[14], mat.m[15]); } public Mat4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) { set(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44); } public void set(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) { m[0] = m11; m[1] = m21; m[2] = m31; m[3] = m41; m[4] = m12; m[5] = m22; m[6] = m32; m[7] = m42; m[8] = m13; m[9] = m23; m[10] = m33; m[11] = m43; m[12] = m14; m[13] = m24; m[14] = m34; m[15] = m44; } public Mat4 clone() { return new Mat4(this); } public void loadIdentity() { set(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); } public void multiply(Mat4 matrix) { float product[] = new float[16]; product[0] = m[0] * matrix.m[0] + m[4] * matrix.m[1] + m[8] * matrix.m[2] + m[12] * matrix.m[3]; product[1] = m[1] * matrix.m[0] + m[5] * matrix.m[1] + m[9] * matrix.m[2] + m[13] * matrix.m[3]; product[2] = m[2] * matrix.m[0] + m[6] * matrix.m[1] + m[10] * matrix.m[2] + m[14] * matrix.m[3]; product[3] = m[3] * matrix.m[0] + m[7] * matrix.m[1] + m[11] * matrix.m[2] + m[15] * matrix.m[3]; product[4] = m[0] * matrix.m[4] + m[4] * matrix.m[5] + m[8] * matrix.m[6] + m[12] * matrix.m[7]; product[5] = m[1] * matrix.m[4] + m[5] * matrix.m[5] + m[9] * matrix.m[6] + m[13] * matrix.m[7]; product[6] = m[2] * matrix.m[4] + m[6] * matrix.m[5] + m[10] * matrix.m[6] + m[14] * matrix.m[7]; product[7] = m[3] * matrix.m[4] + m[7] * matrix.m[5] + m[11] * matrix.m[6] + m[15] * matrix.m[7]; product[8] = m[0] * matrix.m[8] + m[4] * matrix.m[9] + m[8] * matrix.m[10] + m[12] * matrix.m[11]; product[9] = m[1] * matrix.m[8] + m[5] * matrix.m[9] + m[9] * matrix.m[10] + m[13] * matrix.m[11]; product[10] = m[2] * matrix.m[8] + m[6] * matrix.m[9] + m[10] * matrix.m[10] + m[14] * matrix.m[11]; product[11] = m[3] * matrix.m[8] + m[7] * matrix.m[9] + m[11] * matrix.m[10] + m[15] * matrix.m[11]; product[12] = m[0] * matrix.m[12] + m[4] * matrix.m[13] + m[8] * matrix.m[14] + m[12] * matrix.m[15]; product[13] = m[1] * matrix.m[12] + m[5] * matrix.m[13] + m[9] * matrix.m[14] + m[13] * matrix.m[15]; product[14] = m[2] * matrix.m[12] + m[6] * matrix.m[13] + m[10] * matrix.m[14] + m[14] * matrix.m[15]; product[15] = m[3] * matrix.m[12] + m[7] * matrix.m[13] + m[11] * matrix.m[14] + m[15] * matrix.m[15]; this.m = product; } public void translate(float x, float y, float z) { Mat4 matrix = new Mat4(); createTranslation(x, y, z, matrix); multiply(matrix); } public void transformPoint(Vec3 point, Vec3 dst) { assert(dst != null); transformVector(point.x, point.y, point.z, 1.0f, dst); } public void transformVector(float x, float y, float z, float w, Vec3 dst) { dst.x = x * m[0] + y * m[4] + z * m[8] + w * m[12]; dst.y = x * m[1] + y * m[5] + z * m[9] + w * m[13]; dst.z = x * m[2] + y * m[6] + z * m[10] + w * m[14]; } public static void createPerspective(float fieldOfView, float aspectRatio, float zNearPlane, float zFarPlane, Mat4 dst) { float f_n = 1.0f / (zFarPlane - zNearPlane); float theta = fieldOfView * 0.0174532925f * 0.5f; if (Math.abs(theta % 57079632679489661923f) < 0.000001f) { System.err.println(String.format("Invalid field of view value (%s) causes attempted calculation tan(%s), which is undefined.", fieldOfView, theta)); return; } float divisor = (float) Math.tan(theta); float factor = 1.0f / divisor; dst.m = new float[16]; dst.m[0] = (1.0f / aspectRatio) * factor; dst.m[5] = factor; dst.m[10] = (-(zFarPlane + zNearPlane)) * f_n; dst.m[11] = -1.0f; dst.m[14] = -2.0f * zFarPlane * zNearPlane * f_n; } public static void createOrthographic(float width, float height, float zNearPlane, float zFarPlane, Mat4 dst) { float halfWidth = width / 2.0f; float halfHeight = height / 2.0f; createOrthographicOffCenter(-halfWidth, halfWidth, -halfHeight, halfHeight, zNearPlane, zFarPlane, dst); } public static void createOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane, Mat4 dst) { dst.m = new float[16]; dst.m[0] = 2 / (right - left); dst.m[5] = 2 / (top - bottom); dst.m[10] = 2 / (zNearPlane - zFarPlane); dst.m[12] = (left + right) / (left - right); dst.m[13] = (top + bottom) / (bottom - top); dst.m[14] = (zNearPlane + zFarPlane) / (zNearPlane - zFarPlane); dst.m[15] = 1; } public static void createTranslation(Vec3 translation, Mat4 dst) { dst.m[12] = translation.x; dst.m[13] = translation.y; dst.m[14] = translation.z; } public static void createTranslation(float xTranslation, float yTranslation, float zTranslation, Mat4 dst) { dst.m[12] = xTranslation; dst.m[13] = yTranslation; dst.m[14] = zTranslation; } public static Mat4 multiplyMatrix(Mat4 m1, Mat4 m2) { Mat4 res = new Mat4(m1); res.multiply(m2); return res; } }
[ "devefx@163.com" ]
devefx@163.com
a5ca7bc73b03bb098be9a388ed8105fc7e427f40
7f298c2bf9ff5a61eeb87e3929e072c9a04c8832
/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxTag.java
e52e6d112fc18c3e170d8c679edda980dc6f4604
[ "Apache-2.0" ]
permissive
stwen/my-spring5
1ca1e85786ba1b5fdb90a583444a9c030fe429dd
d44be68874b8152d32403fe87c39ae2a8bebac18
refs/heads/master
2023-02-17T19:51:32.686701
2021-01-15T05:39:14
2021-01-15T05:39:14
322,756,105
0
0
null
null
null
null
UTF-8
Java
false
false
7,978
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.servlet.tags.form; import java.util.Collection; import javax.servlet.jsp.JspException; import org.springframework.web.bind.WebDataBinder; /** * The {@code <checkbox>} tag renders an HTML 'input' tag with type 'checkbox'. * May be used in one of three different approaches depending on the * type of the {@link #getValue bound value}. * * <h3>Approach One</h3> * When the bound value is of type {@link Boolean} then the '{@code input(checkbox)}' * is marked as 'checked' if the bound value is {@code true}. The '{@code value}' * attribute corresponds to the resolved value of the {@link #setValue(Object) value} property. * <h3>Approach Two</h3> * When the bound value is of type {@link Collection} then the '{@code input(checkbox)}' * is marked as 'checked' if the configured {@link #setValue(Object) value} is present in * the bound {@link Collection}. * <h3>Approach Three</h3> * For any other bound value type, the '{@code input(checkbox)}' is marked as 'checked' * if the configured {@link #setValue(Object) value} is equal to the bound value. * * <p> * <table> * <caption>Attribute Summary</caption> * <thead> * <tr> * <th class="colFirst">Attribute</th> * <th class="colOne">Required?</th> * <th class="colOne">Runtime Expression?</th> * <th class="colLast">Description</th> * </tr> * </thead> * <tbody> * <tr class="altColor"> * <td><p>accesskey</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Standard Attribute</p></td> * </tr> * <tr class="rowColor"> * <td><p>cssClass</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Optional Attribute</p></td> * </tr> * <tr class="altColor"> * <td><p>cssErrorClass</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Optional Attribute. Used when the bound field has errors.</p></td> * </tr> * <tr class="rowColor"> * <td><p>cssStyle</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Optional Attribute</p></td> * </tr> * <tr class="altColor"> * <td><p>dir</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Standard Attribute</p></td> * </tr> * <tr class="rowColor"> * <td><p>disabled</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true' * will disable the HTML element.</p></td> * </tr> * <tr class="altColor"> * <td><p>htmlEscape</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>Enable/disable HTML escaping of rendered values.</p></td> * </tr> * <tr class="rowColor"> * <td><p>id</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Standard Attribute</p></td> * </tr> * <tr class="altColor"> * <td><p>label</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>Value to be displayed as part of the tag</p></td> * </tr> * <tr class="rowColor"> * <td><p>lang</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Standard Attribute</p></td> * </tr> * <tr class="altColor"> * <td><p>onblur</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="rowColor"> * <td><p>onchange</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="altColor"> * <td><p>onclick</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="rowColor"> * <td><p>ondblclick</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="altColor"> * <td><p>onfocus</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="rowColor"> * <td><p>onkeydown</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="altColor"> * <td><p>onkeypress</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="rowColor"> * <td><p>onkeyup</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="altColor"> * <td><p>onmousedown</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="rowColor"> * <td><p>onmousemove</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="altColor"> * <td><p>onmouseout</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="rowColor"> * <td><p>onmouseover</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="altColor"> * <td><p>onmouseup</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Event Attribute</p></td> * </tr> * <tr class="rowColor"> * <td><p>path</p></td> * <td><p>true</p></td> * <td><p>true</p></td> * <td><p>Path to property for data binding</p></td> * </tr> * <tr class="altColor"> * <td><p>tabindex</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Standard Attribute</p></td> * </tr> * <tr class="rowColor"> * <td><p>title</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Standard Attribute</p></td> * </tr> * <tr class="altColor"> * <td><p>value</p></td> * <td><p>false</p></td> * <td><p>true</p></td> * <td><p>HTML Optional Attribute</p></td> * </tr> * </tbody> * </table> * * @author Rob Harrop * @author Juergen Hoeller * @since 2.0 */ @SuppressWarnings("serial") public class CheckboxTag extends AbstractSingleCheckedElementTag { @Override protected int writeTagContent(TagWriter tagWriter) throws JspException { super.writeTagContent(tagWriter); if (!isDisabled()) { // Write out the 'field was present' marker. tagWriter.startTag("input"); tagWriter.writeAttribute("type", "hidden"); String name = WebDataBinder.DEFAULT_FIELD_MARKER_PREFIX + getName(); tagWriter.writeAttribute("name", name); tagWriter.writeAttribute("value", processFieldValue(name, "on", getInputType())); tagWriter.endTag(); } return SKIP_BODY; } @Override protected void writeTagDetails(TagWriter tagWriter) throws JspException { tagWriter.writeAttribute("type", getInputType()); Object boundValue = getBoundValue(); Class<?> valueType = getBindStatus().getValueType(); if (Boolean.class == valueType || boolean.class == valueType) { // the concrete type may not be a Boolean - can be String if (boundValue instanceof String) { boundValue = Boolean.valueOf((String) boundValue); } Boolean booleanValue = (boundValue != null ? (Boolean) boundValue : Boolean.FALSE); renderFromBoolean(booleanValue, tagWriter); } else { Object value = getValue(); if (value == null) { throw new IllegalArgumentException("Attribute 'value' is required when binding to non-boolean values"); } Object resolvedValue = (value instanceof String ? evaluate("value", value) : value); renderFromValue(resolvedValue, tagWriter); } } @Override protected String getInputType() { return "checkbox"; } }
[ "xianhao_gan@qq.com" ]
xianhao_gan@qq.com
d550aee96895f01f073f7906dc621bf6c9134579
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/p2189io/reactivex/p2210d/p2215e/p2221f/SingleResumeNext.java
3162acc7a1a179fe5bd5b097465d8dfb0e3f3a4f
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,270
java
package p2189io.reactivex.p2210d.p2215e.p2221f; import java.util.concurrent.atomic.AtomicReference; import p2189io.reactivex.Single; import p2189io.reactivex.SingleObserver; import p2189io.reactivex.SingleSource; import p2189io.reactivex.disposables.Disposable; import p2189io.reactivex.p2208b.C31732b; import p2189io.reactivex.p2208b.CompositeException; import p2189io.reactivex.p2209c.AbstractC31736h; import p2189io.reactivex.p2210d.p2211a.DisposableHelper; import p2189io.reactivex.p2210d.p2212b.ObjectHelper; import p2189io.reactivex.p2210d.p2214d.ResumeSingleObserver; /* renamed from: io.reactivex.d.e.f.u */ /* compiled from: SingleResumeNext */ public final class SingleResumeNext<T> extends Single<T> { /* renamed from: a */ final SingleSource<? extends T> f110560a; /* renamed from: b */ final AbstractC31736h<? super Throwable, ? extends SingleSource<? extends T>> f110561b; public SingleResumeNext(SingleSource<? extends T> acVar, AbstractC31736h<? super Throwable, ? extends SingleSource<? extends T>> hVar) { this.f110560a = acVar; this.f110561b = hVar; } /* access modifiers changed from: protected */ @Override // p2189io.reactivex.Single /* renamed from: a */ public void mo129801a(SingleObserver<? super T> aaVar) { this.f110560a.subscribe(new C32111a(aaVar, this.f110561b)); } /* renamed from: io.reactivex.d.e.f.u$a */ /* compiled from: SingleResumeNext */ static final class C32111a<T> extends AtomicReference<Disposable> implements SingleObserver<T>, Disposable { private static final long serialVersionUID = -5314538511045349925L; /* renamed from: a */ final SingleObserver<? super T> f110562a; /* renamed from: b */ final AbstractC31736h<? super Throwable, ? extends SingleSource<? extends T>> f110563b; C32111a(SingleObserver<? super T> aaVar, AbstractC31736h<? super Throwable, ? extends SingleSource<? extends T>> hVar) { this.f110562a = aaVar; this.f110563b = hVar; } @Override // p2189io.reactivex.SingleObserver public void onSubscribe(Disposable disposable) { if (DisposableHelper.setOnce(this, disposable)) { this.f110562a.onSubscribe(this); } } @Override // p2189io.reactivex.SingleObserver public void onSuccess(T t) { this.f110562a.onSuccess(t); } @Override // p2189io.reactivex.SingleObserver public void onError(Throwable th) { try { ((SingleSource) ObjectHelper.m147684a(this.f110563b.apply(th), "The nextFunction returned a null SingleSource.")).subscribe(new ResumeSingleObserver(this, this.f110562a)); } catch (Throwable th2) { C31732b.m147608b(th2); this.f110562a.onError(new CompositeException(th, th2)); } } @Override // p2189io.reactivex.disposables.Disposable public void dispose() { DisposableHelper.dispose(this); } @Override // p2189io.reactivex.disposables.Disposable public boolean isDisposed() { return DisposableHelper.isDisposed((Disposable) get()); } } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
0092cf65b72b800d299eae55fe5ec4b57fbdef7a
553ef1329bd05860cbc413919120e912576d4a7c
/nebua/src/main/java/com/nebula/view/recyclerview/progressindicator/indicators/LineSpinFadeLoaderIndicator.java
e86b7d5885c73473187ccf5c197fe0cb99370cf8
[]
no_license
qydq/nebula
a7b1a9610c076012ed306ef056a08160596c79e9
e4e9dd91c1d59e09004e162cddc33d6b5f26f211
refs/heads/master
2020-03-15T20:47:11.273363
2018-05-06T13:39:14
2018-05-06T13:39:14
132,340,938
0
0
null
null
null
null
UTF-8
Java
false
false
931
java
package com.nebula.view.recyclerview.progressindicator.indicators; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.RectF; /** * Created by Jack on 2015/10/24. * Email:81813780@qq.com */ public class LineSpinFadeLoaderIndicator extends BallSpinFadeLoaderIndicator { @Override public void draw(Canvas canvas, Paint paint) { float radius=getWidth()/10; for (int i = 0; i < 8; i++) { canvas.save(); Point point=circleAt(getWidth(),getHeight(),getWidth()/2.5f-radius,i*(Math.PI/4)); canvas.translate(point.x, point.y); canvas.scale(scaleFloats[i], scaleFloats[i]); canvas.rotate(i*45); paint.setAlpha(alphas[i]); RectF rectF=new RectF(-radius,-radius/1.5f,1.5f*radius,radius/1.5f); canvas.drawRoundRect(rectF,5,5,paint); canvas.restore(); } } }
[ "qyddai@163.com" ]
qyddai@163.com
e94c8e865b653b2a5b21eb668b3c4ec0d941d6c9
971e9494b26bdf04c0bd3e48ff2c2644534a603f
/neverpile-commons-condition/src/test/java/com/neverpile/common/condition/Config.java
c13ea8047e3b103ca52d16348ccdd6e7f05a85c4
[ "Apache-2.0" ]
permissive
levigo/neverpile-commons
05ada6e545e7c957c51a7fc44ad1e9d97b262404
186cc8f9e6c23d7a132ef0b70457b4832541d763
refs/heads/master
2023-08-28T09:31:17.923931
2023-07-12T16:35:15
2023-07-12T16:35:15
244,644,015
0
1
Apache-2.0
2023-09-07T14:01:59
2020-03-03T13:32:12
Java
UTF-8
Java
false
false
931
java
package com.neverpile.common.condition; import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; import com.fasterxml.jackson.databind.util.StdDateFormat; import com.neverpile.common.condition.config.ConditionModule; @SpringBootConfiguration @Import({ ConditionModule.class }) public class Config { @Bean Jackson2ObjectMapperBuilderCustomizer jacksonCustomizer() { return b -> { b.annotationIntrospector(new JacksonAnnotationIntrospector()); b.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); b.dateFormat(new StdDateFormat()); }; } }
[ "j.henne@levigo.de" ]
j.henne@levigo.de
719a73999e17fa43c4418131f089b84af1a7dea8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_b933956d6c3432634e1fb42af3e4c5064aeb5b5b/JSStringTransformer/2_b933956d6c3432634e1fb42af3e4c5064aeb5b5b_JSStringTransformer_s.java
18680f3f62b1bd13732a84bfd5f572855b2b453e
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,732
java
/* * This file is part of the Wayback archival access software * (http://archive-access.sourceforge.net/projects/wayback/). * * Licensed to the Internet Archive (IA) by one or more individual * contributors. * * The IA licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.archive.wayback.replay.html.transformer; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.archive.wayback.replay.html.ReplayParseContext; import org.archive.wayback.replay.html.StringTransformer; /** * Attempts to rewrite any absolute URLs found within the text/javascript MIME * * @author brad * */ public class JSStringTransformer implements StringTransformer { private final static Pattern httpPattern = Pattern .compile("(http:\\\\?/\\\\?/[A-Za-z0-9:_@.-]+)"); public String transform(ReplayParseContext context, String input) { StringBuffer replaced = new StringBuffer(input.length()); Matcher m = httpPattern.matcher(input); while (m.find()) { String host = m.group(1); m.appendReplacement(replaced, context.contextualizeUrl(host)); } m.appendTail(replaced); return replaced.toString(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
aaf4bf19979abe7536e4c5af34c75febdb0d400b
2f5cd5ba8a78edcddf99c7e3c9c19829f9dbd214
/java/playgrounds/.svn/pristine/aa/aaf4bf19979abe7536e4c5af34c75febdb0d400b.svn-base
255c022fbc1ea01cfd85b036569e8366591a416a
[]
no_license
HTplex/Storage
5ff1f23dfe8c05a0a8fe5354bb6bbc57cfcd5789
e94faac57b42d6f39c311f84bd4ccb32c52c2d30
refs/heads/master
2021-01-10T17:43:20.686441
2016-04-05T08:56:57
2016-04-05T08:56:57
55,478,274
1
1
null
2020-10-28T20:35:29
2016-04-05T07:43:17
Java
UTF-8
Java
false
false
4,751
/* *********************************************************************** * * project: org.matsim.* * * * *********************************************************************** * * * * copyright : (C) 2014 by the members listed in the COPYING, * * LICENSE and WARRANTY file. * * email : info at matsim dot org * * * * *********************************************************************** * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * See also COPYING, LICENSE and WARRANTY file * * * * *********************************************************************** */ package playground.agarwalamit.mixedTraffic.seepage.TestSetUp; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.Scenario; import org.matsim.api.core.v01.TransportMode; import org.matsim.api.core.v01.population.Leg; import org.matsim.api.core.v01.population.Person; import org.matsim.api.core.v01.population.PlanElement; import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.events.EventsUtils; import org.matsim.core.events.algorithms.EventWriterXML; import org.matsim.core.mobsim.qsim.QSim; import org.matsim.core.mobsim.qsim.QSimUtils; import org.matsim.core.scenario.ScenarioImpl; import org.matsim.vehicles.Vehicle; import org.matsim.vehicles.VehicleType; import org.matsim.vehicles.VehicleUtils; import playground.agarwalamit.mixedTraffic.MixedTrafficVehiclesUtils; /** * @author amit */ public class SeepageControler { public static final String outputDir = "../../../repos/shared-svn/projects/mixedTraffic/seepage/xt_1Link/seepage/"; static final List<String> mainModes = Arrays.asList(TransportMode.car,TransportMode.bike); static final String seepMode = "bike"; static final String isSeepModeStorageFree = "false"; private void run (){ CreateInputs inputs = new CreateInputs(); inputs.run(); Scenario sc = inputs.getScenario(); sc.getConfig().qsim().setUseDefaultVehicles(false); ((ScenarioImpl)sc).createVehicleContainer(); Map<String, VehicleType> modeVehicleTypes = new HashMap<String, VehicleType>(); for(String travelMode:mainModes){ VehicleType mode = VehicleUtils.getFactory().createVehicleType(Id.create(travelMode,VehicleType.class)); mode.setMaximumVelocity(MixedTrafficVehiclesUtils.getSpeed(travelMode)); mode.setPcuEquivalents(MixedTrafficVehiclesUtils.getPCU(travelMode)); modeVehicleTypes.put(travelMode, mode); sc.getVehicles().addVehicleType(mode); } for(Person p:sc.getPopulation().getPersons().values()){ Id<Vehicle> vehicleId = Id.create(p.getId(),Vehicle.class); String travelMode = null; for(PlanElement pe :p.getSelectedPlan().getPlanElements()){ if (pe instanceof Leg) { travelMode = ((Leg)pe).getMode(); break; } } Vehicle vehicle = VehicleUtils.getFactory().createVehicle(vehicleId,modeVehicleTypes.get(travelMode)); sc.getVehicles().addVehicle(vehicle); } EventsManager manager = EventsUtils.createEventsManager(); EventWriterXML eventWriterXML = new EventWriterXML(outputDir+"/events.xml"); manager.addHandler(eventWriterXML); QSim qSim = QSimUtils.createDefaultQSim(sc, manager); qSim.run(); eventWriterXML.closeFile(); // new QPositionDataWriterForR().run(); // new TravelTimeAnalyzer(outputDir).run(); } public static void main(String[] args) { new SeepageControler().run(); // CreateInputs inputs = new CreateInputs(); // inputs.run(); // Scenario sc = inputs.getScenario(); // // Controler myController = new Controler(sc.getConfig()); // myController.setOverwriteFiles(true) ; // myController.setCreateGraphs(true); // myController.setMobsimFactory(new PatnaQSimFactory()); //// myController.addSnapshotWriterFactory("otfvis", new OTFFileWriterFactory()); // myController.setDumpDataAtEnd(true); // myController.run(); // myController.setMobsimFactory(new SeepageMobsimfactory()); } }
[ "htplex@gmail.com" ]
htplex@gmail.com
5fdb48098b1680da8d7da23c35be497bb1256d88
806f76edfe3b16b437be3eb81639d1a7b1ced0de
/src/com/google/android/gms/common/internal/aw.java
b926c982302ec6066b8a2c7b024de89edfcc1319
[]
no_license
magic-coder/huawei-wear-re
1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01
935ad32f5348c3d8c8d294ed55a5a2830987da73
refs/heads/master
2021-04-15T18:30:54.036851
2018-03-22T07:16:50
2018-03-22T07:16:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,765
java
package com.google.android.gms.common.internal; import android.os.Bundle; import android.os.IBinder; import android.os.Parcel; import android.os.RemoteException; class aw implements au { private IBinder f423a; aw(IBinder iBinder) { this.f423a = iBinder; } public void mo1768a(int i, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.gms.common.internal.IGmsCallbacks"); obtain.writeInt(i); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f423a.transact(2, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } public void mo1769a(int i, IBinder iBinder, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.gms.common.internal.IGmsCallbacks"); obtain.writeInt(i); obtain.writeStrongBinder(iBinder); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f423a.transact(1, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } public IBinder asBinder() { return this.f423a; } }
[ "lebedev1537@gmail.com" ]
lebedev1537@gmail.com