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
fa8766ca11339f31f5564579fd4ccb40f78cc374
d715d4ffff654a57e8c9dc668f142fb512b40bb5
/workspace/glaf-isdp/src/main/java/com/glaf/isdp/util/TreewbsAutoindexJsonFactory.java
1dfddf67faac5911feb8e1b68460987c52272679
[]
no_license
jior/isdp
c940d9e1477d74e9e0e24096f32ffb1430b841e7
251fe724dcce7464df53479c7a373fa43f6264ca
refs/heads/master
2016-09-06T07:43:11.220255
2014-12-28T09:18:14
2014-12-28T09:18:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,603
java
package com.glaf.isdp.util; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import com.glaf.isdp.domain.TreewbsAutoindex; public class TreewbsAutoindexJsonFactory { public static TreewbsAutoindex jsonToObject(JSONObject jsonObject) { TreewbsAutoindex model = new TreewbsAutoindex(); if (jsonObject.containsKey("id")) { model.setId(jsonObject.getString("id")); } if (jsonObject.containsKey("indexId")) { model.setIndexId(jsonObject.getInteger("indexId")); } if (jsonObject.containsKey("autoindex")) { model.setAutoindex(jsonObject.getInteger("autoindex")); } if (jsonObject.containsKey("inttype")) { model.setInttype(jsonObject.getInteger("inttype")); } if (jsonObject.containsKey("indexRule")) { model.setIndexRule(jsonObject.getInteger("indexRule")); } return model; } public static JSONObject toJsonObject(TreewbsAutoindex model) { JSONObject jsonObject = new JSONObject(); jsonObject.put("id", model.getId()); jsonObject.put("_id_", model.getId()); jsonObject.put("_oid_", model.getId()); jsonObject.put("indexId", model.getIndexId()); jsonObject.put("autoindex", model.getAutoindex()); jsonObject.put("inttype", model.getInttype()); jsonObject.put("indexRule", model.getIndexRule()); return jsonObject; } public static ObjectNode toObjectNode(TreewbsAutoindex model) { ObjectNode jsonObject = new ObjectMapper().createObjectNode(); jsonObject.put("id", model.getId()); jsonObject.put("_id_", model.getId()); jsonObject.put("_oid_", model.getId()); jsonObject.put("indexId", model.getIndexId()); jsonObject.put("autoindex", model.getAutoindex()); jsonObject.put("inttype", model.getInttype()); jsonObject.put("indexRule", model.getIndexRule()); return jsonObject; } public static JSONArray listToArray(java.util.List<TreewbsAutoindex> list) { JSONArray array = new JSONArray(); if (list != null && !list.isEmpty()) { for (TreewbsAutoindex model : list) { JSONObject jsonObject = model.toJsonObject(); array.add(jsonObject); } } return array; } public static java.util.List<TreewbsAutoindex> arrayToList(JSONArray array) { java.util.List<TreewbsAutoindex> list = new java.util.ArrayList<TreewbsAutoindex>(); for (int i = 0; i < array.size(); i++) { JSONObject jsonObject = array.getJSONObject(i); TreewbsAutoindex model = jsonToObject(jsonObject); list.add(model); } return list; } private TreewbsAutoindexJsonFactory() { } }
[ "jior2008@gmail.com" ]
jior2008@gmail.com
4094772ce039f0226f29eb6f9c4e60bbf20f2352
b6d06a5cf828f6bd985fa47b8e0716ec32092300
/nano-orm/nano-orm-jdbc/src/main/java/org/nanoframework/orm/jdbc/DefaultSqlExecutor.java
bed1a5ba058dff60ea172528c35e0ec0b6ebeab1
[ "Apache-2.0" ]
permissive
sanen/nano-framework
7da5d97d67f3fdf87234b44802e0c847a2f6fd71
4af4e90cfdefea4f4a202ee6a227ae89c01ab950
refs/heads/master
2020-04-18T21:48:56.663775
2018-06-19T14:36:48
2018-06-19T14:36:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,542
java
/* * Copyright 2015-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.nanoframework.orm.jdbc; import java.sql.Connection; import java.sql.SQLException; import java.util.List; import org.nanoframework.orm.jdbc.jstl.Result; /** * * @author yanghe * @since 1.2 */ public interface DefaultSqlExecutor { void commit(Connection conn) throws SQLException; void rollback(Connection conn) throws SQLException; Result executeQuery(String sql, Connection conn) throws SQLException; int executeUpdate(String sql, Connection conn) throws SQLException; Result executeQuery(String sql, List<Object> values, Connection conn) throws SQLException; int executeUpdate(String sql, List<Object> values, Connection conn) throws SQLException; int[] executeBatchUpdate(String sql, List<List<Object>> batchValues, Connection conn) throws SQLException; boolean execute(String sql, final Connection conn) throws SQLException; }
[ "comicme_yanghe@icloud.com" ]
comicme_yanghe@icloud.com
504c334397d366151c90fb9ad9a909d7803390fb
0ad0bdb6988d1d287417069a8d22b9d0f04591cc
/src/main/java/com/mz/vectorlink/vectorlink/controller/converter/LocalityConverter.java
b69a7f20a8d20c77193df0ef9fb4e1f919ed0697
[]
no_license
fxavier/vectorlink
033912e872c991083319e5db0dc83ed813d3a422
5ac17179c4a2260d3afa37196403cabd210e4d17
refs/heads/master
2020-03-17T23:25:57.761830
2018-10-01T12:43:02
2018-10-01T12:43:02
134,044,726
0
0
null
null
null
null
UTF-8
Java
false
false
508
java
package com.mz.vectorlink.vectorlink.controller.converter; import org.springframework.core.convert.converter.Converter; import org.springframework.util.StringUtils; import com.mz.vectorlink.vectorlink.model.Locality; public class LocalityConverter implements Converter<String, Locality> { @Override public Locality convert(String codigo) { if(!StringUtils.isEmpty(codigo)) { Locality locality = new Locality(); locality.setId(Long.valueOf(codigo)); return locality; } return null; } }
[ "xavierfrancisco353@gmail.com" ]
xavierfrancisco353@gmail.com
b7b95af7cfbbc75e5ff0a24379b687e675700862
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/com/google/gson/JsonSerializer.java
e7df880f82d1544330126c91a8482b001d92a9d7
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
190
java
package com.google.gson; import java.lang.reflect.Type; public interface JsonSerializer<T> { JsonElement serialize(T t, Type type, JsonSerializationContext jsonSerializationContext); }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
c764898396fabd81ca677a70fdbe74fcb57862b1
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a014/A014733Test.java
42c1b20c39d8ab278d42fb0497f5421731e56a83
[]
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.a014; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A014733Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
ccce1441436aa8943c86d25500fa8d7f16f8d562
97e8970383c75a31a7b35cea202f17809ac9f980
/org/telegram/ui/MediaActivity$9$$Lambda$0.java
ab83374ada2080be9f7eaa7acc9afecae79295bd
[]
no_license
tgapps/android
27116d389c48bd3a55804c86e9a7c2e0cf86a86c
d061b97e4bb0f532cc141ac5021e3329f4214202
refs/heads/master
2018-11-13T20:41:30.297252
2018-09-03T16:09:46
2018-09-03T16:09:46
113,666,719
9
2
null
null
null
null
UTF-8
Java
false
false
649
java
package org.telegram.ui; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import org.telegram.ui.MediaActivity.AnonymousClass9; final /* synthetic */ class MediaActivity$9$$Lambda$0 implements OnClickListener { private final AnonymousClass9 arg$1; private final String arg$2; MediaActivity$9$$Lambda$0(AnonymousClass9 anonymousClass9, String str) { this.arg$1 = anonymousClass9; this.arg$2 = str; } public void onClick(DialogInterface dialogInterface, int i) { this.arg$1.lambda$onLinkLongPress$0$MediaActivity$9(this.arg$2, dialogInterface, i); } }
[ "telegram@daniil.it" ]
telegram@daniil.it
92b433b7373338a51ee025a36bffaeb856fb142f
dbda4749ad2b35bf98d1adeedebab0ab98010e88
/app/src/main/java/com/greattone/greattone/adapter/NewsContentListAdapter1.java
f020952668074c6d77d7227b6b6533887291b8c1
[]
no_license
makaifeng/greattone2
b7d771c50b2466e7718b4194dee952a7a3325170
7eddff6be1007d9264813e920ba46780a9bac59f
refs/heads/master
2020-12-24T10:03:40.334376
2017-04-26T06:29:25
2017-04-26T06:29:25
73,248,461
1
2
null
null
null
null
UTF-8
Java
false
false
2,931
java
package com.greattone.greattone.adapter; import java.util.List; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.greattone.greattone.R; import com.greattone.greattone.entity.News; import com.greattone.greattone.widget.MyGridView; public class NewsContentListAdapter1 extends BaseAdapter { /** * 视频样式 */ private final int PAGER_STYLE_VIDEO = 1; /** * 单图样式 */ private final int PAGER_STYLE_ONE_PICTURE = 2; /** * 多图样式 */ private final int PAGER_STYLE_MORE_PICTURE = 3; /** * 无图样式 */ private final int PAGER_STYLE_NO_PICTURE = 4; private Context context; private String texts[]; private List<News> newsList; private int pager_style[]; public NewsContentListAdapter1(Context context,List<News> newsList) { this.context = context; this.newsList = newsList; this.pager_style = context.getResources().getIntArray( R.array.news_style); texts = context.getResources().getStringArray(R.array.news_subtitle); } @Override public int getCount() { return texts.length; } @Override public Object getItem(int arg0) { return null; } @Override public long getItemId(int arg0) { return 0; } @Override public View getView(int position, View convertView, ViewGroup group) { ViewHolder holder = null; if (convertView == null) { holder = new ViewHolder(); convertView = LayoutInflater.from(context).inflate( R.layout.adapter_news_content1, group, false); holder.name = (TextView) convertView.findViewById(R.id.tv_title);// 名称 holder.more = (TextView) convertView.findViewById(R.id.tv_more);// 更多 holder.gridView = (MyGridView) convertView .findViewById(R.id.gv_content);// 内容 convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.setPosition(position); return convertView; } class ViewHolder { TextView name; TextView more; MyGridView gridView; public void setPosition(int position) { name.setText(texts[position]); NewsContentItemGridAdapter1 adapter=new NewsContentItemGridAdapter1(context, newsList,pager_style[position]); if (pager_style[position] == PAGER_STYLE_VIDEO) {// 视频样式 gridView.setNumColumns(2); } else if (pager_style[position] == PAGER_STYLE_ONE_PICTURE) {// 单图样式 gridView.setNumColumns(1); } else if (pager_style[position] == PAGER_STYLE_MORE_PICTURE) {// 多图样式 gridView.setNumColumns(1); } else if (pager_style[position] == PAGER_STYLE_NO_PICTURE) {// 无图样式 gridView.setNumColumns(1); } else { } gridView.setAdapter(adapter); more.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { } }); } } }
[ "707584319@qq.com" ]
707584319@qq.com
f17e8f3b086277ba172e4025bd25ff2cba787d07
5eefc83017a247ee16a03848f1b62ac3dbf547f0
/src/main/java/com/buit/cis/ims/dao/ImRyzdDao.java
3db8ef5b03029fe034159a796903efbcdfee57b3
[]
no_license
gfz1103/im
6c172a710d32fdbdfabd93483ca9827be222b504
82820be3ecf844968e148da268a9289e66d1e7a6
refs/heads/master
2023-07-03T03:49:23.680903
2021-08-05T01:22:56
2021-08-05T01:22:56
386,587,165
0
1
null
null
null
null
UTF-8
Java
false
false
3,354
java
package com.buit.cis.ims.dao; import com.buit.cis.im.response.ImRyzdMedicalRecord; import com.buit.cis.im.response.ImRyzdModel; import com.buit.cis.ims.model.ImRyzd; import com.buit.cis.ims.request.ImRyzdReq; import com.buit.cis.ims.response.ImRyzdResp; import com.buit.commons.EntityDao; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.util.List; /** * 住院_入院诊断<br> * @author ZHOUHAISHENG */ @Mapper @Repository public interface ImRyzdDao extends EntityDao<ImRyzd,Long> { /** * 根据住院查询入院诊断和诊断名称等 * @Title: getDiagnosisByEntity * @Description: TODO(这里用一句话描述这个方法的作用) * @param @param imRyzdReq * @param @return 设定文件 * @return List<ImRyzdResp> 返回类型 * @author 龚方舟 * @throws */ List<ImRyzdResp> getDiagnosisByEntity(ImRyzdReq imRyzdReq); /** * 根据联合主键删除入院诊断 * @Title: deleteByCompositeKeys * @Description: TODO(这里用一句话描述这个方法的作用) * @param @param zyh * @param @param zdxh * @param @param zdlb 设定文件 * @return void 返回类型 * @author 龚方舟 * @throws */ void deleteByCompositeKeys(@Param("zyh") Integer zyh, @Param("zdxh") Integer zdxh, @Param("zdlb") Integer zdlb); /** * 病人信息诊断更新 * @Title: updateDiagnosis * @Description: TODO(这里用一句话描述这个方法的作用) * @param @param imRyzdReq 设定文件 * @return void 返回类型 * @author 龚方舟 * @throws */ void updateDiagnosis(ImRyzdReq imRyzdReq); /** * @name: queryZdmcByZyh * @description: 根据住院号查询诊断名称 * @param zyh * @return: java.util.List<java.util.Map<java.lang.String,java.lang.Object>> * @date: 2020/8/27 19:40 * @auther: 老花生 * */ List<String> queryZdmcByZyh(@Param("zyh") String zyh); /** * 查询病案首页诊断信息 * @Title: queryZdInfoMedicalRecord * @Description: TODO(这里用一句话描述这个方法的作用) * @param @param zyh * @param @return 设定文件 * @return List<ImRyzdMedicalRecord> 返回类型 * @author 龚方舟 * @throws */ List<ImRyzdMedicalRecord> queryZdInfoMedicalRecord(Integer zyh); /** * 出院证打印获取出院诊断名称 * @Title: getDischargeDiagnosis * @Description: TODO(这里用一句话描述这个方法的作用) * @param @param zyh * @param @return 设定文件 * @return List<ImRyzdResp> 返回类型 * @author 龚方舟 * @throws */ List<ImRyzdResp> getDischargeDiagnosis(Integer zyh); /** * 查询对应类别的所有诊断(包含中医和西医) * * @param zyh 住院号 * @param zdlb 诊断类别 */ List<ImRyzdModel> findList(@Param("zyh") Integer zyh, @Param("zdlb") Integer zdlb); /** * 根据住院号修改入院主诊断 * * @param zyh 住院号 * @param zdxh 诊断序号 */ void updateAdmittingDiagnosis(Integer zyh, Integer zdxh); /** * 查询病人所有诊断 * * @param zyh 住院号 * @param zxlb 中西类别 1:西医 2:中医 * @return */ List<ImRyzdModel> findListByZyhAndZxlb(@Param("zyh") Integer zyh, @Param("zxlb") int zxlb); }
[ "gongfangzhou" ]
gongfangzhou
edb816ef3b6907d7d7990588bc3374ec07b8b7d7
198b020a82e4c75365c6aec9aa4a4cac53e5aaa8
/ads/test/uploadFile/DownloadImage.java
3ce7ff8af9b0583c54cf37bcdd0b56b6d470c383
[]
no_license
kenjs/Java
8cc2a6c4a13bddc12f15d62350f3181acccc48ec
8cb9c7c93bc0cfa57d77cf3805044e5fe18778f2
refs/heads/master
2020-12-14T09:46:07.493930
2015-08-19T08:11:59
2015-08-19T08:11:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,068
java
package uploadFile; public class DownloadImage{ /** * */ // private static final long serialVersionUID = -4808716385349428701L; // private Logger log = LoggerFactory.getLogger(getClass()); // private String downFileName; // private InputStream inputStream; // // @Override // public String exec() { // String filePath = "E:\\apache-tomcat-6.0.37\\file\\5fdf8db1cb13495474d8fcef544e9258d0094a72.jpg"; // String fileName = filePath.substring(filePath.lastIndexOf("\\") + 1); // setDownFileName(fileName); // try { // inputStream = new FileInputStream(new File(filePath)); // } catch (FileNotFoundException e) { // e.printStackTrace(); // } // return SUCCESS; // } // // public InputStream getInputStream(){ // return inputStream; // } // // public void setImgStream(InputStream inputStream) { // this.inputStream = inputStream; // } // // public String getDownFileName() { // return downFileName; // } // // public void setDownFileName(String downFileName) { // this.downFileName = downFileName; // } }
[ "haoyongvv@163.com" ]
haoyongvv@163.com
99644a5e942a12080e1ff3c7f61b54eddbae0a75
a2440dbe95b034784aa940ddc0ee0faae7869e76
/modules/lwjgl/nuklear/src/generated/java/org/lwjgl/nuklear/NkPluginAlloc.java
7165826c33622f708a9cb24fe126afe01f6d6957
[ "LGPL-2.0-or-later", "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
LWJGL/lwjgl3
8972338303520c5880d4a705ddeef60472a3d8e5
67b64ad33bdeece7c09b0f533effffb278c3ecf7
refs/heads/master
2023-08-26T16:21:38.090410
2023-08-26T16:05:52
2023-08-26T16:05:52
7,296,244
4,835
1,004
BSD-3-Clause
2023-09-10T12:03:24
2012-12-23T15:40:04
Java
UTF-8
Java
false
false
2,107
java
/* * Copyright LWJGL. All rights reserved. * License terms: https://www.lwjgl.org/license * MACHINE GENERATED FILE, DO NOT EDIT */ package org.lwjgl.nuklear; import javax.annotation.*; import org.lwjgl.system.*; import static org.lwjgl.system.MemoryUtil.*; /** * <h3>Type</h3> * * <pre><code> * void * (*{@link #invoke}) ( * nk_handle handle, * void *old, * nk_size size * )</code></pre> */ public abstract class NkPluginAlloc extends Callback implements NkPluginAllocI { /** * Creates a {@code NkPluginAlloc} instance from the specified function pointer. * * @return the new {@code NkPluginAlloc} */ public static NkPluginAlloc create(long functionPointer) { NkPluginAllocI instance = Callback.get(functionPointer); return instance instanceof NkPluginAlloc ? (NkPluginAlloc)instance : new Container(functionPointer, instance); } /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ @Nullable public static NkPluginAlloc createSafe(long functionPointer) { return functionPointer == NULL ? null : create(functionPointer); } /** Creates a {@code NkPluginAlloc} instance that delegates to the specified {@code NkPluginAllocI} instance. */ public static NkPluginAlloc create(NkPluginAllocI instance) { return instance instanceof NkPluginAlloc ? (NkPluginAlloc)instance : new Container(instance.address(), instance); } protected NkPluginAlloc() { super(CIF); } NkPluginAlloc(long functionPointer) { super(functionPointer); } private static final class Container extends NkPluginAlloc { private final NkPluginAllocI delegate; Container(long functionPointer, NkPluginAllocI delegate) { super(functionPointer); this.delegate = delegate; } @Override public long invoke(long handle, long old, long size) { return delegate.invoke(handle, old, size); } } }
[ "iotsakp@gmail.com" ]
iotsakp@gmail.com
7a428e5b2ce5b65fa9351387e7215e1da79c9df2
44ce5c342e283ab8fcddbeb0a4dc323546f438a9
/safepay-pay-service/src/main/java/com/safepay/pay/permission/entity/PmsRolePermission.java
b1c22b1bd21fca46aaf3d492b6bc76a911c730fd
[]
no_license
zhilangtaosha/safepay
e378fb7a614d3d14e0b9f6f7afe4d203468a151a
a05d5f79d806352a129bce99f86433b4493b296e
refs/heads/master
2021-07-09T22:12:42.726806
2017-10-11T04:54:31
2017-10-11T04:54:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,433
java
/* * Copyright 2015-2102 RonCoo(http://www.roncoo.com) Group. * * 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.safepay.pay.permission.entity; /** * 权限管理-角色权限关联表.. * * safepay * * @author:shenjialong */ public class PmsRolePermission extends PermissionBaseEntity { private static final long serialVersionUID = -9012707031072904356L; private Long roleId; // 角色ID private Long permissionId;// 权限ID /** * 角色ID * * @return */ public Long getRoleId() { return roleId; } /** * 角色ID * * @return */ public void setRoleId(Long roleId) { this.roleId = roleId; } /** * 权限ID * * @return */ public Long getPermissionId() { return permissionId; } /** * 权限ID * * @return */ public void setPermissionId(Long permissionId) { this.permissionId = permissionId; } public PmsRolePermission() { super(); } }
[ "Desmond@Desmonds-MacBook-Pro.local" ]
Desmond@Desmonds-MacBook-Pro.local
8e982cc7694501ee3dc96d2b199dd74ac1d7159b
e4a96fbd8543afdcc7e666a07bcb9699749ce7c3
/src/main/java/edu/cmu/cs/stage3/alice/authoringtool/viewcontroller/PropertyDnDPanel.java
8579bacb901be852aaacf70f58d20284cd32648c
[ "BSD-2-Clause" ]
permissive
daffodilistic/Alice
b88ef3db801d9165a07b6ff8feaa0c9793019439
2b790b31d12aa3a9fcd7e33cdc514d6f4bb24f17
refs/heads/master
2021-01-17T01:08:46.595972
2013-04-08T10:24:51
2013-04-08T10:24:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,238
java
/* * Copyright (c) 1999-2003, Carnegie Mellon University. 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. Products derived from the software may not be called "Alice", * nor may "Alice" appear in their name, without prior written * permission of Carnegie Mellon University. * * 4. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes software developed by Carnegie Mellon University" */ package edu.cmu.cs.stage3.alice.authoringtool.viewcontroller; /** * @author Jason Pratt */ public class PropertyDnDPanel extends edu.cmu.cs.stage3.alice.authoringtool.util.DnDGroupingPanel implements edu.cmu.cs.stage3.alice.authoringtool.util.GUIElement, edu.cmu.cs.stage3.alice.authoringtool.util.Releasable { protected edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool authoringTool; protected edu.cmu.cs.stage3.alice.core.Property property; protected javax.swing.JLabel nameLabel = new javax.swing.JLabel(); protected java.util.Vector popupStructure = new java.util.Vector(); public PropertyDnDPanel() { setBackground( edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources.getColor( "propertyDnDPanel" ) ); add( nameLabel, java.awt.BorderLayout.CENTER ); addDragSourceComponent( nameLabel ); java.awt.event.MouseListener mouseListener = new edu.cmu.cs.stage3.alice.authoringtool.util.CustomMouseAdapter() { public void popupResponse( java.awt.event.MouseEvent ev ) { PropertyDnDPanel.this.updatePopupStructure(); edu.cmu.cs.stage3.alice.authoringtool.util.PopupMenuUtilities.createAndShowPopupMenu( popupStructure, PropertyDnDPanel.this, ev.getX(), ev.getY() ); } }; addMouseListener( mouseListener ); nameLabel.addMouseListener( mouseListener ); grip.addMouseListener( mouseListener ); } public void set( edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool authoringTool, edu.cmu.cs.stage3.alice.core.Property property ) { this.authoringTool = authoringTool; this.property = property; nameLabel.setText( edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources.getReprForValue( property ) ); String iconName = "types/" + property.getValueClass().getName(); javax.swing.ImageIcon icon = edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources.getIconForValue( iconName ); if( icon == null ) { icon = edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources.getIconForValue( "types/other" ); } if( icon != null ) { // nameLabel.setIcon( icon ); } setTransferable( edu.cmu.cs.stage3.alice.authoringtool.datatransfer.TransferableFactory.createTransferable( property ) ); } public void updatePopupStructure() { popupStructure.clear(); final edu.cmu.cs.stage3.alice.authoringtool.util.WatcherPanel watcherPanel = authoringTool.getWatcherPanel(); if( watcherPanel.isPropertyBeingWatched( property ) ) { popupStructure.add( new edu.cmu.cs.stage3.util.StringObjectPair( "stop watching this property", new Runnable() { public void run() { watcherPanel.removePropertyBeingWatched( PropertyDnDPanel.this.property ); } } ) ); } else { popupStructure.add( new edu.cmu.cs.stage3.util.StringObjectPair( "watch this property", new Runnable() { public void run() { watcherPanel.addPropertyToWatch( PropertyDnDPanel.this.property ); } } ) ); } } public void goToSleep() {} public void wakeUp() {} public void clean() { setTransferable( null ); } public void die() { clean(); } public void release() { edu.cmu.cs.stage3.alice.authoringtool.util.GUIFactory.releaseGUI( this ); } }
[ "zonedabone@gmail.com" ]
zonedabone@gmail.com
2930c81f6eb705b6bcd442b4bf0a681b1b619a72
808b985690efbca4cd4db5b135bb377fe9c65b88
/tbs_core_45016_20191122114850_nolog_fs_obfs/assets/webkit/unZipCode/video_impl_dex.src/com/tencent/tbs/core/partner/suspensionview/ASimpleSuSpensionViewController.java
7821955ef188f198029fa93530d1d1fbd16e136a
[]
no_license
polarrwl/WebviewCoreAnalysis
183e12b76df3920c5afc65255fd30128bb96246b
e21a294bf640578e973b3fac604b56e017a94060
refs/heads/master
2022-03-16T17:34:15.625623
2019-12-17T03:16:51
2019-12-17T03:16:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,171
java
package com.tencent.tbs.core.partner.suspensionview; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.FrameLayout.LayoutParams; import com.tencent.tbs.core.ProxyWebViewObserver; import com.tencent.tbs.core.webkit.tencent.TencentWebViewProxy; import com.tencent.tbs.core.webkit.tencent.TencentWebViewProxy.InnerWebView; import org.chromium.android_webview.AwContentsClient.AwWebResourceRequest; import org.chromium.android_webview.AwScrollOffsetManager; import org.chromium.android_webview.AwWebResourceResponse; public abstract class ASimpleSuSpensionViewController extends ProxyWebViewObserver { public static final boolean ENABLEVIEW = true; public static final String LOGTAG = "SimpleSpensionViewController"; private Context appContext; private int[] boundys = null; String coreVersion = "0"; boolean isExpanded = false; private ViewGroup layout; DraggableLinearLayout mLayout; private FrameLayout.LayoutParams mOuterLayoutParams; private int mVisiablity = 0; private TencentWebViewProxy mWebview; int offsetX = -1; int offsetY = -1; int tbsSize = 40; public ASimpleSuSpensionViewController(TencentWebViewProxy paramTencentWebViewProxy) { super(paramTencentWebViewProxy.getRealWebView()); this.mWebview = paramTencentWebViewProxy; this.appContext = this.mWebview.getContext().getApplicationContext(); this.mWebview.addObserver(this); } private boolean isViewEnabled(Context paramContext) { return true; } public abstract View generateView(Context paramContext); public ViewGroup getContentView() { if (this.layout == null) { DraggableLinearLayout localDraggableLinearLayout = new DraggableLinearLayout(this.appContext, this.boundys); localDraggableLinearLayout.setBackgroundColor(0); localDraggableLinearLayout.addView(generateView(this.appContext)); this.layout = localDraggableLinearLayout; } return this.layout; } public void onContentsSizeChanged(int paramInt1, int paramInt2) {} public void onFirstScreenTime(long paramLong1, long paramLong2) {} public void onOverScrolled(int paramInt1, int paramInt2, boolean paramBoolean1, boolean paramBoolean2) {} public void onPageFinished(String paramString) { if ((this.mWebview != null) && (isViewEnabled(this.appContext)) && (this.layout == null)) { this.boundys = new int[] { this.mWebview.getRealWebView().getWidth(), this.mWebview.getRealWebView().getHeight() }; if ((this.mWebview.getRealWebView().getParent() instanceof FrameLayout)) { int i = SUtiles.dip2px(this.appContext, this.tbsSize); if (this.mOuterLayoutParams == null) { this.mOuterLayoutParams = new FrameLayout.LayoutParams(-2, -2); paramString = this.mOuterLayoutParams; paramString.gravity = 0; int[] arrayOfInt = this.boundys; paramString.setMargins(arrayOfInt[0] - i, arrayOfInt[1] * 9 / 10 - i - 40, 0, 0); } paramString = (DraggableLinearLayout)getContentView(); ((FrameLayout)this.mWebview.getRealWebView().getParent()).addView(paramString, this.mOuterLayoutParams); } } paramString = this.layout; if (paramString != null) { paramString.setVisibility(this.mVisiablity); } } public void onQProxyResponseReceived(String paramString) {} public void onReceivedError(int paramInt, String paramString1, String paramString2) {} public void onReceivedHttpError(AwContentsClient.AwWebResourceRequest paramAwWebResourceRequest, AwWebResourceResponse paramAwWebResourceResponse) {} public void onScrollChanged(int paramInt1, int paramInt2, int paramInt3, int paramInt4) {} public void onUpdateScrollState(AwScrollOffsetManager paramAwScrollOffsetManager, int paramInt1, int paramInt2) {} public void onWebViewDestroyed() { this.mWebview = null; this.layout = null; } public void onWindowVisibilityChanged(int paramInt) {} public void reset() { if (this.mOuterLayoutParams != null) { ViewGroup localViewGroup = this.layout; if (localViewGroup != null) { ((DraggableLinearLayout)localViewGroup).reset(); this.layout.setLayoutParams(this.mOuterLayoutParams); } } } public void setBoundys(int[] paramArrayOfInt) { this.boundys = paramArrayOfInt; ViewGroup localViewGroup = this.layout; if (localViewGroup != null) { ((DraggableLinearLayout)localViewGroup).setBoundys(paramArrayOfInt); } } public void setOuterLayoutParams(FrameLayout.LayoutParams paramLayoutParams) { if (paramLayoutParams != null) { this.mOuterLayoutParams = paramLayoutParams; } } public void setVisibility(int paramInt) { this.mVisiablity = paramInt; } } /* Location: C:\Users\Administrator\Desktop\学习资料\dex2jar\dex2jar-2.0\classes-dex2jar.jar!\com\tencent\tbs\core\partner\suspensionview\ASimpleSuSpensionViewController.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1542951820@qq.com" ]
1542951820@qq.com
a3f8e16704bb473bad166a4bb88777146a7a92c7
6d9d90789f91d4010c30344409aad49fa99099e3
/lucene-core/src/main/java/org/apache/lucene/util/IntsRef.java
65c7b7ebbf97ccbd7d471b92e6c33a247522b4b9
[ "Apache-2.0" ]
permissive
bighaidao/lucene
8c2340f399c60742720e323a0b0c0a70b2651147
bd5d75e31526b599296c3721bc2081a3bde3e251
refs/heads/master
2021-08-07T07:01:42.438869
2012-08-22T09:16:08
2012-08-22T09:16:08
8,878,381
1
2
Apache-2.0
2021-08-02T17:05:32
2013-03-19T12:48:16
Java
UTF-8
Java
false
false
4,306
java
package org.apache.lucene.util; /** * 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. */ /** Represents int[], as a slice (offset + length) into an * existing int[]. * * @lucene.internal */ public final class IntsRef implements Comparable<IntsRef>, Cloneable { public static final int[] EMPTY_INTS = new int[0]; public int[] ints; public int offset; public int length; public IntsRef() { ints = EMPTY_INTS; } public IntsRef(int capacity) { ints = new int[capacity]; } public IntsRef(int[] ints, int offset, int length) { assert ints != null; assert offset >= 0; assert length >= 0; assert ints.length >= offset + length; this.ints = ints; this.offset = offset; this.length = length; } @Override public IntsRef clone() { return new IntsRef(ints, offset, length); } @Override public int hashCode() { final int prime = 31; int result = 0; final int end = offset + length; for(int i = offset; i < end; i++) { result = prime * result + ints[i]; } return result; } @Override public boolean equals(Object other) { if (other == null) { return false; } if (other instanceof IntsRef) { return this.intsEquals((IntsRef) other); } return false; } public boolean intsEquals(IntsRef other) { if (length == other.length) { int otherUpto = other.offset; final int[] otherInts = other.ints; final int end = offset + length; for(int upto=offset;upto<end;upto++,otherUpto++) { if (ints[upto] != otherInts[otherUpto]) { return false; } } return true; } else { return false; } } /** Signed int order comparison */ public int compareTo(IntsRef other) { if (this == other) return 0; final int[] aInts = this.ints; int aUpto = this.offset; final int[] bInts = other.ints; int bUpto = other.offset; final int aStop = aUpto + Math.min(this.length, other.length); while(aUpto < aStop) { int aInt = aInts[aUpto++]; int bInt = bInts[bUpto++]; if (aInt > bInt) { return 1; } else if (aInt < bInt) { return -1; } } // One is a prefix of the other, or, they are equal: return this.length - other.length; } public void copyInts(IntsRef other) { if (ints.length - offset < other.length) { ints = new int[other.length]; offset = 0; } System.arraycopy(other.ints, other.offset, ints, offset, other.length); length = other.length; } /** * Used to grow the reference array. * * In general this should not be used as it does not take the offset into account. * @lucene.internal */ public void grow(int newLength) { assert offset == 0; if (ints.length < newLength) { ints = ArrayUtil.grow(ints, newLength); } } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append('['); final int end = offset + length; for(int i=offset;i<end;i++) { if (i > offset) { sb.append(' '); } sb.append(Integer.toHexString(ints[i])); } sb.append(']'); return sb.toString(); } /** * Creates a new IntsRef that points to a copy of the ints from * <code>other</code> * <p> * The returned IntsRef will have a length of other.length * and an offset of zero. */ public static IntsRef deepCopyOf(IntsRef other) { IntsRef clone = new IntsRef(); clone.copyInts(other); return clone; } }
[ "joergprante@gmail.com" ]
joergprante@gmail.com
4e17cead7d388a147307da443ba47c63d77c94a2
ce6722230fc0fb17fd1e9b651d1e50fb398ae3c3
/h2/src/main/org/h2/result/SearchRow.java
baf7c28c801705cd8b16ab50dae8be8dd984d1d6
[]
no_license
jack870601/107-SE-HW1
879dc1a7779a888ede38a76cee96e1502b38dd30
fbc945246230250ce18d671552a1bbc90f1b33f7
refs/heads/master
2020-04-09T07:25:33.678377
2018-12-05T04:00:09
2018-12-05T04:00:09
160,155,030
6
0
null
null
null
null
UTF-8
Java
false
false
1,533
java
/* * Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0, * and the EPL 1.0 (http://h2database.com/html/license.html). * Initial Developer: H2 Group */ package org.h2.result; import org.h2.value.Value; /** * The interface for rows stored in a table, and for partial rows stored in the * index. */ public interface SearchRow { /** * An empty array of SearchRow objects. */ SearchRow[] EMPTY_ARRAY = {}; /** * Get the column count. * * @return the column count */ int getColumnCount(); /** * Get the value for the column * * @param index the column number (starting with 0) * @return the value */ Value getValue(int index); /** * Set the value for given column * * @param index the column number (starting with 0) * @param v the new value */ void setValue(int index, Value v); /** * Set the position and version to match another row. * * @param old the other row. */ void setKeyAndVersion(SearchRow old); /** * Get the version of the row. * * @return the version */ int getVersion(); /** * Set the unique key of the row. * * @param key the key */ void setKey(long key); /** * Get the unique key of the row. * * @return the key */ long getKey(); /** * Get the estimated memory used for this row, in bytes. * * @return the memory */ int getMemory(); }
[ "jack870601@gmail.com" ]
jack870601@gmail.com
7352a02cc2b1c2ed344ffa3ab8499106b1bbf10e
b02bdd9811b958fb52554ee906ecc3f99b0da4bb
/app/src/main/java/com/jxkj/fit_5a/conpoment/view/PileAvertView.java
c3f090c6c8e45acaa34ad5bcea41cdc9bec88672
[]
no_license
ltg263/5AFit_12
19d29773b9f0152dbc88ccf186b2868af7648039
a7d545ab37a456b42f30eb03d6a6c95efb5b0541
refs/heads/master
2023-07-15T20:46:19.465180
2021-08-17T09:59:57
2021-08-17T09:59:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,877
java
package com.jxkj.fit_5a.conpoment.view; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; import com.bumptech.glide.Glide; import com.jxkj.fit_5a.R; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; public class PileAvertView extends LinearLayout { @BindView(R.id.pile_view) PileView pileView; private Context context = null; public static final int VISIBLE_COUNT = 4;//默认显示个数 public PileAvertView(Context context) { this(context, null); this.context = context; } public PileAvertView(Context context, AttributeSet attrs) { super(context, attrs); this.context = context; initView(); } private void initView() { View view = LayoutInflater.from(context).inflate(R.layout.layout_group_pile_avert, this); ButterKnife.bind(view); } public void setAvertImages(List<String> imageList) { setAvertImages(imageList,VISIBLE_COUNT); } //如果imageList>visiableCount,显示List最上面的几个 public void setAvertImages(List<String> imageList, int visibleCount) { List<String> visibleList = null; if (imageList.size() > visibleCount) { visibleList = imageList.subList(imageList.size() - 1 - visibleCount, imageList.size() - 1); } pileView.removeAllViews(); for (int i = 0; i < imageList.size(); i++) { RoundImageView image= (RoundImageView) LayoutInflater.from(context).inflate(R.layout.item_group_round_avert, pileView, false); Glide.with(context).load(imageList.get(i)).into(image); Log.w("-->>:","img:"+imageList.get(i)); pileView.addView(image); } } }
[ "qzj842179561@gmail.com" ]
qzj842179561@gmail.com
77f6f8ac415d4c30973827fc27e8cbf536f4e414
c5efefe8d152e848e44ece38c0539d08e9968bba
/player/src/main/java/de/jowisoftware/rpgsoundscape/player/audio/frontend/ffmpeg/api/RuntimeHelper.java
50b169c62d11defade05862cd0ceec488fd336f4
[ "BSD-3-Clause" ]
permissive
jochenwierum/rpg-soundscape
80815a9dbdb426a65fb5efb06185e71be5cb6e33
418e6ff2777581a5789b7a8d65d0f9f360b4e432
refs/heads/master
2023-06-03T01:12:55.407601
2021-06-15T09:33:05
2021-06-15T09:33:05
377,109,179
1
0
null
null
null
null
UTF-8
Java
false
false
1,430
java
package de.jowisoftware.rpgsoundscape.player.audio.frontend.ffmpeg.api; // Generated by jextract import jdk.incubator.foreign.CLinker; import jdk.incubator.foreign.FunctionDescriptor; import jdk.incubator.foreign.LibraryLookup; import jdk.incubator.foreign.MemorySegment; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodType; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; final class RuntimeHelper { private RuntimeHelper() { } private static final Map<String, LibraryLookup> LIBRARIES = new ConcurrentHashMap<>(); private static final CLinker LINKER = CLinker.getInstance(); private static final ClassLoader LOADER = RuntimeHelper.class.getClassLoader(); static MethodHandle downcallHandle(String libName, String name, String desc, FunctionDescriptor fdesc) { return LIBRARIES .computeIfAbsent(libName, LibraryLookup::ofLibrary) .lookup(name) .map(addr -> { MethodType mt = MethodType.fromMethodDescriptorString(desc, LOADER); return LINKER.downcallHandle(addr, mt, fdesc); }) .orElseThrow(() -> new UnsatisfiedLinkError(name)); } static MemorySegment nonCloseableNonTransferableSegment(MemorySegment seg) { return seg.withAccessModes(seg.accessModes() & ~MemorySegment.CLOSE & ~MemorySegment.HANDOFF); } }
[ "jochen@jowisoftware.de" ]
jochen@jowisoftware.de
21bd2f09d8d54b739c68988ab4354e647ac0f0a4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/27/27_4274fc1f03e3c64c900d7a3bc510b7cc804c9b66/RTClientImpl/27_4274fc1f03e3c64c900d7a3bc510b7cc804c9b66_RTClientImpl_t.java
e0eb5645ccba3bfaa41a73685765b6b55fc0d8f8
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,986
java
package li.rudin.rt.core.client; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import li.rudin.rt.api.RTClient; import li.rudin.rt.api.annotations.ChangeId; import li.rudin.rt.api.filter.RTFilter; import li.rudin.rt.api.listener.RTListener; import li.rudin.rt.core.container.ObjectContainer; import li.rudin.rt.core.filter.NoOpFilter; import li.rudin.rt.core.handler.RTHandlerImpl; import li.rudin.rt.core.queue.list.NodeTracker; public class RTClientImpl implements RTClient { public RTClientImpl(RTHandlerImpl rt, String clientId) { this.clientId = clientId; tracker = new NodeTracker<>(rt.getEventList()); } private final String clientId; /** * Local sent events */ private final List<ObjectContainer> localEvents = new LinkedList<>(); private final ReadWriteLock localEventLock = new ReentrantReadWriteLock(); private final NodeTracker<ObjectContainer> tracker; private long count = 0; /** * Waits for changes * @param delay */ public void waitForChange(long delay) { synchronized(this) { try { this.wait(delay); } catch (Exception e) {} } } private boolean closed = false; /** * Invoked on RTHandlerImpl upon client close */ public void onClose() { closed = true; } public boolean available() { if (tracker.available()) return true; boolean available; localEventLock.readLock().lock(); available = !localEvents.isEmpty(); localEventLock.readLock().unlock(); return available; } public List<ObjectContainer> copyAndClear() { return copyAndClear(new NoOpFilter()); } public List<ObjectContainer> copyAndClear(RTFilter filter) { //Copy events and clear queue local List<ObjectContainer> ret = new ArrayList<>(); for (ObjectContainer o: tracker.track()) if (filter.accept(o.getType(), o.getData())) ret.add(o); localEventLock.writeLock().lock(); for (ObjectContainer o: localEvents) if (filter.accept(o.getType(), o.getData())) ret.add(o); localEvents.clear(); localEventLock.writeLock().unlock(); return ret; } @Override public void send(String type, Object o) { if (closed) throw new IllegalArgumentException("client closed"); localEventLock.writeLock().lock(); localEvents.add(new ObjectContainer(type, o)); localEventLock.writeLock().unlock(); count++; synchronized(this) { //TODO: defer this.notifyAll(); } } @Override public void send(Object o) { if (o == null) throw new IllegalArgumentException("null payload"); ChangeId changeId = o.getClass().getAnnotation(ChangeId.class); if (changeId == null) throw new IllegalArgumentException("Payload of type: " + o.getClass() + " is not annotated with @ChangeId"); send(changeId.value(), o); } @Override public long getCount() { return count; } @Override public String getId() { return clientId; } @Override public boolean isActive() { return !closed; } /** * Returns the current queue in the session * @param req * @return */ public static RTClientImpl getOrCreate(RTHandlerImpl handler, int clientId) { RTClientImpl queue = handler.get(clientId); if (queue == null) { queue = new RTClientImpl(handler, "" + clientId); handler.register(clientId, queue); //Fire listeners for (RTListener l: handler.getListeners()) //Check if weak listener is gc'ed if (l != null) l.onConnect(queue, handler); } return queue; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e4f1172d1653d9caf74bcb0012f178b78096c807
24586fb3d59de7174f53477ac31634e0535682a3
/app/src/main/java/com/jyx/android/model/param/GetWXPrayPayIdParam.java
436677334be9a78fbd221ef1495ff217fdf6b2e2
[]
no_license
www586089/Borrow
d937d0a2002058ed48a2c85c4c9bb88d1dd0cc61
158ff81150091ddb1159e0db670fadd46614d420
refs/heads/master
2021-08-14T15:31:25.234957
2017-11-16T04:28:30
2017-11-16T04:28:30
110,715,177
0
0
null
null
null
null
UTF-8
Java
false
false
868
java
package com.jyx.android.model.param; /** * Author : zfang * Date : 2016-02-28 */ public class GetWXPrayPayIdParam { private String function = null; private String userid = null; private String orderid = null; private String ordertype = null; public String getFunction() { return function; } public void setFunction(String function) { this.function = function; } public String getUserid() { return userid; } public void setUserid(String userid) { this.userid = userid; } public String getOrderid() { return orderid; } public void setOrderid(String orderid) { this.orderid = orderid; } public String getOrdertype() { return ordertype; } public void setOrdertype(String ordertype) { this.ordertype = ordertype; } }
[ "414929680@qq.com" ]
414929680@qq.com
e7e7c8243906c0b17d2af9ff03f4aae2b3eb89de
37646551080d7538481f1e1d1a88af152b8127d8
/main/src/com/company/MatameCamion.java
54514d9abf7c37690fb602a63f610646d0e072dc
[]
no_license
gerardfp/problems
08430b95b845f334bff690b7ca804816bf96e9fd
922cd930a768b7dcde5dfb670afe2da8b21a00ea
refs/heads/master
2022-01-31T14:00:36.999382
2019-07-18T15:04:12
2019-07-18T15:04:12
197,878,503
0
0
null
null
null
null
UTF-8
Java
false
false
2,159
java
package com.company; public class MatameCamion { static double[][] G; public static void main(String[] args) { // G = new double[6][6]; // G[0][1] = 30; // G[0][2] = 40; // G[1][3] = 30; // G[1][4] = 40; // G[2][1] = 40; // G[2][3] = 40; // G[2][4] = 30; // G[3][5] = 30; // G[4][3] = 40; // G[4][5] = 40; G = new double[10][10]; G[0][1] = 10; G[0][2] = 40; G[1][3] = 10; G[2][5] = 40; G[3][2] = 10; G[3][4] = 40; G[3][5] = 10; G[4][1] = 10; G[4][6] = 10; G[4][7] = 40; G[5][8] = 40; G[6][3] = 40; G[6][7] = 10; G[6][9] = 10; G[7][9] = 40; G[8][6] = 40; G[8][9] = 10; dijkstra(G); } static int maximum(boolean[] used, double[] carga){ double max = Double.NEGATIVE_INFINITY; int ind = -1; for (int i = 0; i < carga.length; i++) { if(!used[i] && carga[i] > max){ max = carga[i]; ind = i; } } return ind; } static void dijkstra(double[][] G){ boolean[] used = new boolean[G.length]; double[] carga = new double[G.length]; int[] path = new int[G.length]; for (int i = 0; i < carga.length; i++) { carga[i] = Double.NEGATIVE_INFINITY; } carga[0] = Double.POSITIVE_INFINITY; for (int i = 0; i < G.length; i++) { int max = maximum(used, carga); if(max == -1) break; used[max] = true; for (int j = 0; j < G.length; j++) { if(!used[j] && G[max][j] != 0 && carga[max] > carga[j]){ carga[j] = Math.min(carga[max], G[max][j]); path[j] = max; } } } printPath(path); System.out.println(carga[G.length-1]); } static void printPath(int[] path){ int e = path[path.length-1]; while(e != 0){ System.out.println(e); e=path[e]; } } }
[ "gerardfp@gmail.com" ]
gerardfp@gmail.com
05e98da48aa82c243fca5119ced982413ec4c11f
3f02373349de993acc9168d40256a63ddd52fec7
/src/com/wpx/demo05/demo03.java
628af06e7c2f26bb2706630cb0667a27f1c81980
[]
no_license
apple006/javacore-1
982ad02761364591f3b4b975304f0ced3f77f9a5
0036e360f42d033c7f638eb565dd31f65519302b
refs/heads/master
2020-03-08T21:40:41.572764
2018-03-31T05:50:22
2018-03-31T05:50:22
null
0
0
null
null
null
null
GB18030
Java
false
false
794
java
package com.wpx.demo05; /** * 匿名对象:没有引用类型变量指向的对象称作为匿名对象。 * 匿名对象要注意的事项: 1. 我们一般不会给匿名对象赋予属性值,因为永远无法获取到。 2. 两个匿名对象永远都不可能是同一个对象。 匿名对象好处:简化书写。 匿名对象的应用场景: 1. 如果一个对象需要调用一个方法一次的时候,而调用完这个方法之后,该对象就不再使用了,这时候可以使用 匿名对象。 2. 可以作为实参调用一个函数。 * @author wangpx */ class Student3{ public void study() { System.out.println("What? How? "); } } public class demo03 { public static void main(String[] args) { new Student3().study(); } }
[ "1256317570@qq.com" ]
1256317570@qq.com
71d9c30913e646ba0df2555d14b8c5b4753971d4
c62b2129ff957419f81e4bd189a497c9ec636b29
/app/src/main/java/com/RSPL/MEDIA/CargillsBank.java
233d48f65cfdd94ab73e0c9a9f0bade9bccfcb72
[]
no_license
rcb4u/PROD99RetailMediaApp
dcbb677aa2a097e0b3212113740960d974745425
5f93c669974e5984d4641eb1d4883f59c39303dd
refs/heads/master
2020-03-26T08:23:30.873545
2018-09-06T06:53:33
2018-09-06T06:53:33
144,699,468
0
0
null
null
null
null
UTF-8
Java
false
false
7,406
java
package com.RSPL.MEDIA; /** * Created by rspl-richa on 10/05/2018. */ import android.app.Fragment; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.Spinner; import android.widget.Toast; import java.text.SimpleDateFormat; import java.util.Calendar; public class CargillsBank extends Fragment { DBhelper db; String Str_store_media_id; public Button Submit, Cancel; public EditText name, mobileno, companyname; Spinner monthlysalary; String cargilusername, cargilmobilename, cargilcompanyname, cargilmonthlysalary; private String touchOn = null; private static final String videoMailFlag = "0"; private String AdPlayUniqueId = null; private SimpleDateFormat simpleDateFormat = null; public static String currentvideoname = null; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View rootView = inflater.inflate(R.layout.activity_cargills_bank, container, false); String[] values = {"15,000 - 35,000", "35,000 - 60,000", "60,000 -1,00,000", "1,00,000 & above "}; monthlysalary = (Spinner) rootView.findViewById(R.id.monthlysalary); ArrayAdapter<String> LTRadapter = new ArrayAdapter<String>(this.getActivity(), android.R.layout.simple_spinner_item, values); LTRadapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line); // monthlysalary.setPrompt("Select Monthly salary"); monthlysalary.setAdapter(LTRadapter); // return inflater.inflate(R.layout.activity_cargills_bank, container, false); db = new DBhelper(getActivity()); Cancel = (Button) rootView.findViewById(R.id.cancel); Submit = (Button) rootView.findViewById(R.id.submit); name = (EditText) rootView.findViewById(R.id.name); mobileno = (EditText) rootView.findViewById(R.id.mobileno); companyname = (EditText) rootView.findViewById(R.id.companyname); Calendar calendar = Calendar.getInstance(); simpleDateFormat = new SimpleDateFormat("yyyyMMDDHHmmssmm"); AdPlayUniqueId = simpleDateFormat.format(calendar.getTimeInMillis()); Log.e("@@@@@@@@AD_PlayID:", "--------->" + AdPlayUniqueId); try { MediaStorePojo mStoreId = db.getStoreDetails(); Str_store_media_id = mStoreId.getMediaid(); currentvideoname = MediaMainScreen.b.getString("Current_name"); touchOn = currentvideoname.toString().trim(); Log.d("current Video", touchOn); Submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mobileno.getText().toString().equals("")) { mobileno.setError("Please Fill Mobile Number"); Animation shake = AnimationUtils.loadAnimation(getActivity(), R.anim.alert_animation); mobileno.startAnimation(shake); return; } if (name.getText().toString().equals("")) { name.setError("Please Fill Name"); Animation shake = AnimationUtils.loadAnimation(getActivity(), R.anim.alert_animation); name.startAnimation(shake); return; } if (companyname.getText().toString().equals("")) { companyname.setError("Please Fill Company Name"); Animation shake = AnimationUtils.loadAnimation(getActivity(), R.anim.alert_animation); companyname.startAnimation(shake); return; } if (mobileno.length() < 9 || mobileno.length() > 10) { mobileno.setError("Please Fill Valid Mobile Number"); Animation shake = AnimationUtils.loadAnimation(getActivity(), R.anim.alert_animation); mobileno.startAnimation(shake); return; } cargilusername = name.getText().toString(); if (!cargilusername.matches("[a-zA-Z ']+")) { name.setError("Please Fill Valid Name"); Animation shake = AnimationUtils.loadAnimation(getActivity(), R.anim.alert_animation); name.startAnimation(shake); return; } cargilmobilename = mobileno.getText().toString(); if (db.CheckIsDataAlreadyInDBorNotinCargill(cargilmobilename, touchOn) == true) { mobileno.setError("Your Number is Already registered with us"); Animation shake = AnimationUtils.loadAnimation(getActivity(), R.anim.alert_animation); mobileno.startAnimation(shake); return; } else { DBhelper dBhelper = new DBhelper(getActivity().getApplicationContext()); cargilmobilename = mobileno.getText().toString(); cargilusername = name.getText().toString(); cargilcompanyname = companyname.getText().toString(); cargilmonthlysalary = monthlysalary.getSelectedItem().toString(); dBhelper.insertCargilbankcustomer(AdPlayUniqueId, Str_store_media_id, cargilmobilename, cargilusername, touchOn, videoMailFlag, cargilcompanyname, cargilmonthlysalary); Toast.makeText(getActivity().getApplicationContext(), "Thanks for showing interest", Toast.LENGTH_SHORT).show(); closefragment(); } } }); Cancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { closefragment(); } }); } catch (Exception e) { e.printStackTrace(); } return rootView; } private void closefragment() { getActivity().getFragmentManager().beginTransaction().remove(this).commit(); } @Override public void onStart() { super.onStart(); Log.d("****", "Onstart"); } @Override public void onResume() { super.onResume(); Log.d("****", "OnResume"); } @Override public void onPause() { super.onPause(); Log.d("****", "OnPause"); } @Override public void onStop() { super.onStop(); Log.d("****", "OnStop"); } @Override public void onDestroyView() { super.onDestroyView(); closefragment(); Log.d("****", "OnDestroyView"); } @Override public void onDestroy() { super.onDestroy(); Log.d("****", "OnDestroy"); } }
[ "chaudharirahul518@gmail.com" ]
chaudharirahul518@gmail.com
02e325b3f3e9f2df55e1335aaff5b83065b305df
22889d87384ab446202a998513397174ea2cadea
/events/impl/src/main/java/org/kuali/mobility/events/entity/UMEvent.java
4bfd16f7dc16936e8c989983cb715971aaffbbb2
[ "MIT" ]
permissive
tamerman/mobile-starting-framework
114dfe0efc45c010e844ba8d0d5f3a283947c6cb
11c70d7ff5ac36c7ad600df2f93b184a0ca79b43
refs/heads/master
2016-09-11T15:09:39.554255
2016-03-11T16:57:14
2016-03-11T16:57:14
22,442,542
1
3
null
2016-03-11T16:57:14
2014-07-30T19:59:01
Java
UTF-8
Java
false
false
5,557
java
/** * The MIT License * Copyright (c) 2011 Kuali Mobility Team * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package org.kuali.mobility.events.entity; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamImplicit; import com.thoughtworks.xstream.annotations.XStreamOmitField; @XStreamAlias("event") public class UMEvent implements Serializable { private static final long serialVersionUID = -7064576922502928297L; private String id; private String title; private String subtitle; private String description; private String type; private String typeId; private String guid; private String occurenceNotes; private String timeBegin; private String timeEnd; private String dateBegin; private String dateEnd; private String lastModified; private String permanentUrl; private String buildingId; private String buildingName; private String room; private String url; private String tsBegin; private String tsEnd; @XStreamOmitField private List<String> tags; @XStreamAlias("sponsors") @XStreamImplicit private List<UMSponsor> sponsors; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getSubtitle() { return subtitle; } public void setSubtitle(String subtitle) { this.subtitle = subtitle; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getTypeId() { return typeId; } public void setTypeId(String typeId) { this.typeId = typeId; } public String getGuid() { return guid; } public void setGuid(String guid) { this.guid = guid; } public String getOccurenceNotes() { return occurenceNotes; } public void setOccurenceNotes(String occurenceNotes) { this.occurenceNotes = occurenceNotes; } public String getTimeBegin() { return timeBegin; } public void setTimeBegin(String timeBegin) { this.timeBegin = timeBegin; } public String getTimeEnd() { return timeEnd; } public void setTimeEnd(String timeEnd) { this.timeEnd = timeEnd; } public String getDateBegin() { return dateBegin; } public void setDateBegin(String dateBegin) { this.dateBegin = dateBegin; } public String getDateEnd() { return dateEnd; } public void setDateEnd(String dateEnd) { this.dateEnd = dateEnd; } public String getLastModified() { return lastModified; } public void setLastModified(String lastModified) { this.lastModified = lastModified; } public String getPermanentUrl() { return permanentUrl; } public void setPermanentUrl(String permanentUrl) { this.permanentUrl = permanentUrl; } public String getBuildingId() { return buildingId; } public void setBuildingId(String buildingId) { this.buildingId = buildingId; } public String getBuildingName() { return buildingName; } public void setBuildingName(String buildingName) { this.buildingName = buildingName; } public String getRoom() { return room; } public void setRoom(String room) { this.room = room; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public List<String> getTags() { return tags; } public void addTag(String aTag) { if (tags == null) { tags = new ArrayList<String>(); } tags.add(aTag); } public void setTags(List<String> tags) { this.tags = tags; } public List<UMSponsor> getSponsors() { return sponsors; } public void setSponsors(List<UMSponsor> sponsors) { this.sponsors = sponsors; } public void addSponsor(UMSponsor aSponsor) { if (sponsors == null) { sponsors = new ArrayList<UMSponsor>(); } sponsors.add(aSponsor); } @Override public boolean equals(Object arg0) { boolean isEqual = super.equals(arg0); if (arg0 instanceof UMEvent) { if (this.getId() != null && this.getId().equals(((UMEvent) arg0).getId())) isEqual = true; } return isEqual; } public String getTsBegin() { return tsBegin; } public void setTsBegin(String tsBegin) { this.tsBegin = tsBegin; } public String getTsEnd() { return tsEnd; } public void setTsEnd(String tsEnd) { this.tsEnd = tsEnd; } }
[ "charl.thiem@gmail.com" ]
charl.thiem@gmail.com
eeb4b02271aed685a683c40b21dd7f345fb8e87c
7360784e149ba754518b4dce1ff78f4ddbea6650
/com/samsung/android/server/wifi/wlansniffer/WlanSnifferController.java
4274a5856e5dd2484c913fa05b5dbf87b18017ea
[]
no_license
headuck/SM-N9750-TGY-1
c4cc11759649c9d0aa0b222c239ba4ab7497e320
72a22e5b13d2d2d93267f4d28c76c5758adfdd83
refs/heads/main
2022-12-25T03:27:33.194017
2020-10-15T23:41:56
2020-10-15T23:41:56
304,472,478
1
0
null
null
null
null
UTF-8
Java
false
false
3,338
java
package com.samsung.android.server.wifi.wlansniffer; import android.content.Context; import android.os.Debug; import android.util.Log; public class WlanSnifferController { private static final boolean DBG = Debug.semIsProductDev(); private static final String TAG = "WlanSnifferController"; private final int CMDTYPE_MON_LOAD_FW = 37; private final int CMDTYPE_MON_START_160 = 33; private final int CMDTYPE_MON_START_20 = 30; private final int CMDTYPE_MON_START_40 = 31; private final int CMDTYPE_MON_START_80 = 32; private final int CMDTYPE_MON_STATUS = 35; private final int CMDTYPE_MON_STOP = 36; private final int CMDTYPE_MON_TCPDUMP = 38; private Context mContext; private WlanDutServiceCaller mWlanDutServiceCaller; public WlanSnifferController(Context context) { this.mContext = context; this.mWlanDutServiceCaller = new WlanDutServiceCaller(); } public String semLoadMonitorModeFirmware(boolean enable) { if (DBG) { Log.d(TAG, "semLoadMonitorModeFirmware : enable = " + enable); } if (enable) { return this.mWlanDutServiceCaller.semWlanDutServiceCommand(37, "1"); } return this.mWlanDutServiceCaller.semWlanDutServiceCommand(37, "2"); } public String semCheckMonitorMode() { if (DBG) { Log.d(TAG, "semCheckMonitorMode"); } return this.mWlanDutServiceCaller.semWlanDutServiceCommand(35, ""); } public String semStartMonitorMode(int ch, int bw) { if (DBG) { Log.d(TAG, "semStartMonitorMode : ch = " + ch + " : bw = " + bw); } if (bw == 20) { WlanDutServiceCaller wlanDutServiceCaller = this.mWlanDutServiceCaller; return wlanDutServiceCaller.semWlanDutServiceCommand(30, "" + ch); } else if (bw == 40) { WlanDutServiceCaller wlanDutServiceCaller2 = this.mWlanDutServiceCaller; return wlanDutServiceCaller2.semWlanDutServiceCommand(31, "" + ch); } else if (bw == 80) { WlanDutServiceCaller wlanDutServiceCaller3 = this.mWlanDutServiceCaller; return wlanDutServiceCaller3.semWlanDutServiceCommand(32, "" + ch); } else if (bw != 160) { return "NG"; } else { WlanDutServiceCaller wlanDutServiceCaller4 = this.mWlanDutServiceCaller; return wlanDutServiceCaller4.semWlanDutServiceCommand(33, "" + ch); } } public String semStartAirlogs(boolean enable, boolean compressiveMode) { if (DBG) { Log.d(TAG, "semStartAirlogs : enable = " + enable + " : compressiveMode = " + compressiveMode); } if (!enable) { return this.mWlanDutServiceCaller.semWlanDutServiceCommand(38, "2"); } if (compressiveMode) { return this.mWlanDutServiceCaller.semWlanDutServiceCommand(38, "3"); } return this.mWlanDutServiceCaller.semWlanDutServiceCommand(38, "1"); } public String semStopMonitorMode() { if (DBG) { Log.d(TAG, "semStopMonitorMode"); } if (this.mWlanDutServiceCaller.semWlanDutServiceCommand(36, "").equals("OK")) { return this.mWlanDutServiceCaller.stopWlanDutService(); } return "NG"; } }
[ "headuck@users.noreply.github.com" ]
headuck@users.noreply.github.com
35e262a4500f753f67b4c43b9f15df60790ee29d
e56f8a02c22c4e9d851df4112dee0c799efd7bfe
/vip/trade/src/main/java/com/alipay/api/request/AlipayMobileBeaconDeviceAddRequest.java
a8a4d15555d39ee16a0ae60f3655603ce3590971
[]
no_license
wu-xian-da/vip-server
8a07e2f8dc75722328a3fa7e7a9289ec6ef1d1b1
54a6855224bc3ae42005b341a2452f25cfeac2c7
refs/heads/master
2020-12-31T00:29:36.404038
2017-03-27T07:00:02
2017-03-27T07:00:02
85,170,395
0
0
null
null
null
null
UTF-8
Java
false
false
2,360
java
package com.alipay.api.request; import java.util.Map; import com.alipay.api.AlipayRequest; import com.alipay.api.internal.util.AlipayHashMap; import com.alipay.api.response.AlipayMobileBeaconDeviceAddResponse; /** * ALIPAY API: alipay.mobile.beacon.device.add request * * @author auto create * @since 1.0, 2015-02-03 19:48:59 */ public class AlipayMobileBeaconDeviceAddRequest implements AlipayRequest<AlipayMobileBeaconDeviceAddResponse> { private AlipayHashMap udfParams; // add user-defined text parameters private String apiVersion="1.0"; /** * 蓝牙设备信息 */ private String bizContent; public void setBizContent(String bizContent) { this.bizContent = bizContent; } public String getBizContent() { return this.bizContent; } private String terminalType; private String terminalInfo; private String prodCode; private String notifyUrl; public String getNotifyUrl() { return this.notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } public String getApiVersion() { return this.apiVersion; } public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public void setTerminalType(String terminalType){ this.terminalType=terminalType; } public String getTerminalType(){ return this.terminalType; } public void setTerminalInfo(String terminalInfo){ this.terminalInfo=terminalInfo; } public String getTerminalInfo(){ return this.terminalInfo; } public void setProdCode(String prodCode) { this.prodCode=prodCode; } public String getProdCode() { return this.prodCode; } public String getApiMethodName() { return "alipay.mobile.beacon.device.add"; } public Map<String, String> getTextParams() { AlipayHashMap txtParams = new AlipayHashMap(); txtParams.put("biz_content", this.bizContent); if(udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new AlipayHashMap(); } this.udfParams.put(key, value); } public Class<AlipayMobileBeaconDeviceAddResponse> getResponseClass() { return AlipayMobileBeaconDeviceAddResponse.class; } }
[ "programboy@126.com" ]
programboy@126.com
b75e30b4746cbc5cf5fa20943c6fecbc773eb5a8
4a10dc8955f9d4479b783d37155c73634f069a79
/app/src/main/java/com/itislevel/lyl/widget/videorecord/videoupload/impl/TVCDirectCredentialProvider.java
5beae9bd4366b6f5505b17763e1c6d15349c3931
[]
no_license
hyb1234hi/yby1
41f2eb123d96f8a55728b11aeaf42271e782cc08
5f106784715ee616ea6bb0e93a5ed214ad5b1352
refs/heads/master
2020-06-19T10:58:08.674182
2018-07-11T11:22:21
2018-07-11T11:22:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,024
java
package com.itislevel.lyl.widget.videorecord.videoupload.impl; import com.tencent.qcloud.core.auth.BasicLifecycleCredentialProvider; import com.tencent.qcloud.core.auth.QCloudLifecycleCredentials; import com.tencent.qcloud.core.auth.SessionQCloudCredentials; import com.tencent.qcloud.core.common.QCloudClientException; /** * Created by carolsuo on 2017/10/9. */ public class TVCDirectCredentialProvider extends BasicLifecycleCredentialProvider { private String secretId; private String secretKey; private String token; private long expiredTime; public TVCDirectCredentialProvider(String secretId, String secretKey, String token, long expiredTime) { this.secretId = secretId; this.secretKey = secretKey; this.token = token; this.expiredTime = expiredTime; } @Override protected QCloudLifecycleCredentials fetchNewCredentials() throws QCloudClientException { return new SessionQCloudCredentials(secretId, secretKey, token, expiredTime); } }
[ "1363826037@qq.com" ]
1363826037@qq.com
c935f373cbaf490eeefcb450a1198443c69330de
b7a11aa1d518793f8ddcacecbd24f914d603a1ad
/DnDBetweenTrees/src/java/example/MainPanel.java
bf4b94509115edf9895881d867b4603f6210b9e0
[ "MIT" ]
permissive
ramimpj/java-swing-tips
a42a9ff6ea5e9aa54f8841f39603f15056fd53dc
96087a64245b5fef9b2a2dfe81781211475a482e
refs/heads/master
2020-06-13T05:45:49.603879
2019-06-29T16:30:50
2019-06-29T16:30:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,430
java
// -*- mode:java; encoding:utf-8 -*- // vim:set fileencoding=utf-8: // @homepage@ package example; import java.awt.*; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.event.ActionEvent; import java.io.IOException; import java.util.Collections; import java.util.Enumeration; import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Stream; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.MutableTreeNode; import javax.swing.tree.TreePath; import javax.swing.tree.TreeSelectionModel; public final class MainPanel extends JPanel { private MainPanel() { super(new GridLayout(1, 2)); TreeTransferHandler handler = new TreeTransferHandler(); add(new JScrollPane(makeTree(handler))); add(new JScrollPane(makeTree(handler))); setPreferredSize(new Dimension(320, 240)); } private static JTree makeTree(TransferHandler hanlder) { JTree tree = new JTree(); tree.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); tree.setRootVisible(false); tree.setDragEnabled(true); tree.setTransferHandler(hanlder); tree.setDropMode(DropMode.INSERT); tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); // Disable node Cut action tree.getActionMap().put(TransferHandler.getCutAction().getValue(Action.NAME), new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { /* Dummy action */ } }); expandTree(tree); return tree; } private static void expandTree(JTree tree) { for (int i = 0; i < tree.getRowCount(); i++) { tree.expandRow(i); } } public static void main(String... args) { EventQueue.invokeLater(new Runnable() { @Override public void run() { createAndShowGui(); } }); } public static void createAndShowGui() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { ex.printStackTrace(); Toolkit.getDefaultToolkit().beep(); } JFrame frame = new JFrame("@title@"); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.getContentPane().add(new MainPanel()); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); } } class TreeTransferHandler extends TransferHandler { // protected static final DataFlavor FLAVOR = new ActivationDataFlavor( // DefaultMutableTreeNode[].class, DataFlavor.javaJVMLocalObjectMimeType, "Array of TreeNode"); private static final String NAME = "Array of DefaultMutableTreeNode"; protected static final DataFlavor FLAVOR = new DataFlavor(DefaultMutableTreeNode[].class, NAME); protected JTree source; @Override protected Transferable createTransferable(JComponent c) { source = (JTree) c; TreePath[] paths = source.getSelectionPaths(); DefaultMutableTreeNode[] nodes = new DefaultMutableTreeNode[paths.length]; for (int i = 0; i < paths.length; i++) { nodes[i] = (DefaultMutableTreeNode) paths[i].getLastPathComponent(); } // return new DataHandler(nodes, FLAVOR.getMimeType()); return new Transferable() { @Override public DataFlavor[] getTransferDataFlavors() { return new DataFlavor[] {FLAVOR}; } @Override public boolean isDataFlavorSupported(DataFlavor flavor) { return Objects.equals(FLAVOR, flavor); } @Override public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { if (isDataFlavorSupported(flavor)) { return nodes; } else { throw new UnsupportedFlavorException(flavor); } } }; } @Override public int getSourceActions(JComponent c) { return TransferHandler.MOVE; } @Override public boolean canImport(TransferHandler.TransferSupport support) { if (!support.isDrop()) { return false; } if (!support.isDataFlavorSupported(FLAVOR)) { return false; } JTree tree = (JTree) support.getComponent(); return !tree.equals(source); } @Override public boolean importData(TransferHandler.TransferSupport support) { // if (!canImport(support)) { // return false; // } DefaultMutableTreeNode[] nodes = null; try { Transferable t = support.getTransferable(); nodes = (DefaultMutableTreeNode[]) t.getTransferData(FLAVOR); } catch (UnsupportedFlavorException | IOException ex) { return false; } TransferHandler.DropLocation tdl = support.getDropLocation(); if (tdl instanceof JTree.DropLocation) { JTree.DropLocation dl = (JTree.DropLocation) tdl; int childIndex = dl.getChildIndex(); TreePath dest = dl.getPath(); DefaultMutableTreeNode parent = (DefaultMutableTreeNode) dest.getLastPathComponent(); JTree tree = (JTree) support.getComponent(); DefaultTreeModel model = (DefaultTreeModel) tree.getModel(); // int idx = childIndex < 0 ? parent.getChildCount() : childIndex; // // DefaultTreeModel sm = (DefaultTreeModel) source.getModel(); // for (DefaultMutableTreeNode node: nodes) { // // sm.removeNodeFromParent(node); // // model.insertNodeInto(node, parent, idx++); // DefaultMutableTreeNode clone = new DefaultMutableTreeNode(node.getUserObject()); // model.insertNodeInto(deepCopyTreeNode(node, clone), parent, idx++); // } AtomicInteger idx = new AtomicInteger(childIndex < 0 ? parent.getChildCount() : childIndex); Stream.of(nodes).forEach(node -> { DefaultMutableTreeNode clone = new DefaultMutableTreeNode(node.getUserObject()); model.insertNodeInto(deepCopyTreeNode(node, clone), parent, idx.incrementAndGet()); }); return true; } return false; } private static DefaultMutableTreeNode deepCopyTreeNode(DefaultMutableTreeNode src, DefaultMutableTreeNode tgt) { // Java 9: Collections.list(src.children()).stream() Collections.list((Enumeration<?>) src.children()).stream() .filter(DefaultMutableTreeNode.class::isInstance) .map(DefaultMutableTreeNode.class::cast) .forEach(node -> { DefaultMutableTreeNode clone = new DefaultMutableTreeNode(node.getUserObject()); tgt.add(clone); if (!node.isLeaf()) { deepCopyTreeNode(node, clone); } }); // for (int i = 0; i < src.getChildCount(); i++) { // DefaultMutableTreeNode node = (DefaultMutableTreeNode) src.getChildAt(i); // DefaultMutableTreeNode clone = new DefaultMutableTreeNode(node.getUserObject()); // tgt.add(clone); // if (!node.isLeaf()) { // deepCopyTreeNode(node, clone); // } // } return tgt; } @Override protected void exportDone(JComponent src, Transferable data, int action) { if (action == TransferHandler.MOVE) { JTree tree = (JTree) src; DefaultTreeModel model = (DefaultTreeModel) tree.getModel(); for (TreePath path: tree.getSelectionPaths()) { model.removeNodeFromParent((MutableTreeNode) path.getLastPathComponent()); } } } }
[ "aterai@outlook.com" ]
aterai@outlook.com
cde421b115847bb7951a3b29ae785aa3a6ff7914
c44fed1d1d5137cb791e29978533602974d29513
/src/java/com/glenwood/glaceemr/infobutton/utils/KnowledgeRequest/Thumbnail.java
9696c591f6a15d41e57fdaa15a11a915c9939b60
[]
no_license
bovas/HIEGateway
363e5bca39a408eedaf842dbab627418ef0c42a8
c9242071ec9d1abee2e908b013bfd10edafb05e9
refs/heads/master
2021-01-25T08:42:45.846212
2013-05-22T13:08:30
2013-05-22T13:08:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,901
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2012.11.30 at 11:18:11 PM EST // package com.glenwood.glaceemr.infobutton.utils.KnowledgeRequest; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * A thumbnail is an abbreviated rendition of the full * data. A thumbnail requires significantly fewer * resources than the full data, while still maintaining * some distinctive similarity with the full data. A * thumbnail is typically used with by-reference * encapsulated data. It allows a user to select data * more efficiently before actually downloading through * the reference. * * * <p>Java class for thumbnail complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="thumbnail"> * &lt;complexContent> * &lt;restriction base="{urn:hl7-org:v3}ED"> * &lt;sequence> * &lt;element name="reference" type="{urn:hl7-org:v3}TEL" minOccurs="0"/> * &lt;element name="thumbnail" type="{urn:hl7-org:v3}thumbnail" maxOccurs="0" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "thumbnail") public class Thumbnail extends ED { }
[ "bovas1990@gmail.com" ]
bovas1990@gmail.com
ef343d54489d2d145a6e858b3b2e3f423f87db78
e8cd24201cbfadef0f267151ea5b8a90cc505766
/group02/727171008/src/com/github/HarryHook/coding2017/basic/BinaryTreeNode.java
6b85bdc435271a89c3247bb031a25c8ef38f4f80
[]
no_license
XMT-CN/coding2017-s1
30dd4ee886dd0a021498108353c20360148a6065
382f6bfeeeda2e76ffe27b440df4f328f9eafbe2
refs/heads/master
2021-01-21T21:38:42.199253
2017-06-25T07:44:21
2017-06-25T07:44:21
94,863,023
0
0
null
null
null
null
UTF-8
Java
false
false
2,557
java
/* * Created by Harry 2017-2-23 10:50:39 * 实现二叉树,并按二叉查找树插入节点 * */ package com.github.HarryHook.coding2017.basic; public class BinaryTreeNode { private Integer data; private BinaryTreeNode left; private BinaryTreeNode right; // 中序遍历二叉树 public void inOrder(BinaryTreeNode node) { if (node != null) { inOrder(node.left); System.out.print(" " + node.data); inOrder(node.right); } } // 获取给节点的值 public Integer getData() { return data; } // 给一个节点赋值 public void setData(Integer data) { this.data = data; } // 获取左节点 public BinaryTreeNode getLeft() { return left; } // 指定左节点 public void setLeft(BinaryTreeNode left) { this.left = left; } // 获取右节点 public BinaryTreeNode getRight() { return right; } // 指定右节点 public void setRight(BinaryTreeNode right) { this.right = right; } // 在二叉树中插入一个节点,需要判断 public BinaryTreeNode insert(Integer obj) { // 新增节点 BinaryTreeNode newNode = new BinaryTreeNode(); // 当前节点,保留根的值 BinaryTreeNode current = this; // 上个节点 BinaryTreeNode parent = null; // 如果根节点为空 if (current.data == null) { newNode.setData(obj); newNode.setLeft(null); newNode.setRight(null); return newNode; } else { while (true) { parent = current; if (obj < current.data) { current = current.left; if (current == null) { newNode.setData(obj); newNode.setLeft(null); newNode.setRight(null); parent.left = newNode; return newNode; } } else { current = current.right; if (current == null) { newNode.setData(obj); newNode.setLeft(null); newNode.setRight(null); parent.right = newNode; return newNode; } } } } } public static void main(String[] args) { BinaryTreeNode BTN = new BinaryTreeNode(); BTN = BTN.insert(5); System.out.print(BTN.getData() + " "); System.out.print(BTN.insert(2).getData() + " "); System.out.print(BTN.insert(1).getData() + " "); System.out.print(BTN.insert(4).getData() + " "); System.out.print(BTN.insert(6).getData() + " "); System.out.print(BTN.insert(8).getData() + " "); System.out.println(""); System.out.println("中序遍历二叉树: "); BTN.inOrder(BTN); } }
[ "542194147@qq.com" ]
542194147@qq.com
aac0b58b880613eb9b7834c9b6ca9c323dd0c8ea
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13372-1-15-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/com/xpn/xwiki/objects/BaseProperty_ESTest.java
5a12f63fc0e8e156e84179171936933eb6bf5c21
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
552
java
/* * This file was automatically generated by EvoSuite * Mon Apr 06 04:19:18 UTC 2020 */ package com.xpn.xwiki.objects; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class BaseProperty_ESTest extends BaseProperty_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
7be019c74f2fb894666dee209b65f13c98bd1a51
7b7927609c9a4b4b5e8c8cc36c4226aa34ece2c9
/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/highlighter/DslHighlighterTestGenerated.java
9aad203715542f2e8c7e0c10a46f467c2cef8201
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Surfndez/intellij-community
d66c1bf780bcea190098d0565321b9537e297f54
e3bf1c11ced5246cc36c2db280765afcf3d607dd
refs/heads/master
2023-06-29T22:38:35.206634
2021-07-23T17:00:30
2021-07-23T19:22:33
388,960,124
0
0
Apache-2.0
2021-07-24T01:22:12
2021-07-24T00:28:19
null
UTF-8
Java
false
false
1,480
java
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.kotlin.idea.highlighter; import com.intellij.testFramework.TestDataPath; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.TestMetadata; import org.jetbrains.kotlin.test.TestRoot; import org.junit.runner.RunWith; /* * This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. * DO NOT MODIFY MANUALLY. */ @SuppressWarnings("all") @TestRoot("idea/tests") @TestDataPath("$CONTENT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/dslHighlighter") public class DslHighlighterTestGenerated extends AbstractDslHighlighterTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @TestMetadata("functionCalls.kt") public void testFunctionCalls() throws Exception { runTest("testData/dslHighlighter/functionCalls.kt"); } @TestMetadata("objectAccess.kt") public void testObjectAccess() throws Exception { runTest("testData/dslHighlighter/objectAccess.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { runTest("testData/dslHighlighter/propertyAccess.kt"); } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
6b73752830882b3821c1e32cd95b18007c5638e0
2214702e68546c7299b626b8b1239070bb396376
/src/com/jkkp/modules/basedata/model/AdSearchTag.java
381393e11b8b337333f0249449cc61e84741ecb1
[]
no_license
KnightWind/jkkweb
55a50375a19508a490d5fbbc6b2f7fd6ad79fdcd
ac2e3f47cc07154e4fc666e1028299980f1783d2
refs/heads/master
2021-01-10T16:49:25.342698
2015-09-29T09:48:38
2015-09-29T09:48:38
43,357,602
0
0
null
null
null
null
UTF-8
Java
false
false
1,107
java
package com.jkkp.modules.basedata.model; import javax.persistence.*; @Table(name = "ad_search_tag") public class AdSearchTag { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; /** * 关键词 */ private String tag; /** * 广告id */ @Column(name = "ad_id") private Integer adId; /** * @return id */ public Integer getId() { return id; } /** * @param id */ public void setId(Integer id) { this.id = id; } /** * 获取关键词 * * @return tag - 关键词 */ public String getTag() { return tag; } /** * 设置关键词 * * @param tag 关键词 */ public void setTag(String tag) { this.tag = tag; } /** * 获取广告id * * @return ad_id - 广告id */ public Integer getAdId() { return adId; } /** * 设置广告id * * @param adId 广告id */ public void setAdId(Integer adId) { this.adId = adId; } }
[ "wangchaobo@jiakeke.com" ]
wangchaobo@jiakeke.com
896c5153711e984d14d7a21d672db57b0d839d91
543b9d974907f075d2e4f7f7329a5ba355c66916
/regressiontests/stable/src/main/java/org/apache/isis/testdomain/model/good/ProperParameterSupport.java
fdec15c99851a33fa523cc54223477e8b56e45c1
[ "Apache-2.0" ]
permissive
jmhupanen/isis
8311b47826c0db203a4b6ec870e5619b2bcb0edc
27d5a3a40e240c266e76e03ba6566bddf84228f4
refs/heads/master
2023-04-18T13:27:31.501372
2021-04-20T15:39:56
2021-04-20T15:39:56
336,022,680
0
0
NOASSERTION
2021-04-20T15:39:56
2021-02-04T16:59:11
Java
UTF-8
Java
false
false
3,201
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.isis.testdomain.model.good; import java.util.Collection; import org.apache.isis.applib.annotation.Action; import org.apache.isis.applib.annotation.MemberSupport; import org.apache.isis.applib.annotation.DomainObject; import org.apache.isis.applib.annotation.Nature; import lombok.Value; import lombok.experimental.Accessors; @DomainObject(nature = Nature.VIEW_MODEL) public class ProperParameterSupport { @Value @Accessors(fluent = true) // fluent so we can replace this with Java(14+) records later static class Parameters { String p0; int p1; boolean p2; } @Action public void act( String p0, int p1, boolean p2) { } // -- PARAM 0 (String) @MemberSupport public String default0Act(Parameters p) { return null; } @MemberSupport public Collection<String> choices0Act(Parameters p) { return null; } @MemberSupport public Collection<String> autoComplete0Act(Parameters p, String search) { return null; } @MemberSupport public boolean hide0Act(Parameters p) { return false; } @MemberSupport public String disable0Act(Parameters p) { return null; } // -- PARAM 1 (int) @MemberSupport public int default1Act(Parameters p) { return 0; } @MemberSupport public int[] choices1Act(Parameters p) { return null; } @MemberSupport public int[] autoComplete1Act(Parameters p, String search) { return null; } @MemberSupport public boolean hide1Act(Parameters p) { return false; } @MemberSupport public String disable1Act(Parameters p) { return null; } // -- PARAM 2 (boolean) @MemberSupport public boolean default2Act(Parameters p) { return false; } @MemberSupport public boolean[] choices2Act(Parameters p) { return null; } @MemberSupport public boolean[] autoComplete2Act(Parameters p, String search) { return null; } @MemberSupport public boolean hide2Act(Parameters p) { return false; } @MemberSupport public String disable2Act(Parameters p) { return null; } }
[ "ahuber@apache.org" ]
ahuber@apache.org
1f6d54d477981eb8f5d00f5e198c693346cdf2af
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/linkvisual-20180120/src/main/java/com/aliyun/linkvisual20180120/models/QueryMonthRecordResponseBody.java
c6b09c5d2c1e839debd6e502b14973f76c532659
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,688
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.linkvisual20180120.models; import com.aliyun.tea.*; public class QueryMonthRecordResponseBody extends TeaModel { @NameInMap("Code") public String code; @NameInMap("Data") public String data; @NameInMap("ErrorMessage") public String errorMessage; @NameInMap("RequestId") public String requestId; @NameInMap("Success") public Boolean success; public static QueryMonthRecordResponseBody build(java.util.Map<String, ?> map) throws Exception { QueryMonthRecordResponseBody self = new QueryMonthRecordResponseBody(); return TeaModel.build(map, self); } public QueryMonthRecordResponseBody setCode(String code) { this.code = code; return this; } public String getCode() { return this.code; } public QueryMonthRecordResponseBody setData(String data) { this.data = data; return this; } public String getData() { return this.data; } public QueryMonthRecordResponseBody setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; return this; } public String getErrorMessage() { return this.errorMessage; } public QueryMonthRecordResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public QueryMonthRecordResponseBody setSuccess(Boolean success) { this.success = success; return this; } public Boolean getSuccess() { return this.success; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
ee077005df4b3355908d7b906d7eb8fb270259dd
59e6dc1030446132fb451bd711d51afe0c222210
/components/identity/org.wso2.carbon.identity.oauth/4.2.1/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/clientauth/ClientAuthenticationHandler.java
dca8c036ddafa1ae6d202b92d82efd11ead8f69f
[]
no_license
Alsan/turing-chunk07
2f7470b72cc50a567241252e0bd4f27adc987d6e
e9e947718e3844c07361797bd52d3d1391d9fb5e
refs/heads/master
2020-05-26T06:20:24.554039
2014-02-07T12:02:53
2014-02-07T12:02:53
38,284,349
0
1
null
null
null
null
UTF-8
Java
false
false
1,290
java
/* *Copyright (c) 2005-2013, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * *WSO2 Inc. licenses this file to you under the Apache License, *Version 2.0 (the "License"); you may not use this file except *in compliance with the License. *You may obtain a copy of the License at * *http://www.apache.org/licenses/LICENSE-2.0 * *Unless required by applicable law or agreed to in writing, *software distributed under the License is distributed on an *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *KIND, either express or implied. See the License for the *specific language governing permissions and limitations *under the License. */ package org.wso2.carbon.identity.oauth2.token.handlers.clientauth; import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception; import org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext; public interface ClientAuthenticationHandler { /** * Authenticate the OAuth 2.0 client * @return <Code>true</Code>|<Code>false</Code> if the client authentication succeeded or not. * @throws org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception Error when validating the OAuth 2.0 client. */ public boolean authenticateClient(OAuthTokenReqMessageContext tokReqMsgCtx) throws IdentityOAuth2Exception; }
[ "malaka@wso2.com" ]
malaka@wso2.com
a53165ff16728f7a41c411eafad511a113ed7555
abcd1fa8c6ef587780fe53952cbf8182a4831478
/test/src/test/java/org/zstack/test/deployer/schema/PolicyConfig.java
4a413f09acee54283b81df96944e0716b2bbb8ff
[ "Apache-2.0" ]
permissive
cloudtrends/zstack
b96bb31b17e6891ef437ea3a489b03ad823e1c6a
2e61f34b7d72bb43e805f559a237dd6c5a74108a
refs/heads/master
2021-01-16T21:25:38.346107
2015-07-08T06:57:13
2015-07-08T06:57:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,393
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.07.01 at 11:18:36 PM PDT // package org.zstack.test.deployer.schema; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for PolicyConfig complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="PolicyConfig"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;attribute name="policyFilePath" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PolicyConfig") public class PolicyConfig { @XmlAttribute(name = "name", required = true) protected String name; @XmlAttribute(name = "policyFilePath", required = true) protected String policyFilePath; /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the policyFilePath property. * * @return * possible object is * {@link String } * */ public String getPolicyFilePath() { return policyFilePath; } /** * Sets the value of the policyFilePath property. * * @param value * allowed object is * {@link String } * */ public void setPolicyFilePath(String value) { this.policyFilePath = value; } }
[ "xing5820@gmail.com" ]
xing5820@gmail.com
2d449d41e153c99d1ccb9405a539bb2d008697be
fb5a754d746c775ff6c6045b8e35a23456f21e7a
/eHour-wicketweb/src/main/java/net/rrm/ehour/ui/common/report/excel/CellFactory.java
da9f37ba3147f6acacea3fd4b91718e5c6fd9d3f
[]
no_license
psharmam/ehour
8487b060adf3063fef8c7c4eb32c13e9187586ea
3a729af663b1122621b2e54e919fe18bd4386c68
refs/heads/master
2021-01-22T12:35:25.452720
2014-10-13T22:47:02
2014-10-13T22:47:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,827
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 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package net.rrm.ehour.ui.common.report.excel; import net.rrm.ehour.report.reports.element.LockableDate; import net.rrm.ehour.ui.common.util.WebUtils; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRichTextString; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.wicket.model.IModel; import java.util.Date; /** * Created on Mar 25, 2009, 6:45:57 AM * * @author Thies Edeling (thies@te-con.nl) */ public class CellFactory { public static HSSFCell createCell(HSSFRow row, int column, String value, ExcelWorkbook workbook) { return CellFactory.createCell(row, column, value, workbook, CellStyle.NORMAL_FONT); } public static HSSFCell createCell(HSSFRow row, int column, IModel<String> valueModel, ExcelWorkbook workbook) { return CellFactory.createCell(row, column, valueModel, workbook, CellStyle.NORMAL_FONT); } public static HSSFCell createCell(HSSFRow row, int column, ExcelWorkbook workbook, CellStyle cellStyle) { return createCell(row, column, "", workbook, cellStyle); } public static HSSFCell createCell(HSSFRow row, int column, IModel<String> valueModel, ExcelWorkbook workbook, CellStyle cellStyle) { return createCell(row, column, WebUtils.getResourceModelString(valueModel), workbook, cellStyle); } public static HSSFCell createCell(HSSFRow row, int column, Object value, ExcelWorkbook workbook, CellStyle cellStyle) { HSSFCell cell = row.createCell(column); if (value instanceof Float) { cell.setCellValue((Float) value); } else if (value instanceof Number) { cell.setCellValue(((Number) value).doubleValue()); } else if (value instanceof Date) { cell.setCellValue((Date)value); } else if (value instanceof LockableDate) { cell.setCellValue(((LockableDate) value).getDate()); } else { cell.setCellValue(new HSSFRichTextString(value.toString())); } cell.setCellStyle(workbook.getCellStyle(cellStyle)); return cell; } }
[ "thies@te-con.nl" ]
thies@te-con.nl
315a529b6caf6ea172249da51249e25e3a7df760
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_b4ee0b965d9a0610e66c8a3b43fa08c303508e95/OracleConnection/1_b4ee0b965d9a0610e66c8a3b43fa08c303508e95_OracleConnection_t.java
46bdb7e389a7653cd606eb67307e98d50fd91280
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,869
java
/* * Copyright (c) 2010 StockPlay development team * All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ package com.kapti.data.persistence.oracle; import org.apache.commons.dbcp.BasicDataSource; import com.kapti.exceptions.*; import java.sql.*; public class OracleConnection { public static BasicDataSource ds = null; public static Connection getConnection() throws DBException { try { if (ds == null) { ds = new BasicDataSource(); ds.setDriverClassName("oracle.jdbc.driver.OracleDriver"); //ds.setUrl("jdbc:oracle:thin:@//localhost:1521/xe"); ds.setUrl("jdbc:oracle:thin:@//be01.kapti.com:1521/xe"); ds.setUsername("stockplay"); ds.setPassword("chocolademousse"); ds.setTestOnBorrow(true); ds.setTestOnReturn(true); ds.setTestWhileIdle(true); ds.setValidationQuery("select 1 from dual"); } return ds.getConnection(); } catch (SQLException ex) { throw new DBException("Error while creating connection-object", ex); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
94783e62a76ed20f3ebc3f5c21d71bc3c10fff35
b6e99b0346572b7def0e9cdd1b03990beb99e26f
/src/gcom/gui/seguranca/acesso/usuario/ExibirInserirSolicitacaoAcessoSituacaoAction.java
4282489627f166cd01026a9cc734bca4badfebab
[]
no_license
prodigasistemas/gsan
ad64782c7bc991329ce5f0bf5491c810e9487d6b
bfbf7ad298c3c9646bdf5d9c791e62d7366499c1
refs/heads/master
2023-08-31T10:47:21.784105
2023-08-23T17:53:24
2023-08-23T17:53:24
14,600,520
19
20
null
2015-07-29T19:39:10
2013-11-21T21:24:16
Java
UTF-8
Java
false
false
1,190
java
package gcom.gui.seguranca.acesso.usuario; import gcom.gui.GcomAction; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * @author Wallace Thierre * @created 04/11/2010 */ public class ExibirInserirSolicitacaoAcessoSituacaoAction extends GcomAction { /** * Description of the Method * * @param actionMapping * Description of the Parameter * @param actionForm * Description of the Parameter * @param httpServletRequest * Description of the Parameter * @param httpServletResponse * Description of the Parameter * @return Description of the Return Value */ public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { // Seta o caminho de Retorno ActionForward retorno = actionMapping .findForward("exibirInserirSolicitacaoAcessoSituacao"); return retorno; } }
[ "piagodinho@gmail.com" ]
piagodinho@gmail.com
595070944691c1856d7c3c464dab8922e8add8a0
e46d8e8fd1848a93472d9b8a50335cfc422a87c6
/src/main/java/com/netsuite/webservices/platform/common_2018_1/JobStatusSearchRowBasic.java
581548b4ae86f2654f5a97f360985a07a6261c3d
[]
no_license
djXplosivo/suitetalk-webservices
6d0f1737c52c566fde07eb6e008603b3c271d8d1
bff927f0acb45e772a5944272d0f7d55b87caf2a
refs/heads/master
2020-03-28T02:56:52.772003
2018-09-06T02:52:57
2018-09-06T02:52:57
147,608,548
0
0
null
null
null
null
UTF-8
Java
false
false
6,644
java
package com.netsuite.webservices.platform.common_2018_1; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import com.netsuite.webservices.platform.core_2018_1.SearchColumnBooleanField; import com.netsuite.webservices.platform.core_2018_1.SearchColumnSelectField; import com.netsuite.webservices.platform.core_2018_1.SearchColumnStringField; import com.netsuite.webservices.platform.core_2018_1.SearchRowBasic; /** * <p>Java class for JobStatusSearchRowBasic complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="JobStatusSearchRowBasic"> * &lt;complexContent> * &lt;extension base="{urn:core_2018_1.platform.webservices.netsuite.com}SearchRowBasic"> * &lt;sequence> * &lt;element name="description" type="{urn:core_2018_1.platform.webservices.netsuite.com}SearchColumnStringField" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="externalId" type="{urn:core_2018_1.platform.webservices.netsuite.com}SearchColumnSelectField" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="internalId" type="{urn:core_2018_1.platform.webservices.netsuite.com}SearchColumnSelectField" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="isInactive" type="{urn:core_2018_1.platform.webservices.netsuite.com}SearchColumnBooleanField" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="name" type="{urn:core_2018_1.platform.webservices.netsuite.com}SearchColumnStringField" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "JobStatusSearchRowBasic", propOrder = { "description", "externalId", "internalId", "isInactive", "name" }) public class JobStatusSearchRowBasic extends SearchRowBasic { protected List<SearchColumnStringField> description; protected List<SearchColumnSelectField> externalId; protected List<SearchColumnSelectField> internalId; protected List<SearchColumnBooleanField> isInactive; protected List<SearchColumnStringField> name; /** * Gets the value of the description 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 description property. * * <p> * For example, to add a new item, do as follows: * <pre> * getDescription().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link SearchColumnStringField } * * */ public List<SearchColumnStringField> getDescription() { if (description == null) { description = new ArrayList<SearchColumnStringField>(); } return this.description; } /** * Gets the value of the externalId 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 externalId property. * * <p> * For example, to add a new item, do as follows: * <pre> * getExternalId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link SearchColumnSelectField } * * */ public List<SearchColumnSelectField> getExternalId() { if (externalId == null) { externalId = new ArrayList<SearchColumnSelectField>(); } return this.externalId; } /** * Gets the value of the internalId 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 internalId property. * * <p> * For example, to add a new item, do as follows: * <pre> * getInternalId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link SearchColumnSelectField } * * */ public List<SearchColumnSelectField> getInternalId() { if (internalId == null) { internalId = new ArrayList<SearchColumnSelectField>(); } return this.internalId; } /** * Gets the value of the isInactive 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 isInactive property. * * <p> * For example, to add a new item, do as follows: * <pre> * getIsInactive().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link SearchColumnBooleanField } * * */ public List<SearchColumnBooleanField> getIsInactive() { if (isInactive == null) { isInactive = new ArrayList<SearchColumnBooleanField>(); } return this.isInactive; } /** * Gets the value of the name 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 name property. * * <p> * For example, to add a new item, do as follows: * <pre> * getName().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link SearchColumnStringField } * * */ public List<SearchColumnStringField> getName() { if (name == null) { name = new ArrayList<SearchColumnStringField>(); } return this.name; } }
[ "ccolon@git.eandjmedia.com" ]
ccolon@git.eandjmedia.com
9f7566565b9da81f18b7ac9c9702b8ba6c748082
89ce4e03eb39e8d2ebe146d2e975abf3c06af657
/tryRealTimeDataBase/app/src/androidTest/java/com/example/tryrealtimedatabase/ExampleInstrumentedTest.java
b36c0b6013c73e6e4ceab6287748124ae12ff4e0
[]
no_license
VishwaasSaxena/trialrep
77896ecb54ad57d91663d9fbcc27119419618ab1
65fe86b1958085bb4469254a9a60ac421e744b91
refs/heads/master
2022-11-11T16:31:49.384334
2020-07-08T11:09:59
2020-07-08T11:09:59
265,053,865
0
0
null
null
null
null
UTF-8
Java
false
false
778
java
package com.example.tryrealtimedatabase; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.example.tryrealtimedatabase", appContext.getPackageName()); } }
[ "user@example.com" ]
user@example.com
b9646daaf8a7e960ea897fea29f580d20dffed8c
1e708e4a1023e8fb9e66bed3e98d0b7969ad30da
/app/src/main/vysor/android/support/v4/print/PrintHelperApi24.java
64369b7786eb711a261462359915d7b71324c91a
[]
no_license
wjfsanhe/Vysor-Research
c139a2120bcf94057fc1145ff88bd9f6aa443281
f0b6172b9704885f95466a7e99f670fae760963f
refs/heads/master
2020-03-31T16:23:18.137882
2018-12-11T07:35:31
2018-12-11T07:35:31
152,373,344
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
// // Decompiled by Procyon v0.5.30 // package android.support.v4.print; import android.content.Context; class PrintHelperApi24 extends PrintHelperApi23 { PrintHelperApi24(final Context context) { super(context); this.mIsMinMarginsHandlingCorrect = true; this.mPrintActivityRespectsOrientation = true; } }
[ "903448239@qq.com" ]
903448239@qq.com
76ab1fc89a29ef0e9818ee5d365fef5931f40787
4e16a6780f479bf703e240a1549d090b0bafc53b
/work/decompile-c69e3af0/net/minecraft/world/item/trading/MerchantRecipe.java
fcb9a5caafe5e516ba14c50058afa28294f88002
[]
no_license
0-Yama/ServLT
559b683832d1f284b94ef4a9dbd4d8adb543e649
b2153c73bea55fdd4f540ed2fba3a1e46ec37dc5
refs/heads/master
2023-03-16T01:37:14.727842
2023-03-05T14:55:51
2023-03-05T14:55:51
302,899,503
0
2
null
2020-10-15T10:51:21
2020-10-10T12:42:47
JavaScript
UTF-8
Java
false
false
6,539
java
package net.minecraft.world.item.trading; import net.minecraft.nbt.GameProfileSerializer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.MathHelper; import net.minecraft.world.item.ItemStack; public class MerchantRecipe { public ItemStack baseCostA; public ItemStack costB; public final ItemStack result; public int uses; public int maxUses; public boolean rewardExp; public int specialPriceDiff; public int demand; public float priceMultiplier; public int xp; public MerchantRecipe(NBTTagCompound nbttagcompound) { this.rewardExp = true; this.xp = 1; this.baseCostA = ItemStack.of(nbttagcompound.getCompound("buy")); this.costB = ItemStack.of(nbttagcompound.getCompound("buyB")); this.result = ItemStack.of(nbttagcompound.getCompound("sell")); this.uses = nbttagcompound.getInt("uses"); if (nbttagcompound.contains("maxUses", 99)) { this.maxUses = nbttagcompound.getInt("maxUses"); } else { this.maxUses = 4; } if (nbttagcompound.contains("rewardExp", 1)) { this.rewardExp = nbttagcompound.getBoolean("rewardExp"); } if (nbttagcompound.contains("xp", 3)) { this.xp = nbttagcompound.getInt("xp"); } if (nbttagcompound.contains("priceMultiplier", 5)) { this.priceMultiplier = nbttagcompound.getFloat("priceMultiplier"); } this.specialPriceDiff = nbttagcompound.getInt("specialPrice"); this.demand = nbttagcompound.getInt("demand"); } public MerchantRecipe(ItemStack itemstack, ItemStack itemstack1, int i, int j, float f) { this(itemstack, ItemStack.EMPTY, itemstack1, i, j, f); } public MerchantRecipe(ItemStack itemstack, ItemStack itemstack1, ItemStack itemstack2, int i, int j, float f) { this(itemstack, itemstack1, itemstack2, 0, i, j, f); } public MerchantRecipe(ItemStack itemstack, ItemStack itemstack1, ItemStack itemstack2, int i, int j, int k, float f) { this(itemstack, itemstack1, itemstack2, i, j, k, f, 0); } public MerchantRecipe(ItemStack itemstack, ItemStack itemstack1, ItemStack itemstack2, int i, int j, int k, float f, int l) { this.rewardExp = true; this.xp = 1; this.baseCostA = itemstack; this.costB = itemstack1; this.result = itemstack2; this.uses = i; this.maxUses = j; this.xp = k; this.priceMultiplier = f; this.demand = l; } public ItemStack getBaseCostA() { return this.baseCostA; } public ItemStack getCostA() { int i = this.baseCostA.getCount(); ItemStack itemstack = this.baseCostA.copy(); int j = Math.max(0, MathHelper.floor((float) (i * this.demand) * this.priceMultiplier)); itemstack.setCount(MathHelper.clamp(i + j + this.specialPriceDiff, (int) 1, this.baseCostA.getItem().getMaxStackSize())); return itemstack; } public ItemStack getCostB() { return this.costB; } public ItemStack getResult() { return this.result; } public void updateDemand() { this.demand = this.demand + this.uses - (this.maxUses - this.uses); } public ItemStack assemble() { return this.result.copy(); } public int getUses() { return this.uses; } public void resetUses() { this.uses = 0; } public int getMaxUses() { return this.maxUses; } public void increaseUses() { ++this.uses; } public int getDemand() { return this.demand; } public void addToSpecialPriceDiff(int i) { this.specialPriceDiff += i; } public void resetSpecialPriceDiff() { this.specialPriceDiff = 0; } public int getSpecialPriceDiff() { return this.specialPriceDiff; } public void setSpecialPriceDiff(int i) { this.specialPriceDiff = i; } public float getPriceMultiplier() { return this.priceMultiplier; } public int getXp() { return this.xp; } public boolean isOutOfStock() { return this.uses >= this.maxUses; } public void setToOutOfStock() { this.uses = this.maxUses; } public boolean needsRestock() { return this.uses > 0; } public boolean shouldRewardExp() { return this.rewardExp; } public NBTTagCompound createTag() { NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.put("buy", this.baseCostA.save(new NBTTagCompound())); nbttagcompound.put("sell", this.result.save(new NBTTagCompound())); nbttagcompound.put("buyB", this.costB.save(new NBTTagCompound())); nbttagcompound.putInt("uses", this.uses); nbttagcompound.putInt("maxUses", this.maxUses); nbttagcompound.putBoolean("rewardExp", this.rewardExp); nbttagcompound.putInt("xp", this.xp); nbttagcompound.putFloat("priceMultiplier", this.priceMultiplier); nbttagcompound.putInt("specialPrice", this.specialPriceDiff); nbttagcompound.putInt("demand", this.demand); return nbttagcompound; } public boolean satisfiedBy(ItemStack itemstack, ItemStack itemstack1) { return this.isRequiredItem(itemstack, this.getCostA()) && itemstack.getCount() >= this.getCostA().getCount() && this.isRequiredItem(itemstack1, this.costB) && itemstack1.getCount() >= this.costB.getCount(); } private boolean isRequiredItem(ItemStack itemstack, ItemStack itemstack1) { if (itemstack1.isEmpty() && itemstack.isEmpty()) { return true; } else { ItemStack itemstack2 = itemstack.copy(); if (itemstack2.getItem().canBeDepleted()) { itemstack2.setDamageValue(itemstack2.getDamageValue()); } return ItemStack.isSame(itemstack2, itemstack1) && (!itemstack1.hasTag() || itemstack2.hasTag() && GameProfileSerializer.compareNbt(itemstack1.getTag(), itemstack2.getTag(), false)); } } public boolean take(ItemStack itemstack, ItemStack itemstack1) { if (!this.satisfiedBy(itemstack, itemstack1)) { return false; } else { itemstack.shrink(this.getCostA().getCount()); if (!this.getCostB().isEmpty()) { itemstack1.shrink(this.getCostB().getCount()); } return true; } } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
429d7bb5fbd684f9e221a7c5cc6fc49b5e3d4883
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/jdbi/learning/5389/BindList.java
06d744c873cb3b7e94720f5e1e62a05e614b0157
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,734
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 org.jdbi.v3.sqlobject.customizer; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.jdbi.v3.sqlobject.customizer.internal.BindListFactory; /** * Binds each value in the annotated {@link Iterable} or array/varargs argument, and defines a named attribute as a * comma-separated list of each bound parameter name. Common use cases: * <pre> * &#64;SqlQuery("select * from things where id in (&lt;ids&gt;)") * List&lt;Thing&gt; getThings(@BindList int... ids) * * &#64;SqlQuery("insert into things (&lt;columnNames&gt;) values (&lt;values&gt;)") * void insertThings(@DefineList List&lt;String&gt; columnNames, @BindList List&lt;Object&gt; values) * </pre> * <p> * Throws IllegalArgumentException if the argument is not an array or Iterable. How null and empty collections are handled can be configured with onEmpty:EmptyHandling - throws IllegalArgumentException by default. */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.PARAMETER}) @SqlStatementCustomizingAnnotation(BindListFactory.class) public @interface BindList { /** * The attribute name to define. If omitted, the name of the annotated parameter is used. It is an error to omit * the name when there is no parameter naming information in your class files. * * @return the attribute name. */ String value() default ""; /** * @return what to do when the argument is null or empty */ EmptyHandling onEmpty() default EmptyHandling.THROW; /** * describes what needs to be done if the passed argument is null or empty */ enum EmptyHandling { /** * output "" (without quotes, i.e. nothing) * <p> * select * from things where x in () */ VOID, /** * output "null" (without quotes, as keyword), useful e.g. in postgresql where "in ()" is invalid syntax * <p> * select * from things where x in (null) */ NULL, /** * throw IllegalArgumentException */ THROW; } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
6e6405e7b5ac662a478a1493fe1741d5af712ef9
497fcb88c10c94fed1caa160ee110561c07b594c
/platform/platform-grid/src/test/java/com/yazino/platform/gamehost/preprocessing/EventStillValidPreprocessorTest.java
1cb9353188efa0acd6317658b2b47de4f75c5103
[]
no_license
ShahakBH/jazzino-master
3f116a609c5648c00dfbe6ab89c6c3ce1903fc1a
2401394022106d2321873d15996953f2bbc2a326
refs/heads/master
2016-09-02T01:26:44.514049
2015-08-10T13:06:54
2015-08-10T13:06:54
40,482,590
0
1
null
null
null
null
UTF-8
Java
false
false
1,055
java
package com.yazino.platform.gamehost.preprocessing; import com.yazino.platform.processor.table.ProcessingTestContext; import org.junit.Before; import org.junit.Test; import com.yazino.game.api.ScheduledEvent; import java.util.HashMap; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class EventStillValidPreprocessorTest { EventStillValidPreprocessor underTest; ProcessingTestContext context; @Before public void init() { underTest = new EventStillValidPreprocessor(); context = new ProcessingTestContext(); } @Test public void if_old_event_halt_returned() { context.setEvent(new ScheduledEvent(0, context.getTable().getGameId() - 1, "", "", new HashMap<String, String>(), false)); final boolean result = context.preProcessEvent(underTest); assertFalse(result); } @Test public void if_other_event_continue_returned() { final boolean result = context.preProcessEvent(underTest); assertTrue(result); } }
[ "shahak.ben-hamo@rbpkrltd.com" ]
shahak.ben-hamo@rbpkrltd.com
d23d469ac35c016cb3ba5e4ad8cabb33a43d410e
36ba7792e0cccfe9c217a2fe58700292af6d2204
/src/script/map/area/CatacombsOfKourendArea.java
d07cee0336e5e4da778181cfb0f30a48ec672981
[]
no_license
danielsojohn/BattleScape-Server-NoMaven
92a678ab7d0e53a68b10d047638c580c902673cb
793a1c8edd7381a96db0203b529c29ddf8ed8db9
refs/heads/master
2020-09-09T01:55:54.517436
2019-11-15T05:08:02
2019-11-15T05:08:02
221,307,980
0
0
null
2019-11-12T20:41:54
2019-11-12T20:41:53
null
UTF-8
Java
false
false
228
java
package script.map.area; import com.palidino.osrs.model.map.Area; public class CatacombsOfKourendArea extends Area { public CatacombsOfKourendArea() { super(6300, 6301, 6556, 6557, 6812, 6813, 7968, 7069); } }
[ "palidino@Daltons-MacBook-Air.local" ]
palidino@Daltons-MacBook-Air.local
e1bb7efaf7b818f8ebaf804bf09fc4cdb0ca6436
9069632dc33680c536de44e891ff110a3bb554fb
/gmall-manage-web/src/test/java/com/jihu/gmall/gmallmanageweb/GmallManageWebApplicationTests.java
949eff48c9dd77d7626500f67f3f90f0c567b1f2
[]
no_license
Springhuge/gmall1031
825a2f6e5eef343a8630422475be2c9e553717f6
a518be2516655246f55c13c61b05edd9ac22e536
refs/heads/master
2022-09-30T18:48:42.883786
2020-01-07T13:04:17
2020-01-07T13:04:17
218,785,624
5
0
null
2022-09-01T23:15:05
2019-10-31T14:30:27
Java
UTF-8
Java
false
false
1,401
java
package com.jihu.gmall.gmallmanageweb; import org.csource.common.MyException; import org.csource.fastdfs.ClientGlobal; import org.csource.fastdfs.StorageClient; import org.csource.fastdfs.TrackerClient; import org.csource.fastdfs.TrackerServer; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import java.io.IOException; @RunWith(SpringRunner.class) @SpringBootTest public class GmallManageWebApplicationTests { @Test public void contextLoads() throws IOException, MyException { String tracker = GmallManageWebApplication.class.getResource("/tracker.conf").getPath();//获得配置文件的路径 ClientGlobal.init(tracker); TrackerClient trackerClient = new TrackerClient(); //获得一个trackerServer的实例 TrackerServer trackerServer = trackerClient.getConnection(); //通过tracker获得一个Storage连接客户端 StorageClient storageClient = new StorageClient(trackerServer,null); String[] uploadInfos = storageClient.upload_file("E:/image/u=2381566726,3189538030&fm=26&gp=0.jpg","jpg",null); String url = "http://192.168.164.131"; for (String uploadInfo : uploadInfos) { url += "/"+uploadInfo; } System.out.println(url); } }
[ "529581062@qq.com" ]
529581062@qq.com
42d272a41a2d2cbc454d7671e04a89e7db0ad64c
cd3ccc969d6e31dce1a0cdc21de71899ab670a46
/agp-7.1.0-alpha01/tools/base/testutils/src/test/java/com/android/testutils/apk/DexSubjectTest.java
cad5d747ce4c18dc7def69e44bb032034e836944
[ "Apache-2.0" ]
permissive
jomof/CppBuildCacheWorkInProgress
75e76e1bd1d8451e3ee31631e74f22e5bb15dd3c
9e3475f6d94cb3239f27ed8f8ee81b0abde4ef51
refs/heads/main
2023-05-28T19:03:16.798422
2021-06-10T20:59:25
2021-06-10T20:59:25
374,736,765
0
1
Apache-2.0
2021-06-07T21:06:53
2021-06-07T16:44:55
Java
UTF-8
Java
false
false
3,635
java
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.testutils.apk; import com.android.testutils.truth.DexSubject; import com.google.common.collect.ImmutableList; import com.google.common.truth.Truth; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardOpenOption; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; /** Tests for the {@link com.android.testutils.truth.DexSubject}. */ public class DexSubjectTest { @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); @Test public void checkContains() throws IOException { DexSubject subject = getSubject(); subject.containsClasses("Lcom/example/Foo;"); } @Test public void checkDoesNotContain() throws IOException { DexSubject subject = getSubject(); subject.doesNotContainClasses("Lcom/example/Unexpected;"); } @Test public void checkContainsClassesIn() throws IOException { DexSubject subject = getSubject(); subject.containsClassesIn(ImmutableList.of("Lcom/example/Foo;")); } @Test public void checkContainsExactly() throws IOException { DexSubject subject = getSubject(); subject.containsExactlyClassesIn(ImmutableList.of("Lcom/example/Foo;")); } @Test public void checkContainsFailureMessage() throws IOException { DexSubject subject = getSubject(); try { subject.containsClasses("Lcom/example/NotContained;"); } catch (AssertionError e) { String message = e.getMessage(); Truth.assertThat(message) .isEqualTo( "Not true that <dex file> contains classes " + "<[Lcom/example/NotContained;]>. " + "It is missing <[Lcom/example/NotContained;]>"); } } @Test public void checkContainsExactlyFailureMessage() throws IOException { DexSubject subject = getSubject(); try { subject.containsExactlyClassesIn(ImmutableList.of("Lcom/example/NotContained;")); } catch (AssertionError e) { String message = e.getMessage(); Truth.assertThat(message) .isEqualTo( "Not true that <dex file> contains exactly " + "<[Lcom/example/NotContained;]>. It is missing " + "<[Lcom/example/NotContained;]> and has unexpected items " + "<[Lcom/example/Foo;]>"); } } private DexSubject getSubject() throws IOException { Path dexPath = temporaryFolder.newFile("dex.dex").toPath(); Files.write( dexPath, TestDataCreator.dexFile("com.example.Foo"), StandardOpenOption.TRUNCATE_EXISTING); Dex dex = new Dex(dexPath); return DexSubject.assertThat(dex); } }
[ "jomof@google.com" ]
jomof@google.com
3817c3faf5f98a69933ed9c96cd6c2905b25b230
0d9dc7786b1d5bbe1e338d8390267e3f564bc0d5
/jbp_commons/jbp-common-1-2-5/common/src/main/java/org/jboss/portal/common/util/ContentInfo.java
3076b62e262f1c112e5e4fee219eb994eefd4f99
[]
no_license
jssteux/mig_osivia
43f94d8cc48ab72a3455ecd0a7c70d0fb3f08940
5bfbf2944071e5f9195c4859950686936d730858
refs/heads/master
2020-03-07T00:32:00.613675
2018-04-17T09:10:29
2018-04-17T09:10:29
127,159,771
0
0
null
null
null
null
UTF-8
Java
false
false
2,375
java
/****************************************************************************** * JBoss, a division of Red Hat * * Copyright 2006, Red Hat Middleware, LLC, and individual * * contributors as indicated by the @authors tag. See the * * copyright.txt in the distribution for a full listing of * * individual contributors. * * * * This is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as * * published by the Free Software Foundation; either version 2.1 of * * the License, or (at your option) any later version. * * * * This software is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this software; if not, write to the Free * * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * * 02110-1301 USA, or see the FSF site: http://www.fsf.org. * ******************************************************************************/ package org.jboss.portal.common.util; import org.jboss.portal.common.net.media.MediaType; /** * Describe how content should be interpreted. * * @author <a href="mailto:julien@jboss.org">Julien Viet</a> * @version $Revision: 6704 $ */ public class ContentInfo { /** The content type. */ private final MediaType mediaType; public ContentInfo(MediaType mediaType) { if (mediaType == null) { throw new IllegalArgumentException("Media type cannot be null"); } this.mediaType = mediaType; } public MediaType getMediaType() { return mediaType; } }
[ "Jean-Sébastien@DESKTOP-IKBRQGB" ]
Jean-Sébastien@DESKTOP-IKBRQGB
2fef4a556f2cb1e3d574c57e1746d6b3e9e925ef
30dfd8d1e302c5da024092f533ae4dcea3286bde
/src/test/java/fr/sncf/cpr/trecc/service/UserServiceIT.java
efc8b3a5bdf6bf8759795cb10160cc1e6f072b3a
[]
no_license
aliasoft/trecc-advanced
22377b5d665fde53213f953ba1a1d965a185216f
586c1ce89f857ef974403ee99e4583ca4496af71
refs/heads/master
2022-12-29T05:53:51.989052
2019-05-23T01:06:08
2019-05-23T01:06:08
188,136,271
0
1
null
2022-12-16T04:52:22
2019-05-23T01:04:14
Java
UTF-8
Java
false
false
7,223
java
package fr.sncf.cpr.trecc.service; import fr.sncf.cpr.trecc.Trecc02App; import fr.sncf.cpr.trecc.config.Constants; import fr.sncf.cpr.trecc.domain.User; import fr.sncf.cpr.trecc.repository.UserRepository; import fr.sncf.cpr.trecc.service.dto.UserDTO; import fr.sncf.cpr.trecc.service.util.RandomUtil; import org.apache.commons.lang3.RandomStringUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.auditing.AuditingHandler; import org.springframework.data.auditing.DateTimeProvider; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.time.LocalDateTime; import java.util.Optional; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; /** * Integration tests for {@link UserService}. */ @SpringBootTest(classes = Trecc02App.class) @Transactional public class UserServiceIT { private static final String DEFAULT_LOGIN = "johndoe"; private static final String DEFAULT_EMAIL = "johndoe@localhost"; private static final String DEFAULT_FIRSTNAME = "john"; private static final String DEFAULT_LASTNAME = "doe"; private static final String DEFAULT_IMAGEURL = "http://placehold.it/50x50"; private static final String DEFAULT_LANGKEY = "en"; @Autowired private UserRepository userRepository; @Autowired private UserService userService; @Autowired private AuditingHandler auditingHandler; @Mock private DateTimeProvider dateTimeProvider; private User user; @BeforeEach public void init() { user = new User(); user.setLogin(DEFAULT_LOGIN); user.setPassword(RandomStringUtils.random(60)); user.setActivated(true); user.setEmail(DEFAULT_EMAIL); user.setFirstName(DEFAULT_FIRSTNAME); user.setLastName(DEFAULT_LASTNAME); user.setImageUrl(DEFAULT_IMAGEURL); user.setLangKey(DEFAULT_LANGKEY); when(dateTimeProvider.getNow()).thenReturn(Optional.of(LocalDateTime.now())); auditingHandler.setDateTimeProvider(dateTimeProvider); } @Test @Transactional public void assertThatUserMustExistToResetPassword() { userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.requestPasswordReset("invalid.login@localhost"); assertThat(maybeUser).isNotPresent(); maybeUser = userService.requestPasswordReset(user.getEmail()); assertThat(maybeUser).isPresent(); assertThat(maybeUser.orElse(null).getEmail()).isEqualTo(user.getEmail()); assertThat(maybeUser.orElse(null).getResetDate()).isNotNull(); assertThat(maybeUser.orElse(null).getResetKey()).isNotNull(); } @Test @Transactional public void assertThatOnlyActivatedUserCanRequestPasswordReset() { user.setActivated(false); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.requestPasswordReset(user.getLogin()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional public void assertThatResetKeyMustNotBeOlderThan24Hours() { Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); String resetKey = RandomUtil.generateResetKey(); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey(resetKey); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional public void assertThatResetKeyMustBeValid() { Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey("1234"); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional public void assertThatUserCanResetPassword() { String oldPassword = user.getPassword(); Instant daysAgo = Instant.now().minus(2, ChronoUnit.HOURS); String resetKey = RandomUtil.generateResetKey(); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey(resetKey); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isPresent(); assertThat(maybeUser.orElse(null).getResetDate()).isNull(); assertThat(maybeUser.orElse(null).getResetKey()).isNull(); assertThat(maybeUser.orElse(null).getPassword()).isNotEqualTo(oldPassword); userRepository.delete(user); } @Test @Transactional public void testFindNotActivatedUsersByCreationDateBefore() { Instant now = Instant.now(); when(dateTimeProvider.getNow()).thenReturn(Optional.of(now.minus(4, ChronoUnit.DAYS))); user.setActivated(false); User dbUser = userRepository.saveAndFlush(user); dbUser.setCreatedDate(now.minus(4, ChronoUnit.DAYS)); userRepository.saveAndFlush(user); List<User> users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(now.minus(3, ChronoUnit.DAYS)); assertThat(users).isNotEmpty(); userService.removeNotActivatedUsers(); users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(now.minus(3, ChronoUnit.DAYS)); assertThat(users).isEmpty(); } @Test @Transactional public void assertThatAnonymousUserIsNotGet() { user.setLogin(Constants.ANONYMOUS_USER); if (!userRepository.findOneByLogin(Constants.ANONYMOUS_USER).isPresent()) { userRepository.saveAndFlush(user); } final PageRequest pageable = PageRequest.of(0, (int) userRepository.count()); final Page<UserDTO> allManagedUsers = userService.getAllManagedUsers(pageable); assertThat(allManagedUsers.getContent().stream() .noneMatch(user -> Constants.ANONYMOUS_USER.equals(user.getLogin()))) .isTrue(); } @Test @Transactional public void testRemoveNotActivatedUsers() { // custom "now" for audit to use as creation date when(dateTimeProvider.getNow()).thenReturn(Optional.of(Instant.now().minus(30, ChronoUnit.DAYS))); user.setActivated(false); userRepository.saveAndFlush(user); assertThat(userRepository.findOneByLogin(DEFAULT_LOGIN)).isPresent(); userService.removeNotActivatedUsers(); assertThat(userRepository.findOneByLogin(DEFAULT_LOGIN)).isNotPresent(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
120c2a95118a1fc3c4f5abdd7d5e9cc4306e1447
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.2.jar/classes.jar/gll.java
03aa514b3beb46005d65696e7df82a30c261c332
[]
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
762
java
import com.tencent.mobileqq.activity.flaotaio.FloatAioController; import com.tencent.mobileqq.activity.flaotaio.FloatAioPage; public class gll implements Runnable { public gll(FloatAioController paramFloatAioController, String paramString) {} public void run() { FloatAioPage localFloatAioPage = FloatAioController.a(this.jdField_a_of_type_ComTencentMobileqqActivityFlaotaioFloatAioController, this.jdField_a_of_type_JavaLangString); if (localFloatAioPage != null) { localFloatAioPage.a(null); localFloatAioPage.d(); } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.2.jar\classes.jar * Qualified Name: gll * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
e634577f9eab0235d6496b3c409e8ccab79c1d68
19f7e40c448029530d191a262e5215571382bf9f
/decompiled/instagram/sources/p000X/CPN.java
3d27621a8f285f44d8d0501009f6ed8021bdace9
[]
no_license
stanvanrooy/decompiled-instagram
c1fb553c52e98fd82784a3a8a17abab43b0f52eb
3091a40af7accf6c0a80b9dda608471d503c4d78
refs/heads/master
2022-12-07T22:31:43.155086
2020-08-26T03:42:04
2020-08-26T03:42:04
283,347,288
18
1
null
null
null
null
UTF-8
Java
false
false
3,004
java
package p000X; import com.instagram.model.shopping.Product; import com.instagram.model.shopping.ProductTag; import com.instagram.tagging.activity.MediaTaggingInfo; import com.instagram.tagging.activity.TaggingActivity; import com.instagram.tagging.widget.TagsInteractiveLayout; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /* renamed from: X.CPN */ public final class CPN extends CNT { public final /* synthetic */ TaggingActivity A00; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public CPN(TaggingActivity taggingActivity) { super(taggingActivity); this.A00 = taggingActivity; } public final /* bridge */ /* synthetic */ void onEvent(Object obj) { int A03 = AnonymousClass0Z0.A03(2051050522); CNR cnr = (CNR) obj; int A032 = AnonymousClass0Z0.A03(-2125090758); TaggingActivity taggingActivity = this.A00; String str = cnr.A01; Product product = cnr.A00; if (taggingActivity.A0I.containsKey(str)) { if (!product.A02.A02.equals(taggingActivity.A03.A04())) { if (!TaggingActivity.A0G(taggingActivity)) { Iterator it = taggingActivity.A0A.iterator(); while (it.hasNext()) { MediaTaggingInfo mediaTaggingInfo = (MediaTaggingInfo) it.next(); int indexOf = taggingActivity.A0A.indexOf(mediaTaggingInfo); if (TaggingActivity.A0H(taggingActivity, indexOf)) { ((CPX) taggingActivity.A01.A0B(indexOf).getTag()).A01(mediaTaggingInfo.A0A); } } } else if (TaggingActivity.A0H(taggingActivity, 0)) { taggingActivity.A05.A01(((MediaTaggingInfo) taggingActivity.A0A.get(0)).A0A); } } TagsInteractiveLayout.A01((TagsInteractiveLayout) taggingActivity.A0I.get(str), product, true); } else if (taggingActivity.A0J.contains(str)) { CPR cpr = taggingActivity.A06; String AJQ = cpr.A01.AJQ(); List list = (List) cpr.A03.get(AJQ); if (list != null) { Iterator it2 = list.iterator(); while (true) { if (it2.hasNext()) { if (((ProductTag) it2.next()).A03().equals(product.getId())) { cpr.AET(); break; } } else { break; } } } else { list = new ArrayList(); cpr.A03.put(AJQ, list); } list.add(new ProductTag(product)); cpr.AET(); } TaggingActivity.A0D(taggingActivity, product); AnonymousClass0Z0.A0A(148715860, A032); AnonymousClass0Z0.A0A(-849722760, A03); } }
[ "stan@rooy.works" ]
stan@rooy.works
450bcc372ec02f87e182c9f6812568c1ddfdf910
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_036e22bfb351d1b3322231ffb028fb3ff6edfb2b/AnalyticsDataResource/18_036e22bfb351d1b3322231ffb028fb3ff6edfb2b_AnalyticsDataResource_t.java
deb37cacc6e02e82f2d2afb9d1d98b4105475ad2
[]
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
821
java
package com.pardot.analyticsservice.resources; import com.pardot.analyticsservice.cassandra.CassandraConfiguration; import com.yammer.metrics.annotation.Timed; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; /** * Pardot, an ExactTarget company * User: Michael Frank * Date: 4/17/13 */ @Path("/analyticsdata") @Produces(MediaType.APPLICATION_JSON) public class AnalyticsDataResource { private CassandraConfiguration cassandraConfiguration; public AnalyticsDataResource(CassandraConfiguration cassandraConfiguration) { this.cassandraConfiguration = cassandraConfiguration; } @Path("/configuration") @GET @Timed public CassandraConfiguration showConfiguration() { return cassandraConfiguration; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
04647397a0bbebca608a901411aeaa5df99de763
933535de317888a9a739a6bc62972a6c7f263268
/takin-common-command-channel/src/main/java/io/shulie/takin/channel/exception/ChannelException.java
1bc9f74f66b8c0c370e555b96d5f2131044b2171
[]
no_license
kaizhiyu/Takin-common
c50f5afe6d83b456b8a4cee5c89f7799655f5be0
bfdad54043f1d543a293162e1ee0486b5c133ee6
refs/heads/main
2023-07-15T22:26:52.893213
2021-08-27T08:19:59
2021-08-27T08:19:59
400,744,770
1
0
null
2021-08-28T08:43:12
2021-08-28T08:43:12
null
UTF-8
Java
false
false
1,058
java
/* * Copyright 2021 Shulie Technology, Co.Ltd * Email: shulie@shulie.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, * See the License for the specific language governing permissions and * limitations under the License. */ package io.shulie.takin.channel.exception; /** * @author: Hengyu * @className: ChannelException * @date: 2020/12/29 10:17 下午 * @description: */ public class ChannelException extends Exception { public ChannelException() { } public ChannelException(String message) { super(message); } public ChannelException(String message, Throwable cause) { super(message, cause); } public ChannelException(Throwable cause) { super(cause); } }
[ "hezhongqi@shulie.io" ]
hezhongqi@shulie.io
950f952000cdbd39d8b7ced146b4e8344c8efda1
242b0492840a116aa2ca4d54774ea7f84fd7d142
/renren-admin/src/main/java/io/renren/modules/sys/entity/SysDictEntity.java
f7604b4fff0993859529a5e1acd5a5135d827ea8
[ "Apache-2.0" ]
permissive
smileyuchang/security
633df53c9eb147d26016e8d6456eb08c4a2d2d02
d326b9d31ad18b4d9f7d0f4f50fe172cc430b12c
refs/heads/master
2023-04-03T14:08:05.984555
2021-04-22T07:58:48
2021-04-22T07:58:48
361,603,658
1
0
null
null
null
null
UTF-8
Java
false
false
1,087
java
package io.renren.modules.sys.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import javax.validation.constraints.NotBlank; import java.io.Serializable; /** * 数据字典 * * @author Mark sunlightcs@gmail.com */ @Data @TableName("sys_dict") public class SysDictEntity implements Serializable { private static final long serialVersionUID = 1L; @TableId private Long id; /** * 字典名称 */ @NotBlank(message="字典名称不能为空") private String name; /** * 字典类型 */ @NotBlank(message="字典类型不能为空") private String type; /** * 字典码 */ @NotBlank(message="字典码不能为空") private String code; /** * 字典值 */ @NotBlank(message="字典值不能为空") private String value; /** * 排序 */ private Integer orderNum; /** * 备注 */ private String remark; /** * 删除标记 -1:已删除 0:正常 */ @TableLogic private Integer delFlag; }
[ "12345678" ]
12345678
c8b672697158d43c3cd6dfd5e83c45665b6a2844
732624c8b4175d1ef2d0bb80df678c8872340564
/src/com/qizx/api/Message.java
443bb84ae6cec8e7bab8db0d37d8de0389f8526a
[]
no_license
omarbenhamid/Qizx
3fcd3ae5630a1fee5838454c8391c6b5b7a79ec9
9ae227c16145c468e502be6124ef2d3085399f1a
refs/heads/master
2021-01-20T21:46:32.440205
2016-01-12T11:11:08
2016-01-12T11:11:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,177
java
/* * Qizx/open 4.1 * * This code is the open-source version of Qizx. * Copyright (C) 2004-2009 Axyana Software -- All rights reserved. * * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Initial Developer of the Original Code is Xavier Franc - Axyana Software. * */ package com.qizx.api; import java.io.PrintWriter; /** * Message (error or warning) returned by compilation errors. */ public class Message { /** * Message type returned by {@link #getType()} for an error. */ public static final int ERROR = 1; /** * Message type returned by {@link #getType()} for a warning. */ public static final int WARNING = 2; /** * Message type returned by {@link #getType()} for an auxiliary information * message. */ public static final int DETAIL = 3; private int type; private QName errorCode; private String text; private String moduleURI; private int lineNumber; private int columnNumber; private int position; private String sourceLine; /** * For internal use. * @param type * @param code * @param text * @param moduleURI * @param position * @param lineNumber * @param columnNumber * @param srcLine */ public Message(int type, QName code, String text, String moduleURI, int position, int lineNumber, int columnNumber, String srcLine) { this.type = type; this.errorCode = code; this.text = text; this.moduleURI = moduleURI; this.position = position; this.lineNumber = lineNumber; this.columnNumber = (columnNumber); this.sourceLine = srcLine; } /** * Gets the XQuery error code. * @return the code as a Qualified Name. The namespace of this name is * "http://www.w3.org/2005/xqt-errors" (See XQuery Specifications 2.3.2) */ public QName getErrorCode() { return errorCode; } /** * Gets the related position in the line (or column number). * The first column is 0. * @return the column number */ public int getColumnNumber() { return columnNumber; } /** * Gets the related line number (first line is 1). * @return the line number */ public int getLineNumber() { return lineNumber; } /** * Gets the URI of the concerned XQuery module. * @return the module URI */ public String getModuleURI() { return moduleURI; } /** * Gets the message text. * @return the message text */ public String getText() { return text; } /** * Gets the message type (ERROR or WARNING). * @return the message type */ public int getType() { return type; } /** * Gets the related character position in the whole source script. * @return the character position, starting from 0 */ public int getPosition() { return position; } /** * Gets the text of the related line in the source code. * @return the text of the related line without line terminator */ public String getSourceLine() { return sourceLine; } /** * Prints a single message. * @param output print output * @param withSource if true, print the concerned source line with a mark * under the point where the message is located */ public void print(PrintWriter output, boolean withSource) { if(type == DETAIL) { output.println(getText()); return; } output.print(type == ERROR? "* error" : "* warning"); output.print(" at line " + getLineNumber() + " column " + (getColumnNumber() + 1)); if(moduleURI != null) output.print(" in " + getModuleURI()); output.println(); if(withSource) { output.println(getSourceLine()); for(int i = 0; i < getColumnNumber(); i++) output.print('-'); output.println("^"); } output.println(" " + errorCode.getLocalPart() + ": " + getText()); } /** * Returns a displayable form of the message. * @return displayable string with location and message text */ public String toString() { if(type == DETAIL) return getText(); return (type == ERROR? "Error" : "Warning") + " at line " + getLineNumber() + " column " + (getColumnNumber() + 1) + (moduleURI != null? (" in " + getModuleURI()) : "") + "\n " + getText(); } }
[ "466144425@qq.com" ]
466144425@qq.com
458ce5bb9697d404d87c00331e520f28102967ad
314ab07c6a831e286c7bdddd7c4f61950ac853dd
/prism/src/ca/mcmaster/magarveylab/prism/cluster/reactions/typeII/CGlycosyltransferaseReaction.java
3b25f0f983263cb0ba3d8fb6dc6a48b605499e6a
[]
no_license
jwildenhain/prism-releases
6592e1eb958e53929e2bd1f5563e920c7c47ef88
ed3187f8f6852cd3b8fff4f7ad6e855482c9cd01
refs/heads/master
2020-07-12T01:11:40.801347
2015-10-09T14:47:01
2015-10-09T14:47:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,080
java
package ca.mcmaster.magarveylab.prism.cluster.reactions.typeII; import org.openscience.cdk.interfaces.IAtom; import org.openscience.cdk.interfaces.IAtomContainer; import ca.mcmaster.magarveylab.enums.domains.DomainType; import ca.mcmaster.magarveylab.enums.domains.TailoringDomains; import ca.mcmaster.magarveylab.prism.cluster.reactions.GenericReaction; import ca.mcmaster.magarveylab.prism.cluster.reactions.Reaction; import ca.mcmaster.magarveylab.prism.cluster.reactions.UtilityReactions; import ca.mcmaster.magarveylab.prism.cluster.scaffold.Chemoinformatics.Atoms; import ca.mcmaster.magarveylab.prism.data.Cluster; import ca.mcmaster.magarveylab.prism.data.Domain; import ca.mcmaster.magarveylab.prism.data.Module; import ca.mcmaster.magarveylab.prism.data.reactions.ReactionPlan; import ca.mcmaster.magarveylab.prism.data.structure.Residue; import ca.mcmaster.magarveylab.prism.data.structure.Scaffold; import ca.mcmaster.magarveylab.prism.util.exception.NoResidueException; import ca.mcmaster.magarveylab.prism.util.exception.ScaffoldGenerationException; import ca.mcmaster.magarveylab.prism.util.exception.TailoringSubstrateException; import ca.mcmaster.magarveylab.prism.util.SmilesIO; public class CGlycosyltransferaseReaction extends GenericReaction implements Reaction { public CGlycosyltransferaseReaction(ReactionPlan plan, Scaffold scaffold, Cluster cluster) { super(plan, scaffold, cluster); this.domains = new DomainType[] { TailoringDomains.C_GLYCOSYLTRANSFERASE }; } public void execute() throws NoResidueException, TailoringSubstrateException, ScaffoldGenerationException { IAtomContainer molecule = scaffold.molecule(); Module module = plan.get(0); Domain domain = plan.domain(); if (domain.sugar() == null) throw new TailoringSubstrateException("Error: could not execute C-glycosyltransferase without sugar!"); Residue residue = scaffold.residue(module); IAtomContainer structure = residue.structure(); // alpha carbon w/ only two bonds, bond order sum = 3 IAtom alphaCarbon = residue.alphaCarbon(); if (molecule.getBondOrderSum(alphaCarbon) != 3 || molecule.getConnectedBondsCount(alphaCarbon) != 2) throw new TailoringSubstrateException("Error: could not execute C-glycosyltransferase on alpha carbon" + "with incorrect bonding!"); IAtomContainer sugar = null; try { sugar = SmilesIO.molecule(domain.sugar().smiles()); } catch (Exception e) { throw new ScaffoldGenerationException("Error: could not build sugar SMILES"); } IAtom iodine = Atoms.getIodine(sugar); IAtom connectionAtom = Atoms.getConnectedCarbon(iodine, sugar); UtilityReactions.removeIodine(sugar); // add to scaffold & add bond try { molecule.add(sugar); structure.add(sugar); UtilityReactions.addBond(alphaCarbon, connectionAtom, molecule); } catch (ArrayIndexOutOfBoundsException e) { throw new ScaffoldGenerationException("Error: could not add bond between alpha carbon " + molecule.getAtomNumber(alphaCarbon) + " and sugar atom " + molecule.getAtomNumber(connectionAtom)); } } }
[ "michaelskinnider@gmail.com" ]
michaelskinnider@gmail.com
797303c154356c0726ad74a434446299cf7adcd0
7528f839384eaf2be5da7a1dcc81eb1860b8b436
/library/build/generated/source/buildConfig/release/com/daimajia/slider/library/BuildConfig.java
75b4fd630abcc092e5a73b464dd077a38421832b
[]
no_license
diegomotta/appclasificados
a57e8beedb12ecc7f7b4accdf61176ea519de395
d1cf33dcb66be4227f7a97d8a695274446f9fde4
refs/heads/master
2021-01-19T00:55:44.819929
2016-11-09T12:07:53
2016-11-09T12:07:53
73,280,718
0
0
null
null
null
null
UTF-8
Java
false
false
442
java
/** * Automatically generated file. DO NOT MODIFY */ package com.daimajia.slider.library; public final class BuildConfig { public static final boolean DEBUG = false; public static final String APPLICATION_ID = "com.daimajia.slider.library"; public static final String BUILD_TYPE = "release"; public static final String FLAVOR = ""; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0.9"; }
[ "diegomotta18@gmail.com" ]
diegomotta18@gmail.com
5e065af19e62002202a90c64edfc8e45103097d3
fceef50e47488a9cf8a1486ea8da0bb13d131814
/app/src/main/java/com/mxicoders/skepci/service/MyFirebaseMessagingService.java
129eb52bb714ab253bbfe5c5643fc37479c1a808
[]
no_license
SkyCoders007/Skepsis
fa4451b956cfa3054ba788bfedde494655e4f367
c7789b17d55ed0c6b0ed5ab12046107a4fbf66e1
refs/heads/master
2020-03-16T19:03:35.001515
2018-05-10T12:44:26
2018-05-10T12:44:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,507
java
package com.mxicoders.skepci.service; 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.support.v4.app.NotificationCompat; import android.support.v4.content.LocalBroadcastManager; import android.text.TextUtils; import android.util.Log; import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.RemoteMessage; import com.mxicoders.skepci.R; import com.mxicoders.skepci.activity.ActivityLoginScreen; import com.mxicoders.skepci.utils.Config; import com.mxicoders.skepci.utils.NotificationUtils; import org.json.JSONException; import org.json.JSONObject; /** * Created by Ravi Tamada on 08/08/16. * www.androidhive.info */ public class MyFirebaseMessagingService extends FirebaseMessagingService { private static final String TAG = MyFirebaseMessagingService.class.getSimpleName(); @Override public void onMessageReceived(RemoteMessage remoteMessage) { //Displaying data in log //It is optional Log.d(TAG, "From: " + remoteMessage.getFrom()); Log.d(TAG, "Notification Message Body: " + remoteMessage.getNotification().getBody()); //Calling method to generate notification sendNotification(remoteMessage.getNotification().getBody()); } //This method is only generating push notification //It is same as we did in earlier posts private void sendNotification(String messageBody) { /* Intent intent = new Intent(this, ActivityLoginScreen.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_ONE_SHOT);*/ Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_launcher) .setContentTitle("Skepsis") .setContentText(messageBody) .setAutoCancel(true) .setSound(defaultSoundUri); //.setContentIntent(pendingIntent); NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); notificationManager.notify(0, notificationBuilder.build()); } }
[ "soniakash94@gmail.com" ]
soniakash94@gmail.com
e534c2708e0a7dfe10df37c8fa816102fc2cdbb6
2c0edfcd9e6ddf16a88762a018589cbebe6fa8e8
/CleanSheets/src/main/java/csheets/worklog/n1130523/sprint2/package-info.java
8df1489187929a18cc56fb51c757e7e538d4dc5a
[]
no_license
ABCurado/University-Projects
7fb32b588f2c7fbe384ca947d25928b8d702d667
6c9475f5ef5604955bc21bb4f8b1d113a344d7ab
refs/heads/master
2021-01-12T05:25:21.614584
2017-01-03T15:29:00
2017-01-03T15:29:00
77,926,226
1
3
null
null
null
null
UTF-8
Java
false
false
8,078
java
/** * Technical documentation regarding the work of the team member (1130523) Ruben * Santos during week2. * * <p> * <b>Scrum Master: Marcelo Barroso</b> * * <p> * <b>Area Leader: Rui Freitas</b> * * * <h2>1. Notes</h2> * * * <h2>2. Use Case/Feature: Lang08.1</h2> * * <p> * Issue in Jira: * <a href="http://jira.dei.isep.ipp.pt:8080/browse/LPFOURDG-48">LPFOURDG-48</a> * * <p> * Sub-Task in Jira: * <p> * <a href="http://jira.dei.isep.ipp.pt:8080/browse/LPFOURDG-161">LPFOURDG-161</a> * <p> * <a href="http://jira.dei.isep.ipp.pt:8080/browse/LPFOURDG-162">LPFOURDG-162</a> * <p> * <a href="http://jira.dei.isep.ipp.pt:8080/browse/LPFOURDG-163">LPFOURDG-163</a> * <p> * <a href="http://jira.dei.isep.ipp.pt:8080/browse/LPFOURDG-164">LPFOURDG-164</a> * * <h2>3.1 Requirement for Export XML of Worksheet</h2> * It should be possible to export the contents of an worksheet or part of an * worksheet to an XML file. As we want to optimize as much as possible the * process the solution should not rely on any third party library. Cleansheets * should have a window to configure the XML tags to use for each type of * element. The export should only include the value of the cells. The export * menu option should appear in the File menu. * * * <p> * <b>Use Case 1 - "Export the contents of an workbook to XML file":</b> * <p> * The user inserts all values in the cells and selects File-ExportXML, defines * content like workbook, if he wants, defines the tags to see in XML file, * assign file title and save it. * * <p> * <b>Use Case 2 - "Export the contents of an Worksheet to XML file":</b> * <p> * The user inserts all values in the cells and selects File-ExportXML, defines * the worksheet to save, if he wants, defines the tags to see in XML file, * assign file title and save it. * * <p> * <b>Use Case 3 - "Export part of an worksheet to an XML file":</b> * <p> * The user inserts all values in the cells and selects File-ExportXML, selects * cells to export, the worksheet to save, if he wants, defines the tags to see * in XML file, assign file title and save it. * * <h2>4.2 Analysis - Export XML</h2> * The user must have the option to export the worksheet information to a * standard xml file with the defined tags (Woorkbook-SpreadSheet-row-column) or * set these tags with the names what the user wants. The user can choose one of * this options: Export the contents of an workbook to XML file, Export the * contents of an Worksheet to XML file and Export part of an worksheet to an * XML file. * * * <h3> First "analysis" sequence diagram - Export XML of Worksheetk</h3> * * <p> * <img src="doc-files/lang08.1_Export_xml_sd_analysis.png" alt="image"> * * <h2>5. Design</h2> * * <h3>5.1. Functional Tests</h3> * * Basically, for the development and after analysis, we test if the content of * the cells of xml file it´s correct for each column and row. I have to test if * the tags have been changed according to what the user wants and if show only * the columns and rows that had been written. * * * <h3>5.2. UC Realization</h3> * * I have to manipulate tags xml and create 3 methods on class ExportXML: * exportWorkbook - Export the contents of an Worksheet to XML file; * exportSpreadsheetSelected - Export part of an worksheet to an XML file; * exportSpreadsheet - Export XML of Worksheet; In each method gets the various * cleancheets tags per parameter, these variables received, will be written to * an XML file. If the user wants can edit these tags and file sets, according * to defined tags by user. It´s necessary to create a class ExportXMLAction and * ExportXMLController to call all methods to export. Will be using a * FileChooser to choose the type of file, StringBuilder to construct the format * of XML File and FileWriter to create and write in the file. * * * * * <h3>5.3. Classes</h3> * * * <h3>5.4. Design Patterns and Best Practices</h3> * <p> * Implemented Patterns: Low Coupling - High Cohesion. * * <h2>6. Implementation</h2> * * <p> * <b>Use Case 1 - "Export the contents of an workbook to XML file"</b> * * <img src="doc-files/lang08.1_Export_xml_sd_design_1.png" alt="Export_xml_sd_design_3"> * * <p> * <b>Use Case 2 - "Export the contents of an Worksheet to XML file"</b> * * <img src="doc-files/lang08.1_Export_xml_sd_design_3.png" alt="Export_xml_sd_design_3"> * * <p> * <b>Use Case 3 - "Export part of an worksheet to an XML file"</b> * * <img src="doc-files/lang08.1_Export_xml_sd_design_2.png" alt="Export_xml_sd_design_2"> * * <b>Created Classes</b>: * * <p> * ExportXML, ExportXMLAction, ExportXMLController, ExportXMLPanel and * ExportMenu * * <b>Updated Classes/Files</b>: * * <p> * MenuBar * * <h2>7. Integration/Demonstration</h2> * * -In this section document your contribution and efforts to the integration of * your work with the work of the other elements of the team and also your work * regarding the demonstration (i.e., tests, updating of scripts, etc.)- * * <h2>8. Final Remarks</h2> * * -In this section present your views regarding alternatives, extra work and * future work on the issue.- * <p> * As an extra this use case also implements a small cell visual decorator if * the cell has a comment. This "feature" is not documented in this page. * </p> * * <h2>9. Work Log</h2> * * -Insert here a log of you daily work. This is in essence the log of your * daily standup meetings.- * <p> * Example * </p> * <b>Monday</b> * <p> * Yesterday I worked on: * </p> * 1. Analysis of Lang08.1 - Export XML 2. Part of Design Lang08.1 - Export XML * <p> * Today * </p> * 1. Design Lang08.1 - Export XML, 2. Implementation, 3 - Analysis of Lang08.1 * - Export XML completed * <p> * Blocking: * </p> * 1. nothing * <p> * <b>Tuesday</b> * </p> * Yesterday I worked on: * <p> * 1. Design Lang08.1 - Export XML 2. Implementation, 3 - Analysis completed * </p> * Today * <p> * 1. Design Lang08.1 - Export XML completed, 2. Implementation * </p> * Blocking: * <p> * 1. nothing * </p> * <p> * <b>Wednesday</b> * </p> * Yesterday I worked on: * <p> * 1. Design Lang08.1 - Export XML completed, 2. Implementation * </p> * Today * <p> * 1. Update Worklog, 2. Tests * </p> * Blocking: * <p> * 1. nothing * </p> * <p> * <b>Thursday</b> * </p> * Yesterday I worked on: * <p> * 1. Update Worklog, 2. Tests, 3. Helped friends in other use cases * </p> * Today * <p> * 1. Sprint 2 Apresentation. * <p> * 1. nothing * </p> * * <p> * <b>Friday</b> * </p> * Yesterday I worked on: * <p> * TEXT * </p> * Today * <p> * TEXT * </p> * Blocking: * <p> * 1. nothing * </p> * * <h2>10. Self Assessment</h2> * * During this sprint, my work was mainly of analysis and study of the * application architecture. * * <h3>10.1. Design and Implementation:</h3> * * 3- bom: os testes cobrem uma parte significativa das funcionalidades (ex: * mais de 50%) e apresentam código que para além de não ir contra a arquitetura * do cleansheets segue ainda as boas práticas da área técnica (ex: * sincronização, padrões de eapli, etc.) * <p> * <b>Evidences:</b> * </p> * - url of commit: ... - description: this commit is related to the * implementation of the design pattern ...- * * Implementation commits (links only open in new windows - select option * browser to open in new windows) : * * <p> * <a href="https://bitbucket.org/lei-isep/lapr4-2016-2dg/commits/d0facf0dad250c4ed017266ddedeacadb4c1e691">Implementation</a> * <p> * <a href="https://bitbucket.org/lei-isep/lapr4-2016-2dg/commits/b978f78ac8f18266a477bc163f23225fada4091c">Implementation * Corrections</a> * * <h3>10.2. Teamwork: ...</h3> * * <h3>10.3. Technical Documentation: ...</h3> * * @author Ruben Santos */ package csheets.worklog.n1130523.sprint2; /** * This class is only here so that javadoc includes the documentation about this * EMPTY package! Do not remove this class! * * @author ruben */ class _Dummy_ { }
[ "1140280@isep.ipp.pt" ]
1140280@isep.ipp.pt
c492b26049bcd38289a1671efb10642f275ad39e
33c3fd2a137b193d6055fd4412966280e7caf98c
/Platform/src/net/sf/anathema/framework/reporting/ControlledFileChooser.java
7fcf49aa3f35424547a581d49b19b484ae17c4c4
[]
no_license
lordarcanix/anathema
633628a2e42701017149e57358a2a11cd2d6a9d2
177a8cc4f53a28e932d287bbe4eb007afaf6d5fd
refs/heads/master
2021-01-24T02:16:05.206853
2013-03-12T21:31:08
2013-03-12T21:31:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,625
java
package net.sf.anathema.framework.reporting; import net.sf.anathema.framework.repository.IItem; import net.sf.anathema.lib.gui.file.FileChoosingUtilities; import net.sf.anathema.lib.lang.StringUtilities; import net.sf.anathema.lib.resources.IResources; import javax.swing.JComponent; import javax.swing.JOptionPane; import java.awt.Component; import java.nio.file.Files; import java.nio.file.Path; public class ControlledFileChooser implements FileChooser { private IItem item; private IResources resources; private JComponent parent; public ControlledFileChooser(IItem item, IResources resources, JComponent parent) { this.item = item; this.resources = resources; this.parent = parent; } @Override public Path getPrintFile() { String suggestedFileName = getBaseName(item) + PrintCommand.PDF_EXTENSION; Path selectedFile = FileChoosingUtilities.selectSaveFile(parent, suggestedFileName); if (selectedFile == null) { return null; } if (!checkFileAllowed(parent, selectedFile)) { return null; } return selectedFile; } private boolean checkFileAllowed(Component parentComponent, Path selectedFile) { String message = resources.getString("Anathema.Reporting.PrintAction.OverwriteMessage"); String title = resources.getString("Anathema.Reporting.PrintAction.OverwriteTitle"); return !Files.exists(selectedFile) || JOptionPane.showConfirmDialog(parentComponent, message, title, JOptionPane.YES_NO_OPTION) != 1; } private String getBaseName(IItem item) { return StringUtilities.getFileNameRepresentation(item.getDisplayName()); } }
[ "sandra.sieroux@googlemail.com" ]
sandra.sieroux@googlemail.com
5fc79c8a837304ae6e69c4d1bc60c9a03e6f4c79
e977c424543422f49a25695665eb85bfc0700784
/benchmark/bugsjar/wicket/2b6da516/buggy-version/wicket-core/src/main/java/org/apache/wicket/request/mapper/CryptoMapper.java
4e632f80e7704e240e7ff86a16d5d4a91b3e34e4
[]
no_license
amir9979/pattern-detector-experiment
17fcb8934cef379fb96002450d11fac62e002dd3
db67691e536e1550245e76d7d1c8dced181df496
refs/heads/master
2022-02-18T10:24:32.235975
2019-09-13T15:42:55
2019-09-13T15:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,448
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.request.mapper; import java.util.List; import org.apache.wicket.Application; import org.apache.wicket.request.IRequestHandler; import org.apache.wicket.request.IRequestMapper; import org.apache.wicket.request.Request; import org.apache.wicket.request.Url; import org.apache.wicket.util.IProvider; import org.apache.wicket.util.crypt.ICrypt; import org.apache.wicket.util.string.Strings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Request mapper that encrypts urls generated by another mapper. The original URL (both segments * and parameters) is encrypted and is represented as URL segment. To be able to handle relative * URLs for images in .css file the same amount of URL segments that the original URL had are * appended to the encrypted URL. Each segment has a precise 5 character value, calculated using a * checksum. This helps in calculating the relative distance from the original URL. When a URL is * returned by the browser, we iterate through these checksummed placeholder URL segments. If the * segment matches the expected checksum, then the segment it deemed to be the corresponding segment * in the encrypted URL. If the segment does not match the expected checksum, then the segment is * deemed a plain text sibling of the corresponding segment in the encrypted URL, and all subsequent * segments are considered plain text children of the current segment. * * * @author igor.vaynberg * @author Jesse Long */ public class CryptoMapper implements IRequestMapper { private static final Logger log = LoggerFactory.getLogger(CryptoMapper.class); private final IRequestMapper wrappedMapper; private final IProvider<ICrypt> cryptProvider; /** * Construct. * * @param wrappedMapper * the non-crypted request mapper * @param application * the current application */ public CryptoMapper(final IRequestMapper wrappedMapper, final Application application) { this(wrappedMapper, new ApplicationCryptProvider(application)); } /** * Construct. * * @param wrappedMapper * the non-crypted request mapper * @param cryptProvider * the custom crypt provider */ public CryptoMapper(final IRequestMapper wrappedMapper, final IProvider<ICrypt> cryptProvider) { this.wrappedMapper = wrappedMapper; this.cryptProvider = cryptProvider; } public int getCompatibilityScore(final Request request) { return 0; } public Url mapHandler(final IRequestHandler requestHandler) { final Url url = wrappedMapper.mapHandler(requestHandler); if (url == null) { return null; } return encryptUrl(url); } public IRequestHandler mapRequest(final Request request) { Url url = decryptUrl(request, request.getUrl()); if (url == null) { return null; } return wrappedMapper.mapRequest(request.cloneWithUrl(url)); } private ICrypt getCrypt() { return cryptProvider.get(); } private Url encryptUrl(final Url url) { if (url.getSegments().isEmpty() && url.getQueryParameters().isEmpty()) { return url; } String encryptedUrlString = getCrypt().encryptUrlSafe(url.toString()); Url encryptedUrl = new Url(url.getCharset()); encryptedUrl.getSegments().add(encryptedUrlString); int numberOfSegments = url.getSegments().size(); if (numberOfSegments == 0 && !url.getQueryParameters().isEmpty()) { numberOfSegments = 1; } char[] encryptedChars = encryptedUrlString.toCharArray(); int hash = 0; for (int segNo = 0; segNo < numberOfSegments; segNo++) { char a = encryptedChars[Math.abs(hash % encryptedChars.length)]; hash++; char b = encryptedChars[Math.abs(hash % encryptedChars.length)]; hash++; char c = encryptedChars[Math.abs(hash % encryptedChars.length)]; String segment = "" + a + b + c; hash = hashString(segment); segment += String.format("%02x", Math.abs(hash % 256)); encryptedUrl.getSegments().add(segment); hash = hashString(segment); } return encryptedUrl; } private Url decryptUrl(final Request request, final Url encryptedUrl) { if (encryptedUrl.getSegments().isEmpty() && encryptedUrl.getQueryParameters().isEmpty()) { return encryptedUrl; } List<String> segments = encryptedUrl.getSegments(); if (segments.size() < 2) { return null; } Url url = new Url(request.getCharset()); try { String encryptedUrlString = segments.get(0); if (Strings.isEmpty(encryptedUrlString)) { return null; } String decryptedUrl = getCrypt().decryptUrlSafe(encryptedUrlString); Url originalUrl = Url.parse(decryptedUrl, request.getCharset()); int originalNumberOfSegments = originalUrl.getSegments().size(); if (originalNumberOfSegments == 0 && originalUrl.getQueryParameters().isEmpty() == false) { originalNumberOfSegments = 1; } int numberOfSegments = encryptedUrl.getSegments().size(); char[] encryptedChars = encryptedUrlString.toCharArray(); int hash = 0; int segNo; for (segNo = 1; segNo < numberOfSegments && segNo < originalNumberOfSegments + 1; segNo++) { char a = encryptedChars[Math.abs(hash % encryptedChars.length)]; hash++; char b = encryptedChars[Math.abs(hash % encryptedChars.length)]; hash++; char c = encryptedChars[Math.abs(hash % encryptedChars.length)]; String segment = "" + a + b + c; hash = hashString(segment); segment += String.format("%02x", Math.abs(hash % 256)); hash = hashString(segment); if (segment.equals(segments.get(segNo)) && originalUrl.getSegments().size() >= segNo) { url.getSegments().add(originalUrl.getSegments().get(segNo - 1)); } else { break; } } url.getQueryParameters().addAll(originalUrl.getQueryParameters()); } catch (Exception e) { log.error("Error decrypting URL", e); url = null; } return url; } private int hashString(final String str) { int hash = 97; for (char c : str.toCharArray()) { int i = c; hash = 47 * hash + i; } return hash; } private static class ApplicationCryptProvider implements IProvider<ICrypt> { private final Application application; public ApplicationCryptProvider(final Application application) { this.application = application; } public ICrypt get() { return application.getSecuritySettings().getCryptFactory().newCrypt(); } } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
4673cfe8316dcc671e941d9ed32109a6cca57ee2
d1ea5077c83cb2e93fe69e3d19a2e26efe894a0e
/src/main/java/com/rograndec/feijiayun/chain/business/report/quality/storage/vo/LagSaleGoodsVO.java
b7058579a74838f2124061df7f3cdf8bab1c4a7f
[]
no_license
Catfeeds/rog-backend
e89da5a3bf184e4636169e7492a97dfd0deef2a1
109670cfec6cbe326b751e93e49811f07045e531
refs/heads/master
2020-04-05T17:36:50.097728
2018-10-22T16:23:55
2018-10-22T16:23:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,870
java
package com.rograndec.feijiayun.chain.business.report.quality.storage.vo; import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import com.rograndec.feijiayun.chain.business.report.common.vo.BaseGoodsDetailVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @ApiModel(value = "LagSaleGoodsVO", description = "滞销商品列表") public class LagSaleGoodsVO extends BaseGoodsDetailVO{ /** * @Description: TODO(描述funcion功能) * author yuting.li * @date 2017年10月21日 下午3:35:22 * @version 1.0 */ private static final long serialVersionUID = 1L; @ApiModelProperty(value = "企业编码") private String enterpriseCode; @ApiModelProperty(value = "企业名称") private String enterpriseName; @ApiModelProperty(value = "数量") private BigDecimal usableQuantity; @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "销售日期") private Date saleDate; @ApiModelProperty(value = "滞销周期",hidden=true) private Integer unsalableCycle; @ApiModelProperty(value = "滞销周期") private String unsalableCycleDesc; @ApiModelProperty(value = "0-天;1-月;2-年",hidden=true) private Integer unsalableCycleUnit; @ApiModelProperty(value = "滞销天数") private int unsalableDay; public String getEnterpriseCode() { return enterpriseCode; } public void setEnterpriseCode(String enterpriseCode) { this.enterpriseCode = enterpriseCode; } public String getEnterpriseName() { return enterpriseName; } public void setEnterpriseName(String enterpriseName) { this.enterpriseName = enterpriseName; } public BigDecimal getUsableQuantity() { return usableQuantity; } public void setUsableQuantity(BigDecimal usableQuantity) { this.usableQuantity = usableQuantity; } public Date getSaleDate() { return saleDate; } public void setSaleDate(Date saleDate) { this.saleDate = saleDate; } public Integer getUnsalableCycle() { return unsalableCycle; } public void setUnsalableCycle(Integer unsalableCycle) { this.unsalableCycle = unsalableCycle; } public int getUnsalableDay() { return unsalableDay; } public void setUnsalableDay(int unsalableDay) { this.unsalableDay = unsalableDay; } public Integer getUnsalableCycleUnit() { return unsalableCycleUnit; } public void setUnsalableCycleUnit(Integer unsalableCycleUnit) { this.unsalableCycleUnit = unsalableCycleUnit; } public String getUnsalableCycleDesc() { if(null != unsalableCycle) { unsalableCycleDesc = unsalableCycle + "天"; } return unsalableCycleDesc; } public void setUnsalableCycleDesc(String unsalableCycleDesc) { this.unsalableCycleDesc = unsalableCycleDesc; } }
[ "ruifeng.jia@rograndec.com" ]
ruifeng.jia@rograndec.com
2a88bcdd2b9d0b260c0d5b26f4e6d93f18620d6a
9dd97350ef4861f9331217c6128f004cf078942e
/src/main/java/pl/training/shop/payments/IncrementalPaymentIdGenerator.java
74f2621eb817dbb964b2bc00e8d58afdd474d723
[]
no_license
jalowiec/spring-sages
2ca4caf3c64470828570315c52d8d2ab22b1d415
be95160f1319f498cc1d56cfb11fd08ccc5ebd5d
refs/heads/master
2023-08-17T03:18:25.541571
2021-09-25T18:26:56
2021-09-25T18:26:56
387,023,001
0
0
null
null
null
null
UTF-8
Java
false
false
454
java
package pl.training.shop.payments; import lombok.Setter; import org.springframework.stereotype.Component; import org.springframework.stereotype.Service; //@IdGenerator("incremental") public class IncrementalPaymentIdGenerator implements PaymentIdGenerator{ private static final String ID_FORMAT = "%010d"; @Setter private long index; @Override public String getNext() { return String.format(ID_FORMAT, ++index); } }
[ "lukasz.jalowiecki@gmail.com" ]
lukasz.jalowiecki@gmail.com
38216cabf8c25c1215a2139f62c67d638526057f
8699368f9b2d61f524374034a5fc5458eb0783c4
/src/test/java/br/repo4/web/rest/UserJWTControllerIT.java
48b5095f91846a1703465b73bff8f7390a32c2c9
[]
no_license
artest2020/repo4
fde5f61d77d0e6f3796940d24c25d4e851363e17
dcce95b649d9d20dbc2fa4459753326abe29487c
refs/heads/master
2020-12-04T15:39:28.284269
2020-01-04T19:59:07
2020-01-04T19:59:07
231,820,690
0
0
null
null
null
null
UTF-8
Java
false
false
4,702
java
package br.repo4.web.rest; import br.repo4.Repo4App; import br.repo4.domain.User; import br.repo4.repository.UserRepository; import br.repo4.security.jwt.TokenProvider; import br.repo4.web.rest.errors.ExceptionTranslator; import br.repo4.web.rest.vm.LoginVM; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.isEmptyString; import static org.hamcrest.Matchers.not; /** * Integration tests for the {@link UserJWTController} REST controller. */ @SpringBootTest(classes = Repo4App.class) public class UserJWTControllerIT { @Autowired private TokenProvider tokenProvider; @Autowired private AuthenticationManagerBuilder authenticationManager; @Autowired private UserRepository userRepository; @Autowired private PasswordEncoder passwordEncoder; @Autowired private ExceptionTranslator exceptionTranslator; private MockMvc mockMvc; @BeforeEach public void setup() { UserJWTController userJWTController = new UserJWTController(tokenProvider, authenticationManager); this.mockMvc = MockMvcBuilders.standaloneSetup(userJWTController) .setControllerAdvice(exceptionTranslator) .build(); } @Test @Transactional public void testAuthorize() throws Exception { User user = new User(); user.setLogin("user-jwt-controller"); user.setEmail("user-jwt-controller@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller"); login.setPassword("test"); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()) .andExpect(header().string("Authorization", not(nullValue()))) .andExpect(header().string("Authorization", not(isEmptyString()))); } @Test @Transactional public void testAuthorizeWithRememberMe() throws Exception { User user = new User(); user.setLogin("user-jwt-controller-remember-me"); user.setEmail("user-jwt-controller-remember-me@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller-remember-me"); login.setPassword("test"); login.setRememberMe(true); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()) .andExpect(header().string("Authorization", not(nullValue()))) .andExpect(header().string("Authorization", not(isEmptyString()))); } @Test public void testAuthorizeFails() throws Exception { LoginVM login = new LoginVM(); login.setUsername("wrong-user"); login.setPassword("wrong password"); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isUnauthorized()) .andExpect(jsonPath("$.id_token").doesNotExist()) .andExpect(header().doesNotExist("Authorization")); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
5eb1946c4c29b033c8774da76ca42f72b47c1254
a4a2f08face8d49aadc16b713177ba4f793faedc
/flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraTupleWriteAheadSink.java
6334819152ea3cd916f9f0bb25026143557122ff
[ "BSD-3-Clause", "MIT", "OFL-1.1", "ISC", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
wyfsxs/blink
046d64afe81a72d4d662872c007251d94eb68161
aef25890f815d3fce61acb3d1afeef4276ce64bc
refs/heads/master
2021-05-16T19:05:23.036540
2020-03-27T03:42:35
2020-03-27T03:42:35
250,431,969
0
1
Apache-2.0
2020-03-27T03:48:25
2020-03-27T03:34:26
Java
UTF-8
Java
false
false
5,435
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.streaming.connectors.cassandra; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.api.java.ClosureCleaner; import org.apache.flink.api.java.tuple.Tuple; import org.apache.flink.api.java.typeutils.runtime.TupleSerializer; import org.apache.flink.streaming.runtime.operators.CheckpointCommitter; import org.apache.flink.streaming.runtime.operators.GenericWriteAheadSink; import com.datastax.driver.core.BoundStatement; import com.datastax.driver.core.Cluster; import com.datastax.driver.core.PreparedStatement; import com.datastax.driver.core.ResultSet; import com.datastax.driver.core.ResultSetFuture; import com.datastax.driver.core.Session; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; /** * Sink that emits its input elements into a Cassandra database. This sink stores incoming records within a * {@link org.apache.flink.runtime.state.AbstractStateBackend}, and only commits them to cassandra * if a checkpoint is completed. * * @param <IN> Type of the elements emitted by this sink */ public class CassandraTupleWriteAheadSink<IN extends Tuple> extends GenericWriteAheadSink<IN> { private static final long serialVersionUID = 1L; protected transient Cluster cluster; protected transient Session session; private final String insertQuery; private transient PreparedStatement preparedStatement; private ClusterBuilder builder; private transient Object[] fields; protected CassandraTupleWriteAheadSink(String insertQuery, TypeSerializer<IN> serializer, ClusterBuilder builder, CheckpointCommitter committer) throws Exception { super(committer, serializer, UUID.randomUUID().toString().replace("-", "_")); this.insertQuery = insertQuery; this.builder = builder; ClosureCleaner.clean(builder, true); } public void open() throws Exception { super.open(); if (!getRuntimeContext().isCheckpointingEnabled()) { throw new IllegalStateException("The write-ahead log requires checkpointing to be enabled."); } cluster = builder.getCluster(); session = cluster.connect(); preparedStatement = session.prepare(insertQuery); fields = new Object[((TupleSerializer<IN>) serializer).getArity()]; } @Override public void close() throws Exception { super.close(); try { if (session != null) { session.close(); } } catch (Exception e) { LOG.error("Error while closing session.", e); } try { if (cluster != null) { cluster.close(); } } catch (Exception e) { LOG.error("Error while closing cluster.", e); } } @Override protected boolean sendValues(Iterable<IN> values, long checkpointId, long timestamp) throws Exception { final AtomicInteger updatesCount = new AtomicInteger(0); final AtomicInteger updatesConfirmed = new AtomicInteger(0); final AtomicReference<Throwable> exception = new AtomicReference<>(); FutureCallback<ResultSet> callback = new FutureCallback<ResultSet>() { @Override public void onSuccess(ResultSet resultSet) { updatesConfirmed.incrementAndGet(); if (updatesCount.get() > 0) { // only set if all updates have been sent if (updatesCount.get() == updatesConfirmed.get()) { synchronized (updatesConfirmed) { updatesConfirmed.notifyAll(); } } } } @Override public void onFailure(Throwable throwable) { if (exception.compareAndSet(null, throwable)) { LOG.error("Error while sending value.", throwable); synchronized (updatesConfirmed) { updatesConfirmed.notifyAll(); } } } }; //set values for prepared statement int updatesSent = 0; for (IN value : values) { for (int x = 0; x < value.getArity(); x++) { fields[x] = value.getField(x); } //insert values and send to cassandra BoundStatement s = preparedStatement.bind(fields); s.setDefaultTimestamp(timestamp); ResultSetFuture result = session.executeAsync(s); updatesSent++; if (result != null) { //add callback to detect errors Futures.addCallback(result, callback); } } updatesCount.set(updatesSent); synchronized (updatesConfirmed) { while (exception.get() == null && updatesSent != updatesConfirmed.get()) { updatesConfirmed.wait(); } } if (exception.get() != null) { LOG.warn("Sending a value failed.", exception.get()); return false; } else { return true; } } @Override public void endInput() throws Exception { // do nothing now. } }
[ "yafei.wang@transwarp.io" ]
yafei.wang@transwarp.io
13b40bb653ed3c491aa2de1141d7135aecd122f9
9a0366063dd20c75ab5c195352ad99d17de0244b
/3.JavaMultithreading/src/com/javarush/task/task29/task2909/car/Cabriolet.java
4db5b9bc7a3db2a876ce79d0a7d250a2313a47c4
[]
no_license
savinovvu/JavaRushTasks
606aa0a631923d5db31dbbfc40b680e5eb9193e6
9f4b0bf755d2b869be998c086b1696a2c2c2e8c7
refs/heads/master
2021-07-23T21:30:54.143832
2017-11-01T12:23:53
2017-11-01T12:23:53
105,756,517
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
package com.javarush.task.task29.task2909.car; public class Cabriolet extends Car { public Cabriolet( int numberOfPassengers) { super(2, numberOfPassengers); } @Override public int getMaxSpeed() { return MAX_CABRIOLET_SPEED; } }
[ "savinov_vu@inbox.ru" ]
savinov_vu@inbox.ru
080c569d80e66658758141552312a0c4aa689c76
464dff48c06623cc484bddc1c8092e7c1ef59735
/inject-test/src/test/java/org/example/request/JexController.java
90257fb00ad3389556b4c66588eff8bc980b9227
[ "Apache-2.0" ]
permissive
i-wings/avaje-inject
1637fec1f79bec07f206519762eff43f5fb18e47
729aafbf1a236dec49a3480b99c71d946618c286
refs/heads/master
2023-01-28T03:25:23.526804
2020-10-28T22:23:53
2020-10-28T22:23:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
314
java
package org.example.request; import io.avaje.http.api.Controller; import io.avaje.jex.Context; import javax.inject.Inject; @Controller public class JexController { @Inject AService service; @Inject Context context; public String get() { return "hi " + context.toString() + service.hi(); } }
[ "robin.bygrave@gmail.com" ]
robin.bygrave@gmail.com
5d62cc6e8deaa451c070a650aa7b402dcb1ba499
fc5f16c7dd1cd7aee2d2ca0eb414860b5ad6d384
/src/temp/src/minecraft_server/net/minecraft/src/BanEntry.java
e51412f7d48ff1277365572154ca7109bf46a034
[]
no_license
Nickorama21/Minecraft--TI-Nspire-CX-Port
44eeca7a742d199e223d712866352a9e12b3290c
95acc13c310f519ed8d4ed5a755ef70712da532f
refs/heads/master
2020-05-17T11:31:43.456900
2012-09-01T17:24:47
2012-09-01T17:24:52
5,623,326
4
1
null
null
null
null
UTF-8
Java
false
false
4,129
java
package net.minecraft.src; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Pattern; public class BanEntry { public static final SimpleDateFormat field_73698_a = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z"); public static Logger field_73696_b = Logger.getLogger("Minecraft"); private final String field_73697_c; private Date field_73694_d = new Date(); private String field_73695_e = "(Unknown)"; private Date field_73692_f = null; private String field_73693_g = "Banned by an operator."; public BanEntry(String p_i3367_1_) { this.field_73697_c = p_i3367_1_; } public String func_73684_a() { return this.field_73697_c; } public Date func_73683_b() { return this.field_73694_d; } public void func_73681_a(Date p_73681_1_) { this.field_73694_d = p_73681_1_ != null?p_73681_1_:new Date(); } public String func_73690_c() { return this.field_73695_e; } public void func_73687_a(String p_73687_1_) { this.field_73695_e = p_73687_1_; } public Date func_73680_d() { return this.field_73692_f; } public void func_73691_b(Date p_73691_1_) { this.field_73692_f = p_73691_1_; } public boolean func_73682_e() { return this.field_73692_f == null?false:this.field_73692_f.before(new Date()); } public String func_73686_f() { return this.field_73693_g; } public void func_73689_b(String p_73689_1_) { this.field_73693_g = p_73689_1_; } public String func_73685_g() { StringBuilder var1 = new StringBuilder(); var1.append(this.func_73684_a()); var1.append("|"); var1.append(field_73698_a.format(this.func_73683_b())); var1.append("|"); var1.append(this.func_73690_c()); var1.append("|"); var1.append(this.func_73680_d() == null?"Forever":field_73698_a.format(this.func_73680_d())); var1.append("|"); var1.append(this.func_73686_f()); return var1.toString(); } public static BanEntry func_73688_c(String p_73688_0_) { if(p_73688_0_.trim().length() < 2) { return null; } else { String[] var1 = p_73688_0_.trim().split(Pattern.quote("|"), 5); BanEntry var2 = new BanEntry(var1[0].trim()); byte var3 = 0; int var10000 = var1.length; int var7 = var3 + 1; if(var10000 <= var7) { return var2; } else { try { var2.func_73681_a(field_73698_a.parse(var1[var7].trim())); } catch (ParseException var6) { field_73696_b.log(Level.WARNING, "Could not read creation date format for ban entry \'" + var2.func_73684_a() + "\' (was: \'" + var1[var7] + "\')", var6); } var10000 = var1.length; ++var7; if(var10000 <= var7) { return var2; } else { var2.func_73687_a(var1[var7].trim()); var10000 = var1.length; ++var7; if(var10000 <= var7) { return var2; } else { try { String var4 = var1[var7].trim(); if(!var4.equalsIgnoreCase("Forever") && var4.length() > 0) { var2.func_73691_b(field_73698_a.parse(var4)); } } catch (ParseException var5) { field_73696_b.log(Level.WARNING, "Could not read expiry date format for ban entry \'" + var2.func_73684_a() + "\' (was: \'" + var1[var7] + "\')", var5); } var10000 = var1.length; ++var7; if(var10000 <= var7) { return var2; } else { var2.func_73689_b(var1[var7].trim()); return var2; } } } } } } }
[ "nickparker.stl@gmail.com" ]
nickparker.stl@gmail.com
071a902edb2f658e25786a94bc1847a78113c51c
6832918e1b21bafdc9c9037cdfbcfe5838abddc4
/jdk_8_maven/cs/rest/original/languagetool/languagetool-core/src/test/java/org/languagetool/rules/neuralnetwork/DictionaryTest.java
b9e35d92c4c62c96169b33376a78117488591335
[ "Apache-2.0", "GPL-1.0-or-later", "LGPL-2.0-or-later", "LGPL-2.1-only" ]
permissive
EMResearch/EMB
200c5693fb169d5f5462d9ebaf5b61c46d6f9ac9
092c92f7b44d6265f240bcf6b1c21b8a5cba0c7f
refs/heads/master
2023-09-04T01:46:13.465229
2023-04-12T12:09:44
2023-04-12T12:09:44
94,008,854
25
14
Apache-2.0
2023-09-13T11:23:37
2017-06-11T14:13:22
Java
UTF-8
Java
false
false
1,300
java
/* LanguageTool, a natural language style checker * Copyright (C) 2017 Markus Brenneis * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ package org.languagetool.rules.neuralnetwork; import org.junit.Test; import static org.junit.Assert.assertEquals; public class DictionaryTest { @Test public void mapFromStringTest() { String dictionary = "{'a': 3, 'asa': 1, 'UNK': 42}"; Dictionary dict = new Dictionary(dictionary); assertEquals(new Integer(1), dict.get("asa")); assertEquals(new Integer(3), dict.safeGet("a")); assertEquals(new Integer(42), dict.safeGet("foo")); } }
[ "arcuri82@gmail.com" ]
arcuri82@gmail.com
2b39e090972b17fd375a8f59296c783fcb5dc380
bf57bfa259f08e65220ec34d81d1d5a54711211e
/src/main/java/com/zxsm/wsc/common/SerchTools/LogicalExpression.java
34b64d1e458446b4fe25902a5306d5efd4e66d0f
[]
no_license
scanerliu/wsc
27845327d3d44ba59a0047221f8b7b7cf31324ca
42d97447d0563f6c422d2f8fd7e741d410256ea1
refs/heads/master
2021-08-31T16:03:50.818588
2017-12-22T00:54:18
2017-12-22T00:54:18
114,704,092
0
0
null
null
null
null
UTF-8
Java
false
false
1,179
java
package com.zxsm.wsc.common.SerchTools; import java.util.ArrayList; import java.util.List; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; /** * 逻辑条件表达式 用于复杂条件时使用,如但属性多对应值的OR查询等 * @author maeing * */ public class LogicalExpression implements Criterion { private Criterion[] criterion; // 逻辑表达式中包含的表达式 private Operator operator; //计算符 public LogicalExpression(Criterion[] criterions, Operator operator) { this.criterion = criterions; this.operator = operator; } public Predicate toPredicate(Root<?> root, CriteriaQuery<?> query, CriteriaBuilder builder) { List<Predicate> predicates = new ArrayList<Predicate>(); for(int i=0;i<this.criterion.length;i++) { predicates.add(this.criterion[i].toPredicate(root, query, builder)); } switch (operator) { case OR: return builder.or(predicates.toArray(new Predicate[predicates.size()])); default: return null; } } }
[ "Administrator@windows10.microdone.cn" ]
Administrator@windows10.microdone.cn
5e1fdb7d8f699e0ba48f906a49a843fbbd8d32d9
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/google/android/gms/internal/measurement/C16526fh.java
7431b5c5f6c8427f6d98d2f2c4693ca0d9a3a310
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,023
java
package com.google.android.gms.internal.measurement; import android.content.Context; import java.util.concurrent.atomic.AtomicInteger; /* renamed from: com.google.android.gms.internal.measurement.fh */ public abstract class C16526fh<T> { /* renamed from: b */ private static final Object f46304b = new Object(); /* renamed from: c */ private static Context f46305c = null; /* renamed from: d */ private static boolean f46306d = false; /* renamed from: g */ private static final AtomicInteger f46307g = new AtomicInteger(); /* renamed from: a */ public final T f46308a; /* renamed from: e */ private final C16532fn f46309e; /* renamed from: f */ private final String f46310f; /* renamed from: h */ private volatile int f46311h; /* renamed from: i */ private volatile T f46312i; /* renamed from: a */ public static void m53855a(Context context) { synchronized (f46304b) { Context applicationContext = context.getApplicationContext(); if (applicationContext != null) { context = applicationContext; } if (f46305c != context) { synchronized (C16514ew.class) { C16514ew.f46288a.clear(); } synchronized (C16533fo.class) { C16533fo.f46316a.clear(); } synchronized (C16522fd.class) { C16522fd.f46300a = null; } f46307g.incrementAndGet(); f46305c = context; } } } /* access modifiers changed from: 0000 */ /* renamed from: a */ public abstract T mo42716a(Object obj); /* renamed from: a */ static void m53854a() { f46307g.incrementAndGet(); } private C16526fh(C16532fn fnVar, String str, T t) { this.f46311h = -1; if (fnVar.f46313a != null) { this.f46309e = fnVar; this.f46310f = str; this.f46308a = t; return; } throw new IllegalArgumentException("Must pass a valid SharedPreferences file name or ContentProvider URI"); } /* renamed from: a */ private final String m53853a(String str) { if (str != null && str.isEmpty()) { return this.f46310f; } String valueOf = String.valueOf(str); String valueOf2 = String.valueOf(this.f46310f); return valueOf2.length() != 0 ? valueOf.concat(valueOf2) : new String(valueOf); } /* renamed from: c */ private String m53861c() { return m53853a(this.f46309e.f46315c); } /* renamed from: b */ public final T mo42717b() { int i = f46307g.get(); if (this.f46311h < i) { synchronized (this) { if (this.f46311h < i) { if (f46305c != null) { T d = m53862d(); if (d == null) { d = m53863e(); if (d == null) { d = this.f46308a; } } this.f46312i = d; this.f46311h = i; } else { throw new IllegalStateException("Must call PhenotypeFlag.init() first"); } } } } return this.f46312i; } /* renamed from: d */ private final T m53862d() { C16519fa faVar; String str = (String) C16522fd.m53842a(f46305c).mo42707a("gms:phenotype:phenotype_flag:debug_bypass_phenotype"); if (!(str != null && C16511et.f46274b.matcher(str).matches())) { if (this.f46309e.f46313a != null) { faVar = C16514ew.m53825a(f46305c.getContentResolver(), this.f46309e.f46313a); } else { faVar = C16533fo.m53882a(f46305c, (String) null); } if (faVar != null) { Object a = faVar.mo42707a(m53861c()); if (a != null) { return mo42716a(a); } } } else { String str2 = "Bypass reading Phenotype values for flag: "; String valueOf = String.valueOf(m53861c()); if (valueOf.length() != 0) { str2.concat(valueOf); } else { new String(str2); } } return null; } /* renamed from: e */ private final T m53863e() { Object a = C16522fd.m53842a(f46305c).mo42707a(m53853a(this.f46309e.f46314b)); if (a != null) { return mo42716a(a); } return null; } /* access modifiers changed from: private */ /* renamed from: b */ public static C16526fh<Long> m53858b(C16532fn fnVar, String str, long j) { return new C16527fi(fnVar, str, Long.valueOf(j)); } /* access modifiers changed from: private */ /* renamed from: b */ public static C16526fh<Integer> m53857b(C16532fn fnVar, String str, int i) { return new C16528fj(fnVar, str, Integer.valueOf(i)); } /* access modifiers changed from: private */ /* renamed from: b */ public static C16526fh<Boolean> m53860b(C16532fn fnVar, String str, boolean z) { return new C16529fk(fnVar, str, Boolean.valueOf(z)); } /* access modifiers changed from: private */ /* renamed from: b */ public static C16526fh<Double> m53856b(C16532fn fnVar, String str, double d) { return new C16530fl(fnVar, str, Double.valueOf(d)); } /* access modifiers changed from: private */ /* renamed from: b */ public static C16526fh<String> m53859b(C16532fn fnVar, String str, String str2) { return new C16531fm(fnVar, str, str2); } /* synthetic */ C16526fh(C16532fn fnVar, String str, Object obj, C16527fi fiVar) { this(fnVar, str, obj); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
e9c8117f67a77ed2cc32a48df00639252fbc0020
f2d7245d66f23ab1a699d50f11a8f10a451c4516
/src/rechnung/EinfacherRechnungstest.java
e3e663537eae0cd85aca1d860a676842717f66ad
[]
no_license
markusschultheis/Rechnung
b8fa2dfb939747468e831377ab1dd9acffb3ad1e
543161b21e6f1fb150455df1fdbde2abd64591c1
refs/heads/master
2020-03-19T01:16:07.417480
2018-05-31T05:01:47
2018-05-31T05:01:47
135,533,825
0
0
null
null
null
null
UTF-8
Java
false
false
1,353
java
package rechnung; public class EinfacherRechnungstest { public static void main(String[] args) { double rabatt; Kunde k = new Kunde("Anna Lena Müller"); Rechnung r = new Rechnung(k); r.legeRechnungsbetragFest(120); rabatt = r.bestimmeRabatt(); if (rabatt != 5) { System.out.println("Der Rabatt bei eine Rechnung von 120 Euro wird falsch berechnet."); System.out.println("Der Rabatt sollte 5 Prozent betragen, betraegt aber " + rabatt); } Kunde k1 = new Kunde("Karl Heinz Müller"); Rechnung r1 = new Rechnung(k1); r1.legeRechnungsbetragFest(220); rabatt = r1.bestimmeRabatt(); if (rabatt != 9) { System.out.println("Der Rabatt bei eine Rechnung von 220 Euro wird falsch berechnet."); System.out.println("Der Rabatt sollte 5 Prozent betragen, betraegt aber " + rabatt); } Kunde k2 = new Premiumkunde("Horst Müller"); Rechnung r2 = new Rechnung(k2); r2.legeRechnungsbetragFest(220); rabatt = r2.bestimmeRabatt(); if (rabatt != 18) { System.out.println("Der Rabatt bei eine Rechnung von 220 Euro wird falsch berechnet."); System.out.println("Der Rabatt sollte 10 Prozent betragen, betraegt aber " + rabatt); } } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
482432fc74c9dc8f12fa06626e7a2e10e81b5992
32364ab81af8bf4d7c0d4283ab3077bc70cba8b8
/src/main/java/spring_framework/head_01/becomejavasenior_com/becomejavasenior/spring/di/configuration/DIConfiguration.java
4b7c7a74ae702ad4f29f22d3676e908b62125068
[]
no_license
dimaSkalora/Spring_Easyjava_ru
77fc115bd1996d4b2b2f7e7e91488f3d42eff208
bbf9ee244df81174aca28c4dc8efa7e0cbd1b9be
refs/heads/master
2021-05-08T03:11:16.405255
2017-11-08T17:26:10
2017-11-08T17:26:10
108,232,637
0
0
null
null
null
null
UTF-8
Java
false
false
734
java
package spring_framework.head_01.becomejavasenior_com.becomejavasenior.spring.di.configuration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import spring_framework.head_01.becomejavasenior_com.becomejavasenior.spring.di.services.EmailService; import spring_framework.head_01.becomejavasenior_com.becomejavasenior.spring.di.services.MessageService; @Configuration @ComponentScan(value={"spring_framework.head_01.becomejavasenior_com.becomejavasenior.spring.di.consumer"}) public class DIConfiguration { @Bean public MessageService getMessageService(){ return new EmailService(); } }
[ "timon2@ukr.net" ]
timon2@ukr.net
3f5a4f0bb0a31d3fdb22ab1e56387419a5b2e3a1
641a79cc55ff97972a4bedfd6809a645498ff697
/src/main/java/cn/edu/bit/sms/common/vo/req/PageParam.java
6833d311501cc4edae3eebc22655789f194bbfaa
[]
no_license
yuanliyuanwai/sms
2270b6a3976e5c5b93de37e22841c86a793ba473
c186546f98a91da66bc0a93f2b382d7829a4e49c
refs/heads/master
2022-12-21T10:18:09.450829
2019-08-24T10:55:38
2019-08-24T10:55:38
204,142,226
0
0
null
2022-12-16T07:15:11
2019-08-24T10:25:26
JavaScript
UTF-8
Java
false
false
1,213
java
package cn.edu.bit.sms.common.vo.req; import cn.edu.bit.sms.common.annotation.Comment; public class PageParam { @Comment("起始记录") private Integer start; @Comment("取多少行") private Integer limit; @Comment("页码") private Integer pageIndex; @Comment("每页多少条记录") private Integer pageSize; public Integer getStart() { if (start != null) return start; if (pageIndex != null && pageSize != null) { if (this.pageIndex <= 0) return 0; return (this.pageIndex - 1) * pageSize; } return 0; } public void setStart(Integer start) { this.start = start; } public Integer getLimit() { if (limit != null) return limit; if (pageIndex != null && pageSize != null) { if (this.pageSize <= 0) return 0; return this.pageSize; } return 0; } public void setLimit(Integer limit) { this.limit = limit; } public void setPageIndex(Integer pageIndex) { this.pageIndex = pageIndex; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; } public Integer getPageIndex() { return pageIndex; } public Integer getPageSize() { return pageSize; } }
[ "wanzhengchong@qq.com" ]
wanzhengchong@qq.com
03347aceb5ab5bb7074c1b5d667800535a6d1c4f
26c07a40649b7398011ba4cb983bcbf5e1ceca3e
/app/src/main/java/com/tess/futrash/model/pojo_confirmation/get_confirm/Content.java
566fd2b0c2a94166cf311c9a421295d9598f117f
[]
no_license
CindoddCindy/futrasCustomer
4b8b93726583a3a477805e0599acb709650970fa
65a3d3107db31e26acb5812f9eb5559d5fdd0ad4
refs/heads/main
2023-04-23T02:34:41.260722
2021-05-16T06:58:45
2021-05-16T06:58:45
345,573,513
0
0
null
null
null
null
UTF-8
Java
false
false
6,247
java
package com.tess.futrash.model.pojo_confirmation.get_confirm; //import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; //@Generated("jsonschema2pojo") public class Content { @SerializedName("createdAt") @Expose private String createdAt; @SerializedName("updatedAt") @Expose private String updatedAt; @SerializedName("id") @Expose private long id; @SerializedName("image_url") @Expose private String imageUrl; @SerializedName("terima_tolak") @Expose private String terimaTolak; @SerializedName("catatan_alasan") @Expose private String catatanAlasan; @SerializedName("jenis_makanan") @Expose private String jenisMakanan; @SerializedName("lokasi_customer") @Expose private String lokasiCustomer; @SerializedName("nama_customer") @Expose private String namaCustomer; @SerializedName("phone_customer") @Expose private String phoneCustomer; @SerializedName("lokasi_mitra") @Expose private String lokasiMitra; @SerializedName("nama_mitra") @Expose private String namaMitra; @SerializedName("phone_mitra") @Expose private String phoneMitra; @SerializedName("item_date") @Expose private String itemDate; @SerializedName("order_date") @Expose private String orderDate; @SerializedName("shipping_type") @Expose private String shippingType; @SerializedName("id_order_buyer") @Expose private long idOrderBuyer; @SerializedName("user") @Expose private User user; /** * No args constructor for use in serialization * */ public Content() { } /** * * @param idOrderBuyer * @param shippingType * @param itemDate * @param namaCustomer * @param terimaTolak * @param createdAt * @param jenisMakanan * @param namaMitra * @param imageUrl * @param id * @param catatanAlasan * @param phoneCustomer * @param orderDate * @param user * @param lokasiCustomer * @param updatedAt * @param lokasiMitra * @param phoneMitra */ public Content(String createdAt, String updatedAt, long id, String imageUrl, String terimaTolak, String catatanAlasan, String jenisMakanan, String lokasiCustomer, String namaCustomer, String phoneCustomer, String lokasiMitra, String namaMitra, String phoneMitra, String itemDate, String orderDate, String shippingType, long idOrderBuyer, User user) { super(); this.createdAt = createdAt; this.updatedAt = updatedAt; this.id = id; this.imageUrl = imageUrl; this.terimaTolak = terimaTolak; this.catatanAlasan = catatanAlasan; this.jenisMakanan = jenisMakanan; this.lokasiCustomer = lokasiCustomer; this.namaCustomer = namaCustomer; this.phoneCustomer = phoneCustomer; this.lokasiMitra = lokasiMitra; this.namaMitra = namaMitra; this.phoneMitra = phoneMitra; this.itemDate = itemDate; this.orderDate = orderDate; this.shippingType = shippingType; this.idOrderBuyer = idOrderBuyer; this.user = user; } public String getCreatedAt() { return createdAt; } public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } public String getUpdatedAt() { return updatedAt; } public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getImageUrl() { return imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public String getTerimaTolak() { return terimaTolak; } public void setTerimaTolak(String terimaTolak) { this.terimaTolak = terimaTolak; } public String getCatatanAlasan() { return catatanAlasan; } public void setCatatanAlasan(String catatanAlasan) { this.catatanAlasan = catatanAlasan; } public String getJenisMakanan() { return jenisMakanan; } public void setJenisMakanan(String jenisMakanan) { this.jenisMakanan = jenisMakanan; } public String getLokasiCustomer() { return lokasiCustomer; } public void setLokasiCustomer(String lokasiCustomer) { this.lokasiCustomer = lokasiCustomer; } public String getNamaCustomer() { return namaCustomer; } public void setNamaCustomer(String namaCustomer) { this.namaCustomer = namaCustomer; } public String getPhoneCustomer() { return phoneCustomer; } public void setPhoneCustomer(String phoneCustomer) { this.phoneCustomer = phoneCustomer; } public String getLokasiMitra() { return lokasiMitra; } public void setLokasiMitra(String lokasiMitra) { this.lokasiMitra = lokasiMitra; } public String getNamaMitra() { return namaMitra; } public void setNamaMitra(String namaMitra) { this.namaMitra = namaMitra; } public String getPhoneMitra() { return phoneMitra; } public void setPhoneMitra(String phoneMitra) { this.phoneMitra = phoneMitra; } public String getItemDate() { return itemDate; } public void setItemDate(String itemDate) { this.itemDate = itemDate; } public String getOrderDate() { return orderDate; } public void setOrderDate(String orderDate) { this.orderDate = orderDate; } public String getShippingType() { return shippingType; } public void setShippingType(String shippingType) { this.shippingType = shippingType; } public long getIdOrderBuyer() { return idOrderBuyer; } public void setIdOrderBuyer(long idOrderBuyer) { this.idOrderBuyer = idOrderBuyer; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } }
[ "cindodcindy@gmail.com" ]
cindodcindy@gmail.com
01aef25199151039c01b4474b4ac775e3110fd61
a046fab691517432a59b06b4db559071cf1fc643
/src/main/java/com/cy/bean/BeanWidget.java
24754b87061a6aca8add8540d581cea963386be1
[]
no_license
djun100/AutoGen
edbfd599b54de79f742fd374379cc88c0cff7da2
974d2a82269ddbfb3d1976bf99ca2f3905656cc2
refs/heads/master
2020-04-23T11:20:48.041205
2019-06-06T04:01:22
2019-06-06T04:01:22
171,133,515
0
0
null
null
null
null
UTF-8
Java
false
false
3,595
java
package com.cy.bean; import com.cy.data.UtilString; import com.google.common.base.Strings; import java.util.ArrayList; public class BeanWidget { /*** id名称*/ private String resId; /*** 被include的父控件的 id名称*/ private String includeIdName; /*** 变量名称*/ private String defineName; /*** 节点类名*/ private String type; /*** Activity中代码生成前ClickEvent事件*/ private String content = ""; /*** 是否有onClick属性*/ private boolean clickable = false; /*** 该组件在JavaCode中的声明的注释的起始line*/ private int docBegin = -1; /*** 该组件在JavaCode中的声明的注释的结束line*/ private int docEnd = -1; private String docContent = ""; private boolean enable=true; public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getResId() { return resId; } public void setResId(String mId) { this.resId = mId; } public String getType() { return type; } public void setType(String type) { this.type = type; } public boolean getClickable() { return clickable; } public void setClickable(boolean clickable) { this.clickable = clickable; } public int getDocBegin() { return docBegin; } public void setDocBegin(int docBegin) { this.docBegin = docBegin; } public int getDocEnd() { return docEnd; } public void setDocEnd(int docEnd) { this.docEnd = docEnd; } public String getDocContent() { return docContent; } public void setDocContent(String docContent) { this.docContent = docContent; } public boolean getEnable() { return enable; } public void setEnable(boolean enable) { this.enable = enable; } public static BeanWidget getWidgetInfoByDefineName(String defineName, ArrayList<BeanWidget> beanWidgets) { if (Strings.isNullOrEmpty(defineName)) { System.err.println("getWidgetInfoByIdName:resId is empty"); } if (beanWidgets == null || beanWidgets.size() == 0) { System.err.println("getWidgetInfoByIdName beanWidgets is empty"); } for (BeanWidget beanWidget : beanWidgets) { if (beanWidget.getDefineName().equals(defineName)) return beanWidget; } return null; } public static BeanWidget getWidgetInfoByIdName(String idName, ArrayList<BeanWidget> beanWidgets) { if (Strings.isNullOrEmpty(idName)) { System.err.println("getWidgetInfoByIdName:resId is empty"); } if (beanWidgets == null || beanWidgets.size() == 0) { System.err.println("getWidgetInfoByIdName beanWidgets is empty"); } for (BeanWidget beanWidget : beanWidgets) { if (beanWidget.getResId().equals(idName)) return beanWidget; } return null; } public String getDefineName() { return defineName; } public void setDefineName(String defineName) { this.defineName = defineName; } public String getIncludeIdName() { return includeIdName; } public void setIncludeIdName(String includeIdName) { this.includeIdName = includeIdName; if (!UtilString.isEmpty(includeIdName)) { setDefineName(includeIdName + "_" + resId); } else { setDefineName(resId); } } }
[ "djun100@qq.com" ]
djun100@qq.com
d5571c195df0e0ca44fc738129045807783e0f86
5e57520287d4fe212e3d83f911df47167d83a287
/CoreActionPak1/src/com/safi/workshop/actionpak1/ActionPak1Plugin.java
c7d22bf192d3b0546c43bb4e1d8d4e14560a9838
[]
no_license
acastroy/safiserver-all
dc2f0dfedbf994d7a4f7803907cea836530c9cec
039be68c5d4f7e65fd53f4a836eac39b3d349230
refs/heads/master
2020-03-31T19:38:06.020158
2010-10-30T10:16:45
2010-10-30T10:16:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
589
java
package com.safi.workshop.actionpak1; import java.util.logging.Logger; import org.eclipse.core.runtime.Plugin; import org.osgi.framework.BundleContext; public class ActionPak1Plugin extends Plugin { private final static Logger log = Logger.getLogger(ActionPak1Plugin.class.getName()); private static ActionPak1Plugin instance; public ActionPak1Plugin() { instance = this; } @Override public void start(BundleContext context) throws Exception { log.info("ActionPak1Plugin bundle activated!"); super.start(context); } }
[ "steamedcotton@254595da-98a2-11de-83f8-39e71e4dc75d" ]
steamedcotton@254595da-98a2-11de-83f8-39e71e4dc75d
c0eeb1fb47204f99178a568ba41867fcf5ab0cc9
bbec45d4b304592524e9a4c8047561eb575cc1f4
/plugins/org.polymap.core.project/src/org/polymap/core/project/ui/properties/PropertyProviderAdapterFactory.java
b6fda9aec853a54baa776e21c62edb2e2c5d524c
[]
no_license
Polymap3/polymap3-core
793d7debecd67dd8d56d027a70a07f793bc63dd4
b83b3802db7b2453220d97597d8042af32eb202f
refs/heads/master
2020-12-24T05:18:40.220204
2017-08-30T13:25:36
2017-08-30T13:25:36
31,892,676
0
3
null
2016-01-14T13:48:55
2015-03-09T10:44:37
Java
ISO-8859-1
Java
false
false
3,633
java
/* * polymap.org * Copyright 2012, Polymap GmbH. All rights reserved. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.polymap.core.project.ui.properties; import org.geotools.geometry.jts.ReferencedEnvelope; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.eclipse.ui.views.properties.IPropertySource; import org.eclipse.ui.views.properties.IPropertySourceProvider; import org.eclipse.core.runtime.IAdapterFactory; import org.polymap.core.project.ILayer; import org.polymap.core.project.IMap; /** * An adapter factory that provides {@link IPropertySourceProvider} for {@link IMap} * and {@link ILayer}. Regsitered via <code>org.eclipse.core.runtime.adpaters</code> * extension point. * <p/> * Basically property source providers are responsible of creating a * hierarchy of {@link IPropertySource}s for the different element types. * * @author <a href="http://www.polymap.de">Falko Bräutigam</a> */ public class PropertyProviderAdapterFactory implements IAdapterFactory { private static Log log = LogFactory.getLog( PropertyProviderAdapterFactory.class ); public Object getAdapter( Object adaptable, Class adapter ) { if (!IPropertySourceProvider.class.isAssignableFrom( adapter )) { return null; } // IMap else if (adaptable instanceof IMap) { return new MapPropertySourceProvider(); } // ILayer else if (adaptable instanceof ILayer) { return new LayerPropertySourceProvider(); } return null; } public Class[] getAdapterList() { return new Class[] {IPropertySourceProvider.class}; } /** * * @author <a href="http://www.polymap.de">Falko Bräutigam</a> */ public static class MapPropertySourceProvider implements IPropertySourceProvider { public IPropertySource getPropertySource( Object obj ) { log.trace( "getPropertySource(): " + obj ); if (obj instanceof IMap) { return new MapPropertySource( (IMap)obj ); } else if (obj instanceof ReferencedEnvelope) { return new EnvelopPropertySource( (ReferencedEnvelope)obj ); //.setEditable( true ); } else if (obj instanceof IPropertySource) { return (IPropertySource)obj; } return null; } }; /** * * @author <a href="http://www.polymap.de">Falko Bräutigam</a> */ public static class LayerPropertySourceProvider implements IPropertySourceProvider { public IPropertySource getPropertySource( Object obj ) { log.trace( "getPropertySource(): " + obj.getClass().getName() ); if (obj instanceof ILayer) { return new LayerPropertySource( (ILayer)obj ); } else if (obj instanceof ReferencedEnvelope) { return new EnvelopPropertySource( (ReferencedEnvelope)obj ); //.setEditable( true ); } return null; } }; }
[ "falko@polymap.de" ]
falko@polymap.de
bcb3331f4d9d624d3b9bd763a5e26a2c177de327
c41c63db37045c42b17e6197ba16732db1d48ba1
/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/browser/ChromeUser.java
6f1641b9d0480bafa451a229b79c1f0e86b6e15b
[ "Apache-2.0" ]
permissive
willylee007/openvidu
291086da8e90a6f69998d4807962efffa7c60390
351adbe31081b0420b38e70473441eabb50c642d
refs/heads/master
2020-04-24T00:52:13.195342
2019-02-20T05:30:04
2019-02-20T05:30:04
171,578,792
0
0
Apache-2.0
2019-02-20T01:29:06
2019-02-20T01:29:05
null
UTF-8
Java
false
false
3,676
java
/* * (C) Copyright 2017-2019 OpenVidu (https://openvidu.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. * */ package io.openvidu.test.e2e.browser; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.nio.file.Path; import java.util.concurrent.TimeUnit; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; import org.springframework.core.io.ClassPathResource; public class ChromeUser extends BrowserUser { public ChromeUser(String userName, int timeOfWaitInSeconds) { this(userName, timeOfWaitInSeconds, "Entire screen"); } public ChromeUser(String userName, int timeOfWaitInSeconds, String screenToCapture) { this(userName, timeOfWaitInSeconds, generateScreenChromeOptions(screenToCapture)); } public ChromeUser(String userName, int timeOfWaitInSeconds, Path fakeVideoLocation) { this(userName, timeOfWaitInSeconds, generateFakeVideoChromeOptions(fakeVideoLocation)); } private ChromeUser(String userName, int timeOfWaitInSeconds, ChromeOptions options) { super(userName, timeOfWaitInSeconds); DesiredCapabilities capabilities = DesiredCapabilities.chrome(); capabilities.setAcceptInsecureCerts(true); capabilities.setCapability(ChromeOptions.CAPABILITY, options); String REMOTE_URL = System.getProperty("REMOTE_URL_CHROME"); if (REMOTE_URL != null) { log.info("Using URL {} to connect to remote web driver", REMOTE_URL); try { this.driver = new RemoteWebDriver(new URL(REMOTE_URL), capabilities); } catch (MalformedURLException e) { e.printStackTrace(); } } else { log.info("Using local web driver"); this.driver = new ChromeDriver(capabilities); } this.driver.manage().timeouts().setScriptTimeout(this.timeOfWaitInSeconds, TimeUnit.SECONDS); this.configureDriver(); } private static ChromeOptions generateScreenChromeOptions(String screenToCapture) { ChromeOptions options = new ChromeOptions(); // This flag avoids to grant the user media options.addArguments("--use-fake-ui-for-media-stream"); // This flag fakes user media with synthetic video options.addArguments("--use-fake-device-for-media-stream"); // This flag selects the entire screen as video source when screen sharing options.addArguments("--auto-select-desktop-capture-source=" + screenToCapture); try { // Add Screen Sharing extension options.addExtensions(new ClassPathResource("ScreenCapturing.crx").getFile()); } catch (IOException e) { e.printStackTrace(); } return options; } private static ChromeOptions generateFakeVideoChromeOptions(Path videoFileLocation) { ChromeOptions options = new ChromeOptions(); // This flag avoids to grant the user media options.addArguments("--use-fake-ui-for-media-stream"); // This flag fakes user media with synthetic video options.addArguments("--use-fake-device-for-media-stream"); // This flag sets the video input as options.addArguments("--use-file-for-fake-video-capture=" + videoFileLocation.toString()); return options; } }
[ "pablofuenteperez@gmail.com" ]
pablofuenteperez@gmail.com
e5ba4a0c3159fea25e91a189ad5514779fec38a0
7b4fd58090aa7013137ba2734d7f256b812861e1
/src/Ellias/rm/com/tencent/qqgamemi/animation/FrameBackGroundAction.java
1bd3fe0c628d2d642d1c1b41a660d3ae4e03cabf
[]
no_license
daihuabin/Ellias
e37798a6a2e63454f80de512319ece885b6a2237
fd010991a5677e6aa104b927b82fc3d6da801887
refs/heads/master
2023-03-16T21:12:33.908495
2020-02-10T15:42:22
2020-02-10T15:42:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,205
java
package com.tencent.qqgamemi.animation; import android.content.Context; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.widget.ImageView; import com.tencent.component.ComponentContext; public class FrameBackGroundAction extends QmiSpiritAction { public static final int a = 25; private FrameDrawable b; private FrameDrawable c; private ImageView d = null; private Drawable[] e; private Drawable[] f; private int g = 0; private FrameDrawable.FrameAnimationListener h = new b(this); private FrameDrawable.FrameAnimationListener i = new c(this); public FrameBackGroundAction(int[] paramArrayOfInt1, int[] paramArrayOfInt2, boolean[] paramArrayOfBoolean, int[] paramArrayOfInt3, int[] paramArrayOfInt4, int paramInt) { Drawable[] arrayOfDrawable1 = new Drawable[paramArrayOfInt1.length]; for (int k = 0; k < paramArrayOfInt1.length; k++) arrayOfDrawable1[k] = ComponentContext.a().getResources().getDrawable(paramArrayOfInt1[k]); a(arrayOfDrawable1, paramArrayOfInt2, paramArrayOfBoolean); Drawable[] arrayOfDrawable2 = new Drawable[paramArrayOfInt3.length]; while (j < paramArrayOfInt3.length) { arrayOfDrawable2[j] = ComponentContext.a().getResources().getDrawable(paramArrayOfInt3[j]); j++; } a(arrayOfDrawable2, paramArrayOfInt4); this.g = paramInt; } private void a(Drawable[] paramArrayOfDrawable, int[] paramArrayOfInt) { this.c = new FrameDrawable(); int j = 0; if (j < paramArrayOfDrawable.length) { if (paramArrayOfInt == null) this.c.addFrame(paramArrayOfDrawable[j], 25); while (true) { j++; break; this.c.addFrame(paramArrayOfDrawable[j], paramArrayOfInt[j]); } } this.c.a(this.i); this.f = paramArrayOfDrawable; } private void a(Drawable[] paramArrayOfDrawable, int[] paramArrayOfInt, boolean[] paramArrayOfBoolean) { this.b = new FrameDrawable(); int j = 0; if (j < paramArrayOfDrawable.length) { if (paramArrayOfInt == null) this.b.a(paramArrayOfDrawable[j], 25, paramArrayOfBoolean[j]); while (true) { j++; break; this.b.a(paramArrayOfDrawable[j], paramArrayOfInt[j], paramArrayOfBoolean[j]); } } this.b.a(this.h); this.e = paramArrayOfDrawable; } protected void a() { if (this.b != null) this.b.stop(); if (this.c != null) this.c.stop(); } public void a(ImageView paramImageView) { paramImageView.setImageDrawable(this.b); paramImageView.setBackgroundDrawable(this.c); this.d = paramImageView; } public void a(AnimationParam paramAnimationParam) { this.b.start(); } public void a(boolean paramBoolean) { super.a(paramBoolean); } public void b() { a(false); this.b.unscheduleSelf(null); this.c.unscheduleSelf(null); if (this.d != null) { this.d.setImageDrawable(null); this.d.setBackgroundDrawable(null); } } } /* Location: D:\rm_src\classes_dex2jar\ * Qualified Name: com.tencent.qqgamemi.animation.FrameBackGroundAction * JD-Core Version: 0.6.0 */
[ "sevarsti@sina.com" ]
sevarsti@sina.com
d05cefa2d8b682edaf5f36af315fa2dd6ae7423b
12cca0e87b82f816e7765a8ec77c8d997e1e087a
/reuze/gb_i_Intersector.java
448086503d0638475a9d5f67798e35688792d179
[]
no_license
mageru/softwarereuse
b970e734783bfb6b6de846d226f1dac53f6e68b6
b72af735321ec29e768c76b0cd0c1addb7a07c98
refs/heads/master
2020-06-08T21:26:41.704118
2012-10-25T02:24:28
2012-10-25T02:24:28
5,502,804
1
0
null
null
null
null
UTF-8
Java
false
false
1,451
java
package reuze; /* * Copyright (c) 2006-2011 Karsten Schmidt * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * http://creativecommons.org/licenses/LGPL/2.1/ * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ /** * Generic interface for ray intersection with 3D geometry */ public interface gb_i_Intersector { /** * @return intersection data parcel */ public gb_IntersectionData getIntersectionData(); /** * Checks if entity intersects with the given ray. Further intersection * details can then be queried via the {@link gb_IntersectionData} instance returned * by {@link #getIntersectionData()}. * * @param ray * ray to check * @return true, if ray hits the entity */ public boolean intersectsRay(gb_Ray ray); }
[ "jmiller9@gmail.com" ]
jmiller9@gmail.com
28d23569b2a708e8838da66da868a95b0b2b97b2
5ed194cdfeaa8973d98511eb2844c2ff98502c1f
/projects/src/main/java/IntroClassJava/median/median_1b31fa5c_000/median_1b31fa5c_000.java
6ab06e49646435273d498a095b130a2059d8d556
[ "MIT" ]
permissive
Abigiris/SLACC
2f11a8833ffc939d186ff81c166abea4a6293c1c
ee985ece7691691585952eb88565f0e08bdc9113
refs/heads/master
2023-01-01T07:12:21.876464
2020-02-17T19:01:02
2020-02-17T19:01:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,433
java
package IntroClassJava.median.median_1b31fa5c_000; class IntObj { public int value; public IntObj() { } public IntObj(int i) { value = i; } } class FloatObj { public float value; public FloatObj() { } public FloatObj(float i) { value = i; } } class LongObj { public long value; public LongObj() { } public LongObj(long i) { value = i; } } class DoubleObj { public double value; public DoubleObj() { } public DoubleObj(double i) { value = i; } } class CharObj { public char value; public CharObj() { } public CharObj(char i) { value = i; } } public class median_1b31fa5c_000 { public java.util.Scanner scanner; public String output = ""; public static void main(String[] args) throws Exception { median_1b31fa5c_000 mainClass = new median_1b31fa5c_000(); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner(args[0]); } else { mainClass.scanner = new java.util.Scanner(System.in); } mainClass.exec(); System.out.println(mainClass.output); } public void exec() throws Exception { IntObj num1 = new IntObj(), num2 = new IntObj(), num3 = new IntObj(); output += (String.format("Please enter 3 numbers separated by spaces > ")); num1.value = scanner.nextInt(); num2.value = scanner.nextInt(); num3.value = scanner.nextInt(); if ((((num1.value > num2.value) && (num1.value < num3.value))) || ((num1.value > num3.value) && (num1.value < num2.value))) { output += (String.format("%d is the median\n", num1.value)); if (true) return; ; } else if ((((num2.value > num1.value) && (num2.value < num3.value))) || ((num2.value > num3.value) && (num2.value < num1.value))) { output += (String.format("%d is the median\n", num2.value)); if (true) return; ; } else if ((((num3.value > num2.value) && (num3.value < num1.value))) || ((num3.value > num1.value) && (num3.value < num2.value))) { output += (String.format("%d is the median\n", num3.value)); if (true) return; ; } if (true) return; ; } }
[ "george.meg91@gmail.com" ]
george.meg91@gmail.com
dbf04b6d7ce5e576668ed54573fd24838cd7ed45
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
/spring-security-modules/spring-session/spring-session-mongodb/src/test/java/com/surya/springsessionmongodb/SpringSessionMongoDBIntegrationTest.java
c181284ab827ba9491d07a767a7e559084bae7a1
[]
no_license
Suryakanta97/DemoExample
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
5c6b831948e612bdc2d9d578a581df964ef89bfb
refs/heads/main
2023-08-10T17:30:32.397265
2021-09-22T16:18:42
2021-09-22T16:18:42
391,087,435
0
1
null
null
null
null
UTF-8
Java
false
false
1,754
java
package com.surya.springsessionmongodb; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.session.data.mongo.MongoIndexedSessionRepository; import org.springframework.test.context.junit4.SpringRunner; import java.util.Base64; @RunWith(SpringRunner.class) @SpringBootTest(classes = SpringSessionMongoDBApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class SpringSessionMongoDBIntegrationTest { @LocalServerPort private int port; @Autowired private MongoIndexedSessionRepository repository; private TestRestTemplate restTemplate = new TestRestTemplate(); @Test public void givenEndpointIsCalledTwiceAndResponseIsReturned_whenMongoDBIsQueriedForCount_thenCountMustBeSame() { HttpEntity<String> response = restTemplate .exchange("http://localhost:" + port, HttpMethod.GET, null, String.class); HttpHeaders headers = response.getHeaders(); String set_cookie = headers.getFirst(HttpHeaders.SET_COOKIE); Assert.assertEquals(response.getBody(), repository.findById(getSessionId(set_cookie)).getAttribute("count").toString()); } private String getSessionId(String cookie) { return new String(Base64.getDecoder().decode(cookie.split(";")[0].split("=")[1])); } }
[ "suryakanta97@github.com" ]
suryakanta97@github.com
26f12072f93b43455ed01b64a1f1a48113c14cb2
c911cec851122d0c6c24f0e3864cb4c4def0da99
/org/apache/commons/io/FileExistsException.java
4084bf449a71e125f690c2c86f9620d55b0efff2
[]
no_license
riskyend/PokemonGo_RE_0.47.1
3a468ad7b6fbda5b4f8b9ace30447db2211fc2ed
2ca0c6970a909ae5e331a2430f18850948cc625c
refs/heads/master
2020-01-23T22:04:35.799795
2016-11-19T01:01:46
2016-11-19T01:01:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
728
java
package org.apache.commons.io; import java.io.File; import java.io.IOException; public class FileExistsException extends IOException { private static final long serialVersionUID = 1L; public FileExistsException() {} public FileExistsException(File paramFile) { super("File " + paramFile + " exists"); } public FileExistsException(String paramString) { super(paramString); } } /* Location: /Users/mohamedtajjiou/Downloads/Rerverse Engeneering/dex2jar-2.0/com.nianticlabs.pokemongo_0.47.1-2016111700_minAPI19(armeabi-v7a)(nodpi)_apkmirror.com (1)-dex2jar.jar!/org/apache/commons/io/FileExistsException.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "mohamedtajjiou@Mohameds-Air.SpeedportEntry2090126200030" ]
mohamedtajjiou@Mohameds-Air.SpeedportEntry2090126200030
71abaf182f1d6b83a41bc7e074c12f297789d0a7
c6d8dd7aba171163214253a3da841056ea2f6c87
/serenity-screenplay-webdriver/src/test/java/net/serenitybdd/screenplay/webtests/integration/questions/CurrentVisibilityTest.java
d40df2ea26f21f234dfee72dae971de060498df7
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
serenity-bdd/serenity-core
602b8369f9527bea21a30104a45ba9b6e4d48238
ab6eaa5018e467b43e4f099e7682ce2924a9b12f
refs/heads/main
2023-09-01T22:37:02.079831
2023-09-01T17:24:41
2023-09-01T17:24:41
26,201,720
738
656
NOASSERTION
2023-09-08T14:33:06
2014-11-05T03:44:57
HTML
UTF-8
Java
false
false
2,763
java
package net.serenitybdd.screenplay.webtests.integration.questions; import net.serenitybdd.junit.runners.SerenityRunner; import net.serenitybdd.screenplay.questions.CurrentVisibility; import net.serenitybdd.screenplay.targets.Target; import net.serenitybdd.screenplay.ui.PageElement; import net.serenitybdd.screenplay.webtests.integration.ScreenplayInteractionTestBase; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.By; import java.time.Duration; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SerenityRunner.class) public class CurrentVisibilityTest extends ScreenplayInteractionTestBase { private final static Target VISIBLE_BUTTON = PageElement.withNameOrId("button"); private final static Target INVISIBLE_BUTTON = PageElement.withNameOrId("hidden-button"); private final static Target DELAYED_BUTTON = PageElement.withNameOrId("invisible-button"); private final static Target MISSING_BUTTON = PageElement.withNameOrId("does-not-exist"); private final static Target BUTTONS = PageElement.withCSSClass("button"); @Before public void setTimeout() { driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(0)); } @Test public void checkIfAnElementIsVisibleUsingATarget() { assertThat(dina.asksFor(CurrentVisibility.of(VISIBLE_BUTTON))).isTrue(); } @Test public void checkIfAnElementIsNotVisibledUsingATarget() { assertThat(dina.asksFor(CurrentVisibility.of(INVISIBLE_BUTTON))).isFalse(); } @Test public void checkIfAMissingElementIsNotVisibledUsingATarget() { assertThat(dina.asksFor(CurrentVisibility.of(MISSING_BUTTON))).isFalse(); } @Test public void checkIfAnElementIsNotYetVisibleUsingATarget() { assertThat(dina.asksFor(CurrentVisibility.of(DELAYED_BUTTON))).isFalse(); } @Test public void checkIfAnElementIsVisibleUsingALocator() { assertThat(dina.asksFor(CurrentVisibility.of("#button"))).isTrue(); } @Test public void checkIfAnElementIsVisibleUsingABy() { assertThat(dina.asksFor(CurrentVisibility.of(By.id("button")))).isTrue(); } @Test public void checkIfSeveralElementsAreEnabled() { assertThat(dina.asksFor(CurrentVisibility.ofEach(BUTTONS))).containsExactly(true, true, false); } @Test public void checkIfSeveralElementsAreEnabledByLocator() { assertThat(dina.asksFor(CurrentVisibility.ofEach(By.cssSelector(".button")))).containsExactly(true, true, false); } @Test public void checkIfSeveralElementsAreEnabledByString() { assertThat(dina.asksFor(CurrentVisibility.ofEach(".button"))).containsExactly(true, true, false); } }
[ "john.smart@wakaleo.com" ]
john.smart@wakaleo.com
cc11daf9a3d4b0f24580c17cc272f386dfd6b346
a9914626c19f4fbcb5758a1953a4efe4c116dfb9
/L2JTW_DataPack_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CallSkill.java
0d8262c3e1633c7c692dde1e29b2f4f31d2fd4c5
[]
no_license
mjsxjy/l2jtw_datapack
ba84a3bbcbae4adbc6b276f9342c248b6dd40309
c6968ae0475a076080faeead7f94bda1bba3def7
refs/heads/master
2021-01-19T18:21:37.381390
2015-08-03T00:20:39
2015-08-03T00:20:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,696
java
/* * Copyright (C) 2004-2014 L2J DataPack * * This file is part of L2J DataPack. * * L2J DataPack is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * L2J DataPack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package handlers.effecthandlers; import com.l2jserver.gameserver.model.StatsSet; import com.l2jserver.gameserver.model.conditions.Condition; import com.l2jserver.gameserver.model.effects.AbstractEffect; import com.l2jserver.gameserver.model.holders.SkillHolder; import com.l2jserver.gameserver.model.skills.BuffInfo; /** * Call Skill effect implementation. * @author Nos */ public final class CallSkill extends AbstractEffect { private final SkillHolder _skill; public CallSkill(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params) { super(attachCond, applyCond, set, params); _skill = new SkillHolder(params.getInt("skillId"), params.getInt("skillLevel", 1)); } @Override public boolean isInstant() { return true; } @Override public void onStart(BuffInfo info) { info.getEffector().makeTriggerCast(_skill.getSkill(), info.getEffected(), true); } }
[ "rocknow@9bd44e3e-6552-0410-907e-a6ca40b856b6" ]
rocknow@9bd44e3e-6552-0410-907e-a6ca40b856b6
86caeb8c84b06fbac1b2c940c6fb7e732ef47dcd
3fad69f37b89bcf5bf8c6de7abf91a9a231b7540
/src/net/sourceforge/pinyin4j/format/exception/BadHanyuPinyinOutputFormatCombination.java
5d634ae819e2c2ecc7e68eb6b2619fdc26d9b2ec
[]
no_license
dfsilva/movnow
3e72cfefef9f53389fe3fa9b4ad594ee2b3dcab1
f5786b61751e33e96e0f96eeec94b96eb56a689d
refs/heads/master
2021-01-10T12:03:31.878866
2015-11-15T13:45:35
2015-11-15T13:45:35
46,219,218
0
0
null
null
null
null
UTF-8
Java
false
false
462
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package net.sourceforge.pinyin4j.format.exception; public class BadHanyuPinyinOutputFormatCombination extends Exception { private static final long serialVersionUID = 0x8a070359a7c9d4f2L; public BadHanyuPinyinOutputFormatCombination(String s) { super(s); } }
[ "diegosiuniube@gmail.com" ]
diegosiuniube@gmail.com
1ef635934876086ccb2ab5b5d81b0d7e6e9eaf41
00e1e0709c471385b807b25ae5da0715f069136d
/dao/src/com/chuangyou/xianni/entity/avatar/AvatarTemplateInfo.java
01a681f7a2802cda08680f4bb2ece40ce269009f
[]
no_license
hw233/app2-java
44504896d13a5b63e3d95343c62424495386b7f1
f4b5217a4980b0ff81f81577c348a6e71593a185
refs/heads/master
2020-04-27T11:23:44.089556
2016-11-18T01:33:52
2016-11-18T01:33:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,575
java
package com.chuangyou.xianni.entity.avatar; /** 分身模板 */ public class AvatarTemplateInfo { private int id; private String name; private int needItem; private int skillId; private int commonSkillId1; private int commonSkillId2; private int commonSkillId3; private int commonSkillId4; private int addtionPercent; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getNeedItem() { return needItem; } public void setNeedItem(int needItem) { this.needItem = needItem; } public int getSkillId() { return skillId; } public void setSkillId(int skillId) { this.skillId = skillId; } public int getCommonSkillId1() { return commonSkillId1; } public void setCommonSkillId1(int commonSkillId1) { this.commonSkillId1 = commonSkillId1; } public int getCommonSkillId2() { return commonSkillId2; } public void setCommonSkillId2(int commonSkillId2) { this.commonSkillId2 = commonSkillId2; } public int getCommonSkillId3() { return commonSkillId3; } public void setCommonSkillId3(int commonSkillId3) { this.commonSkillId3 = commonSkillId3; } public int getCommonSkillId4() { return commonSkillId4; } public void setCommonSkillId4(int commonSkillId4) { this.commonSkillId4 = commonSkillId4; } public int getAddtionPercent() { return addtionPercent; } public void setAddtionPercent(int addtionPercent) { this.addtionPercent = addtionPercent; } }
[ "you@example.com" ]
you@example.com
e9d33bc159284dd15c9079a9ae84856bb60914cc
969c537e0785483ea556f1f8576359796e8d4580
/app/src/main/java/com/soonfor/warehousemanager/module/instore/beans/hebao/HeBaoGoodsItem.java
3081205174d304ab28d99b00bb1569bf351f5bc5
[]
no_license
sf2018dyg/WarehouseManager
f0db41411f2068acf76c886ac1d79c55bafa68a4
b507de996dafb824165092179528294d9d17f80b
refs/heads/master
2020-04-14T02:11:45.430313
2018-12-30T10:12:58
2018-12-30T10:12:58
163,578,194
0
0
null
null
null
null
UTF-8
Java
false
false
4,757
java
package com.soonfor.warehousemanager.module.instore.beans.hebao; import org.greenrobot.greendao.annotation.Entity; import org.greenrobot.greendao.annotation.Id; import org.greenrobot.greendao.annotation.Property; import org.greenrobot.greendao.annotation.Generated; /** * 作者:DC-ZhuSuiBo on 2018/9/3 0003 15:22 * 邮箱:suibozhu@139.com * 类用途: */ @Entity(nameInDb = "HeBaoGoodsItem") public class HeBaoGoodsItem { @Id(autoincrement = true) private Long id; @Property(nameInDb = "fOrdNo") private String fOrdNo = "";//:"订单号" @Property(nameInDb = "fSplitBatchNo") private String fSplitBatchNo = "";//:"拆单批次" @Property(nameInDb = "fPackNo") private String fPackNo = "";//:"包装编号" @Property(nameInDb = "fGoodsID") private String fGoodsID = "";//:"货品ID" @Property(nameInDb = "fGoodsCode") private String fGoodsCode = "";//:"品号" @Property(nameInDb = "fGoodsName") private String fGoodsName = "";//:"品名" @Property(nameInDb = "fSizeDesc") private String fSizeDesc = "";//:"规格描述" @Property(nameInDb = "fCstLotNo") private String fCstLotNo = "";//:"类货品定制批号" @Property(nameInDb = "fBelongGoodsID") private String fBelongGoodsID = "";//:"所属产品ID" @Property(nameInDb = "fBelongGoodsCode") private String fBelongGoodsCode = "";//:"所属产品代号" @Property(nameInDb = "fBelongCstLotNo") private String fBelongCstLotNo = "";//:"所属产品定制批号" @Property(nameInDb = "fOrdSpID") private String fOrdSpID = "";//:"条码ID" @Generated(hash = 399838391) public HeBaoGoodsItem(Long id, String fOrdNo, String fSplitBatchNo, String fPackNo, String fGoodsID, String fGoodsCode, String fGoodsName, String fSizeDesc, String fCstLotNo, String fBelongGoodsID, String fBelongGoodsCode, String fBelongCstLotNo, String fOrdSpID) { this.id = id; this.fOrdNo = fOrdNo; this.fSplitBatchNo = fSplitBatchNo; this.fPackNo = fPackNo; this.fGoodsID = fGoodsID; this.fGoodsCode = fGoodsCode; this.fGoodsName = fGoodsName; this.fSizeDesc = fSizeDesc; this.fCstLotNo = fCstLotNo; this.fBelongGoodsID = fBelongGoodsID; this.fBelongGoodsCode = fBelongGoodsCode; this.fBelongCstLotNo = fBelongCstLotNo; this.fOrdSpID = fOrdSpID; } @Generated(hash = 349046238) public HeBaoGoodsItem() { } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public String getFOrdNo() { return this.fOrdNo; } public void setFOrdNo(String fOrdNo) { this.fOrdNo = fOrdNo; } public String getFSplitBatchNo() { return this.fSplitBatchNo; } public void setFSplitBatchNo(String fSplitBatchNo) { this.fSplitBatchNo = fSplitBatchNo; } public String getFPackNo() { return this.fPackNo; } public void setFPackNo(String fPackNo) { this.fPackNo = fPackNo; } public String getFGoodsID() { return this.fGoodsID; } public void setFGoodsID(String fGoodsID) { this.fGoodsID = fGoodsID; } public String getFGoodsCode() { return this.fGoodsCode; } public void setFGoodsCode(String fGoodsCode) { this.fGoodsCode = fGoodsCode; } public String getFGoodsName() { return this.fGoodsName; } public void setFGoodsName(String fGoodsName) { this.fGoodsName = fGoodsName; } public String getFSizeDesc() { return this.fSizeDesc; } public void setFSizeDesc(String fSizeDesc) { this.fSizeDesc = fSizeDesc; } public String getFCstLotNo() { return this.fCstLotNo; } public void setFCstLotNo(String fCstLotNo) { this.fCstLotNo = fCstLotNo; } public String getFBelongGoodsID() { return this.fBelongGoodsID; } public void setFBelongGoodsID(String fBelongGoodsID) { this.fBelongGoodsID = fBelongGoodsID; } public String getFBelongGoodsCode() { return this.fBelongGoodsCode; } public void setFBelongGoodsCode(String fBelongGoodsCode) { this.fBelongGoodsCode = fBelongGoodsCode; } public String getFBelongCstLotNo() { return this.fBelongCstLotNo; } public void setFBelongCstLotNo(String fBelongCstLotNo) { this.fBelongCstLotNo = fBelongCstLotNo; } public String getFOrdSpID() { return this.fOrdSpID; } public void setFOrdSpID(String fOrdSpID) { this.fOrdSpID = fOrdSpID; } }
[ "840390477@qq.com" ]
840390477@qq.com
3d5c8143593f0cf7dab283f21db27aa4613dbef2
c5d87143c46ed0921f253200ab999e90ea39f4f9
/src/org/iti/jxkh/entity/Jxkh_ReportMember.java
cb958c2986236ecb9723692dcefb9356866ada13
[]
no_license
hebut/jxkh
eb4a491fe34fe92be8c1855f85a804946e4446b7
70ea411aa0f9abbd88ee4d4ab88ea28fcb1a2392
refs/heads/master
2021-01-23T13:22:38.196081
2014-02-24T08:23:17
2014-02-24T08:23:17
15,934,048
0
1
null
null
null
null
GB18030
Java
false
false
3,075
java
package org.iti.jxkh.entity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @Entity @Table(name = "Jxkh_ReportMember") public class Jxkh_ReportMember implements java.io.Serializable { private static final long serialVersionUID = -8762590978911382273L; private Long id; private String name;// 成员姓名 private Short type;// 成员类型 private Integer rank;// 成员排名 private String dept;// 成员所属部门 private String personId;// 成员编号 private Jxkh_Report report;// 所属报告 private Float score;// 本人得分 private Float per;// 所占比例 private String assignDep;// 本人绩分指定给的部门 /* 成员类型:0 校内,1 校外 */ public static final Short IN = 0, OUT = 1; /** default constructor */ public Jxkh_ReportMember() { } public Jxkh_ReportMember(Long id, String name, Short type, Integer rank, String dept, String personId, Jxkh_Report report, Float score, Float per, String assignDep) { super(); this.id = id; this.name = name; this.type = type; this.rank = rank; this.dept = dept; this.personId = personId; this.report = report; this.score = score; this.per = per; this.assignDep = assignDep; } @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Column(length = 50) public String getName() { return name; } public void setName(String name) { this.name = name; } @Column public Short getType() { return type; } public void setType(Short type) { this.type = type; } @Column(length = 50) public Integer getRank() { return rank; } public void setRank(Integer rank) { this.rank = rank; } @Column(length = 100) public String getDept() { return dept; } public void setDept(String dept) { this.dept = dept; } @Column(length = 20) public String getPersonId() { return personId; } public void setPersonId(String personId) { this.personId = personId; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "REPORT", nullable = true, insertable = true, updatable = true) public Jxkh_Report getReport() { return report; } public void setReport(Jxkh_Report report) { this.report = report; } @Column public Float getScore() { return score; } public void setScore(Float score) { this.score = score; } @Column(length = 10) public Float getPer() { return per; } public void setPer(Float per) { this.per = per; } @Column(length = 100) public String getAssignDep() { return assignDep; } public void setAssignDep(String assignDep) { this.assignDep = assignDep; } }
[ "770506199@qq.com" ]
770506199@qq.com
c88daf512f7ebafbb4f16b13882a8ab558ac2327
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/mapstruct/learning/659/AfterMapping.java
2ca894483c8dee60758c12b13b562b6b5137320a
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,586
java
/* * Copyright MapStruct Authors. * * Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ package org.mapstruct; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Marks a method to be invoked at the end of a generated mapping method, right before the last {@code return} statement * of the mapping method. The method can be implemented in an abstract mapper class, be declared in a type (class or * interface) referenced in {@link Mapper#uses()}, or in a type used as {@code @}{@link Context} parameter in order to * be used in a mapping method. * <p> * The method invocation is only generated if the return type of the method (if non-{@code void}) is assignable to the * return type of the mapping method and all parameters can be <em>assigned</em> by the available source, target or * context parameters of the mapping method: * <ul> * <li>A parameter annotated with {@code @}{@link MappingTarget} is populated with the target instance of the mapping. * </li> * <li>A parameter annotated with {@code @}{@link TargetType} is populated with the target type of the mapping.</li> * <li>Parameters annotated with {@code @}{@link Context} are populated with the context parameters of the mapping * method.</li> * <li>Any other parameter is populated with a source parameter of the mapping.</li> * </ul> * <p> * For non-{@code void} methods, the return value of the method invocation is returned as the result of the mapping * method if it is not {@code null}. * <p> * All <em>after-mapping</em> methods that can be applied to a mapping method will be used. {@code @}{@link Qualifier} / * {@code @}{@link Named} can be used to filter the methods to use. * <p> * The order of the method invocation is determined by their location of definition: * <ol> * <li>Methods declared on {@code @}{@link Context} parameters, ordered by the parameter order.</li> * <li>Methods implemented in the mapper itself.</li> * <li>Methods from types referenced in {@link Mapper#uses()}, in the order of the type declaration in the annotation. * </li> * <li>Methods declared in one type are used after methods declared in their super-type</li> * </ol> * <em>Important:</em> the order of methods declared within one type can not be guaranteed, as it depends on the * compiler and the processing environment implementation. * <p> * Example: * * <pre> * <code> * &#64;AfterMapping * public void calledWithoutArgs() { * // ... * } * * &#64;AfterMapping * public void calledWithSourceAndTargetType(SourceEntity anySource, &#64;TargetType Class&lt;?&gt; targetType) { * // ... * } * * &#64;AfterMapping * public void calledWithSourceAndTarget(Object anySource, &#64;MappingTarget TargetDto target) { * // ... * } * * public abstract TargetDto toTargetDto(SourceEntity source); * * // generates: * * public TargetDto toTargetDto(SourceEntity source) { * if ( source == null ) { * return null; * } * * TargetDto targetDto = new TargetDto(); * * // actual mapping code * * calledWithoutArgs(); * calledWithSourceAndTargetType( source, TargetDto.class ); * calledWithSourceAndTarget( source, targetDto ); * * return targetDto; * } * </code> * </pre> * * @author Andreas Gudian * @see BeforeMapping * @see Context */ @Target(ElementType.METHOD) @Retention (RetentionPolicy.CLASS) public @interface AfterMapping { }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
3ad36e4885178c58baea6cd069e1bb1f4ed11102
a06cafcdfa8541e70a064875a1a3425a228de740
/curator-recipes/src/test/java/com/netflix/curator/framework/recipes/cache/TestPathChildrenCacheInCluster.java
7f5242a8192b27c2f275ea121d42bb1fc0f2dc0c
[ "Apache-2.0" ]
permissive
artemip/curator
0e1312e9e6e624ce50b43c4befeaf7fa47c04a87
01104d219adb3cfdedf9304b57beaf13f11d79ff
refs/heads/master
2021-01-18T06:41:41.375901
2012-07-05T19:04:23
2012-07-05T19:04:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,693
java
/* * * Copyright 2011 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.netflix.curator.framework.recipes.cache; import com.google.common.io.Closeables; import com.netflix.curator.framework.CuratorFramework; import com.netflix.curator.framework.CuratorFrameworkFactory; import com.netflix.curator.retry.RetryOneTime; import com.netflix.curator.test.InstanceSpec; import com.netflix.curator.test.TestingCluster; import com.netflix.curator.test.Timing; import org.testng.Assert; import org.testng.annotations.Test; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; public class TestPathChildrenCacheInCluster { @Test public void testServerLoss() throws Exception { Timing timing = new Timing(); CuratorFramework client = null; PathChildrenCache cache = null; TestingCluster cluster = new TestingCluster(3); try { cluster.start(); client = CuratorFrameworkFactory.newClient(cluster.getConnectString(), timing.session(), timing.connection(), new RetryOneTime(1)); client.start(); client.create().creatingParentsIfNeeded().forPath("/test"); cache = new PathChildrenCache(client, "/test", false); cache.start(); final CountDownLatch resetLatch = new CountDownLatch(1); final AtomicReference<CountDownLatch> latch = new AtomicReference<CountDownLatch>(new CountDownLatch(3)); cache.getListenable().addListener ( new PathChildrenCacheListener() { @Override public void childEvent(CuratorFramework client, PathChildrenCacheEvent event) throws Exception { if ( event.getType() == PathChildrenCacheEvent.Type.RESET ) { resetLatch.countDown(); } else if ( event.getType() == PathChildrenCacheEvent.Type.CHILD_ADDED ) { latch.get().countDown(); } } } ); client.create().forPath("/test/one"); client.create().forPath("/test/two"); client.create().forPath("/test/three"); Assert.assertTrue(latch.get().await(10, TimeUnit.SECONDS)); latch.set(new CountDownLatch(3)); InstanceSpec connectionInstance = cluster.findConnectionInstance(client.getZookeeperClient().getZooKeeper()); cluster.killServer(connectionInstance); Assert.assertTrue(timing.multiple(4).awaitLatch(resetLatch)); Assert.assertTrue(timing.multiple(4).awaitLatch(latch.get())); // the cache should reset itself } finally { Closeables.closeQuietly(cache); Closeables.closeQuietly(client); Closeables.closeQuietly(cluster); } } }
[ "jordan@jordanzimmerman.com" ]
jordan@jordanzimmerman.com
f45f3c0a1570705b41d2592f69fa265ce4cdc965
94311ca7dc6c28c4212b2a7e41782409ee4b96cb
/transport/src/com/liquidlabs/transport/proxy/addressing/KeepOrderedAddresser.java
69c89defc9ed840300e63c18dc761ae65a6a2189
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
logscape/Logscape
5856f3bf55fb1723b57ec9fce7f7546ee4cd27f1
fde9133797b8f1d03f824c65e26e352ae5677063
refs/heads/master
2021-09-01T08:47:12.323845
2021-04-01T07:58:15
2021-04-01T07:58:15
89,608,168
28
10
NOASSERTION
2021-08-02T17:19:32
2017-04-27T14:43:31
Java
UTF-8
Java
false
false
7,598
java
package com.liquidlabs.transport.proxy.addressing; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collection; import java.util.ConcurrentModificationException; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.log4j.Logger; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.KryoSerializable; import com.esotericsoftware.kryo.io.Input; import com.esotericsoftware.kryo.io.Output; import com.liquidlabs.common.collection.Arrays; import com.liquidlabs.common.net.URI; import com.liquidlabs.transport.proxy.RetryInvocationException; /** * only rotates on failure, but orders the last part of the list so all peers * will fail in the same order * * @author neil * */ public class KeepOrderedAddresser implements AddressHandler, Externalizable, KryoSerializable { private static final Logger LOGGER = Logger.getLogger(KeepOrderedAddresser.class); private String serviceName = ""; List<URI> endPoints = new ArrayList<URI>(); List<URI> blackList = new ArrayList<URI>(); protected boolean replayRequired = false; private RefreshAddrs updateTask; public KeepOrderedAddresser(String serviceName) { this.serviceName = serviceName; } public KeepOrderedAddresser() { } /** * Note: Order is PARAMOUNT! it contains ZONE Failover preference so make * sure it is maintained */ public synchronized void addEndPoints(String... givenEndPoints) { if (givenEndPoints == null) return; URI currentEP = endPoints.isEmpty() ? null : endPoints.get(0); endPoints.clear(); for (String newEP : givenEndPoints) { try { URI newURI = new URI(newEP); if (!endPoints.contains(newURI)) endPoints.add(newURI); } catch (URISyntaxException e) { e.printStackTrace(); } } URI newEP = endPoints.isEmpty() ? null : endPoints.get(0); if (isModifiedURI(currentEP, newEP)) { replayRequired = true; replayReason = "Detected modified URI"; } messWithList(); } private boolean isModifiedURI(URI currentEP, URI newEP) { if (currentEP == null && newEP != null) return true; if (newEP == null) return false; return !currentEP.equals(newEP); } String replayReason = ""; public synchronized void syncEndpoints(String[] addresses) { // use above method instead } /** * Called when something is wrong! * It will refresh the list and also use the next endpoint if the current one if first in the list */ synchronized public void validateEndPoints() { try { if (this.updateTask != null) { LOGGER.info(this.serviceName + " Refreshing Endpoints existingEPS:" + this.endPoints); String[] addresses = updateTask.getAddresses(); int retry = 0; while ((addresses == null || addresses.length == 0) && retry++ < 10) { try { addresses = updateTask.getAddresses(); Thread.sleep(10 * 1000); } catch (InterruptedException t) { throw new RuntimeException(t); } catch (Throwable t) { } } if (addresses == null) { LOGGER.info(this.serviceName + " Null Address List- bailing"); return; } if (addresses.length > 0) { LOGGER.debug(" - new EndPoints:" + Arrays.toString(addresses)); this.addEndPoints(addresses); } } else if (this.endPoints.size() > 1) { LOGGER.debug(this.serviceName + "_HA_ Refreshing Endpoints was not given a refresh Task:" + endPoints); } else if (this.endPoints.size() == 0) { this.endPoints = new ArrayList<URI>(blackList); blackList.clear(); } } catch (Throwable t) { LOGGER.warn(this.serviceName + " Failed to execute Updater, currentEP:", t); } } public void registerAddressRefresher(RefreshAddrs update) { this.updateTask = update; } private String getURLValueOnly(String string) { if (string.contains("://")) { try { URI uri = new URI(string); return uri.getScheme() + "://" + uri.getHost() + ":" + uri.getPort(); } catch (URISyntaxException e) { } } return null; } protected void messWithList() { } public boolean isEndPointAvailable() { return !this.endPoints.isEmpty(); } public List<URI> getEndPointURIs() { if (this.endPoints.isEmpty()) validateEndPoints(); return new ArrayList<URI>(endPoints); } public URI getEndPointURI() throws RetryInvocationException { try { return getEndPointURIs().get(0); } catch (Exception e) { throw new RuntimeException(e); } } public URI getEndPointURISafe() { List<URI> endPointURIs = getEndPointURIs(); if (endPointURIs.isEmpty()) return null; return endPointURIs.get(0); } synchronized public void registerFailure(URI uri) { if (LOGGER.isDebugEnabled()) LOGGER.debug("Registering EP Failure:" + uri); this.endPoints.remove(uri); if (!blackList.contains(uri)) blackList.add(uri); this.replayRequired = true; replayReason = "Registered Failure"; } public void resetReplayFlag() { this.replayRequired = false; this.replayReason = ""; } public String replayReason() { return this.replayReason; } public boolean isReplayRequired() { return this.replayRequired; } public synchronized boolean remove(String removeAddresses) { boolean remove = false; boolean removedCurrent = false; for (String removedURI : removeAddresses.split(",")) { try { URI uri = new URI(removedURI); removedCurrent = uri.equals(this.endPoints.get(0)) ? true : removedCurrent; remove = this.endPoints.remove(uri) || remove; // make replay when swapping from current addresses blackList.remove(removedURI); } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } } /** * Current EP was removed - so we need to trigger a replay */ if (this.endPoints.isEmpty() || removedCurrent) { this.replayRequired = true; replayReason = "Removed:" + removeAddresses; } return remove; } public String toString() { while (true) { try { StringBuilder builder = new StringBuilder(); builder.append("["); builder.append(getClass().getSimpleName()); builder.append(":" + this.serviceName); builder.append(" /:"); builder.append(" list["); builder.append(endPoints); builder.append("] badEP"); builder.append(blackList.toString()); builder.append(" replay?:"); builder.append(replayRequired); builder.append(" reason:"); builder.append(replayReason); builder.append("]"); return builder.toString(); } catch (ConcurrentModificationException ex) { } } } public Collection<URI> blackList() { return blackList; } public void writeExternal(ObjectOutput out) throws IOException { out.writeUTF(serviceName); out.writeObject(this.endPoints); } public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.serviceName = in.readUTF(); this.endPoints = (List<URI>) in.readObject(); } public void read(Kryo kryo, Input input) { serviceName = kryo.readObject(input, String.class); List<String> addrs = kryo.readObject(input, ArrayList.class); this.endPoints = new ArrayList<URI>(); for (String addr : addrs) { try { endPoints.add(new URI(addr)); } catch (URISyntaxException e) { e.printStackTrace(); } } } public void write(Kryo kryo, Output output) { kryo.writeObject(output, serviceName); List<String> addrs = new ArrayList<String>(); for (URI uri : this.endPoints) { addrs.add(uri.toString()); } kryo.writeObject(output, addrs); } }
[ "support@logscape.com" ]
support@logscape.com
22d90815be95529ff4dbb58052fe3d73ec934dae
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/finder/ui/ShareRelPresenter$buildItemCoverts$1$addListener$1.java
bbac9d78768ff121ed32f69a224ac7a649d71295
[]
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
1,112
java
package com.tencent.mm.plugin.finder.ui; import androidx.lifecycle.q; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.app.f; import com.tencent.mm.autogen.a.jm; import com.tencent.mm.sdk.event.IListener; import kotlin.Metadata; @Metadata(d1={""}, d2={"com/tencent/mm/plugin/finder/ui/ShareRelPresenter$buildItemCoverts$1$addListener$1", "Lcom/tencent/mm/sdk/event/IListener;", "Lcom/tencent/mm/autogen/events/FinderShareGuideShowEvent;", "callback", "", "event", "plugin-finder_release"}, k=1, mv={1, 5, 1}, xi=48) public final class ShareRelPresenter$buildItemCoverts$1$addListener$1 extends IListener<jm> { ShareRelPresenter$buildItemCoverts$1$addListener$1(int paramInt, j paramj, com.tencent.mm.view.recyclerview.j paramj1, f paramf) { super((q)paramf); AppMethodBeat.i(347278); AppMethodBeat.o(347278); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar * Qualified Name: com.tencent.mm.plugin.finder.ui.ShareRelPresenter.buildItemCoverts.1.addListener.1 * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
ca38434d9880e04ee50c22bc4e4d218081d16635
f59f9a03eaf296faa8fad67380e5c90958dbe3cf
/src/main/java/com/whg/ijvm/ch10/test/nativecall/StringTest.java
14f2aa0691c50ec305661a7402cbb8c1b69fc2f1
[]
no_license
whg333/ijvm
479b1ee2328c6b8c663e668b2c38c8423dbb8596
28c4b60beaa7412cec59e210e40c366b74aaa939
refs/heads/master
2022-06-26T07:47:10.357161
2022-05-16T12:25:32
2022-05-16T12:25:32
208,620,194
3
2
null
2022-06-17T03:37:40
2019-09-15T16:09:24
Java
UTF-8
Java
false
false
399
java
package com.whg.ijvm.ch10.test.nativecall; public class StringTest { public static void main(String[] args) { String s1 = "abc1"; String s2 = "abc1"; System.out.println(s1 == s2); int x = 1; String s3 = "abc" + x; System.out.println(s1 == s3); s3 = s3.intern(); System.out.println(s1 == s3); } }
[ "wanghonggang@hulai.com" ]
wanghonggang@hulai.com
192156daefbe39ea400dd569d8b696f2b19ecd91
13cd80448e703d012049b0f28b6aaacf4f341a22
/modules/process-controller/src/jrat/module/process/PacketQueryProcesses.java
aaa3e8a2e8908bdecdc7e0f3f558fa46a682aa87
[]
no_license
wille/jrat
89e96998b90ca4d11a3cfc72665f2d4e81fc5779
f54d3032897db337f57514d7ab8733b874192cd1
refs/heads/master
2022-06-29T21:05:02.795926
2018-08-28T15:55:39
2018-08-28T15:55:39
208,027,992
2
0
null
null
null
null
UTF-8
Java
false
false
488
java
package jrat.module.process; import jrat.controller.Slave; import jrat.controller.packets.outgoing.OutgoingPacket; public class PacketQueryProcesses implements OutgoingPacket { private boolean icons; public PacketQueryProcesses() { this(false); } public PacketQueryProcesses(boolean icons) { this.icons = icons; } @Override public void write(Slave slave) throws Exception { slave.writeBoolean(icons); } @Override public short getPacketId() { return 19; } }
[ "red@cmail.nu" ]
red@cmail.nu
d25b499d3ade98546f2833fbde04abbfc0158c98
930c207e245c320b108e9699bbbb036260a36d6a
/BRICK-RDF4J/generatedCode/src/main/java/brickschema/org/schema/_1_0_2/Brick/VAV_Occupied_Command.java
d8a16d9b0b95b7395c6c13bddcbf811adccc5a9b
[]
no_license
InnovationSE/BRICK-Generated-By-OLGA
24d278f543471e1ce622f5f45d9e305790181fff
7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2
refs/heads/master
2021-07-01T14:13:11.302860
2017-09-21T12:44:17
2017-09-21T12:44:17
104,251,784
1
0
null
null
null
null
UTF-8
Java
false
false
1,221
java
/** * This file is automatically generated by OLGA * @author OLGA * @version 1.0 */ package brickschema.org.schema._1_0_2.Brick; import brick.global.util.GLOBAL; import org.eclipse.rdf4j.model.IRI; import org.eclipse.rdf4j.model.vocabulary.RDF; import java.math.BigDecimal; import javax.xml.datatype.XMLGregorianCalendar; import java.util.Date; import brickschema.org.schema._1_0_2.Brick.Occupancy_Command; import brickschema.org.schema._1_0_2.Brick.Command; import brickschema.org.schema._1_0_2.Brick.Point; import brickschema.org.schema._1_0_2.BrickFrame.TagSet; import brickschema.org.schema._1_0_2.Brick.Occupied_Command; import brickschema.org.schema._1_0_2.Brick.Command; import brickschema.org.schema._1_0_2.Brick.Point; import brickschema.org.schema._1_0_2.BrickFrame.TagSet; public class VAV_Occupied_Command implements IVAV_Occupied_Command { IRI newInstance; public VAV_Occupied_Command(String namespace, String instanceId) { super(); newInstance = GLOBAL.factory.createIRI(namespace, instanceId); GLOBAL.model.add(newInstance, RDF.TYPE, GLOBAL.factory.createIRI("https://brickschema.org/schema/1.0.2/Brick#VAV_Occupied_Command")); } public IRI iri() { return newInstance; } }
[ "Andre.Ponnouradjane@non.schneider-electric.com" ]
Andre.Ponnouradjane@non.schneider-electric.com
15e4fc344ef1af61628c03c7b0ced2fe56d09b4b
a4707705c3820442b28dd0b3ee8d50b8c0a38252
/slime-core/src/main/java/com/github/nekolr/slime/executor/node/event/OutputEventPublisher.java
101242e48046d137c0588963232c059375616737
[ "MIT" ]
permissive
CrackerCat/slime
6b4522eb8708c63644bc42d216a6e2698544e5b2
847a7d7453bb8f38e401ec0307e8b8ed841e7d58
refs/heads/master
2023-06-16T19:28:23.298120
2021-07-13T15:27:48
2021-07-13T15:27:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,605
java
package com.github.nekolr.slime.executor.node.event; import com.github.nekolr.slime.constant.Constants; import com.github.nekolr.slime.constant.OutputType; import com.github.nekolr.slime.context.SpiderContext; import com.github.nekolr.slime.model.SpiderNode; import com.github.nekolr.slime.model.SpiderOutput.OutputItem; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationEventPublisher; import org.springframework.stereotype.Component; import java.util.List; @Component public class OutputEventPublisher { @Autowired @SuppressWarnings("all") private ApplicationEventPublisher eventPublisher; /** * 发布输出事件 * * @param context 执行上下文 * @param node 节点 * @param outputItems 所有的输出项数据 */ public void publish(SpiderContext context, SpiderNode node, List<OutputItem> outputItems) { OutputType[] outputTypes = OutputType.values(); for (OutputType outputType : outputTypes) { if (Constants.YES.equals(node.getJsonProperty(outputType.getVariableName()))) { eventPublisher.publishEvent(new OutputEventBean(context, node, outputItems, outputType.getVariableName())); } } } @Getter @Setter @AllArgsConstructor class OutputEventBean { private SpiderContext context; private SpiderNode node; private List<OutputItem> outputItems; private String event; } }
[ "excalibll@163.com" ]
excalibll@163.com
39834c88a9267d4f4221609a051df90351d3b6c7
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes8.dex_source_from_JADX/com/facebook/graphql/connection/configuration/SequentialBatchConfiguration.java
b12b1b85e41b96c20278ff9ec6f411bf00a78fc3
[]
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
7,523
java
package com.facebook.graphql.connection.configuration; import com.facebook.common.stringformat.StringFormatUtil; import com.facebook.debug.log.BLog; import com.facebook.graphql.connection.ConnectionTailLoaderManager.ConnectionFetcherState; import com.facebook.graphql.connection.ConnectionTailLoaderManager.RowIterator; import com.facebook.graphql.cursor.database.SortKeyHelper; import com.facebook.graphql.executor.GraphQLBatchRequest; import com.facebook.graphql.executor.GraphQLBatchRequest.EndpointScheduler; import com.facebook.graphql.executor.GraphQLCachePolicy; import com.facebook.graphql.executor.GraphQLRequest; import com.facebook.graphql.executor.GraphQLResult; import com.facebook.graphql.executor.RequestObserver; import com.facebook.graphql.query.GraphQLRefParam; import com.facebook.quicklog.QuickPerformanceLogger; import com.google.common.base.Preconditions; import java.util.concurrent.Executor; /* compiled from: white_place */ public class SequentialBatchConfiguration implements BatchConfiguration { public final Configuration f247a; public final String f248b; public final Configuration f249c; public final long f250d; private final String f251e; /* compiled from: white_place */ public abstract class StreamingConfiguration extends Configuration { public abstract GraphQLRequest m225a(GraphQLRefParam graphQLRefParam); } public SequentialBatchConfiguration(Configuration configuration, Configuration configuration2, long j) { this(configuration, null, configuration2, j); } public SequentialBatchConfiguration(Configuration configuration, String str, StreamingConfiguration streamingConfiguration, long j) { this(configuration, str, (Configuration) streamingConfiguration, j); } private SequentialBatchConfiguration(Configuration configuration, String str, Configuration configuration2, long j) { this.f247a = configuration; this.f248b = str; this.f249c = configuration2; this.f250d = j; this.f251e = StringFormatUtil.formatStrLocaleSafe("SequentialBatchConfiguration:%s:%s", this.f247a.mo20a(), this.f249c.mo20a()); } public final long mo11a() { return this.f250d; } public final int mo13b() { return 1; } public final GraphQLBatchRequest mo12a(QuickPerformanceLogger quickPerformanceLogger, ConnectionFetcherState connectionFetcherState, Executor executor, TailFetchLocation tailFetchLocation) { if (tailFetchLocation.f261b == null) { return m227b(quickPerformanceLogger, connectionFetcherState, executor, tailFetchLocation); } return m228c(quickPerformanceLogger, connectionFetcherState, executor, tailFetchLocation); } private GraphQLBatchRequest m227b(QuickPerformanceLogger quickPerformanceLogger, ConnectionFetcherState connectionFetcherState, Executor executor, TailFetchLocation tailFetchLocation) { boolean z; boolean z2; GraphQLRequest a = ConfigurationLoggingHelper.m216a(quickPerformanceLogger, this.f247a, tailFetchLocation); if (a.a == GraphQLCachePolicy.c) { z = true; } else { z = false; } Preconditions.checkState(z); GraphQLBatchRequest graphQLBatchRequest = new GraphQLBatchRequest(this.f251e); graphQLBatchRequest.j = EndpointScheduler.PHASED; if (this.f248b == null || !(this.f249c instanceof StreamingConfiguration)) { z2 = false; } else { z2 = true; } final TailFetchLocation tailFetchLocation2 = tailFetchLocation; final QuickPerformanceLogger quickPerformanceLogger2 = quickPerformanceLogger; final ConnectionFetcherState connectionFetcherState2 = connectionFetcherState; graphQLBatchRequest.a(a).a(executor).a(new RequestObserver<GraphQLResult>(this) { final /* synthetic */ SequentialBatchConfiguration f240e; private TailFetchLocation f241f = ((TailFetchLocation) Preconditions.checkNotNull(tailFetchLocation2)); public final void m220a(Object obj) { GraphQLResult graphQLResult = (GraphQLResult) obj; if (graphQLResult == null || graphQLResult.e == null) { BLog.b(SequentialBatchConfiguration.class, "Null response from network"); return; } RowIterator a = ConfigurationLoggingHelper.m215a(quickPerformanceLogger2, this.f240e.f247a, this.f241f, graphQLResult); this.f241f = (TailFetchLocation) Preconditions.checkNotNull(a.mo14d()); connectionFetcherState2.m186a(a); } public final void m221a(Throwable th) { connectionFetcherState2.m187a(th); m219a(); } public final void m219a() { if (!z2) { connectionFetcherState2.m188b(); } } }); if (z2) { m226a(quickPerformanceLogger, connectionFetcherState, executor, new TailFetchLocation(SortKeyHelper.a(tailFetchLocation.f260a, 256), null, true), graphQLBatchRequest, ConfigurationLoggingHelper.m217a(quickPerformanceLogger, (StreamingConfiguration) this.f249c, a.b(this.f248b))); } return graphQLBatchRequest; } private GraphQLBatchRequest m228c(QuickPerformanceLogger quickPerformanceLogger, ConnectionFetcherState connectionFetcherState, Executor executor, TailFetchLocation tailFetchLocation) { boolean z; GraphQLBatchRequest graphQLBatchRequest = new GraphQLBatchRequest(this.f251e); GraphQLRequest a = ConfigurationLoggingHelper.m216a(quickPerformanceLogger, this.f249c, tailFetchLocation); if (a.a == GraphQLCachePolicy.c) { z = true; } else { z = false; } Preconditions.checkState(z); m226a(quickPerformanceLogger, connectionFetcherState, executor, tailFetchLocation, graphQLBatchRequest, a); return graphQLBatchRequest; } private void m226a(final QuickPerformanceLogger quickPerformanceLogger, final ConnectionFetcherState connectionFetcherState, Executor executor, final TailFetchLocation tailFetchLocation, GraphQLBatchRequest graphQLBatchRequest, GraphQLRequest graphQLRequest) { graphQLBatchRequest.a(graphQLRequest).b(executor).a(new RequestObserver<GraphQLResult>(this) { final /* synthetic */ SequentialBatchConfiguration f245d; private TailFetchLocation f246e = ((TailFetchLocation) Preconditions.checkNotNull(tailFetchLocation)); public final void m223a(Object obj) { GraphQLResult graphQLResult = (GraphQLResult) obj; if (graphQLResult == null || graphQLResult.e == null) { BLog.b(SequentialBatchConfiguration.class, "Null response from network"); return; } RowIterator a = ConfigurationLoggingHelper.m215a(quickPerformanceLogger, this.f245d.f249c, this.f246e, graphQLResult); this.f246e = (TailFetchLocation) Preconditions.checkNotNull(a.mo14d()); connectionFetcherState.m186a(a); } public final void m224a(Throwable th) { connectionFetcherState.m187a(th); m222a(); } public final void m222a() { connectionFetcherState.m188b(); } }); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com