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
5be5a9423e543cc0da69675a5ca097a0aab0d6f8
c6f63cf4524567f12d4226b9cdcbfee9c5c3d95c
/gen/main/java/org/hl7/fhir/ProcedureFocalDevice.java
b2302958e0546da827d6de593239531bf434ee8b
[]
no_license
usnistgov/fhir.emf
83852f9388619fa7b76c05dd725c311c96e733e6
affea7e1fc2b53cb67e706f47264b408909b2253
refs/heads/master
2021-01-11T02:40:21.282622
2016-10-21T18:51:25
2016-10-21T18:51:25
70,912,620
1
0
null
null
null
null
UTF-8
Java
false
false
2,827
java
/** */ package org.hl7.fhir; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Procedure Focal Device</b></em>'. * <!-- end-user-doc --> * * <!-- begin-model-doc --> * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy. * <!-- end-model-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link org.hl7.fhir.ProcedureFocalDevice#getAction <em>Action</em>}</li> * <li>{@link org.hl7.fhir.ProcedureFocalDevice#getManipulated <em>Manipulated</em>}</li> * </ul> * * @see org.hl7.fhir.FhirPackage#getProcedureFocalDevice() * @model extendedMetaData="name='Procedure.FocalDevice' kind='elementOnly'" * @generated */ public interface ProcedureFocalDevice extends BackboneElement { /** * Returns the value of the '<em><b>Action</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * The kind of change that happened to the device during the procedure. * <!-- end-model-doc --> * @return the value of the '<em>Action</em>' containment reference. * @see #setAction(CodeableConcept) * @see org.hl7.fhir.FhirPackage#getProcedureFocalDevice_Action() * @model containment="true" * extendedMetaData="kind='element' name='action' namespace='##targetNamespace'" * @generated */ CodeableConcept getAction(); /** * Sets the value of the '{@link org.hl7.fhir.ProcedureFocalDevice#getAction <em>Action</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Action</em>' containment reference. * @see #getAction() * @generated */ void setAction(CodeableConcept value); /** * Returns the value of the '<em><b>Manipulated</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * The device that was manipulated (changed) during the procedure. * <!-- end-model-doc --> * @return the value of the '<em>Manipulated</em>' containment reference. * @see #setManipulated(Reference) * @see org.hl7.fhir.FhirPackage#getProcedureFocalDevice_Manipulated() * @model containment="true" required="true" * extendedMetaData="kind='element' name='manipulated' namespace='##targetNamespace'" * @generated */ Reference getManipulated(); /** * Sets the value of the '{@link org.hl7.fhir.ProcedureFocalDevice#getManipulated <em>Manipulated</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Manipulated</em>' containment reference. * @see #getManipulated() * @generated */ void setManipulated(Reference value); } // ProcedureFocalDevice
[ "geoffry.roberts@nist.gov" ]
geoffry.roberts@nist.gov
5026f37016ce563317923462d25d930e208c6f29
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_3/src/b/g/b/f/Calc_1_3_16159.java
da3245c643eb32e152c1d2d445a724d94c9f9bcd
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package b.g.b.f; public class Calc_1_3_16159 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
6b14f47a09aae5ae9d943c0cab05c1e82d669efa
9c75beccff2dcd9177e3b10095362e7a5efaae84
/src/main/java/com/hzmc/nbgsyn/business/dao/IServiceUserDao.java
168e83db5cdfaaabc100148ef43e9c7b1c820588
[]
no_license
mc-chentf/nbgsyn
0b06f9931f614828b64501d7e5abf2cabdf339cb
bc65f44347ff00bd5a53553c780f4da552c0da40
refs/heads/master
2020-05-22T01:05:55.634307
2016-09-28T06:16:56
2016-09-28T06:16:56
63,122,923
0
0
null
null
null
null
UTF-8
Java
false
false
193
java
package com.hzmc.nbgsyn.business.dao; import com.hzmc.nbgsyn.pojo.ServiceUser; public interface IServiceUserDao { public ServiceUser findServiceUserByCondition(ServiceUser serviceUser); }
[ "chentf@mchz.com.cn" ]
chentf@mchz.com.cn
f1c543e553feed542b1d7962dfd8494773fddbb7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_eb177a0acc4d982bee5c27a89176470cbad7cd7f/CatchClause/6_eb177a0acc4d982bee5c27a89176470cbad7cd7f_CatchClause_t.java
256ac0d03d67f01ea1673e241c07b1ea0f64bbec
[]
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
608
java
package net.primitive.javascript.core.ast; import lombok.Getter; import net.primitive.javascript.core.visitors.StatementVisitor; public class CatchClause extends Statement { @Getter private final String identifier; @Getter private final Statement[] statements; public CatchClause(String identifier, AstNodeList astNode) { this.identifier = identifier; this.statements = astNode.getAstNodes().toArray(new Statement[] {}); astNode.setParentNode(this); } @Override public void accept(StatementVisitor visitor) { visitor.visitCatchClause(this); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
27d75a85087179cb4068845c57829f71ef0cef38
b66bdee811ed0eaea0b221fea851f59dd41e66ec
/src/com/grubhub/AppBaseLibrary/android/dataServices/a/b/g.java
57349328604768a81a4342a3912d754e1b835a44
[]
no_license
reverseengineeringer/com.grubhub.android
3006a82613df5f0183e28c5e599ae5119f99d8da
5f035a4c036c9793483d0f2350aec2997989f0bb
refs/heads/master
2021-01-10T05:08:31.437366
2016-03-19T20:41:23
2016-03-19T20:41:23
54,286,207
0
0
null
null
null
null
UTF-8
Java
false
false
1,061
java
package com.grubhub.AppBaseLibrary.android.dataServices.a.b; import android.content.Context; import com.grubhub.AppBaseLibrary.android.dataServices.a.i; import com.grubhub.AppBaseLibrary.android.dataServices.b.b; import com.grubhub.AppBaseLibrary.android.dataServices.interfaces.GHSICartDataModel; import com.grubhub.AppBaseLibrary.android.dataServices.net.a; public class g extends d { private String b; private String c; public g(Context paramContext, String paramString1, String paramString2, i parami1, i parami2) { super(paramContext, parami1, parami2); b = paramString1; c = paramString2; } public void a() { super.a(); b().c(b, c, this, this, f()); } public void a(GHSICartDataModel paramGHSICartDataModel) { if (paramGHSICartDataModel != null) { c().a(paramGHSICartDataModel); } super.onResponse(paramGHSICartDataModel); } } /* Location: * Qualified Name: com.grubhub.AppBaseLibrary.android.dataServices.a.b.g * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
e12af4af85d9be5bf4be6481404f238a343c9b17
d0536669bb37019e766766461032003ad045665b
/jdk1.4.2_src/org/apache/xalan/lib/sql/QueryParameter.java
8046fc6835814a65df09bb1d14cbe8895c323be2
[]
no_license
eagle518/jdk-source-code
c0d60f0762bce0221c7eeb1654aa1a53a3877313
91b771140de051fb843af246ab826dd6ff688fe3
refs/heads/master
2021-01-18T19:51:07.988541
2010-09-09T06:36:02
2010-09-09T06:36:02
38,047,470
11
23
null
null
null
null
UTF-8
Java
false
false
3,470
java
/* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Xalan" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation and was * originally based on software copyright (c) 1999, Lotus * Development Corporation., http://www.lotus.com. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.xalan.lib.sql; /** * Title: <p> * Description: <p> * Copyright: Copyright (c) <p> * Company: <p> * @author * @version 1.0 */ public class QueryParameter { /** */ private String value; /** */ private String type; /** * @param v * @param t */ public QueryParameter( String v, String t ) { value = v; type = t; } /** * @return */ public String getValue( ) { return value; } /** * @param newValue * @return */ public void setValue( String newValue ) { value = newValue; } /** * @param newType * @return */ public void setType( String newType ) { type = newType; } /** * @return */ public String getType( ) { return type; } }
[ "kzhaicn@e8197d6f-d431-fb3f-3203-916d138821fd" ]
kzhaicn@e8197d6f-d431-fb3f-3203-916d138821fd
3b910292aa7f3a5c0a7bc9fb26cec8ce56e6ed30
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes6.dex_source_from_JADX/com/facebook/photos/data/method/CreatePagePhotoAlbumParams.java
f6268566feeed1d75e78a6afecb097d75d087601
[]
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
1,731
java
package com.facebook.photos.data.method; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import com.google.common.base.Preconditions; import javax.annotation.Nullable; /* compiled from: image_cache_size_bytes */ public class CreatePagePhotoAlbumParams implements Parcelable { public static final Creator<CreatePagePhotoAlbumParams> CREATOR = new C08241(); public final long f12892a; public final String f12893b; public final String f12894c; public final String f12895d; /* compiled from: image_cache_size_bytes */ final class C08241 implements Creator<CreatePagePhotoAlbumParams> { C08241() { } public final Object createFromParcel(Parcel parcel) { return new CreatePagePhotoAlbumParams(parcel); } public final Object[] newArray(int i) { return new CreatePagePhotoAlbumParams[i]; } } public CreatePagePhotoAlbumParams(long j, String str, @Nullable String str2, @Nullable String str3) { Preconditions.checkNotNull(str); this.f12892a = j; this.f12893b = str; this.f12894c = str2; this.f12895d = str3; } public CreatePagePhotoAlbumParams(Parcel parcel) { this.f12892a = parcel.readLong(); this.f12893b = parcel.readString(); this.f12894c = parcel.readString(); this.f12895d = parcel.readString(); } public int describeContents() { return 0; } public void writeToParcel(Parcel parcel, int i) { parcel.writeLong(this.f12892a); parcel.writeString(this.f12893b); parcel.writeString(this.f12894c); parcel.writeString(this.f12895d); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
50cabbe4a7353dd49fe744963bda0421d83f14a6
b228e3f0a67b254edb80100a32514550fb9b8255
/app/src/main/java/com/yl/baiduren/fragment/debt_manger_fragment/Debt_EnterPrise_Tabulation.java
45e1bf809f2bb1b22e7350ab79354bf969d59d81
[]
no_license
sunbeibei111466/baiduren
f02ec2a5f7b3aac367eb48512889c1463b7fc302
776970d98b9393ee5542bf2585aa247cc280610c
refs/heads/master
2020-03-13T12:06:08.685955
2018-05-17T09:22:17
2018-05-17T09:22:17
131,112,483
2
0
null
null
null
null
UTF-8
Java
false
false
6,117
java
package com.yl.baiduren.fragment.debt_manger_fragment; import android.os.Handler; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import com.cjj.MaterialRefreshLayout; import com.cjj.MaterialRefreshListener; import com.yl.baiduren.R; import com.yl.baiduren.adapter.Debt_EnterPrise_Adapter; import com.yl.baiduren.base.BaseEntity; import com.yl.baiduren.base.BaseFragment; import com.yl.baiduren.base.BaseObserver; import com.yl.baiduren.base.BaseRequest; import com.yl.baiduren.data.DataWarehouse; import com.yl.baiduren.entity.request_body.Debt_PresonEntity; import com.yl.baiduren.entity.result.DebtPersonList; import com.yl.baiduren.service.RetrofitHelper; import com.yl.baiduren.utils.Constant; import com.yl.baiduren.utils.LUtils; import com.yl.baiduren.utils.SecurityUtils; import com.yl.baiduren.utils.UserInfoUtils; import com.yl.baiduren.utils.Util; import java.util.List; import okhttp3.MediaType; import okhttp3.RequestBody; import static com.yl.baiduren.activity.debtmanagpreson.Debt_Person_Manger.childUserId; /** * Created by sunbeibei on 2017/12/6. * 债事企业列表 */ public class Debt_EnterPrise_Tabulation extends BaseFragment { public static int pn = 1; public static int ps = 8; //2.是刷新的状态 private static final int REFRESH = 2; //3.上啦刷新加载更多 private static final int LOADMORE = 3; private int status = 1; private MaterialRefreshLayout refreshLayout; private RecyclerView recyclerView; private Debt_EnterPrise_Adapter adapter; private List<DebtPersonList.Mode> dataList; private Handler handler = new Handler(); @Override public int loadWindowLayout() { return R.layout.debt_enterprise_tabulation; } @Override public void initViews(View rootView) { refreshLayout = rootView.findViewById(R.id.refresh_enterprise); refreshLayout.setMaterialRefreshListener(refreshListener); recyclerView = rootView.findViewById(R.id.debt_enterprise_recycler); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity()); linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL); recyclerView.setLayoutManager(linearLayoutManager); adapter = new Debt_EnterPrise_Adapter(childUserId, getActivity()); } @Override public void onResume() { super.onResume(); refreshLayout.postDelayed(new Runnable() { @Override public void run() { refreshLayout.autoRefresh(); } }, 50); } public void getHttp() { //设置基础参数 if (UserInfoUtils.IsLogin(getActivity())) { Debt_PresonEntity debtPresonEntity = new Debt_PresonEntity(DataWarehouse.getBaseRequest(getActivity())); debtPresonEntity.setType(1); debtPresonEntity.setPageNo(pn); debtPresonEntity.setPageSize(ps); if (childUserId != 0) { debtPresonEntity.setChildUserId(childUserId); } BaseObserver<DebtPersonList> baseObserver = new BaseObserver<DebtPersonList>(getActivity()) { @Override protected void onSuccees(String code, DebtPersonList data, BaseRequest baseResponse) throws Exception { if (code.equals("1")) { if (data.getDataList().size() != 0) { displayData(data); dataNotNullHideImageView(); } else { if (adapter.getList() != null && adapter.getList().size() != 0) { dataNotNullHideImageView(); }else { dataNullShowImageView(); } } refreshLayout.finishRefresh(); refreshLayout.finishRefreshLoadMore(); } } }; baseObserver.setStop(true); String json = Util.toJson(debtPresonEntity);//转成json LUtils.e("---json--", json); String signature = SecurityUtils.md5Signature(json, SecurityUtils.privateKeyTest);//加密 RetrofitHelper.getInstance(getActivity()).getServer() .getDebtPresonList(signature, RequestBody.create(MediaType.parse(Constant.JSON), json)) .compose(compose(this.<BaseEntity<DebtPersonList>>bindToLifecycle())) .subscribe(baseObserver); } else { getActivity().finish(); } } //抽取的展示数据的方法 private void displayData(final DebtPersonList data) { if (status == REFRESH) { if (dataList != null) { dataList.clear(); } dataList = data.getDataList(); adapter.setDataList(dataList); recyclerView.setAdapter(adapter); } if (status == LOADMORE) { int size = dataList.size(); List<DebtPersonList.Mode> dataList2 = data.getDataList(); this.dataList.addAll(dataList2); adapter.setDataList(dataList); recyclerView.setAdapter(adapter); recyclerView.scrollToPosition(size - 1); adapter.notifyDataSetChanged(); } } private MaterialRefreshListener refreshListener = new MaterialRefreshListener() { @Override public void onRefresh(MaterialRefreshLayout materialRefreshLayout) { status = REFRESH; pn = 1; getHttp(); } @Override public void onRefreshLoadMore(MaterialRefreshLayout materialRefreshLayout) { super.onRefreshLoadMore(materialRefreshLayout); status = LOADMORE; pn = pn + 1; getHttp(); } }; @Override public void onDestroy() { super.onDestroy(); pn = 1; ps = 8; } }
[ "930184501@qq.com" ]
930184501@qq.com
9910c090bd361c679e26d30719aac4102a90224e
8018ce0a6cc362bb82b89fdd420516de853941c7
/32-spring-boot-redis-cache/src/main/java/com/gzz/study/sys/syslog/SysLogDao.java
0b4390a6ad3e50f01ffa28dd5d9d08a0b44e5bc2
[]
no_license
user3614/spring-boot-examples
da8ddf4507f166631f20965c519e6824d60790d5
f61e2f446901dcab95d14c830824adceb215ae15
refs/heads/master
2023-04-15T08:51:37.062215
2021-04-09T10:50:23
2021-04-09T10:50:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,754
java
package com.gzz.study.sys.syslog; import java.util.List; import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.stereotype.Repository; import com.gzz.common.base.BaseDao; import com.gzz.common.base.Page; import lombok.extern.slf4j.Slf4j; /** * @类说明 【请求日志】数据访问层 * @author 高振中 * @date 2020-03-12 12:11:06 **/ @Slf4j @Repository public class SysLogDao extends BaseDao { /** * @方法说明 新增【请求日志】记录 */ public int save(SysLog vo) { StringBuilder sql = new StringBuilder(); sql.append("INSERT INTO sys_log (id,client_ip,uri,type,method,param_data,session_id,request_time,"); sql.append("return_time,return_data,status_code,cost_time)"); sql.append(" VALUES (?,?,?,?,?,?,?,?,?,?,?,?)"); Object[] params = { vo.getId(), vo.getClient_ip(), vo.getUri(), vo.getType(), vo.getMethod(), vo.getParam_data(), vo.getSession_id(), vo.getRequest_time(), // 太长换行 vo.getReturn_time(), vo.getReturn_data(), vo.getStatus_code(), vo.getCost_time() }; // log.info(super.sql(sql.toString(), params));// 显示SQL语句 return jdbcTemplate.update(sql.toString(), params); } /** * @方法说明 删除【请求日志】记录 */ public int delete(Object[] ids) { String sql = "DELETE FROM sys_log WHERE id IN" + toIn(ids); // log.info(super.sql(sql, ids));// 显示SQL语句 return jdbcTemplate.update(sql, ids); } /** * @方法说明 更新【请求日志】记录 */ public int update(SysLog vo) { StringBuilder sql = new StringBuilder(); sql.append("UPDATE sys_log SET client_ip=?,uri=?,type=?,method=?,param_data=?,session_id=?,request_time=?,return_time=?,"); sql.append("return_data=?,status_code=?,cost_time=?"); sql.append(" WHERE id=? "); Object[] params = { vo.getClient_ip(), vo.getUri(), vo.getType(), vo.getMethod(), vo.getParam_data(), vo.getSession_id(), vo.getRequest_time(), vo.getReturn_time(), // 太长换行 vo.getReturn_data(), vo.getStatus_code(), vo.getCost_time(), vo.getId() }; // log.info(super.sql(sql.toString(), params));// 显示SQL语句 return jdbcTemplate.update(sql.toString(), params); } /** * @方法说明 按条件查询分页【请求日志】列表 */ public Page<SysLog> page(SysLogCond cond) { StringBuilder sql = new StringBuilder(); sql.append("SELECT t.id,t.client_ip,t.uri,t.type,t.method,t.param_data,t.session_id,t.request_time,"); sql.append("t.return_time,t.return_data,t.status_code,t.cost_time"); sql.append(" FROM sys_log t"); sql.append(cond.where()); log.info(super.sql(sql.toString(), cond.array()));// 显示SQL语句 return queryPage(sql.toString(), cond, SysLog.class); } /** * @方法说明 按条件查询不分页【请求日志】列表 */ public List<SysLog> list(SysLogCond cond) { StringBuilder sql = new StringBuilder(); sql.append("SELECT t.id,t.client_ip,t.uri,t.type,t.method,t.param_data,t.session_id,t.request_time,"); sql.append("t.return_time,t.return_data,t.status_code,t.cost_time"); sql.append(" FROM sys_log t"); sql.append(cond.where()); sql.append(" ORDER BY id DESC"); // log.info(super.sql(sql.toString(),cond.array()));//显示SQL语句 return jdbcTemplate.query(sql.toString(), cond.array(), new BeanPropertyRowMapper<>(SysLog.class)); } /** * @方法说明 按主键查找单个【请求日志】记录 */ public SysLog findById(Integer id) { StringBuilder sql = new StringBuilder(); sql.append("SELECT t.id,t.client_ip,t.uri,t.type,t.method,t.param_data,t.session_id,t.request_time,"); sql.append("t.return_time,t.return_data,t.status_code,t.cost_time"); sql.append(" FROM sys_log t WHERE t.id=?"); // log.info(super.sql(sql.toString(),id));//显示SQL语句 return jdbcTemplate.queryForObject(sql.toString(), new BeanPropertyRowMapper<>(SysLog.class), id); } /** * @方法说明 按条件查询【请求日志】记录个数 */ public int count(SysLogCond cond) { String sql = "SELECT COUNT(1) FROM sys_log t " + cond.where(); // log.info(super.sql(sql,cond.array()));//显示SQL语句 return jdbcTemplate.queryForObject(sql, cond.array(), Integer.class); } /** * @方法说明 新增【请求日志】记录并返回自增涨主键值 */ public long saveReturnPK(SysLog vo) { StringBuilder sql = new StringBuilder(); sql.append("INSERT INTO sys_log (id,client_ip,uri,type,method,param_data,session_id,request_time,"); sql.append("return_time,return_data,status_code,cost_time)"); sql.append(" VALUES (:id,:client_ip,:uri,:type,:method,:param_data,:session_id,:request_time,"); sql.append(":return_time,:return_data,:status_code,:cost_time)"); // log.info(super.sql(sql.toString(), vo));// 显示SQL语句 return saveKey(vo, sql.toString(), "id"); } /** * @方法说明 批量插入【请求日志】记录 */ public int[] insertBatch(List<SysLog> list) { StringBuilder sql = new StringBuilder(); sql.append("INSERT INTO sys_log (id,client_ip,uri,type,method,param_data,session_id,request_time,"); sql.append("return_time,return_data,status_code,cost_time)"); sql.append(" VALUES (:id,:client_ip,:uri,:type,:method,:param_data,:session_id,:request_time,"); sql.append(":return_time,:return_data,:status_code,:cost_time)"); // log.info(super.sql(sql.toString(), list));// 显示SQL语句 return batchOperate(list, sql.toString()); } /** * @方法说明 逻辑删除【请求日志】记录 */ // public int delete(Object... ids) { // String sql = "UPDATE sys_log SET dr=1 WHERE id IN " + toIn(ids); // return jdbcTemplate.update(sql,ids); // } }
[ "2570613257@qq.com" ]
2570613257@qq.com
5d053b2d3c6ef7ec71005b9f5cd34e4ec498b75f
20231b3f94425f5317ed60aa74da03f96c6cb7d7
/src/main/java/com/github/fge/jsonschema/syntax/checkers/common/PatternPropertiesSyntaxChecker.java
7404979191ccc68d301105e23dc0c4ece8d1a2a6
[]
no_license
mattbishop/json-schema-core
c3f96d475eb2ba94f3f1a1b292f79a39a6f54a2e
2464c78e80087d0c46d9a83808e0d5a3ddf62c93
refs/heads/master
2021-01-17T01:57:43.657179
2013-05-02T22:19:15
2013-05-02T22:19:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,351
java
/* * Copyright (c) 2013, Francis Galiegue <fgaliegue@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the Lesser GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * Lesser GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.github.fge.jsonschema.syntax.checkers.common; import com.github.fge.jsonschema.exceptions.ProcessingException; import com.github.fge.jsonschema.report.ProcessingReport; import com.github.fge.jsonschema.syntax.checkers.SyntaxChecker; import com.github.fge.jsonschema.syntax.checkers.helpers.SchemaMapSyntaxChecker; import com.github.fge.jsonschema.tree.SchemaTree; import com.github.fge.jsonschema.util.RhinoHelper; import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import java.util.Set; import static com.github.fge.jsonschema.messages.SyntaxMessages.*; /** * Syntax checker for the {@code patternProperties} keyword * * @see com.github.fge.jsonschema.util.RhinoHelper */ public final class PatternPropertiesSyntaxChecker extends SchemaMapSyntaxChecker { private static final SyntaxChecker INSTANCE = new PatternPropertiesSyntaxChecker(); public static SyntaxChecker getInstance() { return INSTANCE; } private PatternPropertiesSyntaxChecker() { super("patternProperties"); } @Override protected void extraChecks(final ProcessingReport report, final SchemaTree tree) throws ProcessingException { /* * Check that the member names are regexes */ final Set<String> set = Sets.newHashSet(getNode(tree).fieldNames()); for (final String s: Ordering.natural().sortedCopy(set)) if (!RhinoHelper.regexIsValid(s)) report.error(newMsg(tree, INVALID_REGEX_MEMBER_NAME) .put("memberName", s)); } }
[ "fgaliegue@gmail.com" ]
fgaliegue@gmail.com
cfdaabac2d1a0c11c17d68fbbb2a2807d89df1a8
5fa48a0da4bb139dd859c11c255114ef6872ba76
/alipaysdk/src/main/java/com/alipay/api/domain/AlipayMarketingCampaignDiscountOperateModel.java
22d6d869aaaa13e13d6cb9884c52a02f334a0901
[]
no_license
zhangzui/alipay_sdk
0b6c4ff198fc5c1249ff93b4d26245405015f70f
e86b338364b24f554e73a6be430265799765581c
refs/heads/master
2020-03-22T17:43:26.553694
2018-07-11T10:28:33
2018-07-11T10:28:33
140,411,652
0
0
null
null
null
null
UTF-8
Java
false
false
7,727
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 支付宝营销优惠立减活动操作 * * @author auto create * @since 1.0, 2017-03-03 16:48:01 */ public class AlipayMarketingCampaignDiscountOperateModel extends AlipayObject { private static final long serialVersionUID = 4737211333647363668L; /** * 幂等控制code,控制重复新增,修改时候可以不设置。 */ @ApiField("camp_code") private String campCode; /** * 用于账户立减优惠,渠道立减优惠活动时,在收银台页面显示给会员看,最多512个字符,汉字、英文字母、数字都算一个,本输入框支持简单的html符号。 */ @ApiField("camp_desc") private String campDesc; /** * 当operate_type=CAMP_MODIFIED 必设置camp_id */ @ApiField("camp_id") private String campId; /** * 活动名称 不超过24个字符 */ @ApiField("camp_name") private String campName; /** * 用于账户立减优惠,渠道立减优惠活动时,在收银台页面显示给会员看,请根据收银台可展示的实际字数填写,最多48个字符,汉字、英文字母、数字都算一个,只可输入中文、英文、数字、下划线以及中英文的双引号、逗号、句号、横杠、空格。 */ @ApiField("camp_slogan") private String campSlogan; /** * 折扣方式模型 如果类型选了discount,则这个模型必须输入 */ @ApiField("discount_dst_camp_prize_model") private DiscountDstCampPrizeModel discountDstCampPrizeModel; /** * 立减规则模型 */ @ApiField("dst_camp_rule_model") private DstCampRuleModel dstCampRuleModel; /** * 活动子时间,可以不传 */ @ApiListField("dst_camp_sub_time_model_list") @ApiField("date_area_model") private List<DateAreaModel> dstCampSubTimeModelList; /** * 活动结束时间 */ @ApiField("gmt_end") private String gmtEnd; /** * 活动开始时间 */ @ApiField("gmt_start") private String gmtStart; /** * 新增传CAMP_ADD,修改传CAMP_MODIFIED */ @ApiField("operate_type") private String operateType; /** * 奖品类型. 打折 满减 单笔减 阶梯优惠 抹零优惠 随机立减 订单金额减至 折扣方式 DISCOUNT("discount", "折扣方式"), REDUCE("reduce", "满立减"), SINGLE("single", "单笔减"), STAGED_DISCOUNT("staged_discount", "阶梯优惠"), RESET_ZERO_DISCOUNT("reset_zero_discount", "抹零优惠"), RANDOM_DISCOUNT("random", "随机立减"); REDUCE_TO_DISCOUNT("reduce_to_discount","订单金额减至 ") */ @ApiField("prize_type") private String prizeType; /** * 随机立减模型如果类型选了random,则这个模型必须输入 */ @ApiField("random_discount_dst_camp_prize_model") private RandomDiscountDstCampPrizeModel randomDiscountDstCampPrizeModel; /** * 满立减奖品模型 如果类型选了reduce,则这个模型必须输入 */ @ApiField("reduce_dst_camp_prize_model") private ReduceDstCampPrizeModel reduceDstCampPrizeModel; /** * 订单金额减至模型如果类型选了reduce_to_discount,则这个模型必须输入 */ @ApiField("reduce_to_discount_dst_camp_prize_model") private ReduceToDiscountDstCampPrizeModel reduceToDiscountDstCampPrizeModel; /** * 抹零优惠模型如果类型选了reset_zero_discount,则这个模型必须输入 */ @ApiField("reset_zero_dst_camp_prize_model") private ResetZeroDstCampPrizeModel resetZeroDstCampPrizeModel; /** * 单笔减奖品模型如果类型选了single,则这个模型必须输入 */ @ApiField("single_dst_camp_prize_model") private SingleDstCampPrizeModel singleDstCampPrizeModel; /** * 阶梯优惠如果类型选了staged_discount,则这个模型必须输入 */ @ApiField("staged_discount_dst_camp_prize_model") private StagedDiscountDstCampPrizeModel stagedDiscountDstCampPrizeModel; public String getCampCode() { return this.campCode; } public void setCampCode(String campCode) { this.campCode = campCode; } public String getCampDesc() { return this.campDesc; } public void setCampDesc(String campDesc) { this.campDesc = campDesc; } public String getCampId() { return this.campId; } public void setCampId(String campId) { this.campId = campId; } public String getCampName() { return this.campName; } public void setCampName(String campName) { this.campName = campName; } public String getCampSlogan() { return this.campSlogan; } public void setCampSlogan(String campSlogan) { this.campSlogan = campSlogan; } public DiscountDstCampPrizeModel getDiscountDstCampPrizeModel() { return this.discountDstCampPrizeModel; } public void setDiscountDstCampPrizeModel(DiscountDstCampPrizeModel discountDstCampPrizeModel) { this.discountDstCampPrizeModel = discountDstCampPrizeModel; } public DstCampRuleModel getDstCampRuleModel() { return this.dstCampRuleModel; } public void setDstCampRuleModel(DstCampRuleModel dstCampRuleModel) { this.dstCampRuleModel = dstCampRuleModel; } public List<DateAreaModel> getDstCampSubTimeModelList() { return this.dstCampSubTimeModelList; } public void setDstCampSubTimeModelList(List<DateAreaModel> dstCampSubTimeModelList) { this.dstCampSubTimeModelList = dstCampSubTimeModelList; } public String getGmtEnd() { return this.gmtEnd; } public void setGmtEnd(String gmtEnd) { this.gmtEnd = gmtEnd; } public String getGmtStart() { return this.gmtStart; } public void setGmtStart(String gmtStart) { this.gmtStart = gmtStart; } public String getOperateType() { return this.operateType; } public void setOperateType(String operateType) { this.operateType = operateType; } public String getPrizeType() { return this.prizeType; } public void setPrizeType(String prizeType) { this.prizeType = prizeType; } public RandomDiscountDstCampPrizeModel getRandomDiscountDstCampPrizeModel() { return this.randomDiscountDstCampPrizeModel; } public void setRandomDiscountDstCampPrizeModel(RandomDiscountDstCampPrizeModel randomDiscountDstCampPrizeModel) { this.randomDiscountDstCampPrizeModel = randomDiscountDstCampPrizeModel; } public ReduceDstCampPrizeModel getReduceDstCampPrizeModel() { return this.reduceDstCampPrizeModel; } public void setReduceDstCampPrizeModel(ReduceDstCampPrizeModel reduceDstCampPrizeModel) { this.reduceDstCampPrizeModel = reduceDstCampPrizeModel; } public ReduceToDiscountDstCampPrizeModel getReduceToDiscountDstCampPrizeModel() { return this.reduceToDiscountDstCampPrizeModel; } public void setReduceToDiscountDstCampPrizeModel(ReduceToDiscountDstCampPrizeModel reduceToDiscountDstCampPrizeModel) { this.reduceToDiscountDstCampPrizeModel = reduceToDiscountDstCampPrizeModel; } public ResetZeroDstCampPrizeModel getResetZeroDstCampPrizeModel() { return this.resetZeroDstCampPrizeModel; } public void setResetZeroDstCampPrizeModel(ResetZeroDstCampPrizeModel resetZeroDstCampPrizeModel) { this.resetZeroDstCampPrizeModel = resetZeroDstCampPrizeModel; } public SingleDstCampPrizeModel getSingleDstCampPrizeModel() { return this.singleDstCampPrizeModel; } public void setSingleDstCampPrizeModel(SingleDstCampPrizeModel singleDstCampPrizeModel) { this.singleDstCampPrizeModel = singleDstCampPrizeModel; } public StagedDiscountDstCampPrizeModel getStagedDiscountDstCampPrizeModel() { return this.stagedDiscountDstCampPrizeModel; } public void setStagedDiscountDstCampPrizeModel(StagedDiscountDstCampPrizeModel stagedDiscountDstCampPrizeModel) { this.stagedDiscountDstCampPrizeModel = stagedDiscountDstCampPrizeModel; } }
[ "zhangzuizui@qq.com" ]
zhangzuizui@qq.com
b85773b81f5febdb890c0f06a430a280c012c5f5
697e8d0a012693876df14ce2440b42d7818149ac
/XChange-develop/xchange-core/src/test/java/com/xeiam/xchange/dto/trade/UserTradeTest.java
d5d2f8837316074a8ecccf067180f489f8c4edf9
[ "MIT" ]
permissive
tochkov/coin-eye
0bdadf195408d77dda220d6558ebc775330ee75c
f04bb141cab3a04d348b04bbf9f00351176bb8d3
refs/heads/master
2021-01-01T04:26:00.984029
2016-04-15T14:22:17
2016-04-15T14:22:17
56,127,186
2
5
null
null
null
null
UTF-8
Java
false
false
2,887
java
package com.xeiam.xchange.dto.trade; import static org.fest.assertions.api.Assertions.assertThat; import java.math.BigDecimal; import java.util.Date; import com.xeiam.xchange.currency.Currency; import org.junit.Test; import com.xeiam.xchange.currency.CurrencyPair; import com.xeiam.xchange.dto.Order.OrderType; public class UserTradeTest { @Test public void testBuilder() { final OrderType type = OrderType.BID; final BigDecimal tradableAmount = new BigDecimal("99.401"); final CurrencyPair currencyPair = CurrencyPair.LTC_BTC; final BigDecimal price = new BigDecimal("251.64"); final Date timestamp = new Date(); final String id = "id"; final String orderId = "OrderId"; final BigDecimal feeAmount = new BigDecimal("0.0006"); final Currency feeCurrency = Currency.BTC; final UserTrade copy = new UserTrade.Builder().type(type).tradableAmount(tradableAmount).currencyPair(currencyPair).price(price) .timestamp(timestamp).id(id).orderId(orderId).feeAmount(feeAmount).feeCurrency(feeCurrency).build(); assertThat(copy.getType()).isEqualTo(type); assertThat(copy.getTradableAmount()).isEqualTo(tradableAmount); assertThat(copy.getCurrencyPair()).isEqualTo(currencyPair); assertThat(copy.getPrice()).isEqualTo(price); assertThat(copy.getTimestamp()).isEqualTo(timestamp); assertThat(copy.getId()).isEqualTo(id); assertThat(copy.getOrderId()).isEqualTo(orderId); assertThat(copy.getFeeAmount()).isEqualTo(feeAmount); assertThat(copy.getFeeCurrency()).isEqualTo(feeCurrency); } @Test public void testBuilderFrom() { final OrderType type = OrderType.ASK; final BigDecimal tradableAmount = new BigDecimal("100.501"); final CurrencyPair currencyPair = CurrencyPair.BTC_USD; final BigDecimal price = new BigDecimal("250.34"); final Date timestamp = new Date(); final String id = "id"; final String orderId = "OrderId"; final BigDecimal feeAmount = new BigDecimal("0"); final Currency feeCurrency = Currency.BTC; final UserTrade original = new UserTrade(type, tradableAmount, currencyPair, price, timestamp, id, orderId, feeAmount, feeCurrency); final UserTrade copy = UserTrade.Builder.from(original).build(); assertThat(copy.getType()).isEqualTo(original.getType()); assertThat(copy.getTradableAmount()).isEqualTo(original.getTradableAmount()); assertThat(copy.getCurrencyPair()).isEqualTo(original.getCurrencyPair()); assertThat(copy.getPrice()).isEqualTo(original.getPrice()); assertThat(copy.getTimestamp()).isEqualTo(original.getTimestamp()); assertThat(copy.getId()).isEqualTo(original.getId()); assertThat(copy.getOrderId()).isEqualTo(original.getOrderId()); assertThat(copy.getFeeAmount()).isEqualTo(original.getFeeAmount()); assertThat(copy.getFeeCurrency()).isEqualTo(original.getFeeCurrency()); } }
[ "philip.tochkov@gmail.com" ]
philip.tochkov@gmail.com
c4a5d752a8ce5ef02ba11a182706e6adb2d24bc5
364e81cb0c01136ac179ff42e33b2449c491b7e5
/spell/tags/1.5.0/spel-gui/spel-client-codeview/src/com/astra/ses/spell/gui/presentation/code/Activator.java
a56f7ce832aa4a678f4c6015477cc300d20b0ead
[]
no_license
unnch/spell-sat
2b06d9ed62b002e02d219bd0784f0a6477e365b4
fb11a6800316b93e22ee8c777fe4733032004a4a
refs/heads/master
2021-01-23T11:49:25.452995
2014-10-14T13:04:18
2014-10-14T13:04:18
42,499,379
0
0
null
null
null
null
UTF-8
Java
false
false
3,862
java
/////////////////////////////////////////////////////////////////////////////// // // PACKAGE : com.astra.ses.spell.gui.presentation.code // // FILE : Activator.java // // DATE : 2008-11-21 08:55 // // Copyright (C) 2008, 2010 SES ENGINEERING, Luxembourg S.A.R.L. // // By using this software in any way, you are agreeing to be bound by // the terms of this license. // // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // which accompanies this distribution, and is available at // http://www.eclipse.org/legal/epl-v10.html // // NO WARRANTY // EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED // ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER // EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR // CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A // PARTICULAR PURPOSE. Each Recipient is solely responsible for determining // the appropriateness of using and distributing the Program and assumes all // risks associated with its exercise of rights under this Agreement , // including but not limited to the risks and costs of program errors, // compliance with applicable laws, damage to or loss of data, programs or // equipment, and unavailability or interruption of operations. // // DISCLAIMER OF LIABILITY // EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY // CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION // LOST PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE // EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGES. // // Contributors: // SES ENGINEERING - initial API and implementation and/or initial documentation // // PROJECT : SPELL // // SUBPROJECT: SPELL GUI Client // /////////////////////////////////////////////////////////////////////////////// package com.astra.ses.spell.gui.presentation.code; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; /** * The activator class controls the plug-in life cycle */ public class Activator extends AbstractUIPlugin { // The plug-in ID public static final String PLUGIN_ID = "com.astra.ses.spell.gui.codeview"; // The shared instance private static Activator plugin; /** * The constructor */ public Activator() { } /* * (non-Javadoc) * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { super.start(context); plugin = this; System.out.println("[*] Activated: " + PLUGIN_ID); } /* * (non-Javadoc) * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); } /** * Returns the shared instance * * @return the shared instance */ public static Activator getDefault() { return plugin; } /*************************************************************************** * Returns an image descriptor for the image file at the given * plug-in relative path * * @param path the path * @return the image descriptor **************************************************************************/ public static ImageDescriptor getImageDescriptor(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); } }
[ "rafael.chinchilla@gmail.com" ]
rafael.chinchilla@gmail.com
d5898d42ddee9af87e07b3ba9d7f689b10f03538
0205999a193bf670cd9d6e5b37e342b75f4e15b8
/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcConnectionBuilderSupportTests.java
25ea35091febcf736d189ac696e07a1cfcd9e9c1
[ "Apache-2.0" ]
permissive
leaderli/spring-source
18aa9a8c7c5e22d6faa6167e999ff88ffa211ba0
0edd75b2cedb00ad1357e7455a4fe9474b3284da
refs/heads/master
2022-02-18T16:34:19.625966
2022-01-29T08:56:48
2022-01-29T08:56:48
204,468,286
0
0
null
null
null
null
UTF-8
Java
false
false
5,674
java
/* * Copyright 2002-2019 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 * * https://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.test.web.servlet.htmlunit; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebConnection; import com.gargoylesoftware.htmlunit.WebRequest; import com.gargoylesoftware.htmlunit.WebResponse; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.net.URL; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; /** * Integration tests for {@link MockMvcWebConnectionBuilderSupport}. * * @author Rob Winch * @author Rossen Stoyanchev * @since 4.2 */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration @WebAppConfiguration @SuppressWarnings("rawtypes") public class MockMvcConnectionBuilderSupportTests { private final WebClient client = mock(WebClient.class); private MockMvcWebConnectionBuilderSupport builder; @Autowired private WebApplicationContext wac; @Before public void setup() { given(this.client.getWebConnection()).willReturn(mock(WebConnection.class)); this.builder = new MockMvcWebConnectionBuilderSupport(this.wac) { }; } @Test public void constructorMockMvcNull() { assertThatIllegalArgumentException().isThrownBy(() -> new MockMvcWebConnectionBuilderSupport((MockMvc) null) { }); } @Test public void constructorContextNull() { assertThatIllegalArgumentException().isThrownBy(() -> new MockMvcWebConnectionBuilderSupport((WebApplicationContext) null) { }); } @Test public void context() throws Exception { WebConnection conn = this.builder.createConnection(this.client); assertMockMvcUsed(conn, "http://localhost/"); assertMockMvcNotUsed(conn, "https://example.com/"); } @Test public void mockMvc() throws Exception { MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(wac).build(); WebConnection conn = new MockMvcWebConnectionBuilderSupport(mockMvc) { }.createConnection(this.client); assertMockMvcUsed(conn, "http://localhost/"); assertMockMvcNotUsed(conn, "https://example.com/"); } @Test public void mockMvcExampleDotCom() throws Exception { WebConnection conn = this.builder.useMockMvcForHosts("example.com").createConnection(this.client); assertMockMvcUsed(conn, "http://localhost/"); assertMockMvcUsed(conn, "https://example.com/"); assertMockMvcNotUsed(conn, "http://other.example/"); } @Test public void mockMvcAlwaysUseMockMvc() throws Exception { WebConnection conn = this.builder.alwaysUseMockMvc().createConnection(this.client); assertMockMvcUsed(conn, "http://other.example/"); } @Test public void defaultContextPathEmpty() throws Exception { WebConnection conn = this.builder.createConnection(this.client); assertThat(getResponse(conn, "http://localhost/abc").getContentAsString()).isEqualTo(""); } @Test public void defaultContextPathCustom() throws Exception { WebConnection conn = this.builder.contextPath("/abc").createConnection(this.client); assertThat(getResponse(conn, "http://localhost/abc/def").getContentAsString()).isEqualTo("/abc"); } private void assertMockMvcUsed(WebConnection connection, String url) throws Exception { assertThat(getResponse(connection, url)).isNotNull(); } private void assertMockMvcNotUsed(WebConnection connection, String url) throws Exception { assertThat(getResponse(connection, url)).isNull(); } private WebResponse getResponse(WebConnection connection, String url) throws IOException { return connection.getResponse(new WebRequest(new URL(url))); } @Configuration @EnableWebMvc static class Config { @RestController static class ContextPathController { @RequestMapping("/def") public String contextPath(HttpServletRequest request) { return request.getContextPath(); } } } }
[ "429243408@qq.com" ]
429243408@qq.com
bdaa1d0d96cc8302aab31f72a0d8d3226aed4896
2c6e2ba03eb71ca45fe690ff6e4586f6e2fa0f17
/material/apks/banco/sources/com/google/common/collect/ByFunctionOrdering.java
8bf3f827414308143ed6d01d03369ad0baf28570
[]
no_license
lcrcastor/curso-mobile-2019
3088a196139b3e980ed6e09797a0bbf5efb6440b
7585fccb6437a17c841772c1d9fb0701d6c68042
refs/heads/master
2023-04-06T21:46:32.333236
2020-10-30T19:47:54
2020-10-30T19:47:54
308,680,747
0
1
null
2023-03-26T06:57:57
2020-10-30T16:08:31
Java
UTF-8
Java
false
false
1,605
java
package com.google.common.collect; import com.google.common.annotations.GwtCompatible; import com.google.common.base.Function; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import java.io.Serializable; import javax.annotation.Nullable; @GwtCompatible(serializable = true) final class ByFunctionOrdering<F, T> extends Ordering<F> implements Serializable { private static final long serialVersionUID = 0; final Function<F, ? extends T> a; final Ordering<T> b; ByFunctionOrdering(Function<F, ? extends T> function, Ordering<T> ordering) { this.a = (Function) Preconditions.checkNotNull(function); this.b = (Ordering) Preconditions.checkNotNull(ordering); } public int compare(F f, F f2) { return this.b.compare(this.a.apply(f), this.a.apply(f2)); } public boolean equals(@Nullable Object obj) { boolean z = true; if (obj == this) { return true; } if (!(obj instanceof ByFunctionOrdering)) { return false; } ByFunctionOrdering byFunctionOrdering = (ByFunctionOrdering) obj; if (!this.a.equals(byFunctionOrdering.a) || !this.b.equals(byFunctionOrdering.b)) { z = false; } return z; } public int hashCode() { return Objects.hashCode(this.a, this.b); } public String toString() { StringBuilder sb = new StringBuilder(); sb.append(this.b); sb.append(".onResultOf("); sb.append(this.a); sb.append(")"); return sb.toString(); } }
[ "luis@MARK-2.local" ]
luis@MARK-2.local
02a076b5de1504b6f185c4762b1f4dd477f7739a
65aa87645671992a479745351c12f1624dee2a97
/core/src/test/java/ui/text/TextFieldDemo.java
4a9b92bcf38816368178909dde5b6daa332f32b0
[ "MIT" ]
permissive
BySlin/darklaf
edd5d8a7e7e0aba8ce8027cfef239ef4e916f8a1
5cf63e99df67f86c6123d0389b36289ad2d274d4
refs/heads/master
2021-01-05T19:50:15.214384
2020-02-17T13:45:59
2020-02-17T13:45:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,142
java
/* * MIT License * * Copyright (c) 2020 Jannis Weis * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package ui.text; import ui.ComponentDemo; import ui.DemoPanel; import javax.swing.*; import java.awt.*; public class TextFieldDemo implements ComponentDemo { public static void main(final String[] args) { ComponentDemo.showDemo(new TextFieldDemo()); } @Override public JComponent createComponent() { JTextField textField = new JTextField("Demo TextField"); DemoPanel panel = new DemoPanel(textField); JPanel controlPanel = panel.getControls(); controlPanel.setLayout(new GridLayout(3, 2)); controlPanel.add(new JCheckBox("enabled") {{ setSelected(textField.isEnabled()); addActionListener(e -> textField.setEnabled(isSelected())); }}); controlPanel.add(new JCheckBox("editable") {{ setSelected(textField.isEditable()); addActionListener(e -> textField.setEditable(isSelected())); }}); controlPanel.add(new JCheckBox("LeftToRight") {{ setEnabled(true); addActionListener(e -> textField.setComponentOrientation(isSelected() ? ComponentOrientation.LEFT_TO_RIGHT : ComponentOrientation.RIGHT_TO_LEFT)); }}); controlPanel.add(new JCheckBox("JTextComponent.roundedSelection") {{ setSelected(true); addActionListener(e -> textField.putClientProperty("JTextComponent.roundedSelection", isSelected())); }}); controlPanel.add(new JCheckBox("JTextField.variant = search") {{ addActionListener(e -> textField.putClientProperty("JTextField.variant", isSelected() ? "search" : "")); }}); controlPanel.add(new JCheckBox("JTextComponent.hasError") {{ addActionListener(e -> textField.putClientProperty("JTextComponent.hasError", isSelected())); }}); return panel; } @Override public String getTitle() { return "TextField Demo"; } }
[ "weisj@arcor.de" ]
weisj@arcor.de
392787729917053e3ad1029c46450a83f8192f4c
173a703113759468a6d9d75556c0c5ee36e326cc
/src/main/java/tvmapps/TVFacetris.java
45ed22736282da73d65a5fa78bdc95f146a776c3
[]
no_license
reportmill/TVMApps
f08589ff5ed3a7311d194bd45b726a07d6f043e2
421d0e1a25e3edaf07252a357e12504341aef6b2
refs/heads/master
2023-06-08T01:34:56.366949
2023-05-29T15:38:20
2023-05-29T15:38:20
239,150,476
0
0
null
null
null
null
UTF-8
Java
false
false
331
java
package tvmapps; import snapdemos.facetris.Facetris; public class TVFacetris { /** * Standard main method. */ public static void main(String[] args) { snaptea.TV.set(); Facetris game = new Facetris(); game.getWindow().setMaximized(true); game.setWindowVisible(true); } }
[ "jeff@reportmill.com" ]
jeff@reportmill.com
7384e9f7fa131718552521da6b0b4de9c15fad54
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_038540ec87ae846992e22a46c26a3014540a6ee5/EventProcessor/3_038540ec87ae846992e22a46c26a3014540a6ee5_EventProcessor_s.java
48fb83017ec1a9ccb8da461bd4f94acd82b4efa6
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,613
java
/** * Copyright (c) 2012 Daniele Pantaleone, Mathias Van Malderen * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * @author Daniele Pantaleone * @version 1.0 * @copyright Daniele Pantaleone, 4 September, 2013 * @package com.orion.misc **/ package com.orion.misc; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Collection; import java.util.concurrent.BlockingQueue; import org.apache.commons.logging.Log; import org.joda.time.DateTime; import com.google.common.collect.Multimap; import com.orion.event.Event; import com.orion.exception.EventInterruptedException; import com.orion.misc.RegisteredMethod; import com.orion.plugin.Plugin; public class EventProcessor implements Runnable { private final Log log; private BlockingQueue<Event> eventBus; private Multimap<Class<?>, RegisteredMethod> regMethod; /** * Object constructor * * @author Daniele Pantaleone * @param log Main logger object reference * @param eventBus A <tt>BlockingQueue</tt> from where to fetch events * @param regMethod A <tt>Multimap</tt> which associate each <tt>Event</tt> to * a method **/ public EventProcessor(Log log, BlockingQueue<Event> eventBus, Multimap<Class<?>, RegisteredMethod> regMethod) { this.log = log; this.eventBus = eventBus; this.regMethod = regMethod; this.log.debug("Event processor initialized: " + this.regMethod.size() + " events registered"); } /** * Runnable implementation<br> * Will iterate throught all the events stored by the parser in the queue * It peeks an <tt>Event</tt> from the queue and process it over all * the mapped <tt>Methods</tt> retrieved from the registered events map * * @author Daniele Pantaleone **/ @Override public void run() { this.log.debug("Event processor started: " + new DateTime().toString()); while (true) { try { if (Thread.interrupted()) { throw new InterruptedException(); } Event event = this.eventBus.take(); Collection<RegisteredMethod> collection = this.regMethod.get(event.getClass()); // Skip if this event is not mapped over any method if ((collection == null) || (collection.size() == 0)) { continue; } // Iterating over all the RegisteredEvent for (RegisteredMethod r : collection) { try { Method method = r.getMethod(); Plugin plugin = r.getPlugin(); if (!plugin.isEnabled()) { continue; } method.invoke(plugin, event); } catch (InvocationTargetException | IllegalAccessException | IllegalArgumentException e) { // A plugin requested to stop processing this event so // we'll not iterate through the remaining event handlers if (e.getCause().getClass().equals(EventInterruptedException.class)) { continue; } // Logging the Exception and keep processing events anyway this.log.error("[" + r.getPlugin().getClass().getSimpleName() + "] Could not process event " + event.getClass().getSimpleName(), e); continue; } } } catch (InterruptedException e) { // Thread has received interrupt signal // Breaking the cycle so it will terminate break; } } this.log.debug("Event processor stopped: " + new DateTime().toString()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
52ddeabae812bc7fbd2f0970388f8951567baff5
ea8013860ed0b905c64f449c8bce9e0c34a23f7b
/SystemUIGoogle/sources/com/android/systemui/privacy/logging/PrivacyLogger$logPrivacyItemsToHold$2.java
79be964fa7948850c38e196b3073bf461e5a2a4f
[]
no_license
TheScarastic/redfin_b5
5efe0dc0d40b09a1a102dfb98bcde09bac4956db
6d85efe92477576c4901cce62e1202e31c30cbd2
refs/heads/master
2023-08-13T22:05:30.321241
2021-09-28T12:33:20
2021-09-28T12:33:20
411,210,644
1
0
null
null
null
null
UTF-8
Java
false
false
841
java
package com.android.systemui.privacy.logging; import com.android.systemui.log.LogMessage; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.Lambda; /* compiled from: PrivacyLogger.kt */ /* access modifiers changed from: package-private */ /* loaded from: classes.dex */ public final class PrivacyLogger$logPrivacyItemsToHold$2 extends Lambda implements Function1<LogMessage, String> { public static final PrivacyLogger$logPrivacyItemsToHold$2 INSTANCE = new PrivacyLogger$logPrivacyItemsToHold$2(); PrivacyLogger$logPrivacyItemsToHold$2() { super(1); } public final String invoke(LogMessage logMessage) { Intrinsics.checkNotNullParameter(logMessage, "$this$log"); return Intrinsics.stringPlus("Holding items: ", logMessage.getStr1()); } }
[ "warabhishek@gmail.com" ]
warabhishek@gmail.com
52de1d85d11a230d27ed83681570ea5beae7c003
9ec27dca6c230779fefdab78f4c489d4e8381f92
/main/java/uk/co/real_logic/sbe/util/BitUtil.java
780fd9be07e28c95348c2fe6b877e467da9909e1
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
qbm/simple-binary-encoding
3bf97778f670a0a8a757cc59f79009a71dd6ac2b
f85121528f57c6ffa189672eec6084a50189b072
refs/heads/master
2020-12-28T08:29:47.954447
2013-12-31T17:38:08
2013-12-31T17:38:08
15,595,031
1
0
null
null
null
null
UTF-8
Java
false
false
2,384
java
/* * Copyright 2013 Real Logic Ltd. * * 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 uk.co.real_logic.sbe.util; import sun.misc.Unsafe; import java.lang.reflect.Field; import java.security.AccessController; import java.security.PrivilegedExceptionAction; /** * Miscellaneous useful functions for dealing with low level bits and bytes. */ public class BitUtil { /** Size of a byte in bytes */ public static final int SIZE_OF_BYTE = 1; /** Size of a boolean in bytes */ public static final int SIZE_OF_BOOLEAN = 1; /** Size of a char in bytes */ public static final int SIZE_OF_CHAR = 2; /** Size of a short in bytes */ public static final int SIZE_OF_SHORT = 2; /** Size of an int in bytes */ public static final int SIZE_OF_INT = 4; /** Size of a a float in bytes */ public static final int SIZE_OF_FLOAT = 4; /** Size of a long in bytes */ public static final int SIZE_OF_LONG = 8; /** Size of a double in bytes */ public static final int SIZE_OF_DOUBLE = 8; private static final Unsafe UNSAFE; static { try { final PrivilegedExceptionAction<Unsafe> action = new PrivilegedExceptionAction<Unsafe>() { public Unsafe run() throws Exception { final Field f = Unsafe.class.getDeclaredField("theUnsafe"); f.setAccessible(true); return (Unsafe)f.get(null); } }; UNSAFE = AccessController.doPrivileged(action); } catch (final Exception ex) { throw new RuntimeException(ex); } } /** * Get the instance of {@link sun.misc.Unsafe}. * * @return the instance of Unsafe */ public static Unsafe getUnsafe() { return UNSAFE; } }
[ "mjpt777@gmail.com" ]
mjpt777@gmail.com
b80c4933069055985250d3b83ad769f154702175
d20244f441504d9f119dfadacb3bfdd5a024b8e2
/ehmp/product/production/soap-handler/src/main/java/gov/va/med/jmeadows_2_3_1/webservice/Alert.java
a2fe936fc4a2595bc9d730322d1384dd554bbdea
[ "Apache-2.0" ]
permissive
djwhitten/eHMP
33976e37cbf389c3deb598c598096fc0f160c1d4
2356516960cdb701996fe6273ac29aacced25101
refs/heads/master
2022-11-16T02:46:10.345118
2020-02-26T18:35:51
2020-02-26T18:35:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,038
java
package gov.va.med.jmeadows_2_3_1.webservice; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for alert complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="alert"> * &lt;complexContent> * &lt;extension base="{http://webservice.vds.URL /}dataBean"> * &lt;sequence> * &lt;element name="alertId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="messageText" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "alert", namespace = "http://webservice.vds.URL /", propOrder = { "alertId", "messageText" }) public class Alert extends DataBean { protected String alertId; protected String messageText; /** * Gets the value of the alertId property. * * @return * possible object is * {@link String } * */ public String getAlertId() { return alertId; } /** * Sets the value of the alertId property. * * @param value * allowed object is * {@link String } * */ public void setAlertId(String value) { this.alertId = value; } /** * Gets the value of the messageText property. * * @return * possible object is * {@link String } * */ public String getMessageText() { return messageText; } /** * Sets the value of the messageText property. * * @param value * allowed object is * {@link String } * */ public void setMessageText(String value) { this.messageText = value; } }
[ "sam.habiel@gmail.com" ]
sam.habiel@gmail.com
11ff18c32c34c9a0cbf72e74bf61b005ad11685d
29f78bfb928fb6f191b08624ac81b54878b80ded
/generated_SPs_SCs/SACConf/service_provider/src/main/java/large3/output/OutputDataClassName_4_5.java
8974a7203ad10c471f00e53eeec2823b4c62fea7
[]
no_license
MSPL4SOA/MSPL4SOA-tool
8a78e73b4ac7123cf1815796a70f26784866f272
9f3419e416c600cba13968390ee89110446d80fb
refs/heads/master
2020-04-17T17:30:27.410359
2018-07-27T14:18:55
2018-07-27T14:18:55
66,304,158
0
1
null
null
null
null
UTF-8
Java
false
false
1,805
java
package large3.output; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(name = "OutputDataClassName_4_5") @XmlType(name = "outputDataClassName_4_5", propOrder = { "OutputName_4_5_1", "OutputName_4_5_2", "OutputName_4_5_3", "OutputName_4_5_4", "OutputName_4_5_5" }) public class OutputDataClassName_4_5 implements Serializable { private static final long serialVersionUID = 1L; @XmlElement(name = "OutputName_4_5_1") protected String OutputName_4_5_1; @XmlElement(name = "OutputName_4_5_2") protected Float OutputName_4_5_2; @XmlElement(name = "OutputName_4_5_3") protected Float OutputName_4_5_3; @XmlElement(name = "OutputName_4_5_4") protected Float OutputName_4_5_4; @XmlElement(name = "OutputName_4_5_5") protected Float OutputName_4_5_5; public String getOutputName_4_5_1() { return OutputName_4_5_1; } public Float getOutputName_4_5_2() { return OutputName_4_5_2; } public Float getOutputName_4_5_3() { return OutputName_4_5_3; } public Float getOutputName_4_5_4() { return OutputName_4_5_4; } public Float getOutputName_4_5_5() { return OutputName_4_5_5; } public void setOutputName_4_5_1(String value) { this.OutputName_4_5_1 = value; } public void setOutputName_4_5_2(Float value) { this.OutputName_4_5_2 = value; } public void setOutputName_4_5_3(Float value) { this.OutputName_4_5_3 = value; } public void setOutputName_4_5_4(Float value) { this.OutputName_4_5_4 = value; } public void setOutputName_4_5_5(Float value) { this.OutputName_4_5_5 = value; } }
[ "akram.kamoun@gmail.com" ]
akram.kamoun@gmail.com
64f4ddd9e1c2deea20ec0e82f9ceb249f5d7f60c
81597b9d6b50df808035699d741a4e6cb994398e
/study_pdf/src/main/java/com/spinach/frame/itextpdf/sandbox/objects/Grid.java
be0bc59cfe6126c088a94ba5a83ea61caea36a04
[]
no_license
spinachgit/study_frame_third
d78fa794c39adbaaa708eae6c05e4d9ed30eb32f
23fe388e291ffff7a5da7d0987117e3106d024d2
refs/heads/master
2021-05-12T18:19:08.267682
2018-03-04T06:27:22
2018-03-04T06:27:22
113,398,256
0
0
null
null
null
null
UTF-8
Java
false
false
1,414
java
package com.spinach.frame.itextpdf.sandbox.objects; import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException; import com.itextpdf.text.PageSize; import com.itextpdf.text.Rectangle; import com.itextpdf.text.pdf.PdfContentByte; import com.itextpdf.text.pdf.PdfWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import com.spinach.frame.itextpdf.sandbox.WrapToTest; @WrapToTest public class Grid { public static final String DEST = "results/objects/grid.pdf"; public static void main(String[] args) throws IOException, DocumentException { File file = new File(DEST); file.getParentFile().mkdirs(); new Grid().createPdf(DEST); } public void createPdf(String dest) throws FileNotFoundException, DocumentException { Rectangle pagesize = PageSize.LETTER; Document document = new Document(pagesize); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(dest)); document.open(); PdfContentByte canvas = writer.getDirectContent(); for (float x = 0; x < pagesize.getWidth(); ) { for (float y = 0; y < pagesize.getHeight(); ) { canvas.circle(x, y, 1f); y += 72f; } x += 72f; } canvas.fill(); document.close(); } }
[ "1043204960@qq.com" ]
1043204960@qq.com
155e0057c8a5f03916f9d8073fb80670df331166
ccf82688f082e26cba5fc397c76c77cc007ab2e8
/Mage.Sets/src/mage/cards/b/BloatedContaminator.java
0cf4eda698329238ab3d25dad1ec4e19794e87e7
[ "MIT" ]
permissive
magefree/mage
3261a89320f586d698dd03ca759a7562829f247f
5dba61244c738f4a184af0d256046312ce21d911
refs/heads/master
2023-09-03T15:55:36.650410
2023-09-03T03:53:12
2023-09-03T03:53:12
4,158,448
1,803
1,133
MIT
2023-09-14T20:18:55
2012-04-27T13:18:34
Java
UTF-8
Java
false
false
1,360
java
package mage.cards.b; import java.util.UUID; import mage.MageInt; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.effects.common.counter.ProliferateEffect; import mage.constants.SubType; import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.ToxicAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; /** * @author TheElk801 */ public final class BloatedContaminator extends CardImpl { public BloatedContaminator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); this.subtype.add(SubType.PHYREXIAN); this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); // Trample this.addAbility(TrampleAbility.getInstance()); // Toxic 1 this.addAbility(new ToxicAbility(1)); // Whenever Bloated Contaminator deals combat damage to a player, proliferate. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ProliferateEffect(), false)); } private BloatedContaminator(final BloatedContaminator card) { super(card); } @Override public BloatedContaminator copy() { return new BloatedContaminator(this); } }
[ "theelk801@gmail.com" ]
theelk801@gmail.com
8913ed44a1958b2abf9f93ddf38024dcbfe2de67
75c707019b6c1928b00adabd99aa0d7442317854
/src/main/java/de/blau/android/services/util/ExtendedLocation.java
da0a2600c3be58052189485e0f7f77b9680c6936
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
MarcusWolschon/osmeditor4android
d774d41e46dbab82ac33d6128508ccd46506e79a
5170bfaac8e561a70b9d6ac03f412013ab563abc
refs/heads/master
2023-09-01T17:41:09.037801
2023-08-31T09:22:24
2023-08-31T09:22:24
32,623,844
343
109
NOASSERTION
2023-09-13T11:22:03
2015-03-21T07:25:43
Java
UTF-8
Java
false
false
4,700
java
package de.blau.android.services.util; import android.location.Location; import android.os.Parcel; import android.os.Parcelable; import androidx.annotation.NonNull; public class ExtendedLocation extends Location implements Parcelable { private static final int HAS_HDOP_MASK = 1; private static final int HAS_GEOID_HEIGHT_MASK = 2; private static final int HAS_GEOID_CORRECTION_MASK = 4; private static final int HAS_BAROMETRIC_HEIGHT_MASK = 8; private static final int USE_BAROMETRIC_HEIGHT_MASK = 16; private int flags = 0; private double hdop = Double.NaN; private double geoidHeight = Double.NaN; private double geoidCorrection = Double.NaN; private double barometricHeight = Double.NaN; public static final Parcelable.Creator<ExtendedLocation> CREATOR = new Parcelable.Creator<ExtendedLocation>() { @Override public ExtendedLocation createFromParcel(Parcel in) { Location l = Location.CREATOR.createFromParcel(in); ExtendedLocation el = new ExtendedLocation(l); el.flags = in.readInt(); el.hdop = in.readDouble(); el.geoidHeight = in.readDouble(); el.geoidCorrection = in.readDouble(); el.barometricHeight = in.readDouble(); return el; } @Override public ExtendedLocation[] newArray(int size) { return new ExtendedLocation[size]; } }; /** * Construct a new instance for a specific provider * * @param provider the provider */ public ExtendedLocation(@NonNull String provider) { super(provider); } /** * Copy constructor * * @param location the Location to copy */ public ExtendedLocation(@NonNull Location location) { super(location); } /** * Check if we have a hdop value * * @return true if present */ public boolean hasHdop() { return (flags & HAS_HDOP_MASK) != 0; } /** * @return the hdop */ public double getHdop() { return hdop; } /** * @param hdop the hdop to set */ public void setHdop(double hdop) { this.hdop = hdop; flags |= HAS_HDOP_MASK; } /** * Check if we have a height over the geoid value * * @return true if present */ public boolean hasGeoidHeight() { return (flags & HAS_GEOID_HEIGHT_MASK) != 0; } /** * @return the mslHeight */ public double getGeoidHeight() { return geoidHeight; } /** * @param geoidHeight the height over the geoid to set */ public void setGeoidHeight(double geoidHeight) { this.geoidHeight = geoidHeight; flags |= HAS_GEOID_HEIGHT_MASK; } /** * Check if we have a geoid correction value * * @return true if present */ public boolean hasGeoidCorrection() { return (flags & HAS_GEOID_CORRECTION_MASK) != 0; } /** * @return the geoidCorrection */ public double getGeoidCorrection() { return geoidCorrection; } /** * @param geoidCorrection the geoidCorrection to set */ public void setGeoidCorrection(double geoidCorrection) { this.geoidCorrection = geoidCorrection; flags |= HAS_GEOID_CORRECTION_MASK; } /** * Check if we have a barometric height value * * @return true if present */ public boolean hasBarometricHeight() { return (flags & HAS_BAROMETRIC_HEIGHT_MASK) != 0; } /** * @return the barometricHeight */ public double getBarometricHeight() { return barometricHeight; } /** * @param barometricHeight the barometricHeight to set */ public void setBarometricHeight(double barometricHeight) { this.barometricHeight = barometricHeight; flags |= HAS_BAROMETRIC_HEIGHT_MASK; } /** * Check if we should use barometric height values * * @return true if present */ public boolean useBarometricHeight() { return (flags & USE_BAROMETRIC_HEIGHT_MASK) != 0; } /** * Indicate that we should use barometric height */ public void setUseBarometricHeight() { flags |= USE_BAROMETRIC_HEIGHT_MASK; } @Override public void writeToParcel(Parcel dest, int flags) { super.writeToParcel(dest, flags); dest.writeInt(this.flags); dest.writeDouble(hdop); dest.writeDouble(geoidHeight); dest.writeDouble(geoidCorrection); dest.writeDouble(barometricHeight); } }
[ "simon@poole.ch" ]
simon@poole.ch
61c2c5561b17259d5d1c569650384db2a84251d9
d579b25070df5010c6f04c26928354cbc2f067ef
/benchmarks/generation/math_4/target/npefix/npefix-output/org/apache/commons/math3/optim/nonlinear/scalar/gradient/Preconditioner.java
b3b1c28d1e767ce4bd48457fef5d16ebe334aed1
[ "Apache-2.0", "BSD-3-Clause", "Minpack" ]
permissive
Spirals-Team/itzal-experiments
b9714f7a340ef9a2e4e748b5b723789592ea1cd5
87be2e8c554462ef38e7574dbdd5b28dadb52421
refs/heads/master
2022-04-07T22:45:06.765973
2020-03-03T06:18:03
2020-03-03T06:18:03
113,832,374
0
0
null
2020-03-03T06:18:05
2017-12-11T08:26:25
null
UTF-8
Java
false
false
160
java
package org.apache.commons.math3.optim.nonlinear.scalar.gradient; public interface Preconditioner { double[] precondition(double[] point, double[] r); }
[ "martin.monperrus@gnieh.org" ]
martin.monperrus@gnieh.org
ca48fac849e6e7da1fae4dab35ad9ebaa5ffc44d
47bee068ddb9dacfff94d08341f604ebe97f9fef
/src/main/java/com/smlsnnshn/Lessons/day31_ArrayList/AddAll.java
7b95728300d20a5f7e5382e317672579c69fe766
[]
no_license
ismailsinansahin/JavaLessons
55686229d946390a52383f5d80e1053f411286e7
768cb63e22462e7c2eef709102df5d19d9c98568
refs/heads/master
2023-07-18T23:10:31.302133
2021-09-14T20:56:35
2021-09-14T20:56:35
360,487,169
2
0
null
null
null
null
UTF-8
Java
false
false
501
java
package com.smlsnnshn.Lessons.day31_ArrayList; import java.util.ArrayList; public class AddAll { public static void main(String[] args) { ArrayList<String> l1 = new ArrayList<>(); l1.add("Java"); l1.add("JS"); ArrayList<String> l2 = new ArrayList<>(); l2.add("C#"); l2.add("C++"); System.out.println(l1.toString()); System.out.println(l2.toString()); l2.addAll(l1); System.out.println(l2.toString()); l1.addAll(l2); System.out.println(l1.toString()); } }
[ "ismailsinansahin@gmail.com" ]
ismailsinansahin@gmail.com
39822a54c9f4c71ac2602d646d661d5a1364d7e7
8cb667bb78ba520f0da39c36dffd94980dfa7907
/app/src/androidTest/java/com/eaglesakura/andriders/ui/navigation/session/UserSessionActivityTest.java
77e1d9f84bf5ff417e810a015c0f668a09e5a475
[ "MIT" ]
permissive
eaglesakura/andriders-central-engine-v3
e4ee4c4b52dab36629856f489cf0b594c7ef950b
6600104720f6e98faa9931b2479b03c6c274f167
refs/heads/v3.0.x
2021-01-16T23:32:50.477896
2017-01-07T15:44:41
2017-01-07T15:44:41
51,501,559
1
3
MIT
2018-01-13T13:07:59
2016-02-11T08:05:38
Java
UTF-8
Java
false
false
1,466
java
package com.eaglesakura.andriders.ui.navigation.session; import com.eaglesakura.andriders.AppScenarioTest; import com.eaglesakura.andriders.R; import com.eaglesakura.andriders.plugin.connection.SessionControlConnection; import com.eaglesakura.andriders.ui.navigation.UserSessionActivity; import com.eaglesakura.android.devicetest.scenario.UiScenario; import com.eaglesakura.util.Util; import org.junit.Test; import static com.eaglesakura.android.devicetest.scenario.ScenarioContext.assertTopActivity; public class UserSessionActivityTest extends AppScenarioTest<UserSessionActivity> { public UserSessionActivityTest() { super(UserSessionActivity.class); } @Test public void Activityが開ける() throws Throwable { assertTopActivity(UserSessionActivity.class); } @Test public void セッションを開始できる() throws Throwable { SessionControlConnection connection = new SessionControlConnection(getContext()); connection.connect(() -> false); Util.sleep(500); // UI経由でセッションを介し UiScenario.clickFromId(R.id.Button_SessionChange).step(); UiScenario.clickFromText(R.string.Word_Central_SessionStart).step(); // しばらくしたらセッションが開始されている Util.sleep(1000); assertTrue(connection.getCentralSessionController().isSessionStarted()); connection.disconnect(() -> false); } }
[ "eagle.sakura@gmail.com" ]
eagle.sakura@gmail.com
974d193ee4b281e449cdf4f36c389fa91df03e41
bb4214380eeb2733a3724c2ad40c19066431ad9c
/factory/src/main/java/com/ljr/factory/data/group/GroupsDataSource.java
51e5f7df7c1ed0b3a77d3e04792956c16c6e880a
[]
no_license
ljrRookie/Chat_ljr
5cadb6927ba3aafb141dfbeda43411b76b63ba0a
118a4201cc3b9ed372bd6a30e17759ba17242f7a
refs/heads/master
2020-03-12T21:29:36.268924
2018-05-30T07:48:57
2018-05-30T07:48:57
130,829,318
0
0
null
null
null
null
UTF-8
Java
false
false
295
java
package com.ljr.factory.data.group; import com.ljr.common.factory.data.DbDataSource; import com.ljr.factory.model.db.Group; /** * Created by 林佳荣 on 2018/5/21. * Github:https://github.com/ljrRookie * Function : */ public interface GroupsDataSource extends DbDataSource<Group>{ }
[ "15622732935@163.com" ]
15622732935@163.com
ea450d2279a50ec200404115a95efb887f1ca791
621a865f772ccbab32471fb388e20b620ebba6b0
/GameServer/java/net/sf/l2j/gameserver/instancemanager/QuestManager.java
cdf9a1082217785439a19a3eea88c2e5450efcaf
[]
no_license
BloodyDawn/Scions_of_Destiny
5257de035cdb7fe5ef92bc991119b464cba6790c
e03ef8117b57a1188ba80a381faff6f2e97d6c41
refs/heads/master
2021-01-12T00:02:47.744333
2017-04-24T06:30:39
2017-04-24T06:30:39
78,662,280
0
1
null
null
null
null
UTF-8
Java
false
false
6,019
java
/* * 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, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package net.sf.l2j.gameserver.instancemanager; import java.io.File; import java.io.IOException; import java.util.Map; import java.util.logging.Logger; import javolution.util.FastMap; import net.sf.l2j.Config; import net.sf.l2j.gameserver.model.quest.Quest; import net.sf.l2j.gameserver.scripting.L2ScriptEngineManager; import net.sf.l2j.gameserver.scripting.ScriptManager; public class QuestManager extends ScriptManager<Quest> { protected static Logger _log = Logger.getLogger(QuestManager.class.getName()); // ========================================================= private static QuestManager _Instance; public static final QuestManager getInstance() { if (_Instance == null) { System.out.println("Initializing QuestManager"); _Instance = new QuestManager(); } return _Instance; } // ========================================================= // ========================================================= // Data Field private Map<String, Quest> _quests = new FastMap<>(); // ========================================================= // Constructor public QuestManager() { } // ========================================================= // Method - Public public final boolean reload(String questFolder) { Quest q = getQuest(questFolder); if (q == null) return false; return q.reload(); } /** * Reloads the quest given by questId.<BR> * <B>NOTICE: Will only work if the quest name is equal to the quest folder name</B> * @param questId The id of the quest to be reloaded * @return true if reload was successful, false otherwise */ public final boolean reload(int questId) { Quest q = getQuest(questId); if (q == null) return false; return q.reload(); } public final void reloadAllQuests() { _log.info("Reloading Server Scripts"); try { // unload all scripts for (Quest quest : _quests.values()) { if (quest != null) quest.unload(); } // Firstly, preconfigure jython path L2ScriptEngineManager.getInstance().preConfigure(); // now load all scripts File scripts = new File(Config.DATAPACK_ROOT + "/data/scripts.cfg"); L2ScriptEngineManager.getInstance().executeScriptList(scripts); QuestManager.getInstance().report(); } catch (IOException ioe) { _log.severe("Failed loading scripts.cfg, no script is going to be loaded"); } } public final void report() { System.out.println("Loaded: " + _quests.size() + " quests"); } public final void save() { for (Quest q : _quests.values()) q.saveGlobalData(); } // ========================================================= // Property - Public public final Quest getQuest(String name) { return _quests.get(name); } public final Quest getQuest(int questId) { for (Quest q : _quests.values()) { if (q.getQuestIntId() == questId) return q; } return null; } public final void addQuest(Quest newQuest) { if (newQuest == null) throw new IllegalArgumentException("Quest argument cannot be null"); Quest old = _quests.get(newQuest.getName()); // FIXME: unloading the old quest at this point is a tad too late. // the new quest has already initialized itself and read the data, starting // an unpredictable number of tasks with that data. The old quest will now // save data which will never be read. // However, requesting the newQuest to re-read the data is not necessarily a // good option, since the newQuest may have already started timers, spawned NPCs // or taken any other action which it might re-take by re-reading the data. // the current solution properly closes the running tasks of the old quest but // ignores the data; perhaps the least of all evils... if (old != null) { old.unload(); _log.info("Replaced: ("+old.getName()+") with a new version ("+newQuest.getName()+")"); } _quests.put(newQuest.getName(), newQuest); } public final boolean removeQuest(Quest q) { return _quests.remove(q.getName()) != null; } /** * @see net.sf.l2j.gameserver.scripting.ScriptManager#getAllManagedScripts() */ @Override public Iterable<Quest> getAllManagedScripts() { return _quests.values(); } /** * @see net.sf.l2j.gameserver.scripting.ScriptManager#unload(net.sf.l2j.gameserver.scripting.ManagedScript) */ @Override public boolean unload(Quest ms) { ms.saveGlobalData(); return removeQuest(ms); } /** * @see net.sf.l2j.gameserver.scripting.ScriptManager#getScriptManagerName() */ @Override public String getScriptManagerName() { return "QuestManager"; } }
[ "psv71@yandex.ru" ]
psv71@yandex.ru
eb591361bfbc95bd5882d03f8c97978b25921341
92f75f65766402204ecbeaac6cece2a75bbf7c0d
/src/main/java/com/demotivirus/Day_164/Main.java
88e3f8e91f046c3fb429e34626e21486786b5bf6
[]
no_license
demotivirus/365_Days_Challenge
338139efe4f677ebb78abac4e4c674639ad78ab8
cfc25eb921dd59f9581a39bf00fb0fc15809e4bb
refs/heads/master
2023-07-21T19:04:26.927157
2021-09-07T20:25:29
2021-09-07T20:25:29
336,847,354
1
0
null
2021-09-07T20:20:42
2021-02-07T17:32:36
Java
UTF-8
Java
false
false
215
java
package com.demotivirus.Day_164; public class Main { public static void main(String[] args) { DataBase dataBase = DataBaseFactory.create("PostgreSQL"); dataBase.execute(Command.SELECT); } }
[ "demotivirus@gmail.com" ]
demotivirus@gmail.com
8fbc490156125e056d12e89aa0981ddffa3fdaa3
fac5d6126ab147e3197448d283f9a675733f3c34
/src/main/java/dji/thirdparty/rx/internal/operators/CompletableOnSubscribeMergeArray.java
c2fcce03dc2d1f92f9b6d4bd97af6c3300b26379
[]
no_license
KnzHz/fpv_live
412e1dc8ab511b1a5889c8714352e3a373cdae2f
7902f1a4834d581ee6afd0d17d87dc90424d3097
refs/heads/master
2022-12-18T18:15:39.101486
2020-09-24T19:42:03
2020-09-24T19:42:03
294,176,898
0
0
null
2020-09-09T17:03:58
2020-09-09T17:03:57
null
UTF-8
Java
false
false
2,783
java
package dji.thirdparty.rx.internal.operators; import dji.thirdparty.rx.Completable; import dji.thirdparty.rx.Subscription; import dji.thirdparty.rx.plugins.RxJavaPlugins; import dji.thirdparty.rx.subscriptions.CompositeSubscription; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; public final class CompletableOnSubscribeMergeArray implements Completable.CompletableOnSubscribe { final Completable[] sources; public CompletableOnSubscribeMergeArray(Completable[] sources2) { this.sources = sources2; } public void call(Completable.CompletableSubscriber s) { final CompositeSubscription set = new CompositeSubscription(); final AtomicInteger wip = new AtomicInteger(this.sources.length + 1); final AtomicBoolean once = new AtomicBoolean(); s.onSubscribe(set); Completable[] arr$ = this.sources; int len$ = arr$.length; int i$ = 0; while (i$ < len$) { Completable c = arr$[i$]; if (!set.isUnsubscribed()) { if (c == null) { set.unsubscribe(); NullPointerException npe = new NullPointerException("A completable source is null"); if (once.compareAndSet(false, true)) { s.onError(npe); return; } RxJavaPlugins.getInstance().getErrorHandler().handleError(npe); } final Completable.CompletableSubscriber completableSubscriber = s; c.subscribe(new Completable.CompletableSubscriber() { /* class dji.thirdparty.rx.internal.operators.CompletableOnSubscribeMergeArray.AnonymousClass1 */ public void onSubscribe(Subscription d) { set.add(d); } public void onError(Throwable e) { set.unsubscribe(); if (once.compareAndSet(false, true)) { completableSubscriber.onError(e); } else { RxJavaPlugins.getInstance().getErrorHandler().handleError(e); } } public void onCompleted() { if (wip.decrementAndGet() == 0 && once.compareAndSet(false, true)) { completableSubscriber.onCompleted(); } } }); i$++; } else { return; } } if (wip.decrementAndGet() == 0 && once.compareAndSet(false, true)) { s.onCompleted(); } } }
[ "michael@districtrace.com" ]
michael@districtrace.com
ea60022b0d9772ad0012ee1981b617e6b2e7172d
d37af28d8bf95332ec0903b29be1ef8962c624c8
/src/java/fr/paris/lutece/portal/web/search/SearchIndexationJspBean.java
97adab02705bd0d28b60a3da34c78933c5b947e2
[ "LicenseRef-scancode-other-permissive" ]
permissive
khalilo/lutece-core
df2ca89f45fb627f87724cb6ce18781018f7433f
0787eeb49de256fafc7319c7763ea2f3972646f1
refs/heads/master
2020-06-14T23:58:47.435720
2016-11-10T13:41:53
2016-11-10T13:41:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,293
java
/* * Copyright (c) 2002-2014, Mairie de Paris * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright notice * and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice * and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * 3. Neither the name of 'Mairie de Paris' nor 'Lutece' 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 HOLDERS 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. * * License 1.0 */ package fr.paris.lutece.portal.web.search; import fr.paris.lutece.portal.service.search.IndexationService; import fr.paris.lutece.portal.service.search.SearchIndexer; import fr.paris.lutece.portal.service.template.AppTemplateService; import fr.paris.lutece.portal.web.admin.AdminFeaturesPageJspBean; import fr.paris.lutece.util.html.HtmlTemplate; import java.util.Collection; import java.util.HashMap; import javax.servlet.http.HttpServletRequest; /** * This class provides the user interface to manage the launching of the indexing of the site pages */ public class SearchIndexationJspBean extends AdminFeaturesPageJspBean { // ////////////////////////////////////////////////////////////////////////// // Constantes /** * Right to manage indexation */ public static final String RIGHT_INDEXER = "CORE_SEARCH_INDEXATION"; private static final long serialVersionUID = 2585709013740037568L; private static final String TEMPLATE_MANAGE_INDEXER = "admin/search/manage_search_indexation.html"; private static final String TEMPLATE_INDEXER_LOGS = "admin/search/search_indexation_logs.html"; private static final String MARK_LOGS = "logs"; private static final String MARK_INDEXERS_LIST = "indexers_list"; /** * Displays the indexing parameters * * @param request * the http request * @return the html code which displays the parameters page */ public String getIndexingProperties( HttpServletRequest request ) { HashMap<String, Collection<SearchIndexer>> model = new HashMap<String, Collection<SearchIndexer>>( ); Collection<SearchIndexer> listIndexers = IndexationService.getIndexers( ); model.put( MARK_INDEXERS_LIST, listIndexers ); HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_MANAGE_INDEXER, getLocale( ), model ); return getAdminPage( template.getHtml( ) ); } /** * Calls the indexing process * * @param request * the http request * @return the result of the indexing process */ public String doIndexing( HttpServletRequest request ) { HashMap<String, Object> model = new HashMap<String, Object>( ); String strLogs; if ( request.getParameter( "incremental" ) != null ) { strLogs = IndexationService.processIndexing( false ); } else { strLogs = IndexationService.processIndexing( true ); } model.put( MARK_LOGS, strLogs ); HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_INDEXER_LOGS, null, model ); return getAdminPage( template.getHtml( ) ); } }
[ "pierrelevy@users.noreply.github.com" ]
pierrelevy@users.noreply.github.com
a15e6433a14bed37287ae9edd06e34980ef5ef9a
c4ae94b7646a128415e68050879cec767374a40b
/api/src/main/java/org/hawkular/accounts/api/internal/impl/MsgLogger.java
9472b18c25a9f9be35e85eab5e2cb5e6f21e1eec
[ "Apache-2.0" ]
permissive
ammendonca/hawkular-accounts
7971b4437c9cdb3113ba09d466a99cd5252371b0
18fd514265815652d658193dd072b82b3168314f
refs/heads/master
2021-01-15T11:08:37.077348
2016-01-14T13:14:55
2016-01-14T13:14:55
49,666,358
0
0
null
2016-01-14T18:26:11
2016-01-14T18:26:11
null
UTF-8
Java
false
false
1,900
java
/* * Copyright 2015 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.hawkular.accounts.api.internal.impl; import org.jboss.logging.Logger; import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.LogMessage; import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageLogger; import org.jboss.logging.annotations.ValidIdRange; /** * JBoss Logging integration, with the possible messages that we have for the API. * * @author Juraci Paixão Kröhling */ @MessageLogger(projectCode = "HAWKACC") @ValidIdRange(min = 100000, max = 109999) public interface MsgLogger { MsgLogger LOGGER = Logger.getMessageLogger(MsgLogger.class, MsgLogger.class.getPackage().getName()); @LogMessage(level = Logger.Level.WARN) @Message(id = 100000, value = "Could not process prepare query: [%s]") void couldNotPrepareQuery(String query, @Cause Throwable t); @LogMessage(level = Logger.Level.FATAL) @Message(id = 100001, value = "Failed to initialize Cassandra's schema for Accounts. Reason") void failedToInitializeSchema(@Cause Throwable t); @LogMessage(level = Logger.Level.DEBUG) @Message(id = 100002, value = "Shutting down Cassandra driver for Accounts") void shuttingDownCassandraDriver(); }
[ "juraci@kroehling.de" ]
juraci@kroehling.de
b485f4b3742baf7fa7daddccf58f26662da70c12
94f33a2b06c1013a53e5fd986116e8b4d9f67e4e
/src/main/java/org/thymeleaf/DialectConfiguration.java
28a92f5b2916a3ca8f29e8a131b4b746e73cc7f2
[ "Apache-2.0" ]
permissive
lukosan/thymeleaf
83cc5dd6971e2ea3337f17503c4e6f4a2ec19bca
cbaafa11b1f8f6027eb30db044933e5370920f02
refs/heads/3.0-master
2021-04-30T22:13:14.732375
2015-09-30T23:04:27
2015-09-30T23:04:27
43,484,487
0
0
null
2015-10-01T07:50:13
2015-10-01T07:50:13
null
UTF-8
Java
false
false
2,987
java
/* * ============================================================================= * * Copyright (c) 2011-2014, The THYMELEAF team (http://www.thymeleaf.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ============================================================================= */ package org.thymeleaf; import org.thymeleaf.dialect.IDialect; import org.thymeleaf.dialect.IProcessorDialect; import org.thymeleaf.util.Validate; /** * <p> * Configuration class for a specific {@link org.thymeleaf.dialect.IDialect}. Objects of this class * specify a dialect to be used at a template engine, along with the prefix to be applied to it. * </p> * <p> * When a dialect is specified WITH a prefix, this means we want that dialect's processors to match on * attributes and elements that have such prefix in their names. This configured prefix will override the * default prefix specified by the dialect instance itself. If the specified prefix is null, this will mean * the processors will apply on elements/attributes with no prefix. * </p> * <p> * When a dialect is specified WITHOUT a prefix, this means we will just use the default prefix returned by * the dialect instance itself, if it applies (i.e. if it implements * {@link IProcessorDialect}). * </p> * * @author Daniel Fern&aacute;ndez * * @since 1.0 (reimplemented in 3.0.0) * */ public final class DialectConfiguration { private final boolean prefixSpecified; private final String prefix; private final IDialect dialect; public DialectConfiguration(final IDialect dialect) { super(); // Prefix CAN be null Validate.notNull(dialect, "Dialect cannot be null"); this.prefixSpecified = false; this.prefix = null; this.dialect = dialect; } public DialectConfiguration(final String prefix, final IDialect dialect) { super(); // Prefix CAN be null - that will mean the dialect's processors will apply to elements/attributes without prefix Validate.notNull(dialect, "Dialect cannot be null"); this.prefixSpecified = true; this.prefix = prefix; this.dialect = dialect; } public IDialect getDialect() { return this.dialect; } public String getPrefix() { return this.prefix; } public boolean isPrefixSpecified() { return this.prefixSpecified; } }
[ "daniel.fernandez@11thlabs.org" ]
daniel.fernandez@11thlabs.org
e1fa585936b15b5df083f08b60d331d88a151543
04f7e1cb0e208e034c1930ff258020af2130760f
/ShopE/src/main/java/ua/artcode/listener/InitSpringContextListener.java
1327062aeeea1df22780868b386147d1d7a4912a
[]
no_license
presly808/ACP5
7142325c6456c2805975e8486876cdaa90fdb0f5
3ec8dde49fd964f19597e01929a95c1d672b227b
refs/heads/master
2021-01-01T16:19:29.046825
2015-06-28T08:21:31
2015-06-28T08:21:31
29,540,516
0
3
null
null
null
null
UTF-8
Java
false
false
817
java
package ua.artcode.listener; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; /** * Created by serhii on 22.03.15. */ public class InitSpringContextListener implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent sce) { String location = sce.getServletContext().getInitParameter("springLocation"); ApplicationContext applicationContext = new ClassPathXmlApplicationContext(location); sce.getServletContext().setAttribute("applicationContext", applicationContext); } @Override public void contextDestroyed(ServletContextEvent sce) { } }
[ "presly808@gmail.com" ]
presly808@gmail.com
1ff4aed4ad294b69028799f61f102f6f60ba8cba
670953f3bc550008a0cc4b1ceff3509525f0b206
/src/main/java/org/zaproxy/libs/DownloadTools.java
6be60f237a1c331e5205f9aea3deef42d2a1dee5
[ "Apache-2.0" ]
permissive
psiinon/zap-libs
a26f71bac2dbff4390226052fcc445e7ab80e05e
4400147f1f4db6be06d18af5a539044f20fac2d0
refs/heads/master
2021-01-14T02:37:53.794517
2019-01-16T16:31:12
2019-01-16T17:39:23
81,844,027
0
0
null
2017-02-13T16:10:26
2017-02-13T16:10:26
null
UTF-8
Java
false
false
4,706
java
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2017 The ZAP Development Team * * 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.zaproxy.libs; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.net.URL; import java.util.zip.GZIPInputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import org.apache.commons.compress.archivers.ArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; public class DownloadTools { public static void downloadDriver(String urlStr, String destDir, String destFile) { File dest = new File(destDir + destFile); if (dest.exists()) { System.out.println("Already exists: " + dest.getAbsolutePath()); return; } File parent = dest.getParentFile(); if (!parent.exists() && !parent.mkdirs()) { System.out.println( "Failed to create directory : " + dest.getParentFile().getAbsolutePath()); } byte[] buffer = new byte[1024]; if (urlStr.endsWith(".zip")) { try { URL url = new URL(urlStr); ZipInputStream zipIn = new ZipInputStream(url.openStream()); ZipEntry entry; boolean isFound = false; while ((entry = zipIn.getNextEntry()) != null) { if (destFile.equals(entry.getName())) { isFound = true; FileOutputStream out = new FileOutputStream(dest); int read = 0; while ((read = zipIn.read(buffer)) != -1) { out.write(buffer, 0, read); } out.close(); System.out.println("Updated: " + dest.getAbsolutePath()); } else { System.out.println("Found " + entry.getName()); } zipIn.closeEntry(); entry = zipIn.getNextEntry(); } zipIn.close(); if (!isFound) { System.out.println("Failed to find " + destFile); System.exit(1); } } catch (IOException ex) { ex.printStackTrace(); System.exit(1); } } else if (urlStr.endsWith(".tar.gz")) { try { URL url = new URL(urlStr); GZIPInputStream gzis = new GZIPInputStream(url.openStream()); File tarFile = new File(dest.getAbsolutePath() + ".tar"); FileOutputStream out = new FileOutputStream(tarFile); int len; while ((len = gzis.read(buffer)) > 0) { out.write(buffer, 0, len); } gzis.close(); out.close(); TarArchiveInputStream tar = new TarArchiveInputStream(new FileInputStream(tarFile)); ArchiveEntry entry; boolean isFound = false; while ((entry = tar.getNextEntry()) != null) { if (destFile.equals(entry.getName())) { out = new FileOutputStream(dest); isFound = true; int read = 0; while ((read = tar.read(buffer)) != -1) { out.write(buffer, 0, read); } out.close(); System.out.println("Updated: " + dest.getAbsolutePath()); } } tar.close(); tarFile.delete(); if (!isFound) { System.out.println("Failed to find " + destFile); System.exit(1); } } catch (IOException ex) { ex.printStackTrace(); System.exit(1); } } } }
[ "thc202@gmail.com" ]
thc202@gmail.com
799ec188c95815d56604dde32adf5554a42a2f86
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-sas/src/main/java/com/aliyuncs/sas/transform/v20181203/GetCheckRiskStatisticsResponseUnmarshaller.java
818e4809de92591f9af2e5010b347eecd8cf6cae
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
3,666
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.sas.transform.v20181203; import java.util.ArrayList; import java.util.List; import com.aliyuncs.sas.model.v20181203.GetCheckRiskStatisticsResponse; import com.aliyuncs.sas.model.v20181203.GetCheckRiskStatisticsResponse.DataItem; import com.aliyuncs.sas.model.v20181203.GetCheckRiskStatisticsResponse.DataItem.SubStatistic; import com.aliyuncs.transform.UnmarshallerContext; public class GetCheckRiskStatisticsResponseUnmarshaller { public static GetCheckRiskStatisticsResponse unmarshall(GetCheckRiskStatisticsResponse getCheckRiskStatisticsResponse, UnmarshallerContext _ctx) { getCheckRiskStatisticsResponse.setRequestId(_ctx.stringValue("GetCheckRiskStatisticsResponse.RequestId")); getCheckRiskStatisticsResponse.setCount(_ctx.integerValue("GetCheckRiskStatisticsResponse.Count")); List<DataItem> data = new ArrayList<DataItem>(); for (int i = 0; i < _ctx.lengthValue("GetCheckRiskStatisticsResponse.Data.Length"); i++) { DataItem dataItem = new DataItem(); dataItem.setSceneName(_ctx.stringValue("GetCheckRiskStatisticsResponse.Data["+ i +"].SceneName")); dataItem.setLowWarningCount(_ctx.integerValue("GetCheckRiskStatisticsResponse.Data["+ i +"].LowWarningCount")); dataItem.setMediumWarningCount(_ctx.integerValue("GetCheckRiskStatisticsResponse.Data["+ i +"].MediumWarningCount")); dataItem.setHighWarningCount(_ctx.integerValue("GetCheckRiskStatisticsResponse.Data["+ i +"].HighWarningCount")); dataItem.setTotalCount(_ctx.integerValue("GetCheckRiskStatisticsResponse.Data["+ i +"].TotalCount")); dataItem.setPassCount(_ctx.integerValue("GetCheckRiskStatisticsResponse.Data["+ i +"].PassCount")); List<SubStatistic> subStatistics = new ArrayList<SubStatistic>(); for (int j = 0; j < _ctx.lengthValue("GetCheckRiskStatisticsResponse.Data["+ i +"].SubStatistics.Length"); j++) { SubStatistic subStatistic = new SubStatistic(); subStatistic.setTypeName(_ctx.stringValue("GetCheckRiskStatisticsResponse.Data["+ i +"].SubStatistics["+ j +"].TypeName")); subStatistic.setAlias(_ctx.stringValue("GetCheckRiskStatisticsResponse.Data["+ i +"].SubStatistics["+ j +"].Alias")); subStatistic.setLowWarningCount(_ctx.integerValue("GetCheckRiskStatisticsResponse.Data["+ i +"].SubStatistics["+ j +"].LowWarningCount")); subStatistic.setMediumWarningCount(_ctx.integerValue("GetCheckRiskStatisticsResponse.Data["+ i +"].SubStatistics["+ j +"].MediumWarningCount")); subStatistic.setHighWarningCount(_ctx.integerValue("GetCheckRiskStatisticsResponse.Data["+ i +"].SubStatistics["+ j +"].HighWarningCount")); subStatistic.setTotalCount(_ctx.integerValue("GetCheckRiskStatisticsResponse.Data["+ i +"].SubStatistics["+ j +"].TotalCount")); subStatistic.setPassCount(_ctx.integerValue("GetCheckRiskStatisticsResponse.Data["+ i +"].SubStatistics["+ j +"].PassCount")); subStatistics.add(subStatistic); } dataItem.setSubStatistics(subStatistics); data.add(dataItem); } getCheckRiskStatisticsResponse.setData(data); return getCheckRiskStatisticsResponse; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
b25862d444cb43b457ff401c33401c843b69a9e6
993cae9edae998529d4ef06fc67e319d34ee83ef
/src/cn/edu/sau/javashop/core/model/DeliveryItem.java
05b84c77d6a4944eef277d8705a932bf2a7e21f7
[]
no_license
zhangyuanqiao93/MySAUShop
77dfe4d46d8ac2a9de675a9df9ae29ca3cae1ef7
cc72727b2bc1148939666b0f1830ba522042b779
refs/heads/master
2021-01-25T05:02:20.602636
2017-08-03T01:06:43
2017-08-03T01:06:43
93,504,556
0
0
null
null
null
null
UTF-8
Java
false
false
1,336
java
package cn.edu.sau.javashop.core.model; /** * 货运明细 */ public class DeliveryItem { private Integer item_id; private Integer delivery_id; private Integer goods_id; private Integer product_id; private String sn; private String name; private Integer num; private Integer itemtype; //货物类型 public Integer getItem_id() { return item_id; } public void setItem_id(Integer itemId) { item_id = itemId; } public Integer getDelivery_id() { return delivery_id; } public void setDelivery_id(Integer deliveryId) { delivery_id = deliveryId; } public Integer getProduct_id() { return product_id; } public void setProduct_id(Integer productId) { product_id = productId; } public String getSn() { return sn; } public void setSn(String sn) { this.sn = sn; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getGoods_id() { return goods_id; } public void setGoods_id(Integer goodsId) { goods_id = goodsId; } public Integer getNum() { return num; } public void setNum(Integer num) { this.num = num; } public Integer getItemtype() { return itemtype; } public void setItemtype(Integer itemtype) { this.itemtype = itemtype; } }
[ "zhangyuanqiao0912@163.com" ]
zhangyuanqiao0912@163.com
aefc958e6a013f366df15c606d945f8bba1dbfbc
75c4712ae3f946db0c9196ee8307748231487e4b
/src/main/java/com/alipay/api/response/AlipayEcoTextDetectResponse.java
49818d5df5ce66e121b89ce89e85b7c7479da85b
[ "Apache-2.0" ]
permissive
yuanbaoMarvin/alipay-sdk-java-all
70a72a969f464d79c79d09af8b6b01fa177ac1be
25f3003d820dbd0b73739d8e32a6093468d9ed92
refs/heads/master
2023-06-03T16:54:25.138471
2021-06-25T14:48:21
2021-06-25T14:48:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
812
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.SpiDetectionDetail; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.eco.text.detect response. * * @author auto create * @since 1.0, 2019-09-06 17:57:54 */ public class AlipayEcoTextDetectResponse extends AlipayResponse { private static final long serialVersionUID = 5776477629445125155L; /** * 检测结果 */ @ApiListField("data") @ApiField("spi_detection_detail") private List<SpiDetectionDetail> data; public void setData(List<SpiDetectionDetail> data) { this.data = data; } public List<SpiDetectionDetail> getData( ) { return this.data; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
53820a99fa6eba83627ae66345971e2c489814e7
1dead5a825c6253ff6b7e07c623e1a001bc30c12
/src/test/java/io/bunnyblue/android/sdk/mirror/HelloTesat.java
a0c8bce8e03f77eacd273f9fea8f70a6aa41dee7
[ "ICU", "MIT" ]
permissive
bunnyblueair/AndroidSDKMirror
546e14169f5693e7489fdf801d7a683e755dfb6a
61e43dd9250623ff0044b6fb06a9026c458ae618
refs/heads/master
2020-03-28T10:21:22.570829
2019-04-02T08:07:07
2019-04-02T08:07:07
148,102,148
1
0
null
null
null
null
UTF-8
Java
false
false
300
java
/* * Copyright (c) 2018. * AndroidSDKMirror */ package io.bunnyblue.android.sdk.mirror; import org.junit.Test; /** * @author bunnyblue */ public class HelloTesat { @Test public void txxxTest(){ System.err.println("cae5a211131168bb9b1945db9922a1ba30f096e6".length()); } }
[ "bunnyblueair@gmail.com" ]
bunnyblueair@gmail.com
e39a540ff00413c53d1625b639c56eda706b899b
c95ca5eeeb81f492383514d4a54e5f066d2ac08f
/xiaoyaoji-web/src/main/java/cn/com/xiaoyaoji/data/bean/ProjectGlobal.java
a8fee8f6979b758adc4213cd0ad3a8f3aaaddd05
[]
no_license
Jsonlu/api
679bc5fa6a54f732d98cadf3c07c0a4cfbcaaa58
a6695c46c5af22be06b4cfcc95286d3181e57b81
refs/heads/master
2021-01-01T19:38:09.510476
2017-07-29T07:25:44
2017-07-29T07:25:44
98,634,690
0
0
null
null
null
null
UTF-8
Java
false
false
1,185
java
package cn.com.xiaoyaoji.data.bean; import cn.com.xiaoyaoji.core.annotations.Alias; import cn.com.xiaoyaoji.utils.JsonUtils; /** * @author: zhoujingjie * @Date: 17/4/25 */ @Alias("project_global") public class ProjectGlobal { private String id; private String environment; private String http; private String status; private String projectId; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getEnvironment() { return environment; } public void setEnvironment(String environment) { this.environment = environment; } public String getHttp() { return http; } public void setHttp(String http) { this.http = http; } public String getProjectId() { return projectId; } public void setProjectId(String projectId) { this.projectId = projectId; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } @Override public String toString() { return JsonUtils.toString(this); } }
[ "a12345678" ]
a12345678
5d70f59844dc828ca1468dc8f73e6701067c87da
7f786c40d0853da08c25687bceacf8032d870523
/app/src/main/java/com/app/elixir/makkhankitchens/fcm/MyFirebaseMessagingService.java
f54c45700a974d9cdb6f68d0277ee02d1db8a5a3
[]
no_license
Ravikumawat1990/MakkhanKitchen
1338577c14d8f715b2bcd9420080124f5f3dbd52
478709b75c8f17a8328a9481297570b83b245a3c
refs/heads/master
2020-12-03T00:44:11.609069
2017-07-03T06:08:15
2017-07-03T06:08:15
96,075,420
0
0
null
null
null
null
UTF-8
Java
false
false
5,373
java
package com.app.elixir.makkhankitchens.fcm; import android.annotation.TargetApi; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.media.RingtoneManager; import android.net.Uri; import android.os.Build; import android.support.v7.app.NotificationCompat; import android.util.Log; import com.app.elixir.makkhankitchens.Model.NotiModel; import com.app.elixir.makkhankitchens.R; import com.app.elixir.makkhankitchens.activity.ViewDeliveryBoy; import com.app.elixir.makkhankitchens.activity.ViewSplash; import com.app.elixir.makkhankitchens.database.tbl_notification; import com.app.elixir.makkhankitchens.database.tbl_notificationNew; import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.RemoteMessage; import java.util.ArrayList; import java.util.Iterator; import java.util.Map; import java.util.Set; public class MyFirebaseMessagingService extends FirebaseMessagingService { private static final String TAG = "MyFirebaseMsgService"; private static final String TAG1 = "logout"; Context context; @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); } @TargetApi(Build.VERSION_CODES.KITKAT) @Override public void onMessageReceived(RemoteMessage remoteMessage) { // TODO(developer): Handle FCM messages here. context = getApplicationContext(); Map data = remoteMessage.getData(); Set keys = data.keySet(); Iterator itr = keys.iterator(); String key; String value = ""; while (itr.hasNext()) { key = (String) itr.next(); value = (String) data.get(key); System.out.println(key + " - " + value); } Log.d(TAG, "From: " + remoteMessage.getFrom()); sendNotification(remoteMessage.getNotification().getBody()); if (remoteMessage.getNotification().getBody().equals("Delivery")) { Intent intent = new Intent("Delivery"); // put whatever data you want to send, if any intent.putExtra("message", value.toString()); //send broadcast sendBroadcast(intent); sendNotificationDelivery(remoteMessage.getNotification().getBody()); } else if (remoteMessage.getNotification().getBody().equals("Customer")) { Intent intent = new Intent("Customer"); intent.putExtra("message", value.toString()); //send broadcast sendBroadcast(intent); sendNotification(remoteMessage.getNotification().getBody()); } else { } } private void sendNotificationDelivery(String messageBody) { int requestID = (int) System.currentTimeMillis(); Intent intent = new Intent(this, ViewDeliveryBoy.class); PendingIntent pendingIntent = PendingIntent.getActivity(this, requestID, intent, PendingIntent.FLAG_UPDATE_CURRENT); Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); NotificationCompat.Builder notificationBuilder = (NotificationCompat.Builder) new NotificationCompat.Builder(this) .setContentTitle(getString(R.string.app_name)) .setContentText(messageBody) .setAutoCancel(true) .setSound(defaultSoundUri) .setContentIntent(pendingIntent); notificationBuilder.setSmallIcon(R.drawable.applogo); NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); notificationManager.notify(requestID, notificationBuilder.build()); ArrayList<NotiModel> notiModels = new ArrayList<>(); NotiModel notiModel = new NotiModel(); notiModel.setKey(String.valueOf(requestID)); notiModel.setIsViewed("0"); notiModels.add(notiModel); tbl_notificationNew.Insert(notiModels); } private void sendNotification(String messageBody) { int requestID = (int) System.currentTimeMillis(); Intent intent = new Intent(this, ViewSplash.class); ArrayList<NotiModel> notiModels = new ArrayList<>(); NotiModel notiModel = new NotiModel(); notiModel.setKey(String.valueOf(requestID)); notiModel.setIsViewed("0"); notiModels.add(notiModel); tbl_notification.Insert(notiModels); PendingIntent pendingIntent = PendingIntent.getActivity(this, requestID, intent, PendingIntent.FLAG_UPDATE_CURRENT); Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); NotificationCompat.Builder notificationBuilder = (NotificationCompat.Builder) new NotificationCompat.Builder(this) .setContentTitle(getString(R.string.app_name)) .setContentText(messageBody) .setAutoCancel(true) .setSound(defaultSoundUri) .setContentIntent(pendingIntent); notificationBuilder.setSmallIcon(R.drawable.applogo); NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); notificationManager.notify(requestID, notificationBuilder.build()); } }
[ "kravi@elixirinfo.com" ]
kravi@elixirinfo.com
012ac269893b798064c000154241247e2e3a01c4
4b9a05af7a67644c8529632bae51dc84c03654ec
/app/src/main/java/com/idolmedia/yzy/ui/activity/WelcomeActivity.java
be547d8c2775ec6e395bd4bec3a20f18bcadec29
[]
no_license
13041230559/yzy_master
cbaa5eed33e34d23a2709c992779a469c37683dc
26ba12de3c565859c1ffc58c316ec68c422bd4a9
refs/heads/master
2020-03-06T21:10:39.941124
2018-03-28T02:39:08
2018-03-28T02:39:08
127,071,792
0
0
null
null
null
null
UTF-8
Java
false
false
3,128
java
package com.idolmedia.yzy.ui.activity; import android.content.Intent; import android.os.Bundle; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.idolmedia.yzy.MainActivity; import com.idolmedia.yzy.R; import com.idolmedia.yzy.utlis.SharedUtil; import com.mumu.common.base.BaseActivity; import com.mumu.common.widget.StatusBarCompat; import java.util.ArrayList; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; /** * 项目名称:com.idolmedia.yzy.ui.activity * 创建人:JOKER.WANG * 创建时间:2017/12/12 10:36 * 描述: 引导页 */ public class WelcomeActivity extends BaseActivity { @BindView(R.id.view_page) ViewPager viewPage; private List<View> viewList = new ArrayList<View>(); PageAdapter pageAdapter; @Override public int getLayoutId() { return R.layout.activity_welcome; } @Override public void initPresenter() { } @Override public void initView() { StatusBarCompat.translucentStatusBar(this); LayoutInflater inflater = LayoutInflater.from(this); viewList.add(inflater.inflate(R.layout.w1,null)); viewList.add(inflater.inflate(R.layout.w2,null)); viewList.add(inflater.inflate(R.layout.w3,null)); viewList.add(inflater.inflate(R.layout.w4,null)); viewList.add(inflater.inflate(R.layout.w5,null)); viewList.get(viewList.size()-1).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { SharedUtil.setBoolean("WelcomeActivity",true); Intent intent=new Intent(WelcomeActivity.this, MainActivity.class); startActivity(intent); finish(); } }); pageAdapter=new PageAdapter(); viewPage.setAdapter(pageAdapter); // viewPage.setPageTransformer(true, new DepthPageTransformer()); viewPage.setOffscreenPageLimit(viewList.size());// 加载缓存的页面个数 } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // TODO: add setContentView(...) invocation ButterKnife.bind(this); } class PageAdapter extends PagerAdapter { @Override public int getCount() { return viewList.size(); } // 销毁某个元素时候调用 @Override public void destroyItem(ViewGroup container, int position, Object object) { container.removeView(viewList.get(position)); } // 更新视图 @Override public Object instantiateItem(ViewGroup container, int position) { container.addView(viewList.get(position)); return viewList.get(position); } // 判断是否是生成的对象 @Override public boolean isViewFromObject(View view, Object object) { return view == object; } } }
[ "604293733@qq.com" ]
604293733@qq.com
16fa0739fe5e4762304c5349afa9292dbac60daf
0a04ae5d108d1c8e8e0cd1db886ee25508f60cfd
/SillyChildMerchant/app/src/main/java/com/yinglan/scm/constant/URLConstants.java
eecddcdcbf9a73cc012ba957392f3071e03b6b59
[ "Apache-2.0" ]
permissive
921668753/SillyChildMerchant-Android
fdb376da9320a3349fe0b10e0584430bab638194
5285935dbfed1d4f2fb08bda99337377bc4910d1
refs/heads/master
2021-08-08T14:58:01.228053
2018-09-30T12:00:23
2018-09-30T12:00:23
132,315,538
1
0
null
null
null
null
UTF-8
Java
false
false
6,938
java
package com.yinglan.scm.constant; /** * 用于存放url常量的类 * Created by ruitu ck on 2016/9/14. */ public class URLConstants { /** * 正式服务器地址URL */ // public static String SERVERURL = "http://user.api.shahaizi.shop/"; // public static String SERVERURLBUS = "http://business.api.shahaizi.shop/"; // public static String SERVERURLADMIN = "http://admin.shahaizi.shop/"; /** * 测试服务器地址URL */ // public static String SERVERURL = "http://192.168.1.247:8080/"; public static String SERVERURL = "http://store.api.shahaizhi.com/"; public static String SERVERURL1 = "http://www.shahaizhi.tech/"; /** * 请求地址URL */ public static String APIURL = SERVERURL + "api/seller/"; /** * 获取七牛云key-ok */ public static String QINIUKEY = SERVERURL + "api/public/key/qiniu.do"; /** * 应用配置参数 */ public static String APPCONFIG = APIURL + "appConfig"; /** * 根据融云token获取头像性别昵称 */ public static String SYSRONGCLOUD = APIURL + "sys/rongCloud.do"; /** * 置换Token get请求 */ public static String REFRESHTOKEN = APIURL + "m=Api&c=User&a=flashToken"; /** * 登录 */ public static String USERLOGIN = APIURL + "sys/login.do"; /** * 获取会员登录状态 */ public static String ISLOGIN = APIURL + "sys/islogin.do"; /** * 退出登录 */ public static String LOGOUT = APIURL + "sys/exit.do"; /** * 第三方登录 */ public static String USERTHIRDLOGIN = APIURL + "sys/third.do"; /** * 获取第三方登录验证码 */ public static String THIRDCODE = APIURL + "sys/thirdCode.do"; /** * 短信验证码【手机号注册】 * 验证码类型 reg=注册 resetpwd=找回密码 login=登陆 bind=绑定手机号. */ public static String SENDREGISTER = APIURL + "sys/code.do"; /** * 短信验证码【找回、修改密码】 * 验证码类型 reg=注册 resetpwd=找回密码 login=登陆 bind=绑定手机号. */ public static String SENDFINFDCODE = APIURL + "sys/find.do"; /** * 用户注册 */ public static String REGISTER = APIURL + "sys/regist.do"; /** * 用户注册协议 */ public static String REGISTPROTOOL = SERVERURL1 + "dist/pages/registProtocol.html"; /** * 更改密码【手机】 */ public static String USERRESTPWD = APIURL + "sys/edit.do"; /** * 申请成为店长 */ public static String HOMEPAGE = APIURL + "member/post.do"; /** * 重新申请成为店长 */ public static String REHOMEPAGE = APIURL + "member/rePost.do"; /** * 获取系统消息首页 */ public static String NEWLISTBUYTITLE = APIURL + "news/listByTitle.do"; /** * 获取消息列表 */ public static String NEWTITLE = APIURL + "news/title.do"; /** * 选中某条消息并设为已读 */ public static String NEWSELECT = APIURL + "news/select.do"; /** * 获取订单信息列表 */ public static String ORDERLIST = APIURL + "order/list.do"; /** * 获取快递公司接口 */ public static String ORDERLOGIS = APIURL + "order/logis.do"; /** * 确认发货 */ public static String ORDERSHIP = APIURL + "order/ship.do"; /** * 获取物流详情 */ public static String ORDERLOGISTICS = SERVERURL1 + "html/order_logistics.html?orderid="; /** * 查看评价 */ public static String ORDERRATE = APIURL + "order/rate.do"; /** * 售后详情 */ public static String SELLBACKDETAIL = APIURL + "order/sellBack/detail.do"; /** * 订单售后 */ public static String ORDERBACK = APIURL + "order/back.do"; /** * 获取订单详情 */ public static String ORDERDETAIL = APIURL + "order/detail.do"; /** * 批量填写快递单信息 */ public static String ORDERSHOPNO = APIURL + "order/shopNo.do"; /** * 获取商家店铺信息 */ public static String STOREINFO = APIURL + "member/store/get.do"; /** * 修改个人信息 */ public static String MEMBEREDIT = APIURL + "member/edit.do"; /** * 获取个人信息 */ public static String MEMBERINFO = APIURL + "member/get.do"; /** * 获取商品分类列表 */ public static String GOODSTYPE = APIURL + "goods/types.do"; /** * 获取品牌列表 */ public static String GOODSBRANDS = APIURL + "goods/brands.do"; /** * 获取商品分类参数列表 */ public static String GOODSPARAMS = APIURL + "goods/params.do"; /** * 获取商品列表 */ public static String GOODLIST = APIURL + "goods/list.do"; /** * 商品上下架 */ public static String GOODUPANDDOWN = APIURL + "goods/upAndDown.do"; /** * 获取商品详情 */ public static String GOODGET = APIURL + "goods/get.do"; /** * 新增修改商品 */ public static String GOODADDANDEDIT = APIURL + "goods/addAndEdit.do"; /** * 获取钱包余额 */ public static String PURSEGET = APIURL + "purse/get.do"; /** * 获取账户钱包明细 */ public static String PURSEDETAIL = APIURL + "purse/detail.do"; /** * 提现 */ public static String PURSECASH = APIURL + "purse/cash.do"; /** * 银行卡列表 */ public static String PURSELIST = APIURL + "purse/list.do"; /** * 银行卡列表 */ public static String PURSEBANK = APIURL + "purse/banks.do"; /** * 删除银行卡 */ public static String PURSEREMOVE = APIURL + "purse/remove.do"; /** * 设置默认银行卡 */ public static String PURSEDEFAULT = APIURL + "purse/default.do"; /** * 添加银行卡(可添加支付宝账号) */ public static String PURSEADD = APIURL + "purse/add.do"; /** * 提交意见反馈 */ public static String ADVICEPOST = APIURL + "advice/post.do"; /** * 关于我们 */ public static String ABOUTUS = SERVERURL1 + "dist/pages/about_us.html"; /** * 帮助中心 */ public static String HELP = SERVERURL1 + "dist/pages/help.html"; /** * 帮助中心详情 */ public static String HELPDETAIL = SERVERURL1 + "dist/pages/helpDetal.html"; /** * 分享有礼 */ public static String SHARE = SERVERURL1 + "html/share.html?icode="; /** * 分享有礼分享网址 */ public static String REGISTERHTML = SERVERURL1 + "html/login.html?icode="; /** * 傻孩子学院 */ public static String COLLEGE = SERVERURL1 + "dist/pages/college.html"; }
[ "921668753@qq.com" ]
921668753@qq.com
5baf8a75bc5581914f9235a5be1ea7409ca7a48b
9eec8574e953598429d4562055b1957b2d5583c5
/jfluentvalidation-core/src/test/java/jfluentvalidation/validators/rulefor/localtime/IsAfterOrEqualToLocalTimeTest.java
2fe1dacc4b35a7e1d69fc9c041067b5443e26d21
[ "MIT" ]
permissive
seancarroll/jfluentvalidation
f9e04753931af90da775e6a4ecc0e3312f91cc1c
67f581aa50b1efa52a461345982856503b04e987
refs/heads/master
2023-06-22T00:27:58.078302
2020-08-27T02:43:10
2020-08-27T02:43:10
146,148,457
2
1
MIT
2023-06-20T16:05:52
2018-08-26T03:32:04
Java
UTF-8
Java
false
false
2,471
java
package jfluentvalidation.validators.rulefor.localtime; import jfluentvalidation.ValidationResult; import jfluentvalidation.validators.DefaultValidator; import org.junit.jupiter.api.Test; import java.time.LocalTime; import java.time.ZonedDateTime; import static jfluentvalidation.TimeZones.TZ_CHICAGO; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; class IsAfterOrEqualToLocalTimeTest extends AbstractLocalTimeTest { IsAfterOrEqualToLocalTimeTest() { super(ZonedDateTime.of( 2019, 6, 15, 8, 0, 0, 0, TZ_CHICAGO)); } @Test void shouldNotReturnFailureWhenActualEqualsGivenDate() { Target t = new Target(reference); DefaultValidator<Target> validator = getValidator(); validator.ruleForLocalTime(Target::getTime).isAfterOrEqualTo(reference); ValidationResult validationResult = validator.validate(t); assertTrue(validationResult.isValid()); } @Test void shouldNotReturnFailureWhenActualDateIsAfterGivenDate() { Target t = new Target(reference); DefaultValidator<Target> validator = getValidator(); validator.ruleForLocalTime(Target::getTime).isAfterOrEqualTo(before); ValidationResult validationResult = validator.validate(t); assertTrue(validationResult.isValid()); } @Test void shouldNotReturnFailureWhenActualIsNull() { Target t = new Target(null); DefaultValidator<Target> validator = getValidator(); validator.ruleForLocalTime(Target::getTime).isAfterOrEqualTo(LocalTime.now()); ValidationResult validationResult = validator.validate(t); assertTrue(validationResult.isValid()); } @Test void shouldReturnFailureWhenActualIsNotStrictlyAfterGivenDate() { Target t = new Target(reference); DefaultValidator<Target> validator = getValidator(); validator.ruleForLocalTime(Target::getTime).isAfterOrEqualTo(after); ValidationResult validationResult = validator.validate(t); assertFalse(validationResult.isValid()); } @Test void shouldThrowExceptionWhenGivenDateIsNull() { DefaultValidator<Target> validator = getValidator(); assertThrows(NullPointerException.class, () -> validator.ruleForLocalTime(Target::getTime).isAfterOrEqualTo(null)); } }
[ "seanc28@gmail.com" ]
seanc28@gmail.com
67212e2c4690e99d3e57d2841595a5a9b0b4a73e
57e336ee001e59a350c919877d79886b2af8f2ef
/app/src/main/java/com/gsatechworld/spexkart/adapter/HomeBannerAdapter.java
c1e10769a7a10dee638b93f00d5749d26c418005
[]
no_license
dprasad554/Spexkart
e3588d516cbc92aa0a2050e239c08b23612902ae
e964d0bd8d699eadd7495a8e3811da426adc9c21
refs/heads/master
2023-04-20T00:25:27.455758
2021-05-03T09:04:05
2021-05-03T09:04:05
363,872,584
0
0
null
null
null
null
UTF-8
Java
false
false
1,796
java
package com.gsatechworld.spexkart.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import androidx.annotation.NonNull; import androidx.viewpager.widget.PagerAdapter; import androidx.viewpager.widget.ViewPager; import com.gsatechworld.spexkart.R; import java.util.ArrayList; public class HomeBannerAdapter extends PagerAdapter { private Context context; private LayoutInflater layoutInflater; ArrayList<Integer> iplImages; //Constructor Created public HomeBannerAdapter(Context context, ArrayList<Integer> iplImages) { this.context = context; layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); this.iplImages = iplImages; } @Override public int getCount() { return iplImages.size(); } @Override public boolean isViewFromObject(@NonNull View view, @NonNull Object object) { return view == ((View)object); //object parameter } @NonNull @Override public Object instantiateItem(@NonNull ViewGroup container, final int position) { View itemView = layoutInflater.inflate(R.layout.adapter_home_banner,container, false); ImageView imageView = (ImageView)itemView.findViewById(R.id.iv_category); imageView.setImageResource(iplImages.get(position)); container.addView(itemView,0); return itemView; } @Override public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) { //container.removeView((View) object); ViewPager viewPager = (ViewPager)container; View view = (View)object; viewPager.removeView(view); } }
[ "rohitkumar.kr92@gmail.com" ]
rohitkumar.kr92@gmail.com
515a3e502126a8fd595d9cf96a8200d23da1d647
0117fa13fe29aa60457ec4d5b4cce8c74952870a
/mobifoneTN/src/main/java/com/toan_itc/tn/Utils/StartSnapHelper.java
ea7a3f1086b7841036c8c2e87762aa1585c50917
[ "MIT" ]
permissive
ToanMobile/MobifoneVersion1
31486699725248d6b580b3f1b0118557984dcaf5
387b05d99cc0b8b55552b3be32eb8e713d75e6a8
refs/heads/master
2021-08-23T01:37:35.504801
2017-12-02T06:24:08
2017-12-02T06:24:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,053
java
package com.toan_itc.tn.Utils; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearSnapHelper; import android.support.v7.widget.OrientationHelper; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; /** * Created by Toan.IT on 15/01/17. * Email: huynhvantoan.itc@gmail.com */ public class StartSnapHelper extends LinearSnapHelper { private OrientationHelper mVerticalHelper, mHorizontalHelper; public StartSnapHelper() { } @Override public void attachToRecyclerView(@Nullable RecyclerView recyclerView) throws IllegalStateException { super.attachToRecyclerView(recyclerView); } @Override public int[] calculateDistanceToFinalSnap(@NonNull RecyclerView.LayoutManager layoutManager, @NonNull View targetView) { int[] out = new int[2]; if (layoutManager.canScrollHorizontally()) { out[0] = distanceToStart(targetView, getHorizontalHelper(layoutManager)); } else { out[0] = 0; } if (layoutManager.canScrollVertically()) { out[1] = distanceToStart(targetView, getVerticalHelper(layoutManager)); } else { out[1] = 0; } return out; } @Override public View findSnapView(RecyclerView.LayoutManager layoutManager) { if (layoutManager instanceof LinearLayoutManager) { if (layoutManager.canScrollHorizontally()) { return getStartView(layoutManager, getHorizontalHelper(layoutManager)); } else { return getStartView(layoutManager, getVerticalHelper(layoutManager)); } } return super.findSnapView(layoutManager); } private int distanceToStart(View targetView, OrientationHelper helper) { Log.wtf("distanceToStart=",(helper.getDecoratedStart(targetView) - helper.getStartAfterPadding())+""); return helper.getDecoratedStart(targetView) - helper.getStartAfterPadding(); } private View getStartView(RecyclerView.LayoutManager layoutManager, OrientationHelper helper) { if (layoutManager instanceof LinearLayoutManager) { int firstChild = ((LinearLayoutManager) layoutManager).findFirstVisibleItemPosition(); boolean isLastItem = ((LinearLayoutManager) layoutManager) .findLastCompletelyVisibleItemPosition() == layoutManager.getItemCount() - 1; if (firstChild == RecyclerView.NO_POSITION || isLastItem) { return null; } View child = layoutManager.findViewByPosition(firstChild); if (helper.getDecoratedEnd(child) >= helper.getDecoratedMeasurement(child) / 2 && helper.getDecoratedEnd(child) > 0) { return child; } else { if (((LinearLayoutManager) layoutManager).findLastCompletelyVisibleItemPosition() == layoutManager.getItemCount() - 1) { return null; } else { Log.wtf("firstChild=",(firstChild + 1)+""); return layoutManager.findViewByPosition(600); } } } return super.findSnapView(layoutManager); } private OrientationHelper getVerticalHelper(RecyclerView.LayoutManager layoutManager) { if (mVerticalHelper == null) { mVerticalHelper = OrientationHelper.createVerticalHelper(layoutManager); } return mVerticalHelper; } private OrientationHelper getHorizontalHelper(RecyclerView.LayoutManager layoutManager) { if (mHorizontalHelper == null) { mHorizontalHelper = OrientationHelper.createHorizontalHelper(layoutManager); } return mHorizontalHelper; } }
[ "huynhvantoan.itc@gmail.com" ]
huynhvantoan.itc@gmail.com
ee93515b3718f6cf3076633529f4e9847042cc9f
4734682c0ee9d9bc8a7278b245b89619d8a72177
/bundles/core/src/main/java/io/wcm/samples/core/config/impl/LinkHandlerConfigImpl.java
dbac0fb52ab1d1de9c95c8580a591990e2ac392a
[ "Apache-2.0" ]
permissive
dfparker2002/wcm-io-samples
e87d2f16c0a88df187767616103e485af0c54c42
851ed1ad03e7a7aec48a5a18e42ea212ae5cc1d9
refs/heads/master
2020-04-06T22:22:32.005465
2018-08-27T12:45:49
2018-08-27T12:45:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,300
java
/* * #%L * wcm.io * %% * Copyright (C) 2014 wcm.io * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ package io.wcm.samples.core.config.impl; import org.osgi.service.component.annotations.Component; import com.day.cq.wcm.api.Page; import io.wcm.handler.link.spi.LinkHandlerConfig; import io.wcm.samples.core.config.AppTemplate; import io.wcm.wcm.commons.util.Template; /** * Link handler configuration. */ @Component(service = LinkHandlerConfig.class) public class LinkHandlerConfigImpl extends LinkHandlerConfig { @Override public boolean isValidLinkTarget(Page page) { return !Template.is(page, AppTemplate.ADMIN_STRUCTURE_ELEMENT); } @Override public boolean isRedirect(Page page) { return Template.is(page, AppTemplate.ADMIN_REDIRECT); } }
[ "sseifert@pro-vision.de" ]
sseifert@pro-vision.de
01424a2d771fc9b9de7c29f500f85a766a09410c
58da62dfc6e145a3c836a6be8ee11e4b69ff1878
/src/main/java/com/alipay/api/domain/MybankMarketingCampaignPrizeListQueryModel.java
c8e1e41862ab7cc69ba8de890de75be9f8a9cc44
[ "Apache-2.0" ]
permissive
zhoujiangzi/alipay-sdk-java-all
00ef60ed9501c74d337eb582cdc9606159a49837
560d30b6817a590fd9d2c53c3cecac0dca4449b3
refs/heads/master
2022-12-26T00:27:31.553428
2020-09-07T03:39:05
2020-09-07T03:39:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,741
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 查询用户已拥有的奖品列表 * * @author auto create * @since 1.0, 2019-08-23 14:23:40 */ public class MybankMarketingCampaignPrizeListQueryModel extends AlipayObject { private static final long serialVersionUID = 8638292128512563775L; /** * 银行参与者id,是在网商银行创建会员后生成的id,网商银行会员的唯一标识 */ @ApiField("ip_id") private String ipId; /** * 银行参与者角色id,是在网商银行创建会员后生成的角色id,网商银行会员角色的唯一标识 */ @ApiField("ip_role_id") private String ipRoleId; /** * 分页查询时的页码,从1开始 */ @ApiField("page_num") private Long pageNum; /** * 分页查询时每页返回的列表大小,最大为20 */ @ApiField("page_size") private Long pageSize; /** * COUPON_VOUCHER 利息红包 DISCOUNT_VOUCHER 打折券 */ @ApiField("type") private String type; public String getIpId() { return this.ipId; } public void setIpId(String ipId) { this.ipId = ipId; } public String getIpRoleId() { return this.ipRoleId; } public void setIpRoleId(String ipRoleId) { this.ipRoleId = ipRoleId; } public Long getPageNum() { return this.pageNum; } public void setPageNum(Long pageNum) { this.pageNum = pageNum; } public Long getPageSize() { return this.pageSize; } public void setPageSize(Long pageSize) { this.pageSize = pageSize; } public String getType() { return this.type; } public void setType(String type) { this.type = type; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
ea4cf1fc41a82308000f5ae01115856278e2aa95
96a7d93cb61cef2719fab90742e2fe1b56356d29
/selected projects/desktop/mars-sim-v3.1.0/mars-sim-core/org/mars_sim/msp/core/structure/building/function/SolarPowerSource.java
e3478127a794d87e1f170d89dcafb30266942a52
[ "MIT" ]
permissive
danielogen/msc_research
cb1c0d271bd92369f56160790ee0d4f355f273be
0b6644c11c6152510707d5d6eaf3fab640b3ce7a
refs/heads/main
2023-03-22T03:59:14.408318
2021-03-04T11:54:49
2021-03-04T11:54:49
307,107,229
0
1
MIT
2021-03-04T11:54:49
2020-10-25T13:39:50
Java
UTF-8
Java
false
false
6,079
java
/** * Mars Simulation Project * SolarPowerSource.java * @version 3.1.0 2017-08-14 * @author Scott Davis */ package org.mars_sim.msp.core.structure.building.function; import java.io.Serializable; import java.util.logging.Logger; import org.mars_sim.msp.core.Coordinates; import org.mars_sim.msp.core.structure.Settlement; import org.mars_sim.msp.core.structure.building.Building; import org.mars_sim.msp.core.structure.building.BuildingManager; /** * A power source that gives a supply of power proportional * to the level of sunlight it receives. */ public class SolarPowerSource extends PowerSource implements Serializable { /** default serial id. */ private static final long serialVersionUID = 1L; /** default logger. */ private static Logger logger = Logger.getLogger(SolarPowerSource.class.getName()); private static final double MAINTENANCE_FACTOR = 2.5D; /** NASA MER has an observable solar cell degradation rate of 0.14% per sol, Here we tentatively set to 0.04% per sol instead of 0.14%, since that in 10 earth years, the efficiency will drop down to 23.21% of the initial 100% 100*(1-.04/100)^(365*10) = 23.21% */ public static double DEGRADATION_RATE_PER_SOL = .0004; // assuming it is a constant through its mission /* * The number of layers/panels that can be mechanically steered * toward the sun to maximum the solar irradiance */ public static double NUM_LAYERS = 4D; // in square feet public static double STEERABLE_ARRAY_AREA = 50D; // in square feet public static double AUXILLARY_PANEL_AREA = 15D; // in square feet public static double PI = Math.PI; public static double HALF_PI = PI / 2D; private static final String SOLAR_PHOTOVOLTAIC_ARRAY = "Solar Photovoltaic Array"; // Notes : // 1. The solar Panel is made of triple-junction solar cells with theoretical max eff of 68% // 2. the flat-plate single junction has max theoretical efficiency at 29% // 3. The modern Shockley and Queisser (SQ) Limit calculation is a maximum efficiency of 33.16% for any // type of single junction solar cell. // see http://www.solarcellcentral.com/limits_page.html /* * The theoretical max efficiency of the triple-junction solar cells */ private double efficiency_solar_panel = .55; /** * The dust deposition rates is proportional to the dust loading. Here we use MER program's extended the analysis * to account for variations in the atmospheric columnar dust amount. */ private double dust_deposition_rate = 0; // As of Sol 4786 (July 11, 2017), the solar array energy production was 352 watt-hours with // an atmospheric opacity (Tau) of 0.748 and a solar array dust factor of 0.549. private Coordinates location ; /** * Constructor. * @param maxPower the maximum generated power (kW). */ public SolarPowerSource(double maxPower) { // Call PowerSource constructor. super(PowerSourceType.SOLAR_POWER, maxPower); } /*** * Computes and updates the dust deposition rate for a settlement * @param the rate */ public void computeDustDeposition(Settlement settlement) { if (location == null) location = settlement.getCoordinates(); double tau = surface.getOpticalDepth(location); // e.g. The Material Adherence Experiement (MAE) on Pathfinder indicate steady dust accumulation on the Martian // surface at a rate of ~ 0.28% of the surface area per day (Landis and Jenkins, 1999) dust_deposition_rate = .0018 * tau /.5; // during relatively periods of clear sky, typical values for tau (optical depth) were between 0.2 and 0.5 } /** * Gets the current power produced by the power source. * @param building the building this power source is for. * @return power (kW) */ @Override public double getCurrentPower(Building building) { BuildingManager manager = building.getBuildingManager(); if (location == null) location = manager.getSettlement().getCoordinates(); double area = AUXILLARY_PANEL_AREA; if (building.getBuildingType().equalsIgnoreCase(SOLAR_PHOTOVOLTAIC_ARRAY)) { // if (orbitInfo == null) // orbitInfo = mars.getOrbitInfo(); double angle = orbitInfo.getSolarZenithAngle(location); //logger.info("angle : " + angle/ Math.PI*180D); // assuming the total area will change from 3 full panels to 1 panel based on the solar zenith angle if (angle <= - HALF_PI) { angle = angle + PI; area = STEERABLE_ARRAY_AREA * ((NUM_LAYERS - 1) / HALF_PI * angle + 1); } else if (angle <= 0) { angle = angle + HALF_PI; area = STEERABLE_ARRAY_AREA * ((1 - NUM_LAYERS) / HALF_PI * angle + NUM_LAYERS); } else if (angle <= HALF_PI) { area = STEERABLE_ARRAY_AREA * ((NUM_LAYERS - 1) / HALF_PI * angle + 1); } else { angle = angle - HALF_PI; area = STEERABLE_ARRAY_AREA * ((1 - NUM_LAYERS) / HALF_PI * angle + NUM_LAYERS); } //logger.info("area : " + area); } double available = surface.getSolarIrradiance(location) /1000D * area * efficiency_solar_panel; // add noise with * (.99 + RandomUtil.getRandomDouble(.2)); double capable = getMaxPower() * efficiency_solar_panel; if (available >= capable) { // logger.info(building.getNickName() + " solar power capable : " + Math.round(capable * 100.0)/100.0 + " kW"); return capable; } else { // logger.info(building.getNickName() + " solar power available : " + Math.round(available * 100.0)/100.0 + " kW"); return available; } } @Override public double getAveragePower(Settlement settlement) { return getMaxPower() * 0.707; } @Override public double getMaintenanceTime() { return getMaxPower() * MAINTENANCE_FACTOR; } public void setEfficiency(double value) { efficiency_solar_panel = value; } public double getEfficiency() { return efficiency_solar_panel; } @Override public void removeFromSettlement() { // TODO Auto-generated method stub } @Override public void setTime(double time) { // TODO Auto-generated method stub } @Override public void destroy() { super.destroy(); location = null; } }
[ "danielogen@gmail.com" ]
danielogen@gmail.com
14cde6b9b63260f569f8956a12d32ab6b0b790bc
20645b984308f6644d097fdae820389ab79a3084
/workspace_ehotel/FLCVinhTHinhePMS_/src/elcom/domain/eWeb.java
2820aa1f25565fb8a029985b4421ce55b5b26baa
[]
no_license
elcomthien/source
d314a09c317ea10a2cc057f897c9117263690994
b2cbb7dec061eb3d037d98b9f134ab6dc45216a8
refs/heads/master
2021-09-16T23:37:40.547101
2018-06-26T02:48:06
2018-06-26T02:48:06
109,084,993
0
0
null
null
null
null
UTF-8
Java
false
false
670
java
package elcom.domain; import javax.xml.bind.annotation.XmlRootElement; import com.sun.xml.internal.txw2.annotation.XmlAttribute; @XmlRootElement(name = "item") public class eWeb { private int Id; private String name; private String url; public eWeb() { } @XmlAttribute public int getId() { return Id; } public void setId(int webId) { this.Id = webId; } public String getName() { return name; } public void setName(String title) { this.name = title; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String toString() { return "eWeather[webId=" + Id + ",url=" + url + "]"; } }
[ "32834285+app-core@users.noreply.github.com" ]
32834285+app-core@users.noreply.github.com
330ee1e87f1b86018912cbfb8bd18fe1d7a67763
e3990e8c3b1e0b8824a0a19bf9d12e48441def7a
/ebean-core/src/main/java/io/ebeaninternal/server/grammer/EqlWhereAdapter.java
0620e3ee8271ab050f82770d961695edf37f01f6
[ "Apache-2.0" ]
permissive
ebean-orm/ebean
13c9c465f597dd2cf8b3e54e4b300543017c9dee
bfe94786de3c3b5859aaef5afb3a7572e62275c4
refs/heads/master
2023-08-22T12:57:34.271133
2023-08-22T11:43:41
2023-08-22T11:43:41
5,793,895
1,199
224
Apache-2.0
2023-09-11T14:05:26
2012-09-13T11:49:56
Java
UTF-8
Java
false
false
1,126
java
package io.ebeaninternal.server.grammer; import io.ebean.ExpressionFactory; import io.ebean.ExpressionList; import io.ebeaninternal.server.util.ArrayStack; class EqlWhereAdapter<T> extends EqlWhereListener<T> { private final ExpressionList<T> where; private final ExpressionFactory expr; private final Object[] params; private int paramIndex; EqlWhereAdapter(ExpressionList<T> where, ExpressionFactory expr, Object[] params) { this.where = where; this.expr = expr; this.params = params; } @Override ExpressionList<T> peekExprList() { if (whereStack == null) { whereStack = new ArrayStack<>(); whereStack.push(where); } return whereStack.peek(); } @Override ExpressionFactory expressionFactory() { return expr; } @Override Object positionParam(String paramPosition) { if ("?".equals(paramPosition)) { return params[paramIndex++]; } final int pos = Integer.parseInt(paramPosition.substring(1)); return params[pos -1]; } @Override Object namedParam(String substring) { throw new RuntimeException("Not supported"); } }
[ "robin.bygrave@gmail.com" ]
robin.bygrave@gmail.com
cd0941b18278b144909eb302eb9d64cc625186b6
d84658c70db182a9211aaf96f0f46912579eba73
/src/main/java/com/jp/dao/JpXingDicMapper.java
c1d7f827fc9bef66686440f63f11d1966f57c623
[]
no_license
phjjava/-
091e30c53d5c89aa19bcb6d0e5d3afd9326ccfd1
49cccd9db05edc9e9c128d294b456bb0a9087ade
refs/heads/master
2022-12-27T03:19:39.443295
2019-10-24T06:51:04
2019-10-24T06:51:04
217,419,811
0
0
null
2022-12-16T08:00:54
2019-10-25T00:39:25
JavaScript
UTF-8
Java
false
false
657
java
package com.jp.dao; import com.jp.entity.JpXingDic; import com.jp.entity.JpXingDicExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface JpXingDicMapper { int countByExample(JpXingDicExample example); int deleteByExample(JpXingDicExample example); int insert(JpXingDic record); int insertSelective(JpXingDic record); List<JpXingDic> selectByExample(); int updateByExampleSelective(@Param("record") JpXingDic record, @Param("example") JpXingDicExample example); int updateByExample(@Param("record") JpXingDic record, @Param("example") JpXingDicExample example); }
[ "goodMorning_glb@atguigu.com" ]
goodMorning_glb@atguigu.com
54cb740f381a26a081a1ce9664320a4e333f9ac8
ee8808ef2a641b44c6e21bfdddaa85760e2fb143
/model/src/main/java/io/wcm/devops/conga/model/environment/Node.java
565634d184e786e3befdda0a14d42237f265b1f0
[ "Apache-2.0" ]
permissive
zoosky/conga
c20d5e154ebb1c990c55d5233b1eaa30b119b66c
b75de33ae14a82ecb11d7db9c334ad67ea47f8b7
refs/heads/develop
2023-04-17T16:52:19.576764
2018-04-10T08:19:34
2018-04-10T08:19:34
130,014,696
0
0
Apache-2.0
2023-04-03T23:49:49
2018-04-18T06:31:16
Java
UTF-8
Java
false
false
2,200
java
/* * #%L * wcm.io * %% * Copyright (C) 2015 wcm.io * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ package io.wcm.devops.conga.model.environment; import static io.wcm.devops.conga.model.util.DefaultUtil.defaultEmptyList; import java.util.ArrayList; import java.util.List; import io.wcm.devops.conga.model.shared.AbstractConfigurable; /** * Environment node. A node is a system to deploy to, e.g. a physical machine, virtual machine, Docker container or any * other deployment target. */ public final class Node extends AbstractConfigurable { private String node; private List<String> nodes = new ArrayList<>(); private List<NodeRole> roles = new ArrayList<>(); /** * Defines the node name. This is usually a host name or any other unique name identifying the node. * @return Node name */ public String getNode() { return this.node; } public void setNode(String node) { this.node = node; } /** * Defines multiple node names. This is useful if the same set of roles, role variants and configuration apply * to multiple nodes. In this case you can define a single node definition with multiple node names. * The single node name property must nost be used in this case. * @return List of node names */ public List<String> getNodes() { return this.nodes; } public void setNodes(List<String> nodes) { this.nodes = defaultEmptyList(nodes); } /** * Defines roles to be used by this node. * @return Role assignments for node */ public List<NodeRole> getRoles() { return this.roles; } public void setRoles(List<NodeRole> roles) { this.roles = defaultEmptyList(roles); } }
[ "sseifert@pro-vision.de" ]
sseifert@pro-vision.de
f094c6575e84a8972306e279cf317e8306eb07b3
d330f5f719df5e8fb602bff950db474730c75834
/Lesson015/src/com/gmail/granovskiy/s/App.java
25622a4890f51d2ad4e9cf48d3d463043e88e816
[]
no_license
SviatoslavExpert/JavaForBeginners-Lessons-Udemy
de0eb215d82237422dc4b3426aa0047fb9726fd7
5ea8ceae543f3a0dccaf58fb36ba58dc8a6aec5e
refs/heads/master
2020-04-04T17:21:51.908070
2018-11-13T10:03:00
2018-11-13T10:03:00
156,117,789
0
0
null
null
null
null
UTF-8
Java
false
false
326
java
// Method Parameters package com.gmail.granovskiy.s; public class App { public static void main(String[] args) { Robot sam = new Robot(); sam.speak("I am Sam."); sam.jump(9); sam.move("West", 17.35); String greeting = "Nice to meet you!"; sam.speak(greeting); } }
[ "s.granovskiy@gmail.com" ]
s.granovskiy@gmail.com
63a26b6774da13494199e7bb3348c6e5dc056aca
7f8b19cf613c3cb2af24794a6945e4d65f6e66a5
/src/main/java/ci/dcg/visionzero/notationquestion/NotationQuestionService.java
8145e26921561f9ad6190487fa02bfede0ecaee6
[]
no_license
syliGaye/visionzero
db714bd73199d975657d4225fc4a06afca3ab92e
afbf5c1fe82d9bb914a63f0c0164b3a284ecf7cb
refs/heads/master
2021-08-07T15:55:43.827878
2021-07-01T09:11:24
2021-07-01T09:11:24
174,563,135
0
0
null
null
null
null
UTF-8
Java
false
false
769
java
package ci.dcg.visionzero.notationquestion; import ci.dcg.visionzero.support.ServiceFactory; import java.util.List; public interface NotationQuestionService extends ServiceFactory<NotationQuestion, String> { List<NotationQuestion> findAllByQuestion(String codeQuestion); List<NotationQuestion> findAllByReponse(String codeReponse); List<NotationQuestion> findAllByEntreprise(String codeEntreprise); NotationQuestion findByQuestionnaireAndReponseAndEntreprise(String codeQuestion, String codeReponse, String codeEntreprise); NotationQuestion findByQuestionnaireAndEntreprise(String codeQuestion, String codeEntreprise); int countByReponse(String codeReponse); int countByQuestion(String codeQuestion); int countByEntreprise(String codeEntreprise); }
[ "sylvestregaye@gmail.com" ]
sylvestregaye@gmail.com
81ccab41d5f6576a9e5aaf1f42359c770551d4fd
365b59229710d5b387e00f924ac0087102cb97c9
/framework/jcompany_commons/src/main/java/com/powerlogic/jcompany/domain/validation/PlcValExactSizeValidator.java
0f389535831c5db75390e48fc8a071881383e743
[]
no_license
iecker/jaguar615
a8045ad4729b8fe572d13cb91239b9cca81d5383
4b2658738dac4fb93dd52489de640c7f3de4e782
refs/heads/master
2020-04-21T15:20:20.126020
2018-05-25T15:14:03
2018-05-25T15:14:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,185
java
/* Jaguar-jCompany Developer Suite. Powerlogic 2010-2014. Please read licensing information in your installation directory.Contact Powerlogic for more information or contribute with this project: suporte@powerlogic.com.br - www.powerlogic.com.br */ package com.powerlogic.jcompany.domain.validation; import java.io.Serializable; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; /** * Validação para Tamanho exato de propriedades */ public class PlcValExactSizeValidator implements ConstraintValidator<PlcValExactSize, String>, Serializable { private static final long serialVersionUID = 1L; private int size; public void initialize(PlcValExactSize parameters) { size = parameters.size(); } public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) { if ( value == null ) return true; if ( !( value instanceof String ) ) return false; String string = (String) value; int length = string.length(); return length == size; } }
[ "josivan.silva@castgroup.com.br" ]
josivan.silva@castgroup.com.br
e0c0d9740516f8d58a71ea82469937f79aa62f87
df7414712221d6a7b74ed29026a60c491627d146
/src/main/java/cn/hejinyo/jelly/modules/wechat/service/WechatJokeService.java
d24fd6668aa92757bd0f644240da03f492880e91
[]
no_license
HejinYo/jelly
6df5ea59db5cf9f46690eec7285f62e1338f8127
8714562a6a11335dc5e2de10d7b3058178600a3c
refs/heads/master
2021-05-06T01:30:11.563155
2018-12-30T01:58:58
2018-12-30T01:58:58
114,379,800
0
0
null
null
null
null
UTF-8
Java
false
false
403
java
package cn.hejinyo.jelly.modules.wechat.service; import cn.hejinyo.jelly.common.base.BaseService; import cn.hejinyo.jelly.modules.wechat.model.WechatJoke; /** * @author : HejinYo hejinyo@gmail.com * @date : 2017/8/23 22:23 * @Description : */ public interface WechatJokeService extends BaseService<WechatJoke, Integer> { WechatJoke getRandomWechatJoke(); String weater(String citys); }
[ "hejinyo@gmail.com" ]
hejinyo@gmail.com
29db2cf2b52a7c42839d13ff2d1d06fe5512e45f
8494c17b608e144370ee5848756b7c6ae38e8046
/gulimall-product/src/main/java/com/atguigu/gulimall/product/entity/CategoryBrandRelationEntity.java
c9dfb570f8d7c190e278d019bef2647e6062e9ce
[ "Apache-2.0" ]
permissive
cchaoqun/SideProject1_GuliMall
b235ee01df30bc207c747cf281108006482a778a
aef4c26b7ed4b6d17f7dcadd62e725f5ee68b13e
refs/heads/main
2023-06-11T02:23:28.729831
2021-07-07T11:56:13
2021-07-07T11:56:13
375,354,919
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
package com.atguigu.gulimall.product.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.util.Date; import lombok.Data; /** * 品牌分类关联 * * @author chengchaoqun * @email chengchaoqun@gmail.com * @date 2021-06-10 16:04:24 */ @Data @TableName("pms_category_brand_relation") public class CategoryBrandRelationEntity implements Serializable { private static final long serialVersionUID = 1L; /** * */ @TableId private Long id; /** * 品牌id */ private Long brandId; /** * 分类id */ private Long catelogId; /** * */ private String brandName; /** * */ private String catelogName; }
[ "chengchaoqun@hotmail.com" ]
chengchaoqun@hotmail.com
5aacacffe0e0b3fb5a743da402ea61f63071caeb
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XWIKI-13196-3-26-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage/org/xwiki/model/reference/AttachmentReference_ESTest.java
545be83280195d484ea048f50aaeb9d4116ea437
[ "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
1,241
java
/* * This file was automatically generated by EvoSuite * Mon May 18 01:20:36 UTC 2020 */ package org.xwiki.model.reference; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.junit.runner.RunWith; import org.xwiki.model.reference.AttachmentReference; import org.xwiki.model.reference.DocumentReference; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class AttachmentReference_ESTest extends AttachmentReference_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { DocumentReference documentReference0 = mock(DocumentReference.class, new ViolatedAssumptionAnswer()); AttachmentReference attachmentReference0 = new AttachmentReference("(h8D<jI\"<o", documentReference0); DocumentReference documentReference1 = mock(DocumentReference.class, new ViolatedAssumptionAnswer()); AttachmentReference attachmentReference1 = new AttachmentReference("", documentReference1); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
c25f4b8f3558dcdcf326cd1c8e2e3f9c40c3b376
8d8b3d295b4a45a1226755ecaffd37065edd8e56
/src/main/java/com/zmm/diary/bean/Hotspot.java
9e3d146e0b2aef1d62b5390be54c7a9d461b642e
[]
no_license
Giousa/Diray
61b7da13c65085ba8df30e911ec4345a672a41f0
15c55373af75d930f8d7541982b3d65cd98dc209
refs/heads/master
2020-04-04T02:04:18.541072
2019-04-17T03:22:05
2019-04-17T03:22:05
155,688,103
0
0
null
null
null
null
UTF-8
Java
false
false
876
java
package com.zmm.diary.bean; import lombok.Data; import org.hibernate.annotations.DynamicUpdate; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import javax.persistence.Entity; import javax.persistence.EntityListeners; import javax.persistence.Id; import java.util.Date; /** * Description: * Author:zhangmengmeng * Date:2018/11/1 * Email:65489469@qq.com */ @Entity @Data @EntityListeners(AuditingEntityListener.class) @DynamicUpdate public class Hotspot { @Id private String id; private String uId; private String pic; private String content; private int collect; private int appreciate; @CreatedDate private Date createTime; @LastModifiedDate private Date updateTime; }
[ "65489469@qq.com" ]
65489469@qq.com
ef16369f1a53e28dc6591be81cf157c6d5f7badf
ff79e46531d5ad204abd019472087b0ee67d6bd5
/common/util/src/och/util/model/Pair.java
fed252da59923db6033a338d18e5793e2241537c
[ "Apache-2.0" ]
permissive
Frankie-666/live-chat-engine
24f927f152bf1ef46b54e3d55ad5cf764c37c646
3125d34844bb82a34489d05f1dc5e9c4aaa885a0
refs/heads/master
2020-12-25T16:36:00.156135
2015-08-16T09:16:57
2015-08-16T09:16:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,066
java
/* * Copyright 2015 Evgeny Dolganov (evgenij.dolganov@gmail.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package och.util.model; public class Pair<A, B>{ public A first; public B second; public Pair(A first, B second) { super(); this.first = first; this.second = second; } public Pair() { super(); } public void setFirst(A first) { this.first = first; } public void setSecond(B second) { this.second = second; } @Override public String toString() { return "Pair [" + first + ", " + second + "]"; } }
[ "evgenij.dolganov@gmail.com" ]
evgenij.dolganov@gmail.com
436382a97f81dca3b6be01acfbc787d8e2f2bc4b
5b0d51c9e9154d16c0b32252fd142b68964e49dd
/src/designpattern/structuralpattern/bridge/GreenCircle.java
dcb3f8ad1814c06c29e11b96c3f63a8126602718
[]
no_license
kiragirl/test
8b2eb67e36a4adb457487d5e366da7c7343530d2
30baff7f45eff3fbc43a72cfa411d2a41cfd381c
refs/heads/master
2021-05-10T10:47:22.811815
2019-07-04T01:46:03
2019-07-04T01:46:03
118,392,839
0
0
null
null
null
null
UTF-8
Java
false
false
571
java
/** * @author:liyiming * @date:2018年2月5日 * Description: **/ package designpattern.structuralpattern.bridge; /** * Title: GreenCircle Description: Company:pusense * * @author :lyiming * @date :2018年2月5日 **/ public class GreenCircle implements DrawAPI{ /** * @author:liyiming * @date:2018年2月5日 * @Description: * @param radius * @param x * @param y */ @Override public void drawCircle(int radius, int x, int y) { System.out.println("Drawing Circle[ color: green, radius: " + radius + ", x: " + x + ", " + y + "]"); } }
[ "liyiming0215@sina.com" ]
liyiming0215@sina.com
efc6fa6fc0b0845b3fc43deada68f9de3db7569c
b6178780b1897aab7ee6b427020302622afbf7e4
/src/main/java/pokecube/core/commands/CountCommand.java
6dab29b4ed026ff251da9162da6bb8884cddeb83
[ "MIT" ]
permissive
Pokecube-Development/Pokecube-Core
ea9a22599fae9016f8277a30aee67a913b50d790
1343c86dcb60b72e369a06dd7f63c05103e2ab53
refs/heads/master
2020-03-26T20:59:36.089351
2020-01-20T19:00:53
2020-01-20T19:00:53
145,359,759
5
0
MIT
2019-06-08T22:58:58
2018-08-20T03:07:37
Java
UTF-8
Java
false
false
3,252
java
package pokecube.core.commands; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.entity.Entity; import net.minecraft.server.MinecraftServer; import net.minecraft.util.text.TextComponentString; import net.minecraft.world.World; import pokecube.core.database.Database; import pokecube.core.database.PokedexEntry; import pokecube.core.interfaces.IPokemob; import pokecube.core.interfaces.PokecubeMod; import pokecube.core.interfaces.capabilities.CapabilityPokemob; import thut.core.common.commands.CommandTools; public class CountCommand extends CommandBase { @Override public int getRequiredPermissionLevel() { return 2; } @Override public String getName() { return "pokecount"; } @Override public String getUsage(ICommandSender sender) { return "/pokecount"; } @Override public void execute(MinecraftServer server, ICommandSender cSender, String[] args) throws CommandException { boolean specific = args.length > 0; World world = cSender.getEntityWorld(); List<Entity> entities = new ArrayList<Entity>(world.loadedEntityList); int count1 = 0; int count2 = 0; String name = ""; Map<PokedexEntry, Integer> counts = Maps.newHashMap(); PokedexEntry entry = null; if (specific) { name = args[1]; entry = Database.getEntry(name); if (entry == null) throw new CommandException(name + " not found"); } for (Entity o : entities) { IPokemob e = CapabilityPokemob.getPokemobFor(o); if (e != null) { if (!specific || e.getPokedexEntry() == entry) { if (o.getDistance(cSender.getPositionVector().x, cSender.getPositionVector().y, cSender.getPositionVector().z) > PokecubeMod.core.getConfig().maxSpawnRadius) count2++; else count1++; Integer i = counts.get(e.getPokedexEntry()); if (i == null) i = 0; counts.put(e.getPokedexEntry(), i + 1); } } } List<Map.Entry<PokedexEntry, Integer>> entries = Lists.newArrayList(counts.entrySet()); Collections.sort(entries, new Comparator<Map.Entry<PokedexEntry, Integer>>() { @Override public int compare(Entry<PokedexEntry, Integer> o1, Entry<PokedexEntry, Integer> o2) { return o2.getValue() - o1.getValue(); } }); cSender.sendMessage(CommandTools.makeTranslatedMessage("pokecube.command.count", "", count1, count2)); cSender.sendMessage(new TextComponentString(entries.toString())); } }
[ "elpatricimo@gmail.com" ]
elpatricimo@gmail.com
f87ae1bccc767b235a87b6435aea8c47c4e72b9a
8b5e2b57b05edc09e6c063046785f4e8234e8f2b
/MVN-SAT/src/main/java/br/com/barcadero/module/sat/devices/integrador/vfpe/Integrador.java
2cd44cf7ea956a7085bee8510d02dc61b4237a02
[]
no_license
Rafasystec/MVN
d3a0e82ecd22852642342196f873127164a20656
e8a739b27a8cde54579261ebce8771068fd385b3
refs/heads/master
2021-01-19T02:40:59.145594
2017-11-24T00:38:49
2017-11-24T00:38:49
54,285,723
1
0
null
null
null
null
UTF-8
Java
false
false
917
java
package br.com.barcadero.module.sat.devices.integrador.vfpe; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import br.com.barcadero.module.sat.devices.integrador.xml.Identificador; @XmlRootElement(name="Integrador") @XmlAccessorType(XmlAccessType.FIELD) public class Integrador { @XmlElement(name="Identificador") private Identificador identificador; @XmlElement(name="Componente") private Componente componente; public Identificador getIdentificador() { return identificador; } public void setIdentificador(Identificador identificador) { this.identificador = identificador; } public Componente getComponente() { return componente; } public void setComponente(Componente componente) { this.componente = componente; } }
[ "rafasystec@yahoo.com.br" ]
rafasystec@yahoo.com.br
e0770549d804c586fd4317c8c13e1809161dbd0f
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.1.jar/classes.jar/jif.java
921fc85990e54297e1d5b37be95530c417a9bba8
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
2,691
java
import android.os.Handler; import android.os.Message; import com.tencent.mobileqq.emoticon.DownloadInfo; import com.tencent.mobileqq.msf.sdk.MsfSdkUtils; import com.tencent.mobileqq.nearby.profilecard.NearbyPeopleProfileActivity; import com.tencent.mobileqq.util.ProfileCardUtil; import com.tencent.mobileqq.utils.HttpDownloadUtil; import com.tencent.qphone.base.util.QLog; import java.io.File; public class jif implements Runnable { public jif(NearbyPeopleProfileActivity paramNearbyPeopleProfileActivity, String paramString1, int paramInt, String paramString2, boolean paramBoolean) {} public void run() { int j = 1; Object localObject = this.jdField_a_of_type_JavaLangString + this.jdField_a_of_type_Int; if (QLog.isColorLevel()) { QLog.e("Q.nearby_people_card.", 2, "downloadHDAvatar() uin=" + this.b + ", mgSize=" + this.jdField_a_of_type_Int + ", url = " + (String)localObject); } File localFile1 = new File(ProfileCardUtil.a(String.valueOf(this.b))); boolean bool2; if ((localFile1.exists()) && (!this.jdField_a_of_type_Boolean)) { if (QLog.isColorLevel()) { QLog.e("Q.nearby_people_card.", 2, "download HDAvatar file is exists"); } bool2 = true; localObject = new Message(); ((Message)localObject).what = 102; if (!bool2) { break label296; } i = 1; label158: ((Message)localObject).arg1 = i; if (!this.jdField_a_of_type_Boolean) { break label301; } } label296: label301: for (int i = j;; i = 0) { ((Message)localObject).arg2 = i; this.jdField_a_of_type_ComTencentMobileqqNearbyProfilecardNearbyPeopleProfileActivity.a.sendMessage((Message)localObject); return; File localFile2 = new File(localFile1.getPath() + Long.toString(System.currentTimeMillis())); if (HttpDownloadUtil.a(this.jdField_a_of_type_ComTencentMobileqqNearbyProfilecardNearbyPeopleProfileActivity.app, new DownloadInfo(MsfSdkUtils.insertMtype("friendlist", (String)localObject), localFile2, 0), null) == 0) {} for (boolean bool1 = true;; bool1 = false) { bool2 = bool1; if (bool1) { bool2 = localFile2.renameTo(localFile1); } NearbyPeopleProfileActivity.a(this.jdField_a_of_type_ComTencentMobileqqNearbyProfilecardNearbyPeopleProfileActivity, bool2); break; } i = 0; break label158; } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.1.jar\classes.jar * Qualified Name: jif * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
49504642eaa352364655abba65c37a9d2e9da699
d57fc3d03a9fba5c45507f0d30e00fca7a09d55f
/app/src/main/java/com/mybetterandroid/wheel/other/Utils.java
e5d6f81d483a7293ac2077fd07dc2b89ec50e93a
[]
no_license
gyymz1993/V6.1
8bc1cd4d9c10890331a4366b06c9384c7ba9068c
ecb13d853b4adc69f915ec24ff3cd501f99ee80e
refs/heads/master
2020-03-28T21:41:16.584853
2017-06-20T11:58:41
2017-06-20T11:58:41
94,621,793
0
0
null
null
null
null
UTF-8
Java
false
false
3,980
java
package com.mybetterandroid.wheel.other; import java.security.MessageDigest; import java.util.List; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.util.TypedValue; import android.view.View; import android.view.inputmethod.InputMethodManager; public class Utils { /** * Hides the input method. * * @param context context * @param view The currently focused view * @return success or not. */ public static boolean hideInputMethod(Context context, View view) { if (context == null || view == null) { return false; } InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { return imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } return false; } /** * Show the input method. * * @param context context * @param view The currently focused view, which would like to receive soft keyboard input * @return success or not. */ public static boolean showInputMethod(Context context, View view) { if (context == null || view == null) { return false; } InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { return imm.showSoftInput(view, 0); } return false; } public static float pixelToDp(Context context, float val) { float density = context.getResources().getDisplayMetrics().density; return val * density; } public static int dipToPx(Context context, int dipValue) { return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dipValue, context .getResources().getDisplayMetrics()); } public static String getHashedFileName(String url) { if (url == null || url.endsWith("/" )) { return null ; } String suffix = getSuffix(url); StringBuilder sb = null; try { MessageDigest digest = MessageDigest. getInstance("MD5"); byte[] dstbytes = digest.digest(url.getBytes("UTF-8")); // GMaFroid uses UTF-16LE sb = new StringBuilder(); for (int i = 0; i < dstbytes.length; i++) { sb.append(Integer. toHexString(dstbytes[i] & 0xff)); } } catch (Exception e) { e.printStackTrace(); } if (null != sb && null != suffix) { return sb.toString() + "." + suffix; } return null; } private static String getSuffix(String fileName) { int dot_point = fileName.lastIndexOf( "."); int sl_point = fileName.lastIndexOf( "/"); if (dot_point < sl_point) { return "" ; } if (dot_point != -1) { return fileName.substring(dot_point + 1); } return null; } /** * Indicates whether the specified action can be used as an intent. This * method queries the package manager for installed packages that can * respond to an intent with the specified action. If no suitable package is * found, this method returns false. * * @param context The application's environment. * @param intent The Intent action to check for availability. * * @return True if an Intent with the specified action can be sent and * responded to, false otherwise. */ public static boolean isIntentAvailable(Context context, Intent intent) { final PackageManager packageManager = context.getPackageManager(); List<ResolveInfo> list = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); return list.size() > 0; } }
[ "gyymz1993@126.com" ]
gyymz1993@126.com
6dcbb33af73d5b3baa91f5fc1933e28f34867f08
536600d7852ee095d48821314561aabf7207ba38
/app/src/main/java/com/zuoyu/business/entity/ViewPageInfo.java
fbf3b5f45a2eabb966ee540849df109d2f62b0b8
[]
no_license
Sunnyfor/Business
a85e9705af01092aa4c5d23853f4091c28cee1c8
6358f5d1bde37275c8f3f2fd92e1c5602e675c2e
refs/heads/master
2020-09-30T10:27:32.990519
2019-12-11T03:35:58
2019-12-11T03:35:58
227,269,592
0
0
null
null
null
null
UTF-8
Java
false
false
400
java
package com.zuoyu.business.entity; import android.os.Bundle; public final class ViewPageInfo { public final String tag; public final Class<?> clazz; public final Bundle args; public final String title; public ViewPageInfo(String _title, String _tag, Class<?> _class, Bundle _args) { title = _title; tag = _tag; clazz = _class; args = _args; } }
[ "yongzuo.chen@foxmail.com" ]
yongzuo.chen@foxmail.com
7bcbada37d5cb480ac7b28bbaa95c4eeaf8a083a
54c007a9a99c4094284508d603f1d1d7428523dc
/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/router/file/FileRouterFactory.java
68567b074448a56807e5b0a60d455307260e743e
[ "Apache-2.0" ]
permissive
ZengLiQAQ/dubbo-2.6.5
3aaa40b38ba5e9b45773ab4f730ddf1722b3509e
09675b552a306dc24a498133729fcc48409d47bf
refs/heads/master
2021-05-20T14:37:57.068836
2019-12-21T11:17:46
2019-12-21T11:17:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,749
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.dubbo.rpc.cluster.router.file; import com.alibaba.dubbo.common.Constants; import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.common.utils.IOUtils; import com.alibaba.dubbo.rpc.cluster.Router; import com.alibaba.dubbo.rpc.cluster.RouterFactory; import com.alibaba.dubbo.rpc.cluster.router.script.ScriptRouterFactory; import java.io.File; import java.io.FileReader; import java.io.IOException; // public class FileRouterFactory implements RouterFactory { public static final String NAME = "file"; private RouterFactory routerFactory; public void setRouterFactory(RouterFactory routerFactory) { this.routerFactory = routerFactory; } @Override public Router getRouter(URL url) { try { // Transform File URL into Script Route URL, and Load // file:///d:/path/to/route.js?router=script ==> script:///d:/path/to/route.js?type=js&rule=<file-content> String protocol = url.getParameter(Constants.ROUTER_KEY, ScriptRouterFactory.NAME); // Replace original protocol (maybe 'file') with 'script' String type = null; // Use file suffix to config script type, e.g., js, groovy ... String path = url.getPath(); if (path != null) { int i = path.lastIndexOf('.'); if (i > 0) { type = path.substring(i + 1); } } String rule = IOUtils.read(new FileReader(new File(url.getAbsolutePath()))); boolean runtime = url.getParameter(Constants.RUNTIME_KEY, false); URL script = url.setProtocol(protocol).addParameter(Constants.TYPE_KEY, type).addParameter(Constants.RUNTIME_KEY, runtime).addParameterAndEncoded(Constants.RULE_KEY, rule); return routerFactory.getRouter(script); } catch (IOException e) { throw new IllegalStateException(e.getMessage(), e); } } }
[ "xunzhao3456" ]
xunzhao3456
564d98949f69b5c5be333ca6e6478f373306a160
78904c200568ce8adb08b8c3a328c2a4d6d7d4b2
/fcf-security/fcf-security-core/src/main/java/org/fujionclinical/security/FCFAuthenticationDetails.java
efcaf6389318ddc12e74f9caac0123543128ec93
[ "LicenseRef-scancode-fujion-exception-to-apache-2.0" ]
permissive
fujionclinical/fujion-clinical-framework
9ab5682be96feed6caae8e2cb6a03b052d0f812d
686b4ff4704f6c2c83305dc59c66d4a6b37037fa
refs/heads/master
2023-08-09T03:45:13.565855
2023-07-05T19:37:25
2023-07-05T19:37:25
140,986,953
1
0
null
2023-07-31T21:20:08
2018-07-15T00:25:59
Java
UTF-8
Java
false
false
2,735
java
/* * #%L * Fujion Clinical Framework * %% * Copyright (C) 2020 fujionclinical.org * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This Source Code Form is also subject to the terms of the Health-Related * Additional Disclaimer of Warranty and Limitation of Liability available at * * http://www.fujionclinical.org/licensing/disclaimer * * #L% */ package org.fujionclinical.security; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.security.web.authentication.WebAuthenticationDetails; import javax.servlet.http.HttpServletRequest; import java.util.HashMap; import java.util.Map; /** * Extends the stock Spring web authentication details class by adding the ability to add arbitrary * detail objects to it. */ public class FCFAuthenticationDetails extends WebAuthenticationDetails { private static final long serialVersionUID = 1L; private static final Log log = LogFactory.getLog(FCFAuthenticationDetails.class); public static final String ATTR_USER = "user"; private final Map<String, Object> details = new HashMap<>(); public FCFAuthenticationDetails(HttpServletRequest request) { super(request); } /** * Sets the specified detail element to the specified value. * * @param name Name of the detail element. * @param value Value for the detail element. A null value removes any existing detail element. */ public void setDetail(String name, Object value) { if (value == null) { details.remove(name); } else { details.put(name, value); } if (log.isDebugEnabled()) { if (value == null) { log.debug("Detail removed: " + name); } else { log.debug("Detail added: " + name + " = " + value); } } } /** * Returns the specified detail element. * * @param name Name of the detail element. * @return Value of the detail element, or null if not found. */ public Object getDetail(String name) { return name == null ? null : details.get(name); } }
[ "mdgeek1@gmail.com" ]
mdgeek1@gmail.com
6719d88a0984bee7e2eb24c307e3b7c85c8c8817
707b6dae4692fdee92f8fc8e7a00bd6b3528bf78
/org.tesoriero.cauce.task/src/tamm/Join.java
05eaa43fc56c78f03b4a0017a048e58e436eed7a
[]
no_license
tesorieror/cauce
ec2c05b5b6911824bdf27f5bd64c678fd49037c3
ef859fe6e81650a6671e6ad773115e5bc86d54ea
refs/heads/master
2020-05-14T13:07:54.152875
2015-03-19T12:20:27
2015-03-19T12:20:27
32,517,519
0
0
null
null
null
null
UTF-8
Java
false
false
2,248
java
/** */ package tamm; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Join</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link tamm.Join#getIncoming <em>Incoming</em>}</li> * <li>{@link tamm.Join#getOngoing <em>Ongoing</em>}</li> * </ul> * </p> * * @see tamm.TammPackage#getJoin() * @model abstract="true" * @generated */ public interface Join extends RouteTask { /** * Returns the value of the '<em><b>Incoming</b></em>' reference list. * The list contents are of type {@link tamm.InputConditionToJoinTask}. * It is bidirectional and its opposite is '{@link tamm.InputConditionToJoinTask#getTarget <em>Target</em>}'. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Incoming</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Incoming</em>' reference list. * @see tamm.TammPackage#getJoin_Incoming() * @see tamm.InputConditionToJoinTask#getTarget * @model opposite="target" required="true" * @generated */ EList<InputConditionToJoinTask> getIncoming(); /** * Returns the value of the '<em><b>Ongoing</b></em>' reference. * It is bidirectional and its opposite is '{@link tamm.JoinTaskToOutputCondition#getSource <em>Source</em>}'. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Ongoing</em>' reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Ongoing</em>' reference. * @see #setOngoing(JoinTaskToOutputCondition) * @see tamm.TammPackage#getJoin_Ongoing() * @see tamm.JoinTaskToOutputCondition#getSource * @model opposite="source" required="true" * @generated */ JoinTaskToOutputCondition getOngoing(); /** * Sets the value of the '{@link tamm.Join#getOngoing <em>Ongoing</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Ongoing</em>' reference. * @see #getOngoing() * @generated */ void setOngoing(JoinTaskToOutputCondition value); } // Join
[ "tesorieror@gmail.com" ]
tesorieror@gmail.com
5d614ceb09b0f8aa86dfa5a09279b86f56f13799
7b48b1908f2e23b1d594c3fb0c175364cad8ac6d
/edu.pdx.svl.coDoc.cdt.core/src/edu/pdx/svl/coDoc/cdt/internal/core/parser/TemplateParameterManager.java
07102dca8fed09210a49b2aed476e9be4b9d4949
[]
no_license
hellozt/coDoc
89bd3928a289dc5a1a53ef81d8048c82eb0cdf46
7015c431c9b903a19c0785631c7eb76d857e23cf
refs/heads/master
2021-01-17T18:23:57.253024
2013-05-04T16:09:52
2013-05-04T16:09:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,436
java
/******************************************************************************* * Copyright (c) 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Rational Software - Initial API and implementation *******************************************************************************/ package edu.pdx.svl.coDoc.cdt.internal.core.parser; import java.util.ArrayList; import java.util.Collections; import java.util.List; public final class TemplateParameterManager { protected void reset() { list = Collections.EMPTY_LIST; emptySegmentCount = 0; } private TemplateParameterManager(int i) { reset(); counterId = i; } private final int counterId; private List list; private int emptySegmentCount; public List getTemplateArgumentsList() { return list; } public void addSegment(List inputSegment) { if (inputSegment == null) { if (list == Collections.EMPTY_LIST) ++emptySegmentCount; else list.add(null); } else { if (list == Collections.EMPTY_LIST) { list = new ArrayList(); for (int i = 0; i < emptySegmentCount; ++i) list.add(null); } list.add(inputSegment); } } private static final int NUMBER_OF_INSTANCES = 8; private static final boolean[] instancesUsed = new boolean[NUMBER_OF_INSTANCES]; private static final TemplateParameterManager[] counters = new TemplateParameterManager[NUMBER_OF_INSTANCES]; private static int counter = 8; static { for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) { instancesUsed[i] = false; counters[i] = new TemplateParameterManager(i); } } /** * @return */ public synchronized static TemplateParameterManager getInstance() { int index = findFreeCounter(); if (index == -1) return new TemplateParameterManager(++counter); instancesUsed[index] = true; return counters[index]; } public synchronized static void returnInstance(TemplateParameterManager c) { if (c.counterId > 0 && c.counterId < NUMBER_OF_INSTANCES) instancesUsed[c.counterId] = false; c.reset(); } /** * @return */ private static int findFreeCounter() { for (int i = 0; i < NUMBER_OF_INSTANCES; ++i) if (instancesUsed[i] == false) return i; return -1; } }
[ "electronseu@gmail.com" ]
electronseu@gmail.com
c82d1902cb6604cc42cc1424a6864ef8c2aecf5e
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/p005cm/aptoide/p006pt/MyStoreManager.java
431d0e33bc5cfbfa9f7456f9d51c25f64f54786e
[ "MIT" ]
permissive
Game-Designing/Custom-Football-Game
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
47283462b2066ad5c53b3c901182e7ae62a34fc8
refs/heads/master
2020-08-04T00:02:04.876780
2019-10-06T06:55:08
2019-10-06T06:55:08
211,914,568
1
1
null
null
null
null
UTF-8
Java
false
false
747
java
package p005cm.aptoide.p006pt; import org.jacoco.agent.p025rt.internal_8ff85ea.Offline; /* renamed from: cm.aptoide.pt.MyStoreManager */ public class MyStoreManager { private static transient /* synthetic */ boolean[] $jacocoData; private static /* synthetic */ boolean[] $jacocoInit() { boolean[] zArr = $jacocoData; if (zArr != null) { return zArr; } boolean[] probes = Offline.getProbes(4675091109079659734L, "cm/aptoide/pt/MyStoreManager", 2); $jacocoData = probes; return probes; } public MyStoreManager() { $jacocoInit()[0] = true; } public static boolean shouldShowCreateStore() { $jacocoInit()[1] = true; return true; } }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
dd9cc0897c3fe52aa1a3b6a3aaa402d697e490db
86746294f3c83c89ed6fea54522944b04fdd5b18
/cdt-java-client/src/main/java/com/github/kklisura/cdt/protocol/types/css/InlineStylesForNode.java
4fedd90d9ce7831c1ef251896eb3f36a8d353b66
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sechawk/chrome-devtools-java-client
cd029ce51fe0339cedb822fa84a0049798de6b7a
5720062f2ac4918c322d93f717c1f6e5f66ab7f0
refs/heads/master
2021-06-25T04:09:49.619320
2020-12-18T18:28:01
2020-12-18T18:28:01
186,698,915
0
0
Apache-2.0
2019-05-14T20:53:53
2019-05-14T20:53:53
null
UTF-8
Java
false
false
1,515
java
package com.github.kklisura.cdt.protocol.types.css; /*- * #%L * cdt-java-client * %% * Copyright (C) 2018 Kenan Klisura * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import com.github.kklisura.cdt.protocol.support.annotations.Optional; public class InlineStylesForNode { @Optional private CSSStyle inlineStyle; @Optional private CSSStyle attributesStyle; /** Inline style for the specified DOM node. */ public CSSStyle getInlineStyle() { return inlineStyle; } /** Inline style for the specified DOM node. */ public void setInlineStyle(CSSStyle inlineStyle) { this.inlineStyle = inlineStyle; } /** Attribute-defined element style (e.g. resulting from "width=20 height=100%"). */ public CSSStyle getAttributesStyle() { return attributesStyle; } /** Attribute-defined element style (e.g. resulting from "width=20 height=100%"). */ public void setAttributesStyle(CSSStyle attributesStyle) { this.attributesStyle = attributesStyle; } }
[ "kklisura@hotmail.com" ]
kklisura@hotmail.com
0fcc32304e9bf70c4396332126d9d3dd54c59a07
9cc054d1e3a90af76a5e5762b7a58ddfa3df9907
/vertx-pg-client/src/test/java/io/vertx/pgclient/data/BinaryDataTypesSimpleCodecTest.java
c4922a1e52bef1398be511ddb78bc19f3b012422
[ "Apache-2.0" ]
permissive
barreiro/vertx-sql-client
c46f51d470ce18eea5a44fd32cb982a6cbf89044
57db51001489717f790317e231085471bfb1de2e
refs/heads/master
2022-11-05T06:06:04.951949
2020-06-30T02:00:53
2020-06-30T02:08:05
275,971,295
0
0
Apache-2.0
2020-06-30T02:00:01
2020-06-30T02:00:00
null
UTF-8
Java
false
false
2,750
java
package io.vertx.pgclient.data; import io.vertx.core.buffer.Buffer; import io.vertx.ext.unit.TestContext; import io.vertx.sqlclient.Row; import io.vertx.sqlclient.Tuple; import org.junit.Test; public class BinaryDataTypesSimpleCodecTest extends SimpleQueryDataTypeCodecTestBase { @Test public void testByteaHexFormat1(TestContext ctx) { testDecodeGeneric(ctx, "12345678910", "BYTEA", "Buffer1", Tuple::getBuffer, Row::getBuffer, Buffer.buffer("12345678910")); } @Test public void testByteaHexFormat2(TestContext ctx) { testDecodeGeneric(ctx, "\u00DE\u00AD\u00BE\u00EF", "BYTEA", "Buffer2", Tuple::getBuffer, Row::getBuffer, Buffer.buffer("\u00DE\u00AD\u00BE\u00EF")); } @Test public void testByteaEscapeBackslash(TestContext ctx) { testDecodeGeneric(ctx, "\\\\\\134", "BYTEA", "Buffer3", Tuple::getBuffer, Row::getBuffer, Buffer.buffer(new byte[]{0x5C, 0x5C})); } @Test public void testByteaEscapeNonPrintableOctets(TestContext ctx) { testDecodeGeneric(ctx, "\\001\\007", "BYTEA", "Buffer4", Tuple::getBuffer, Row::getBuffer, Buffer.buffer(new byte[]{0x01, 0x07})); } @Test public void testByteaEscapePrintableOctets(TestContext ctx) { testDecodeGeneric(ctx, "123abc", "BYTEA", "Buffer5", Tuple::getBuffer, Row::getBuffer, Buffer.buffer(new byte[]{'1', '2', '3', 'a', 'b', 'c'})); } @Test public void testByteaEscapeSingleQuote(TestContext ctx) { testDecodeGeneric(ctx, "\'\'", "BYTEA", "Buffer6", Tuple::getBuffer, Row::getBuffer, Buffer.buffer(new byte[]{0x27})); } @Test public void testByteaEscapeZeroOctet(TestContext ctx) { testDecodeGeneric(ctx, "\\000", "BYTEA", "Buffer7", Tuple::getBuffer, Row::getBuffer, Buffer.buffer(new byte[]{0x00})); } @Test public void testByteaEscapeFormat(TestContext ctx) { testDecodeGeneric(ctx, "abc \\153\\154\\155 \\052\\251\\124", "BYTEA", "Buffer8", Tuple::getBuffer, Row::getBuffer, Buffer.buffer(new byte[]{'a', 'b', 'c', ' ', 'k', 'l', 'm', ' ', '*', (byte) 0xA9, 'T'})); } @Test public void testByteaEmptyString(TestContext ctx) { testDecodeGeneric(ctx, "", "BYTEA", "Buffer9", Tuple::getBuffer, Row::getBuffer, Buffer.buffer("")); } @Test public void testDecodeHexByteaArray(TestContext ctx) { testDecodeGenericArray(ctx, "ARRAY [decode('48454c4c4f', 'hex') :: BYTEA]", "BufferArray", Tuple::getBufferArray, Row::getBufferArray, Buffer.buffer("HELLO")); } @Test public void testDecodeEscapeByteaArray(TestContext ctx) { testDecodeGenericArray(ctx, "ARRAY [decode('abc \\153\\154\\155 \\052\\251\\124', 'escape') :: BYTEA]", "BufferArray2", Tuple::getBufferArray, Row::getBufferArray, Buffer.buffer(new byte[]{'a', 'b', 'c', ' ', 'k', 'l', 'm', ' ', '*', (byte) 0xA9, 'T'})); } }
[ "julien@julienviet.com" ]
julien@julienviet.com
1d1572278d8803c80fe6d45f6d675c7bc96b3959
461be082a6e205fe39571f47a7c2e8701af6b099
/injavawetrust.springmvc/src/_05/parameterMethodNameResolver/controller/OrderController.java
57f846389bde5cdc438f958736b8f63a0c1211e0
[]
no_license
anjijava16/Injavawetrust-springmvc-tutorial
bd11daac12c7a86078fee4f54d685955ceadf1cd
1e9766961754da1c9e3029192e13ac739712411d
refs/heads/master
2021-01-13T14:59:58.097157
2016-07-02T09:36:09
2016-07-02T09:36:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,333
java
package _05.parameterMethodNameResolver.controller; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.multiaction.MultiActionController; // public class MultiActionController extends AbstractController implements // LastModified { ...} public class OrderController extends MultiActionController { // public (ModelAndView | Map | String | void) actionName(HttpServletRequest // request, HttpServletResponse response, [,HttpSession] [,AnyObject]); public String add(HttpServletRequest request, HttpServletResponse response) { request.setAttribute("message", "add method"); return "05.parameterMethodNameResolver.view/add"; } public ModelAndView remove(HttpServletRequest request, HttpServletResponse response) { ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("05.parameterMethodNameResolver.view/remove"); modelAndView.addObject("message", "remove method"); return modelAndView; } public ModelAndView list(HttpServletRequest request, HttpServletResponse response, ModelAndView modelAndView) { modelAndView.setViewName("05.parameterMethodNameResolver.view/list"); modelAndView.addObject("message", "list method"); return modelAndView; } }
[ "erguder.levent@gmail.com" ]
erguder.levent@gmail.com
2edb3e8271aa4a0024f6ca626a3674864e092589
a140ffc6af2a35ba915a62b4e92d4317057b8db6
/src/main/java/org/zalando/putittorest/RestClientAutoConfiguration.java
45fff33c371e866d52194bae7137f7b949a15dc3
[ "MIT" ]
permissive
rjumurov/put-it-to-rest
b23039c5b21ed24200459edb99faf4a2a03ab474
ce402ddddd2d678ec8d230a7d54da9321e66d29c
refs/heads/master
2020-12-24T19:46:26.553230
2016-06-13T19:25:13
2016-06-13T19:25:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
496
java
package org.zalando.putittorest; import org.springframework.boot.autoconfigure.AutoConfigureOrder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.Ordered; @Configuration @AutoConfigureOrder(Ordered.LOWEST_PRECEDENCE) public class RestClientAutoConfiguration { @Bean public static RestClientPostProcessor restClientPostProcessor() { return new RestClientPostProcessor(); } }
[ "willi.schoenborn@zalando.de" ]
willi.schoenborn@zalando.de
1eff97e5a9f77cf3c0f226e66bca1b9ea349b149
2fda0a2f1f5f5d4e7d72ff15a73a4d3e1e93abeb
/proFL-plugin-2.0.3/org/codehaus/groovy/runtime/dgm$727.java
27ca0cbfe878c5bb9d3b7faebb2d84bd4152f8d7
[ "MIT" ]
permissive
ycj123/Research-Project
d1a939d99d62dc4b02d9a8b7ecbf66210cceb345
08296e0075ba0c13204944b1bc1a96a7b8d2f023
refs/heads/main
2023-05-29T11:02:41.099975
2021-06-08T13:33:26
2021-06-08T13:33:26
374,899,147
0
0
null
null
null
null
UTF-8
Java
false
false
950
java
// // Decompiled by Procyon v0.5.36 // package org.codehaus.groovy.runtime; import groovy.lang.Closure; import java.io.File; import org.codehaus.groovy.reflection.CachedClass; import org.codehaus.groovy.reflection.GeneratedMetaMethod; public class dgm$727 extends GeneratedMetaMethod { public dgm$727(final String name, final CachedClass declaringClass, final Class returnType, final Class[] parameters) { super(name, declaringClass, returnType, parameters); } public Object invoke(final Object o, final Object[] array) { return DefaultGroovyMethods.withObjectOutputStream((File)o, (Closure)array[0]); } public final Object doMethodInvoke(final Object o, Object[] coerceArgumentsToClasses) { coerceArgumentsToClasses = this.coerceArgumentsToClasses(coerceArgumentsToClasses); return DefaultGroovyMethods.withObjectOutputStream((File)o, (Closure)coerceArgumentsToClasses[0]); } }
[ "chijiang.yang@student.unimelb.edu.au" ]
chijiang.yang@student.unimelb.edu.au
1d41b0a6be23a36e1ffc73f4ad020d0b49b2e827
b65b00391f03c83ee2a344c7571b042d6eb4451d
/app/src/main/java/com/recruit/zejuxin/recruit/Fragment/Luncher/LauncherScrollDelegate.java
8193898b3a8ba937c34e9c1867ee68e1ec298a1d
[]
no_license
winelx/recruit2
8e379004e40bb419e8f79a0641bd47d0033b1f06
92cbfff7d09fe401e11e4039278083d30beee764
refs/heads/master
2021-07-09T15:27:16.555175
2017-10-10T10:08:49
2017-10-10T10:08:49
104,870,989
0
0
null
null
null
null
UTF-8
Java
false
false
2,465
java
package com.recruit.zejuxin.recruit.Fragment.Luncher; import android.app.Activity; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.view.View; import com.bigkoo.convenientbanner.ConvenientBanner; import com.recruit.zejuxin.recruit.Code.delegate.LatteDelegate; import com.recruit.zejuxin.recruit.Code.ui.scanner.LauncherHolderCreator; import com.recruit.zejuxin.recruit.Code.ui.scanner.ScrollLauncherTag; import com.recruit.zejuxin.recruit.Code.util.Loader.ILauncherListener; import com.recruit.zejuxin.recruit.Code.util.storage.LattePreference; import com.recruit.zejuxin.recruit.Fragment.main.ExampleDelegate; import com.recruit.zejuxin.recruit.R; import com.recruit.zejuxin.recruit.R2; import java.util.ArrayList; import butterknife.BindView; import butterknife.OnClick; /** * Created by 10942 on 2017/9/25 0025. */ public class LauncherScrollDelegate extends LatteDelegate { private static final ArrayList<Integer> INTEGERS = new ArrayList<>(); private ILauncherListener mILauncherListener = null; @BindView(R2.id.banner) ConvenientBanner<Integer> mIntegerConvenientBanner = null; @OnClick(R2.id.scroo_new) void scroo() { startWithPop(new ExampleDelegate()); } @Override public void onAttach(Activity activity) { super.onAttach(activity); if (activity instanceof ILauncherListener) { mILauncherListener = (ILauncherListener) activity; } } public void initBanner() { //启动页的轮播图片 INTEGERS.add(R.mipmap.launcher_01); INTEGERS.add(R.mipmap.launcher_02); INTEGERS.add(R.mipmap.launcher_03); INTEGERS.add(R.mipmap.launcher_05); //设置Banner数据 mIntegerConvenientBanner .setPages(new LauncherHolderCreator(), INTEGERS) .setPageIndicator(new int[]{R.drawable.dot_normal, R.drawable.dot_focus}) .setPageIndicatorAlign(ConvenientBanner.PageIndicatorAlign.CENTER_HORIZONTAL) .setCanLoop(false); LattePreference.setAppFlag(ScrollLauncherTag.HAS_FIRST_LAUNCHER_APP.name(), true); } @Override public Object setLayout() { return R.layout.delegate_launcherscroll; } @Override public void onBindView(@Nullable Bundle savedInstanceState, @NonNull View rootView) { INTEGERS.clear(); initBanner(); } }
[ "1094290855@qq.com" ]
1094290855@qq.com
ea91f33f8a21dc76aca685b70913fc150a3d773c
2600b62dd9180de9a8171f35b43be414a5a1b5ec
/src/main/java/util/FileUtils.java
56a63cdd7a285e1f729fce8f233f050f367de944
[]
no_license
leaderli/test
304a4b2e80614cf01501674ad716e86505ae5e38
337ea1518c4c8ae4771b88ab8fe8d644eeccedc3
refs/heads/master
2020-03-12T10:46:22.503083
2019-01-21T14:18:47
2019-01-21T14:18:47
59,644,982
0
0
null
null
null
null
UTF-8
Java
false
false
1,481
java
package util; import org.apache.commons.lang3.StringUtils; import java.io.File; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URL; import java.net.URLDecoder; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; /** * Created by li on 6/2/17. */ public class FileUtils { public static List<String> listFilesUnderExactDir(String dirPath) { List<String> list = new ArrayList<>(); Enumeration<URL> dirs; try { dirs = Thread.currentThread().getContextClassLoader().getResources( "servlet"); while (dirs.hasMoreElements()) { URL url = dirs.nextElement(); String path = null; try { path = URLDecoder.decode(url.getFile(), "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } File file; if (path != null) { file = new File(path); File[] files = file.listFiles(); if (files == null) return list; for (File f : files) { list.add(StringUtils.substringBeforeLast(f.getName(),".")); } } } } catch (IOException e) { e.printStackTrace(); } return list; } }
[ "429243408@qq.com" ]
429243408@qq.com
f4dda3d0e9c36f6f57e049932e96f45333e4630f
83e934b83e10ec240d543b1981a9205e525a4889
/04. 1. Enumerations-And-Annotations/src/p05_Coding_Tracker/Tracker.java
252c3e9c456f7872c6ba7e81c090868f90bc63de
[ "MIT" ]
permissive
kostadinlambov/Java-OOP-Advanced
dca49a1b0750092cc713684403629ff9ca06d39e
12db2a30422deef057fc25cf2947d8bc22cce77c
refs/heads/master
2021-05-12T10:59:24.753433
2018-01-20T19:01:45
2018-01-20T19:01:45
117,370,385
3
0
null
null
null
null
UTF-8
Java
false
false
1,043
java
package p05_Coding_Tracker; import java.lang.reflect.Method; import java.util.*; public class Tracker { private static Map<String, List<String>> map = new LinkedHashMap<>(); @Author(name = "Pesho") public void run(){ } @Author(name = "Gosho") public void runAgain(){ } public static void printMethodsByAuthor(Class<?> cl) { Method[] arr = cl.getDeclaredMethods(); for (Method method : arr) { Author annotation = method.getAnnotation(Author.class); if (annotation != null) { String methodName = method.getName() + "()"; String annotationValue = annotation.name(); map.putIfAbsent(annotationValue, new ArrayList<>()); map.get(annotationValue).add(methodName); } } for (Map.Entry<String, List<String>> stringListEntry : map.entrySet()) { System.out.println(stringListEntry.getKey() + ": " + String.join(", ", stringListEntry.getValue())); } } }
[ "valchak@abv.bg" ]
valchak@abv.bg
655058c9a47b84e511eb563e46b67256e26bbfcc
92583f2a9e376a8b7bd0a5dccc3aa455f24280be
/src/main/java/com/lakeqiu/base/design/charpter6/version1/ReadWriteLock.java
ddb0531343a347988943e557f3cdb54681a3f1ce
[]
no_license
lakeqiu/try-concurrency
f4b3a5bf92d80845312b5d68af7607b0ac154a73
65c31b0a44bd9690c0ae15dcb3f669f5289dc023
refs/heads/master
2020-08-02T17:08:03.772587
2019-10-26T12:25:36
2019-10-26T12:25:36
211,439,969
4
0
null
null
null
null
UTF-8
Java
false
false
2,195
java
package com.lakeqiu.base.design.charpter6.version1; /** * 获取读锁、写锁的类 * @author lakeqiu */ public class ReadWriteLock { /** * 阅读者数量 */ private int readingReaders = 0; /** * 等待阅读者数量 */ private int waitingReaders = 0; /** * 写入者数量 */ private int writingWriters = 0; /** * 等待写入者数量 */ private int waitingWriters = 0; /** * 获取读锁 */ public synchronized void readLock() throws InterruptedException { // 不知道能不能获取读锁,所以先加入等待获取读锁的队列中 this.waitingReaders++; try { // 只要还有人在写入中,就进行等待 while (writingWriters > 0){ this.wait(); } // 没人在写入了,获取读锁,把阅读者数量加1 this.readingReaders++; }finally { // 获取锁完了,将自己从等待队列中剔除 this.waitingReaders--; } } /** * 释放读锁 */ public synchronized void readUnlock(){ // 将自己从阅读队列里剔除 this.readingReaders--; // 唤醒其他线程 this.notifyAll(); } /** * 获取写锁 */ public synchronized void writerLock() throws InterruptedException { // 不知道能不能获取锁成功,所以先自己加入等待队列 this.waitingWriters++; try { // 只要还有人在写入或读取,就进行等待 while (readingReaders > 0 || writingWriters >0 ){ this.wait(); } // 没有写入或读取,可以获取锁了,把自己加入写入者队列 this.writingWriters++; }finally { // 获取锁完了,将自己从等待队列中剔除 this.waitingWriters--; } } /** * 释放写锁 */ public synchronized void writerUnlock(){ // 将自己从写入者队列中剔除 this.writingWriters--; // 唤醒其他线程 this.notifyAll(); } }
[ "884506946@qq.com" ]
884506946@qq.com
54de92d12d97f447aa8e92cf39c701f9e58f7a9c
719206f4df3e5b627ef16f27bf659c36397f5d6f
/hybris/bin/custom/petshop/petshopfulfilmentprocess/testsrc/de/hybris/petshop/fulfilmentprocess/test/actions/consignmentfulfilment/SendDeliveryMessage.java
e063619f45801fe57e72759b112c9b25f0597493
[]
no_license
rpalacgi/hybris_petshop_v2
60cac5081148a65db03eead3118e06d85cd3e952
449220feebb66a495ca3c23c7707d53b74c1e3e6
refs/heads/master
2021-06-13T01:36:13.345225
2017-04-06T14:01:34
2017-04-06T14:01:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
553
java
/* * [y] hybris Platform * * Copyright (c) 2000-2015 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 de.hybris.petshop.fulfilmentprocess.test.actions.consignmentfulfilment; /** * */ public class SendDeliveryMessage extends AbstractTestConsActionTemp { //empty }
[ "redchush@gmail.com" ]
redchush@gmail.com
87559782c4a3d851860d7df639cd5a73014a4d5c
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a000/A000253Test.java
73032090057ebe22f39a25384f1fb6e0fe1748d2
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a000; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A000253Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
75b11130593f8e407b4042f68cbea2a740e1d67f
3e2e79bedac25ea5608bd89e692a868b4f847b80
/eclipse/apet-plugin/src/apet/absunit/PureExpressionBuilder.java
ed2c5261b5a4b51690b075bf730b27f83e29eb04
[]
no_license
JaacRepo/absCompiler
a50fa03beeaa9b5a2286cb9a0dd5ba2b52484541
8b852a71947c82bfc7172ec4e9c1affb4cb102d4
refs/heads/master
2018-10-16T11:04:35.821401
2018-08-16T14:24:01
2018-08-16T14:24:01
122,403,875
1
0
null
null
null
null
UTF-8
Java
false
false
6,341
java
package apet.absunit; import static abs.backend.tests.AbsASTBuilderUtil.getDecl; import static abs.backend.tests.AbsASTBuilderUtil.namePred; import static apet.testCases.ABSTestCaseExtractor.getABSDataType; import static apet.testCases.ABSTestCaseExtractor.getABSDataValue; import static apet.testCases.ABSTestCaseExtractor.getABSTermArgs; import static apet.testCases.ABSTestCaseExtractor.getABSTermFunctor; import static apet.testCases.ABSTestCaseExtractor.getABSTermTypeName; import java.util.List; import java.util.Set; import abs.frontend.ast.DataConstructorExp; import abs.frontend.ast.DataTypeDecl; import abs.frontend.ast.DataTypeUse; import abs.frontend.ast.Decl; import abs.frontend.ast.IntLiteral; import abs.frontend.ast.InterfaceDecl; import abs.frontend.ast.Model; import abs.frontend.ast.NullExp; import abs.frontend.ast.ParametricDataTypeDecl; import abs.frontend.ast.PureExp; import abs.frontend.ast.StringLiteral; import abs.frontend.ast.TypeParameterDecl; import abs.frontend.ast.TypeSynDecl; import abs.frontend.ast.TypeUse; import abs.frontend.ast.VarUse; import apet.testCases.ABSData; import apet.testCases.ABSRef; import apet.testCases.ABSTerm; /** * * @author woner * */ final class PureExpressionBuilder { private final String INT = "Int"; private final String STRING = "String"; private final Model model; private final HeapReferenceBuilder heapRefBuilder = new HeapReferenceBuilder(); private final Set<String> importModules; PureExpressionBuilder(Model input, Set<String> importModules) { this.model = input; this.importModules = importModules; } void updateInitialisationOrder(List<String> initialisationsOrders, String cr, String nr) { int cpos = initialisationsOrders.indexOf(cr); int npos = initialisationsOrders.indexOf(nr); if (npos < 0 || npos > cpos) { initialisationsOrders.add(cpos, nr); } } PureExp createPureExpression( String testName, Set<String> heapNames, ABSData dataValue) { return createPureExpression(null, null, testName, heapNames, dataValue); } /** * @param currentHeapReference * @param initialisationsOrders * @param heapNames * @param dataValue * @return */ PureExp createPureExpression( String currentHeapReference, List<String> initialisationsOrders, String testName, Set<String> heapNames, ABSData dataValue) { String type = getABSDataType(dataValue); String value = getABSDataValue(dataValue); if (type.contains("(") && dataValue instanceof ABSTerm) { ABSTerm term = (ABSTerm) dataValue; type = getABSTermTypeName(term); } //import type Decl decl = getDecl(model, Decl.class, namePred(type)); importType(decl); if (dataValue instanceof ABSTerm) { ABSTerm term = (ABSTerm) dataValue; return makeDataTermValue(currentHeapReference, initialisationsOrders, testName, heapNames, term, decl); } else if (dataValue instanceof ABSRef) { if (heapNames.contains(value)) { String ref = heapRefBuilder.heapReferenceForTest(testName, value); if (currentHeapReference != null) { //we need to consider initialisation order! updateInitialisationOrder(initialisationsOrders, currentHeapReference, ref); } return new VarUse(ref); } else { return new NullExp(); } } else { throw new IllegalStateException("Cannot handle ABSData that is not " + "either a ABSRef or a ABSTerm"); } } /** * Resolve the type synonyms to its raw type (interface or data type) * @param d * @return */ Decl resolveTypeSynonym(TypeSynDecl d) { TypeUse use = d.getValue(); Decl decl = getDecl(model, Decl.class, namePred(use.getName())); if (decl instanceof TypeSynDecl) { return resolveTypeSynonym((TypeSynDecl) decl); } return decl; } void importType(Decl decl) { importModules.add(decl.getModuleDecl().getName()); if (decl instanceof TypeSynDecl) { decl = resolveTypeSynonym((TypeSynDecl) decl); importModules.add(decl.getModuleDecl().getName()); } //import type parameters if (decl instanceof ParametricDataTypeDecl) { for (TypeParameterDecl t : ((ParametricDataTypeDecl) decl).getTypeParameters()) { Decl type = getDecl(model, Decl.class, namePred(t.getName())); if (type == null) { //most likely a generic type continue; } importType(type); } } } /** * Construct a pure expression that is either a primitive literal * such as Int and String, or a value of a data type. * @param currentHeapReference * * @param initialisationsOrders * @param heap * @param testName * @param value * @param decl * * @return */ PureExp makeDataTermValue(String currentHeapReference, List<String> initialisationsOrders, String testName, Set<String> heap, ABSTerm term, Decl decl) { if (decl instanceof TypeSynDecl) { decl = resolveTypeSynonym((TypeSynDecl) decl); } if (decl instanceof DataTypeDecl) { if (STRING.equals(decl.getName())) { return new StringLiteral(getABSDataValue(term)); } else if (INT.equals(decl.getName())) { return new IntLiteral(getABSDataValue(term)); } else { return parseValue(currentHeapReference, initialisationsOrders, testName, heap, term); } } else if (decl instanceof InterfaceDecl) { String value = getABSDataValue(term); if (heap.contains(value)) { String ref = heapRefBuilder.heapReferenceForTest(testName, value); if (currentHeapReference != null) { //we need to consider initialisation order! updateInitialisationOrder(initialisationsOrders, currentHeapReference, ref); } return new VarUse(ref); } else { return new NullExp(); } } else { throw new IllegalStateException("Cannot handle declaration type "+decl); } } DataConstructorExp parseValue(String currentHeapReference, List<String> initialisationsOrders, String testName, Set<String> heap, ABSTerm term) { final DataConstructorExp result = new DataConstructorExp(); String fn = getABSTermFunctor(term); result.setConstructor(fn); result.setParamList(new abs.frontend.ast.List<PureExp>()); List<ABSData> vs = getABSTermArgs(term); for (int i=0; i<vs.size(); i++) { result.setParam(createPureExpression(currentHeapReference, initialisationsOrders, testName, heap, vs.get(i)),i); } return result; } }
[ "serbanescu.vlad.nicolae@gmail.com" ]
serbanescu.vlad.nicolae@gmail.com
3ec9d5031d1f6bac6ad8a53820f27f00b2bbb7f7
e5bb4c1c5cb3a385a1a391ca43c9094e746bb171
/Service/trunk/service/service-baseInfo/src/main/java/com/hzfh/service/baseInfo/mapper/EmailMapper.java
e57031e86ff498d4ad9418a922040b14c404ebde
[]
no_license
FashtimeDotCom/huazhen
397143967ebed9d50073bfa4909c52336a883486
6484bc9948a29f0611855f84e81b0a0b080e2e02
refs/heads/master
2021-01-22T14:25:04.159326
2016-01-11T09:52:40
2016-01-11T09:52:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
697
java
package com.hzfh.service.baseInfo.mapper; import com.hzfh.api.baseInfo.model.Email; import com.hzfh.api.baseInfo.model.query.EmailCondition; import com.hzframework.data.mapper.BaseMapper; import org.springframework.stereotype.Service; /******************************************************************************* * * Copyright 2015 HZFH. All rights reserved. * Author: GuoZhenYu * Create Date: 2015/3/5 * Description: * * Revision History: * Date Author Description * ******************************************************************************/ @Service("emailMapper") public interface EmailMapper extends BaseMapper<Email, EmailCondition> { }
[ "ulei0343@163.com" ]
ulei0343@163.com
10d45b7e1f83779d03f13dd1875db00cc08a25dd
ea4da81a69a300624a46fce9e64904391c37267c
/src/main/java/com/alipay/api/response/AlipayOpenPublicGisQueryResponse.java
79cb0f7db28c4e5248f31f81e7706dea9ef3a5d7
[ "Apache-2.0" ]
permissive
shiwei1024/alipay-sdk-java-all
741cc3cb8cf757292b657ce05958ff9ad8ecf582
d6a051fd47836c719a756607e6f84fee2b26ecb4
refs/heads/master
2022-12-29T18:46:53.195585
2020-10-09T06:34:30
2020-10-09T06:34:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,543
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.open.public.gis.query response. * * @author auto create * @since 1.0, 2020-08-25 11:05:59 */ public class AlipayOpenPublicGisQueryResponse extends AlipayResponse { private static final long serialVersionUID = 6393759826277923757L; /** * 精确度 */ @ApiField("accuracy") private String accuracy; /** * 经纬度所在位置 */ @ApiField("city") private String city; /** * 纬度信息 */ @ApiField("latitude") private String latitude; /** * 经度信息 */ @ApiField("longitude") private String longitude; /** * 经纬度对应位置所在的省份 */ @ApiField("province") private String province; public void setAccuracy(String accuracy) { this.accuracy = accuracy; } public String getAccuracy( ) { return this.accuracy; } public void setCity(String city) { this.city = city; } public String getCity( ) { return this.city; } public void setLatitude(String latitude) { this.latitude = latitude; } public String getLatitude( ) { return this.latitude; } public void setLongitude(String longitude) { this.longitude = longitude; } public String getLongitude( ) { return this.longitude; } public void setProvince(String province) { this.province = province; } public String getProvince( ) { return this.province; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
b0e5607acbcc24d88f61081f098d82cdc9e70c10
7a682dcc4e284bced37d02b31a3cd15af125f18f
/bitcamp-java-basic/src/main/java/ch24/c/Test04.java
d3b1651e17d5f503f821927af5bef24c195c66b3
[]
no_license
eomjinyoung/bitcamp-java-20190527
a415314b74954f14989042c475a4bf36b7311a8c
09f1b677587225310250078c4371ed94fe428a35
refs/heads/master
2022-03-15T04:33:15.248451
2019-11-11T03:33:58
2019-11-11T03:33:58
194,775,330
4
3
null
null
null
null
UTF-8
Java
false
false
801
java
// join() - 해당 스레드가 종료될 때까지 현재 스레드를 기다리게 한다. package ch24.c; public class Test04 { public static void main(String[] args) throws Exception { Thread t = new Thread() { @Override public void run() { for (int i = 0; i < 1000; i++) { System.out.printf("스레드 ===> %d\n", i); } try { sleep(5000); // 현재 스레드를 5초 동안 Not Runnable 상태에 둔다. } catch (Exception e) {} } }; // 스레드 객체 생성 => 준비 상태 t.start(); // => Running 상태 // t 스레드가 dead 상태가 될 때까지 기다린다. t.join(); for (int i = 0; i < 1000; i++) { System.out.printf("main() ~~~~> %d\n", i); } } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
21c29064766f9159e43686fd9cefcc7d5db3d593
7fb9cc2d15234bbe66a1dabfc7cf286bda97b2be
/com.sap.lmsl.slp.java/src/main/java/com/sap/lmsl/slp/DialogBody.java
a91febe5277d8fad7d7e512609c18f390ebcd8fa
[ "Apache-2.0" ]
permissive
DenitsaKostova/cloud-mta-java-common
7424348754d0fc63d2e1e1214260ff10a8836d6d
48ea0b70d79025b6729f2f954fcb61f5f902a1fd
refs/heads/master
2021-07-13T02:39:42.834247
2017-10-18T08:19:30
2017-10-18T09:49:15
107,266,245
0
0
null
2017-10-17T12:34:59
2017-10-17T12:34:59
null
UTF-8
Java
false
false
1,872
java
package com.sap.lmsl.slp; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{http://www.sap.com/lmsl/slp}groupView" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "groupView" }) @XmlRootElement(name = "dialogBody") public class DialogBody { @XmlElement(required = true) protected List<GroupView> groupView; /** * Gets the value of the groupView property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the groupView property. * * <p> * For example, to add a new item, do as follows: * <pre> * getGroupView().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link GroupView } * * */ public List<GroupView> getGroupView() { if (groupView == null) { groupView = new ArrayList<GroupView>(); } return this.groupView; } }
[ "nikolay.valchev@sap.com" ]
nikolay.valchev@sap.com
b2ebfb7a523a636c170d597fdfa6fba547b463ec
e3990e8c3b1e0b8824a0a19bf9d12e48441def7a
/ebean-core/src/main/java/io/ebeaninternal/api/BinaryWriteContext.java
610ad41ea3482c81bf67d4ed7f0cd8af28b42d86
[ "Apache-2.0" ]
permissive
ebean-orm/ebean
13c9c465f597dd2cf8b3e54e4b300543017c9dee
bfe94786de3c3b5859aaef5afb3a7572e62275c4
refs/heads/master
2023-08-22T12:57:34.271133
2023-08-22T11:43:41
2023-08-22T11:43:41
5,793,895
1,199
224
Apache-2.0
2023-09-11T14:05:26
2012-09-13T11:49:56
Java
UTF-8
Java
false
false
917
java
package io.ebeaninternal.api; import java.io.DataOutputStream; import java.io.IOException; /** * Context used to write binary message (like RemoteTransactionEvent). */ public final class BinaryWriteContext { private final DataOutputStream out; private long counter; public BinaryWriteContext(DataOutputStream out) { this.out = out; } /** * Return the number of message parts that have been written. */ public long counter() { return counter; } /** * Return the output stream to write to. */ public DataOutputStream os() { return out; } /** * Start a message part with a given type code. */ public DataOutputStream start(int type) throws IOException { counter++; out.writeBoolean(true); out.writeInt(type); return out; } /** * End of message parts. */ public void end() throws IOException { out.writeBoolean(false); } }
[ "robin.bygrave@gmail.com" ]
robin.bygrave@gmail.com
36996d33774190091f301fc06f4642f024679a94
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/52/org/apache/commons/math/fraction/BigFraction_divide_650.java
96aa401d328106500601b0159474e751163a2d8b
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,428
java
org apach common math fraction represent ration number overflow immut version big fraction bigfract divid fraction pass return result reduc form param divid link big fraction bigfract instanc result valu arithmet except arithmeticexcept fraction divid big fraction bigfract divid divid big integ biginteg valueof
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
60bc4287ae784746b5328ceda9301237044b4b57
c67bfa038782a9ed524f0552a7840b1e3c561579
/src/main/java/pl/redheadsolutions/lg/service/impl/HousingAssociationServiceImpl.java
25b131b14b1ebab1a5ddb0d53669fb923837285a
[]
no_license
Viwritis/housing-association-voting-platform
1f23f1272785680226e21883492da82ec27bec71
3b5ed0b3714999e4aee73d572733d87b245260b9
refs/heads/master
2022-04-30T19:13:00.148243
2020-03-16T21:19:45
2020-03-16T21:19:45
247,541,285
0
0
null
2022-03-08T21:18:37
2020-03-15T19:57:22
Java
UTF-8
Java
false
false
2,514
java
package pl.redheadsolutions.lg.service.impl; import pl.redheadsolutions.lg.service.HousingAssociationService; import pl.redheadsolutions.lg.domain.HousingAssociation; import pl.redheadsolutions.lg.repository.HousingAssociationRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Optional; /** * Service Implementation for managing {@link HousingAssociation}. */ @Service @Transactional public class HousingAssociationServiceImpl implements HousingAssociationService { private final Logger log = LoggerFactory.getLogger(HousingAssociationServiceImpl.class); private final HousingAssociationRepository housingAssociationRepository; public HousingAssociationServiceImpl(HousingAssociationRepository housingAssociationRepository) { this.housingAssociationRepository = housingAssociationRepository; } /** * Save a housingAssociation. * * @param housingAssociation the entity to save. * @return the persisted entity. */ @Override public HousingAssociation save(HousingAssociation housingAssociation) { log.debug("Request to save HousingAssociation : {}", housingAssociation); return housingAssociationRepository.save(housingAssociation); } /** * Get all the housingAssociations. * * @param pageable the pagination information. * @return the list of entities. */ @Override @Transactional(readOnly = true) public Page<HousingAssociation> findAll(Pageable pageable) { log.debug("Request to get all HousingAssociations"); return housingAssociationRepository.findAll(pageable); } /** * Get one housingAssociation by id. * * @param id the id of the entity. * @return the entity. */ @Override @Transactional(readOnly = true) public Optional<HousingAssociation> findOne(Long id) { log.debug("Request to get HousingAssociation : {}", id); return housingAssociationRepository.findById(id); } /** * Delete the housingAssociation by id. * * @param id the id of the entity. */ @Override public void delete(Long id) { log.debug("Request to delete HousingAssociation : {}", id); housingAssociationRepository.deleteById(id); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
893b4887f8586c9fe63418c8394c75e1b226d959
c4b706b2c3a5f49f78351c701004d026a8c47b3a
/compiler/src/main/java/org/jaxsb/compiler/processor/model/element/ExtensionModel.java
193651db1d3f46cf65131c3106aac552b2472575
[ "MIT" ]
permissive
jaxsb/jaxsb
19447a028aa2a57ebb8fdf8bce0e3364c4a070a0
01713bdf722b10e5bf5ab073cb106845234d19cc
refs/heads/master
2023-08-21T12:30:38.219514
2023-08-19T10:40:47
2023-08-19T10:40:47
148,918,510
2
0
MIT
2023-06-16T10:33:11
2018-09-15T16:17:53
Java
UTF-8
Java
false
false
2,151
java
/* Copyright (c) 2008 JAX-SB * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * You should have received a copy of The MIT License (MIT) along with this * program. If not, see <http://opensource.org/licenses/MIT/>. */ package org.jaxsb.compiler.processor.model.element; import org.jaxsb.compiler.lang.LexerFailureException; import org.jaxsb.compiler.lang.UniqueQName; import org.jaxsb.compiler.processor.model.Model; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public final class ExtensionModel extends Model { private SimpleTypeModel<?> base; protected ExtensionModel(final Node node, final Model parent) { super(node, parent); final NamedNodeMap attributes = node.getAttributes(); for (int i = 0, i$ = attributes.getLength(); i < i$; ++i) { // [RA] final Node attribute = attributes.item(i); if ("base".equals(attribute.getLocalName())) { final Node parentNode = node.getParentNode(); if (parentNode.getLocalName().contains("complex")) base = ComplexTypeModel.Reference.parseComplexType(UniqueQName.getInstance(parseQNameValue(attribute.getNodeValue(), node))); else if (parentNode.getLocalName().contains("simple")) base = SimpleTypeModel.Reference.parseSimpleType(UniqueQName.getInstance(parseQNameValue(attribute.getNodeValue(), node))); else throw new LexerFailureException("whoa, schema error?"); } } } public void setBase(final SimpleTypeModel<?> base) { this.base = base; } @SuppressWarnings("rawtypes") public SimpleTypeModel getBase() { return base; } }
[ "seva@safris.org" ]
seva@safris.org
e1e4f80262902e22d4f7d386bed436d6db5dd0a8
a6ff7a994ecfe54642752d9bc4d780c42eafce59
/common/src/main/java/com/erayic/agr/common/net/back/enums/EnumServiceType.java
c15df0b8826051ea4d6f687b7a2067386a8eba75
[]
no_license
chenxizhe/monster
efdebc446c85f3b73258a669d67957ce512af76b
43314e29111065b1bf77fa74a864bec7818349ef
refs/heads/master
2023-05-06T12:48:51.978300
2017-07-27T02:05:37
2017-07-27T02:05:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
897
java
package com.erayic.agr.common.net.back.enums; /** * 作者:Hkceey * 邮箱:hkceey@outlook.com * 注解: */ public class EnumServiceType { public static final int KERNEL = 0;//核心服务 public static final int InfoService = 1;//信息服务 public static final int Subject = 2;//主题服务 public static final int Specify = 3;//特定作物服务 public static final int All = 9;//全部 public static String getTypeDes(int type) { switch (type) { case KERNEL: return "核心服务"; case InfoService: return "信息服务"; case Subject: return "主题服务"; case Specify: return "特定作物服务"; case All: return "全部"; default: return "未定义"; } } }
[ "hkceey@outlook.com" ]
hkceey@outlook.com
a3aae4c906449fe54ffb8e1729aa296745e31b7e
92c1674aacda6c550402a52a96281ff17cfe5cff
/module15/module54/module1/src/main/java/com/android/example/module15_module54_module1/ClassAAI.java
a742100f0820c3cee616bc9f6887406aebcb30d1
[]
no_license
bingranl/android-benchmark-project
2815c926df6a377895bd02ad894455c8b8c6d4d5
28738e2a94406bd212c5f74a79179424dd72722a
refs/heads/main
2023-03-18T20:29:59.335650
2021-03-12T11:47:03
2021-03-12T11:47:03
336,009,838
0
0
null
null
null
null
UTF-8
Java
false
false
832
java
package com.android.example.module15_module54_module1; public class ClassAAI { private java.lang.String instance_var_1_0 = "SomeString"; private java.lang.String instance_var_1_1 = "SomeString"; private java.lang.String instance_var_1_2 = "SomeString"; public void method0( java.lang.String param0, java.lang.String param1) throws Throwable { java.lang.String local_var_2_2 = "SomeString"; local_var_2_2.compareTo("SomeString"); java.lang.String local_var_2_3 = "SomeString"; local_var_2_3.compareTo("SomeString"); java.lang.String local_var_2_4 = "SomeString"; local_var_2_4.compareTo("SomeString"); } public void method1( java.lang.String param0, java.lang.String param1) throws Throwable { } public void method2( java.lang.String param0, java.lang.String param1) throws Throwable { } }
[ "bingran@google.com" ]
bingran@google.com
09f80151312e78091b11a3b0adee640558a6b2a1
812be6b9d1ba4036652df166fbf8662323f0bdc9
/java/Dddml.Wms.JavaCommon/src/generated/java/org/dddml/wms/domain/inventoryitem/InventoryItemEntryStateDto.java
d0ad44ce25d0d9d0687db156f40334aadb48d972
[]
no_license
lanmolsz/wms
8503e54a065670b48a15955b15cea4926f05b5d6
4b71afd80127a43890102167a3af979268e24fa2
refs/heads/master
2020-03-12T15:10:26.133106
2018-09-27T08:28:05
2018-09-27T08:28:05
130,684,482
0
0
null
2018-04-23T11:11:24
2018-04-23T11:11:24
null
UTF-8
Java
false
false
6,131
java
package org.dddml.wms.domain.inventoryitem; import java.util.*; import java.math.BigDecimal; import java.util.Date; import org.dddml.wms.domain.*; import org.dddml.wms.specialization.*; public class InventoryItemEntryStateDto { private Long entrySeqId; public Long getEntrySeqId() { return this.entrySeqId; } public void setEntrySeqId(Long entrySeqId) { this.entrySeqId = entrySeqId; } private BigDecimal onHandQuantity; public BigDecimal getOnHandQuantity() { return this.onHandQuantity; } public void setOnHandQuantity(BigDecimal onHandQuantity) { this.onHandQuantity = onHandQuantity; } private BigDecimal inTransitQuantity; public BigDecimal getInTransitQuantity() { return this.inTransitQuantity; } public void setInTransitQuantity(BigDecimal inTransitQuantity) { this.inTransitQuantity = inTransitQuantity; } private BigDecimal reservedQuantity; public BigDecimal getReservedQuantity() { return this.reservedQuantity; } public void setReservedQuantity(BigDecimal reservedQuantity) { this.reservedQuantity = reservedQuantity; } private BigDecimal occupiedQuantity; public BigDecimal getOccupiedQuantity() { return this.occupiedQuantity; } public void setOccupiedQuantity(BigDecimal occupiedQuantity) { this.occupiedQuantity = occupiedQuantity; } private BigDecimal virtualQuantity; public BigDecimal getVirtualQuantity() { return this.virtualQuantity; } public void setVirtualQuantity(BigDecimal virtualQuantity) { this.virtualQuantity = virtualQuantity; } private InventoryItemSourceInfo source; public InventoryItemSourceInfo getSource() { return this.source; } public void setSource(InventoryItemSourceInfo source) { this.source = source; } private Long version; public Long getVersion() { return this.version; } public void setVersion(Long version) { this.version = version; } private InventoryItemId inventoryItemId; public InventoryItemId getInventoryItemId() { return this.inventoryItemId; } public void setInventoryItemId(InventoryItemId inventoryItemId) { this.inventoryItemId = inventoryItemId; } private String createdBy; public String getCreatedBy() { return this.createdBy; } public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } private Date createdAt; public Date getCreatedAt() { return this.createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } private String updatedBy; public String getUpdatedBy() { return this.updatedBy; } public void setUpdatedBy(String updatedBy) { this.updatedBy = updatedBy; } private Date updatedAt; public Date getUpdatedAt() { return this.updatedAt; } public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; } public static class DtoConverter extends AbstractStateDtoConverter { public static Collection<String> collectionFieldNames = Arrays.asList(new String[]{}); @Override protected boolean isCollectionField(String fieldName) { return CollectionUtils.collectionContainsIgnoringCase(collectionFieldNames, fieldName); } public InventoryItemEntryStateDto[] toInventoryItemEntryStateDtoArray(Iterable<InventoryItemEntryState> states) { ArrayList<InventoryItemEntryStateDto> stateDtos = new ArrayList(); for (InventoryItemEntryState s : states) { InventoryItemEntryStateDto dto = toInventoryItemEntryStateDto(s); stateDtos.add(dto); } return stateDtos.toArray(new InventoryItemEntryStateDto[0]); } public InventoryItemEntryStateDto toInventoryItemEntryStateDto(InventoryItemEntryState state) { if(state == null) { return null; } InventoryItemEntryStateDto dto = new InventoryItemEntryStateDto(); if (returnedFieldsContains("EntrySeqId")) { dto.setEntrySeqId(state.getEntrySeqId()); } if (returnedFieldsContains("OnHandQuantity")) { dto.setOnHandQuantity(state.getOnHandQuantity()); } if (returnedFieldsContains("InTransitQuantity")) { dto.setInTransitQuantity(state.getInTransitQuantity()); } if (returnedFieldsContains("ReservedQuantity")) { dto.setReservedQuantity(state.getReservedQuantity()); } if (returnedFieldsContains("OccupiedQuantity")) { dto.setOccupiedQuantity(state.getOccupiedQuantity()); } if (returnedFieldsContains("VirtualQuantity")) { dto.setVirtualQuantity(state.getVirtualQuantity()); } if (returnedFieldsContains("Source")) { dto.setSource(state.getSource()); } if (returnedFieldsContains("Version")) { dto.setVersion(state.getVersion()); } if (returnedFieldsContains("InventoryItemId")) { dto.setInventoryItemId(state.getInventoryItemId()); } if (returnedFieldsContains("CreatedBy")) { dto.setCreatedBy(state.getCreatedBy()); } if (returnedFieldsContains("CreatedAt")) { dto.setCreatedAt(state.getCreatedAt()); } if (returnedFieldsContains("UpdatedBy")) { dto.setUpdatedBy(state.getUpdatedBy()); } if (returnedFieldsContains("UpdatedAt")) { dto.setUpdatedAt(state.getUpdatedAt()); } return dto; } } }
[ "yangjiefeng@gmail.com" ]
yangjiefeng@gmail.com
97c85a376418ee327260d507f7715ceee48d042e
a33a6fb78214b4a05269569daa49bb710faf8f2d
/src/main/java/com/ccq/myblog/MyBlogApplication.java
90b027eb21916d30c24415d2235d2952527a539a
[ "MIT" ]
permissive
minatoyukina/my-blog
30a45f9e628e9e84e5fa75eac9ceabf855039e96
a59b1d41ba2a55fb162acc5501c1ec7ef994e4d3
refs/heads/master
2022-06-21T16:30:45.671151
2020-09-10T06:01:07
2020-09-10T06:01:07
174,797,933
23
7
MIT
2022-06-21T00:58:30
2019-03-10T08:39:38
JavaScript
UTF-8
Java
false
false
321
java
package com.ccq.myblog; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class MyBlogApplication { public static void main(String[] args) { SpringApplication.run(MyBlogApplication.class, args); } }
[ "1096445518@qq.com" ]
1096445518@qq.com
2c63f14df316101dbcbacf2522ce71a842397dcd
37d479cb46de032c55ad35a6bd0f6dadba6ca248
/src/main/java/com/foursstudio/online/newtest/service/util/RandomUtil.java
608af28789d97876f50c7915f83167091a134522
[]
no_license
Aqueelone/jhipster-test-new
6cb57f7bab60f118a1672aa26669676f40221e02
742f5d71a7eb9608f293741188c77ca11676a1c2
refs/heads/master
2021-06-25T18:05:38.921268
2019-12-05T10:55:48
2019-12-05T10:55:48
226,080,579
0
0
null
2021-04-29T21:53:10
2019-12-05T10:55:33
Java
UTF-8
Java
false
false
1,240
java
package com.foursstudio.online.newtest.service.util; import org.apache.commons.lang3.RandomStringUtils; import java.security.SecureRandom; /** * Utility class for generating random Strings. */ public final class RandomUtil { private static final int DEF_COUNT = 20; private static final SecureRandom SECURE_RANDOM; static { SECURE_RANDOM = new SecureRandom(); SECURE_RANDOM.nextBytes(new byte[64]); } private RandomUtil() { } private static String generateRandomAlphanumericString() { return RandomStringUtils.random(DEF_COUNT, 0, 0, true, true, null, SECURE_RANDOM); } /** * Generate a password. * * @return the generated password. */ public static String generatePassword() { return generateRandomAlphanumericString(); } /** * Generate an activation key. * * @return the generated activation key. */ public static String generateActivationKey() { return generateRandomAlphanumericString(); } /** * Generate a reset key. * * @return the generated reset key. */ public static String generateResetKey() { return generateRandomAlphanumericString(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
ba3abddb301573bbffd8a15f5b6a3e1c4008ad94
295f86d9c62fdfbe91e5c904e220e711c32754fd
/1_volley/app/src/main/java/com/example/a1_volley/MainActivity.java
34e42aad933ea812c8563d348c572d4a4210c18f
[]
no_license
HSEhw/Android
c583acde40d1e3d7bb3c1ec44ce9ad7ecaa11020
8d9bdb25ed9ce1f0ae27b4cf5c5a7f8321bc4392
refs/heads/main
2023-02-04T05:21:08.375489
2020-12-21T17:27:12
2020-12-21T17:27:12
311,663,530
0
0
null
null
null
null
UTF-8
Java
false
false
3,135
java
package com.example.a1_volley; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatDialogFragment; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; import androidx.fragment.app.FragmentManager; import android.Manifest; import android.annotation.SuppressLint; import android.app.Dialog; import android.content.pm.PackageManager; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.JsonObjectRequest; import com.android.volley.toolbox.Volley; import org.json.JSONException; import org.json.JSONObject; class MyDialogFragment extends AppCompatDialogFragment {} public class MainActivity extends AppCompatActivity { private static final int REQUEST_PERMISSION_INTERNET = 1; String url = "http://date.jsontest.com"; TextView text; TextView internet_permission; Button button; @SuppressLint("SetTextI18n") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); text = (TextView) findViewById(R.id.text); internet_permission = (TextView) findViewById(R.id.internet_permission); button = (Button) findViewById(R.id.button); permissionCheck(); } @SuppressLint("SetTextI18n") public void onButtonClick(View view) { this.getData(); } private void getData() { RequestQueue queue = Volley.newRequestQueue(this); JsonObjectRequest jsObjRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() { @SuppressLint("SetTextI18n") @Override public void onResponse(JSONObject response) { try { text.setText("date: " + response.getString("date") + "\n" + "time: " + response.getString("time")); } catch (JSONException e) { e.printStackTrace(); } } }, new Response.ErrorListener() { @SuppressLint("SetTextI18n") @Override public void onErrorResponse(VolleyError error) { text.setText("\toops\n\tError:\n" + error); } }); queue.add(jsObjRequest); } @SuppressLint("SetTextI18n") private void permissionCheck() { int permissionStatus = ContextCompat.checkSelfPermission(this, Manifest.permission.INTERNET); if (permissionStatus != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.INTERNET}, REQUEST_PERMISSION_INTERNET); } else { internet_permission.setText("Internet permission: done"); } } }
[ "you@example.com" ]
you@example.com