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
1a948e5872cd368294adb30710d94ce791f8bb01
8472528c8d35995ccf963ecdc3198eb3e65051f0
/hk-core-jdbc/src/main/java/com/hk/core/jdbc/dialect/OracleDialect.java
05ade83f8d41416106a22073cf378c21f2bb22a0
[]
no_license
huankai/hk-core
a314499cf5796ddd81452ce66f6f8343e131f345
f97f346aefeab9471d5219a9b505e216bbf457ad
refs/heads/master
2021-05-26T08:01:20.342175
2019-12-31T09:52:12
2020-01-02T00:59:45
127,990,324
9
3
null
2019-10-11T09:35:42
2018-04-04T01:36:50
Java
UTF-8
Java
false
false
1,758
java
package com.hk.core.jdbc.dialect; import com.hk.commons.util.StringUtils; /** * @author kevin * @date 2018-09-19 10:06 */ public class OracleDialect implements Dialect { @Override public String getLimitSql(String sql, int offset, int rows) { return getLimitString(sql, offset, rows); } /** * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换. * <pre> * 如mysql * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回 * select * from user limit :offset,:limit * </pre> * * @param sql 实际SQL语句 * @param offset 分页开始纪录条数 * @return 包含占位符的分页sql */ private String getLimitString(String sql, int offset, int rows) { sql = sql.trim(); var isForUpdate = false; if (StringUtils.endsWithIgnoreCase(sql, " FOR UPDATE")) { sql = sql.substring(0, sql.length() - 11); isForUpdate = true; } var pagingSelect = new StringBuilder(sql.length() + 100); if (offset > 0) { pagingSelect.append("SELECT * FROM ( SELECT row_.*, rownum rownum_ from ( "); } else { pagingSelect.append("SELECT * FROM ( "); } pagingSelect.append(sql); if (offset > 0) { String endString = offset + "+" + rows; pagingSelect.append(" ) row_ WHERE rownum <= ").append(endString).append(") WHERE rownum_ > ").append(offset); } else { pagingSelect.append(" ) WHERE rownum <= ").append(rows); } if (isForUpdate) { pagingSelect.append(" FOR UPDATE"); } return pagingSelect.toString(); } }
[ "huankai@139.com" ]
huankai@139.com
d81cbbc6bad415833fe5b44ea934b508b48de875
db5e2811d3988a5e689b5fa63e748c232943b4a0
/jadx/sources/zendesk/support/request/RequestViewConversationsEnabled_MembersInjector.java
87e05f3775120bf53e7b876aa263ec3c2558bc00
[]
no_license
ghuntley/TraceTogether_1.6.1.apk
914885d8be7b23758d161bcd066a4caf5ec03233
b5c515577902482d741cabdbd30f883a016242f8
refs/heads/master
2022-04-23T16:59:33.038690
2020-04-27T05:44:49
2020-04-27T05:44:49
259,217,124
0
0
null
null
null
null
UTF-8
Java
false
false
873
java
package zendesk.support.request; import o.C3616p; import o.nu; public final class RequestViewConversationsEnabled_MembersInjector { public static void injectStore(RequestViewConversationsEnabled requestViewConversationsEnabled, nu nuVar) { requestViewConversationsEnabled.store = nuVar; } public static void injectAf(RequestViewConversationsEnabled requestViewConversationsEnabled, Object obj) { requestViewConversationsEnabled.af = (ActionFactory) obj; } public static void injectCellFactory(RequestViewConversationsEnabled requestViewConversationsEnabled, Object obj) { requestViewConversationsEnabled.cellFactory = (CellFactory) obj; } public static void injectPicasso(RequestViewConversationsEnabled requestViewConversationsEnabled, C3616p pVar) { requestViewConversationsEnabled.picasso = pVar; } }
[ "ghuntley@ghuntley.com" ]
ghuntley@ghuntley.com
c73d5ae8208066483d1de7c206d9fb4d283637fb
d6ab38714f7a5f0dc6d7446ec20626f8f539406a
/backend/collecting/dsfj/Java/edited/network.NetworkAddress.java
068b753e0c8cb7f41c16de22ec886a557bfdecf6
[]
no_license
haditabatabaei/webproject
8db7178affaca835b5d66daa7d47c28443b53c3d
86b3f253e894f4368a517711bbfbe257be0259fd
refs/heads/master
2020-04-10T09:26:25.819406
2018-12-08T12:21:52
2018-12-08T12:21:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,004
java
package org.elasticsearch.common.network; import java.net.Inet6Address; import java.net.InetAddress; import java.net.InetSocketAddress; import java.util.Objects; public final class NetworkAddress { private NetworkAddress() {} public static String format(InetAddress address) { return format(address, -1); } public static String format(InetSocketAddress address) { return format(address.getAddress(), address.getPort()); } static String format(InetAddress address, int port) { Objects.requireNonNull(address); StringBuilder builder = new StringBuilder(); if (port != -1 && address instanceof Inet6Address) { builder.append(InetAddresses.toUriString(address)); } else { builder.append(InetAddresses.toAddrString(address)); } if (port != -1) { builder.append(':'); builder.append(port); } return builder.toString(); } }
[ "mahdisadeghzadeh24@gamil.com" ]
mahdisadeghzadeh24@gamil.com
9fec12fb49c52839dcfaf9a417247d6eb06358e8
7178e494e707ae152d4519b60c95f71b544d96eb
/refactoring/src/main/java/com/liujun/code/myself/swatchcase/refactor03/sender/WorkWeChatSender.java
4cb04520a38677947bb4ef1ac670f3f5f99603d4
[]
no_license
kkzfl22/learing
e24fce455bc8fec027c6009e9cd1becca0ca331b
1a1270bfc9469d23218c88bcd6af0e7aedbe41b6
refs/heads/master
2023-02-07T16:23:27.012579
2020-12-26T04:35:52
2020-12-26T04:35:52
297,195,805
0
0
null
null
null
null
UTF-8
Java
false
false
1,151
java
package com.liujun.code.myself.swatchcase.refactor03.sender; import com.liujun.code.myself.swatchcase.refactor03.bean.FunCodeMsgData; import com.liujun.code.myself.swatchcase.refactor03.bean.MsgData; import com.liujun.code.myself.swatchcase.src.common.MessageData; /** * 企业微信发送 * * @author liujun * @version 0.0.1 */ public class WorkWeChatSender implements MessageSenderInf { /** * 企业微信消息的发送 * * @param msgData 消息内容 */ @Override public void sender(MsgData msgData) { System.out.println("企业微信消息发送开始....."); FunCodeMsgData funCodeMsg = (FunCodeMsgData) msgData; System.out.println( "企业微信消息:funCode" + funCodeMsg.getFunCode() + ",toUserOpenId:" + funCodeMsg.getToId() + ",context:" + funCodeMsg.getContext()); System.out.println("企业微信消息发送结束....."); } @Override public MsgData parse(MessageData workWeChatMsg) { return new FunCodeMsgData( workWeChatMsg.getNotifyNumber(), workWeChatMsg.getContent(), workWeChatMsg.getFunCode()); } }
[ "liujun@paraview.cn" ]
liujun@paraview.cn
7deb59d17b15fef3726c25a4b8b6eb38a59096b5
f340a96d06741b77fe6fd96322ff3aa182e054fe
/src/main/java/com/sheradmin/uaa/config/LiquibaseConfiguration.java
5f016625f334bec9982a60237f2a2a663e008de4
[]
no_license
sheradmin/UAA
35d557abb455ef6869e029f5d933cdca89486e7e
7fc0070c952a287c832fe154c7a9e6f8f31e6e0e
refs/heads/master
2022-12-30T09:01:45.424303
2019-12-05T18:41:40
2019-12-05T18:41:40
226,166,616
0
0
null
2022-12-16T04:42:08
2019-12-05T18:41:32
Java
UTF-8
Java
false
false
3,208
java
package com.sheradmin.uaa.config; import io.github.jhipster.config.JHipsterConstants; import io.github.jhipster.config.liquibase.SpringLiquibaseUtil; import liquibase.integration.spring.SpringLiquibase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; import org.springframework.boot.autoconfigure.liquibase.LiquibaseDataSource; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; import javax.sql.DataSource; import java.util.concurrent.Executor; @Configuration public class LiquibaseConfiguration { private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); private final Environment env; public LiquibaseConfiguration(Environment env) { this.env = env; } @Bean public SpringLiquibase liquibase(@Qualifier("taskExecutor") Executor executor, @LiquibaseDataSource ObjectProvider<DataSource> liquibaseDataSource, LiquibaseProperties liquibaseProperties, ObjectProvider<DataSource> dataSource, DataSourceProperties dataSourceProperties) { // If you don't want Liquibase to start asynchronously, substitute by this: // SpringLiquibase liquibase = SpringLiquibaseUtil.createSpringLiquibase(liquibaseDataSource.getIfAvailable(), liquibaseProperties, dataSource.getIfUnique(), dataSourceProperties); SpringLiquibase liquibase = SpringLiquibaseUtil.createAsyncSpringLiquibase(this.env, executor, liquibaseDataSource.getIfAvailable(), liquibaseProperties, dataSource.getIfUnique(), dataSourceProperties); liquibase.setChangeLog("classpath:config/liquibase/master.xml"); liquibase.setContexts(liquibaseProperties.getContexts()); liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); liquibase.setLiquibaseSchema(liquibaseProperties.getLiquibaseSchema()); liquibase.setLiquibaseTablespace(liquibaseProperties.getLiquibaseTablespace()); liquibase.setDatabaseChangeLogLockTable(liquibaseProperties.getDatabaseChangeLogLockTable()); liquibase.setDatabaseChangeLogTable(liquibaseProperties.getDatabaseChangeLogTable()); liquibase.setDropFirst(liquibaseProperties.isDropFirst()); liquibase.setLabels(liquibaseProperties.getLabels()); liquibase.setChangeLogParameters(liquibaseProperties.getParameters()); liquibase.setRollbackFile(liquibaseProperties.getRollbackFile()); liquibase.setTestRollbackOnUpdate(liquibaseProperties.isTestRollbackOnUpdate()); if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE))) { liquibase.setShouldRun(false); } else { liquibase.setShouldRun(liquibaseProperties.isEnabled()); log.debug("Configuring Liquibase"); } return liquibase; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
bd497aa6b2d04ca119ce2f6e97554be5e4e949e3
df134b422960de6fb179f36ca97ab574b0f1d69f
/net/minecraft/server/v1_16_R2/CriterionTriggerEffectsChanged.java
767974f11d24c902bf151726fbec9258d03cb254
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
1,978
java
/* */ package net.minecraft.server.v1_16_R2; /* */ /* */ import com.google.gson.JsonObject; /* */ /* */ public class CriterionTriggerEffectsChanged /* */ extends CriterionTriggerAbstract<CriterionTriggerEffectsChanged.a> /* */ { /* 8 */ private static final MinecraftKey a = new MinecraftKey("effects_changed"); /* */ /* */ /* */ public MinecraftKey a() { /* 12 */ return a; /* */ } /* */ /* */ /* */ public a b(JsonObject var0, CriterionConditionEntity.b var1, LootDeserializationContext var2) { /* 17 */ CriterionConditionMobEffect var3 = CriterionConditionMobEffect.a(var0.get("effects")); /* 18 */ return new a(var1, var3); /* */ } /* */ /* */ public void a(EntityPlayer var0) { /* 22 */ a(var0, var1 -> var1.a(var0)); /* */ } /* */ /* */ public static class a extends CriterionInstanceAbstract { /* */ private final CriterionConditionMobEffect a; /* */ /* */ public a(CriterionConditionEntity.b var0, CriterionConditionMobEffect var1) { /* 29 */ super(CriterionTriggerEffectsChanged.b(), var0); /* 30 */ this.a = var1; /* */ } /* */ /* */ public static a a(CriterionConditionMobEffect var0) { /* 34 */ return new a(CriterionConditionEntity.b.a, var0); /* */ } /* */ /* */ public boolean a(EntityPlayer var0) { /* 38 */ return this.a.a(var0); /* */ } /* */ /* */ /* */ public JsonObject a(LootSerializationContext var0) { /* 43 */ JsonObject var1 = super.a(var0); /* */ /* 45 */ var1.add("effects", this.a.b()); /* */ /* 47 */ return var1; /* */ } /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\net\minecraft\server\v1_16_R2\CriterionTriggerEffectsChanged.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
5022933df6246178928d3be4297fb4048d1a9219
2d89eaac234844f42dae92f2829b1d48729569b7
/src/main/java/org/mapdb/util/JavaUtils.java
b01f8c52f1756ebe3334aa13c678d44a17600b1e
[ "Apache-2.0" ]
permissive
Mu-L/mapdb
618da8cf24a4c6ec8c988ee7e3212c0eaa8059ce
8721c0e824d8d546ecc76639c05ccbc618279511
refs/heads/master
2023-04-08T01:37:41.632503
2023-03-19T16:53:58
2023-03-19T16:53:58
270,608,441
0
0
Apache-2.0
2023-03-20T01:53:10
2020-06-08T09:29:51
Java
UTF-8
Java
false
false
305
java
package org.mapdb.util; import java.util.Comparator; public class JavaUtils { public static final Comparator COMPARABLE_COMPARATOR = new Comparator<Comparable>() { @Override public int compare(Comparable o1, Comparable o2) { return o1.compareTo(o2); } }; }
[ "jan@kotek.net" ]
jan@kotek.net
19a5329956fca1dc317efa43169271f212a880bd
3cd69da4d40f2d97130b5bf15045ba09c219f1fa
/sources/com/google/android/gms/internal/measurement/zzol.java
79541e91c81ff95c7df45ce8e2f847cce9bb5187
[]
no_license
TheWizard91/Album_base_source_from_JADX
946ea3a407b4815ac855ce4313b97bd42e8cab41
e1d228fc2ee550ac19eeac700254af8b0f96080a
refs/heads/master
2023-01-09T08:37:22.062350
2020-11-11T09:52:40
2020-11-11T09:52:40
311,927,971
0
0
null
null
null
null
UTF-8
Java
false
false
818
java
package com.google.android.gms.internal.measurement; /* compiled from: com.google.android.gms:play-services-measurement-impl@@17.4.4 */ public final class zzol implements zzdv<zzoo> { private static zzol zza = new zzol(); private final zzdv<zzoo> zzb; public static boolean zzb() { return ((zzoo) zza.zza()).zza(); } public static boolean zzc() { return ((zzoo) zza.zza()).zzb(); } public static boolean zzd() { return ((zzoo) zza.zza()).zzc(); } public static boolean zze() { return ((zzoo) zza.zza()).zzd(); } private zzol(zzdv<zzoo> zzdv) { this.zzb = zzdu.zza(zzdv); } public zzol() { this(zzdu.zza(new zzon())); } public final /* synthetic */ Object zza() { return this.zzb.zza(); } }
[ "agiapong@gmail.com" ]
agiapong@gmail.com
803ec78ae12674adf2e5a22f0f3642d2f480f314
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/tencentmap/mapsdk/maps/a/hx$1.java
973d9caa6a5113563c948f99c9fa0d6621715663
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
751
java
package com.tencent.tencentmap.mapsdk.maps.a; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.tencentmap.mapsdk.a.cl; class hx$1 implements Runnable { hx$1(hx paramhx) { } public void run() { AppMethodBeat.i(99639); try { if (hx.a(this.a) != null) hx.a(this.a).a(); AppMethodBeat.o(99639); return; } catch (NullPointerException localNullPointerException) { while (true) AppMethodBeat.o(99639); } } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes-dex2jar.jar * Qualified Name: com.tencent.tencentmap.mapsdk.maps.a.hx.1 * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
411b9b9ff5b1f27b484dcc716e914c78d9177b7d
073231dca7e07d8513c8378840f2d22b069ae93f
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201608/ProgrammaticCreative.java
1314530d64ebb298900915205c337c4b30c0a6f7
[ "Apache-2.0" ]
permissive
zaper90/googleads-java-lib
a884dc2268211306416397457ab54798ada6a002
aa441cd7057e6a6b045e18d6e7b7dba306085200
refs/heads/master
2021-01-01T19:14:01.743242
2017-07-17T15:48:32
2017-07-17T15:48:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,436
java
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.dfp.jaxws.v201608; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * A {@code Creative} used for programmatic trafficking. This creative will be auto-created with * the right approval from the buyer. This creative cannot be created through * the API. This creative can be updated. * * * <p>Java class for ProgrammaticCreative complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ProgrammaticCreative"> * &lt;complexContent> * &lt;extension base="{https://www.google.com/apis/ads/publisher/v201608}Creative"> * &lt;sequence> * &lt;element name="isSafeFrameCompatible" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ProgrammaticCreative", propOrder = { "isSafeFrameCompatible" }) public class ProgrammaticCreative extends Creative { protected Boolean isSafeFrameCompatible; /** * Gets the value of the isSafeFrameCompatible property. * * @return * possible object is * {@link Boolean } * */ public Boolean isIsSafeFrameCompatible() { return isSafeFrameCompatible; } /** * Sets the value of the isSafeFrameCompatible property. * * @param value * allowed object is * {@link Boolean } * */ public void setIsSafeFrameCompatible(Boolean value) { this.isSafeFrameCompatible = value; } }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
5634dec9e5add9c235136925183d7b1c3505608b
0f68c0f88c5cbccd421449ea960db31a798ebf38
/src/main/java/cn/com/hh/service/mapper/RobotTransactionMapper.java
239d65570bb698a171409be5fa9e5df2812b0b52
[]
no_license
leimu222/exchange
0e5c72658f5986d99dc96a6e860444e2624e90e2
e22bfc530a230ba23088a36b6d86a9a380d7a8ef
refs/heads/master
2023-01-31T16:19:37.498040
2020-12-08T10:30:46
2020-12-08T10:30:46
319,348,177
0
0
null
null
null
null
UTF-8
Java
false
false
1,176
java
package com.common.api.mapper; import com.common.api.model.RobotTransaction; import java.util.List; import org.apache.ibatis.annotations.Param; /** * @author Gavin Lee * @version 1.0 * @date 2020-12-08 18:16:08 * Description: [robot服务实现] */ public interface RobotTransactionMapper{ /** * 查询robot * * @param id robotID * @return robot */ public RobotTransaction selectRobotTransactionById(Long id); /** * 查询robot列表 * * @param robotTransaction robot * @return robot集合 */ public List<RobotTransaction> selectRobotTransactionList(RobotTransaction robotTransaction); /** * 新增robot * * @param robotTransaction robot * @return 结果 */ public int insertRobotTransaction(RobotTransaction robotTransaction); /** * 修改robot * * @param robotTransaction robot * @return 结果 */ public int updateRobotTransaction(RobotTransaction robotTransaction); /** * 删除robot * * @param id robotID * @return 结果 */ public int deleteRobotTransactionById(Long id); /** * 批量删除robot * * @param ids 需要删除的数据ID * @return 结果 */ public int deleteRobotTransactionByIds(Long[] ids); }
[ "2165456@qq.com" ]
2165456@qq.com
9dd78881e637344307b0e221672e1a792339b8f2
a0c62ece9811147a761369a5f620ad483bb2a603
/src/database/DBServlet.java
5f6aee06dcdb27ccab38dd97d4092d5b4b7d7a73
[]
no_license
EslSuwen/JavaWeb
11f09e6eb725067aa6095c05e45da8d8d2333505
c305049ff723866466b998addec179d389c3dce6
refs/heads/master
2020-05-30T19:23:07.742702
2019-06-22T08:46:34
2019-06-22T08:46:34
189,922,710
0
0
null
null
null
null
UTF-8
Java
false
false
3,313
java
package database; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; import java.sql.*; @WebServlet(name = "DBServlet", value = "/db") public class DBServlet extends HttpServlet { private static final long serialVersionUID = 1L; // JDBC 驱动名及数据库 URL static final String JDBC_DRIVER = "com.mysql.jdbc.Driver"; static final String DB_URL = "jdbc:mysql://localhost:3306/usersdb?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC"; // 数据库的用户名与密码,需要根据自己的设置 static final String USER = "root"; static final String PASS = "19988824"; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Connection conn = null; Statement stmt = null; // 设置响应内容类型 response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); String title = "Servlet Mysql 测试 - 菜鸟教程"; String docType = "<!DOCTYPE html>\n"; out.println(docType + "<html>\n" + "<head><title>" + title + "</title></head>\n" + "<body bgcolor=\"#f0f0f0\">\n" + "<h1 align=\"center\">" + title + "</h1>\n"); try{ // 注册 JDBC 驱动器 Class.forName("com.mysql.cj.jdbc.Driver"); // 打开一个连接 conn = DriverManager.getConnection(DB_URL,USER,PASS); // 执行 SQL 查询 stmt = conn.createStatement(); String sql; sql = "SELECT name, password FROM users"; ResultSet rs = stmt.executeQuery(sql); // 展开结果集数据库 while(rs.next()){ // 通过字段检索 String name = rs.getString("name"); String password = rs.getString("password"); // 输出数据 out.println("name: " + name); out.println("password: " + password); out.println("<br />"); } out.println("</body></html>"); // 完成后关闭 rs.close(); stmt.close(); conn.close(); } catch(SQLException se) { // 处理 JDBC 错误 se.printStackTrace(); } catch(Exception e) { // 处理 Class.forName 错误 e.printStackTrace(); }finally{ // 最后是用于关闭资源的块 try{ if(stmt!=null) stmt.close(); }catch(SQLException se2){ } try{ if(conn!=null) conn.close(); }catch(SQLException se){ se.printStackTrace(); } } } }
[ "577014284@qq.com" ]
577014284@qq.com
d89e1427e3bdbd8fc61e05c8fef39d7db8406620
8ee2f29a9c71f1e86c104c2d7f99e203562d77f3
/samples/petclinic/src/main/java/org/springframework/samples/petclinic/vet/Specialty.java
8170715d33f7bdb11c5ccda13e1e5e4e66398e07
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
sdeleuze/spring-init
f7b26a53906a6a2f616b74bb8b00ea965986e922
557ff02eb2315f3cec3d5befacd9dd0ea6440222
refs/heads/master
2022-11-17T10:11:23.611936
2020-06-26T13:56:24
2020-06-26T13:56:24
275,185,683
0
0
Apache-2.0
2020-06-26T15:16:41
2020-06-26T15:16:41
null
UTF-8
Java
false
false
1,048
java
/* * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.samples.petclinic.vet; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.Table; import org.springframework.samples.petclinic.model.NamedEntity; /** * Models a {@link Vet Vet's} specialty (for example, dentistry). * * @author Juergen Hoeller */ @Entity @Table(name = "specialties") public class Specialty extends NamedEntity implements Serializable { }
[ "dsyer@pivotal.io" ]
dsyer@pivotal.io
3bf3de60868ea25b7991ea126a3d5b33acc34409
cf1d332c0b3248504248acc176bcf52c7156982e
/web/src/main/java/com/arcsoft/supervisor/service/task/impl/DefaultTaskPortTypeStrategy.java
051af455435a3af56853f47995cfa5c449b1c0a5
[]
no_license
wwj912790488/supervisor
377eee94a7a0bf61b182cac26f911b8acbd1ff62
4e74e384158c78b38cea70ccf292718921a8a978
refs/heads/master
2021-01-01T18:16:48.389064
2017-07-25T10:41:47
2017-07-25T10:41:47
98,295,504
1
1
null
2018-12-26T02:41:23
2017-07-25T10:40:54
Java
UTF-8
Java
false
false
891
java
package com.arcsoft.supervisor.service.task.impl; import com.arcsoft.supervisor.model.domain.task.TaskPort.PortType; import com.arcsoft.supervisor.model.vo.task.TaskType; import com.arcsoft.supervisor.service.task.TaskPortTypeStrategy; import org.springframework.stereotype.Service; import java.util.Arrays; import java.util.List; /** * * Default implementation of {@link TaskPortTypeStrategy}.The implementation will create <tt>SCREEN, MOBILE<tt/> * types for compose task, create <tt>SD, HD</tt> types for channel task. * * @author zw. */ @Service("defaultTaskPortTypeStrategy") public class DefaultTaskPortTypeStrategy implements TaskPortTypeStrategy { @Override public List<PortType> create(TaskType taskType) { return taskType.isComposeType() ? Arrays.asList(PortType.SCREEN, PortType.MOBILE) : Arrays.asList(PortType.SD, PortType.HD); } }
[ "wwj@arcvideo.com" ]
wwj@arcvideo.com
45b08e323a0035b0dbbfe3ef87d302bbd529d074
0f4cfd093f19be78c951e82c4232bdb3801a2e3c
/Impro/APP/pl.zgora.uz.imgpro.model.edit/src/pl/zgora/uz/imgpro/model/diagram/provider/SegKMItemProvider.java
51716e56f501f5dbc2401e74ecc5183f9a802c14
[]
no_license
wtrocki/impro
0f54531f44c0f61716fec41cbc3af363cf59830c
541525a3e6ca24b49fa1eca93e70889d71cf8bdd
refs/heads/master
2021-01-01T05:41:08.765830
2012-12-12T19:58:25
2012-12-12T19:58:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,050
java
/******************************************************************************* * Copyright (c) 2011, 2012 Wojciech Trocki * All rights reserved. This program and the accompanying materials * are made available under the terms of the EPL license * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package pl.zgora.uz.imgpro.model.diagram.provider; import java.util.Collection; import java.util.List; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.IItemPropertySource; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; import pl.zgora.uz.imgpro.model.diagram.DiagramPackage; import pl.zgora.uz.imgpro.model.diagram.SegKM; /** * This is the item provider adapter for a {@link pl.zgora.uz.imgpro.model.diagram.SegKM} object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public class SegKMItemProvider extends DiagramElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { /** * This constructs an instance from a factory and a notifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public SegKMItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } /** * This returns the property descriptors for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addKM_clustersPropertyDescriptor(object); } return itemPropertyDescriptors; } /** * This adds a property descriptor for the KM clusters feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected void addKM_clustersPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SegKM_KM_clusters_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SegKM_KM_clusters_feature", "_UI_SegKM_type"), DiagramPackage.Literals.SEG_KM__KM_CLUSTERS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } /** * This returns SegKM.gif. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getImage(Object object) { return overlayImage(object, getResourceLocator().getImage("full/obj16/SegKM")); } /** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String getText(Object object) { String label = ((SegKM)object).getElementName(); return label == null || label.length() == 0 ? getString("_UI_SegKM_type") : getString("_UI_SegKM_type") + " " + label; } /** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(SegKM.class)) { case DiagramPackage.SEG_KM__KM_CLUSTERS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); } /** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } }
[ "pantroken@gmail.com" ]
pantroken@gmail.com
1571b69099b1ee41d34f5a5a30f1dcd62569653f
6ef4869c6bc2ce2e77b422242e347819f6a5f665
/devices/google/Pixel 2/29/QPP6.190730.005/src/framework/com/android/server/wm/ConfigurationContainerProto.java
89f1ee550594823d7eb8b723513dc7759b05d956
[]
no_license
hacking-android/frameworks
40e40396bb2edacccabf8a920fa5722b021fb060
943f0b4d46f72532a419fb6171e40d1c93984c8e
refs/heads/master
2020-07-03T19:32:28.876703
2019-08-13T03:31:06
2019-08-13T03:31:06
202,017,534
2
0
null
2019-08-13T03:33:19
2019-08-12T22:19:30
Java
UTF-8
Java
false
false
334
java
/* * Decompiled with CFR 0.145. */ package com.android.server.wm; public final class ConfigurationContainerProto { public static final long FULL_CONFIGURATION = 1146756268034L; public static final long MERGED_OVERRIDE_CONFIGURATION = 1146756268035L; public static final long OVERRIDE_CONFIGURATION = 1146756268033L; }
[ "me@paulo.costa.nom.br" ]
me@paulo.costa.nom.br
66bfd246883c7d5caf8e0bf7f51c111a656843eb
98064e974f426d9910abda97c5e53c62df9bd2c8
/app/src/main/java/com/qdigo/chargerent/entity/data/ConsumeOrder.java
0d50879b8fb938d91cc8958bc09ced8af6f747b9
[]
no_license
dongerqiang/ChargeRent
b3cc8186df2a6f477d331ef5b38c8ec585063c75
91f191694eb86b758a6c39beb9a0accd376e4206
refs/heads/master
2021-05-15T14:00:24.164080
2017-10-18T10:15:53
2017-10-18T10:15:53
107,253,522
0
1
null
null
null
null
UTF-8
Java
false
false
418
java
package com.qdigo.chargerent.entity.data; import java.io.Serializable; public class ConsumeOrder implements Serializable { /** * */ private static final long serialVersionUID = 1L; public String orderId; public String startTime; public int orderStatus; public String endTime; public int minutes; public double consume; public double price; public int unitMinutes; public String policyNo;//保单号 }
[ "www.1371686510@qq.com" ]
www.1371686510@qq.com
3f61b16deb16bcb6b6eb348907e9f84b7f6b489f
a03ddb4111faca852088ea25738bc8b3657e7b5c
/TestTransit/src/org/codehaus/jackson/map/introspect/BasicClassIntrospector$SetterMethodFilter.java
9680fae8943089e0e7c6cf3003015e21d4a2a0f3
[]
no_license
randhika/TestMM
5f0de3aee77b45ca00f59cac227450e79abc801f
4278b34cfe421bcfb8c4e218981069a7d7505628
refs/heads/master
2020-12-26T20:48:28.446555
2014-09-29T14:37:51
2014-09-29T14:37:51
24,874,176
2
0
null
null
null
null
UTF-8
Java
false
false
871
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package org.codehaus.jackson.map.introspect; import java.lang.reflect.Method; import java.lang.reflect.Modifier; // Referenced classes of package org.codehaus.jackson.map.introspect: // MethodFilter, BasicClassIntrospector public static class implements MethodFilter { public boolean includeMethod(Method method) { if (Modifier.isStatic(method.getModifiers())) { return false; } switch (method.getParameterTypes().length) { default: return false; case 1: // '\001' return true; case 2: // '\002' return true; } } public () { } }
[ "metromancn@gmail.com" ]
metromancn@gmail.com
c45171603dd64de1d15c9a136162e110f1833c00
bef166ddbfe0a8812146bbda8be35554ab9f1617
/src/main/java/com/ef/golf/service/impl/AccountServiceImpl.java
84781a35007e91c42054518646193093d9d03189
[]
no_license
jinxing000/test
774d1d4f80e00f9ce02653dc14cf0a18241a0abe
3b750064ffd6baa0defc2b478a7586f82a3697e1
refs/heads/master
2020-11-25T17:28:07.942458
2018-11-29T08:52:27
2018-11-29T08:52:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,528
java
package com.ef.golf.service.impl; import com.ef.golf.mapper.AccountMapper; import com.ef.golf.mapper.JiaoYiHuizongMapper; import com.ef.golf.pojo.Account; import com.ef.golf.service.AccountService; import org.springframework.stereotype.Repository; import javax.annotation.Resource; import java.util.Date; import java.util.HashMap; import java.util.Map; /** * for efgolf * Created by Bart on 2017/9/21. * Date: 2017/9/21 16:03 */ @Repository public class AccountServiceImpl implements AccountService { @Resource private AccountMapper accountMapper; @Resource private JiaoYiHuizongMapper jiaoYiHuizongMapper; public long saveAccount(Account account) { int i = accountMapper.insertSelective(account); return i; } @Override public Integer getAccountUserId(Integer accountId) { return accountMapper.getAccountUserId(accountId); } @Override public int selectAccountId(Long userId) { int end=accountMapper.selectAccountId(userId); return end; } @Override public Account getUserBalance(Integer userId) { return accountMapper.getUserBalance(userId); } @Override public int updateUserBalance(Integer userId,Double balance) { Map<String,Object>map = new HashMap<>(); map.put("userId",userId); map.put("balance",balance); return accountMapper.updateUserBalance(map); } @Override public int updateUserCzBalance(Integer userId, Double czBalance) { Map<String,Object>map = new HashMap<>(); map.put("userId",userId); map.put("czBalance",czBalance); return accountMapper.updateUserCzBalance(map); } @Override public int updateUserSrBalance(Integer userId, Double srBalance) { Map<String,Object>map = new HashMap<>(); map.put("userId",userId); map.put("srBalance",srBalance); return accountMapper.updateUserSrBalance(map); } @Override public int updateUserZsBalance(Integer userId, Double zsBalance) { Map<String,Object>map = new HashMap<>(); map.put("userId",userId); map.put("zsBalance",zsBalance); return accountMapper.updateUserZsBalance(map); } @Override public Account getAccount(Integer userId) { return accountMapper.getAccount(userId); } @Override public Double getUserTxBalance(Date date,String userType, Integer userId) { return jiaoYiHuizongMapper.getUserTxBalance(date,userType,userId); } }
[ "15620532538@163.com" ]
15620532538@163.com
e59fc7e940afe85617b6688f38b1bb46e61ef7d9
4b5abde75a6daab68699a9de89945d8bf583e1d0
/app-release-unsigned/sources/j/n0/k/i/l.java
f7cc6558d20e8277be66d2dc196b56f443c37067
[]
no_license
agustrinaldokurniawan/News_Android_Kotlin_Mobile_Apps
95d270d4fa2a47f599204477cb25bae7bee6e030
a1f2e186970cef9043458563437b9c691725bcb5
refs/heads/main
2023-07-03T01:03:22.307300
2021-08-08T10:47:00
2021-08-08T10:47:00
375,330,796
0
0
null
null
null
null
UTF-8
Java
false
false
681
java
package j.n0.k.i; import i.s.c.f; import i.s.c.h; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; public final class l extends f { /* renamed from: h reason: collision with root package name */ public static final a f3702h = new a(null); public static final class a { public a(f fVar) { } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public l(Class<? super SSLSocket> cls, Class<? super SSLSocketFactory> cls2, Class<?> cls3) { super(cls); h.f(cls, "sslSocketClass"); h.f(cls2, "sslSocketFactoryClass"); h.f(cls3, "paramClass"); } }
[ "agust.kurniawan@Agust-Rinaldo-Kurniawan.local" ]
agust.kurniawan@Agust-Rinaldo-Kurniawan.local
b99b69855610776ba86da72fb70ec9b12e555133
ee598ead01a0cafba788dd0455c5dd5008f53451
/FreightHelper-dirver/FreightHelper-driver/cldOlsHuoyun/src/main/java/com/yunbaba/ols/api/CldKCallNaviAPI.java
f4b6914e8a0bd83babb80ad6b71a9b754ae450c9
[]
no_license
zhaoqingyue/FreightHelper-dirver
4316a0128f6285563587cad9c2c41003ba62dbf2
783cc566ada72e2247f9959b01e4878d3df26224
refs/heads/master
2020-04-04T10:58:02.203109
2018-11-07T13:47:46
2018-11-07T13:47:46
155,873,975
1
2
null
null
null
null
UTF-8
Java
false
false
8,780
java
/* * @Title CldKCallNaviAPI.java * @Copyright Copyright 2010-2014 Careland Software Co,.Ltd All Rights Reserved. * @Description * @author Zhouls * @date 2015-1-6 9:03:57 * @version 1.0 */ package com.yunbaba.ols.api; import java.util.List; import com.yunbaba.ols.api.CldOlsInit.ICldOlsInitListener; import com.yunbaba.ols.bll.CldKCallNavi; import com.yunbaba.ols.bll.CldKMessage; import com.yunbaba.ols.dal.CldDalKCallNavi; import com.yunbaba.ols.sap.bean.CldSapKMParm.ShareAKeyCallParm; import com.yunbaba.ols.tools.CldSapReturn; /** * 一键通相关模块,提供一键通相关功能 * * @author Zhouls * @date 2015-3-5 下午3:18:44 */ public class CldKCallNaviAPI { /** 一键通回调监听,初始化时设置一次 */ private ICldKCallNaviListener listener; private static CldKCallNaviAPI cldKCallNaviAPI; private CldKCallNaviAPI() { } public static CldKCallNaviAPI getInstance() { if (null == cldKCallNaviAPI) { cldKCallNaviAPI = new CldKCallNaviAPI(); } return cldKCallNaviAPI; } /** * 初始化密钥 * * @param listener * @return void * @author Zhouls * @date 2015-2-12 下午6:05:49 */ public void initKey(final ICldOlsInitListener listener) { new Thread(new Runnable() { @Override public void run() { CldKCallNavi.getInstance().initKey(); if (null != listener) { listener.onInitReslut(); } } }).start(); } /** * 一键通初始化(登陆后调用) * * @return void * @author Zhouls * @date 2015-3-5 下午3:19:06 */ public void init() { new Thread(new Runnable() { @Override public void run() { CldKCallNavi.getInstance().getBindMobile(); } }).start(); } /** * 反初始化 * * @return void * @author Zhouls * @date 2015-3-5 下午3:19:19 */ public void uninit() { } /** * 设置一键通回调监听 * * @param listener * 一键通回调 * @return (0 设置成功,-1已有设置失败) * @return int * @author Zhouls * @date 2015-3-5 下午3:19:30 */ public int setCldKCallNaviListener(ICldKCallNaviListener listener) { if (null == this.listener) { this.listener = listener; return 0; } else { return -1; } } /** * 获取绑定手机号码 * * @return void * @author Zhouls * @date 2015-3-5 下午3:19:45 */ public void getBindMobile() { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKCallNavi.getInstance() .getBindMobile(); if (null != listener) { listener.onGetBindMobileResult(errRes.errCode); } } }).start(); } /** * 获取一键通手机验证码 * * @param mobile * 手机号 * @return void * @author Zhouls * @date 2015-3-5 下午3:19:54 */ public void getIdentifycode(final String mobile) { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKCallNavi.getInstance() .getIdentifycode(mobile); if (null != listener) { listener.onGetIdentifycodeResult(errRes.errCode); } } }).start(); } /** * 绑定其他手机号接口 * * @param identifycode * 验证码 * @param mobile * 手机号码 * @param replacemobile * 需要替换掉的旧号码 ,不为空则替换相应号码;为空则增加mobile * @return void * @author Zhouls * @date 2015-3-5 下午3:20:07 */ public void bindToMobile(final String identifycode, final String mobile, final String replacemobile) { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKCallNavi.getInstance().bindToMobile( identifycode, mobile, replacemobile); if (null != listener) { listener.onBindToMobileResult(errRes.errCode); } } }).start(); } /** * 上报位置 * * @param mobile * 手机号,如为空,则按kuid绑定的所有手机号都上报位置 * @param longitude * WGS84 经度,单位:度 * @param latitude * WGS84 纬度,单位:度 * @return void * @author Zhouls * @date 2015-3-5 下午3:20:23 */ public void upLocation(final String mobile, final double longitude, final double latitude) { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKMessage.getInstance().upLocation( mobile, longitude, latitude); if (null != listener) { listener.onUpLocationResult(errRes.errCode); } } }).start(); } /** * 获取一键通消息 * * @param mobile * 手机号,如果传了手机号,则只会查询指定的手机号,否则轮循所有手机号 * @param longitude * WGS84 经度,单位:度 * @param latitude * WGS84 纬度,单位:度 * @param isLoop * 是否轮询多个手机号 * @return void * @author Zhouls * @date 2015-3-5 下午3:20:39 */ public void recPptMsg(final String mobile, final double longitude, final double latitude, final boolean isLoop) { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKMessage.getInstance().recPptMsg( mobile, longitude, latitude, isLoop); if (null != listener) { listener.onRecPptMsgResult(errRes.errCode, CldDalKCallNavi .getInstance().getMsgList()); } } }).start(); } /** * 注册一键通帐号 * * @return void * @author Zhouls * @date 2015-3-5 下午3:20:53 */ public void registerByKuid() { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKCallNavi.getInstance() .registerByKuid(); if (null != listener) { listener.onRegisterResult(errRes.errCode); } } }).start(); } /** * 删除绑定手机号 * * @param mobile * 手机号码 * @return void * @author Zhouls * @date 2015-3-5 下午3:21:03 */ public void delBindMobile(final String mobile) { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKCallNavi.getInstance().delBindMobile( mobile); if (null != listener) { listener.onDelMobileResult(errRes.errCode); } } }).start(); } /** * 获取绑定的手机号 * * @return * @return String 之前调用过获取绑定手机号码则返回之前的号码,否则返回null 再调用获取绑定手机号接口 * @author Zhouls * @date 2015-3-5 下午3:21:17 */ public String getPptMobile() { if (CldDalKCallNavi.getInstance().getMobiles().size() > 0) { return CldDalKCallNavi.getInstance().getMobiles().get(0); } else { return null; } } /** * 获取绑定的手机号列表 * * @return * @return List<String> * @author Zhouls * @date 2015-3-5 下午3:21:37 */ public List<String> getPptMobileList() { return CldDalKCallNavi.getInstance().getMobiles(); } /** * 更新绑定的手机号 * * @param mobiles * 更新的手机号 * @return void * @author Zhouls * @date 2015-3-5 下午3:21:49 */ public void updateBindMobile(List<String> mobiles) { CldDalKCallNavi.getInstance().setMobiles(mobiles); } /** * 一键通回调监听 * * @author Zhouls * @date 2015-3-5 下午3:22:04 */ public static interface ICldKCallNaviListener { /** * 注册一键通回调 * * @param errCode * @return void * @author Zhouls * @date 2015-3-5 下午3:22:16 */ public void onRegisterResult(int errCode); /** * 获取绑定手机号码回调 * * @param errCode * @return void * @author Zhouls * @date 2015-3-5 下午3:22:29 */ public void onGetBindMobileResult(int errCode); /** * 获取一键通手机验证码回调 * * @param errCode * @return void * @author Zhouls * @date 2015-3-5 下午3:22:38 */ public void onGetIdentifycodeResult(int errCode); /** * 绑定其他手机号回调 * * @param errCode * 0成功 405验证码错误 * @return void * @author Zhouls * @date 2015-3-5 下午3:22:47 */ public void onBindToMobileResult(int errCode); /** * 删除手机号回调 * * @param errCode * @return void * @author Zhouls * @date 2015-3-5 下午3:23:10 */ public void onDelMobileResult(int errCode); /** * 上报位置回调 * * @param errCode * @return void * @author Zhouls * @date 2015-3-5 下午3:23:19 */ public void onUpLocationResult(int errCode); /** * 接收一键通消息回调 * * @param errCode * @param list * @return void * @author Zhouls * @date 2015-3-5 下午3:23:29 */ public void onRecPptMsgResult(int errCode, List<ShareAKeyCallParm> list); } }
[ "1023755730@qq.com" ]
1023755730@qq.com
b9d515e12024f16809d949cf48f98d37614622a3
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/127/522/CWE134_Uncontrolled_Format_String__PropertiesFile_format_73b.java
93694876332428037c28d2709e9bbf58539720c0
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
1,767
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE134_Uncontrolled_Format_String__PropertiesFile_format_73b.java Label Definition File: CWE134_Uncontrolled_Format_String.label.xml Template File: sources-sinks-73b.tmpl.java */ /* * @description * CWE: 134 Uncontrolled Format String * BadSource: PropertiesFile Read data from a .properties file (in property named data) * GoodSource: A hardcoded string * Sinks: format * GoodSink: dynamic formatted stdout with string defined * BadSink : dynamic formatted stdout without validation * Flow Variant: 73 Data flow: data passed in a LinkedList from one method to another in different source files in the same package * * */ import java.util.LinkedList; public class CWE134_Uncontrolled_Format_String__PropertiesFile_format_73b { public void badSink(LinkedList<String> dataLinkedList ) throws Throwable { String data = dataLinkedList.remove(2); if (data != null) { /* POTENTIAL FLAW: uncontrolled string formatting */ System.out.format(data); } } /* goodG2B() - use GoodSource and BadSink */ public void goodG2BSink(LinkedList<String> dataLinkedList ) throws Throwable { String data = dataLinkedList.remove(2); if (data != null) { /* POTENTIAL FLAW: uncontrolled string formatting */ System.out.format(data); } } /* goodB2G() - use BadSource and GoodSink */ public void goodB2GSink(LinkedList<String> dataLinkedList ) throws Throwable { String data = dataLinkedList.remove(2); if (data != null) { /* FIX: explicitly defined string formatting */ System.out.format("%s%n", data); } } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
bf7b8e76eca94f300c4c6f816f447661a14fb886
9ff153875921311054a27dd48ec46695e5a1893a
/net/minecraft/client/particle/EntityParticleEmitter.java
c8ab6d9d1ed4c29a45f14c2eda7e04aec882d6a6
[]
no_license
Nitrofyyy/SeaClientSourcev2.1
4d8f3151cdefcf49f10ddc6a4e861feff2e1df91
be0940967447fc3b9192e886a2b04dbb8636c03a
refs/heads/main
2023-08-31T13:01:54.044693
2021-10-22T08:23:35
2021-10-22T08:23:35
420,016,521
1
0
null
null
null
null
UTF-8
Java
false
false
2,177
java
// // Decompiled by Procyon v0.5.36 // package net.minecraft.client.particle; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.world.World; import net.minecraft.util.EnumParticleTypes; import net.minecraft.entity.Entity; public class EntityParticleEmitter extends EntityFX { private Entity attachedEntity; private int age; private int lifetime; private EnumParticleTypes particleTypes; public EntityParticleEmitter(final World worldIn, final Entity p_i46279_2_, final EnumParticleTypes particleTypesIn) { super(worldIn, p_i46279_2_.posX, p_i46279_2_.getEntityBoundingBox().minY + p_i46279_2_.height / 2.0f, p_i46279_2_.posZ, p_i46279_2_.motionX, p_i46279_2_.motionY, p_i46279_2_.motionZ); this.attachedEntity = p_i46279_2_; this.lifetime = 3; this.particleTypes = particleTypesIn; this.onUpdate(); } @Override public void renderParticle(final WorldRenderer worldRendererIn, final Entity entityIn, final float partialTicks, final float rotationX, final float rotationZ, final float rotationYZ, final float rotationXY, final float rotationXZ) { } @Override public void onUpdate() { for (int i = 0; i < 16; ++i) { final double d0 = this.rand.nextFloat() * 2.0f - 1.0f; final double d2 = this.rand.nextFloat() * 2.0f - 1.0f; final double d3 = this.rand.nextFloat() * 2.0f - 1.0f; if (d0 * d0 + d2 * d2 + d3 * d3 <= 1.0) { final double d4 = this.attachedEntity.posX + d0 * this.attachedEntity.width / 4.0; final double d5 = this.attachedEntity.getEntityBoundingBox().minY + this.attachedEntity.height / 2.0f + d2 * this.attachedEntity.height / 4.0; final double d6 = this.attachedEntity.posZ + d3 * this.attachedEntity.width / 4.0; this.worldObj.spawnParticle(this.particleTypes, false, d4, d5, d6, d0, d2 + 0.2, d3, new int[0]); } } ++this.age; if (this.age >= this.lifetime) { this.setDead(); } } @Override public int getFXLayer() { return 3; } }
[ "84819367+Nitrofyyy@users.noreply.github.com" ]
84819367+Nitrofyyy@users.noreply.github.com
6855f92ef1b51682a67fd75597f636bba28212c4
8b96417ea286f9b2d3ec7d448e1a31c0ba8d57cb
/portal/portal-util/util/src/java/org/sakaiproject/portal/util/URLUtils.java
ddae2b4b33013e28c7be0f6f536c4bb9c80e7187
[ "ECL-2.0" ]
permissive
deemsys/Deemsys_Learnguild
d5b11c5d1ad514888f14369b9947582836749883
606efcb2cdc2bc6093f914f78befc65ab79d32be
refs/heads/master
2021-01-15T16:16:12.036004
2013-08-13T12:13:45
2013-08-13T12:13:45
12,083,202
0
1
null
null
null
null
UTF-8
Java
false
false
2,130
java
/********************************************************************************** * $URL: https://source.sakaiproject.org/svn/portal/tags/portal-base-2.9.2/portal-util/util/src/java/org/sakaiproject/portal/util/URLUtils.java $ * $Id: URLUtils.java 110562 2012-07-19 23:00:20Z ottenhoff@longsight.com $ *********************************************************************************** * * Copyright (c) 2006, 2007, 2008 The Sakai Foundation * * Licensed under the Educational Community 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.opensource.org/licenses/ECL-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.sakaiproject.portal.util; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; /** * @author ieb * @since Sakai 2.4 * @version $Rev: 110562 $ */ public class URLUtils { public static String addParameter(String URL, String name, String value) { int qpos = URL.indexOf('?'); int hpos = URL.indexOf('#'); char sep = qpos == -1 ? '?' : '&'; String seg = sep + encodeUrl(name) + '=' + encodeUrl(value); return hpos == -1 ? URL + seg : URL.substring(0, hpos) + seg + URL.substring(hpos); } /** * The same behaviour as Web.escapeUrl, only without the "funky encoding" of * the characters ? and ; (uses JDK URLEncoder directly). * * @param toencode * The string to encode. * @return <code>toencode</code> fully escaped using URL rules. */ public static String encodeUrl(String url) { try { return URLEncoder.encode(url, "UTF-8"); } catch (UnsupportedEncodingException uee) { throw new IllegalArgumentException(uee); } } }
[ "sangee1229@gmail.com" ]
sangee1229@gmail.com
034dcd87ab6491cb93eacf43d118ee5ed9c8e30e
3c5649b7e830c2f97d76677e6474a830f2c9e4f5
/src/com/facebook/buck/rules/modern/config/HybridLocalBuildStrategyConfig.java
a8a82d4bdaf283abe604f5e832d4b6549e0b8e0d
[ "Apache-2.0" ]
permissive
MalkeshDalia/buck
067a9342f9d03f91b9f9f6562b7ac8801cbaa992
2c26b1133002125ef3d43706918799bddca0f2da
refs/heads/master
2023-04-15T18:17:43.136919
2019-05-01T03:29:02
2019-05-01T04:34:46
184,374,733
1
0
Apache-2.0
2023-04-03T23:11:10
2019-05-01T05:49:53
Java
UTF-8
Java
false
false
1,318
java
/* * Copyright 2018-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.rules.modern.config; /** Configuration for the "hybrid_local" build strategy. */ public class HybridLocalBuildStrategyConfig { private final int localJobs; private final int delegateJobs; private final ModernBuildRuleStrategyConfig delegate; public HybridLocalBuildStrategyConfig( int localJobs, int delegateJobs, ModernBuildRuleStrategyConfig delegate) { this.localJobs = localJobs; this.delegateJobs = delegateJobs; this.delegate = delegate; } public ModernBuildRuleStrategyConfig getDelegateConfig() { return delegate; } public int getLocalJobs() { return localJobs; } public int getDelegateJobs() { return delegateJobs; } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
514ee5f3e236d443d60931f4ac698a585b97cb8f
5ee8c2891ad48c1d7dfc45d19a8f8ad7f6761ad3
/dConnectDevicePlugin/dConnectDeviceTest/app/src/main/java/org/deviceconnect/android/deviceplugin/test/profile/unique/package-info.java
f502a7fe127f78b87f71e9e93ca51cb33dad99ec
[ "MIT" ]
permissive
DeviceConnect/DeviceConnect-Android
48657c6a495e7a7a90d445c4c85d76dd146cdcfc
bebe333a5c8b8f246116c696f2b55c69f169a0ec
refs/heads/main
2023-03-16T09:27:59.261255
2023-03-14T01:16:29
2023-03-14T01:16:29
29,235,999
57
34
MIT
2023-03-14T01:16:30
2015-01-14T09:05:06
Java
UTF-8
Java
false
false
309
java
/* org.deviceconnect.android.deviceplugin.test Copyright (c) 2014 NTT DOCOMO,INC. Released under the MIT license http://opensource.org/licenses/mit-license.php */ /** * Device ConnectManagerのテスト用独自プロファイル. */ package org.deviceconnect.android.deviceplugin.test.profile.unique;
[ "hoshi@gclue.jp" ]
hoshi@gclue.jp
6924e06293b5b8d0b6efd4a2aa44779a45ce4b2a
6a17ccfa5750b333ca36ab687eae456114dfff17
/apis/api-core/api-core-common/src/main/java/org/hoteia/qalingo/core/domain/RetailerCustomerComment.java
cff0296ba71ed42e7950886a1295993b1ca56d16
[ "Apache-2.0" ]
permissive
bikashdora/qalingo-engine
4d5434c7035ff4399a3a419508083d65871cbc21
4f54fcbf4caee81b384600c67b774158b412225c
refs/heads/master
2021-01-18T06:07:15.097754
2014-11-23T17:35:15
2014-11-23T17:35:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,864
java
/** * Most of the code in the Qalingo project is copyrighted Hoteia and licensed * under the Apache License Version 2.0 (release version 0.8.0) * http://www.apache.org/licenses/LICENSE-2.0 * * Copyright (c) Hoteia, 2012-2014 * http://www.hoteia.com - http://twitter.com/hoteia - contact@hoteia.com * */ package org.hoteia.qalingo.core.domain; import java.util.Date; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; @Entity @Table(name="TECO_RETAILER_CUSTOMER_COMMENT") public class RetailerCustomerComment extends AbstractAddress { /** * Generated UID */ private static final long serialVersionUID = 1424510557043858148L; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name="ID", nullable=false) private Long id; @Column(name="COMMENT") private String comment; @Column(name="RETAILER_CUSTOMER_COMMENT_ID") private Long retailerCustomerCommentId; @OneToOne(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.DETACH}) @JoinColumn(name="CUSTOMER_ID") private Customer customer; @Column(name="RETAILER_ID") private Long retailerId; @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinColumn(name="RETAILER_CUSTOMER_COMMENT_ID") private Set<RetailerCustomerComment> customerComments = new HashSet<RetailerCustomerComment>(); @Temporal(TemporalType.TIMESTAMP) @Column(name="DATE_CREATE") private Date dateCreate; @Temporal(TemporalType.TIMESTAMP) @Column(name="DATE_UPDATE") private Date dateUpdate; public RetailerCustomerComment() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getComment() { return comment; } public void setComment(String comment) { this.comment = comment; } public Long getRetailerCustomerCommentId() { return retailerCustomerCommentId; } public void setRetailerCustomerCommentId(Long retailerCustomerCommentId) { this.retailerCustomerCommentId = retailerCustomerCommentId; } public Customer getCustomer() { return customer; } public void setCustomer(Customer customer) { this.customer = customer; } public Long getRetailerId() { return retailerId; } public void setRetailerId(Long retailerId) { this.retailerId = retailerId; } public Set<RetailerCustomerComment> getCustomerComments() { return customerComments; } public void setCustomerComments(Set<RetailerCustomerComment> customerComments) { this.customerComments = customerComments; } public Date getDateCreate() { return dateCreate; } public void setDateCreate(Date dateCreate) { this.dateCreate = dateCreate; } public Date getDateUpdate() { return dateUpdate; } public void setDateUpdate(Date dateUpdate) { this.dateUpdate = dateUpdate; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((dateCreate == null) ? 0 : dateCreate.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((retailerId == null) ? 0 : retailerId.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; RetailerCustomerComment other = (RetailerCustomerComment) obj; if (dateCreate == null) { if (other.dateCreate != null) return false; } else if (!dateCreate.equals(other.dateCreate)) return false; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (retailerId == null) { if (other.retailerId != null) return false; } else if (!retailerId.equals(other.retailerId)) return false; return true; } @Override public String toString() { return "RetailerCustomerComment [id=" + id + ", comment=" + comment + ", retailerCustomerCommentId=" + retailerCustomerCommentId + ", retailerId=" + retailerId + ", dateCreate=" + dateCreate + ", dateUpdate=" + dateUpdate + "]"; } }
[ "denis@Hoteia-Laptop.home" ]
denis@Hoteia-Laptop.home
8b7bf39e758a840a6a4b9eaf543e17c0556a6dca
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
/sources/com/google/android/gms/internal/ads/zzaoz.java
a3ece845157724ff942fa5f93bb63a721b79562f
[]
no_license
sengeiou/KnowAndGo-android-thunkable
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
39e809d0bbbe9a743253bed99b8209679ad449c9
refs/heads/master
2023-01-01T02:20:01.680570
2020-10-22T04:35:27
2020-10-22T04:35:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
779
java
package com.google.android.gms.internal.ads; import android.os.Parcel; import android.os.RemoteException; public abstract class zzaoz extends zzfn implements zzaoy { public zzaoz() { super("com.google.android.gms.ads.internal.mediation.client.rtb.ISignalsCallback"); } /* access modifiers changed from: protected */ public final boolean dispatchTransaction(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { switch (i) { case 1: zzdc(parcel.readString()); break; case 2: onFailure(parcel.readString()); break; default: return false; } parcel2.writeNoException(); return true; } }
[ "joshuahj.tsao@gmail.com" ]
joshuahj.tsao@gmail.com
aa0803fbfde119ecb749404bf04cd5708b99f1dc
62a5c8d3ea75a624064e78fc484a9230c342e294
/src/main/java/nom/tam/fits/header/extra/CXCExt.java
85b0b5016afca387e0d9f5f8a8600580fc4a2f28
[]
no_license
stargaser/nom-tam-fits
c96499e1913be89edc1ee5cb9c5c1a370d362428
7885275caf7af42d6c2af44548ea51268a8b9f2d
refs/heads/master
2021-01-17T21:37:19.605427
2015-02-21T07:05:52
2015-02-21T07:05:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,738
java
package nom.tam.fits.header.extra; /* * #%L * nom.tam FITS library * %% * Copyright (C) 1996 - 2015 nom-tam-fits * %% * This is free and unencumbered software released into the public domain. * * Anyone is free to copy, modify, publish, use, compile, sell, or * distribute this software, either in source code form or as a compiled * binary, for any purpose, commercial or non-commercial, and by any * means. * * In jurisdictions that recognize copyright laws, the author or authors * of this software dedicate any and all copyright interest in the * software to the public domain. We make this dedication for the benefit * of the public at large and to the detriment of our heirs and * successors. We intend this dedication to be an overt act of * relinquishment in perpetuity of all present and future rights to this * software under copyright law. * * 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 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. * #L% */ import nom.tam.fits.header.FitsHeaderImpl; import nom.tam.fits.header.IFitsHeader; /** * This is the file content.txt that presents a comprehensive compilation of all * classes of data products in the Chandra Data Archive for the "flight" * dataset. This file is the definitive authority on the values of various FITS * header keywords. * <p> * All files are identified by the CONTENT value of their principal HDUs. * </p> * * <pre> * http://cxc.harvard.edu/contrib/arots/fits/content.txt * </pre> * * @author Richard van Nieuwenhoven */ public enum CXCExt implements IFitsHeader { /** * ASC-DS processing system revision (release) */ ASCDSVER("ASC-DS processing system revision (release)"), /** * Correction applied to Basic Time rate (s) */ BTIMCORR("Correction applied to Basic Time rate (s)"), /** * Basic Time clock drift (s / VCDUcount^2) */ BTIMDRFT("Basic Time clock drift (s / VCDUcount^2)"), /** * Basic Time offset (s) */ BTIMNULL("Basic Time offset (s)"), /** * Basic Time clock rate (s / VCDUcount) */ BTIMRATE("Basic Time clock rate (s / VCDUcount)"), /** * Data product identification '########' */ CONTENT("Data product identification"), /** * ??? */ CONVERS("??"), /** * Data class '########' */ DATACLAS("Data class"), /** * Dead time correction */ DTCOR("Dead time correction"), /** * Assumed focal length, mm; Level 1 and up */ FOC_LEN("Assumed focal length, mm; Level 1 and up"), /** * ICD reference */ HDUSPEC("ICD reference"), /** * The OGIP long string convention may be used. */ LONGSTRN("The OGIP long string convention may be used."), /** * Mission is AXAF */ MISSION("Mission is AXAF"), /** * Processing version of data */ REVISION("Processing version of data"), /** * Nominal roll angle, deg */ ROLL_NOM("Nominal roll angle, deg"), /** * Sequence number */ SEQ_NUM("Sequence number"), /** * SIM focus pos (mm) */ SIM_X("SIM focus pos (mm)"), /** * SIM orthogonal axis pos (mm) */ SIM_Y("SIM orthogonal axis pos (mm)"), /** * SIM translation stage pos (mm) */ SIM_Z("SIM translation stage pos (mm)"), /** * Major frame count at start */ STARTMJF("Major frame count at start"), /** * Minor frame count at start */ STARTMNF("Minor frame count at start"), /** * On-Board MET close to STARTMJF and STARTMNF */ STARTOBT("On-Board MET close to STARTMJF and STARTMNF"), /** * Major frame count at stop */ STOPMJF("Major frame count at stop"), /** * Minor frame count at stop */ STOPMNF("Minor frame count at stop"), /** * Absolute precision of clock correction */ TIERABSO("Absolute precision of clock correction"), /** * Short-term clock stability */ TIERRELA("Short-term clock stability"), /** * Time stamp reference as bin fraction */ TIMEPIXR("Time stamp reference as bin fraction"), /** * Telemetry revision number (IP&CL) */ TLMVER("Telemetry revision number (IP&CL)"), /** * As in the "TIME" column: raw space craft clock; */ TSTART("As in the \"TIME\" column: raw space craft clock;"), /** * add TIMEZERO and MJDREF for absolute TT */ TSTOP("add TIMEZERO and MJDREF for absolute TT"); private IFitsHeader key; private CXCExt(String comment) { key = new FitsHeaderImpl(name(), IFitsHeader.SOURCE.CXC, HDU.ANY, VALUE.STRING, comment); } private CXCExt(String key, String comment) { this.key = new FitsHeaderImpl(name(), IFitsHeader.SOURCE.CXC, HDU.ANY, VALUE.STRING, comment); } @Override public String comment() { return key.comment(); } @Override public HDU hdu() { return key.hdu(); } @Override public String key() { return key.key(); } @Override public IFitsHeader n(int... number) { return key.n(number); } @Override public SOURCE status() { return key.status(); } @Override public VALUE valueType() { return key.valueType(); } }
[ "ritchie@gmx.at" ]
ritchie@gmx.at
8b6fef7078ef3da1a7381250df5ae31de592a5c4
124c730fcbc03dae8e5f3fb70679c1c4e2e0dfc9
/java-plus-lambda/src/main/java/com/java/plus/lambda/ComparatorsPlus.java
0cd30e45a28e840ea3ee90029580ead58842105e
[]
no_license
jianjunyue/java-plus
fe54703fa2c196a79f20c76a1ca93e85d9f2fd8e
12d41d6989f15eef60f08aa73e2cc14772cd3c0d
refs/heads/master
2023-03-23T17:08:02.913043
2021-03-16T08:04:08
2021-03-16T08:04:08
286,040,500
0
1
null
null
null
null
UTF-8
Java
false
false
1,061
java
package com.java.plus.lambda; import java.util.List; import java.util.Set; import java.util.function.BiConsumer; import java.util.function.BinaryOperator; import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Collector; import java.util.stream.Collectors; /** * 自定义 Collectors.toList() * */ public class ComparatorsPlus<T> implements Collector<T,List<T>,List<T>> { public static void main(String[] args) { Collectors.toList(); } @Override public Supplier<List<T>> supplier() { // TODO Auto-generated method stub return null; } @Override public BiConsumer<List<T>, T> accumulator() { // TODO Auto-generated method stub return null; } @Override public BinaryOperator<List<T>> combiner() { // TODO Auto-generated method stub return null; } @Override public Function<List<T>, List<T>> finisher() { // TODO Auto-generated method stub return null; } @Override public Set<Characteristics> characteristics() { // TODO Auto-generated method stub return null; } }
[ "apple@apples-MacBook-Pro.local" ]
apple@apples-MacBook-Pro.local
761ce12a780b50554b53f61339401d8df470755c
806f76edfe3b16b437be3eb81639d1a7b1ced0de
/src/com/huawei/wallet/logic/install/PackageInstallHelper.java
623e364f75a45ef4fe0c4a703668f03db3ad41b8
[]
no_license
magic-coder/huawei-wear-re
1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01
935ad32f5348c3d8c8d294ed55a5a2830987da73
refs/heads/master
2021-04-15T18:30:54.036851
2018-03-22T07:16:50
2018-03-22T07:16:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,334
java
package com.huawei.wallet.logic.install; import android.content.Context; import android.content.Intent; import android.content.pm.IPackageInstallObserver; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Handler; import android.text.TextUtils; import com.huawei.wallet.utils.log.LogC; import java.io.File; import java.lang.reflect.InvocationTargetException; import net.sqlcipher.database.SQLiteDatabase; public class PackageInstallHelper { public boolean m28057a(Context context) { if (context == null) { LogC.m28534d("isAppHasInstallPermission context null", false); return false; } int checkPermission = context.getPackageManager().checkPermission("android.permission.INSTALL_PACKAGES", context.getPackageName()); LogC.m28530b("permisstionGranted is 0 ?:" + checkPermission, false); if (checkPermission == 0) { return true; } return false; } public boolean m28058a(Context context, Handler handler, String str, String str2) { if (context == null) { LogC.m28530b("install error, context is null.", false); return false; } else if (TextUtils.isEmpty(str)) { LogC.m28530b("install error, install path is valid.", false); return false; } else if (TextUtils.isEmpty(str2)) { LogC.m28530b("install error, package name is null.", false); return false; } else if (m28057a(context)) { return m28060b(context, handler, str, str2); } else { return m28059a(context, str); } } public boolean m28059a(Context context, String str) { if (context == null) { LogC.m28530b("install error, context is null.", false); return false; } else if (TextUtils.isEmpty(str)) { LogC.m28530b("install error, install path is valid.", false); return false; } else { Intent intent = new Intent("android.intent.action.VIEW"); File file = new File(str); if (!file.exists() || !file.isFile() || file.length() <= 0) { return false; } LogC.m28530b("execute installNormal. ", false); intent.setDataAndType(Uri.parse("file://" + str), "application/vnd.android.package-archive"); intent.addFlags(SQLiteDatabase.CREATE_IF_NECESSARY); context.startActivity(intent); return true; } } public boolean m28060b(Context context, Handler handler, String str, String str2) { if (context == null) { LogC.m28530b("install error, context is null.", false); return false; } else if (TextUtils.isEmpty(str)) { LogC.m28530b("install error, install file path is valid.", false); return false; } else if (TextUtils.isEmpty(str2)) { LogC.m28530b("install error, package name is null.", false); return false; } else { Uri fromFile = Uri.fromFile(new File(str)); PackageManager packageManager = context.getPackageManager(); PackageInstallObserver packageInstallObserver = new PackageInstallObserver(handler, str2); try { PackageManager.class.getMethod("installPackage", new Class[]{Uri.class, IPackageInstallObserver.class, Integer.TYPE, String.class}).invoke(packageManager, new Object[]{fromFile, packageInstallObserver, Integer.valueOf(2), str2}); LogC.m28530b("start install.", false); return true; } catch (NoSuchMethodException e) { LogC.m28534d("installSilent, occur no such method exception.", false); handler.sendEmptyMessage(-2001); return false; } catch (InvocationTargetException e2) { LogC.m28534d("installSilent, occur invocation target exception.", false); handler.sendEmptyMessage(-2001); return false; } catch (IllegalAccessException e3) { LogC.m28534d("installSilent, occur illegal access exception.", false); handler.sendEmptyMessage(-2001); return false; } } } }
[ "lebedev1537@gmail.com" ]
lebedev1537@gmail.com
f3ad3f2eca02da97b21657290066475f37371169
61f4bce6d63d39c03247c35cfc67e03c56e0b496
/src/dyno/swing/designer/beans/toolkit/BeanInfoToggleButton.java
9ceda0aa9fcaaa00e90899578da584f227f5d76a
[]
no_license
phalex/swing_designer
570cff4a29304d52707c4fa373c9483bbdaa33b9
3e184408bcd0aab6dd5b4ba8ae2aaa3f846963ff
refs/heads/master
2021-01-01T20:38:49.845289
2012-12-17T06:50:11
2012-12-17T06:50:11
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
723
java
/* * BeanInfoToggleButton.java * * Created on 2007Äê8ÔÂ10ÈÕ, ÉÏÎç12:26 * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package dyno.swing.designer.beans.toolkit; import java.beans.BeanInfo; import javax.swing.JToggleButton; /** * * @author William Chen */ public class BeanInfoToggleButton extends JToggleButton { private BeanInfo beanInfo; /** Creates a new instance of BeanInfoToggleButton */ public BeanInfoToggleButton(BeanInfo info) { beanInfo = info; } public BeanInfo getBeanInfo() { return beanInfo; } public void setBeanInfo(BeanInfo beanInfo) { this.beanInfo = beanInfo; } }
[ "584874132@qq.com" ]
584874132@qq.com
8180cd22e81dd1429044d8f4798dff0b502741f5
82866738c28b7e6954832aaa77b09a18bcad9b0f
/Client-Server-Application-Development/Threading/Lab_14/Transaction.java
3d43172d21b253a0b6e227d7e43bf271cf10e779
[]
no_license
MRohit/Core-Java-Excercises
1450af2c46ce6487705ff9936e20fb7ab4840ec3
c2735cc65fcba09e2dc9f48002c9f0b390ea731d
refs/heads/master
2020-12-14T09:53:25.913944
2017-11-03T17:23:23
2017-11-03T17:23:23
95,474,081
1
0
null
null
null
null
UTF-8
Java
false
false
1,866
java
package Lab_14; public class Transaction extends Thread{ Account account; public Transaction() { // TODO Auto-generated constructor stub } Transaction(Account account,String name){ super(name); this.account=account; } @Override public void run() { // TODO Auto-generated method stub int i=0; while(i<2){ try{ if(Thread.currentThread().getName().equals("One")){ withdraw(1000); Thread.sleep(3000); } if(Thread.currentThread().getName().equals("Two")){ deposit(2000); Thread.sleep(1000); } } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } i++; } } private void withdraw(int amount) { // TODO Auto-generated method stub try{ account.lock.lock(); double balamt=account.getBalance(); System.out.println("Withdrawl:"+amount); double bal=balamt-amount; account.setBalance(bal); balamt=account.getBalance(); System.out.println("\t"+balamt); System.out.println(); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } finally{ account.lock.unlock(); } } private void deposit(int amount) { // TODO Auto-generated method stub try{ account.lock.lock(); double balamt=account.getBalance(); System.out.println("Deposit Amount:"+amount); double bal=balamt+amount; account.setBalance(bal); balamt=account.getBalance(); System.out.println("\t"+balamt); System.out.println(); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } finally{ account.lock.unlock(); } } public static void main(String[] args) { int initial=5000; System.out.println("Original Balance:"+initial); Account account=new Account(initial); Thread t1=new Transaction(account, "One"); Thread t2=new Transaction(account, "Two"); t1.start(); t2.start(); } }
[ "mourya.rohit32@gmail.com" ]
mourya.rohit32@gmail.com
f277642ebc48a5be0539707e44ab7415ede4d339
ec95ec759f3d3270967aa4e59dffddfec9f4a80f
/I_Amazon_OA2_Top_9/src/A_Data_Structure.java
f7debc8eb859e6cf334057626a556bfd51f6efcf
[]
no_license
guccio618/myLeetcode
3ccf037f0b917c13967e2bbbee7d04ff8dba68bc
a51c874144964435fca7752b83dcbcc52db37a4b
refs/heads/master
2021-01-13T14:59:31.182538
2017-01-26T04:47:40
2017-01-26T04:47:40
76,620,835
2
1
null
null
null
null
UTF-8
Java
false
false
526
java
public class A_Data_Structure { } class RandomListNode { int label; RandomListNode next, random; RandomListNode(int x) { this.label = x; } }; class TreeNode { int value; TreeNode left, right; public TreeNode (int value) { this.value = value; left = right = null; } } class Connection{ String city1; String city2; int cost; public Connection(String c1, String c2, int c){ city1 = c1; city2 = c2; cost = c; } @Override public String toString() { return city1 + " " + city2 + " " + cost; } }
[ "jackiechan618@hotmail.com" ]
jackiechan618@hotmail.com
c2083ac7083b7f5c28abc63d5a87d944d951bc30
c3fc32403e52a1b629bced343c750dfaa983ce70
/src/main/java/io/reactiverse/sqlclient/impl/SqlClientBase.java
91888f7b1fa3d5654fea52f5d2a54bcf7259ba51
[ "Apache-2.0" ]
permissive
xp13910818313/reactive-pg-client
4ca3349a006e70f2009024e0edc6a3f2a11b8c0f
851cdaef0f59c956d699fb2c37ae420c14167958
refs/heads/master
2020-05-18T22:00:58.896691
2019-05-02T06:47:32
2019-05-02T06:47:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,306
java
/* * Copyright (C) 2017 Julien Viet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package io.reactiverse.sqlclient.impl; import io.reactiverse.sqlclient.impl.command.CommandScheduler; import io.reactiverse.sqlclient.impl.command.ExtendedBatchQueryCommand; import io.reactiverse.sqlclient.impl.command.ExtendedQueryCommand; import io.reactiverse.sqlclient.impl.command.PrepareStatementCommand; import io.reactiverse.sqlclient.impl.command.SimpleQueryCommand; import io.reactiverse.sqlclient.SqlResult; import io.reactiverse.sqlclient.RowSet; import io.reactiverse.sqlclient.Row; import io.reactiverse.sqlclient.SqlClient; import io.reactiverse.sqlclient.Tuple; import io.vertx.core.AsyncResult; import io.vertx.core.Future; import io.vertx.core.Handler; import java.util.List; import java.util.function.Function; import java.util.stream.Collector; public abstract class SqlClientBase<C extends SqlClient> implements SqlClient, CommandScheduler { @Override public C query(String sql, Handler<AsyncResult<RowSet>> handler) { return query(sql, false, RowSetImpl.FACTORY, RowSetImpl.COLLECTOR, handler); } @Override public <R> C query(String sql, Collector<Row, ?, R> collector, Handler<AsyncResult<SqlResult<R>>> handler) { return query(sql, true, SqlResultImpl::new, collector, handler); } private <R1, R2 extends SqlResultBase<R1, R2>, R3 extends SqlResult<R1>> C query( String sql, boolean singleton, Function<R1, R2> factory, Collector<Row, ?, R1> collector, Handler<AsyncResult<R3>> handler) { SqlResultBuilder<R1, R2, R3> b = new SqlResultBuilder<>(factory, handler); schedule(new SimpleQueryCommand<>(sql, singleton, collector, b), b); return (C) this; } @Override public C preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet>> handler) { return preparedQuery(sql, arguments, false, RowSetImpl.FACTORY, RowSetImpl.COLLECTOR, handler); } @Override public <R> C preparedQuery(String sql, Tuple arguments, Collector<Row, ?, R> collector, Handler<AsyncResult<SqlResult<R>>> handler) { return preparedQuery(sql, arguments, true, SqlResultImpl::new, collector, handler); } private <R1, R2 extends SqlResultBase<R1, R2>, R3 extends SqlResult<R1>> C preparedQuery( String sql, Tuple arguments, boolean singleton, Function<R1, R2> factory, Collector<Row, ?, R1> collector, Handler<AsyncResult<R3>> handler) { schedule(new PrepareStatementCommand(sql), cr -> { if (cr.succeeded()) { PreparedStatement ps = cr.result(); String msg = ps.prepare((List<Object>) arguments); if (msg != null) { handler.handle(Future.failedFuture(msg)); } else { SqlResultBuilder<R1, R2, R3> b = new SqlResultBuilder<>(factory, handler); cr.scheduler.schedule(new ExtendedQueryCommand<>(ps, arguments, singleton, collector, b), b); } } else { handler.handle(Future.failedFuture(cr.cause())); } }); return (C) this; } @Override public C preparedQuery(String sql, Handler<AsyncResult<RowSet>> handler) { return preparedQuery(sql, ArrayTuple.EMPTY, handler); } @Override public <R> C preparedQuery(String sql, Collector<Row, ?, R> collector, Handler<AsyncResult<SqlResult<R>>> handler) { return preparedQuery(sql, ArrayTuple.EMPTY, collector, handler); } @Override public C preparedBatch(String sql, List<Tuple> batch, Handler<AsyncResult<RowSet>> handler) { return preparedBatch(sql, batch, false, RowSetImpl.FACTORY, RowSetImpl.COLLECTOR, handler); } @Override public <R> C preparedBatch(String sql, List<Tuple> batch, Collector<Row, ?, R> collector, Handler<AsyncResult<SqlResult<R>>> handler) { return preparedBatch(sql, batch, true, SqlResultImpl::new, collector, handler); } private <R1, R2 extends SqlResultBase<R1, R2>, R3 extends SqlResult<R1>> C preparedBatch( String sql, List<Tuple> batch, boolean singleton, Function<R1, R2> factory, Collector<Row, ?, R1> collector, Handler<AsyncResult<R3>> handler) { schedule(new PrepareStatementCommand(sql), cr -> { if (cr.succeeded()) { PreparedStatement ps = cr.result(); for (Tuple args : batch) { String msg = ps.prepare((List<Object>) args); if (msg != null) { handler.handle(Future.failedFuture(msg)); return; } } SqlResultBuilder<R1, R2, R3> b = new SqlResultBuilder<>(factory, handler); cr.scheduler.schedule(new ExtendedBatchQueryCommand<>( ps, batch, singleton, collector, b), b); } else { handler.handle(Future.failedFuture(cr.cause())); } }); return (C) this; } }
[ "julien@julienviet.com" ]
julien@julienviet.com
b3c01e41d848d57c1ee9f70f5bf867a574c14e58
6f5a4d2f99a3ac8081c1afd54a2558bc1ff880fe
/codesignal/src/main/java/Arcade/Intro/The_Journey_Begins/AddClass.java
0cc00bfefd76be9430c5d871c0af34ce614c38b3
[]
no_license
tvttavares/competitive-programming
19a43154813db7a28c4701413e06f7ab16b841c5
6fc6033832a1e725a901fadae765439ec30eac30
refs/heads/master
2022-06-30T03:00:16.359238
2022-05-26T01:18:10
2022-05-26T01:18:10
209,412,704
0
0
null
null
null
null
UTF-8
Java
false
false
162
java
package Arcade.Intro.The_Journey_Begins; public class AddClass { public static int add(int param1, int param2) { return param1 + param2; } }
[ "tvttavares@gmail.com" ]
tvttavares@gmail.com
668790851dc535383cb6b85d739f3c672d514694
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/4.0.0/management-agent/management-tsa-impl/src/main/java/com/terracotta/management/resource/services/LogsResourceServiceImpl.java
9499a284363049d4e83a77d938b4dd97036f3c1d
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
2,192
java
/* * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. */ package com.terracotta.management.resource.services; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.terracotta.management.ServiceExecutionException; import org.terracotta.management.ServiceLocator; import org.terracotta.management.resource.exceptions.ResourceRuntimeException; import org.terracotta.management.resource.services.validator.RequestValidator; import com.terracotta.management.resource.LogEntity; import com.terracotta.management.resource.services.validator.TSARequestValidator; import com.terracotta.management.service.LogsService; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.Set; import javax.ws.rs.Path; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; /** * @author Ludovic Orban */ @Path("/agents/logs") public class LogsResourceServiceImpl implements LogsResourceService { private static final Logger LOG = LoggerFactory.getLogger(LogsResourceServiceImpl.class); private final LogsService logsService; private final RequestValidator requestValidator; public LogsResourceServiceImpl() { this.logsService = ServiceLocator.locate(LogsService.class); this.requestValidator = ServiceLocator.locate(TSARequestValidator.class); } @Override public Collection<LogEntity> getLogs(UriInfo info) { LOG.debug(String.format("Invoking LogsResourceServiceImpl.getLogs: %s", info.getRequestUri())); requestValidator.validateSafe(info); try { String names = info.getPathSegments().get(1).getMatrixParameters().getFirst("names"); Set<String> serverNames = names == null ? null : new HashSet<String>(Arrays.asList(names.split(","))); MultivaluedMap<String, String> qParams = info.getQueryParameters(); String sinceWhen = qParams.getFirst(ATTR_QUERY_KEY); return logsService.getLogs(serverNames, sinceWhen); } catch (ServiceExecutionException see) { throw new ResourceRuntimeException("Failed to get TSA logs", see, Response.Status.BAD_REQUEST.getStatusCode()); } } }
[ "cruise@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
cruise@7fc7bbf3-cf45-46d4-be06-341739edd864
1c4d685b58dbeb457303470115470e9a58c8f032
573b9c497f644aeefd5c05def17315f497bd9536
/src/main/java/com/alipay/api/domain/MEquityValidInfo.java
2ed70aeef730ba631c0ec1daa831227408d85943
[ "Apache-2.0" ]
permissive
zzzyw-work/alipay-sdk-java-all
44d72874f95cd70ca42083b927a31a277694b672
294cc314cd40f5446a0f7f10acbb5e9740c9cce4
refs/heads/master
2022-04-15T21:17:33.204840
2020-04-14T12:17:20
2020-04-14T12:17:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,569
java
package com.alipay.api.domain; import java.util.Date; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 权益有效期信息对象 * * @author auto create * @since 1.0, 2019-01-08 09:38:56 */ public class MEquityValidInfo extends AlipayObject { private static final long serialVersionUID = 3868898774637475696L; /** * 延迟生效时间(单位分钟);延迟生效时间取值范围1~99999的整数,注意:仅当effect_type=DELAY时,该值起作用 */ @ApiField("delay_minutes") private Long delayMinutes; /** * 券生效方式,当券有效期为绝对时间(FIXED)时,只能设置IMMEDIATELY,枚举取值:立即生效:IMMEDIATELY,延迟生效:DELAY */ @ApiField("effect_type") private String effectType; /** * 权益结束时间,有效期类型valid_type为FIXED绝对方式时必填且仅当FIXED类型,该值可用,格式:yyyy-MM-dd HH:mm:ss */ @ApiField("end_date") private Date endDate; /** * 描述了券相对领取后多少分钟有效,取值必须1~99999的整数,有效期类型valid_type为RELATIVE时必填且仅当RELATIVE值时该值起作用 */ @ApiField("relative_minutes") private Long relativeMinutes; /** * 权益开始时间,有效期类型valid_type为FIXED绝对方式时必填且仅当FIXED类型,该值可用,格式:yyyy-MM-dd HH:mm:ss */ @ApiField("start_date") private Date startDate; /** * 有效期类型,支持枚举值:绝对方式:FIXED、相对方式:RELATIVE */ @ApiField("valid_type") private String validType; public Long getDelayMinutes() { return this.delayMinutes; } public void setDelayMinutes(Long delayMinutes) { this.delayMinutes = delayMinutes; } public String getEffectType() { return this.effectType; } public void setEffectType(String effectType) { this.effectType = effectType; } public Date getEndDate() { return this.endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } public Long getRelativeMinutes() { return this.relativeMinutes; } public void setRelativeMinutes(Long relativeMinutes) { this.relativeMinutes = relativeMinutes; } public Date getStartDate() { return this.startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; } public String getValidType() { return this.validType; } public void setValidType(String validType) { this.validType = validType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
5f5f9e114ec9a057511bb22b028443645289084f
2f5431aa126774936d18a4bd7cf5bb9cf0eb0856
/animations/src/main/java/com/guigarage/animations/transitions/DurationBasedTransition.java
8f1a69119c819bdfbf245bbfb9e9c8d1b840fd62
[]
no_license
omatei01/javafx-collection
5d9313294993be09dee917333f882d9d1a59fb13
124fd5672653d41bad91b0d2f68288f5f39a15c0
refs/heads/master
2021-01-23T09:35:32.452053
2015-07-09T08:55:58
2015-07-09T08:55:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
282
java
package com.guigarage.animations.transitions; import javafx.animation.Transition; import javafx.util.Duration; public abstract class DurationBasedTransition extends Transition { public DurationBasedTransition(Duration duration) { setCycleDuration(duration); } }
[ "hendrik.ebbers@web.de" ]
hendrik.ebbers@web.de
0559d8fc09192f9c5d16bc76ba8b46eb752fa895
a8728dd2e44735e8779e759a7e68cba2e0dbae3b
/JAVA/24_Thread/src/thread/step4/test/InputThreadTest1.java
98391bdc558b60a4a11f386a2783e057264e87ae
[]
no_license
qkqwof/encore
8a90705cb037d48302f07154a2dd80757f35db82
7a8833cbae714ca2dbce0e30fde663b829e61149
refs/heads/master
2023-04-28T21:01:40.619872
2021-05-22T12:06:04
2021-05-22T12:06:04
350,820,827
0
0
null
null
null
null
UHC
Java
false
false
816
java
package thread.step4.test; import javax.swing.JOptionPane; /* * 메인쓰레드만 가동되는 로직을 작성 * 동시작업(병렬적인 작업)처리가 안된다. * * 로또번호를 입력받는 작업 * + * 카운팅을 하는 작업 * --> 10초 안에 최종적으로 로또번호를 입력!!! */ public class InputThreadTest1 { public static void main(String[] args) { //1.데이터 입력...작업..GUI String input = JOptionPane.showInputDialog("최종 로또 번호 마지막자리 숫자를 입력하세요.."); System.out.println("입력한 숫자는 " + input + "입니다."); //2.일종의 카운팅 작업...10,9,8,7,6,...,1 for(int i=10;i>=1;i--) { try { Thread.sleep(1000); }catch(InterruptedException e) { } System.out.println(i); } } }
[ "qkqwof@yonsei.ac.kr" ]
qkqwof@yonsei.ac.kr
f48011e497d68390d5c2b902246c676da76699fc
689cdf772da9f871beee7099ab21cd244005bfb2
/classes/com/c/b/n.java
722cda03f9de1f13250da8802e9459d1ab18593e
[]
no_license
waterwitness/dazhihui
9353fd5e22821cb5026921ce22d02ca53af381dc
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
refs/heads/master
2020-05-29T08:54:50.751842
2016-10-08T08:09:46
2016-10-08T08:09:46
70,314,359
2
4
null
null
null
null
UTF-8
Java
false
false
2,831
java
package com.c.b; import com.c.b.a.a.a; public class n { private final float a; private final float b; public n(float paramFloat1, float paramFloat2) { this.a = paramFloat1; this.b = paramFloat2; } public static float a(n paramn1, n paramn2) { return a.a(paramn1.a, paramn1.b, paramn2.a, paramn2.b); } private static float a(n paramn1, n paramn2, n paramn3) { float f1 = paramn2.a; float f2 = paramn2.b; float f3 = paramn3.a; float f4 = paramn1.b; float f5 = paramn3.b; return (f3 - f1) * (f4 - f2) - (paramn1.a - f1) * (f5 - f2); } public static void a(n[] paramArrayOfn) { float f1 = a(paramArrayOfn[0], paramArrayOfn[1]); float f2 = a(paramArrayOfn[1], paramArrayOfn[2]); float f3 = a(paramArrayOfn[0], paramArrayOfn[2]); n localn; Object localObject2; Object localObject1; if ((f2 >= f1) && (f2 >= f3)) { localn = paramArrayOfn[0]; localObject2 = paramArrayOfn[1]; localObject1 = paramArrayOfn[2]; if (a((n)localObject2, localn, (n)localObject1) >= 0.0F) { break label135; } } for (;;) { paramArrayOfn[0] = localObject1; paramArrayOfn[1] = localn; paramArrayOfn[2] = localObject2; return; if ((f3 >= f2) && (f3 >= f1)) { localn = paramArrayOfn[1]; localObject2 = paramArrayOfn[0]; localObject1 = paramArrayOfn[2]; break; } localn = paramArrayOfn[2]; localObject2 = paramArrayOfn[0]; localObject1 = paramArrayOfn[1]; break; label135: Object localObject3 = localObject1; localObject1 = localObject2; localObject2 = localObject3; } } public final float a() { return this.a; } public final float b() { return this.b; } public final boolean equals(Object paramObject) { boolean bool2 = false; boolean bool1 = bool2; if ((paramObject instanceof n)) { paramObject = (n)paramObject; bool1 = bool2; if (this.a == ((n)paramObject).a) { bool1 = bool2; if (this.b == ((n)paramObject).b) { bool1 = true; } } } return bool1; } public final int hashCode() { return Float.floatToIntBits(this.a) * 31 + Float.floatToIntBits(this.b); } public final String toString() { StringBuilder localStringBuilder = new StringBuilder(25); localStringBuilder.append('('); localStringBuilder.append(this.a); localStringBuilder.append(','); localStringBuilder.append(this.b); localStringBuilder.append(')'); return localStringBuilder.toString(); } } /* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\c\b\n.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
06047136a9ef4bad094a4b800992e0f03647e75f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/CHART-13b-4-25-PESA_II-WeightedSum:TestLen:CallDiversity/org/jfree/chart/block/BorderArrangement_ESTest_scaffolding.java
fce6938b7df822bd89b22a67839f0b556318d88a
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
449
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Jan 19 16:21:51 GMT+00:00 2020 */ package org.jfree.chart.block; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class BorderArrangement_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
039a538d3c38ee7b5867ba7034d0eae19f64c1e9
2e53b1e78ceb2014acb99dfbdd4e5af671da7971
/app/src/main/java/com/meiku/dev/ui/morefun/LocalActivityManagerFragment.java
d7f40854b2996fa6d73c49133d0a6538f0768dd2
[]
no_license
hs5240leihuang/MrrckApplication
7960cb2278a1a8098c5bc908b3c5d7b241869c5d
aef126d4876e3e45b0984c1b829c38aa326ba598
refs/heads/master
2021-01-12T02:47:13.236711
2017-01-05T11:13:11
2017-01-05T11:14:05
78,102,342
0
0
null
null
null
null
UTF-8
Java
false
false
1,844
java
package com.meiku.dev.ui.morefun; import android.app.LocalActivityManager; import android.os.Bundle; import com.meiku.dev.ui.fragments.BaseFragment; public class LocalActivityManagerFragment extends BaseFragment { private static final String KEY_STATE_BUNDLE = "localActivityManagerState"; private LocalActivityManager mLocalActivityManager; protected LocalActivityManager getLocalActivityManager() { return mLocalActivityManager; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle state = null; if(savedInstanceState != null) { state = savedInstanceState.getBundle(KEY_STATE_BUNDLE); } mLocalActivityManager = new LocalActivityManager(getActivity(), true); mLocalActivityManager.dispatchCreate(state); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putBundle(KEY_STATE_BUNDLE, mLocalActivityManager.saveInstanceState()); } @Override public void onResume() { super.onResume(); mLocalActivityManager.dispatchResume(); } @Override public void onPause() { super.onPause(); mLocalActivityManager.dispatchPause(getActivity().isFinishing()); } @Override public void onStop() { super.onStop(); mLocalActivityManager.dispatchStop(); } @Override public void onDestroy() { super.onDestroy(); mLocalActivityManager.dispatchDestroy(getActivity().isFinishing()); } @Override public void initValue() { } @Override public <T> void onSuccess(int requestCode, T arg0) { } @Override public <T> void onFailed(int requestCode, T arg0) { } }
[ "837851174@qq.com" ]
837851174@qq.com
8f6b6f09fc9b2639fcb73d6747a6d2b51a21132a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_fb5062020e499f75c9a5971b842af62fe76c0f01/IconClickLogic/25_fb5062020e499f75c9a5971b842af62fe76c0f01_IconClickLogic_t.java
35a44a57f2eccca229cbb2a5a8bcc6630bb36faa
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,204
java
package net.sourceforge.pinemup.logic; import java.awt.event.*; import net.sourceforge.pinemup.menus.*; import javax.swing.*; public class IconClickLogic extends MouseAdapter implements ActionListener { private CategoryList categories; private UserSettings settings; private TrayMenu menu; public void actionPerformed(ActionEvent arg0) { Category defCat = categories.getDefaultCategory(); if (defCat != null) { Note newNote = new Note("",settings,categories); defCat.getNotes().add(newNote); newNote.showIfNotHidden(); newNote.jumpInto(); } } public IconClickLogic(CategoryList c, UserSettings s) { categories = c; settings = s; menu = new TrayMenu(categories,settings); menu.setInvoker(null); } public void mouseReleased(MouseEvent event) { if (event.isPopupTrigger() || event.getButton() == MouseEvent.BUTTON2 || event.getButton() == MouseEvent.BUTTON3) { menu.setLocation(event.getX(), event.getY()); menu.setVisible(true); SwingUtilities.windowForComponent(menu).setAlwaysOnTop(true); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
035f4a063d5f57b8bfcce12be505c97fb6bbbabe
b41b553a285bfea105ad4b68943eb1c29f976ca2
/core/src/main/java/io/github/thanktoken/core/api/attribute/AttributeReadValue.java
fb751470a6a14f3f1bda31e9befc5475e8c78401
[ "Apache-2.0" ]
permissive
thanktoken/thanks4java
c12f32f5b778a843cfefc577e664e8768ab4aef7
9ccc2aca2375247c168e8b64c0241de78408367f
refs/heads/master
2021-04-09T16:00:43.851308
2020-03-25T11:28:20
2020-03-25T11:28:20
125,636,409
2
0
null
null
null
null
UTF-8
Java
false
false
1,648
java
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ package io.github.thanktoken.core.api.attribute; import java.time.Instant; import io.github.thanktoken.core.api.currency.ThankCurrency; import io.github.thanktoken.core.api.data.ThankDataObject; import io.github.thanktoken.core.api.token.ThankToken; import io.github.thanktoken.core.api.value.ThankValue; /** * Interface to {@link #getValue() read} the {@link ThankValue}. */ public interface AttributeReadValue extends ThankDataObject { /** * @return the current value of this object in the actual * {@link io.github.thanktoken.core.api.token.header.ThankTokenHeader#getCurrency() currency}. The value is determined * from the original {@link io.github.thanktoken.core.api.token.header.ThankTokenHeader#getAmount() amount} and changes * over the time {@link ThankCurrency#getValue(ThankToken, Instant) according} to its * {@link io.github.thanktoken.core.api.token.header.ThankTokenHeader#getCurrency() currency}. * @see #getValue(Instant) * @see io.github.thanktoken.core.api.token.ThankToken#getValue() */ default ThankValue getValue() { return getValue(Instant.now()); } /** * @param timestamp is the point in time for which the value shall be calculated. Should not be before the * {@link io.github.thanktoken.core.api.token.header.ThankTokenHeader#getTimestamp() creation timestamp}. * @return the value of this object at the given {@link Instant}. * @see #getValue() */ ThankValue getValue(Instant timestamp); }
[ "hohwille@users.sourceforge.net" ]
hohwille@users.sourceforge.net
3605e969b4a9b53099c9e8e0dea41697b8edccb3
8bd4b9d52c4e5ce6cd2690cf0bb8e9cecb6991af
/03/src/Vektor.java
d63862201002b4986f031229228ca82561c60128
[]
no_license
Programovanie4/Kod
be0c21241c6d735aa172badefc780fe3d69b99e5
6bd8ca18c04b6c4264ff2a64a0161d58cde5b916
refs/heads/main
2023-05-27T02:08:47.070453
2023-05-05T06:50:06
2023-05-05T06:50:06
50,527,388
1
4
null
null
null
null
UTF-8
Java
false
false
737
java
import java.util.Arrays; public class Vektor { private double[] v; public Vektor(double[] a) { v = Arrays.copyOf(a, a.length); } public String toString() { String s = "["; for(int i=0; i<v.length; i++) s += v[i]+ ((i+1==v.length)?"]":","); return s; } public void add(Vektor b) { if (v.length == b.v.length) { for(int i=0; i<v.length; i++) v[i] += b.v[i]; } else throw new VektorException("scitujes nerovnake vektory"); } public static void main(String[] args) { double[] p = {1,2,3,4}; double[] r = {2,3,4,5}; Vektor v1 = new Vektor(p); Vektor v2 = new Vektor(r); System.out.println(v1); System.out.println(v2); v1.add(v2); System.out.println(v1); System.out.println(v2); } }
[ "peter.borovansky@microstep-mis.com" ]
peter.borovansky@microstep-mis.com
3db6993d2de31f2ad1b4c08b59c35a14828d2e83
8ced32b21f1be9511c256cb8b589d7976b4b98d6
/alanmall-service/order-service/order-provider/src/main/java/com/itcrazy/alanmall/order/utils/MqFactory.java
a2550ff0f9e151e36e3c66bcfb2acc463aa899ee
[]
no_license
Yangliang266/Alanmall
e5d1e57441790a481ae5aa75aa9d091909440281
38c2bde86dab6fd0277c87f99bc860bfc0fbdc0a
refs/heads/master
2023-06-13T05:01:25.747444
2021-07-10T12:18:58
2021-07-10T12:18:58
293,702,057
1
0
null
null
null
null
UTF-8
Java
false
false
1,446
java
package com.itcrazy.alanmall.order.utils; import com.itcrazy.alanmall.order.context.CreateOrderContext; import com.itcrazy.alanmall.order.context.TransHandlerContext; import lombok.Data; import org.apache.commons.lang3.time.FastDateFormat; import org.springframework.stereotype.Component; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** * @Auther: mathyoung * @description: mq 请求封装 */ @Component @Data public class MqFactory { public volatile static MqTransCondition mqTransCondition = new MqTransCondition(); public static Map<String, MqTransCondition> pool = new ConcurrentHashMap<String, MqTransCondition>(); private static final FastDateFormat FAST_DATE_FORMAT = FastDateFormat.getInstance("yyyyMMddHHmmss"); public static MqTransCondition getFlyweight(TransHandlerContext context, String exchange, String queue) { CreateOrderContext createOrderContext = (CreateOrderContext) context; if (pool.containsKey(createOrderContext.getUserId().toString())) { mqTransCondition.setMsgId(Long.valueOf(FAST_DATE_FORMAT.format(System.currentTimeMillis()))); } else { MqTransCondition mqTransCondition1 = new MqTransCondition(createOrderContext, exchange, queue); pool.put(mqTransCondition1.getUserId().toString(), mqTransCondition1); mqTransCondition = mqTransCondition1; } return mqTransCondition; } }
[ "546493589@qq.com" ]
546493589@qq.com
4c834e2c83344c77834ec99d42a5e8ee44d93f33
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/digits/313d572e1f050451c688b97510efa105685fa275a8442f9119ce9b3f85f46e234cdf03593568e19798aed6b79c66f45c97be937d09b6ff9544f0f59162538575/000/mutations/1122/digits_313d572e_000.java
e873c2d7cebf87489a01b32ee856a895e8e0f500
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,742
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class digits_313d572e_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { digits_313d572e_000 mainClass = new digits_313d572e_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj given = new IntObj (), digit10 = new IntObj (), digit9 = new IntObj (), digit8 = new IntObj (), digit7 = new IntObj (), digit6 = new IntObj (), digit5 = new IntObj (), digit4 = new IntObj (), digit3 = new IntObj (), digit2 = new IntObj (), digit1 = new IntObj (); output += (String.format ("\nEnter an interger > ")); given.value = scanner.nextInt (); if (given.value >= 1 && given.value < 10) { digit10.value = given.value % 10; output += (String.format ("\n%d\nThat's all, have a nice day!\n", digit10.value)); } if (given.value >= 10 && given.value < 100) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; output += (String.format ("\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value)); } if (given.value >= 100 && given.value < 1000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; output += (String.format ("\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value)); } if (given.value >= 1000 && given.value < 10000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value)); } if (given.value >= 10000 && given.value < 100000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value)); } if (given.value >= 100000 && given.value < 1000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value)); } if (given.value >= 1000000 && given.value < 10000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit10.value)); } if (given.value >= 10000000 && given.value < 100000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value)); } if (given.value >= 100000000 && given.value < 1000000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; digit2.value = (given.value / 100000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value, digit2.value)); } if (given.value >= 1000000000 && given.value < 10000000000L) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; digit2.value = (given.value / 100000000) % 10; digit1.value = (given.value / 1000000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value, digit2.value, digit1.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
09d527161802c4040301a645ab58274cf3d1ceef
d6b1aae22b93b19526b276c81a6405c02598e4ad
/src/com/xrtb/tests/TestRanges.java
af086d95c4f805e337ed791a6c83264ac81b1112
[ "Apache-2.0" ]
permissive
aldrinleal/XRTB
66dd4dacd199021c44bc20efdb0780f4c6b8e11a
807b02da6a0435a74b6e777fa4855c8ed2953d31
refs/heads/master
2021-01-18T02:33:06.271302
2016-03-29T15:29:51
2016-03-29T15:29:51
55,517,786
0
0
null
2016-04-05T15:05:14
2016-04-05T15:05:13
null
UTF-8
Java
false
false
5,859
java
package com.xrtb.tests; import static org.junit.Assert.*; import java.io.InputStream; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import com.fasterxml.jackson.databind.node.ObjectNode; import com.xrtb.bidder.Controller; import com.xrtb.bidder.WebCampaign; import com.xrtb.common.Campaign; import com.xrtb.common.Configuration; import com.xrtb.common.HttpPostGet; import com.xrtb.common.Node; import com.xrtb.pojo.BidRequest; /** * Test Geo fencing * @author Ben M. Faul * */ public class TestRanges { /** * Setup the RTB server for the test */ @BeforeClass public static void setup() { try { Config.setup(); Controller.getInstance().deleteCampaign("ben","ben:extended-device"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } @AfterClass public static void stop() { Config.teardown(); } /** * Shut the RTB server down. */ @AfterClass public static void testCleanup() { Config.teardown(); } /** * Test distance calaculations */ @Test public void testLosAngelesToSF() { Number laLat = 34.05; Number laLon = -118.25; Number sfLat = 37.62; Number sfLon = -122.38; double dist = Node.getRange(laLat, laLon, sfLat, sfLon); assertTrue(dist==544720.8629416309); } /** * Test a single geo fence region in an isolated node. * @throws Exception on I/O errors. */ @Test public void testGeoInBidRequest() throws Exception { InputStream is = Configuration.getInputStream("SampleBids/smaato.json"); BidRequest br = new BidRequest(is); assertEquals(br.getId(),"K6t8sXXYdM"); Map m = new HashMap(); m.put("lat", 34.05); m.put("lon",-118.25); m.put("range",600000); List list = new ArrayList(); list.add(m); Node node = new Node("LATLON","device.geo", Node.INRANGE, list); node.test(br); ObjectNode map = (ObjectNode)node.getBRvalue(); assertTrue((Double)map.get("lat").doubleValue()==37.62); assertTrue((Double)map.get("lon").doubleValue()==-122.38); assertTrue((Double)map.get("type").doubleValue()==3); List<Map>test = new ArrayList(); test.add(m); node = new Node("LATLON","device.geo", Node.INRANGE, test); node.test(br); } /** * Test the geo fence on a valid bid request, but not in range * @throws Exception on network errors. */ @Test public void testGeoSingleFenceNotInRange() throws Exception { HttpPostGet http = new HttpPostGet(); String s = Charset .defaultCharset() .decode(ByteBuffer.wrap(Files.readAllBytes(Paths .get("SampleBids/nexage.txt")))).toString(); Map m = new HashMap(); m.put("lat", 34.05); m.put("lon",-118.25); m.put("range",600000); List list = new ArrayList(); list.add(m); Node node = new Node("LATLON","device.geo", Node.INRANGE, list); Campaign camp = Configuration.getInstance().campaignsList.get(0); camp.attributes.add(node); try { s = http.sendPost("http://" + Config.testHost + "/rtb/bids/nexage", s); } catch (Exception error) { fail("Error"); } assertTrue(http.getResponseCode()==204); System.out.println(s); } /** * Test the bid when there is a geo object AND it is in range. * @throws Exception on configuration file errors and on network errors to the biddewr. */ @Test public void testGeoSingleFenceInRange() throws Exception { HttpPostGet http = new HttpPostGet(); String s = Charset .defaultCharset() .decode(ByteBuffer.wrap(Files.readAllBytes(Paths .get("SampleBids/nexage.txt")))).toString(); Map m = new HashMap(); m.put("lat", 42.05); m.put("lon",-71.25); m.put("range",600000); List list = new ArrayList(); list.add(m); Node node = new Node("LATLON","device.geo", Node.INRANGE, list); System.out.println(Configuration.getInstance().getLoadedCampaignNames()); Campaign camp = Configuration.getInstance().campaignsList.get(0); camp.attributes.add(node); BidRequest.compile(); try { s = http.sendPost("http://" + Config.testHost + "/rtb/bids/nexage", s); } catch (Exception error) { fail("Error"); } if (http.getResponseCode() != 204) { System.out.println("########## FUCKED UP: " + s); fail("SHould have resolved"); } assertTrue(http.getResponseCode()==204); System.out.println(s); } /** * Test a valid bid, but geo is not present in bid, and the campaign requires it. * @throws Exception on file errors in the config file and network errors to the bidder. */ @Test public void testGeoSingleFenceInRangeButNoGeoInBR() throws Exception { HttpPostGet http = new HttpPostGet(); String s = Charset .defaultCharset() .decode(ByteBuffer.wrap(Files.readAllBytes(Paths .get("SampleBids/nexageNoGeo.txt")))).toString(); Map m = new HashMap(); m.put("lat", 42.05); m.put("lon",-71.25); m.put("range",600000); List list = new ArrayList(); list.add(m); Node node = new Node("LATLON","device.geo", Node.INRANGE, list); node.notPresentOk = false; System.out.println("------------>" + Configuration.getInstance().getLoadedCampaignNames()); Campaign camp = Configuration.getInstance().campaignsList.get(0); camp.attributes.add(node); try { s = http.sendPost("http://" + Config.testHost + "/rtb/bids/nexage", s); } catch (Exception error) { fail("Error"); } assertTrue(http.getResponseCode()==204); System.out.println(s); } }
[ "ben.faul@gmail.com" ]
ben.faul@gmail.com
f22618988004cac52ef13f0d1a1681600a6ca880
516fb367430d4c1393f4cd726242618eca862bda
/sources/com/google/android/gms/internal/ads/zzew.java
4423abc50316b56990b3df320add3ed6c456906e
[]
no_license
cmFodWx5YWRhdjEyMTA5/Gaana2
75d6d6788e2dac9302cff206a093870e1602921d
8531673a5615bd9183c9a0466325d0270b8a8895
refs/heads/master
2020-07-22T15:46:54.149313
2019-06-19T16:11:11
2019-06-19T16:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,671
java
package com.google.android.gms.internal.ads; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; public class zzew implements IInterface { private final IBinder zzvd; private final String zzve; protected zzew(IBinder iBinder, String str) { this.zzvd = iBinder; this.zzve = str; } public IBinder asBinder() { return this.zzvd; } /* Access modifiers changed, original: protected|final */ public final Parcel obtainAndWriteInterfaceToken() { Parcel obtain = Parcel.obtain(); obtain.writeInterfaceToken(this.zzve); return obtain; } /* Access modifiers changed, original: protected|final */ public final Parcel transactAndReadException(int e, Parcel parcel) throws RemoteException { Parcel obtain = Parcel.obtain(); try { this.zzvd.transact(e, parcel, obtain, 0); obtain.readException(); } catch (RuntimeException e2) { e = e2; throw e; } finally { /* Method generation error in method: com.google.android.gms.internal.ads.zzew.transactAndReadException(int, android.os.Parcel):android.os.Parcel, dex: classes2.dex jadx.core.utils.exceptions.CodegenException: Error generate insn: 0x0018: INVOKE (wrap: android.os.Parcel ?: MERGE (r5_1 android.os.Parcel) = (r5_0 'parcel' android.os.Parcel), (r0_0 'obtain' android.os.Parcel)) android.os.Parcel.recycle():void type: VIRTUAL in method: com.google.android.gms.internal.ads.zzew.transactAndReadException(int, android.os.Parcel):android.os.Parcel, dex: classes2.dex at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:228) at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:205) at jadx.core.codegen.RegionGen.makeSimpleBlock(RegionGen.java:102) at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:52) at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:89) at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:55) at jadx.core.codegen.RegionGen.makeRegionIndent(RegionGen.java:95) at jadx.core.codegen.RegionGen.makeTryCatch(RegionGen.java:300) at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:65) at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:89) at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:55) at jadx.core.codegen.MethodGen.addInstructions(MethodGen.java:183) at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:321) at jadx.core.codegen.ClassGen.addMethods(ClassGen.java:259) at jadx.core.codegen.ClassGen.addClassBody(ClassGen.java:221) at jadx.core.codegen.ClassGen.addClassCode(ClassGen.java:111) at jadx.core.codegen.ClassGen.makeClass(ClassGen.java:77) at jadx.core.codegen.CodeGen.visit(CodeGen.java:10) at jadx.core.ProcessClass.process(ProcessClass.java:38) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200) Caused by: jadx.core.utils.exceptions.CodegenException: Error generate insn: ?: MERGE (r5_1 android.os.Parcel) = (r5_0 'parcel' android.os.Parcel), (r0_0 'obtain' android.os.Parcel) in method: com.google.android.gms.internal.ads.zzew.transactAndReadException(int, android.os.Parcel):android.os.Parcel, dex: classes2.dex at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:228) at jadx.core.codegen.InsnGen.addArg(InsnGen.java:101) at jadx.core.codegen.InsnGen.addArgDot(InsnGen.java:84) at jadx.core.codegen.InsnGen.makeInvoke(InsnGen.java:634) at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:340) at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:222) ... 21 more Caused by: jadx.core.utils.exceptions.CodegenException: MERGE can be used only in fallback mode at jadx.core.codegen.InsnGen.fallbackOnlyInsn(InsnGen.java:539) at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:511) at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:213) ... 26 more */ /* Access modifiers changed, original: protected|final */ public final void zza(int i, Parcel parcel) throws RemoteException { Parcel obtain = Parcel.obtain(); try { this.zzvd.transact(i, parcel, obtain, 0); obtain.readException(); } finally { parcel.recycle(); obtain.recycle(); } } /* Access modifiers changed, original: protected|final */ public final void zzb(int i, Parcel parcel) throws RemoteException { try { this.zzvd.transact(2, parcel, null, 1); } finally { parcel.recycle(); } } }
[ "master@master.com" ]
master@master.com
2698e20c2f4222053ff4578a1c9a62ed6ce58e8c
8229884a9bd15286a34cbd2e7b4624ee158be378
/authrolibrary/src/main/java/com/example/authrolibrary/utils/DialogUtils.java
ad5059363b72319ab348f7f329ed6b6385a1d02c
[]
no_license
chengcdev/smarthome
5ae58bc0ba8770598f83a36355b557c46f37b90c
4edb33dcdfcab39a3bc6e5342a7973ac703f1344
refs/heads/master
2022-12-03T18:04:39.172431
2020-08-20T05:22:57
2020-08-20T05:22:57
288,909,136
1
1
null
null
null
null
UTF-8
Java
false
false
695
java
package com.example.authrolibrary.utils; import android.app.AlertDialog; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import com.example.authrolibrary.R; import com.example.authrolibrary.view.CustomDialog; public class DialogUtils { public AlertDialog loadingDialog(Context context) { CustomDialog customDialog = new CustomDialog(context,0); View view = LayoutInflater.from(context).inflate(R.layout.dialog_loading, null); AlertDialog alertDialog = customDialog.showDialog(view); alertDialog.setCanceledOnTouchOutside(false); alertDialog.setCancelable(false); return alertDialog; } }
[ "1508592785@qq.com" ]
1508592785@qq.com
a2cdb57f3ea08d7da160aa5c5b47824e91c551a8
0ad51dde288a43c8c2216de5aedcd228e93590ac
/com/vmware/converter/ReplicationVmInProgressFault.java
4d8742fd204e00655944c75f8570b0660fa36428
[]
no_license
YujiEda/converter-sdk-java
61c37b2642f3a9305f2d3d5851c788b1f3c2a65f
bcd6e09d019d38b168a9daa1471c8e966222753d
refs/heads/master
2020-04-03T09:33:38.339152
2019-02-11T15:19:04
2019-02-11T15:19:04
155,151,917
0
0
null
null
null
null
UTF-8
Java
false
false
5,933
java
/** * ReplicationVmInProgressFault.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package com.vmware.converter; public class ReplicationVmInProgressFault extends com.vmware.converter.ReplicationVmFault implements java.io.Serializable { private java.lang.String requestedActivity; private java.lang.String inProgressActivity; public ReplicationVmInProgressFault() { } public ReplicationVmInProgressFault( com.vmware.converter.LocalizedMethodFault faultCause, com.vmware.converter.LocalizableMessage[] faultMessage, java.lang.String reason, java.lang.String state, java.lang.String instanceId, com.vmware.converter.ManagedObjectReference vm, java.lang.String requestedActivity, java.lang.String inProgressActivity) { super( faultCause, faultMessage, reason, state, instanceId, vm); this.requestedActivity = requestedActivity; this.inProgressActivity = inProgressActivity; } /** * Gets the requestedActivity value for this ReplicationVmInProgressFault. * * @return requestedActivity */ public java.lang.String getRequestedActivity() { return requestedActivity; } /** * Sets the requestedActivity value for this ReplicationVmInProgressFault. * * @param requestedActivity */ public void setRequestedActivity(java.lang.String requestedActivity) { this.requestedActivity = requestedActivity; } /** * Gets the inProgressActivity value for this ReplicationVmInProgressFault. * * @return inProgressActivity */ public java.lang.String getInProgressActivity() { return inProgressActivity; } /** * Sets the inProgressActivity value for this ReplicationVmInProgressFault. * * @param inProgressActivity */ public void setInProgressActivity(java.lang.String inProgressActivity) { this.inProgressActivity = inProgressActivity; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ReplicationVmInProgressFault)) return false; ReplicationVmInProgressFault other = (ReplicationVmInProgressFault) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = super.equals(obj) && ((this.requestedActivity==null && other.getRequestedActivity()==null) || (this.requestedActivity!=null && this.requestedActivity.equals(other.getRequestedActivity()))) && ((this.inProgressActivity==null && other.getInProgressActivity()==null) || (this.inProgressActivity!=null && this.inProgressActivity.equals(other.getInProgressActivity()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); if (getRequestedActivity() != null) { _hashCode += getRequestedActivity().hashCode(); } if (getInProgressActivity() != null) { _hashCode += getInProgressActivity().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(ReplicationVmInProgressFault.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("urn:vim25", "ReplicationVmInProgressFault")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("requestedActivity"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "requestedActivity")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("inProgressActivity"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "inProgressActivity")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "yuji_eda@dwango.co.jp" ]
yuji_eda@dwango.co.jp
e0adfb8fab30c2ac6f09d22adcb32adf58706b4e
e79bb1a016ec98f45b797234985e036b6157a2eb
/jasdb_acl/src/main/java/com/oberasoftware/jasdb/acl/GrantObjectMeta.java
345cc9382a2fde77147768c497720af7e7be741b
[ "MIT" ]
permissive
oberasoftware/jasdb
a13a3687bcb8fd0af9468778242016640758b04a
15114fc69e53ef57d6f377985a8adc3da5cc90cf
refs/heads/master
2023-06-09T12:21:59.171957
2023-05-23T19:25:22
2023-05-23T19:25:22
33,053,071
33
10
NOASSERTION
2023-04-30T11:54:30
2015-03-28T22:41:15
Java
UTF-8
Java
false
false
3,769
java
package com.oberasoftware.jasdb.acl; import com.oberasoftware.jasdb.api.session.Entity; import com.oberasoftware.jasdb.engine.metadata.Constants; import com.oberasoftware.jasdb.core.EmbeddedEntity; import com.oberasoftware.jasdb.core.SimpleEntity; import com.oberasoftware.jasdb.api.security.AccessMode; import com.oberasoftware.jasdb.api.model.Grant; import com.oberasoftware.jasdb.api.model.GrantObject; import com.oberasoftware.jasdb.core.properties.EntityValue; import com.oberasoftware.jasdb.api.session.Property; import com.oberasoftware.jasdb.api.session.Value; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** * @author Renze de Vries */ public class GrantObjectMeta implements GrantObject { private String objectName; private Map<String, Grant> userGrants; public GrantObjectMeta(String objectName, Map<String, Grant> userGrants) { this.objectName = objectName; this.userGrants = userGrants; } public GrantObjectMeta(String objectName, Grant... grants) { this.objectName = objectName; this.userGrants = new ConcurrentHashMap<>(); for(Grant grant : grants) { userGrants.put(grant.getGrantedUsername(), grant); } } public static GrantObject fromEntity(Entity entity) { String grantObject = entity.getValue(Constants.GRANT_OBJECT).toString(); Map<String, Grant> userGrants = new ConcurrentHashMap<>(); Property grantsProperty = entity.getProperty(Constants.GRANTS); for(Value grantValue : grantsProperty.getValues()) { EntityValue entityValue = (EntityValue) grantValue; String grantUser = entityValue.toEntity().getValue(Constants.GRANT_USER).toString(); String grantMode = entityValue.toEntity().getValue(Constants.GRANT_MODE).toString(); userGrants.put(grantUser, new GrantMeta(grantUser, AccessMode.fromMode(grantMode))); } return new GrantObjectMeta(grantObject, userGrants); } public static SimpleEntity toEntity(GrantObject grantObject) { SimpleEntity entity = new SimpleEntity(); entity.addProperty(Constants.GRANT_OBJECT, grantObject.getObjectName()); for(Grant grant : grantObject.getGrants()) { EmbeddedEntity grantEntity = new EmbeddedEntity(); grantEntity.setProperty(Constants.GRANT_USER, grant.getGrantedUsername()); grantEntity.setProperty(Constants.GRANT_MODE, grant.getAccessMode().getMode()); entity.addEntity(Constants.GRANTS, grantEntity); } return entity; } @Override public String getObjectName() { return objectName; } @Override public void addGrant(Grant grant) { userGrants.put(grant.getGrantedUsername(), grant); } @Override public boolean isGranted(String userName, AccessMode mode) { Grant grant = getGrant(userName); if(grant != null) { //check the the grants for the user has a higher rank than the desired access rank return grant.getAccessMode().getRank() >= mode.getRank(); } else { return false; } } @Override public Grant getGrant(String userName) { return userGrants.get(userName); } @Override public List<Grant> getGrants() { return new ArrayList<>(userGrants.values()); } @Override public void removeGrant(String userName) { userGrants.remove(userName); } @Override public String toString() { return "GrantObjectMeta{" + "objectName='" + objectName + '\'' + ", userGrants=" + userGrants + '}'; } }
[ "renze@renarj.nl" ]
renze@renarj.nl
1c695bbad788db0e7a0e1c6c137ba2077b478d68
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_b8d86330d1fadc645630416c3aaebf131bf749fc/AbstractTagTests/1_b8d86330d1fadc645630416c3aaebf131bf749fc_AbstractTagTests_t.java
9ba07b2f65246551a850e0fe42818e41d8df372c
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,770
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.servlet.tags; import junit.framework.TestCase; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockPageContext; import org.springframework.mock.web.MockServletContext; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.SimpleWebApplicationContext; import org.springframework.web.servlet.ThemeResolver; import org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver; import org.springframework.web.servlet.theme.FixedThemeResolver; /** * Abstract base class for testing tags; provides {@link #createPageContext()}. * * @author Alef Arendsen * @author Juergen Hoeller * @author Sam Brannen */ public abstract class AbstractTagTests extends TestCase { protected MockPageContext createPageContext() { MockServletContext sc = new MockServletContext(); sc.addInitParameter("springJspExpressionSupport", "true"); SimpleWebApplicationContext wac = new SimpleWebApplicationContext(); wac.setServletContext(sc); wac.setNamespace("test"); wac.refresh(); MockHttpServletRequest request = new MockHttpServletRequest(sc); MockHttpServletResponse response = new MockHttpServletResponse(); if (inDispatcherServlet()) { request.setAttribute(DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE, wac); LocaleResolver lr = new AcceptHeaderLocaleResolver(); request.setAttribute(DispatcherServlet.LOCALE_RESOLVER_ATTRIBUTE, lr); ThemeResolver tr = new FixedThemeResolver(); request.setAttribute(DispatcherServlet.THEME_RESOLVER_ATTRIBUTE, tr); request.setAttribute(DispatcherServlet.THEME_SOURCE_ATTRIBUTE, wac); } else { sc.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, wac); } return new MockPageContext(sc, request, response); } protected boolean inDispatcherServlet() { return true; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5a63a018795c886bbddb8197b88edddd9a0b6d1b
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-700-Files/boiler-To-Generate-700-Files/syncregions-700Files/TemperatureController259.java
e446ff82fe18d4682042ec2ee22d6e43a6974738
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
370
java
package syncregions; public class TemperatureController259 { public execute(int temperature259, int targetTemperature259) { //sync _bfpnFUbFEeqXnfGWlV2259, behaviour LastTestif(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
c2495377fb4ab7619be48e0da23460687deb4725
c885ef92397be9d54b87741f01557f61d3f794f3
/results/JacksonDatabind-110/com.fasterxml.jackson.databind.deser.impl.JavaUtilCollectionsDeserializers/BBC-F0-opt-30/tests/8/com/fasterxml/jackson/databind/deser/impl/JavaUtilCollectionsDeserializers_ESTest.java
3bf57d72cb654e9702436d78e7e3e599c99ca55a
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
4,415
java
/* * This file was automatically generated by EvoSuite * Wed Oct 13 18:45:47 GMT 2021 */ package com.fasterxml.jackson.databind.deser.impl; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.cfg.DeserializerFactoryConfig; import com.fasterxml.jackson.databind.deser.BeanDeserializerFactory; import com.fasterxml.jackson.databind.deser.DefaultDeserializationContext; import com.fasterxml.jackson.databind.deser.impl.JavaUtilCollectionsDeserializers; import com.fasterxml.jackson.databind.type.CollectionType; import com.fasterxml.jackson.databind.type.TypeFactory; import java.util.LinkedHashSet; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class JavaUtilCollectionsDeserializers_ESTest extends JavaUtilCollectionsDeserializers_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { ObjectMapper objectMapper0 = new ObjectMapper(); DeserializationContext deserializationContext0 = objectMapper0.getDeserializationContext(); // Undeclared exception! try { JavaUtilCollectionsDeserializers.findForMap(deserializationContext0, (JavaType) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.impl.JavaUtilCollectionsDeserializers", e); } } @Test(timeout = 4000) public void test1() throws Throwable { BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance; DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); // Undeclared exception! try { JavaUtilCollectionsDeserializers.findForCollection(defaultDeserializationContext_Impl0, (JavaType) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.impl.JavaUtilCollectionsDeserializers", e); } } @Test(timeout = 4000) public void test2() throws Throwable { DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig(); BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0); DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); TypeFactory typeFactory0 = TypeFactory.defaultInstance(); Class<LinkedHashSet> class0 = LinkedHashSet.class; CollectionType collectionType0 = typeFactory0.constructCollectionType(class0, class0); JsonDeserializer<?> jsonDeserializer0 = JavaUtilCollectionsDeserializers.findForMap(defaultDeserializationContext_Impl0, collectionType0); assertNull(jsonDeserializer0); } @Test(timeout = 4000) public void test3() throws Throwable { DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig(); BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0); DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); TypeFactory typeFactory0 = TypeFactory.defaultInstance(); Class<LinkedHashSet> class0 = LinkedHashSet.class; CollectionType collectionType0 = typeFactory0.constructCollectionType(class0, class0); JsonDeserializer<?> jsonDeserializer0 = JavaUtilCollectionsDeserializers.findForCollection(defaultDeserializationContext_Impl0, collectionType0); assertNull(jsonDeserializer0); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
37928570021f9aa9dec2da064883780d361394fb
cc4e954a2fce90a835b648d5cb5a61097837749f
/projectlibre/openproj_core/src/com/projity/field/ObjectRef.java
ff8479b71b73f8cc63495f22074fdde07474e44a
[]
no_license
vmazurashu/lp-pl-integration
dc9cac67e12e85540ce5e4dffe5e73f414cf13b4
f1eff6232a36a895b48d4cd6486aca822dab9ea2
refs/heads/master
2020-04-08T23:22:14.044103
2018-11-30T12:42:20
2018-11-30T12:42:20
159,821,841
0
0
null
null
null
null
UTF-8
Java
false
false
3,562
java
/* The contents of this file are subject to the Common Public Attribution License Version 1.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.projity.com/license . The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B. Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is OpenProj. The Original Developer is the Initial Developer and is Projity, Inc. All portions of the code written by Projity are Copyright (c) 2006, 2007. All Rights Reserved. Contributors Projity, Inc. Alternatively, the contents of this file may be used under the terms of the Projity End-User License Agreeement (the Projity License), in which case the provisions of the Projity License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the Projity License and not to allow others to use your version of this file under the CPAL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the Projity License. If you do not delete the provisions above, a recipient may use your version of this file under either the CPAL or the Projity License. [NOTE: The text of this license may differ slightly from the text of the notices in Exhibits A and B of the license at http://www.projity.com/license. You should use the latest text at http://www.projity.com/license for your modifications. You may not remove this license text from the source files.] Attribution Information: Attribution Copyright Notice: Copyright (c) 2006, 2007 Projity, Inc. Attribution Phrase (not exceeding 10 words): Powered by OpenProj, an open source solution from Projity. Attribution URL: http://www.projity.com Graphic Image as provided in the Covered Code as file: openproj_logo.png with alternatives listed on http://www.projity.com/logo Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work which combines Covered Code or portions thereof with code not governed by the terms of the CPAL. However, in addition to the other notice obligations, all copies of the Covered Code in Executable and Source Code form distributed must, as a form of attribution of the original author, include on each user interface screen the "OpenProj" logo visible to all users. The OpenProj logo should be located horizontally aligned with the menu bar and left justified on the top left of the screen adjacent to the File menu. The logo must be at least 100 x 25 pixels. When users click on the "OpenProj" logo it must direct them back to http://www.projity.com. */ package com.projity.field; import java.util.Collection; import com.projity.grouping.core.Node; import com.projity.grouping.core.model.NodeModelDataFactory; import com.projity.grouping.core.model.WalkersNodeModel; /** * */ public interface ObjectRef { public Node getNode(); public WalkersNodeModel getNodeModel(); public Object getObject(); Collection getCollection(); public NodeModelDataFactory getDataFactory(); }
[ "mazurashuvadim@gmail.com" ]
mazurashuvadim@gmail.com
34ae616e50994846750d5146a40302a764796fb2
1a814c6e1e29c9616584b87767c04e949e64fa00
/logginghub-connector/src/main/java/com/logginghub/connector/log4j/Log4jDetailsSnapshot.java
40ecbae809b67627ea4c9f4dd42884e47e5a981b
[]
no_license
logginghub/alternativeclient
18c59e5b72ebe220782b83abf783701add362f92
eddd22bcf011326ed1447e9ce633ad024802f75b
refs/heads/master
2021-01-18T14:05:23.139076
2014-07-09T09:32:25
2014-07-09T09:32:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,356
java
package com.logginghub.connector.log4j; import java.util.Hashtable; import org.apache.log4j.MDC; import org.apache.log4j.NDC; import org.apache.log4j.spi.LocationInfo; import org.apache.log4j.spi.LoggingEvent; import com.logginghub.utils.TimeProvider; /** * Captures some aspects of the log events so we can dispatch them * correctly later on. * * @author James * */ public class Log4jDetailsSnapshot { private String className; private String fileName; private String lineNumber; private String methodName; private String threadName; private LoggingEvent loggingEvent; // Diagnostic contexts from log4j. Should we generalise them here? private String ndc; private Hashtable<String, Object> mdc; private long timestamp; @SuppressWarnings("unchecked") public static Log4jDetailsSnapshot fromLoggingEvent(LoggingEvent loggingEvent, TimeProvider timeProvider) { Log4jDetailsSnapshot snapshot = new Log4jDetailsSnapshot(); LocationInfo locationInformation = loggingEvent.getLocationInformation(); snapshot.className = locationInformation.getClassName(); snapshot.fileName = locationInformation.getFileName(); snapshot.lineNumber = locationInformation.getLineNumber(); snapshot.methodName = locationInformation.getMethodName(); snapshot.threadName = loggingEvent.getThreadName(); snapshot.loggingEvent = loggingEvent; snapshot.mdc = MDC.getContext(); snapshot.ndc = NDC.get(); if (timeProvider != null) { snapshot.timestamp = timeProvider.getTime(); } else { snapshot.timestamp = loggingEvent.timeStamp; } return snapshot; } public long getTimestamp() { return timestamp; } public Hashtable<String, Object> getMdc() { return mdc; } public String getNdc() { return ndc; } public LoggingEvent getLoggingEvent() { return loggingEvent; } public String getClassName() { return className; } public String getFileName() { return fileName; } public String getMethodName() { return methodName; } public String getLineNumber() { return lineNumber; } public String getThreadName() { return threadName; } }
[ "james@vertexlabs.co.uk" ]
james@vertexlabs.co.uk
a913f8dcbb97e1953d030488f151c7f2e913dfd0
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/polardbx-20200202/src/main/java/com/aliyun/polardbx20200202/models/DescribeDBInstanceHAResponse.java
4b1c15ad8d0cd4984e13df761acf8458206be23f
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,422
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.polardbx20200202.models; import com.aliyun.tea.*; public class DescribeDBInstanceHAResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public DescribeDBInstanceHAResponseBody body; public static DescribeDBInstanceHAResponse build(java.util.Map<String, ?> map) throws Exception { DescribeDBInstanceHAResponse self = new DescribeDBInstanceHAResponse(); return TeaModel.build(map, self); } public DescribeDBInstanceHAResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public DescribeDBInstanceHAResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public DescribeDBInstanceHAResponse setBody(DescribeDBInstanceHAResponseBody body) { this.body = body; return this; } public DescribeDBInstanceHAResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
36bdb4d9b089fc411cca0c684565733ce699b613
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a042/A042346.java
5f975929197ecc9487467d704f460532742b693d
[]
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
586
java
package irvine.oeis.a042; // Generated by gen_seq4.pl cfsqnum 700 at 2019-07-04 11:03 // DO NOT EDIT here! import irvine.oeis.ContinuedFractionOfSqrtSequence; import irvine.math.z.Z; /** * A042346 Numerators of continued fraction convergents to <code>sqrt(700)</code>. * @author Georg Fischer */ public class A042346 extends ContinuedFractionOfSqrtSequence { /** Construct the sequence. */ public A042346() { super(0, 700); } @Override public Z next() { final Z result = getNumerator(); iterate(); iterateConvergents(); return result; } // next }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
ddd527cfee422d87e42f41cda665362758ac62a5
bccb412254b3e6f35a5c4dd227f440ecbbb60db9
/hl7/model/V2_5/table/Table0533.java
30a3608c5787cd16dde6dc2afadad2c19f93df19
[]
no_license
nlp-lap/Version_Compatible_HL7_Parser
8bdb307aa75a5317265f730c5b2ac92ae430962b
9977e1fcd1400916efc4aa161588beae81900cfd
refs/heads/master
2021-03-03T15:05:36.071491
2020-03-09T07:54:42
2020-03-09T07:54:42
245,967,680
0
0
null
null
null
null
UTF-8
Java
false
false
347
java
package hl7.model.V2_5.table; import hl7.bean.table.Table; public class Table0533 extends Table{ private static final String VERSION = "2.5"; public static Table getInstance(){ if(table==null) new Table0533(); return table; } private Table0533(){ setTableName("Application error code"); setOID("2.16.840.1.113883.12.533"); } }
[ "terminator800@hanmail.net" ]
terminator800@hanmail.net
261b445872e09c73a536b264fc34625523fa9245
32327616977813f087b8f61b513fb628b0a9cd7b
/testsuite/src/main/java/com/blazebit/security/test/EjbAwareThrowableProcessingInterceptor.java
09b79ddb3570147c998046542436b30fb7225d2a
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Blazebit/blaze-security
83c8002da274b8b5e00883da68261bc5a7a355ed
07e3a58a9837923e6ee32e7f1644f17dc2013c8a
refs/heads/master
2023-09-01T01:00:16.351718
2014-07-12T11:07:14
2014-07-12T11:07:14
10,057,642
1
0
null
null
null
null
UTF-8
Java
false
false
1,163
java
/** * */ package com.blazebit.security.test; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import javax.ejb.EJBException; import com.blazebit.exception.ExceptionUtils; import com.googlecode.catchexception.throwable.internal.ThrowableProcessingInterceptor; /** * @author Christian Beikov <c.beikov@curecomp.com> * @company curecomp * @date 05.12.2013 */ public class EjbAwareThrowableProcessingInterceptor<E extends Throwable> extends ThrowableProcessingInterceptor<E> { @SuppressWarnings("unchecked") private static final Class<? extends Throwable>[] UNWRAPS = (Class<? extends Throwable>[]) new Class<?>[]{InvocationTargetException.class, EJBException.class}; /** * @param target * @param clazz * @param assertThrowable */ public EjbAwareThrowableProcessingInterceptor(Object target, Class<E> clazz) { super(target, clazz, true); } @Override protected Object afterInvocationThrowsThrowable(Throwable e, Method method) throws Error, Throwable { return super.afterInvocationThrowsThrowable(ExceptionUtils.unwrap(e, UNWRAPS), method); } }
[ "christian.beikov@gmail.com" ]
christian.beikov@gmail.com
bfa4364ad64db34072d1eb35e6deeb26a12ead69
34b9e07759f74da99763a2617e5ae1b9c88957c8
/server/src/main/java/info/xiaomo/server/back/BackMessagePool.java
d0e0cbf658a72837a78bf916e6559a077edd820f
[ "Apache-2.0" ]
permissive
yj173055792/GameServer
c6c0925dda4f3b10a55ec56e678e104df7d81ae4
1d3fdb0db0cf882422ae18997d95e44f3a31dd59
refs/heads/master
2021-01-20T13:03:29.839398
2017-08-24T12:40:25
2017-08-24T12:40:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,429
java
package info.xiaomo.server.back; import info.xiaomo.gameCore.protocol.Message; import info.xiaomo.gameCore.protocol.MessagePool; import info.xiaomo.server.protocol.message.gm.ReqCloseServerMessage; import java.util.HashMap; import java.util.Map; /** * 把今天最好的表现当作明天最新的起点..~ * いま 最高の表現 として 明日最新の始発..~ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * <p> * author: xiaomo * github: https://github.com/xiaomoinfo * email : xiaomo@xiaomo.info * QQ : 83387856 * Date : 2017/7/11 16:00 * desc : * Copyright(©) 2017 by xiaomo. */ public class BackMessagePool implements MessagePool { // 消息类字典 private final Map<Integer, Class<? extends Message>> messages = new HashMap<>(); public BackMessagePool() { register(new ReqCloseServerMessage().getId(),ReqCloseServerMessage.class); } @Override public Message getMessage(int messageId) { Class<?> clazz = messages.get(messageId); if (clazz != null) { try { return (Message) clazz.newInstance(); } catch (Exception e) { return null; } } return null; } @Override public void register(int messageId, Class<? extends Message> messageClazz) { messages.put(messageId, messageClazz); } }
[ "xiaomo@xiaomo.info" ]
xiaomo@xiaomo.info
c394f216eb255ff3973482712af77636122dd4c2
911e3206a2f1bc5357d4b3a263a86fbb52633a30
/src/main/java/mokitotest2/TestRunner.java
eb4013fda5956bc5c1ab3db50722e88a6c705353
[]
no_license
gfengster/mockito-tutorial
629dcd38dda558ed3be62f9009be1a02ca1e2813
6dd742485ff13d9010dfc1630291069a47a61afb
refs/heads/master
2021-01-09T09:46:13.051520
2020-02-25T21:41:04
2020-02-25T21:41:04
242,255,613
0
0
null
null
null
null
UTF-8
Java
false
false
460
java
package mokitotest2; import org.junit.runner.JUnitCore; import org.junit.runner.Result; import org.junit.runner.notification.Failure; public class TestRunner { public static void main(String[] args) { Result result = JUnitCore.runClasses(MathApplicationTester.class); for (Failure failure : result.getFailures()) { System.out.println(failure.toString()); } System.out.println(result.wasSuccessful()); } }
[ "abc@gmail.com" ]
abc@gmail.com
dd3da0b66130eb862c300139054af970e0263d5c
37992a7083efea148c66381a2e7c988f59de712b
/cppk/app/src/main/java/ru/ppr/cppk/settings/SetControlDetailActivity.java
92e807ff2ece79a24074fa3f4749f0615d04439a
[]
no_license
RVC3/PTK
5ab897d6abee1f7f7be3ba49c893b97e719085e9
1052b2bfa8f565c96a85d5c5928ed6c938a20543
refs/heads/master
2022-12-22T22:11:40.231298
2020-07-01T09:45:38
2020-07-01T09:45:38
259,278,530
0
0
null
null
null
null
UTF-8
Java
false
false
1,498
java
package ru.ppr.cppk.settings; import android.app.Fragment; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.widget.TextView; import ru.ppr.cppk.R; import ru.ppr.cppk.di.Dagger; import ru.ppr.cppk.entity.settings.PrivateSettings; import ru.ppr.cppk.settings.AdditionalSettingsFragments.SellAndControlFragment; import ru.ppr.cppk.systembar.SystemBarActivity; /** * Activity для окна настроек категории поезда контроля или маршрута трансфера */ public class SetControlDetailActivity extends SystemBarActivity { private TextView title; private PrivateSettings privateSettings; public static Intent getNewIntent(Context context) { return new Intent(context, SetControlDetailActivity.class); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_set_control_detail); privateSettings = Dagger.appComponent().privateSettings(); title = (TextView) findViewById(R.id.title); title.setText(privateSettings.isTransferControlMode() ? R.string.settings_control_detail_transfer_route : R.string.settings_control_detail_train_category); Fragment sellAndControlFragment = SellAndControlFragment.newInstance(false, true); getFragmentManager().beginTransaction().add(R.id.container, sellAndControlFragment).commit(); } }
[ "kopanevartem@mail.ru" ]
kopanevartem@mail.ru
fa38823f532498e98931620a226ddb73e3f35c1b
1bc4fdb18fb32be2485e19a19b23cd5f1f5d7c4d
/src/main/java/io/changsoft/customers/config/FeignConfiguration.java
a6bb11fd3f6ed2ef59d9493c23c66b9d2de81811
[]
no_license
chang-ngeno/customers-one-on-one
e7b7bdce6619c9a7b128d41fbb2c41be8a96c677
d7f1383053a76c3587575cadb8ebd817301c82e3
refs/heads/main
2023-05-14T12:21:53.125314
2021-06-04T00:47:27
2021-06-04T00:47:27
373,680,243
0
0
null
null
null
null
UTF-8
Java
false
false
681
java
package io.changsoft.customers.config; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.FeignClientsConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @Configuration @EnableFeignClients(basePackages = "io.changsoft.customers") @Import(FeignClientsConfiguration.class) public class FeignConfiguration { /** * Set the Feign specific log level to log client REST requests. */ @Bean feign.Logger.Level feignLoggerLevel() { return feign.Logger.Level.BASIC; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
78b58bb0d85595f01fccf60ed12c0d2d53e64574
0fa6047ea37f3bf407b6a9876674e0504f448f66
/workspace/school/src/com/school/step13/ThreadMain.java
26c5625150d432c9f61e8139feaf7164c1ec8f72
[]
no_license
durtchrt/basic_study
ed4a29394b3013133b5cbb540905810e4bc37c66
30fd855eb997aa489812b0b5283addc685ead672
refs/heads/master
2021-01-21T15:31:07.344413
2015-06-13T08:36:39
2015-06-13T08:36:39
95,392,085
0
0
null
2017-06-25T23:47:47
2017-06-25T23:47:47
null
UTF-8
Java
false
false
270
java
package com.school.step13; public class ThreadMain { public static void main(String[] args) { Thread mp3Thread = new Thread(new Mp3Runnable()); Thread timeThread = new Thread(new TimeRunnable()); mp3Thread.start(); timeThread.start(); mp3Thread.run(); } }
[ "boojongmin@gmail.com" ]
boojongmin@gmail.com
b3c1616600a1d1d50ba3fb99baf53c6edba77344
bfc7a4cda00a0b89d4b984c83976770b0523f7f5
/OA/JavaSource/com/icss/oa/filetransfer/handler/AttachHelper.java
accd309901af7c5b8a73d95cbaf986957ee21894
[]
no_license
liveqmock/oa
100c4a554c99cabe0c3f9af7a1ab5629dcb697a6
0dfbb239210d4187e46a933661a031dba2711459
refs/heads/master
2021-01-18T05:02:00.704337
2015-03-03T06:47:30
2015-03-03T06:47:30
35,557,095
0
1
null
2015-05-13T15:26:06
2015-05-13T15:26:06
null
UTF-8
Java
false
false
817
java
/* * Created on 2004-5-10 * * To change the template for this generated file go to * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments */ package com.icss.oa.filetransfer.handler; import com.icss.oa.util.CommUtil; /** * @author Administrator * * To change the template for this generated type comment go to * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments */ public class AttachHelper { public static String getFileSize(long size) { StringBuffer filesize = new StringBuffer(); if (size == 0) { filesize.append("0.0 MB"); } else if (size < 10240) { filesize.append("< 0.01 MB"); } else { filesize.append(CommUtil.getDivision(size, 1024 * 1024, 2)); filesize.append(" MB"); } return filesize.toString(); } }
[ "peijn1026@gmail.com" ]
peijn1026@gmail.com
162a31cc1cc7569392eb44ff93cc40e8224f76de
4e9f55726330c262c2d9e36975ab981e722ec32a
/app/src/main/java/in/semicolonindia/parentcrm/beans/SyllabusNames.java
aabd2c94dc8155448327f848e3b79de54b47660a
[]
no_license
ranjansingh1991/ParentCRM
77cbc4ccf1c199a1419b771611307774f2b375aa
7f3304484b9b92c4db9b848acedcb7b2abdf7d04
refs/heads/master
2020-04-28T00:39:58.453073
2019-03-10T13:04:51
2019-03-10T13:04:51
174,824,306
0
0
null
null
null
null
UTF-8
Java
false
false
1,574
java
package in.semicolonindia.parentcrm.beans; /** * Created by Rupesh on 06-08-2017. */ @SuppressWarnings("ALL") public class SyllabusNames { private String sTitle; private String sSubject; private String sUploader; private String sDate; private String sFile; private String sDesp; public SyllabusNames(String sTitle, String subject_name, String uploader_type, String year, String file_name, String description) { this.sTitle = sTitle; this.sSubject = subject_name; this.sUploader = uploader_type; this.sDate = year; this.sFile = file_name; this.sDesp = description; } public SyllabusNames(String title) { } public String getTitle() { return sTitle; } public void setTitle(String sTitle) { this.sTitle = sTitle; } public String getSubject() { return sSubject; } public void setSubject(String sSubject) { this.sSubject = sSubject; } public String getUploader() { return sUploader; } public void setUploader(String sClass) { this.sUploader = sClass; } public String getDate() { return sDate; } public void setDate(String sDate) { this.sDate = sDate; } public String getFile() { return sFile; } public void setFile(String sFile) { this.sFile = sFile; } public String getDesp() { return sDesp; } public void setDesp(String sDesp) { this.sDesp = sDesp; } }
[ "ranjansingh1991" ]
ranjansingh1991
0df93f14f14f9c1a76560668fc145169edd62973
6f73a0d38addee468dd21aba1d5d53963be84825
/common/src/main/java/org/mifos/framework/persistence/SqlExecutor.java
bc54b49fe40986d6d4c8ce9a5c0e6254b23aed14
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
mifos/1.4.x
0f157f74220e8e65cc13c4252bf597c80aade1fb
0540a4b398407b9415feca1f84b6533126d96511
refs/heads/master
2020-12-25T19:26:15.934566
2010-05-11T23:34:08
2010-05-11T23:34:08
2,946,607
0
0
null
null
null
null
UTF-8
Java
false
false
4,716
java
/* * Copyright (c) 2005-2009 Grameen Foundation USA * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. * * See also http://www.apache.org/licenses/LICENSE-2.0.html for an * explanation of the license and how it is applied. */ package org.mifos.framework.persistence; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; /** * Utility methods for running SQL from files */ @SuppressWarnings( { "PMD.CyclomaticComplexity", "PMD.AssignmentInOperand", "PMD.AppendCharacterWithChar", "PMD.AvoidThrowingRawExceptionTypes", "PMD.DoNotThrowExceptionInFinally" }) public class SqlExecutor { @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = { "OBL_UNSATISFIED_OBLIGATION", "SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" }, justification = "The resource is closed and the string cannot be static.") @SuppressWarnings("PMD.CloseResource") // Rationale: It's closed. public static void execute(InputStream stream, Connection conn) throws SQLException { String[] sqls = readFile(stream); boolean wasAutoCommit = conn.getAutoCommit(); // Entring: Set auto commit false if auto commit was true if (wasAutoCommit) { conn.setAutoCommit(false); } Statement statement = conn.createStatement(); for (String sql : sqls) { statement.addBatch(sql); } statement.executeBatch(); statement.close(); // Leaving: Set auto commit true if auto commit was true if (wasAutoCommit) { conn.commit(); conn.setAutoCommit(true); } } /** * Closes the stream when done. * * @return individual statements * */ @SuppressWarnings( { "PMD.CyclomaticComplexity", "PMD.AssignmentInOperand", "PMD.AppendCharacterWithChar", "PMD.AvoidThrowingRawExceptionTypes", "PMD.DoNotThrowExceptionInFinally" }) // Rationale: If the Apache Ant team thinks it's OK, we do too. Perhaps bad // reasoning, but inshallah. public static String[] readFile(InputStream stream) { // mostly ripped from // http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java try { ArrayList<String> statements = new ArrayList<String>(); Charset utf8 = Charset.forName("UTF-8"); CharsetDecoder decoder = utf8.newDecoder(); BufferedReader in = new BufferedReader(new InputStreamReader(stream, decoder)); StringBuffer sql = new StringBuffer(); String line; while ((line = in.readLine()) != null) { if (line.startsWith("//") || line.startsWith("--")) { continue; } line = line.trim(); if ("".equals(line)) { continue; } sql.append("\n"); sql.append(line); // SQL defines "--" as a comment to EOL // and in Oracle it may contain a hint // so we cannot just remove it, instead we must end it if (line.indexOf("--") >= 0) { sql.append("\n"); } if (sql.length() > 0 && sql.charAt(sql.length() - 1) == ';') { statements.add(sql.substring(0, sql.length() - 1)); sql.setLength(0); } } // Catch any statements not followed by ; if (sql.length() > 0) { statements.add(sql.toString()); } return statements.toArray(new String[statements.size()]); } catch (IOException e) { throw new RuntimeException(e); } finally { try { stream.close(); } catch (IOException e) { throw new RuntimeException(e); } } } }
[ "meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4" ]
meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4
5bc0e8f8f1f4a7f72ca936074de11fc3dde5bdb6
9bb5c8ae2c8ec8e2fd38d43ef07c8772edb706e9
/app/src/main/java/com/soft/apk008/aw.java
b558cce527228dcd7ca7d45eaade218840fea15f
[]
no_license
yucz/008xposed
0be57784b681b4495db224b9c509bcf5f6b08d38
3777608796054e389e30c9b543a2a1ac888f0a68
refs/heads/master
2021-05-11T14:32:57.902655
2017-09-29T16:57:34
2017-09-29T16:57:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
869
java
package com.soft.apk008; import com.lishu.c.a; final class aw extends Thread { aw(LoadActivity paramLoadActivity) {} public final void run() { try { Thread.sleep(500L); LoadActivity localLoadActivity = this.a; if (LoadActivity.a()) { a.b(this.a, "连接服务器失败,请重新,如果还不行,请联系客服或者到官网下载新版本 【" + LoadActivity.c(this.a) + "】"); return; } } catch (InterruptedException localInterruptedException) { for (;;) { localInterruptedException.printStackTrace(); } this.a.runOnUiThread(new ax(this)); } } } /* Location: D:\AndroidKiller_v1.3.1\projects\008\ProjectSrc\smali\ * Qualified Name: com.soft.apk008.aw * JD-Core Version: 0.7.0.1 */
[ "3450559631@qq.com" ]
3450559631@qq.com
069c8e1714e5fa1c0b369eff8795974e8ce7e59b
fcb80b1e3b1501652ca03f03b7611ec05f79d4f1
/test-junit5/src/test/java/io/micronaut/test/junit5/MathServiceTest.java
e84d8180975bff1228a9fb423cc6cb0fa278255e
[ "Apache-2.0" ]
permissive
rmpestano/micronaut-test
39b2095773112377144fe741f274f671f26b3f8c
27db5a7c6ba3c06eb04586cfbe8651b84bf674e9
refs/heads/master
2022-04-19T21:09:03.163392
2020-04-17T14:41:21
2020-04-17T17:40:16
256,528,111
0
0
Apache-2.0
2020-04-17T14:38:38
2020-04-17T14:38:37
null
UTF-8
Java
false
false
640
java
package io.micronaut.test.junit5; import io.micronaut.test.annotation.MicronautTest; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; import javax.inject.Inject; @MicronautTest // <1> class MathServiceTest { @Inject MathService mathService; // <2> @ParameterizedTest @CsvSource({"2,8", "3,12"}) void testComputeNumToSquare(Integer num, Integer square) { final Integer result = mathService.compute(num); // <3> Assertions.assertEquals( square, result ); } }
[ "graeme.rocher@gmail.com" ]
graeme.rocher@gmail.com
cdd19b734eec27330e44d55386d1b630bea195c4
952789d549bf98b84ffc02cb895f38c95b85e12c
/V_2.x/Server/trunk/SpagoBIProject/src/it/eng/spagobi/services/security/stub/SecurityServiceSoapBindingImpl.java
c78c0592afdfc9cb1171ee614a1f782d67d79612
[]
no_license
emtee40/testingazuan
de6342378258fcd4e7cbb3133bb7eed0ebfebeee
f3bd91014e1b43f2538194a5eb4e92081d2ac3ae
refs/heads/master
2020-03-26T08:42:50.873491
2015-01-09T16:17:08
2015-01-09T16:17:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,183
java
/** * SecurityServiceSoapBindingImpl.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package it.eng.spagobi.services.security.stub; import it.eng.spagobi.services.security.service.SecurityServiceImpl; public class SecurityServiceSoapBindingImpl implements it.eng.spagobi.services.security.stub.SecurityService{ public it.eng.spagobi.services.security.bo.SpagoBIUserProfile getUserProfile(java.lang.String in0, java.lang.String in1) throws java.rmi.RemoteException { SecurityServiceImpl impl=new SecurityServiceImpl(); return impl.getUserProfile(in0,in1); } public boolean isAuthorized(java.lang.String in0, java.lang.String in1, java.lang.String in2, java.lang.String in3) throws java.rmi.RemoteException { SecurityServiceImpl impl=new SecurityServiceImpl(); return impl.isAuthorized(in0,in1,in2,in3); } public boolean checkAuthorization(java.lang.String in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException { SecurityServiceImpl impl=new SecurityServiceImpl(); return impl.checkAuthorization(in0,in1,in2); } }
[ "zerbetto@99afaf0d-6903-0410-885a-c66a8bbb5f81" ]
zerbetto@99afaf0d-6903-0410-885a-c66a8bbb5f81
d48e5c7499d740a1e5fd3b06be7fce38d528e2d2
35972adfc08227ad096a4649393ec3260a090498
/Java_exe_2018/src/kr/co/infopub/chap044/NumberAn44.java
e357488e15c6634104f53fb7fcf26c39925e5520
[]
no_license
s-jinipark/test_prog
97dafbaf4dc4961f1a357a6cfc7b97161b6100ac
36de9fe9a593056031cf417e44b87cd0ae214897
refs/heads/master
2022-12-25T05:06:11.533039
2020-06-21T15:17:41
2020-06-21T15:17:41
139,150,010
0
0
null
2022-12-16T03:49:23
2018-06-29T13:00:40
Java
UHC
Java
false
false
1,085
java
package kr.co.infopub.chap044; import kr.co.infopub.chap043.ScannerInput; public class NumberAn44 { public static void main(String[] args) { int toNum=10; try{ toNum=ScannerInput.readInt(); }catch(Exception e){ System.out.println("예외: 타입확인 요망"+e); System.exit(1);//프로그램 끝 } int sum=sumAn(toNum,1,2,true); System.out.println("sum = "+sum); int sum2=sumAn(toNum,1,2,false); System.out.println("sum = "+sum2); } public static int numAn(int start, int n, int d){ return (start+n*d); } public static int posiNega(int start, int n, int d){ int oper=(n%2)==0?-1:1; return oper*numAn(start,n,d); } public static int posiNega(int start, int n, int d, boolean isEvenNega){ int oper=isEvenNega?1:-1; return oper*posiNega(start,n,d); } public static int sumAn(int n,int start, int d,boolean isEvenNega){ int sum=0; for( int i=0; i<n;i++){ System.out.print("["+posiNega(start,i,d,isEvenNega)+"] "); sum+=posiNega(start,i,d,isEvenNega); } return sum; } }
[ "33948283+s-jinipark@users.noreply.github.com" ]
33948283+s-jinipark@users.noreply.github.com
4b4c4dfa3f852db647dd97bebea088f1dbc887f9
95091380a1271516ef5758768a15e1345de75ef1
/src/org/omg/IOP/CodecPackage/TypeMismatch.java
a9370e293dcfe78243d25d354ea8b5b5490c8aa0
[]
no_license
auun/jdk-source-learning
575c52b5b2fddb2451eea7b26356513d3e6adf0e
0a48a0ce87d08835bd9c93c0e957a3f3e354ef1c
refs/heads/master
2020-07-20T21:55:15.886061
2019-09-06T06:06:56
2019-09-06T06:06:56
206,714,837
0
0
null
null
null
null
UTF-8
Java
false
false
593
java
package org.omg.IOP.CodecPackage; /** * org/omg/IOP/CodecPackage/TypeMismatch.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from /build/java8-openjdk/src/jdk8u-jdk8u222-b05/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl * Tuesday, June 18, 2019 10:26:12 AM CEST */ public final class TypeMismatch extends org.omg.CORBA.UserException { public TypeMismatch () { super(TypeMismatchHelper.id()); } // ctor public TypeMismatch (String $reason) { super(TypeMismatchHelper.id() + " " + $reason); } // ctor } // class TypeMismatch
[ "guanglaihe@gmail.com" ]
guanglaihe@gmail.com
2e2d05f39e92f869079928fe5c01d8ac9142290e
3a0a51add2930bb96b8b6ea2cd76a4fe47cda032
/experiments/subjects/jfreechart/src/test/java/org/jfree/chart/renderer/xy/HighLowRendererTest.java
57685ad6355a0cd26a5937628d153b4a20907ff5
[ "MIT", "GPL-3.0-only", "LGPL-3.0-only", "LGPL-2.0-or-later", "LGPL-2.1-or-later", "LGPL-2.1-only" ]
permissive
soneyahossain/hcc-gap-recommender
d313efb6b44ade04ef02e668ee06d29ae2fbb002
b2c79532d5246c8b52e2234f99dc62a26b3f364b
refs/heads/main
2023-04-14T08:11:22.986933
2023-01-27T00:01:09
2023-01-27T00:01:09
589,493,747
5
1
MIT
2023-03-16T15:41:47
2023-01-16T08:53:46
Java
UTF-8
Java
false
false
6,036
java
/* =========================================================== * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * * (C) Copyright 2000-2016, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners.] * * ------------------------ * HighLowRendererTest.java * ------------------------ * (C) Copyright 2003-2016, by Object Refinery Limited and Contributors. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; * * Changes * ------- * 25-Mar-2003 : Version 1 (DG); * 22-Oct-2003 : Added hashCode test (DG); * 01-Nov-2005 : Added tests for new fields (DG); * 17-Aug-2006 : Added testFindRangeBounds() method (DG); * 22-Apr-2008 : Added testPublicCloneable (DG); * 29-Apr-2008 : Extended testEquals() for new field (DG); * */ package org.jfree.chart.renderer.xy; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import java.awt.Color; import java.util.Date; import org.jfree.chart.TestUtils; import org.jfree.chart.util.PublicCloneable; import org.jfree.data.Range; import org.jfree.data.xy.DefaultOHLCDataset; import org.jfree.data.xy.OHLCDataItem; import org.jfree.data.xy.OHLCDataset; import org.junit.Test; /** * Tests for the {@link HighLowRenderer} class. */ public class HighLowRendererTest { /** * Check that the equals() method distinguishes all fields. */ @Test public void testEquals() { HighLowRenderer r1 = new HighLowRenderer(); HighLowRenderer r2 = new HighLowRenderer(); assertEquals(r1, r2); // drawOpenTicks r1.setDrawOpenTicks(false); assertFalse(r1.equals(r2)); r2.setDrawOpenTicks(false); assertTrue(r1.equals(r2)); // drawCloseTicks r1.setDrawCloseTicks(false); assertFalse(r1.equals(r2)); r2.setDrawCloseTicks(false); assertTrue(r1.equals(r2)); // openTickPaint r1.setOpenTickPaint(Color.RED); assertFalse(r1.equals(r2)); r2.setOpenTickPaint(Color.RED); assertTrue(r1.equals(r2)); // closeTickPaint r1.setCloseTickPaint(Color.BLUE); assertFalse(r1.equals(r2)); r2.setCloseTickPaint(Color.BLUE); assertTrue(r1.equals(r2)); // tickLength r1.setTickLength(99.9); assertFalse(r1.equals(r2)); r2.setTickLength(99.9); assertTrue(r1.equals(r2)); } /** * Two objects that are equal are required to return the same hashCode. */ @Test public void testHashcode() { HighLowRenderer r1 = new HighLowRenderer(); HighLowRenderer r2 = new HighLowRenderer(); assertTrue(r1.equals(r2)); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2); } /** * Confirm that cloning works. */ @Test public void testCloning() throws CloneNotSupportedException { HighLowRenderer r1 = new HighLowRenderer(); r1.setCloseTickPaint(Color.green); HighLowRenderer r2 = (HighLowRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); } /** * Verify that this class implements {@link PublicCloneable}. */ @Test public void testPublicCloneable() { HighLowRenderer r1 = new HighLowRenderer(); assertTrue(r1 instanceof PublicCloneable); } /** * Serialize an instance, restore it, and check for equality. */ @Test public void testSerialization() { HighLowRenderer r1 = new HighLowRenderer(); r1.setCloseTickPaint(Color.green); HighLowRenderer r2 = (HighLowRenderer) TestUtils.serialised(r1); assertEquals(r1, r2); } /** * Some checks for the findRangeBounds() method. */ @Test public void testFindRangeBounds() { HighLowRenderer renderer = new HighLowRenderer(); OHLCDataItem item1 = new OHLCDataItem(new Date(1L), 2.0, 4.0, 1.0, 3.0, 100); OHLCDataset dataset = new DefaultOHLCDataset("S1", new OHLCDataItem[] {item1}); Range range = renderer.findRangeBounds(dataset); assertEquals(new Range(1.0, 4.0), range); OHLCDataItem item2 = new OHLCDataItem(new Date(1L), -1.0, 3.0, -1.0, 3.0, 100); dataset = new DefaultOHLCDataset("S1", new OHLCDataItem[] {item1, item2}); range = renderer.findRangeBounds(dataset); assertEquals(new Range(-1.0, 4.0), range); // try an empty dataset - should return a null range dataset = new DefaultOHLCDataset("S1", new OHLCDataItem[] {}); range = renderer.findRangeBounds(dataset); assertNull(range); // try a null dataset - should return a null range range = renderer.findRangeBounds(null); assertNull(range); } }
[ "an7s@virginia.edu" ]
an7s@virginia.edu
fc59a96dc2b1341e7626652c088a7e6e1b5ab26d
4536078b4070fc3143086ff48f088e2bc4b4c681
/v1.0.4/decompiled/com/microsoft/identity/common/internal/broker/MicrosoftAuthServiceConnection.java
fcc40ac7279da5e317a5a9a83dc17e2f88d9dcc5
[]
no_license
olealgoritme/smittestopp_src
485b81422752c3d1e7980fbc9301f4f0e0030d16
52080d5b7613cb9279bc6cda5b469a5c84e34f6a
refs/heads/master
2023-05-27T21:25:17.564334
2023-05-02T14:24:31
2023-05-02T14:24:31
262,846,147
0
0
null
null
null
null
UTF-8
Java
false
false
1,507
java
package com.microsoft.identity.common.internal.broker; import android.content.ComponentName; import android.content.ServiceConnection; import android.os.IBinder; import com.microsoft.identity.client.IMicrosoftAuthService; import com.microsoft.identity.client.IMicrosoftAuthService.Stub; import com.microsoft.identity.common.internal.logging.Logger; public class MicrosoftAuthServiceConnection implements ServiceConnection { public static final String TAG = MicrosoftAuthServiceConnection.class.getSimpleName(); public IMicrosoftAuthService mMicrosoftAuthService; public MicrosoftAuthServiceFuture mMicrosoftAuthServiceFuture; public MicrosoftAuthServiceConnection(MicrosoftAuthServiceFuture paramMicrosoftAuthServiceFuture) { mMicrosoftAuthServiceFuture = paramMicrosoftAuthServiceFuture; } public void onServiceConnected(ComponentName paramComponentName, IBinder paramIBinder) { Logger.info(TAG, "MicrosoftAuthService is connected."); paramComponentName = IMicrosoftAuthService.Stub.asInterface(paramIBinder); mMicrosoftAuthService = paramComponentName; mMicrosoftAuthServiceFuture.setMicrosoftAuthService(paramComponentName); } public void onServiceDisconnected(ComponentName paramComponentName) { Logger.info(TAG, "MicrosoftAuthService is disconnected."); } } /* Location: * Qualified Name: base.com.microsoft.identity.common.internal.broker.MicrosoftAuthServiceConnection * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "olealgoritme@gmail.com" ]
olealgoritme@gmail.com
cd814d0a57683cd367f5d69f51c30b0e75b24b5d
edfb435ee89eec4875d6405e2de7afac3b2bc648
/tags/selenium-2.16.0/java/client/test/com/thoughtworks/selenium/corebased/TestWait.java
858f11b75019aca35b70baee066512877310f16c
[ "Apache-2.0" ]
permissive
Escobita/selenium
6c1c78fcf0fb71604e7b07a3259517048e584037
f4173df37a79ab6dd6ae3f1489ae0cd6cc7db6f1
refs/heads/master
2021-01-23T21:01:17.948880
2012-12-06T22:47:50
2012-12-06T22:47:50
8,271,631
1
0
null
null
null
null
UTF-8
Java
false
false
1,380
java
package com.thoughtworks.selenium.corebased; import com.thoughtworks.selenium.InternalSelenseTestBase; import org.junit.Test; public class TestWait extends InternalSelenseTestBase { @Test public void testWait() throws Exception { // Link click selenium.open("../tests/html/test_reload_onchange_page.html"); selenium.click("theLink"); selenium.waitForPageToLoad("30000"); // Page should reload verifyEquals(selenium.getTitle(), "Slow Loading Page"); selenium.open("../tests/html/test_reload_onchange_page.html"); selenium.select("theSelect", "Second Option"); selenium.waitForPageToLoad("30000"); // Page should reload verifyEquals(selenium.getTitle(), "Slow Loading Page"); // Textbox with onblur selenium.open("../tests/html/test_reload_onchange_page.html"); selenium.type("theTextbox", "new value"); selenium.fireEvent("theTextbox", "blur"); selenium.waitForPageToLoad("30000"); verifyEquals(selenium.getTitle(), "Slow Loading Page"); // Submit button selenium.open("../tests/html/test_reload_onchange_page.html"); selenium.click("theSubmit"); selenium.waitForPageToLoad("30000"); verifyEquals(selenium.getTitle(), "Slow Loading Page"); selenium.click("slowPage_reload"); selenium.waitForPageToLoad("30000"); verifyEquals(selenium.getTitle(), "Slow Loading Page"); } }
[ "simon.m.stewart@07704840-8298-11de-bf8c-fd130f914ac9" ]
simon.m.stewart@07704840-8298-11de-bf8c-fd130f914ac9
27e5460ea975a85d9d75624b1b0213541cc56591
e820097c99fb212c1c819945e82bd0370b4f1cf7
/gwt-sh/src/main/java/com/skynet/spms/manager/logisticsCustomsDeclaration/pickupDeliveryOrder/IPickupDeliveryVanningItemsManager.java
6bf43ef7b3fc114c0bf955a045195dfda04fb117
[]
no_license
jayanttupe/springas-train-example
7b173ca4298ceef543dc9cf8ae5f5ea365431453
adc2e0f60ddd85d287995f606b372c3d686c3be7
refs/heads/master
2021-01-10T10:37:28.615899
2011-12-20T07:47:31
2011-12-20T07:47:31
36,887,613
0
0
null
null
null
null
UTF-8
Java
false
false
1,688
java
package com.skynet.spms.manager.logisticsCustomsDeclaration.pickupDeliveryOrder; import java.util.List; import java.util.Map; import com.skynet.spms.persistence.entity.logisticsCustomsDeclaration.pickupDeliveryOrder.PickupDeliveryVanningItems; /** * 提货发货指令明细业务接口 * * @author taiqichao * @version * @Date Jul 12, 2011 */ public interface IPickupDeliveryVanningItemsManager { /** * 添加提货发货指令明细 * * @param * @param o * @return void */ public void addPickupDeliveryVanningItems(PickupDeliveryVanningItems o); /** * 更新提货发货指令明细 * * @param * @param newValues * @param * @param itemID * @param * @return * @return PickupDeliveryVanningItems */ public PickupDeliveryVanningItems updatePickupDeliveryVanningItems( Map<String, Object> newValues, String itemID); /** * 删除提货发货指令明细 * * @param * @param itemID * @return void */ public void deletePickupDeliveryVanningItems(String itemID); /** * 分页查询提货发货指令明细 * * @param * @param startRow * @param * @param endRow * @param * @param orderId * @param * @return * @return List<PickupDeliveryVanningItems> */ public List<PickupDeliveryVanningItems> queryPickupDeliveryVanningItemsList( int startRow, int endRow, String orderId); /** * 根据指令查询提货发货指令明细 * * @param * @param sheetId * @param * @return * @return PickupDeliveryVanningItems */ public PickupDeliveryVanningItems getPickupDeliveryVanningItemsById( String sheetId); }
[ "usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d" ]
usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d
7d2a07b400ecb0420773547209f4a92de6fde558
39b16119673e7e5f39f955cf8074b5c3e7ef91d4
/app/src/main/java/com/example/foody/PageSave/DiadiemFragment.java
14b30c113c74ec9115ef3c598e74bfe9351121bb
[]
no_license
vanhai260300/LTDDBAOFireBase
1ff3c487459aee2748fd4b1757c83e8b391e4ae7
17111cc536d19712fba1efdee1666432d63fbf56
refs/heads/master
2023-02-08T15:38:44.219440
2020-12-20T13:25:49
2020-12-20T13:25:49
323,077,386
0
0
null
null
null
null
UTF-8
Java
false
false
1,244
java
package com.example.foody.PageSave; import android.os.Bundle; import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Spinner; import com.example.foody.PageOrder.Employee; import com.example.foody.PageOrder.EmployeeDataUtils; import com.example.foody.R; public class DiadiemFragment extends Fragment { public DiadiemFragment() { // Required empty public constructor } Spinner spinner; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View v = inflater.inflate(R.layout.fragment_diadiem, container, false); Employeesave[] employees = EmployeeDataUtilssave.getEmployees(); spinner = (Spinner) v.findViewById(R.id.spinner); ArrayAdapter<Employeesave> LTRadapter = new ArrayAdapter<Employeesave>(this.getActivity(), R.layout.spinner_item, employees); LTRadapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line); spinner.setAdapter(LTRadapter); return v; } }
[ "your_email@youremail.com" ]
your_email@youremail.com
832c359c0d3698406c10dc84e2b298e9973009e3
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/zhihu/android/app/mixtape/model/RefreshListError.java
a44423651201f0843ca72ff37ae2841569d7631f
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
425
java
package com.zhihu.android.app.mixtape.model; import kotlin.Metadata; import kotlin.p2243e.p2245b.C32569u; @Metadata /* compiled from: KmVideoPlayerError.kt */ public final class RefreshListError extends ListDataError { /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public RefreshListError(Throwable th) { super(th); C32569u.m150519b(th, "throwable"); } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
892e677e1ceeff0736c13eb2a5cc96945fd8b458
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/jdbi/learning/1950/ParsedSql.java
446cc49feca1379263a69d82e256a38d2fe95d70
[]
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
4,936
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.core.statement; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** * The SQL and parameters parsed from an SQL statement. */ public class ParsedSql { static final String POSITIONAL_PARAM = "?"; private final String sql; private final ParsedParameters parameters; private ParsedSql(String sql, ParsedParameters parameters) { this.sql = sql; this.parameters = parameters; } /** * @return an SQL string suitable for use with a JDBC * {@link java.sql.PreparedStatement}. */ public String getSql() { return sql; } /** * @return the set of parameters parsed from the input SQL string. */ public ParsedParameters getParameters() { return parameters; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ParsedSql that = (ParsedSql) o; return Objects.equals(sql, that.sql) && Objects.equals(parameters, that.parameters); } @Override public int hashCode() { return Objects.hash(sql, parameters); } @Override public String toString() { return "ParsedSql{" + "sql='" + sql + '\'' + ", parameters=" + parameters + '}'; } /** * A static factory of {@link ParsedSql} instances. The statement * may contain only positional parameters * (the {@value #POSITIONAL_PARAM} character). If your SQL * code contains named parameters (for example variables preceded * by a colon) then you have to replace them with positional * parameters and specify the mapping in the * {@link ParsedParameters}. You cannot mix named and positional * parameters in one SQL statement. * * @param sql the SQL code containing only positional parameters * @param parameters the ordered list of named parameters, or positional parameters * @return New {@link ParsedSql} instance * @see ParsedParameters#positional(int) * @see ParsedParameters#named(List) */ public static ParsedSql of(String sql, ParsedParameters parameters) { return new ParsedSql(sql, parameters); } /** * @return a new ParsedSql builder. */ public static Builder builder() { return new Builder(); } /** * Fluent builder for ParsedSql instances. */ public static class Builder { private Builder() {} private final StringBuilder sql = new StringBuilder(); private boolean positional = false; private boolean named = false; private final List<String> parameterNames = new ArrayList<>(); /** * Appends the given SQL fragment to the SQL string. * * @param sqlFragment the SQL fragment * @return this */ public Builder append(String sqlFragment) { sql.append(sqlFragment); return this; } /** * Records a positional parameters, and appends a <code>?</code> to the * SQL string. * * @return this */ public Builder appendPositionalParameter() { positional = true; parameterNames.add(POSITIONAL_PARAM); return append(POSITIONAL_PARAM); } /** * Records a named parameter with the given name, and appends a * <code>?</code> to the SQL string. * * @param name the parameter name. * @return this */ public Builder appendNamedParameter(String name) { named = true; parameterNames.add(name); return append(POSITIONAL_PARAM); } /** * @return the finalized {@link ParsedSql} object. */ public ParsedSql build() { if (positional && named) { throw new UnableToExecuteStatementException( "Cannot mix named and positional parameters in a SQL statement: " + parameterNames); } ParsedParameters parameters = new ParsedParameters(positional, parameterNames); return new ParsedSql(sql.toString(), parameters); } } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
4e933bec86a647308a6a6a9daf078869dd489204
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a117/A117475Test.java
dba53ec4679950d8ce5a505bb4e8be4991a523de
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a117; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A117475Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
3c803df9d84fc788fea3057f9b8333c5b7963005
b34654bd96750be62556ed368ef4db1043521ff2
/cloud_vm_service/branches/cockpit_trunk/src/java/main/com/topcoder/direct/services/view/dto/cloudvm/VMAvailabilityZone.java
fe0ba2c11889569b02048d3096313ad5cc6aa480
[]
no_license
topcoder-platform/tcs-cronos
81fed1e4f19ef60cdc5e5632084695d67275c415
c4ad087bb56bdaa19f9890e6580fcc5a3121b6c6
refs/heads/master
2023-08-03T22:21:52.216762
2019-03-19T08:53:31
2019-03-19T08:53:31
89,589,444
0
1
null
2019-03-19T08:53:32
2017-04-27T11:19:01
null
UTF-8
Java
false
false
1,114
java
/* * Copyright (C) 2010 TopCoder Inc., All Rights Reserved. */ package com.topcoder.direct.services.view.dto.cloudvm; /** * This class represents the VM availability zone. * * Thread-safety: Mutable and not thread-safe. * * @author Standlove, TCSDEVELOPER * @version 1.0 */ public class VMAvailabilityZone extends AbstractIdEntity { /** * The serial version uid. */ private static final long serialVersionUID = 9438501481250834L; /** * Represents the availability zone name. It has getter & setter. It can be any value. */ private String name; /** * Empty constructor. */ public VMAvailabilityZone() { } /** * Getter for the namesake instance variable. Simply return the namesake instance variable. * * @return field value */ public String getName() { return name; } /** * Setter for the namesake instance variable. Simply set the value to the namesake instance variable. * * @param name value to set */ public void setName(String name) { this.name = name; } }
[ "mashannon168@fb370eea-3af6-4597-97f7-f7400a59c12a" ]
mashannon168@fb370eea-3af6-4597-97f7-f7400a59c12a
f0466811ae73cd4fdc8ac8dcfbc89fc7d1bb3888
62b5f0ff1ff1af44d0bcf953ebdd3cc9e1a07f0e
/xmlintelledit/xmltext/src/main/java/eclassxmlschemacommon_2_0Simplified/TargetValues.java
05851ad0dda80f7849346e6eceef5f54a751f173
[ "MIT" ]
permissive
patrickneubauer/XMLIntellEdit
5014a2fa426116e42c7f4b318d636c3a48720059
5e4a0ad59b7e9446e7f79dcb32e09971c2193118
refs/heads/master
2021-01-12T01:56:56.595551
2018-11-10T00:35:14
2018-11-10T00:35:14
78,438,535
7
0
null
null
null
null
UTF-8
Java
false
false
1,658
java
/** */ package eclassxmlschemacommon_2_0Simplified; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Target Values</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link eclassxmlschemacommon_2_0Simplified.TargetValues#getTargetValue <em>Target Value</em>}</li> * </ul> * * @see eclassxmlschemacommon_2_0Simplified.Eclassxmlschemacommon_2_0SimplifiedPackage#getTargetValues() * @model * @generated */ public interface TargetValues extends EObject { /** * Returns the value of the '<em><b>Target Value</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Target Value</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Target Value</em>' containment reference. * @see #setTargetValue(VALUEREF) * @see eclassxmlschemacommon_2_0Simplified.Eclassxmlschemacommon_2_0SimplifiedPackage#getTargetValues_TargetValue() * @model containment="true" required="true" * @generated */ VALUEREF getTargetValue(); /** * Sets the value of the '{@link eclassxmlschemacommon_2_0Simplified.TargetValues#getTargetValue <em>Target Value</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Target Value</em>' containment reference. * @see #getTargetValue() * @generated */ void setTargetValue(VALUEREF value); } // TargetValues
[ "neubauer@big.tuwien.ac.at" ]
neubauer@big.tuwien.ac.at
856a8e2221e9bb1e0389f7a2fb12e5c3d194e9fa
349386f221b301eb4f9958fa3b9b9a8ac9785e02
/src/main/java/com/qidao/qidao/dynamic/complaint/service/impl/ComplaintServiceImpl.java
439c2de9b275b83f2039f164f89adcc069f29698
[ "MIT" ]
permissive
tzbgithub/keqidao
3c02a21a9f9158037e60f73c963067c270e7ab0f
fb54cddac4105f5d25b62cdc67c791eae16b3aae
refs/heads/master
2023-04-05T02:53:31.513477
2021-05-10T05:06:00
2021-05-10T05:06:00
365,922,388
0
0
null
null
null
null
UTF-8
Java
false
false
4,261
java
package com.qidao.qidao.dynamic.complaint.service.impl; import java.util.List; import com.qidao.common.utils.security.ShiroUtils; import com.qidao.project.system.user.domain.User; import com.qidao.qidao.member.member.mapper.TMemberMapper; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import com.qidao.qidao.dynamic.complaint. mapper.ComplaintMapper; import com.qidao.qidao.dynamic.complaint. domain.Complaint; import com.qidao.qidao.dynamic.complaint. service.IComplaintService; import com.qidao.common.utils.text.Convert; import com.qidao.framework.util.SnowflakeIdWorker53; import javax.annotation.Resource; /** * 动态投诉Service业务层处理 * * @author autuan * @date 2021-01-19 */ @Service @Slf4j public class ComplaintServiceImpl implements IComplaintService { @Resource private ComplaintMapper complaintMapper; @Resource private SnowflakeIdWorker53 snowflakeIdWorker; @Resource private TMemberMapper TMemberMapper; /** * 查询动态投诉 * * @param id 动态投诉ID * @return 动态投诉 */ @Override public Complaint selectComplaintById(Long id) { log.info("ComplaintServiceImpl -> selectComplaintById -> start -> id : {}", id); log.info("ComplaintServiceImpl -> selectComplaintById -> end"); return complaintMapper.selectComplaintById(id); } /** * 查询动态投诉列表 * * @param complaint 动态投诉 * @return 动态投诉 */ @Override public List<Complaint> selectComplaintList(Complaint complaint) { log.info("ComplaintServiceImpl -> selectComplaintList -> start -> complaint : {}", complaint); log.info("ComplaintServiceImpl -> selectComplaintList -> end"); return complaintMapper.selectComplaintList(complaint); } /** * 新增动态投诉 * * @param complaint 动态投诉 * @return 结果 */ @Override public int insertComplaint(Complaint complaint) { log.info("ComplaintServiceImpl -> insertComplaint -> start -> complaint : {}", complaint); complaint.setId(snowflakeIdWorker.nextId()); complaint.setCreateBy(String.valueOf(ShiroUtils.getUserId())); log.info("ComplaintServiceImpl -> insertComplaint -> end"); return complaintMapper.insertComplaint(complaint); } /** * 修改动态投诉 * * @param complaint 动态投诉 * @return 结果 */ @Override public int updateComplaint(Complaint complaint) { log.info("ComplaintServiceImpl -> updateComplaint -> start -> complaint : {}", complaint); complaint.setUpdateBy(String.valueOf(ShiroUtils.getUserId())); User sysUser = ShiroUtils.getSysUser(); complaint.setReplyUserId(sysUser.getUserId()); complaint.setReplyUserName(sysUser.getUserName()); log.info("ComplaintServiceImpl -> updateComplaint -> end"); return complaintMapper.updateComplaint(complaint); } /** * 删除动态投诉对象 * * @param ids 需要删除的数据ID * @return 结果 */ @Override public int deleteComplaintByIds(String ids) { log.info("ComplaintServiceImpl -> deleteComplaintByIds -> start -> ids : {}", ids); log.info("ComplaintServiceImpl -> deleteComplaintByIds -> end"); return complaintMapper.deleteComplaintByIds(Convert.toStrArray(ids)); } /** * 删除动态投诉信息 * * @param id 动态投诉ID * @return 结果 */ @Override public int deleteComplaintById(Long id) { log.info("ComplaintServiceImpl -> deleteComplaintById -> start -> id : {}", id); log.info("ComplaintServiceImpl -> deleteComplaintById -> end"); return complaintMapper.deleteComplaintById(id); } /** * 逻辑删除动态投诉对象 * * @param ids 需要删除的数据ID * @return 结果 */ @Override public int logicDelByIds(String ids) { log.info("ComplaintServiceImpl -> logicDelByIds -> start -> ids : {}", ids); log.info("ComplaintServiceImpl -> logicDelByIds -> end"); return complaintMapper.logicDelByIds(Convert.toStrArray(ids)); } }
[ "564858834@qq.com" ]
564858834@qq.com
9c708ca56e9c5c2a7e69d4cb52c24f12276eeb91
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/com/github/pedrovgs/problem78/AutoBoxingTrickTest.java
9b2c8c5f3ce897bbb3071d9e686786d9e400745a
[]
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,191
java
/** * Copyright (C) 2014 Pedro Vicente G?mez S?nchez. * * 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.github.pedrovgs.problem78; import org.junit.Assert; import org.junit.Test; /** * Before to read this test read AutoBoxingTrick class, this is a really funny Java trick. * * @author Pedro Vicente G?mez S?nchez. */ public class AutoBoxingTrickTest { private AutoBoxingTrick autoBoxingTrick; @Test public void shouldReturnFalseButReturnsTrue() { Assert.assertTrue(autoBoxingTrick.compare(1, 1)); } @Test public void shouldReturnFalseAndReturnsFalse() { Assert.assertFalse(autoBoxingTrick.compare(1000, 1000)); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
77b5edb7345a6b06127d636a6c183e9ef73ccb6b
97fd02f71b45aa235f917e79dd68b61c62b56c1c
/src/main/java/com/tencentcloudapi/ivld/v20210903/models/UpdateCustomCategoryRequest.java
30c61d3edc33c5520be7c208713cf3088d75cbc7
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java
7df922f7c5826732e35edeab3320035e0cdfba05
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
refs/heads/master
2023-09-04T10:51:57.854153
2023-09-01T03:21:09
2023-09-01T03:21:09
129,837,505
537
317
Apache-2.0
2023-09-13T02:42:03
2018-04-17T02:58:16
Java
UTF-8
Java
false
false
3,507
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.ivld.v20210903.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class UpdateCustomCategoryRequest extends AbstractModel{ /** * 自定义人物类型Id */ @SerializedName("CategoryId") @Expose private String CategoryId; /** * 一级自定义人物类型 */ @SerializedName("L1Category") @Expose private String L1Category; /** * 二级自定义人物类型 */ @SerializedName("L2Category") @Expose private String L2Category; /** * Get 自定义人物类型Id * @return CategoryId 自定义人物类型Id */ public String getCategoryId() { return this.CategoryId; } /** * Set 自定义人物类型Id * @param CategoryId 自定义人物类型Id */ public void setCategoryId(String CategoryId) { this.CategoryId = CategoryId; } /** * Get 一级自定义人物类型 * @return L1Category 一级自定义人物类型 */ public String getL1Category() { return this.L1Category; } /** * Set 一级自定义人物类型 * @param L1Category 一级自定义人物类型 */ public void setL1Category(String L1Category) { this.L1Category = L1Category; } /** * Get 二级自定义人物类型 * @return L2Category 二级自定义人物类型 */ public String getL2Category() { return this.L2Category; } /** * Set 二级自定义人物类型 * @param L2Category 二级自定义人物类型 */ public void setL2Category(String L2Category) { this.L2Category = L2Category; } public UpdateCustomCategoryRequest() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public UpdateCustomCategoryRequest(UpdateCustomCategoryRequest source) { if (source.CategoryId != null) { this.CategoryId = new String(source.CategoryId); } if (source.L1Category != null) { this.L1Category = new String(source.L1Category); } if (source.L2Category != null) { this.L2Category = new String(source.L2Category); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "CategoryId", this.CategoryId); this.setParamSimple(map, prefix + "L1Category", this.L1Category); this.setParamSimple(map, prefix + "L2Category", this.L2Category); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
81cd8d404d62a65bad76311ded54b3b05fa2a2c0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_7c296d7be94e20b9b9b4b167a34481223b9b808e/Level/12_7c296d7be94e20b9b9b4b167a34481223b9b808e_Level_s.java
e8b2fd174c50846741fdaceda80759cecc167e2c
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,539
java
package me.bevilacqua.ld48.Level; import me.bevilacqua.ld48.Play; import org.newdawn.slick.Graphics; import org.newdawn.slick.Image; import org.newdawn.slick.Music; import org.newdawn.slick.SlickException; import org.newdawn.slick.tiled.TiledMap; public class Level { private String mapPath; private String Name; private int height; private int width; private String musicPath; private Music music; private int timer; private int elapsedTime; public TiledMap map; //I know i shouldn't do this sorry Java gods have mercy public boolean preMode = true; //I know i shouldn't do this sorry Java gods have mercy private Image diary; private String diaryPath; private int diaryDELAY = 6000; private int diaryElapsedTime; public Level(String mapPath , String Name , String musicPath , int timer , String diaryPath) throws SlickException { this.mapPath = mapPath; this.Name = Name; this.musicPath = musicPath; this.timer = timer; this.diaryPath = diaryPath; this.init(); } private void init() throws SlickException { map = new TiledMap(mapPath); music = new Music(musicPath); diary = new Image(diaryPath); height = map.getHeight(); width = map.getWidth(); System.out.println("Loading map Name: " + Name + " Width: " + width + " Height: " + height); } public void render(int x , int y , int startX , int startY , Graphics g) { if(preMode) { diary.draw(); } else { if(music.playing() == false) music.loop(); map.render(0, 0 , startX + x , startY + y , 100 , 100); g.drawString(" " + (float)((timer - elapsedTime) / 1000), 350 , 25); } } public void failLevel() { music.stop(); } public void update(int Delta) { if(preMode) { if(diaryElapsedTime > diaryDELAY) { preMode = false; diaryElapsedTime = 0; } else diaryElapsedTime += Delta; } else { if(elapsedTime > timer) { Play.lf = true; } elapsedTime += Delta; } } public String getName() { return Name; } public String getMapPath() { return this.mapPath; } public String getSoundPath() { return this.musicPath; } public int getTimer() { return this.timer; } public int getHeight() { return height; } public int getWidth() { return width; } public void endMusic() { music.fade(1000, 0, true); } public void setElapsedTime(int i) { this.elapsedTime = i; } public String getDiaryPath() { return this.diaryPath; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e7895f8e339e1a54c9258acd90050b817ae7c052
6a95484a8989e92db07325c7acd77868cb0ac3bc
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201406/cm/MediaServiceInterfaceuploadResponse.java
70dfccb14396412dd0edd10891613ab9071bcb54
[ "Apache-2.0" ]
permissive
popovsh6/googleads-java-lib
776687dd86db0ce785b9d56555fe83571db9570a
d3cabb6fb0621c2920e3725a95622ea934117daf
refs/heads/master
2020-04-05T23:21:57.987610
2015-03-12T19:59:29
2015-03-12T19:59:29
33,672,406
1
0
null
2015-04-09T14:06:00
2015-04-09T14:06:00
null
UTF-8
Java
false
false
1,919
java
package com.google.api.ads.adwords.jaxws.v201406.cm; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for uploadResponse element declaration. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;element name="uploadResponse"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="rval" type="{https://adwords.google.com/api/adwords/cm/v201406}Media" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "rval" }) @XmlRootElement(name = "uploadResponse") public class MediaServiceInterfaceuploadResponse { protected List<Media> rval; /** * Gets the value of the rval property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the rval property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRval().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Media } * * */ public List<Media> getRval() { if (rval == null) { rval = new ArrayList<Media>(); } return this.rval; } }
[ "jradcliff@google.com" ]
jradcliff@google.com
04c130a6afb1d982add9612e42ac1936eb7b5cda
7b733d7be68f0fa4df79359b57e814f5253fc72d
/system/Testing/src/com/percussion/testing/PSConfigHelperTestCase.java
27c85ce983e9b9689db95e7db93e38619e0af6f5
[ "LicenseRef-scancode-dco-1.1", "Apache-2.0", "OFL-1.1", "LGPL-2.0-or-later" ]
permissive
percussion/percussioncms
318ac0ef62dce12eb96acf65fc658775d15d95ad
c8527de53c626097d589dc28dba4a4b5d6e4dd2b
refs/heads/development
2023-08-31T14:34:09.593627
2023-08-31T14:04:23
2023-08-31T14:04:23
331,373,975
18
6
Apache-2.0
2023-09-14T21:29:25
2021-01-20T17:03:38
Java
UTF-8
Java
false
false
4,013
java
/* * Copyright 1999-2023 Percussion Software, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * limitations under the License. */ package com.percussion.testing; import java.io.IOException; import java.io.InputStream; import java.util.Enumeration; import java.util.Properties; import junit.framework.TestCase; /** * The utility class to provide various properties for all the unit tests. * It is essentially a config props factory that uses a classloader to fetch * a appropriate properties file based on the given CONN_TYPE_XX. * Prop. file names correspond to the CONN_TYPE_XX, ie: conn_rxserver.properties. */ public class PSConfigHelperTestCase implements IPSUnitTestConfigHelper { /** * Default constructor. */ public PSConfigHelperTestCase() { } /** * Simply call super(String). * * @param arg0 the name of the TestCase. */ public PSConfigHelperTestCase(String arg0) { } // Implements IPSClientBasedJunitTest.getRxConnectionProps() public static Properties getConnectionProps(int type) throws IOException { switch (type) { case CONN_TYPE_RXSERVER: return getPropertiesWithSystemOverrides("conn_rxserver.properties"); case CONN_TYPE_TOMCAT: return getPropertiesWithSystemOverrides("conn_tomcat.properties"); case CONN_TYPE_SQL: return getPropertiesWithSystemOverrides("conn_sql.properties"); case CONN_TYPE_ORA: return getPropertiesWithSystemOverrides("conn_ora.properties"); default: { //undefined connection type throw new IllegalArgumentException("invalid conn type: " + type); } } } /** * Loads properties from the classpath and overrides values from system properties. * This is useful when running tests from CI server's like Jenkins or from * Eclipse launch configurations. Assumes that properties are overridden using a * <filename>.<propertyname> notation. * * @param fileName * * @return * @throws IOException */ private static Properties getPropertiesWithSystemOverrides(String fileName) throws IOException{ Properties props = loadFromFile(fileName); Properties system = System.getProperties(); //Loop through the properties and search for overrides. Enumeration<?> e = props.propertyNames(); while(e.hasMoreElements()){ String key = (String)e.nextElement(); String val = system.getProperty(fileName.concat(".").concat(key)); if(val!=null){ //Override the value with the System provided one. props.setProperty(key, val); } } return props; } /** * Loads a props file using this class's class loader. * @param fileName name of the props file to load, never <code>null</code>. * @return props never <code>null</code>. * @throws IOException */ private static Properties loadFromFile(String fileName) throws IOException { InputStream in = PSConfigHelperTestCase.class.getResourceAsStream(fileName); try { Properties props = new Properties(); props.load( in ); return props; } finally { if (in != null) try { in.close(); } catch (IOException e) { } } } }
[ "nate.chadwick@gmail.com" ]
nate.chadwick@gmail.com
40f5d2082cb6e451de9553a3965ffdcf1a792fcc
6ceada0d6310f41ebd2387eed1413975f611ab55
/icy/canvas/CanvasLayerListener.java
20517a6eaef9780f1fbd84ca4fba920cb79f8b00
[]
no_license
zeb/Icy-Kernel
441484a5f862e50cf4992b5a06f35447cd748eda
d2b296e043c77da31d27b8f0242d007b3e5e17e2
refs/heads/master
2021-01-16T22:46:48.889696
2013-03-18T13:30:43
2013-03-18T13:30:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
231
java
/** * */ package icy.canvas; import java.util.EventListener; /** * @author Stephane */ public interface CanvasLayerListener extends EventListener { public void canvasLayerChanged(CanvasLayerEvent event); }
[ "stephane.dallongeville@pasteur.fr" ]
stephane.dallongeville@pasteur.fr
2a6b23a35c436399afef84df9f4a11721e6ea973
aa9fd0b9b699a4736742406816b71768d43922fd
/src/main/java/com/blade/watcher/EnvironmentWatcher.java
0ceb55b6f43883c13ab65767c22e803829af63db
[ "Apache-2.0" ]
permissive
HongzhuLiu/blade
fbec278ddcf13b1abc3e465ab89bb483eea446e4
e190099ac8186f856330b39a89145421a835cd6a
refs/heads/master
2021-09-09T22:44:30.860981
2018-03-20T03:46:35
2018-03-20T03:46:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,534
java
package com.blade.watcher; import com.blade.Environment; import com.blade.event.EventType; import com.blade.mvc.Const; import com.blade.mvc.WebContext; import lombok.extern.slf4j.Slf4j; import java.io.IOException; import java.nio.file.*; /** * Environment watcher * * @author biezhi * @date 2017/12/24 */ @Slf4j public class EnvironmentWatcher implements Runnable { @Override public void run() { final Path path = Paths.get(Const.CLASSPATH); try (WatchService watchService = FileSystems.getDefault().newWatchService()) { path.register(watchService, StandardWatchEventKinds.ENTRY_MODIFY, StandardWatchEventKinds.ENTRY_DELETE); // start an infinite loop while (true) { final WatchKey key = watchService.take(); for (WatchEvent<?> watchEvent : key.pollEvents()) { final WatchEvent.Kind<?> kind = watchEvent.kind(); if (kind == StandardWatchEventKinds.OVERFLOW) { continue; } // get the filename for the event final WatchEvent<Path> watchEventPath = (WatchEvent<Path>) watchEvent; final String filename = watchEventPath.context().toString(); // print it out if (log.isDebugEnabled()) { log.debug("⬢ {} -> {}", kind, filename); } if (kind == StandardWatchEventKinds.ENTRY_DELETE && filename.startsWith(".app") && filename.endsWith(".properties.swp")) { // reload env log.info("⬢ Reload environment"); Environment environment = Environment.of("classpath:" + filename.substring(1, filename.length() - 4)); WebContext.blade().environment(environment); // notify WebContext.blade().eventManager().fireEvent(EventType.ENVIRONMENT_CHANGED, environment); } } // reset the keyf boolean valid = key.reset(); // exit loop if the key is not valid (if the directory was // deleted, for if (!valid) { break; } } } catch (IOException | InterruptedException ex) { log.error("Environment watch error", ex); } } }
[ "biezhi.me@gmail.com" ]
biezhi.me@gmail.com
fd5a823d60acae7a60bbe2f3647923c7732969b1
33d6261fb8d118a965434deb9f588d601ccfe61e
/palo-gwt-widgets/src/com/tensegrity/palo/gwt/widgets/client/util/BorderSize.java
305b520fc12eff94e8694467039e30a26810955a
[]
no_license
svn2github/SpagoBI-V4x
8980656ec888782ea2ffb5a06ffa60b5c91849ee
b6cb536106644e446de2d974837ff909bfa73b58
refs/heads/master
2020-05-28T02:52:31.002963
2015-01-16T11:17:54
2015-01-16T11:17:54
10,394,712
3
6
null
null
null
null
UTF-8
Java
false
false
1,638
java
/* * * @file BorderSize.java * * Copyright (C) 2006-2009 Tensegrity Software GmbH * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as published * by the Free Software Foundation at http://www.gnu.org/copyleft/gpl.html. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA * * If you are developing and distributing open source applications under the * GPL License, then you are free to use JPalo Modules under the GPL License. For OEMs, * ISVs, and VARs who distribute JPalo Modules with their products, and do not license * and distribute their source code under the GPL, Tensegrity provides a flexible * OEM Commercial License. * * @author Philipp Bouillon <Philipp.Bouillon@tensegrity-software.com> * * @version $Id: BorderSize.java,v 1.2 2009/12/17 16:14:15 PhilippBouillon Exp $ * */ package com.tensegrity.palo.gwt.widgets.client.util; public class BorderSize { public int left; public int right; public int top; public int bottom; public BorderSize(int left, int right, int top, int bottom) { this.left = left; this.right = right; this.top = top; this.bottom = bottom; } }
[ "franceschini@99afaf0d-6903-0410-885a-c66a8bbb5f81" ]
franceschini@99afaf0d-6903-0410-885a-c66a8bbb5f81
07255b3033477e939f3df06b772bceb4623fc1ca
628cf6fc211841dbb3f22e30e8b96562886c3724
/tmp/org/eclipse/emf/ecore/xml/type/impl/AnyTypeImpl.java
35a28b20ed2d788424108329f412cabb19c626e3
[]
no_license
DylanYu/smatrt
ef4c54bf187762bc22407ea4d6e2e6c879072949
c85baa4255d2e6792c1ed9b1e7e184860cdac9ad
refs/heads/master
2016-09-06T04:46:19.998706
2013-07-20T10:03:29
2013-07-20T10:03:29
33,805,621
0
0
null
null
null
null
UTF-8
Java
false
false
6,505
java
/** * <copyright> * * Copyright (c) 2003-2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM - Initial API and implementation * * </copyright> * * $Id: AnyTypeImpl.java,v 1.9 2007/02/20 17:40:49 emerks Exp $ */ package org.eclipse.emf.ecore.xml.type.impl; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.BasicFeatureMap; import org.eclipse.emf.ecore.util.FeatureMap; import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.emf.ecore.xml.type.AnyType; import org.eclipse.emf.ecore.xml.type.XMLTypePackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Any Type</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl#getMixed <em>Mixed</em>}</li> * <li>{@link org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl#getAny <em>Any</em>}</li> * <li>{@link org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl#getAnyAttribute <em>Any Attribute</em>}</li> * </ul> * </p> * * @generated */ public class AnyTypeImpl extends EObjectImpl implements AnyType { /** * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getMixed() * @generated * @ordered */ protected FeatureMap mixed; /** * The cached value of the '{@link #getAnyAttribute() <em>Any Attribute</em>}' attribute list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAnyAttribute() * @generated * @ordered */ protected FeatureMap anyAttribute; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected AnyTypeImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return XMLTypePackage.Literals.ANY_TYPE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public FeatureMap getMixed() { if (mixed == null) { mixed = new BasicFeatureMap(this, XMLTypePackage.ANY_TYPE__MIXED); } return mixed; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public FeatureMap getAny() { return (FeatureMap)getMixed().<FeatureMap.Entry>list(XMLTypePackage.Literals.ANY_TYPE__ANY); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public FeatureMap getAnyAttribute() { if (anyAttribute == null) { anyAttribute = new BasicFeatureMap(this, XMLTypePackage.ANY_TYPE__ANY_ATTRIBUTE); } return anyAttribute; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case XMLTypePackage.ANY_TYPE__MIXED: return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs); case XMLTypePackage.ANY_TYPE__ANY: return ((InternalEList<?>)getAny()).basicRemove(otherEnd, msgs); case XMLTypePackage.ANY_TYPE__ANY_ATTRIBUTE: return ((InternalEList<?>)getAnyAttribute()).basicRemove(otherEnd, msgs); } return eDynamicInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case XMLTypePackage.ANY_TYPE__MIXED: if (coreType) return getMixed(); return ((FeatureMap.Internal)getMixed()).getWrapper(); case XMLTypePackage.ANY_TYPE__ANY: if (coreType) return getAny(); return ((FeatureMap.Internal)getAny()).getWrapper(); case XMLTypePackage.ANY_TYPE__ANY_ATTRIBUTE: if (coreType) return getAnyAttribute(); return ((FeatureMap.Internal)getAnyAttribute()).getWrapper(); } return eDynamicGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case XMLTypePackage.ANY_TYPE__MIXED: ((FeatureMap.Internal)getMixed()).set(newValue); return; case XMLTypePackage.ANY_TYPE__ANY: ((FeatureMap.Internal)getAny()).set(newValue); return; case XMLTypePackage.ANY_TYPE__ANY_ATTRIBUTE: ((FeatureMap.Internal)getAnyAttribute()).set(newValue); return; } eDynamicSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case XMLTypePackage.ANY_TYPE__MIXED: getMixed().clear(); return; case XMLTypePackage.ANY_TYPE__ANY: getAny().clear(); return; case XMLTypePackage.ANY_TYPE__ANY_ATTRIBUTE: getAnyAttribute().clear(); return; } eDynamicUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case XMLTypePackage.ANY_TYPE__MIXED: return mixed != null && !mixed.isEmpty(); case XMLTypePackage.ANY_TYPE__ANY: return !getAny().isEmpty(); case XMLTypePackage.ANY_TYPE__ANY_ATTRIBUTE: return anyAttribute != null && !anyAttribute.isEmpty(); } return eDynamicIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (mixed: "); result.append(mixed); result.append(", anyAttribute: "); result.append(anyAttribute); result.append(')'); return result.toString(); } } //AnyTypeImpl
[ "fafeysong@fb895ce6-3987-11de-a15a-d1801d6fabe8" ]
fafeysong@fb895ce6-3987-11de-a15a-d1801d6fabe8
0083f551f51b7b24919d524aaea6baeed66fd786
d00af6c547e629983ff777abe35fc9c36b3b2371
/jboss-all/testsuite/src/main/org/jboss/test/testbean/interfaces/BMTStatelessHome.java
e2a0f741de15098d6d60807687941166b489ecd3
[]
no_license
aosm/JBoss
e4afad3e0d6a50685a55a45209e99e7a92f974ea
75a042bd25dd995392f3dbc05ddf4bbf9bdc8cd7
refs/heads/master
2023-07-08T21:50:23.795023
2013-03-20T07:43:51
2013-03-20T07:43:51
8,898,416
1
1
null
null
null
null
UTF-8
Java
false
false
248
java
package org.jboss.test.testbean.interfaces; import javax.ejb.*; import java.rmi.*; public interface BMTStatelessHome extends EJBHome { public BMTStateless create() throws java.rmi.RemoteException, javax.ejb.CreateException; }
[ "rasmus@dll.nu" ]
rasmus@dll.nu
289017f0224165781c1e4b5439551f40d13be7df
0d681cc3e93e75b713937beb409b48ecf423e137
/hw07-0036479615/src/main/java/hr/fer/zemris/optjava/dz7/algorithms/swarm/IInertionScaler.java
00b61b48d77e96efccf0d0ec8670d22e1a77f46c
[]
no_license
svennjegac/FER-java-optjava
fe86ead9bd80b4ef23944ef9234909353673eaab
89d9aa124e2e2e32b0f8f1ba09157f03ecd117c6
refs/heads/master
2020-03-29T04:17:20.952593
2018-09-20T08:59:01
2018-09-20T08:59:01
149,524,350
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package hr.fer.zemris.optjava.dz7.algorithms.swarm; public interface IInertionScaler { public double getInertion(int iteration); }
[ "sven.njegac@fer.hr" ]
sven.njegac@fer.hr
5036badab0f0469e46f14c9c5268721370400ad6
a4dbcc4303506c650eee618fdb4249f06fe0b98e
/cjsj-oa/seal/src/main/java/cn/cjsj/im/utils/WebViewCacheClearUtil.java
a3fca052ac4ded2f54161a6553b57808ddebcf3f
[ "MIT" ]
permissive
JoshuaRuo/test
9a03d2779c6d7c36402d851d85c8cfb60d892b3a
4563d1f195c83da78d2e7e8bc1614c0263dfa579
refs/heads/master
2020-04-14T11:35:42.994124
2019-02-12T08:57:42
2019-02-12T08:57:42
163,818,413
0
0
null
null
null
null
UTF-8
Java
false
false
928
java
package cn.cjsj.im.utils; import android.content.Context; import android.webkit.CookieManager; import android.webkit.CookieSyncManager; import android.webkit.WebView; /** * Created by LuoYang on 2018/8/28 11:04 * * 清楚WebView缓存 */ public class WebViewCacheClearUtil { public static void clearCache(WebView webView, Context context) { //清空所有Cookie CookieSyncManager.createInstance(context); //Create a singleton CookieSyncManager within a context CookieManager cookieManager = CookieManager.getInstance(); // the singleton CookieManager instance cookieManager.removeAllCookie();// Removes all cookies. CookieSyncManager.getInstance().sync(); // forces sync manager to sync now webView.setWebChromeClient(null); webView.setWebViewClient(null); webView.getSettings().setJavaScriptEnabled(false); webView.clearCache(true); } }
[ "123456" ]
123456
b2b39f65d51e7be9c95d6eb6bfcf70a6de786061
2fd5b17cc26990aff0dd9d32fc8ab599c20e3576
/src/main/java/com/ochafik/swing/ui/SimplisticProgressBarUI.java
ac63c81b803d662a34a4189a4dbd178fcde48962
[ "MIT" ]
permissive
ochafik/nabab
fddbee030fb51fe00813b23b9b2e112256d09097
38ca6bc1f8946a29648b9c26806071202b5968a0
refs/heads/master
2020-04-05T23:28:03.141113
2016-12-13T02:28:21
2016-12-13T02:28:21
1,278,011
1
0
null
null
null
null
UTF-8
Java
false
false
3,924
java
/* * Copyright (C) 2006-2011 by Olivier Chafik (http://ochafik.com) * * 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 com.ochafik.swing.ui; import java.awt.Color; import java.awt.Dimension; import java.awt.GradientPaint; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Insets; import java.awt.Paint; import javax.swing.JComponent; import javax.swing.JProgressBar; import javax.swing.plaf.ProgressBarUI; import com.ochafik.util.listenable.Pair; public class SimplisticProgressBarUI extends ProgressBarUI { Dimension preferredSize; static boolean useGradients; static { useGradients = System.getProperty("ochafik.swing.ui.useGradients", "true").equals("true"); }; public SimplisticProgressBarUI(Dimension preferredSize) { this.preferredSize = preferredSize; } @Override public Dimension getPreferredSize(JComponent c) { Insets in = c.getInsets(); return new Dimension(preferredSize.width + in.left + in.right, preferredSize.height + in.top + in.bottom); } @Override public void installUI(JComponent c) { c.setOpaque(false); } static Color brighter(Color color) { float[] hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null); float deltaS = 0 , deltaB = 0.1f;//05f; return Color.getHSBColor(hsb[0], hsb[1]-deltaS, hsb[2]+deltaB); } static Pair<Color,Color> darkerBrighter(Color color) { float[] hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null); float deltaS = 0 , deltaB = 0.1f;//05f; return new Pair<Color,Color>(Color.getHSBColor(hsb[0], hsb[1]+deltaS, hsb[2]-deltaB),Color.getHSBColor(hsb[0], hsb[1]-deltaS, hsb[2]+deltaB)); } GradientPaint cachedPaint; Color cachedBaseColor; int cachedBarWidth; @Override public void paint(Graphics g, JComponent c) { Graphics2D g2d = (Graphics2D)g; JProgressBar bar = (JProgressBar)c; Dimension size = bar.getSize(); Insets in = bar.getInsets(); double p = bar.getPercentComplete(); Color color = bar.getForeground(); int x = in.left, y = in.top, w = size.width - in.left - in.right, h = size.height - in.top - in.bottom; int barWidth = p < 0.5 ? (int)Math.ceil((w-2) * p) : (int)((w-2) * p); Paint oldPaint = null; if (useGradients) { GradientPaint paint = cachedPaint; if (cachedBaseColor == null || !cachedBaseColor.equals(color) || cachedBarWidth != barWidth) { Pair<Color,Color> darkerBrighter = darkerBrighter(cachedBaseColor = color); cachedBarWidth = barWidth; paint = cachedPaint = new GradientPaint(x+1,y, darkerBrighter.getSecond(), x+barWidth, y, darkerBrighter.getFirst()); } oldPaint = g2d.getPaint(); g2d.setPaint(paint); } else { g2d.setColor(color); } g2d.fillRect(x+1, y, barWidth+1, h); if (useGradients) { g2d.setPaint(oldPaint); g2d.setColor(color); } g2d.setColor(color); g2d.drawRect(x, y, w, h); } }
[ "olivier.chafik@gmail.com" ]
olivier.chafik@gmail.com
74fd8402e630a2b1c5e5620876cee734e781c7b8
440e5bff3d6aaed4b07eca7f88f41dd496911c6b
/myapplication/src/main/java/com/tencent/open/b/c.java
e2c498f8f5cdf9201c44a3a5197b09abf2d247d5
[]
no_license
freemanZYQ/GoogleRankingHook
4d4968cf6b2a6c79335b3ba41c1c9b80e964ddd3
bf9affd70913127f4cd0f374620487b7e39b20bc
refs/heads/master
2021-04-29T06:55:00.833701
2018-01-05T06:14:34
2018-01-05T06:14:34
77,991,340
7
5
null
null
null
null
UTF-8
Java
false
false
4,575
java
package com.tencent.open.b; import android.content.Context; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.os.Build; import android.os.Build.VERSION; import android.os.Environment; import android.provider.Settings.Secure; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.DisplayMetrics; import android.view.WindowManager; import com.baidu.mobads.interfaces.utils.IXAdSystemUtils; import com.tencent.open.a.j; import com.tencent.open.d.e; import java.util.Locale; public class c { static String a = null; static String b = null; static String c = null; private static String d; private static String e = null; public static String a() { try { Context a = e.a(); if (a == null) { return ""; } WifiManager wifiManager = (WifiManager) a.getSystemService(IXAdSystemUtils.NT_WIFI); if (wifiManager == null) { return ""; } WifiInfo connectionInfo = wifiManager.getConnectionInfo(); return connectionInfo == null ? "" : connectionInfo.getMacAddress(); } catch (Throwable e) { j.a("openSDK_LOG.MobileInfoUtil", "getLocalMacAddress>>>", e); return ""; } } public static String a(Context context) { if (!TextUtils.isEmpty(d)) { return d; } if (context == null) { return ""; } d = ""; WindowManager windowManager = (WindowManager) context.getSystemService("window"); if (windowManager != null) { int width = windowManager.getDefaultDisplay().getWidth(); d = width + "x" + windowManager.getDefaultDisplay().getHeight(); } return d; } public static String b() { return Locale.getDefault().getLanguage(); } public static String b(Context context) { if (a != null && a.length() > 0) { return a; } if (context == null) { return ""; } try { a = ((TelephonyManager) context.getSystemService("phone")).getDeviceId(); return a; } catch (Exception e) { return ""; } } public static String c(Context context) { if (b != null && b.length() > 0) { return b; } if (context == null) { return ""; } try { b = ((TelephonyManager) context.getSystemService("phone")).getSimSerialNumber(); return b; } catch (Exception e) { return ""; } } public static String d(Context context) { if (c != null && c.length() > 0) { return c; } if (context == null) { return ""; } try { c = Secure.getString(context.getContentResolver(), "android_id"); return c; } catch (Exception e) { return ""; } } public static String e(Context context) { try { if (e == null) { WindowManager windowManager = (WindowManager) context.getSystemService("window"); DisplayMetrics displayMetrics = new DisplayMetrics(); windowManager.getDefaultDisplay().getMetrics(displayMetrics); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("imei=").append(b(context)).append('&'); stringBuilder.append("model=").append(Build.MODEL).append('&'); stringBuilder.append("os=").append(VERSION.RELEASE).append('&'); stringBuilder.append("apilevel=").append(VERSION.SDK_INT).append('&'); String b = a.b(context); if (b == null) { b = ""; } stringBuilder.append("network=").append(b).append('&'); stringBuilder.append("sdcard=").append(Environment.getExternalStorageState().equals("mounted") ? 1 : 0).append('&'); stringBuilder.append("display=").append(displayMetrics.widthPixels).append('*').append(displayMetrics.heightPixels).append('&'); stringBuilder.append("manu=").append(Build.MANUFACTURER).append("&"); stringBuilder.append("wifi=").append(a.e(context)); e = stringBuilder.toString(); } return e; } catch (Exception e) { return null; } } }
[ "zhengyuqin@youmi.net" ]
zhengyuqin@youmi.net