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
912908aab2cf9ce16976124110564059af7578d4
6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3
/src/com/inponsel/android/details/KomentarTwitter$PostKomen$7.java
1b4c841b5de8e78b8c26381e377d00ffea0f7e42
[]
no_license
alexivaner/GadgetX-Android-App
6d700ba379d0159de4dddec4d8f7f9ce2318c5cc
26c5866be12da7b89447814c05708636483bf366
refs/heads/master
2022-06-01T09:04:32.347786
2020-04-30T17:43:17
2020-04-30T17:43:17
260,275,241
0
0
null
null
null
null
UTF-8
Java
false
false
553
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 com.inponsel.android.details; import android.view.View; // Referenced classes of package com.inponsel.android.details: // KomentarTwitter class this._cls1 implements android.view.ter.PostKomen._cls7 { final this._cls1 this$1; public void onClick(View view) { } () { this$1 = this._cls1.this; super(); } }
[ "hutomoivan@gmail.com" ]
hutomoivan@gmail.com
118a67f1e5e538d007372e08d99e93ed35bbe88d
01088e78c1cf46e3d20c6115e6b7cacc4fdc426b
/app/src/main/java/org/jboss/hal/client/configuration/subsystem/security/SecurityDomainView.java
83e01adcd3f2bbb1f052ae34da7ecf8b49905047
[ "Apache-2.0" ]
permissive
gitter-badger/hal.next
3dcd080053a78c73deabe893e40976702f4af654
22683378c907d32d0351bf71dfbcecea6307e5ce
refs/heads/develop
2021-01-21T18:50:15.036957
2017-05-21T18:57:34
2017-05-21T18:57:34
92,086,705
0
0
null
2017-05-22T18:32:06
2017-05-22T18:32:06
null
UTF-8
Java
false
false
3,818
java
/* * Copyright 2015-2016 Red Hat, Inc, and individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jboss.hal.client.configuration.subsystem.security; import org.jboss.hal.ballroom.VerticalNavigation; import org.jboss.hal.ballroom.form.Form; import org.jboss.hal.ballroom.table.Table; import org.jboss.hal.core.mbui.MbuiContext; import org.jboss.hal.core.mbui.MbuiViewImpl; import org.jboss.hal.dmr.ModelNode; import org.jboss.hal.dmr.NamedNode; import org.jboss.hal.spi.MbuiElement; import org.jboss.hal.spi.MbuiView; import static org.jboss.hal.dmr.ModelDescriptionConstants.*; import static org.jboss.hal.dmr.ModelNodeHelper.asNamedNodes; import static org.jboss.hal.dmr.ModelNodeHelper.failSafePropertyList; /** * @author Harald Pehl */ @MbuiView @SuppressWarnings({"WeakerAccess", "DuplicateStringLiteralInspection", "HardCodedStringLiteral", "unused"}) public abstract class SecurityDomainView extends MbuiViewImpl<SecurityDomainPresenter> implements SecurityDomainPresenter.MyView { public static SecurityDomainView create(final MbuiContext mbuiContext) { return new Mbui_SecurityDomainView(mbuiContext); } @MbuiElement("security-domain-vertical-navigation") VerticalNavigation navigation; @MbuiElement("security-domain-configuration-form") Form<ModelNode> configurationForm; @MbuiElement("security-domain-authentication-table") Table<NamedNode> authenticationTable; @MbuiElement("security-domain-authentication-form") Form<NamedNode> authenticationForm; @MbuiElement("security-domain-authorization-table") Table<NamedNode> authorizationTable; @MbuiElement("security-domain-authorization-form") Form<NamedNode> authorizationForm; @MbuiElement("security-domain-audit-table") Table<NamedNode> auditTable; @MbuiElement("security-domain-audit-form") Form<NamedNode> auditForm; @MbuiElement("security-domain-acl-table") Table<NamedNode> aclTable; @MbuiElement("security-domain-acl-form") Form<NamedNode> aclForm; @MbuiElement("security-domain-trust-table") Table<NamedNode> trustTable; @MbuiElement("security-domain-trust-form") Form<NamedNode> trustForm; @MbuiElement("security-domain-mapping-table") Table<NamedNode> mappingTable; @MbuiElement("security-domain-mapping-form") Form<NamedNode> mappingForm; public SecurityDomainView(final MbuiContext mbuiContext) { super(mbuiContext); } @Override public void update(final SecurityDomain securityDomain) { configurationForm.view(securityDomain); authenticationForm.clear(); auditForm.clear(); aclForm.clear(); trustForm.clear(); mappingForm.clear(); authenticationTable.update( asNamedNodes(failSafePropertyList(securityDomain, "authentication/classic/" + LOGIN_MODULE))); auditTable.update(asNamedNodes(failSafePropertyList(securityDomain, "audit/classic" + PROVIDER_MODULE))); aclTable.update(asNamedNodes(failSafePropertyList(securityDomain, "acl/classic/" + ACL_MODULE))); trustTable.update(asNamedNodes(failSafePropertyList(securityDomain, "identity-trust/classic/" + TRUST_MODULE))); mappingTable.update(asNamedNodes(failSafePropertyList(securityDomain, "mapping/classic/" + MAPPING_MODULE))); } }
[ "harald.pehl@gmail.com" ]
harald.pehl@gmail.com
eef915d67b8efc316adf351bf7490e1885f20b93
80e06009e03e4a5e8e8f299015d2ffb49a0f347d
/subprojects/language-jvm/src/main/groovy/org/gradle/api/internal/tasks/compile/incremental/jar/CachingJarSnapshotter.java
ae39d6edd4e6ca3759d0228515068ac67f45d53e
[]
no_license
w4tson/gradle
c377a2d0587d5a0e0b0c2160fcde72063a0b5824
14823593f6bff4a914df281973a87e60ef0a1a41
refs/heads/master
2016-10-14T08:00:08.739742
2014-06-27T12:51:07
2014-06-27T12:51:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,707
java
/* * Copyright 2014 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.gradle.api.internal.tasks.compile.incremental.jar; import org.gradle.api.internal.hash.Hasher; import org.gradle.api.internal.tasks.compile.incremental.analyzer.ClassDependenciesAnalyzer; import org.gradle.api.internal.tasks.compile.incremental.cache.JarSnapshotCache; import org.gradle.internal.Factory; public class CachingJarSnapshotter implements JarSnapshotter { private final DefaultJarSnapshotter snapshotter; private final Hasher hasher; private final JarSnapshotCache cache; public CachingJarSnapshotter(Hasher hasher, ClassDependenciesAnalyzer analyzer, JarSnapshotCache cache) { this.snapshotter = new DefaultJarSnapshotter(hasher, analyzer); this.hasher = hasher; this.cache = cache; } public JarSnapshot createSnapshot(final JarArchive jarArchive) { final byte[] hash = hasher.hash(jarArchive.file); return cache.get(hash, new Factory<JarSnapshot>() { public JarSnapshot create() { return snapshotter.createSnapshot(hash, jarArchive); } }); } }
[ "szczepiq@gmail.com" ]
szczepiq@gmail.com
81aa21c05b8b7ec5591772cb50a6dd75ef355bce
f7057db97bfcf0539163dae5746a6883fda0e189
/src/com/powerdata/openpa/impl/SVCSubList.java
8610b85b7efc8436ec36cd861b07012ac9769db6
[]
no_license
szuloaga/openpa
4fadb2a153fbf05c0c4d4d8d123377e2aceba862
4efb602bcb2989d9b2679dd07132bf69c21af409
refs/heads/master
2020-07-15T07:54:43.938891
2016-03-10T21:20:15
2016-03-10T21:20:15
53,516,454
0
0
null
2016-03-10T21:20:15
2016-03-09T17:15:10
Java
UTF-8
Java
false
false
4,370
java
package com.powerdata.openpa.impl; import com.powerdata.openpa.Bus; import com.powerdata.openpa.ListMetaType; import com.powerdata.openpa.PAModelException; import com.powerdata.openpa.SVC; import com.powerdata.openpa.SVC.SVCState; import com.powerdata.openpa.SVCList; public class SVCSubList extends OneTermDevSubList<SVC> implements SVCList { SVCList _src; public SVCSubList(SVCList src, int[] ndx) { super(src, ndx); _src = src; } @Override public SVC get(int index) { return new SVC(this, index); } @Override public float getMinQ(int ndx) throws PAModelException { return _src.getMinQ(_ndx[ndx]); } @Override public void setMinQ(int ndx, float b) throws PAModelException { _src.setMinQ(_ndx[ndx], b); } @Override public float[] getMinQ() throws PAModelException { return mapFloat(_src.getMinQ()); } @Override public void setMinQ(float[] b) throws PAModelException { for(int i=0; i < _size; ++i) _src.setMinQ(_ndx[i], b[i]); } @Override public float getMaxQ(int ndx) throws PAModelException { return _src.getMaxQ(_ndx[ndx]); } @Override public void setMaxQ(int ndx, float b) throws PAModelException { _src.setMaxQ(_ndx[ndx], b); } @Override public float[] getMaxQ() throws PAModelException { return mapFloat(_src.getMaxQ()); } @Override public void setMaxQ(float[] b) throws PAModelException { for(int i=0; i < _size; ++i) _src.setMaxQ(_ndx[i], b[i]); } @Override public boolean isRegKV(int ndx) throws PAModelException { return _src.isRegKV(_ndx[ndx]); } @Override public void setRegKV(int ndx, boolean reg) throws PAModelException { _src.setRegKV(_ndx[ndx], reg); } @Override public boolean[] isRegKV() throws PAModelException { return mapBool(_src.isRegKV()); } @Override public void setRegKV(boolean[] reg) throws PAModelException { for(int i=0; i < _size; ++i) _src.setRegKV(_ndx[i], reg[i]); } @Override public float getVS(int ndx) throws PAModelException { return _src.getVS(_ndx[ndx]); } @Override public void setVS(int ndx, float kv) throws PAModelException { _src.setVS(_ndx[ndx], kv); } @Override public float[] getVS() throws PAModelException { return mapFloat(_src.getVS()); } @Override public void setVS(float[] kv) throws PAModelException { for(int i=0; i < _size; ++i) _src.setVS(_ndx[i], kv[i]); } @Override public Bus getRegBus(int ndx) throws PAModelException { return _src.getRegBus(_ndx[ndx]); } @Override public void setRegBus(int ndx, Bus b) throws PAModelException { _src.setRegBus(_ndx[ndx], b); } @Override public Bus[] getRegBus() throws PAModelException { return mapObject(_src.getRegBus()); } @Override public void setRegBus(Bus[] b) throws PAModelException { for(int i=0; i < _size; ++i) _src.setRegBus(_ndx[i], b[i]); } @Override public ListMetaType getListMeta() { return ListMetaType.SVC; } @Override public float getSlope(int ndx) throws PAModelException { return _src.getSlope(_ndx[ndx]); } @Override public void setSlope(int ndx, float slope) throws PAModelException { _src.setSlope(_ndx[ndx], slope); } @Override public float[] getSlope() throws PAModelException { return mapFloat(_src.getSlope()); } @Override public void setSlope(float[] slope) throws PAModelException { for(int i=0; i < _size; ++i) _src.setSlope(_ndx[i], slope[i]); } @Override public SVCState getOutputMode(int ndx) throws PAModelException { return _src.getOutputMode(_ndx[ndx]); } @Override public SVCState[] getOutputMode() throws PAModelException { return this.mapObject(_src.getOutputMode()); } @Override public void setOutputMode(int ndx, SVCState m) throws PAModelException { _src.setOutputMode(_ndx[ndx], m); } @Override public void setOutputMode(SVCState[] m) throws PAModelException { for(int i=0; i < _size; ++i) _src.setOutputMode(_ndx[i], m[i]); } @Override public float getQS(int ndx) throws PAModelException { return _src.getQS(_ndx[ndx]); } @Override public float[] getQS() throws PAModelException { return mapFloat(_src.getQS()); } @Override public void setQS(int ndx, float mvar) throws PAModelException { _src.setQS(_ndx[ndx], mvar); } @Override public void setQS(float[] mvar) throws PAModelException { for(int i=0; i < _size; ++i) _src.setQS(_ndx[i], mvar[i]); } }
[ "chris@powerdata.com" ]
chris@powerdata.com
372670295a275f0b16a310780f989b3d4df478d9
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/jaxrs-resteasy/generated/src/gen/java/org/openapitools/model/ComDayCqDamS7damCommonAnalyticsImplSiteCatalystReportRunnerProperties.java
3edb2285932ce1e15f90224e7c2157bd4f37460e
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
2,913
java
package org.openapitools.model; import java.util.Objects; import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import org.openapitools.model.ConfigNodePropertyBoolean; import org.openapitools.model.ConfigNodePropertyString; import javax.validation.constraints.*; import io.swagger.annotations.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", date = "2019-08-05T00:59:30.156Z[GMT]") public class ComDayCqDamS7damCommonAnalyticsImplSiteCatalystReportRunnerProperties { private ConfigNodePropertyString schedulerExpression = null; private ConfigNodePropertyBoolean schedulerConcurrent = null; /** **/ @ApiModelProperty(value = "") @JsonProperty("scheduler.expression") public ConfigNodePropertyString getSchedulerExpression() { return schedulerExpression; } public void setSchedulerExpression(ConfigNodePropertyString schedulerExpression) { this.schedulerExpression = schedulerExpression; } /** **/ @ApiModelProperty(value = "") @JsonProperty("scheduler.concurrent") public ConfigNodePropertyBoolean getSchedulerConcurrent() { return schedulerConcurrent; } public void setSchedulerConcurrent(ConfigNodePropertyBoolean schedulerConcurrent) { this.schedulerConcurrent = schedulerConcurrent; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ComDayCqDamS7damCommonAnalyticsImplSiteCatalystReportRunnerProperties comDayCqDamS7damCommonAnalyticsImplSiteCatalystReportRunnerProperties = (ComDayCqDamS7damCommonAnalyticsImplSiteCatalystReportRunnerProperties) o; return Objects.equals(schedulerExpression, comDayCqDamS7damCommonAnalyticsImplSiteCatalystReportRunnerProperties.schedulerExpression) && Objects.equals(schedulerConcurrent, comDayCqDamS7damCommonAnalyticsImplSiteCatalystReportRunnerProperties.schedulerConcurrent); } @Override public int hashCode() { return Objects.hash(schedulerExpression, schedulerConcurrent); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComDayCqDamS7damCommonAnalyticsImplSiteCatalystReportRunnerProperties {\n"); sb.append(" schedulerExpression: ").append(toIndentedString(schedulerExpression)).append("\n"); sb.append(" schedulerConcurrent: ").append(toIndentedString(schedulerConcurrent)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
7161efed46a3009d8030c337028c5f7733d374c4
750d06d12ce6e408301fdf9bdbb08ddef0b6f1f1
/Databases_Advanced/XML-Processing-Exercises/CarDealer/src/main/java/com/cardealer/model/entity/Car.java
89db3c3ca9fbbcb8608965a9d66979a04856db5d
[]
no_license
Deianov/Java-DB
e16245af70527a33efa9789d03276b449bbee70c
e7023500f76e84f220f621a598e460177ce327d3
refs/heads/master
2022-07-31T02:31:18.508054
2022-06-23T11:06:28
2022-06-23T11:06:28
239,293,956
1
3
null
2022-06-23T11:06:29
2020-02-09T11:35:24
Java
UTF-8
Java
false
false
1,046
java
package com.cardealer.model.entity; import javax.persistence.*; import java.util.Set; @Entity @Table(name = "cars") public class Car extends BaseEntity{ private String make; private String model; private int travelledDistance; private Set<Part> parts; public Car() { } @Column(name = "make") public String getMake() { return make; } public void setMake(String make) { this.make = make; } @Column(name = "model") public String getModel() { return model; } public void setModel(String model) { this.model = model; } @Column(name = "travelled_distance") public int getTravelledDistance() { return travelledDistance; } public void setTravelledDistance(int travelledDistance) { this.travelledDistance = travelledDistance; } @ManyToMany(fetch = FetchType.EAGER) public Set<Part> getParts() { return parts; } public void setParts(Set<Part> parts) { this.parts = parts; } }
[ "44973718+Deianov@users.noreply.github.com" ]
44973718+Deianov@users.noreply.github.com
270149034f2011fcb1cc981f0ac5b9e79f18e1e6
3cc644883c3be68dc4aca8d9e35941a592f33670
/testing/fakedata/integtests/src/test/java/org/apache/isis/testing/fakedata/integtests/tests/Bootstrap_IntegTest.java
45e319dd88930b9331262baedd05a2010e4485f9
[ "Apache-2.0" ]
permissive
IsisVgoddess/isis
0e09eba4d9a791612dd03b01898d8574452b29a9
d34e5ed20578d274635424a9f41b4450c5109365
refs/heads/master
2023-03-07T08:57:38.060227
2022-03-11T05:55:55
2022-03-11T05:55:55
208,384,527
1
0
Apache-2.0
2023-03-06T22:25:01
2019-09-14T03:42:20
Java
UTF-8
Java
false
false
1,050
java
/* * * Copyright 2012-2014 Eurocommercial Properties NV * * * Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.isis.testing.fakedata.integtests.tests; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; import org.apache.isis.testing.fakedata.integtests.FakeDataModuleIntegTestAbstract; @Transactional public class Bootstrap_IntegTest extends FakeDataModuleIntegTestAbstract { @Test public void bootstraps_ok() throws Exception { } }
[ "dan@haywood-associates.co.uk" ]
dan@haywood-associates.co.uk
ebf53f70de1590db9d66b2d35f17c934f246e6de
4d3cfb7ed9585abd34daee0f2d5817de9cb09439
/src/test/java/com/tolochko/periodicals/model/controller/util/HttpUtilTest.java
aa224506ff59edf20993eb9cfb4294b5598933d7
[]
no_license
timatimtem/periodical
4b4e9747e105d1cabb921b29346a464167aa16bd
985abee8ba81dc7a77477e9adc1e9f4fc0181c63
refs/heads/master
2022-05-03T01:17:46.085425
2017-05-15T12:22:54
2017-05-15T12:22:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,760
java
package com.tolochko.periodicals.model.controller.util; import com.tolochko.periodicals.controller.util.HttpUtil; import com.tolochko.periodicals.model.domain.periodical.Periodical; import com.tolochko.periodicals.model.domain.periodical.PeriodicalCategory; import com.tolochko.periodicals.model.domain.user.User; import org.junit.Before; import org.junit.Test; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; public class HttpUtilTest { private static final int USER_ID = 2; private HttpSession session; private HttpServletRequest request; @Before public void setup() { User user = new User(); user.setId(USER_ID); session = mock(HttpSession.class); when(session.getAttribute("currentUser")).thenReturn(user); request = mock(HttpServletRequest.class); when(request.getSession()).thenReturn(session); } @Test public void getFirstIdFromUri_Should_ReturnCorrectId() throws Exception { String uri = "/app/periodicals/2/invoices/10/pay"; int expected = 2; int actual = HttpUtil.getFirstIdFromUri(uri); assertEquals(expected, actual); } @Test public void getUserIdFromSession_Should_ReturnCorrectId() throws Exception { long expected = 2; long actual = HttpUtil.getUserIdFromSession(request); assertEquals(expected, actual); } @Test public void getPeriodicalFromRequest_Should_ReturnPeriodical() { when(request.getSession()).thenReturn(session); when(request.getParameter("entityId")).thenReturn("10"); when(request.getParameter("periodicalName")).thenReturn("Test Name"); when(request.getParameter("periodicalCategory")).thenReturn("news"); when(request.getParameter("periodicalPublisher")).thenReturn("Test Publisher"); when(request.getParameter("periodicalDescription")).thenReturn("Test description"); when(request.getParameter("periodicalCost")).thenReturn("99"); when(request.getParameter("periodicalStatus")).thenReturn("active"); Periodical periodical = HttpUtil.getPeriodicalFromRequest(request); assertEquals(10, periodical.getId()); assertEquals("Test Name", periodical.getName()); assertEquals(PeriodicalCategory.NEWS, periodical.getCategory()); assertEquals("Test Publisher", periodical.getPublisher()); assertEquals("Test description", periodical.getDescription()); assertEquals(99, periodical.getOneMonthCost()); assertEquals(Periodical.Status.ACTIVE, periodical.getStatus()); } }
[ "timur10645@icloud.com" ]
timur10645@icloud.com
f9274f3a9183df7114cf066cacda6a39f9b004f1
1c6d19307dc5ba88166be0ebb1f8a872ffb6ffe5
/examples/oauth2-example/authorization-server/src/main/java/ru/otus/authorizationserver/config/SecurityConfig.java
9bae433cf6baece242e7c087ea3cee71b49cd504
[]
no_license
coungard/Spring
ef88c5976ed55afe763b27e517a5db976ee4e61f
5db19d4fbf20492c37daa03d012cfa1fcb8440cb
refs/heads/master
2022-12-04T17:21:49.156002
2020-08-01T07:42:14
2020-08-01T07:42:14
284,446,663
1
0
null
2020-08-02T11:18:44
2020-08-02T11:18:43
null
UTF-8
Java
false
false
1,713
java
package ru.otus.authorizationserver.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.password.NoOpPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import ru.otus.authorizationserver.services.InMemoryAuthenticationProvider; @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private UserDetailsService userDetailsService; @Override @Bean public AuthenticationManager authenticationManagerBean() throws Exception { return super.authenticationManagerBean(); } @Bean public PasswordEncoder passwordEncoder() { return NoOpPasswordEncoder.getInstance(); } @Autowired public void globalUserDetails(AuthenticationManagerBuilder auth) throws Exception { auth.authenticationProvider(new InMemoryAuthenticationProvider(userDetailsService)); } }
[ "stvort@mail.ru" ]
stvort@mail.ru
1728d77c2c5c7f64b30a50d9b15a3cc36e233fd7
cd892d377017f1ce50e6a92aa19c4bf64cdc31af
/src/main/java/com/gdufe/exercise_app/controller/AddressController.java
36472df6cad7052c46a1ce0511ae78c1b6a21aa3
[]
no_license
gdufexzq/exercise_app
bc90c2a2f810d8f1713527007cebdb40acdafca0
a2a235600726671bea7601b2fa0a9c1316f38bf2
refs/heads/master
2021-11-03T18:12:28.440708
2019-04-26T09:42:09
2019-04-26T09:42:09
182,353,422
0
0
null
null
null
null
UTF-8
Java
false
false
2,776
java
package com.gdufe.exercise_app.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.gdufe.exercise_app.Token.TokenInfoMap; import com.gdufe.exercise_app.aop.TokenAuth; import com.gdufe.exercise_app.entity.Address; import com.gdufe.exercise_app.entity.Token; import com.gdufe.exercise_app.entity.TokenInfo; import com.gdufe.exercise_app.service.AddressService; import com.gdufe.exercise_app.service.TokenService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.Date; import java.util.List; /** * <p> * 前端控制器 * </p> * * @author xuzhiquan * @since 2019-03-19 */ @RestController @RequestMapping("/address") public class AddressController { @Autowired private TokenService tokenService; @Autowired private AddressService addressService; // public Token getTokenInfo(String token) { // QueryWrapper tokenWrapper = new QueryWrapper(); // tokenWrapper.eq("token", token); // List<Token> tokenInfo = tokenService.list(tokenWrapper); // // if(tokenInfo != null){ // return tokenInfo.get(0); // }else { // return null; // } // } /** * 添加用户的收货地址 */ @RequestMapping("/addAddress") @TokenAuth public void addAddress(@RequestParam String token, @RequestParam String addressName, @RequestParam String addressPhone, @RequestParam String addressPCC, @RequestParam String addressDetail) { TokenInfo tokenInfo = (TokenInfo) TokenInfoMap.tokenMap.get(token); String openId = tokenInfo.getOpen_id(); Address address = new Address(); address.setCreateTime(new Date().getTime()); address.setModifyTime(new Date().getTime()); address.setOpenId(openId); address.setUserName(addressName); address.setUserPhone(addressPhone); address.setUserProvinceCityCounty(addressPCC); address.setUserDetailAddress(addressDetail); addressService.save(address); } @RequestMapping("/addressList") @TokenAuth public List addressList(@RequestParam String token) { TokenInfo tokenInfo = (TokenInfo) TokenInfoMap.tokenMap.get(token); String openId = tokenInfo.getOpen_id(); QueryWrapper addressWrapper = new QueryWrapper(); addressWrapper.eq("open_id", openId); List addressList = addressService.list(addressWrapper); return addressList; } }
[ "goodMorning_glb@atguigu.com" ]
goodMorning_glb@atguigu.com
c1a36e0acc27f3c03b6e813b934ba6fb50f22a4b
bebacae90aa17ad2ab4c9111a2e5cfa0f8cf13a6
/PrimeFaces/Primefaces-Wizard-Sample/src/main/java/com/journaldev/data/Tutorial.java
bc3f2b8cf90e429accdae8d7fbac04ff53a49ba5
[ "MIT" ]
permissive
ayanakshi/journaldev
5b0d73c53bc9a5292a8629c6c0320196abeab76e
a61cba22232e8cc9c40264c31aaba0bd17ff2522
refs/heads/master
2020-03-27T21:52:15.081736
2018-08-31T11:51:28
2018-08-31T11:51:28
147,182,378
1
0
MIT
2018-09-03T09:28:38
2018-09-03T09:28:38
null
UTF-8
Java
false
false
1,319
java
package com.journaldev.data; public class Tutorial { private String tutorialName; private String tutorialInstructor; private String tutorialPeriod; private String tutorialPrice; private String tutorialStartDate; private String tutorialEndDate; public String getTutorialName() { return tutorialName; } public void setTutorialName(String tutorialName) { this.tutorialName = tutorialName; } public String getTutorialInstructor() { return tutorialInstructor; } public void setTutorialInstructor(String tutorialInstructor) { this.tutorialInstructor = tutorialInstructor; } public String getTutorialPeriod() { return tutorialPeriod; } public void setTutorialPeriod(String tutorialPeriod) { this.tutorialPeriod = tutorialPeriod; } public String getTutorialPrice() { return tutorialPrice; } public void setTutorialPrice(String tutorialPrice) { this.tutorialPrice = tutorialPrice; } public String getTutorialStartDate() { return tutorialStartDate; } public void setTutorialStartDate(String tutorialStartDate) { this.tutorialStartDate = tutorialStartDate; } public String getTutorialEndDate() { return tutorialEndDate; } public void setTutorialEndDate(String tutorialEndDate) { this.tutorialEndDate = tutorialEndDate; } }
[ "pankaj.0323@gmail.com" ]
pankaj.0323@gmail.com
6758307d3326dfdb7d85394781c14ee886b92163
ef23d9b833a84ad79a9df816bd3fd1321b09851e
/L2J_SunriseProject_Data/dist/game/data/scripts/events/TheValentineEvent/TheValentineEvent.java
7745609367ed9946ff259f71ffeccd987855a5ec
[]
no_license
nascimentolh/JBlueHeart-Source
c05c07137a7a4baf5fe8a793375f1700618ef12c
4179e6a6dbd0f74d614d7cc1ab7eb90ff41af218
refs/heads/master
2022-05-28T22:05:06.858469
2020-04-26T15:22:17
2020-04-26T15:22:17
259,045,356
1
0
null
null
null
null
UTF-8
Java
false
false
1,951
java
/* * Copyright (C) 2004-2015 L2J DataPack * * This file is part of L2J DataPack. * * L2J DataPack is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * L2J DataPack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package events.TheValentineEvent; import l2r.gameserver.enums.QuestSound; import l2r.gameserver.model.actor.L2Npc; import l2r.gameserver.model.actor.instance.L2PcInstance; import l2r.gameserver.model.event.LongTimeEvent; /** * The Valentine Event event AI. * @author Gnacik */ public final class TheValentineEvent extends LongTimeEvent { // NPC private static final int NPC = 4301; // Item private static final int RECIPE = 20191; // Misc private static final String COMPLETED = TheValentineEvent.class.getSimpleName() + "_completed"; public TheValentineEvent() { super(TheValentineEvent.class.getSimpleName(), "events"); addStartNpc(NPC); addFirstTalkId(NPC); addTalkId(NPC); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { String htmltext = event; if (event.equalsIgnoreCase("4301-3.htm")) { if (player.getVariables().getBoolean(COMPLETED, false)) { htmltext = "4301-4.htm"; } else { giveItems(player, RECIPE, 1); playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); } } return htmltext; } @Override public String onFirstTalk(L2Npc npc, L2PcInstance player) { return npc.getId() + ".htm"; } }
[ "luizh.nnh@gmail.com" ]
luizh.nnh@gmail.com
dbfc012c8fa4c404814f5611a6b7b9a2d6cf7651
ea65710a42cfd1a0d4c4141ac5ba297c5e6287aa
/FoodSpoty/FoodSpoty/src/com/google/android/gms/fitness/request/DataTypeCreateRequest.java
0b3f163fe08ecc5e28f2c203ea5f56eeb28af1d7
[]
no_license
kanwarbirsingh/ANDROID
bc27197234c4c3295d658d73086ada47a0833d07
f84b29f0f6bd483d791983d5eeae75555e997c36
refs/heads/master
2020-03-18T02:26:55.720337
2018-05-23T18:05:47
2018-05-23T18:05:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,698
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 com.google.android.gms.fitness.request; import android.os.Parcel; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; import com.google.android.gms.fitness.data.Field; import com.google.android.gms.internal.jv; import com.google.android.gms.internal.jx; import java.util.ArrayList; import java.util.Collections; import java.util.List; // Referenced classes of package com.google.android.gms.fitness.request: // i public class DataTypeCreateRequest implements SafeParcelable { public static class Builder { private List Uv; private String mName; static String a(Builder builder) { return builder.mName; } static List b(Builder builder) { return builder.Uv; } public Builder addField(Field field) { if (!Uv.contains(field)) { Uv.add(field); } return this; } public Builder addField(String s, int j) { boolean flag; if (s != null || !s.isEmpty()) { flag = true; } else { flag = false; } jx.b(flag, "Invalid name specified"); return addField(new Field(s, j)); } public DataTypeCreateRequest build() { boolean flag1 = true; boolean flag; if (mName != null) { flag = true; } else { flag = false; } jx.a(flag, "Must set the name"); if (!Uv.isEmpty()) { flag = flag1; } else { flag = false; } jx.a(flag, "Must specify the data fields"); return new DataTypeCreateRequest(this); } public Builder setName(String s) { mName = s; return this; } public Builder() { Uv = new ArrayList(); } } public static final android.os.Parcelable.Creator CREATOR = new i(); private final int CK; private final List Uv; private final String mName; DataTypeCreateRequest(int j, String s, List list) { CK = j; mName = s; Uv = Collections.unmodifiableList(list); } private DataTypeCreateRequest(Builder builder) { CK = 1; mName = Builder.a(builder); Uv = Collections.unmodifiableList(Builder.b(builder)); } private boolean a(DataTypeCreateRequest datatypecreaterequest) { return jv.equal(mName, datatypecreaterequest.mName) && jv.equal(Uv, datatypecreaterequest.Uv); } public int describeContents() { return 0; } public boolean equals(Object obj) { return obj == this || (obj instanceof DataTypeCreateRequest) && a((DataTypeCreateRequest)obj); } public List getFields() { return Uv; } public String getName() { return mName; } int getVersionCode() { return CK; } public int hashCode() { return jv.hashCode(new Object[] { mName, Uv }); } public String toString() { return jv.h(this).a("name", mName).a("fields", Uv).toString(); } public void writeToParcel(Parcel parcel, int j) { i.a(this, parcel, j); } }
[ "singhkanwar235@gmail.com" ]
singhkanwar235@gmail.com
8e93b80c8774f4fbaa46e519b1ff075d37f1575a
89c34fa76bccdbd44f10416e6529899f005aeea1
/src/test/java/com/chinesedreamer/eir/task/service/impl/PoZamzarFileServiceImplTest.java
ae7738bafdb5811f242c5597e0a71f243e8bfb2c
[]
no_license
Sos10086tsj/eir
f734971e1b426ef7bc7668d33eb9f8dd280833cb
fd31ba4668d2d54ea6245baa924f93f0fe06c56c
refs/heads/master
2020-07-11T02:09:28.896038
2016-12-06T06:05:30
2016-12-06T06:05:30
74,007,108
0
0
null
null
null
null
UTF-8
Java
false
false
504
java
package com.chinesedreamer.eir.task.service.impl; import javax.annotation.Resource; import org.junit.Test; import com.chinesedreamer.eir.base.BaseTest; import com.chinesedreamer.eir.task.service.PoZamzarFileService; /** * Description: * Auth:Paris * Date:Nov 25, 2016 **/ public class PoZamzarFileServiceImplTest extends BaseTest{ @Resource private PoZamzarFileService poZamzarFileService; @Test public void testUpdate2DownloadFile() { this.poZamzarFileService.update2DownloadFile(); } }
[ "paristao1989@gmail.com" ]
paristao1989@gmail.com
3d27ff4932f6c428fbf86e58fc5fe912a5aae734
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/deeplearning4j--deeplearning4j/3c308bfb0484b23df9759228f1d217e0c7122dea/before/MnistDataFetcher.java
fe7f554c43858a6304c1f3fa4cb01f68659563f4
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,666
java
package org.deeplearning4j.datasets.fetchers; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.deeplearning4j.base.MnistFetcher; import org.deeplearning4j.berkeley.Pair; import org.deeplearning4j.datasets.MnistManager; import org.deeplearning4j.util.ArrayUtil; import org.deeplearning4j.util.MatrixUtil; import org.jblas.DoubleMatrix; /** * Data fetcher for the MNIST dataset * @author Adam Gibson * */ public class MnistDataFetcher extends BaseDataFetcher { private transient MnistManager man; public final static int NUM_EXAMPLES = 60000; public MnistDataFetcher() throws IOException { if(!new File("/tmp/mnist").exists()) new MnistFetcher().downloadAndUntar(); man = new MnistManager("/tmp/MNIST/" + MnistFetcher.trainingFilesFilename_unzipped,"/tmp/MNIST/" + MnistFetcher.trainingFileLabelsFilename_unzipped); numOutcomes = 10; totalExamples = NUM_EXAMPLES; //1 based cursor cursor = 1; man.setCurrent(cursor); int[][] image; try { image = man.readImage(); } catch (IOException e) { throw new IllegalStateException("Unable to read image"); } inputColumns = ArrayUtil.flatten(image).length; } @Override public void fetch(int numExamples) { if(!hasMore()) throw new IllegalStateException("Unable to get more; there are no more images"); //we need to ensure that we don't overshoot the number of examples total List<Pair<DoubleMatrix,DoubleMatrix>> toConvert = new ArrayList<>(); for(int i = 0; i < numExamples; i++,cursor++) { if(!hasMore()) break; if(man == null) { try { man = new MnistManager("/tmp/MNIST/" + MnistFetcher.trainingFilesFilename_unzipped,"/tmp/MNIST/" + MnistFetcher.trainingFileLabelsFilename_unzipped); } catch (IOException e) { throw new RuntimeException(e); } } man.setCurrent(cursor); //note data normalization try { DoubleMatrix in = MatrixUtil.toMatrix(ArrayUtil.flatten(man.readImage())); for(int d = 0; d < in.length; d++) { if(in.get(d) > 30) { in.put(d,1); } else in.put(d,0); } DoubleMatrix out = createOutputVector(man.readLabel()); boolean found = false; for(int col = 0; col < out.length; col++) { if(out.get(col) > 0) { found = true; break; } } if(!found) throw new IllegalStateException("Found a matrix without an outcome"); toConvert.add(new Pair<>(in,out)); } catch (IOException e) { throw new IllegalStateException("Unable to read image"); } } initializeCurrFromList(toConvert); } @Override public void reset() { cursor = 1; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
2583bdbc46ace7964b70df4d2935115d92e19023
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_718c928cd804ea1ec4e4001eb6024d3a00b7feaa/ViewSignature/11_718c928cd804ea1ec4e4001eb6024d3a00b7feaa_ViewSignature_t.java
e45a75325b84f6e8fd7d949b00ad42461ea8dc53
[]
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,612
java
package com.github.rnewson.couchdb.lucene; import java.io.File; import java.io.UnsupportedEncodingException; import java.math.BigInteger; import java.nio.charset.Charset; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; /** * A ViewSignature is an opaque object intended to be used as a key to a Lucene * index. * * @author robertnewson * */ public final class ViewSignature { private final String dbname; private final String view; /** * Creates a {@link ViewSignature} derived from a Javascript view function. * * @param dbname * @param viewFunction * @return */ public ViewSignature(final String dbname, final String viewFunction) { try { final MessageDigest md = MessageDigest.getInstance("MD5"); md.update(dbname.getBytes("UTF-8")); md.update((byte) 0); md.update(viewFunction.replaceAll("\\s+", "").getBytes("UTF-8")); final byte[] digest = md.digest(); this.dbname = dbname; view = new BigInteger(1, digest).toString(16); } catch (final NoSuchAlgorithmException e) { throw new Error("MD5 support missing."); } catch (final UnsupportedEncodingException e) { throw new Error("UTF-8 support missing."); } } public String getDatabaseName() { return dbname; } public File toFile(final File base) { return new File(new File(base, dbname), this + ".index"); } @Override public String toString() { return view; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((dbname == null) ? 0 : dbname.hashCode()); result = prime * result + ((view == null) ? 0 : view.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; ViewSignature other = (ViewSignature) obj; if (dbname == null) { if (other.dbname != null) return false; } else if (!dbname.equals(other.dbname)) return false; if (view == null) { if (other.view != null) return false; } else if (!view.equals(other.view)) return false; return true; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
87635f304058c4e1445a880c1d9e0d028cb90dbb
673be51c5c53a0af5e5126346e457225fc5add8a
/src/main/java/com/tencentcloudapi/aai/v20180522/models/SimultaneousInterpretingResponse.java
a9e237c1b5fdd80f9aa1757797fece530a971c45
[ "Apache-2.0" ]
permissive
15940466354/tencentcloud-sdk-java
ff5d26152d99acdd57129f6ceb0fd4e4f114ce70
cd5642be657550790f383472e97ee695cdf66a4f
refs/heads/master
2020-03-29T09:48:57.898466
2018-09-21T04:09:39
2018-09-21T04:09:39
149,775,137
1
0
Apache-2.0
2018-09-21T14:31:47
2018-09-21T14:31:47
null
UTF-8
Java
false
false
3,065
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.aai.v20180522.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class SimultaneousInterpretingResponse extends AbstractModel{ /** * 语音识别的结果 */ @SerializedName("AsrText") @Expose private String AsrText; /** * 机器翻译的结果 */ @SerializedName("NmtText") @Expose private String NmtText; /** * 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 */ @SerializedName("RequestId") @Expose private String RequestId; /** * 获取语音识别的结果 * @return AsrText 语音识别的结果 */ public String getAsrText() { return this.AsrText; } /** * 设置语音识别的结果 * @param AsrText 语音识别的结果 */ public void setAsrText(String AsrText) { this.AsrText = AsrText; } /** * 获取机器翻译的结果 * @return NmtText 机器翻译的结果 */ public String getNmtText() { return this.NmtText; } /** * 设置机器翻译的结果 * @param NmtText 机器翻译的结果 */ public void setNmtText(String NmtText) { this.NmtText = NmtText; } /** * 获取唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 * @return RequestId 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 */ public String getRequestId() { return this.RequestId; } /** * 设置唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 * @param RequestId 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } /** * 内部实现,用户禁止调用 */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "AsrText", this.AsrText); this.setParamSimple(map, prefix + "NmtText", this.NmtText); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
6cbe85ca0679e45cb1db483c8da873d050c507a1
e48c935475551ad57aa9794a11cb423b0a8f6c33
/ggcloud-discovery/ggcloud-discovery-client/src/main/java/com/xzcode/ggcloud/discovery/client/DiscoveryClient.java
1afe8e3a02b20ff494cb244da4755dafce95c72c
[]
no_license
xzcode/ggcloud
845eac12a7f2db6f6440b1b1faf3c6a2299989ac
29ff95a659001fbdecf28d8f918af8dafb6f0e93
refs/heads/master
2023-06-09T02:11:01.283919
2020-04-17T03:12:41
2020-04-17T03:12:41
212,061,071
2
0
null
2023-05-26T22:16:38
2019-10-01T09:46:07
Java
UTF-8
Java
false
false
5,686
java
package com.xzcode.ggcloud.discovery.client; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import com.xzcode.ggcloud.discovery.client.config.DiscoveryClientConfig; import com.xzcode.ggcloud.discovery.client.events.ConnCloseEventListener; import com.xzcode.ggcloud.discovery.client.events.ConnOpenEventListener; import com.xzcode.ggcloud.discovery.client.handler.AddServiceRespHandler; import com.xzcode.ggcloud.discovery.client.handler.RegisterRespHandler; import com.xzcode.ggcloud.discovery.client.handler.ServiceListRespHandler; import com.xzcode.ggcloud.discovery.client.handler.ServiceUnregisterRespHandler; import com.xzcode.ggcloud.discovery.client.handler.ServiceUpdateRespHandler; import com.xzcode.ggcloud.discovery.client.listener.IClientRegisterSuccessListener; import com.xzcode.ggcloud.discovery.client.registry.RegistryInfo; import com.xzcode.ggcloud.discovery.common.message.req.DiscoveryServiceListReq; import com.xzcode.ggcloud.discovery.common.message.req.DiscoveryServiceUpdateReq; import com.xzcode.ggcloud.discovery.common.message.resp.DiscoveryAddServiceResp; import com.xzcode.ggcloud.discovery.common.message.resp.DiscoveryServiceListResp; import com.xzcode.ggcloud.discovery.common.message.resp.DiscoveryServiceRegisterResp; import com.xzcode.ggcloud.discovery.common.message.resp.DiscoveryServiceUnregisterResp; import com.xzcode.ggcloud.discovery.common.message.resp.DiscoveryServiceUpdateResp; import com.xzcode.ggcloud.discovery.common.service.ServiceInfo; import xzcode.ggserver.core.client.GGClient; import xzcode.ggserver.core.client.config.GGClientConfig; import xzcode.ggserver.core.common.constant.ProtocolTypeConstants; import xzcode.ggserver.core.common.event.GGEvents; import xzcode.ggserver.core.common.session.GGSession; import xzcode.ggserver.core.common.utils.logger.GGLoggerUtil; public class DiscoveryClient { private DiscoveryClientConfig config; protected List<IClientRegisterSuccessListener> registerSuccessListeners = new ArrayList<>(); public DiscoveryClient(DiscoveryClientConfig config) { this.config = config; this.config.setDiscoveryClient(this); } public void start() { GGClientConfig ggConfig = new GGClientConfig(); ggConfig.setPingPongEnabled(true); ggConfig.setPrintPingPongInfo(config.isPrintPingPongInfo()); ggConfig.setTaskExecutor(config.getTaskExecutor()); ggConfig.setProtocolType(ProtocolTypeConstants.TCP); ggConfig.init(); GGClient ggClient = new GGClient(ggConfig); config.setGGclient(ggClient); ggClient.onMessage(DiscoveryServiceRegisterResp.ACTION, new RegisterRespHandler(config)); ggClient.onMessage(DiscoveryServiceListResp.ACTION, new ServiceListRespHandler(config)); ggClient.onMessage(DiscoveryServiceUpdateResp.ACTION, new ServiceUpdateRespHandler(config)); ggClient.onMessage(DiscoveryServiceUnregisterResp.ACTION, new ServiceUnregisterRespHandler(config)); ggClient.onMessage(DiscoveryAddServiceResp.ACTION, new AddServiceRespHandler(config)); ggClient.addEventListener(GGEvents.Connection.CLOSED, new ConnCloseEventListener(config)); ggClient.addEventListener(GGEvents.Connection.OPENED, new ConnOpenEventListener(config)); connect(); startCheckTask(); } /** * 启动检查任务 * * @author zai * 2020-02-10 18:58:31 */ public void startCheckTask() { this.config.getTaskExecutor().scheduleWithFixedDelay(5, 10, TimeUnit.SECONDS, () -> { checkAndUpdateService(); }); } /** * 检查并更新服务信息到注册中心 * * @author zai * 2020-02-10 19:00:52 */ public void checkAndUpdateService() { AtomicInteger extraDataUpdateTimes = config.getCustomDataUpdateTimes(); int times = extraDataUpdateTimes.get(); if (times > 0) { this.updateService(); extraDataUpdateTimes.getAndAdd(-times); } } public void connect() { GGClient ggClient = config.getGGclient(); RegistryInfo registry = config.getRegistryManager().getRandomRegistry(); ggClient.connect(registry.getDomain(), registry.getPort()) .addListener(f -> { if (!f.isSuccess()) { //连接失败,进行进行重连操作 GGLoggerUtil.getLogger(this).info("Discovery Client Connect Server[{}:{}] Failed!",registry.getDomain(), registry.getPort()); ggClient.schedule(config.getTryRegisterInterval(), () -> { connect(); }); return; } GGLoggerUtil.getLogger(this).info("Discovery Client Connect Server[{}:{}] Successfully!",registry.getDomain(), registry.getPort()); }); } /** * 更新服务 * * @author zai * 2020-02-04 17:11:08 */ private void updateService() { GGSession session = config.getSession(); if (session == null) { return; } DiscoveryServiceUpdateReq req = new DiscoveryServiceUpdateReq(); ServiceInfo serviceInfo = new ServiceInfo(); serviceInfo.setRegion(config.getRegion()); serviceInfo.setZone(config.getZone()); serviceInfo.setServiceId(config.getServiceId()); serviceInfo.setServiceName(config.getServiceName()); serviceInfo.setCustomData(config.getCustomData()); req.setServiceInfo(serviceInfo); session.send(req); } public void syncServiceInfos() { GGSession session = config.getSession(); if (session != null) { session.send(DiscoveryServiceListReq.DEFAULT_INSTANT); } } public void addRegisterSuccessListener(IClientRegisterSuccessListener listener) { this.registerSuccessListeners.add(listener); } public List<IClientRegisterSuccessListener> getRegisterSuccessListeners() { return registerSuccessListeners; } public DiscoveryClientConfig getConfig() { return config; } }
[ "379551875@qq.com" ]
379551875@qq.com
edb3f2ef4a86cfb0670449e7edd98719fbb1f22b
1c5e8605c1a4821bc2a759da670add762d0a94a2
/src/dahua/fdc/basedata/scheme/SubClassingModeEnum.java
764cde6db1a34a576d42a17d403be9cfb1581345
[]
no_license
shxr/NJG
8195cfebfbda1e000c30081399c5fbafc61bb7be
1b60a4a7458da48991de4c2d04407c26ccf2f277
refs/heads/master
2020-12-24T06:51:18.392426
2016-04-25T03:09:27
2016-04-25T03:09:27
19,804,797
0
3
null
null
null
null
GB18030
Java
false
false
1,784
java
/** * output package name */ package com.kingdee.eas.fdc.basedata.scheme; import java.util.Map; import java.util.List; import java.util.Iterator; import com.kingdee.util.enums.StringEnum; /** * output class name */ public class SubClassingModeEnum extends StringEnum { public static final String ABSTRACT_VALUE = "abstract";//alias=抽象的 public static final String FINAL_VALUE = "final";//alias=最终的 public static final String NORMAL_VALUE = "normal";//alias=正常的 public static final SubClassingModeEnum ABSTRACT = new SubClassingModeEnum("ABSTRACT", ABSTRACT_VALUE); public static final SubClassingModeEnum FINAL = new SubClassingModeEnum("FINAL", FINAL_VALUE); public static final SubClassingModeEnum NORMAL = new SubClassingModeEnum("NORMAL", NORMAL_VALUE); /** * construct function * @param String subClassingModeEnum */ private SubClassingModeEnum(String name, String subClassingModeEnum) { super(name, subClassingModeEnum); } /** * getEnum function * @param String arguments */ public static SubClassingModeEnum getEnum(String subClassingModeEnum) { return (SubClassingModeEnum)getEnum(SubClassingModeEnum.class, subClassingModeEnum); } /** * getEnumMap function */ public static Map getEnumMap() { return getEnumMap(SubClassingModeEnum.class); } /** * getEnumList function */ public static List getEnumList() { return getEnumList(SubClassingModeEnum.class); } /** * getIterator function */ public static Iterator iterator() { return iterator(SubClassingModeEnum.class); } }
[ "shxr_code@126.com" ]
shxr_code@126.com
57bc0397115af73cf9ac5dba47c626c2cdaf3104
df32bc8a57d23ec111a15545e4c88d6b13794679
/ssm-service-iocp-engine/src/main/java/cn/edu/cqvie/iocp/engine/constant/SystemConstant.java
4d8c6fa47aaf8f239b010dee67ac57427a9d0d8d
[ "Apache-2.0" ]
permissive
zhengsh/ssm-service-iocp
3638684a0f2e3ed1f6b16e72bcaf864a13fc529c
2a60819f11269a6750f7743b35550e2cd1928ae8
refs/heads/master
2022-07-02T11:23:16.052840
2022-05-17T05:20:26
2022-05-17T05:20:26
181,129,057
1
1
Apache-2.0
2022-06-17T02:07:52
2019-04-13T06:12:24
Java
UTF-8
Java
false
false
968
java
package cn.edu.cqvie.iocp.engine.constant; /** * 系统常量 * @author ZHENG SHAOHONG */ public class SystemConstant { /** * 客户端是否发送心跳 */ public static final boolean HEARTBEAT = true; /** * 服务器地址 */ public static final String SERVER_HOST = "127.0.0.1"; /** * 服务器端口 */ public static final int SERVER_PORT = 12345; /** * 包头FLAG */ public static final String HEAD_FLAG = "AABB"; /** * 字符集 */ public static final String CHARSET_NAME = "UTF-8"; /** * 版本 */ public static final short VERSION = 0x0101; /** * 链接超时时间 */ public static final int CONNECT_TIME_OUT = 9 * 1000; /** * 等待超时时间 */ public static final int WAIT_TIME_OUT = 3 * 1000; /** * 重试等待时间 */ public static final int RETRY_DELAY_TIME = 2 * 1000; }
[ "xxx@xxx.com" ]
xxx@xxx.com
f2f87790a909ebe57dc5046b47598417b64c1422
db77908c40c076bb713c1b00fd633457658964a3
/common/ifs-data-service-notifications/src/main/java/org/innovateuk/ifs/notifications/service/NotificationTemplateRenderer.java
cdb3af516d5070ae96d7f10c6fec4a1e12360b3a
[ "MIT" ]
permissive
InnovateUKGitHub/innovation-funding-service
e3807613fd3c398931918c6cc773d13874331cdc
964969b6dc9c78750738ef683076558cc897c1c8
refs/heads/development
2023-08-04T04:04:05.501037
2022-11-11T14:48:30
2022-11-11T14:48:30
87,336,871
30
20
MIT
2023-07-19T21:23:46
2017-04-05T17:20:38
Java
UTF-8
Java
false
false
986
java
package org.innovateuk.ifs.notifications.service; import org.innovateuk.ifs.commons.service.ServiceResult; import org.innovateuk.ifs.notifications.resource.NotificationSource; import org.innovateuk.ifs.notifications.resource.NotificationTarget; import java.util.Map; import static java.io.File.separator; /** * A Notification Template Service (a service that can process a template file in order to produce a Notification message string) */ public interface NotificationTemplateRenderer { String NOTIFICATIONS = "notifications" + separator; String EMAIL_NOTIFICATION_TEMPLATES_PATH = NOTIFICATIONS + "email" + separator; String PREVIEW_TEMPLATES_PATH = NOTIFICATIONS + "previews" + separator; String DEFAULT_NOTIFICATION_TEMPLATES_PATH = NOTIFICATIONS + "defaults" + separator; ServiceResult<String> renderTemplate(NotificationSource notificationSource, NotificationTarget notificationTarget, String templatePath, Map<String, Object> templateReplacements); }
[ "markd@iuk.ukri.org" ]
markd@iuk.ukri.org
f07334a3aa1bedd8536e4949c15d91d1a27d5ab8
5b824097f226414eb5f8ae1374e827b077463532
/src/main/java/com/pdk/chat/websocket/msg/MockChatMessageSession.java
fc708a0b11b50835052bbf7249242559e8326bcd
[]
no_license
RenMingNeng/pdk-chat
94a0ab9b67db2f8b26031ede284f59655be5fefc
b9f73dae762a92c7040684fb240071c2a3715254
refs/heads/master
2021-08-31T13:18:08.902435
2017-12-21T12:26:01
2017-12-21T12:26:01
114,598,953
0
0
null
null
null
null
UTF-8
Java
false
false
466
java
package com.pdk.chat.websocket.msg; import com.pdk.chat.exception.BusinessException; /** * Created by hubo on 2015/8/26. */ public class MockChatMessageSession implements ChatMessageSession { @Override public void sendMessage(ChatMessage message) throws BusinessException { } @Override public void destroy() { } @Override public void close() { } @Override public boolean isOpen() { return false; } }
[ "395841246@qq.com" ]
395841246@qq.com
32f13b57e0a48750c47544d3c175a3508cf825a0
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/jaxrs-cxf-client/generated/src/gen/java/org/openapitools/model/ComDayCqWcmMsmImplActionsContentCopyActionFactoryInfo.java
6639fd8fe9da23a19d0cbb436343eb1fee4c6ac5
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
4,554
java
package org.openapitools.model; import org.openapitools.model.ComDayCqWcmMsmImplActionsContentCopyActionFactoryProperties; import io.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; public class ComDayCqWcmMsmImplActionsContentCopyActionFactoryInfo { @ApiModelProperty(value = "") private String pid = null; @ApiModelProperty(value = "") private String title = null; @ApiModelProperty(value = "") private String description = null; @ApiModelProperty(value = "") private ComDayCqWcmMsmImplActionsContentCopyActionFactoryProperties properties = null; @ApiModelProperty(value = "") private String bundleLocation = null; @ApiModelProperty(value = "") private String serviceLocation = null; /** * Get pid * @return pid **/ @JsonProperty("pid") public String getPid() { return pid; } public void setPid(String pid) { this.pid = pid; } public ComDayCqWcmMsmImplActionsContentCopyActionFactoryInfo pid(String pid) { this.pid = pid; return this; } /** * Get title * @return title **/ @JsonProperty("title") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public ComDayCqWcmMsmImplActionsContentCopyActionFactoryInfo title(String title) { this.title = title; return this; } /** * Get description * @return description **/ @JsonProperty("description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public ComDayCqWcmMsmImplActionsContentCopyActionFactoryInfo description(String description) { this.description = description; return this; } /** * Get properties * @return properties **/ @JsonProperty("properties") public ComDayCqWcmMsmImplActionsContentCopyActionFactoryProperties getProperties() { return properties; } public void setProperties(ComDayCqWcmMsmImplActionsContentCopyActionFactoryProperties properties) { this.properties = properties; } public ComDayCqWcmMsmImplActionsContentCopyActionFactoryInfo properties(ComDayCqWcmMsmImplActionsContentCopyActionFactoryProperties properties) { this.properties = properties; return this; } /** * Get bundleLocation * @return bundleLocation **/ @JsonProperty("bundle_location") public String getBundleLocation() { return bundleLocation; } public void setBundleLocation(String bundleLocation) { this.bundleLocation = bundleLocation; } public ComDayCqWcmMsmImplActionsContentCopyActionFactoryInfo bundleLocation(String bundleLocation) { this.bundleLocation = bundleLocation; return this; } /** * Get serviceLocation * @return serviceLocation **/ @JsonProperty("service_location") public String getServiceLocation() { return serviceLocation; } public void setServiceLocation(String serviceLocation) { this.serviceLocation = serviceLocation; } public ComDayCqWcmMsmImplActionsContentCopyActionFactoryInfo serviceLocation(String serviceLocation) { this.serviceLocation = serviceLocation; return this; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComDayCqWcmMsmImplActionsContentCopyActionFactoryInfo {\n"); sb.append(" pid: ").append(toIndentedString(pid)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); sb.append(" bundleLocation: ").append(toIndentedString(bundleLocation)).append("\n"); sb.append(" serviceLocation: ").append(toIndentedString(serviceLocation)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private static String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
ded7cdc89be05c77ffe579255bd4927a7560d619
d50cefd9b56b96726f12ecafaea923e8ce24f5d8
/workspace/testfmt/src/testfmt/IteratorDemo.java
35609897f6a0f16a5693819bdf643f1ca9d336d5
[]
no_license
lyk4411/java_learning
673a3661391c04f5bd01bf9e8978c3f2f8fa36a6
bcec6298896a75616c3c3b3d6affb3406d4c2fa7
refs/heads/master
2020-02-26T14:59:57.560378
2019-11-07T07:46:28
2019-11-07T07:46:28
31,747,198
1
0
null
null
null
null
UTF-8
Java
false
false
785
java
package testfmt; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.List; /** Iterator used to walk through a List. */ // BEGIN main public class IteratorDemo { public static void main(String[] argv) { List<Date> l = new ArrayList<>(); StructureDemo source = new StructureDemo(15); // Add lots of elements to the list... l.add(source.getDate()); l.add(source.getDate()); l.add(source.getDate()); int i = 0; Iterator it = l.iterator(); // Process the data structure using an iterator. // This part of the code does not know or care // if the data is an an array, a List, a Vector, or whatever. while (it.hasNext()) { Object o = it.next(); System.out.println("Element " + i++ + " = " + o); } } } // END main
[ "liu.yongkai@bestv.com.cn" ]
liu.yongkai@bestv.com.cn
17206e5af9c01754d488a6c3db2ce07eeba15730
610e3f2d3ee2d04241bc0d05dd91cef127d842c0
/src/com/ivend/iintegrationservice/_2010/_12/GetQueueWithoutStatusUpdateResponse.java
22f28f9eaa998efd599307431ff4032117f64625
[]
no_license
MasterInc/InventoryUpdateWS
5d9ff02b7cf868035e68a6410714b087edcde367
a768dfefc0ee4dc6b6e4467a0a74b49707846dcf
refs/heads/master
2021-01-10T16:16:46.270984
2015-11-27T21:34:01
2015-11-27T21:34:01
46,999,934
0
0
null
null
null
null
UTF-8
Java
false
false
2,180
java
package com.ivend.iintegrationservice._2010._12; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="GetQueueWithoutStatusUpdateResult" type="{http://www.iVend.com/IIntegrationService/2010/12}ArrayOfIntegrationQueue" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "getQueueWithoutStatusUpdateResult" }) @XmlRootElement(name = "GetQueueWithoutStatusUpdateResponse") public class GetQueueWithoutStatusUpdateResponse { @XmlElementRef(name = "GetQueueWithoutStatusUpdateResult", namespace = "http://www.iVend.com/IIntegrationService/2010/12", type = JAXBElement.class, required = false) protected JAXBElement<ArrayOfIntegrationQueue> getQueueWithoutStatusUpdateResult; /** * Gets the value of the getQueueWithoutStatusUpdateResult property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link ArrayOfIntegrationQueue }{@code >} * */ public JAXBElement<ArrayOfIntegrationQueue> getGetQueueWithoutStatusUpdateResult() { return getQueueWithoutStatusUpdateResult; } /** * Sets the value of the getQueueWithoutStatusUpdateResult property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link ArrayOfIntegrationQueue }{@code >} * */ public void setGetQueueWithoutStatusUpdateResult(JAXBElement<ArrayOfIntegrationQueue> value) { this.getQueueWithoutStatusUpdateResult = value; } }
[ "jahir.nava@gmail.com" ]
jahir.nava@gmail.com
888d575f41591c43060db6e7e7af590b576557d4
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2006-09-21/s2-tiger-2.4.0-rc-2/src/main/java/org/seasar/framework/unit/impl/DataAccessorImpl.java
7296216bd9ff541d11ea17f48f6c3eab48a02e72
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
7,862
java
/* * Copyright 2004-2006 the Seasar Foundation and the Others. * * 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.seasar.framework.unit.impl; import java.io.File; import java.sql.Connection; import java.sql.DatabaseMetaData; import javax.persistence.EntityManager; import javax.sql.DataSource; import javax.transaction.TransactionManager; import org.seasar.extension.dataset.DataColumn; import org.seasar.extension.dataset.DataReader; import org.seasar.extension.dataset.DataSet; import org.seasar.extension.dataset.DataTable; import org.seasar.extension.dataset.DataWriter; import org.seasar.extension.dataset.impl.DataSetImpl; import org.seasar.extension.dataset.impl.SqlDeleteTableWriter; import org.seasar.extension.dataset.impl.SqlReader; import org.seasar.extension.dataset.impl.SqlReloadReader; import org.seasar.extension.dataset.impl.SqlReloadTableReader; import org.seasar.extension.dataset.impl.SqlTableReader; import org.seasar.extension.dataset.impl.SqlWriter; import org.seasar.extension.dataset.impl.XlsReader; import org.seasar.extension.dataset.impl.XlsWriter; import org.seasar.extension.jdbc.UpdateHandler; import org.seasar.extension.jdbc.impl.BasicUpdateHandler; import org.seasar.extension.jdbc.util.ConnectionUtil; import org.seasar.extension.jdbc.util.DataSourceUtil; import org.seasar.framework.container.annotation.tiger.Binding; import org.seasar.framework.container.annotation.tiger.BindingType; import org.seasar.framework.exception.EmptyRuntimeException; import org.seasar.framework.unit.DataAccessor; import org.seasar.framework.unit.TestContext; import org.seasar.framework.util.FileOutputStreamUtil; import org.seasar.framework.util.ResourceUtil; import org.seasar.framework.util.TransactionManagerUtil; /** * @author taedium * */ public class DataAccessorImpl implements DataAccessor { protected TestContext testContext; protected TransactionManager tm; private DataSource dataSource; protected EntityManager em; private Connection connection; private DatabaseMetaData dbMetaData; @Binding(bindingType = BindingType.MUST) public void setTestContext(final TestContext testContext) { this.testContext = testContext; } public void setTransactionManager(final TransactionManager tm) { this.tm = tm; } public void setDataSource(final DataSource dataSource) { this.dataSource = dataSource; } @Binding(bindingType = BindingType.MAY) public void setEntityManager(final EntityManager em) { this.em = em; } public DataSource getDataSource() { if (dataSource == null) { throw new EmptyRuntimeException("dataSource"); } return dataSource; } public Connection getConnection() { if (connection != null) { return connection; } connection = DataSourceUtil.getConnection(getDataSource()); return connection; } public DatabaseMetaData getDatabaseMetaData() { if (dbMetaData != null) { return dbMetaData; } dbMetaData = ConnectionUtil.getMetaData(getConnection()); return dbMetaData; } public DataSet readXls(String path) { DataReader reader = new XlsReader(convertPath(path)); return reader.read(); } public void writeXls(String path, DataSet dataSet) { File dir = ResourceUtil.getBuildDir(getClass()); File file = new File(dir, convertPath(path)); DataWriter writer = new XlsWriter(FileOutputStreamUtil.create(file)); writer.write(dataSet); } public void writeDb(DataSet dataSet) { flushIfNecessary(); DataWriter writer = new SqlWriter(getDataSource()); writer.write(dataSet); } public DataSet readDb(DataSet dataSet) { flushIfNecessary(); SqlReader reader = new SqlReader(getDataSource()); reader.addDataSet(dataSet); return reader.read(); } public DataTable readDbByTable(String table) { flushIfNecessary(); return readDbByTable(table, null); } public DataTable readDbByTable(String table, String condition) { flushIfNecessary(); SqlTableReader reader = new SqlTableReader(getDataSource()); reader.setTable(table, condition); return reader.read(); } public DataTable readDbBySql(String sql, String tableName) { flushIfNecessary(); SqlTableReader reader = new SqlTableReader(getDataSource()); reader.setSql(sql, tableName); return reader.read(); } public void readXlsWriteDb(String path) { flushIfNecessary(); writeDb(readXls(path)); } public void readXlsReplaceDb(String path) { flushIfNecessary(); DataSet dataSet = readXls(path); deleteDb(dataSet); writeDb(dataSet); } public void readXlsAllReplaceDb(String path) { flushIfNecessary(); DataSet dataSet = readXls(path); for (int i = dataSet.getTableSize() - 1; i >= 0; --i) { deleteTable(dataSet.getTable(i).getTableName()); } writeDb(dataSet); } public DataSet reload(DataSet dataSet) { flushIfNecessary(); return new SqlReloadReader(getDataSource(), dataSet).read(); } public DataTable reload(DataTable table) { flushIfNecessary(); return new SqlReloadTableReader(getDataSource(), table).read(); } public DataSet reloadOrReadDb(DataSet dataSet) { flushIfNecessary(); DataSet newDataSet = new DataSetImpl(); outer: for (int i = 0; i < dataSet.getTableSize(); i++) { DataTable table = dataSet.getTable(i); if (!table.hasMetaData()) { table.setupMetaData(getDatabaseMetaData()); } for (int j = 0; i < table.getColumnSize(); j++) { DataColumn column = table.getColumn(j); if (column.isPrimaryKey()) { newDataSet.addTable(reload(table)); continue outer; } } newDataSet.addTable(readDbByTable(table.getTableName())); } return newDataSet; } public void deleteDb(DataSet dataSet) { flushIfNecessary(); SqlDeleteTableWriter writer = new SqlDeleteTableWriter(getDataSource()); for (int i = dataSet.getTableSize() - 1; i >= 0; --i) { writer.write(dataSet.getTable(i)); } } public void deleteTable(String tableName) { flushIfNecessary(); UpdateHandler handler = new BasicUpdateHandler(getDataSource(), "DELETE FROM " + tableName); handler.execute(null); } protected String convertPath(String path) { if (ResourceUtil.isExist(path)) { return path; } else { return testContext.getTestClassPackagePath() + "/" + path; } } protected void flushIfNecessary() { if (em != null && TransactionManagerUtil.isActive(tm)) { em.flush(); } } }
[ "higa@319488c0-e101-0410-93bc-b5e51f62721a" ]
higa@319488c0-e101-0410-93bc-b5e51f62721a
4237e472b2db6de96bb2f080a993bed85ff2412f
32d81b4b9db2b6ea4e5c046688cfa43740500bed
/src/com/company/concurrent/MyPriorBlocingQueue.java
9293a6a7481513b41779c4990016bedd22895dd3
[]
no_license
zymap/zytest
f1ce4cf0e6c735d35f68ea8c89df98ae6d035821
b8d9eb6cf46490958d20ebb914d543af50d1b862
refs/heads/master
2021-04-03T01:15:30.946483
2018-03-24T14:10:57
2018-03-24T14:10:57
124,623,152
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package com.company.concurrent; import java.util.concurrent.PriorityBlockingQueue; /** * @author zy * @date 2018-02-07 10:01 */ public class MyPriorBlocingQueue { public static void main(String[] args) { PriorityBlockingQueue queue = new PriorityBlockingQueue(); queue.add(1); queue.add(2); } }
[ "734206637@qq.com" ]
734206637@qq.com
31f72fe8731c398f6117bf09c3574c78c486ffe9
cacd87f8831b02e254d65c5e86d48264c7493d78
/pc/mLife/src/com/manji/mlife/Vo/TrainLineVo.java
dc3b1e1cb6b9a50bae832fa522f53b1acba8f996
[]
no_license
lichaoqian1992/beautifulDay
1a5a30947db08d170968611068673d2f0b626eb2
44e000ecd47099dc5342ab8a208edea73602760b
refs/heads/master
2021-07-24T22:48:33.067359
2017-11-03T09:06:15
2017-11-03T09:06:15
108,791,908
0
3
null
null
null
null
UTF-8
Java
false
false
2,071
java
package com.manji.mlife.Vo; import java.util.List; public class TrainLineVo { private String from; private String to; private String date; private String trainNumber; private String trainTypeName; private String currentEndStationName; private String currentStartStationName; private String startTime; private String endTime; private String runTime; private List<TrainSeat> trainSeats; public List<TrainSeat> getTrainSeats() { return trainSeats; } public void setTrainSeats(List<TrainSeat> trainSeats) { this.trainSeats = trainSeats; } public String getFrom() { return from; } public void setFrom(String from) { this.from = from; } public String getTo() { return to; } public void setTo(String to) { this.to = to; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getTrainNumber() { return trainNumber; } public void setTrainNumber(String trainNumber) { this.trainNumber = trainNumber; } public String getTrainTypeName() { return trainTypeName; } public void setTrainTypeName(String trainTypeName) { this.trainTypeName = trainTypeName; } public String getCurrentEndStationName() { return currentEndStationName; } public void setCurrentEndStationName(String currentEndStationName) { this.currentEndStationName = currentEndStationName; } public String getCurrentStartStationName() { return currentStartStationName; } public void setCurrentStartStationName(String currentStartStationName) { this.currentStartStationName = currentStartStationName; } public String getStartTime() { return startTime; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public String getRunTime() { return runTime; } public void setRunTime(String runTime) { this.runTime = runTime; } }
[ "1015598423@qq.com" ]
1015598423@qq.com
69c90334019b75a87b7910463443cd3e9e4f1319
758018a1c6be534f48c77c20c94787a9267fa4dd
/src/main/java/com/ttm/pet/service/impl/FactoryServiceImpl.java
5cf4600289d04273f77412493b8299b16b338cbf
[]
no_license
Gitjiangwei/pet
124514502512d8cf5c616e829e6dd1c57d0f6699
ff7aff889355bdbe69bc368256e54b73a0172320
refs/heads/main
2023-03-27T03:21:05.295641
2021-03-29T12:46:23
2021-03-29T12:46:23
347,010,984
0
0
null
null
null
null
UTF-8
Java
false
false
951
java
package com.ttm.pet.service.impl; import com.baomidou.mybatisplus.plugins.Page; import com.ttm.pet.model.dto.Factory; import com.ttm.pet.dao.FactoryMapper; import com.ttm.pet.model.vo.app.FactoryListVo; import com.ttm.pet.service.FactoryService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * <p> * 抽奖上面厂家表 服务实现类 * </p> * * @author cx * @since 2020-09-21 */ @Service public class FactoryServiceImpl extends ServiceImpl<FactoryMapper, Factory> implements FactoryService { @Autowired private FactoryMapper factoryMapper; @Override public Page<FactoryListVo> findFactoryListVos(Page<FactoryListVo> page) { List<FactoryListVo> factories = factoryMapper.queryFactoryListVos(page); page.setRecords(factories); return page; } }
[ "15035571514@163.com" ]
15035571514@163.com
a17f3f11f5c3e5cc81a34d975c0e56d6cab63d7d
cbb75ebbee3fb80a5e5ad842b7a4bb4a5a1ec5f5
/com/nostra13/universalimageloader/core/display/BitmapDisplayer.java
90d6a73f7b97f04ebcac1f9140d7ff36915f06f7
[]
no_license
killbus/jd_decompile
9cc676b4be9c0415b895e4c0cf1823e0a119dcef
50c521ce6a2c71c37696e5c131ec2e03661417cc
refs/heads/master
2022-01-13T03:27:02.492579
2018-05-14T11:21:30
2018-05-14T11:21:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
372
java
package com.nostra13.universalimageloader.core.display; import android.graphics.Bitmap; import com.nostra13.universalimageloader.core.assist.LoadedFrom; import com.nostra13.universalimageloader.core.imageaware.ImageAware; /* compiled from: TbsSdkJava */ public interface BitmapDisplayer { void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom); }
[ "13511577582@163.com" ]
13511577582@163.com
d3d8381e64d3d0ab8238089cc3468b8774b2ba77
fea683c0ec66ff872b001f39fba4bd0f5a772176
/jpuppeteer-api/src/main/java/jpuppeteer/api/util/ConcurrentHashSet.java
6e164245cba1d86700af22bfc6a11cc7f397fc38
[]
no_license
affjerry/jpuppeteer
c343f64636eabdf5c3da52b6c0d660054d837894
5dbd900862035b4403b975f91f1b18938b19f08b
refs/heads/master
2023-08-15T23:45:39.292666
2020-05-27T01:48:41
2020-05-27T01:48:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
package jpuppeteer.api.util; import java.util.*; import java.util.concurrent.ConcurrentHashMap; public class ConcurrentHashSet<E> extends AbstractSet<E> implements Set<E> { private final Object PRESENT = new Object(); private transient Map<E, Object> map; public ConcurrentHashSet() { map = new ConcurrentHashMap<>(); } public ConcurrentHashSet(int initialCapacity) { map = new ConcurrentHashMap<>(initialCapacity); } public ConcurrentHashSet(int initialCapacity, float loadFactor) { map = new ConcurrentHashMap<>(initialCapacity, loadFactor); } public Iterator<E> iterator() { return map.keySet().iterator(); } public int size() { return map.size(); } public boolean isEmpty() { return map.isEmpty(); } public boolean contains(Object o) { return map.containsKey(o); } public boolean add(E e) { return map.put(e, PRESENT)==null; } public boolean remove(Object o) { return map.remove(o)==PRESENT; } public void clear() { map.clear(); } public Spliterator<E> spliterator() { throw new UnsupportedOperationException(); } }
[ "jarvis.xu@vipshop.com" ]
jarvis.xu@vipshop.com
a98b62d776061956750a6f99a572daff0901b68c
883b7801d828a0994cae7367a7097000f2d2e06a
/python/experiments/projects/twilio-twilio-java/real_error_dataset/1/194/RateLimitReader.java
0f8e85c44f590bdae3daa4aa97269712518fa733
[]
no_license
pombredanne/styler
9c423917619912789289fe2f8982d9c0b331654b
f3d752d2785c2ab76bacbe5793bd8306ac7961a1
refs/heads/master
2023-07-08T05:55:18.284539
2020-11-06T05:09:47
2020-11-06T05:09:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,996
java
/** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ package com.twilio.rest.verify.v2.service; import com.twilio.base.Page; import com.twilio.base.Reader; import com.twilio.base.ResourceSet; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; import com.twilio.http.HttpMethod; import com.twilio.http.Request; import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; public class RateLimitReader extends Reader<RateLimit> { private final String pathServiceSid; /** * Construct a new RateLimitReader. * * @param pathServiceSid The SID of the Service that the resource is associated * with */ public RateLimitReader(final String pathServiceSid) { this.pathServiceSid = pathServiceSid; } /** * Make the request to the Twilio API to perform the read. * * @param client TwilioRestClient with which to make the request * @return RateLimit ResourceSet */ @Override public ResourceSet<RateLimit> read(final TwilioRestClient client) { return new ResourceSet<>(this, client, firstPage(client)); } /** * Make the request to the Twilio API to perform the read. * * @param client TwilioRestClient with which to make the request * @return RateLimit ResourceSet */ @Override @SuppressWarnings("checkstyle:linelength") public Page<RateLimit> firstPage(final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, Domains.VERIFY.toString(), "/v2/Services/" + this.pathServiceSid + "/RateLimits" ); addQueryParams(request); return pageForRequest(client, request); } /** * Retrieve the target page from the Twilio API. * * @param targetUrl API-generated URL for the requested results page * @param client TwilioRestClient with which to make the request * @return RateLimit ResourceSet */ @Override @SuppressWarnings("checkstyle:linelength") public Page<RateLimit> getPage(final String targetUrl, final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, targetUrl ); return pageForRequest(client, request); } /** * Retrieve the next page from the Twilio API. * * @param page current page * @param client TwilioRestClient with which to make the request * @return Next Page */ @Override public Page<RateLimit> nextPage(final Page<RateLimit> page, final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, page.getNextPageUrl(Domains.VERIFY.toString()) ); return pageForRequest(client, request); } /** * Retrieve the previous page from the Twilio API. * * @param page current page * @param client TwilioRestClient with which to make the request * @return Previous Page */ @Override public Page<RateLimit> previousPage(final Page<RateLimit> page, final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, page.getPreviousPageUrl(Domains.VERIFY.toString()) ); return pageForRequest(client, request); } /** * Generate a Page of RateLimit Resources for a given request. * * @param client TwilioRestClient with which to make the request * @param request Request to generate a page for * @return Page for the Request */ private Page<RateLimit> pageForRequest(final TwilioRestClient client, final Request request) { Response response = client.request(request); if (response == null) { throw new ApiConnectionException("RateLimit read failed: Unable to connect to server"); } else if (!TwilioRestClient.SUCCESS.apply(response.getStatusCode())) { RestException restException = RestException.fromJson(response.getStream(), client.getObjectMapper()); if (restException == null) { throw new ApiException("Server Error, no content"); } throw new ApiException(restException); } return Page.fromJson( "rate_limits", response.getContent(), RateLimit.class, client.getObjectMapper() ); } /** * Add the requested query string arguments to the Request. * * @param request Request to add query string arguments to */ private void addQueryParams(final Request request) { if (getPageSize() != null) { request.addQueryParam("PageSize", Integer.toString(getPageSize())); } } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
6b58d4671b01333f712ea40af2b6edd1ca594b1a
62508bc8059447866d10fdb40ecdc6c010b703bc
/app/src/main/java/lugang/app/huansi/net/db/MeasureOrderCustomerInSQLite.java
7ec71b33e2ed80ac453844ae14f15df7cd43160a
[]
no_license
LiFaWang/LuGang
62560c3db40ab53cc054f5f200b12311331f8b01
54b172fa03bcc82f29d797cc5cf5c68fc1646852
refs/heads/master
2021-08-30T00:56:23.337550
2017-12-15T10:10:43
2017-12-15T10:10:43
103,608,552
0
0
null
null
null
null
UTF-8
Java
false
false
1,604
java
//package lugang.app.huansi.net.db; // //import org.greenrobot.greendao.annotation.Entity; //import org.greenrobot.greendao.annotation.Id; //import org.greenrobot.greendao.annotation.Generated; // ///** // * Created by 年 on 2017/11/1. // * 筛选部门的时候 // */ //@Entity //public class MeasureOrderCustomerInSQLite { // @Id(autoincrement =true) // private Long id; // private int type;//0待量体 1已量体 2返修 // private String userGUID; // // private String sCustomerName;//单位名称 // // public String getSCustomerName() { // return this.sCustomerName; // } // // public void setSCustomerName(String sCustomerName) { // this.sCustomerName = sCustomerName; // } // // public String getUserGUID() { // return this.userGUID; // } // // public void setUserGUID(String userGUID) { // this.userGUID = userGUID; // } // // public int getType() { // return this.type; // } // // public void setType(int type) { // this.type = type; // } // // public Long getId() { // return this.id; // } // // public void setId(Long id) { // this.id = id; // } // // @Generated(hash = 1115197908) // public MeasureOrderCustomerInSQLite(Long id, int type, String userGUID, // String sCustomerName) { // this.id = id; // this.type = type; // this.userGUID = userGUID; // this.sCustomerName = sCustomerName; // } // // @Generated(hash = 1506726811) // public MeasureOrderCustomerInSQLite() { // } // // // // // // // // // // //}
[ "178971959@qq.com" ]
178971959@qq.com
d3159cd579ea389155dea86cd72cea73c477959e
e0461c729dd134c853655a9749be9331a3c407e9
/booking-engine-promocode/entity/src/main/java/com/tl/booking/promo/code/entity/constant/fields/StoreIdFields.java
092b4ca8b39a5a1726ca411b3fa9be346775ac68
[]
no_license
dpokuri/microservice
5942600f546a146e32c8923e784ba6a826e0b31c
bbffacaab70b2d03f0c09eb6f469b5df4d910d05
refs/heads/master
2021-04-06T18:08:23.329478
2018-12-04T20:06:51
2018-12-04T20:06:51
125,348,484
0
0
null
null
null
null
UTF-8
Java
false
false
292
java
package com.tl.booking.promo.code.entity.constant.fields; public class StoreIdFields extends BaseMongoFields { public static final String ID = "_id"; public static final String NAME = "name"; public static final String LABEL = "label"; public static final String VALUE = "value"; }
[ "nikkidavid@Nikkis-MacBook-Pro.local" ]
nikkidavid@Nikkis-MacBook-Pro.local
53841308745aeb35113d555d78a1f2ea05933690
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/se/trg/dm/SE_TRG_1320_ADM.java
f67be63bb9099a05291c9e2ea41c72054de53c16
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
6,130
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 판매시스템 * 작성일자 : 2009-02-18 * 작성자 : 배창희 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.se.trg.dm; import java.sql.*; import oracle.jdbc.driver.*; import somo.framework.db.*; import somo.framework.util.*; import chosun.ciis.se.trg.ds.*; import chosun.ciis.se.trg.rec.*; /** * */ public class SE_TRG_1320_ADM extends somo.framework.db.BaseDM implements java.io.Serializable{ public String cmpy_cd; public String yymm1; public String yymm2; public String incmg_pers; public String incmg_pers_ip; public SE_TRG_1320_ADM(){} public SE_TRG_1320_ADM(String cmpy_cd, String yymm1, String yymm2, String incmg_pers, String incmg_pers_ip){ this.cmpy_cd = cmpy_cd; this.yymm1 = yymm1; this.yymm2 = yymm2; this.incmg_pers = incmg_pers; this.incmg_pers_ip = incmg_pers_ip; } public void setCmpy_cd(String cmpy_cd){ this.cmpy_cd = cmpy_cd; } public void setYymm1(String yymm1){ this.yymm1 = yymm1; } public void setYymm2(String yymm2){ this.yymm2 = yymm2; } public void setIncmg_pers(String incmg_pers){ this.incmg_pers = incmg_pers; } public void setIncmg_pers_ip(String incmg_pers_ip){ this.incmg_pers_ip = incmg_pers_ip; } public String getCmpy_cd(){ return this.cmpy_cd; } public String getYymm1(){ return this.yymm1; } public String getYymm2(){ return this.yymm2; } public String getIncmg_pers(){ return this.incmg_pers; } public String getIncmg_pers_ip(){ return this.incmg_pers_ip; } public String getSQL(){ return "{ call CRMSAL_COM.SP_SE_TRG_1320_A(? ,? ,? ,? ,? ,? ,?) }"; } public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{ SE_TRG_1320_ADM dm = (SE_TRG_1320_ADM)bdm; cstmt.registerOutParameter(1, Types.VARCHAR); cstmt.registerOutParameter(2, Types.VARCHAR); cstmt.setString(3, dm.cmpy_cd); cstmt.setString(4, dm.yymm1); cstmt.setString(5, dm.yymm2); cstmt.setString(6, dm.incmg_pers); cstmt.setString(7, dm.incmg_pers_ip); } public BaseDataSet createDataSetObject(){ return new chosun.ciis.se.trg.ds.SE_TRG_1320_ADataSet(); } public void print(){ System.out.println("cmpy_cd = " + getCmpy_cd()); System.out.println("yymm1 = " + getYymm1()); System.out.println("yymm2 = " + getYymm2()); System.out.println("incmg_pers = " + getIncmg_pers()); System.out.println("incmg_pers_ip = " + getIncmg_pers_ip()); } } /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리 및 결과확인 검사시 사용하십시오. String cmpy_cd = req.getParameter("cmpy_cd"); if( cmpy_cd == null){ System.out.println(this.toString+" : cmpy_cd is null" ); }else{ System.out.println(this.toString+" : cmpy_cd is "+cmpy_cd ); } String yymm1 = req.getParameter("yymm1"); if( yymm1 == null){ System.out.println(this.toString+" : yymm1 is null" ); }else{ System.out.println(this.toString+" : yymm1 is "+yymm1 ); } String yymm2 = req.getParameter("yymm2"); if( yymm2 == null){ System.out.println(this.toString+" : yymm2 is null" ); }else{ System.out.println(this.toString+" : yymm2 is "+yymm2 ); } String incmg_pers = req.getParameter("incmg_pers"); if( incmg_pers == null){ System.out.println(this.toString+" : incmg_pers is null" ); }else{ System.out.println(this.toString+" : incmg_pers is "+incmg_pers ); } String incmg_pers_ip = req.getParameter("incmg_pers_ip"); if( incmg_pers_ip == null){ System.out.println(this.toString+" : incmg_pers_ip is null" ); }else{ System.out.println(this.toString+" : incmg_pers_ip is "+incmg_pers_ip ); } ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.checkString(req.getParameter("cmpy_cd")); String yymm1 = Util.checkString(req.getParameter("yymm1")); String yymm2 = Util.checkString(req.getParameter("yymm2")); String incmg_pers = Util.checkString(req.getParameter("incmg_pers")); String incmg_pers_ip = Util.checkString(req.getParameter("incmg_pers_ip")); ----------------------------------------------------------------------------------------------------*//*---------------------------------------------------------------------------------------------------- Web Tier에서 한글처리와 동시에 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("cmpy_cd"))); String yymm1 = Util.Uni2Ksc(Util.checkString(req.getParameter("yymm1"))); String yymm2 = Util.Uni2Ksc(Util.checkString(req.getParameter("yymm2"))); String incmg_pers = Util.Uni2Ksc(Util.checkString(req.getParameter("incmg_pers"))); String incmg_pers_ip = Util.Uni2Ksc(Util.checkString(req.getParameter("incmg_pers_ip"))); ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 DM 파일의 변수를 설정시 사용하십시오. dm.setCmpy_cd(cmpy_cd); dm.setYymm1(yymm1); dm.setYymm2(yymm2); dm.setIncmg_pers(incmg_pers); dm.setIncmg_pers_ip(incmg_pers_ip); ----------------------------------------------------------------------------------------------------*/ /* 작성시간 : Fri Jul 10 18:11:12 KST 2009 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
d5c162235e0bcf57e946089ea861d4635c813ff4
8fd837e2d6e4a0cdc6489966db9b079324b95f4d
/Flower/src/com/hellen/flower/view/UserInfoView.java
b2c018dffbfc6ab0130a0def34c548e20cc39df9
[ "Apache-2.0" ]
permissive
darlyhellen/oto
13a600de64c87610bc22e6f4c989d6cd6ff796a4
946be2da39ba591d29e2be8ef666b298b5c60b55
refs/heads/master
2020-12-29T00:30:07.755354
2016-09-22T03:38:30
2016-09-22T03:38:30
49,046,113
0
0
null
null
null
null
UTF-8
Java
false
false
1,776
java
/**上午10:19:39 * @author zhangyh2 * UserInfoView.java * TODO */ package com.hellen.flower.view; import android.content.Context; import android.text.TextUtils; import android.util.AttributeSet; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.hellen.base.ConsMVP; import com.hellen.common.ImageLoaderUtil; import com.hellen.flower.R; /** * @author zhangyh2 UserInfoView 上午10:19:39 TODO userinfo to showing view */ public class UserInfoView extends LinearLayout { private TextView label; private TextView show; private ImageView icon; /** * 上午10:21:31 * * @author zhangyh2 */ public UserInfoView(Context context, AttributeSet attrs) { super(context, attrs); initView(context); } /** * 上午10:22:43 * * @author zhangyh2 TODO */ private void initView(Context context) { // TODO Auto-generated method stub // 把一个布局文件---转换成一个View,并且加载在UserInfoItem_1View View.inflate(context, R.layout.view_user_info, this); label = (TextView) this.findViewById(R.id.view_user_info_label); show = (TextView) this.findViewById(R.id.view_user_info_show); icon = (ImageView) this.findViewById(R.id.view_user_info_icon); } public void showUserInfo(String slabel, String sShow, String imageUrl) { label.setText(slabel); if (TextUtils.isEmpty(imageUrl)) { icon.setVisibility(View.GONE); show.setVisibility(View.VISIBLE); show.setText(sShow); } else { icon.setVisibility(View.VISIBLE); show.setVisibility(View.GONE); icon.setLayoutParams(new LayoutParams(ConsMVP.WIDTH.getLen() / 6, ConsMVP.WIDTH.getLen() / 6)); ImageLoaderUtil.getInstance().loadImage(imageUrl, icon); } } }
[ "darlyyuhui@hotmail.com" ]
darlyyuhui@hotmail.com
cd7464e637f3a05f4b3eba6cbf0a017d80bfa644
0af8b92686a58eb0b64e319b22411432aca7a8f3
/api-vs-impl-small/utils/src/main/java/org/gradle/testutils/performancenull_14/Productionnull_1361.java
c858913b6f46e720d7f7d5ab5e4b55a8f8dd124e
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
590
java
package org.gradle.testutils.performancenull_14; public class Productionnull_1361 { private final String property; public Productionnull_1361(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
c504ce0dff1471a2c95099d1375f6fdf83a3d6c7
9c95bf55193b098eb729e35587e2cee935536b47
/ngap/src/main/java/tr/havelsan/ueransim/ngap0/ies/sequence_ofs/NGAP_EmergencyAreaIDList.java
62676dd4e0a221ecbb6fa98251ebaf44f0c75b85
[ "MIT" ]
permissive
sabouaram/UERANSIM
6205af5db33be3578f548c315162bbe9de36a434
f3d28be0706e28e209fc087695c339d172c5a329
refs/heads/master
2022-12-26T01:25:18.554061
2020-09-16T13:39:21
2020-09-16T13:39:21
297,064,651
1
0
MIT
2020-09-20T11:49:12
2020-09-20T11:49:12
null
UTF-8
Java
false
false
1,232
java
package tr.havelsan.ueransim.ngap0.ies.sequence_ofs; import tr.havelsan.ueransim.ngap0.core.*; import tr.havelsan.ueransim.ngap0.pdu.*; import tr.havelsan.ueransim.utils.bits.*; import tr.havelsan.ueransim.utils.octets.*; import tr.havelsan.ueransim.ngap0.ies.bit_strings.*; import tr.havelsan.ueransim.ngap0.ies.octet_strings.*; import tr.havelsan.ueransim.ngap0.ies.printable_strings.*; import tr.havelsan.ueransim.ngap0.ies.sequences.*; import tr.havelsan.ueransim.ngap0.ies.sequence_ofs.*; import tr.havelsan.ueransim.ngap0.ies.choices.*; import tr.havelsan.ueransim.ngap0.ies.integers.*; import tr.havelsan.ueransim.ngap0.ies.enumerations.*; import java.util.List; public class NGAP_EmergencyAreaIDList extends NGAP_SequenceOf<NGAP_EmergencyAreaID> { public NGAP_EmergencyAreaIDList() { super(); } public NGAP_EmergencyAreaIDList(List<NGAP_EmergencyAreaID> value) { super(value); } @Override public String getAsnName() { return "EmergencyAreaIDList"; } @Override public String getXmlTagName() { return "EmergencyAreaIDList"; } @Override public Class<NGAP_EmergencyAreaID> getItemType() { return NGAP_EmergencyAreaID.class; } }
[ "aligng1620@gmail.com" ]
aligng1620@gmail.com
8f5c7ed95d0cf196cbb93b929a88c2db8a189b11
d3c51e3c45bd38658f4d75c2d4e93ab3d006cf1c
/src/main/java/training360/guinessapp/dto/RecorderCreateCommand.java
39272eb6a432d2522a5810bc27a2f0a5d8ea7c1e
[]
no_license
kondasg/sv2021-jvjbf-kepesitovizsga
188ecaad4e5ad3ca89516b525473d441806d8a9b
b8921c3063987f285196370663b5ac85766357ac
refs/heads/master
2023-07-17T04:07:16.743013
2021-09-06T13:20:00
2021-09-06T13:20:00
403,572,141
0
0
null
null
null
null
UTF-8
Java
false
false
528
java
package training360.guinessapp.dto; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import training360.guinessapp.DateOfBirth; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.time.LocalDate; @Data @NoArgsConstructor @AllArgsConstructor public class RecorderCreateCommand { @NotBlank(message = "must not be blank") private String name; @DateOfBirth(message = "must be in the past") private LocalDate dateOfBirth; }
[ "gabor@kondas.hu" ]
gabor@kondas.hu
97d61970446ba4d7c9ebe0382ff6d040c9dcca87
564e9aff2cad3a4c6c48ee562008cb564628e8e8
/src/net/minecraft/aue.java
667d96cff8b6e7b80352fae142524e62c0e32320
[]
no_license
BeYkeRYkt/MinecraftServerDec
efbafd774cf5c68bde0dd60b7511ac91d3f1bd8e
cfb5b989abb0e68112f7d731d0d79e0d0021c94f
refs/heads/master
2021-01-10T19:05:30.104737
2014-09-28T10:42:47
2014-09-28T10:42:47
23,732,504
1
0
null
2014-09-28T10:32:16
2014-09-06T10:46:05
Java
UTF-8
Java
false
false
702
java
package net.minecraft; // $FF: synthetic class class aue { // $FF: synthetic field static final int[] a = new int[BlockFace.values().length]; static { try { a[BlockFace.EAST.ordinal()] = 1; } catch (NoSuchFieldError var6) { ; } try { a[BlockFace.WEST.ordinal()] = 2; } catch (NoSuchFieldError var5) { ; } try { a[BlockFace.SOUTH.ordinal()] = 3; } catch (NoSuchFieldError var4) { ; } try { a[BlockFace.NORTH.ordinal()] = 4; } catch (NoSuchFieldError var3) { ; } try { a[BlockFace.UP.ordinal()] = 5; } catch (NoSuchFieldError var2) { ; } try { a[BlockFace.DOWN.ordinal()] = 6; } catch (NoSuchFieldError var1) { ; } } }
[ "Shev4ik.den@gmail.com" ]
Shev4ik.den@gmail.com
65b40fddcc0fed79c9caf810ac98b9f3fde759cf
70a4873e00e37d461fca4b7a6f07a73396717167
/louismall-common/src/main/java/com/louisblogs/common/exception/RRException.java
7007bdc2d1e058b7e8bee9852725ba9334434a25
[ "Apache-2.0" ]
permissive
QuricoLouis/louismall
006426937fd9616b15a99945ad7c7930119af752
42652c14a5bbda4dbb15a65047226a70370f8dae
refs/heads/master
2023-06-22T16:45:45.213152
2021-07-03T00:49:50
2021-07-03T00:49:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
988
java
/** * Copyright (c) 2016-2019 人人开源 All rights reserved. * * https://www.renren.io * * 版权所有,侵权必究! */ package com.louisblogs.common.exception; /** * 自定义异常 * * @author Mark sunlightcs@gmail.com */ public class RRException extends RuntimeException { private static final long serialVersionUID = 1L; private String msg; private int code = 500; public RRException(String msg) { super(msg); this.msg = msg; } public RRException(String msg, Throwable e) { super(msg, e); this.msg = msg; } public RRException(String msg, int code) { super(msg); this.msg = msg; this.code = code; } public RRException(String msg, int code, Throwable e) { super(msg, e); this.msg = msg; this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } }
[ "lq844040753@163.com" ]
lq844040753@163.com
fbc45223069a0b775c97aa5e823996e225878e30
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/com/avito/android/advert_core/social/SocialView.java
d657ddde224a53d769e0282387d29aee4797cce9
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
1,295
java
package com.avito.android.advert_core.social; import com.avito.android.social.button.SocialButton; import com.facebook.share.internal.MessengerShareContentUtility; import java.util.List; import kotlin.Metadata; import org.jetbrains.annotations.NotNull; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0004\bf\u0018\u00002\u00020\u0001J\u000f\u0010\u0003\u001a\u00020\u0002H&¢\u0006\u0004\b\u0003\u0010\u0004J\u000f\u0010\u0005\u001a\u00020\u0002H&¢\u0006\u0004\b\u0005\u0010\u0004J\u000f\u0010\u0006\u001a\u00020\u0002H&¢\u0006\u0004\b\u0006\u0010\u0004J\u001d\u0010\n\u001a\u00020\u00022\f\u0010\t\u001a\b\u0012\u0004\u0012\u00020\b0\u0007H&¢\u0006\u0004\b\n\u0010\u000b¨\u0006\f"}, d2 = {"Lcom/avito/android/advert_core/social/SocialView;", "", "", "showError", "()V", "showConnectivityError", "showUnknownError", "", "Lcom/avito/android/social/button/SocialButton;", MessengerShareContentUtility.BUTTONS, "showButtons", "(Ljava/util/List;)V", "advert-core_release"}, k = 1, mv = {1, 4, 2}) public interface SocialView { void showButtons(@NotNull List<SocialButton> list); void showConnectivityError(); void showError(); void showUnknownError(); }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
21f302472404fa2473f7b8e81b80431be96f1ef4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/10/10_53b5b848880d19d6751c84d510ad623662b72f1d/TDMA/10_53b5b848880d19d6751c84d510ad623662b72f1d_TDMA_s.java
8df60efdcea4d77f90f21b94b9d018bb0d3ae892
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,109
java
package simulation.timebased.mediumaccess; import simulation.timebased.*; import simulation.utilities.packetprocessors.*; import simulation.utilities.references.*; import simulation.communications.nodes.*; import simulation.communications.queues.*; import simulation.communications.channels.*; import simulation.communications.packets.*; import simulation.networks.*; import simulation.networks.channels.*; import simulation.networks.nodes.*; /** Class to implement TDMA that transmit every n slot. * @author ykk */ public class TDMA extends MACNode { //Members /** Total number of slots per cycle. */ public int n; /** Slot to transmit in a cycle. */ public int k; /** Currently receiving packet. */ protected Object packet; /** Currently receiving from. */ protected CommNode currSource; /** Number of ongoing receptions. */ protected int onGoing = 0; /** Last receive time. */ protected double lastReceiveTime; //Methods /** Constructor. * @param coordinate coordinate of node * @param channel network channel in use * @param commChannel communication channel * @param queue queue of the node * @param processor reference to packet processor * @param n total number of slots in a cycle * @param k slot in cycle to transmit in */ public TDMA(Coordinate coordinate, Channel channel, CommChannel commChannel, Queue queue, PacketProcessor processor, int n, int k) { super(coordinate, channel, commChannel, queue, processor); this.n = n; this.k = k; } public boolean run(double time, Simulator simulator) { flushReceived(simulator); if (processor.hasPkt(queue)) { if (checkSending(simulator)) { Packet sendPack = (Packet) processor.get(queue); for (int i = 0; i < transmitPartners.size(); i++) commChannel.transmit(this, (TDMA) transmitPartners.get(i), sendPack, simulator); } return true; } else return false; } /** Check if sending. * @param simulator simulator * @return if sending */ public boolean checkSending(Simulator simulator) { return ((Math.round(simulator.time()/simulator.timeIncrement)%n) == k); } public void receive(CommNode source, Object packet, Simulator simulator) { flushReceived(simulator); this.onGoing++; this.packet = packet; this.currSource = source; } /** Process received packet from last slot. * @param time time reference */ protected void flushReceived(TimeReference time) { if (lastReceiveTime != time.time()) { if (onGoing == 1) processor.receive(currSource, this, packet, queue); onGoing = 0; } lastReceiveTime = time.time(); } public Node newNode(Coordinate coordinate) { return new TDMA(coordinate, this.channel, this.commChannel, this.queue.newQueue(), this.processor, this.n, ((this.k+1) % n)); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2695674f9e00089e6acf8370a3f658051938c302
f567c98cb401fc7f6ad2439cd80c9bcb45e84ce9
/src/main/java/com/alipay/api/response/AlipayUserCertifyStudentinfoSyncResponse.java
39d755e6720649219b5c60bda86d20662204a7a3
[ "Apache-2.0" ]
permissive
XuYingJie-cmd/alipay-sdk-java-all
0887fa02f857dac538e6ea7a72d4d9279edbe0f3
dd18a679f7543a65f8eba2467afa0b88e8ae5446
refs/heads/master
2023-07-15T23:01:02.139231
2021-09-06T07:57:09
2021-09-06T07:57:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
383
java
package com.alipay.api.response; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.user.certify.studentinfo.sync response. * * @author auto create * @since 1.0, 2021-07-14 10:13:24 */ public class AlipayUserCertifyStudentinfoSyncResponse extends AlipayResponse { private static final long serialVersionUID = 6738125446957215132L; }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
df880ed48cb4e2795837afd14699d72c3c925d46
e6ce97698348b3cc3e8870290de74802c5f5053f
/src/test/java/comm/hanhan/springboot001/springbootdemo001/Springbootdemo001ApplicationTests.java
95ad98b46e3ffb206096ea7aa864b83eae0b2f93
[]
no_license
hanpenghu/springbootdemo001
404dfde7174b79eb305aa59a05de2e993deeaa1a
a0131dbfbcd06480fbe116bfe59d70e38362c68c
refs/heads/master
2021-01-01T17:25:52.612772
2017-07-25T04:08:16
2017-07-25T04:08:16
98,071,802
0
0
null
null
null
null
UTF-8
Java
false
false
371
java
package comm.hanhan.springboot001.springbootdemo001; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class Springbootdemo001ApplicationTests { @Test public void contextLoads() { } }
[ "563909408@qq.com" ]
563909408@qq.com
f4acc5f99465d54e701905d72102d015192f380a
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes2/wpc.java
a0cdc54e1735f02ae3683201f08f6c90d19fea8b
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
959
java
import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tencent.mqp.app.sec.MQPSensitiveMsgUtil; import com.tencent.qphone.base.util.BaseApplication; public class wpc implements Runnable { public wpc(MQPSensitiveMsgUtil paramMQPSensitiveMsgUtil, String paramString1, String paramString2) { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; } public void run() { Object localObject = "sp_confirmed_sensmsg_" + MQPSensitiveMsgUtil.a(); localObject = BaseApplication.getContext().getSharedPreferences((String)localObject, 0).edit(); ((SharedPreferences.Editor)localObject).putString(this.jdField_a_of_type_JavaLangString, this.b); ((SharedPreferences.Editor)localObject).commit(); } } /* Location: E:\apk\QQ_91\classes2-dex2jar.jar!\wpc.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
d537b577cf307573a5f8d27b1aed260e082757ec
8f5f5575c04dc95cf4855758822210ef839930b1
/goshop-parent/goshop-common-solr/src/main/java/com/goshop/solr/service/PageInfoFacet.java
c021c2e31b5babb874a62fb083f91f811774ecaf
[]
no_license
Lison9011/goshop
bd7efb6b65481528ba11521eec6248ad57968d18
a231a5225768527fe0f24d4387cf9dbfea3b6198
refs/heads/master
2021-07-23T02:52:32.282953
2017-11-02T10:06:01
2017-11-02T10:06:01
109,107,143
0
0
null
2017-11-01T08:37:36
2017-11-01T08:37:36
null
UTF-8
Java
false
false
682
java
package com.goshop.solr.service; import com.github.pagehelper.PageInfo; import org.apache.solr.client.solrj.response.FacetField; import java.util.List; /** * Created by Administrator on 2016/3/30. */ public class PageInfoFacet { private PageInfo pageInfo; private List<FacetField> facetFieldList; public PageInfo getPageInfo() { return pageInfo; } public void setPageInfo(PageInfo pageInfo) { this.pageInfo = pageInfo; } public List<FacetField> getFacetFieldList() { return facetFieldList; } public void setFacetFieldList(List<FacetField> facetFieldList) { this.facetFieldList = facetFieldList; } }
[ "pzh_gugu@126.com" ]
pzh_gugu@126.com
63dcdb8ef6d4ecac72f967735e05d1c42b772dc1
12a99ab3fe76e5c7c05609c0e76d1855bd051bbb
/src/main/java/com/alipay/api/domain/DishRecommend.java
926a34d32f0abcc390ff38c932b3d52030d28522
[ "Apache-2.0" ]
permissive
WindLee05-17/alipay-sdk-java-all
ce2415cfab2416d2e0ae67c625b6a000231a8cfc
19ccb203268316b346ead9c36ff8aa5f1eac6c77
refs/heads/master
2022-11-30T18:42:42.077288
2020-08-17T05:57:47
2020-08-17T05:57:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,974
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 推荐菜 * * @author auto create * @since 1.0, 2017-12-22 14:47:14 */ public class DishRecommend extends AlipayObject { private static final long serialVersionUID = 1454631867255329587L; /** * 购买可能性/商品热度得分 若type=CART_RECOMAND or DESIGN_FOR_YOU;则 buy_posibility有返回,内容为商品热度得分。 若type= ASSOCIATION_RECOMAND;则 buy_posibility有返回,内容为购买可能性。 若type=QUICK_ORDER;则 buy_posibility无返回。 */ @ApiField("buy_posibility") private String buyPosibility; /** * 菜品ID */ @ApiField("dish_id") private String dishId; /** * 菜品名称 */ @ApiField("dish_name") private String dishName; /** * 10 */ @ApiField("dish_num") private String dishNum; /** * 1234 */ @ApiField("dish_skuid") private String dishSkuid; /** * 推荐理由对应的CODE */ @ApiField("info_code") private String infoCode; public String getBuyPosibility() { return this.buyPosibility; } public void setBuyPosibility(String buyPosibility) { this.buyPosibility = buyPosibility; } public String getDishId() { return this.dishId; } public void setDishId(String dishId) { this.dishId = dishId; } public String getDishName() { return this.dishName; } public void setDishName(String dishName) { this.dishName = dishName; } public String getDishNum() { return this.dishNum; } public void setDishNum(String dishNum) { this.dishNum = dishNum; } public String getDishSkuid() { return this.dishSkuid; } public void setDishSkuid(String dishSkuid) { this.dishSkuid = dishSkuid; } public String getInfoCode() { return this.infoCode; } public void setInfoCode(String infoCode) { this.infoCode = infoCode; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
d31e9667ce7858605011966c8ba34027fdcc9c12
ae3389e3c4091b59a7ec82d6f5fd455cf10efa84
/library/src/main/java/com/lxj/xpopup/interfaces/OnSrcViewUpdateListener.java
08dda5d782bb3e91938632bd85bff61e377a108a
[]
no_license
396386866/XPopup
53ad8ea49756222912ee686b479c8efe58ba943f
6e47e13e1ea7729a7f2ec10d8010f19c1294890e
refs/heads/master
2020-04-19T16:34:15.948687
2019-01-30T07:39:17
2019-01-30T07:39:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
260
java
package com.lxj.xpopup.interfaces; import com.lxj.xpopup.core.ImageViewerPopupView; /** * Description: * Create by dance, at 2019/1/29 */ public interface OnSrcViewUpdateListener { void onSrcViewUpdate(ImageViewerPopupView popupView, int position); }
[ "16167479@qq.com" ]
16167479@qq.com
74f8906fd36c060b72ff9d7033ae5150cc08170a
78bf514b661c1bce5d72e20affc9238a766f838f
/onlineleasing-interactive-website/src/main/java/com/sbm/module/onlineleasing/interactive/website/shopimages/biz/IShopImagesService.java
a406f96cbdae14edfe379de645cc1ba4ff9edb83
[]
no_license
superbrandmall/microservice
5938e6661b4edd6fd6f08d52c11059690a4f2ed4
de932bd84b07295b186fb8d3e92d44523b391891
refs/heads/master
2021-07-01T23:36:21.102536
2019-03-27T05:30:07
2019-03-27T05:30:07
115,712,051
2
2
null
null
null
null
UTF-8
Java
false
false
457
java
package com.sbm.module.onlineleasing.interactive.website.shopimages.biz; import com.sbm.module.onlineleasing.interactive.website.shopimages.domain.ShopImages; import com.sbm.module.onlineleasing.interactive.website.shopimages.domain.ShopImagesQuery; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; public interface IShopImagesService { Page<ShopImages> findAll(ShopImagesQuery query, Pageable pageable); }
[ "295322187@qq.com" ]
295322187@qq.com
eb0ae1879b1e317d5eff44e266f89a589ad0b8f8
5aab4854814ec921752fbddbe25b15324b2ad7a1
/src/controller/News.java
23cbd03afb12459f3a235264267337dfba9fe39f
[]
no_license
Hgoel23/HPR
55a889ede6ca67516748dcf33dadea870bcd21f0
8447ef8942ee1486e1d11a459e2e8ddee4186ea0
refs/heads/master
2020-03-21T11:00:36.478782
2018-06-21T05:05:57
2018-06-21T05:05:57
138,483,895
0
0
null
null
null
null
UTF-8
Java
false
false
1,019
java
package controller; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import Dao.N; import Model.Clog; import Model.Newss; /** * Servlet implementation class News */ public class News extends HttpServlet { private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub PrintWriter out=response.getWriter(); Newss n=new Newss(); N nn=new N(); boolean s; n.ID=request.getParameter("Id"); n.News=request.getParameter("text"); s=N.insertt(n); if(s){ out.print("<html> <body bgcolor=cyan> <font color=black size=40> <center> posted successfully</center></font></html>"); } else { out.print("error"); } } }
[ "Dell@Dell-PC" ]
Dell@Dell-PC
a9134138981a1e9a4da605efc5900ebe1ff2eb64
686dcb47f80e2ece01cad71cd31da037346ac3aa
/utils/adapter/ItemViewDelegateManager.java
f5ac0496e5487538e29c86aa12447d77c81aca97
[]
no_license
zhangchengku/Newiroad
90efd4f3103d4efb0c171413040145619502206b
9eb2caddcbce10aaa8eedf3106c8a83e18c85d6e
refs/heads/master
2022-02-22T14:04:16.248670
2019-08-26T08:30:44
2019-08-26T08:30:44
198,362,891
0
0
null
null
null
null
UTF-8
Java
false
false
3,710
java
package com.zggk.newiroad.utils.adapter; import android.support.v4.util.SparseArrayCompat; /** * Created by zhy on 16/6/22. */ public class ItemViewDelegateManager<T> { SparseArrayCompat<ItemViewDelegate<T>> delegates = new SparseArrayCompat(); public int getItemViewDelegateCount() { return delegates.size(); } public ItemViewDelegateManager<T> addDelegate(ItemViewDelegate<T> delegate) { int viewType = delegates.size(); if (delegate != null) { delegates.put(viewType, delegate); viewType++; } return this; } public ItemViewDelegateManager<T> addDelegate(int viewType, ItemViewDelegate<T> delegate) { if (delegates.get(viewType) != null) { throw new IllegalArgumentException( "An ItemViewDelegate is already registered for the viewType = " + viewType + ". Already registered ItemViewDelegate is " + delegates.get(viewType)); } delegates.put(viewType, delegate); return this; } public ItemViewDelegateManager<T> removeDelegate(ItemViewDelegate<T> delegate) { if (delegate == null) { throw new NullPointerException("ItemViewDelegate is null"); } int indexToRemove = delegates.indexOfValue(delegate); if (indexToRemove >= 0) { delegates.removeAt(indexToRemove); } return this; } public ItemViewDelegateManager<T> removeDelegate(int itemType) { int indexToRemove = delegates.indexOfKey(itemType); if (indexToRemove >= 0) { delegates.removeAt(indexToRemove); } return this; } public int getItemViewType(T item, int position) { int delegatesCount = delegates.size(); for (int i = delegatesCount - 1; i >= 0; i--) { ItemViewDelegate<T> delegate = delegates.valueAt(i); if (delegate.isForViewType(item, position)) { return delegates.keyAt(i); } } throw new IllegalArgumentException( "No ItemViewDelegate added that matches position=" + position + " in data source"); } public void convert(ViewHolder holder, T item, int position) { int delegatesCount = delegates.size(); for (int i = 0; i < delegatesCount; i++) { ItemViewDelegate<T> delegate = delegates.valueAt(i); if (delegate.isForViewType(item, position)) { delegate.convert(holder, item, position); return; } } throw new IllegalArgumentException( "No ItemViewDelegateManager added that matches position=" + position + " in data source"); } public int getItemViewLayoutId(int viewType) { return delegates.get(viewType).getItemViewLayoutId(); } public int getItemViewType(ItemViewDelegate itemViewDelegate) { return delegates.indexOfValue(itemViewDelegate); } public ItemViewDelegate getItemViewDelegate(T item, int position) { int delegatesCount = delegates.size(); for (int i = delegatesCount - 1; i >= 0; i--) { ItemViewDelegate<T> delegate = delegates.valueAt(i); if (delegate.isForViewType(item, position)) { return delegate; } } throw new IllegalArgumentException( "No ItemViewDelegate added that matches position=" + position + " in data source"); } public int getItemViewLayoutId(T item, int position) { return getItemViewDelegate(item, position).getItemViewLayoutId(); } }
[ "13552008150@163.com" ]
13552008150@163.com
e78bb627f62e39b20193a60d73fa351e6baf4b85
9cc71443dfa5226118f76ae705ea09e30ae66f7a
/gameserver/data/scripts/system/handlers/quest/sanctum/_1044TestingFlightSkills.java
930ced12eb1ba12dfeb8c27d3090bfee5c6d218b
[]
no_license
osiris087/aionj
bedee651beb30b8e2e0163e60cbd03681077d80e
b12efe6d8f089f4ba313d519b32884b9395db904
refs/heads/master
2021-01-01T18:37:11.834976
2011-09-09T02:45:38
2011-09-09T02:45:38
2,353,467
0
1
null
null
null
null
UTF-8
Java
false
false
4,752
java
/* * This file is part of aion-unique <aion-unique.org>. * * aion-unique is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * aion-unique is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with aion-unique. If not, see <http://www.gnu.org/licenses/>. */ package quest.sanctum; import gameserver.model.flyring.FlyRing; import gameserver.model.gameobjects.player.Player; import gameserver.model.templates.flyring.FlyRingTemplate; import gameserver.quest.HandlerResult; import gameserver.quest.handlers.QuestHandler; import gameserver.quest.model.QuestCookie; import gameserver.quest.model.QuestState; import gameserver.quest.model.QuestStatus; import gameserver.services.QuestService; import gameserver.world.WorldMapType; /** * @author Hellboy, modified by Vincas, Rolandas * */ public class _1044TestingFlightSkills extends QuestHandler { private final static int questId = 1044; public _1044TestingFlightSkills() { super(questId); } @Override public void register() { qe.addQuestLvlUp(questId); qe.setNpcQuestData(203901).addOnTalkEvent(questId); qe.setNpcQuestData(203930).addOnTalkEvent(questId); qe.addOnQuestTimerEnd(questId); qe.addOnFlyThroughRing(questId); } @Override public HandlerResult onFlyThroughRingEvent(QuestCookie env, FlyRing ring) { FlyRingTemplate template = ring.getTemplate(); if(template.getMap() != WorldMapType.ELTNEN.getId()) return HandlerResult.UNKNOWN; Player player = env.getPlayer(); QuestState qs = player.getQuestStateList().getQuestState(questId); if (qs == null) return HandlerResult.FAILED; int var = qs.getQuestVarById(0); if (var < 2 || var > 7) return HandlerResult.FAILED; if(ring.getName().equals("ELTNEN_FORTRESS_210020000_1") && var == 2 || ring.getName().equals("ELTNEN_FORTRESS_210020000_2") && var == 3 || ring.getName().equals("ELTNEN_FORTRESS_210020000_3") && var == 4 || ring.getName().equals("ELTNEN_FORTRESS_210020000_4") && var == 5 || ring.getName().equals("ELTNEN_FORTRESS_210020000_5") && var == 6) { qs.setQuestVarById(0, var + 1); updateQuestStatus(env); } else if(ring.getName().equals("ELTNEN_FORTRESS_210020000_6") && var == 7) { QuestService.questTimerEnd(env); qs.setQuestVarById(0, 9); updateQuestStatus(env); } return HandlerResult.SUCCESS; } @Override public boolean onQuestTimerEndEvent(QuestCookie env) { Player player = env.getPlayer(); QuestState qs = player.getQuestStateList().getQuestState(questId); if(qs == null) return false; qs.setQuestVarById(0, 8); updateQuestStatus(env); return true; } @Override public boolean onDialogEvent(QuestCookie env) { Player player = env.getPlayer(); QuestState qs = player.getQuestStateList().getQuestState(questId); if(qs == null) return false; int var = qs.getQuestVarById(0); if(qs.getStatus() == QuestStatus.START) { switch(env.getTargetId()) { case 203901: { switch(env.getDialogId()) { case 26: if(var == 0) return sendQuestDialog(env, 1011); case 10000: return defaultCloseDialog(env, 0, 1); } } break; case 203930: { switch(env.getDialogId()) { case -1: if(player.getQuestTimerOn()) return sendQuestDialog(env, 3143); case 26: if(var == 1) return sendQuestDialog(env, 1352); else if(var == 9) return sendQuestDialog(env, 1693); else if(var == 8) return sendQuestDialog(env, 3057); case 1353: if(var == 1) { defaultQuestMovie(env, 40); return sendQuestDialog(env, 1353); } case 10001: if((var == 1 || var == 8)) { defaultCloseDialog(env, var, 2); QuestService.questTimerStart(env, 100); return true; } case 10255: if(var == 9) return defaultCloseDialog(env, 9, 0, true, false); } } break; } } return defaultQuestRewardDialog(env, 203901, 10002); } @Override public boolean onLvlUpEvent(QuestCookie env) { return defaultQuestOnLvlUpEvent(env, false); } }
[ "osiris087@gmail.com@2632a3c6-4342-beac-f942-17b406f9b7bb" ]
osiris087@gmail.com@2632a3c6-4342-beac-f942-17b406f9b7bb
8a6a91465b77c239ac593326d179c6761d2ae8bf
8e069c3fec6dc64cfa741daf6fe63212cc0be6fc
/src/p238_sol1.java
f5dc04205a80afe041c123bda609c6a9791f4b67
[]
no_license
hpplayer/LeetCode
81b9651d6ebf53287b1f27241be211add3e3bc8a
527df4581439cbfa52ac17c96f56b0447f87c3f0
refs/heads/master
2020-05-16T21:33:20.991009
2015-11-01T03:55:10
2015-11-01T03:55:10
31,480,577
0
1
null
null
null
null
UTF-8
Java
false
false
2,349
java
import java.util.Arrays; import java.util.HashMap; /* Product of Array Except Self Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i]. Solve it without division and in O(n). For example, given [1,2,3,4], return [24,12,8,6]. Follow up: Could you solve it with constant space complexity? (Note: The output array does not count as extra space for the purpose of space complexity analysis.) */ /** * This is a brainstorming like problem. The best solution does not use math, recursion, dp and other common techniques. * sol1 is my own solution which uses recursion. It supposed to work well. In each recursion, we can get value from previous part * and we use recursion to get value from next part. However it will report stackoverflow problem when running on large dataset. * I tried to use a hashMap to reduce redundant calculation but later I found the stackoverflow problem actually does not come from * repeat calculation but instead coming from the depth of recursion. So this solution will not work on large dataSet * * I searched Internet and found actually there is only one short but efficient way to solve this problem, see sol2 for this * beautiful solution. * @author hpPlayer * @date Aug 9, 2015 11:19:22 PM */ public class p238_sol1 { public static void main(String[] args){ int[] nums = {1,2,3,4 }; int[] result = new p238_sol1().productExceptSelf(nums); System.out.println(Arrays.toString(result)); } public int[] productExceptSelf(int[] nums) { int[] result = new int[nums.length]; DFS(0, nums, 1, result, new HashMap<Integer, Integer>()); return result; } public int DFS(int index, int[] nums, int prev, int[] result, HashMap<Integer, Integer> hs){ if(hs.get(index) != null) return hs.get(index); if(index == nums.length-1){ result[index] = prev; return nums[index]; } int next = 1; if(hs.get(index+1) != null){ System.out.println("im here"); next = hs.get(index+1); }else{ next = DFS(index + 1, nums, prev*nums[index], result, hs); } result[index] = prev * next; hs.put(index, result[index]); return next*nums[index]; } }
[ "hpplayer@live.cn" ]
hpplayer@live.cn
12748a2968c79d7ad5602a9d158148db8c3074c5
32cd2626b1e869a8d4433b9eb084cc4665cf938a
/src/com/javarush/test/level07/lesson06/task05/Solution.java
abfd4761764f3205cf66c221d15f53db1b2f96d3
[]
no_license
AndreyB12/JavaRushHomeWork
b41f0d21258cf488f879dfd4b0e00b60495d8ec3
a5857a1c01063bfb9a50e073006be9e5a7ff00bf
refs/heads/master
2021-01-23T13:09:06.967421
2017-01-27T08:22:31
2017-01-27T08:22:31
58,111,229
0
0
null
null
null
null
UTF-8
Java
false
false
1,200
java
package com.javarush.test.level07.lesson06.task05; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; /* Удали последнюю строку и вставь её в начало 1. Создай список строк. 2. Добавь в него 5 строчек с клавиатуры. 3. Удали последнюю строку и вставь её в начало. Повторить 13 раз. 4. Используя цикл выведи содержимое на экран, каждое значение с новой строки. */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ArrayList<String> list = new ArrayList<String>(); for (int i = 0; i < 5; i++) { list.add(reader.readLine()); } for (int i = 0; i < 13; i++) { list.add(0, list.get(list.size() - 1)); list.remove(list.size() - 1); } for (int i = 0; i < list.size(); i++) { System.out.println(list.get(i)); } } }
[ "andrey.butko@gmail.com" ]
andrey.butko@gmail.com
a216d3ad882163a6decab8578adcc871986366e6
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/sellhouse/app/BuildingUnitControllerRemoteHome.java
8074eefd980c3d63793a2bf25e6da1ee1b863691
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
250
java
package com.kingdee.eas.fdc.sellhouse.app; import javax.ejb.*; import java.rmi.RemoteException; public interface BuildingUnitControllerRemoteHome extends EJBHome { BuildingUnitControllerRemote create() throws CreateException, RemoteException; }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
52e77baa9ceca29689bf81345ab056573872054c
9e78cfcacd175852d160d64ae44c29bec1d75ec1
/src/main/java/org/neo4j/community/console/Route.java
5ed7319c76bab779b01eddcb869ae03e158616e2
[]
no_license
neo4j-contrib/rabbithole
89ca2092abb2aa6e6ad5472949ad280b73ded5c0
40ee17efe09262d0dee9a41eb617454ae238dad2
refs/heads/3.5
2023-08-25T17:38:22.181239
2022-07-05T12:35:33
2022-07-05T12:35:33
3,926,386
33
21
null
2023-02-24T17:39:47
2012-04-04T07:21:00
Java
UTF-8
Java
false
false
3,611
java
package org.neo4j.community.console; import org.slf4j.Logger; import org.neo4j.kernel.lifecycle.LifecycleException; import spark.HaltException; import spark.Request; import spark.Response; import javax.servlet.http.HttpServletRequest; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.net.URLEncoder; import java.util.Map; /** * @author mh * @since 08.04.12 */ abstract class Route extends spark.Route { private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(Route.class); Route(String path) { super(path); } public String stop(int status, String message) { halt(status, message); return message; } @Override public Object handle(Request request, Response response) { try { doBefore(request,response); return doHandle(request, response, service(request)); } catch (LifecycleException e) { reset(request); SessionService.cleanSessions(); return handleException(e); } catch (OutOfMemoryError e) { reset(request); SessionService.cleanSessions(); return handleException(e); } catch (HaltException he) { throw he; } catch (Exception e) { return handleException(e); } } private Object handleException(Throwable e) { e.printStackTrace(); halt(500, e.getMessage()); return e.getMessage(); } protected abstract Object doHandle(Request request, Response response, Neo4jService service) throws Exception; protected void doBefore(Request request, Response response) { } protected String param(Request request, String param, String defaultValue) { String data = request.queryParams(param); if (data == null || data.isEmpty()) { data = defaultValue; } else { LOG.warn(param+": "+data); } return data; } protected String param(Map input, String param, String defaultValue) { if (input==null) return defaultValue; String data = (String) input.get(param); if (data == null || data.isEmpty()) { data = defaultValue; } else { LOG.warn(param+": "+data); } return data; } protected long trace(String msg, long time) { long now = System.currentTimeMillis(); LOG.warn("## " + msg + " took: " + (now - time) + " ms."); return now; } protected String getSessionId(Request request) { return SessionService.getSessionId(request.raw()); } protected void reset(Request request) { SessionService.reset(request.raw()); } protected Neo4jService service(Request request) { return SessionService.getService(request.raw(),true); } protected String baseUri(HttpServletRequest request, String query, final String path) { final String requestURI = request.getRequestURL().toString(); try { final URI uri = new URI(requestURI); return new URI(uri.getScheme(),null,uri.getHost(),uri.getPort(), path,query,null).toString(); } catch (URISyntaxException e) { throw new RuntimeException("Error parsing URI from "+requestURI+" query "+query); } } protected String encodeParam(String param, String value) throws UnsupportedEncodingException { if (value==null || value.trim().isEmpty()) return ""; return param + "=" + URLEncoder.encode(value, "UTF-8"); } }
[ "github@jexp.de" ]
github@jexp.de
933b1222121eff58781b6e5f7c2885d4189c5254
7f9af984b70173d10a254f76cb105c7a22963c76
/src/day_34_ArrayListContinue/BulkOperations.java
27bec7b24e5fc5edfe150b007127046a65a39411
[]
no_license
IcyEzra/JavaProgramming2020_B21
50cdd6b1c2048bb849967302770fd86930308202
5498d1791ccbd1b69a3b60d52a36f0af7548a8b2
refs/heads/master
2023-02-25T06:39:43.267719
2021-02-05T01:19:08
2021-02-05T01:19:08
314,326,468
0
0
null
2021-02-05T01:19:09
2020-11-19T17:48:52
Java
UTF-8
Java
false
false
4,608
java
package day_34_ArrayListContinue; import java.lang.reflect.Array; import java.util.ArrayList; import java.util.Arrays; public class BulkOperations { public static void main(String[] args) { //containsAll method //containsAll(CollectionType) - verifies if the collection of elements are contained or not ArrayList<Integer> list = new ArrayList<>(); list.add(10); list.add(20); list.add(30); list.add(40); list.add(50); list.add(60); //verify if 10 is contained in the list boolean r1 = list.contains(10); //verify if 10, 30, 50, and 60 are all contained in the list boolean r2 = list.contains(10) && list.contains(30) && list.contains(50) && list.contains(60); System.out.println("r1 = " + r1); System.out.println("r2 = " + r2); // verifies if 10, 30, 50, and 60 are all contained in list boolean r3 = list.containsAll( Arrays.asList( 10,30,50,60 ) ); System.out.println("r3 = " + r3); ArrayList<String> group1 = new ArrayList<>(); group1.add("Ezra"); group1.add("Zero"); group1.add("X"); group1.add("Uzair"); // Ezra, Zero, MegaMan boolean r4 = group1.containsAll( Arrays.asList("Ezra", "Zero", "MegaMan") ); // false System.out.println("r4 = " + r4); // Zero, X, Uzair boolean r5 = group1.containsAll( Arrays.asList("Zero", "X", "Uzair") ); // true System.out.println("r5 = " + r5); System.out.println("========================================================"); //addAll(CollectionType) - adds multiple elements into the ArrayList ArrayList<Character> chars = new ArrayList<>(); chars.addAll( Arrays.asList('A', 'Z', 'C', 'B', 'H', 'I', 'K') ); System.out.println(chars); String[] names = {"Batman", "SuperMan", "SpiderMan", "Modok", "DeadPool", "IronMan", "Thanos", "Abomination" }; // adds names to list ArrayList<String> students = new ArrayList<>( Arrays.asList(names) ); // Arrays.asList(ArrayValue) - returns the array value as collection type, only for non primitive arrays to use. // adds all of String[] names into students // this is one way to add to an array using addAll, but objects can also be added by placing .asList method in ArrayList parentheses, as shown above // students.addAll( Arrays.asList(names) ); System.out.println(students); ArrayList<Character> ch1 = new ArrayList<>(Arrays.asList('A','B','C','D','E')); ch1.addAll( Arrays.asList('F','G','H','I','J') ); System.out.println(ch1); System.out.println("========================================="); // removeAll(CollectionType) - removes all matching elements from the array list, if the element we to remove is unknown then we cannot use removeAll ArrayList<String> group2 = new ArrayList<>(); group2.addAll( Arrays.asList(names) ); System.out.println(group2); /* remove each villian using single remove method group2.remove("Modok"); group2.remove("Thanos"); group2.remove("Abomination"); */ // removes all given objects in one go and adjusts size group2.removeAll( Arrays.asList("Modok","Thanos","Abomination") ); System.out.println(group2); System.out.println("======================================================"); ArrayList<String> employees = new ArrayList<>(); employees.addAll( Arrays.asList("Ahmed", "Ahmed", "Erjon", "Ahmed", "Ahmed", "Adil", "Afrooz") ); /* don't use this way for(int i=0; i <= employees.size()-1; i++){ if( employees.get(i).equals("Ahmed") ){ employees.remove(i); // without the interface iterable, remove method cannot be used in loop } } */ // use this way employees.removeAll( Arrays.asList("Ahmed") ); System.out.println(employees); System.out.println("========================================================="); // retainAll(CollectionType) - removes all elements that are not matching ArrayList<String> employees2 = new ArrayList<>(); employees2.addAll( Arrays.asList("Ahmed", "Ahmed", "Erjon", "Ahmed", "Ahmed", "Adil", "Afrooz") ); System.out.println(employees2); employees2.retainAll( Arrays.asList("Ahmed") ); System.out.println(employees2); } }
[ "uzairbaig.work@gmail.com" ]
uzairbaig.work@gmail.com
19fa486314bdb7e9820f1e6ebca1972c2bba5b8b
e1e5bd6b116e71a60040ec1e1642289217d527b0
/Interlude/L2jFrozen_15/L2jFrozen_15_Revision_1596/L2jFrozen_15/head-src/com/l2jfrozen/gameserver/managers/PacketsLoggerManager.java
7809949d345620f33abfc9b5365ae39e233e007f
[]
no_license
serk123/L2jOpenSource
6d6e1988a421763a9467bba0e4ac1fe3796b34b3
603e784e5f58f7fd07b01f6282218e8492f7090b
refs/heads/master
2023-03-18T01:51:23.867273
2020-04-23T10:44:41
2020-04-23T10:44:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,590
java
package com.l2jfrozen.gameserver.managers; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; import com.l2jfrozen.logs.Log; /** * @author Shyla */ public class PacketsLoggerManager { private final List<String> monitored_characters = new ArrayList<>(); private final Hashtable<String, List<String>> character_blocked_packets = new Hashtable<>(); protected PacketsLoggerManager() { character_blocked_packets.clear(); monitored_characters.clear(); } public void startCharacterPacketsMonitoring(final String character) { if (!monitored_characters.contains(character)) { monitored_characters.add(character); } } public void stopCharacterPacketsMonitoring(final String character) { if (monitored_characters.contains(character)) { monitored_characters.remove(character); } } public void blockCharacterPacket(final String character, final String packet) { List<String> blocked_packets = character_blocked_packets.get(character); if (blocked_packets == null) { blocked_packets = new ArrayList<>(); } if (!blocked_packets.contains(packet)) { blocked_packets.add(packet); } character_blocked_packets.put(character, blocked_packets); } public void restoreCharacterPacket(final String character, final String packet) { final List<String> blocked_packets = character_blocked_packets.get(character); if (blocked_packets != null) { if (blocked_packets.contains(packet)) { blocked_packets.remove(packet); } character_blocked_packets.put(character, blocked_packets); } } public boolean isCharacterMonitored(final String character) { return monitored_characters.contains(character); } public boolean isCharacterPacketBlocked(final String character, final String packet) { final List<String> blocked_packets = character_blocked_packets.get(character); if (blocked_packets != null) { if (blocked_packets.contains(packet)) { return true; } } return false; } public void logCharacterPacket(final String character, final String packet) { Log.add("[Character: " + character + "] has sent [Packet: " + packet + "]", character + "_packets"); } public static PacketsLoggerManager getInstance() { return SingletonHolder.instance; } private static class SingletonHolder { public static final PacketsLoggerManager instance = new PacketsLoggerManager(); } }
[ "64197706+L2jOpenSource@users.noreply.github.com" ]
64197706+L2jOpenSource@users.noreply.github.com
93695b2cf5d3a8f0405e5b5afc6c8323ec505f30
17eec5a820d0299bcd4879745109ea943d490eab
/ubk_Spider_50/src/com/unbank/robotspider/action/filter/CnYuqingcn.java
c8eed0026cb9fcd39c14ed77f8d580d3a492ea62
[]
no_license
un-knower/ubk_Spider_50
5dcf1ed21088788b692a437e95a99f8ac3ff8283
675693c9e51542d8435630cd6c9f6b9f95e50def
refs/heads/master
2020-03-17T22:52:53.663468
2017-06-08T09:24:39
2017-06-08T09:24:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,333
java
package com.unbank.robotspider.action.filter; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.springframework.stereotype.Component; import com.unbank.robotspider.action.model.normal.BaseFilter; import com.unbank.robotspider.action.model.normal.FilterLocator; @Component public class CnYuqingcn extends BaseFilter { private String domain[] = new String[] { "www.yuqingcn.cn" }; public CnYuqingcn() { for (int i = 0; i < domain.length; i++) { FilterLocator.getInstance().register(domain[i], this); } } @Override public Element removeNoNeedHtmlElement(String url, Document document, String title) { Element element = document.select("div#article").first(); return element; } @Override public void formatElements(Element maxTextElement) { super.formatElements(maxTextElement); } @Override public void saveImage(Element maxTextElement, String url) { super.saveImage(maxTextElement, url); } @Override public String replaceStockCode(String content) { return super.replaceStockCode(content); } @Override public String replaceSpechars(String content) { String str = super.replaceSpechars(content); return str; } @Override public String addTag(String content) { return super.addTag(content); } }
[ "1378022176@qq.com" ]
1378022176@qq.com
0767142bdfa1cd2ff9228b5c06876922d2c6a9f3
9c63e1b8c2e3bcb4978f97638fcc10ff238ba490
/src/main/java/org/coletivojava/fw/utilCoreBase/UtilSBCoreReflexaoAPIERPRestFull.java
49d7770d72ee430aede270ebd8c3615399807de0
[]
no_license
salviof/SBApiCore
661b35da1a403b57ca418ea4f2eb8d0fdce2d04f
197e0fe6a3b5100599db7e548ce6614aeb497cfc
refs/heads/master
2023-09-04T07:33:47.258111
2023-08-28T12:11:40
2023-08-28T12:11:40
156,992,474
0
0
null
2023-06-14T22:29:15
2018-11-10T15:11:28
Java
UTF-8
Java
false
false
2,670
java
/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template */ package org.coletivojava.fw.utilCoreBase; import com.super_bits.modulosSB.SBCore.modulos.erp.ItfSistemaERP; /** * * @author salvio */ public class UtilSBCoreReflexaoAPIERPRestFull { private static final String CAMINHO_PACOTES = "org.coletivoJava.fw.projetos.integracao.implemetation.model.conversao"; public static String getNomeClasseToJson(ItfSistemaERP pSistema, Class pClasse) { String nomeClasse = pClasse.getSimpleName() + "ToJson"; nomeClasse = UtilSBCoreStringsMaiuculoMinusculoSimples.getPrimeiraLetraMaiusculo(nomeClasse); return nomeClasse; } public static String getNomeClasseToObject(ItfSistemaERP pSistema, Class pClasse) { String nomeClasse = pClasse.getSimpleName() + "ToObjeto"; nomeClasse = UtilSBCoreStringsMaiuculoMinusculoSimples.getPrimeiraLetraMaiusculo(nomeClasse); return nomeClasse; } public static String getPacoteClassesConversao(ItfSistemaERP pSistema, Class pClasse) { String nomeAplicacao = getSlugAplicacao(pSistema); nomeAplicacao = UtilSBCoreStringsMaiuculoMinusculoSimples.getPrimeiraLetraMinuscula(nomeAplicacao); return CAMINHO_PACOTES + "." + nomeAplicacao; } public static String gerarCaminhoCompletoClasseObjetoToJson(ItfSistemaERP pSistema, Class pClasse) { String nome = getPacoteClassesConversao(pSistema, pClasse) + "." + getNomeClasseToJson(pSistema, pClasse); return nome; } public static String gerarCaminhoCompletoClasseJsonToObjeto(ItfSistemaERP pSistema, Class pClasse) { String nome = getPacoteClassesConversao(pSistema, pClasse) + "." + getNomeClasseToObject(pSistema, pClasse); return nome; } /** * * TODO: buscar o nome da aplicação via chamada webservice, considerar um * registro de DNS com informações básicas da aplicação * * @param pSistema * @return */ public static String getSlugAplicacao(ItfSistemaERP pSistema) { String nomeaplicacao = "mktFaturamento"; if (pSistema.getDominio().contains("fatura")) { nomeaplicacao = "mktFaturamento"; } if (pSistema.getDominio().contains("crm")) { nomeaplicacao = "Intranet_Marketing_Digital"; } if (pSistema.getDominio().contains("contabil") || pSistema.getDominio().contains("fluxocaixa")) { nomeaplicacao = "fluxoDeCaixa"; } return nomeaplicacao; } }
[ "salviof@gmail.com" ]
salviof@gmail.com
d137baa90aba36d6f0126f41244f552fca4e93ca
1f62961866391e82c4021b33793c2a9c45af1e0b
/unicode-java8/src/test/java/systems/uom/unicode/SystemOfUnitsServiceTest.java
0d8a6a49e2a2ff232b67b4edbb086fffdb7a899c
[ "BSD-3-Clause" ]
permissive
ejberry/uom-systems
d541c664866812ef00e942b78bf5b7e38e4da1e9
118bfacac09863c5d367c6ad3c88e95a5bca611b
refs/heads/master
2021-01-13T07:12:23.454593
2017-06-18T23:17:03
2017-06-18T23:17:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,171
java
/* * Units of Measurement Systems for Java * Copyright (c) 2005-2017, Jean-Marie Dautelle, Werner Keil and others. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * * 3. Neither the name of JSR-363 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package systems.uom.unicode; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import java.util.Collection; import javax.measure.spi.ServiceProvider; import javax.measure.spi.SystemOfUnits; import javax.measure.spi.SystemOfUnitsService; import org.junit.BeforeClass; import org.junit.Test; public class SystemOfUnitsServiceTest { private static final int NUM_OF_UNITS = 95; private static SystemOfUnitsService defaultService; @BeforeClass public static void setUp() { defaultService = ServiceProvider.current().getSystemOfUnitsService(); } @Test public void testDefaultUnitSystemService() { assertNotNull(defaultService); assertEquals("systems.uom.unicode.internal.CLDRSystemService", defaultService.getClass().getName()); SystemOfUnits system = defaultService.getSystemOfUnits(); assertNotNull(system); assertEquals("systems.uom.unicode.CLDR", system.getClass().getName()); assertEquals("Unicode CLDR", system.getName()); assertNotNull(system.getUnits()); assertEquals(NUM_OF_UNITS, system.getUnits().size()); } @Test public void testOtherUnitSystemServices() { Collection<ServiceProvider> services = ServiceProvider.available(); assertNotNull(services); assertEquals(2, services.size()); // for (SystemOfUnitsService service : services) { // checkService(service); // } } @Test // TODO consolidate asserts public void testUnitSystemServiceAlias() { assertNotNull(defaultService); assertEquals("systems.uom.unicode.internal.CLDRSystemService", defaultService.getClass().getName()); SystemOfUnits system = defaultService.getSystemOfUnits("CLDR"); assertNotNull(system); assertEquals("systems.uom.unicode.CLDR", system.getClass().getName()); assertEquals("Unicode CLDR", system.getName()); assertNotNull(system.getUnits()); assertEquals(NUM_OF_UNITS, system.getUnits().size()); SystemOfUnits system2 = defaultService.getSystemOfUnits("Unicode"); assertEquals(system, system2); } /* * private void checkService(SystemOfUnitsService service) { SystemOfUnits * system; switch (service.getClass().getName()) { case * "systems.uom.iso80k.internal.ISO80kSystemService": * assertEquals("systems.uom.iso80k.internal.ISO80kSystemService", * service.getClass().getName()); * assertNotNull(service.getAvailableSystemsOfUnits()); assertEquals(1, * service.getAvailableSystemsOfUnits().size()); system = * service.getSystemOfUnits(); assertNotNull(system); * assertEquals("ISO80000", system.getName()); system = * service.getSystemOfUnits("ISO80000"); assertNotNull(system); * assertEquals("ISO80000", system.getName()); break; case * "si.uom.impl.SISystemService": * assertEquals("si.uom.impl.SISystemService", service.getClass() * .getName()); assertNotNull(service.getAvailableSystemsOfUnits()); * assertEquals(1, service.getAvailableSystemsOfUnits().size()); system = * service.getSystemOfUnits(); assertNotNull(system); assertEquals("SI", * system.getName()); break; case * "tec.units.ri.internal.DefaultSystemOfUnitsService": * assertEquals("tec.units.ri.internal.DefaultSystemOfUnitsService", * service.getClass().getName()); * assertNotNull(service.getAvailableSystemsOfUnits()); assertEquals(1, * service.getAvailableSystemsOfUnits().size()); system = * service.getSystemOfUnits(); assertNotNull(system); assertEquals("Units", * system.getName()); break; default: break; } } */ }
[ "werner.keil@gmx.net" ]
werner.keil@gmx.net
4b9747f924acb1fd3ef069790a122a84016611b7
7c273e6f583738726c55589650ecb56181c3a677
/testing-libraries/src/test/java/com/uj/study/cucumber/books/BookStoreRunSteps.java
c2b29e06d43c18f8fbb863ae1449e5c23692df36
[]
no_license
unclejet/testing-study
6d57f3fb1e4dfeecbf592bfb5054eadc0fcc9ee8
f9ebab3e8aa59f1c63f682d8c622866888110ffd
refs/heads/master
2022-09-16T10:15:02.743588
2021-12-20T03:20:42
2021-12-20T03:20:42
237,132,977
0
0
null
2022-02-16T01:14:28
2020-01-30T03:40:06
Java
UTF-8
Java
false
false
2,112
java
package com.uj.study.cucumber.books; import java.util.ArrayList; import java.util.List; import java.util.Map; import io.cucumber.java.Before; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; import io.cucumber.datatable.DataTable; import static org.junit.Assert.*; public class BookStoreRunSteps { private BookStore store; private List<Book> foundBooks; private Book foundBook; @Before public void setUp() { store = new BookStore(); foundBooks = new ArrayList<>(); } @Given("^I have the following books in the store$") public void haveBooksInTheStore(DataTable table) { haveBooksInTheStoreByList(table); } @Given("^I have the following books in the store by list$") public void haveBooksInTheStoreByList(DataTable table) { List<List<String>> rows = table.asLists(String.class); for (List<String> columns: rows) { store.addBook(new Book(columns.get(0), columns.get(1))); } } @Given("^I have the following books in the store by map$") public void haveBooksInTheStoreByMap(DataTable table) { List<Map<String, String>> rows = table.asMaps(String.class, String.class); for (Map<String, String> columns: rows) { store.addBook(new Book(columns.get("title"), columns.get("author"))); } } @Given("^I have the following books in the store with transformer$") public void haveBooksInTheStoreByTransformer(BookCatalog catalog) { store.addAllBooks(catalog.getBooks()); } @When("^I search for books by author (.+)$") public void searchForBooksByAuthor(String author) { foundBooks = store.booksByAuthor(author); } @Then("^I find (\\d+) books$") public void findBooks(int count) { assertEquals(count, foundBooks.size()); } @Then("^I find a book$") public void findABook() { assertNotNull(foundBook); } @Then("^I find no book$") public void findNoBook() { assertNull(foundBook); } }
[ "unclejet@126.com" ]
unclejet@126.com
c3ba7004a4349033b6084f38d47a480053c633f4
a06d7c64721f91f5f262ad8ff8d474ce0e46ff69
/Project/Practice/src/com/cyq7on/sword2offer/array/RotatedSortedArray.java
83474c98787b0b64e11eb4d48b2ba8f32e1f2dde
[ "Apache-2.0" ]
permissive
cyq7on/DataStructureAndAlgorithm
99ad9123598e4b49f4ccde5357d40fc65509b51d
aa1ee0cd4c8756ad345430f38b2a38a407716d6d
refs/heads/master
2021-01-22T07:25:17.298062
2020-10-19T12:37:30
2020-10-19T12:37:30
81,808,591
0
0
null
null
null
null
UTF-8
Java
false
false
3,393
java
package com.cyq7on.sword2offer.array; /** * @author cyq7on * @description Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. * <p> * (i.e.,  [0,1,2,4,5,6,7] might become  [4,5,6,7,0,1,2]). * <p> * Find the minimum element. * <p> * The array may contain duplicates. * <p> * Example 1: * <p> * Input: [1,3,5] * Output: 1 * Example 2: * <p> * Input: [2,2,2,0,1] * Output: 0 * Note: * <p> * This is a follow up problem to Find Minimum in Rotated Sorted Array. * Would allow duplicates affect the run-time complexity? How and why? * <p> * 来源:力扣(LeetCode) * 链接:https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array-ii * 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 * @create 2020/2/15 **/ public class RotatedSortedArray { public int findMin(int[] nums) { if (nums.length < 2) { return nums[0]; } if (nums[0] < nums[nums.length - 1]) { return nums[0]; } int left = 0; int right = nums.length - 1; while (right - left > 1) { int mid = (right - left) / 2 + left; if (nums[mid] > nums[right]) { left = mid; } else if (nums[mid] < nums[right]) { right = mid; } else { //这是剑指offer解法,更优解法如下: // return iterFindMin(nums); right--; } } return nums[right]; } public int search(int[] nums, int target) { if (nums == null || nums.length == 0) { return -1; } if (nums.length == 1){ return nums[0] == target ? 0 : -1; } int index = 0; while (index <= nums.length - 1 && nums[index] >= nums[0]){ index++; } int search = search(nums, target, 0, index - 1); if (search >= 0) { return search; } return search(nums, target, index, nums.length - 1); } private int search(int[] nums, int target, int left, int right) { while (left <= right) { int mid = left + (right - left) / 2; if (nums[mid] < target) { left = mid + 1; } else if (nums[mid] > target) { right = mid - 1; }else { return mid; } } return -1; } private int iterFindMin(int[] nums) { int pre = nums[0]; for (int i = 1; i < nums.length; i++) { if (nums[i] < pre) { pre = nums[i]; break; } } return pre; } public static void main(String[] args) { RotatedSortedArray rotatedSortedArray = new RotatedSortedArray(); System.out.println(rotatedSortedArray.findMin(new int[]{3, 4, 5, 1, 2})); System.out.println(rotatedSortedArray.findMin(new int[]{4, 5, 6, 7, 0, 1, 2})); System.out.println(rotatedSortedArray.search(new int[]{4, 5, 6, 7, 0, 1, 2}, 0)); System.out.println(rotatedSortedArray.search(new int[]{4, 5, 6, 7, 0, 1, 2}, 3)); System.out.println(rotatedSortedArray.search(new int[]{1,3}, 0)); System.out.println(rotatedSortedArray.search(new int[]{5,1,3}, 5)); } }
[ "cyq7on@qq.com" ]
cyq7on@qq.com
3066cabcc8c58170c6f893e233705de05d18a94c
d7be0cf96dae35a98dc1643011e025a28e3c92bd
/QZLogicServer/src/main/java/com/ks/logic/db_template/FriendDBBeanSqlTemplate.java
d35cd068dd08ab5497e048781223954ef34418e2
[]
no_license
liaohanjie/QZStore
8ab5827138266dc88179ee2cfb94c98d391c39be
698d1e7d8386bca3b15fd4b3ea3020e5b9cc3c43
refs/heads/master
2021-01-10T18:35:14.604327
2016-05-31T05:17:50
2016-05-31T05:17:50
59,005,984
0
1
null
null
null
null
UTF-8
Java
false
false
2,849
java
package com.ks.logic.db_template; public final class FriendDBBeanSqlTemplate extends com.ks.access.DBBeanSqlTemplate<com.ks.db.model.Friend>{ public FriendDBBeanSqlTemplate(){ super(); clazz=com.ks.db.model.Friend.class; mapper = new com.ks.table.FriendTable.DBRowMapper_Friend(); sqlMap.put("updateFriend","update $tablename set `user_id`=?,`friend_id`=?,`state`=?,`use_count`=?,`friendly_degrees`=?,`last_ref_time`=?,`create_time`=?,`update_time`=? where `user_id`=? and `friend_id`=?"); sqlMap.put("queryFriends","select * from $tablename where `user_id`=?"); sqlMap.put("deleteFriend","delete from $tablename where `user_id`=? and `friend_id`=?"); sqlMap.put("addFriend","insert $tablename (`user_id`,`friend_id`,`state`,`use_count`,`friendly_degrees`,`last_ref_time`,`create_time`,`update_time`) values (?,?,?,?,?,?,?,?)"); paramMethodMap.put("updateFriend", new DynamicUpdata_updateFriend()); paramMethodMap.put("queryFriends", new DynamicSelect_queryFriends()); paramMethodMap.put("deleteFriend", new DynamicDelete_deleteFriend()); paramMethodMap.put("addFriend", new DynamicInsert_addFriend()); } public final class DynamicUpdata_updateFriend implements com.ks.access.DBBeanParamMethod<com.ks.db.model.Friend>{ @Override public java.util.List<Object> getParams(com.ks.db.model.Friend bean){ java.util.List<Object> list = new java.util.ArrayList<Object>(); list.add(bean.getUserId()); list.add(bean.getFriendId()); list.add(bean.getState()); list.add(bean.getUseCount()); list.add(bean.getFriendlyDegrees()); list.add(bean.getLastRefTime()); list.add(bean.getCreateTime()); list.add(bean.getUpdateTime()); list.add(bean.getUserId()); list.add(bean.getFriendId()); return list; } } public final class DynamicSelect_queryFriends implements com.ks.access.DBBeanParamMethod<com.ks.db.model.Friend>{ @Override public java.util.List<Object> getParams(com.ks.db.model.Friend bean){ java.util.List<Object> list = new java.util.ArrayList<Object>(); list.add(bean.getUserId()); return list; } } public final class DynamicDelete_deleteFriend implements com.ks.access.DBBeanParamMethod<com.ks.db.model.Friend>{ @Override public java.util.List<Object> getParams(com.ks.db.model.Friend bean){ java.util.List<Object> list = new java.util.ArrayList<Object>(); list.add(bean.getUserId()); list.add(bean.getFriendId()); return list; } } public final class DynamicInsert_addFriend implements com.ks.access.DBBeanParamMethod<com.ks.db.model.Friend>{ @Override public java.util.List<Object> getParams(com.ks.db.model.Friend bean){ java.util.List<Object> list = new java.util.ArrayList<Object>(); list.add(bean.getUserId()); list.add(bean.getFriendId()); list.add(bean.getState()); list.add(bean.getUseCount()); list.add(bean.getFriendlyDegrees()); list.add(bean.getLastRefTime()); list.add(bean.getCreateTime()); list.add(bean.getUpdateTime()); return list; } } }
[ "liaohanjie1314@126.com" ]
liaohanjie1314@126.com
d2e1e5a9d22b2a0fe79c8289c020fb7fda5f24f3
e2a4b0c419e10d5b1d26b6044f086053b12d65eb
/tags/pre_filenameparsing/src/java/org/apache/commons/vfs/provider/AbstractFileProvider.java
3bbb52cfa483c0a4d60eb320279c3e194994ca5e
[ "Apache-2.0" ]
permissive
JLLeitschuh/commons-vfs
a2a05ec1f234520f4cb50b2ba2e4a83cc1225a10
459418c3dc06c36fc2eac8e0630e82d33593aa2f
refs/heads/master
2021-01-02T21:07:39.360603
2015-01-11T23:11:44
2015-01-11T23:11:44
239,800,971
0
0
null
2020-11-17T18:51:51
2020-02-11T15:49:20
null
UTF-8
Java
false
false
4,100
java
/* * Copyright 2002, 2003,2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.vfs.provider; import org.apache.commons.vfs.FileObject; import org.apache.commons.vfs.FileSystem; import org.apache.commons.vfs.FileSystemConfigBuilder; import org.apache.commons.vfs.FileSystemException; import org.apache.commons.vfs.FileSystemOptions; import java.util.Iterator; import java.util.Map; import java.util.TreeMap; /** * A partial {@link FileProvider} implementation. Takes care of managing the * file systems created by the provider. * * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a> * @version $Revision$ $Date$ */ public abstract class AbstractFileProvider extends AbstractVfsContainer implements FileProvider { public AbstractFileProvider() { } /** * The cached file systems. This is a mapping from root URI to * FileSystem object. */ // private final Map fileSystems = new HashMap(); private final Map fileSystems = new TreeMap(); /** * Closes the file systems created by this provider. */ public void close() { synchronized (fileSystems) { fileSystems.clear(); super.close(); } } /** * Creates a layered file system. This method throws a 'not supported' exception. */ public FileObject createFileSystem(final String scheme, final FileObject file, final FileSystemOptions properties) throws FileSystemException { // Can't create a layered file system throw new FileSystemException("vfs.provider/not-layered-fs.error", scheme); } /** * Adds a file system to those cached by this provider. The file system * may implement {@link VfsComponent}, in which case it is initialised. */ protected void addFileSystem(final Comparable key, final FileSystem fs) throws FileSystemException { synchronized (fileSystems) { // Add to the cache addComponent(fs); FileSystemKey treeKey = new FileSystemKey(key, fs.getFileSystemOptions()); ((AbstractFileSystem) fs).setCacheKey(treeKey); fileSystems.put(treeKey, fs); } } /** * Locates a cached file system * * @return The provider, or null if it is not cached. */ protected FileSystem findFileSystem(final Comparable key, final FileSystemOptions fileSystemProps) { synchronized (fileSystems) { FileSystemKey treeKey = new FileSystemKey(key, fileSystemProps); return (FileSystem) fileSystems.get(treeKey); } } public FileSystemConfigBuilder getConfigBuilder() { return null; } public void freeUnusedResources() { synchronized (fileSystems) { Iterator iterFileSystems = fileSystems.values().iterator(); while (iterFileSystems.hasNext()) { AbstractFileSystem fs = (AbstractFileSystem) iterFileSystems.next(); if (fs.isReleaseable()) { fs.closeCommunicationLink(); } } } } public void closeFileSystem(final FileSystem filesystem) { synchronized (fileSystems) { AbstractFileSystem fs = (AbstractFileSystem) filesystem; fileSystems.remove(fs.getCacheKey()); removeComponent(fileSystems); fs.close(); } } }
[ "bayard@13f79535-47bb-0310-9956-ffa450edef68" ]
bayard@13f79535-47bb-0310-9956-ffa450edef68
7efa9c43cbd8e8c270838a47ba095ff01bfca01c
8d8fb4dfd7be299076651e02d26eba6cd879428c
/instrumentation/jedis-1.4.0/src/main/java/redis/clients/jedis/JedisPubSub.java
3ab8cc49808a786f3ff574864cc58aff9a5b3c76
[ "Apache-2.0" ]
permissive
newrelic/newrelic-java-agent
db6dd20f6ba3f43909b004ce4a058f589dd4b017
eb298ecd8d31f93622388aa12d3ba1e68a58f912
refs/heads/main
2023-08-31T05:14:44.428903
2023-08-29T10:37:35
2023-08-30T18:08:38
275,016,355
177
150
Apache-2.0
2023-09-11T14:50:06
2020-06-25T21:13:42
Java
UTF-8
Java
false
false
2,785
java
/* * * * Copyright 2020 New Relic Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * */ package redis.clients.jedis; import com.newrelic.agent.bridge.datastore.DatastoreVendor; import com.newrelic.api.agent.DatastoreParameters; import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.Trace; import com.newrelic.api.agent.TracedMethod; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.NewField; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; @Weave(type = MatchType.BaseClass) public abstract class JedisPubSub { @NewField private String host; @NewField private int port; private void process(Client client) { this.host = client.getHost(); this.port = client.getPort(); Weaver.callOriginal(); } @Trace public void onMessage(String channel, String message) { try { Weaver.callOriginal(); } finally { instrument(NewRelic.getAgent().getTracedMethod(), "message", host, port); } } @Trace public void onPMessage(String pattern, String channel, String message) { try { Weaver.callOriginal(); } finally { instrument(NewRelic.getAgent().getTracedMethod(), "message", host, port); } } @Trace public void onSubscribe(String channel, int subscribedChannels) { try { Weaver.callOriginal(); } finally { instrument(NewRelic.getAgent().getTracedMethod(), "subscribe", host, port); } } @Trace public void onUnsubscribe(String channel, int subscribedChannels) { try { Weaver.callOriginal(); } finally { instrument(NewRelic.getAgent().getTracedMethod(), "unsubscribe", host, port); } } @Trace public void onPUnsubscribe(String pattern, int subscribedChannels) { try { Weaver.callOriginal(); } finally { instrument(NewRelic.getAgent().getTracedMethod(), "unsubscribe", host, port); } } @Trace public void onPSubscribe(String pattern, int subscribedChannels) { try { Weaver.callOriginal(); } finally { instrument(NewRelic.getAgent().getTracedMethod(), "subscribe", host, port); } } private void instrument(TracedMethod method, String commandName, String host, int port) { NewRelic.getAgent().getTracedMethod().reportAsExternal(DatastoreParameters .product(DatastoreVendor.Redis.name()) .collection(null) .operation(commandName) .instance(host, port) .build()); } }
[ "49817386+jeffalder@users.noreply.github.com" ]
49817386+jeffalder@users.noreply.github.com
e74e38da5e67d9c7b9ef09e575e8c84f2e83212b
af4b44b5cc41199bb70ab5477d4da49456800bfa
/clouddo-Test/src/main/java/设计模式/Builder/MealBuilder.java
0353d61f341970d621a1b4e478308dc721f8d1db
[]
no_license
liuxianang/myclouddo
cb1d0517d37213daed787eaff1150d8333de1a15
bd95a55f753c4bcabb7ef7e9a0b3ff12dbb4d179
refs/heads/master
2023-02-10T16:26:27.291353
2021-01-08T02:00:16
2021-01-08T02:00:16
327,771,052
1
0
null
null
null
null
UTF-8
Java
false
false
403
java
package 设计模式.Builder; public class MealBuilder { public Meal prepareVegMeal (){ Meal meal = new Meal(); meal.addItem(new VegBurger()); meal.addItem(new Coke()); return meal; } public Meal prepareNonVegMeal (){ Meal meal = new Meal(); meal.addItem(new ChickenBurger()); meal.addItem(new Pepsi()); return meal; } }
[ "11" ]
11
8e86513a78186c89c4b134592ff80312521b8c4e
fe106af0590945186bc93939c2765eaee69984ff
/L2J_Server/java/net/sf/l2j/gameserver/serverpackets/LeaveWorld.java
cd0b62e12b81c3ab7bfd9747714afb9307966fec
[]
no_license
ChaosPaladin/project_c4
964ca637f892f18a3705dba3119b301d15ada5e6
6dd1e4280c2aa890ffb11c5ca9a2e3759ac41d3d
refs/heads/master
2021-01-21T18:57:25.999360
2017-03-12T06:01:04
2017-03-12T06:01:04
92,095,468
0
1
null
null
null
null
UTF-8
Java
false
false
1,273
java
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package net.sf.l2j.gameserver.serverpackets; /** * This class ... * @version $Revision: 1.3.2.1.2.3 $ $Date: 2005/03/27 15:29:39 $ */ public class LeaveWorld extends ServerBasePacket { private static final String _S__96_LEAVEWORLD = "[S] 7e LeaveWorld"; final void runImpl() { // no long-running tasks } final void writeImpl() { writeC(0x7e); } /* (non-Javadoc) * @see net.sf.l2j.gameserver.serverpackets.ServerBasePacket#getType() */ public String getType() { return _S__96_LEAVEWORLD; } }
[ "shkarubsky@gmail.com" ]
shkarubsky@gmail.com
52452d76d9e5ecc2c7eda97657fa0054e139bcae
15acc10c96741b40ada276b1ecf4c49d8efbc3cc
/hedwig-api/src/main/java/com/hs/mail/security/RolePrincipal.java
786f346565a1331c0637284d80fe9f707bbcd2ae
[ "Apache-2.0" ]
permissive
snowone/hedwig
76bcb708d3f3743b3c8070fa2b6592e469cfde3c
226344cde50e5f3e08f624c8c92fbc719436505c
refs/heads/master
2021-01-11T11:08:48.558648
2013-10-16T09:13:59
2013-10-16T09:13:59
29,674,715
1
0
null
2015-01-22T11:06:41
2015-01-22T11:06:39
Java
UTF-8
Java
false
false
900
java
/* * Copyright 2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hs.mail.security; /** * Represents a role as a JAAS principal. * * @author Won Chul Doh * @since Jul 18, 2007 * */ public class RolePrincipal extends BasicPrincipal { public RolePrincipal(String role) { super(role); } }
[ "wonchul@aade673b-a3a6-47a5-a793-c3231508b26e" ]
wonchul@aade673b-a3a6-47a5-a793-c3231508b26e
379e2ba0adbcf1a74a264f859074a86ce025c44e
4c5e190a9eb4925d5ef4be5f9e7f69f2bae8a9c0
/Utils/cleansdk/src/main/java/com/clean/spaceplus/cleansdk/base/db/strings2_cache/Strings2CacheProvider.java
316604a9434ee7fc6c0c9f9645f9e84de6a7001e
[]
no_license
SteamedBunZL/AndroidUtils
5bb4346a373b0ef3deace4d7ad69e9deeca90ab2
31f9b630f5b67d8608a6b5bfc6caee4cd3c045ee
refs/heads/master
2020-09-18T05:34:36.300027
2018-06-05T06:24:57
2018-06-05T06:24:57
66,835,083
0
1
null
null
null
null
UTF-8
Java
false
false
1,034
java
package com.clean.spaceplus.cleansdk.base.db.strings2_cache; import android.content.Context; import com.clean.spaceplus.cleansdk.base.db.base.BaseDBFactory; import com.clean.spaceplus.cleansdk.base.db.base.BaseDatabaseProvider; import com.clean.spaceplus.cleansdk.app.SpaceApplication; /** * @author Jerry * @Description: * @date 2016/5/3 11:23 * @copyright TCL-MIG */ public class Strings2CacheProvider extends BaseDatabaseProvider { private static Strings2CacheProvider sCleanPathCacheProvider = null; public static synchronized Strings2CacheProvider getInstance() { if (sCleanPathCacheProvider == null) { sCleanPathCacheProvider = new Strings2CacheProvider(SpaceApplication.getInstance().getContext()); } return sCleanPathCacheProvider; } private Strings2CacheProvider(Context context){ //onCreate(context, Strings2CacheFactory.createFactory(context)); onCreate(context, BaseDBFactory.getTableFactory(context,BaseDBFactory.TYPE_STRING2CACHE)); } }
[ "stevezhang@tcl.com" ]
stevezhang@tcl.com
be4f83f1b235ae5c6f89606273f5ecd67c6bb97e
ff060793eb77701587bf1b7ba9f25ed49a2ba359
/aws-java-sdk-pi/src/main/java/com/amazonaws/services/pi/AWSPIAsyncClientBuilder.java
803f1bfd097c12f61d2a3b7c3ecdc87186ea368d
[ "Apache-2.0" ]
permissive
qp3research/aws-sdk-java
39e8123d37a39b3931f4737830141bfba76dc220
a188c3865685cacbd5c73bae66ad7be0b185af48
refs/heads/master
2021-10-15T07:00:40.638759
2019-02-05T09:03:59
2019-02-05T09:03:59
169,162,468
0
0
Apache-2.0
2019-02-04T22:53:19
2019-02-04T22:53:19
null
UTF-8
Java
false
false
2,306
java
/* * Copyright 2013-2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.pi; import javax.annotation.Generated; import com.amazonaws.ClientConfigurationFactory; import com.amazonaws.annotation.NotThreadSafe; import com.amazonaws.client.builder.AwsAsyncClientBuilder; import com.amazonaws.client.AwsAsyncClientParams; /** * Fluent builder for {@link com.amazonaws.services.pi.AWSPIAsync}. Use of the builder is preferred over using * constructors of the client class. **/ @NotThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public final class AWSPIAsyncClientBuilder extends AwsAsyncClientBuilder<AWSPIAsyncClientBuilder, AWSPIAsync> { private static final ClientConfigurationFactory CLIENT_CONFIG_FACTORY = new ClientConfigurationFactory();; /** * @return Create new instance of builder with all defaults set. */ public static AWSPIAsyncClientBuilder standard() { return new AWSPIAsyncClientBuilder(); } /** * @return Default async client using the {@link com.amazonaws.auth.DefaultAWSCredentialsProviderChain} and * {@link com.amazonaws.regions.DefaultAwsRegionProviderChain} chain */ public static AWSPIAsync defaultClient() { return standard().build(); } private AWSPIAsyncClientBuilder() { super(CLIENT_CONFIG_FACTORY); } /** * Construct an asynchronous implementation of AWSPIAsync using the current builder configuration. * * @param params * Current builder configuration represented as a parameter object. * @return Fully configured implementation of AWSPIAsync. */ @Override protected AWSPIAsync build(AwsAsyncClientParams params) { return new AWSPIAsyncClient(params); } }
[ "qp3@illinois.edu" ]
qp3@illinois.edu
3b9060e22ccccd2cb17d0cfc6b74818ad67ba292
b8a0d1442363e1c68036c1967baef06d22cc4048
/GuPaoEdu_SpringCloudNetflix_Parent/GuPaoEdu_SpringCloudNetflix_Eureka_2/src/main/java/com/asiainfo/App.java
5a4efc46315ff1368486cf7a4a735478c545d850
[]
no_license
zhangzhiwang/GuPaoEdu
941460fbbafd6c9d45b8ac6fe947cdc0dd2133b5
b7e09548dd23f192e7a7346a1e5ac4072708c1d7
refs/heads/master
2022-12-22T09:06:33.369402
2021-07-28T10:29:41
2021-07-28T10:29:41
214,958,076
1
0
null
null
null
null
UTF-8
Java
false
false
407
java
package com.asiainfo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; @SpringBootApplication @EnableEurekaServer // 标明该工程是eureka服务端 public class App { public static void main(String[] args) { SpringApplication.run(App.class, args); } }
[ "934109401@qq.com" ]
934109401@qq.com
f4916f54ab397b9cc92cf9235a111c116a54fa1d
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module0652_public/tests/more/src/java/module0652_public_tests_more/a/IFoo0.java
b250816c835f1b07dae5bcc1460b6ef6ca863b2a
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
882
java
package module0652_public_tests_more.a; import javax.net.ssl.*; import javax.rmi.ssl.*; import java.awt.datatransfer.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see javax.management.Attribute * @see javax.naming.directory.DirContext * @see javax.net.ssl.ExtendedSSLSession */ @SuppressWarnings("all") public interface IFoo0<G> extends java.util.concurrent.Callable<G> { javax.rmi.ssl.SslRMIClientSocketFactory f0 = null; java.awt.datatransfer.DataFlavor f1 = null; java.beans.beancontext.BeanContext f2 = null; String getName(); void setName(String s); G get(); void set(G e); }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
88e6911fb234199945060dbb9d684fddd4a5bdc7
a0caa255f3dbe524437715adaee2094ac8eff9df
/HOLD/sources/defpackage/cet.java
bde08b4fe43853f44cc5806050404f99f845170b
[]
no_license
AndroidTVDeveloper/com.google.android.tvlauncher
16526208b5b48fd48931b09ed702fe606fe7d694
0f959c41bbb5a93e981145f371afdec2b3e207bc
refs/heads/master
2021-01-26T07:47:23.091351
2020-02-26T20:58:19
2020-02-26T20:58:19
243,363,961
0
1
null
null
null
null
UTF-8
Java
false
false
136
java
package defpackage; /* renamed from: cet reason: default package */ /* compiled from: PG */ public final class cet implements bxa { }
[ "eliminater74@gmail.com" ]
eliminater74@gmail.com
11d9ad09a56798198e70e35fe290483c8fac7320
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_d494d5fe2e752c8c75c960e84f0af3076a7fcf19/GridSquare/8_d494d5fe2e752c8c75c960e84f0af3076a7fcf19_GridSquare_s.java
1aa59e4b1579cdf3da2818f74f9fec548f08953a
[]
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
643
java
public class GridSquare { private Plant plant; private Animal animal; public GridSquare() { Debug.echo("Making a GridSquare"); } public GridSquare(Plant p, Animal a) { Debug.echo("Making a GridSquare with arguments"); plant = p; animal = a; } public void step(Location loc, Grid g){ plant.step(loc, g); animal.step(loc, g); } public Plant getPlant() { return plant; } public Animal getAnimal() { return animal; } public void setPlant(Plant p) { plant = p; } public void setAnimal(Animal a) { animal = a; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
470a2c5bfc6d55604398a420a1cc2761364e99f9
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_2/src/j/c/d/Calc_1_2_9236.java
dfad093826a4a73375aff3148f4930c39a600436
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package j.c.d; public class Calc_1_2_9236 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
4904bc00706d13ff8f452ae2894534befaac22b3
da889968b2cc15fc27f974e30254c7103dc4c67e
/Optimization Algorithm_GUI/src/Algorithm_Tourism/ALPSO2_NEW_Tourism/FitnessCalc.java
1cd4172f1e27b0ba75734467f148320a16a41852
[]
no_license
say88888/My_Project_thesis
fcd4d96b34de8627fa054146eb6164b7c3636344
04908ea3ed6b7a9c1939a5d8e16dfc65d66437f4
refs/heads/master
2020-04-10T08:32:37.106239
2018-12-08T05:52:44
2018-12-08T05:52:44
160,908,221
0
0
null
null
null
null
UTF-8
Java
false
false
7,910
java
package Algorithm_Tourism.ALPSO2_NEW_Tourism; import Algorithm_Tourism.Function_Vector; import Input_Output_txt.Tourism.Read_Tourism; public class FitnessCalc extends ALPSO2_NEW_Tourism { static double getFitness(G_Individual individual) { double fitness = 0; int[][] Y = new int[Read_Tourism.N()][]; for (int i = 0; i < Read_Tourism.N(); i++) Y[i] = new int[Read_Tourism.H(i)]; int[][] Xa = new int[Read_Tourism.Ia()][]; for (int i = 0; i < Read_Tourism.Ia(); i++) Xa[i] = new int[Read_Tourism.Ja(i)]; int[][] Xh = new int[Read_Tourism.Ih()][]; for (int i = 0; i < Read_Tourism.Ih(); i++) Xh[i] = new int[Read_Tourism.Jh(i)]; int[][] Xt = new int[Read_Tourism.It()][]; for (int i = 0; i < Read_Tourism.It(); i++) Xt[i] = new int[Read_Tourism.Jt(i)]; int b = 0; for (int i = 0; i < Y.length; i++) for (int j = 0; j < Y[i].length; j++) Y[i][j] = individual.getGy(b++); b = 0; for (int i = 0; i < Xa.length; i++) for (int j = 0; j < Xa[i].length; j++) Xa[i][j] = individual.getGxa(b++); b = 0; for (int i = 0; i < Xh.length; i++) for (int j = 0; j < Xh[i].length; j++) Xh[i][j] = individual.getGxh(b++); b = 0; for (int i = 0; i < Xt.length; i++) for (int j = 0; j < Xt[i].length; j++) Xt[i][j] = individual.getGxt(b++); fitness = Function_Vector.Fitness(Xa, Xh, Xt, Y,Omega_1,Omega_2,C); return fitness; } // F2(X,Y) static double getFitness1(Individual individual) { double fitness = 0; int[][] Y = new int[Read_Tourism.N()][]; for (int i = 0; i < Read_Tourism.N(); i++) Y[i] = new int[Read_Tourism.H(i)]; int[][] Xa = new int[Read_Tourism.Ia()][]; for (int i = 0; i < Read_Tourism.Ia(); i++) Xa[i] = new int[Read_Tourism.Ja(i)]; int[][] Xh = new int[Read_Tourism.Ih()][]; for (int i = 0; i < Read_Tourism.Ih(); i++) Xh[i] = new int[Read_Tourism.Jh(i)]; int[][] Xt = new int[Read_Tourism.It()][]; for (int i = 0; i < Read_Tourism.It(); i++) Xt[i] = new int[Read_Tourism.Jt(i)]; int b = 0; for (int i = 0; i < Y.length; i++) for (int j = 0; j < Y[i].length; j++) Y[i][j] = individual.getY(b++); b = 0; for (int i = 0; i < Xa.length; i++) for (int j = 0; j < Xa[i].length; j++) Xa[i][j] = individual.getXa(b++); b = 0; for (int i = 0; i < Xh.length; i++) for (int j = 0; j < Xh[i].length; j++) Xh[i][j] = individual.getXh(b++); b = 0; for (int i = 0; i < Xt.length; i++) for (int j = 0; j < Xt[i].length; j++) Xt[i][j] = individual.getXt(b++); // F(X,Y) // if((st22==K)&&(st23>=0)&&(st24==Xsize)&&(st25==Xsize)&&(st26<=D) ){ if (Function_Vector.constraint(Xa,Xh,Xt, Y,A,B) == true) { fitness =Function_Vector.Fitness(Xa, Xh, Xt, Y,Omega_1,Omega_2,C); SFminsb.append(fitness + " "); } // U1(X,Y) else { double Sfmin; Sfmin = ALPSO2_NEW_Tourism.Sfmin; fitness = Sfmin + Function_Vector.U1(Xa,Xh,Xt, Y,A,B); } return fitness; } static double getPFitness(P_Individual individual) { double fitness = 0; int[][] Y = new int[Read_Tourism.N()][]; for (int i = 0; i < Read_Tourism.N(); i++) Y[i] = new int[Read_Tourism.H(i)]; int[][] Xa = new int[Read_Tourism.Ia()][]; for (int i = 0; i < Read_Tourism.Ia(); i++) Xa[i] = new int[Read_Tourism.Ja(i)]; int[][] Xh = new int[Read_Tourism.Ih()][]; for (int i = 0; i < Read_Tourism.Ih(); i++) Xh[i] = new int[Read_Tourism.Jh(i)]; int[][] Xt = new int[Read_Tourism.It()][]; for (int i = 0; i < Read_Tourism.It(); i++) Xt[i] = new int[Read_Tourism.Jt(i)]; int b = 0; for (int i = 0; i < Y.length; i++) for (int j = 0; j < Y[i].length; j++) Y[i][j] = individual.getPy(b++); b = 0; for (int i = 0; i < Xa.length; i++) for (int j = 0; j < Xa[i].length; j++) Xa[i][j] = individual.getPxa(b++); b = 0; for (int i = 0; i < Xh.length; i++) for (int j = 0; j < Xh[i].length; j++) Xh[i][j] = individual.getPxh(b++); b = 0; for (int i = 0; i < Xt.length; i++) for (int j = 0; j < Xt[i].length; j++) Xt[i][j] = individual.getPxt(b++); // F(X,Y) // if((st22==K)&&(st23>=0)&&(st24==Xsize)&&(st25==Xsize)&&(st26<=D) ){ if (Function_Vector.constraint(Xa,Xh,Xt, Y,A,B) == true) { fitness = Function_Vector.Fitness(Xa, Xh, Xt, Y,Omega_1,Omega_2,C); SFminsb.append(fitness + " "); } // U1(X,Y) else { double Sfmin; Sfmin = ALPSO2_NEW_Tourism.Sfmin; fitness = Sfmin + Function_Vector.U1(Xa,Xh,Xt, Y,A,B); } return fitness; } static double getFitness1(Candidate_Individual individual) { double fitness = 0; int[][] Y = new int[Read_Tourism.N()][]; for (int i = 0; i < Read_Tourism.N(); i++) Y[i] = new int[Read_Tourism.H(i)]; int[][] Xa = new int[Read_Tourism.Ia()][]; for (int i = 0; i < Read_Tourism.Ia(); i++) Xa[i] = new int[Read_Tourism.Ja(i)]; int[][] Xh = new int[Read_Tourism.Ih()][]; for (int i = 0; i < Read_Tourism.Ih(); i++) Xh[i] = new int[Read_Tourism.Jh(i)]; int[][] Xt = new int[Read_Tourism.It()][]; for (int i = 0; i < Read_Tourism.It(); i++) Xt[i] = new int[Read_Tourism.Jt(i)]; int b = 0; for (int i = 0; i < Y.length; i++) for (int j = 0; j < Y[i].length; j++) Y[i][j] = individual.getY(b++); b = 0; for (int i = 0; i < Xa.length; i++) for (int j = 0; j < Xa[i].length; j++) Xa[i][j] = individual.getXa(b++); b = 0; for (int i = 0; i < Xh.length; i++) for (int j = 0; j < Xh[i].length; j++) Xh[i][j] = individual.getXh(b++); b = 0; for (int i = 0; i < Xt.length; i++) for (int j = 0; j < Xt[i].length; j++) Xt[i][j] = individual.getXt(b++); // F(X,Y) // if((st22==K)&&(st23>=0)&&(st24==Xsize)&&(st25==Xsize)&&(st26<=D) ){ if (Function_Vector.constraint(Xa,Xh,Xt, Y,A,B) == true) { fitness =Function_Vector.Fitness(Xa, Xh, Xt, Y,Omega_1,Omega_2,C); SFminsb.append(fitness + " "); } // U1(X,Y) else { double Sfmin; Sfmin = ALPSO2_NEW_Tourism.Sfmin; fitness = Sfmin + Function_Vector.U1(Xa,Xh,Xt, Y,A,B); } return fitness; } static double getGFitness(G_Individual individual) { double fitness = 0; int[][] Y = new int[Read_Tourism.N()][]; for (int i = 0; i < Read_Tourism.N(); i++) Y[i] = new int[Read_Tourism.H(i)]; int[][] Xa = new int[Read_Tourism.Ia()][]; for (int i = 0; i < Read_Tourism.Ia(); i++) Xa[i] = new int[Read_Tourism.Ja(i)]; int[][] Xh = new int[Read_Tourism.Ih()][]; for (int i = 0; i < Read_Tourism.Ih(); i++) Xh[i] = new int[Read_Tourism.Jh(i)]; int[][] Xt = new int[Read_Tourism.It()][]; for (int i = 0; i < Read_Tourism.It(); i++) Xt[i] = new int[Read_Tourism.Jt(i)]; int b = 0; for (int i = 0; i < Y.length; i++) for (int j = 0; j < Y[i].length; j++) Y[i][j] = individual.getGy(b++); b = 0; for (int i = 0; i < Xa.length; i++) for (int j = 0; j < Xa[i].length; j++) Xa[i][j] = individual.getGxa(b++); b = 0; for (int i = 0; i < Xh.length; i++) for (int j = 0; j < Xh[i].length; j++) Xh[i][j] = individual.getGxh(b++); b = 0; for (int i = 0; i < Xt.length; i++) for (int j = 0; j < Xt[i].length; j++) Xt[i][j] = individual.getGxt(b++); // F(X,Y) // if((st22==K)&&(st23>=0)&&(st24==Xsize)&&(st25==Xsize)&&(st26<=D) ){ if (Function_Vector.constraint(Xa,Xh,Xt, Y,A,B) == true) { fitness = Function_Vector.Fitness(Xa, Xh, Xt, Y,Omega_1,Omega_2,C); SFminsb.append(fitness + " "); } // U1(X,Y) else { double Sfmin; Sfmin = ALPSO2_NEW_Tourism.Sfmin; fitness = Sfmin + Function_Vector.U1(Xa,Xh,Xt, Y,A,B); } return fitness; } static double getSFmin(StringBuilder sb) { double SFmin; String[] a = sb.toString().split(" "); if (a.length == 1) { SFmin = 0; } else { SFmin = Double.parseDouble(a[0]); for (int i = 0; i < a.length; i++) if (SFmin >= Double.parseDouble(a[i])) SFmin = Double.parseDouble(a[i]); } SFminsb = new StringBuilder(); return SFmin; } }
[ "gtvsta99@gmail.com" ]
gtvsta99@gmail.com
32014e6feaa21daa7caec94415ef36ca0682fc0f
241bc9dfca7a141322ea1c346d68b13da7052844
/Demo/test/src/main/java/per/eicho/demo/leetcode/q901_1000/Q974.java
9e9964e4adb9b11155319c5f2941035c84f5cb07
[]
no_license
EICHOSAMA/Demonstration
2c9368576b96aaae7321023a2ba051c5e8703311
945bc68e326403cdf4836d97e5576f1011b56e74
refs/heads/master
2023-08-08T13:56:06.549053
2023-08-02T15:55:44
2023-08-02T15:55:44
239,741,584
0
0
null
2023-08-02T15:55:45
2020-02-11T11:05:21
null
UTF-8
Java
false
false
1,406
java
package per.eicho.demo.leetcode.q901_1000; import java.util.HashMap; import java.util.Map; /** * <p>971. Flip Binary Tree To Match Preorder Traversal 的题解代码 </p> * * @see <a href="https://leetcode.com/problems/flip-binary-tree-to-match-preorder-traversal/"> * 971. Flip Binary Tree To Match Preorder Traversal</a> */ public final class Q974 { public int subarraysDivByK(int[] nums, int k) { // 1. 1 <= nums.length <= 3 * 10^4 // 2. -10^4 <= nums[i] <= 10^4 // 3. 2 <= k <= 10^4 final int n = nums.length; final int[] sums = new int[n]; final Map<Integer, int[]> map = new HashMap<>(); int sum = 0; for (int i = 0; i < n; i++) { sum += nums[i]; sums[i] = sum; final Integer key = ((sum % k) + k) % k; // key ∈ [0, k) if (!map.containsKey(key)) map.put(key, new int[]{0}); map.get(key)[0]++; } int result = map.containsKey(0) ? map.get(0)[0] : 0; for (int i = 0; i < n; i++) { final int sumI = sums[i]; final Integer key = ((sumI % k) + k) % k; // key ∈ [0, k) result += --map.get(key)[0]; } return result; } public static void main(String[] args) { Q974 q974 = new Q974(); System.out.println(q974.subarraysDivByK(new int[]{4,5,0,-2,-3,1}, 5)); } }
[ "793951781@qq.com" ]
793951781@qq.com
a94efb0d411852efebd74e050dabbe19d51af50c
627a6a181c7503715be12117cf3a877eec1b0475
/lingdaoyi-root/lingdaoyi-transfer/src/main/java/com/lingdaoyi/cloud/service/AccountExchangeService.java
6feff9012ef202b4bde5577010e280c54c28f840
[]
no_license
qinkangkang/lingdaoyi_root
f5a9ccaf715657fd8494f15ad6c450628d66e597
bf11be5831890fcf67b5ff81c7bb30019216bd09
refs/heads/master
2021-07-25T14:51:11.260379
2017-11-07T08:11:07
2017-11-07T08:11:07
109,802,346
0
0
null
null
null
null
UTF-8
Java
false
false
7,340
java
package com.lingdaoyi.cloud.service; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.PostMapping; import com.google.common.collect.Maps; import com.lingdaoyi.cloud.config.PromptInfoUtil; import com.lingdaoyi.cloud.dto.AccountDTO; import com.lingdaoyi.cloud.dto.AccountExchangerateDTO; import com.lingdaoyi.cloud.dto.AccountRecordDTO; import com.lingdaoyi.cloud.dto.AccountSysDTO; import com.lingdaoyi.cloud.dto.ResponseDTO; import com.lingdaoyi.cloud.encrypt.DesUtil3; import com.lingdaoyi.cloud.entity.AccountExchangerate; import com.lingdaoyi.cloud.feign.AccountFeignClient; import com.lingdaoyi.cloud.feign.AuthenticateFeignClient; import com.lingdaoyi.cloud.mapper.AccountExchangerateMapper; import com.lingdaoyi.cloud.utils.JsonMapper; import com.lingdaoyi.cloud.utils.date.DateUtils; import com.lingdaoyi.cloud.utils.redis.RedisMoudel; import com.lingdaoyi.cloud.utils.redis.RedisUtils; @Transactional @Service public class AccountExchangeService { Map<String, Object> returnData = Maps.newHashMap(); @Autowired private AccountExchangerateMapper exchangeMapper; @Autowired private AccountFeignClient accountFeignClient; @Autowired private AuthenticateFeignClient authenticateFeignClient; public ResponseDTO exchangeMoney(String ticket, Integer clientType, String transferAmount, Long receivedAccountId, String addressIP, String sign) { AccountExchangerateDTO exchageDTO = new AccountExchangerateDTO(); ResponseDTO responseDTO = new ResponseDTO(); Map<String, Object> returnData = Maps.newHashMap(); if (clientType == null) { responseDTO.setSuccess(false); responseDTO.setStatusCode(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Code, "emc.code.201")); responseDTO.setMsg("clientType" + PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Msg, "emc.msg.201")); return responseDTO; } if (StringUtils.isBlank(transferAmount)) { responseDTO.setSuccess(false); responseDTO.setStatusCode(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Code, "emc.code.201")); responseDTO .setMsg("transferAmount" + PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Msg, "emc.msg.201")); return responseDTO; } if (StringUtils.isBlank(sign)) { responseDTO.setSuccess(false); responseDTO.setStatusCode(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Code, "emc.code.201")); responseDTO.setMsg("sign" + PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Msg, "emc.msg.201")); return responseDTO; } if (StringUtils.isBlank(ticket)) { responseDTO.setSuccess(false); responseDTO.setStatusCode(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Code, "emc.code.201")); responseDTO.setMsg("ticket" + PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Msg, "emc.msg.201")); return responseDTO; } // 根据ticket查询数据库,判断account是否可用 String test = accountFeignClient.getAccountByTicket(ticket, clientType); AccountSysDTO accountSysDTO = JsonMapper.fromJsonString(test, AccountSysDTO.class); if (!accountSysDTO.isEnable()) { responseDTO.setSuccess(false); responseDTO.setStatusCode(accountSysDTO.getStatusCode()); responseDTO.setMsg(accountSysDTO.getMsg()); return responseDTO; } // 加密参数验证 // transferAmount解密 String des3TransferAmount = null; try { des3TransferAmount = DesUtil3.decryptThreeDESECB(transferAmount, DesUtil3.KEY); } catch (Exception e) { // TODO 异常处理 e.printStackTrace(); } String signStr = null; StringBuffer sb = new StringBuffer(); sb.append(clientType).append(addressIP).append(des3TransferAmount).append(receivedAccountId); try { signStr = DesUtil3.encryptThreeDESECB(sb.toString(), DesUtil3.KEY); } catch (Exception e) { e.printStackTrace(); } if (!signStr.equals(sign)) { responseDTO.setSuccess(false); responseDTO.setStatusCode(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Code, "emc.code.107")); responseDTO.setMsg(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Msg, "emc.msg.107")); return responseDTO; } // 根据ticket获取当前账户的币种 String accountJson = accountFeignClient.getAccountById(receivedAccountId); AccountDTO currentAccountDTO = JsonMapper.fromJsonString(accountJson, AccountDTO.class); String orgCurrencyName = currentAccountDTO.getCurrencyName(); // 根据ID查询收钱人的币种的缩写 String receviceAccountJson = accountFeignClient.getAccountById(receivedAccountId); AccountDTO accountDTO = JsonMapper.fromJsonString(receviceAccountJson, AccountDTO.class); if (accountDTO == null) { responseDTO.setSuccess(false); responseDTO.setStatusCode(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Code, "emc.code.113")); responseDTO.setMsg(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Msg, "emc.msg.113")); return responseDTO; } String transCurrencyName = accountDTO.getCurrencyName();// 获得货币名称 BigDecimal exchangeRateValue = null; exchageDTO.setOrgCurrency(orgCurrencyName); exchageDTO.setTransCurrency(transCurrencyName); // 判断下要币种是否一致,一致可以进行转账,不一致,判断是否是CAD转成CNY // 目前设定只支持CAD装成CNY,以及相同币种之间的转账; if (orgCurrencyName.equals(transCurrencyName)) { exchangeRateValue = new BigDecimal("1"); exchageDTO.setGmtCreate(DateUtils.getCurrentTime()); } else { if (!orgCurrencyName.equals("加元") || !transCurrencyName.equals("人民币")) { responseDTO.setSuccess(false); responseDTO.setStatusCode(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Code, "emc.code.113")); responseDTO.setMsg("目前只支持“加元->人民币”间的转换"); return responseDTO; } // 当前实时汇率---调用强哥的接口 // xxxxxxx-假设 exchangeRateValue = new BigDecimal("0.149"); // 获取汇率接口的时间 // xxxxxxxxx-目前假设 exchageDTO.setGmtCreate(DateUtils.getCurrentTime()); } exchageDTO.setOrgMoney(new BigDecimal(des3TransferAmount)); exchageDTO.setTransferMoney(new BigDecimal(des3TransferAmount).subtract(exchangeRateValue)); returnData.put("exchageDTO", exchageDTO); responseDTO.setSuccess(true); responseDTO.setData(returnData); responseDTO.setStatusCode(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Code, "emc_code.200")); responseDTO.setMsg(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Transfer_Msg, "emc.exchange.success")); return responseDTO; } public ResponseDTO test(String addressIp) { ResponseDTO responseDTO = new ResponseDTO(); Map<String, Object> returnData = Maps.newHashMap(); returnData.put("addressIp", "您的ip为" + addressIp + "服务当前运转正常,谢谢!"); responseDTO.setData(returnData); responseDTO.setSuccess(true); responseDTO.setStatusCode(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Error_Code, "emc.code.200")); responseDTO.setMsg(PromptInfoUtil.getPrompt(PromptInfoUtil.EMC_Login, "emc.login.logout")); return responseDTO; } }
[ "shemar.qin@sdeals.me" ]
shemar.qin@sdeals.me
86aacd704298cb67f1015bd1168cef451ced64b6
69c1256baec48b66365b5ec8faec5d6318b0eb21
/Mage.Sets/src/mage/sets/knightsvsdragons/SkyhunterPatrol.java
be49ac8de45a89493e5a8b87f68fb8f19497fe5f
[]
no_license
gbraad/mage
3b84eefe4845258f6250a7ff692e1f2939864355
18ce6a0305db6ebc0d34054af03fdb0ba88b5a3b
refs/heads/master
2022-09-28T17:31:38.653921
2015-04-04T22:28:22
2015-04-04T22:28:22
33,435,029
1
0
null
2022-09-01T23:39:50
2015-04-05T08:25:58
Java
UTF-8
Java
false
false
2,194
java
/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ package mage.sets.knightsvsdragons; import java.util.UUID; /** * * @author LevelX2 */ public class SkyhunterPatrol extends mage.sets.tenth.SkyhunterPatrol { public SkyhunterPatrol(UUID ownerId) { super(ownerId); this.cardNumber = 19; this.expansionSetCode = "DDG"; } public SkyhunterPatrol(final SkyhunterPatrol card) { super(card); } @Override public SkyhunterPatrol copy() { return new SkyhunterPatrol(this); } }
[ "ludwig.hirth@online.de" ]
ludwig.hirth@online.de
d6a33bc5b57636c082e4c4e4fc727e3506763891
f5734612e01000ac21a9e7d655bc96414a9aeb6b
/src/me/artembatutin/transaction/Company.java
ea41b44685b94c59ce92003317233ac7fb48155f
[]
no_license
artembatutin/BankCalc
05bad5c2f4dc7a4140d4a0d041b292cd21728f3c
a1db0c868b032dc566ce3e3dee6d0be5d491fb01
refs/heads/master
2020-05-02T18:01:00.333448
2019-03-28T03:08:02
2019-03-28T03:08:02
178,116,002
0
0
null
null
null
null
UTF-8
Java
false
false
713
java
package me.artembatutin.transaction; import java.util.Comparator; public class Company implements Comparable<Company> { private String company; private double amountSpent; public Company(String company) { this.company = company; } public String getCompany() { return company; } public void setCompany(String company) { this.company = company; } public double getAmountSpent() { return amountSpent; } public void spent(double amountSpent) { this.amountSpent += amountSpent; } @Override public int compareTo(Company company) { return this.getAmountSpent() > company.getAmountSpent() ? -1 : 1; } }
[ "artembatutin@gmail.com" ]
artembatutin@gmail.com
a78e8128f816c91561525fd61d54e1840df29b01
47119d527d55e9adcb08a3a5834afe9a82dd2254
/controllersvc/src/main/java/com/emc/storageos/volumecontroller/impl/plugins/discovery/smis/MeteringTaskCompleter.java
aa9f3ef7af122446d6195c54ced3712579278b20
[]
no_license
chrisdail/coprhd-controller
1c3ddf91bb840c66e4ece3d4b336a6df421b43e4
38a063c5620135a49013aae5e078aeb6534a5480
refs/heads/master
2020-12-03T10:42:22.520837
2015-06-08T15:24:36
2015-06-08T15:24:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,757
java
/** * Copyright 2015 EMC Corporation * All Rights Reserved */ package com.emc.storageos.volumecontroller.impl.plugins.discovery.smis; import java.net.URI; import com.emc.storageos.db.client.DbClient; import com.emc.storageos.db.client.model.DataObject; import com.emc.storageos.db.client.model.DiscoveredDataObject; import com.emc.storageos.db.client.model.DiscoveredSystemObject; import com.emc.storageos.db.exceptions.DatabaseException; import com.emc.storageos.model.ResourceOperationTypeEnum; import com.emc.storageos.volumecontroller.AsyncTask; import com.emc.storageos.volumecontroller.impl.ControllerServiceImpl; public class MeteringTaskCompleter extends DataCollectionTaskCompleter { private static final long serialVersionUID = -150746701650259111L; public MeteringTaskCompleter(Class clazz, URI id, String opId) { super(clazz, id, opId); } public MeteringTaskCompleter(AsyncTask task) { super(task); } public String getJobType(){ return ControllerServiceImpl.METERING; } protected void updateObjectState(DbClient dbClient, DiscoveredDataObject.DataCollectionJobStatus jobStatus) { Class type = getType(); if (DiscoveredSystemObject.class.isAssignableFrom(type)) { try { DiscoveredSystemObject dbObject = (DiscoveredSystemObject) DataObject.createInstance(type,getId()); dbObject.trackChanges(); dbObject.setMeteringStatus(jobStatus.toString()); dbClient.persistObject(dbObject); } catch (InstantiationException ex) { DatabaseException.fatals.queryFailed(ex); } catch(IllegalAccessException ex) { DatabaseException.fatals.queryFailed(ex); } } else { throw new RuntimeException("Unsupported system Type : " + type.toString()); } } @Override final public void setNextRunTime(DbClient dbClient, long time) { Class type = getType(); if (DiscoveredSystemObject.class.isAssignableFrom(type)) { try { DiscoveredSystemObject dbObject = (DiscoveredSystemObject) DataObject.createInstance(type,getId()); dbObject.trackChanges(); dbObject.setNextMeteringRunTime(time); dbClient.persistObject(dbObject); } catch (InstantiationException ex) { DatabaseException.fatals.queryFailed(ex); } catch(IllegalAccessException ex) { DatabaseException.fatals.queryFailed(ex); } } else { throw new RuntimeException("Unsupported system Type : " + type.toString()); } } @Override final public void setLastTime(DbClient dbClient, long time){ Class type = getType(); if (DiscoveredSystemObject.class.isAssignableFrom(type)) { try { DiscoveredSystemObject dbObject = (DiscoveredSystemObject) DataObject.createInstance(type,getId()); dbObject.trackChanges(); dbObject.setLastMeteringRunTime(time); dbClient.persistObject(dbObject); } catch (InstantiationException ex) { DatabaseException.fatals.queryFailed(ex); } catch(IllegalAccessException ex) { DatabaseException.fatals.queryFailed(ex); } } else { throw new RuntimeException("Unsupported system Type : " + type.toString()); } } @Override final public void setSuccessTime(DbClient dbClient, long time) { Class type = getType(); if (DiscoveredSystemObject.class.isAssignableFrom(type)) { try { DiscoveredSystemObject dbObject = (DiscoveredSystemObject) DataObject.createInstance(type,getId()); dbObject.trackChanges(); dbObject.setSuccessMeteringTime(time); dbClient.persistObject(dbObject); } catch (InstantiationException ex) { DatabaseException.fatals.queryFailed(ex); } catch(IllegalAccessException ex) { DatabaseException.fatals.queryFailed(ex); } } else { throw new RuntimeException("Unsupported system Type : " + type.toString()); } } @Override final protected void createDefaultOperation(DbClient dbClient){ dbClient.createTaskOpStatus(getType(),getId(),getOpId(), ResourceOperationTypeEnum.METERING_STORAGE_SYSTEM); } }
[ "review-coprhd@coprhd.org" ]
review-coprhd@coprhd.org
5f2b70b73d8ad4c65c41b9925e57fb69e00d5d86
5aaf8a9dd450479d804976c2150460cebd197336
/src/main/java/testcases/TC_004_DuplicateLead.java
a8b6fd3cae4c268ceca58251df324f74197f2c1b
[]
no_license
gugazz/TestcasesPages
67c185cf28662036b6906d5003448a7ca6c0117b
e34872a9e5cbe389d6d84fdc75d4384adadf58f5
refs/heads/master
2020-03-25T06:48:51.968332
2018-08-11T13:36:36
2018-08-11T13:36:36
143,525,415
0
0
null
null
null
null
UTF-8
Java
false
false
972
java
package testcases; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import pages.MyHomePage; import wdmethods.AnnotationsClass; public class TC_004_DuplicateLead extends AnnotationsClass { @BeforeTest public void setValue() { excelFileName = "DuplicateLead_1"; testCasesName = "TC_004_DuplicateLead"; testCasesDesc = "DuplicationofLead"; category = "smoke"; authorname="laks"; iteration = "Leads"; } @Test(dataProvider="fetchdata") public void duplicateLead(String email,String data,String title,String updatedcname) throws InterruptedException { new MyHomePage() .clickLeads() .clickFindLeadLink() .EnteremailID(email) .clickfindleadsButton() .firstresultantleadlink() .captureFirstname(data) .enterduplicatebutton() .duplicatettitleverify(title) .createleadbutton() .verifyduplicatedcompanyname(updatedcname) .closecurrentwindow(); } }
[ "HP@HP-PC" ]
HP@HP-PC
a7cbb210087f151e76e607d46b214e40eb394435
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12798-59-30-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/velocity/internal/DefaultVelocityEngine_ESTest.java
81be098adeff364862fa3d8db6b668a19526af67
[]
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
576
java
/* * This file was automatically generated by EvoSuite * Sat Apr 04 00:29:06 UTC 2020 */ package org.xwiki.velocity.internal; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DefaultVelocityEngine_ESTest extends DefaultVelocityEngine_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
f0ed2fe652d239cd9187c56f89f5e5b46955a27d
d4bf818fb304449a7e703d679daf19d6b3035ee5
/src/main/java/com/appCrawler/pagePro/apkDetails/PageProImobile_Detail.java
24929a712269934318d601948b13fdb9fcdae531
[]
no_license
muyundefeng/SpringLearning
11524d754c97bf20f18c5810556b084200d4da70
15821700372be76d33ca943c38c76d7117c489d2
refs/heads/master
2020-04-06T05:01:16.391956
2016-10-25T02:58:02
2016-10-25T02:58:02
57,977,720
0
0
null
null
null
null
UTF-8
Java
false
false
3,699
java
package com.appCrawler.pagePro.apkDetails; import org.slf4j.LoggerFactory; import us.codecraft.webmagic.Apk; import us.codecraft.webmagic.Page; import us.codecraft.webmagic.selector.Html; import java.util.List; /** * 刷机网 http://app.imobile.com.cn/ * * @author buildhappy * */ public class PageProImobile_Detail { private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(PageProImobile_Detail.class); public static Apk getApkDetail(Page page) { // 获取dom对象 Html html = page.getHtml(); String appName = null; //app名字 String appDetailUrl = null; //具体页面url String osPlatform = null; //运行平台 String appUpdateDate = null; //更新日期 String appDownloadUrl = null; String appVersion = null; String appSize = null; String dowloadNum = null; String vendername = null;//开发商 String appType = null; appName = page.getHtml().xpath("//div[@class='box700_intro']/h1/text()").toString(); appDetailUrl = page.getUrl().toString(); List<String> infos = null; infos = page.getHtml().xpath("//ul[@class='app_params']/li/text()").all(); for (String s : infos) { System.out.println(s); } int length = infos.size(); appVersion = length > 0 ? splitString(infos.get(0)) : null; appUpdateDate = length > 2 ? splitString(infos.get(2)) : null; appSize = length > 3 ? splitString(infos.get(3)) : null; appSize = appSize.replace(" ", ""); dowloadNum = length > 4 ? splitString(infos.get(4)) : null; osPlatform = length > 5 ? splitString(infos.get(5)) : null; vendername = length > 6 ? splitString(infos.get(6)) : null; appDownloadUrl = page.getHtml().xpath("//div[@class='download_install']/a[@class='download']/@href").toString(); String appDescription = page.getHtml().xpath("//div[@class='shrink_cont']/p/text()").all().toString(); List<String> appScreenshot = html.xpath("//div[@class='smallpic_box']/ul/li/span/img/@src").all(); String appTag = null; String appCategory = html.xpath("//div[@class='bread_crumb']/a[3]/text()").get(); String appCommentUrl = null; String appComment = null; //String dowloadNum = null; Apk apk = null; if (null != appName && null != appDownloadUrl) { apk = new Apk(appName, appDetailUrl, appDownloadUrl, osPlatform, appVersion, appSize, appUpdateDate, null != appType ? appType : "APK"); apk.setAppDescription(appDescription); apk.setAppScreenshot(appScreenshot); apk.setAppCommentUrl(appCommentUrl); apk.setAppComment(appComment); apk.setAppDownloadTimes(dowloadNum); apk.setAppCategory(appCategory); apk.setAppTag(appTag); apk.setAppVenderName(vendername); } LOGGER.debug("name:{}, version: {}, url:{}, size: {}, appType: {}, os: {}, date:{}, downlaodNum:{}, , appTag:{}, appCategory:{}" + ", appScreenhost:{}, appCommentUrl:{}, appComment:{}, appDescription:{}", appName, appVersion, appDownloadUrl, appSize, appType, osPlatform, appUpdateDate, dowloadNum, appTag, appCategory, appScreenshot, appCommentUrl, appComment, appDescription); return apk; } /** * split a string * eg."下载次数:19万" retrun 19万 * @param s * @return */ public static String splitString(String s){ return s.split(":").length > 1 ? s.split(":")[1]:null; } }
[ "2533604335@qq.com" ]
2533604335@qq.com
42084f6db8b7cf37817024f6a98419dc8f989a8d
6941b73e80730b8ac9937cc92246be9ebb4a4461
/src/M3W4D2_G54_Inheritance/Tasks/Task3/TxtFile.java
63c3143bc5fe3485b30c288426ca933748e581df
[]
no_license
MustafAydn1/MyJavaCourse
ab64dfab36f723e6c70b4715c4f311f308030bdb
75d6857c5e60130c7809f891fec7c85a64c20fa7
refs/heads/master
2023-02-09T22:32:18.393558
2020-12-25T13:03:35
2020-12-25T13:03:35
324,765,044
0
0
null
null
null
null
UTF-8
Java
false
false
402
java
package M3W4D2_G54_Inheritance.Tasks.Task3; public class TxtFile implements ReadFile { @Override public String open() { return "opening txt"; } @Override public String read() { return "reading txt"; } @Override public String save() { return "saving txt"; } @Override public String close() { return "closing txt"; } }
[ "mustafaaydin1029@gmail.com" ]
mustafaaydin1029@gmail.com
55463e1cb4dc29f88b26fa06823f9f2a6df66e63
8727b1cbb8ca63d30340e8482277307267635d81
/PolarServer/src/com/game/transactions/handler/ReqTransactionsChangeYuanbaoHandler.java
c8923c17834f1c558dc0e2cc60d1f66fc67cd0ff
[]
no_license
taohyson/Polar
50026903ded017586eac21a7905b0f1c6b160032
b0617f973fd3866bed62da14f63309eee56f6007
refs/heads/master
2021-05-08T12:22:18.884688
2015-12-11T01:44:18
2015-12-11T01:44:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
703
java
package com.game.transactions.handler; import org.apache.log4j.Logger; import com.game.manager.ManagerPool; import com.game.player.structs.Player; import com.game.transactions.message.ReqTransactionsChangeYuanbaoMessage; import com.game.command.Handler; public class ReqTransactionsChangeYuanbaoHandler extends Handler{ Logger log = Logger.getLogger(ReqTransactionsChangeYuanbaoHandler.class); public void action(){ try{ ReqTransactionsChangeYuanbaoMessage msg = (ReqTransactionsChangeYuanbaoMessage)this.getMessage(); ManagerPool.transactionsManager.stTransactionsChangeYuanbao((Player)this.getParameter(), msg.getYuanbao()); }catch(ClassCastException e){ log.error(e); } } }
[ "zhuyuanbiao@ZHUYUANBIAO.rd.com" ]
zhuyuanbiao@ZHUYUANBIAO.rd.com
4f40044d9a388df6995cf6c668e42812de150301
f23634049a4a78113383b377e924922a4b890933
/LABS/Lab02/Luis Uribe/Proyecto02_LuisUribe/src/pe/uni/app/dto/TablaPrestamoDto.java
90234750e16fd461fd31acc9fa94430d0cce5bc2
[]
no_license
gcoronelc/JAVA_WEB_2020_10
a95bb6d19d5a7ee2f5495af0835fda06602e1ab6
74019de5254c6a67dfa64a7cb36cf733e377724b
refs/heads/main
2023-01-08T16:10:22.299230
2020-11-08T13:09:51
2020-11-08T13:09:51
304,798,747
0
0
null
null
null
null
UTF-8
Java
false
false
1,308
java
package pe.uni.app.dto; public class TablaPrestamoDto { private int mes; private double saldoInicial; private double amortizacion; private double interes; private double cuota; private double saldoFinal; public TablaPrestamoDto(int mes, double saldoInicial, double amortizacion, double interes, double cuota, double saldoFinal) { super(); this.mes = mes; this.saldoInicial = saldoInicial; this.amortizacion = amortizacion; this.interes = interes; this.cuota = cuota; this.saldoFinal = saldoFinal; } public int getMes() { return mes; } public void setMes(int mes) { this.mes = mes; } public double getSaldoInicial() { return saldoInicial; } public void setSaldoInicial(double saldoInicial) { this.saldoInicial = saldoInicial; } public double getAmortizacion() { return amortizacion; } public void setAmortizacion(double amortizacion) { this.amortizacion = amortizacion; } public double getInteres() { return interes; } public void setInteres(double interes) { this.interes = interes; } public double getCuota() { return cuota; } public void setCuota(double cuota) { this.cuota = cuota; } public double getSaldoFinal() { return saldoFinal; } public void setSaldoFinal(double saldoFinal) { this.saldoFinal = saldoFinal; } }
[ "gcoronelc@gmail.com" ]
gcoronelc@gmail.com
08d04d1d4dda57a921e51faab1142e15d5cc0602
fce7410ed7cdfa279f2963b63edff8d5faab295a
/RecyclerViewWithDatabaseFirst/app/src/main/java/com/example/ujjwalsmahapatra/recyclerviewwithdatabasefirst/MyDatabase.java
d8e252ecf6b5d851c6246300514f714684fa722e
[]
no_license
usmahapatra/First-Android-Apps
f3f4d163fffbdfa157e9f70e4264a5f73444063d
0c91cb43a95a2cdd8f02846b82a50c288dcca8f0
refs/heads/master
2020-03-11T23:28:41.251337
2019-05-08T12:37:44
2019-05-08T12:37:44
130,322,712
0
0
null
null
null
null
UTF-8
Java
false
false
1,722
java
package com.example.ujjwalsmahapatra.recyclerviewwithdatabasefirst; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class MyDatabase { MyHelper mh; SQLiteDatabase db; public MyDatabase(Context c) { mh=new MyHelper(c,"techpalle.db",null,1); } public void open() { db=mh.getWritableDatabase();//open database connection } public void insertStudent(String sname,String sub){ ContentValues cv=new ContentValues(); cv.put("sname",sname); cv.put("sub",sub); db.insert("student",null,cv); } public void deleteStudent(int id) { db.delete("student","_id=?",new String[]{""+id}); } public void updateStudent(int sno, String sname,String sub){ ContentValues cv=new ContentValues(); cv.put("sname",sname); cv.put("sub",sub); db.update("student",cv,"_id=?",new String[]{"+sno"}); } public Cursor queryStudent() { Cursor c=db.query("student",null,null,null,null,null,null); return c; } public void close() { if(db!=null) db.close(); } public class MyHelper extends SQLiteOpenHelper{ public MyHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) { super(context, name, factory, version); } @Override public void onCreate(SQLiteDatabase sqLiteDatabase) { sqLiteDatabase.execSQL("create table student(_id integer primary key,sname text,sub text);"); } @Override public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) { } } }
[ "usmahapatra@gmail.com" ]
usmahapatra@gmail.com
c598c372c7ecb8576c547c7382c7ecb6ca024f65
66879fb5e25987ec0374f05445859c3069c47290
/src/main/java/com/hs3/models/Excel.java
f4e65ec8dca1a3f5eba6c8354622baa55a4d51c2
[]
no_license
wangpiju/java-kernal
0aceb90aa7705e18175a660fa64fa8f3b998779b
17ef494cc4a1a3f86013f0330642d76965fc502c
refs/heads/master
2020-04-01T09:18:18.310531
2018-10-15T07:20:51
2018-10-15T07:20:51
153,069,500
1
2
null
null
null
null
UTF-8
Java
false
false
6,428
java
package com.hs3.models; import com.hs3.entity.finance.Deposit; import com.hs3.entity.finance.Recharge; import com.hs3.utils.DateUtils; import java.lang.reflect.Field; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; public class Excel { private String fileName; private List<ExcelSheet> ems; private List<String> countFields = new ArrayList(); public String getFileName() { return this.fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public List<ExcelSheet> getEms() { return this.ems; } public void setEms(List<ExcelSheet> ems) { this.ems = ems; } public List<String> getCountFields() { return this.countFields; } public void setCountFields(List<String> countFields) { this.countFields = countFields; } private static final Map<String, String> map = new HashMap(); static { map.put(Recharge.class.getName() + ".status.0", "未处理"); map.put(Recharge.class.getName() + ".status.1", "拒绝"); map.put(Recharge.class.getName() + ".status.2", "完成"); map.put(Recharge.class.getName() + ".status.3", "已过期"); map.put(Recharge.class.getName() + ".status.4", "已撤销"); map.put(Recharge.class.getName() + ".status.5", "正在处理"); map.put(Recharge.class.getName() + ".status.6", "审核中"); map.put(Recharge.class.getName() + ".rechargeType.0", "银行充值"); map.put(Recharge.class.getName() + ".rechargeType.1", "第三方充值"); map.put(Recharge.class.getName() + ".rechargeType.2", "现金充值"); map.put(Recharge.class.getName() + ".test.0", "非测试"); map.put(Recharge.class.getName() + ".test.1", "测试"); map.put(Recharge.class.getName() + ".createTime", "yyyy-MM-dd HH:mm:ss"); map.put(Recharge.class.getName() + ".lastTime", "yyyy-MM-dd HH:mm:ss"); map.put(Deposit.class.getName() + ".status.0", "未处理"); map.put(Deposit.class.getName() + ".status.1", "拒绝"); map.put(Deposit.class.getName() + ".status.2", "完成"); map.put(Deposit.class.getName() + ".status.3", "已过期"); map.put(Deposit.class.getName() + ".status.4", "已撤销"); map.put(Deposit.class.getName() + ".status.5", "正在处理"); map.put(Deposit.class.getName() + ".status.6", "审核中"); map.put(Deposit.class.getName() + ".status.7", "审核通过"); map.put(Deposit.class.getName() + ".status.8", "审核不通过"); map.put(Deposit.class.getName() + ".status.99", "挂起"); map.put(Deposit.class.getName() + ".test.0", "非测试"); map.put(Deposit.class.getName() + ".test.1", "测试"); map.put(Deposit.class.getName() + ".createTime", "yyyy-MM-dd HH:mm:ss"); map.put(Deposit.class.getName() + ".lastTime", "yyyy-MM-dd HH:mm:ss"); } private final String getDateFormat(Class<?> clazz, String field) { String key = clazz.getName() + "." + field; if (map.containsKey(key)) { return (String) map.get(key); } return null; } private final String getFormatValue(Class<?> clazz, String field, String value) { String key = clazz.getName() + "." + field + "." + value; if (map.containsKey(key)) { return (String) map.get(key); } return value; } public void fillValue(List<?> list) throws Exception { ExcelSheet es = (ExcelSheet) this.ems.get(0); Map<String, BigDecimal> countMap = new HashMap() { private static final long serialVersionUID = 1L; public BigDecimal put(String key, BigDecimal value) { BigDecimal v = (BigDecimal) get(key); if (v == null) { v = BigDecimal.ZERO; } if (value == null) { value = BigDecimal.ZERO; } value = value.add(v); return (BigDecimal) super.put(key, value); } }; List<List<ExcelData>> eds = new ArrayList(list.size()); List<ExcelData> ed; for (Iterator iterator = list.iterator(); iterator.hasNext(); eds.add(ed)) { Object obj = iterator.next(); ed = new ArrayList(); for (Iterator iterator2 = ((List) es.getEds().get(0)).iterator(); iterator2.hasNext(); ) { ExcelData excelData = (ExcelData) iterator2.next(); ExcelData e = new ExcelData(); String value = getObjValue(obj, excelData.getField()); e.setFormatValue(value); ed.add(e); if (countFields.contains(excelData.getField())) countMap.put(excelData.getField(), value != null ? ((BigDecimal) (new BigDecimal(value))) : ((BigDecimal) (BigDecimal.ZERO))); } } es.getEds().addAll(eds); if (!countFields.isEmpty()) { List<ExcelData> ed2 = new ArrayList(); ExcelData e; for (Iterator iterator1 = ((List) es.getEds().get(0)).iterator(); iterator1.hasNext(); ed2.add(e)) { ExcelData excelData = (ExcelData) iterator1.next(); e = new ExcelData(); BigDecimal value = (BigDecimal) countMap.get(excelData.getField()); e.setFormatValue(value != null ? value.toString() : ""); } es.getEds().add(ed2); } } private String getObjValue(Object obj, String fieldName) { Object value = null; try { Field field = obj.getClass().getDeclaredField(fieldName); field.setAccessible(true); value = field.get(obj); if ((value != null) && (field.getType() == Date.class)) { String format = getDateFormat(obj.getClass(), fieldName); if (format != null) { value = DateUtils.format((Date) value, format); } } } catch (Exception localException) { } return value == null ? "" : getFormatValue(obj.getClass(), fieldName, value.toString()); } }
[ "wangpiju0420@gmail.com" ]
wangpiju0420@gmail.com
86e45c42b764169bcbc51c2c98393c280bee8ca0
97041d60d37b0b79fc0bd2a3bb524bb39fd9634c
/src/test/java/io/jmnarloch/aws/events/pattern/Demo.java
bca1d2f3de420b001500774cfad3704aec8023e0
[ "Apache-2.0" ]
permissive
ssheff/aws-eventbridge-pattern-builder
b0b1fc365fac9489552bb67328ba7cf3fed073d0
afc9a0f78ebb65bd344376887a2e9701c3dcba3a
refs/heads/master
2023-03-29T23:48:56.242526
2020-02-05T10:10:24
2020-02-05T10:10:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,384
java
/* * Copyright (c) 2020 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 io.jmnarloch.aws.events.pattern; import io.jmnarloch.aws.events.matchers.Comparision; import org.junit.jupiter.api.Test; class Demo { @Test public void run() { EventsPattern.builder() .equal("source", "aws.ec2") .build(); EventsPattern.builder() .equal("source", "aws.ec2") .equal("detail-type", "EC2 Instance State-change Notification") .build(); EventsPattern.builder() .equal("source", "aws.ec2") .equal("detail-type", "EC2 Instance State-change Notification") .path("detail") .equal("state", "terminated") .parent() .build(); EventsPattern.builder() .equal("source", "aws.ec2", "aws.fargate") .build(); EventsPattern.builder() .prefix("time", "2017-10-02") .build(); EventsPattern.builder() .equal("source", "aws.autoscaling") .prefix("region", "eu-") .build(); EventsPattern.builder() .path("detail") .anythingBut("state", "initializing") .parent() .build(); EventsPattern.builder() .path("detail") .numeric("c-count", Comparision.GREATER_THAN, 5) .numeric("d-count", Comparision.LOWER_THAN, 10) .numeric("x-limit", Comparision.EQUAL, 3.018e2) .parent() .build(); EventsPattern.builder() .path("detail") .notExists("c-count") .parent() .build(); } }
[ "jmnarloch@gmail.com" ]
jmnarloch@gmail.com
1b0985879aeb77f5e3e8411d818c3d33d992175c
52c36ce3a9d25073bdbe002757f08a267abb91c6
/src/main/java/com/alipay/api/domain/InfoCode.java
88c0cc46a219aea074196952f5123989a404c2b7
[ "Apache-2.0" ]
permissive
itc7/alipay-sdk-java-all
d2f2f2403f3c9c7122baa9e438ebd2932935afec
c220e02cbcdda5180b76d9da129147e5b38dcf17
refs/heads/master
2022-08-28T08:03:08.497774
2020-05-27T10:16:10
2020-05-27T10:16:10
267,271,062
0
0
Apache-2.0
2020-05-27T09:02:04
2020-05-27T09:02:04
null
UTF-8
Java
false
false
1,507
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 风险解释 * * @author auto create * @since 1.0, 2017-12-14 11:01:51 */ public class InfoCode extends AlipayObject { private static final long serialVersionUID = 5555317792545148394L; /** * 风险描述 */ @ApiField("risk_description") private String riskDescription; /** * 风险因素编码 */ @ApiField("risk_factor_code") private String riskFactorCode; /** * 风险因素名称 */ @ApiField("risk_factor_name") private String riskFactorName; /** * 风险度量,子特征风险分,范围 0-10,值越大表示风险越高 */ @ApiField("risk_magnitude") private String riskMagnitude; public String getRiskDescription() { return this.riskDescription; } public void setRiskDescription(String riskDescription) { this.riskDescription = riskDescription; } public String getRiskFactorCode() { return this.riskFactorCode; } public void setRiskFactorCode(String riskFactorCode) { this.riskFactorCode = riskFactorCode; } public String getRiskFactorName() { return this.riskFactorName; } public void setRiskFactorName(String riskFactorName) { this.riskFactorName = riskFactorName; } public String getRiskMagnitude() { return this.riskMagnitude; } public void setRiskMagnitude(String riskMagnitude) { this.riskMagnitude = riskMagnitude; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
de91846d35f111fa357f83b6104f645e25f823fb
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/27/27_da3ac45ca7526d4d30d659e75142d44665e22871/Update/27_da3ac45ca7526d4d30d659e75142d44665e22871_Update_s.java
1beecf77db173eb50ea6aeb029098612db072481
[]
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
575
java
package org.wings.plaf; import java.util.Iterator; import org.wings.SComponent; public interface Update { public static final int FINE_GRAINED_UPDATE = 0; public static final int FULL_REPLACE_UPDATE = 1; public SComponent getComponent(); public int getProperty(); public int getPriority(); public Handler getHandler(); public interface Handler { public String getName(); public void addParameter(Object param); public Iterator getParameters(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3346d46fe2cb07b2ab34f7ffc0c8716b5e0c3609
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/41/org/apache/commons/lang/text/StrBuilder_append_574.java
ecd13f0f7aaa344ece7e706f9f214a88cb51e62c
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
4,585
java
org apach common lang text build string constitu part provid flexibl power api string buffer stringbuff main differ string buffer stringbuff string builder stringbuild subclass direct access charact arrai addit method append separ appendwithsepar add arrai valu separ append pad appendpad add length pad charact append fix length appendfixedlength add fix width field builder char arrai tochararrai char getchar simpler wai rang charact arrai delet delet string replac search replac string left string leftstr string rightstr mid string midstr substr except builder string size clear empti isempti collect style api method view token astoken intern buffer sourc str token strtoken reader asread intern buffer sourc reader writer aswrit writer write directli intern buffer aim provid api mimic close string buffer stringbuff addit method note edg case invalid indic input alter individu method biggest output text 'null' control properti link set null text setnulltext string prior implement cloneabl implement clone method onward longer author stephen colebourn version str builder strbuilder char sequenc charsequ append append part string buffer string builder append call link append null appendnul param str string append param start index startindex start index inclus valid param length length append valid enabl chain str builder strbuilder append string buffer stringbuff str start index startindex length str append null appendnul start index startindex start index startindex str length string index bound except stringindexoutofboundsexcept start index startindex valid length start index startindex length str length string index bound except stringindexoutofboundsexcept length valid length len length ensur capac ensurecapac len length str char getchar start index startindex start index startindex length buffer len size length
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
f21be885e99d92d479f7ca40ced398368090b5ca
d523206fce46708a6fe7b2fa90e81377ab7b6024
/com/google/android/gms/cast/internal/zzb.java
fa9dfa43c298a37ea26ae95bb7f7169dc90f9371
[]
no_license
BlitzModder/BlitzJava
0ee94cc069dc4b7371d1399ff5575471bdc88aac
6c6d71d2847dfd5f9f4f7c716cd820aeb7e45f2c
refs/heads/master
2021-06-11T15:04:05.571324
2017-02-04T16:04:55
2017-02-04T16:04:55
77,459,517
1
2
null
null
null
null
UTF-8
Java
false
false
847
java
package com.google.android.gms.cast.internal; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.common.api.Result; import com.google.android.gms.common.api.Status; import com.google.android.gms.internal.zzlx.zza; public abstract class zzb<R extends Result> extends zzlx.zza<R, zze> { public zzb(GoogleApiClient paramGoogleApiClient) { super(zzk.zzTo, paramGoogleApiClient); } public void zzbj(int paramInt) { zzb(zzc(new Status(paramInt))); } public void zzg(int paramInt, String paramString) { zzb(zzc(new Status(paramInt, paramString, null))); } } /* Location: /Users/subdiox/Downloads/dex2jar-2.0/net.wargaming.wot.blitz-dex2jar.jar!/com/google/android/gms/cast/internal/zzb.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "subdiox@gmail.com" ]
subdiox@gmail.com
086d41202dc248f7cd5b59d8aab55577b7eb4419
208ba847cec642cdf7b77cff26bdc4f30a97e795
/aj/ae/src/main/java/org.wp.ae/ui/stats/models/VisitModel.java
ad8281b06a49c31c578202ca731f557238a50584
[]
no_license
kageiit/perf-android-large
ec7c291de9cde2f813ed6573f706a8593be7ac88
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
refs/heads/master
2021-01-12T14:00:19.468063
2016-09-27T13:10:42
2016-09-27T13:10:42
69,685,305
0
0
null
2016-09-30T16:59:49
2016-09-30T16:59:48
null
UTF-8
Java
false
false
1,130
java
package org.wp.ae.ui.stats.models; import java.io.Serializable; public class VisitModel implements Serializable { private int mViews; private int mLikes; private int mVisitors; private int mComments; private String mPeriod; private String mBlogID; public String getBlogID() { return mBlogID; } public void setBlogID(String blogID) { this.mBlogID = blogID; } public int getViews() { return mViews; } public void setViews(int views) { this.mViews = views; } public int getLikes() { return mLikes; } public void setLikes(int likes) { this.mLikes = likes; } public int getVisitors() { return mVisitors; } public void setVisitors(int visitors) { this.mVisitors = visitors; } public int getComments() { return mComments; } public void setComments(int comments) { this.mComments = comments; } public String getPeriod() { return mPeriod; } public void setPeriod(String period) { this.mPeriod = period; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
a7d7011aa59eec2372a86268d1c6d14589e5e1e8
dd80a584130ef1a0333429ba76c1cee0eb40df73
/external/apache-harmony/x-net/src/test/support/common/java/org/apache/harmony/xnet/tests/support/MySSLContextSpi.java
ec9207eaae2a61dd2b75ccf6df8ce8df1a8635a5
[ "MIT", "Apache-2.0" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
Java
false
false
6,554
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.harmony.xnet.tests.support; import java.nio.ByteBuffer; import java.security.KeyManagementException; import java.security.SecureRandom; import javax.net.ssl.KeyManager; import javax.net.ssl.SSLContextSpi; import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLEngineResult; import javax.net.ssl.SSLException; import javax.net.ssl.SSLParameters; import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSessionContext; import javax.net.ssl.SSLServerSocketFactory; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; /** * Additional class for verification of SSLContextSpi and SSLContext * functionality * */ public class MySSLContextSpi extends SSLContextSpi { private boolean init = false; @Override protected void engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom sr) throws KeyManagementException { if (sr == null) { throw new KeyManagementException( "secureRandom is null"); } init = true; } @Override protected SSLSocketFactory engineGetSocketFactory() { if (!init) { throw new RuntimeException("Not initialiazed"); }; return null; } @Override protected SSLServerSocketFactory engineGetServerSocketFactory() { if (!init) { throw new RuntimeException("Not initialiazed"); } return null; } @Override protected SSLSessionContext engineGetServerSessionContext() { if (!init) { throw new RuntimeException("Not initialiazed"); } return null; } @Override protected SSLSessionContext engineGetClientSessionContext() { if (!init) { throw new RuntimeException("Not initialiazed"); } return null; } /* * FIXME: add these methods */ @Override protected SSLEngine engineCreateSSLEngine(String host, int port) { if (!init) { throw new RuntimeException("Not initialiazed"); } return new tmpSSLEngine(host, port); } @Override protected SSLEngine engineCreateSSLEngine() { if (!init) { throw new RuntimeException("Not initialiazed"); } return new tmpSSLEngine(); } public class tmpSSLEngine extends SSLEngine { String tmpHost; int tmpPort; public tmpSSLEngine() { tmpHost = null; tmpPort = 0; } public tmpSSLEngine(String host, int port) { tmpHost = host; tmpPort = port; } @Override public String getPeerHost() { return tmpHost; } @Override public int getPeerPort() { return tmpPort; } @Override public void beginHandshake() throws SSLException { } @Override public void closeInbound() throws SSLException { } @Override public void closeOutbound() {} @Override public Runnable getDelegatedTask() { return null; } @Override public String[] getEnabledCipherSuites() { return null; } @Override public String[] getEnabledProtocols() {return null; } @Override public boolean getEnableSessionCreation() { return true; } @Override public SSLEngineResult.HandshakeStatus getHandshakeStatus() { return null; }; @Override public boolean getNeedClientAuth() { return true; } @Override public SSLSession getSession() { return null; } @Override public String[] getSupportedCipherSuites() { return null; } @Override public String[] getSupportedProtocols() { return null; } @Override public boolean getUseClientMode() { return true; } @Override public boolean getWantClientAuth() { return true; } @Override public boolean isInboundDone() { return true; } @Override public boolean isOutboundDone() { return true; } @Override public void setEnabledCipherSuites(String[] suites) { } @Override public void setEnabledProtocols(String[] protocols) { } @Override public void setEnableSessionCreation(boolean flag) { } @Override public void setNeedClientAuth(boolean need) { } @Override public void setUseClientMode(boolean mode) { } @Override public void setWantClientAuth(boolean want) { } @Override public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer[] dsts, int offset, int length) throws SSLException { return null; } @Override public SSLEngineResult wrap(ByteBuffer[] srcs, int offset, int length, ByteBuffer dst) throws SSLException { return null; } @Override public SSLParameters getSSLParameters() { // TODO Auto-generated method stub return null; } @Override public void setSSLParameters(SSLParameters sslP) { // TODO Auto-generated method stub } } @Override protected SSLParameters engineGetDefaultSSLParameters() { return new SSLParameters(new String[] { "Default_SSL_Parameters_For_Test1" }, new String[] { "TLSv1" }); } @Override protected SSLParameters engineGetSupportedSSLParameters() { return new SSLParameters(new String[] { "Default_SSL_Parameters_For_Test1", "Default_SSL_Parameters_For_Test2" }, new String[] { "TLSv1", "SSLv3" }); } }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
31ea50f69223dcafe2349952c8411f39e1c126bc
6590b3febfebe1d0bc56a7ffb1fba8085054f308
/app/src/main/java/com/mao/cn/mseven/callBack/XsonObject.java
80b324e09542a6bee864dd3644244fdb13a428e6
[]
no_license
maoai-xianyu/Mseven
2a3d6cb52c55aa9886eb82b0baf3cceb549cd4a8
93a1480a9b7d498c3b25c1d197250e6e40b4cc02
refs/heads/master
2020-03-20T09:02:38.754320
2018-12-24T03:07:18
2018-12-24T03:07:18
137,326,530
0
0
null
null
null
null
UTF-8
Java
false
false
5,020
java
// // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler) // package com.mao.cn.mseven.callBack; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; public class XsonObject { private JSONObject jsonObject; public XsonObject() { this.jsonObject = new JSONObject(); } public XsonObject(String res) throws JSONException { this.jsonObject = new JSONObject(res); } public boolean contains(String key, String value) { if(this.jsonObject == null) { return false; } else if(!this.jsonObject.has(key)) { return false; } else { try { return this.jsonObject.getString(key).contains(value); } catch (JSONException var4) { return false; } } } public boolean equals(String key, String value) { if(key == null) { return false; } else if(this.jsonObject == null) { return false; } else if(!this.jsonObject.has(key)) { return false; } else { try { return this.jsonObject.getString(key).equals(value); } catch (JSONException var4) { return false; } } } public boolean equals(String key, boolean value) { if(key == null) { return false; } else if(this.jsonObject == null) { return false; } else if(!this.jsonObject.has(key)) { return false; } else { try { return this.jsonObject.getBoolean(key) == value; } catch (JSONException var4) { return false; } } } public boolean equals(String key, long value) { if(key == null) { return false; } else if(this.jsonObject == null) { return false; } else if(!this.jsonObject.has(key)) { return false; } else { try { return this.jsonObject.getLong(key) == value; } catch (JSONException var5) { return false; } } } public boolean equals(String key, int value) { if(key == null) { return false; } else if(this.jsonObject == null) { return false; } else if(!this.jsonObject.has(key)) { return false; } else { try { return this.jsonObject.getInt(key) == value; } catch (JSONException var4) { return false; } } } public String getString(String key) { if(key == null) { return null; } else if(this.jsonObject == null) { return null; } else if(!this.jsonObject.has(key)) { return null; } else { try { return this.jsonObject.getString(key); } catch (JSONException var3) { return null; } } } public long getLong(String key) { if(key == null) { return 0L; } else if(this.jsonObject == null) { return 0L; } else if(!this.jsonObject.has(key)) { return 0L; } else { try { return this.jsonObject.getLong(key); } catch (JSONException var3) { return 0L; } } } public int getInt(String key) { if(key == null) { return 0; } else if(this.jsonObject == null) { return 0; } else if(!this.jsonObject.has(key)) { return 0; } else { try { return this.jsonObject.getInt(key); } catch (JSONException var3) { return 0; } } } public boolean getBoolean(String key) { return this.getBoolean(key, false); } public boolean getBoolean(String key, boolean def) { if(key == null) { return def; } else if(this.jsonObject == null) { return def; } else if(!this.jsonObject.has(key)) { return def; } else { try { return this.jsonObject.getBoolean(key); } catch (JSONException var4) { return def; } } } public JSONArray getArray(String key) { if(key == null) { return null; } else if(this.jsonObject == null) { return null; } else if(!this.jsonObject.has(key)) { return null; } else { try { return this.jsonObject.getJSONArray(key); } catch (JSONException var3) { return null; } } } public String toString() { return this.jsonObject != null?this.jsonObject.toString():null; } }
[ "194264514@qq.com" ]
194264514@qq.com
9c529d920dcf0136c12471b513ec1f61fccd851f
8727b1cbb8ca63d30340e8482277307267635d81
/PolarServer/src/com/game/epalace/message/ResEpalaceRewardInfoToClientMessage.java
a8f7ad081a0cf54918ec0c12c6e1dba350620a34
[]
no_license
taohyson/Polar
50026903ded017586eac21a7905b0f1c6b160032
b0617f973fd3866bed62da14f63309eee56f6007
refs/heads/master
2021-05-08T12:22:18.884688
2015-12-11T01:44:18
2015-12-11T01:44:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,217
java
package com.game.epalace.message; import java.util.List; import java.util.ArrayList; import com.game.message.Message; import org.apache.mina.core.buffer.IoBuffer; /** * @author Commuication Auto Maker * * @version 1.0.0 * * 发送奖励消息消息 */ public class ResEpalaceRewardInfoToClientMessage extends Message{ //奖励类型,和格子事件对应 private int type; //奖励内容 private List<com.game.spirittree.bean.FruitRewardinfo> fruitrewardinfo = new ArrayList<com.game.spirittree.bean.FruitRewardinfo>(); //普通奖励的BUFFID,如果是0,表示给其他数值奖励 private int buffid; /** * 写入字节缓存 */ public boolean write(IoBuffer buf){ //奖励类型,和格子事件对应 writeInt(buf, this.type); //奖励内容 writeShort(buf, fruitrewardinfo.size()); for (int i = 0; i < fruitrewardinfo.size(); i++) { writeBean(buf, fruitrewardinfo.get(i)); } //普通奖励的BUFFID,如果是0,表示给其他数值奖励 writeInt(buf, this.buffid); return true; } /** * 读取字节缓存 */ public boolean read(IoBuffer buf){ //奖励类型,和格子事件对应 this.type = readInt(buf); //奖励内容 int fruitrewardinfo_length = readShort(buf); for (int i = 0; i < fruitrewardinfo_length; i++) { fruitrewardinfo.add((com.game.spirittree.bean.FruitRewardinfo)readBean(buf, com.game.spirittree.bean.FruitRewardinfo.class)); } //普通奖励的BUFFID,如果是0,表示给其他数值奖励 this.buffid = readInt(buf); return true; } /** * get 奖励类型,和格子事件对应 * @return */ public int getType(){ return type; } /** * set 奖励类型,和格子事件对应 */ public void setType(int type){ this.type = type; } /** * get 奖励内容 * @return */ public List<com.game.spirittree.bean.FruitRewardinfo> getFruitrewardinfo(){ return fruitrewardinfo; } /** * set 奖励内容 */ public void setFruitrewardinfo(List<com.game.spirittree.bean.FruitRewardinfo> fruitrewardinfo){ this.fruitrewardinfo = fruitrewardinfo; } /** * get 普通奖励的BUFFID,如果是0,表示给其他数值奖励 * @return */ public int getBuffid(){ return buffid; } /** * set 普通奖励的BUFFID,如果是0,表示给其他数值奖励 */ public void setBuffid(int buffid){ this.buffid = buffid; } @Override public int getId() { return 143106; } @Override public String getQueue() { return null; } @Override public String getServer() { return null; } @Override public String toString(){ StringBuffer buf = new StringBuffer("["); //奖励类型,和格子事件对应 buf.append("type:" + type +","); //奖励内容 buf.append("fruitrewardinfo:{"); for (int i = 0; i < fruitrewardinfo.size(); i++) { buf.append(fruitrewardinfo.get(i).toString() +","); } if(buf.charAt(buf.length()-1)==',') buf.deleteCharAt(buf.length()-1); buf.append("},"); //普通奖励的BUFFID,如果是0,表示给其他数值奖励 buf.append("buffid:" + buffid +","); if(buf.charAt(buf.length()-1)==',') buf.deleteCharAt(buf.length()-1); buf.append("]"); return buf.toString(); } }
[ "zhuyuanbiao@ZHUYUANBIAO.rd.com" ]
zhuyuanbiao@ZHUYUANBIAO.rd.com