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
e8e8aca8170ecd22a9e28152550b8c6791fd01d2
d6b6abe73a0c82656b04875135b4888c644d2557
/sources/com/google/android/gms/ads/internal/g.java
222ff94e9a660c69035985f53e99b3b3e40ce1b4
[]
no_license
chanyaz/and_unimed
4344d1a8ce8cb13b6880ca86199de674d770304b
fb74c460f8c536c16cca4900da561c78c7035972
refs/heads/master
2020-03-29T09:07:09.224595
2018-08-30T06:29:32
2018-08-30T06:29:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,047
java
package com.google.android.gms.ads.internal; import android.app.Activity; import android.content.Context; import android.view.MotionEvent; import android.view.View; import com.google.android.gms.internal.ads.acz; import com.google.android.gms.internal.ads.akc; import com.google.android.gms.internal.ads.amn; import com.google.android.gms.internal.ads.hr; import com.google.android.gms.internal.ads.kb; import com.google.android.gms.internal.ads.kk; import com.google.android.gms.internal.ads.zzadh; import com.google.android.gms.internal.ads.zzang; import com.google.android.gms.internal.ads.zzce; import java.util.List; import java.util.Vector; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; @zzadh public final class g implements zzce, Runnable { private final List<Object[]> a; private final AtomicReference<zzce> b; private Context c; private zzang d; private CountDownLatch e; private g(Context context, zzang zzang) { this.a = new Vector(); this.b = new AtomicReference(); this.e = new CountDownLatch(1); this.c = context; this.d = zzang; akc.a(); if (kb.b()) { hr.a((Runnable) this); } else { run(); } } public g(av avVar) { this(avVar.c, avVar.e); } private static Context a(Context context) { Context applicationContext = context.getApplicationContext(); return applicationContext == null ? context : applicationContext; } private final boolean a() { try { this.e.await(); return true; } catch (Throwable e) { kk.c("Interrupted during GADSignals creation.", e); return false; } } private final void b() { if (!this.a.isEmpty()) { for (Object[] objArr : this.a) { if (objArr.length == 1) { ((zzce) this.b.get()).zza((MotionEvent) objArr[0]); } else if (objArr.length == 3) { ((zzce) this.b.get()).zza(((Integer) objArr[0]).intValue(), ((Integer) objArr[1]).intValue(), ((Integer) objArr[2]).intValue()); } } this.a.clear(); } } public final void run() { try { boolean z = (((Boolean) akc.f().a(amn.aL)).booleanValue() || (this.d.d ? 1 : null) == null) ? false : true; this.b.set(acz.a(this.d.a, a(this.c), z)); } finally { this.e.countDown(); this.c = null; this.d = null; } } public final String zza(Context context) { if (a()) { zzce zzce = (zzce) this.b.get(); if (zzce != null) { b(); return zzce.zza(a(context)); } } return ""; } public final String zza(Context context, String str, View view) { return zza(context, str, view, null); } public final String zza(Context context, String str, View view, Activity activity) { if (a()) { zzce zzce = (zzce) this.b.get(); if (zzce != null) { b(); return zzce.zza(a(context), str, view, activity); } } return ""; } public final void zza(int i, int i2, int i3) { zzce zzce = (zzce) this.b.get(); if (zzce != null) { b(); zzce.zza(i, i2, i3); return; } this.a.add(new Object[]{Integer.valueOf(i), Integer.valueOf(i2), Integer.valueOf(i3)}); } public final void zza(MotionEvent motionEvent) { zzce zzce = (zzce) this.b.get(); if (zzce != null) { b(); zzce.zza(motionEvent); return; } this.a.add(new Object[]{motionEvent}); } public final void zzb(View view) { zzce zzce = (zzce) this.b.get(); if (zzce != null) { zzce.zzb(view); } } }
[ "khairilirfanlbs@gmail.com" ]
khairilirfanlbs@gmail.com
770b4e016e04aa9d10472177da21fcfe1d5b3486
23f42b163c0a58ad61c38498befa1219f53a2c10
/src/main/java/weldstartup/a/AppScopedBean0700.java
a8c4809db1257584b33184cec0161c3bc315d015
[]
no_license
99sono/wls-jsf-2-2-12-jersey-weldstartup-bottleneck
9637d2f14a1053159c6fc3c5898a91057a65db9d
b81697634cceca79f1b9a999002a1a02c70b8648
refs/heads/master
2021-05-15T17:54:39.040635
2017-10-24T07:27:23
2017-10-24T07:27:23
107,673,776
0
0
null
null
null
null
UTF-8
Java
false
false
1,630
java
package weldstartup.a; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.annotation.Resource; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.spi.BeanManager; import javax.inject.Inject; import javax.transaction.TransactionSynchronizationRegistry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import weldstartup.nondynamicclasses.AppScopedNonDynamicBean; import weldstartup.nondynamicclasses.DependentScopedNonDynamicBean; import weldstartup.nondynamicclasses.RequestScopedNonDynamicBean; /** * A dynamically created CDI bean meant to demonstrate meant to demonstrate that the WeldStartup performance on weblogic * is really under-performing. * */ @ApplicationScoped // appScopedName will be turned into a name like AppScopedBean0001 public class AppScopedBean0700 { private static final Logger LOGGER = LoggerFactory.getLogger(AppScopedBean0700.class); @Inject AppScopedNonDynamicBean appScopedNonDynamicBean; @Inject DependentScopedNonDynamicBean rependentScopedNonDynamicBean; @Inject RequestScopedNonDynamicBean requestScopedNonDynamicBean; @Inject BeanManager beanManager; @Resource TransactionSynchronizationRegistry tsr; @PostConstruct public void postConstruct() { LOGGER.info("Post construct method invoked. AppScopedBean0700"); } @PreDestroy public void preDestroy() { LOGGER.info("Pre-destroy method invoked. AppScopedBean0700"); } public void dummyLogic() { LOGGER.info("Dummy logic invoked. AppScopedBean0700"); } }
[ "99sono@users.noreply.github.com" ]
99sono@users.noreply.github.com
42b0fe52557583e0b6ce3455b2901efa9420522a
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/zendesk/core/C13582x2dd20439.java
38387047986258eb89e0992475f43e26309ad53d
[]
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
1,305
java
package zendesk.core; import dagger.internal.C12021c; import dagger.internal.Factory; import javax.inject.Provider; /* renamed from: zendesk.core.ZendeskNetworkModule_ProvideZendeskBasicHeadersInterceptorFactory */ public final class C13582x2dd20439 implements Factory<ZendeskOauthIdHeaderInterceptor> { private final Provider<ApplicationConfiguration> configurationProvider; private final ZendeskNetworkModule module; public C13582x2dd20439(ZendeskNetworkModule zendeskNetworkModule, Provider<ApplicationConfiguration> provider) { this.module = zendeskNetworkModule; this.configurationProvider = provider; } public static Factory<ZendeskOauthIdHeaderInterceptor> create(ZendeskNetworkModule zendeskNetworkModule, Provider<ApplicationConfiguration> provider) { return new C13582x2dd20439(zendeskNetworkModule, provider); } public ZendeskOauthIdHeaderInterceptor get() { ZendeskOauthIdHeaderInterceptor provideZendeskBasicHeadersInterceptor = this.module.provideZendeskBasicHeadersInterceptor((ApplicationConfiguration) this.configurationProvider.get()); C12021c.m31671a(provideZendeskBasicHeadersInterceptor, "Cannot return null from a non-@Nullable @Provides method"); return provideZendeskBasicHeadersInterceptor; } }
[ "developer@appzoc.com" ]
developer@appzoc.com
b33753c7faf9ee24a3da84836464bf876fdad902
1c2cf97af6d7b31f1eaf6b5f1459df5a8d437063
/src/main/java/com/awslabs/iot/client/commands/iot/certificates/DeleteAllCaCertificatesCommandHandler.java
947f0526cfd851ef50eaf40f44cc03975d6b4562
[ "Apache-2.0" ]
permissive
andrzpg12/aws-iot-client
6f547f0f61d0e2cac44192454cdf50e3825e3916
6f95f57a9445385833afe389b2e5b49a21aff77b
refs/heads/master
2022-11-16T00:33:22.907712
2020-07-10T13:33:24
2020-07-10T13:33:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,517
java
package com.awslabs.iot.client.commands.iot.certificates; import com.awslabs.general.helpers.interfaces.IoHelper; import com.awslabs.iot.client.commands.iot.IotCommandHandler; import com.awslabs.iot.client.parameters.interfaces.ParameterExtractor; import com.awslabs.iot.helpers.interfaces.V2IotHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.inject.Inject; public class DeleteAllCaCertificatesCommandHandler implements IotCommandHandler { private static final String DELETEALLCACERTIFICATES = "delete-all-ca-certificates"; private static final Logger log = LoggerFactory.getLogger(DeleteAllCaCertificatesCommandHandler.class); @Inject V2IotHelper v2IotHelper; @Inject ParameterExtractor parameterExtractor; @Inject IoHelper ioHelper; @Inject public DeleteAllCaCertificatesCommandHandler() { } @Override public void innerHandle(String input) { v2IotHelper.getCaCertificates() .forEach(certificate -> v2IotHelper.deleteCaCertificate(certificate)); } @Override public String getCommandString() { return DELETEALLCACERTIFICATES; } @Override public String getHelp() { return "Deletes all CA certificates."; } @Override public int requiredParameters() { return 0; } public ParameterExtractor getParameterExtractor() { return this.parameterExtractor; } public IoHelper getIoHelper() { return this.ioHelper; } }
[ "tim@mattison.org" ]
tim@mattison.org
f8e8b1f63d77cd29afcbd2f70ab2c8c35f0949dc
6ea7f7ecab3b2abd789753c6c833a34bcaacb48f
/company/amazon/leetcode/TreeNode.java
4a49f68dd46bbca4fe102766d4fa5300f0b0c958
[]
no_license
bhaskarsantoshk/problem-solving
2fb44712fc3495097b01339164ef570d9cb2b4f6
a53d19a10c181f75e11033fa2666f11b4af03485
refs/heads/master
2023-07-25T00:52:43.790559
2023-07-16T13:50:20
2023-07-16T13:50:20
166,809,536
9
2
null
2023-04-16T15:46:25
2019-01-21T12:20:58
Java
UTF-8
Java
false
false
328
java
package company.amazon.leetcode; public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(){ } TreeNode(int val){ this.val = val; } TreeNode (int val, TreeNode left, TreeNode right){ this.val = val; this.left = left; this.right = right; } }
[ "bhaskarsantoshk@gmail.com" ]
bhaskarsantoshk@gmail.com
2b1f5cb68821ef18e64360f54598f5fdb55124a9
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/jdbi/learning/5646/MapToFactory.java
374738746e6cc5e9dd179fe2ad555e4acac54016
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,469
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jdbi.v3.sqlobject.statement.internal; import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.lang.reflect.Parameter; import java.lang.reflect.Type; import org.jdbi.v3.core.generic.GenericType; import org.jdbi.v3.core.qualifier.QualifiedType; import org.jdbi.v3.core.result.ResultBearing; import org.jdbi.v3.sqlobject.customizer.SqlStatementCustomizerFactory; import org.jdbi.v3.sqlobject.customizer.SqlStatementParameterCustomizer; public class MapToFactory implements SqlStatementCustomizerFactory { @Override public SqlStatementParameterCustomizer createForParameter(Annotation annotation, Class<?> sqlObjectType, Method method, Parameter param, int index, Type type) { return (stmt, arg) -> { final QualifiedType mapTo; if (arg instanceof QualifiedType) { mapTo = (QualifiedType) arg; } else if (arg instanceof GenericType) { mapTo = QualifiedType.of( ((GenericType<?>) arg).getType()); } else if (arg instanceof Type) { mapTo = QualifiedType.of((Type) arg); } else { throw new UnsupportedOperationException("@MapTo must take a GenericType, QualifiedType, or Type, but got a " + arg.getClass().getName()); } ResultReturner returner = ResultReturner.forMethod(sqlObjectType, method); stmt.getConfig(SqlObjectStatementConfiguration.class).setReturner( () -> returner.mappedResult(((ResultBearing) stmt).mapTo(mapTo), stmt.getContext())); }; } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
b3eca8208fe2fc66683720d433df490a91661afe
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/neo4j--neo4j/c2d24f81bf86fc922334051bd69b147500d5475d/after/XidImpl.java
349042e7ce5e5d03150b7cdca5efa32a319ed87b
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
5,852
java
/* * Copyright (c) 2002-2009 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.impl.transaction; import java.nio.ByteBuffer; import javax.transaction.xa.Xid; public class XidImpl implements Xid { private static final int FORMAT_ID = 0x4E454E31; // NEO format identidier // hardcoded for now, we don't have distribution yet but // this should change later private static final byte INSTANCE_ID[] = new byte[] { 'N', 'E', 'O', 'K', 'E', 'R', 'N', 'L', '\0' }; private static long nextSequenceId = 0; // next sequence number for global tx id private synchronized static long getNextSequenceId() { return nextSequenceId++; } // INSTANCE_ID + millitime(long) + seqnumber(long) private final byte globalId[]; // branchId assumes Xid.MAXBQUALSIZE >= 4 private final byte branchId[]; private final int formatId; // resourceId.length = 4, unique for each XAResource static byte[] getNewGlobalId() { // create new global id ( [INSTANCE_ID][time][sequence] ) byte globalId[] = new byte[INSTANCE_ID.length + 16]; System.arraycopy( INSTANCE_ID, 0, globalId, 0, INSTANCE_ID.length ); ByteBuffer byteBuf = ByteBuffer.wrap( globalId ); byteBuf.position( INSTANCE_ID.length ); long time = System.currentTimeMillis(); long sequence = getNextSequenceId(); byteBuf.putLong( time ).putLong( sequence ); return globalId; } static boolean isThisTm( byte globalId[] ) { if ( globalId.length < INSTANCE_ID.length ) { return false; } for ( int i = 0; i < INSTANCE_ID.length; i++ ) { if ( globalId[i] != INSTANCE_ID[i] ) { return false; } } return true; } public XidImpl( byte globalId[], byte resourceId[] ) { this( globalId, resourceId, FORMAT_ID ); } // create xid for transaction with more than one XAResource enlisted public XidImpl( byte globalId[], byte resourceId[], int formatId ) { if ( globalId.length > Xid.MAXGTRIDSIZE ) { throw new IllegalArgumentException( "GlobalId length to long, " + globalId.length ); } if ( resourceId.length > Xid.MAXBQUALSIZE ) { throw new IllegalArgumentException( "BranchId (resource id) to long, " + resourceId.length ); } this.globalId = globalId; this.branchId = resourceId; this.formatId = formatId; } public byte[] getGlobalTransactionId() { return globalId.clone(); } public byte[] getBranchQualifier() { return branchId.clone(); } public int getFormatId() { return FORMAT_ID; } public boolean equals( Object o ) { if ( !(o instanceof Xid) ) { return false; } byte otherGlobalId[] = ((Xid) o).getGlobalTransactionId(); byte otherBranchId[] = ((Xid) o).getBranchQualifier(); if ( globalId.length != otherGlobalId.length || branchId.length != otherBranchId.length ) { return false; } for ( int i = 0; i < globalId.length; i++ ) { if ( globalId[i] != otherGlobalId[i] ) { return false; } } for ( int i = 0; i < branchId.length; i++ ) { if ( branchId[i] != otherBranchId[i] ) { return false; } } return true; } private volatile int hashCode = 0; public int hashCode() { if ( hashCode == 0 ) { int calcHash = 0; for ( int i = 0; i < 3 && i < globalId.length; i++ ) { calcHash += globalId[globalId.length - i - 1] << i * 8; } if ( branchId.length > 0 ) { calcHash += branchId[0] << 3 * 8; } hashCode = 3217 * calcHash; } return hashCode; } public String toString() { StringBuffer buf = new StringBuffer( "GlobalId[" ); if ( globalId.length == (INSTANCE_ID.length + 8 + 8) ) { for ( int i = 0; i < INSTANCE_ID.length - 1; i++ ) { buf.append( (char) globalId[i] ); } ByteBuffer byteBuf = ByteBuffer.wrap( globalId ); byteBuf.position( INSTANCE_ID.length ); long time = byteBuf.getLong(); long sequence = byteBuf.getLong(); buf.append( '|' ); buf.append( time ); buf.append( '|' ); buf.append( sequence ); } else { buf.append( "UNKNOWN_ID" ); } buf.append( "], BranchId[ " ); for ( int i = 0; i < branchId.length; i++ ) { buf.append( branchId[i] + " " ); } buf.append( "]" ); return buf.toString(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
0dcc93baffd57b09453eef48c9adc61839940ce6
e3162d976b3a665717b9a75c503281e501ec1b1a
/src/main/java/com/alipay/api/domain/UserSubmitModel.java
4d58e6ca820814c4a1e3ec0379865d2ea7543c7b
[ "Apache-2.0" ]
permissive
sunandy3/alipay-sdk-java-all
16b14f3729864d74846585796a28d858c40decf8
30e6af80cffc0d2392133457925dc5e9ee44cbac
refs/heads/master
2020-07-30T14:07:34.040692
2019-09-20T09:35:20
2019-09-20T09:35:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,888
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 用户提交的问卷结果数据对象信息 * * @author auto create * @since 1.0, 2018-09-19 16:54:40 */ public class UserSubmitModel extends AlipayObject { private static final long serialVersionUID = 8576592586753125985L; /** * 提交答案中每道题的具体答案数据 */ @ApiListField("answers") @ApiField("answer_model") private List<AnswerModel> answers; /** * 用户答案提交时间 */ @ApiField("gmt_submit") private String gmtSubmit; /** * 对应的任务id信息,根据入参的 job_id 或 snapshot_id 返回 */ @ApiField("job_id") private Long jobId; /** * 填写来源标记 */ @ApiField("referrer") private String referrer; /** * 试卷得分 */ @ApiField("score") private Long score; /** * 答案对应的问卷快照版本_通过传入的 job_id 和 snapshot_id 获取 */ @ApiField("snapshot_id") private Long snapshotId; /** * 用户提交问卷时的随机码信息 */ @ApiField("submit_id") private String submitId; /** * 对应账号类型下的唯一账号主键_用以区分对应的填写用户 和入参参数一致,不需要脱敏 */ @ApiField("user_id") private String userId; /** * 账号类型_用以区分不同账号体系的用户 ALIPAY-支付宝 HEMA-盒马 ALIBABA_INC-内部域账号 */ @ApiField("user_type") private String userType; public List<AnswerModel> getAnswers() { return this.answers; } public void setAnswers(List<AnswerModel> answers) { this.answers = answers; } public String getGmtSubmit() { return this.gmtSubmit; } public void setGmtSubmit(String gmtSubmit) { this.gmtSubmit = gmtSubmit; } public Long getJobId() { return this.jobId; } public void setJobId(Long jobId) { this.jobId = jobId; } public String getReferrer() { return this.referrer; } public void setReferrer(String referrer) { this.referrer = referrer; } public Long getScore() { return this.score; } public void setScore(Long score) { this.score = score; } public Long getSnapshotId() { return this.snapshotId; } public void setSnapshotId(Long snapshotId) { this.snapshotId = snapshotId; } public String getSubmitId() { return this.submitId; } public void setSubmitId(String submitId) { this.submitId = submitId; } public String getUserId() { return this.userId; } public void setUserId(String userId) { this.userId = userId; } public String getUserType() { return this.userType; } public void setUserType(String userType) { this.userType = userType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
4ce483441889e4dae0b3fd76dfcb970cf8b21fbc
ea4da81a69a300624a46fce9e64904391c37267c
/src/main/java/com/alipay/api/response/KoubeiMarketingDataBizadviserMyreportQueryResponse.java
7b3ae1e87e2bc61bf087ed62c5037a273aa62c88
[ "Apache-2.0" ]
permissive
shiwei1024/alipay-sdk-java-all
741cc3cb8cf757292b657ce05958ff9ad8ecf582
d6a051fd47836c719a756607e6f84fee2b26ecb4
refs/heads/master
2022-12-29T18:46:53.195585
2020-10-09T06:34:30
2020-10-09T06:34:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
824
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.marketing.data.bizadviser.myreport.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiMarketingDataBizadviserMyreportQueryResponse extends AlipayResponse { private static final long serialVersionUID = 1861474357432515361L; /** * 不同uniq_key 返回不同参数,详细请看:https://doc.open.alipay.com/docs/doc.htm?spm=0.0.0.0.1Zq3by&docType=1&articleId=107061&previewCode=F30AA2D06B7CC0817AC7221A8CE288A4 */ @ApiField("result") private String result; public void setResult(String result) { this.result = result; } public String getResult( ) { return this.result; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
8c39a737d36bceaae8b8798da22a0486f4448ed1
9c957f117e154eaf902215f1d5c945e57e6bae3b
/EnterpriseTemplate/src/main/java/ru/itis/factories/ServiceFactory.java
6158228bf5e2c749338bc8f3543bfa9c88a1664a
[]
no_license
MarselSidikov/JavaItis2
60ce08ec0cb4e25b459482191841a16881127337
f0a90b843bfcf9d5d36f006ba39748c19b693eb9
refs/heads/master
2020-12-24T12:05:57.462464
2017-01-16T10:36:40
2017-01-16T10:36:40
73,073,583
0
0
null
null
null
null
UTF-8
Java
false
false
1,921
java
package ru.itis.factories; import ru.itis.dao.UsersDao; import ru.itis.service.UserService; import java.io.FileInputStream; import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.sql.Connection; import java.util.Properties; public class ServiceFactory { // поле, которое хранит единственный экземпляр private static ServiceFactory instance; private UserService userService; private Properties properties; static { instance = new ServiceFactory(); } private ServiceFactory() { properties = new Properties(); try { properties.load(new FileInputStream("C:\\Users\\admin.WIN-IPM3OA3VQNQ\\Desktop\\JAVA\\JavaItis2\\" + "EnterpriseTemplate\\src\\main\\" + "resources\\application.properties")); String serviceClassName = properties.getProperty("users.service.class"); Constructor constructor = Class.forName(serviceClassName).getConstructor(UsersDao.class); userService = (UserService)constructor.newInstance(DaoFactory.getInstance().getUsersDao()); } catch (IOException e) { throw new IllegalStateException(e); } catch (ClassNotFoundException e) { throw new IllegalStateException(e); } catch (NoSuchMethodException e) { throw new IllegalStateException(e); } catch (IllegalAccessException e) { throw new IllegalStateException(e); } catch (InstantiationException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } public UserService getUserService() { return userService; } public static ServiceFactory getInstance() { return instance; } }
[ "admin" ]
admin
4bdb00cb18ee31e41b800185805d8868d6ebeca9
957852f2339da953ee98948ab04df2ef937e38d1
/src ref/classes-dex2jar_source_from_jdcore/com/google/android/gms/location/places/internal/zzi.java
64820cdfa94d1e7979fe2c2855095bd0231b96ec
[]
no_license
nvcervantes/apc_softdev_mi151_04
c58fdc7d9e7450654fcb3ce2da48ee62cda5394f
1d23bd19466d2528934110878fdc930c00777636
refs/heads/master
2020-03-22T03:00:40.022931
2019-05-06T04:48:09
2019-05-06T04:48:09
139,407,767
0
0
null
null
null
null
UTF-8
Java
false
false
485
java
package com.google.android.gms.location.places.internal; import com.google.android.gms.common.api.Api; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.location.places.AddPlaceRequest; import com.google.android.gms.location.places.zzm.zzc; final class zzi extends zzm.zzc<zzo> { zzi(zzh paramZzh, Api paramApi, GoogleApiClient paramGoogleApiClient, AddPlaceRequest paramAddPlaceRequest) { super(paramApi, paramGoogleApiClient); } }
[ "shierenecervantes23@gmail.com" ]
shierenecervantes23@gmail.com
8291a82a324ab990d89fc5177175a8e95a461266
d9b0fb2b2d9bbe122788da1b7672cb530de7130c
/src/test/java/unquietcode/tools/flapi/examples/xhtml/builder/Element/ElementBuilder_2addAttribute_2addComment_2endElement_2startElement.java
9a5974c6b7e6f54351670f6aad822eff5d5020d1
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
chrisopal/Flapi
da17749b627bcd2b3f38d5cc40b8c6764a041c9b
f71715e3ab4e5f52cfdcdf9908ce8980545db55f
refs/heads/master
2020-03-26T23:24:53.198227
2018-07-30T21:38:08
2018-07-30T21:38:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,685
java
package unquietcode.tools.flapi.examples.xhtml.builder.Element; import unquietcode.tools.flapi.examples.xhtml.builder.Element.ElementBuilder.Head; import unquietcode.tools.flapi.runtime.ChainInfo; import unquietcode.tools.flapi.runtime.MethodInfo; import unquietcode.tools.flapi.runtime.TransitionType; import javax.annotation.Generated; /** * This class was generated using Flapi, the fluent API generator for Java. * Modifications to this file will be lost upon regeneration. * You have been warned! * * Visit https://github.com/UnquietCode/Flapi for more information. * * * Generated on February 28, 2016 16:29:18 PST using version 0.0-DEVELOPMENT * @see unquietcode.tools.flapi.examples.xhtml.builder.Element.ElementHelper */ @Generated(value = "unquietcode.tools.flapi", date = "2016-02-28T16:29:18-08:00", comments = "generated using Flapi, the fluent API generator for Java, version 0.0-DEVELOPMENT") public interface ElementBuilder_2addAttribute_2addComment_2endElement_2startElement<_ReturnType> { @MethodInfo(type = TransitionType.Recursive) ElementBuilder_2addAttribute_2addComment_2endElement_2startElement<_ReturnType> addAttribute(String key, String value); @MethodInfo(type = TransitionType.Recursive) ElementBuilder_2addAttribute_2addComment_2endElement_2startElement<_ReturnType> addComment(String comment); @MethodInfo(type = TransitionType.Ascending) _ReturnType endElement(); @MethodInfo(type = TransitionType.Recursive, chainInfo = { @ChainInfo(type = Head.class, position = 1) }) Head<ElementBuilder_2addAttribute_2addComment_2endElement_2startElement<_ReturnType>> startElement(String tagName); }
[ "blouis@unquietcode.com" ]
blouis@unquietcode.com
de4788dac675e9514327acf50353b9dc540213fb
842a912e8b1e9eadd25c5788b8aefda8b7e06bde
/src/com/thinkgem/jeesite/modules/marketing/integralrule/web/IntegralRuleController.java
ee4a73ecb1ccfb0fe040cd73ab64887b2492a2b0
[ "Apache-2.0" ]
permissive
ChenXbFrank/JZManage
741b51fc1335efffb1a8901ca7f44362c42a09d2
42bce016cca1b21c2734a975d003aeeed12f4a97
refs/heads/master
2021-04-15T10:18:42.366229
2018-03-25T04:58:53
2018-03-25T04:58:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,231
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.thinkgem.jeesite.modules.marketing.integralrule.web; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.thinkgem.jeesite.common.config.Global; import com.thinkgem.jeesite.common.persistence.Page; import com.thinkgem.jeesite.common.web.BaseController; import com.thinkgem.jeesite.common.utils.StringUtils; import com.thinkgem.jeesite.modules.marketing.integralrule.entity.IntegralRule; import com.thinkgem.jeesite.modules.marketing.integralrule.service.IntegralRuleService; /** * 积分规则Controller * @author tanghaobo * @version 2017-03-16 */ @Controller @RequestMapping(value = "${adminPath}/integralrule/integralRule") public class IntegralRuleController extends BaseController { @Autowired private IntegralRuleService integralRuleService; @ModelAttribute public IntegralRule get(@RequestParam(required=false) String id) { IntegralRule entity = null; if (StringUtils.isNotBlank(id)){ entity = integralRuleService.get(id); } if (entity == null){ entity = new IntegralRule(); } return entity; } @RequiresPermissions("integralrule:integralRule:view") @RequestMapping(value = {"list", ""}) public String list(IntegralRule integralRule, HttpServletRequest request, HttpServletResponse response, Model model) { Page<IntegralRule> page = integralRuleService.findPage(new Page<IntegralRule>(request, response), integralRule); model.addAttribute("page", page); return "modules/marketing/integralrule/integralRuleList.jsp"; } @RequiresPermissions("integralrule:integralRule:view") @RequestMapping(value = "form") public String form(IntegralRule integralRule, Model model) { model.addAttribute("integralRule", integralRule); return "modules/marketing/integralrule/integralRuleForm.jsp"; } @RequiresPermissions("integralrule:integralRule:edit") @RequestMapping(value = "save") public String save(IntegralRule integralRule, Model model, RedirectAttributes redirectAttributes) { if (!beanValidator(model, integralRule)){ return form(integralRule, model); } integralRuleService.save(integralRule); addMessage(redirectAttributes, "保存积分规则成功"); return "redirect:"+Global.getAdminPath()+"/integralrule/integralRule/?repage"; } @RequiresPermissions("integralrule:integralRule:edit") @RequestMapping(value = "delete") public String delete(IntegralRule integralRule, RedirectAttributes redirectAttributes) { integralRuleService.delete(integralRule); addMessage(redirectAttributes, "删除积分规则成功"); return "redirect:"+Global.getAdminPath()+"/integralrule/integralRule/?repage"; } }
[ "810464826@qq.com" ]
810464826@qq.com
804eda4c80a42f15ae5f2e78d98edd0731f7db4b
c93e753391fedda38869465b7dbc592406008170
/app/build/generated/source/r/debug/tv/danmaku/ijk/media/player_armv5/R.java
63ed809dbf5ec2aca33a1c374a5e91552764e09a
[ "Apache-2.0" ]
permissive
majian1234554321/MVideo-master
8a2ee730b6f67669ca865bc5d2debb3ce3eac623
d3d9d295dea7ba6a40f8f4ee941fdcb11868d203
refs/heads/master
2020-03-16T14:15:27.423597
2018-05-09T06:31:15
2018-05-09T06:31:15
132,711,926
4
1
null
null
null
null
UTF-8
Java
false
false
360
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package tv.danmaku.ijk.media.player_armv5; public final class R { public static final class string { public static final int ijkplayer_dummy = 0x7f0d003a; } }
[ "99571202@qq.com" ]
99571202@qq.com
b4994f62240fbd03637be6c7e6cc41a91d113509
c164d8f1a6068b871372bae8262609fd279d774c
/src/main/java/edu/uiowa/slis/VIVOISF/Territory/TerritoryCodeFAOSTATIterator.java
2467ea0396426491b3d46245ad5107f22c697dc4
[ "Apache-2.0" ]
permissive
eichmann/VIVOISF
ad0a299df177d303ec851ff2453cbcbd7cae1ef8
e80cd8b74915974fac7ebae8e5e7be8615355262
refs/heads/master
2020-03-19T03:44:27.662527
2018-06-03T22:44:58
2018-06-03T22:44:58
135,757,275
0
1
null
null
null
null
UTF-8
Java
false
false
3,271
java
package edu.uiowa.slis.VIVOISF.Territory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; import org.apache.jena.query.QuerySolution; import org.apache.jena.query.ResultSet; @SuppressWarnings("serial") public class TerritoryCodeFAOSTATIterator extends edu.uiowa.slis.VIVOISF.TagLibSupport { static TerritoryCodeFAOSTATIterator currentInstance = null; private static final Log log = LogFactory.getLog(TerritoryCodeFAOSTATIterator.class); static boolean firstInstance = false; static boolean lastInstance = false; String subjectURI = null; String codeFAOSTAT = null; ResultSet rs = null; public int doStartTag() throws JspException { currentInstance = this; try { Territory ancestorInstance = (Territory) findAncestorWithClass(this, Territory.class); if (ancestorInstance != null) { subjectURI = ancestorInstance.getSubjectURI(); } if (ancestorInstance == null && subjectURI == null) { throw new JspException("subject URI generation currently not supported"); } rs = getResultSet(prefix+"SELECT ?s where { <" + subjectURI + "> <http://aims.fao.org/aos/geopolitical.owl#codeFAOSTAT> ?s } "); if(rs.hasNext()) { QuerySolution sol = rs.nextSolution(); codeFAOSTAT = sol.get("?s").isLiteral() ? sol.get("?s").asLiteral().getString() : sol.get("?s").toString(); firstInstance = true; lastInstance = ! rs.hasNext(); return EVAL_BODY_INCLUDE; } } catch (Exception e) { log.error("Exception raised in TerritoryIterator doStartTag", e); clearServiceState(); freeConnection(); throw new JspTagException("Exception raised in TerritoryIterator doStartTag"); } return SKIP_BODY; } public int doAfterBody() throws JspException { try { if(rs.hasNext()) { QuerySolution sol = rs.nextSolution(); codeFAOSTAT = sol.get("?s").isLiteral() ? sol.get("?s").asLiteral().getString() : sol.get("?s").toString(); firstInstance = false; lastInstance = ! rs.hasNext(); return EVAL_BODY_AGAIN; } } catch (Exception e) { log.error("Exception raised in TerritoryIterator doAfterBody", e); clearServiceState(); freeConnection(); throw new JspTagException("Exception raised in TerritoryIterator doAfterBody"); } return SKIP_BODY; } public int doEndTag() throws JspException { currentInstance = null; try { // do processing } catch (Exception e) { log.error("Exception raised in Territory doEndTag", e); throw new JspTagException("Exception raised in Territory doEndTag"); } finally { clearServiceState(); freeConnection(); } return super.doEndTag(); } private void clearServiceState() { subjectURI = null; } public void setCodeFAOSTAT(String theCodeFAOSTAT) { codeFAOSTAT = theCodeFAOSTAT; } public String getCodeFAOSTAT() { return codeFAOSTAT; } public static void setFirstInstance(Boolean theFirstInstance) { firstInstance = theFirstInstance; } public static Boolean getFirstInstance() { return firstInstance; } public static void setLastInstance(Boolean theLastInstance) { lastInstance = theLastInstance; } public static Boolean getLastInstance() { return lastInstance; } }
[ "david-eichmann@uiowa.edu" ]
david-eichmann@uiowa.edu
c8fdcc5d07399364a647a0f30e40e778e7da1b4a
395fdaed6042b4f85663f95b8ce181305bf75968
/java/intelijidea/chegg-i70/src/Sorting.java
5efddb4d1d925a9f86a32feecde9f7bf46913892
[]
no_license
amitkumar-panchal/ChQuestiions
88b6431d3428a14b0e5619ae6a30b8c851476de7
448ec1368eca9544fde0c40f892d68c3494ca209
refs/heads/master
2022-12-09T18:03:14.954130
2020-09-23T01:58:17
2020-09-23T01:58:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,548
java
public class Sorting { // Helper methods // These operations will occur multiple times in our sorting methods, // so we add methods for them here private static <T extends Comparable<T>> boolean less_than(T a, T b) { return (a.compareTo(b) < 0); } private static <T extends Comparable<T>> boolean less_than_equal(T a, T b) { return (a.compareTo(b) <= 0); } private static <T extends Comparable<T>> boolean greater_than(T a, T b) { return (a.compareTo(b) > 0); } private static <T> void swap(Object[] a, int ii, int jj) { Object swap = a[ii]; a[ii] = a[jj]; a[jj] = swap; } public static <T extends Comparable> boolean isSorted(T[]data){ return isSorted(data, 0, data.length-1); } public static <T extends Comparable<T>> boolean isSorted(T[] data, int min, int max){ for (int ii=min+1; ii<=max; ii++) { if (less_than(data[ii], data[ii-1])) return false; } return true; } // Selection Sort public static <T extends Comparable> void selectionSort (T[] data) { selectionSort (data, 0, data.length-1); } public static <T extends Comparable<T>> void selectionSort (T[] data, int min, int max) { int indexOfSmallest; // Smallest element found this pass min = Math.max(min, 0); max = Math.min(max, data.length-1); // ii is the starting point for each pass for(int ii=min; ii <= max; ii++ ) { indexOfSmallest = ii; for (int scan=ii+1; scan<=max; scan++) { if (less_than(data[scan], data[indexOfSmallest])) { indexOfSmallest = scan; } } swap(data, indexOfSmallest, ii); } } public static <T extends Comparable> void insertionSort(T[] data) { insertionSort(data, 0, data.length-1); } public static <T extends Comparable> void insertionSort(T[] data, int min, int max) { int start = Math.max(min, 1); int end = Math.min(max, data.length-1); for (int index = start; index <= end; index++) { int position = index; // shift larger values to the right while (position > 0 && greater_than(data[position-1],data[position])) { swap(data, position, position-1); position--; } } } public static <T extends Comparable> void bubbleSort(T[] data) { bubbleSort(data, 0, data.length-1); } public static <T extends Comparable> void bubbleSort(T[] data, int min, int max) { int position, scan; min = Math.max(min, 0); max = Math.min(max, data.length-1); // position is the "stopping point" for each pass for (position = max; position >= min; position--) { for (scan = 0; scan < position; scan++) { if (greater_than(data[scan],data[scan+1])) swap(data, scan, scan + 1); } } } public static <T extends Comparable> void mergeSort(T[] data) { mergeSort(data, 0, data.length-1); } private static <T extends Comparable> void mergeSort(T[] data, int min, int max) { if (min < max) { int mid = min + ((max - min) / 2); mergeSort(data, min, mid); mergeSort(data, mid+1, max); merge(data, min, mid, max); } } private static <T extends Comparable> void merge(T[] data, int first, int mid, int last) { T[] temp = (T[])(new Comparable[data.length]); // temp array // The two subarrays have already been sorted int first1 = first, last1 = mid; // endpoints of first subarray int first2 = mid+1, last2 = last; // endpoints of second subarray int index = first1; // next index open in temp array // Copy smaller item from each subarray into temp until one // of the subarrays is exhausted // while both sub arrays have items left while (first1 <= last1 && first2 <= last2) { if (less_than(data[first1],data[first2])) { temp[index] = data[first1]; first1++; } else { temp[index] = data[first2]; first2++; } index++; } // Only one of the while loops below will execute // Copy remaining elements from first subarray, if any while (first1 <= last1) { temp[index] = data[first1]; first1++; index++; } // Copy remaining elements from second subarray, if any while (first2 <= last2) { temp[index] = data[first2]; first2++; index++; } // Copy merged data into original array for (index = first; index <= last; index++) data[index] = temp[index]; } public static <T extends Comparable> void quickSort(T[] data) { quickSort(data, 0, data.length-1); } private static <T extends Comparable> void quickSort(T[] data, int min, int max) { if (min < max) { // create partitions int indexofpartition = partition(data, min, max); // sort the left partition (lower values) quickSort(data, min, indexofpartition - 1); // sort the right partition (higher values) quickSort(data, indexofpartition + 1, max); } } private static <T extends Comparable> int partition(T[] data, int min, int max) { T partitionelement; int left, right; int middle = min + ((max - min) / 2); // use the middle data value as the partition element partitionelement = data[middle]; // move it out of the way for now swap(data, middle, min); left = min; right = max; while (left < right) { // search for an element that is > the partition element while (left < right && less_than_equal(data[left],partitionelement)) left++; // search for an element that is < the partition element while (greater_than(data[right], partitionelement)) right--; // swap the elements if (left < right) swap(data, left, right); } // move the partition element into place swap(data, min, right); return right; } // Project 7 - Complete the following method // use cocktail sorting algorithm public static <T extends Comparable> void sort(T[] data) { // Project 7 int s = 0; int e = data.length - 1; while (true){ // first iterative loop of cocktail sort for (int i = s; i < e; i++){ if (greater_than(data[i], data[i+1])){ swap(data, i, i+1); } } if (isSorted(data)){ break; } e-=1; // second iterative loop of cocktail sort for (int i = e-1; i >= s; i--){ if (greater_than(data[i], data[i+1])){ swap(data, i, i+1); } } if (isSorted(data)){ break; } s+=1; } } }
[ "=" ]
=
2887f7f34fe80a7f90608b2520f0a67244d156ea
2b503082fab7cbcaa7b3ea592c5ef7ef3dd88a8b
/util/NFGetSetMaxMin.java
599c8f14ba3bcf379efabfd1fca5f907382d5653
[]
no_license
takagotch/java
38d2aceca3bb30ed689d45e43e0315f28fd3ac6f
44d9ed4fd5d0ff438c90f19fd287623a0a16c066
refs/heads/master
2021-04-09T13:14:16.376220
2019-07-09T18:08:00
2019-07-09T18:08:00
103,270,566
0
0
null
null
null
null
UTF-8
Java
false
false
560
java
//public int getMaximumIntegerDigits() //public int getMinimumIntegerDigits() //public int getMaximumFractionDigits() //public int getMinimymFractionDigits() //public void setMaximumIntegerDigits(int newValue) //public void setMinimumIntegerDigits(int newValue) //public void setMaximumFractionDigits(int newValue) //public void setMaximymFractionDigits(int newValue) NumberFormat nf = NumberFormat.getInstance(); nf.setMinimumFractionDigits(2); System.out.println("少なくとも小数点以下" nf.getMinimumFractionDigits() + "位:" + nf.format(100));
[ "dyaccb@gmail.com" ]
dyaccb@gmail.com
0dcde4254174fc8be7071c6d6f3a8383c61ee7b3
d669e67a5cfd22363b20cc7dc1c56fcb230454ec
/src/davi/mutation/borda/AORB_22/BorderDetection.java
bcf5c3f5ee8eb3638850cce919482cd21f776655
[ "Apache-2.0" ]
permissive
DaviSRodrigues/TAIGA
f1fe37583bd5009fa0ee192954d0c5ce5d051ee0
7997a8e4a31a177335178571a443b03f1bf3f2e4
refs/heads/master
2022-04-10T16:11:10.871395
2020-03-09T14:34:04
2020-03-09T14:34:04
101,459,116
0
0
null
null
null
null
UTF-8
Java
false
false
1,912
java
// This is a mutant program. // Author : ysma package davi.mutation.borda.AORB_22; import java.awt.image.WritableRaster; import davi.genetic.algorithm.Image; public class BorderDetection { public static void main( java.lang.String[] args ) throws java.lang.Exception { } public static davi.genetic.algorithm.Image metodoGradiente( davi.genetic.algorithm.Image imagem ) { int linha; int coluna; int nivelCinza; int nivelCinzaVizinhoLin; int nivelCinzaVizinhoCol; int largura; int altura; try { largura = imagem.getWidth(); altura = imagem.getHeight(); java.awt.image.WritableRaster rasterEscrita = imagem.getBufferedImage().getRaster(); for (linha = 0; linha < altura - 1; linha++) { for (coluna = 0; coluna < largura - 1; coluna++) { nivelCinza = rasterEscrita.getSample( coluna, linha, 0 ); nivelCinzaVizinhoLin = rasterEscrita.getSample( coluna, linha + 1, 0 ); nivelCinzaVizinhoCol = rasterEscrita.getSample( coluna + 1, linha, 0 ); nivelCinza = Math.abs( nivelCinza - nivelCinzaVizinhoLin ) + Math.abs( nivelCinza / nivelCinzaVizinhoCol ); if (nivelCinza > 255) { nivelCinza = 255; } rasterEscrita.setSample( coluna, linha, 0, nivelCinza ); verificaTimeout(); } verificaTimeout(); } } catch ( java.lang.Exception e ) { return null; } return imagem; } public static void verificaTimeout() throws java.lang.InterruptedException { if (Thread.currentThread().isInterrupted()) { throw new java.lang.InterruptedException(); } } }
[ "davisilvarodrigues@gmail.com" ]
davisilvarodrigues@gmail.com
69ac06925212bd6d8307f18fcd6297cd6c373a6f
45fac1dc7af510f9f67c3da2bbea4698a91b6f0d
/src/main/java/com/pro/scm/persistencedto/AllApprovalItemListPersistenceDto.java
e857a23e52f137b889f20f079b64432cc8fc3c77
[]
no_license
Ranjeetkumars/scm_service
bd11182629c2d99d96470b1fb6c9a00bce3ee0c6
4b090560f1a260022f4afe3a205d0a1900a6eeb9
refs/heads/master
2023-07-17T01:41:48.603355
2021-09-03T08:11:17
2021-09-03T08:11:17
402,695,172
0
0
null
null
null
null
UTF-8
Java
false
false
388
java
package com.pro.scm.persistencedto; import lombok.Data; @Data public class AllApprovalItemListPersistenceDto { private String citIndentId; private String drDrudName; private String dbDrugBrandLang1; private String dfFormType; private String drStrengthType; private String maCompanyName; private String citIndentQty; private String citApprovedQty; private String citItemId; }
[ "ranjeetkumar@procreate.co.in" ]
ranjeetkumar@procreate.co.in
e781d406d2cd2640863b4a5bc3d2087809e38a79
c19435aface677d3de0958c7fa8b0aa7e3b759f3
/web/rest-ui/src/main/java/org/artifactory/ui/rest/resource/distribution/ReleaseBundleUIResource.java
96769fd665fb077837053edfee6e29f39e370a9a
[]
no_license
apaqi/jfrog-artifactory-5.11.0
febc70674b4a7b90f37f2dfd126af36b90784c28
6a4204ed9ce9334d3eb7a8cb89c1d9dc72d709c1
refs/heads/master
2020-03-18T03:13:41.286825
2018-05-21T06:57:30
2018-05-21T06:57:30
134,229,368
0
0
null
null
null
null
UTF-8
Java
false
false
1,912
java
package org.artifactory.ui.rest.resource.distribution; import org.artifactory.api.security.AuthorizationService; import org.artifactory.rest.common.resource.BaseResource; import org.artifactory.ui.rest.service.distribution.ReleaseBundleServiceFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import javax.annotation.security.RolesAllowed; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import static org.artifactory.api.rest.constant.SystemRestConstants.JFROG_RELEASE; @Path("bundles") @Component @Scope(BeanDefinition.SCOPE_PROTOTYPE) public class ReleaseBundleUIResource extends BaseResource { @Autowired ReleaseBundleServiceFactory releaseBundleService; @GET @Produces(MediaType.APPLICATION_JSON) @RolesAllowed({AuthorizationService.ROLE_ADMIN}) public Response getBundles() { return runService(releaseBundleService.getAllBundles()); } @GET @Path("{name}") @Produces(MediaType.APPLICATION_JSON) @RolesAllowed({AuthorizationService.ROLE_ADMIN}) public Response getBundleVersions() { return runService(releaseBundleService.getAllBundleVersions()); } @GET @Path("{name}/{version}") @Produces(MediaType.APPLICATION_JSON) @RolesAllowed({AuthorizationService.ROLE_ADMIN}) public Response getBundle() { return runService(releaseBundleService.getReleaseBundle()); } @DELETE @Path("{name}/{version}") @Produces(MediaType.APPLICATION_JSON) @RolesAllowed({AuthorizationService.ROLE_ADMIN}) public Response deleteBundle(@QueryParam("include_content") Boolean includeContent) { return runService(releaseBundleService.deleteReleaseBundle()); } }
[ "wangpeixuan00@126.com" ]
wangpeixuan00@126.com
f67d28c1e2f1a9c95433057183c3a2ae29761db8
81b3984cce8eab7e04a5b0b6bcef593bc0181e5a
/android/CarLife/app/src/main/java/com/baidu/carlife/view/dialog/C2331v.java
bd5a0e67f64a17d0e659fe6bd710ad4cc0a10af8
[]
no_license
ausdruck/Demo
20ee124734d3a56b99b8a8e38466f2adc28024d6
e11f8844f4852cec901ba784ce93fcbb4200edc6
refs/heads/master
2020-04-10T03:49:24.198527
2018-07-27T10:14:56
2018-07-27T10:14:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,453
java
package com.baidu.carlife.view.dialog; import android.content.Context; import android.view.KeyEvent; import android.view.View; import android.view.View.OnKeyListener; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.FrameLayout.LayoutParams; import android.widget.ListView; import com.baidu.carlife.C0965R; import com.baidu.carlife.core.C1253f; import com.baidu.carlife.p078f.C1438c; import com.baidu.carlife.p078f.C1440d; import com.baidu.carlife.p078f.C1443g; /* compiled from: VoiceDialog */ /* renamed from: com.baidu.carlife.view.dialog.v */ public class C2331v extends BaseDialog { /* renamed from: e */ private FrameLayout f7644e; /* renamed from: f */ private int f7645f; /* renamed from: g */ private int f7646g; /* renamed from: h */ private OnKeyListener f7647h; /* renamed from: i */ private C1443g f7648i; /* renamed from: j */ private C1438c f7649j; /* compiled from: VoiceDialog */ /* renamed from: com.baidu.carlife.view.dialog.v$1 */ class C23301 implements OnKeyListener { /* renamed from: a */ final /* synthetic */ C2331v f7643a; C23301(C2331v this$0) { this.f7643a = this$0; } public boolean onKey(View v, int keyCode, KeyEvent event) { if (event == null || event.getAction() != 0 || keyCode != 21) { return false; } this.f7643a.mo1526d(); return true; } } public C2331v(Context context, View view, int styleId) { super(context, null, C0965R.style.CommonRightListDialog); this.f7645f = -1; this.f7646g = 0; this.f7647h = new C23301(this); this.b.removeMsg(C1253f.hb); } public C2331v(Context context, View view, int styleId, int width, int gravity) { this(context, view, C0965R.style.CommonRightListDialog); this.f7645f = width; this.f7646g = gravity; LayoutParams layoutParams = (LayoutParams) this.f7644e.getLayoutParams(); layoutParams.gravity = this.f7646g; this.f7644e.setLayoutParams(layoutParams); this.f7644e.addView(view); ViewGroup.LayoutParams viewParams = view.getLayoutParams(); viewParams.width = this.f7645f; view.setLayoutParams(viewParams); } /* renamed from: a */ protected View mo1528a() { this.f7644e = new FrameLayout(this.c); return this.f7644e; } /* renamed from: b */ protected void mo1529b() { setCanceledOnTouchOutside(true); } /* renamed from: f */ public void mo1530f() { if (this.f7648i == null) { this.f7648i = new C1443g(this.f7644e.findViewById(C0965R.id.rl_top), 7); this.f7648i.m5300d(this.f7644e.findViewById(C0965R.id.iv_voice_close)).m5300d(this.f7644e.findViewById(C0965R.id.iv_voice_help)); } if (this.f7649j == null) { this.f7649j = new C1438c((ListView) this.f7644e.findViewById(C0965R.id.lv_multi_result), 11); } this.f7648i.m5295a(this.f7647h); this.f7649j.m5249a(this.f7647h); this.f7648i.m5244a(true); this.f7649j.m5244a(true); C1440d.m5251a().m5253a(this.f7648i, this.f7649j); } /* renamed from: i */ public void mo1630i() { C1440d.m5251a().m5253a(this.f7648i, this.f7649j); C1440d.m5251a().m5268h(this.f7648i); } }
[ "objectyan@gmail.com" ]
objectyan@gmail.com
31f56f0f22530374a2e5cc14498cbd4ff1f623d8
5143dbcd52fe580950c92f777aaf8137a0ae8d1f
/wanbei-dal/src/main/java/com/amateur/wanbei/dao/mapper/WxLoanOrderMapper.java
3a139fc1676da50ca49f38c5e5dfca231bc6c1f7
[]
no_license
amanic/fastBootWeixinDemo
cb0b30f5c04d3eaf4da1b54904b74856565e1a67
d1245e2dd22298c2373a0bf937e5c35a560f30a6
refs/heads/master
2020-03-23T00:57:20.976972
2018-07-13T21:19:25
2018-07-13T21:19:25
140,893,564
0
0
null
null
null
null
UTF-8
Java
false
false
3,079
java
package com.amateur.wanbei.dao.mapper; import com.amateur.wanbei.dao.entity.WxLoanOrder; import com.amateur.wanbei.dao.entity.WxLoanOrderExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface WxLoanOrderMapper { /** * This method was generated by MyBatis Generator. * This method corresponds to the database table wx_loan_order * * @mbggenerated Mon Jun 11 09:51:14 CST 2018 */ int countByExample(WxLoanOrderExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table wx_loan_order * * @mbggenerated Mon Jun 11 09:51:14 CST 2018 */ int deleteByExample(WxLoanOrderExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table wx_loan_order * * @mbggenerated Mon Jun 11 09:51:14 CST 2018 */ int deleteByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table wx_loan_order * * @mbggenerated Mon Jun 11 09:51:14 CST 2018 */ int insert(WxLoanOrder record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table wx_loan_order * * @mbggenerated Mon Jun 11 09:51:14 CST 2018 */ int insertSelective(WxLoanOrder record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table wx_loan_order * * @mbggenerated Mon Jun 11 09:51:14 CST 2018 */ List<WxLoanOrder> selectByExample(WxLoanOrderExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table wx_loan_order * * @mbggenerated Mon Jun 11 09:51:14 CST 2018 */ WxLoanOrder selectByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table wx_loan_order * * @mbggenerated Mon Jun 11 09:51:14 CST 2018 */ int updateByExampleSelective(@Param("record") WxLoanOrder record, @Param("example") WxLoanOrderExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table wx_loan_order * * @mbggenerated Mon Jun 11 09:51:14 CST 2018 */ int updateByExample(@Param("record") WxLoanOrder record, @Param("example") WxLoanOrderExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table wx_loan_order * * @mbggenerated Mon Jun 11 09:51:14 CST 2018 */ int updateByPrimaryKeySelective(WxLoanOrder record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table wx_loan_order * * @mbggenerated Mon Jun 11 09:51:14 CST 2018 */ int updateByPrimaryKey(WxLoanOrder record); }
[ "1642485710@qq.com" ]
1642485710@qq.com
dc7ca525ffb64f8aa3da55bd76d21f380bcff176
19ba8f487f1bc8965b6155469acae4d5059c77c5
/src/main/java/mx/tiendas3b/tdexpress/entities/TicketCategoria.java
c29681af2687cc61535c12284bd6e34f5ccd1a2d
[]
no_license
opelayoa/tdexpress
a7c8460159786b3a7ee2f40912788fd62c17cb07
d917858db7dcbce94d42c7e2d940af80c72ea11f
refs/heads/master
2020-04-26T14:31:52.936070
2019-06-10T02:11:55
2019-06-10T02:11:55
173,617,629
0
0
null
null
null
null
UTF-8
Java
false
false
1,632
java
package mx.tiendas3b.tdexpress.entities; // Generated 6/03/2019 08:17:38 AM by Hibernate Tools 4.3.5.Final import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import static javax.persistence.GenerationType.IDENTITY; import javax.persistence.Id; import javax.persistence.Table; /** * TicketCategoria generated by hbm2java */ @Entity @Table(name = "ticket_categoria", catalog = "itaid") public class TicketCategoria implements java.io.Serializable { private Integer id; private int valor; private String descripcion; private Integer activo; public TicketCategoria() { } public TicketCategoria(int valor, String descripcion) { this.valor = valor; this.descripcion = descripcion; } public TicketCategoria(int valor, String descripcion, Integer activo) { this.valor = valor; this.descripcion = descripcion; this.activo = activo; } @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "id", unique = true, nullable = false) public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } @Column(name = "valor", nullable = false) public int getValor() { return this.valor; } public void setValor(int valor) { this.valor = valor; } @Column(name = "descripcion", nullable = false, length = 50) public String getDescripcion() { return this.descripcion; } public void setDescripcion(String descripcion) { this.descripcion = descripcion; } @Column(name = "activo") public Integer getActivo() { return this.activo; } public void setActivo(Integer activo) { this.activo = activo; } }
[ "od.pelayo@gmail.com" ]
od.pelayo@gmail.com
5c255a47d4e84f548fbe5de8afdd23be15f286d4
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
/services/workspace/src/main/java/com/huaweicloud/sdk/workspace/v2/model/ShowAssistAuthConfigRequest.java
cae18a8369c1c9f493e7e16dbab3bfee893b3421
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-java-v3
51b32a451fac321a0affe2176663fed8a9cd8042
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
refs/heads/master
2023-08-29T06:50:15.642693
2023-08-24T08:34:48
2023-08-24T08:34:48
262,207,545
91
57
NOASSERTION
2023-09-08T12:24:55
2020-05-08T02:27:00
Java
UTF-8
Java
false
false
691
java
package com.huaweicloud.sdk.workspace.v2.model; import java.util.Objects; /** * Request Object */ public class ShowAssistAuthConfigRequest { @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } return true; } @Override public int hashCode() { return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ShowAssistAuthConfigRequest {\n"); sb.append("}"); return sb.toString(); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
d22e7ce611bd13eab80dc61ec838974c7cccb607
3c5e0a73867838bc2afbc3b431dcc53ef8ea3af0
/src/com/htsoft/oa/service/system/impl/RelativeUserServiceImpl.java
88ba5d1dbd63396874684d505ca9b255175626f1
[]
no_license
cjp472/crm
5f5d21c9b2307ab5d144ca8a762f374823a950c4
d4a7f4dbf2983f0d3abb38ba0d0a916c08cb0c86
refs/heads/master
2020-03-19T09:48:34.976163
2018-05-05T07:47:27
2018-05-05T07:47:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,739
java
package com.htsoft.oa.service.system.impl; /* * 北京优创融联科技有限公司 综合客服管理系统 -- http://www.ulane.cn * Copyright (C) 2008-2010 Beijing Ulane Technology Co., LTD */ import java.util.List; import java.util.Set; import com.htsoft.core.service.impl.BaseServiceImpl; import com.htsoft.core.web.paging.PagingBean; import com.htsoft.oa.dao.system.RelativeUserDao; import com.htsoft.oa.model.system.AppUser; import com.htsoft.oa.model.system.RelativeUser; import com.htsoft.oa.service.system.RelativeUserService; /** * @description 相对岗位人员管理 * @author 优创融联科技 * @company www.ulane.con * @data 2010-12-13PM * */ public class RelativeUserServiceImpl extends BaseServiceImpl<RelativeUser> implements RelativeUserService { private RelativeUserDao dao; public RelativeUserServiceImpl(RelativeUserDao dao) { super(dao); this.dao = dao; } /** * 根据userId和jobUserId查询对应数据的总行数 */ @Override public AppUser judge(Long userId, Long jobUserId) { return dao.judge(userId, jobUserId); } @Override public List<AppUser> findByUserIdReJobId(Long userId, Long reJobId) { return dao.findByUserIdReJobId(userId, reJobId); } @Override public List<RelativeUser> list(Long appUserId, Long reJobId, PagingBean pb) { return dao.list(appUserId, reJobId, pb); } /** * 取得某个用户的相对岗位人员 * @param userId 用户ID * @param reJobId 相对岗位ID * @return */ public List<Long> getReJobUserIds(Long userId,Long reJobId){ return dao.getReJobUserIds(userId, reJobId); } /** * 取得某个用户的上级 */ @Override public Set<AppUser> getUpUser(Long userId) { return dao.getUpUser(userId); } }
[ "huyang3868@163.com" ]
huyang3868@163.com
1140f26351471795b53af93e56988eeee8eb16e1
e51f9e4e65d819ae097527a9d843d8d5630da440
/idea源码/Important_Point_java/src/main/java/java设计模式/工厂方法设计模式/MailSender.java
61abb4e87bec57e0afb95c3a3a8de0fb85c95e0b
[]
no_license
MyCookie513/study-notes-new
16abe189a9dbb8809825a67976244c4ab563755e
c4a1ec928eec0483f971c979551d6c46dfaf5a00
refs/heads/master
2022-12-24T03:45:54.414997
2019-10-28T14:32:53
2019-10-28T14:32:53
200,564,071
0
0
null
2022-12-16T09:41:31
2019-08-05T01:52:21
JavaScript
UTF-8
Java
false
false
252
java
package java设计模式.工厂方法设计模式; import java设计模式.工厂方法设计模式.Sender; public class MailSender implements Sender { @Override public void Send() { System.out.println("this is mailsender!"); } }
[ "893943814@qq.com" ]
893943814@qq.com
213f20076c51ae2606641168a7e0c1b2cd1d0dcd
e112ee9fba8cfcf368217277dfc25b976026a232
/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/java/org/apache/tuscany/sca/binding/sca/DisableWrappedImpl.java
7435695fb6205f101fb3efb0d850fef5645f9243
[ "Apache-2.0", "W3C-19980720", "BSD-3-Clause", "W3C", "LicenseRef-scancode-proprietary-license", "MIT" ]
permissive
apache/tuscany-sca-2.x
3ea2dc984b980d925ac835b6ac0dfcd4541f94b6
89f2d366d4b0869a4e42ff265ccf4503dda4dc8b
refs/heads/trunk
2023-09-01T06:21:08.318064
2013-09-10T16:50:53
2013-09-10T16:50:53
390,004
19
22
Apache-2.0
2023-08-29T21:33:50
2009-11-30T09:00:10
Java
UTF-8
Java
false
false
2,930
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tuscany.sca.binding.sca; import org.apache.tuscany.sca.binding.sca.jaxb.iface.*; import org.oasisopen.sca.annotation.Service; @Service(GuessAndGreetDisableWrapped.class) public class DisableWrappedImpl implements GuessAndGreetDisableWrapped { public SendGuessAndNameResponse sendGuessAndName(SendGuessAndName request) throws WayTooLowFaultMsg, IncorrectGuessFaultMsg, GameOverFaultMsg, WayTooHighFaultMsg, OneTwoThreeFaultMsg { int guess = request.getGuess(); String name = request.getName(); Person inPerson = request.getPerson(); if (guess == 0) { org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory factory = new org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory(); IncorrectGuessFault faultBean = factory.createIncorrectGuessFault(); //set values for exception faultBean.setGuess(guess); String hint = "Try non-zero"; faultBean.setHint(hint); IncorrectGuessFaultMsg exc = new IncorrectGuessFaultMsg("Exc from GuessAndGreetImpl", faultBean); throw exc; } //magic # is correct, return a person object. org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory personFactory = new org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory(); Person person = personFactory.createPerson(); String[] names = name.split(" "); person.setFirstName(names[0]); if (names.length < 2){ person.setLastName("Doe"); } else { person.setLastName(names[1]); } person.setGreeting("Winner!"); person.setChild(inPerson); org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory wrapperFactory = new org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory(); SendGuessAndNameResponse response = wrapperFactory.createSendGuessAndNameResponse(); response.setPerson(person); return response; } }
[ "slaws@apache.org" ]
slaws@apache.org
0ffdcfe51dd6d8315065a0bab4186918d1fd1581
51843342781f18731b4e157364f8dacd087bb225
/bus-spring/src/main/java/org/aoju/bus/spring/time/TimeZoneConfig.java
81be4628fc5c968fe1a1a099a51f9c24564ad454
[ "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
3,845
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.spring.time; import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.datatype.jsr310.PackageVersion; import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer; import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; import org.springframework.context.annotation.Bean; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.Locale; import java.util.TimeZone; /** * JDK8 日期格式化 * * @author Kimi Liu * @version 3.0.9 * @since JDK 1.8 */ public class TimeZoneConfig { @Value("${spring.jackson.date-format:yyyy-MM-dd HH:mm:ss}") private String pattern; @Bean public Jackson2ObjectMapperBuilderCustomizer customizer() { return builder -> { builder.locale(Locale.CHINA); builder.timeZone(TimeZone.getTimeZone(ZoneId.systemDefault())); builder.simpleDateFormat(pattern); builder.modules(new JavaTimeModule()); }; } class JavaTimeModule extends SimpleModule { private static final String NORM_DATE_PATTERN = "yyyy-MM-dd"; private static final String NORM_TIME_PATTERN = "HH:mm:ss"; private static final String NORM_DATETIME_PATTERN = "yyyy-MM-dd HH:mm:ss"; JavaTimeModule() { super(PackageVersion.VERSION); this.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(NORM_DATETIME_PATTERN))); this.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern(NORM_DATE_PATTERN))); this.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern(NORM_TIME_PATTERN))); this.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(NORM_DATETIME_PATTERN))); this.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern(NORM_DATE_PATTERN))); this.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern(NORM_TIME_PATTERN))); } } }
[ "839536@QQ.COM" ]
839536@QQ.COM
92802e93de1ea2799d1cbe51b605bb8b2652d667
5d070f3bccd54cddb3259102f2019443298126db
/com/chartboost/sdk/Libraries/C1201j.java
22989b03a7af8fc2742aa099da2aac555aecde30
[]
no_license
ajayscariya/Touch2Kill-files
683e5d002df2d23b084ab5b0786762e14f038ba0
7660e584c5b7f743a1535b75476d1c0ef050dc7e
refs/heads/master
2020-04-10T19:06:11.795665
2016-09-14T17:19:20
2016-09-14T17:19:20
68,216,032
0
0
null
null
null
null
UTF-8
Java
false
false
7,334
java
package com.chartboost.sdk.Libraries; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.BitmapFactory.Options; import android.os.Bundle; import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; import android.text.TextUtils; import com.android.volley.DefaultRetryPolicy; import com.chartboost.sdk.C0320g; import com.chartboost.sdk.C0320g.C0319b; import com.chartboost.sdk.Libraries.C0271e.C0269a; import com.chartboost.sdk.impl.bc; import com.chartboost.sdk.impl.bc.C0361b; import com.wTouch2KiLL.storage.DatabaseOpenHelper; import java.io.File; import mf.javax.xml.XMLConstants; /* renamed from: com.chartboost.sdk.Libraries.j */ public final class C1201j implements C0319b { private C0281a f3992a; private C0320g f3993b; private String f3994c; private float f3995d; private C0361b f3996e; /* renamed from: com.chartboost.sdk.Libraries.j.2 */ class C02802 implements Runnable { final /* synthetic */ C0269a f548a; final /* synthetic */ String f549b; final /* synthetic */ Bundle f550c; final /* synthetic */ C1201j f551d; C02802(C1201j c1201j, C0269a c0269a, String str, Bundle bundle) { this.f551d = c1201j; this.f548a = c0269a; this.f549b = str; this.f550c = bundle; } public void run() { String str = XMLConstants.NULL_NS_URI; if (!(this.f548a.m442e("checksum") == null || this.f548a.m442e("checksum").isEmpty())) { str = this.f548a.m442e("checksum"); } bc.m956a().m962a(this.f549b, str, this.f551d.f3996e, null, this.f550c == null ? new Bundle() : this.f550c); } } /* renamed from: com.chartboost.sdk.Libraries.j.a */ public static class C0281a { private int f552a; private String f553b; private File f554c; private Bitmap f555d; private C0278h f556e; private int f557f; private int f558g; public C0281a(String str, File file, C0278h c0278h) { this.f557f = -1; this.f558g = -1; this.f554c = file; this.f553b = str; this.f555d = null; this.f552a = 1; this.f556e = c0278h; } public Bitmap m544a() { if (this.f555d == null) { m545b(); } return this.f555d; } public void m545b() { if (this.f555d == null) { CBLogging.m379a("MemoryBitmap", "Loading image '" + this.f553b + "' from cache"); byte[] b = this.f556e.m515b(this.f554c); if (b == null) { CBLogging.m381b("MemoryBitmap", "decode() - bitmap not found"); return; } Options options = new Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeByteArray(b, 0, b.length, options); Options options2 = new Options(); options2.inJustDecodeBounds = false; options2.inDither = false; options2.inPurgeable = true; options2.inInputShareable = true; options2.inTempStorage = new byte[AccessibilityNodeInfoCompat.ACTION_PASTE]; options2.inSampleSize = 1; while (options2.inSampleSize < 32) { try { this.f555d = BitmapFactory.decodeByteArray(b, 0, b.length, options2); break; } catch (Throwable e) { CBLogging.m382b("MemoryBitmap", "OutOfMemoryError suppressed - trying larger sample size", e); options2.inSampleSize *= 2; } catch (Throwable e2) { CBLogging.m382b("MemoryBitmap", "Exception raised decoding bitmap", e2); } } this.f552a = options2.inSampleSize; } } public void m546c() { try { if (!(this.f555d == null || this.f555d.isRecycled())) { this.f555d.recycle(); } } catch (Exception e) { } this.f555d = null; } public int m547d() { if (this.f555d != null) { return this.f555d.getWidth(); } if (this.f557f >= 0) { return this.f557f; } m543f(); return this.f557f; } public int m548e() { if (this.f555d != null) { return this.f555d.getHeight(); } if (this.f558g >= 0) { return this.f558g; } m543f(); return this.f558g; } private void m543f() { try { Options options = new Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeFile(this.f554c.getAbsolutePath(), options); this.f557f = options.outWidth; this.f558g = options.outHeight; } catch (Throwable e) { CBLogging.m382b("MemoryBitmap", "Error decoding file size", e); } } } /* renamed from: com.chartboost.sdk.Libraries.j.1 */ class C12001 implements C0361b { final /* synthetic */ C1201j f3991a; C12001(C1201j c1201j) { this.f3991a = c1201j; } public void m4338a(C0281a c0281a, Bundle bundle) { this.f3991a.f3992a = c0281a; this.f3991a.f3993b.m773a(this.f3991a); } } public C1201j(C0320g c0320g) { this.f3995d = DefaultRetryPolicy.DEFAULT_BACKOFF_MULT; this.f3996e = new C12001(this); this.f3993b = c0320g; } public int m4345b() { return this.f3992a.m547d() * this.f3992a.f552a; } public int m4346c() { return this.f3992a.m548e() * this.f3992a.f552a; } public void m4343a(String str) { m4342a(this.f3993b.m785g(), str, new Bundle()); } public void m4342a(C0269a c0269a, String str, Bundle bundle) { C0269a a = c0269a.m431a(str); this.f3994c = str; if (!a.m435b()) { Object e = a.m442e(DatabaseOpenHelper.HISTORY_ROW_URL); this.f3995d = a.m431a("scale").m429a((float) DefaultRetryPolicy.DEFAULT_BACKOFF_MULT); if (!TextUtils.isEmpty(e)) { this.f3993b.m779b((C0319b) this); CBUtility.m400e().post(new C02802(this, a, e, bundle)); } } } public boolean m4344a() { return m4348e(); } public void m4347d() { if (this.f3992a != null) { this.f3992a.m546c(); } } public boolean m4348e() { return this.f3992a != null; } public Bitmap m4349f() { return this.f3992a != null ? this.f3992a.m544a() : null; } public float m4350g() { return this.f3995d; } public int m4351h() { return Math.round(((float) m4345b()) / this.f3995d); } public int m4352i() { return Math.round(((float) m4346c()) / this.f3995d); } }
[ "arjunwarrier2000@gmail.com" ]
arjunwarrier2000@gmail.com
279554f6adb5c494f51d35df8abacf57080e6eb9
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/alt236_USB-Device-Info---Android/app/src/main/java/aws/apps/usbDeviceEnumerator/ui/dbupdate/DatabaseUpdater.java
1ae9cc23c6cb1949d94bb2f33022d51460a4ba61
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,778
java
// isComment package aws.apps.usbDeviceEnumerator.ui.dbupdate; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.os.Environment; import android.util.Log; import java.util.ArrayList; import java.util.List; import aws.apps.usbDeviceEnumerator.R; import aws.apps.usbDeviceEnumerator.data.DataProviderCompanyInfo; import aws.apps.usbDeviceEnumerator.data.DataProviderCompanyLogo; import aws.apps.usbDeviceEnumerator.data.DataProviderUsbInfo; import aws.apps.usbDeviceEnumerator.ui.common.DialogFactory; import aws.apps.usbDeviceEnumerator.ui.progress.ProgressDialogControl; import aws.apps.usbDeviceEnumerator.util.NetworkUtils; import aws.apps.usbDeviceEnumerator.util.NotifyUser; public class isClassOrIsInterface { private static final String isVariable = DatabaseUpdater.class.isMethod(); private final ProgressDialogControl isVariable; private final DataProviderCompanyInfo isVariable; private final DataProviderUsbInfo isVariable; private final DataProviderCompanyLogo isVariable; public isConstructor(final ProgressDialogControl isParameter, final DataProviderCompanyInfo isParameter, final DataProviderUsbInfo isParameter, final DataProviderCompanyLogo isParameter) { this.isFieldAccessExpr = isNameExpr; this.isFieldAccessExpr = isNameExpr; this.isFieldAccessExpr = isNameExpr; this.isFieldAccessExpr = isNameExpr; } public void isMethod(final Context isParameter) { if (isMethod(isNameExpr)) { final AlertDialog.Builder isVariable = new AlertDialog.Builder(isNameExpr); final List<FileDownloadTask.Downloadable> isVariable = isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr).isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr.isFieldAccessExpr, null).isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr.isFieldAccessExpr, new DialogInterface.OnClickListener() { @SuppressWarnings("isStringConstant") @Override public void isMethod(DialogInterface isParameter, int isParameter) { final FileDownloadTask.Downloadable[] isVariable = isNameExpr.isMethod(new FileDownloadTask.Downloadable[isNameExpr.isMethod()]); new FileDownloadTask(isNameExpr, isNameExpr).isMethod(isNameExpr); } }); isNameExpr.isMethod().isMethod(); } } private boolean isMethod(final Context isParameter) { final boolean isVariable; if (!isNameExpr.isFieldAccessExpr.isMethod(isNameExpr.isMethod())) { isNameExpr.isMethod(isNameExpr, "isStringConstant"); isNameExpr.isMethod(isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr = true; } else if (!isNameExpr.isMethod(isNameExpr)) { // isComment isNameExpr.isMethod(isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr).isMethod(); isNameExpr = true; } else { isNameExpr = true; } return isNameExpr; } private List<FileDownloadTask.Downloadable> isMethod(final Context isParameter) { final List<FileDownloadTask.Downloadable> isVariable = new ArrayList<FileDownloadTask.Downloadable>(); isNameExpr.isMethod(new FileDownloadTask.Downloadable(isNameExpr.isMethod(), isNameExpr.isMethod())); isNameExpr.isMethod(new FileDownloadTask.Downloadable(isNameExpr.isMethod(), isNameExpr.isMethod())); isNameExpr.isMethod(new FileDownloadTask.Downloadable(isNameExpr.isMethod(), isNameExpr.isMethod())); return isNameExpr; } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
58b1da49279e3ea2c0ac8f8ef92a3f39365455a0
cbb75ebbee3fb80a5e5ad842b7a4bb4a5a1ec5f5
/android/support/v7/widget/AppCompatTextHelper.java
5b2276cd8fa722ff48147d5c3d33046126329519
[]
no_license
killbus/jd_decompile
9cc676b4be9c0415b895e4c0cf1823e0a119dcef
50c521ce6a2c71c37696e5c131ec2e03661417cc
refs/heads/master
2022-01-13T03:27:02.492579
2018-05-14T11:21:30
2018-05-14T11:21:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,702
java
package android.support.v7.widget; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.drawable.Drawable; import android.os.Build.VERSION; import android.support.v7.appcompat.R; import android.support.v7.text.AllCapsTransformationMethod; import android.text.method.PasswordTransformationMethod; import android.util.AttributeSet; import android.widget.TextView; /* compiled from: TbsSdkJava */ class AppCompatTextHelper { private TintInfo mDrawableBottomTint; private TintInfo mDrawableLeftTint; private TintInfo mDrawableRightTint; private TintInfo mDrawableTopTint; final TextView mView; static AppCompatTextHelper create(TextView textView) { if (VERSION.SDK_INT >= 17) { return new AppCompatTextHelperV17(textView); } return new AppCompatTextHelper(textView); } AppCompatTextHelper(TextView textView) { this.mView = textView; } void loadFromAttributes(AttributeSet attributeSet, int i) { boolean z; boolean z2; ColorStateList colorStateList; ColorStateList colorStateList2 = null; Context context = this.mView.getContext(); AppCompatDrawableManager appCompatDrawableManager = AppCompatDrawableManager.get(); TintTypedArray obtainStyledAttributes = TintTypedArray.obtainStyledAttributes(context, attributeSet, R.styleable.AppCompatTextHelper, i, 0); int resourceId = obtainStyledAttributes.getResourceId(R.styleable.AppCompatTextHelper_android_textAppearance, -1); if (obtainStyledAttributes.hasValue(R.styleable.AppCompatTextHelper_android_drawableLeft)) { this.mDrawableLeftTint = createTintInfo(context, appCompatDrawableManager, obtainStyledAttributes.getResourceId(R.styleable.AppCompatTextHelper_android_drawableLeft, 0)); } if (obtainStyledAttributes.hasValue(R.styleable.AppCompatTextHelper_android_drawableTop)) { this.mDrawableTopTint = createTintInfo(context, appCompatDrawableManager, obtainStyledAttributes.getResourceId(R.styleable.AppCompatTextHelper_android_drawableTop, 0)); } if (obtainStyledAttributes.hasValue(R.styleable.AppCompatTextHelper_android_drawableRight)) { this.mDrawableRightTint = createTintInfo(context, appCompatDrawableManager, obtainStyledAttributes.getResourceId(R.styleable.AppCompatTextHelper_android_drawableRight, 0)); } if (obtainStyledAttributes.hasValue(R.styleable.AppCompatTextHelper_android_drawableBottom)) { this.mDrawableBottomTint = createTintInfo(context, appCompatDrawableManager, obtainStyledAttributes.getResourceId(R.styleable.AppCompatTextHelper_android_drawableBottom, 0)); } obtainStyledAttributes.recycle(); boolean z3 = this.mView.getTransformationMethod() instanceof PasswordTransformationMethod; if (resourceId != -1) { TintTypedArray obtainStyledAttributes2 = TintTypedArray.obtainStyledAttributes(context, resourceId, R.styleable.TextAppearance); if (z3 || !obtainStyledAttributes2.hasValue(R.styleable.TextAppearance_textAllCaps)) { z = false; z2 = false; } else { z2 = obtainStyledAttributes2.getBoolean(R.styleable.TextAppearance_textAllCaps, false); z = true; } if (VERSION.SDK_INT < 23) { if (obtainStyledAttributes2.hasValue(R.styleable.TextAppearance_android_textColor)) { colorStateList = obtainStyledAttributes2.getColorStateList(R.styleable.TextAppearance_android_textColor); } else { colorStateList = null; } if (obtainStyledAttributes2.hasValue(R.styleable.TextAppearance_android_textColorHint)) { colorStateList2 = obtainStyledAttributes2.getColorStateList(R.styleable.TextAppearance_android_textColorHint); } } else { colorStateList = null; } obtainStyledAttributes2.recycle(); } else { colorStateList = null; z = false; z2 = false; } TintTypedArray obtainStyledAttributes3 = TintTypedArray.obtainStyledAttributes(context, attributeSet, R.styleable.TextAppearance, i, 0); if (!z3 && obtainStyledAttributes3.hasValue(R.styleable.TextAppearance_textAllCaps)) { z2 = obtainStyledAttributes3.getBoolean(R.styleable.TextAppearance_textAllCaps, false); z = true; } if (VERSION.SDK_INT < 23) { if (obtainStyledAttributes3.hasValue(R.styleable.TextAppearance_android_textColor)) { colorStateList = obtainStyledAttributes3.getColorStateList(R.styleable.TextAppearance_android_textColor); } if (obtainStyledAttributes3.hasValue(R.styleable.TextAppearance_android_textColorHint)) { colorStateList2 = obtainStyledAttributes3.getColorStateList(R.styleable.TextAppearance_android_textColorHint); } } obtainStyledAttributes3.recycle(); if (colorStateList != null) { this.mView.setTextColor(colorStateList); } if (colorStateList2 != null) { this.mView.setHintTextColor(colorStateList2); } if (!z3 && r0) { setAllCaps(z2); } } void onSetTextAppearance(Context context, int i) { TintTypedArray obtainStyledAttributes = TintTypedArray.obtainStyledAttributes(context, i, R.styleable.TextAppearance); if (obtainStyledAttributes.hasValue(R.styleable.TextAppearance_textAllCaps)) { setAllCaps(obtainStyledAttributes.getBoolean(R.styleable.TextAppearance_textAllCaps, false)); } if (VERSION.SDK_INT < 23 && obtainStyledAttributes.hasValue(R.styleable.TextAppearance_android_textColor)) { ColorStateList colorStateList = obtainStyledAttributes.getColorStateList(R.styleable.TextAppearance_android_textColor); if (colorStateList != null) { this.mView.setTextColor(colorStateList); } } obtainStyledAttributes.recycle(); } void setAllCaps(boolean z) { this.mView.setTransformationMethod(z ? new AllCapsTransformationMethod(this.mView.getContext()) : null); } void applyCompoundDrawablesTints() { if (this.mDrawableLeftTint != null || this.mDrawableTopTint != null || this.mDrawableRightTint != null || this.mDrawableBottomTint != null) { Drawable[] compoundDrawables = this.mView.getCompoundDrawables(); applyCompoundDrawableTint(compoundDrawables[0], this.mDrawableLeftTint); applyCompoundDrawableTint(compoundDrawables[1], this.mDrawableTopTint); applyCompoundDrawableTint(compoundDrawables[2], this.mDrawableRightTint); applyCompoundDrawableTint(compoundDrawables[3], this.mDrawableBottomTint); } } final void applyCompoundDrawableTint(Drawable drawable, TintInfo tintInfo) { if (drawable != null && tintInfo != null) { AppCompatDrawableManager.tintDrawable(drawable, tintInfo, this.mView.getDrawableState()); } } protected static TintInfo createTintInfo(Context context, AppCompatDrawableManager appCompatDrawableManager, int i) { ColorStateList tintList = appCompatDrawableManager.getTintList(context, i); if (tintList == null) { return null; } TintInfo tintInfo = new TintInfo(); tintInfo.mHasTintList = true; tintInfo.mTintList = tintList; return tintInfo; } }
[ "13511577582@163.com" ]
13511577582@163.com
9d013f104d896b0abdb24b3cf3e5d1a791c4eaaf
f652d1377f22f5009e0ca34a7bb5e90a57172db7
/backend/src/test/java/br/com/ivanfsilva/ecommerce/conhecendoentitymanager/FlushTest.java
3e32dad6a8e25e064150ccb51e97c54ccd741a94
[]
no_license
ivanfsilva/ecommerce
b53b25fe2c894886482828203aba003cafcfe59e
4f71bb3d94efce7a297b10f0b185d87ec6db27ad
refs/heads/master
2022-05-24T15:34:15.791657
2022-05-10T21:39:51
2022-05-10T21:39:51
244,218,369
0
0
null
null
null
null
UTF-8
Java
false
false
1,302
java
package br.com.ivanfsilva.ecommerce.conhecendoentitymanager; import br.com.ivanfsilva.ecommerce.EntityManagerTest; import br.com.ivanfsilva.ecommerce.model.Pedido; import br.com.ivanfsilva.ecommerce.model.StatusPedido; import org.junit.Assert; import org.junit.Test; public class FlushTest extends EntityManagerTest { @Test(expected = Exception.class) public void chamarFlush() { try { entityManager.getTransaction().begin(); Pedido pedido = entityManager.find(Pedido.class, 1); pedido.setStatus(StatusPedido.PAGO); entityManager.flush(); if (pedido.getPagamento() == null) { throw new RuntimeException("Pedido ainda não foi pago."); } // Uma consulta obriga o JPA a sincronizar o que ele tem na memória (sem usar o flush explicitamente). // Pedido pedidoPago = entityManager // .createQuery("select p from Pedido p where p.id = 1", Pedido.class) // .getSingleResult(); // Assert.assertEquals(pedido.getStatus(), pedidoPago.getStatus()); entityManager.getTransaction().commit(); } catch (Exception e) { entityManager.getTransaction().rollback(); throw e; } } }
[ "ivanfs27@gmail.com" ]
ivanfs27@gmail.com
123aeaf6cd4c743f9ad32d63f886e5dbb5408219
5c46035452bcb7203d27ea8fdd0efd770c21f8b0
/leetCode/src/总结一/归并/合并k个链表/Solution.java
f62e8216813e3af06973246a446a35e147523894
[]
no_license
MyCookie513/The-Data-structure-and-algorithm
8ed89b306370abbb5450ed85ce2d3098b8c60b1f
9feb61f663a0e52cd430b139b2f1ef5f53881539
refs/heads/master
2020-08-29T11:17:06.725244
2019-11-01T05:52:48
2019-11-01T05:52:48
218,016,291
0
0
null
null
null
null
UTF-8
Java
false
false
1,330
java
package 总结一.归并.合并k个链表; public class Solution { public ListNode mergeKLists(ListNode[] lists) { if (lists==null || lists.length==0) return null; SplitMerge(lists,0, lists.length-1); return lists[0]; } private void SplitMerge(ListNode[] lists, int S, int E) { if (S==E){ return; } int zhong =(S+E)/2; SplitMerge(lists,S,zhong); SplitMerge(lists,zhong+1,E); merge(lists,S,zhong+1); } private void merge(ListNode[] lists, int j, int i) { ListNode head =new ListNode(0); ListNode x=head; ListNode s1=lists[i]; ListNode s2=lists[j]; while (s1!=null && s2!=null){ if (s1.val >s2.val){ x.next=s2; x=s2; s2=s2.next; }else{ x.next=s1; x=s1; s1=s1.next; } } while (s1!=null){ x.next=s1; x=s1; s1=s1.next; } while (s2!=null){ x.next=s2; x=s2; s2=s2.next; } lists[j]=head.next; } public class ListNode { int val; ListNode next; ListNode(int x) { val = x; } } }
[ "893943814@qq.com" ]
893943814@qq.com
66f7613a722709b5ecc67dcfff5f0ea02b5552b4
ca3baa74f332a3d43895e793d1e714865be3367a
/src/main/java/io/github/jhipster/erpclic/web/rest/vm/KeyAndPasswordVM.java
018ce01e4b1650a35d3cdf05818734961cc9d849
[]
no_license
Asbaharoon/erpclic
5369ebeb74d2c91812dd915acb95f7aae67ebf08
4c2c7daceadaa57f45a7dda35b98c3782b912699
refs/heads/master
2023-04-10T09:25:47.261356
2018-11-17T05:11:11
2018-11-17T05:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
507
java
package io.github.jhipster.erpclic.web.rest.vm; /** * View Model object for storing the user's key and password. */ public class KeyAndPasswordVM { private String key; private String newPassword; public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getNewPassword() { return newPassword; } public void setNewPassword(String newPassword) { this.newPassword = newPassword; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
11a28621e7b1efaeb67641c0eecb713d98928cd6
7caa3c92020e6fa0546fe6909f3c607df5243306
/net/minecraft/world/gen/feature/WorldGeneratorBonusChest.java
df8a7c69a36b4b0ca9f91a73bcacd93217a051fb
[]
no_license
mengdexiu/mcp
47f70170b9b27aa23c2ef3d0bfbca5e9378f9cc5
17928367a180368edb46995830c7cb12c4822e9c
refs/heads/master
2021-06-05T15:00:49.835191
2016-06-19T12:42:55
2016-06-19T12:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,053
java
package net.minecraft.world.gen.feature; import java.util.Random; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.storage.loot.LootTableList; public class WorldGeneratorBonusChest extends WorldGenerator { public boolean generate(World worldIn, Random rand, BlockPos position) { IBlockState iblockstate; while (((iblockstate = worldIn.getBlockState(position)).getMaterial() == Material.AIR || iblockstate.getMaterial() == Material.LEAVES) && position.getY() > 1) { position = position.down(); } if (position.getY() < 1) { return false; } else { position = position.up(); for (int i = 0; i < 4; ++i) { BlockPos blockpos = position.add(rand.nextInt(4) - rand.nextInt(4), rand.nextInt(3) - rand.nextInt(3), rand.nextInt(4) - rand.nextInt(4)); if (worldIn.isAirBlock(blockpos) && worldIn.getBlockState(blockpos.down()).isFullyOpaque()) { worldIn.setBlockState(blockpos, Blocks.CHEST.getDefaultState(), 2); TileEntity tileentity = worldIn.getTileEntity(blockpos); if (tileentity instanceof TileEntityChest) { ((TileEntityChest)tileentity).func_189404_a(LootTableList.CHESTS_SPAWN_BONUS_CHEST, rand.nextLong()); } BlockPos blockpos1 = blockpos.east(); BlockPos blockpos2 = blockpos.west(); BlockPos blockpos3 = blockpos.north(); BlockPos blockpos4 = blockpos.south(); if (worldIn.isAirBlock(blockpos2) && worldIn.getBlockState(blockpos2.down()).isFullyOpaque()) { worldIn.setBlockState(blockpos2, Blocks.TORCH.getDefaultState(), 2); } if (worldIn.isAirBlock(blockpos1) && worldIn.getBlockState(blockpos1.down()).isFullyOpaque()) { worldIn.setBlockState(blockpos1, Blocks.TORCH.getDefaultState(), 2); } if (worldIn.isAirBlock(blockpos3) && worldIn.getBlockState(blockpos3.down()).isFullyOpaque()) { worldIn.setBlockState(blockpos3, Blocks.TORCH.getDefaultState(), 2); } if (worldIn.isAirBlock(blockpos4) && worldIn.getBlockState(blockpos4.down()).isFullyOpaque()) { worldIn.setBlockState(blockpos4, Blocks.TORCH.getDefaultState(), 2); } return true; } } return false; } } }
[ "bourguematthieu@gmail.com" ]
bourguematthieu@gmail.com
10ed1ec1fcd0f6e56da42e61b90d5a2173e95b20
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/org/baeldung/gson/serializationwithexclusions/SerializationWithExclusionsUnitTest.java
b9dd1906628e4b045f79f5309a0cc65f18b49aa4
[]
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,194
java
package org.baeldung.gson.serializationwithexclusions; import com.google.gson.ExclusionStrategy; import com.google.gson.FieldAttributes; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; class SerializationWithExclusionsUnitTest { final String expectedResult = "{\"id\":1,\"name\":\"foo\",\"subclass\":{\"id\":42,\"description\":\"the answer\"}}"; @Test public void givenClassWithTransientFields_whenSerializing_thenCorrectWithoutTransientFields() { MyClassWithTransientFields source = new MyClassWithTransientFields(1L, "foo", "bar", new MySubClassWithTransientFields(42L, "the answer", "Verbose field which we don't want to be serialized")); String jsonString = new Gson().toJson(source); Assertions.assertEquals(expectedResult, jsonString); } @Test public void givenClassAnnotated_whenSerializing_thenCorrectWithoutNotAnnotatedFields() { MyClassWithAnnotatedFields source = new MyClassWithAnnotatedFields(1L, "foo", "bar", new MySubClassWithAnnotatedFields(42L, "the answer", "Verbose field which we don't want to be serialized")); Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create(); String jsonString = gson.toJson(source); Assertions.assertEquals(expectedResult, jsonString); } @Test public void givenExclusionStrategyByClassesAndFields_whenSerializing_thenFollowStrategy() { MyClass source = new MyClass(1L, "foo", "bar", new MySubClass(42L, "the answer", "Verbose field which we don't want to be serialized")); ExclusionStrategy strategy = new ExclusionStrategy() { @Override public boolean shouldSkipField(FieldAttributes field) { if (((field.getDeclaringClass()) == (MyClass.class)) && (field.getName().equals("other"))) return true; if (((field.getDeclaringClass()) == (MySubClass.class)) && (field.getName().equals("otherVerboseInfo"))) return true; return false; } @Override public boolean shouldSkipClass(Class<?> clazz) { return false; } }; Gson gson = new GsonBuilder().addSerializationExclusionStrategy(strategy).create(); String jsonString = gson.toJson(source); Assertions.assertEquals(expectedResult, jsonString); } @Test public void givenExclusionStrategyByStartsWith_whenSerializing_thenFollowStrategy() { MyClass source = new MyClass(1L, "foo", "bar", new MySubClass(42L, "the answer", "Verbose field which we don't want to be serialized")); ExclusionStrategy strategy = new ExclusionStrategy() { @Override public boolean shouldSkipClass(Class<?> clazz) { return false; } @Override public boolean shouldSkipField(FieldAttributes field) { return field.getName().startsWith("other"); } }; Gson gson = new GsonBuilder().setExclusionStrategies(strategy).create(); String jsonString = gson.toJson(source); Assertions.assertEquals(expectedResult, jsonString); } @Test public void givenExclusionStrategyByCustomAnnotation_whenSerializing_thenFollowStrategy() { MyClassWithCustomAnnotatedFields source = new MyClassWithCustomAnnotatedFields(1L, "foo", "bar", new MySubClassWithCustomAnnotatedFields(42L, "the answer", "Verbose field which we don't want to be serialized")); ExclusionStrategy strategy = new ExclusionStrategy() { @Override public boolean shouldSkipClass(Class<?> clazz) { return false; } @Override public boolean shouldSkipField(FieldAttributes field) { return (field.getAnnotation(Exclude.class)) != null; } }; Gson gson = new GsonBuilder().setExclusionStrategies(strategy).create(); String jsonString = gson.toJson(source); Assertions.assertEquals(expectedResult, jsonString); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
fb16cae7570adbcbd2ca422a76dec719567fbbc8
0404743ed55782b3d029231c41fb46761c9e6839
/src/main/java/com/atguigu/interview/juc/ContainerNotSafeDemo.java
7a90ebb4737bb62ef2255a5797a3ed886794ffb6
[]
no_license
izbk/Java-Interview-Advanced
afa2d9828ed73e8de5e1d38110c0d6a449ae75c8
9c1fdcc05cb33469c016ca238f6d78510b31b192
refs/heads/master
2020-07-17T14:59:59.849044
2020-04-13T14:48:11
2020-04-13T14:48:11
206,040,993
0
0
null
2019-09-03T09:34:02
2019-09-03T09:34:01
null
UTF-8
Java
false
false
3,770
java
package com.atguigu.interview.juc; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArraySet; /** * @author */ public class ContainerNotSafeDemo { public static void main(String[] args){ mapNotSafe(); } private static void mapNotSafe() { Map<String,String> map = new ConcurrentHashMap<>(); for (int i = 0; i < 30; i++) { new Thread(()->{ map.put(Thread.currentThread().getName(), UUID.randomUUID().toString().substring(0,8)); System.out.println(map); },String.valueOf(i)).start(); } } private static void setNotSafe() { Set<String> set = new CopyOnWriteArraySet<>(); for (int i = 0; i < 30; i++) { new Thread(()->{ set.add(UUID.randomUUID().toString().substring(0,8)); System.out.println(set); },String.valueOf(i)).start(); } // HashSet 与 HashMap new HashSet<String>().add("a"); } private static void listNotSafe() { List<String> list = new CopyOnWriteArrayList<>(); for (int i = 0; i < 30; i++) { new Thread(()->{ list.add(UUID.randomUUID().toString().substring(0,8)); System.out.println(list); },String.valueOf(i)).start(); } /** * 故障现场 * java.util.ConcurrentModificationException * 导致原因 * * 解决方案 * 1.new Vector<>(); * 2.Collections.synchronizedList(new ArrayList<>()); * 3.CopyOnWriteArrayList(); * CopyOnWrite容器即写时复制的容器。通俗的理解是当我们往一个容器添加元素的时候, * 不直接往当前容器添加,而是先将当前容器进行Copy,复制出一个新的容器,然后新的容 * 器里添加元素,添加完元素之后,再将原容器的引用指向新的容器。这样做的好处是我们 * 可以对CopyOnWrite容器进行并发的读,而不需要加锁,因为当前容器不会添加任何元素。 * 所以CopyOnWrite容器也是一种读写分离的思想,读和写不同的容器。 * CopyOnWrite的缺点 *   内存占用问题。因为CopyOnWrite的写时复制机制,所以在进行写操作的时候,内存 * 里会同时驻扎两个对象的内存,旧的对象和新写入的对象(注意:在复制的时候只是复制容 * 器里的引用,只是在写的时候会创建新对象添加到新容器里,而旧容器的对象还在使用, * 所以有两份对象内存)。如果这些对象占用的内存比较大,比如说200M左右,那么再 * 写入100M数据进去,内存就会占用300M,那么这个时候很有可能造成频繁的Yong GC和Full GC。 * 之前我们系统中使用了一个服务由于每晚使用CopyOnWrite机制更新大对象,造成了每晚15秒的 * Full GC,应用响应时间也随之变长。 *   针对内存占用问题,可以通过压缩容器中的元素的方法来减少大对象的内存消耗,比如,如果 * 元素全是10进制的数字,可以考虑把它压缩成36进制或64进制。或者不使用CopyOnWrite容器, * 而使用其他的并发容器,如ConcurrentHashMap。 * *   数据一致性问题。CopyOnWrite容器只能保证数据的最终一致性,不能保证数据的实时一致性。 * 所以如果你希望写入的的数据,马上能读到,请不要使用CopyOnWrite容器。 */} }
[ "izbk@163.com" ]
izbk@163.com
dab8b7b6d50e68ebc9689c88d070abce0a0a5e77
4c89bcf236820f2cf2fc1a0bc5c13ba09f454987
/src/main/java/mex/s03/Exercise2.java
3b394264c464e0f9f78f84040a7ec119e09cce76
[]
no_license
claramente9/jse
90a632e09ea5379768e6c7dc046edba95b0668f7
a7eb24c56c946eb6546ddfe9c042125cb50a7576
refs/heads/master
2023-08-25T12:43:23.106642
2021-10-15T08:19:06
2021-10-15T08:19:06
414,213,685
0
0
null
null
null
null
UTF-8
Java
false
false
303
java
package mex.s03; public class Exercise2 { /** * Check if the parameter is odd * * @param value an integer * @return true if odd */ public static boolean isOdd(int value) { // TODO throw new UnsupportedOperationException("Not yet implemented"); } }
[ "egalli64@gmail.com" ]
egalli64@gmail.com
6a06f1afd919017d629c0573cd4028f910d3a895
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/yauaa/learning/1347/UserAgentAnalysisDoFn.java
6566485306c13403582b737192d8d114271c0184
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,483
java
/* * Yet Another UserAgent Analyzer * Copyright (C) 2013-2018 Niels Basjes * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package nl.basjes.parse.useragent.beam; import nl.basjes.parse.useragent.annotate.UserAgentAnnotationAnalyzer; import nl.basjes.parse.useragent.annotate.UserAgentAnnotationMapper; import org.apache.beam.sdk.transforms.DoFn; import org.apache.commons.lang3.SerializationUtils; import java.io.Serializable; import static nl.basjes.parse.useragent.UserAgentAnalyzer.DEFAULT_PARSE_CACHE_SIZE; public abstract class UserAgentAnalysisDoFn<T extends Serializable> extends DoFn<T, T> implements UserAgentAnnotationMapper<T>, Serializable { private transient UserAgentAnnotationAnalyzer<T> userAgentAnalyzer = null; private int cacheSize; public UserAgentAnalysisDoFn() { this.cacheSize = DEFAULT_PARSE_CACHE_SIZE; } public UserAgentAnalysisDoFn(int cacheSize) { this.cacheSize = cacheSize; } @Setup public void initialize() { userAgentAnalyzer = new UserAgentAnnotationAnalyzer<>(); userAgentAnalyzer.setCacheSize(cacheSize); userAgentAnalyzer.initialize(this); } @ProcessElement public void processElement(ProcessContext c) { // Currently Beam does not allow changing the input instance. // So unfortunately we must clone the entire thing :( // See also: https://issues.apache.org/jira/browse/BEAM-1164 c.output(userAgentAnalyzer.map(clone(c.element()))); } /** * Clone the provided instance of T. * This default implementation uses a mindless brute force cloning via serialization. * If for your class you can do better; please override this method. * For AVRO you can do something like MyRecord.newBuilder(instance).build(); * @param t The original input value * @return A deep copied copy of t */ public T clone (T t) { return SerializationUtils.clone(t); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
c18c355069d157a51f1a9d7df2b5e9761cf90a4c
9bac6b22d956192ba16d154fca68308c75052cbb
/icmsint-ejb/src/main/java/hk/judiciary/icmsint/model/sysinf/inf/gccij2d/AddressV11CT.java
d9e0ae84b4af0cbf66fe1499149708cf97994329
[]
no_license
peterso05168/icmsint
9d4723781a6666cae8b72d42713467614699b66d
79461c4dc34c41b2533587ea3815d6275731a0a8
refs/heads/master
2020-06-25T07:32:54.932397
2017-07-13T10:54:56
2017-07-13T10:54:56
96,960,773
0
0
null
null
null
null
UTF-8
Java
false
false
4,741
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.06.20 at 04:47:35 AM CST // package hk.judiciary.icmsint.model.sysinf.inf.gccij2d; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * address details consists of * a) Address territory * 1 - HK * 2 - KLN * 3 - NT * 4 - Outlying Islands * 5 - Others * b) Address in English (v1.1) * c) Address in Chinese (v1.1) * d) District code * * * <p>Java class for Address.V1.1.CT complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="Address.V1.1.CT"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="AddressTerritory" type="{}AddressTerritory.V1.0.CT" minOccurs="0"/&gt; * &lt;element name="EnglishAddress" type="{}EnglishAddress.V1.1.CT" minOccurs="0"/&gt; * &lt;element name="ChineseAddress" type="{}ChineseAddress.V1.1.CT" minOccurs="0"/&gt; * &lt;element name="DistrictCode" type="{}DistrictCode.V1.0.CT" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Address.V1.1.CT", propOrder = { "addressTerritory", "englishAddress", "chineseAddress", "districtCode" }) public class AddressV11CT { @XmlElement(name = "AddressTerritory") protected AddressTerritoryV10CT addressTerritory; @XmlElement(name = "EnglishAddress") protected EnglishAddressV11CT englishAddress; @XmlElement(name = "ChineseAddress") protected ChineseAddressV11CT chineseAddress; @XmlElement(name = "DistrictCode") protected DistrictCodeV10CT districtCode; /** * Gets the value of the addressTerritory property. * * @return * possible object is * {@link AddressTerritoryV10CT } * */ public AddressTerritoryV10CT getAddressTerritory() { return addressTerritory; } /** * Sets the value of the addressTerritory property. * * @param value * allowed object is * {@link AddressTerritoryV10CT } * */ public void setAddressTerritory(AddressTerritoryV10CT value) { this.addressTerritory = value; } /** * Gets the value of the englishAddress property. * * @return * possible object is * {@link EnglishAddressV11CT } * */ public EnglishAddressV11CT getEnglishAddress() { return englishAddress; } /** * Sets the value of the englishAddress property. * * @param value * allowed object is * {@link EnglishAddressV11CT } * */ public void setEnglishAddress(EnglishAddressV11CT value) { this.englishAddress = value; } /** * Gets the value of the chineseAddress property. * * @return * possible object is * {@link ChineseAddressV11CT } * */ public ChineseAddressV11CT getChineseAddress() { return chineseAddress; } /** * Sets the value of the chineseAddress property. * * @param value * allowed object is * {@link ChineseAddressV11CT } * */ public void setChineseAddress(ChineseAddressV11CT value) { this.chineseAddress = value; } /** * Gets the value of the districtCode property. * * @return * possible object is * {@link DistrictCodeV10CT } * */ public DistrictCodeV10CT getDistrictCode() { return districtCode; } /** * Sets the value of the districtCode property. * * @param value * allowed object is * {@link DistrictCodeV10CT } * */ public void setDistrictCode(DistrictCodeV10CT value) { this.districtCode = value; } }
[ "chiu.cheukman@gmail.com" ]
chiu.cheukman@gmail.com
94b28e9bb2aeca81a6dad67d6be947f876880fc5
a4b111fcca1be07af77a34f4f233c626036afc42
/wzllibrary/src/main/java/com/wuzhanglong/library/view/AutoSwipeRefreshLayout.java
ec526fa8a610ea9fcdaedf69cc94f24f2cf4a54d
[]
no_license
wodewzl/wzllibrary
340bf08a13f0dab26c0653948c53d032ee955b92
be7c4d81a5108dd9123e84eeeebecf30e2f8d607
refs/heads/master
2021-06-30T00:11:32.667131
2017-09-19T06:07:59
2017-09-19T06:07:59
104,013,642
6
0
null
null
null
null
UTF-8
Java
false
false
1,141
java
package com.wuzhanglong.library.view; import android.content.Context; import android.support.v4.widget.SwipeRefreshLayout; import android.util.AttributeSet; import android.view.View; import java.lang.reflect.Field; import java.lang.reflect.Method; public class AutoSwipeRefreshLayout extends SwipeRefreshLayout { public AutoSwipeRefreshLayout(Context context) { super(context); } public AutoSwipeRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); } /** * 自动刷新 */ public void autoRefresh() { try { Field mCircleView = SwipeRefreshLayout.class.getDeclaredField("mCircleView"); mCircleView.setAccessible(true); View progress = (View) mCircleView.get(this); progress.setVisibility(VISIBLE); Method setRefreshing = SwipeRefreshLayout.class.getDeclaredMethod("setRefreshing", boolean.class, boolean.class); setRefreshing.setAccessible(true); setRefreshing.invoke(this, true, true); } catch (Exception e) { e.printStackTrace(); } } }
[ "273415345@qq.com" ]
273415345@qq.com
ba5107db771aa3754d69453fe1e84fd96a34ba90
c7579eac78326015a53d89ea4dd8124660e707b1
/tddl-optimizer/src/main/java/com/taobao/tddl/optimizer/core/ast/build/QueryNodeBuilder.java
77159432b47d79ecf672a9e742b0c30c656c8aff
[ "Apache-2.0" ]
permissive
quyixiao/TDDL
07f3db5e4a78ec19b68dfb4b5d98fb9d7edb2a60
1bc33f047f94b878f6e13edb06c03dc3f8c2cb21
refs/heads/master
2023-04-02T02:28:51.288020
2021-03-30T03:58:26
2021-03-30T03:58:26
352,864,306
0
0
null
null
null
null
UTF-8
Java
false
false
4,807
java
package com.taobao.tddl.optimizer.core.ast.build; import java.util.LinkedList; import java.util.List; import com.taobao.tddl.optimizer.core.ASTNodeFactory; import com.taobao.tddl.optimizer.core.ast.ASTNode; import com.taobao.tddl.optimizer.core.ast.QueryTreeNode; import com.taobao.tddl.optimizer.core.ast.query.QueryNode; import com.taobao.tddl.optimizer.core.expression.IBooleanFilter; import com.taobao.tddl.optimizer.core.expression.IColumn; import com.taobao.tddl.optimizer.core.expression.IFilter.OPERATION; import com.taobao.tddl.optimizer.core.expression.IFunction; import com.taobao.tddl.optimizer.core.expression.ISelectable; /** * @author Dreamond * @author jianghang 2013-11-8 下午2:33:51 * @since 5.0.0 */ public class QueryNodeBuilder extends QueryTreeNodeBuilder { public QueryNodeBuilder(QueryNode queryNode){ this.setNode(queryNode); } public QueryNode getNode() { return (QueryNode) super.getNode(); } public void build() { for (ASTNode sub : this.getNode().getChildren()) { sub.build(); } if (!(this.getNode().getChild() instanceof QueryTreeNode)) {// 嵌套子类 return; } this.buildAlias(); this.buildSelected(); this.buildWhere(); this.buildGroupBy(); this.buildOrderBy(); if (this.getNode().getDataNode() == null) { this.getNode().executeOn(this.getNode().getChild().getDataNode()); } this.buildExistAggregate(); this.buildExistSequenceVal(); } private void buildAlias() { if (this.getNode().getAlias() == null) { this.getNode().alias(this.getNode().getChild().getAlias()); } } public void buildSelected() { buildSelectedFromSelectableObject(); } private void buildSelectedFromSelectableObject() { if (this.getNode().getColumnsSelected().isEmpty()) { this.getNode() .getColumnsSelected() .add(ASTNodeFactory.getInstance().createColumn().setColumnName(IColumn.STAR)); } // 如果有 * ,最后需要把*删掉 List<ISelectable> delete = new LinkedList(); for (ISelectable selected : getNode().getColumnsSelected()) { if (selected.getColumnName().equals(IColumn.STAR)) { delete.add(selected); } } if (!delete.isEmpty()) { this.getNode().getColumnsSelected().removeAll(delete); } for (ISelectable selected : delete) { // 遇到*就把所有列再添加一遍 // select *,id这样的语法最后会有两个id列,mysql是这样的 QueryTreeNode child = (QueryTreeNode) this.getNode().getChild(); for (ISelectable selectedFromChild : child.getColumnsSelected()) { if (selected.getTableName() != null && !selected.getTableName().equals(selectedFromChild.getTableName())) { break; } IColumn newS = ASTNodeFactory.getInstance().createColumn(); if (child.getAlias() != null) {// sub alias newS.setTableName(child.getAlias()); } else { newS.setTableName(selectedFromChild.getTableName()); } if (selectedFromChild.getAlias() == null) { newS.setColumnName(selectedFromChild.getColumnName()); } else { newS.setColumnName(selectedFromChild.getAlias()); } getNode().getColumnsSelected().add(newS);// 允许多列 } } for (int i = 0; i < getNode().getColumnsSelected().size(); i++) { getNode().getColumnsSelected().set(i, this.buildSelectable(getNode().getColumnsSelected().get(i))); } } public ISelectable getSelectableFromChild(ISelectable c) { if (IColumn.STAR.equals(c.getColumnName())) { return c; } if (c instanceof IFunction) { return c; } if (c instanceof IBooleanFilter && ((IBooleanFilter) c).getOperation().equals(OPERATION.CONSTANT)) { return c; } return this.getColumnFromOtherNode(c, this.getNode().getChild()); } public void pusherFunction(IFunction f) { QueryTreeNode child = this.getNode().getChild(); // 下推select if (this.findColumnFromOtherNode(f, child) == null) { ISelectable copyf = f.copy(); child.addColumnsSelected(copyf); // 查找一下子节点的select中是已包含对应函数列 child.getBuilder().buildSelectable(copyf, true);// 单独build这一函数列 } } }
[ "2621048238@qq.com" ]
2621048238@qq.com
1e84cd3220c4da85003c546f64cd20c8a4e64787
77bb404305de44615162d6e6fc9c3db7ff0e020e
/TableView/app/src/main/java/org/huihui/tableview/Recycler.java
a4ebfd37f8a81844a57f6f978834d2efc7beebf1
[]
no_license
ab503044120/CustomView
2ba4b6cc3f60f18033a546abd8d6c75537639a15
ff8054a35cc1dc3e9d91ef9de2e86e606bb6f450
refs/heads/master
2021-01-12T17:15:33.829703
2018-04-03T10:02:39
2018-04-03T10:02:39
71,526,106
0
0
null
null
null
null
UTF-8
Java
false
false
439
java
package org.huihui.tableview; import android.view.View; import java.util.ArrayList; import java.util.List; /** * Created by Administrator on 2017/8/18. */ public class Recycler { private List<View> mScapViews; public Recycler() { mScapViews = new ArrayList<>(); } public void RecyclerView(View view) { mScapViews.add(view); } public View obtainView() { return obtainView(); } }
[ "503044120@qq.com" ]
503044120@qq.com
c255a4c836724cbb79c1796a0c71d0ab3fad9002
7cb0d799781dee02c1653041fb71283593084c28
/app/src/main/java/com/kongtiaoapp/xxhj/bean/ProjectManagerBean.java
39f398d92a66c2efa536b9eab85e16a84b998ab0
[]
no_license
guochengabc/xxhj_project
2a7a41f000dc7c6512d93c83a641e6dd7a531a87
b6588be8e5c9436f88873e085a76c3241193a8c1
refs/heads/master
2020-09-21T13:09:44.562591
2020-01-19T09:17:05
2020-01-19T09:17:05
224,797,254
0
0
null
null
null
null
UTF-8
Java
false
false
685
java
package com.kongtiaoapp.xxhj.bean; /** * Created by xxhj_g on 2017/8/9. */ public class ProjectManagerBean { private String projectName; private String userNmae; private String passWord; public String getProjectName() { return projectName; } public void setProjectName(String projectName) { this.projectName = projectName; } public String getUserNmae() { return userNmae; } public void setUserNmae(String userNmae) { this.userNmae = userNmae; } public String getPassWord() { return passWord; } public void setPassWord(String passWord) { this.passWord = passWord; } }
[ "guochengabc@163.com" ]
guochengabc@163.com
09674cd50b27a93f99dc26e0abd41c96cff947bb
7c5b85b1aee095f30513a5fdd34a7b348dd26cfa
/src/main/java/com/rhb/istock/trade/turtle/manual/ManualService.java
6a1632c4b9636787b5ed17b54326edd148da7513
[]
no_license
dofoyo/istock
e2b8b0199e22805bcda4a84bb65ce7de3b91b9ec
c17a2c3b0c3dd7105a66fa7f6a785bb55dd54b7d
refs/heads/master
2022-09-17T02:18:38.312448
2021-07-20T08:08:15
2021-07-20T08:08:15
175,619,249
0
0
null
2022-09-01T23:04:00
2019-03-14T12:39:06
Java
UTF-8
Java
false
false
7,924
java
package com.rhb.istock.trade.turtle.manual; import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import com.rhb.istock.account.Account; import com.rhb.istock.index.tushare.IndexServiceTushare; import com.rhb.istock.kdata.KdataService; import com.rhb.istock.operation.Operation; import com.rhb.istock.trade.turtle.simulation.six.TurtleMusterSimulation; import com.rhb.istock.trade.turtle.simulation.six.repository.AmountEntity; import com.rhb.istock.trade.turtle.simulation.six.repository.TurtleSimulationRepository; @Service("manualService") public class ManualService { protected static final Logger logger = LoggerFactory.getLogger(TurtleMusterSimulation.class); @Autowired @Qualifier("kdataServiceImp") KdataService kdataService; @Autowired @Qualifier("turtleSimulationRepository") TurtleSimulationRepository turtleSimulationRepository; @Autowired @Qualifier("indexServiceTushare") IndexServiceTushare indexServiceTushare; @Autowired @Qualifier("aggressiveOperation") Operation aggressiveOperation; @Autowired @Qualifier("conservativeOperation") Operation conservativeOperation; @Autowired @Qualifier("optimizeOperation") Operation optimizeOperation; @Autowired @Qualifier("optimizeOperation2") Operation optimizeOperation2; @Autowired @Qualifier("favorOperation") Operation favorOperation; @Autowired @Qualifier("newbOperation") Operation newbOperation; @Autowired @Qualifier("commOperation") Operation commOperation; @Autowired @Qualifier("huntingOperation") Operation huntingOperation; @Autowired @Qualifier("favorOperation3") Operation favorOperation3; @Autowired @Qualifier("commOperation3") Operation commOperation3; @Autowired @Qualifier("commOperation2") Operation commOperation2; @Autowired @Qualifier("manualOperation") Operation manualOperation; private Map<LocalDate, List<String>> selects = new TreeMap<LocalDate, List<String>>(); private Map<LocalDate, List<String>> sells = new TreeMap<LocalDate, List<String>>(); private Map<LocalDate, List<String>> buys = new TreeMap<LocalDate, List<String>>(); public void addBuys(LocalDate date, String itemID) { List<String> ids = this.buys.get(date); if(ids==null) { ids = new ArrayList<String>(); ids.add(itemID); this.buys.put(date, ids); }else if(ids!=null && !ids.contains(itemID)) { ids .add(itemID); } //System.out.println(" buys: " + this.buys); } public void deleteBuys(LocalDate date, String itemID) { List<String> ids = buys.get(date); if(ids!=null && ids.contains(itemID)) { ids.remove(itemID); } } public Map<LocalDate, List<String>> getBuys(LocalDate date){ Map<LocalDate, List<String>> ss = new TreeMap<LocalDate, List<String>>(); List<String> ids; for(Map.Entry<LocalDate, List<String>> entry : this.buys.entrySet()) { if(entry.getKey().isBefore(date) || entry.getKey().isEqual(date)) { ids = entry.getValue(); if(ids!=null && ids.size()>0) { ss.put(entry.getKey(), ids); } } } return ss; } public void addSells(LocalDate date, String itemID) { List<String> ids = this.sells.get(date); if(ids==null) { ids = new ArrayList<String>(); ids.add(itemID); this.sells.put(date, ids); }else if(ids!=null && !ids.contains(itemID)) { ids .add(itemID); } //System.out.println(" sells: " + this.sells); } public void deleteSells(LocalDate date, String itemID) { List<String> ids = sells.get(date); if(ids!=null && ids.contains(itemID)) { ids.remove(itemID); } } public Map<LocalDate, List<String>> getSells(LocalDate date){ Map<LocalDate, List<String>> ss = new TreeMap<LocalDate, List<String>>(); List<String> ids; for(Map.Entry<LocalDate, List<String>> entry : this.sells.entrySet()) { if(entry.getKey().isBefore(date) || entry.getKey().isEqual(date)) { ids = entry.getValue(); if(ids!=null && ids.size()>0) { ss.put(entry.getKey(), ids); } } } return ss; } public void addSelects(LocalDate date, String itemID) { List<String> ids = this.selects.get(date); if(ids==null) { ids = new ArrayList<String>(); ids.add(itemID); this.selects.put(date, ids); }else if(ids!=null && !ids.contains(itemID)) { ids .add(itemID); } //System.out.println(selects); } public void deleteSelects(LocalDate date, String itemID) { List<String> ids = selects.get(date); if(ids!=null && ids.contains(itemID)) { ids.remove(itemID); } } public Map<LocalDate, List<String>> getSelects(LocalDate date){ Map<LocalDate, List<String>> ss = new TreeMap<LocalDate, List<String>>(); List<String> ids; for(Map.Entry<LocalDate, List<String>> entry : this.selects.entrySet()) { if(entry.getKey().isBefore(date) || entry.getKey().isEqual(date)) { ids = entry.getValue(); if(ids!=null && ids.size()>0) { ss.put(entry.getKey(), ids); } } } return ss; } public void saveReselect(Map<LocalDate, List<String>> selects) { this.selects = selects; } public Map<LocalDate, List<String>> getReselect(){ this.selects = turtleSimulationRepository.getBreakers("manual"); return this.selects; } public void simulate(String simulateType, LocalDate date) throws Exception{ long beginTime=System.currentTimeMillis(); String label = "manual " + simulateType; BigDecimal initCash = new BigDecimal(1000000); Integer top = 1000; Account account = new Account(initCash); boolean isEvaluation = false; Map<String, String> operateResult; if("comm".equals(simulateType)) { //买2+3 operateResult = commOperation3.run(account, this.selects,null, this.getBeginDate(), this.getEndDate(), label, top, true,0); }else if("newb".equals(simulateType)) { //买一 operateResult = newbOperation.run(account, this.selects,null, this.getBeginDate(), this.getEndDate(), label, top, true,0); }else if("optimize".equals(simulateType)) { //买二 operateResult = optimizeOperation2.run(account, this.selects,null, this.getBeginDate(), this.getEndDate(), label, top, true,0); }else if("favor".equals(simulateType)) { //买三 operateResult = favorOperation3.run(account, this.selects,null, this.getBeginDate(), this.getEndDate(), label, top, true,0); }else if("sab".equals(simulateType)) { //高价 //operateResult = huntingOperation.run(account, this.selects, this.getBeginDate(), this.getEndDate(), label, top, true,0); operateResult = commOperation2.run(account, this.selects,null, this.getBeginDate(), this.getEndDate(), label, top, true,0); }else if("conservative".equals(simulateType)){ //低价 operateResult = conservativeOperation.run(account, this.selects,null, this.getBeginDate(), this.getEndDate(), label, top, true,0); }else { //System.out.println(" buys: " + this.buys); //System.out.println(" sells: " + this.sells); operateResult = manualOperation.run(account, this.buys,this.sells, this.getBeginDate(), this.getEndDate(), label, top, true,0); } turtleSimulationRepository.save("manual", operateResult.get("breakers"), operateResult.get("CSV"), operateResult.get("dailyAmount"), operateResult.get("dailyHolds"), isEvaluation); long used = (System.currentTimeMillis() - beginTime)/1000; System.out.println("manual simulate 用时:" + used + "秒"); } private LocalDate getBeginDate() { TreeMap<LocalDate, AmountEntity> amounts = turtleSimulationRepository.getAmounts("avb"); return amounts.firstKey(); } private LocalDate getEndDate() { TreeMap<LocalDate, AmountEntity> amounts = turtleSimulationRepository.getAmounts("avb"); return amounts.lastKey(); } }
[ "dofoyo@sina.cn" ]
dofoyo@sina.cn
cce38d6fd33e17f95bb9f86622e30ea06b2646dc
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a162/A162999.java
6866961054d6399de9126e00ebcff4ba74976a13
[]
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
540
java
package irvine.oeis.a162; import irvine.oeis.FiniteSequence; /** * A162999 Positions of primes in <code>A119509</code>. * @author Georg Fischer */ public class A162999 extends FiniteSequence { /** Construct the sequence. */ public A162999() { super(2, 3, 5, 7, 10, 13, 15, 16, 21, 22, 26, 28, 34, 38, 39, 43, 45, 48, 53, 59, 69, 83, 84, 87, 88, 92, 103, 109, 112, 124, 130, 132, 135, 145, 146, 150, 153, 156, 162, 175, 177, 178, 183, 187, 190, 196, 200, 201, 217, 230, 238, 240, 250, 267, 272, 279, 280, 286, 290, 294); } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
048139d7c05b92b8a2aecaa1ef0cd4f2de868441
7d71d2fa9297778c3422f4a4a0958edc6f7e781a
/app/src/main/java/com/csjbot/mobileshop/cart/widget/CartImageAnmotionTool.java
715409213325589c42bc66c0f25d547b09cb1fa2
[]
no_license
MiRobotic/csj-new-demo
094ccb7415eb6f92febee1903062df770a0dfe83
a022b29ddbf2240ad6cbe43738fe09b64e91e2c1
refs/heads/master
2020-08-08T17:42:55.450950
2019-10-09T09:46:33
2019-10-09T09:46:33
213,880,253
0
1
null
null
null
null
UTF-8
Java
false
false
5,988
java
package com.csjbot.mobileshop.cart.widget; import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.TypeEvaluator; import android.content.Context; import android.graphics.PointF; import android.graphics.drawable.Drawable; import android.view.View; import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import com.csjbot.mobileshop.R; import com.csjbot.mobileshop.util.BlackgagaLogger; /** * author : chenqi. * e_mail : 1650699704@163.com. * create_time : 2017/10/19. */ public class CartImageAnmotionTool<T extends ViewGroup> implements Animator.AnimatorListener { /** * 添加购物车添加完成的监听 */ private AddListener listener; private Context context; private T start; private T destination; public CartImageAnmotionTool(Context ctx) { context = ctx; } /** * @param addV 被点击view * @param start 父布局 * @param destination 购物车布局 */ public CartImageAnmotionTool addAnmotion(View addV, T start, T destination, Drawable drawable) { int[] childCoordinate = new int[2]; int[] parentCoordinate = new int[2]; int[] shopCoordinate = new int[2]; this.start = start; this.destination = destination; //1.分别获取被点击View、父布局、购物车在屏幕上的坐标xy。 addV.getLocationInWindow(childCoordinate); start.getLocationInWindow(parentCoordinate); destination.getLocationInWindow(shopCoordinate); //2.自己定义ImageView 继承ImageView MoveImageView img = new MoveImageView(context); //drawable.setBounds(0, 0, 326, 322);//第一0是距左右边距离,第二0是距上下边距离,第三69长度,第四宽度 img.setImageDrawable(drawable); //3.设置img在父布局中的坐标位置 img.setX(childCoordinate[0] - parentCoordinate[0]); img.setY(childCoordinate[1] - parentCoordinate[1]); //4.父布局加入该Img start.addView(img); //5.利用 二次贝塞尔曲线 需首先计算出 MoveImageView的2个数据点和一个控制点 PointF startP = new PointF(); PointF endP = new PointF(); PointF controlP = new PointF(); //開始的数据点坐标就是 addV的坐标 startP.x = childCoordinate[0] - parentCoordinate[0]; startP.y = childCoordinate[1] - parentCoordinate[1]; //结束的数据点坐标就是 shopImg的坐标 endP.x = (float) (shopCoordinate[0] - (destination.getWidth() * 0.7)); endP.y = -(shopCoordinate[1] + (destination.getHeight() / 2)); BlackgagaLogger.debug("chenqi y = " + destination.getWidth() + "y" + endP.y); //控制点坐标 x等于 购物车x;y等于 addV的y controlP.x = childCoordinate[0]; controlP.y = childCoordinate[1]; AnimatorSet animatorSet = new AnimatorSet();//组合动画 ObjectAnimator animator = ObjectAnimator.ofObject(img, "mPointF", new PointFTypeEvaluator(controlP), startP, endP);//线程 ObjectAnimator scaleX = ObjectAnimator.ofFloat(img, "scaleX", 1f, 0.05f); ObjectAnimator scaleY = ObjectAnimator.ofFloat(img, "scaleY", 1f, 0.05f); ObjectAnimator icon_anim = ObjectAnimator.ofFloat(img, "rotation", 0.0F, 359.0F);//设置Y轴的立体旋转动 animator.setDuration(1000); scaleX.setDuration(1000); scaleY.setDuration(1000); icon_anim.setDuration(1000); animatorSet.play(animator).with(icon_anim).with(scaleX).with(scaleY);//几个动画按照顺序同时开始 animator.addListener(this); animatorSet.start(); return this; } @Override public void onAnimationStart(Animator animation) { } @Override public void onAnimationEnd(Animator animation) { //动画结束后 父布局移除 img Object target = ((ObjectAnimator) animation).getTarget(); start.removeView((View) target); //shopImg 開始一个放大动画 Animation scaleAnim = AnimationUtils.loadAnimation(context, R.anim.shop_scale); destination.startAnimation(scaleAnim); if (listener != null) { listener.addCart(); } } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } /** * 自己定义估值器 */ public class PointFTypeEvaluator implements TypeEvaluator<PointF> { /** * 每一个估值器相应一个属性动画。每一个属性动画仅相应唯一一个控制点 */ PointF control; /** * 估值器返回值 */ PointF mPointF = new PointF(); public PointFTypeEvaluator(PointF control) { this.control = control; } @Override public PointF evaluate(float fraction, PointF startValue, PointF endValue) { return getBezierPoint(startValue, endValue, control, fraction); } /** * 二次贝塞尔曲线公式 * * @param start 開始的数据点 * @param end 结束的数据点 * @param control 控制点 * @param t float 0-1 * @return 不同t相应的PointF */ private PointF getBezierPoint(PointF start, PointF end, PointF control, float t) { mPointF.x = (1 - t) * (1 - t) * start.x + 2 * t * (1 - t) * control.x + t * t * end.x; mPointF.y = (1 - t) * (1 - t) * start.y + 2 * t * (1 - t) * control.y + t * t * end.y; return mPointF; } } public void setListener(AddListener listener) { this.listener = listener; } public interface AddListener { void addCart(); } }
[ "puyz@csjbot.com" ]
puyz@csjbot.com
924b5db6b266ffbc168a222bd46337e02731d86d
f43504b11e935796128f07ab166e7d47a248f204
/Low_level_Design_Problems/LowLevel-design-2/src/main/java/com/system/design/lld/hotelbooking/db/Reservation.java
256386c212dfec4c3e078070e9c272f9fff3f6b8
[]
no_license
vish35/LLD
4e3b4b6a22e334e1ab69871e5ded526613bb73f8
1d8f209213f74395fc1121a5862ce2a467b09f94
refs/heads/main
2023-07-30T09:10:39.696754
2021-09-15T05:46:45
2021-09-15T05:46:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
334
java
package com.system.design.lld.hotelbooking.db; import lombok.Builder; import lombok.Data; import java.sql.Date; @Data @Builder public class Reservation { private int reservationId; private int userId; private int hotelId; private Date checkInDate; private Date checkOutDate; private Date createdDateTime; }
[ "gowtkum@amazon.com" ]
gowtkum@amazon.com
3e7c8bd7290886b60ddede147a9c8d4c7847abd4
43ea91f3ca050380e4c163129e92b771d7bf144a
/services/ecs/src/main/java/com/huaweicloud/sdk/ecs/v2/model/NovaDeleteKeypairResponse.java
35299891a3c75f6d9f3c5229bfe2dca75f8127d9
[ "Apache-2.0" ]
permissive
wxgsdwl/huaweicloud-sdk-java-v3
660602ca08f32dc897d3770995b496a82a1cc72d
ee001d706568fdc7b852792d2e9aefeb9d13fb1e
refs/heads/master
2023-02-27T14:20:54.774327
2021-02-07T11:48:35
2021-02-07T11:48:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
783
java
package com.huaweicloud.sdk.ecs.v2.model; import com.huaweicloud.sdk.core.SdkResponse; import java.util.function.Consumer; import java.util.Objects; /** * Response Object */ public class NovaDeleteKeypairResponse extends SdkResponse { @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return true; } @Override public int hashCode() { return Objects.hash(); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NovaDeleteKeypairResponse {\n"); sb.append("}"); return sb.toString(); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
ee6506e0926c8473adedacfdc456dacec734b603
3e3a5e2643e4ed8519ecfd6b66ae937f2da42939
/designpattern/StrategyPattern_Sorting/src/SortContext.java
cd3f48cf8830d4e7ce107608069142e96625e438
[]
no_license
neel2811/Java
a5249b19b3c3923c44f5b9528adee7a54a978be6
fcafcf634cbf9ce849ecf43bf8e05f770cb85ac1
refs/heads/master
2021-10-26T03:42:57.532886
2017-03-24T10:25:27
2017-03-24T10:25:27
87,059,721
0
1
null
2017-04-03T09:50:10
2017-04-03T09:50:10
null
UTF-8
Java
false
false
921
java
import java.util.Scanner; public class SortContext { private SortingStrategy sortingStrategy; public void setSortingStrategy( SortingStrategy sortingStrategy ) { this.sortingStrategy = sortingStrategy; } private void printArray( int[] inputArray ) { for( int i = 0; i < inputArray.length; i++ ) { System.out.print(inputArray[i] + ","); } System.out.println("\n"); } private int[] readUserInput() { System.out.println("Enter array size : "); Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); System.out.println("Enter input array : "); int[] inputArray = new int[n]; for( int i = 0; i < n; i++ ) { inputArray[i] = scanner.nextInt(); } return inputArray; } public void sort() { int[] inputArray = readUserInput(); inputArray = sortingStrategy.sort(inputArray); printArray(inputArray); } }
[ "ramram_43210@yahoo.com" ]
ramram_43210@yahoo.com
f92939dc2634db095a31565fe8497bf403e5400b
d16f17f3b9d0aa12c240d01902a41adba20fad12
/src/leetcode/leetcode17xx/leetcode1793/Solution.java
8b274cfad98841660c0aa15d1cf42a81904ec648
[]
no_license
redsun9/leetcode
79f9293b88723d2fd123d9e10977b685d19b2505
67d6c16a1b4098277af458849d352b47410518ee
refs/heads/master
2023-06-23T19:37:42.719681
2023-06-09T21:11:39
2023-06-09T21:11:39
242,967,296
38
3
null
null
null
null
UTF-8
Java
false
false
633
java
package leetcode.leetcode17xx.leetcode1793; public class Solution { public int maximumScore(int[] nums, int k) { int ans = nums[k]; int n = nums.length; int l = k - 1, r = k + 1; int threshold = nums[k]; while (true) { while (l >= 0 && nums[l] >= threshold) l--; while (r < n && nums[r] >= threshold) r++; ans = Math.max(ans, (r - l - 1) * threshold); if (l < 0 && r >= n) return ans; threshold = 0; if (l >= 0) threshold = nums[l]; if (r < n) threshold = Math.max(threshold, nums[r]); } } }
[ "mokeev.vladimir@gmail.com" ]
mokeev.vladimir@gmail.com
103c8355809b80246c78996bbd4540ca39dbcec4
f4a9ae388c997fc99f19f518df896ff23d28b959
/src/boj_algorithm/_2000번대/_2300/_2309_일곱난쟁이.java
7c2cc121785415de6bb2b093a4e94ec0d9bb2bc0
[]
no_license
Taekyung2/Java_algorithm
c97c2a09426a195eaec655ee112d7dd6687f4e69
7664e63273d3d2f1b0f43dbab4fec5f0c72e0423
refs/heads/master
2023-03-27T07:30:16.475361
2021-03-24T14:42:24
2021-03-24T14:42:24
259,846,792
0
0
null
null
null
null
UTF-8
Java
false
false
904
java
package boj_algorithm._2300; import java.util.Arrays; import java.util.Scanner; public class _2309_일곱난쟁이 { static int[] pick, len; public static void main(String[] args) { Scanner sc = new Scanner(System.in); pick = new int[7]; len = new int[9]; for(int i = 0; i < 9; i++) len[i] = sc.nextInt(); comb(0, 0); } private static void comb(int cnt, int cur) { if(cnt == 7) { int sum = 0; for(int i = 0; i < 7; i++) { sum += pick[i]; } if(sum == 100) { Arrays.sort(pick); for(int n : pick) System.out.println(n); return; } return; } for(int i = cur; i < 9; i++) { pick[cnt] = len[i]; comb(cnt + 1, i + 1); } } }
[ "ltk3934@daum.net" ]
ltk3934@daum.net
6735c03419c719ad3a32501ed99d86109291d7e5
a502950aaeaf0eb639d7b3deda5e592428a6b506
/app/src/main/java/com/github/pahlevikun/multipleselectrecyclerview/view/adapter/DataAdapter/SelectAdapterItemClickListener.java
07390ded909c9210ddcb97956ffc976a920c4c2a
[]
no_license
pahlevikun/Multiple-RecyclerView
e5bf291a395309c2dd7b754e4c2558b98a26e945
8cd8a7025def293374d3cc3e198e0862e4f39fe0
refs/heads/master
2021-09-09T15:12:00.258082
2018-03-17T10:05:37
2018-03-17T10:05:37
125,609,898
1
1
null
null
null
null
UTF-8
Java
false
false
1,815
java
package com.github.pahlevikun.multipleselectrecyclerview.view.adapter.DataAdapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; /** * Created by farhan on 3/17/18. */ public class SelectAdapterItemClickListener implements RecyclerView.OnItemTouchListener { private OnItemClickInterface mListener; private GestureDetector mGestureDetector; public SelectAdapterItemClickListener(Context context, final RecyclerView recyclerView, OnItemClickInterface listener) { mListener = listener; mGestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() { @Override public boolean onSingleTapUp(MotionEvent e) { return true; } @Override public void onLongPress(MotionEvent e) { View childView = recyclerView.findChildViewUnder(e.getX(), e.getY()); if (childView != null && mListener != null) { mListener.onItemLongClick(childView, recyclerView.getChildPosition(childView)); } } }); } @Override public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) { View childView = view.findChildViewUnder(e.getX(), e.getY()); if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) { mListener.onItemClick(childView, view.getChildPosition(childView)); } return false; } @Override public void onTouchEvent(RecyclerView view, MotionEvent motionEvent) { } @Override public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) { } }
[ "pahlevi.kun@gmail.com" ]
pahlevi.kun@gmail.com
0b8938043712ab16bc689d6457f4f3ad4a185261
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/aosp-mirror--platform_frameworks_base/ed7e00729f78d11107f0e9a7f0559dfe4be6b560/before/SamplingProfilerIntegration.java
1736263a06e12835c2a24380cad0ba35ed5938dd
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
7,486
java
/* * Copyright (C) 2009 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.internal.os; import android.content.pm.PackageInfo; import android.os.Build; import android.os.SystemProperties; import android.util.Log; import dalvik.system.profiler.AsciiHprofWriter; import dalvik.system.profiler.SamplingProfiler; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicBoolean; import libcore.io.IoUtils; /** * Integrates the framework with Dalvik's sampling profiler. */ public class SamplingProfilerIntegration { private static final String TAG = "SamplingProfilerIntegration"; public static final String SNAPSHOT_DIR = "/data/snapshots"; private static final boolean enabled; private static final Executor snapshotWriter; private static final int samplingProfilerMilliseconds; private static final int samplingProfilerDepth; /** Whether or not a snapshot is being persisted. */ private static final AtomicBoolean pending = new AtomicBoolean(false); static { samplingProfilerMilliseconds = SystemProperties.getInt("persist.sys.profiler_ms", 0); samplingProfilerDepth = SystemProperties.getInt("persist.sys.profiler_depth", 4); if (samplingProfilerMilliseconds > 0) { File dir = new File(SNAPSHOT_DIR); dir.mkdirs(); // the directory needs to be writable to anybody to allow file writing dir.setWritable(true, false); // the directory needs to be executable to anybody to allow file creation dir.setExecutable(true, false); if (dir.isDirectory()) { snapshotWriter = Executors.newSingleThreadExecutor(new ThreadFactory() { public Thread newThread(Runnable r) { return new Thread(r, TAG); } }); enabled = true; Log.i(TAG, "Profiling enabled. Sampling interval ms: " + samplingProfilerMilliseconds); } else { snapshotWriter = null; enabled = true; Log.w(TAG, "Profiling setup failed. Could not create " + SNAPSHOT_DIR); } } else { snapshotWriter = null; enabled = false; Log.i(TAG, "Profiling disabled."); } } private static SamplingProfiler INSTANCE; /** * Is profiling enabled? */ public static boolean isEnabled() { return enabled; } /** * Starts the profiler if profiling is enabled. */ public static void start() { if (!enabled) { return; } ThreadGroup group = Thread.currentThread().getThreadGroup(); SamplingProfiler.ThreadSet threadSet = SamplingProfiler.newThreadGroupTheadSet(group); INSTANCE = new SamplingProfiler(samplingProfilerDepth, threadSet); INSTANCE.start(samplingProfilerMilliseconds); } /** * Writes a snapshot if profiling is enabled. */ public static void writeSnapshot(final String processName, final PackageInfo packageInfo) { if (!enabled) { return; } /* * If we're already writing a snapshot, don't bother enqueueing another * request right now. This will reduce the number of individual * snapshots and in turn the total amount of memory consumed (one big * snapshot is smaller than N subset snapshots). */ if (pending.compareAndSet(false, true)) { snapshotWriter.execute(new Runnable() { public void run() { try { writeSnapshotFile(processName, packageInfo); } finally { pending.set(false); } } }); } } /** * Writes the zygote's snapshot to internal storage if profiling is enabled. */ public static void writeZygoteSnapshot() { if (!enabled) { return; } writeSnapshotFile("zygote", null); INSTANCE.shutdown(); INSTANCE = null; } /** * pass in PackageInfo to retrieve various values for snapshot header */ private static void writeSnapshotFile(String processName, PackageInfo packageInfo) { if (!enabled) { return; } INSTANCE.stop(); /* * We use the current time as a unique ID. We can't use a counter * because processes restart. This could result in some overlap if * we capture two snapshots in rapid succession. */ long start = System.currentTimeMillis(); String name = processName.replaceAll(":", "."); String path = SNAPSHOT_DIR + "/" + name + "-" +System.currentTimeMillis() + ".snapshot"; PrintStream out = null; try { out = new PrintStream(new BufferedOutputStream(new FileOutputStream(path))); generateSnapshotHeader(name, packageInfo, out); new AsciiHprofWriter(INSTANCE.getHprofData(), out).write(); if (out.checkError()) { throw new IOException(); } } catch (IOException e) { Log.e(TAG, "Error writing snapshot to " + path, e); return; } finally { IoUtils.closeQuietly(out); } // set file readable to the world so that SamplingProfilerService // can put it to dropbox new File(path).setReadable(true, false); long elapsed = System.currentTimeMillis() - start; Log.i(TAG, "Wrote snapshot for " + name + " in " + elapsed + "ms."); } /** * generate header for snapshots, with the following format (like http header): * * Version: <version number of profiler>\n * Process: <process name>\n * Package: <package name, if exists>\n * Package-Version: <version number of the package, if exists>\n * Build: <fingerprint>\n * \n * <the actual snapshot content begins here...> */ private static void generateSnapshotHeader(String processName, PackageInfo packageInfo, PrintStream out) { // profiler version out.println("Version: 2"); out.println("Process: " + processName); if (packageInfo != null) { out.println("Package: " + packageInfo.packageName); out.println("Package-Version: " + packageInfo.versionCode); } out.println("Build: " + Build.FINGERPRINT); // single blank line means the end of snapshot header. out.println(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
84bbe6cc64d41693220692ee6e87852fb8bcfd2e
a57d8bf94ca13ae05837412cf2ab2fe19dd7d3f6
/src/day39_StaticBlock/StaticBlocks.java
ecdb32b2d110cd868766a960f778d0795f9d0fff
[]
no_license
SerdarAnnakurdov/myAllFilesCybertek
1bdeb3feba7664f6346bf3a4f62ae825a54ccbe9
61260280d14d841cf02e1df8981c0f602ea0dd73
refs/heads/master
2023-02-23T09:57:30.270111
2021-02-01T21:31:33
2021-02-01T21:31:33
333,541,067
0
0
null
null
null
null
UTF-8
Java
false
false
979
java
package day39_StaticBlock; import day37_CustomClass.Employee; public class StaticBlocks { public static String company; public static Employee employee1; public int a; public static int b; public static boolean isEmployeed; static { company = "Capital One"; isEmployeed = true; employee1 = new Employee(); employee1.setInfo("John", company, "SDET", "A123", "Male", 40, 44); // a = 100; b = 200; System.out.println("Static Block"); } //exelSheet /* public static void main(String[] args) { company = "Capital One"; isEmployeed = true; employee1 = new Employee(); employee1.setInfo("John", company, "SDET", "A123", "Male", 40, 44); b = 200; isEmployeed = true; System.out.println(company); System.out.println(employee1); System.out.println(b); System.out.println(isEmployeed); } */ }
[ "serjonchik@gmail.com" ]
serjonchik@gmail.com
d5cc326d0ee26cb8bccd7b2ec0c739df19976ccf
5bff9797c2204896373c43dc68186a2a205be47f
/src/main/java/lyx/miaosha/dao/orderdao.java
fcca5f2b01b679394230dcf58b33104a8789872a
[]
no_license
sduliyuxing/java_miaosha
bf9bf6edbe7555b644490ea15860f8e7ecd888cc
a801c8f3c075292ab89f1e5c4064f85d64c7cd38
refs/heads/master
2020-04-15T15:58:11.088452
2019-04-14T10:13:16
2019-04-14T10:13:16
164,813,271
0
0
null
null
null
null
UTF-8
Java
false
false
1,460
java
package lyx.miaosha.dao; import lyx.miaosha.pojo.miaoshaorder; import lyx.miaosha.pojo.orderinfo; import org.apache.ibatis.annotations.*; /** * @Title orderdao * @Description * @Copyright: 版权所有 (c) 2018 - 2019 * @Company: 电子商务中心 * @Author lyx * @Version 1.0.0 * @Create 2019\1\3 0003 10:34 */ @Mapper public interface orderdao { @Select("select * from miaosha_order where user_id=#{userId} and goods_id=#{goodsId}") public miaoshaorder getMiaoshaOrderByUserIdGoodsId(@Param("userId") long userId, @Param("goodsId")long goodsId); @Insert("insert into order_info(user_id, goods_id, goods_name, goods_count, goods_price, order_channel, status, create_date)values(" + "#{userId}, #{goodsId}, #{goodsName}, #{goodsCount}, #{goodsPrice}, #{orderChannel},#{status},#{createDate} )") @SelectKey(keyColumn="id", keyProperty="id", resultType=long.class, before=false, statement="select last_insert_id()") public long insert(orderinfo orderInfo); @Insert("insert into miaosha_order (user_id, goods_id, order_id)values(#{userId}, #{goodsId}, #{orderId})") public int insertMiaoshaOrder(miaoshaorder miaoshaOrder); @Select("select * from order_info where id = #{orderId}") public orderinfo getOrderById(@Param("orderId")long orderId); @Delete("delete from order_info") public void deleteOrders(); @Delete("delete from miaosha_order") public void deleteMiaoshaOrders(); }
[ "Admin" ]
Admin
d6dbfceaa325be557ea99fec7dbfccad18f1b039
84dda14fb8eece4f7ebed3b9fa253531e02d114b
/src/com/android/documentsui/picker/MenuManager.java
f14b6e136195e0dbb888b7bce93bead78c80bb8b
[]
no_license
Ankits-lab/packages_apps_DocumentsUI
90c04addfc4b78f8c554cfa5e459e8a30aad8662
33893178a5e4586798706031f165dcda58d1afd2
refs/heads/main
2023-01-12T03:40:56.461032
2020-11-14T10:43:21
2020-11-14T10:43:21
312,795,942
0
0
null
null
null
null
UTF-8
Java
false
false
5,417
java
/* * Copyright (C) 2016 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.documentsui.picker; import static com.android.documentsui.base.DocumentInfo.getCursorString; import static com.android.documentsui.base.State.ACTION_CREATE; import static com.android.documentsui.base.State.ACTION_GET_CONTENT; import static com.android.documentsui.base.State.ACTION_OPEN; import static com.android.documentsui.base.State.ACTION_OPEN_TREE; import static com.android.documentsui.base.State.ACTION_PICK_COPY_DESTINATION; import android.database.Cursor; import android.provider.DocumentsContract.Document; import android.view.KeyboardShortcutGroup; import android.view.Menu; import android.view.MenuItem; import com.android.documentsui.Model; import com.android.documentsui.R; import com.android.documentsui.base.Menus; import com.android.documentsui.base.MimeTypes; import com.android.documentsui.base.State; import com.android.documentsui.queries.SearchViewManager; import java.util.List; import java.util.function.IntFunction; import java.util.function.IntSupplier; public final class MenuManager extends com.android.documentsui.MenuManager { private boolean mOnlyDirectory; public MenuManager( SearchViewManager searchManager, State displayState, DirectoryDetails dirDetails, IntSupplier filesCountSupplier) { super(searchManager, displayState, dirDetails, filesCountSupplier); } @Override public void updateKeyboardShortcutsMenu( List<KeyboardShortcutGroup> data, IntFunction<String> stringSupplier) { // None as of yet. } private boolean picking() { return mState.action == ACTION_CREATE || mState.action == ACTION_OPEN_TREE || mState.action == ACTION_PICK_COPY_DESTINATION; } @Override public void updateOptionMenu(Menu menu) { super.updateOptionMenu(menu); if (picking()) { // May already be hidden because the root // doesn't support search. mSearchManager.showMenu(null); // Show on toolbar because there are only two menu items while ACTION_OPEN_TREE. menu.findItem(R.id.option_menu_sort).setShowAsAction(mState.action == ACTION_OPEN_TREE ? MenuItem.SHOW_AS_ACTION_ALWAYS : MenuItem.SHOW_AS_ACTION_NEVER); } } @Override public void updateModel(Model model) { for (String id : model.getModelIds()) { Cursor cursor = model.getItem(id); String docMimeType = getCursorString(cursor, Document.COLUMN_MIME_TYPE); if (!MimeTypes.mimeMatches(Document.MIME_TYPE_DIR, docMimeType)) { mOnlyDirectory = false; return; } } mOnlyDirectory = true; } @Override protected void updateModePicker(MenuItem grid, MenuItem list) { // No display options in recent directories if (picking() && mDirDetails.isInRecents()) { Menus.setEnabledAndVisible(grid, false); Menus.setEnabledAndVisible(list, false); } else { super.updateModePicker(grid, list); } } @Override protected void updateSelectAll(MenuItem selectAll) { boolean visible = mState.allowMultiple && !mOnlyDirectory; Menus.setEnabledAndVisible(selectAll, visible); } @Override protected void updateSelectAll(MenuItem selectAll, SelectionDetails selectionDetails) { final boolean visible = mState.allowMultiple && selectionDetails.size() < mFilesCountSupplier.getAsInt() && !mOnlyDirectory; Menus.setEnabledAndVisible(selectAll, visible); } @Override protected void updateDeselectAll(MenuItem deselectAll, SelectionDetails selectionDetails) { final boolean visible = mState.allowMultiple && selectionDetails.size() == mFilesCountSupplier.getAsInt() && !mOnlyDirectory; Menus.setEnabledAndVisible(deselectAll, visible); } @Override protected void updateCreateDir(MenuItem createDir) { createDir.setShowAsAction(picking() ? MenuItem.SHOW_AS_ACTION_ALWAYS : MenuItem.SHOW_AS_ACTION_NEVER); Menus.setEnabledAndVisible(createDir, picking() && mDirDetails.canCreateDirectory()); } @Override protected void updateSelect(MenuItem select, SelectionDetails selectionDetails) { Menus.setEnabledAndVisible(select, (mState.action == ACTION_GET_CONTENT || mState.action == ACTION_OPEN) && selectionDetails.size() > 0); select.setTitle(R.string.menu_select); } }
[ "keneankit01@gmail.com" ]
keneankit01@gmail.com
b5139e3a3cfdd6adf7eb609fcdfa5ac858809a2a
648eff69d6ce3454d19dee188dc629f66f09646f
/library/src/main/java/com/yuyh/library/imgsel/utils/LogUtils.java
0118b2689a505e3f70bd4660ba6ccc1160ec3810
[ "Apache-2.0" ]
permissive
smuyyh/ImageSelector
1affb34aea368507611719a33911f3b9322b3db0
67ccc8f3d4a84ff6b1a16d89558b457b10a91bef
refs/heads/master
2023-07-19T01:28:35.836337
2022-10-09T04:21:51
2022-10-09T04:21:51
65,000,141
1,774
306
Apache-2.0
2019-11-25T03:17:37
2016-08-05T07:54:00
Java
UTF-8
Java
false
false
5,690
java
package com.yuyh.library.imgsel.utils; import android.content.Context; import android.util.Log; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; /** * Log工具类,可控制Log输出开关、保存Log到文件、过滤输出等级 * * @author yuyh. * @date 16/4/9. */ public class LogUtils { private static Boolean LOG_SWITCH = true; // 日志文件总开关 private static Boolean LOG_TO_FILE = false; // 日志写入文件开关 private static String LOG_TAG = "TAG"; // 默认的tag private static char LOG_TYPE = 'v';// 输入日志类型,v代表输出所有信息,w则只输出警告... private static int LOG_SAVE_DAYS = 7;// sd卡中日志文件的最多保存天数 private final static SimpleDateFormat LOG_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 日志的输出格式 private final static SimpleDateFormat FILE_SUFFIX = new SimpleDateFormat("yyyy-MM-dd");// 日志文件格式 private static String LOG_FILE_PATH; // 日志文件保存路径 private static String LOG_FILE_NAME;// 日志文件保存名称 public static void init(Context context) { // 在Application中初始化 LOG_FILE_PATH = FileUtils.createRootPath(context); LOG_FILE_NAME = "Log"; } /**************************** Warn *********************************/ public static void w(Object msg) { w(LOG_TAG, msg); } public static void w(String tag, Object msg) { w(tag, msg, null); } public static void w(String tag, Object msg, Throwable tr) { log(tag, msg.toString(), tr, 'w'); } /*************************** Error ********************************/ public static void e(Object msg) { e(LOG_TAG, msg); } public static void e(String tag, Object msg) { e(tag, msg, null); } public static void e(String tag, Object msg, Throwable tr) { log(tag, msg.toString(), tr, 'e'); } /*************************** Debug ********************************/ public static void d(Object msg) { d(LOG_TAG, msg); } public static void d(String tag, Object msg) {// 调试信息 d(tag, msg, null); } public static void d(String tag, Object msg, Throwable tr) { log(tag, msg.toString(), tr, 'd'); } /**************************** Info *********************************/ public static void i(Object msg) { i(LOG_TAG, msg); } public static void i(String tag, Object msg) { i(tag, msg, null); } public static void i(String tag, Object msg, Throwable tr) { log(tag, msg.toString(), tr, 'i'); } /************************** Verbose ********************************/ public static void v(Object msg) { v(LOG_TAG, msg); } public static void v(String tag, Object msg) { v(tag, msg, null); } public static void v(String tag, Object msg, Throwable tr) { log(tag, msg.toString(), tr, 'v'); } /** * 根据tag, msg和等级,输出日志 * * @param tag * @param msg * @param level */ private static void log(String tag, String msg, Throwable tr, char level) { if (LOG_SWITCH) { if ('e' == level && ('e' == LOG_TYPE || 'v' == LOG_TYPE)) { // 输出错误信息 Log.e(tag, msg, tr); } else if ('w' == level && ('w' == LOG_TYPE || 'v' == LOG_TYPE)) { Log.w(tag, msg, tr); } else if ('d' == level && ('d' == LOG_TYPE || 'v' == LOG_TYPE)) { Log.d(tag, msg, tr); } else if ('i' == level && ('d' == LOG_TYPE || 'v' == LOG_TYPE)) { Log.i(tag, msg, tr); } else { Log.v(tag, msg, tr); } if (LOG_TO_FILE) log2File(String.valueOf(level), tag, msg + tr == null ? "" : "\n" + Log.getStackTraceString(tr)); } } /** * 打开日志文件并写入日志 * * @return **/ private synchronized static void log2File(String mylogtype, String tag, String text) { Date nowtime = new Date(); String date = FILE_SUFFIX.format(nowtime); String dateLogContent = LOG_FORMAT.format(nowtime) + ":" + mylogtype + ":" + tag + ":" + text; // 日志输出格式 File destDir = new File(LOG_FILE_PATH); if (!destDir.exists()) { destDir.mkdirs(); } File file = new File(LOG_FILE_PATH, LOG_FILE_NAME + date); try { FileWriter filerWriter = new FileWriter(file, true); BufferedWriter bufWriter = new BufferedWriter(filerWriter); bufWriter.write(dateLogContent); bufWriter.newLine(); bufWriter.close(); filerWriter.close(); } catch (IOException e) { e.printStackTrace(); } } /** * 删除指定的日志文件 */ public static void delFile() {// 删除日志文件 String needDelFiel = FILE_SUFFIX.format(getDateBefore()); File file = new File(LOG_FILE_PATH, needDelFiel + LOG_FILE_NAME); if (file.exists()) { file.delete(); } } /** * 得到LOG_SAVE_DAYS天前的日期 * * @return */ private static Date getDateBefore() { Date nowtime = new Date(); Calendar now = Calendar.getInstance(); now.setTime(nowtime); now.set(Calendar.DATE, now.get(Calendar.DATE) - LOG_SAVE_DAYS); return now.getTime(); } }
[ "352091626@qq.com" ]
352091626@qq.com
760889e9259e603477596b09f4f6023bc5521f71
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/21/21_5215547ea3a64183b1ffd1ac919b76e69518e6bd/ArtifactConstructionSupport/21_5215547ea3a64183b1ffd1ac919b76e69518e6bd_ArtifactConstructionSupport_t.java
0935157f751b926694d937f2e2a882ee8aa466ab
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,170
java
package org.apache.maven.artifact.construction; /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; /** * @author jdcasey */ public class ArtifactConstructionSupport { public Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type ) { return createArtifact( groupId, artifactId, version, scope, type, null, null ); } public Artifact createArtifactWithClassifier( String groupId, String artifactId, String version, String scope, String type, String classifier ) { return createArtifact( groupId, artifactId, version, scope, type, classifier, null ); } public Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type, String inheritedScope ) { return createArtifact( groupId, artifactId, version, scope, type, null, inheritedScope ); } public Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type, String classifier, String inheritedScope ) { // TODO: can refactor, use scope handler // re-instate this if test deps are propogated // if ( Artifact.SCOPE_TEST.equals( inheritedScope ) && Artifact.SCOPE_TEST.equals( scope ) ) if ( Artifact.SCOPE_TEST.equals( inheritedScope ) ) { return null; } String desiredScope = Artifact.SCOPE_RUNTIME; if ( Artifact.SCOPE_COMPILE.equals( scope ) && inheritedScope == null ) { desiredScope = Artifact.SCOPE_COMPILE; } // vvv added to retain compile scope. Remove if you want compile inherited as runtime else if ( Artifact.SCOPE_COMPILE.equals( scope ) && Artifact.SCOPE_COMPILE.equals( inheritedScope ) ) { desiredScope = Artifact.SCOPE_COMPILE; } // ^^^ added to retain compile scope. Remove if you want compile inherited as runtime // re-instate this if test deps are propogated // if ( Artifact.SCOPE_TEST.equals( scope ) || Artifact.SCOPE_TEST.equals( inheritedScope ) ) if ( Artifact.SCOPE_TEST.equals( scope ) ) { desiredScope = Artifact.SCOPE_TEST; } return new DefaultArtifact( groupId, artifactId, version, desiredScope, type ); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5b82cf3560210dfeede190681bf9c0db9d71289a
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Honor5C-7.0/src/main/java/com/android/server/location/HwReportTool.java
a5ce3837dd434e20bb4179ab40fea640c9a5bd01
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,608
java
package com.android.server.location; import android.content.Context; import android.os.RemoteException; import android.util.Log; import com.huawei.lcagent.client.LogCollectManager; import dalvik.system.PathClassLoader; import java.lang.reflect.Method; public class HwReportTool { private static final boolean DEBUG = false; private static final String REPORTERINTERFACE_LIB_PATH = "/system/framework/com.huawei.report.jar"; private static final String REPORT_CLS = "com.huawei.report.ReporterInterface"; private static final String REPORT_METHOD_E = "e"; private static final String TAG = "HwReportTool"; private static volatile HwReportTool sSingleInstance; private LogCollectManager mClient; private Context mContext; private Method sReportMethod; private Class<?> sReporterClazz; static { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: com.android.server.location.HwReportTool.<clinit>():void at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281) at jadx.api.JavaClass.decompile(JavaClass.java:59) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161) Caused by: jadx.core.utils.exceptions.DecodeException: in method: com.android.server.location.HwReportTool.<clinit>():void at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98) ... 5 more Caused by: java.lang.IllegalArgumentException: bogus opcode: 0073 at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1197) at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212) at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72) at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43) ... 6 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: com.android.server.location.HwReportTool.<clinit>():void"); } public static HwReportTool getInstance(Context context) { if (sSingleInstance == null) { sSingleInstance = new HwReportTool(context.getApplicationContext()); } return sSingleInstance; } private HwReportTool(Context context) { this.sReporterClazz = null; this.sReportMethod = null; this.mClient = null; this.mContext = null; initReporter(context); } private void initReporter(Context context) { try { this.sReporterClazz = new PathClassLoader(REPORTERINTERFACE_LIB_PATH, context.getClassLoader()).loadClass(REPORT_CLS); this.sReportMethod = this.sReporterClazz.getDeclaredMethod(REPORT_METHOD_E, new Class[]{Context.class, Integer.TYPE, String.class}); this.mClient = new LogCollectManager(context); this.mContext = context; } catch (ClassNotFoundException e) { Log.e(TAG, "Can't find sReporterClazz"); this.sReporterClazz = null; } catch (NoSuchMethodException e2) { Log.e(TAG, "Can't find sReportMethod"); this.sReportMethod = null; } catch (NullPointerException e3) { e3.printStackTrace(); } } public boolean report(int eventID, String eventMsg) { if (!isBetaUser()) { Log.e(TAG, "This is not beta user build"); } else if (!(this.sReportMethod == null || this.sReporterClazz == null)) { try { return ((Boolean) this.sReportMethod.invoke(this.sReporterClazz, new Object[]{this.mContext, Integer.valueOf(eventID), eventMsg})).booleanValue(); } catch (Exception e) { Log.e(TAG, "got exception" + e.getMessage(), e); } } return DEBUG; } private boolean isBetaUser() { return 3 == getUserType() ? true : DEBUG; } private int getUserType() { int userType = -1; if (this.mClient == null) { return userType; } try { userType = this.mClient.getUserType(); } catch (RemoteException e) { e.printStackTrace(); } catch (NullPointerException e2) { e2.printStackTrace(); } if (DEBUG) { Log.d(TAG, "userType is: " + userType); } return userType; } }
[ "dstmath@163.com" ]
dstmath@163.com
2a447c5d7080e6696811520cbfb4ec5dc6ce87c0
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.5.1/sources/kotlin/reflect/jvm/internal/impl/load/java/components/JavaRetentionAnnotationDescriptor$allValueArguments$2.java
5288f5f0107fb0916332865448a54e27414262b0
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
973
java
package kotlin.reflect.jvm.internal.impl.load.java.components; import java.util.Map; import kotlin.j; import kotlin.jvm.a.a; import kotlin.jvm.internal.Lambda; import kotlin.reflect.jvm.internal.impl.name.f; /* compiled from: JavaAnnotationMapper.kt */ final class JavaRetentionAnnotationDescriptor$allValueArguments$2 extends Lambda implements a<Map<f, ? extends kotlin.reflect.jvm.internal.impl.resolve.constants.f<?>>> { final /* synthetic */ h this$0; JavaRetentionAnnotationDescriptor$allValueArguments$2(h hVar) { this.this$0 = hVar; super(0); } /* renamed from: adu */ public final Map<f, kotlin.reflect.jvm.internal.impl.resolve.constants.f<?>> invoke() { kotlin.reflect.jvm.internal.impl.resolve.constants.f a = d.eGf.a(this.this$0.bfO()); Map<f, kotlin.reflect.jvm.internal.impl.resolve.constants.f<?>> h = a != null ? ac.h(j.D(c.eGc.bfR(), a)) : null; return h != null ? h : ad.emptyMap(); } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
5c6ab0776d252b89ad32cdf366feeefeb676e502
2cf1e5a7e3532b1db2d28074f57123c9f75619ef
/src/main/java/practice/problem/NRepeatedElementInSize2NArray.java
7dc3ac5ed99b359c54aebf1bb694f7c670c7a97d
[]
no_license
jimty0511/algorithmPractice
33f15c828a1463d7a1ea247b424e577fde37e1dd
dd524388e9d5c70ee97869b63465f3cd171f9460
refs/heads/master
2020-03-20T14:57:01.722957
2020-02-19T19:43:39
2020-02-19T19:43:39
137,497,450
0
0
null
null
null
null
UTF-8
Java
false
false
280
java
package practice.problem; public class NRepeatedElementInSize2NArray { public int repeatedNTimes(int[] A) { for (int i = 2; i < A.length; i++) { if (A[i] == A[i - 1] || A[i] == A[i - 2]) return A[i]; } return A[0]; } }
[ "ty90511@gmail.com" ]
ty90511@gmail.com
53c24ad2f8becd21b0a052fe4df851ca3832cf11
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/15/15_e5c7576a99050b091d66475affbd6886296b4cf4/Type/15_e5c7576a99050b091d66475affbd6886296b4cf4_Type_t.java
1a4e1aa0f4716bb7a7acf8e294b57f6d2d3ba33f
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,401
java
/************************************************************************ * This file is part of AdminCmd. * * AdminCmd 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. * * AdminCmd 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 AdminCmd. If not, see <http://www.gnu.org/licenses/>. ************************************************************************/ package be.Balor.Tools; import java.util.HashMap; import java.util.Map; /** * @author Balor (aka Antoine Aflalo) * */ public enum Type { FLY(Category.SUPER_POWER), VULCAN(Category.SUPER_POWER), GOD(Category.SUPER_POWER), THOR(Category.SUPER_POWER), BANNED( Category.SANCTION), FIREBALL(Category.SUPER_POWER), SPYMSG(Category.OTHER), FROZEN( Category.SANCTION), MUTED(Category.SANCTION), MOB_LIMIT(Category.WORLD), NO_PICKUP(Category.SUPER_POWER), WEATHER_FROZEN(Category.WORLD), REPEAT_CMD(Category.OTHER), TIME_FREEZED(Category.WORLD), TP_REQUEST(Category.OTHER), TP_AT_SEE(Category.SUPER_POWER), SUPER_BREAKER(Category.SUPER_POWER), FAKEQUIT(Category.SUPER_POWER), ETERNAL(Category.SUPER_POWER), CUSTOM(Category.MISC); private static final Map<String, Type> lookupName = new HashMap<String, Type>(); @Override public String toString() { String s = super.toString(); return s.toLowerCase(); } public String display() { String s = super.toString(); return s.substring(0, 1) + s.substring(1).toLowerCase().replaceAll("_", " "); } private final Category category; private Type(Category category) { this.category = category; } /** * Attempts to match the Type with the given name. This is a match lookup; * names will be converted to uppercase, then stripped of special characters * in an attempt to format it like the enum * * @param name * Name of the type to get * @return Type if found, or null */ public static Type matchType(final String name) { Type result = null; String filtered = name.toUpperCase(); filtered = filtered.replaceAll("\\s+", "_").replaceAll("\\W", ""); result = lookupName.get(filtered); return result; } public static void addCustomPower(final String name) { lookupName.put(name, CUSTOM); } static { for (Type type : values()) { lookupName.put(type.name(), type); } } /** * Gets the Category assigned to this type * * @return Category of this Type */ public Category getCategory() { return category; } public enum Category { SUPER_POWER, WORLD, OTHER, SANCTION, MISC; } public enum Weather { STORM, RAIN, CLEAR, FREEZE; } public enum Tp { HERE, TO, PLAYERS; @Override public String toString() { String s = super.toString(); return s.toLowerCase().replaceAll("_", " "); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
da7250886cd337021c39247a24aceef8c3445e79
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/aweme/router/C37281o.java
5b44c78fd86b6d57bd34efd10fd3facdb96104f0
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,962
java
package com.p280ss.android.ugc.aweme.router; import android.app.Activity; import android.view.View; import com.p280ss.android.ugc.aweme.router.C7195s.C7202b; import kotlin.jvm.internal.C7573i; /* renamed from: com.ss.android.ugc.aweme.router.o */ public final class C37281o implements C37273j { /* renamed from: a */ private final C7202b f97399a; public C37281o(C7202b bVar) { C7573i.m23587b(bVar, "routerOpen"); this.f97399a = bVar; } /* renamed from: b */ private final String m119737b(String str) { if (str == null) { return null; } return this.f97399a.mo18692a(str); } /* renamed from: a */ public final boolean mo59315a(String str) { boolean z; String b = m119737b(str); CharSequence charSequence = b; if (charSequence == null || charSequence.length() == 0) { z = true; } else { z = false; } if (z) { return false; } return C7195s.m22438a().mo18682a(b); } /* renamed from: a */ public final boolean mo59313a(Activity activity, String str) { boolean z; String b = m119737b(str); CharSequence charSequence = b; if (charSequence == null || charSequence.length() == 0) { z = true; } else { z = false; } if (z) { return false; } return C7195s.m22438a().mo18679a(activity, b); } /* renamed from: a */ public final boolean mo59314a(Activity activity, String str, View view) { boolean z; String b = m119737b(str); CharSequence charSequence = b; if (charSequence == null || charSequence.length() == 0) { z = true; } else { z = false; } if (z) { return false; } return C7195s.m22438a().mo18681a(activity, b, view); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
b1b8ef29afe0b8261db186cda0195588d6871b45
c11c1ca89af764cc9add6cd02926bf8bec8fa8e6
/src/main/java/com/kf/data/bill/parser/CiticbankBill.java
bae2c4f7e65aa71bb01afb22c5331135b60814c6
[]
no_license
liangyangtao/bill
c78c6f015190736df8da30c173cdc98e92dc7c7d
174ce2d93ffb094ed2c99e2dd1c23e17a7191653
refs/heads/master
2021-01-21T12:43:24.066336
2017-05-23T16:01:36
2017-05-23T16:01:36
91,801,375
0
0
null
2017-05-23T16:01:37
2017-05-19T11:58:36
Java
UTF-8
Java
false
false
2,782
java
package com.kf.data.bill.parser; import java.util.Date; import java.util.HashMap; import java.util.Map; import com.kf.data.crawler.fetcher.Fetcher; import com.kf.data.crawler.tools.Md5Tools; import com.kf.data.mybatis.factory.BaseDao; import net.sf.json.JSONArray; import net.sf.json.JSONObject; public class CiticbankBill { private String bankName = "中信银行"; private String tableName = "citicbankBill"; public void spider() { int pageNum = 1; int pageSite = 100; int i = 1; for (; i <= pageNum; i++) { String url = "https://etrade.citicbank.com/portalweb/fd/getFinaList.htm"; Map<String, String> params = new HashMap<String, String>(); params.put("branchId", "701100"); params.put("totuseAmt", "02"); params.put("orderField", "ppo_incomerate"); params.put("orderType", "desc"); params.put("currentPage", ""+i); params.put("pageSize", "10"); params.put("pwdControlFlag", "0"); params.put("responseFormat", "JSON"); params.put("random", "3740"); String html = Fetcher.getInstance().post(url, params, null, "utf-8"); pageNum = parser(html); } } private int parser(String html) { JSONObject resultObject = JSONObject.fromObject(html); int pageCount = resultObject.getInt("pageCount"); JSONObject content = resultObject.getJSONObject("content"); JSONArray jsonArray = content.getJSONArray("resultList"); for (Object object : jsonArray) { JSONObject jsonObject = JSONObject.fromObject(object); Map<String, Object> result = new HashMap<String, Object>(); result.put("product_bank", bankName); result.put("product_stats", ""); result.put("product_limit", ""); result.put("product_income_type", ""); result.put("product_currency", ""); result.put("product_purchasse_amount", jsonObject.getString("firstAmt")); result.put("product_type", jsonObject.getString("prdType")); result.put("product_name", jsonObject.getString("prdName")); result.put("product_code", jsonObject.getString("prdNo")); result.put("product_start", jsonObject.getString("ipoBeginDate")); result.put("product_end", jsonObject.getString("ipoEndDate")); // result.put("product_expire", jsonObject.getString("prd_next_date")); result.put("product_anticipated", jsonObject.getString("incomerate")); result.put("product_invest_type", ""); result.put("product_risk_type", jsonObject.getString("riskLevel")); result.put("product_channel", ""); result.put("product_area", ""); result.put("unmd", Md5Tools.GetMD5Code(jsonObject.getString("prdName"))); result.put("uptime", new Date()); String sql = "insert into " + tableName + " "; new BaseDao().executeMapSql(sql, result); } return pageCount; } }
[ "liangyt@kaifengdata.com" ]
liangyt@kaifengdata.com
50de837caf3ef102ea16c5036905a85ccc37e396
75c8d4d130bb8588313344d15f9e33b15e813791
/java/l2server/gameserver/stats/conditions/ConditionPlayerSubclass.java
1a38cd12440178383a3137a2df4c888506fb757e
[]
no_license
Hl4p3x/L2T_Server
2fd6a94f388679100115a4fb5928a8e7630656f7
66134d76aa22f90933af9119c7b198c4960283d3
refs/heads/master
2022-09-11T05:59:46.310447
2022-08-17T19:54:58
2022-08-17T19:54:58
126,422,985
2
2
null
2022-08-17T19:55:00
2018-03-23T02:38:43
Java
UTF-8
Java
false
false
1,364
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/>. */ package l2server.gameserver.stats.conditions; import l2server.gameserver.model.actor.instance.L2PcInstance; import l2server.gameserver.stats.Env; /** * The Class ConditionPlayerSubclass. */ public class ConditionPlayerSubclass extends Condition { private final boolean _val; /** * Instantiates a new condition player subclass. * * @param val the val */ public ConditionPlayerSubclass(boolean val) { _val = val; } /* (non-Javadoc) * @see l2server.gameserver.stats.conditions.Condition#testImpl(l2server.gameserver.stats.Env) */ @Override public boolean testImpl(Env env) { return !(env.player instanceof L2PcInstance) || ((L2PcInstance) env.player).isSubClassActive() == _val; } }
[ "pere@pcasafont.net" ]
pere@pcasafont.net
4a2762c2d9845fc28b82de0d7e5a987f44132a3c
89be44270846bd4f32ca3f51f29de4921c1d298a
/bitcamp-project-server/v42_1/src/main/java/com/eomcs/lms/dao/mariadb/MemberDaoImpl.java
a714efc4cd5a7e07905ee9ff9041aa436829654b
[]
no_license
nayoung00/bitcamp-study
931b439c40a8fe10bdee49c0aaf449399d8fe801
b3d3c9135114cf17c7afd3ceaee83b5c2cedff29
refs/heads/master
2020-09-28T17:39:04.332086
2020-04-30T23:57:45
2020-04-30T23:57:45
226,825,309
0
0
null
null
null
null
UTF-8
Java
false
false
5,157
java
package com.eomcs.lms.dao.mariadb; import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import com.eomcs.lms.dao.MemberDao; import com.eomcs.lms.domain.Member; import com.eomcs.sql.DataSource; public class MemberDaoImpl implements MemberDao { DataSource dataSource; public MemberDaoImpl(DataSource dataSource) { this.dataSource = dataSource; } @Override public int insert(Member member) throws Exception { try (Connection con = dataSource.getConnection(); Statement stmt = con.createStatement()) { int result = stmt.executeUpdate("insert into lms_member(name ,email, pwd, tel, photo)" + " values('" + member.getName() + "','" + member.getEmail() + "',password('" + member.getPassword() + "'), '" + member.getTel() + "','" + member.getPhoto() + "')"); return result; } } @Override public List<Member> findAll() throws Exception { try (Connection con = dataSource.getConnection(); Statement stmt = con.createStatement(); ResultSet rs = stmt .executeQuery("select member_id, name, email, pwd, cdt, tel, photo from lms_member");) { ArrayList<Member> list = new ArrayList<>(); while (rs.next()) { Member member = new Member(); member.setNo(rs.getInt("member_id")); member.setName(rs.getString("name")); member.setEmail(rs.getString("email")); member.setPassword(rs.getString("pwd")); member.setRegisteredDate(rs.getDate("cdt")); member.setTel(rs.getString("tel")); member.setPhoto(rs.getString("photo")); list.add(member); } return list; } } @Override public Member findByNo(int no) throws Exception { try (Connection con = dataSource.getConnection(); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery( "select member_id, name, email, pwd, cdt, tel, photo from lms_member where member_id=" + no)) { if (rs.next()) { Member member = new Member(); member.setNo(rs.getInt("member_id")); member.setName(rs.getString("name")); member.setEmail(rs.getString("email")); member.setPassword(rs.getString("pwd")); member.setRegisteredDate(rs.getDate("cdt")); member.setTel(rs.getString("tel")); member.setPhoto(rs.getString("photo")); return member; } else { return null; } } } @Override public int update(Member member) throws Exception { try (Connection con = dataSource.getConnection(); Statement stmt = con.createStatement()) { int result = stmt.executeUpdate(// "update lms_member set name= '" + member.getName() // + "', email='" + member.getEmail()// + "', pwd=password('" + member.getPassword() // + "'), tel='" + member.getTel() // + "', photo='" + member.getPhoto() // + "' where member_id=" + member.getNo()); return result; } } @Override public int delete(int no) throws Exception { try (Connection con = dataSource.getConnection(); Statement stmt = con.createStatement()) { int result = stmt.executeUpdate("delete from lms_member where member_id = " + no); return result; } } @Override public List<Member> findByKeyword(String keyword) throws Exception { try (Connection con = dataSource.getConnection(); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery( // "select member_id, name, email, tel, cdt" // + " from lms_member" // + " where name like '%" + keyword // + "%' or email like '%" + keyword // + "%' or tel like '%" + keyword + "%'")) { ArrayList<Member> list = new ArrayList<>(); while (rs.next()) { Member member = new Member(); member.setNo(rs.getInt("member_id")); member.setName(rs.getString("name")); member.setEmail(rs.getString("email")); member.setTel(rs.getString("tel")); member.setRegisteredDate(rs.getDate("cdt")); list.add(member); } return list; } } @Override public Member findByEmailAndPassword(String email, String password) throws Exception { try (Connection con = dataSource.getConnection(); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("select member_id, name, email, pwd, tel, photo" + " from lms_member" + " where email='" + email + "' and pwd=password('" + password + "')")) { if (rs.next()) { Member member = new Member(); member.setNo(rs.getInt("member_id")); member.setName(rs.getString("name")); member.setEmail(rs.getString("email")); member.setPassword(rs.getString("pwd")); member.setTel(rs.getString("tel")); member.setPhoto(rs.getString("photo")); return member; } else { return null; } } } }
[ "invin1201@gmail.com" ]
invin1201@gmail.com
f63b303ae8c6af2fd36b2231a73d833caec45241
ebd93e10e1ea19cf3d87036ce4961fcaaeab0294
/src/main/java/com/hctxsys/service/NewTitleServiceImpl.java
77c9497d84158e63d29edeacb1e61273f6962e1e
[]
no_license
li-jiangshan/hctxsys
5981bbca5a6071f8774b714c26eeaf5e7c732466
1e774463f905c1df1eabe2a0603735e9a65734ff
refs/heads/master
2020-03-21T01:51:11.981265
2018-06-20T01:54:28
2018-06-20T01:55:13
137,966,262
0
0
null
null
null
null
UTF-8
Java
false
false
4,410
java
package com.hctxsys.service; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; import com.hctxsys.entity.YskGoodBrandEntity; import com.hctxsys.entity.YskHealthyEntity; import com.hctxsys.entity.YskHealthyTypeEntity; import com.hctxsys.entity.YskMessageEntity; import com.hctxsys.entity.YskModuleImgEntity; import com.hctxsys.entity.YskNewsTitleEntity; import com.hctxsys.entity.YskUserEntity; import com.hctxsys.repository.NewTitleRepositry; import com.hctxsys.util.Result; import com.hctxsys.util.TableResult; import com.hctxsys.vo.HealthyVo; import com.hctxsys.vo.MessageVo; import com.hctxsys.vo.NewsVo; import com.hctxsys.vo.UserVo; @Service public class NewTitleServiceImpl { @Autowired NewTitleRepositry newTitleRepositry; public TableResult indexTable(TableResult result) { PageRequest request = PageRequest.of(result.getPageNumber(), result.getPageSize());// 获取分页对象 Page<YskNewsTitleEntity> page = newTitleRepositry.findAll(new Specification<YskNewsTitleEntity>() { @Override public Predicate toPredicate(Root<YskNewsTitleEntity> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) { List<Predicate> predicates = new ArrayList<>();// 条件集合 // criteriaQuery.orderBy(criteriaBuilder.desc(root.get("sort"))); if (null != result.getKeyword() && !("".equals(result.getKeyword()))) {// 标题模糊查询 predicates.add( criteriaBuilder.like(root.get("id").as(String.class), '%' + result.getKeyword() + '%')); predicates.add( criteriaBuilder.like(root.get("sort").as(String.class), '%' + result.getKeyword() + '%')); predicates.add(criteriaBuilder.like(root.get("title"), "%" + result.getKeyword() + '%')); criteriaQuery.where(criteriaBuilder.or(predicates.toArray(new Predicate[predicates.size()]))); } criteriaQuery.orderBy(criteriaBuilder.desc(root.get("sort"))); return criteriaQuery.getRestriction(); } }, request); TableResult tableResult = new TableResult(); BeanUtils.copyProperties(result, tableResult);// 将条件信息复制给tableResult tableResult.setTotal(page.getTotalElements());// 设置总记录数 tableResult.setRows(page.getContent());// 设置分页后的集合 tableResult.setPageCount(Long.valueOf(page.getTotalPages()));// 设置总页数 return tableResult; } /** * 查询单个ID信息 * * @param id * @return */ public YskNewsTitleEntity findById(int id) { YskNewsTitleEntity entity = newTitleRepositry.findById(id); return entity; } /** * 新增、更新 * * @param model * @return */ @Transactional public YskNewsTitleEntity updateNew(YskNewsTitleEntity New) { YskNewsTitleEntity entity = null; try { entity = newTitleRepositry.saveAndFlush(New); }catch (Exception e) { } return entity; } /** * 删除 * * @param id */ @Transactional public int deleteNew(int id) { try { newTitleRepositry.deleteById(id); } catch (Exception e) { return 0; } return 1; } public boolean isMatches(String id) { boolean flag = false; try { String regex = "^[1-9]+[0-9]*$"; // ^[1-9]+\\d*$ Pattern p = Pattern.compile(regex); Matcher m = p.matcher(id); if (m.find()) { System.out.println("successss"); return true; } else { System.out.println("falsss"); } } catch (Exception e) { e.printStackTrace(); } return flag; } /**查询具体的消息 * @param id * @return */ public NewsVo getNews(Integer id) { System.out.println(id); NewsVo newsVo = new NewsVo(); YskNewsTitleEntity newsTitleEntity = newTitleRepositry.findById(id).get(); BeanUtils.copyProperties(newsTitleEntity, newsVo); return newsVo; } }
[ "21914439@qq.com" ]
21914439@qq.com
2cdac4fcaea23cb005f90ca160b58bc4c0aa5c0b
894927bf0fc36549955be6fb781974c12bb449eb
/unisa-util/unisa-sharedclasses/src/java/za/ac/unisa/lms/registration/Speciality.java
bc71eb4000978fced5ddd25be35a9eb0629e6d6f
[ "LicenseRef-scancode-generic-cla", "ECL-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
sadupally/Dev
cd32fa3b753e8d20dd80e794618a8e97d1ff1c79
ead9de3993b7a805199ac254c6fa99d3dda48adf
refs/heads/master
2020-03-24T08:15:12.732481
2018-07-27T12:54:29
2018-07-27T12:54:29
142,589,852
0
0
ECL-2.0
2018-07-27T14:49:51
2018-07-27T14:49:50
null
UTF-8
Java
false
false
462
java
package za.ac.unisa.lms.registration; public class Speciality { private String specialityCode; private String specialityDesc; public String getSpecialityCode() { return specialityCode; } public void setSpecialityCode(String specialityCode) { this.specialityCode = specialityCode; } public String getSpecialityDesc() { return specialityDesc; } public void setSpecialityDesc(String specialityDesc) { this.specialityDesc = specialityDesc; } }
[ "UdcsWeb@unisa.ac.za" ]
UdcsWeb@unisa.ac.za
e0cbf9afe9bc3c60551a6bb2fa354056145ec9e7
0fe68de3c4e325e99c865db3f525888f9b3724f0
/creational-patterns-ref/src/main/java/br/com/cod3r/builder/spolleto/after/Client.java
f8a142d5bdc3afb6114e8a36c2d35213429ccc52
[]
no_license
danielbortolozo/designer-pattern
3579b5fe88f6a3b27600b9e59733d3db6623e083
da7b7fcebcff9ec08bda049202a41bc3aae734c9
refs/heads/main
2023-03-14T03:32:05.780367
2021-03-04T01:49:56
2021-03-04T01:49:56
344,316,989
0
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
package br.com.cod3r.builder.spolleto.after; import java.util.Arrays; import br.com.cod3r.builder.spolleto.after.model.Pasta; import br.com.cod3r.builder.spolleto.after.model.Salad; import br.com.cod3r.builder.spolleto.after.model.Size; import br.com.cod3r.builder.spolleto.after.model.builder.PastaBuilder; import br.com.cod3r.builder.spolleto.after.model.builder.SaladBuilder; public class Client { public static void main(String[] args) { PastaBuilder pastaBuilder = new PastaBuilder(); pastaBuilder.setSize(Size.LARGE); Pasta p1 = pastaBuilder.getResult(); System.out.println(p1); SaladBuilder saladBuilder = new SaladBuilder(); saladBuilder.setSize(Size.SMALL); saladBuilder.setToppings(Arrays.asList("Bacon", "Broccoli")); saladBuilder.setSauce(Arrays.asList("Ceasar")); saladBuilder.setCheese(true); Salad p2 = saladBuilder.getResult(); System.out.println(p2); pastaBuilder = new PastaBuilder(); pastaBuilder.setToppings(Arrays.asList("Garlic")); pastaBuilder.setSauce(Arrays.asList("Funghi", "Cheese")); pastaBuilder.setSize(Size.STANDARD); pastaBuilder.setCheese(true); pastaBuilder.setPepper(true); Pasta p3 = pastaBuilder.getResult(); System.out.println(p3); } }
[ "danielbortolozo@hotmail.com" ]
danielbortolozo@hotmail.com
79e116b6a63d0c9dd08c32ba5f70f46751bf5d08
de2eff0e71efe69175d7e54889d84d449d6ed974
/ext-api/src/main/java/org/omg/CORBA/ModuleDef.java
23c7a0b9162d1328021eec8dc71e1aeee68075c9
[]
no_license
mmusgrov/corba
bb266f631ebdcbabb4719f7d70cb8c766609a3e5
03d993498b68d745018061b39196e7818e0fe64d
refs/heads/master
2021-01-18T10:42:20.114343
2013-01-22T06:02:07
2013-01-22T06:02:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
347
java
package org.omg.CORBA; /** * Generated from IDL interface "ModuleDef". * * @author JacORB IDL compiler V 2.3.1, 27-May-2009 * @version generated at 10/01/2013 11:46:10 AM */ public interface ModuleDef extends ModuleDefOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Container, org.omg.CORBA.Contained { }
[ "stuart.w.douglas@gmail.com" ]
stuart.w.douglas@gmail.com
f7353a17643154d76cabde2103f5ab2a4f003eda
4120e073a4b0b2c79870e3ab87b294f98f47d0be
/app/src/main/java/com/rideaustin/rest/model/SupportRequestDto.java
47691e67b0c7857a687f6d40dd922ad9582ef16b
[ "MIT" ]
permissive
jyt109/server
8933281097303d14b5a329f0c679edea4fcd174b
24354717624c25b5d4faf0b7ea540e2742e8039f
refs/heads/master
2022-03-20T10:36:44.973843
2019-10-03T11:43:07
2019-10-03T11:43:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
449
java
package com.rideaustin.rest.model; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Getter; import lombok.Setter; @Getter @Setter @ApiModel public class SupportRequestDto { @ApiModelProperty(value = "Support topic ID", required = true) private Long topicId; @ApiModelProperty("Ride ID") private Long rideId; @ApiModelProperty("Support request comments") private String comments; }
[ "mikhail.chugunov@crossover.com" ]
mikhail.chugunov@crossover.com
35d8cfdb8460dbb4ba7b8f434a3a01749724e74b
c164d8f1a6068b871372bae8262609fd279d774c
/src/main/java/edu/uiowa/slis/VIVOISF/BFO_0000141/BFO_0000141LandAreaYearIterator.java
51f1d5b17b9795ae02824ab4fb063f7ec0b23d7e
[ "Apache-2.0" ]
permissive
eichmann/VIVOISF
ad0a299df177d303ec851ff2453cbcbd7cae1ef8
e80cd8b74915974fac7ebae8e5e7be8615355262
refs/heads/master
2020-03-19T03:44:27.662527
2018-06-03T22:44:58
2018-06-03T22:44:58
135,757,275
0
1
null
null
null
null
UTF-8
Java
false
false
3,310
java
package edu.uiowa.slis.VIVOISF.BFO_0000141; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; import org.apache.jena.query.QuerySolution; import org.apache.jena.query.ResultSet; @SuppressWarnings("serial") public class BFO_0000141LandAreaYearIterator extends edu.uiowa.slis.VIVOISF.TagLibSupport { static BFO_0000141LandAreaYearIterator currentInstance = null; private static final Log log = LogFactory.getLog(BFO_0000141LandAreaYearIterator.class); static boolean firstInstance = false; static boolean lastInstance = false; String subjectURI = null; String landAreaYear = null; ResultSet rs = null; public int doStartTag() throws JspException { currentInstance = this; try { BFO_0000141 ancestorInstance = (BFO_0000141) findAncestorWithClass(this, BFO_0000141.class); if (ancestorInstance != null) { subjectURI = ancestorInstance.getSubjectURI(); } if (ancestorInstance == null && subjectURI == null) { throw new JspException("subject URI generation currently not supported"); } rs = getResultSet(prefix+"SELECT ?s where { <" + subjectURI + "> <http://aims.fao.org/aos/geopolitical.owl#landAreaYear> ?s } "); if(rs.hasNext()) { QuerySolution sol = rs.nextSolution(); landAreaYear = sol.get("?s").isLiteral() ? sol.get("?s").asLiteral().getString() : sol.get("?s").toString(); firstInstance = true; lastInstance = ! rs.hasNext(); return EVAL_BODY_INCLUDE; } } catch (Exception e) { log.error("Exception raised in BFO_0000141Iterator doStartTag", e); clearServiceState(); freeConnection(); throw new JspTagException("Exception raised in BFO_0000141Iterator doStartTag"); } return SKIP_BODY; } public int doAfterBody() throws JspException { try { if(rs.hasNext()) { QuerySolution sol = rs.nextSolution(); landAreaYear = sol.get("?s").isLiteral() ? sol.get("?s").asLiteral().getString() : sol.get("?s").toString(); firstInstance = false; lastInstance = ! rs.hasNext(); return EVAL_BODY_AGAIN; } } catch (Exception e) { log.error("Exception raised in BFO_0000141Iterator doAfterBody", e); clearServiceState(); freeConnection(); throw new JspTagException("Exception raised in BFO_0000141Iterator doAfterBody"); } return SKIP_BODY; } public int doEndTag() throws JspException { currentInstance = null; try { // do processing } catch (Exception e) { log.error("Exception raised in BFO_0000141 doEndTag", e); throw new JspTagException("Exception raised in BFO_0000141 doEndTag"); } finally { clearServiceState(); freeConnection(); } return super.doEndTag(); } private void clearServiceState() { subjectURI = null; } public void setLandAreaYear(String theLandAreaYear) { landAreaYear = theLandAreaYear; } public String getLandAreaYear() { return landAreaYear; } public static void setFirstInstance(Boolean theFirstInstance) { firstInstance = theFirstInstance; } public static Boolean getFirstInstance() { return firstInstance; } public static void setLastInstance(Boolean theLastInstance) { lastInstance = theLastInstance; } public static Boolean getLastInstance() { return lastInstance; } }
[ "david-eichmann@uiowa.edu" ]
david-eichmann@uiowa.edu
8e9ef2982bc61118a0b0323709c78d576eefe03a
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_1002132.java
77f15f1daf274fed9e6b49c0aea54b6b5dcd30a7
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,252
java
/** * @return whether to continue sending reports to this {@link LocationRequestHelper} */ public boolean report(Location location){ if (location == null) return true; if (lastReport != null) { if (location.getTime() - lastReport.getTime() < locationRequest.getFastestInterval()) { return true; } if (location.distanceTo(lastReport) < locationRequest.getSmallestDesplacement()) { return true; } } lastReport=new Location(location); lastReport.setProvider("fused"); Log.d(TAG,"sending Location: " + location); if (listener != null) { try { listener.onLocationChanged(lastReport); } catch ( RemoteException e) { return false; } } else if (pendingIntent != null) { Intent intent=new Intent(); intent.putExtra("com.google.android.location.LOCATION",lastReport); try { pendingIntent.send(context,0,intent); } catch ( PendingIntent.CanceledException e) { return false; } } else if (callback != null) { try { callback.onLocationResult(LocationResult.create(Arrays.asList(lastReport))); } catch ( RemoteException e) { return false; } } numReports++; return numReports < locationRequest.getNumUpdates(); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
45033e2c5654819f204c63056b539e4ce7238516
f2b6d20a53b6c5fb451914188e32ce932bdff831
/src/com/linkedin/data/lite/DataProcessor.java
3d8278e15f830e5523e2b38414ab7da48734a714
[]
no_license
reverseengineeringer/com.linkedin.android
08068c28267335a27a8571d53a706604b151faee
4e7235e12a1984915075f82b102420392223b44d
refs/heads/master
2021-04-09T11:30:00.434542
2016-07-21T03:54:43
2016-07-21T03:54:43
63,835,028
3
0
null
null
null
null
UTF-8
Java
false
false
2,208
java
package com.linkedin.data.lite; public abstract interface DataProcessor { public abstract void endArray() throws DataProcessorException; public abstract void endMap() throws DataProcessorException; public abstract void endRecord() throws DataProcessorException; public abstract void endUnion() throws DataProcessorException; public abstract void processArrayItem(int paramInt) throws DataProcessorException; public abstract void processBoolean(boolean paramBoolean) throws DataProcessorException; public abstract void processBytes(Bytes paramBytes) throws DataProcessorException; public abstract <T extends DataTemplate<T>> T processDataTemplate(T paramT) throws DataProcessorException; public abstract void processDouble(double paramDouble) throws DataProcessorException; public abstract <E extends Enum<E>> void processEnum(E paramE) throws DataProcessorException; public abstract void processFloat(float paramFloat) throws DataProcessorException; public abstract void processInt(int paramInt) throws DataProcessorException; public abstract void processLong(long paramLong) throws DataProcessorException; public abstract void processMapKey(String paramString, int paramInt) throws DataProcessorException; public abstract void processString(String paramString) throws DataProcessorException; public abstract boolean shouldAcceptTransitively(); public abstract boolean shouldReturnProcessedTemplate(); public abstract void startArray$13462e() throws DataProcessorException; public abstract void startMap$13462e() throws DataProcessorException; public abstract void startRecord() throws DataProcessorException; public abstract void startRecordField$505cff1c(String paramString) throws DataProcessorException; public abstract void startUnion() throws DataProcessorException; public abstract void startUnionMember$505cff1c(String paramString) throws DataProcessorException; } /* Location: * Qualified Name: com.linkedin.data.lite.DataProcessor * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
0402f4b7f4075c1c0fd4ae6943e7ca8b29d8e344
7ffd5598f63ed2991f2d4122782a64c8423e7417
/src/main/java/org/codinjutsu/tools/nosql/commons/utils/StringUtils.java
3551e3a2ef61980c3b5dea19e867bf4ccb8e630a
[ "Apache-2.0" ]
permissive
dassiorleando/nosql4idea
cb9084d3fc309b8667f8b7d273c595e4ec65448a
5e9e947e94e0d1dfe16f95514c0960e75774c0f2
refs/heads/master
2021-01-17T12:16:18.742836
2015-11-24T13:08:24
2015-11-24T13:08:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,732
java
/* * Copyright (c) 2015 David Boissier * * 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.codinjutsu.tools.nosql.commons.utils; public class StringUtils { private static final String ELLIPSIS = "..."; public static String abbreviateInCenter(String stringToAbbreviate, int length) { int halfLength = length / 2; int firstPartLastIndex = halfLength - ELLIPSIS.length(); int stringLength = stringToAbbreviate.length(); return String.format("%s%s%s", stringToAbbreviate.substring(0, firstPartLastIndex), ELLIPSIS, stringToAbbreviate.substring(stringLength - halfLength, stringLength)); } public static Number parseNumber(String number) { try { return Integer.parseInt(number); } catch(NumberFormatException ex) { ; //UGLY :( } try { return Long.parseLong(number); } catch(NumberFormatException ex) { ; //UGLY :( } return Double.parseDouble(number); } public static String[] explode(String key, String separator) { return org.apache.commons.lang.StringUtils.split(key, separator); } }
[ "david.boissier@gmail.com" ]
david.boissier@gmail.com
aff7b6e5c71ddd6d60fec841aa61fa24f93d4a4d
68ee068f2a8f44f6c469a70d8ba47eb667591e8a
/datasets/styler/be5-corpus/data/638/DynamicPropertyUtils.java
3f7f91f5e33cca2bef045983d3816d28be80a786
[]
no_license
aqhvhghtbtb/styler
261032390ef39224ab1fdfd51a70ba556e5f81d4
e2881daa6bbc7763ad4a9ba704c4d834316ed9c1
refs/heads/master
2021-03-07T16:50:11.364844
2020-02-28T10:00:47
2020-02-28T10:00:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,623
java
package com.developmentontheedge.be5.base.model.groovy; import com.developmentontheedge.be5.base.util.Utils; import com.developmentontheedge.beans.BeanInfoConstants; import com.developmentontheedge.beans.DynamicProperty; import org.codehaus.groovy.runtime.GStringImpl; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.Map; import java.util.logging.Logger; public class DynamicPropertyUtils { private static final Logger log = Logger.getLogger(DynamicPropertyUtils.class.getName()); static final Map<String, String> beanInfoConstants = new HashMap<>(); static { Field[] fields = BeanInfoConstants.class.getDeclaredFields(); for (Field f : fields) { if (Modifier.isStatic(f.getModifiers())) { try { beanInfoConstants.put(f.getName(), BeanInfoConstants.class.getDeclaredField(f.getName()).get(null).toString()); } catch (Exception exc) { throw new RuntimeException(exc); } } } } static Object processValue(Object value, Class type) { if (value != null && value.getClass() == GStringImpl.class) { value = value.toString(); } if (type == java.sql.Date.class && value != null) { value = Utils.changeType(value, java.sql.Date.class); } return value; } static void setAttributes(DynamicProperty dp, Map<String, Object> map) { String displayName = asString(removeFromMap(map, "DISPLAY_NAME")); Boolean isHidden = (Boolean) removeFromMap(map, "HIDDEN"); if (displayName != null) dp.setDisplayName(displayName); if (isHidden == Boolean.TRUE) dp.setHidden(true); for (String key : map.keySet()) { String attributeName = beanInfoConstants.get(key); if (attributeName != null) { dp.setAttribute(attributeName, map.get(key)); } else { log.warning("Not found attribute: " + key + " in BeanInfoConstants"); } } } static String asString(Object o) { return o != null ? o.toString() : null; } static Object removeFromMap(Map map, Object element) { if (map.containsKey(element)) { return map.remove(element); } else { return null; } } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
d7165417daf02a935ed6f3c4d3d521b9c271e1ef
aa7849b05298e7a4d2407fc751647e6edec3fc43
/src/java/com/mef/erp/modelo/entidad/ImportaCampos.java
68846a19f44d1df0b9325bc379787c5488c5b0a4
[]
no_license
erniecastle/BackEndStructureJava
999c6942cae4a66e7b9983f3a36cfc35ffabe867
ad23de976994b8daadf472c7ce0b286288b92dcb
refs/heads/master
2023-01-24T13:21:58.764810
2020-12-04T03:24:00
2020-12-04T03:24:00
318,400,422
0
0
null
null
null
null
UTF-8
Java
false
false
2,826
java
/** * @author: Ernesto Castillo Fecha de Creación: 23/01/2014 Compañía: Exito * Software. Descripción del programa: Entidad de importador de campos para * Hibernate. * ----------------------------------------------------------------------------- * MODIFICACIONES: * ----------------------------------------------------------------------------- * Clave: Autor: Fecha: Descripción: * ----------------------------------------------------------------------------- * Clave: Autor: Fecha: Descripción: * ----------------------------------------------------------------------------- */ package com.mef.erp.modelo.entidad; import java.io.Serializable; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.UniqueConstraint; import org.hibernate.annotations.LazyCollection; import org.hibernate.annotations.LazyCollectionOption; /** * * @author Ernesto */ @Entity @Table(name = "ImportaCampos", uniqueConstraints = @UniqueConstraint(columnNames = {"id", "clave"})) public class ImportaCampos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Column(length = 30, nullable = false, unique = true) private String clave; private String nombreConfiguracion; private String nombreVentana; private Integer fila; @LazyCollection(LazyCollectionOption.FALSE) @OneToMany(mappedBy = "importaCampos", cascade = {CascadeType.ALL}) private List<DetalleImportaCampos> detalleImportaCampos; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getClave() { return clave; } public void setClave(String clave) { this.clave = clave; } public String getNombreConfiguracion() { return nombreConfiguracion; } public void setNombreConfiguracion(String nombreConfiguracion) { this.nombreConfiguracion = nombreConfiguracion; } public String getNombreVentana() { return nombreVentana; } public void setNombreVentana(String nombreVentana) { this.nombreVentana = nombreVentana; } public Integer getFila() { return fila; } public void setFila(Integer fila) { this.fila = fila; } public List<DetalleImportaCampos> getDetalleImportaCampos() { return detalleImportaCampos; } public void setDetalleImportaCampos(List<DetalleImportaCampos> detalleImportaCampos) { this.detalleImportaCampos = detalleImportaCampos; } }
[ "erniecastle@hotmail.com" ]
erniecastle@hotmail.com
a12250206fef2df86656cdfe3f5c35c96b13e60a
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/jadx/tests/integration/conditions/TestConditions15.java
e9cb9d55e1ddacd79788d4d69cc6f01d39f86d5a
[]
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
1,752
java
package jadx.tests.integration.conditions; import jadx.core.dex.nodes.ClassNode; import jadx.tests.api.IntegrationTest; import jadx.tests.api.utils.JadxMatchers; import org.junit.Assert; import org.junit.Test; public class TestConditions15 extends IntegrationTest { public static class TestCls { private static boolean test(final String name) { if (TestConditions15.TestCls.isEmpty(name)) { return false; } if (((((((((((((((((((((((((((((("1".equals(name)) || ("2".equals(name))) || ("3".equals(name))) || ("4".equals(name))) || ("5".equals(name))) || ("6".equals(name))) || ("7".equals(name))) || ("8".equals(name))) || ("9".equals(name))) || ("10".equals(name))) || ("11".equals(name))) || ("12".equals(name))) || ("13".equals(name))) || ("14".equals(name))) || ("15".equals(name))) || ("16".equals(name))) || ("17".equals(name))) || ("18".equals(name))) || ("19".equals(name))) || ("20".equals(name))) || ("22".equals(name))) || ("22".equals(name))) || ("23".equals(name))) || ("24".equals(name))) || ("25".equals(name))) || ("26".equals(name))) || ("27".equals(name))) || ("28".equals(name))) || ("29".equals(name))) || ("30".equals(name))) { return false; } else { return true; } } private static boolean isEmpty(String name) { return name.isEmpty(); } } @Test public void test() { ClassNode cls = getClassNode(TestConditions15.TestCls.class); String code = cls.getCode().toString(); Assert.assertThat(code, JadxMatchers.containsOne("\"1\".equals(name)")); Assert.assertThat(code, JadxMatchers.containsOne("\"30\".equals(name)")); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
ee5cd65bb63e0febc1763a6c8ead8051581cfd03
a493a137a0dcf581560a4e3ecef0259e4e583611
/bitcamp-java-application4-server/v43_2/src/main/java/com/eomcs/lms/App.java
db40e38bb141e62b35c1b913de9d0664096f3d90
[]
no_license
EoneTrance/bitcamp-java-20190527
609df28c371809723853058431259326c5d14c71
665da58407b1051c8633b3ee6cb033477e9c9a07
refs/heads/master
2020-06-13T20:16:55.776575
2019-09-30T03:00:17
2019-09-30T03:00:17
194,775,347
1
0
null
2020-04-30T11:49:50
2019-07-02T02:41:02
Java
UTF-8
Java
false
false
8,814
java
// v43_2 : MyBatis 도입하기 + 도메인 클래스 별명 적용 + SQL 맵퍼에 resultMap 적용 + 트랜잭션 적용 package com.eomcs.lms; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintStream; import java.net.ServerSocket; import java.net.Socket; import java.util.HashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import com.eomcs.lms.dao.BoardDao; import com.eomcs.lms.dao.LessonDao; import com.eomcs.lms.dao.MemberDao; import com.eomcs.lms.dao.PhotoBoardDao; import com.eomcs.lms.dao.PhotoFileDao; import com.eomcs.lms.dao.mariadb.BoardDaoImpl; import com.eomcs.lms.dao.mariadb.LessonDaoImpl; import com.eomcs.lms.dao.mariadb.MemberDaoImpl; import com.eomcs.lms.dao.mariadb.PhotoBoardDaoImpl; import com.eomcs.lms.dao.mariadb.PhotoFileDaoImpl; import com.eomcs.lms.handler.BoardAddCommand; import com.eomcs.lms.handler.BoardDeleteCommand; import com.eomcs.lms.handler.BoardDetailCommand; import com.eomcs.lms.handler.BoardListCommand; import com.eomcs.lms.handler.BoardUpdateCommand; import com.eomcs.lms.handler.Command; import com.eomcs.lms.handler.LessonAddCommand; import com.eomcs.lms.handler.LessonDeleteCommand; import com.eomcs.lms.handler.LessonDetailCommand; import com.eomcs.lms.handler.LessonListCommand; import com.eomcs.lms.handler.LessonUpdateCommand; import com.eomcs.lms.handler.LoginCommand; import com.eomcs.lms.handler.MemberAddCommand; import com.eomcs.lms.handler.MemberDeleteCommand; import com.eomcs.lms.handler.MemberDetailCommand; import com.eomcs.lms.handler.MemberListCommand; import com.eomcs.lms.handler.MemberSearchCommand; import com.eomcs.lms.handler.MemberUpdateCommand; import com.eomcs.lms.handler.PhotoBoardAddCommand; import com.eomcs.lms.handler.PhotoBoardDeleteCommand; import com.eomcs.lms.handler.PhotoBoardDetailCommand; import com.eomcs.lms.handler.PhotoBoardListCommand; import com.eomcs.lms.handler.PhotoBoardUpdateCommand; import com.eomcs.util.PlatformTransactionManager; import com.eomcs.util.SqlSessionFactoryProxy; public class App { private static final int CONTINUE = 1; private static final int STOP = 0; HashMap<String,Command> commandMap = new HashMap<>(); // 스레드풀 ExecutorService executorService = Executors.newCachedThreadPool(); SqlSessionFactory sqlSessionFactory; int state; public App() throws Exception { // 처음에는 계속 클라이언트 요청을 처리해야 하는 상태로 설정한다. state = CONTINUE; try { InputStream inputStream = Resources.getResourceAsStream("com/eomcs/lms/conf/mybatis-config.xml"); sqlSessionFactory = new SqlSessionFactoryProxy( new SqlSessionFactoryBuilder().build(inputStream)); // 트랜잭션 관리자를 준비한다. PlatformTransactionManager txManager = new PlatformTransactionManager(sqlSessionFactory); // Command 객체가 사용할 데이터 처리 객체를 준비한다. BoardDao boardDao = new BoardDaoImpl(sqlSessionFactory); MemberDao memberDao = new MemberDaoImpl(sqlSessionFactory); LessonDao lessonDao = new LessonDaoImpl(sqlSessionFactory); PhotoBoardDao photoBoardDao = new PhotoBoardDaoImpl(sqlSessionFactory); PhotoFileDao photoFileDao = new PhotoFileDaoImpl(sqlSessionFactory); // 클라이언트 명령을 처리할 커맨드 객체를 준비한다. commandMap.put("/lesson/add", new LessonAddCommand(lessonDao)); commandMap.put("/lesson/delete", new LessonDeleteCommand(lessonDao)); commandMap.put("/lesson/detail", new LessonDetailCommand(lessonDao)); commandMap.put("/lesson/list", new LessonListCommand(lessonDao)); commandMap.put("/lesson/update", new LessonUpdateCommand(lessonDao)); commandMap.put("/member/add", new MemberAddCommand(memberDao)); commandMap.put("/member/delete", new MemberDeleteCommand(memberDao)); commandMap.put("/member/detail", new MemberDetailCommand(memberDao)); commandMap.put("/member/list", new MemberListCommand(memberDao)); commandMap.put("/member/update", new MemberUpdateCommand(memberDao)); commandMap.put("/member/search", new MemberSearchCommand(memberDao)); commandMap.put("/board/add", new BoardAddCommand(boardDao)); commandMap.put("/board/delete", new BoardDeleteCommand(boardDao)); commandMap.put("/board/detail", new BoardDetailCommand(boardDao)); commandMap.put("/board/list", new BoardListCommand(boardDao)); commandMap.put("/board/update", new BoardUpdateCommand(boardDao)); commandMap.put("/photoboard/add", new PhotoBoardAddCommand(txManager, photoBoardDao, photoFileDao)); commandMap.put("/photoboard/delete", new PhotoBoardDeleteCommand(txManager, photoBoardDao, photoFileDao)); commandMap.put("/photoboard/detail", new PhotoBoardDetailCommand(photoBoardDao, photoFileDao)); commandMap.put("/photoboard/list", new PhotoBoardListCommand(photoBoardDao)); commandMap.put("/photoboard/update", new PhotoBoardUpdateCommand(txManager, photoBoardDao, photoFileDao)); commandMap.put("/auth/login", new LoginCommand(memberDao)); } catch (Exception e) { System.out.println("DBMS에 연결할 수 없습니다!"); throw e; } } @SuppressWarnings("static-access") private void service() { try (ServerSocket serverSocket = new ServerSocket(8888)){ System.out.println("애플리케이션 서버가 시작되었음!"); while (true) { // 클라이언트가 접속하면 작업을 수행할 Runnable 객체를 만들어 스레드풀에 맡긴다. executorService.submit(new CommandProcessor(serverSocket.accept())); // 한 클라이가 serverstop 명령을 보내면 종료 상태로 설정되고 // 다음 요청을 처리할 때 즉시 실행을 멈춘다. if (state == STOP) break; } // 스레드풀의 실행 종료를 요청한다. // => 스레드풀은 자신이 관리하는 스레드들이 실행이 종료되었는지 감시한다. executorService.shutdown(); // 스레드들이 관리하는 모든 스레드가 종료되었는지 매 0.5초마다 검사한다. // => 스레드풀의 모든 스레드가 실행을 종료했으면 즉시 main 스레드를 종료한다. while (!executorService.isTerminated()) { Thread.currentThread().sleep(500); } System.out.println("애플리케이션 서버를 종료함!"); } catch (Exception e) { System.out.println("소켓 통신 오류!"); e.printStackTrace(); } } class CommandProcessor implements Runnable { Socket socket; public CommandProcessor(Socket socket) { this.socket = socket; } @Override public void run() { try (Socket socket = this.socket; BufferedReader in = new BufferedReader( new InputStreamReader(socket.getInputStream())); PrintStream out = new PrintStream(socket.getOutputStream())) { System.out.println("클라이언트와 연결됨!"); // 클라이언트가 보낸 명령을 읽는다. String request = in.readLine(); if (request.equals("quit")) { out.println("Good bye!"); } else if (request.equals("serverstop")) { state = STOP; out.println("Good bye!"); } else { // non-static 중첩 클래스는 바깥 클래스의 인스턴스 멤버를 사용할 수 있다. Command command = commandMap.get(request); if (command == null) { out.println("해당 명령을 처리할 수 없습니다."); } else { command.execute(in, out); } } out.println("!end!"); out.flush(); System.out.println("클라이언트와 연결 끊음!"); } catch (Exception e) { System.out.println("클라이언트와 통신 오류!"); } finally { // 현재 스레드가 클라이언트 요청에 대해 응답을 완료했다면, // 현재 스레드에 보관된 MyBatis의 SqlSession 객체를 제거해야 한다. // 그래야만 다음 클라이언트 요청이 들어 왔을 때 // 새 SqlSession 객체를 사용할 것이다. ((SqlSessionFactoryProxy)sqlSessionFactory).clearSession(); } } } public static void main(String[] args) { try { App app = new App(); app.service(); } catch (Exception e) { System.out.println("시스템 실행 중 오류 발생!"); e.printStackTrace(); } } }
[ "karnenis@gmail.com" ]
karnenis@gmail.com
1c448a747dc13c00076d443a46ce66fc0b652987
2dcc440fa85d07e225104f074bcf9f061fe7a7ae
/gameserver/src/main/java/org/mmocore/gameserver/scripts/ai/custom/GvGBoss.java
f26d4a38ceb18551ad63c844430f08f89377cbe7
[]
no_license
VitaliiBashta/L2Jts
a113bc719f2d97e06db3e0b028b2adb62f6e077a
ffb95b5f6e3da313c5298731abc4fcf4aea53fd5
refs/heads/master
2020-04-03T15:48:57.786720
2018-10-30T17:34:29
2018-10-30T17:35:04
155,378,710
0
3
null
null
null
null
UTF-8
Java
false
false
1,432
java
package org.mmocore.gameserver.scripts.ai.custom; import org.mmocore.gameserver.ai.Fighter; import org.mmocore.gameserver.data.scripts.Functions; import org.mmocore.gameserver.model.instances.NpcInstance; import org.mmocore.gameserver.object.Creature; import org.mmocore.gameserver.skills.SkillEntry; /** * AI Ekimus * * @author pchayka */ public class GvGBoss extends Fighter { boolean phrase1 = false; boolean phrase2 = false; boolean phrase3 = false; public GvGBoss(NpcInstance actor) { super(actor); actor.startImmobilized(); } @Override protected void onEvtAttacked(final Creature attacker, final SkillEntry skill, final int damage) { NpcInstance actor = getActor(); if (actor.getCurrentHpPercents() < 50 && phrase1 == false) { phrase1 = true; Functions.npcSay(actor, "Вам не удастся похитить сокровища Геральда!"); } else if (actor.getCurrentHpPercents() < 30 && phrase2 == false) { phrase2 = true; Functions.npcSay(actor, "Я тебе череп проломлю!"); } else if (actor.getCurrentHpPercents() < 5 && phrase3 == false) { phrase3 = true; Functions.npcSay(actor, "Вы все погибнете в страшных муках! Уничтожу!"); } super.onEvtAttacked(attacker, skill, damage); } }
[ "Vitalii.Bashta@accenture.com" ]
Vitalii.Bashta@accenture.com
dd157d9a07d74faeb5f7972a69edeabd635e028b
6d44794e3641ba67737fec793046146db3e3493f
/spring-demo-annotations/src/com/dragontalker/springdemo/AnnotationBeanScopeDemoApp.java
e2027e9060027e8b6fed79cbe26edf80b966dd1c
[ "MIT" ]
permissive
Dragontalker/SpringMVC-Hibernate-study-notes
bcd015d26a6d981522e8b51fada15af8ee1a6152
f1868466f2d29c9f5af1f8ae1ab34fd59ce562c3
refs/heads/main
2023-06-18T02:15:46.904987
2021-07-12T01:52:00
2021-07-12T01:52:00
379,607,242
1
0
null
null
null
null
UTF-8
Java
false
false
893
java
package com.dragontalker.springdemo; import org.springframework.context.support.ClassPathXmlApplicationContext; public class AnnotationBeanScopeDemoApp { public static void main(String[] args) { // load spring config file ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); // retrieve bean from spring container Coach theCoach = context.getBean("tennisCoach", Coach.class); Coach alphaCoach = context.getBean("tennisCoach", Coach.class); // check if they are the same boolean result = (theCoach == alphaCoach); // print out the results System.out.println("\nPointing to the same object: " + result); System.out.println("\nMemory location for theCoach: " + theCoach); System.out.println("\nMemory location for alphaCoach: " + alphaCoach); // close the context context.close(); } }
[ "richard.yang.tong@gmail.com" ]
richard.yang.tong@gmail.com
cae9782b04beef33b5b0936f969b13f363b8602c
20ea5ee84221ff5fd7e3cc1e1ca38db910caf3de
/src/test/java/com/victropolis/euler/TestProblem431.java
b5c64bead49e846f0319faed82844ee9c0f2ff14
[]
no_license
victropolis/project-euler-solved
a76207d8583126618ff8af801262e6077c536e55
b4f153a42e101b4d780178af05aab8a0203931ec
refs/heads/master
2016-09-06T13:38:52.788092
2015-07-04T22:03:32
2015-07-04T22:03:37
37,392,888
0
0
null
null
null
null
UTF-8
Java
false
false
2,659
java
package com.victropolis.euler; import org.junit.Assert; import org.junit.Test; /** * Generated programatically by victropolis on 07/04/15. */ public class TestProblem431 { /* Description (from https://projecteuler.net/problem=431): Fred the farmer arranges to have a new storage silo installed on his farm and having an obsession for all things square he is absolutely devastated when he discovers that it is circular. Quentin, the representative from the company that installed the silo, explains that they only manufacture cylindrical silos, but he points out that it is resting on a square base. Fred is not amused and insists that it is removed from his property. Quick thinking Quentin explains that when granular materials are delivered from above a conical slope is formed and the natural angle made with the horizontal is called the angle of repose. For example if the angle of repose, $\alpha = 30$ degrees, and grain is delivered at the centre of the silo then a perfect cone will form towards the top of the cylinder. In the case of this silo, which has a diameter of 6m, the amount of space wasted would be approximately 32.648388556 m3. However, if grain is delivered at a point on the top which has a horizontal distance of $x$ metres from the centre then a cone with a strangely curved and sloping base is formed. He shows Fred a picture. We shall let the amount of space wasted in cubic metres be given by $V(x)$. If $x = 1.114785284$, which happens to have three squared decimal places, then the amount of space wasted, $V(1.114785284) \approx 36$. Given the range of possible solutions to this problem there is exactly one other option: $V(2.511167869) \approx 49$. It would be like knowing that the square is king of the silo, sitting in splendid glory on top of your grain. Fred's eyes light up with delight at this elegant resolution, but on closer inspection of Quentin's drawings and calculations his happiness turns to despondency once more. Fred points out to Quentin that it's the radius of the silo that is 6 metres, not the diameter, and the angle of repose for his grain is 40 degrees. However, if Quentin can find a set of solutions for this particular silo then he will be more than happy to keep it. If Quick thinking Quentin is to satisfy frustratingly fussy Fred the farmer's appetite for all things square then determine the values of $x$ for all possible square space wastage options and calculate $\sum x$ correct to 9 decimal places. */ @Test public void test() { Assert.assertEquals(23.386029052F, Problem431.solve(/* change signature to provide required inputs */)); } }
[ "victropolis@gmail.com" ]
victropolis@gmail.com
e98c976246975c004cabf7ac1a9beb5abd0b1c73
d8e952a00b4259fe16d3d0399886363bb9421548
/org.fxone/fxone-ui/src/main/java/org/fxone/ui/rt/components/events/EventDefinitionList.java
50e4a3f1f8cc0d99a0332594fd90f8f8809f4f8b
[]
no_license
hbnetBen/FXOne
f79731df774b8c079dcd0674cca53f168e716ced
63778cd2b097abd46fdb5af82f50b7dba90656a1
refs/heads/master
2020-08-01T08:58:16.880948
2013-06-09T20:02:46
2013-06-09T20:02:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,394
java
package org.fxone.ui.rt.components.events; // //import java.util.ArrayList; //import java.util.List; // //import javax.faces.application.FacesMessage; //import javax.faces.bean.ManagedBean; //import javax.faces.bean.RequestScoped; //import javax.faces.context.FacesContext; //import javax.inject.Inject; // //import org.homemotion.events.EventManager; //import org.homemotion.events.EventSender; //import org.homemotion.events.EventDefinition; // //@ManagedBean //@RequestScoped //public final class EventDefinitionList { // // @Inject // private EventManager manager; // // private EventDefinition currentItem; // // public EventDefinitionList() { // } // // public String view() { // FacesContext context = FacesContext.getCurrentInstance(); //// if (this.currentItem == null) { //// String nameString = context.getExternalContext() //// .getRequestParameterMap().get("EventDefinitionName"); //// String sourceString = context.getExternalContext() //// .getRequestParameterMap().get("EventDefinitionSource"); //// try { //// this.currentItem = manager.getEventDefinition(nameString, //// sourceString); //// } catch (Exception e) { //// FacesMessage message = new FacesMessage( //// FacesMessage.SEVERITY_WARN, //// "EventDefinition with name " + nameString //// + " and source " + sourceString //// + " was not found: " + e.getMessage(), e //// .getMessage()); //// context.addMessage(null, message); //// } //// } // if (this.currentItem != null) { // return getViewTarget(); // } // FacesMessage message = new FacesMessage( // "Could not start viewer: Object not found."); // context.addMessage(null, message); // return null; // } // // public List<EventDefinition> getAllItems() { // return new ArrayList<EventDefinition>(manager.getEventDefinitions()); // } // // public EventDefinition getCurrentItem() { // return currentItem; // } // // public void setCurrentItem(EventDefinition currentItem) { // this.currentItem = currentItem; // } // // public String viewCurrentItem() { // if (currentItem != null) { // return getViewTarget(); // } // return null; // } // // protected String getViewTarget() { // return null; // } // // public String close() { // this.currentItem = null; // return "EventUI"; // } // //}
[ "atsticks@gmail.com" ]
atsticks@gmail.com
bc3670bfb1382f32833282ec3c9ab575d197b1fc
1418390864a051a3bd9f164b2eb27e304c3fa48f
/app/src/main/java/com/jusfoun/jusfouninquire/ui/view/CustomScrollView.java
8f3997f717e716302b47639eb258bc90e218c75c
[]
no_license
JusofunAppMobile/GXCAndroid
15f78f422c5ddf26caa926df06bafc521220d5d9
9ee76a86f23eeba2f32866ef503ab1b47c688b91
refs/heads/master
2020-04-15T16:00:00.112812
2019-03-21T06:46:17
2019-03-21T06:46:17
164,814,771
0
0
null
null
null
null
UTF-8
Java
false
false
5,645
java
package com.jusfoun.jusfouninquire.ui.view; import android.animation.ValueAnimator; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.widget.ScrollView; /** * Author JUSFOUN * CreateDate 2015/12/2. * Description */ public class CustomScrollView extends ScrollView { private final static int TOP = 0; private final static int CENTRE = 1; private final static int BOTTOM = 0; private final String TAG = CustomScrollView.class.getSimpleName(); private float touchY;// 点击时Y坐标 private float deltaY;// Y轴滑动的距离 private View contentView; private boolean mScaling = false; // 标志 位,获取 按下时的 坐标用 private float zuni = 0.8f; private float aplah = 0.6f; /*** * 构造方法 * * @param context */ public CustomScrollView(Context context) { super(context); } public CustomScrollView(Context context, AttributeSet attrs) { super(context, attrs); } public CustomScrollView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Override protected void onFinishInflate() { super.onFinishInflate(); if (getChildCount() > 0) contentView = getChildAt(0); } /** * touch 事件处理 **/ @Override public boolean onTouchEvent(MotionEvent ev) { switch (ev.getAction()) { case MotionEvent.ACTION_DOWN: // Log.e("tag", "onTouchEvent=ACTION_DOWN"); case MotionEvent.ACTION_MOVE: //Log.e("tag","onTouchEvent=ACTION_MOVE"); if (!mScaling) { if (getScrollY() == 0) { touchY = ev.getY(); deltaY = 0; if (anim != null && anim.isRunning()) { anim.cancel(); if (onScrollListener != null) onScrollListener.onPullScroll(0); } } else { break; } } float y = ev.getY(); deltaY = (y - touchY); if (deltaY >= 0) { mScaling = true; if (onScrollListener != null) { onScrollListener.onPullScroll((int) (deltaY * zuni)); } else { break; } return false; } else { mScaling = false; } break; case MotionEvent.ACTION_UP: if (mScaling) { // 还原 mScaling = false; if (deltaY >= 0) { animation((int) (deltaY * zuni)); } } break; } return super.onTouchEvent(ev); } @Override protected void onScrollChanged(int l, int t, int oldl, int oldt) { super.onScrollChanged(l, t, oldl, oldt); if (onScrollListener != null) { onScrollListener.onScrollChangedListener(0, (int) (t*aplah), 0, 0); } } private float downIntercept; @Override public boolean onInterceptTouchEvent(MotionEvent ev) { switch (ev.getAction()) { case MotionEvent.ACTION_DOWN: downIntercept=ev.getY(); touchY = ev.getY(); deltaY = 0; //// return super.onInterceptTouchEvent(ev); // case MotionEvent.ACTION_MOVE: // Log.e(TAG,"top=="+(downIntercept - ev.getY())); // if (Math.abs(downIntercept - ev.getY())>5) // return true; //// if (Math.abs(velocityTracker.getYVelocity())>10) //// return true; // } return super.onInterceptTouchEvent(ev); } private int scrollStatue() { if (getScrollY() == 0) return TOP; if (contentView != null && contentView.getMeasuredHeight() == getScrollY() + getHeight()) return BOTTOM; return CENTRE; } private ValueAnimator anim = null; public void animation(int y) { anim = ValueAnimator.ofInt(y, 0); anim.setDuration(200); anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { Integer y = (Integer) animation.getAnimatedValue(); deltaY = y; if (onScrollListener != null) onScrollListener.onPullScroll((int) deltaY); } }); anim.start(); } public interface OnScrollListener { void onScrollChangedListener(int leftOfVisibleView, int topOfVisibleView, int oldLeftOfVisibleView, int oldTopOfVisibleView); void onPullScroll(int height); } private OnScrollListener onScrollListener; public void setCallBack(OnScrollListener onScrollListener) { this.onScrollListener = onScrollListener; } /** * 滑动事件 */ @Override public void fling(int velocityY) { super.fling(velocityY / 2); } }
[ "515376293@qq.com" ]
515376293@qq.com
bd68eaec9bb77566f695b8f5ce02d228af61235f
fcb86e3b02bcfe2e40ac671e162be540b2d4bd96
/src/main/java/io/wisoft/smarthumanlifevue/RequestToLoginDto.java
0aef2a40faae6a05732ddbcac9368b2345515bca
[]
no_license
LeeSM0518/space-api-server
3eb7925a813567a5132f67a3ecb91b423be023ad
9fe1d9fad93aeeea522a3782794b777a935f7a8f
refs/heads/master
2023-01-15T07:48:08.259079
2020-11-23T08:56:51
2020-11-23T08:56:51
307,365,088
0
0
null
null
null
null
UTF-8
Java
false
false
428
java
package io.wisoft.smarthumanlifevue; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import javax.validation.constraints.NotBlank; @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RequestToLoginDto { @NotBlank(message = "username is null!") private String username; @NotBlank(message = "password is null!") private String password; }
[ "nalsm98@naver.com" ]
nalsm98@naver.com
72d450a9ed809391ab33abbcc9b35b72e5cc6510
6e31cdbf8fcd7fad8f99d960cbd95c20ad01a241
/src/main/java/com/src/xygl/credit/dto/TempHealthYearcheckInfoDto.java
a9ade78307c9a85ba80f132bd435b635080fcb1c
[]
no_license
7373/Enterprise-credit-management-system
7a49eef3e464198086b1b9c19e253d6e44fa8ad5
fea491a6e6906a09c6e17dd5cb73fd4b012f2bfb
refs/heads/master
2021-01-15T10:19:34.017169
2018-01-04T02:33:20
2018-01-04T02:33:20
99,578,469
6
2
null
null
null
null
UTF-8
Java
false
false
389
java
/* * Copyright© 2003-2016 浙江汇信科技有限公司, All Rights Reserved. */ package com.icinfo.ndrc.credit.dto; import com.icinfo.ndrc.credit.model.TempHealthYearcheckInfo; /** * 描述: temp_health_yearcheck_info 对应的DTO类.<br> * * @author framework generator * @date 2017年06月29日 */ public class TempHealthYearcheckInfoDto extends TempHealthYearcheckInfo { }
[ "15024454222@qq.com" ]
15024454222@qq.com
b21d446da107ea0a9300165b5ad8fa1c7119b822
f9b254b3d57453bd6fc4e66dc082f3e92dce4179
/EHomeHDV5_1/eHomeHD/src/cc/wulian/app/model/device/impls/controlable/metalswitch/ModeSettingActivity.java
270a780b4822bcac96f8a02e9557a7123804adbd
[]
no_license
zcz123/ehome
a45255bb4ebbfeb7804f424b1be53cf531589bf6
5a2df0be832f542cab6b49e7a0e8071d4f101525
refs/heads/master
2021-01-19T21:47:57.674732
2017-04-19T04:13:16
2017-04-19T04:13:16
88,708,738
3
0
null
2017-04-19T06:24:17
2017-04-19T06:24:17
null
UTF-8
Java
false
false
694
java
package cc.wulian.app.model.device.impls.controlable.metalswitch; import android.os.Bundle; import cc.wulian.smarthomev5.activity.EventBusActivity; public class ModeSettingActivity extends EventBusActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle bundle = getIntent().getExtras(); ModeSettingFragment fragment= new ModeSettingFragment(); fragment.setArguments(bundle); getSupportFragmentManager().beginTransaction().add(android.R.id.content,fragment).commit(); } @Override protected boolean finshSelf() { return false; } @Override public boolean fingerRightFromLeft() { return false; } }
[ "584692417@qq.com" ]
584692417@qq.com
846c840ed6a8b328e76e8d773857422bfe1d7dd1
eac4974718a5184538b2e42e30f3ea232e8be82b
/bitcamp-project/v18/src/main/java/com/eomcs/lms/handler/LessonHandler.java
a4e95bcf8e150c71865fb7fd42c25f4aee230fa4
[]
no_license
jeoneunhye/bitcamp-study
64f77a93050e7fce4748656195ce0ebe495668ae
36061a56b76dcb57216bdfc62577c88a3be0db62
refs/heads/master
2020-09-23T12:38:04.401754
2020-06-07T14:43:58
2020-06-07T14:43:58
225,501,811
0
0
null
null
null
null
UTF-8
Java
false
false
1,757
java
package com.eomcs.lms.handler; import java.sql.Date; import java.util.Scanner; import com.eomcs.lms.domain.Lesson; import com.eomcs.util.ArrayList; public class LessonHandler { ArrayList<Lesson> lessonList; public Scanner input; public LessonHandler(Scanner input) { this.input = input; lessonList = new ArrayList<>(); } public void addLesson() { Lesson lesson = new Lesson(); System.out.print("번호? "); lesson.setNo(input.nextInt()); input.nextLine(); System.out.print("수업명? "); lesson.setTitle(input.nextLine()); System.out.print("수업내용? "); lesson.setDescription(input.nextLine()); System.out.print("시작일? "); lesson.setStartDate(Date.valueOf(input.next())); System.out.print("종료일? "); lesson.setEndDate(Date.valueOf(input.next())); System.out.print("총수업시간? "); lesson.setTotalHours(input.nextInt()); System.out.print("일수업시간? "); lesson.setDayHours(input.nextInt()); input.nextLine(); lessonList.add(lesson); System.out.println("저장하였습니다."); } public void listLesson() { // 수업 객체 목록을 복사받을 배열을 준비하고 toArray()를 실행한다. // toArray()의 리턴 값은 파라미터로 넘겨준 배열의 주소와 같다. Lesson[] arr = this.lessonList.toArray(new Lesson[this.lessonList.size()]); // Lesson/*Object*/[] arr = this.lessonList.toArray(Lesson[].class); for (Lesson l/*Object obj*/ : arr) { // Lesson l = (Lesson)obj; System.out.printf("%d, %s, %s ~ %s, %d\n", l.getNo(), l.getTitle(), l.getStartDate(), l.getEndDate(), l.getTotalHours()); } } }
[ "eunhdev@gmail.com" ]
eunhdev@gmail.com
61cedc4411b8770cce731b557c403de09ca4ccd1
c95c03f659007f347cc02e293faeb339eff85a59
/CoverageDataBase/MethodsDataBase/assertj-core-assertj-core-3.11.1/Strings_assertMatches_Pattern_Test/should_fail_if_actual_does_not_match_Pattern_whatever_custom_comparison_strategy_is.txt
349232e4226fccd47f9d326cd58871679f78d2c2
[]
no_license
dormaayan/TestsReposirotry
e2bf6c247d933b278fcc47082afa7282dd916baa
75520c8fbbbd5f721f4c216ae7f142ec861e2c67
refs/heads/master
2020-04-11T21:34:56.287920
2019-02-06T13:34:31
2019-02-06T13:34:31
162,110,352
0
2
null
null
null
null
UTF-8
Java
false
false
413
txt
@Test public void should_fail_if_actual_does_not_match_Pattern_whatever_custom_comparison_strategy_is(){ AssertionInfo info=someInfo(); try { stringsWithCaseInsensitiveComparisonStrategy.assertMatches(info,actual,Pattern.compile("Luke")); } catch ( AssertionError e) { verify(failures).failure(info,shouldMatch(actual,"Luke")); return; } failBecauseExpectedAssertionErrorWasNotThrown(); }
[ "dor.d.ma@gmail.com" ]
dor.d.ma@gmail.com
105bc6aa977a18c1c6627e420b76be3479d22e68
795d1de4f536d35cff09f22ac14ef2069a66ba21
/src/main/java/org/spring/boot/autowire/bydefault/Logger4.java
510c0b48c5e7183958f38f083a5d1a4efb5f92ff
[]
no_license
rzuniga64/springboot
49171d325927d792c94c20bcb3d1e2d66517596d
daa058c0e11f9160235105a20f60772ceb03b6f1
refs/heads/master
2020-12-30T15:30:32.115650
2017-05-13T06:32:49
2017-05-13T06:32:49
91,153,166
0
0
null
null
null
null
UTF-8
Java
false
false
1,098
java
package org.spring.boot.autowire.bydefault; /** * Dummy implementation of Logger4 class. * We need to wire the ConsoleWriter and FileWriter config into this class. * We have two properties of the same type that we want to autowire with config. */ public class Logger4 { /** Consoler writer. */ private LogWriter consoleWriter; /** File writer. */ private LogWriter fileWriter; /** * Set the consoleWriter. * @param writer writer */ public void setConsoleWriter(final LogWriter writer) { this.consoleWriter = writer; } /** * Set the fileWriter. * @param newFileWriter newFileWriter */ public void setFileWriter(final LogWriter newFileWriter) { this.fileWriter = newFileWriter; } /** * Write to the file. * @param text text */ public void writeFile(final String text) { fileWriter.write(text); } /** * Write to the console. * @param text text */ public void writeConsole(final String text) { consoleWriter.write(text); } }
[ "rzuniga64@gmail.com" ]
rzuniga64@gmail.com
1546a94e7bda5ed1e341081cf272cd3c310e68fc
4a7cb14aa934df8f362cf96770e3e724657938d8
/MFES/ATS/Project/structuring/projectsPOO_1920/84/POO-master/src/model/User.java
61b12e00c9944253a60d85b99c72c1894804620c
[]
no_license
pCosta99/Masters
7091a5186f581a7d73fd91a3eb31880fa82bff19
f835220de45a3330ac7a8b627e5e4bf0d01d9f1f
refs/heads/master
2023-08-11T01:01:53.554782
2021-09-22T07:51:51
2021-09-22T07:51:51
334,012,667
1
1
null
null
null
null
UTF-8
Java
false
false
3,687
java
package model; import java.io.Serializable; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.List; public abstract class User implements Serializable { private String id; //identificaçao de voluntario ou cliente private String nome; //Nome de cliente ou taxista private String email;//Endereço de email private String password; private String morada; // Necessario? //o estatuto de voluntario especial para levantar encomendas especiais vai ser posto em voluntario public User(){ this.id = new String(); this.nome = new String(); this.email = new String(); this.password = new String(); this.morada = new String(); } public User(String id,String nome,String email,String password,String morada){ this.id = id; this.nome = nome; this.email = email; this.password = password; this.morada = morada; } public User(User u){ setId(u.getId()); setNome(u.getNome()); setEmail(u.getEmail()); setPassword(u.getPassword()); setMorada(u.getMorada()); } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getMorada() { return morada; } public void setMorada(String morada) { this.morada = morada; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Id de User: "); sb.append(this.getId()); sb.append("\n"); sb.append("Nome de User: "); sb.append(getNome()); sb.append("\n"); sb.append("Email: "); sb.append(getEmail()); sb.append("\n"); sb.append("Password: "); sb.append(getPassword()); sb.append("\n"); sb.append("Morada: "); sb.append(getMorada()); sb.append("\n"); return sb.toString(); } public abstract User clone(); @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; return getId().equals(user.getId()) && getNome().equals(user.getNome()) && getEmail().equals(user.getEmail()) && getPassword().equals(user.getPassword()) && getMorada().equals(user.getMorada()); } public abstract int numeroEncomendas(); public abstract void addEncomendaRegisto(Encomenda e); public abstract void addEncomendaPending(Encomenda e); public abstract List<Encomenda> getRegistoEncomendasHistorico(); public abstract List<Encomenda> getRegistoEncomendasPending(); public abstract void removeEncomendaPending(Encomenda encomenda); public abstract void removeEncomendaRegisto(Encomenda encomenda); public abstract List<Encomenda> registoEncomendaemPeriodo(LocalDateTime inicio, LocalDateTime fim); /* @Override public int hashCode() { Necessário dps para criar maps return Objects.hash(getId(), getNome(), getEmail(), getPassword(), getCodPostal(), getMorada(), getData()); } */ }
[ "costapedro.a1999@gmail.com" ]
costapedro.a1999@gmail.com
9a5294527ef763dbe50d0f02bbb99f573a2a5d4e
45f20bf4597b5f89e5293c35e223204159310956
/quickfixj-core/src/main/java/quickfix/fix50sp1/component/DerivativeInstrumentPartySubIDsGrp.java
300de8c23c808a2714eb3f7337765738274cab56
[ "BSD-2-Clause", "LicenseRef-scancode-public-domain" ]
permissive
lloydchan/quickfixj
9d42924c8e9d4cc0a96821faa4006fcd4b0d21c4
e26446c775b3f63d93bb4e8d6f02fde8a22d73fc
refs/heads/master
2020-07-31T21:20:20.178481
2019-09-26T14:40:49
2019-09-26T14:40:49
210,757,360
0
0
null
2019-09-25T04:46:02
2019-09-25T04:46:01
null
UTF-8
Java
false
false
2,806
java
package quickfix.fix50sp1.component; import quickfix.FieldNotFound; import quickfix.Group; public class DerivativeInstrumentPartySubIDsGrp extends quickfix.MessageComponent { static final long serialVersionUID = 20050617; public static final String MSGTYPE = ""; private int[] componentFields = { }; protected int[] getFields() { return componentFields; } private int[] componentGroups = { 1296, }; protected int[] getGroupFields() { return componentGroups; } public DerivativeInstrumentPartySubIDsGrp() { super(); } public void set(quickfix.field.NoDerivativeInstrumentPartySubIDs value) { setField(value); } public quickfix.field.NoDerivativeInstrumentPartySubIDs get(quickfix.field.NoDerivativeInstrumentPartySubIDs value) throws FieldNotFound { getField(value); return value; } public quickfix.field.NoDerivativeInstrumentPartySubIDs getNoDerivativeInstrumentPartySubIDs() throws FieldNotFound { return get(new quickfix.field.NoDerivativeInstrumentPartySubIDs()); } public boolean isSet(quickfix.field.NoDerivativeInstrumentPartySubIDs field) { return isSetField(field); } public boolean isSetNoDerivativeInstrumentPartySubIDs() { return isSetField(1296); } public static class NoDerivativeInstrumentPartySubIDs extends Group { static final long serialVersionUID = 20050617; private static final int[] ORDER = {1297, 1298, 0}; public NoDerivativeInstrumentPartySubIDs() { super(1296, 1297, ORDER); } public void set(quickfix.field.DerivativeInstrumentPartySubID value) { setField(value); } public quickfix.field.DerivativeInstrumentPartySubID get(quickfix.field.DerivativeInstrumentPartySubID value) throws FieldNotFound { getField(value); return value; } public quickfix.field.DerivativeInstrumentPartySubID getDerivativeInstrumentPartySubID() throws FieldNotFound { return get(new quickfix.field.DerivativeInstrumentPartySubID()); } public boolean isSet(quickfix.field.DerivativeInstrumentPartySubID field) { return isSetField(field); } public boolean isSetDerivativeInstrumentPartySubID() { return isSetField(1297); } public void set(quickfix.field.DerivativeInstrumentPartySubIDType value) { setField(value); } public quickfix.field.DerivativeInstrumentPartySubIDType get(quickfix.field.DerivativeInstrumentPartySubIDType value) throws FieldNotFound { getField(value); return value; } public quickfix.field.DerivativeInstrumentPartySubIDType getDerivativeInstrumentPartySubIDType() throws FieldNotFound { return get(new quickfix.field.DerivativeInstrumentPartySubIDType()); } public boolean isSet(quickfix.field.DerivativeInstrumentPartySubIDType field) { return isSetField(field); } public boolean isSetDerivativeInstrumentPartySubIDType() { return isSetField(1298); } } }
[ "lloyd.khc.chan@gmail.com" ]
lloyd.khc.chan@gmail.com
04467e91235f5509be674cffc1874e63ed4e5984
6cccbbd7c647a7168b55f3c54f0372df81e83620
/cms/src/main/java/com/yesmywine/cms/entity/AdverEntity.java
ab4fc0f0e75f5f8724165cd42577dd7439fef2eb
[]
no_license
Loeng/yesmywine_ms
4dd111edeabefd3a813a7e59837862b660e1085c
207e6d1f352172999649ba324f07aeb68953f9d6
refs/heads/master
2021-10-20T03:56:03.729552
2019-02-25T15:34:25
2019-02-25T15:34:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,984
java
package com.yesmywine.cms.entity; import com.yesmywine.base.record.entity.BaseEntity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import java.util.Date; /** * Created by yly on 2017/1/4. */ @Entity @Table(name = "adver")//广告素材表 public class AdverEntity extends BaseEntity<Integer> { @Column(columnDefinition = "varchar(255) COMMENT '广告名称'") private String adverName;//广告名称 @Column(columnDefinition = "DATETIME COMMENT '广告开始时间'") private Date startTime;//广告开始时间 @Column(columnDefinition = "DATETIME COMMENT '广告结束时间'") private Date endTime;//广告结束时间 @Column(columnDefinition = "int(11) COMMENT '广告位宽度'") private Integer width;//广告位宽度 @Column(columnDefinition = "int(11) COMMENT '广告位高度'") private Integer height;//广告位高度 @Column(columnDefinition = "varchar(255) COMMENT '广告链接'") private String url;//广告链接 @Column(columnDefinition = "varchar(255) COMMENT '广告图片'") private String image;//广告图片 @Column(columnDefinition = "int(11) COMMENT '是否显示:0表示显示,1表示不显示'") private Integer isDisplay;//是否显示:0表示显示,1表示不显示 @Column(columnDefinition = "int(11) COMMENT '内部或外部的,0内部的,1外部的'") private Integer inOrOut;//内部或外部的,0内部的,1外部的 @Column(columnDefinition = "varchar(255) COMMENT '广告位关联url或着活动页id,分类id,商品id'") private String relevancy;//广告位关联url或着活动页id,分类id,商品id @Column(columnDefinition = "int(11) COMMENT '关联类型;0是url,1是活动页id,2是商品id,3是分类id'") private Integer relevancyType;//关联类型;0是url,1是活动页id,2是商品id,3是分类id @Column(columnDefinition = "varchar(255) COMMENT '备注'") private String remark;//备注 public AdverEntity() { this.startTime = new Date(); this.endTime = new Date(); this.isDisplay = 0;//默认显示 } public Integer getWidth() { return width; } public void setWidth(Integer width) { this.width = width; } public Integer getHeight() { return height; } public void setHeight(Integer height) { this.height = height; } public String getAdverName() { return adverName; } public void setAdverName(String adverName) { this.adverName = adverName; } public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } public Integer getIsDisplay() { return isDisplay; } public void setIsDisplay(Integer isDisplay) { this.isDisplay = isDisplay; } public Integer getInOrOut() { return inOrOut; } public void setInOrOut(Integer inOrOut) { this.inOrOut = inOrOut; } public String getRelevancy() { return relevancy; } public void setRelevancy(String relevancy) { this.relevancy = relevancy; } public Integer getRelevancyType() { return relevancyType; } public void setRelevancyType(Integer relevancyType) { this.relevancyType = relevancyType; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } }
[ "603446367@qq.com" ]
603446367@qq.com
c923746598428f8690844ffc55b5721810f344ad
31675bc8260eed1307cc71454e69fec3a15eb457
/src/main/java/com/github/mgljava/basicstudy/designpattern/responsibility_chain_model/case2/DeptManager.java
8fa120e002f38adccedef518733f251712afca48
[]
no_license
mgljava/basic-study
583b005d5c988eda3cab9fedda444c3f93f5a54b
fb8f1867db78430734ca82cd12a8be86511d5aab
refs/heads/master
2021-07-23T14:29:49.696001
2021-07-04T10:16:52
2021-07-04T10:16:52
179,470,072
7
0
null
null
null
null
UTF-8
Java
false
false
463
java
package com.github.mgljava.basicstudy.designpattern.responsibility_chain_model.case2; public class DeptManager extends Handler { @Override public String handleFeeRequest(double fee) { String result = ""; if (fee < 1000) { result = "成功:部门经理同意聚餐费用,金额为" + fee + "元"; } else { if (getSuccessor() != null) { return getSuccessor().handleFeeRequest(fee); } } return result; } }
[ "guangliang1120@gmail.com" ]
guangliang1120@gmail.com
d0509447a1278b0c6cc5dfcaef69dd0db02c797b
de0e24c1cbb823b16d5a4316d4be5ca6b8bf78d0
/river-services/outrigger/outrigger-snaplogstore/src/main/java/org/apache/river/outrigger/snaplogstore/Resource.java
dd08c63ac28f1b42f4a8b63b981becf44e372c50
[ "BSD-3-Clause", "Apache-2.0", "MIT" ]
permissive
dreedyman/apache-river
2812ffe56bd9070c56c92c04de917472d9b5ddd9
d2829fb82ba552e2f90ad8d42667fd7be49be777
refs/heads/master
2022-11-28T16:50:40.117022
2020-08-10T17:16:51
2020-08-10T17:16:51
279,403,665
0
0
Apache-2.0
2020-08-10T17:16:53
2020-07-13T20:21:36
Java
UTF-8
Java
false
false
2,594
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.river.outrigger.snaplogstore; import org.apache.river.outrigger.proxy.StorableResource; import org.apache.river.outrigger.StoredResource; import net.jini.id.Uuid; import java.io.IOException; import java.util.Arrays; /** * Wrapper for outrigger objects that are leased resources. * This class records renews so that the * stored resource can be updated while the target is serialized. * When the stored resource is deserialized the (potentially) * updated expiration is set in the resource before it is returned. */ class Resource extends BaseObject implements StoredResource { static final long serialVersionUID = -4248052947306243840L; private final byte[] cookie; private volatile long expiration; Resource(StorableResource resource) { super(resource); final Uuid uuid = resource.getCookie(); cookie = ByteArrayWrapper.toByteArray(uuid); expiration = resource.getExpiration(); } ByteArrayWrapper getCookieAsWrapper() { return new ByteArrayWrapper(cookie); } void setExpiration(long newExpiration) { expiration = newExpiration; } public void restore(StorableResource obj) throws IOException, ClassNotFoundException { super.restore(obj); // Set the objects expiration to be the current one (it may still // be the original expiration) // obj.setExpiration(expiration); } public int hashCode() { return ByteArrayWrapper.hashFor(cookie); } public boolean equals(Object o) { if (o == null) return false; if (!(o instanceof Resource)) return false; // Same object if same cookie. return Arrays.equals(cookie, ((Resource)o).cookie); } }
[ "dennis.reedy@gmail.com" ]
dennis.reedy@gmail.com
7bf602e7cac1ea7c56ba6224b8926ccb5249c410
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-2.2.4/modules/spring-config/src/main/java/org/mule/config/spring/parsers/specific/BindingDefinitionParser.java
61e5c6a3e28292bb084b3799960ceecf78138dca
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
1,264
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.config.spring.parsers.specific; import org.mule.config.spring.parsers.generic.ChildDefinitionParser; import org.mule.routing.inbound.AbstractEventAggregator; /** * Binding definition parser for parsing all binding elements configured as part of the service. */ public class BindingDefinitionParser extends ChildDefinitionParser { public BindingDefinitionParser(String setterMethod, Class clazz) { super(setterMethod, clazz); standardOptions(); } // specifically for subclasses of AbstractCorrelationAggregator (requires a "class=..." in the config) public BindingDefinitionParser(String setterMethod) { super(setterMethod, null, AbstractEventAggregator.class, true); standardOptions(); } protected void standardOptions() { addMapping("enableCorrelation", "IF_NOT_SET=0,ALWAYS=1,NEVER=2"); } }
[ "dzapata@bf997673-6b11-0410-b953-e057580c5b09" ]
dzapata@bf997673-6b11-0410-b953-e057580c5b09
c249ec4c49d4c9951aa7191abdb893e61e381694
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
/Crawler/data/MediaSessionCompat_OnActiveChangeListenerImplementor.java
585562cda26daa4aba112597b743138297901da1
[]
no_license
NayrozD/DD2476-Project
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
94dfb3c0a470527b069e2e0fd9ee375787ee5532
refs/heads/master
2023-03-18T04:04:59.111664
2021-03-10T15:03:07
2021-03-10T15:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,729
java
2 https://raw.githubusercontent.com/AtomizedSoul/TulpApp/master/TulpApp.Android/obj/Debug/90/android/src/mono/android/support/v4/media/session/MediaSessionCompat_OnActiveChangeListenerImplementor.java package mono.android.support.v4.media.session; public class MediaSessionCompat_OnActiveChangeListenerImplementor extends java.lang.Object implements mono.android.IGCUserPeer, android.support.v4.media.session.MediaSessionCompat.OnActiveChangeListener { /** @hide */ public static final String __md_methods; static { __md_methods = "n_onActiveChanged:()V:GetOnActiveChangedHandler:Android.Support.V4.Media.Session.MediaSessionCompat/IOnActiveChangeListenerInvoker, Xamarin.Android.Support.Media.Compat\n" + ""; mono.android.Runtime.register ("Android.Support.V4.Media.Session.MediaSessionCompat+IOnActiveChangeListenerImplementor, Xamarin.Android.Support.Media.Compat", MediaSessionCompat_OnActiveChangeListenerImplementor.class, __md_methods); } public MediaSessionCompat_OnActiveChangeListenerImplementor () { super (); if (getClass () == MediaSessionCompat_OnActiveChangeListenerImplementor.class) mono.android.TypeManager.Activate ("Android.Support.V4.Media.Session.MediaSessionCompat+IOnActiveChangeListenerImplementor, Xamarin.Android.Support.Media.Compat", "", this, new java.lang.Object[] { }); } public void onActiveChanged () { n_onActiveChanged (); } private native void n_onActiveChanged (); private java.util.ArrayList refList; public void monodroidAddReference (java.lang.Object obj) { if (refList == null) refList = new java.util.ArrayList (); refList.add (obj); } public void monodroidClearReferences () { if (refList != null) refList.clear (); } }
[ "veronika.cucorova@gmail.com" ]
veronika.cucorova@gmail.com
9ede1987a010645063ec217c8c89f48e5961a467
377e5e05fb9c6c8ed90ad9980565c00605f2542b
/bin/ext-commerce/subscriptionfacades/src/de/hybris/platform/subscriptionfacades/product/converters/populator/TierUsageChargeEntryPopulator.java
cb7c172f518c7c9130b5ebf6ae27cdf64dad157b
[]
no_license
automaticinfotech/HybrisProject
c22b13db7863e1e80ccc29774f43e5c32e41e519
fc12e2890c569e45b97974d2f20a8cbe92b6d97f
refs/heads/master
2021-07-20T18:41:04.727081
2017-10-30T13:24:11
2017-10-30T13:24:11
108,957,448
0
0
null
null
null
null
UTF-8
Java
false
false
1,624
java
/* * [y] hybris Platform * * Copyright (c) 2000-2016 SAP SE or an SAP affiliate company. * All rights reserved. * * This software is the confidential and proprietary information of SAP * ("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 SAP. * */ package de.hybris.platform.subscriptionfacades.product.converters.populator; import de.hybris.platform.servicelayer.dto.converter.ConversionException; import de.hybris.platform.subscriptionfacades.data.TierUsageChargeEntryData; import de.hybris.platform.subscriptionservices.model.TierUsageChargeEntryModel; import static de.hybris.platform.servicelayer.util.ServicesUtil.validateParameterNotNullStandardMessage; /** * Populate DTO {@link TierUsageChargeEntryData} with data from {@link TierUsageChargeEntryModel}. * * @param <SOURCE> source class * @param <TARGET> target class */ public class TierUsageChargeEntryPopulator<SOURCE extends TierUsageChargeEntryModel, TARGET extends TierUsageChargeEntryData> extends AbstractUsageChargeEntryPopulator<SOURCE, TARGET> { @Override public void populate(final SOURCE source, final TARGET target) throws ConversionException { validateParameterNotNullStandardMessage("source", source); validateParameterNotNullStandardMessage("target", target); target.setTierStart(source.getTierStart() == null ? 0 : source.getTierStart()); target.setTierEnd(source.getTierEnd() == null ? 0 : source.getTierEnd()); super.populate(source, target); } }
[ "santosh.kshirsagar@automaticinfotech.com" ]
santosh.kshirsagar@automaticinfotech.com
004a6fbaef439400184922d5a799884ad84ce0d3
23d5894b723765b4200889da55aa05ec37e8ab69
/sellingpartner-fba-small-and-light-api/src/main/java/com/amazon/spapi/fbasmallandlight/model/SmallAndLightEligibility.java
5e3dcd01d29ff1911f17624d151f8cbfefa8ac90
[]
no_license
penghaiping/selling-partner-sdk
420b5e2a48aa98189aa9e0d16514004377e53685
8a89d17b492f1fb1c319cc1fa5a7cc0a30abc8b9
refs/heads/master
2023-05-31T12:10:01.348630
2021-07-05T02:24:55
2021-07-05T02:24:55
322,236,368
19
8
null
null
null
null
UTF-8
Java
false
false
4,336
java
/* * Selling Partner API for FBA Small And Light * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * OpenAPI spec version: v1 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.amazon.spapi.fbasmallandlight.model; import java.util.Objects; import java.util.Arrays; import com.amazon.spapi.fbasmallandlight.model.SmallAndLightEligibilityStatus; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; /** * The Small and Light eligibility status of the item indicated by the specified seller SKU. */ @ApiModel(description = "The Small and Light eligibility status of the item indicated by the specified seller SKU.") @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-12-15T20:31:52.166+08:00") public class SmallAndLightEligibility { @SerializedName("marketplaceId") private String marketplaceId = null; @SerializedName("sellerSKU") private String sellerSKU = null; @SerializedName("status") private SmallAndLightEligibilityStatus status = null; public SmallAndLightEligibility marketplaceId(String marketplaceId) { this.marketplaceId = marketplaceId; return this; } /** * Get marketplaceId * @return marketplaceId **/ @ApiModelProperty(required = true, value = "") public String getMarketplaceId() { return marketplaceId; } public void setMarketplaceId(String marketplaceId) { this.marketplaceId = marketplaceId; } public SmallAndLightEligibility sellerSKU(String sellerSKU) { this.sellerSKU = sellerSKU; return this; } /** * Get sellerSKU * @return sellerSKU **/ @ApiModelProperty(required = true, value = "") public String getSellerSKU() { return sellerSKU; } public void setSellerSKU(String sellerSKU) { this.sellerSKU = sellerSKU; } public SmallAndLightEligibility status(SmallAndLightEligibilityStatus status) { this.status = status; return this; } /** * Get status * @return status **/ @ApiModelProperty(required = true, value = "") public SmallAndLightEligibilityStatus getStatus() { return status; } public void setStatus(SmallAndLightEligibilityStatus status) { this.status = status; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SmallAndLightEligibility smallAndLightEligibility = (SmallAndLightEligibility) o; return Objects.equals(this.marketplaceId, smallAndLightEligibility.marketplaceId) && Objects.equals(this.sellerSKU, smallAndLightEligibility.sellerSKU) && Objects.equals(this.status, smallAndLightEligibility.status); } @Override public int hashCode() { return Objects.hash(marketplaceId, sellerSKU, status); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SmallAndLightEligibility {\n"); sb.append(" marketplaceId: ").append(toIndentedString(marketplaceId)).append("\n"); sb.append(" sellerSKU: ").append(toIndentedString(sellerSKU)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "penghp@pingpongx.com" ]
penghp@pingpongx.com