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
c0b5f9f5773a451bd15f140a3f30992bab04133f
947fc9eef832e937f09f04f1abd82819cd4f97d3
/src/apk/com/google/android/gms/common/api/internal/B.java
69c5cfd030a5eb747aee1a125e63a5c769cc57b3
[]
no_license
thistehneisen/cifra
04f4ac1b230289f8262a0b9cf7448a1172d8f979
d46c6f4764c9d4f64e45c56fa42fddee9b44ff5a
refs/heads/master
2020-09-22T09:35:57.739040
2019-12-01T19:39:59
2019-12-01T19:39:59
225,136,583
1
0
null
null
null
null
UTF-8
Java
false
false
1,213
java
package com.google.android.gms.common.api.internal; import android.os.DeadObjectException; import android.os.RemoteException; import com.google.android.gms.common.api.ApiException; import com.google.android.gms.common.api.Status; import com.google.android.gms.common.api.internal.C0299b.a; import com.google.android.gms.tasks.h; abstract class B<T> extends u { /* renamed from: b reason: collision with root package name */ protected final h<T> f4540b; public B(int i2, h<T> hVar) { super(i2); this.f4540b = hVar; } public void a(Status status) { this.f4540b.b((Exception) new ApiException(status)); } /* access modifiers changed from: protected */ public abstract void d(a<?> aVar) throws RemoteException; public void a(RuntimeException runtimeException) { this.f4540b.b((Exception) runtimeException); } public final void a(a<?> aVar) throws DeadObjectException { try { d(aVar); } catch (DeadObjectException e2) { a(l.b(e2)); throw e2; } catch (RemoteException e3) { a(l.b(e3)); } catch (RuntimeException e4) { a(e4); } } }
[ "putnins@nils.digital" ]
putnins@nils.digital
5c755027c8793237dbb786f7ed6c1cd7a8b98394
cd2ef82fb7f18d31f316da82bc94a76a497c4ab0
/api-backend/3scale-management/src/main/java/com/hisense/gateway/management/service/LimitService.java
3a6750a52ca4acc5f09cb3125feced100c2b5715
[]
no_license
xiongliang1/3scale-api-2.0.0
3b6a45f196f44235fd9da336e09ecbf4b7f854b4
2843b45d8639d10b75b0477e3e63786136bf23d3
refs/heads/master
2023-03-23T06:51:31.839019
2021-03-24T03:40:24
2021-03-24T03:40:24
350,931,316
1
0
null
null
null
null
UTF-8
Java
false
false
1,598
java
/* * Licensed Materials - Property of tenxcloud.com * (C) Copyright 2020 TenxCloud. All Rights Reserved. * * @auther douyanwei * @date 2020/2/20 */ package com.hisense.gateway.management.service; import com.hisense.gateway.library.model.Result; import com.hisense.gateway.library.model.dto.web.LimitBingApiPolicy; import com.hisense.gateway.library.model.dto.web.LimitPolicyDto; import com.hisense.gateway.library.model.pojo.base.ApiInstance; import com.hisense.gateway.library.model.pojo.base.ApiPolicy; import com.hisense.gateway.library.web.form.BindingForm; import org.springframework.data.domain.Page; import java.util.List; public interface LimitService { Result<Boolean> bindingApi(String clusterId, List<BindingForm> bindingFormList, String policyId); Result<Boolean> unbindApi(String clusterId, BindingForm bindingForm, String policyId); Result<Boolean> createLimitPolicy(String projectId, LimitPolicyDto limitPolicyDto); Result<Boolean> updateLimitPolicy(Integer id, String clusterId, String projectId, LimitPolicyDto limitPolicyDto); Result<Page<ApiPolicy>> searchLimitPolicy(String clusterId, String projectId, LimitPolicyDto limitPolicyDto); Result<Boolean> deleteLimitPolicy(Integer id, String clusterId); Result<LimitPolicyDto> getLimitPolicyById(Integer id); List<ApiInstance> getInstances(Integer policyid); Result<Boolean> checkLimitPolicyName(String projectId, LimitPolicyDto limitPolicyDto); Result<Page<LimitBingApiPolicy>> searchLimitBingApiPolicy(String clusterId, String projectId, LimitPolicyDto limitPolicyDto); }
[ "chaoyang.beijing" ]
chaoyang.beijing
2153069f09b79d9f41762d8dab1914958421b12f
bb13907de0911a1c03f1a32a7ea16740234abf1c
/src/main/java/com/emc/fapi/jaxws/v4_3_1/GetPhoenixClusterState.java
aabb5812ccf1e872f6a9f01317d5c981cfc65ef3
[]
no_license
noamda/fal431
9287e95fa2bacdace92e65b16ec6985ce2ded29c
dad30667424970fba049df3ba2c2023b82b9276e
refs/heads/master
2021-01-21T14:25:10.211169
2016-06-20T08:55:43
2016-06-20T08:58:33
58,481,483
0
0
null
null
null
null
UTF-8
Java
false
false
1,212
java
package com.emc.fapi.jaxws.v4_3_1; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "getPhoenixClusterState", propOrder = {"cluster"}) public class GetPhoenixClusterState { protected ClusterUID cluster; public GetPhoenixClusterState() { } public GetPhoenixClusterState(ClusterUID cluster) { this.cluster = cluster; } public ClusterUID getCluster() { return this.cluster; } public void setCluster(ClusterUID value) { this.cluster = value; } public boolean equals(Object obj) { if (!(obj instanceof GetPhoenixClusterState)) { return false; } GetPhoenixClusterState otherObj = (GetPhoenixClusterState) obj; return this.cluster == otherObj.cluster ? true : this.cluster != null ? this.cluster.equals(otherObj.cluster) : false; } public int hashCode() { return this.cluster != null ? this.cluster.hashCode() : 0; } public String toString() { return "GetPhoenixClusterState [cluster=" + this.cluster + "]"; } }
[ "style.daniel@gmail.com" ]
style.daniel@gmail.com
0f2e02d07f6d8f25b1d932e43a31b8ec9b1fbc10
b97bc0706448623a59a7f11d07e4a151173b7378
/src/main/java/com/tcmis/client/catalog/process/PackageStyleSearchProcess.java
4e1ffb027625ee767dbe85abf9a6f1bc4b8bbd28
[]
no_license
zafrul-ust/tcmISDev
576a93e2cbb35a8ffd275fdbdd73c1f9161040b5
71418732e5465bb52a0079c7e7e7cec423a1d3ed
refs/heads/master
2022-12-21T15:46:19.801950
2020-02-07T21:22:50
2020-02-07T21:22:50
241,601,201
0
0
null
2022-12-13T19:29:34
2020-02-19T11:08:43
Java
UTF-8
Java
false
false
3,210
java
package com.tcmis.client.catalog.process; import java.util.Collection; import java.util.Hashtable; import java.util.Vector; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.tcmis.common.admin.beans.PersonnelBean; import com.tcmis.common.admin.beans.VvPkgStyleBean; import com.tcmis.common.db.DbManager; import com.tcmis.common.exceptions.BaseException; import com.tcmis.common.framework.BaseProcess; import com.tcmis.common.framework.GenericSqlFactory; import com.tcmis.common.util.SqlHandler; import com.tcmis.common.util.StringHandler; import com.tcmis.common.admin.beans.AutocompleteInputBean; /****************************************************************************** * Process used by PackageStyleSearchProcess * @version 1.0 *****************************************************************************/ public class PackageStyleSearchProcess extends BaseProcess { Log log = LogFactory.getLog(this.getClass()); public PackageStyleSearchProcess(String client) { super(client); } public Collection getPackageStyleBeanCollection( String searchArgument) throws BaseException, Exception { DbManager dbManager = new DbManager(getClient()); GenericSqlFactory factory = new GenericSqlFactory(dbManager,new VvPkgStyleBean()); StringBuilder query = new StringBuilder("select * from vv_pkg_style"); if (!StringHandler.isBlankString(searchArgument)) { query.append(" where ").append(doSearchLogic(searchArgument)); } query.append(" order by pkg_style"); return factory.selectQuery(query.toString()); } public Collection getPackageStyleBeanCollection(AutocompleteInputBean inputBean) throws BaseException, Exception { DbManager dbManager = new DbManager(getClient(),getLocale()); GenericSqlFactory factory = new GenericSqlFactory(dbManager,new VvPkgStyleBean()); // This is for O'brien. We need to escape the ' in the name. //String escapedSearchText = inputBean.getSearchText().replace("'", "''"); StringBuilder query = new StringBuilder("select * from vv_pkg_style where "); query.append(doSearchLogic(inputBean.getSearchText())).append(" and rownum <= ").append(inputBean.getRowNum()); return factory.selectQuery(query.toString()); } public String doSearchLogic(String search) { Hashtable r = StringHandler.getLogicalHashFromString(search); Vector opers = (Vector) r.get("OPERATORS"); Vector likes = (Vector) r.get("LIKES"); String result = ""; //no operator if (opers.size() < 1) { result = " lower(pkg_style) like lower('%" + SqlHandler.validQuery(search) + "%')"; return result; } //contains operation in search text result += " lower(pkg_style) like lower('%" + SqlHandler.validQuery(likes.elementAt(0).toString().trim()) + "%') "; for (int i = 0; i < opers.size(); i++) { String op = opers.elementAt(i).toString(); String lk = "like"; if (op.equalsIgnoreCase("but not")) { op = "and"; lk = "not like"; } String searchS = likes.elementAt(i + 1).toString().trim(); result += " " + op + " lower(pkg_style) " + lk + " lower('%" + SqlHandler.validQuery(searchS) + "%') "; } return result; } } //end of class
[ "julio.rivero@wescoair.com" ]
julio.rivero@wescoair.com
71456dacc60640a7e0c9c1a4a48f00df5aa5d148
c61b7330a6e6aaf25b1129a992190a83360404d1
/workspace_apidemo/AndExam4_1/src/andexam/ver4_1/c06_layoutman/InputForm.java
256d6c17d0cfaac60be738a897fd785c2a96d030
[]
no_license
mech12/dialogplayer
2e2335653243e4971d82c6560cae3b4fe7df7c28
102d163146daefa75a6a23b1fd36b2a04bf8f708
refs/heads/master
2016-09-05T09:29:08.505656
2015-03-13T10:29:51
2015-03-13T10:29:51
29,862,768
0
0
null
null
null
null
UTF-8
Java
false
false
281
java
package andexam.ver4_1.c06_layoutman; import andexam.ver4_1.*; import android.app.*; import android.os.*; public class InputForm extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.inputform); } }
[ "icandoit@blueark.com" ]
icandoit@blueark.com
44bc064ae70271395e4329522bb5c163eab9dab1
818b7eb7b96dfec09d6aa399a17a6288ece3221b
/oep-common/src/main/java/com/kvlt/pojo/AvatarResult.java
95e4fec05d285ce5c874f3664be895ce7c4ef507
[]
no_license
davidsky11/OEP
6988b42523a3200d1aad5a6842cece7c1870c9da
5299cb1568de1ec70b7d6416c707e9b334aac3dc
refs/heads/master
2021-06-28T10:36:47.133096
2017-09-17T13:25:44
2017-09-17T13:25:44
103,830,658
0
0
null
null
null
null
UTF-8
Java
false
false
1,288
java
package com.kvlt.pojo; import java.util.ArrayList; /** * AvatarResult * * @author KVLT * @date 2017-03-14. */ public class AvatarResult { /** * 表示图片是否已上传成功。 */ private Boolean success; /** * 自定义的附加消息。 */ private String msg; /** * 表示原始图片的保存地址。 */ private String sourceUrl; /** * 表示所有头像图片的保存地址,该变量为一个数组。 */ private ArrayList avatarUrls; public Boolean getSuccess() { return success; } public void setSuccess(Boolean success) { this.success = success; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public String getSourceUrl() { return sourceUrl; } public void setSourceUrl(String sourceUrl) { this.sourceUrl = sourceUrl; } public ArrayList getAvatarUrls() { return avatarUrls; } public void setAvatarUrls(ArrayList avatarUrls) { this.avatarUrls = avatarUrls; } }
[ "kv@dell.com" ]
kv@dell.com
91543c9bcbff402fa32d0e0b8fa983dc20a0d342
164dd2f34109deb0b2ef322a6de9fe3ab0670aed
/cocoatouch/src/main/java/org/robovm/apple/social/SLComposeSheetConfigurationItem.java
2e54f865aaa9464b60d4de921cb77fee57da88cf
[ "Apache-2.0" ]
permissive
glenndmello/robovm
9e0863559854d0ed30f51e9f405a76c9ad97ca9e
c73408eafff49f780d00f3e4f9fb0ee10732ffa3
refs/heads/master
2020-12-24T08:32:05.788722
2015-03-10T21:30:20
2015-03-10T21:30:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,700
java
/* * Copyright (C) 2013-2015 Trillian Mobile AB * * 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.robovm.apple.social; /*<imports>*/ import java.io.*; import java.nio.*; import java.util.*; import org.robovm.objc.*; import org.robovm.objc.annotation.*; import org.robovm.objc.block.*; import org.robovm.rt.*; import org.robovm.rt.bro.*; import org.robovm.rt.bro.annotation.*; import org.robovm.rt.bro.ptr.*; import org.robovm.apple.foundation.*; import org.robovm.apple.uikit.*; import org.robovm.apple.accounts.*; import org.robovm.apple.coregraphics.*; /*</imports>*/ /*<javadoc>*/ /** * @since Available in iOS 8.0 and later. */ /*</javadoc>*/ /*<annotations>*/@Library("Social") @NativeClass/*</annotations>*/ /*<visibility>*/public/*</visibility>*/ class /*<name>*/SLComposeSheetConfigurationItem/*</name>*/ extends /*<extends>*/NSObject/*</extends>*/ /*<implements>*//*</implements>*/ { /*<ptr>*/public static class SLComposeSheetConfigurationItemPtr extends Ptr<SLComposeSheetConfigurationItem, SLComposeSheetConfigurationItemPtr> {}/*</ptr>*/ /*<bind>*/static { ObjCRuntime.bind(SLComposeSheetConfigurationItem.class); }/*</bind>*/ /*<constants>*//*</constants>*/ /*<constructors>*/ public SLComposeSheetConfigurationItem() {} protected SLComposeSheetConfigurationItem(SkipInit skipInit) { super(skipInit); } /*</constructors>*/ /*<properties>*/ @Property(selector = "title") public native String getTitle(); @Property(selector = "setTitle:") public native void setTitle(String v); @Property(selector = "value") public native String getValue(); @Property(selector = "setValue:") public native void setValue(String v); @Property(selector = "valuePending") public native boolean isValuePending(); @Property(selector = "setValuePending:") public native void setValuePending(boolean v); @Property(selector = "tapHandler") public native @Block Runnable getTapHandler(); @Property(selector = "setTapHandler:") public native void setTapHandler(@Block Runnable v); /*</properties>*/ /*<members>*//*</members>*/ /*<methods>*/ /*</methods>*/ }
[ "blueriverteam@gmail.com" ]
blueriverteam@gmail.com
f42ee3f863183b16019aa47939815ecae30d665e
90dc0bb9e34259e274b62df7580f549a9fdb89b2
/springboot-rxmysql-example/src/main/java/com/reactive/rxmysql/Application.java
35c62a74729613a370d1773f3b801ef56dbe21ae
[ "Apache-2.0" ]
permissive
reactivegroup/rxdb-example
8a0b1d2edb9941687cc3e731143446ec641a25b1
ad41a55f4f0159efa5254d0e0747ae53a0941bdd
refs/heads/master
2023-02-27T12:06:51.573553
2021-01-28T11:15:22
2021-01-28T11:15:22
333,667,832
0
0
Apache-2.0
2021-01-28T11:15:23
2021-01-28T06:32:03
Java
UTF-8
Java
false
false
312
java
package com.reactive.rxmysql; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } }
[ "596823919@qq.com" ]
596823919@qq.com
ca4a80ee86ea88f9944d944d85b64aa3b1fc5768
5cb5d1fc80c1f68ade44f0a26a02d1aeb118c64d
/ink-msgcenter/ink-msgcenter-service/src/main/java/com/ink/msgcenter/cache/object/TemplateCache.java
6e22047665ac7fa3400cda77e7bb97c4c8b4ac0e
[]
no_license
gspandy/zx-parent
4350d1ef851d05eabdcf8c6c7049a46593e3c22e
5cdc52e645537887e86e5cbc117139ca1a56f55d
refs/heads/master
2023-08-31T15:29:50.763388
2016-08-11T09:17:29
2016-08-11T09:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,323
java
package com.ink.msgcenter.cache.object; public class TemplateCache { private Long id; /** * 商户ID */ private String merctId; /** * 商户代码 */ private String merctCode; /** * 模板名称 */ private String tempName; /** * 模板内容 */ private String tempContent; /** * 解析方式 */ private String parseMethod; /** * 邮件主题 */ private String subject; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getMerctId() { return merctId; } public void setMerctId(String merctId) { this.merctId = merctId; } public String getMerctCode() { return merctCode; } public void setMerctCode(String merctCode) { this.merctCode = merctCode; } public String getTempName() { return tempName; } public void setTempName(String tempName) { this.tempName = tempName; } public String getTempContent() { return tempContent; } public void setTempContent(String tempContent) { this.tempContent = tempContent; } public String getParseMethod() { return parseMethod; } public void setParseMethod(String parseMethod) { this.parseMethod = parseMethod; } public String getSubject() { return subject; } public void setSubject(String subject) { this.subject = subject; } }
[ "zxzhouxiang123@163.com" ]
zxzhouxiang123@163.com
ee53b9150120bd2be7d40f06c2f6e1e0e70629cb
750d26eef421463a1f8e8cb4e825808d419adb21
/master/SPICSwound/src/action/bean/action/TrialDataAction.java
0991cbb689db12363e58578ad1a501cdf99605e6
[ "Apache-2.0" ]
permissive
dzena/tuwien
d5e47e8441058e4845f39cac019dff3024b670c9
80bfb4cf2f3ee2cc1761930465b776a0befccd4b
refs/heads/master
2021-01-18T17:20:13.376444
2013-11-01T19:45:39
2013-11-01T19:45:39
59,845,669
28
0
null
2016-05-27T15:43:56
2016-05-27T15:43:56
null
UTF-8
Java
false
false
4,238
java
package bean.action; import java.util.Date; import org.jboss.seam.ScopeType; import org.jboss.seam.annotations.AutoCreate; import org.jboss.seam.annotations.In; import org.jboss.seam.annotations.Logger; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Scope; import org.jboss.seam.log.Log; import org.jboss.seam.security.Identity; import util.SpicsPermissions; import db.interfaces.IPatientDAO; import db.interfaces.ITrialDataDAO; import db.interfaces.ITrialFormDAO; import entities.Patient; import entities.TrialData; import entities.TrialForm; import entities.User; /** * @author inso * @author inso */ @Name("trialDataAction") @Scope(ScopeType.STATELESS) @AutoCreate public class TrialDataAction { @Logger private Log log; @In private User user; @In(create = true) private ITrialDataDAO trialDataDAO; @In private ITrialFormDAO trialFormDAO; @In private IPatientDAO patientDAO; /** * Creates the trial data for the patient and trial form. * @param patientId * The patient id * @param trialFormId * The trial form id * @return The id of the created trial data */ public Long createTrialData(Long patientId, Long trialFormId) { log.info("creating new TrialData with patientID #0 and trialFormID #1", patientId, trialFormId); Patient patient = patientDAO.findByID(patientId); if (patient == null) { return null; } TrialForm trialForm = trialFormDAO.findByID(trialFormId); if (trialForm == null) { return null; } // check if we are allowed to add the trial data if (!canAddTrialData(trialForm, patient)) { return null; } TrialData trialData = new TrialData(); trialData.setSavedBy(user); trialData.setLastModifiedBy(user); trialData.setPatient(patient); trialData.setLastModified(new Date(System.currentTimeMillis())); trialData.setSavedOn(new Date(System.currentTimeMillis())); trialData.setTrialform(trialForm); trialForm.getTrialDatas().add(trialData); trialDataDAO.persist(trialData); patient.getTrialdatas().add(trialData); return trialData.getId(); } /** * Checks if a trial data for the specified id exists. * @param trialDataId * The trial data id * @return True if a trial data exists, otherwise false */ public boolean trialDataExists(Long trialDataId) { return getTrialData(trialDataId) != null; } /** * Get the trial data for the specified id. * @param trialDataId * The trial data id * @return The found trial data, or null if no trial data for the specified * id exists. */ public TrialData getTrialData(Long trialDataId) { return trialDataDAO.findByID(trialDataId); } /** * Checks if it is possible to create the trial data. * @param tf * @param patient * @return */ public boolean canAddTrialData(TrialForm tf, Patient patient) { try { validateAddTrialData(tf, patient); return true; } catch (Exception e) { return false; } } /** * Validates if it is possible to create the trial data. Throws an exception * if any constraint is violated. * @param tf * @param patient * @throws Exception */ public void validateAddTrialData(TrialForm tf, Patient patient) throws Exception { // log.info("validating add trial data: fillable=#0", tf.isFillable()); if (!tf.isFillable()) { // trial form can not be filled throw new Exception("Form is not fillable"); } // log.info("validating patient user: patient.savedUser=#0, user=#1", // patient.getSavedBy().getUsername(), user.getUsername()); if (!(patient.getSavedBy().getUsername().equals(user.getUsername()) || Identity .instance().hasPermission(tf.getTrial(), SpicsPermissions.EDIT_TRIAL_DATA))) { // patient has been created from a different user or no permissions throw new Exception( "Patient has not been created from current user" + " or current user has insufficient permissions"); } Boolean canFill = trialFormDAO.canFillTrialForm(tf.getId(), patient .getKennnummer()); // log.info("validating can fill trial form: canFill=#0", canFill); if (!canFill) { // trial form can only be filled once throw new Exception("Form can only filled once"); } } }
[ "patrick.favrebulle@gmail.com" ]
patrick.favrebulle@gmail.com
897abd73c2b0e8c06f48d1496fd44398223be84d
08b671a78b6e29636cd77328c757801a775c63ae
/mina/src/main/java/org/liuyehcf/mina/MinaSshDemo.java
4ef9c17011abab72d0661931db63ea8000029533
[]
no_license
liuyehcf/JavaLearning
76fe53225dd3199c44d30516192c577a21e451b8
1e165a12cd401051feb7d133b769c6b8267b4759
refs/heads/master
2023-07-05T20:46:51.367308
2023-07-02T03:21:36
2023-07-02T03:21:36
114,119,535
0
1
null
2022-12-16T09:02:19
2017-12-13T12:43:27
Java
UTF-8
Java
false
false
1,571
java
package org.liuyehcf.mina; import org.apache.sshd.client.SshClient; import org.apache.sshd.client.channel.ChannelShell; import org.apache.sshd.client.channel.ClientChannelEvent; import org.apache.sshd.client.future.ConnectFuture; import org.apache.sshd.client.session.ClientSession; import org.apache.sshd.common.util.io.NoCloseInputStream; import org.apache.sshd.common.util.io.NoCloseOutputStream; import java.io.IOException; import java.util.Collections; /** * @author hechenfeng * @date 2018/12/20 */ public class MinaSshDemo extends BaseDemo { private MinaSshDemo() throws IOException { } public static void main(String[] args) throws Exception { new MinaSshDemo().boot(); } private void boot() throws Exception { final SshClient client = SshClient.setUpDefaultClient(); client.start(); final ConnectFuture connect = client.connect("HCF", "localhost", 22); connect.await(5000L); final ClientSession session = connect.getSession(); session.addPasswordIdentity("???"); session.auth().verify(5000L); final ChannelShell channel = session.createShellChannel(); channel.setIn(new NoCloseInputStream(sshClientInputStream)); channel.setOut(new NoCloseOutputStream(sshClientOutputStream)); channel.setErr(new NoCloseOutputStream(sshClientOutputStream)); channel.open(); beginRead(); // beginWriteJnativehook(); beginWriteStd(); channel.waitFor(Collections.singleton(ClientChannelEvent.CLOSED), 0); } }
[ "1559500551@qq.com" ]
1559500551@qq.com
ebc9472b6e6e7b513e5d0bba170ce8ba64acbc78
d1b5db63857b8a307054ba1cf6159ed15b18f7db
/이궁저궁_개발소스/이궁저궁_안드로이드_개발소스/teamgoon_r/app/src/main/java/com/example/jinyoungkim/teamgung/ui/gung_ticket/make_reservation/viewpager_items/Jongmyo.java
9da9a6604e0e653488f08110e6c5aadbc25ac179
[ "MIT" ]
permissive
MobileSeoul/2018seoul-99
95ebfc0c21b429ffcf168d1d8aed94a098ffa7d0
0cbee6a0b2034606942358d9770c9640e0550329
refs/heads/master
2020-04-11T11:03:14.582321
2018-12-18T00:18:21
2018-12-18T00:18:21
161,735,549
5
1
null
null
null
null
UTF-8
Java
false
false
2,243
java
package com.example.jinyoungkim.teamgung.ui.gung_ticket.make_reservation.viewpager_items; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.Toast; import com.example.jinyoungkim.teamgung.R; import com.example.jinyoungkim.teamgung.ui.gung_ticket.make_reservation.booking.BookingChangdeokActivity; import com.example.jinyoungkim.teamgung.ui.gung_ticket.make_reservation.booking.BookingGyeongbokActivity; import com.example.jinyoungkim.teamgung.ui.gung_ticket.make_reservation.booking.BookingJongmyoActivity; import com.example.jinyoungkim.teamgung.util.SessionCallback; import com.kakao.auth.AuthType; import com.kakao.auth.ISessionCallback; import com.kakao.auth.Session; import com.kakao.network.ErrorResult; import com.kakao.usermgmt.UserManagement; import com.kakao.usermgmt.callback.MeResponseCallback; import com.kakao.usermgmt.response.model.UserProfile; import com.kakao.util.exception.KakaoException; public class Jongmyo extends Fragment { private FrameLayout goto_reservation; private String userName; private String profileUrl; private SessionCallback sessionCallback; public Jongmyo() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.vpitem_jongmyo, container, false); goto_reservation = (FrameLayout)view.findViewById(R.id.jongmyo); // 여기 추후에 로그인 여부에 따라 넘어가는 화면 바꿔야댐 goto_reservation.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(getContext(),LoadingActivity.class); i.putExtra("fragment_type","jongmyo"); startActivity(i); getActivity().finish(); } }); return view; } }
[ "ianyrchoi@gmail.com" ]
ianyrchoi@gmail.com
0bbc5701dd9fc40b0bd41b0b8dad1cd19da773a1
51843342781f18731b4e157364f8dacd087bb225
/bus-core/src/main/java/org/aoju/bus/core/lang/Editor.java
521bf17c05527275753b6ce4da651e0a3fb1b966
[ "MIT" ]
permissive
Wuxiaonai/bus
ad14c32324387af25bf3d7e7e6aae64f130f0a83
e1feaad25833b171769fa9aa0b53a300321a68f9
refs/heads/master
2020-07-05T23:54:53.751431
2019-08-17T01:32:53
2019-08-17T01:32:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,698
java
/* * The MIT License * * Copyright (c) 2017, aoju.org All rights reserved. * * 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.aoju.bus.core.lang; /** * 编辑器接口,常用于对于集合中的元素做统一编辑 * 此编辑器两个作用: * * <pre> * 1、如果返回值为null,表示此值被抛弃 * 2、对对象做修改 * </pre> * * @param <T> 被编辑对象类型 * @author Kimi Liu * @version 3.0.9 * @since JDK 1.8 */ public interface Editor<T> { /** * 修改过滤后的结果 * * @param t 被过滤的对象 * @return 修改后的对象,如果被过滤返回null */ T edit(T t); }
[ "839536@QQ.COM" ]
839536@QQ.COM
57fb4b246a6c712aa9f5d864450cf455d36371b0
c698b00dc44bc523b961fc7d580f2df868d2e1a8
/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/RedisReactiveHealthIndicatorTests.java
681d9159d8e047697ca8aec6c80deacb5f905284
[ "Apache-2.0" ]
permissive
iTriumph/spring-boot
05174f635f794daa568efa5500f75a84e375f784
27c1b5eb4c1310fd11c3865394747d3a769abe4d
refs/heads/master
2021-01-23T05:29:12.915461
2017-09-05T09:51:11
2017-09-05T09:51:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,333
java
/* * Copyright 2012-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.actuate.health; import java.util.Properties; import org.junit.Test; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.data.redis.RedisConnectionFailureException; import org.springframework.data.redis.connection.ReactiveRedisConnection; import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory; import org.springframework.data.redis.connection.ReactiveServerCommands; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; /** * Tests for {@link RedisReactiveHealthIndicator}. * * @author Stephane Nicoll * @author Mark Paluch */ public class RedisReactiveHealthIndicatorTests { @Test public void redisIsUp() throws Exception { Properties info = new Properties(); info.put("redis_version", "2.8.9"); ReactiveRedisConnection redisConnection = mock(ReactiveRedisConnection.class); ReactiveServerCommands commands = mock(ReactiveServerCommands.class); given(commands.info()).willReturn(Mono.just(info)); RedisReactiveHealthIndicator healthIndicator = createHealthIndicator(redisConnection, commands); Mono<Health> health = healthIndicator.health(); StepVerifier.create(health).consumeNextWith(h -> { assertThat(h.getStatus()).isEqualTo(Status.UP); assertThat(h.getDetails()).containsOnlyKeys("version"); assertThat(h.getDetails().get("version")).isEqualTo("2.8.9"); }).verifyComplete(); verify(redisConnection).close(); } @Test public void redisIsDown() throws Exception { ReactiveServerCommands commands = mock(ReactiveServerCommands.class); given(commands.info()).willReturn(Mono.error( new RedisConnectionFailureException("Connection failed"))); ReactiveRedisConnection redisConnection = mock(ReactiveRedisConnection.class); RedisReactiveHealthIndicator healthIndicator = createHealthIndicator(redisConnection, commands); Mono<Health> health = healthIndicator.health(); StepVerifier.create(health).consumeNextWith(h -> { assertThat(h.getStatus()).isEqualTo(Status.DOWN); }).verifyComplete(); verify(redisConnection).close(); } private RedisReactiveHealthIndicator createHealthIndicator( ReactiveRedisConnection redisConnection, ReactiveServerCommands serverCommands) { ReactiveRedisConnectionFactory redisConnectionFactory = mock( ReactiveRedisConnectionFactory.class); given(redisConnectionFactory.getReactiveConnection()).willReturn(redisConnection); given(redisConnection.serverCommands()).willReturn(serverCommands); return new RedisReactiveHealthIndicator(redisConnectionFactory); } }
[ "snicoll@pivotal.io" ]
snicoll@pivotal.io
521ea41bbe44c410279a2d7c13520f1b5f26b55d
05bc7f8ed8e8eab296143569ee2f786b5bfc0015
/acme4j-smime/src/main/java/org/shredzone/acme4j/smime/csr/package-info.java
250c8e2c9cc9674a62e8833ab863f634c33a3999
[ "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
aldoiguerra/acme4j
da148a7e3ccd8816004aff75faa0cfeb8e408ca9
cc8cc841c187afebe0f29b5caff0af9e91e3e26c
refs/heads/master
2023-07-02T07:02:29.901156
2021-07-03T09:19:53
2021-07-03T09:19:53
283,201,831
0
0
Apache-2.0
2020-07-28T12:11:31
2020-07-28T12:11:30
null
UTF-8
Java
false
false
871
java
/* * acme4j - Java ACME client * * Copyright (C) 2021 Richard "Shred" Körber * http://acme4j.shredzone.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * 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. */ @ReturnValuesAreNonnullByDefault @DefaultAnnotationForParameters(NonNull.class) @DefaultAnnotationForFields(NonNull.class) package org.shredzone.acme4j.smime.csr; import edu.umd.cs.findbugs.annotations.DefaultAnnotationForFields; import edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameters; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.ReturnValuesAreNonnullByDefault;
[ "github@shredzone.org" ]
github@shredzone.org
8052e043930ce726c7d308ac53bbda184ad0b8dc
544cfadc742536618168fc80a5bd81a35a5f2c99
/packages/services/Car/experimental/tests/experimentalcarservice_unit_test/src/com/android/experimentalcar/FakeTimer.java
1884fe98937f983756175b84bfee8407138d5cf3
[]
no_license
ZYHGOD-1/Aosp11
0400619993b559bf4380db2da0addfa9cccd698d
78a61ca023cbf1a0cecfef8b97df2b274ac3a988
refs/heads/main
2023-04-21T20:13:54.629813
2021-05-22T05:28:21
2021-05-22T05:28:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,266
java
/* * Copyright (C) 2019 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.experimentalcar; import java.util.TimerTask; /** * Fake implementation for {@link ITimer}. */ public class FakeTimer implements ITimer { private TimerTask mPendingTask; @Override public void reset() { mPendingTask = null; } @Override public void schedule(TimerTask task, long delay) { mPendingTask = task; } @Override public void cancel() { // no-op } TimerTask getPendingTask() { return mPendingTask; } /** * Immediately execute the scheduled task. */ void executePendingTask() { mPendingTask.run(); } }
[ "rick_tan@qq.com" ]
rick_tan@qq.com
7dc1d51a5ec50e4e5b82811e6dd37b27a81b5615
c2aa6319b44efbfe3ce3acaa08a7b09bb18daac8
/checker-framework/checkers/tests/interning/DontCrash.java
ac23941db941f190085cb6f816a1f2d207372d25
[]
no_license
checklt/checklt
132d34258157731b178f1e9fd5bf9ca7819f6ea4
14f8d05868cdaa3cd9da8691fb68c01fa3a94811
refs/heads/master
2016-09-06T11:53:38.395733
2015-10-02T15:42:49
2015-10-02T15:42:49
10,589,368
3
0
null
null
null
null
UTF-8
Java
false
false
922
java
// This code is illegal (javac issues an error), but nonetheless the // checkers shouldn't crash. (Maybe they shouldn't run at all if javac // issues any errors?) // @skip-test import checkers.interning.quals.*; import java.util.*; public class DontCrash { // from VarInfoAux static class VIA { //:: non-static variable this cannot be referenced from a static context //:: inner classes cannot have static declarations //:: non-static variable this cannot be referenced from a static context //:: inner classes cannot have static declarations private static VIA theDefault = new VIA(); private Map<@Interned String, @Interned String> map; void testMap() { Map<@Interned String,@Interned String> mymap; mymap = theDefault.map; mymap = new HashMap<@Interned String,@Interned String>(theDefault.map); } } }
[ "jsinglet@gmail.com" ]
jsinglet@gmail.com
96ae19c4185f0481b8686a146136d95926fb9ce2
bc331b0a3c41ae25a6775a750753e9a88d411d0b
/unity-common/src/main/java/com/unity/common/util/JPAUtil.java
e58c71be6821741e3e7bfc5a7deebc3a558a919c
[]
no_license
xiaoming222s/common
6f785c05fd5781f031a9ffdab8e479fb9005a4d5
7633721328b0af22572ce294df59db496637bed7
refs/heads/master
2022-11-29T21:21:41.178041
2020-07-06T07:39:23
2020-07-06T07:39:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,252
java
package com.unity.common.util; import org.apache.commons.lang3.StringUtils; import org.springframework.data.domain.Sort; /** * JPAUtil 处理JPA 增删改查的一些公共方法 * * <p> * create by jiaww at 2018/9/29 上午10:20 */ public class JPAUtil { /** * @param defaultSortProperty 默认排序字段 * @param sortProperty 实际排序字段 * @param sortType 默认排序方式 * @return Sort 对象,可直接用来排序 */ public static Sort getSort(String defaultSortProperty,String sortProperty,String sortType) { String order = StringUtils.isEmpty(defaultSortProperty) ? "id" : defaultSortProperty; Sort sort = null; if (!StringUtils.isEmpty(sortProperty)) { order = sortProperty; if (StringUtils.isNotEmpty(sortType)) { if ("asc".equals(sortType)){ sort = new Sort(Sort.Direction.ASC, order); }else { sort = new Sort(Sort.Direction.DESC, order); } } else { sort = new Sort(Sort.Direction.DESC, order); } }else{ sort = new Sort(Sort.Direction.DESC, order); } return sort; } }
[ "il" ]
il
7759c48f2758d753adb606f4f955e9268d9a4c96
cd5d72dd200c69f04b60d5d2844e52e4269b9d23
/src/main/java/com/itcalf/renhe/command/IContactCommand.java
2b8b0d56fff5ad14c914192fb6316d3b0c8413a5
[]
no_license
TAEYANG9527/myHlProject
39a34f9f8936a5fb198b99ebb5ad72dae0aaaef6
926fd23afb581466a696b57619caaa7cb0928d44
refs/heads/master
2020-12-25T10:37:47.554659
2016-07-20T02:43:00
2016-07-20T02:43:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,099
java
package com.itcalf.renhe.command; import com.itcalf.renhe.bean.ContactIsSave; import com.itcalf.renhe.bean.ContactResultByMailBox.MailBoxContact; import com.itcalf.renhe.bean.ContactsReturn.ContactResult; import com.itcalf.renhe.dto.ContactList; import com.itcalf.renhe.dto.ContactList.Member; import com.itcalf.renhe.dto.NewInnerMessage; import com.itcalf.renhe.po.Contact; import java.util.List; /** * 联系人接口 * * @author xp */ public interface IContactCommand { /** * 获取联系人列表 * * @return * @throws Exception */ ContactList getContactList(String viewSId, String sid, String adSId) throws Exception; /** * 获取联系人列表(分页)别人 * * @return * @throws Exception */ ContactList getContactListBypage(String viewSId, String sid, String adSId, int index, int pageSize) throws Exception; /** * 获取联系人列表(分页)自己的 * * @return * @throws Exception */ ContactList getMyContactListByPage(String sid, String adSId, int index, int pageSize) throws Exception; /** * 获取新的联系人列表 * * @return * @throws Exception */ ContactList getNewContactList(String viewSId, String sid, String adSId, int maxCid, long maxLastUpdatedDate) throws Exception; /** * 获取新的联系人列表自己的 * * @return * @throws Exception */ ContactList getMyNewContactList(String sid, String adSId, int maxCid, int maxMobileId, int maxCardId, long maxLastUpdatedDate) throws Exception; /** * 保存联系人列表是否拉取成功 * * @param maxCid maxLastUpdatedDate * @param sid 改成sid * @return * @throws Exception */ long saveContactisSuccess(int maxCid, long maxLastUpdatedDate, String sid) throws Exception; long saveContactIsSuccess_V2(ContactIsSave contactIsSave) throws Exception; /** * 根据用户email去查maxcid */ @Deprecated public int getContactMaxCidByEmail(String email) throws Exception; /** * 根据用户sid去查maxcid */ public int getContactMaxCidBySid(String sid) throws Exception; /********************** 根据登入者的sid 找到表中对应的联系人进行保存,更新,删除 **************************************/ /** * 同步、更新联系人 * * @param ml * @param mySid 改成 sid 6.30 * @return * @throws Exception */ long saveOrupdateContactList(Member[] ml, String mySid) throws Exception; /** * 同步、更新联系人 * * @param ml * @throws Exception */ long saveOrUpdateContactList_V2(List<Member> ml, String mySid) throws Exception; /** * 自己mySid 找到表中对应的数据 * 根据联系人sid删除联系人 */ boolean deleteMyContactBySid(String mySid, String sid) throws Exception; boolean deleteMyVCardContactBySid(String sid, int vCard) throws Exception; /********************** 根据登入者的sid 找到表中对应的联系人进行保存,更新,删除 **************************************/ /** * 从数据库中获取所有联系人列表 * * @param email * @return * @throws Exception */ Contact[] getAllContact(String email) throws Exception; /** * 获取所有联系人中所有的和聊会员 * * @param sid * @return * @throws Exception */ List<Contact> getHLContact(String sid) throws Exception; /** * 从数据库中获取搜索到相关的联系人列表 * * @param sid * @return * @throws Exception */ Contact[] getSearchContact(String sid, String keyword, boolean isLimit) throws Exception; /** * 清空联系人表 */ boolean deleteContacts(String email) throws Exception; /** * 获取新的朋友数量 * * @param sid * @param adSId * @param sinceId * @return * @throws Exception */ NewInnerMessage getNewFriendsCount(String sid, String adSId, int sinceId) throws Exception; /** * 保存用户的email联系人 * * @param ml * @param sid * @return * @throws Exception */ long saveEmailContactList(List<MailBoxContact> ml, String sid, String now) throws Exception; /** * 查询所有email联系人 * * @param email * @return * @throws Exception */ List<MailBoxContact> getAllEmailContact(String email) throws Exception; /** * 获取email联系人保存的最后时间 * * @param email * @return */ long getEmailContactSaveTimeByEmail(String email); /** * 保存用户的mobile联系人 * * @param ml * @param email * @return * @throws Exception */ long saveMobileContactList(List<ContactResult> ml, String email, int maxid) throws Exception; /** * 查询所有Mobile联系人 * * @param email * @return * @throws Exception */ List<ContactResult> getAllMobileContact(String email) throws Exception; /** * 获取Mobile联系人保存的Maxid * * @param email * @return */ int getMobileContactMaxidByEmail(String email); boolean deleteMobileContacts(String sid) throws Exception; void deleteContactBySid(String sid) throws Exception; long getContactMaxLastUpdatedDateBySid(String sid) throws Exception; /** * 更新好友是否被拉黑 * * @param sid * @return * @throws Exception */ long updataContactBlock(String sid, boolean isBlocked) throws Exception; /** * 自己mySid 找到表中对应的数据 * 根据联系人sid查找联系人 */ Contact getMyContactBySid(String mySid, String sid) throws Exception; /** * 查找本地数据库中所有的最大的ids * * @param sid * @return */ ContactIsSave getContactMaxIdBySid(String sid); }
[ "280832809@qq.com" ]
280832809@qq.com
644a3785695dcb35f697ea0730853c6b56825b0b
8d5ed637e90d24c806c5ea091cb2b877aa2a5103
/src/main/java/yyl/leetcode/p07/P0705_DesignHashset.java
0e5d6b9cd2e143c54cbb9756430e240029b2dbd4
[ "Apache-2.0" ]
permissive
Relucent/yyl_leetcode
7cc087ca22f01fdec4189c6336fb9581c73ac3e3
ce5e713b8ab07d08502ce048a3c493cde84f6e5a
refs/heads/master
2023-03-09T12:49:28.699718
2023-03-02T07:00:46
2023-03-02T07:00:46
101,182,096
3
0
null
null
null
null
UTF-8
Java
false
false
4,252
java
package yyl.leetcode.p07; import yyl.leetcode.util.Assert; /** * <h3>设计哈希集合</h3><br> * 不使用任何内建的哈希表库设计一个哈希集合(HashSet)。v 实现 MyHashSet 类:<br> * ├ void add(key) 向哈希集合中插入值 key 。<br> * ├ bool contains(key) 返回哈希集合中是否存在这个值 key 。<br> * └ void remove(key) 将给定值 key 从哈希集合中删除。如果哈希集合中没有这个值,什么也不做。<br> * * <pre> * 示例: * 输入: * ["MyHashSet", "add", "add", "contains", "contains", "add", "contains", "remove", "contains"] * [[], [1], [2], [1], [3], [2], [2], [2], [2]] * 输出: * [null, null, null, true, false, null, true, null, false] * * 解释: * MyHashSet myHashSet = new MyHashSet(); * myHashSet.add(1); // set = [1] * myHashSet.add(2); // set = [1, 2] * myHashSet.contains(1); // 返回 True * myHashSet.contains(3); // 返回 False ,(未找到) * myHashSet.add(2); // set = [1, 2] * myHashSet.contains(2); // 返回 True * myHashSet.remove(2); // set = [1] * myHashSet.contains(2); // 返回 False ,(已移除) * </pre> * * 提示:<br> * ├ 0 <= key <= 10^6<br> * └ 最多调用 104 次 add、remove 和 contains 。<br> */ // Your MyHashSet object will be instantiated and called as such: // MyHashSet obj = new MyHashSet(); // obj.add(key); // obj.remove(key); // boolean param_3 = obj.contains(key); public class P0705_DesignHashset { public static void main(String[] args) { MyHashSet myHashSet = new MyHashSet(); myHashSet.add(1); // set = [1] myHashSet.add(2); // set = [1, 2] Assert.assertTrue(myHashSet.contains(1)); // 返回 True Assert.assertFalse(myHashSet.contains(3)); // 返回 False ,(未找到) myHashSet.add(2); // set = [1, 2] Assert.assertTrue(myHashSet.contains(2)); // 返回 True myHashSet.remove(2); // set = [1] Assert.assertFalse(myHashSet.contains(2)); // 返回 False ,(已移除) } // 二进制+分桶数组解法 // 实现一个类似「bitmap」数据结构,由于数据范围为 0 <= key <= 10^6,最多需要的 int 数量不会超过 40000 (32 * 40000 = 1280000 > 1000000) // 因此我们可以建立一个 buckets 数组,数组装载的 int 类型数值。 // 先对 key 进行 key / 32,确定当前 key 所在桶的位置 // 再对 key 进行 key % 32,确定当前 key 所在桶中的哪一位 // 时间复杂度:O(1) // 空间复杂度:O(1) static class MyHashSet { private final int[] buckets; /** Initialize your data structure here. */ public MyHashSet() { buckets = new int[40000]; } public void add(int key) { setValue(key, true); } public void remove(int key) { setValue(key, false); } /** Returns true if this set contains the specified element */ public boolean contains(int key) { return getValue(key); } private void setValue(int key, boolean value) { int bucketIdx = key / 32; int bitIdx = key % 32; buckets[bucketIdx] = value ? (buckets[bucketIdx] | (1 << bitIdx)) : (buckets[bucketIdx] & ~(1 << bitIdx)); } private boolean getValue(int key) { int bucketIdx = key / 32; int bitIdx = key % 32; return ((buckets[bucketIdx] >> bitIdx) & 1) == 1; } } // 简单数组解法 // 由于题目给出了 0 <= key <= 10^6 数据范围,同时限定了 key 只能是 int。 // 我们可以直接使用一个 Boolean 数组记录某个 key 是否存在,key 直接对应 Boolean 的下标 // 时间复杂度:O(1) // 空间复杂度:O(1) class MyHashSet1 { private final boolean[] nodes; public MyHashSet1() { nodes = new boolean[1000009]; } public void add(int key) { nodes[key] = true; } public void remove(int key) { nodes[key] = false; } public boolean contains(int key) { return nodes[key]; } } }
[ "relucent@163.com" ]
relucent@163.com
6d00203c7920bfe68b040126f11bcd4a5b74962a
5e37161bc4eba92e02237235ad4a2dfd8b4188b7
/jinshuo-service/src/main/java/com/jinshuo/mall/service/order/application/qry/GoodsSimpleQry.java
8de70ed57cf970fb86f26cf4391cb4433e9b6955
[]
no_license
dyhimos/jinshuo-mall
f4400cc41ca6a57b7512832209eea6d1a8c3b101
b1cc18c8445a46abd35796bfdad55824f0f4a5a8
refs/heads/master
2022-07-12T23:16:16.872664
2020-05-14T13:09:27
2020-05-14T13:09:27
260,648,942
0
0
null
null
null
null
UTF-8
Java
false
false
916
java
package com.jinshuo.mall.service.order.application.qry; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * 查询寄样信息列表 * @Classname GoodsSimpleQry * @Description TODO * @Date 2019/6/27 15:43 * @Created by dongyh */ @Data public class GoodsSimpleQry { @ApiModelProperty(value = "当前页") private Integer pageNum = 1; @ApiModelProperty(value = "每页条数") private Integer pageSize = 10; @ApiModelProperty(value = "店铺id") private Long shopId; @ApiModelProperty(value = "店铺id") private Long memberId; @ApiModelProperty(value = "收货人名称") private String userName; @ApiModelProperty(value = "收件人手机号码") private String userPhone; @ApiModelProperty(value = "寄样单号") private String sampleNo; @ApiModelProperty(value = "寄样状态") private Integer sampleStatus; }
[ "1" ]
1
eb6954a5c033277a672faab888a65c481f5e40ce
6ffc8b7027b5a18d3d367fc6a518c883a3da3d85
/src/weka/classifiers/meta/ClassificationViaRegressionTest.java
88d88442d95686a50b4825f78e0ccdadbf02aad7
[]
no_license
icesky0125/DecisionTreeSmoothing
8aa20b96725a669d71ca9483a87dd58ba92e4e77
fdc2c71e31b0dccdf083bfbb5c07040aeb5b2a7b
refs/heads/master
2021-07-16T20:24:12.448519
2020-05-19T05:41:13
2020-05-19T05:41:13
158,150,516
0
0
null
null
null
null
UTF-8
Java
false
false
1,642
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 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/>. */ /* * Copyright 2002 University of Waikato */ package weka.classifiers.meta; import weka.classifiers.AbstractClassifierTest; import weka.classifiers.Classifier; import junit.framework.Test; import junit.framework.TestSuite; /** * Tests ClassificationViaRegression. Run from the command line with:<p> * java weka.classifiers.meta.ClassificationViaRegressionTest * * @author <a href="mailto:eibe@cs.waikato.ac.nz">Eibe Frank</a> * @version $Revision: 8034 $ */ public class ClassificationViaRegressionTest extends AbstractClassifierTest { public ClassificationViaRegressionTest(String name) { super(name); } /** Creates a default ClassificationViaRegression */ @Override public Classifier getClassifier() { return new ClassificationViaRegression(); } public static Test suite() { return new TestSuite(ClassificationViaRegressionTest.class); } public static void main(String[] args){ junit.textui.TestRunner.run(suite()); } }
[ "he.penny.zhang@gmail.com" ]
he.penny.zhang@gmail.com
63aee45f396de715b1e9e88dd09516b66b44a7ce
ccf82688f082e26cba5fc397c76c77cc007ab2e8
/Mage.Tests/src/frozen/org/mage/test/clientside/base/Command.java
32728710a90ddfb3c0cdb9f826f5d6023f3ba91c
[ "MIT" ]
permissive
magefree/mage
3261a89320f586d698dd03ca759a7562829f247f
5dba61244c738f4a184af0d256046312ce21d911
refs/heads/master
2023-09-03T15:55:36.650410
2023-09-03T03:53:12
2023-09-03T03:53:12
4,158,448
1,803
1,133
MIT
2023-09-14T20:18:55
2012-04-27T13:18:34
Java
UTF-8
Java
false
false
177
java
package org.mage.test.clientside.base; /** * Command pattern. * * @author nantuko */ abstract public class Command { abstract public void execute() throws Exception; }
[ "fenhl@fenhl.net" ]
fenhl@fenhl.net
6952f2ddae53ff5d8779e1ee7e302d742d10f735
bcbc759d0163c45d45196b8ba2a76f0d52b95bcb
/xxpay-agent/src/main/java/org/xxpay/agent/common/config/MainConfig.java
7abb2084de8baccbbcca4fd2d3e16339fdd4a5da
[]
no_license
xiaoxiaoguai233/xxpay-0514
0cec7a9bdeaa7a9cd19509d5859b01f9bf2a62c0
e234dc6a597a7ccd824066c82c8f21a1e870315a
refs/heads/main
2023-04-25T16:22:32.984923
2021-05-09T07:25:05
2021-05-09T07:25:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
389
java
package org.xxpay.agent.common.config; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; @Component @ConfigurationProperties(prefix="config") public class MainConfig { private String payUrl; public String getPayUrl() { return payUrl; } public void setPayUrl(String payUrl) { this.payUrl = payUrl; } }
[ "1255343742@qq.com" ]
1255343742@qq.com
934732d592361f8ee45f8e9fcd8fc565de391b9e
41691da748cac60a6b37234a22a8502356f196eb
/src/main/java/com/jiyasoft/jewelplus/service/manufacturing/transactions/IEmpPcsProductionService.java
3c504ec5e6001193e0614299de312822b352f061
[]
no_license
abhijeet-yahoo/jewels
b9897bd75a48d99157f4760b047ef596438088db
1f164e5844a6417ac69dd5eb268b33ed5e3fe734
refs/heads/master
2023-07-17T08:16:28.466307
2021-08-16T06:37:48
2021-08-16T06:37:48
396,004,048
0
0
null
null
null
null
UTF-8
Java
false
false
876
java
package com.jiyasoft.jewelplus.service.manufacturing.transactions; import java.util.List; import org.springframework.data.domain.Page; import com.jiyasoft.jewelplus.domain.manufacturing.masters.Department; import com.jiyasoft.jewelplus.domain.manufacturing.transactions.BagMt; import com.jiyasoft.jewelplus.domain.manufacturing.transactions.EmpPcsProduction; public interface IEmpPcsProductionService { public List<EmpPcsProduction> findAll(); public Page<EmpPcsProduction> findAll(Integer limit, Integer offset, String sort, String order, String search); public void save(EmpPcsProduction employeePcsProduction); public void delete(int id); public Long count(); public EmpPcsProduction findOne(int id); public List<EmpPcsProduction> findByDepartmentAndBagMtAndDeactive(Department department,BagMt bagMt,Boolean deactive); }
[ "comp2@comp2-pc" ]
comp2@comp2-pc
7b5d7313c45853e9db1e907ee40aff2a95a5bc6a
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/p051me/leolin/shortcutbadger/impl/AdwHomeBadger.java
29996f03ca248acdee7664ae283f449a4d54eab8
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,269
java
package p051me.leolin.shortcutbadger.impl; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import java.util.Arrays; import java.util.List; import p051me.leolin.shortcutbadger.Badger; import p051me.leolin.shortcutbadger.ShortcutBadgeException; import p051me.leolin.shortcutbadger.util.BroadcastHelper; /* renamed from: me.leolin.shortcutbadger.impl.AdwHomeBadger */ public class AdwHomeBadger implements Badger { public static final String CLASSNAME = "CNAME"; public static final String COUNT = "COUNT"; public static final String INTENT_UPDATE_COUNTER = "org.adw.launcher.counter.SEND"; public static final String PACKAGENAME = "PNAME"; public void executeBadge(Context context, ComponentName componentName, int i) throws ShortcutBadgeException { Intent intent = new Intent(INTENT_UPDATE_COUNTER); intent.putExtra(PACKAGENAME, componentName.getPackageName()); intent.putExtra(CLASSNAME, componentName.getClassName()); intent.putExtra(COUNT, i); BroadcastHelper.sendIntentExplicitly(context, intent); } public List<String> getSupportLaunchers() { return Arrays.asList(new String[]{"org.adw.launcher", "org.adwfreak.launcher"}); } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
cf05a0adb130c759673b7099850d8ace519a7051
ab14a6d0270bbdb567b0de714705d77f62d40caf
/bin/custom/training/trainingstorefront/web/src/com/hybris/training/storefront/controllers/pages/checkout/steps/PickupLocationCheckoutStepController.java
c9bb1f985f003c441fefa121557ba5cf217796e2
[ "Unlicense" ]
permissive
sandeepvalapi/Hybris
5acfe524b0d2f7a33e1b566b8fc492331eb8a845
927d38b76d64fc0199b0626878500c81bd62129d
refs/heads/master
2021-08-06T10:45:48.423967
2020-04-04T09:54:28
2020-04-04T09:54:28
125,392,092
5
1
Unlicense
2021-04-23T19:37:06
2018-03-15T15:59:15
Java
UTF-8
Java
false
false
4,905
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package com.hybris.training.storefront.controllers.pages.checkout.steps; import de.hybris.platform.acceleratorstorefrontcommons.annotations.PreValidateCheckoutStep; import de.hybris.platform.acceleratorstorefrontcommons.annotations.PreValidateQuoteCheckoutStep; import de.hybris.platform.acceleratorstorefrontcommons.annotations.RequireHardLogIn; import de.hybris.platform.acceleratorstorefrontcommons.checkout.steps.CheckoutStep; import de.hybris.platform.acceleratorstorefrontcommons.checkout.steps.validation.ValidationResults; import de.hybris.platform.acceleratorstorefrontcommons.constants.WebConstants; import de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.checkout.steps.AbstractCheckoutStepController; import de.hybris.platform.cms2.exceptions.CMSItemNotFoundException; import de.hybris.platform.cms2.model.pages.ContentPageModel; import de.hybris.platform.commerceservices.order.CommerceCartModificationException; import com.hybris.training.storefront.controllers.ControllerConstants; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; @Controller @RequestMapping(value = "/checkout/multi/pickup-location") public class PickupLocationCheckoutStepController extends AbstractCheckoutStepController { private static final String PICKUP_LOCATION = "pickup-location"; @RequestMapping(value = "/choose", method = RequestMethod.GET) @RequireHardLogIn @Override @PreValidateQuoteCheckoutStep @PreValidateCheckoutStep(checkoutStep = PICKUP_LOCATION) public String enterStep(final Model model, final RedirectAttributes redirectAttributes) throws CMSItemNotFoundException { // Try to set default delivery mode getCheckoutFacade().setDeliveryModeIfAvailable(); model.addAttribute("cartData", getCheckoutFacade().getCheckoutCart()); model.addAttribute("pickupConsolidationOptions", getCheckoutFacade().getConsolidatedPickupOptions()); model.addAttribute("userLocation", getCustomerLocationService().getUserLocation()); final ContentPageModel multiCheckoutSummaryPage = getContentPageForLabelOrId(MULTI_CHECKOUT_SUMMARY_CMS_PAGE_LABEL); storeCmsPageInModel(model, multiCheckoutSummaryPage); setUpMetaDataForContentPage(model, multiCheckoutSummaryPage); model.addAttribute(WebConstants.BREADCRUMBS_KEY, getResourceBreadcrumbBuilder().getBreadcrumbs("checkout.multi.deliveryMethod.breadcrumb")); model.addAttribute("metaRobots", "noindex,nofollow"); setCheckoutStepLinksForModel(model, getCheckoutStep()); return ControllerConstants.Views.Pages.MultiStepCheckout.ChoosePickupLocationPage; } @RequestMapping(value = "/choose", method = RequestMethod.POST) @RequireHardLogIn public String doSelectDeliveryLocation(@RequestParam(value = "posName") final String posName, final Model model, final RedirectAttributes redirectAttributes) throws CMSItemNotFoundException, CommerceCartModificationException // NOSONAR { final ValidationResults validationResults = getCheckoutStep().validate(redirectAttributes); if (getCheckoutStep().checkIfValidationErrors(validationResults)) { return getCheckoutStep().onValidation(validationResults); } //Consolidate the cart and add unsuccessful modifications to page model.addAttribute("validationData", getCheckoutFacade().consolidateCheckoutCart(posName)); model.addAttribute("cartData", getCheckoutFacade().getCheckoutCart()); model.addAttribute("userLocation", getCustomerLocationService().getUserLocation()); final ContentPageModel multiCheckoutSummaryPage = getContentPageForLabelOrId(MULTI_CHECKOUT_SUMMARY_CMS_PAGE_LABEL); storeCmsPageInModel(model, multiCheckoutSummaryPage); setUpMetaDataForContentPage(model, multiCheckoutSummaryPage); model.addAttribute(WebConstants.BREADCRUMBS_KEY, getResourceBreadcrumbBuilder().getBreadcrumbs("checkout.multi.deliveryMethod.breadcrumb")); model.addAttribute("metaRobots", "noindex,nofollow"); setCheckoutStepLinksForModel(model, getCheckoutStep()); return ControllerConstants.Views.Pages.MultiStepCheckout.ChoosePickupLocationPage; } @RequestMapping(value = "/back", method = RequestMethod.GET) @RequireHardLogIn @Override public String back(final RedirectAttributes redirectAttributes) { return getCheckoutStep().previousStep(); } @RequestMapping(value = "/next", method = RequestMethod.GET) @RequireHardLogIn @Override public String next(final RedirectAttributes redirectAttributes) { return getCheckoutStep().nextStep(); } protected CheckoutStep getCheckoutStep() { return getCheckoutStep(PICKUP_LOCATION); } }
[ "sandeepvalapi@gmail.com" ]
sandeepvalapi@gmail.com
733b8c6c9bb548d12180e182962454bf78dcd754
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XWIKI-13137-3-23-Single_Objective_GGA-IntegrationSingleObjective-/com/xpn/xwiki/store/XWikiHibernateBaseStore$1_ESTest_scaffolding.java
32344ef60311ce97a68308235ab6e826655e1cee
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
449
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon May 18 15:42:14 UTC 2020 */ package com.xpn.xwiki.store; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class XWikiHibernateBaseStore$1_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
70fad3fbf7985f5e12c3beff07aa7b2bf5afb75d
7ec3205c1d19a537b02703c6dd7924af2f711917
/src/main/java/io/webfolder/cdp/Launcher.java
e76b372d51077e089ca296e8b9d76c2cebcd1511
[ "MIT" ]
permissive
tasen/cdp4j
c2975c422d77f6cc5c689d0968d6fff910d1f4a1
dc3ecaeb8e34fffec516d03942364e8722713306
refs/heads/master
2021-01-11T06:04:44.427165
2017-06-20T18:01:07
2017-06-20T18:01:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,586
java
/** * The MIT License * Copyright © 2017 WebFolder OÜ * * 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 io.webfolder.cdp; import static io.webfolder.cdp.session.SessionFactory.DEFAULT_HOST; import static java.lang.Runtime.getRuntime; import static java.lang.String.format; import static java.lang.System.getProperty; import static java.nio.file.Paths.get; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; import static java.util.Locale.ENGLISH; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import java.util.Scanner; import io.webfolder.cdp.exception.CdpException; import io.webfolder.cdp.session.SessionFactory; import io.webfolder.cdp.session.SessionInfo; public class Launcher { private final SessionFactory factory; public Launcher() { this(new SessionFactory()); } public Launcher(final SessionFactory factory) { this.factory = factory; } public String findChrome() { String os = getProperty("os.name") .toLowerCase(ENGLISH); boolean windows = os.startsWith("windows"); if (windows) { try { for (String path : getChromeWinPaths()) { final Process process = getRuntime().exec(new String[] { "cmd", "/c", "echo", path }); final int exitCode = process.waitFor(); if (exitCode == 0) { final String location = toString(process.getInputStream()).trim().replace("\"", ""); final File chrome = new File(location); if (chrome.exists() && chrome.canExecute()) { return chrome.toString(); } } } throw new CdpException("Unable to find chrome.exe"); } catch (Throwable e) { // ignore } } else { return "google-chrome"; } return null; } protected List<String> getChromeWinPaths() { return asList( "%localappdata%\\Google\\Chrome SxS\\Application\\chrome.exe", // Chrome Canary "%programfiles%\\Google\\Chrome\\Application\\chrome.exe", // Chrome Stable 64-bit "%programfiles(x86)%\\Google\\Chrome\\Application\\chrome.exe" // Chrome Stable 32-bit ); } public SessionFactory launch() { return launch(new String[] { }); } public SessionFactory launch(String... arguments) { if (launched()) { return factory; } String chromePath = findChrome(); Path remoteProfileData = get(getProperty("java.io.tmpdir")) .resolve("remote-profile"); List<String> list = new ArrayList<>(); list.add(chromePath); list.add(format("--remote-debugging-port=%d", factory.getPort())); list.add(format("--user-data-dir=%s", remoteProfileData.toString())); if ( ! DEFAULT_HOST.equals(factory.getHost()) ) { list.add(format("--remote-debugging-address=%s", factory.getHost())); } list.add("--disable-translate"); list.add("--disable-extensions"); list.add("--no-default-browser-check"); list.add("--disable-plugin-power-saver"); list.add("--disable-sync"); list.add("--no-first-run"); list.add("--safebrowsing-disable-auto-update"); list.add("--disable-popup-blocking"); if (arguments != null) { list.addAll(asList(arguments)); } try { Process process = getRuntime().exec(list.toArray(new String[0])); process.getOutputStream().close(); process.getInputStream().close(); } catch (IOException e) { throw new CdpException(e); } return factory; } protected String toString(InputStream is) { try (Scanner scanner = new Scanner(is)) { scanner.useDelimiter("\\A"); return scanner.hasNext() ? scanner.next() : ""; } } public boolean launched() { List<SessionInfo> list = emptyList(); try { list = factory.list(); } catch (Throwable t) { // ignore } return ! list.isEmpty() ? true : false; } }
[ "support@webfolder.io" ]
support@webfolder.io
18b67a2c652e78222f49f37248ab23306ff019eb
a9ffada2a8189fcc7ddacc91ff8a078b2b0dec34
/src/main/java/org/kiluyaqing/choice/config/LoggingConfiguration.java
fca13fcb5928ed9fb8515e2c2af0f9a8a477a068
[]
no_license
kiluyaqing/choice
1b23e260a9d8998ee37467ce366bc4da62026e8c
acd1926693669e58fade0231f35fe178c51b8284
refs/heads/master
2020-06-12T06:45:35.297200
2017-01-16T09:16:47
2017-01-16T09:16:47
75,600,029
0
0
null
null
null
null
UTF-8
Java
false
false
4,052
java
package org.kiluyaqing.choice.config; import ch.qos.logback.classic.AsyncAppender; import ch.qos.logback.classic.Level; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.spi.LoggerContextListener; import ch.qos.logback.core.spi.ContextAwareBase; import net.logstash.logback.appender.LogstashSocketAppender; import net.logstash.logback.stacktrace.ShortenedThrowableConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import javax.annotation.PostConstruct; import javax.inject.Inject; @Configuration public class LoggingConfiguration { private final Logger log = LoggerFactory.getLogger(LoggingConfiguration.class); private LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); @Value("${spring.application.name}") private String appName; @Value("${server.port}") private String serverPort; @Inject private JHipsterProperties jHipsterProperties; @PostConstruct private void init() { if (jHipsterProperties.getLogging().getLogstash().isEnabled()) { addLogstashAppender(context); // Add context listener LogbackLoggerContextListener loggerContextListener = new LogbackLoggerContextListener(); loggerContextListener.setContext(context); context.addListener(loggerContextListener); } } public void addLogstashAppender(LoggerContext context) { log.info("Initializing Logstash logging"); LogstashSocketAppender logstashAppender = new LogstashSocketAppender(); logstashAppender.setName("LOGSTASH"); logstashAppender.setContext(context); String customFields = "{\"app_name\":\"" + appName + "\",\"app_port\":\"" + serverPort + "\"}"; // Set the Logstash appender config from JHipster properties logstashAppender.setSyslogHost(jHipsterProperties.getLogging().getLogstash().getHost()); logstashAppender.setPort(jHipsterProperties.getLogging().getLogstash().getPort()); logstashAppender.setCustomFields(customFields); // Limit the maximum length of the forwarded stacktrace so that it won't exceed the 8KB UDP limit of logstash ShortenedThrowableConverter throwableConverter = new ShortenedThrowableConverter(); throwableConverter.setMaxLength(7500); throwableConverter.setRootCauseFirst(true); logstashAppender.setThrowableConverter(throwableConverter); logstashAppender.start(); // Wrap the appender in an Async appender for performance AsyncAppender asyncLogstashAppender = new AsyncAppender(); asyncLogstashAppender.setContext(context); asyncLogstashAppender.setName("ASYNC_LOGSTASH"); asyncLogstashAppender.setQueueSize(jHipsterProperties.getLogging().getLogstash().getQueueSize()); asyncLogstashAppender.addAppender(logstashAppender); asyncLogstashAppender.start(); context.getLogger("ROOT").addAppender(asyncLogstashAppender); } /** * Logback configuration is achieved by configuration file and API. * When configuration file change is detected, the configuration is reset. * This listener ensures that the programmatic configuration is also re-applied after reset. */ class LogbackLoggerContextListener extends ContextAwareBase implements LoggerContextListener { @Override public boolean isResetResistant() { return true; } @Override public void onStart(LoggerContext context) { addLogstashAppender(context); } @Override public void onReset(LoggerContext context) { addLogstashAppender(context); } @Override public void onStop(LoggerContext context) { } @Override public void onLevelChange(ch.qos.logback.classic.Logger logger, Level level) { } } }
[ "kiluyaqing@gmail.com" ]
kiluyaqing@gmail.com
c558d4999cfcbcc1169460133262eb2092479480
ce55e10448040cf27b4abccc9fb2b46e83ffb434
/trunk/tcga-qc/TCGA-Core/binfs/gatk/public/java/test/org/broadinstitute/sting/datasources/pipeline/PipelineUnitTest.java
8e18fac6fc9140f9523cc72445dd1e5cc3d07659
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
NCIP/tcga-sandbox-v1
0518dee6ee9e31a48c6ebddd1c10d20dca33c898
c8230c07199ddaf9d69564480ff9124782525cf5
refs/heads/master
2021-01-19T04:07:08.906026
2013-05-29T18:00:15
2013-05-29T18:00:15
87,348,860
1
7
null
null
null
null
UTF-8
Java
false
false
4,505
java
/* * Copyright (c) 2010, The Broad Institute * * 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.broadinstitute.sting.datasources.pipeline; import org.testng.Assert; import org.broadinstitute.sting.utils.yaml.YamlUtils; import org.testng.annotations.Test; import java.io.File; import java.util.Map; public class PipelineUnitTest { @Test public void testDumpAndLoad() throws Exception { Pipeline pipeline = new Pipeline(); pipeline.getProject().setName("PRJ_NAME"); pipeline.getProject().setReferenceFile(new File("my.fasta")); pipeline.getProject().setGenotypeDbsnp(new File("my.vcf")); pipeline.getProject().setEvalDbsnp(new File("my.dbsnp")); pipeline.getProject().getTags().put("testProjectTag", "project value here"); PipelineSample sample = new PipelineSample(); sample.setId("SMP_ID"); sample.getBamFiles().put("recalibrated", new File("recalibrated.bam")); sample.getBamFiles().put("cleaned", new File("/absolute/path/to/cleaned.bam")); sample.getTags().put("testSampleTag", "sample value here"); pipeline.getSamples().add(sample); File file = File.createTempFile("testDumpAndLoad", ".yaml"); YamlUtils.dump(pipeline, file); Pipeline pipelineLoad = YamlUtils.load(Pipeline.class, file); Assert.assertEquals(pipelineLoad.getProject().getName(), pipeline.getProject().getName()); Assert.assertEquals(pipeline.getProject().getReferenceFile(), pipelineLoad.getProject().getReferenceFile()); Assert.assertEquals(pipeline.getProject().getIntervalList(), pipelineLoad.getProject().getIntervalList()); Assert.assertEquals(pipeline.getProject().getGenotypeDbsnp(), pipelineLoad.getProject().getGenotypeDbsnp()); Assert.assertEquals(pipeline.getProject().getGenotypeDbsnpType(), pipelineLoad.getProject().getGenotypeDbsnpType()); Assert.assertEquals(pipeline.getProject().getEvalDbsnp(), pipelineLoad.getProject().getEvalDbsnp()); Assert.assertEquals(pipeline.getProject().getEvalDbsnpType(), pipelineLoad.getProject().getEvalDbsnpType()); Assert.assertEquals(pipelineLoad.getProject().getTags().size(), pipeline.getProject().getTags().size()); for (Map.Entry<String, String> entry : pipeline.getProject().getTags().entrySet()) Assert.assertEquals(pipeline.getProject().getTags().get(entry.getKey()), entry.getValue()); Assert.assertEquals(pipelineLoad.getSamples().size(), pipeline.getSamples().size()); for (int i = 0; i < pipeline.getSamples().size(); i++) { PipelineSample pipelineSample = pipeline.getSamples().get(i); PipelineSample pipelineLoadSample = pipelineLoad.getSamples().get(i); Assert.assertEquals(pipelineLoadSample.getId(), pipelineSample.getId()); Assert.assertEquals(pipelineLoadSample.getBamFiles().size(), pipelineSample.getBamFiles().size()); for (Map.Entry<String, File> entry : pipelineSample.getBamFiles().entrySet()) Assert.assertEquals(entry.getValue(), pipelineSample.getBamFiles().get(entry.getKey())); Assert.assertEquals(pipelineLoadSample.getTags().size(), pipelineSample.getTags().size()); for (Map.Entry<String, String> entry : pipelineSample.getTags().entrySet()) Assert.assertEquals(pipelineSample.getTags().get(entry.getKey()), entry.getValue()); } } }
[ "reillysm@mail.nih.gov" ]
reillysm@mail.nih.gov
2a37781d3e91ba3f3e7da3f2b5001b6a9a68f7e8
cf7e9fcaa002d7e3a2e4396831bf122fd1ac7bbc
/cards/src/main/java/org/rnd/jmagic/cards/VoiceofAll.java
7b7a3576e7ce332510982e1c96ce5a95dfd8322b
[]
no_license
NorthFury/jmagic
9b28d803ce6f8bf22f22eb41e2a6411bc11c8cdf
efe53d9d02716cc215456e2794a43011759322d9
refs/heads/master
2020-05-28T11:04:50.631220
2014-06-17T09:48:44
2014-06-17T09:48:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,851
java
package org.rnd.jmagic.cards; import org.rnd.jmagic.abilities.keywords.Flying; import org.rnd.jmagic.abilities.keywords.Protection; import org.rnd.jmagic.abilityTemplates.AsThisEntersTheBattlefieldChooseAColor; import org.rnd.jmagic.engine.*; import org.rnd.jmagic.engine.generators.*; import org.rnd.jmagic.engine.patterns.*; @Name("Voice of All") @Types({Type.CREATURE}) @SubTypes({SubType.ANGEL}) @ManaCost("2WW") @Printings({@Printings.Printed(ex = Expansion.COMMANDER, r = Rarity.RARE), @Printings.Printed(ex = Expansion.TENTH_EDITION, r = Rarity.RARE), @Printings.Printed(ex = Expansion.PLANESHIFT, r = Rarity.UNCOMMON)}) @ColorIdentity({Color.WHITE}) public final class VoiceofAll extends Card { public static final class ColorChoice extends AsThisEntersTheBattlefieldChooseAColor { public ColorChoice(GameState state) { super(state, "Voice of All"); this.getLinkManager().addLinkClass(ColorProtection.VoiceOfAllStatic.class); } } public static final class ColorProtection extends Protection { public static final class VoiceOfAllStatic extends ProtectionStatic { public VoiceOfAllStatic(GameState state) { super(state, null, "the color of your choice"); this.setQuality(new SimpleSetPattern(HasColor.instance(ChosenFor.instance(LinkedTo.instance(Identity.instance(this)))))); this.getLinkManager().addLinkClass(ColorChoice.class); } } public ColorProtection(GameState state) { super(state, "the color of your choice"); } @Override protected Protection.ProtectionStatic getProtectionStatic() { return new VoiceOfAllStatic(this.state); } } public VoiceofAll(GameState state) { super(state); this.setPower(2); this.setToughness(2); this.addAbility(new Flying(state)); this.addAbility(new ColorChoice(state)); this.addAbility(new ColorProtection(state)); } }
[ "robyter@gmail" ]
robyter@gmail
eedf1a61245195768d3df40c4604e71781323d39
c3101515ddde8a6e6ddc4294a4739256d1600df0
/GeneralApp__2.20_1.0(1)_source_from_JADX/sources/p008cz/msebera/android/httpclient/conn/ClientConnectionManager.java
e5081faee4827eb2a60d6e1d274c56def658e648
[]
no_license
Aelshazly/Carty
b56fdb1be58a6d12f26d51b46f435ea4a73c8168
d13f3a4ad80e8a7d0ed1c6a5720efb4d1ca721ee
refs/heads/master
2022-11-14T23:29:53.547694
2020-07-08T19:23:39
2020-07-08T19:23:39
278,175,183
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
package p008cz.msebera.android.httpclient.conn; import java.util.concurrent.TimeUnit; import p008cz.msebera.android.httpclient.conn.routing.HttpRoute; import p008cz.msebera.android.httpclient.conn.scheme.SchemeRegistry; @Deprecated /* renamed from: cz.msebera.android.httpclient.conn.ClientConnectionManager */ public interface ClientConnectionManager { void closeExpiredConnections(); void closeIdleConnections(long j, TimeUnit timeUnit); SchemeRegistry getSchemeRegistry(); void releaseConnection(ManagedClientConnection managedClientConnection, long j, TimeUnit timeUnit); ClientConnectionRequest requestConnection(HttpRoute httpRoute, Object obj); void shutdown(); }
[ "aelshazly@engineer.com" ]
aelshazly@engineer.com
9af1808586d5ed2328ea92699c9d9f89c3142a6c
2d4113a523b9ec9fab596230cf73642dfeecd41c
/src/main/java/gr/epos/renewal/br/config/MicroserviceSecurityConfiguration.java
34246d1f2ee0a47d9b2d4437b5dbe94ea2a0169d
[]
no_license
SpirosOrfanos/EposRenewalBR
69f631ecf4161cbae8f4a2f96979f60fc8bda191
aa32a5a8a6fea384ab44830fd39d17971ffa7260
refs/heads/master
2020-03-16T08:06:21.975466
2018-05-08T10:03:01
2018-05-08T10:03:01
132,590,157
0
0
null
null
null
null
UTF-8
Java
false
false
3,151
java
package gr.epos.renewal.br.config; import gr.epos.renewal.br.security.AuthoritiesConstants; import gr.epos.renewal.br.security.jwt.JWTConfigurer; import gr.epos.renewal.br.security.jwt.TokenProvider; import org.springframework.context.annotation.*; import org.springframework.http.HttpMethod; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.data.repository.query.SecurityEvaluationContextExtension; import org.zalando.problem.spring.web.advice.security.SecurityProblemSupport; @Configuration @Import(SecurityProblemSupport.class) @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) public class MicroserviceSecurityConfiguration extends WebSecurityConfigurerAdapter { private final TokenProvider tokenProvider; private final SecurityProblemSupport problemSupport; public MicroserviceSecurityConfiguration(TokenProvider tokenProvider, SecurityProblemSupport problemSupport) { this.tokenProvider = tokenProvider; this.problemSupport = problemSupport; } @Override public void configure(WebSecurity web) throws Exception { web.ignoring() .antMatchers(HttpMethod.OPTIONS, "/**") .antMatchers("/app/**/*.{js,html}") .antMatchers("/bower_components/**") .antMatchers("/i18n/**") .antMatchers("/content/**") .antMatchers("/swagger-ui/index.html") .antMatchers("/test/**") .antMatchers("/h2-console/**"); } @Override protected void configure(HttpSecurity http) throws Exception { http .csrf() .disable() .exceptionHandling() .authenticationEntryPoint(problemSupport) .accessDeniedHandler(problemSupport) .and() .headers() .frameOptions() .disable() .and() .sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() .authorizeRequests() .antMatchers("/api/**").authenticated() .antMatchers("/management/health").permitAll() .antMatchers("/management/**").hasAuthority(AuthoritiesConstants.ADMIN) .antMatchers("/swagger-resources/configuration/ui").permitAll() .and() .apply(securityConfigurerAdapter()); } private JWTConfigurer securityConfigurerAdapter() { return new JWTConfigurer(tokenProvider); } @Bean public SecurityEvaluationContextExtension securityEvaluationContextExtension() { return new SecurityEvaluationContextExtension(); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
7d0cdc560bae5f21c31dc651a440c6e3d4b58b93
e8f171ddb3c8fb54fcecaff0a84648e76681f982
/community/logicaldoc/branches/logicaldoc-7.4/logicaldoc-core/src/main/java/com/logicaldoc/core/script/ScriptingEngine.java
05e777bcc79b08c5349d46ed81f8afb70be5d01f
[]
no_license
zhunengfei/logicaldoc
f12114ef72935e683af4b50f30a88fbd5df9bfde
9d432d29a9b43ebd2b13a1933a50add3f4784815
refs/heads/master
2021-01-20T01:05:48.499693
2017-01-13T16:24:16
2017-01-13T16:24:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,152
java
package com.logicaldoc.core.script; import java.io.StringWriter; import java.util.Date; import java.util.Locale; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.Velocity; import org.apache.velocity.runtime.RuntimeConstants; import org.apache.velocity.runtime.log.Log4JLogChute; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.logicaldoc.core.SystemInfo; import com.logicaldoc.i18n.I18N; /** * Represents a Facade on Velocity * * @author Marco Meschieri - LogicalDOC since <product_release> */ public class ScriptingEngine { private static final String KEY_LOCALE = "locale"; private static Logger log = LoggerFactory.getLogger(ScriptingEngine.class); private String logTag = "ScriptEngine"; private Locale locale = Locale.ENGLISH; public ScriptingEngine() { super(); } public ScriptingEngine(String logTag, Locale locale) { super(); this.logTag = logTag; this.locale = locale; } /** * Evaluate a given expression. The dictionary will automatically contain * the following keys: * <ol> * <li>product: name of the product</li> * <li>locale: the default locale</li> * <li>CURRENT_DATE: the actual date</li> * <li>DateTool</li> * <li>I18N</li> * <li>DocTool</li> * <li>FolderTool</li> * </ol> * * @param expression The string expression to process * @param dictionary The dictionary to use * @return The processed result */ public String evaluate(String expression, Map<String, Object> dictionary) { // This is needed to handle new lines dictionary.put("nl", "\n"); // The product name dictionary.put("product", SystemInfo.get().getProduct()); // This is the locale if (!dictionary.containsKey(KEY_LOCALE)) dictionary.put(KEY_LOCALE, locale); // This is needed to format dates DateTool dateTool = new DateTool(I18N.getMessages((Locale) dictionary.get(KEY_LOCALE)).get("format_date"), I18N .getMessages((Locale) dictionary.get(KEY_LOCALE)).get("format_dateshort")); dictionary.put("DateTool", dateTool); // Put the current date dictionary.put("CURRENT_DATE", new Date()); // Localized messages map dictionary.put("I18N", new I18NTool(I18N.getMessages((Locale) dictionary.get(KEY_LOCALE)))); // This is needed to print document's URL dictionary.put("DocTool", new DocTool()); // This is needed to print folder's URL dictionary.put("FolderTool", new FolderTool()); StringWriter writer = new StringWriter(); try { VelocityContext context = new VelocityContext(dictionary); Velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, Log4JLogChute.class.getName()); Velocity.setProperty("runtime.log.logsystem.log4j.logger", ScriptingEngine.class.getName()); Velocity.evaluate(context, writer, StringUtils.isNotEmpty(logTag) ? logTag : "ScriptEngine", expression.replace("\n", "${nl}")); return writer.toString(); } catch (Throwable e) { log.error(e.getMessage()); return expression; } } }
[ "car031@bae09422-6297-422f-b3ee-419521344c47" ]
car031@bae09422-6297-422f-b3ee-419521344c47
f08c0b9e3d4177cbec14508fe4497fbb5edd4a92
121fdfd5f27c8e72ba8eaba4d6fc8b1f9d9b6ea8
/tags/STRUTS_1_1_B2/src/java/org/apache/commons/dbcp/PoolableConnection.java
d177c603fc9fd48ef119fc3c09617fa0096ddf07
[ "Apache-1.1" ]
permissive
SRIKAZQY/apache-commons-dbcp
2a970cf95a1179d039329281a338b2df83843979
c98566f4755b4b636b438057d3e965ce3f33c0c9
refs/heads/master
2021-01-18T12:48:05.824510
2015-01-18T18:59:59
2015-01-18T18:59:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,696
java
/* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/PoolableConnection.java,v 1.4 2002/06/28 15:28:20 glenn Exp $ * $Revision: 1.4 $ * $Date: 2002/06/28 15:28:20 $ * * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Commons", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.commons.dbcp; import java.sql.Connection; import java.sql.SQLException; import org.apache.commons.pool.ObjectPool; /** * A delegating connection that, rather than closing the underlying * connection, returns itself to an {@link ObjectPool} when * closed. * * @author Rodney Waldhoff * @author Glenn L. Nielsen * @author James House (<a href="mailto:james@interobjective.com">james@interobjective.com</a>) * @version $Id: PoolableConnection.java,v 1.4 2002/06/28 15:28:20 glenn Exp $ */ public class PoolableConnection extends DelegatingConnection { /** The pool to which I should return. */ protected ObjectPool _pool = null; /** * * @param conn my underlying connection * @param pool the pool to which I should return when closed */ public PoolableConnection(Connection conn, ObjectPool pool) { super(conn); _pool = pool; } /** * * @param conn my underlying connection * @param pool the pool to which I should return when closed * @param config the abandoned configuration settings */ public PoolableConnection(Connection conn, ObjectPool pool, AbandonedConfig config) { super(conn, config); _pool = pool; } /** * Returns me to my pool. */ public void close() throws SQLException { try { _pool.returnObject(this); } catch(SQLException e) { throw e; } catch(RuntimeException e) { throw e; } catch(Exception e) { throw new SQLException(e.toString()); } } /** * Actually close my underlying {@link Connection}. */ public void reallyClose() throws SQLException { _conn.close(); } }
[ "bayard@13f79535-47bb-0310-9956-ffa450edef68" ]
bayard@13f79535-47bb-0310-9956-ffa450edef68
93a936128cc5ee4a8147a24589191d8648b60135
2314607d22025c8896817458183cffd63e399e41
/core/src/com/bitdecay/helm/component/ShipLaunchComponent.java
c912742e6ea766123f8f04982657215e7b80c1b1
[]
no_license
MondayHopscotch/Helm
2809d8601a1d34e1c522d120ffd8de8fc84a463e
ba6687b8943ffeb96e114e206f8c478e20ff7221
refs/heads/master
2023-08-29T04:34:46.542777
2018-12-16T17:30:07
2018-12-16T17:30:07
75,701,799
0
0
null
null
null
null
UTF-8
Java
false
false
262
java
package com.bitdecay.helm.component; /** * Created by Monday on 12/14/2016. */ public class ShipLaunchComponent extends GameComponent { public float countdown; public ShipLaunchComponent(float countdown) { this.countdown = countdown; } }
[ "monday.hopscotch@gmail.com" ]
monday.hopscotch@gmail.com
4bdb805479f885c037a634ee9cc3238e1119e263
2ae2675c088577cb8bd99a93369137c44e28dc4e
/src/main/java/com/zhiy/zhiyes7service/service/UserService.java
7c4570721be4427c8440c21c9d43d897859d6633
[]
no_license
liukunace/zhiy-es7-service
080a6881ee553cd8143eb0e3f172df9007709fb7
34731b10cb88257d5ea5094367b9e9b164c29789
refs/heads/master
2022-12-22T02:46:18.179830
2020-09-30T01:19:40
2020-09-30T01:19:40
299,777,017
0
0
null
null
null
null
UTF-8
Java
false
false
667
java
package com.zhiy.zhiyes7service.service; import com.zhiy.zhiyes7service.bean.UserBean; import org.springframework.data.elasticsearch.core.aggregation.AggregatedPage; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; import org.springframework.stereotype.Service; import java.io.IOException; import java.util.Iterator; import java.util.List; /** * @description: * @author: liukun * @create: 2020-09-28 20:59 */ public interface UserService { void saveAll(List<UserBean> list); Iterator<UserBean> findAll(); void create(); public AggregatedPage testForHigh() throws IOException; }
[ "l" ]
l
d6ab7660f07737dc82ec8c4c7a65617bd13650ed
383e578ec8ac3043ddece8223494f27f4a4c76dd
/legend.biz/src/main/java/com/tqmall/legend/biz/common/ParamsGenerator.java
9bd3b6e81fb9e5331179b6c8a56ea321641ca55c
[]
no_license
xie-summer/legend
0018ee61f9e864204382cd202fe595b63d58343a
7e7bb14d209e03445a098b84cf63566702e07f15
refs/heads/master
2021-06-19T13:44:58.640870
2017-05-18T08:34:13
2017-05-18T08:34:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,321
java
package com.tqmall.legend.biz.common; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.util.CollectionUtils; import org.springframework.web.util.UriUtils; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * Created by jason on 15/12/15. * * GET方法 参数拼接 */ @Slf4j public class ParamsGenerator { /** * http get请求,拼接参数key=value&key1=value1 */ public static String warpParams(Map<String, Object> paramMap) { if (CollectionUtils.isEmpty(paramMap)) { return ""; } try { List<String> paramList = new ArrayList<>(paramMap.size()); for (Map.Entry<String, Object> entry : paramMap.entrySet()) { paramList.add(String.format("%s=%s", entry.getKey(), UriUtils.encodeQueryParam(String.valueOf(entry .getValue()), "utf-8"))); } String params = StringUtils.join(paramList.toArray(), "&"); log.info("参数拼接成功:{}", params); return params; } catch (UnsupportedEncodingException e) { log.error("unsupported encoding exception:{}", e); return ""; } } }
[ "zhangting.huang@tqmall.com" ]
zhangting.huang@tqmall.com
1e371b612f6af55ce6c7e56d157ca4de58569fcc
d3bf4dfd7b48597f13f656a1f28eca1e79c1cb2a
/smilife/smilife_web/src/main/java/com/iskyshop/foundation/dao/GoodsBrandCategoryDAO.java
e7f0287c19d2a50399ce260551ed9d6d72d64de5
[]
no_license
zengchi/project
6a5b0d71ec6e7bcc8d32380509b34d9eebbe1ed7
a72c4aabb260bca8d2e340f2262d2f6c53f98898
refs/heads/master
2021-04-08T14:37:56.661873
2017-12-23T02:42:31
2017-12-23T02:42:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
304
java
package com.iskyshop.foundation.dao; import org.springframework.stereotype.Repository; import com.iskyshop.core.base.GenericDAO; import com.iskyshop.foundation.domain.GoodsBrandCategory; @Repository("goodsBrandCategoryDAO") public class GoodsBrandCategoryDAO extends GenericDAO<GoodsBrandCategory> { }
[ "32216688+henry90821@users.noreply.github.com" ]
32216688+henry90821@users.noreply.github.com
25f6e54020d628c140b7373d4b1fb28261cc3dda
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/com/hazelcast/internal/networking/nio/iobalancer/IOBalancerMemoryLeakTest.java
8bea42e892f8d8801b73cea4e6a1f8c0afada067
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
5,244
java
/** * Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hazelcast.internal.networking.nio.iobalancer; import GroupProperty.IO_BALANCER_INTERVAL_SECONDS; import GroupProperty.REST_ENABLED; import Protocols.CLUSTER; import com.hazelcast.config.Config; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.internal.ascii.HTTPCommunicator; import com.hazelcast.nio.Address; import com.hazelcast.test.AssertTask; import com.hazelcast.test.HazelcastSerialClassRunner; import com.hazelcast.test.HazelcastTestSupport; import com.hazelcast.test.annotation.NightlyTest; import java.io.IOException; import java.net.Socket; import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; @RunWith(HazelcastSerialClassRunner.class) @Category(NightlyTest.class) public class IOBalancerMemoryLeakTest extends HazelcastTestSupport { @Test public void testMemoryLeak_with_RestConnections() throws IOException { Config config = new Config(); config.getGroupConfig().setName(HazelcastTestSupport.randomName()); config.setProperty(REST_ENABLED.getName(), "true"); config.setProperty(IO_BALANCER_INTERVAL_SECONDS.getName(), "1"); HazelcastInstance instance = Hazelcast.newHazelcastInstance(config); HTTPCommunicator communicator = new HTTPCommunicator(instance); for (int i = 0; i < 100; i++) { communicator.getClusterInfo(); } final IOBalancer ioBalancer = IOBalancerMemoryLeakTest.getIoBalancer(instance); HazelcastTestSupport.assertTrueEventually(new AssertTask() { @Override public void run() { int inPipelineSize = ioBalancer.getInLoadTracker().getPipelines().size(); int outPipelineSize = ioBalancer.getOutLoadTracker().getPipelines().size(); Assert.assertEquals(0, inPipelineSize); Assert.assertEquals(0, outPipelineSize); } }); } @Test public void testMemoryLeak_with_SocketConnections() { Config config = new Config(); config.getGroupConfig().setName(HazelcastTestSupport.randomName()); config.setProperty(IO_BALANCER_INTERVAL_SECONDS.getName(), "1"); HazelcastInstance instance = Hazelcast.newHazelcastInstance(config); final Address address = instance.getCluster().getLocalMember().getAddress(); int threadCount = 10; final int connectionCountPerThread = 100; Runnable runnable = new Runnable() { public void run() { for (int i = 0; i < connectionCountPerThread; i++) { Socket socket; try { socket = new Socket(address.getHost(), address.getPort()); socket.getOutputStream().write(CLUSTER.getBytes()); HazelcastTestSupport.sleepMillis(1000); socket.close(); } catch (IOException e) { e.printStackTrace(); } } } }; Thread[] threads = new Thread[threadCount]; for (int i = 0; i < threadCount; i++) { threads[i] = new Thread(runnable); threads[i].start(); } HazelcastTestSupport.assertJoinable(threads); final IOBalancer ioBalancer = IOBalancerMemoryLeakTest.getIoBalancer(instance); HazelcastTestSupport.assertTrueEventually(new AssertTask() { @Override public void run() { LoadTracker inLoadTracker = ioBalancer.getInLoadTracker(); LoadTracker outLoadTracker = ioBalancer.getOutLoadTracker(); int inPipelineSize = inLoadTracker.getPipelines().size(); int outPipelineSize = outLoadTracker.getPipelines().size(); int inLoadCount = inLoadTracker.getPipelineLoadCount().keySet().size(); int outLoadCount = outLoadTracker.getPipelineLoadCount().keySet().size(); int inLastLoadCount = inLoadTracker.getLastLoadCounter().keySet().size(); int outLastLoadCount = outLoadTracker.getLastLoadCounter().keySet().size(); Assert.assertEquals(0, inPipelineSize); Assert.assertEquals(0, outPipelineSize); Assert.assertEquals(0, inLoadCount); Assert.assertEquals(0, outLoadCount); Assert.assertEquals(0, inLastLoadCount); Assert.assertEquals(0, outLastLoadCount); } }); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
389385ccd8bc0c9a69bea8ca54ce5ad81e38f9c8
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a304/A304725.java
6496c3eb6b4a9ed979ce2cf8473cf017b1465bd2
[]
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
430
java
package irvine.oeis.a304; // Generated by gen_pattern.pl - DO NOT EDIT here! import irvine.oeis.GeneratingFunctionSequence; /** * A304725 <code>a(n) = n^4 + 8*n^3 + 20*n^2 + 16*n + 2</code>. * @author Georg Fischer */ public class A304725 extends GeneratingFunctionSequence { /** Construct the sequence. */ public A304725() { super(0, new long[] {2, 37, -21, 7, -1}, new long[] {1, -5, 10, -10, 5, -1}); } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
acdb355b2a864bbad0a5bb1f238260a246714bb7
957c6953d076dd5fec73f43caa3f5c3b85a05e80
/src/main/java/com/sztouyun/advertisingsystem/model/advertisement/AdvertisementOperationLog.java
2cace416b40e1ea420b92fd1dbb51a0f2ec2b26b
[ "Apache-2.0" ]
permissive
chenhaujing/advertisingsystem
d8e44747ad023018300ef28bdea00b9e7f677423
7871c89a604bc64045664be0760d7f14639a2439
refs/heads/master
2023-01-20T10:21:05.535808
2020-05-14T03:48:33
2020-05-14T03:48:33
119,918,573
0
0
Apache-2.0
2023-01-12T09:00:25
2018-02-02T02:07:10
Java
UTF-8
Java
false
false
2,842
java
package com.sztouyun.advertisingsystem.model.advertisement; import com.sztouyun.advertisingsystem.model.BaseModel; import com.sztouyun.advertisingsystem.utils.EnumUtils; import javax.persistence.*; @Entity public class AdvertisementOperationLog extends BaseModel { public AdvertisementOperationLog(){ } public AdvertisementOperationLog(String advertisementId, Integer operation, boolean successed, String remark) { this.advertisementId = advertisementId; this.operation = operation; this.successed = successed; this.remark = remark; } @Column(name = "advertisement_id", nullable = false, length = 36) private String advertisementId; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "advertisement_id", insertable = false, updatable = false) private Advertisement advertisement; @Column(nullable = false) private Integer operation; @Column(nullable = false) private boolean successed; @Column(nullable = false) private boolean finishContract = false; @Column(length = 2000) private String remark; @Transient private AdvertisementStatusEnum advertisementStatusEnum; public AdvertisementStatusEnum getAdvertisementStatusEnum() { if (advertisementStatusEnum == null) { advertisementStatusEnum = EnumUtils.toEnum(getOperation(), AdvertisementStatusEnum.class); } return advertisementStatusEnum; } public void setAdvertisementStatusEnum(AdvertisementStatusEnum advertisementStatusEnum) { this.advertisementStatusEnum = advertisementStatusEnum; } public String getAdvertisementId() { return advertisementId; } public void setAdvertisementId(String advertisementId) { this.advertisementId = advertisementId; } public Advertisement getAdvertisement() { return advertisement; } public void setAdvertisement(Advertisement advertisement) { this.advertisement = advertisement; } public Integer getOperation() { return operation; } public void setOperation(Integer operation) { this.operation = operation; } public boolean isSuccessed() { return successed; } public void setSuccessed(boolean successed) { this.successed = successed; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public boolean isFinishContract() { return finishContract; } public void setFinishContract(boolean finishContract) { this.finishContract = finishContract; } public AdvertisementOperationEnum getAdvertisementOperationEnum(){ return EnumUtils.toEnum(getOperation(),AdvertisementOperationEnum.class); } }
[ "1032291008@qq.com" ]
1032291008@qq.com
40aad4e864db728b6152de6f4e8ed17a6ebc367b
7e628383c824d5fb651138afe8d0877a1ef6c012
/app/src/main/java/com/saberrr/openchina/ui/adapter/MoveAdapter.java
dc6339eeb338d27b0a29381ffa84eaf817b37c3f
[]
no_license
SaberrrC/OSCDemo
231d9a40e33d17955fcfd97cd826580d28c132b9
bab3706c2549f22f79ac76cddbecf863c5a381ee
refs/heads/master
2020-03-12T19:54:35.578235
2018-04-24T04:03:27
2018-04-24T04:03:27
130,794,179
0
0
null
null
null
null
UTF-8
Java
false
false
884
java
package com.saberrr.openchina.ui.adapter; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import com.saberrr.openchina.bean.FragmentInfo; import java.util.ArrayList; import java.util.List; /** * Created by tt on 2017/4/1. */ public class MoveAdapter extends FragmentStatePagerAdapter { private List<FragmentInfo> mPagers = new ArrayList(); public MoveAdapter(FragmentManager fm, List<FragmentInfo> pager) { super(fm); mPagers = pager; } @Override public Fragment getItem(int position) { return mPagers.get(position).mFragment; } @Override public int getCount() { return mPagers.size(); } @Override public CharSequence getPageTitle(int position) { return mPagers.get(position).title; } }
[ "123456" ]
123456
19f326eecf0c23a8664a394566a85626689899e6
6d027571996bd925c152446dba353aa0b55898e2
/javase/src/main/java/phy/jdk8/OptionalTest.java
410ee708d227118b9d449d0e89cda05434031cd4
[]
no_license
phycn/puhy
d9d38ecc5d77c3508a9d254a13702cc0e27d34c5
7ad1af2e4ee2491b918569c0403f17e70cea19e7
refs/heads/master
2022-12-25T02:37:21.625786
2020-04-16T10:45:47
2020-04-16T10:45:47
120,993,643
2
1
null
2022-12-16T08:50:18
2018-02-10T07:11:35
Java
UTF-8
Java
false
false
1,184
java
package phy.jdk8; import java.util.Optional; public class OptionalTest { public static void main(String[] args) { Integer value1 = null; //ofNullable允许传递null Optional<Integer> a = Optional.ofNullable(value1); //of会报空指针异常 // Optional<Integer> b = Optional.of(value1); //如果值存在则使用该值调用consumer(lambda表达式), 否则不做任何事情 a.ifPresent(System.out::println); //如果存在该值,返回值,否则返回指定的值 System.out.println(a.orElse(10)); //存在即返回, 无则由函数来产生 a.orElseGet(() -> Integer.valueOf(22)); Bean bean = new Bean(); Optional<String> fieldOp = Optional.ofNullable(bean.getField1()); Optional<Bean> o = Optional.of(bean); String f1 = o.map(Bean::getField1).orElse("蒲红宇"); System.out.println("" + f1); fieldOp.ifPresent((value) -> { System.out.println("ifPresent:" + value); }); String field1 = fieldOp.orElseGet(() -> String.valueOf(12)); System.out.println(field1); } } class Bean { public String getField1() { return field1; } public void setField1(String field1) { this.field1 = field1; } private String field1; }
[ "phy253399933@qq.com" ]
phy253399933@qq.com
448eb3507c9cb324cd9f6a37c6e4b3270ff6ae14
7344866370bd60505061fcc7e8c487339a508bb9
/Modules/Module Operation/src/org/openconcerto/modules/operation/CalendarPrintPanel.java
e457ba830fba0c44980cd79bf406f41b084f355b
[]
no_license
sanogotech/openconcerto_ERP_JAVA
ed3276858f945528e96a5ccfdf01a55b58f92c8d
4d224695be0a7a4527851a06d8b8feddfbdd3d0e
refs/heads/master
2023-04-11T09:51:29.952287
2021-04-21T14:39:18
2021-04-21T14:39:18
360,197,474
0
0
null
null
null
null
UTF-8
Java
false
false
5,827
java
package org.openconcerto.modules.operation; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.print.PageFormat; import java.awt.print.Pageable; import java.awt.print.PrinterException; import java.awt.print.PrinterJob; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; import java.util.Comparator; import java.util.List; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; import org.jopencalendar.model.JCalendarItem; import org.jopencalendar.print.CalendarItemPrinter; import org.openconcerto.sql.users.User; import org.openconcerto.ui.DefaultGridBagConstraints; import org.openconcerto.ui.JDate; import org.openconcerto.ui.PrintPreviewFrame; public class CalendarPrintPanel extends JPanel { final JCheckBox preview = new JCheckBox("Aperçu"); final JButton bPrint = new JButton("Imprimer"); public CalendarPrintPanel(final OperationCalendarManager manager, final int week, final int year, final List<User> selectedUsers, final List<String> selectedStates) { preview.setSelected(true); // this.setLayout(new GridBagLayout()); final GridBagConstraints c = new DefaultGridBagConstraints(); final JLabel l = new JLabel("Date de début", SwingConstants.RIGHT); this.add(l, c); c.gridx++; final JDate d1 = new JDate(false, true); Calendar cal = Calendar.getInstance(); cal.clear(); cal.set(Calendar.YEAR, year); cal.set(Calendar.WEEK_OF_YEAR, week); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); d1.setDate(cal.getTime()); c.weightx = 1; this.add(d1, c); c.gridx = 0; c.gridy++; c.weightx = 0; final JLabel l2 = new JLabel("Date de fin", SwingConstants.RIGHT); this.add(l2, c); c.gridx++; final JDate d2 = new JDate(false, true); cal.add(Calendar.DAY_OF_YEAR, 7); d2.setDate(cal.getTime()); c.weightx = 1; this.add(d2, c); final JPanel p = new JPanel(); p.setLayout(new FlowLayout(FlowLayout.RIGHT)); p.add(preview); p.add(bPrint); c.gridwidth = 2; c.gridx = 0; c.gridy++; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.SOUTHEAST; this.add(p, c); // bPrint.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (d1.getDate().after(d2.getDate())) { return; } final List<Pageable> p = new ArrayList<Pageable>(); for (User user : selectedUsers) { final List<User> l = new ArrayList<User>(); l.add(user); final List<JCalendarItem> itemInWeek = manager.getItemIn(d1.getDate(), d2.getDate(), l, selectedStates); if (!itemInWeek.isEmpty()) { Collections.sort(itemInWeek, new Comparator<JCalendarItem>() { @Override public int compare(JCalendarItem o1, JCalendarItem o2) { return o1.getDtStart().compareTo(o2.getDtStart()); } }); final PageFormat pf = new PageFormat(); pf.setPaper(new A4()); final CalendarItemPrinter printable = new OperationCalendarItemPrinter(user.getFullName(), itemInWeek, pf); p.add(printable); } } if (p.isEmpty()) { JOptionPane.showMessageDialog(CalendarPrintPanel.this, "Aucune page à imprimer.\nMerci de vérifier la période."); return; } if (preview.isSelected()) { final PrintPreviewFrame f = new PrintPreviewFrame(new ListOfPageable(p)) { @Override public void printAllPages() { printPages(p); closeFrame(); } }; f.pack(); f.setLocationRelativeTo(CalendarPrintPanel.this); f.setVisible(true); } else { printPages(p); closeFrame(); } } }); } protected void closeFrame() { SwingUtilities.getWindowAncestor(this).dispose(); } public void printPages(final List<Pageable> pageables) { PrinterJob job = PrinterJob.getPrinterJob(); boolean ok = job.printDialog(); if (ok) { for (Pageable document : pageables) { PageFormat p = job.getPageFormat(null); System.err.println("CalendarPrintPanel.printPages():Size: " + p.getWidth() + " x " + p.getHeight()); System.err.println("CalendarPrintPanel.printPages():Imagageable: " + p.getImageableWidth() + " x " + p.getImageableHeight()); job.getPageFormat(null).getImageableHeight(); job.setPageable(document); try { job.print(); } catch (PrinterException e) { e.printStackTrace(); } } } } }
[ "davask.42@gmail.com" ]
davask.42@gmail.com
3bfdf61c70da4ad50ecc633874cc220c0e6c2fb4
d5f3444aa6d6a4ad3011aa866e7684eea58c42ea
/onebusaway-vdv452/src/main/java/org/onebusaway/vdv452/model/TravelTime.java
8cb57f407ff0cec0e8c3f69729a5b748c5a5f811
[ "Apache-2.0" ]
permissive
bufemc/onebusaway-vdv-modules
fd02d0df907eb894e83884705840e030d0e0e927
31d213e11e9a1c27ea70fa90eac0aee3df925e7d
refs/heads/master
2023-02-11T17:59:00.889223
2022-03-02T15:14:36
2022-03-02T15:14:36
267,801,170
1
0
NOASSERTION
2020-05-29T08:02:58
2020-05-29T08:02:57
null
UTF-8
Java
false
false
1,998
java
/** * Copyright (C) 2013 Google, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.onebusaway.vdv452.model; import org.onebusaway.csv_entities.schema.annotations.CsvField; import org.onebusaway.csv_entities.schema.annotations.CsvFields; import org.onebusaway.vdv452.serialization.EntityFieldMappingFactory; @CsvFields(filename = "SEL_FZT_FELD.x10") public class TravelTime { @CsvField(name = "FGR_NR", mapping = EntityFieldMappingFactory.class) private TimingGroup timingGroup; @CsvField(name = "ORT_NR", mapping = EntityFieldMappingFactory.class) private StopPoint fromStop; @CsvField(name = "SEL_ZIEL", mapping = EntityFieldMappingFactory.class) private StopPoint toStop; @CsvField(name = "SEL_FZT") private int travelTime; public TimingGroup getTimingGroup() { return timingGroup; } public void setTimingGroup(TimingGroup timingGroup) { this.timingGroup = timingGroup; } public StopPoint getFromStop() { return fromStop; } public void setFromStop(StopPoint fromStop) { this.fromStop = fromStop; } public StopPoint getToStop() { return toStop; } public void setToStop(StopPoint toStop) { this.toStop = toStop; } public int getTravelTime() { return travelTime; } public void setTravelTime(int travelTime) { this.travelTime = travelTime; } @Override public String toString() { return timingGroup + ": " + fromStop + " + " + toStop + " = " + travelTime; } }
[ "bdferris@google.com" ]
bdferris@google.com
fc036a3e0f26867a4db4ecfa70a099d297cfd3bc
97e29489566dff2c2b309aebc66c91a69db234a3
/asianpaintsb2b/asianpaintsb2bcockpits/src/com/asianpaintsb2b/cockpits/productcockpit/editor/ExternalTaxesSectionConfiguration.java
511db2d07ffa14ea6ad0d8977d56bc1c55f927ce
[]
no_license
vamshivushakola/Home_asianpaints_b2b
f8ea6568dca3e87375a100c5d9e8f801e702404c
9ea46652e699fc843f8bb55f94a826bb1a9c4fd0
refs/heads/master
2020-12-31T04:56:13.029311
2016-05-22T18:28:48
2016-05-22T18:28:48
58,956,762
0
1
null
null
null
null
UTF-8
Java
false
false
2,833
java
/* * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package com.asianpaintsb2b.cockpits.productcockpit.editor; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import org.springframework.beans.factory.annotation.Required; import de.hybris.platform.cockpit.components.sectionpanel.SectionRenderer; import de.hybris.platform.cockpit.model.meta.ObjectType; import de.hybris.platform.cockpit.model.meta.PropertyDescriptor; import de.hybris.platform.cockpit.model.meta.TypedObject; import de.hybris.platform.cockpit.services.config.EditorConfiguration; import de.hybris.platform.cockpit.services.config.EditorSectionConfiguration; import de.hybris.platform.cockpit.services.config.UpdateAwareCustomSectionConfiguration; import de.hybris.platform.cockpit.services.config.impl.DefaultEditorSectionConfiguration; import de.hybris.platform.cockpit.services.values.ObjectValueContainer; /** * * Represents custom section which show external taxes for Products. */ public class ExternalTaxesSectionConfiguration extends DefaultEditorSectionConfiguration implements UpdateAwareCustomSectionConfiguration { private SectionRenderer sectionRenderer; @Override public void allInitialized(final EditorConfiguration config, final ObjectType type, final TypedObject object) { // NOP } @Override public List<EditorSectionConfiguration> getAdditionalSections() { // NOP return null; } @Override public SectionRenderer getCustomRenderer() { return this.sectionRenderer; } @Override public void initialize(final EditorConfiguration config, final ObjectType type, final TypedObject object) { // NOP } @Override public void loadValues(final EditorConfiguration config, final ObjectType type, final TypedObject object, final ObjectValueContainer objectValues) { // NOP } @Override public void saveValues(final EditorConfiguration config, final ObjectType type, final TypedObject object, final ObjectValueContainer objectValues) { // NOP } @Required public void setSectionRenderer(final SectionRenderer sectionRenderer) { this.sectionRenderer = sectionRenderer; } public SectionRenderer getSectionRenderer() { return this.sectionRenderer; } @Override public Set<PropertyDescriptor> getUpdateTriggerProperties() { final Set<PropertyDescriptor> ret = new HashSet<PropertyDescriptor>(); return ret; } @Override public Set<ObjectType> getUpdateTriggerTypes() { return Collections.EMPTY_SET; } }
[ "vamshi.vshk@gmail.com" ]
vamshi.vshk@gmail.com
490f0349696eec2f8cf67afbee52ee1d3cd49bd9
069db98b04c2c2b306ca6d0911ecfaa9d3484291
/chis/src/main/java/chis/source/dic/MHCVisitResult.java
d4506df9e21751b5f37c0678892a1c327ed6553a
[]
no_license
zhouhui521/his
59270696d3667c8c6eb8f7104af0a9501a90942a
8d26b62e73d6ec95111eff66ab9d7aee61674f73
refs/heads/master
2023-02-03T16:20:57.561243
2020-12-24T06:33:46
2020-12-24T06:33:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
591
java
/** * @(#)Gender.java Created on 2012-2-10 下午04:43:06 * * 版权:版权所有 bsoft 保留所有权力。 */ package chis.source.dic; /** * @description * * @author <a href="mailto:yaozh@bsoft.com.cn">yaozh</a> */ public class MHCVisitResult { public static final String ZZZL = "1"; // ** 正在治疗 public static final String ZWZC = "2"; // ** 转为正常 public static final String BQJZZYZL = "3";// ** 病情加重住院治疗 public static final String YZZRS = "4"; // ** 已终止妊娠 public static final String QT = "5"; // ** 其他 }
[ "renw1@bsoft.com.cn" ]
renw1@bsoft.com.cn
a891e0fe40a587f9518c6a649035fccecdc91bb0
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/78/org/apache/commons/math/linear/ArrayRealVector_mapRintToSelf_739.java
fecfe519f35b3be845fc518a12547e6cf7ccd245
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,654
java
org apach common math linear link real vector realvector arrai version revis date arrai real vector arrayrealvector real vector realvector serializ inherit doc inheritdoc real vector realvector map rint maprinttoself data length data math rint data
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
b213935a80a0ddf0285d757c7bc21f8d553f4db3
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_3/src/b/i/i/c/Calc_1_3_18823.java
0b9eb8e828cafe99bf2f07dc30297fdc34898060
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package b.i.i.c; public class Calc_1_3_18823 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
b771d61002927112ee2be76723f3708aadbf8345
d0e8f076f037fb8be5ec272e2c0d7c16fa7f4b5d
/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/runner/TestRunnerAfterTestSupport.java
7af86faa5af8c54411fc31d4b53d970e2ff951ba
[ "Apache-2.0" ]
permissive
swathisprasad/citrus
b6811144ab46e1f88bb85b16f00539e1fe075f0c
5156c5e03f89de193b642aad91a4ee1611b4b27f
refs/heads/master
2020-05-20T08:27:52.578157
2019-05-11T12:29:42
2019-05-11T12:29:42
185,473,773
2
0
Apache-2.0
2019-05-07T20:32:02
2019-05-07T20:32:02
null
UTF-8
Java
false
false
2,226
java
/* * Copyright 2006-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 com.consol.citrus.dsl.runner; import com.consol.citrus.Citrus; import com.consol.citrus.container.SequenceAfterTest; import com.consol.citrus.context.TestContext; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; /** * Adds after suite actions using Java DSL runner methods. Instances of subclasses should be added as Spring beans to application context. * * @author Christoph Deppisch * @since 2.6 */ public abstract class TestRunnerAfterTestSupport extends SequenceAfterTest implements ApplicationContextAware, InitializingBean { /** Runner instance to receive after suite actions */ private TestRunner testRunner; /** Spring application context for test context initialization */ private ApplicationContext applicationContext; /** * Subclasses implement this method to add after suite logic. * @param runner */ public abstract void afterTest(TestRunner runner); @Override public void doExecute(TestContext context) { afterTest(testRunner); } /** * Sets the applicationContext property. * * @param applicationContext */ @Override public void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } @Override public void afterPropertiesSet() throws Exception { testRunner = new DefaultTestRunner(applicationContext, Citrus.newInstance(applicationContext).createTestContext()); } }
[ "deppisch@consol.de" ]
deppisch@consol.de
5c157a80327bec46b533aeab1cf3775fce450c96
2b4ce1ba30835e8dfeeca3444b049a0f26a72a7f
/app.widget/src/main/java/cn/mooc/app/module/widget/web/controller/ShortUrlController.java
06a574496456ed088b3b65498c3dc73915d0f6b6
[]
no_license
xjie1070160377/AppCenter
8e1f9237edfdb40989d1c88f34528963ea6530d5
4ab24999e37593d5b4f8ec2c1e33f09b0a8a0034
refs/heads/master
2020-04-14T15:54:12.997087
2019-01-03T08:18:59
2019-01-03T08:18:59
163,939,635
0
0
null
null
null
null
UTF-8
Java
false
false
1,095
java
package cn.mooc.app.module.widget.web.controller; import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.shiro.web.util.WebUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @RequestMapping("/widget") @Controller public class ShortUrlController { private Logger logger = LoggerFactory.getLogger(this.getClass()); @RequestMapping("/url/{code}") public void shortUrl(Model model,HttpServletRequest request,HttpServletResponse response, @PathVariable String code) { logger.debug("接收到URL短码:{}", code); //根据短码解析出对应的真实URL,并跳转(暂不实现,等后期需求) String toUrl = ""; try { WebUtils.issueRedirect(request, response, toUrl); } catch (IOException e) { logger.error("shortUrl error:", e); } } }
[ "向杰991723" ]
向杰991723
cfea27fc2a4606e72390ccd3bc6b29d44f9fbbde
0ceafc2afe5981fd28ce0185e0170d4b6dbf6241
/AlgoKit (3rdp)/Code-store v1.0/code-jam/java/src/GCJ_2012_1B_C.java
a96ab94c5b48975fea0e01bdfa1b8e982a28f7a1
[]
no_license
brainail/.happy-coooding
1cd617f6525367133a598bee7efb9bf6275df68e
cc30c45c7c9b9164095905cc3922a91d54ecbd15
refs/heads/master
2021-06-09T02:54:36.259884
2021-04-16T22:35:24
2021-04-16T22:35:24
153,018,855
2
1
null
null
null
null
UTF-8
Java
false
false
2,777
java
import java.util.*; import java.util.Map.Entry; public class GCJ_2012_1B_C { public <T> Set<Set<T>> powerSet(Set<T> originalSet) { Set<Set<T>> sets = new HashSet<Set<T>>(); if (originalSet.isEmpty()) { sets.add(new HashSet<T>()); return sets; } List<T> list = new ArrayList<T>(originalSet); T head = list.get(0); Set<T> rest = new HashSet<T>(list.subList(1, list.size())); for (Set<T> set : powerSet(rest)) { Set<T> newSet = new HashSet<T>(); newSet.add(head); newSet.addAll(set); sets.add(newSet); sets.add(set); } return sets; } public void run() { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); for (int cc = 0; cc < T; cc++) { int N = sc.nextInt(); Set<Integer> original = new HashSet<Integer>(); for (int i = 0; i < N; i++) { original.add(sc.nextInt()); } HashMap<Set<Integer>, Integer> lookup = new HashMap<Set<Integer>, Integer>(); Set<Set<Integer>> powerset = powerSet(original); for (Set<Integer> s : powerset) { int sum = 0; for (Integer i : s) { sum += i; } lookup.put(s, sum); } System.out.println("Case #" + (cc + 1)); boolean found = false; Set<Integer> subset1 = new HashSet<Integer>(); Set<Integer> subset2 = new HashSet<Integer>(); for (Entry<Set<Integer>, Integer> entry : lookup.entrySet()) { Set<Integer> key = entry.getKey(); Integer value = entry.getValue(); if (key.size() <= 0) continue; // System.out.println(entry.getKey().size()); for (Entry<Set<Integer>, Integer> entry2 : lookup.entrySet()) { if (!entry2.getKey().equals(key) && entry2.getValue().equals(value)) { found = true; for (Integer i : key) { System.out.print(i + " "); } System.out.println(); for (Integer i : entry2.getKey()) { System.out.print(i + " "); } break; } } if (found) break; } if (!found) { System.out.println("Impossible"); } } } public static void main(String[] args) { new GCJ_2012_1B_C().run(); } }
[ "wsemirz@gmail.com" ]
wsemirz@gmail.com
689f0d54b84cabe0387b5af5dcc44a6d6b224f06
0d86a98cd6a6477d84152026ffc6e33e23399713
/kata/7-kyu/java-functional-programming-part-1-the-beginning/main/Student.java
ef2496fb328b6fbfb9db98ca28ccac59d605deb0
[ "MIT" ]
permissive
ParanoidUser/codewars-handbook
0ce82c23d9586d356b53070d13b11a6b15f2d6f7
692bb717aa0033e67995859f80bc7d034978e5b9
refs/heads/main
2023-07-28T02:42:21.165107
2023-07-27T12:33:47
2023-07-27T12:33:47
174,944,458
224
65
MIT
2023-09-14T11:26:10
2019-03-11T07:07:34
Java
UTF-8
Java
false
false
239
java
import lombok.AllArgsConstructor; @AllArgsConstructor class Student { private final String firstName; private final String lastName; final String studentNumber; String getFullName() { return firstName + " " + lastName; } }
[ "5120290+ParanoidUser@users.noreply.github.com" ]
5120290+ParanoidUser@users.noreply.github.com
b3c340f48653159e22a1aee76a1846cb12447ea3
40665051fadf3fb75e5a8f655362126c1a2a3af6
/ibinti-bugvm/a2dbb9c2d10c5bfb812ba61c726066c5d7c98089/8045/UIViewControllerExtensions.java
eebb53ca52d25d85a40704c1bc3b42db428d12b0
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
2,091
java
/* * Copyright (C) 2013-2015 RoboVM AB * * 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.bugvm.apple.mediaplayer; /*<imports>*/ import java.io.*; import java.nio.*; import java.util.*; import com.bugvm.objc.*; import com.bugvm.objc.annotation.*; import com.bugvm.objc.block.*; import com.bugvm.rt.*; import com.bugvm.rt.annotation.*; import com.bugvm.rt.bro.*; import com.bugvm.rt.bro.annotation.*; import com.bugvm.rt.bro.ptr.*; import com.bugvm.apple.foundation.*; import com.bugvm.apple.uikit.*; import com.bugvm.apple.coregraphics.*; /*</imports>*/ /*<javadoc>*/ /*</javadoc>*/ /*<annotations>*/@Library("MediaPlayer")/*</annotations>*/ /*<visibility>*/public final/*</visibility>*/ class /*<name>*/UIViewControllerExtensions/*</name>*/ extends /*<extends>*/NSExtensions/*</extends>*/ /*<implements>*//*</implements>*/ { /*<ptr>*/ /*</ptr>*/ /*<bind>*/static { ObjCRuntime.bind(UIViewControllerExtensions.class); }/*</bind>*/ /*<constants>*//*</constants>*/ /*<constructors>*/ private UIViewControllerExtensions() {} /*</constructors>*/ /*<properties>*/ /*</properties>*/ /*<members>*//*</members>*/ /*<methods>*/ @Method(selector = "presentMoviePlayerViewControllerAnimated:") public static native void presentMoviePlayerViewController(UIViewController thiz, MPMoviePlayerViewController moviePlayerViewController); @Method(selector = "dismissMoviePlayerViewControllerAnimated") public static native void dismissMoviePlayerViewController(UIViewController thiz); /*</methods>*/ }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
98c2e800087cd2f259a04db026bf3afb8a6978b6
1eee273956e182a9cfc0e0f60015d09280c1b710
/src/main/java/mentortools/models/Student.java
9f912795106ff23d0b6ce57111bfb0d2757bd64f
[]
no_license
Sztzoli/mentor-tools
c6aa9b55a2bb27c2255128d8ee5465eee47198eb
4fb701f6ed30eb6190bc4302c9bafced2884e416
refs/heads/master
2023-06-29T14:43:53.101843
2021-08-02T11:46:33
2021-08-02T11:46:33
390,411,181
0
0
null
null
null
null
UTF-8
Java
false
false
860
java
package mentortools.models; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import java.util.Set; @Entity @Data @NoArgsConstructor @Table(name = "students") public class Student { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; private String email; @Column(name = "github_username") private String githubUsername; private String comment; @OneToMany(mappedBy = "student") private Set<Registration> registrations; @OneToMany(mappedBy = "student") private Set<LessonCompletion> lessonCompletions; public Student(String name, String email, String githubUsername, String comment) { this.name = name; this.email = email; this.githubUsername = githubUsername; this.comment = comment; } }
[ "bezraat@gmail.com" ]
bezraat@gmail.com
904bcc653982e77b3a728e7bdf591f804946c36d
9d54e9860deab14be8758e6caf74e3970988bbfc
/src/main/java/com/fixit/bo/views/TempUserView.java
ef5ddb6f1df0e140bf8c9eacef01dc704bd44132
[]
no_license
kostyantin2216/fix-it-backoffice
509c99d6912651ac1c59c6869cc930360b21c8a0
76a8b4916d857d0b905f26d10e08a66984c9b9d1
refs/heads/master
2021-03-27T08:40:40.973407
2018-01-24T09:37:52
2018-01-24T09:37:52
115,345,786
0
0
null
null
null
null
UTF-8
Java
false
false
1,202
java
/** * */ package com.fixit.bo.views; import com.fixit.core.data.mongo.TempUser; /** * @author Kostyantin * @createdAt 2017/12/20 21:38:18 GMT+2 */ public class TempUserView { public static TempUserView newUser() { return new TempUserView(); } public static TempUserView forUser(TempUser user) { TempUserView view = new TempUserView(); view.id = user.get_id().toHexString(); view.name = user.getName(); view.email = user.getEmail(); view.telephone = user.getTelephone(); return view; } private String id; private String name; private String email; private String telephone; private TempUserView() { } public String getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getTelephone() { return telephone; } public void setTelephone(String telephone) { this.telephone = telephone; } public TempUser toUser() { TempUser user = new TempUser(); user.setName(name); user.setTelephone(telephone); user.setEmail(email); return user; } }
[ "kostyantin2216@hotmail.com" ]
kostyantin2216@hotmail.com
80ae2a23ca158ec51ecb303263103cb6e9f672da
e498e9af6eeefd02b7e3f5d1e4647dc14cfa95c8
/src/com/facebook/buck/artifact_cache/RetryingCacheDecorator.java
576e2db13139244f84909b97df6f7e41c22170a7
[ "Apache-2.0" ]
permissive
asareh/buck
03a2734c46177d57cad708cf7e23feb32a2f41bb
dd1d3ab55077d859c94789e4a1262de60929fd7b
refs/heads/master
2021-07-05T23:41:59.187999
2017-09-30T06:38:59
2017-10-01T04:33:38
105,420,391
1
0
null
2017-10-01T05:01:35
2017-10-01T05:01:35
null
UTF-8
Java
false
false
3,814
java
/* * Copyright 2016-present Facebook, 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.facebook.buck.artifact_cache; import com.facebook.buck.event.BuckEventBus; import com.facebook.buck.event.ConsoleEvent; import com.facebook.buck.io.file.BorrowablePath; import com.facebook.buck.io.file.LazyPath; import com.facebook.buck.log.Logger; import com.facebook.buck.rules.RuleKey; import com.facebook.buck.slb.NoHealthyServersException; import com.google.common.base.Preconditions; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import java.util.ArrayList; import java.util.List; public class RetryingCacheDecorator implements ArtifactCache, CacheDecorator { private static final Logger LOG = Logger.get(RetryingCacheDecorator.class); private final ArtifactCache delegate; private final int maxFetchRetries; private final BuckEventBus buckEventBus; private final ArtifactCacheMode cacheMode; public RetryingCacheDecorator( ArtifactCacheMode cacheMode, ArtifactCache delegate, int maxFetchRetries, BuckEventBus buckEventBus) { Preconditions.checkArgument(maxFetchRetries > 0); this.cacheMode = cacheMode; this.delegate = delegate; this.maxFetchRetries = maxFetchRetries; this.buckEventBus = buckEventBus; } @Override public ListenableFuture<CacheResult> fetchAsync(RuleKey ruleKey, LazyPath output) { List<String> allCacheErrors = new ArrayList<>(); ListenableFuture<CacheResult> resultFuture = delegate.fetchAsync(ruleKey, output); for (int retryCount = 1; retryCount < maxFetchRetries; retryCount++) { int retryCountForLambda = retryCount; resultFuture = Futures.transformAsync( resultFuture, result -> { if (result.getType() != CacheResultType.ERROR) { return Futures.immediateFuture(result); } result.cacheError().ifPresent(allCacheErrors::add); LOG.info( "Failed to fetch %s after %d/%d attempts, exception: %s", ruleKey, retryCountForLambda + 1, maxFetchRetries, result.cacheError()); return delegate.fetchAsync(ruleKey, output); }); } return Futures.transform( resultFuture, result -> { if (result.getType() != CacheResultType.ERROR) { return result; } String msg = String.join("\n", allCacheErrors); if (!msg.contains(NoHealthyServersException.class.getName())) { buckEventBus.post( ConsoleEvent.warning( "Failed to fetch %s over %s after %d attempts.", ruleKey, cacheMode.name(), maxFetchRetries)); } return CacheResult.builder().from(result).setCacheError(msg).build(); }); } @Override public ArtifactCache getDelegate() { return delegate; } @Override public ListenableFuture<Void> store(ArtifactInfo info, BorrowablePath output) { return delegate.store(info, output); } @Override public CacheReadMode getCacheReadMode() { return delegate.getCacheReadMode(); } @Override public void close() { delegate.close(); } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
48b9f21c58cac229510de0e878b30d82c4b36dfe
a73dfb319f28cc1ff8aac4bb8721157638253878
/work/09_ecai/lotteryServer/src/main/java/lottery/domains/content/api/ag/AGValidation.java
34a611275ac9582ab3974f52a4d76625f7c6de6b
[]
no_license
xxsheng/JavaTest
63da06d3db5384644ff290d10eed2d1027b613f5
cd3364302734501234c450e4a498eabce0b89efb
refs/heads/master
2021-10-19T06:21:02.472764
2019-02-18T15:17:19
2019-02-18T15:17:19
160,063,042
2
0
null
null
null
null
UTF-8
Java
false
false
1,632
java
package lottery.domains.content.api.ag; /** * Created by Nick on 2017/1/24. */ public class AGValidation { public String action; public String id; public String pcode; public String gcode; public String userid; public String password; public String token; public String cagent; private String realPassword; public String getAction() { return action; } public void setAction(String action) { this.action = action; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getPcode() { return pcode; } public void setPcode(String pcode) { this.pcode = pcode; } public String getGcode() { return gcode; } public void setGcode(String gcode) { this.gcode = gcode; } public String getUserid() { return userid; } public void setUserid(String userid) { this.userid = userid; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getToken() { return token; } public void setToken(String token) { this.token = token; } public String getCagent() { return cagent; } public void setCagent(String cagent) { this.cagent = cagent; } public String getRealPassword() { return realPassword; } public void setRealPassword(String realPassword) { this.realPassword = realPassword; } }
[ "1558281773@qq.com" ]
1558281773@qq.com
69d609614b050847a7a0834207deabaeefb8ca58
243eaf02e124f89a21c5d5afa707db40feda5144
/src/unk/com/tencent/mm/plugin/sns/ui/bo.java
c88e604b660ffdf1e92c3d5751c29622319e9892
[]
no_license
laohanmsa/WeChatRE
e6671221ac6237c6565bd1aae02f847718e4ac9d
4b249bce4062e1f338f3e4bbee273b2a88814bf3
refs/heads/master
2020-05-03T08:43:38.647468
2013-05-18T14:04:23
2013-05-18T14:04:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
962
java
package unk.com.tencent.mm.plugin.sns.ui; import android.widget.ImageView; import com.tencent.mm.model.am; import com.tencent.mm.sdk.platformtools.n; final class bo implements am { bo(bl parambl) { } public final void ht() { n.ak("MicroMsg.MusicWidget", "player callback error"); bl.f(this.aYR); } public final void i(int paramInt1, int paramInt2) { } public final void onFinish() { n.ak("MicroMsg.MusicWidget", "player callback finish"); bl.f(this.aYR); } public final void onPause() { n.ak("MicroMsg.MusicWidget", "player callback pause"); bl.e(this.aYR).setImageResource(2130838687); } public final void onResume() { n.ak("MicroMsg.MusicWidget", "player callback resume"); bl.e(this.aYR).setImageResource(2130838683); } } /* Location: /home/danghvu/0day/WeChat/WeChat_4.5_dex2jar.jar * Qualified Name: com.tencent.mm.plugin.sns.ui.bo * JD-Core Version: 0.6.2 */
[ "danghvu@gmail.com" ]
danghvu@gmail.com
77ff6653aca9ecbfd9cde445c908f5910f7a777f
27dbd508e0b16ac514ec373e9d22ba34d7efdd5f
/blb-backend/business-service-impl/shop-service-impl/src/main/java/wang/ismy/blb/impl/shop/service/ShopCategoryService.java
d2a6059c6b049f22a6dde1fcc06878e211d7cc41
[ "Apache-2.0" ]
permissive
0xcaffebabe/blb
08e42cd432ae4ddf2b920cac55419a4b85b5a325
0c649dcf024a12eccc3023ab2e4cb592f5867503
refs/heads/master
2023-03-17T11:18:33.888623
2022-07-08T06:26:54
2022-07-08T06:26:54
250,797,572
10
1
Apache-2.0
2023-03-05T23:25:22
2020-03-28T13:07:51
Java
UTF-8
Java
false
false
763
java
package wang.ismy.blb.impl.shop.service; import wang.ismy.blb.api.shop.pojo.dto.ShopCategoryDTO; import wang.ismy.blb.api.shop.pojo.dto.ShopItemDTO; import wang.ismy.blb.common.result.Page; import wang.ismy.blb.common.result.Pageable; import java.util.List; /** * @author MY * @date 2020/4/23 11:10 */ public interface ShopCategoryService { /** * 根据目录层级获取目录 * @param level 等级为0代表获取全部目录 * @return */ List<ShopCategoryDTO> getCategoryByLevel(Integer level); /** * 根据目录获取店铺 * @param categoryId * @param location * @param pageable * @return */ Page<ShopItemDTO> getShopByCategory(Long categoryId, String location, Pageable pageable); }
[ "715711877@qq.com" ]
715711877@qq.com
94f5d9c8178b31ca47519062e38a2626811c07d3
d992a9e5d1c380bf7b66a8949fd3968207cb660b
/11.spring-exception-handling/1.spring-rest-exception-handling/src/main/java/com/spring/rest/StudentErrorResponse.java
7de579cc639504d2498c11224aab952362bb8ec5
[]
no_license
anbarasupr/spring
31eb82f7ffd21c2d20470196c614143f339e45d1
5add0b7267f6634331279f52bd490ee59dbaea35
refs/heads/master
2022-12-24T05:28:27.360483
2022-03-28T18:06:30
2022-03-28T18:06:45
226,613,635
0
0
null
2022-12-15T23:56:47
2019-12-08T04:22:46
Java
UTF-8
Java
false
false
708
java
package com.spring.rest; public class StudentErrorResponse { private int status; private String message; private long timeStamp; public StudentErrorResponse() { } public StudentErrorResponse(int status, String message, long timeStamp) { this.status = status; this.message = message; this.timeStamp = timeStamp; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public long getTimeStamp() { return timeStamp; } public void setTimeStamp(long timeStamp) { this.timeStamp = timeStamp; } }
[ "anbarasu.2013@gmail.com" ]
anbarasu.2013@gmail.com
64999cd9004af2f6e1035acacb2c4d634c73e434
41cef1fd08d371acba6b716d3c9071aae5c60cce
/src/main/java/io/jhipster/application/domain/AbstractAuditingEntity.java
f75d00fa8378e19517a2a4edce7adbc926e16917
[]
no_license
alfaprima/jhipsterSample
9512f9bb96aac5afca1290c70b4af08d74358750
ae7c92164d3c7c3ed6777ac33d3b455a328dbd27
refs/heads/master
2021-04-06T13:21:25.825609
2018-03-15T17:24:24
2018-03-15T17:24:24
125,402,824
0
0
null
null
null
null
UTF-8
Java
false
false
2,219
java
package io.jhipster.application.domain; import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonIgnore; import org.hibernate.envers.Audited; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedBy; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.Instant; import javax.persistence.Column; import javax.persistence.EntityListeners; import javax.persistence.MappedSuperclass; /** * Base abstract class for entities which will hold definitions for created, last modified by and created, * last modified by date. */ @MappedSuperclass @Audited @EntityListeners(AuditingEntityListener.class) public abstract class AbstractAuditingEntity implements Serializable { private static final long serialVersionUID = 1L; @CreatedBy @Column(name = "created_by", nullable = false, length = 50, updatable = false) @JsonIgnore private String createdBy; @CreatedDate @Column(name = "created_date", nullable = false) @JsonIgnore private Instant createdDate = Instant.now(); @LastModifiedBy @Column(name = "last_modified_by", length = 50) @JsonIgnore private String lastModifiedBy; @LastModifiedDate @Column(name = "last_modified_date") @JsonIgnore private Instant lastModifiedDate = Instant.now(); public String getCreatedBy() { return createdBy; } public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } public Instant getCreatedDate() { return createdDate; } public void setCreatedDate(Instant createdDate) { this.createdDate = createdDate; } public String getLastModifiedBy() { return lastModifiedBy; } public void setLastModifiedBy(String lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } public Instant getLastModifiedDate() { return lastModifiedDate; } public void setLastModifiedDate(Instant lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
aa81bfb6b30a4e867654e63c69de295ed7364e9b
029686e3ad16925c080119ce81393f00ed6ab27f
/_problems_002/Minimum Window Substring/Solution.java
12a6a0ab3bd77f5b91214f9b342d01c8b791119c
[]
no_license
jij3x/SolutionJudger
b4bbc90076c224d8664fc13ad606ffc4784bdcfd
5aa5a87f038105c68b761d81d9fd07367e8b6eb5
refs/heads/master
2020-06-06T02:56:58.827356
2015-09-28T00:55:09
2015-09-28T00:55:09
33,705,082
1
0
null
null
null
null
UTF-8
Java
false
false
1,635
java
public class Solution { public String minWindow(String S, String T) { int[] needToFind = new int[256]; int[] hasFound = new int[256]; int m = T.length(), n = S.length(); int numUniques = 0; for (int i = 0; i < m; i++) { char c = T.charAt(i); if (needToFind[c] == 0) numUniques++; needToFind[c]++; } int count = 0; int j; for (j = 0; j < n && count < numUniques; j++) { char c = S.charAt(j); if (needToFind[c] > 0) { hasFound[c]++; if (hasFound[c] == needToFind[c]) count++; } } if (count < numUniques) return ""; int i; for (i = 0; i < n; i++) { char c = S.charAt(i); if (needToFind[c] > 0) { if (hasFound[c] == needToFind[c]) break; hasFound[c]--; } } int minEnd = j; int minStart = i; while (j < n) { char c = S.charAt(j); if (needToFind[c] > 0) { hasFound[c]++; while (i < n) { char d = S.charAt(i); if (needToFind[d] > 0) { if (hasFound[d] == needToFind[d]) break; hasFound[d]--; } i++; } if (j-i+1 < minEnd-minStart+1) { minEnd = j+1; minStart = i; } } j++; } return S.substring(minStart, minEnd); } }
[ "jijex@yahoo.com" ]
jijex@yahoo.com
802161ad052dcdafea8a758ebf4f6ab9a95f39ae
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava2/Foo599Test.java
6c840410ce8b50e0d9649052c933d6f8e9f362e1
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
481
java
package applicationModulepackageJava2; import org.junit.Test; public class Foo599Test { @Test public void testFoo0() { new Foo599().foo0(); } @Test public void testFoo1() { new Foo599().foo1(); } @Test public void testFoo2() { new Foo599().foo2(); } @Test public void testFoo3() { new Foo599().foo3(); } @Test public void testFoo4() { new Foo599().foo4(); } @Test public void testFoo5() { new Foo599().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
7f07221fbdd60785e2fa1444a98d9f414e5a1bca
8d8fb4dfd7be299076651e02d26eba6cd879428c
/newrelic-weaver/src/main/java/com/newrelic/weave/violation/ReferenceViolation.java
4dd4f2ebf65cfe04ea4825245c51e22c1a220fe5
[ "Apache-2.0" ]
permissive
newrelic/newrelic-java-agent
db6dd20f6ba3f43909b004ce4a058f589dd4b017
eb298ecd8d31f93622388aa12d3ba1e68a58f912
refs/heads/main
2023-08-31T05:14:44.428903
2023-08-29T10:37:35
2023-08-30T18:08:38
275,016,355
177
150
Apache-2.0
2023-09-11T14:50:06
2020-06-25T21:13:42
Java
UTF-8
Java
false
false
1,536
java
/* * * * Copyright 2020 New Relic Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * */ package com.newrelic.weave.violation; import com.google.common.base.MoreObjects; /** * Raised at match time when weave code tries to access original code in an illegal way. For example, if the weave code * tries to access a private field. */ public class ReferenceViolation extends WeaveViolation { private final String weaveClass; private final String originalClass; private final String violationMessage; private final WeaveViolationType type; /** * Create a {@link ReferenceViolation} of a {@link WeaveViolationType} for the specified weave class, original class, * and custom message. * @param type violation type * @param weaveClass weave class name * @param originalClass original class name * @param violationMessage message describing the violation */ public ReferenceViolation(WeaveViolationType type, String weaveClass, String originalClass, String violationMessage) { super(type, weaveClass); this.type = type; this.weaveClass = weaveClass; this.originalClass = originalClass; this.violationMessage = violationMessage; } @Override public String toString() { return MoreObjects.toStringHelper(this).omitNullValues().add("type", type).add("weaveClass", weaveClass).add( "originalClass", originalClass).add("violationMessage", violationMessage).toString(); } }
[ "49817386+jeffalder@users.noreply.github.com" ]
49817386+jeffalder@users.noreply.github.com
0ed1b68ddd5ce1847b614014035db26f09765cba
3f169749adceb8a84803c561467e391ef381d7d0
/workspace/studySystem/src/persistence/programHierarchySGroupHIERARCHY.java
67fdd8354122150bfaf257996f1fdece33a35939
[]
no_license
Cryzas/FHDW2
969619012ad05f455d04dce0f3413f53cedd9351
8bc31d4072cc9ed7ddf86154cdf08f0f9a55454b
refs/heads/master
2021-01-23T05:25:00.249669
2017-10-11T06:24:17
2017-10-11T06:24:17
86,296,546
3
0
null
null
null
null
UTF-8
Java
false
false
966
java
package persistence; import model.visitor.*; /* Additional import section end */ public interface programHierarchySGroupHIERARCHY extends AbstractPersistentProxi { public boolean containsprogramHierarchySGroup(final programHierarchySGroupHIERARCHY part) throws PersistenceException; public <T> T strategyprogramHierarchySGroup(final programHierarchySGroupHIERARCHYStrategy<T> strategy) throws PersistenceException; public void accept(programHierarchySGroupHIERARCHYVisitor visitor) throws PersistenceException; public <R> R accept(programHierarchySGroupHIERARCHYReturnVisitor<R> visitor) throws PersistenceException; public <E extends model.UserException> void accept(programHierarchySGroupHIERARCHYExceptionVisitor<E> visitor) throws PersistenceException, E; public <R, E extends model.UserException> R accept(programHierarchySGroupHIERARCHYReturnExceptionVisitor<R, E> visitor) throws PersistenceException, E; }
[ "jensburczyk96@gmail.com" ]
jensburczyk96@gmail.com
c3fef5416bc189bf175b7584d338399d434bd690
35e656065008890f8b969dddb64189da6db82977
/app/src/main/java/com/github/dachhack/sprout/actors/mobs/TenguEscape.java
05d431fcaabe1f131acb228353618d9fad8a2c01
[]
no_license
Smujb/harder-sprouted-pd
52cc9809baabb17d42e7b60650fd1b89647224a7
e3a8b7b94432a211cd2a26c4ea1e5cd9dfe67f13
refs/heads/master
2021-01-07T23:30:44.249813
2020-02-01T13:58:04
2020-02-01T13:58:04
241,845,803
1
1
null
null
null
null
UTF-8
Java
false
false
5,055
java
/* * Pixel Dungeon * Copyright (C) 2012-2014 Oleg Dolya * * 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.github.dachhack.sprout.actors.mobs; import java.util.HashSet; import com.github.dachhack.sprout.Assets; import com.github.dachhack.sprout.Dungeon; import com.github.dachhack.sprout.actors.Actor; import com.github.dachhack.sprout.actors.Char; import com.github.dachhack.sprout.actors.blobs.ToxicGas; import com.github.dachhack.sprout.actors.buffs.Buff; import com.github.dachhack.sprout.actors.buffs.Poison; import com.github.dachhack.sprout.effects.CellEmitter; import com.github.dachhack.sprout.effects.Speck; import com.github.dachhack.sprout.effects.particles.ElmoParticle; import com.github.dachhack.sprout.items.TenguKey; import com.github.dachhack.sprout.items.scrolls.ScrollOfPsionicBlast; import com.github.dachhack.sprout.items.weapon.enchantments.Death; import com.github.dachhack.sprout.levels.Level; import com.github.dachhack.sprout.mechanics.Ballistica; import com.github.dachhack.sprout.scenes.GameScene; import com.github.dachhack.sprout.sprites.TenguSprite; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Random; public class TenguEscape extends Mob { private static final int JUMP_DELAY = 5; private static final int JUMPS_TO_ESCAPE = 5; protected static final float SPAWN_DELAY = 2f; { name = "Tengu"; spriteClass = TenguSprite.class; baseSpeed = 1f; HP = HT = 100; EXP = 0; defenseSkill = 30; } private int timeToJump = JUMP_DELAY; private int escapeCount = JUMPS_TO_ESCAPE; private int jumps=0; @Override public int damageRoll() { return Random.NormalIntRange(15, 18); } @Override public int attackSkill(Char target) { return 20; } @Override public int dr() { return 15; } @Override public void die(Object cause) { //super.die(cause); if (jumps>=JUMPS_TO_ESCAPE){ yell("Escape!"); } else { yell("Ugh...Too late " + Dungeon.hero.givenName() + ". Escape!"); if(!Dungeon.limitedDrops.tengukey.dropped()) { Dungeon.limitedDrops.tengukey.drop(); Dungeon.level.drop(new TenguKey(), pos).sprite.drop(); } } destroy(); sprite.killAndErase(); CellEmitter.get(pos).burst(ElmoParticle.FACTORY, 6); } @Override protected boolean getCloser(int target) { if (Level.fieldOfView[target] && jumps<JUMPS_TO_ESCAPE) { jump(); return true; } else { return super.getCloser(target); } } @Override protected boolean canAttack(Char enemy) { return Ballistica.cast(pos, enemy.pos, false, true) == enemy.pos; } @Override protected boolean doAttack(Char enemy) { timeToJump--; if (timeToJump <= 0 && jumps<JUMPS_TO_ESCAPE) { jump(); return true; } else { return super.doAttack(enemy); } } private void jump() { timeToJump = JUMP_DELAY; escapeCount = JUMPS_TO_ESCAPE; //GLog.i("%s! ",(JUMPS_TO_ESCAPE-jumps)); int newPos; do { newPos = Random.Int(Level.getLength()); } while (!Level.passable[newPos] || Level.adjacent(newPos, Dungeon.hero.pos) || Actor.findChar(newPos) != null); sprite.move(pos, newPos); move(newPos); if (Dungeon.visible[newPos]) { CellEmitter.get(newPos).burst(Speck.factory(Speck.WOOL), 6); Sample.INSTANCE.play(Assets.SND_PUFF); } spend(1 / speed()); jumps++; if (jumps>=JUMPS_TO_ESCAPE){ HP=1; Buff.affect(this,Poison.class).set(Poison.durationFactor(this) * 2); } } public static TenguEscape spawnAt(int pos) { if (Level.passable[pos] && Actor.findChar(pos) == null) { TenguEscape w = new TenguEscape(); w.pos = pos; w.state = w.HUNTING; GameScene.add(w, SPAWN_DELAY); //w.sprite.alpha(0); //w.sprite.parent.add(new AlphaTweener(w.sprite, 1, 0.5f)); return w; } else { return null; } } @Override public void notice() { super.notice(); yell("Finally free!"); } @Override public String description() { return "Tengu are members of the ancient assassins clan, which is also called Tengu. " + "These assassins are noted for extensive use of shuriken and traps."; } private static final HashSet<Class<?>> RESISTANCES = new HashSet<Class<?>>(); static { RESISTANCES.add(ToxicGas.class); RESISTANCES.add(Poison.class); RESISTANCES.add(Death.class); RESISTANCES.add(ScrollOfPsionicBlast.class); } @Override public HashSet<Class<?>> resistances() { return RESISTANCES; } }
[ "smujamesb@gmail.com" ]
smujamesb@gmail.com
4845c3b44c08de1bec3e76a24bbd05fa82c15429
93b5ab4dc571675e23c113ee6c116502e3f9ef72
/schema/src/main/java/com/webex/schemas/_2002/_06/service/user/DelSessionTemplatesResponse.java
eb767eccdaac68d11a6bf5ab4e1567d50d2efcb9
[]
no_license
kumarph/webex-java-sdk
813d59ee9d7c0e1627ba8e24990d9b5e54bcd6d4
6894314132bfa419af6798b38acb965ee5f2f2e3
refs/heads/master
2021-01-10T07:57:37.982118
2011-04-22T10:01:24
2011-04-22T10:01:24
44,167,936
0
0
null
null
null
null
UTF-8
Java
false
false
1,650
java
/* * Copyright 2010-2011 Nabeel Mukhtar * * 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.webex.schemas._2002._06.service.user; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import com.webex.schemas._2002._06.service.BodyContentType; /** * <p>Java class for delSessionTemplatesResponse complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="delSessionTemplatesResponse"> * &lt;complexContent> * &lt;extension base="{http://www.webex.com/schemas/2002/06/service}bodyContentType"> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "delSessionTemplatesResponse") public class DelSessionTemplatesResponse extends BodyContentType implements Serializable { private final static long serialVersionUID = 2461660169443089969L; }
[ "nabeelmukhtar@yahoo.com" ]
nabeelmukhtar@yahoo.com
00f82b416b33992a4ea9ecfba8c398057fb59234
2da705ba188bb9e4a0888826818f1b25d04e90c8
/support/cas-server-support-actions/src/main/java/org/apereo/cas/web/flow/login/RedirectUnauthorizedServiceUrlAction.java
a12a7efcba0a81be7505e2a01c76858acae2e917
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
williamadmin/cas
9441fd730de81a5abaf173e2e831a19c9e417579
a4c49ab5137745146afa0f6d41791c2881a344a6
refs/heads/master
2021-05-25T19:05:01.862668
2020-04-07T05:15:53
2020-04-07T05:15:53
253,788,442
1
0
Apache-2.0
2020-04-07T12:37:38
2020-04-07T12:37:37
null
UTF-8
Java
false
false
2,422
java
package org.apereo.cas.web.flow.login; import org.apereo.cas.services.ServicesManager; import org.apereo.cas.util.scripting.ScriptingUtils; import org.apereo.cas.web.support.WebUtils; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.val; import org.springframework.context.ApplicationContext; import org.springframework.core.io.ResourceLoader; import org.springframework.webflow.action.AbstractAction; import org.springframework.webflow.execution.Event; import org.springframework.webflow.execution.RequestContext; import java.net.URI; /** * This is {@link RedirectUnauthorizedServiceUrlAction}. * * @author Misagh Moayyed * @since 5.3.0 */ @Slf4j @RequiredArgsConstructor @Getter public class RedirectUnauthorizedServiceUrlAction extends AbstractAction { private final ServicesManager servicesManager; private final ResourceLoader resourceLoader; private final ApplicationContext applicationContext; @Override public Event doExecute(final RequestContext context) { var redirectUrl = determineUnauthorizedServiceRedirectUrl(context); val url = redirectUrl.toString(); if (ScriptingUtils.isExternalGroovyScript(url)) { val scriptResource = this.resourceLoader.getResource(url); val registeredService = WebUtils.getRegisteredService(context); val args = new Object[]{registeredService, context, this.applicationContext, LOGGER}; redirectUrl = ScriptingUtils.executeGroovyScript(scriptResource, args, URI.class, true); } LOGGER.debug("Redirecting to unauthorized redirect URL [{}]", redirectUrl); WebUtils.putUnauthorizedRedirectUrlIntoFlowScope(context, redirectUrl); return null; } /** * Determine unauthorized service redirect url. * * @param context the context * @return the uri */ protected URI determineUnauthorizedServiceRedirectUrl(final RequestContext context) { val redirectUrl = WebUtils.getUnauthorizedRedirectUrlFromFlowScope(context); val currentEvent = context.getCurrentEvent(); val eventAttributes = currentEvent.getAttributes(); LOGGER.debug("Finalizing the unauthorized redirect URL [{}] when processing event [{}] with attributes [{}]", redirectUrl, currentEvent.getId(), eventAttributes); return redirectUrl; } }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
adba76df608dfa352b6161128adfce7e751c9dff
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/p213co/znly/models/SystemProto$ContextOrBuilder.java
7ced591cd4b5ef783053f475191ffc902c6029dd
[]
no_license
a2en/Zenly_re
09c635ad886c8285f70a8292ae4f74167a4ad620
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
refs/heads/master
2020-12-13T17:07:11.442473
2020-01-17T04:32:44
2020-01-17T04:32:44
234,470,083
1
0
null
null
null
null
UTF-8
Java
false
false
421
java
package p213co.znly.models; import p213co.znly.core.vendor.com.google.protobuf.MessageLiteOrBuilder; import p213co.znly.core.vendor.com.google.protobuf.Timestamp; /* renamed from: co.znly.models.SystemProto$ContextOrBuilder */ public interface SystemProto$ContextOrBuilder extends MessageLiteOrBuilder { Timestamp getCreated(); Timestamp getDeadline(); boolean hasCreated(); boolean hasDeadline(); }
[ "developer@appzoc.com" ]
developer@appzoc.com
88bde44b58d919957697f2caff86b6ba07a1a172
bc5e6d9483c5b94878310a7c2a3e1dcb8d644202
/data/game/data/scripts/ai/areas/CrumaTower/CrumaTower.java
53be1603c3ca703a7f9c49490680b8ad812fa016
[]
no_license
finfan222/l2hf
17ecedb581c2f3f28d1b51229722082fa94560ae
bd3731afdac4791e19281790f47806fdcf6f11ae
refs/heads/master
2023-03-03T06:50:32.060299
2021-01-05T01:26:56
2021-01-05T01:26:56
326,816,095
0
0
null
2021-01-14T21:53:24
2021-01-04T21:50:23
Java
UTF-8
Java
false
false
1,716
java
/* * This file is part of the L2J Mobius project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package ai.areas.CrumaTower; import org.lineage.gameserver.model.Location; import org.lineage.gameserver.model.actor.Npc; import org.lineage.gameserver.model.actor.instance.PlayerInstance; import ai.AbstractNpcAI; /** * Cruma Tower teleport AI. * @author Plim */ public class CrumaTower extends AbstractNpcAI { // NPC private static final int MOZELLA = 30483; // Locations private static final Location TELEPORT_LOC1 = new Location(17776, 113968, -11671); private static final Location TELEPORT_LOC2 = new Location(17680, 113968, -11671); // Misc private static final int MAX_LEVEL = 55; private CrumaTower() { addFirstTalkId(MOZELLA); addStartNpc(MOZELLA); addTalkId(MOZELLA); } @Override public String onTalk(Npc npc, PlayerInstance talker) { if (talker.getLevel() <= MAX_LEVEL) { talker.teleToLocation(getRandomBoolean() ? TELEPORT_LOC1 : TELEPORT_LOC2); return null; } return "30483-1.html"; } public static void main(String[] args) { new CrumaTower(); } }
[ "finex.dev@gmail.com" ]
finex.dev@gmail.com
97491d5064d4799114f26931af38d43aac57bf44
13838ada0e4fd89e209411039eee45fa67bc4192
/web-validation-core/src/main/java/com/web/validation/core/constants/Constants.java
d8c635364b7ae660a1b3028a73cb04673485f2f0
[ "Apache-2.0" ]
permissive
faxingshuichulai/web-validation-framework
71229766b011074389b5ed285377f15175baa2b1
6f754833fd54afa70f4c372b5dcd66d47406657d
refs/heads/master
2021-05-24T16:45:40.070365
2019-04-07T11:33:04
2019-04-07T11:33:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
225
java
package com.web.validation.core.constants; /** * 常量类 * @author chenhaiyang */ public interface Constants { /** * 基础数据类型的字段不做参数验证 */ String NOT_VALIDATE="java.lang"; }
[ "chenhaiyang@ruubypay.com" ]
chenhaiyang@ruubypay.com
213d671e030fdd8dd5309a07455009df66b51336
a7e82ba9641f2f054b4d3633f741ac7c56d76558
/src/day99/Replit/ReplitClass/ClassObjects4/Main.java
f6adb3d3831ecdb96176efce5eff45afdb79ca0e
[]
no_license
smlblc/JavaCourse
6878ddaeed29f8071cdffcc07954571691792911
2359ca5901bf5e611a6ea30db63850c91bb05a46
refs/heads/master
2022-08-08T10:45:45.430138
2020-05-21T23:33:23
2020-05-21T23:33:23
264,401,392
0
1
null
null
null
null
UTF-8
Java
false
false
1,299
java
package day99.Replit.ReplitClass.ClassObjects4; import java.time.LocalDate; import java.time.Period; import java.time.format.DateTimeFormatter; public class Main { /* 1- Create a method name as checkAge Parameter is: string(dateOfBirth) Return type is int 2- Compare today date to dateOfBirth . Print the age for example: dateOfBirth equal to 02/20/2000 return should be 20 */ public int checkAge(String dateOfBirth){ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy"); LocalDate dob = LocalDate.parse(dateOfBirth,formatter); LocalDate today= LocalDate.now(); return Period.between(today,dob).getYears(); } /* public static int checkAge(String dob) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM dd yyyy"); LocalDate date = LocalDate.now(); LocalDate localDate = LocalDate.parse(dob, formatter); int yearDif = date.getYear() - localDate.getYear(); System.out.println("Date of birth: "+localDate); return yearDif; } public static void main(String[] args) { String tempDate = "02 20 2000"; int age = checkAge(tempDate); System.out.println("Age: "+age); } */ }
[ "samilbalci.us@gmail.com" ]
samilbalci.us@gmail.com
9eb0fe265f6217417223fdc832723f30531a5402
4c1ecc6afcda6496a119b88ce48543ae84c8390c
/resource-adapters/api/src/main/java/org/wildfly/swarm/resource/adapters/ResourceAdapterFraction.java
bd45a76c84b180198a6a2997a31f673f84a25a78
[ "Apache-2.0" ]
permissive
lucasweb78/wildfly-swarm-core
f22b6aee4fce90ce043b0f83eb41441b67a48677
fe81bad01ed2b04227f1ee04caac21ee4cda200c
refs/heads/master
2023-08-20T03:02:58.486097
2016-06-20T19:53:38
2016-06-20T19:53:38
57,923,119
0
0
null
2016-05-02T21:39:03
2016-05-02T21:39:03
null
UTF-8
Java
false
false
1,316
java
/** * Copyright 2015-2016 Red Hat, Inc, and individual contributors. * * 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.wildfly.swarm.resource.adapters; import org.wildfly.swarm.config.ResourceAdapters; import org.wildfly.swarm.config.resource.adapters.ResourceAdapter; import org.wildfly.swarm.spi.api.Fraction; import org.wildfly.swarm.spi.api.annotations.Configuration; /** * @author Ralf Battenfeld */ @Configuration(marshal = true, parserFactoryClassName = "org.wildfly.swarm.resource.adapters.runtime.ResourceAdapterParserFactory") public class ResourceAdapterFraction extends ResourceAdapters<ResourceAdapterFraction> implements Fraction { @Override public ResourceAdapterFraction resourceAdapter(ResourceAdapter value) { return super.resourceAdapter(value); } }
[ "ken@kenfinnigan.me" ]
ken@kenfinnigan.me
3c3600e305411a365b07e4a4a28d53a1ee925756
e8f9fe2285f1598fee5860d2447fd1a1f6557306
/MPC/src/minecraft/net/minecraft/src/ContainerFurnace.java
9354348d3cde8a16b1d57577792b65c31084b348
[]
no_license
pedroreisuft/minecraft
8e71c74ee37ffbf863b0e89c7051ed2b3ce80a7f
64ba09bce02603abea3270e4030be2aac4555822
refs/heads/master
2016-09-06T01:24:36.812128
2012-11-30T19:34:19
2012-11-30T19:34:19
6,943,629
2
0
null
null
null
null
UTF-8
Java
false
false
5,238
java
package net.minecraft.src; public class ContainerFurnace extends Container { private TileEntityFurnace furnace; private int lastCookTime = 0; private int lastBurnTime = 0; private int lastItemBurnTime = 0; public ContainerFurnace(InventoryPlayer par1InventoryPlayer, TileEntityFurnace par2TileEntityFurnace) { this.furnace = par2TileEntityFurnace; this.addSlotToContainer(new Slot(par2TileEntityFurnace, 0, 56, 17)); this.addSlotToContainer(new Slot(par2TileEntityFurnace, 1, 56, 53)); this.addSlotToContainer(new SlotFurnace(par1InventoryPlayer.player, par2TileEntityFurnace, 2, 116, 35)); int var3; for (var3 = 0; var3 < 3; ++var3) { for (int var4 = 0; var4 < 9; ++var4) { this.addSlotToContainer(new Slot(par1InventoryPlayer, var4 + var3 * 9 + 9, 8 + var4 * 18, 84 + var3 * 18)); } } for (var3 = 0; var3 < 9; ++var3) { this.addSlotToContainer(new Slot(par1InventoryPlayer, var3, 8 + var3 * 18, 142)); } } public void addCraftingToCrafters(ICrafting par1ICrafting) { super.addCraftingToCrafters(par1ICrafting); par1ICrafting.sendProgressBarUpdate(this, 0, this.furnace.furnaceCookTime); par1ICrafting.sendProgressBarUpdate(this, 1, this.furnace.furnaceBurnTime); par1ICrafting.sendProgressBarUpdate(this, 2, this.furnace.currentItemBurnTime); } /** * Updates crafting matrix; called from onCraftMatrixChanged. Args: none */ public void updateCraftingResults() { super.updateCraftingResults(); for (int var1 = 0; var1 < this.crafters.size(); ++var1) { ICrafting var2 = (ICrafting)this.crafters.get(var1); if (this.lastCookTime != this.furnace.furnaceCookTime) { var2.sendProgressBarUpdate(this, 0, this.furnace.furnaceCookTime); } if (this.lastBurnTime != this.furnace.furnaceBurnTime) { var2.sendProgressBarUpdate(this, 1, this.furnace.furnaceBurnTime); } if (this.lastItemBurnTime != this.furnace.currentItemBurnTime) { var2.sendProgressBarUpdate(this, 2, this.furnace.currentItemBurnTime); } } this.lastCookTime = this.furnace.furnaceCookTime; this.lastBurnTime = this.furnace.furnaceBurnTime; this.lastItemBurnTime = this.furnace.currentItemBurnTime; } public void updateProgressBar(int par1, int par2) { if (par1 == 0) { this.furnace.furnaceCookTime = par2; } if (par1 == 1) { this.furnace.furnaceBurnTime = par2; } if (par1 == 2) { this.furnace.currentItemBurnTime = par2; } } public boolean canInteractWith(EntityPlayer par1EntityPlayer) { return this.furnace.isUseableByPlayer(par1EntityPlayer); } /** * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. */ public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { ItemStack var3 = null; Slot var4 = (Slot)this.inventorySlots.get(par2); if (var4 != null && var4.getHasStack()) { ItemStack var5 = var4.getStack(); var3 = var5.copy(); if (par2 == 2) { if (!this.mergeItemStack(var5, 3, 39, true)) { return null; } var4.onSlotChange(var5, var3); } else if (par2 != 1 && par2 != 0) { if (FurnaceRecipes.smelting().getSmeltingResult(var5.getItem().shiftedIndex) != null) { if (!this.mergeItemStack(var5, 0, 1, false)) { return null; } } else if (TileEntityFurnace.isItemFuel(var5)) { if (!this.mergeItemStack(var5, 1, 2, false)) { return null; } } else if (par2 >= 3 && par2 < 30) { if (!this.mergeItemStack(var5, 30, 39, false)) { return null; } } else if (par2 >= 30 && par2 < 39 && !this.mergeItemStack(var5, 3, 30, false)) { return null; } } else if (!this.mergeItemStack(var5, 3, 39, false)) { return null; } if (var5.stackSize == 0) { var4.putStack((ItemStack)null); } else { var4.onSlotChanged(); } if (var5.stackSize == var3.stackSize) { return null; } var4.onPickupFromSlot(par1EntityPlayer, var5); } return var3; } }
[ "phsmreis@gmail.com" ]
phsmreis@gmail.com
1ea695cce6a040fce469d38ed0cc2adb750e0ce7
1541b944b2df6dbfe39df91b4e1a2249d4f29fa2
/plugins/gradle/tooling-extension-v1.12/src/org/jetbrains/plugins/gradle/tooling/v1_12/builder/ModelDependenciesBuilderImpl.java
07c659553a7689c4b5832ad45a5858a0514277ae
[ "Apache-2.0" ]
permissive
suman-ganta/intellij-community
f22d7e6a51874697e3cbdc5ee1e0e5e9ce429792
f06f5a629e60660821eaaa72a86ec3e85faa2e24
refs/heads/master
2021-01-18T03:04:41.292125
2014-06-06T05:37:18
2014-06-06T05:37:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,124
java
/* * Copyright 2000-2014 JetBrains s.r.o. * * 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.jetbrains.plugins.gradle.tooling.v1_12.builder; import org.gradle.api.Project; import org.gradle.api.artifacts.Configuration; import org.gradle.plugins.ide.idea.IdeaPlugin; import org.gradle.plugins.ide.idea.model.IdeaModel; import org.gradle.plugins.ide.internal.IdeDependenciesExtractor; import org.gradle.plugins.ide.internal.resolver.model.IdeExtendedRepoFileDependency; import org.gradle.plugins.ide.internal.resolver.model.IdeLocalFileDependency; import org.gradle.plugins.ide.internal.resolver.model.IdeProjectDependency; import org.gradle.tooling.model.idea.IdeaDependency; import org.jetbrains.annotations.Nullable; import org.jetbrains.plugins.gradle.model.GradleDependencyScope; import org.jetbrains.plugins.gradle.model.ProjectDependenciesModel; import org.jetbrains.plugins.gradle.tooling.ModelBuilderService; import org.jetbrains.plugins.gradle.tooling.annotation.TargetVersions; import org.jetbrains.plugins.gradle.tooling.internal.*; import org.jetbrains.plugins.gradle.tooling.v1_12.internal.InternalDependencyVersionId; import java.util.*; import static org.jetbrains.plugins.gradle.tooling.v1_12.internal.ModelDependenciesBuilderImplHelper.*; /** * @author Vladislav.Soroka * @since 11/5/13 */ @TargetVersions("1.12+") public class ModelDependenciesBuilderImpl implements ModelBuilderService { @Override public boolean canBuild(String modelName) { return ProjectDependenciesModel.class.getName().equals(modelName); } @Nullable @Override public Object buildAll(final String modelName, final Project project) { final List<IdeaDependency> dependencies = new ArrayList<IdeaDependency>(); final Map<InternalDependencyVersionId, Scopes> scopesMap = new LinkedHashMap<InternalDependencyVersionId, Scopes>(); final IdeDependenciesExtractor dependenciesExtractor = new IdeDependenciesExtractor(); boolean offline = false; boolean downloadJavadoc = false; boolean downloadSources = true; final IdeaPlugin ideaPlugin = project.getPlugins().getPlugin(IdeaPlugin.class); Map<String, Map<String, Collection<Configuration>>> userScopes = Collections.emptyMap(); if (ideaPlugin != null) { IdeaModel ideaModel = ideaPlugin.getModel(); if (ideaModel != null && ideaModel.getModule() != null) { offline = ideaModel.getModule().isOffline(); downloadJavadoc = ideaModel.getModule().isDownloadJavadoc(); downloadSources = ideaModel.getModule().isDownloadSources(); userScopes = ideaModel.getModule().getScopes(); } } for (final Configuration configuration : project.getConfigurations()) { Collection<Configuration> plusConfigurations = new ArrayList<Configuration>(); plusConfigurations.add(configuration); final Collection<IdeProjectDependency> ideProjectDependencies = dependenciesExtractor.extractProjectDependencies(project, plusConfigurations, new ArrayList<Configuration>()); for (IdeProjectDependency ideProjectDependency : ideProjectDependencies) { merge(scopesMap, ideProjectDependency, userScopes); } if (!offline) { final Collection<IdeExtendedRepoFileDependency> ideRepoFileDependencies = dependenciesExtractor.extractRepoFileDependencies( project.getDependencies(), plusConfigurations, new ArrayList<Configuration>(), downloadSources, downloadJavadoc); for (IdeExtendedRepoFileDependency repoFileDependency : ideRepoFileDependencies) { merge(scopesMap, repoFileDependency, userScopes); } } final Collection<IdeLocalFileDependency> ideLocalFileDependencies = dependenciesExtractor.extractLocalFileDependencies(plusConfigurations, new ArrayList<Configuration>()); for (IdeLocalFileDependency fileDependency : ideLocalFileDependencies) { merge(scopesMap, fileDependency, userScopes); } } for (Map.Entry<InternalDependencyVersionId, Scopes> entry : scopesMap.entrySet()) { InternalDependencyVersionId versionId = entry.getKey(); for (GradleDependencyScope scope : entry.getValue().getScopes()) { if (versionId.getIdeDependency() instanceof IdeExtendedRepoFileDependency) { IdeExtendedRepoFileDependency repoFileDependency = (IdeExtendedRepoFileDependency)versionId.getIdeDependency(); IdeaSingleEntryLibraryDependencyImpl libraryDependency = new IdeaSingleEntryLibraryDependencyImpl( new IdeaDependencyScopeImpl(scope), versionId.getName(), versionId.getGroup(), versionId.getVersion(), versionId.getClassifier() ); libraryDependency.setFile(repoFileDependency.getFile()); libraryDependency.setSource(repoFileDependency.getSourceFile()); libraryDependency.setJavadoc(repoFileDependency.getJavadocFile()); dependencies.add(libraryDependency); } else if (versionId.getIdeDependency() instanceof IdeProjectDependency) { IdeProjectDependency projectDependency = (IdeProjectDependency)versionId.getIdeDependency(); String ideaModuleName = findDeDuplicatedModuleName(projectDependency.getProject()); if (ideaModuleName == null) { ideaModuleName = versionId.getName(); } IdeaModuleDependencyImpl moduleDependency = new IdeaModuleDependencyImpl( new IdeaDependencyScopeImpl(scope), ideaModuleName, versionId.getGroup(), versionId.getVersion(), versionId.getClassifier() ); moduleDependency.setIdeaModule(new StubIdeaModule(ideaModuleName)); dependencies.add(moduleDependency); } else if (versionId.getIdeDependency() instanceof IdeLocalFileDependency) { IdeLocalFileDependency fileDependency = (IdeLocalFileDependency)versionId.getIdeDependency(); IdeaSingleEntryLibraryDependencyImpl libraryDependency = new IdeaSingleEntryLibraryDependencyImpl( new IdeaDependencyScopeImpl(scope), versionId.getName(), versionId.getGroup(), versionId.getVersion(), versionId.getClassifier() ); libraryDependency.setFile(fileDependency.getFile()); attachGradleSdkSources(libraryDependency, fileDependency); dependencies.add(libraryDependency); } } } return new ProjectDependenciesModelImpl(project.getPath(), dependencies); } }
[ "Vladislav.Soroka@jetbrains.com" ]
Vladislav.Soroka@jetbrains.com
57bbe0e24d24e2aa7b8f536dc703013decf6e99c
c8e2cdf868713236118a982903daaa5bf79e21aa
/src/main/java/com/baomidou/dynamic/datasource/aop/DynamicAspectJExpressionPointcut.java
a123142fcbf445345574d86bde0c4507e00f8b2f
[ "Apache-2.0" ]
permissive
liupenglsm/dynamic-datasource-spring-boot-starter
57d846b1c4b851f4cad57ee1b0eace3d7e26b08e
be6e38e474473aa35cacc5b9188e0ec9ff116d75
refs/heads/master
2022-11-14T18:08:42.358895
2020-07-09T10:51:12
2020-07-09T10:51:12
278,335,969
0
0
NOASSERTION
2020-07-09T10:37:49
2020-07-09T10:37:48
null
UTF-8
Java
false
false
1,545
java
/** * Copyright © 2018 organization baomidou * <pre> * 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. * <pre/> */ package com.baomidou.dynamic.datasource.aop; import org.springframework.aop.aspectj.AspectJExpressionPointcut; import java.lang.reflect.Method; import java.util.Map; /** * @author TaoYu * @since 2.5.0 */ public class DynamicAspectJExpressionPointcut extends AspectJExpressionPointcut { private Map<String, String> matchesCache; private String ds; public DynamicAspectJExpressionPointcut(String expression, String ds, Map<String, String> matchesCache) { this.ds = ds; this.matchesCache = matchesCache; setExpression(expression); } @Override public boolean matches(Method method, Class<?> targetClass, boolean beanHasIntroductions) { boolean matches = super.matches(method, targetClass, beanHasIntroductions); if (matches) { matchesCache.put(targetClass.getName() + "." + method.getName(), ds); } return matches; } }
[ "332309254@qq.com" ]
332309254@qq.com
76162792309e0b9e890bd5f87d646d2bd259aad9
13c371fffd8c0ecd5e735755e7337a093ac00e30
/com/planet_ink/coffee_mud/Abilities/Prayers/Prayer_Avatar.java
f9e24863e0ae06e7c22a84ac8fa4e7e966f5f55a
[ "Apache-2.0" ]
permissive
z3ndrag0n/CoffeeMud
e6b0c58953e47eb58544039b0781e4071a016372
50df765daee37765e76a1632a04c03f8a96d8f40
refs/heads/master
2020-09-15T10:27:26.511725
2019-11-18T15:41:42
2019-11-18T15:41:42
223,416,916
1
0
Apache-2.0
2019-11-22T14:09:54
2019-11-22T14:09:53
null
UTF-8
Java
false
false
7,097
java
package com.planet_ink.coffee_mud.Abilities.Prayers; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2003-2019 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Prayer_Avatar extends Prayer { @Override public String ID() { return "Prayer_Avatar"; } private final static String localizedName = CMLib.lang().L("Avatar"); @Override public String name() { return localizedName; } @Override public int classificationCode() { return Ability.ACODE_PRAYER | Ability.DOMAIN_COMMUNING; } @Override public int abstractQuality() { return Ability.QUALITY_BENEFICIAL_SELF; } @Override public long flags() { return Ability.FLAG_UNHOLY; } @Override public String displayText() { if ((invoker() != null) && (invoker().getWorshipCharID().length() > 0)) return "(You are the AVATAR of " + invoker().getWorshipCharID() + ")"; return "(You are the AVATAR of the gods)"; } @Override protected int canAffectCode() { return Ability.CAN_MOBS; } @Override protected int canTargetCode() { return 0; } @Override public void unInvoke() { // undo the affects of this spell if(!(affected instanceof MOB)) return; final MOB mob=(MOB)affected; super.unInvoke(); if(canBeUninvoked()) mob.tell(L("Your unholy alliance has been severed.")); } @Override public void affectCharState(final MOB affectedMOB, final CharState affectedState) { super.affectCharState(affectedMOB,affectedState); affectedState.setHitPoints(affectedState.getHitPoints()+200); } @Override public void affectPhyStats(final Physical affected, final PhyStats affectedStats) { super.affectPhyStats(affected,affectedStats); final int xlvl=2+(int)Math.round(CMath.div(adjustedLevel(invoker(),0),1.5)); affectedStats.setArmor(affectedStats.armor()-(xlvl)); affectedStats.setSpeed(affectedStats.speed()+1.0+CMath.mul(0.10,super.getXLEVELLevel(invoker()))); affectedStats.setAttackAdjustment(affectedStats.attackAdjustment()+(xlvl*2)); if(affected instanceof MOB) { final MOB mob=(MOB)affected; if(mob.getMyDeity()!=null) affectedStats.setName(L("@x1, the Avatar of @x2",mob.name(),mob.getMyDeity().name())); else affectedStats.setName(L("@x1, the Avatar",mob.name())); } } @Override public boolean tick(final Tickable ticking, final int tickID) { if(!(affected instanceof MOB)) return super.tick(ticking,tickID); if(!super.tick(ticking,tickID)) return false; final MOB mob=(MOB)affected; if(mob.location()!=null) { if(mob.isInCombat()) { final MOB newvictim=mob.location().fetchRandomInhabitant(); if(newvictim!=mob) mob.setVictim(newvictim); } else { MOB attack=null; final Room R=mob.location(); for(int m=0;m<R.numInhabitants();m++) { final MOB M=R.fetchInhabitant(m); if((M!=null)&&(M!=mob)&&(mob.mayPhysicallyAttack(M))) { attack = M; break; } } if(attack==null) { int dir=-1; final Vector<Integer> dirs=new Vector<Integer>(); for(int d=Directions.NUM_DIRECTIONS()-1;d>=0;d--) { final Room R2=R.getRoomInDir(d); if((R2!=null) &&(R.getExitInDir(d)!=null) &&(R.getExitInDir(d).isOpen())) dirs.addElement(Integer.valueOf(d)); } while(dirs.size()>0) { final int d=dirs.remove(CMLib.dice().roll(1, dirs.size(), -1)).intValue(); final Room R2=R.getRoomInDir(d); if(R2!=null) { if((dir<0)||(dir==Directions.UP)) dir=d; for(int m=0;m<R2.numInhabitants();m++) { final MOB M=R2.fetchInhabitant(m); if((M!=null)&&(M!=mob)&&(mob.mayPhysicallyAttack(M))) { attack = M; break; } } } } if(dir>=0) { final String godName=mob.getWorshipCharID().length()==0?"Your god":mob.getWorshipCharID(); mob.tell(L("@x1 directs you @x2.",godName,CMLib.directions().getInDirectionName(dir))); CMLib.tracking().walk(mob,dir,false,false); } } if(attack!=null) CMLib.combat().postAttack(mob,attack,mob.fetchWieldedItem()); } } return super.tick(ticking,tickID); } @Override public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel) { MOB target=mob; if((auto)&&(givenTarget!=null)&&(givenTarget instanceof MOB)) target=(MOB)givenTarget; if(target.fetchEffect(ID())!=null) { mob.tell(target,null,null,L("<S-NAME> <S-IS-ARE> already the AVATAR.")); return false; } int levels=mob.charStats().getClassLevel("Avatar"); if(levels<0) levels=mob.phyStats().level(); else if(!mob.charStats().getCurrentClass().ID().equals("Avatar")) { mob.tell(L("You have lost this ability for all time.")); return false; } else levels=adjustedLevel(mob,asLevel); if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final boolean success=proficiencyCheck(mob,0,auto); if(success) { final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto),auto?"":L("^S<S-NAME> @x1.^?",prayWord(mob))); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); target.location().show(target,null,CMMsg.MSG_OK_VISUAL,L("<S-NAME> become(s) the AVATAR!")); beneficialAffect(mob,target,asLevel,levels); } } else return beneficialWordsFizzle(mob,target,L("<S-NAME> @x1, but nothing happens.",prayWord(mob))); // return whether it worked return success; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
237acaf789176217d0a15d9204802e665f255d9e
7706242be78247ef5448882160a321a3acd1eba7
/src/com/web/oa/controller/WorkFlowController.java
d3ab62b6fb0d3785e3aad50f91e977c8510c5e84
[]
no_license
stark-guo/NXOA
6db6458bd39562c803a1b1c21880058520eb4bbd
68e602abcce80aade504d1c1f62020990c2b93f8
refs/heads/master
2023-02-05T23:52:25.635713
2020-12-14T11:53:12
2020-12-14T11:53:12
321,331,643
0
0
null
null
null
null
UTF-8
Java
false
false
6,108
java
package com.web.oa.controller; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.List; import java.util.Map; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.activiti.engine.FormService; import org.activiti.engine.HistoryService; import org.activiti.engine.RepositoryService; import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; import org.activiti.engine.repository.Deployment; import org.activiti.engine.repository.ProcessDefinition; import org.activiti.engine.task.Comment; import org.activiti.engine.task.Task; import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; import com.web.oa.pojo.ActiveUser; import com.web.oa.pojo.BaoxiaoBill; import com.web.oa.pojo.Employee; import com.web.oa.service.BaoxiaoService; import com.web.oa.service.WorkFlowService; import com.web.oa.utils.Constans; @Controller public class WorkFlowController { @Autowired private BaoxiaoService baoxiaoService; @Autowired private WorkFlowService workFlowService; @RequestMapping("/deployProcess") public String saveDeployProcess(MultipartFile fileName,String processName) throws IOException { workFlowService.saveDeployProcess(fileName.getInputStream(), processName); return "add_process"; } @RequestMapping("/processDefinitionList") public ModelAndView processDefinitionList() { ModelAndView mav = new ModelAndView(); //1:查询部署对象信息,对应表(act_re_deployment) List<Deployment> deploymentList = workFlowService.findDeploymentList(); //2:查询流程定义的信息,对应表(act_re_procdef) List<ProcessDefinition> definitionList = workFlowService.findProcessDefinitionList(); //放置到上下文对象中 mav.addObject("depList", deploymentList); mav.addObject("pdList", definitionList); mav.setViewName("workflow_list"); return mav; } @RequestMapping("/saveStartBaoxiao") public String saveStartBaoxiao(BaoxiaoBill baoxiaoBill,HttpSession session) { //设置当前时间 baoxiaoBill.setCreatdate(new Date()); //请假单状态 //流程运行中 默认为1 //流程结束 2 baoxiaoBill.setState(1); ActiveUser activeUser = (ActiveUser) SecurityUtils.getSubject().getPrincipal(); baoxiaoBill.setUserId(activeUser.getId()); baoxiaoService.saveBaoxiaoBills(baoxiaoBill); workFlowService.saveStartProcess(baoxiaoBill.getId(),activeUser.getUsername()); return "redirect:/myTaskList"; } @RequestMapping("/myTaskList") public ModelAndView getTaskList(HttpSession session) { ModelAndView mav = new ModelAndView(); ActiveUser activeUser = (ActiveUser)SecurityUtils.getSubject().getPrincipal(); List<Task> list = workFlowService.findTaskListByName(activeUser.getUsername()); mav.addObject("taskList",list); mav.setViewName("workflow_task"); return mav; } @RequestMapping("/viewTaskForm") public ModelAndView viewTaskForm(String taskId) { ModelAndView mav = new ModelAndView(); BaoxiaoBill baoxiaoBill = workFlowService.findBaoxiaoBillByTaskId(taskId); List<Comment> commentList = workFlowService.findCommentByTaskId(taskId); List<String> outcomeList = workFlowService.findOutComeListByTaskId(taskId); mav.addObject("baoxiaoBill",baoxiaoBill); mav.addObject("commentList",commentList); mav.addObject("outcomeList", outcomeList); mav.addObject("taskId", taskId); mav.setViewName("approve_baoxiao"); return mav; } //查看历史批注信息 @RequestMapping("/viewHisComment") public String viewHisComment(long id,Model model) { //1:使用报销单ID,查询报销单对象 BaoxiaoBill baoxiaoBill = baoxiaoService.findBaoxiaoBillById(id); model.addAttribute("baoxiaoBill", baoxiaoBill); //2:使用请假单ID,查询历史的批注信息 List<Comment> list = workFlowService.findCommentByBaoxiaoBillId(id); model.addAttribute("commentList", list); return "workflow_commentlist"; } @RequestMapping("/leaveBillAction_delete") public String deleteBaoxiaoBill(long id) { baoxiaoService.deleteBaoxiaoBillById(id); return "redirect:/myBaoxiaoBill"; } @RequestMapping("/submitTask") public String submitTask(long id,String taskId,String comment,String outcome,HttpSession session) { ActiveUser activeUser = (ActiveUser) SecurityUtils.getSubject().getPrincipal(); String username = activeUser.getUsername(); workFlowService.saveSubmitTask(id, taskId, comment, outcome, username); return "redirect:/myTaskList"; } @RequestMapping("/delDeployment") public String delDeployment(String deploymentId) { //通过部署对象Id,删除流程定义 workFlowService.deleteProcessDefinitionByDeploymentId(deploymentId); return "redirect:/processDefinitionList"; } //查看流程图 @RequestMapping("/viewImage") public String viewImage(String deploymentId,String imageName,HttpServletResponse response) throws Exception { InputStream inputStream = workFlowService.findImageInputStream(deploymentId, imageName); OutputStream outputStream = response.getOutputStream(); for (int i =-1; (i=inputStream.read())!=-1;) { outputStream.write(i); } outputStream.close(); inputStream.close(); return null; } //查看当前流程图 @RequestMapping("/viewCurrentImage") public String viewCurrentImage(String taskId,Model model) { ProcessDefinition processDefinition = workFlowService.findProcessDefinitionByTaskId(taskId); model.addAttribute("deploymentId", processDefinition.getDeploymentId()); model.addAttribute("imageName", processDefinition.getDiagramResourceName()); Map<String, Object> map = workFlowService.findCoordingByTask(taskId); model.addAttribute("acs", map); return "viewimage"; } }
[ "admin@qq.com" ]
admin@qq.com
c8516851eeafce9c5b95470d80c5b917a3a52b91
27565c926be2e139fa981e7327fcaedd9e79010a
/bai/sample-camel-blueprint/src/main/java/org/fusesource/bai/simple/blueprint/HelloBean.java
c776cc7ee1f8964cae9dc34f5ac626a36a61e58b
[ "Apache-2.0" ]
permissive
kpelykh/fuse
946aad7ce77a335eec7106cbc14c37ab63785b33
5546b07a8fe08d12714fe57962ca1f50bca3cd22
refs/heads/master
2021-01-17T22:45:30.584994
2013-10-07T19:15:14
2013-10-07T19:15:14
13,338,519
1
1
null
null
null
null
UTF-8
Java
false
false
523
java
package org.fusesource.bai.simple.blueprint; import java.text.SimpleDateFormat; import java.util.Date; /** * A bean which we use in the route */ public class HelloBean implements Hello { private String say = "Hello World"; public String hello() { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return say + " at " + sdf.format(new Date()); } public String getSay() { return say; } public void setSay(String say) { this.say = say; } }
[ "james.strachan@gmail.com" ]
james.strachan@gmail.com
ae38f76482648edfd40c227c4f6cef794bf84fe0
fd95cd794ec050e7fd7e5bd7b22aba709ecbca65
/youlexuan-service-interface/src/main/java/com/youlexuan/sellergoods/service/SellerService.java
758db1da80c6568eab145c3f9ad4f54366f3e77d
[]
no_license
RosheenH/youlexuan-parent
ed6a657dc73e25fa518352faeb88c87ee7b27e82
319fe86383980a50e673917f4bb82b7e82e51b0c
refs/heads/master
2022-12-21T00:10:17.935974
2019-10-26T00:31:25
2019-10-26T00:31:25
217,526,729
0
0
null
null
null
null
UTF-8
Java
false
false
944
java
package com.youlexuan.sellergoods.service; import java.util.List; import com.youlexuan.pojo.TbSeller; import com.youlexuan.entity.PageResult; /** * 服务层接口 * @author Administrator * */ public interface SellerService { /** * 返回全部列表 * @return */ public List<TbSeller> findAll(); /** * 返回分页列表 * @return */ public PageResult findPage(int pageNum, int pageSize); /** * 增加 */ public void add(TbSeller seller); /** * 修改 */ public void update(TbSeller seller); /** * 根据ID获取实体 * @return */ public TbSeller findOne(String sellerId); /** * 批量删除 */ public void delete(String[] sellerIds); /** * 分页 * @param pageNum 当前页 码 * @param pageSize 每页记录数 * @return */ public PageResult findPage(TbSeller seller, int pageNum, int pageSize); public void updateStatus(String sellerId,String status); }
[ "root@qq.com" ]
root@qq.com
1496a614fbde0cb9b075b57234ff436a11b7a6ae
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/validation/org/sonar/server/platform/db/migration/version/v65/CleanOrphanRowsInUserRolesTest.java
92700c695274a59fe77d861f38d90d7b8ec38658
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
4,823
java
/** * SonarQube * Copyright (C) 2009-2019 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package org.sonar.server.platform.db.migration.version.v65; import java.sql.SQLException; import java.util.Random; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.db.CoreDbTester; public class CleanOrphanRowsInUserRolesTest { private static final String TABLE_USER_ROLES = "user_roles"; private static final String PROJECT_SCOPE = "PRJ"; private static final String QUALIFIER_VW = "VW"; private static final String QUALIFIER_TRK = "TRK"; @Rule public CoreDbTester db = CoreDbTester.createForSchema(CleanOrphanRowsInUserRolesTest.class, "user_roles_and_projects.sql"); @Rule public ExpectedException expectedException = ExpectedException.none(); private CleanOrphanRowsInUserRoles underTest = new CleanOrphanRowsInUserRoles(db.database()); @Test public void execute_has_no_effect_on_empty_table() throws SQLException { underTest.execute(); assertThat(db.countRowsOfTable(CleanOrphanRowsInUserRolesTest.TABLE_USER_ROLES)).isZero(); } @Test public void execute_does_not_delete_rows_without_resource_id() throws SQLException { insertUserRole(null); underTest.execute(); assertThat(db.countRowsOfTable(CleanOrphanRowsInUserRolesTest.TABLE_USER_ROLES)).isEqualTo(1); } @Test public void execute_deletes_rows_of_non_existent_component() throws SQLException { insertUserRole(new Random().nextInt()); underTest.execute(); assertThat(db.countRowsOfTable(CleanOrphanRowsInUserRolesTest.TABLE_USER_ROLES)).isEqualTo(0); } @Test public void execute_deletes_rows_of_component_without_qualifier_PRJ() throws SQLException { String scope = randomAlphanumeric(3); insertUserRole(insertComponent(scope, CleanOrphanRowsInUserRolesTest.QUALIFIER_TRK)); insertUserRole(insertComponent(scope, CleanOrphanRowsInUserRolesTest.QUALIFIER_VW)); insertUserRole(insertComponent(scope, randomAlphanumeric(3))); assertThat(db.countRowsOfTable(CleanOrphanRowsInUserRolesTest.TABLE_USER_ROLES)).isEqualTo(3); underTest.execute(); assertThat(db.countRowsOfTable(CleanOrphanRowsInUserRolesTest.TABLE_USER_ROLES)).isEqualTo(0); } @Test public void execute_keeps_rows_with_qualifier_TRK() throws SQLException { executeKeepsRowsWithSpecifiedQualifierAndScopeProject(CleanOrphanRowsInUserRolesTest.QUALIFIER_TRK); } @Test public void execute_keeps_rows_with_qualifier_VW() throws SQLException { executeKeepsRowsWithSpecifiedQualifierAndScopeProject(CleanOrphanRowsInUserRolesTest.QUALIFIER_VW); } @Test public void execute_deletes_rows_of_component_with_qualifier_DEV() throws SQLException { executeDeletesRowsWithSpecifiedQualifierAndScopeProject("DEV"); } @Test public void execute_deletes_rows_of_component_with_qualifier_DEV_PRJ() throws SQLException { executeDeletesRowsWithSpecifiedQualifierAndScopeProject("DEV_PRJ"); } @Test public void execute_deletes_rows_of_component_with_qualifier_BRC() throws SQLException { executeDeletesRowsWithSpecifiedQualifierAndScopeProject("BRC"); } @Test public void execute_deletes_rows_of_component_with_qualifier_DIR() throws SQLException { executeDeletesRowsWithSpecifiedQualifierAndScopeProject("DIR"); } @Test public void execute_deletes_rows_of_component_with_qualifier_FIL() throws SQLException { executeDeletesRowsWithSpecifiedQualifierAndScopeProject("FIL"); } @Test public void execute_deletes_rows_of_component_with_qualifier_UTS() throws SQLException { executeDeletesRowsWithSpecifiedQualifierAndScopeProject("UTS"); } @Test public void execute_deletes_rows_of_component_with_unknown_qualifier() throws SQLException { executeDeletesRowsWithSpecifiedQualifierAndScopeProject(randomAlphanumeric(3)); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
9ae738761d652f057cd6d311bbba109590671b3d
c017c43a1fb668cedf90dea22ab1b7b77edc8026
/hexie/src/main/java/com/yumu/hexie/web/shequ/vo/PrepayReqVO.java
7cbae0e294cfbecb9b5527db634e1260c1e66693
[]
no_license
linknabor/wangdu
b3ca692a007e353398ad6d31454118d61948d568
c50ba00815ed98d2c19f9ee9313c45aaa622c450
refs/heads/master
2023-02-05T07:42:20.298145
2023-02-02T05:23:21
2023-02-02T05:23:21
157,161,538
0
0
null
null
null
null
UTF-8
Java
false
false
5,992
java
package com.yumu.hexie.web.shequ.vo; import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonProperty; public class PrepayReqVO implements Serializable { /** * */ private static final long serialVersionUID = -5694097755040469652L; //专业版参数 private String billId; private String stmtId; //公用参数 private String couponUnit; private String couponNum; private String couponId; private String reduceAmt; @JsonProperty("invoice_title_type") private String invoiceTitleType; @JsonProperty("credit_code") private String creditCode; @JsonProperty("invoice_title") private String invoiceTitle; //地区参数 @JsonProperty("regionname") private String regionName; private String payType; //支付类型,0微信支付,1银行卡支付 //银行卡支付参数 private String customerName; //持卡人姓名 private String certType; //证件类型 private String certId; //证件号 private String acctNo; //银行卡号 private String phoneNo; //银行预留手机 private String quickToken; //快捷支付token private String veriCode; //手机验证码 private String remember; //是否记住持卡人信息,0否1是 private String cardId; //选卡支付标记,选中的记录卡号 private String orderNo; //绑卡支付需要 private String ruleType; //减免规则类型 private String reductionAmt; //减免金额 private String payFeeType; //01:管理费 02:停车费 private String isQrcode; //是否二维码支付 private String openid; private String appid; //alibaba appid public String getBillId() { return billId; } public void setBillId(String billId) { this.billId = billId; } public String getStmtId() { return stmtId; } public void setStmtId(String stmtId) { this.stmtId = stmtId; } public String getCouponUnit() { return couponUnit; } public void setCouponUnit(String couponUnit) { this.couponUnit = couponUnit; } public String getCouponNum() { return couponNum; } public void setCouponNum(String couponNum) { this.couponNum = couponNum; } public String getCouponId() { return couponId; } public void setCouponId(String couponId) { this.couponId = couponId; } public String getReduceAmt() { return reduceAmt; } public void setReduceAmt(String reduceAmt) { this.reduceAmt = reduceAmt; } public String getInvoiceTitleType() { return invoiceTitleType; } public void setInvoiceTitleType(String invoiceTitleType) { this.invoiceTitleType = invoiceTitleType; } public String getCreditCode() { return creditCode; } public void setCreditCode(String creditCode) { this.creditCode = creditCode; } public String getInvoiceTitle() { return invoiceTitle; } public void setInvoiceTitle(String invoiceTitle) { this.invoiceTitle = invoiceTitle; } public String getRegionName() { return regionName; } public void setRegionName(String regionName) { this.regionName = regionName; } public String getCertType() { return certType; } public void setCertType(String certType) { this.certType = certType; } public String getCertId() { return certId; } public void setCertId(String certId) { this.certId = certId; } public String getAcctNo() { return acctNo; } public void setAcctNo(String acctNo) { this.acctNo = acctNo; } public String getPhoneNo() { return phoneNo; } public void setPhoneNo(String phoneNo) { this.phoneNo = phoneNo; } public String getCustomerName() { return customerName; } public void setCustomerName(String customerName) { this.customerName = customerName; } public String getQuickToken() { return quickToken; } public void setQuickToken(String quickToken) { this.quickToken = quickToken; } public String getVeriCode() { return veriCode; } public void setVeriCode(String veriCode) { this.veriCode = veriCode; } public String getRemember() { return remember; } public void setRemember(String remember) { this.remember = remember; } public String getCardId() { return cardId; } public void setCardId(String cardId) { this.cardId = cardId; } public String getPayType() { return payType; } public void setPayType(String payType) { this.payType = payType; } public String getOrderNo() { return orderNo; } public void setOrderNo(String orderNo) { this.orderNo = orderNo; } public String getRuleType() { return ruleType; } public void setRuleType(String ruleType) { this.ruleType = ruleType; } public String getReductionAmt() { return reductionAmt; } public void setReductionAmt(String reductionAmt) { this.reductionAmt = reductionAmt; } public String getPayFeeType() { return payFeeType; } public void setPayFeeType(String payFeeType) { this.payFeeType = payFeeType; } public String getIsQrcode() { return isQrcode; } public void setIsQrcode(String isQrcode) { this.isQrcode = isQrcode; } public String getAppid() { return appid; } public void setAppid(String appid) { this.appid = appid; } public String getOpenid() { return openid; } public void setOpenid(String openid) { this.openid = openid; } @Override public String toString() { return "PrepayReqVO [billId=" + billId + ", stmtId=" + stmtId + ", couponUnit=" + couponUnit + ", couponNum=" + couponNum + ", couponId=" + couponId + ", reduceAmt=" + reduceAmt + ", invoiceTitleType=" + invoiceTitleType + ", creditCode=" + creditCode + ", invoiceTitle=" + invoiceTitle + ", regionName=" + regionName + ", payType=" + payType + ", customerName=" + customerName + ", certType=" + certType + ", certId=" + certId + ", acctNo=" + acctNo + ", phoneNo=" + phoneNo + ", quickToken=" + quickToken + ", veriCode=" + veriCode + ", remember=" + remember + ", cardId=" + cardId + ", orderNo=" + orderNo + ", ruleType=" + ruleType + ", reductionAmt=" + reductionAmt + ", payFeeType=" + payFeeType + ", isQrcode=" + isQrcode + ", openid=" + openid + ", appid=" + appid + "]"; } }
[ "davidhardson@hotmail.com" ]
davidhardson@hotmail.com
84247c8eccd370bd0745ce91c46b8afc4332cbf8
6a5e1c7fd25e38251c19b74ab719f659d767c416
/engine/src/main/java/org/apache/hop/core/auth/UsernamePasswordAuthenticationProvider.java
3985aa7305fd4c64dcda8f127b965c38976b20c4
[ "Apache-2.0" ]
permissive
marciojv/hopOLD
d734576991460ee9275602a505a4d806c166b1a3
461d0608069fd5c66ac3113ca03f94417353a0c4
refs/heads/master
2022-04-13T23:14:29.027246
2020-04-08T17:19:13
2020-04-08T17:19:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,272
java
/*! ****************************************************************************** * * Pentaho Data Integration * * Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com * ******************************************************************************* * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************************/ package org.apache.hop.core.auth; import org.apache.hop.core.auth.core.AuthenticationProvider; public class UsernamePasswordAuthenticationProvider implements AuthenticationProvider { public static class UsernamePasswordAuthenticationProviderType implements AuthenticationProviderType { @Override public String getDisplayName() { return UsernamePasswordAuthenticationProvider.class.getName(); } @Override public Class<? extends AuthenticationProvider> getProviderClass() { return UsernamePasswordAuthenticationProvider.class; } } private String id; private String username; private String password; public UsernamePasswordAuthenticationProvider() { } public UsernamePasswordAuthenticationProvider( String id, String username, String password ) { this.id = id; this.username = username; this.password = password; } public String getUsername() { return username; } public void setUsername( String username ) { this.username = username; } public String getPassword() { return password; } public void setPassword( String password ) { this.password = password; } @Override public String getDisplayName() { return username; } @Override public String getId() { return id; } public void setId( String id ) { this.id = id; } }
[ "mattcasters@gmail.com" ]
mattcasters@gmail.com
e4d3fe9930923036b5f72dff8a27d035a9171d7d
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/kms-20160120/src/main/java/com/aliyun/kms20160120/models/ScheduleKeyDeletionResponseBody.java
a9aa771d3f03644d36e36d9a4215fc44430c29cc
[ "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
799
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.kms20160120.models; import com.aliyun.tea.*; public class ScheduleKeyDeletionResponseBody extends TeaModel { /** * <p>The ID of the request, which is used to locate and troubleshoot issues.</p> */ @NameInMap("RequestId") public String requestId; public static ScheduleKeyDeletionResponseBody build(java.util.Map<String, ?> map) throws Exception { ScheduleKeyDeletionResponseBody self = new ScheduleKeyDeletionResponseBody(); return TeaModel.build(map, self); } public ScheduleKeyDeletionResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
44be18fb827d6f4cf5784b4d9a712cdc002a4809
266f3f6ef409fcae71e1eb5a5b4dcff1556469a9
/src/main/java/com/restaurant/management/repository/ecommerce/ProductOrderedRepository.java
e6c2ee524dfb174bd2d1025ae7b5a270f2bc4101
[]
no_license
t-janicki/order-management-sytem
abc61573470c1f77ca083523f18b1baefafa1d73
d34a6ebe55e126e18c1ebff927a341405202b08a
refs/heads/master
2022-02-22T16:03:01.003768
2019-09-28T19:15:15
2019-09-28T19:15:15
168,579,843
0
0
null
null
null
null
UTF-8
Java
false
false
338
java
package com.restaurant.management.repository.ecommerce; import com.restaurant.management.domain.ecommerce.ProductOrdered; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface ProductOrderedRepository extends JpaRepository<ProductOrdered, Long> { }
[ "tjaygallery@gmail.com" ]
tjaygallery@gmail.com
5209e711a7422e082537355760d80320dd664204
1d6f1faea75e8a1c2d6aa2e208f6e087c54628b7
/spring-webmvc/src/main/java/org/springframework/web/servlet/view/JstlView.java
cb02283f67cfd3099a4418da867b4c9f09a2c89a
[]
no_license
lixw1992/spring4
7acde76816b08582048368fb0e4fc38c23160636
54cbd97957528a7a7af813394bb1adbb802256f8
refs/heads/master
2020-07-02T01:56:42.815034
2019-08-01T03:49:53
2019-08-01T03:49:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,142
java
package org.springframework.web.servlet.view; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import org.springframework.context.MessageSource; import org.springframework.web.servlet.support.JstlUtils; import org.springframework.web.servlet.support.RequestContext; /** * Specialization of {@link InternalResourceView} for JSTL pages, * i.e. JSP pages that use the JSP Standard Tag Library. * * <p>Exposes JSTL-specific request attributes specifying locale * and resource bundle for JSTL's formatting and message tags, * using Spring's locale and {@link org.springframework.context.MessageSource}. * * <p>Typical usage with {@link InternalResourceViewResolver} would look as follows, * from the perspective of the DispatcherServlet context definition: * * <pre class="code"> * &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt; * &lt;property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/&gt; * &lt;property name="prefix" value="/WEB-INF/jsp/"/&gt; * &lt;property name="suffix" value=".jsp"/&gt; * &lt;/bean&gt; * * &lt;bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"&gt; * &lt;property name="basename" value="messages"/&gt; * &lt;/bean&gt;</pre> * * Every view name returned from a handler will be translated to a JSP * resource (for example: "myView" -> "/WEB-INF/jsp/myView.jsp"), using * this view class to enable explicit JSTL support. * * <p>The specified MessageSource loads messages from "messages.properties" etc * files in the class path. This will automatically be exposed to views as * JSTL localization context, which the JSTL fmt tags (message etc) will use. * Consider using Spring's ReloadableResourceBundleMessageSource instead of * the standard ResourceBundleMessageSource for more sophistication. * Of course, any other Spring components can share the same MessageSource. * * <p>This is a separate class mainly to avoid JSTL dependencies in * {@link InternalResourceView} itself. JSTL has not been part of standard * J2EE up until J2EE 1.4, so we can't assume the JSTL API jar to be * available on the class path. * * <p>Hint: Set the {@link #setExposeContextBeansAsAttributes} flag to "true" * in order to make all Spring beans in the application context accessible * within JSTL expressions (e.g. in a {@code c:out} value expression). * This will also make all such beans accessible in plain {@code ${...}} * expressions in a JSP 2.0 page. */ public class JstlView extends InternalResourceView { private MessageSource messageSource; /** * Constructor for use as a bean. */ public JstlView() { } /** * Create a new JstlView with the given URL. * @param url the URL to forward to */ public JstlView(String url) { super(url); } /** * Create a new JstlView with the given URL. * @param url the URL to forward to * @param messageSource the MessageSource to expose to JSTL tags * (will be wrapped with a JSTL-aware MessageSource that is aware of JSTL's * {@code javax.servlet.jsp.jstl.fmt.localizationContext} context-param) */ public JstlView(String url, MessageSource messageSource) { this(url); this.messageSource = messageSource; } /** * Wraps the MessageSource with a JSTL-aware MessageSource that is aware * of JSTL's {@code javax.servlet.jsp.jstl.fmt.localizationContext} * context-param. */ @Override protected void initServletContext(ServletContext servletContext) { if (this.messageSource != null) { this.messageSource = JstlUtils.getJstlAwareMessageSource(servletContext, this.messageSource); } super.initServletContext(servletContext); } /** * Exposes a JSTL LocalizationContext for Spring's locale and MessageSource. */ @Override protected void exposeHelpers(HttpServletRequest request) throws Exception { if (this.messageSource != null) { JstlUtils.exposeLocalizationContext(request, this.messageSource); } else { JstlUtils.exposeLocalizationContext(new RequestContext(request, getServletContext())); } } }
[ "yuexiaoguang@vortexinfo.cn" ]
yuexiaoguang@vortexinfo.cn
ae2362899649886eaa7af68881951e85a2abda09
c85aea4286ac05fd083317706c72ebd721a8d8dd
/src/main/java/com/dous/cashload/service/mapper/AtmInformationMapper.java
1000959a3b49e2bb2a64a9ec86d9068db375d93e
[]
no_license
BulkSecurityGeneratorProject/atmCashLoad
b25a00b33f2941a6086b55000511a2eea2be71cf
1d51283c7165bd10d6546da9391132d61c0804a0
refs/heads/master
2022-12-14T18:43:32.761347
2018-05-02T15:02:07
2018-05-02T15:02:07
296,646,704
0
0
null
null
null
null
UTF-8
Java
false
false
1,065
java
package com.dous.cashload.service.mapper; import com.dous.cashload.domain.*; import com.dous.cashload.service.dto.AtmInformationDTO; import org.mapstruct.*; /** * Mapper for the entity AtmInformation and its DTO AtmInformationDTO. */ @Mapper(componentModel = "spring", uses = {LocationMapper.class, BranchMapper.class}) public interface AtmInformationMapper extends EntityMapper<AtmInformationDTO, AtmInformation> { @Mapping(source = "location.id", target = "locationId") @Mapping(source = "branch.id", target = "branchId") AtmInformationDTO toDto(AtmInformation atmInformation); @Mapping(target = "offices", ignore = true) @Mapping(source = "locationId", target = "location") @Mapping(source = "branchId", target = "branch") AtmInformation toEntity(AtmInformationDTO atmInformationDTO); default AtmInformation fromId(Long id) { if (id == null) { return null; } AtmInformation atmInformation = new AtmInformation(); atmInformation.setId(id); return atmInformation; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
5c9961ac73cd215b935e84ea169fead5f503a203
9de6a98cdaed1a6577165999c0696e96baeaecc6
/legend-pure-m3-core/src/main/java/org/finos/legend/pure/m3/navigation/_package/_Package.java
c88c3caf7e0785a91b5199e82e23b2e603332539
[ "Apache-2.0", "CC0-1.0" ]
permissive
stephanof/legend-pure
7cc4469ad2d926c15df8cb9f2150923907fb6887
c75435f0a24a0fbc673297b1734a9921a0c7a40e
refs/heads/master
2023-08-20T00:30:32.120001
2021-10-14T20:30:49
2021-10-14T20:30:49
314,235,221
0
0
Apache-2.0
2021-06-28T09:47:53
2020-11-19T12:02:19
Java
UTF-8
Java
false
false
7,038
java
// Copyright 2020 Goldman Sachs // // 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.finos.legend.pure.m3.navigation._package; import org.eclipse.collections.api.list.ListIterable; import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.api.set.ImmutableSet; import org.eclipse.collections.impl.factory.Lists; import org.eclipse.collections.impl.factory.Sets; import org.eclipse.collections.impl.list.mutable.FastList; import org.finos.legend.pure.m3.navigation.M3Paths; import org.finos.legend.pure.m3.navigation.M3Properties; import org.finos.legend.pure.m3.navigation.M3PropertyPaths; import org.finos.legend.pure.m3.navigation.PackageableElement.PackageableElement; import org.finos.legend.pure.m3.navigation.ProcessorSupport; import org.finos.legend.pure.m4.coreinstance.CoreInstance; import org.finos.legend.pure.m4.ModelRepository; import org.finos.legend.pure.m4.coreinstance.indexing.IndexSpecifications; public class _Package { public static final ImmutableSet<String> SPECIAL_TYPES = ModelRepository.PRIMITIVE_TYPE_NAMES.union(Sets.immutable.with(M3Paths.Package, M3Paths.Number)); public static CoreInstance getByUserPath(final String path, final ProcessorSupport processorSupport) { return getByUserPath(PackageableElement.splitUserPath(path), processorSupport); } public static CoreInstance getByUserPath(ListIterable<String> path, ProcessorSupport processorSupport) { if ((path.size() == 1) && SPECIAL_TYPES.contains(path.get(0))) { return processorSupport.repository_getTopLevel(path.get(0)); } CoreInstance element = processorSupport.repository_getTopLevel(M3Paths.Root); if (element == null) { throw new RuntimeException("Cannot find " + M3Paths.Root); } for (String name : path) { element = findInPackage(element, name); if (element == null) { return null; } } return element; } public static CoreInstance getByUserPath(String[] path, ProcessorSupport processorSupport) { int length = path.length; if ((length == 1) && SPECIAL_TYPES.contains(path[0])) { return processorSupport.repository_getTopLevel(path[0]); } CoreInstance element = processorSupport.repository_getTopLevel(M3Paths.Root); for (int i = 0; (element != null) && (i < length); i++) { element = findInPackage(element, path[i]); } return element; } public static CoreInstance findInPackage(CoreInstance pkg, String name) { // TODO eliminate duplicate import group names, then use an id index lookup // return pkg.getValueInValueForMetaPropertyToMany(M3Properties.children, name); ListIterable<? extends CoreInstance> childrenWithName = pkg.getValueInValueForMetaPropertyToManyByIndex(M3Properties.children, IndexSpecifications.getCoreInstanceNameIndexSpec(), name); return childrenWithName.getFirst(); } public static MutableList<String> convertM3PathToM4(String m3UserPath) { return convertM3PathToM4(PackageableElement.splitUserPath(m3UserPath)); } public static MutableList<String> convertM3PathToM4(ListIterable<String> m3Path) { int size = m3Path.size(); // Top level elements are handled differently if ((size == 1) && SPECIAL_TYPES.contains(m3Path.get(0))) { return Lists.mutable.withAll(m3Path); } MutableList<String> m4Path = FastList.newList((size * 2) + 1); m4Path.add(M3Paths.Root); for (String m3Element : m3Path) { m4Path.add(M3Properties.children); m4Path.add(m3Element); } return m4Path; } public static CoreInstance findOrCreatePackageFromUserPath(String path, ModelRepository repository, ProcessorSupport processorSupport) { return findOrCreatePackageFromUserPath(PackageableElement.splitUserPath(path), repository, processorSupport); } public static CoreInstance findOrCreatePackageFromUserPath(ListIterable<String> path, ModelRepository repository, ProcessorSupport processorSupport) { return findOrCreatePackageFromUserPath(path, repository, processorSupport, true); } public static CoreInstance findOrCreateEphemeralPackageFromUserPath(ListIterable<String> path, ModelRepository repository, ProcessorSupport processorSupport) { return findOrCreatePackageFromUserPath(path, repository, processorSupport, false); } private static CoreInstance findOrCreatePackageFromUserPath(ListIterable<String> path, ModelRepository repository, ProcessorSupport processorSupport, boolean persistent) { CoreInstance parent = repository.getTopLevel(M3Paths.Root); if (parent == null) { throw new RuntimeException("Cannot find Root in model repository"); } if (path.size() == 1 && M3Paths.Root.equals(path.get(0))) { return parent; } CoreInstance packageClass = null; for (String name : path) { if("".equals(name)) { throw new RuntimeException("\"\" is an invalid package name."); } synchronized (parent) { CoreInstance child = findInPackage(parent, name); if (child == null) { if (packageClass == null) { packageClass = processorSupport.package_getByUserPath(M3Paths.Package); if (packageClass == null) { throw new RuntimeException("Cannot find class " + M3Paths.Package); } } child = repository.newCoreInstance(name, packageClass, null, persistent); child.addKeyValue(M3PropertyPaths._package, parent); child.setKeyValues(M3PropertyPaths.children, Lists.immutable.<CoreInstance>empty()); child.addKeyValue(M3PropertyPaths.name, persistent ? repository.newStringCoreInstance_cached(name) : repository.newStringCoreInstance(name)); parent.addKeyValue(M3PropertyPaths.children, child); } parent = child; } } return parent; } }
[ "pierre.debelen@gs.com" ]
pierre.debelen@gs.com
af2d046305424fff5f7960660fd938c51671ed68
8144aa0c43754c67e20e03192d2426170569c454
/TaCools/AppTeacher/src/main/java/com/taku/safe/ui/TabPagerFragment.java
5af419b8714cb937fe9706321e71abb247b4d87b
[ "Apache-2.0" ]
permissive
soulcure/projects
566f15746dcf1907ffab8fb4814d7cc9b8c6081b
c28be355f88998f75b0b0ce8d98b92fdb1c23eed
refs/heads/master
2020-05-16T04:08:45.066950
2019-06-15T14:06:56
2019-06-15T14:06:56
182,753,955
0
0
null
null
null
null
UTF-8
Java
false
false
3,135
java
package com.taku.safe.ui; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.taku.safe.R; import com.taku.safe.tabs.BarChartFragment; import com.taku.safe.tabs.SecondFragment; import com.taku.safe.campus.ToRectorFragment; /** * Created by colin on 2017/5/10. */ public class TabPagerFragment extends Fragment { private ViewPager mMainViewPager; private TabLayout mTabLayout; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_base_tabpager, container, false); } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mTabLayout = (TabLayout) view.findViewById(R.id.tab_layout); mMainViewPager = (ViewPager) view.findViewById(R.id.view_pager); //setupToolbar(view); setupViewPager(); } /*private void setupToolbar(View view) { Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar); if (toolbar != null) { ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar); } }*/ private void setupViewPager() { TabFragmentPagerAdapter adapter = new TabFragmentPagerAdapter(getChildFragmentManager()); mMainViewPager.setAdapter(adapter); mMainViewPager.setOffscreenPageLimit(mMainViewPager.getAdapter().getCount()); mTabLayout.setupWithViewPager(mMainViewPager); } private class TabFragmentPagerAdapter extends FragmentStatePagerAdapter { private String[] tabTitle; public TabFragmentPagerAdapter(FragmentManager fm) { super(fm); tabTitle = getResources().getStringArray(R.array.tab_title); } @Override public void setPrimaryItem(ViewGroup container, int position, Object object) { super.setPrimaryItem(container, position, object); } @Override public Fragment getItem(int arg0) { Fragment ft = null; switch (arg0) { case 0: ft = new BarChartFragment(); break; case 1: ft = new SecondFragment(); break; case 2: ft = new ToRectorFragment(); break; default: break; } return ft; } @Override public int getCount() { return tabTitle.length; } @Override public CharSequence getPageTitle(int position) { return tabTitle[position]; } } }
[ "287268221@qq.com" ]
287268221@qq.com
6b87cf2932300d4e704fe5ac016a7e159a0f3411
49323617aea0c69d220bf4220253546d58ecb3ff
/src/main/java/cn/yxffcode/service/UserService.java
09f0ddcff5208ee31219edbafa998f14abb1dd14
[]
no_license
gaohanghbut/scala-java
aca4ba66902814bcf12256dcd408833789dbe529
a59324541062e10f1f7ec9dd45db0d845fdc818c
refs/heads/master
2020-12-25T09:57:47.464472
2016-08-06T01:44:09
2016-08-06T01:44:09
65,059,481
1
0
null
null
null
null
UTF-8
Java
false
false
541
java
package cn.yxffcode.service; import cn.yxffcode.dao.UserDao; import cn.yxffcode.model.User; import org.springframework.stereotype.Service; import scala.Option; import javax.annotation.Resource; /** * @author gaohang on 5/31/16. */ @Service public class UserService { @Resource private UserDao userDao; public void createUser(User user) { userDao.insert(user); } public User getUser(int userId) { Option<User> userOption = userDao.findById(userId); return userOption.isDefined() ? userOption.get() : null; } }
[ "568720503@qq.com" ]
568720503@qq.com
0ca76ef9751e6efa570b881d5fc72914e640b9e2
3e355a798304584431e5e5a1f1bc141e16c330fc
/AL-Game/data/scripts/system/handlers/ai/instance/unstableSplinterpath/UnstableKaluvaAI2.java
33c7afc8349be3da53b61283313dd875dcea29b3
[]
no_license
webdes27/Aion-Lightning-4.6-SRC
db0b2b547addc368b7d5e3af6c95051be1df8d69
8899ce60aae266b849a19c3f93f47be9485c70ab
refs/heads/master
2021-09-14T19:16:29.368197
2018-02-27T16:05:28
2018-02-27T16:05:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,827
java
/** * This file is part of Aion-Lightning <aion-lightning.org>. * * Aion-Lightning 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. * * Aion-Lightning 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 Aion-Lightning. * If not, see <http://www.gnu.org/licenses/>. */ package ai.instance.unstableSplinterpath; import ai.AggressiveNpcAI2; import com.aionemu.commons.network.util.ThreadPoolManager; import com.aionemu.commons.utils.Rnd; import com.aionemu.gameserver.ai2.AI2Actions; import com.aionemu.gameserver.ai2.AIName; import com.aionemu.gameserver.ai2.AIState; import com.aionemu.gameserver.ai2.manager.EmoteManager; import com.aionemu.gameserver.model.EmotionType; import com.aionemu.gameserver.model.actions.NpcActions; import com.aionemu.gameserver.model.gameobjects.Creature; import com.aionemu.gameserver.model.gameobjects.Npc; import com.aionemu.gameserver.network.aion.serverpackets.SM_EMOTION; import com.aionemu.gameserver.skillengine.SkillEngine; import com.aionemu.gameserver.utils.PacketSendUtility; /** * @author Luzien * @edit Cheatkiller */ @AIName("unstablekaluva") public class UnstableKaluvaAI2 extends AggressiveNpcAI2 { private boolean canThink = true; private int egg; @Override protected void handleAttack(Creature creature) { super.handleAttack(creature); if (Rnd.get(0, 100) < 3) { moveToSpawner(); } } private void moveToSpawner() { randomEgg(); Npc spawner = getPosition().getWorldMapInstance().getNpc(egg); if (spawner != null) { SkillEngine.getInstance().getSkill(getOwner(), 19152, 55, getOwner()).useNoAnimationSkill(); canThink = false; EmoteManager.emoteStopAttacking(getOwner()); setStateIfNot(AIState.FOLLOWING); getOwner().setState(1); PacketSendUtility.broadcastPacket(getOwner(), new SM_EMOTION(getOwner(), EmotionType.START_EMOTE2, 0, getObjectId())); AI2Actions.targetCreature(this, getPosition().getWorldMapInstance().getNpc(egg)); getMoveController().moveToTargetObject(); } } @Override protected void handleMoveArrived() { if (canThink == false) { Npc spawner = getPosition().getWorldMapInstance().getNpc(egg); if (spawner != null) { spawner.getEffectController().removeEffect(19222); SkillEngine.getInstance().getSkill(getOwner(), 19223, 55, spawner).useNoAnimationSkill(); getEffectController().removeEffect(19152); } ThreadPoolManager.getInstance().schedule(new Runnable() { @Override public void run() { canThink = true; Creature creature = getAggroList().getMostHated(); if (creature == null || !getOwner().canSee(creature) || NpcActions.isAlreadyDead(creature)) { setStateIfNot(AIState.FIGHT); think(); } else { getOwner().setTarget(creature); getOwner().getGameStats().renewLastAttackTime(); getOwner().getGameStats().renewLastAttackedTime(); getOwner().getGameStats().renewLastChangeTargetTime(); getOwner().getGameStats().renewLastSkillTime(); setStateIfNot(AIState.FIGHT); think(); } } }, 2000); } super.handleMoveArrived(); } private void randomEgg() { switch (Rnd.get(1, 4)) { case 1: egg = 219583; break; case 2: egg = 219582; break; case 3: egg = 219564; break; case 4: egg = 219581; break; } } @Override public boolean canThink() { return canThink; } }
[ "michelgorter@outlook.com" ]
michelgorter@outlook.com
e51555c9e2c5ac78b400414cad1e9bc34ae627cc
a1c7ae4d516ba9014ef754ce0da930747a9db12a
/Leetcode/others/sort/Sort.java
5fff53ac33b637545b3119a33d2679ad92ebd358
[]
no_license
cgb-doc/DataStructure-Algorithm
e6ece121ae671eca0e5b24bea113ec4337627522
95d4fb5c7a3cfb23f731c5d1e0524cf40223dab9
refs/heads/master
2022-03-09T05:00:27.575881
2019-11-04T12:26:30
2019-11-04T12:26:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
160
java
package sort; /** * @author Shuai Junlan[shuaijunlan@gmail.com]. * @since Created in 9:50 AM 3/18/19. */ public interface Sort<T> { void sort(T[] a); }
[ "shuaijunlan@gmail.com" ]
shuaijunlan@gmail.com
9b9fae4b80394dbebde986122bd3eef4a8a0eb78
37992a7083efea148c66381a2e7c988f59de712b
/common/core/src/main/java/ru/ppr/core/dataCarrier/smartCard/wallet/TroykaWalletImpl.java
f863adfe8b011a827958670de91cc93dc0f4c7c7
[]
no_license
RVC3/PTK
5ab897d6abee1f7f7be3ba49c893b97e719085e9
1052b2bfa8f565c96a85d5c5928ed6c938a20543
refs/heads/master
2022-12-22T22:11:40.231298
2020-07-01T09:45:38
2020-07-01T09:45:38
259,278,530
0
0
null
null
null
null
UTF-8
Java
false
false
2,823
java
package ru.ppr.core.dataCarrier.smartCard.wallet; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.concurrent.TimeUnit; import ru.ppr.core.dataCarrier.smartCard.passageMark.PassageMarkVersion; import ru.ppr.core.dataCarrier.smartCard.passageMark.base.BasePassageMark; import ru.ppr.utils.DateFormatOperations; /** * Кошелек для тройки. * @author isedoi */ public class TroykaWalletImpl extends BasePassageMark implements MetroWallet { private BigDecimal unitsAmount; private long endDateTime; private boolean validFormatData; private String endDateTimeFormatted; private int daysEnd;//дней с 31.12.2018. private final Calendar calendar = GregorianCalendar.getInstance(); TroykaWalletImpl() { super(PassageMarkVersion.V0, TroykaWalletStructure.SECTOR_SIZE); } void setUnits(double units) { unitsAmount = new BigDecimal(units); correctUnits(); } @Override public boolean isValidUnitsData() { return validFormatData; } /** * Корректируем копейки */ private void correctUnits() { unitsAmount = unitsAmount.divide(new BigDecimal(100), RoundingMode.HALF_UP); } void setFormatData(int codeFormat, int extendNumFormat){ validFormatData = codeFormat == TroykaWalletStructure.CODING_FORMAT_VALUE && extendNumFormat == TroykaWalletStructure.EXTEND_NUM_FORMAT_VALUE; } void setDaysEnd(int daysEnd) { this.daysEnd = daysEnd; convertEndDateTime(); } private void convertEndDateTime() { calendar.set(Calendar.YEAR, 2018); calendar.set(Calendar.MONTH, 11); calendar.set(Calendar.DAY_OF_MONTH, 31); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); endDateTime = calendar.getTimeInMillis() + TimeUnit.DAYS.toMillis(daysEnd); calendar.setTimeInMillis(endDateTime); endDateTimeFormatted = DateFormatOperations.getDateddMMyyyyHHmm(calendar.getTime()); } @Override public BigDecimal getUnitsLeft() { return unitsAmount; } @Override public long getDateTimeEnd() { return endDateTime; } @Override public String getDateTimeEndFormat() { return endDateTimeFormatted; } @Override public String toString() { return "TroykaWalletImpl{" + "unitsAmount=" + unitsAmount + ", endDateTime=" + endDateTime + ", validFormatData=" + validFormatData + ", endDateTimeFormatted='" + endDateTimeFormatted + '\'' + ", daysEnd=" + daysEnd + '}'; } }
[ "kopanevartem@mail.ru" ]
kopanevartem@mail.ru
c2d2bce4132a4a6d7c1651ed3f90608600d041e1
61d80eae65df81e2c7ac2108870a5661d0bbd1cf
/_LECTIONS/9/code/com/orion/lesson9/Visibility.java
a56025313c57ceba83b34644d3f500c797cccbac
[]
no_license
gladorange/orion_java_2021
91bfc8dc9725911cd5b0f8bba16bcba85a412f7f
a82488af1bb8467f658b84ccdff04422fbcc4fda
refs/heads/main
2023-06-02T17:44:46.070336
2021-06-22T09:57:33
2021-06-22T09:57:33
362,103,892
0
9
null
2021-06-22T09:57:35
2021-04-27T12:26:57
Java
UTF-8
Java
false
false
728
java
package com.orion.lesson9; public class Visibility extends Thread { volatile boolean keepRunning = true; volatile long someValue = 12312; public void run() { long count = 0; while (keepRunning) { count++; } System.out.println("Thread terminated." + count); } public static void main(String[] args) throws InterruptedException { Visibility t = new Visibility(); t.start(); Thread.sleep(1000); System.out.println("after sleeping in main"); t.keepRunning = false; // System.out.println("keeprunning=" + t.keepRunning); t.join(); System.out.println("keepRunning set to " + t.keepRunning); } }
[ "atarasov@mera.ru" ]
atarasov@mera.ru
ec324c37b2ca5923828a00496fc3acdb5de64fd8
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/hazelcast/2016/12/DefaultMemoryStats.java
9adb1af9daa50d9d78bfb2b64ff4ce2b70066493
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
2,874
java
/* * Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hazelcast.memory; import static com.hazelcast.memory.MemoryStatsSupport.freePhysicalMemory; import static com.hazelcast.memory.MemoryStatsSupport.totalPhysicalMemory; /** * Default implementation of MemoryStats. */ public class DefaultMemoryStats implements MemoryStats { private final Runtime runtime = Runtime.getRuntime(); private final DefaultGarbageCollectorStats gcStats = new DefaultGarbageCollectorStats(); public final long getTotalPhysical() { return totalPhysicalMemory(); } @Override public final long getFreePhysical() { return freePhysicalMemory(); } @Override public final long getMaxHeap() { return runtime.maxMemory(); } @Override public final long getCommittedHeap() { return runtime.totalMemory(); } @Override public final long getUsedHeap() { return runtime.totalMemory() - runtime.freeMemory(); } @Override public final long getFreeHeap() { return runtime.freeMemory(); } @Override public long getMaxNative() { return 0; } @Override public long getCommittedNative() { return 0; } @Override public long getUsedNative() { return 0; } @Override public long getFreeNative() { return 0; } @Override public long getMaxMetadata() { return 0; } @Override public long getUsedMetadata() { return 0; } @Override public GarbageCollectorStats getGCStats() { GCStatsSupport.fill(gcStats); return gcStats; } @Override public String toString() { return "MemoryStats{" + "Total Physical: " + MemorySize.toPrettyString(getTotalPhysical()) + ", Free Physical: " + MemorySize.toPrettyString(getFreePhysical()) + ", Max Heap: " + MemorySize.toPrettyString(getMaxHeap()) + ", Committed Heap: " + MemorySize.toPrettyString(getCommittedHeap()) + ", Used Heap: " + MemorySize.toPrettyString(getUsedHeap()) + ", Free Heap: " + MemorySize.toPrettyString(getFreeHeap()) + ", " + getGCStats() + '}'; } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
6bcdd459a1c4e2e7f175439c8e99069dfe7b734e
b9b6c15155a17703d7add9b9badcbeb5f9f61aae
/COBieShared/src/org/erdc/cobie/shared/cobietab/transformation/cobielite/SystemTransformer.java
5c8a28b930e975dbdeb0a9d79e2cbbe81793e672
[]
no_license
webdada/COBie-plugins
abf0a091d7a6ac59a7af86cbbd1d75f974049b82
4dc4b75f9026f47887258eeb67117188e3654668
refs/heads/master
2020-12-29T00:29:18.828171
2015-04-23T08:43:18
2015-04-23T08:43:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,988
java
package org.erdc.cobie.shared.cobietab.transformation.cobielite; import org.buildingsmartalliance.docs.nbims03.cobie.cobielite.SystemType; import org.buildingsmartalliance.docs.nbims03.cobie.core.AttributeCollectionType; import org.buildingsmartalliance.docs.nbims03.cobie.core.DocumentCollectionType; import org.buildingsmartalliance.docs.nbims03.cobie.core.IssueCollectionType; import org.erdc.cobie.shared.COBieUtility; import org.erdc.cobie.shared.cobietab.IndexedCOBie; public class SystemTransformer extends ChildTransformer<org.erdc.cobie.sheetxmldata.SystemType, SystemType> { public SystemTransformer(org.erdc.cobie.sheetxmldata.SystemType cobieSheetXMLData, SystemType cobieLiteRowData, IndexedCOBie indexedCOBie) { super(cobieSheetXMLData, cobieLiteRowData, indexedCOBie); } @Override public AttributeCollectionType getNewAttributes() { return target.addNewSystemAttributes(); } @Override public DocumentCollectionType getNewDocuments() { return target.addNewSystemDocuments(); } @Override public IssueCollectionType getNewIssues() { return target.addNewSystemIssues(); } @Override protected void parseComplexElements() { // Nothing to do } @Override protected void parseSimpleElements() { if(!COBieUtility.isNA(source.getExtObject())) target.setExternalEntityName(source.getExtObject()); if(!COBieUtility.isNA(source.getExtIdentifier())) target.setExternalID(source.getExtIdentifier()); if(!COBieUtility.isNA(source.getExtSystem())) target.setExternalSystemName(source.getExtSystem()); if(!COBieUtility.isNA(source.getCategory())) target.setSystemCategory(source.getCategory()); if(!COBieUtility.isNA(source.getDescription())) target.setSystemDescription(source.getDescription()); if(!COBieUtility.isNA(source.getName())) target.setSystemName(source.getName()); } }
[ "chrisbogen@gmail.com" ]
chrisbogen@gmail.com
061327f2a029547ff10a5ac467b4a8ddac53fec3
17abe434c2bc8995fbc73f7f81217e49a0283c2e
/src/main/java/com/google/gwt/i18n/shared/impl/cldr/DateTimeFormatInfoImpl_gl.java
bea55ba61499be02237a88ae8c835b06d19e5126
[ "Apache-2.0" ]
permissive
aliz-ai/gwt-mock-2.5.1
6d7d41c9f29d3110eef5c74b23a3d63b3af5e71b
af5495454005f2bba630b8d869fde75930d4ec2e
refs/heads/master
2022-12-31T06:00:31.983924
2020-07-13T12:06:47
2020-07-13T12:06:47
55,702,877
1
1
NOASSERTION
2020-10-13T09:09:21
2016-04-07T14:48:45
Java
UTF-8
Java
false
false
4,397
java
/* * Copyright 2012 Google 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.google.gwt.i18n.shared.impl.cldr; // DO NOT EDIT - GENERATED FROM CLDR AND ICU DATA // cldrVersion=21.0 // number=$Revision: 6546 Google $ // type=root // date=$Date: 2012-02-07 13:32:35 -0500 (Tue, 07 Feb 2012) $ /** * Implementation of DateTimeFormatInfo for the "gl" locale. */ public class DateTimeFormatInfoImpl_gl extends DateTimeFormatInfoImpl { @Override public String[] ampms() { return new String[] { "a.m.", "p.m." }; } @Override public String dateFormatFull() { return "EEEE dd MMMM y"; } @Override public String dateFormatLong() { return "dd MMMM y"; } @Override public String dateFormatMedium() { return "d MMM, y"; } @Override public String dateFormatShort() { return "dd/MM/yy"; } @Override public String[] erasFull() { return new String[] { "antes de Cristo", "despois de Cristo" }; } @Override public String[] erasShort() { return new String[] { "a.C.", "d.C." }; } @Override public String formatMonthAbbrevDay() { return "d MMM"; } @Override public String formatMonthFullDay() { return "d MMMM"; } @Override public String formatMonthFullWeekdayDay() { return "EEEE d MMMM"; } @Override public String formatMonthNumDay() { return "d/M"; } @Override public String formatYearMonthAbbrev() { return "MMM y"; } @Override public String formatYearMonthAbbrevDay() { return "d MMM, y"; } @Override public String formatYearMonthFull() { return "MMMM y"; } @Override public String formatYearMonthFullDay() { return "d MMMM y"; } @Override public String formatYearMonthNum() { return "M-yyyy"; } @Override public String formatYearMonthNumDay() { return "d/M/y"; } @Override public String formatYearMonthWeekdayDay() { return "EEE, d MMM y"; } @Override public String formatYearQuarterFull() { return "QQQQ yyyy"; } @Override public String formatYearQuarterShort() { return "Q yyyy"; } @Override public String[] monthsFull() { return new String[] { "Xaneiro", "Febreiro", "Marzo", "Abril", "Maio", "Xuño", "Xullo", "Agosto", "Setembro", "Outubro", "Novembro", "Decembro" }; } @Override public String[] monthsNarrow() { return new String[] { "X", "F", "M", "A", "M", "X", "X", "A", "S", "O", "N", "D" }; } @Override public String[] monthsShort() { return new String[] { "Xan", "Feb", "Mar", "Abr", "Mai", "Xuñ", "Xul", "Ago", "Set", "Out", "Nov", "Dec" }; } @Override public String[] quartersFull() { return new String[] { "1o trimestre", "2o trimestre", "3o trimestre", "4o trimestre" }; } @Override public String[] quartersShort() { return new String[] { "T1", "T2", "T3", "T4" }; } @Override public String[] weekdaysFull() { return new String[] { "Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado" }; } @Override public String[] weekdaysNarrow() { return new String[] { "D", "L", "M", "M", "X", "V", "S" }; } @Override public String[] weekdaysShort() { return new String[] { "Dom", "Lun", "Mar", "Mér", "Xov", "Ven", "Sáb" }; } }
[ "gabor.farkas@doctusoft.com" ]
gabor.farkas@doctusoft.com