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
8929f6c10bf4060e5f70f6c5588ecb9eb95fdc3b
17c30fed606a8b1c8f07f3befbef6ccc78288299
/P9_8_0_0/src/main/java/android/os/storage/DiskInfo.java
553e6a180d7fc6d5cedebbc1e01c42756fc275ef
[]
no_license
EggUncle/HwFrameWorkSource
4e67f1b832a2f68f5eaae065c90215777b8633a7
162e751d0952ca13548f700aad987852b969a4ad
refs/heads/master
2020-04-06T14:29:22.781911
2018-11-09T05:05:03
2018-11-09T05:05:03
157,543,151
1
0
null
2018-11-14T12:08:01
2018-11-14T12:08:01
null
UTF-8
Java
false
false
4,681
java
package android.os.storage; import android.content.Context; import android.content.res.Resources; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import android.os.PerformanceCollector; import android.text.TextUtils; import android.util.DebugUtils; import com.android.internal.util.IndentingPrintWriter; import com.android.internal.util.Preconditions; import java.io.CharArrayWriter; import java.util.Objects; public class DiskInfo implements Parcelable { public static final String ACTION_DISK_SCANNED = "android.os.storage.action.DISK_SCANNED"; public static final Creator<DiskInfo> CREATOR = new Creator<DiskInfo>() { public DiskInfo createFromParcel(Parcel in) { return new DiskInfo(in); } public DiskInfo[] newArray(int size) { return new DiskInfo[size]; } }; public static final String EXTRA_DISK_ID = "android.os.storage.extra.DISK_ID"; public static final String EXTRA_VOLUME_COUNT = "android.os.storage.extra.VOLUME_COUNT"; public static final int FLAG_ADOPTABLE = 1; public static final int FLAG_DEFAULT_PRIMARY = 2; public static final int FLAG_SD = 4; public static final int FLAG_USB = 8; public final int flags; public final String id; public String label; public long size; public String sysPath; public int volumeCount; public DiskInfo(String id, int flags) { this.id = (String) Preconditions.checkNotNull(id); this.flags = flags; } public DiskInfo(Parcel parcel) { this.id = parcel.readString(); this.flags = parcel.readInt(); this.size = parcel.readLong(); this.label = parcel.readString(); this.volumeCount = parcel.readInt(); this.sysPath = parcel.readString(); } public String getId() { return this.id; } private boolean isInteresting(String label) { if (TextUtils.isEmpty(label) || label.equalsIgnoreCase("ata") || label.toLowerCase().contains("generic") || label.toLowerCase().startsWith(Context.USB_SERVICE) || label.toLowerCase().startsWith("multiple")) { return false; } return true; } public String getDescription() { Resources res = Resources.getSystem(); if ((this.flags & 4) != 0) { if (!isInteresting(this.label)) { return res.getString(17041084); } return res.getString(17041085, this.label); } else if ((this.flags & 8) == 0) { return null; } else { if (!isInteresting(this.label)) { return res.getString(17041087); } return res.getString(17041088, this.label); } } public boolean isAdoptable() { return (this.flags & 1) != 0; } public boolean isDefaultPrimary() { return (this.flags & 2) != 0; } public boolean isSd() { return (this.flags & 4) != 0; } public boolean isUsb() { return (this.flags & 8) != 0; } public String toString() { CharArrayWriter writer = new CharArrayWriter(); dump(new IndentingPrintWriter(writer, " ", 80)); return writer.toString(); } public void dump(IndentingPrintWriter pw) { pw.println("DiskInfo{" + this.id + "}:"); pw.increaseIndent(); pw.printPair("flags", DebugUtils.flagsToString(getClass(), "FLAG_", this.flags)); pw.printPair("size", Long.valueOf(this.size)); pw.printPair(PerformanceCollector.METRIC_KEY_LABEL, this.label); pw.println(); pw.printPair("sysPath", this.sysPath); pw.decreaseIndent(); pw.println(); } public DiskInfo clone() { Parcel temp = Parcel.obtain(); try { writeToParcel(temp, 0); temp.setDataPosition(0); DiskInfo diskInfo = (DiskInfo) CREATOR.createFromParcel(temp); return diskInfo; } finally { temp.recycle(); } } public boolean equals(Object o) { if (o instanceof DiskInfo) { return Objects.equals(this.id, ((DiskInfo) o).id); } return false; } public int hashCode() { return this.id.hashCode(); } public int describeContents() { return 0; } public void writeToParcel(Parcel parcel, int flags) { parcel.writeString(this.id); parcel.writeInt(this.flags); parcel.writeLong(this.size); parcel.writeString(this.label); parcel.writeInt(this.volumeCount); parcel.writeString(this.sysPath); } }
[ "lygforbs0@mail.com" ]
lygforbs0@mail.com
4778c1a5da026fe8b45c5a055f3627865d5b7caf
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/48/org/apache/commons/lang/exception/NestableRuntimeException_getThrowableCount_149.java
317194746baf99c057e0c4dcafa7f792c331c87a
[]
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
660
java
org apach common lang except base runtim except except org apach common lang except nestabl except nestableexcept author href mailto rafal krzewski point rafal krzewski author daniel rall author href mailto knielsen apach org kasper nielsen author href mailto steven caswel steven caswel version nestabl runtim except nestableruntimeexcept runtim except runtimeexcept nestabl inherit doc inheritdoc throwabl count getthrowablecount deleg throwabl count getthrowablecount
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
f846d65f57b4a65d24a3feb43cac249b02f9e69b
4be719618eff81f92601dd33df174f149d52b38e
/cougar-test/cougar-normal-code-tests/src/test/java/com/betfair/cougar/tests/updatedcomponenttests/standardvalidation/soap/testidl/SOAPRequestTypesEnumUnrecognisedValueTest.java
1ae1c70ee31052ae9f513d53761a4d27d85361d6
[ "Apache-2.0" ]
permissive
chrissekaran/cougar
dbda7b1bc526974a8c141f2571be3681f9652b93
58eafe7b9770f543c7a32390703fd0cbefd97064
refs/heads/master
2020-12-30T21:55:42.446413
2014-02-26T18:37:29
2014-02-26T18:37:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,511
java
/* * Copyright 2013, The Sporting Exchange Limited * * 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. */ // Originally from UpdatedComponentTests/StandardValidation/SOAP/Test-IDL/SOAP_RequestTypes_Byte_null.xls; package com.betfair.cougar.tests.updatedcomponenttests.standardvalidation.soap.testidl; import com.betfair.testing.utils.cougar.assertions.AssertionUtils; import com.betfair.testing.utils.cougar.beans.HttpCallBean; import com.betfair.testing.utils.cougar.beans.HttpResponseBean; import com.betfair.testing.utils.cougar.helpers.CougarHelpers; import com.betfair.testing.utils.cougar.manager.AccessLogRequirement; import com.betfair.testing.utils.cougar.manager.CougarManager; import com.betfair.testing.utils.cougar.misc.XMLHelpers; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import org.w3c.dom.Document; import java.sql.Timestamp; import java.util.Map; /** * Ensure that when a SOAP request is received with a null Byte parameter Cougar returns the correct fault */ public class SOAPRequestTypesEnumUnrecognisedValueTest { @Test(dataProvider = "ValidationStyleAndFailureLocation") public void doTest(boolean schemaValidationEnabled, String location) throws Exception { CougarHelpers helpers = new CougarHelpers(); try { helpers.setSOAPSchemaValidationEnabled(schemaValidationEnabled); // Create the HttpCallBean CougarManager cougarManager1 = CougarManager.getInstance(); HttpCallBean httpCallBeanBaseline = cougarManager1.getNewHttpCallBean(); // Get the cougar logging attribute for getting log entries later // Point the created HttpCallBean at the correct service httpCallBeanBaseline.setServiceName("baseline", "cougarBaseline"); httpCallBeanBaseline.setVersion("v2"); // Create the SOAP request as an XML Document (with a null byte parameter) XMLHelpers xMLHelpers2 = new XMLHelpers(); Document createAsDocument2 = xMLHelpers2.getXMLObjectFromString("<EnumSimpleOperationRequest><message><bodyParameter>" +(location.equals("body")?"UNRECOGNIZED_VALUE":"FOO")+ "</bodyParameter></message><headerParam>" +(location.equals("header")?"UNRECOGNIZED_VALUE":"FOOBAR")+ "</headerParam><queryParam>" +(location.equals("query")?"UNRECOGNIZED_VALUE":"BAR")+ "</queryParam></EnumSimpleOperationRequest>"); // Set up the Http Call Bean to make the request CougarManager cougarManager3 = CougarManager.getInstance(); HttpCallBean hbean = cougarManager3.getNewHttpCallBean("87.248.113.14"); CougarManager hinstance = cougarManager3; hinstance.setCougarFaultControllerJMXMBeanAttrbiute("DetailedFaults", "false"); hbean.setServiceName("Baseline"); hbean.setVersion("v2"); // Set the created SOAP request as the PostObject hbean.setPostObjectForRequestType(createAsDocument2, "SOAP"); // Get current time for getting log entries later Timestamp getTimeAsTimeStamp9 = new Timestamp(System.currentTimeMillis()); // Make the SOAP call to the operation hinstance.makeSoapCougarHTTPCalls(hbean); // Create the expected response object as an XML document (fault) XMLHelpers xMLHelpers5 = new XMLHelpers(); Document createAsDocument11 = xMLHelpers5.getXMLObjectFromString("<soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>DSC-0044</faultstring><detail/></soapenv:Fault>"); // Convert the expected response to SOAP for comparison with the actual response Map<String, Object> convertResponseToSOAP12 = hinstance.convertResponseToSOAP(createAsDocument11, hbean); // Check the response is as expected HttpResponseBean response6 = hbean.getResponseObjectsByEnum(com.betfair.testing.utils.cougar.enums.CougarMessageProtocolResponseTypeEnum.SOAP); AssertionUtils.multiAssertEquals(convertResponseToSOAP12.get("SOAP"), response6.getResponseObject()); // generalHelpers.pauseTest(500L); // Check the log entries are as expected CougarManager cougarManager10 = CougarManager.getInstance(); cougarManager10.verifyAccessLogEntriesAfterDate(getTimeAsTimeStamp9, new AccessLogRequirement("87.248.113.14", "/BaselineService/v2", "BadRequest")); } finally { helpers.setSOAPSchemaValidationEnabled(true); } } @DataProvider(name = "ValidationStyleAndFailureLocation") public Object[][] versions() { return new Object[][]{ {true,"body"}, {true,"header"}, {true,"query"}, {false,"body"}, {false,"header"}, {false,"query"} }; } }
[ "simon@exemel.co.uk" ]
simon@exemel.co.uk
b1b6b7f12e726c71387c7a16855bf28c88030ac6
df21e7efd6dc4299065dcd4f23fad964c6b10665
/myoss-starter-cache/src/main/java/app/myoss/cloud/cache/caffeine/CaffeineCacheWrap.java
e9fd303e9ab78b443711885a9f6904692d00ad79
[ "Apache-2.0" ]
permissive
XiaoMaoGuai/myoss-starter-projects
71879c1b4788424bf2af575499ef22a1ba275675
f51af3c4e8bef4877cebab9b1d6530f10b9bb37b
refs/heads/master
2020-05-27T14:02:12.868582
2019-07-05T09:09:39
2019-07-05T09:09:39
188,649,907
0
0
Apache-2.0
2019-05-26T06:52:26
2019-05-26T06:52:26
null
UTF-8
Java
false
false
2,418
java
/* * Copyright 2018-2018 https://github.com/myoss * * 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 app.myoss.cloud.cache.caffeine; import org.springframework.cache.support.NullValue; /** * Caffeine Cache包装类, Caffeine Cache不允许保存null值,会将 {@code null} 值转换为 * {@link NullValue#INSTANCE} 放进缓存中,这样后续的操作就不会进入到缓存中 * * @author Jerry.Chen * @since 2018年5月23日 上午1:06:17 */ public class CaffeineCacheWrap extends org.springframework.cache.caffeine.CaffeineCache { /** * Create a {@link com.github.benmanes.caffeine.cache.Cache} instance with * the specified name and the given internal * {@link com.github.benmanes.caffeine.cache.Cache} to use. * * @param name the name of the cache * @param cache the backing Caffeine Cache instance */ public CaffeineCacheWrap(String name, com.github.benmanes.caffeine.cache.Cache<Object, Object> cache) { super(name, cache); } /** * Create a {@link com.github.benmanes.caffeine.cache.Cache} instance with * the specified name and the given internal * {@link com.github.benmanes.caffeine.cache.Cache} to use. * * @param name the name of the cache * @param cache the backing Caffeine Cache instance * @param allowNullValues whether to accept and convert {@code null} values * for this cache */ public CaffeineCacheWrap(String name, com.github.benmanes.caffeine.cache.Cache<Object, Object> cache, boolean allowNullValues) { super(name, cache, allowNullValues); } @Override public void put(Object key, Object value) { if (value == null) { if (isAllowNullValues()) { super.put(key, null); } } else { super.put(key, value); } } }
[ "jerry.myoss@gmail.com" ]
jerry.myoss@gmail.com
cef36ea3d573b4db7b6f17e2fcbf5346f4a31320
2f53a7dbb0c2ad58575c8f3491c8d71478b11de3
/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/resolver/TraceBasedErrorReporter.java
0feacda9caff623e9c55f1df6a05c6c879d8b7e4
[]
no_license
hhhxxjj/kotlin
9cf984d66b4aa4d8a593efdb7dd05ddcebf5172f
1cd7fa65d7fac9976d817b2d9a9ee4f68e01c4c9
refs/heads/master
2021-01-17T10:25:11.797030
2014-03-11T20:20:39
2014-03-12T15:01:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,565
java
/* * Copyright 2010-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jetbrains.jet.lang.resolve.java.resolver; import com.intellij.openapi.diagnostic.Logger; import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.descriptors.CallableMemberDescriptor; import org.jetbrains.jet.lang.psi.JetDeclaration; import org.jetbrains.jet.lang.resolve.BindingContextUtils; import org.jetbrains.jet.lang.resolve.BindingTrace; import org.jetbrains.jet.lang.resolve.kotlin.KotlinJvmBinaryClass; import org.jetbrains.jet.lang.resolve.kotlin.VirtualFileKotlinClass; import org.jetbrains.jet.util.slicedmap.Slices; import org.jetbrains.jet.util.slicedmap.WritableSlice; import javax.inject.Inject; import static org.jetbrains.jet.lang.diagnostics.Errors.CANNOT_INFER_VISIBILITY; public class TraceBasedErrorReporter implements ErrorReporter { private static final Logger LOG = Logger.getInstance(TraceBasedErrorReporter.class); public static final WritableSlice<VirtualFileKotlinClass, Integer> ABI_VERSION_ERRORS = Slices.createCollectiveSlice(); private BindingTrace trace; @Inject public void setTrace(BindingTrace trace) { this.trace = trace; } @Override public void reportIncompatibleAbiVersion(@NotNull KotlinJvmBinaryClass kotlinClass, int actualVersion) { trace.record(ABI_VERSION_ERRORS, (VirtualFileKotlinClass) kotlinClass, actualVersion); } @Override public void reportCannotInferVisibility(@NotNull CallableMemberDescriptor descriptor) { PsiElement element = BindingContextUtils.descriptorToDeclaration(trace.getBindingContext(), descriptor); if (element instanceof JetDeclaration) { trace.report(CANNOT_INFER_VISIBILITY.on((JetDeclaration) element)); } } @Override public void reportAnnotationLoadingError(@NotNull String message, @Nullable Exception exception) { LOG.error(message, exception); } }
[ "Alexander.Udalov@jetbrains.com" ]
Alexander.Udalov@jetbrains.com
b8be72a251a0738a43860f3e710bd316fcde6144
31f194c8c897e025e01701ce35dc77dc5bfd275c
/L1J/src/com/lineage/server/model/item/etcitem/UseSpeedPotion_2_ElfBrave.java
5da53b4c3c303b73417d241f13a0eac716d530b7
[]
no_license
danceking/l1jcn-zwb
6404547566b63e0c0d6e510d45202bba78e010b6
d146a1807fc5b62632f35b87eaf500ecc6c902e9
refs/heads/master
2020-06-26T02:04:35.671127
2012-09-18T08:32:11
2012-09-18T08:32:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,355
java
package com.lineage.server.model.item.etcitem; import static com.lineage.server.model.skill.L1SkillId.STATUS_BRAVE; import static com.lineage.server.model.skill.L1SkillId.STATUS_BRAVE2; import static com.lineage.server.model.skill.L1SkillId.STATUS_ELFBRAVE; import static com.lineage.server.model.skill.L1SkillId.WIND_WALK; import com.lineage.server.model.Instance.L1ItemInstance; import com.lineage.server.model.Instance.L1PcInstance; import com.lineage.server.model.item.UniversalUseItem; import com.lineage.server.serverpackets.S_SkillBrave; import com.lineage.server.serverpackets.S_SkillSound; /** * 加速药水效果 (二段:精灵饼干) * * @author jrwz */ public class UseSpeedPotion_2_ElfBrave implements UniversalUseItem { private static UniversalUseItem _instance; public static UniversalUseItem get() { if (_instance == null) { _instance = new UseSpeedPotion_2_ElfBrave(); } return _instance; } @Override public void useItem(final L1PcInstance pc, final L1ItemInstance item, final int itemId, final int effect, final int time, final int gfxid) { // 删除重复的二段加速效果 pc.delRepeatSkillEffect(STATUS_BRAVE); // 勇敢药水类 1.33倍 pc.delRepeatSkillEffect(STATUS_ELFBRAVE); // 精灵饼干 1.15倍 pc.delRepeatSkillEffect(WIND_WALK); // 风之疾走 移速1.33倍 pc.delRepeatSkillEffect(STATUS_BRAVE2); // 超级加速 2.66倍 // 给予状态 && 效果 pc.sendPackets(new S_SkillSound(pc.getId(), gfxid)); // 效果动画 (自己看得到) pc.broadcastPacket(new S_SkillSound(pc.getId(), gfxid)); // 效果动画 // (同画面的其他人看得到) pc.sendPackets(new S_SkillBrave(pc.getId(), 3, time)); // 加速效果与时间 // (自己看得到) pc.broadcastPacket(new S_SkillBrave(pc.getId(), 3, 0)); // 加速效果与时间 // (同画面的其他人看得到) pc.setSkillEffect(STATUS_ELFBRAVE, time * 1000); // 给予二段加速时间 (秒) pc.setBraveSpeed(3); // 设置饼干速度 } }
[ "zhaowenbing20121013@gmail.com" ]
zhaowenbing20121013@gmail.com
03c53dc8d1f0ae3a1275df1f8418e87ba80f6497
d12608842c2ad5efb31c03fc901a1a58e0690d9e
/src/main/java/cn/bxd/sip/his/webservice/hisws/invoke/QueryTaketheNoResponse.java
0f542e095f52eb91c302ff4bf43d433da47bced5
[]
no_license
haomeiling/hlp
fc69cf8dcc92b72f495784b4de7973e2f9128b47
cc826e0acd91b5cd4acdb253ceb1465659df1e97
refs/heads/master
2020-06-27T13:15:27.673382
2019-10-08T07:22:16
2019-10-08T07:22:16
199,963,146
0
0
null
null
null
null
UTF-8
Java
false
false
1,497
java
package cn.bxd.sip.his.webservice.hisws.invoke; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>anonymous complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="queryTaketheNoResult" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "queryTaketheNoResult" }) @XmlRootElement(name = "queryTaketheNoResponse") public class QueryTaketheNoResponse { protected String queryTaketheNoResult; /** * 获取queryTaketheNoResult属性的值。 * * @return * possible object is * {@link String } * */ public String getQueryTaketheNoResult() { return queryTaketheNoResult; } /** * 设置queryTaketheNoResult属性的值。 * * @param value * allowed object is * {@link String } * */ public void setQueryTaketheNoResult(String value) { this.queryTaketheNoResult = value; } }
[ "48750800+haomeiling@users.noreply.github.com" ]
48750800+haomeiling@users.noreply.github.com
777b0141a572fb6a194a7badf402576a7162fecc
51cc9acab04946897d50844c2a5d93b7e5e743eb
/Components/LearningCore/Source/gov/sandia/cognition/statistics/montecarlo/MultivariateMonteCarloIntegrator.java
f19a938ea67b12bba7d1cc4f5ba7bfdf716818b0
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
Markoy8/Foundry
c9da8bb224cf6fd089a7e5d700631e4c12280380
c3ec00a8efe08a25dd5eae7150b788e4486c0e6e
refs/heads/master
2021-06-28T09:40:51.709574
2020-12-10T08:20:26
2020-12-10T08:20:26
151,100,445
0
0
NOASSERTION
2018-10-01T14:16:01
2018-10-01T14:16:01
null
UTF-8
Java
false
false
4,130
java
/* * File: MultivariateMonteCarloIntegrator.java * Authors: Kevin R. Dixon * Company: Sandia National Laboratories * Project: Cognitive Foundry * * Copyright Feb 12, 2010, Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the U.S. Government. * Export of this program may require a license from the United States * Government. See CopyrightHistory.txt for complete details. * */ package gov.sandia.cognition.statistics.montecarlo; import gov.sandia.cognition.evaluator.Evaluator; import gov.sandia.cognition.math.matrix.Matrix; import gov.sandia.cognition.math.matrix.Vector; import gov.sandia.cognition.statistics.distribution.MultivariateGaussian; import gov.sandia.cognition.util.AbstractCloneableSerializable; import gov.sandia.cognition.util.DefaultWeightedValue; import gov.sandia.cognition.util.WeightedValue; import java.util.ArrayList; import java.util.Collection; import java.util.List; /** * A Monte Carlo integrator for multivariate (vector) outputs. * @author Kevin R. Dixon * @since 3.0 */ public class MultivariateMonteCarloIntegrator extends AbstractCloneableSerializable implements MonteCarloIntegrator<Vector> { /** * Default variance to add to the Gaussian, {@value}. */ public static final double DEFAULT_VARIANCE = 0.0; /** * Default instance because this class has no state. */ public static final MultivariateMonteCarloIntegrator INSTANCE = new MultivariateMonteCarloIntegrator(); /** * Creates a new instance of MultivariateMonteCarloIntegrator */ public MultivariateMonteCarloIntegrator() { } public <SampleType> MultivariateGaussian.PDF integrate( Collection<? extends SampleType> samples, Evaluator<? super SampleType, ? extends Vector> expectationFunction) { ArrayList<Vector> outputs = new ArrayList<Vector>( samples.size() ); for( SampleType sample : samples ) { outputs.add( expectationFunction.evaluate(sample).convertToVector() ); } return MultivariateGaussian.MaximumLikelihoodEstimator.learn( outputs, DEFAULT_VARIANCE ); } public <SampleType> MultivariateGaussian.PDF integrate( List<? extends WeightedValue<? extends SampleType>> samples, Evaluator<? super SampleType, ? extends Vector> expectationFunction) { ArrayList<DefaultWeightedValue<Vector>> outputs = new ArrayList<DefaultWeightedValue<Vector>>( samples.size() ); for( WeightedValue<? extends SampleType> sample : samples ) { Vector output = expectationFunction.evaluate(sample.getValue()).convertToVector(); outputs.add( new DefaultWeightedValue<Vector>(output, sample.getWeight()) ); } return MultivariateGaussian.WeightedMaximumLikelihoodEstimator.learn( outputs, DEFAULT_VARIANCE); } public MultivariateGaussian.PDF getMean( Collection<? extends Vector> samples) { MultivariateGaussian.PDF pdf = MultivariateGaussian.MaximumLikelihoodEstimator.learn( samples,DEFAULT_VARIANCE); Matrix C = pdf.getCovariance().scale( 1.0/samples.size() ); pdf.setCovariance(C); return pdf; } public MultivariateGaussian.PDF getMean( List<? extends WeightedValue<? extends Vector>> samples) { MultivariateGaussian.PDF pdf = MultivariateGaussian.WeightedMaximumLikelihoodEstimator.learn( samples,DEFAULT_VARIANCE); double weightSum = 0.0; double sumSquared = 0.0; for( WeightedValue<? extends Vector> sample : samples ) { final double w = sample.getWeight(); weightSum += w; sumSquared += w*w; } double ws2 = weightSum*weightSum; Matrix C = pdf.getCovariance().scale( sumSquared / ws2 ); pdf.setCovariance(C); return pdf; } }
[ "jbasilico@cognitivefoundry.org" ]
jbasilico@cognitivefoundry.org
41d3baa89b232a43e38df8df0c9425df228673bb
781e2692049e87a4256320c76e82a19be257a05d
/all_data/cs61bl/lab04/cs61bl-em/AccountTest.java
337b061c6417c9e26738063e3aa0db1b478ca17e
[]
no_license
itsolutionscorp/AutoStyle-Clustering
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
refs/heads/master
2020-12-11T07:27:19.291038
2016-03-16T03:18:00
2016-03-16T03:18:42
59,454,921
4
0
null
2016-05-23T05:40:56
2016-05-23T05:40:56
null
UTF-8
Java
false
false
752
java
import junit.framework.TestCase; public class AccountTest extends TestCase { public void testInit () { Account a = new Account(50); assertTrue (a.balance() == 50); } public void testInvalidArgs() { Account a = new Account(50); a.deposit(-10); assertTrue (a.balance() == 50); a.withdraw(-10); assertTrue (a.balance() == 50); } public void testOverdraft() { Account a = new Account(50); a.withdraw(51); assertTrue (a.balance() == 50); } public void testDeposit() { Account a = new Account(50); a.deposit(28); assertTrue (a.balance() == 78); } public void testWithdraw() { Account a = new Account(50); a.withdraw(12); assertTrue (a.balance() == 38); } }
[ "moghadam.joseph@gmail.com" ]
moghadam.joseph@gmail.com
ff5f17746fdcc9cb6d838cee385971c225f63a4a
a28d30ed253ad9ce3244509b9aa9e11ffb2dd78a
/panda/src/test/java/org/panda_lang/framework/language/resource/expression/ExpressionContextUtils.java
d9c3598178bbbe0074a5101d4dda4603b90cef56
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
SocketByte/panda
7dfcf59d85898000a88ee150ce01498c87051a02
6d57bc7d74093ae8e0d38a434d08242bc0018e18
refs/heads/master
2022-07-31T04:25:01.599181
2020-05-19T04:12:45
2020-05-19T09:37:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,490
java
/* * Copyright (c) 2015-2020 Dzikoysk * * 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.panda_lang.framework.language.resource.expression; import org.panda_lang.framework.design.architecture.module.Imports; import org.panda_lang.framework.design.architecture.module.ModulePath; import org.panda_lang.framework.design.architecture.statement.StandardizedFramedScope; import org.panda_lang.framework.design.architecture.statement.VariableData; import org.panda_lang.framework.design.architecture.module.TypeLoader; import org.panda_lang.framework.design.interpreter.parser.Components; import org.panda_lang.framework.design.interpreter.parser.Context; import org.panda_lang.framework.language.architecture.module.PandaImports; import org.panda_lang.framework.language.architecture.module.PandaModule; import org.panda_lang.framework.language.architecture.module.PandaModulePath; import org.panda_lang.framework.language.architecture.module.PandaTypeLoader; import org.panda_lang.framework.language.architecture.statement.StaticScope; import org.panda_lang.framework.language.interpreter.parser.PandaContext; import org.panda_lang.framework.language.interpreter.parser.expression.PandaExpressionParser; import org.panda_lang.panda.language.architecture.PandaScript; import org.panda_lang.panda.language.resource.ResourcesLoader; import org.panda_lang.panda.language.resource.syntax.expressions.PandaExpressionUtils; import java.util.Map; import java.util.function.Function; public final class ExpressionContextUtils { private ExpressionContextUtils() { } /** * Create the fake parser context, which contains: * - expression parser * - variables: * > string variable * > string[] array * > int i * - scope linker * - abstract scope * - module path & loader * * @return the fake data */ public static Context createFakeContext(Function<Context, Map<VariableData, Object>> variablesSupplier) { Context context = new PandaContext(); context.withComponent(Components.EXPRESSION, new PandaExpressionParser(PandaExpressionUtils.collectSubparsers())); ModulePath path = new PandaModulePath(); TypeLoader loader = new PandaTypeLoader(); ResourcesLoader resourcesLoader = new ResourcesLoader(); resourcesLoader.load(path, loader); Imports imports = new PandaImports(path, loader); imports.importModule("java"); imports.importModule("panda"); PandaScript script = new PandaScript("fake-script"); script.setModule(new PandaModule("fake-module")); context.withComponent(Components.SCRIPT, script); context.withComponent(Components.TYPE_LOADER, loader); context.withComponent(Components.IMPORTS, imports); StandardizedFramedScope scope = new StaticScope(variablesSupplier.apply(context)); context.withComponent(Components.SCOPE, scope); return context; } }
[ "dzikoysk@dzikoysk.net" ]
dzikoysk@dzikoysk.net
cf85838bf8740569784ecbc890a8956d3d136e70
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/ecd-20200930/src/main/java/com/aliyun/ecd20200930/models/AssociateNetworkPackageResponseBody.java
28e9bff650ba5c56fdb3a4b3613d1b575ffb761b
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
717
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.ecd20200930.models; import com.aliyun.tea.*; public class AssociateNetworkPackageResponseBody extends TeaModel { @NameInMap("RequestId") public String requestId; public static AssociateNetworkPackageResponseBody build(java.util.Map<String, ?> map) throws Exception { AssociateNetworkPackageResponseBody self = new AssociateNetworkPackageResponseBody(); return TeaModel.build(map, self); } public AssociateNetworkPackageResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
dea350c36cecb3a31354e22d5ff4cf08aeb140e4
1c5fd654b46d3fb018032dc11aa17552b64b191c
/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/web/SpringBootMockServletContext.java
a69bf4c89254e316e642855354e8b25ec5f24f7a
[ "Apache-2.0" ]
permissive
yangfancoming/spring-boot-build
6ce9b97b105e401a4016ae4b75964ef93beeb9f1
3d4b8cbb8fea3e68617490609a68ded8f034bc67
refs/heads/master
2023-01-07T11:10:28.181679
2021-06-21T11:46:46
2021-06-21T11:46:46
193,871,877
0
0
Apache-2.0
2022-12-27T14:52:46
2019-06-26T09:19:40
Java
UTF-8
Java
false
false
2,734
java
package org.springframework.boot.test.mock.web; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import org.springframework.core.io.FileSystemResourceLoader; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; import org.springframework.mock.web.MockServletContext; /** * {@link MockServletContext} implementation for Spring Boot. Respects well-known Spring * Boot resource locations and uses an empty directory for "/" if no locations can be * found. * * @author Phillip Webb * @since 1.4.0 */ public class SpringBootMockServletContext extends MockServletContext { private static final String[] SPRING_BOOT_RESOURCE_LOCATIONS = new String[] { "classpath:META-INF/resources", "classpath:resources", "classpath:static", "classpath:public" }; private final ResourceLoader resourceLoader; private File emptyRootFolder; public SpringBootMockServletContext(String resourceBasePath) { this(resourceBasePath, new FileSystemResourceLoader()); } public SpringBootMockServletContext(String resourceBasePath, ResourceLoader resourceLoader) { super(resourceBasePath, resourceLoader); this.resourceLoader = resourceLoader; } @Override protected String getResourceLocation(String path) { if (!path.startsWith("/")) { path = "/" + path; } String resourceLocation = getResourceBasePathLocation(path); if (exists(resourceLocation)) { return resourceLocation; } for (String prefix : SPRING_BOOT_RESOURCE_LOCATIONS) { resourceLocation = prefix + path; if (exists(resourceLocation)) { return resourceLocation; } } return super.getResourceLocation(path); } protected final String getResourceBasePathLocation(String path) { return super.getResourceLocation(path); } private boolean exists(String resourceLocation) { try { Resource resource = this.resourceLoader.getResource(resourceLocation); return resource.exists(); } catch (Exception ex) { return false; } } @Override public URL getResource(String path) throws MalformedURLException { URL resource = super.getResource(path); if (resource == null && "/".equals(path)) { // Liquibase assumes that "/" always exists, if we don't have a directory // use a temporary location. try { if (this.emptyRootFolder == null) { synchronized (this) { File tempFolder = File.createTempFile("spr", "servlet"); tempFolder.delete(); tempFolder.mkdirs(); tempFolder.deleteOnExit(); this.emptyRootFolder = tempFolder; } } return this.emptyRootFolder.toURI().toURL(); } catch (IOException ex) { // Ignore } } return resource; } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
10572c3b9d99caa9a87c6fd646c2ac1cae966632
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_245d46ace87024cbe50405618dc75869c75d1002/ScraperTest/25_245d46ace87024cbe50405618dc75869c75d1002_ScraperTest_s.java
4e1841b27578114390437a18158d93a3346c1f2f
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,401
java
/* * Copyright (c) Mattia Barbon <mattia@barbon.org> * distributed under the terms of the MIT license */ package org.barbon.mangaget.scrape.mangareader; import android.test.InstrumentationTestCase; import org.barbon.mangaget.data.DB; import org.barbon.mangaget.scrape.HtmlScrape; import org.barbon.mangaget.tests.R; import org.barbon.mangaget.tests.Utils; public class ScraperTest extends InstrumentationTestCase { public void testScrapeResults() { String searchPage = "http://www.mangareader.net/search/?w=&p=30"; HtmlScrape.SearchResultPage res = Scraper.scrapeSearchResults( Utils.getPage(this, R.raw.mangareader_results_html, searchPage)); assertEquals(2, res.currentPage); assertEquals("http://www.mangareader.net/search/?w=&p=%d", res.pagingUrl); assertEquals(30, res.urls.size()); assertEquals(30, res.titles.size()); assertEquals("http://www.mangareader.net/132/yotsubato.html", res.urls.get(0)); assertEquals("http://www.mangareader.net/168/black-cat.html", res.urls.get(29)); assertEquals("Yotsubato!", res.titles.get(0)); assertEquals("Black Cat", res.titles.get(29)); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
edcad1c1de637c6614b7271f24623be09fa76699
b760f94cba183e9c1f58190401230bb4a979ca92
/系统班/第一阶段JavaSE/day05/src/com/ujiuye/homework/HomeWork04.java
4ae28478ac7fa2f477de4f6854da19708b4c935d
[]
no_license
zym-bass/Java--
866d302963e89a81a1285d683f06916d19a10166
10617f3f5d1446f6a5f54e32464ed82f4c5c0628
refs/heads/main
2023-02-09T12:42:13.369757
2021-01-08T11:44:19
2021-01-08T11:44:19
304,755,939
0
0
null
null
null
null
GB18030
Java
false
false
1,477
java
package com.ujiuye.homework; import java.util.Scanner; public class HomeWork04 { public static void main(String[] args) { //创建键盘扫描仪 Scanner s = new Scanner(System.in); while(true) { menu(); System.out.println("请选择数字对应的功能:"); int number = s.nextInt(); switch(number) { case 1: System.out.println("你选择了矩形"); System.out.println("请输入矩形的长:"); double long01 = s.nextDouble(); System.out.println("你选择了矩形的宽:"); double wide = s.nextDouble(); System.out.println("矩形的面积为:"+long01*wide); continue; case 2: System.out.println("你选择了三角形"); System.out.println("请输入三角形的高:"); double number21 = s.nextDouble(); System.out.println("你选择了三角形的长:"); double number22 = s.nextDouble(); System.out.println("三角形的面积为:"+number22*number21/2); continue; case 3: System.out.println("你选择了园"); System.out.println("请输入园的半径:"); double number31 = s.nextDouble(); System.out.println("三角形的面积为:"+number31*number31*3.14); continue; case 4: System.out.println("退出界面,拜拜"); return; } } } //菜单 public static void menu() { System.out.println("计算面积"); System.out.println("1.矩形 2.三角形 3.园 4.退出"); } //矩形 //public static void }
[ "824122161@qq.com" ]
824122161@qq.com
b199a99d51d6ac743397e17cb220c348e2024a12
3c886bf79e143ac6e1382a03c47bc4bd8ab0640d
/LB-source/slimevoid/littleblocks/client/render/entities/LittleBlocksCollectionRenderer.java
09b68bcdadd3aad088346e3244ebd12deb0b39f2
[]
no_license
Tarig0/LittleBlocks-FML
5a99744c07554fc289dd64a6b241d30ce2ec4c52
d89d58bde92db03177eb206213d5f9269a79e50a
refs/heads/master
2020-12-30T17:45:11.785420
2013-07-19T18:32:56
2013-07-19T18:32:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,461
java
package slimevoid.littleblocks.client.render.entities; import java.util.Random; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.util.ResourceLocation; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraftforge.client.IItemRenderer; import slimevoid.littleblocks.items.EntityItemLittleBlocksCollection; public class LittleBlocksCollectionRenderer extends Render { @Override public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) { if(entity instanceof EntityItemLittleBlocksCollection) { EntityItemLittleBlocksCollection e = (EntityItemLittleBlocksCollection) entity; Random rand = new Random(e.entityId); for(ItemStack itemstack : e.getCollection().values()) { try { EntityItem item = new EntityItem(e.worldObj, e.posX, e.posY, e.posZ, itemstack); item.age = e.age; item.hoverStart = rand.nextFloat(); RenderManager.instance.renderEntity(item, 0); } catch (Exception eerazrt) { eerazrt.printStackTrace(); } } } } @Override protected ResourceLocation func_110775_a(Entity entity) { return null; } }
[ "reflex_ion@hotmail.com" ]
reflex_ion@hotmail.com
0c9d34f518786e535113d4eb681436176b12fbb3
dbefa45ba6f8abba23e1ba72a087b4deb6542f87
/common-tester/src/main/java/xyz/seiyaya/redis/struct/server/rdb/RDB.java
8ffa11f6d6724c10fcd778bf908b49c6e15b0035
[]
no_license
Seiyaya/common-helper
3a965a508ed7364a1f47b58c6c11bf5c5dc73ca6
50867dfcb8b36b888115057a66b94f0011cca320
refs/heads/master
2022-07-18T06:15:21.007404
2021-01-19T10:37:05
2021-01-19T10:37:05
201,204,054
0
0
null
2022-07-06T20:47:39
2019-08-08T07:32:31
Java
UTF-8
Java
false
false
533
java
package xyz.seiyaya.redis.struct.server.rdb; import lombok.Data; /** * @author wangjia * @date 2020/5/25 14:34 */ @Data public class RDB { /** * 文件的前缀,固定是"redis"字符串,用来快速判断是否是rdb文件 */ private String prefix; /** * 用来记录版本号 */ private int dbVersion; /** * 保存非空数据库的部分 */ private RDBData[] rdbData; private byte eof; /** * 校验和 8个字节 */ private int checkSum; }
[ "w806179263@qq.com" ]
w806179263@qq.com
90a3f23876cb8017ed70d343d2a1e25fa64d1940
2e0a48201fd9c6985c0abd24515505bdf11c58ca
/src/main/java/banktransfer/infra/web/WebVerticle.java
7d8d5a314ca37b06e4bc3db079750e0eda364cde
[]
no_license
Arnauld/moneytransfer
09e478235b85b4258841a7f214640eb7a179f9b5
79a3ce7d019e198eaa807450c8e36d0388eeac56
refs/heads/master
2022-02-19T10:39:21.046418
2019-10-14T16:30:18
2019-10-14T16:30:18
214,852,277
0
0
null
2022-02-11T00:25:54
2019-10-13T16:16:56
Java
UTF-8
Java
false
false
2,718
java
package banktransfer.infra.web; import banktransfer.core.account.Accounts; import banktransfer.core.account.MoneyTransferService; import io.vertx.core.AbstractVerticle; import io.vertx.core.Promise; import io.vertx.core.json.JsonObject; import io.vertx.ext.web.Router; import io.vertx.ext.web.handler.BodyHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static banktransfer.infra.Shared.sharedInMemoryAccounts; import static banktransfer.infra.Shared.sharedMoneyTransferService; public class WebVerticle extends AbstractVerticle { public static final String HTTP_PORT = "http.port"; private static final long MAX_BODY_SIZE_IN_BYTES = 4048; private static final String APPLICATION_JSON = "application/json"; // private static final Logger LOGGER = LoggerFactory.getLogger(WebVerticle.class); private final Accounts accounts; private final MoneyTransferService moneyTransferService; // default ctor is used by vertx public WebVerticle() { // whereas this is an ugly approach, this overcomes the usage of multiple WebVerticle // by ensuring all of them use the same underlying Repository, even concurrently... // next step would be to use a dedicated Verticle for the Repository this(sharedInMemoryAccounts(), sharedMoneyTransferService()); } public WebVerticle(Accounts accounts, MoneyTransferService moneyTransferService) { this.accounts = accounts; this.moneyTransferService = moneyTransferService; } @Override public void start(Promise<Void> startPromise) { JsonObject config = context.config(); Integer port = config.getInteger("http.port", 8080); Router router = initRouter(); new PingRoutes(vertx).init(router); new AccountRoutes(vertx, new Converters(), accounts, moneyTransferService).init(router); vertx.createHttpServer() .requestHandler(router) .listen(port, result -> { if (result.succeeded()) { LOGGER.info("WebVerticle stated on localhost:{}", port); startPromise.complete(); } else { startPromise.fail(result.cause()); } }); } protected Router initRouter() { Router router = Router.router(vertx); router.route().consumes(APPLICATION_JSON); router.route().produces(APPLICATION_JSON); router.route().handler(BodyHandler.create().setBodyLimit(MAX_BODY_SIZE_IN_BYTES)); router.errorHandler(500, rc -> { LOGGER.error("Oops", rc.failure()); }); return router; } }
[ "arnauld.loyer@gmail.com" ]
arnauld.loyer@gmail.com
0fb2a81f629349261ab6b4a0e6244f0e076b370b
9fe49bf7832aba9292ddfcb88fa5e1a53c13a5a4
/src/main/java/ec/com/redepronik/negosys/service/FacturaCajeroService.java
19bb654c54f2effdfb6564343adf0448555b578b
[]
no_license
Idonius/NegosysSpark
87c4c5bb560c54f519a8e54b2130557bc091eb63
c9ea96d2565500a806749ec4326e2bd3ac649b11
refs/heads/master
2022-03-07T14:31:01.583523
2015-08-27T04:34:55
2015-08-27T04:34:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
862
java
package ec.com.redepronik.negosys.service; import java.util.List; import ec.com.redepronik.negosys.entityAux.CantidadFactura; import ec.com.redepronik.negosys.entityAux.FacturaReporte; public interface FacturaCajeroService { public CantidadFactura calcularCantidad(CantidadFactura cantidadFactura, FacturaReporte fr, boolean bn); public CantidadFactura calcularCantidadFactura( CantidadFactura cantidadFactura, FacturaReporte facturaReporte); public void calcularImporte(FacturaReporte fr); public boolean cargarProductoLista(FacturaReporte facturaReporte, List<FacturaReporte> list, int bodegaId); public int contarRegistrosActivos(List<FacturaReporte> facturaReporte); public void precioMayorista(FacturaReporte fr); public void promocion(FacturaReporte fr); public CantidadFactura redondearCantidadFactura(CantidadFactura cfc); }
[ "aguachisaca@redepronik.com.ec" ]
aguachisaca@redepronik.com.ec
1a444d28cf4bc2105fe79d32ee64585e7a5d624c
732182a102a07211f7c1106a1b8f409323e607e0
/gsd/src/lx/gs/family/msg/SGetFamilyActivityInfo.java
b299e91d8590abda35f35a7e6dd7dbb116b6a427
[]
no_license
BanyLee/QYZ_Server
a67df7e7b4ec021d0aaa41cfc7f3bd8c7f1af3da
0eeb0eb70e9e9a1a06306ba4f08267af142957de
refs/heads/master
2021-09-13T22:32:27.563172
2018-05-05T09:20:55
2018-05-05T09:20:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,819
java
package lx.gs.family.msg; import com.goldhuman.Common.Marshal.OctetsStream; import com.goldhuman.Common.Marshal.MarshalException; // {{{ RPCGEN_IMPORT_BEGIN // {{{ DO NOT EDIT THIS abstract class __SGetFamilyActivityInfo__ extends xio.Protocol { } /** 获取家族活动信息 */ // DO NOT EDIT THIS }}} // RPCGEN_IMPORT_END }}} public class SGetFamilyActivityInfo extends __SGetFamilyActivityInfo__ { @Override protected void process() { // protocol handle } // {{{ RPCGEN_DEFINE_BEGIN // {{{ DO NOT EDIT THIS public static final int PROTOCOL_TYPE = 6570627; public int getType() { return 6570627; } public lx.gs.family.msg.FamilyActivity activity; // 家族活动中的信息 public SGetFamilyActivityInfo() { activity = new lx.gs.family.msg.FamilyActivity(); } public SGetFamilyActivityInfo(lx.gs.family.msg.FamilyActivity _activity_) { this.activity = _activity_; } public final boolean _validator_() { if (!activity._validator_()) return false; return true; } public OctetsStream marshal(OctetsStream _os_) { _os_.marshal(activity); return _os_; } public OctetsStream unmarshal(OctetsStream _os_) throws MarshalException { activity.unmarshal(_os_); return _os_; } public boolean equals(Object _o1_) { if (_o1_ == this) return true; if (_o1_ instanceof SGetFamilyActivityInfo) { SGetFamilyActivityInfo _o_ = (SGetFamilyActivityInfo)_o1_; if (!activity.equals(_o_.activity)) return false; return true; } return false; } public int hashCode() { int _h_ = 0; _h_ += activity.hashCode(); return _h_; } public String toString() { StringBuilder _sb_ = new StringBuilder(); _sb_.append("("); _sb_.append(activity).append(","); _sb_.append(")"); return _sb_.toString(); } // DO NOT EDIT THIS }}} // RPCGEN_DEFINE_END }}} }
[ "hadowhadow@gmail.com" ]
hadowhadow@gmail.com
e3cd70a00e5278c6b76eb85a4fefa57f0b2b12a4
0a4710d75f8256da50bfb62ac538e7e7baec0651
/LeetCode/src/johnny/algorithm/leetcode/Solution390.java
3456cb1fea52ced79ee303263dd5a8291bc2366d
[]
no_license
tuyen03a128/algorithm-java-jojozhuang
4bacbe8ce0497e6b2851b184e0b42ee34c904f95
5ca9f4ae711211689b2eb92dfddec482a062d537
refs/heads/master
2020-04-25T09:05:32.723463
2019-02-24T17:32:30
2019-02-24T17:32:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,142
java
package johnny.algorithm.leetcode; /** * Elimination Game * * There is a list of sorted integers from 1 to n. Starting from left to right, * remove the first number and every other number afterward until you reach the * end of the list. * Repeat the previous step again, but this time from right to left, remove the * right most number and every other number from the remaining numbers. * We keep repeating the steps again, alternating left to right and right to * left, until a single number remains. * Find the last number that remains starting with a list of length n. * * Example: * Input: * n = 9, * 1 2 3 4 5 6 7 8 9 * 2 4 6 8 * 2 6 * 6 * * Output: * 6 * * @author Johnny */ public class Solution390 { public int lastRemaining(int n) { boolean left = true; int remaining = n; int step = 1; int head = 1; while (remaining > 1) { if (left || remaining % 2 ==1) { head = head + step; } remaining = remaining / 2; step = step * 2; left = !left; } return head; } }
[ "jojozhuang@gmail.com" ]
jojozhuang@gmail.com
26f587776a52edd6e511111d32aa03955a17f560
0cc3358e3e8f81b854f9409d703724f0f5ea2ff7
/src/za/co/mmagon/jwebswing/plugins/jqxwidgets/themes/ClassicTheme.java
8182bd026be5267f1d13a202980d3fa9b10e8b51
[]
no_license
jsdelivrbot/JWebMP-CompleteFree
c229dd405fe44d6c29ab06eedaecb7a733cbb183
d5f020a19165418eb21507204743e596bee2c011
refs/heads/master
2020-04-10T15:12:35.635284
2018-12-10T01:03:58
2018-12-10T01:03:58
161,101,028
0
0
null
2018-12-10T01:45:25
2018-12-10T01:45:25
null
UTF-8
Java
false
false
1,305
java
/* * Copyright (C) 2017 Marc Magon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package za.co.mmagon.jwebswing.plugins.jqxwidgets.themes; import za.co.mmagon.jwebswing.base.references.CSSReference; import za.co.mmagon.jwebswing.htmlbuilder.css.themes.Theme; /** * The Dark Hive theme to JQuery UI * * @since 2012/02/04 * @version * @author MMagon * */ public class ClassicTheme extends Theme { public ClassicTheme() { super("Classic Theme", "jqxclassic"); getCssReferences().add(new CSSReference("JQXclassicTheme", 3.91, "bower_components/jqwidgets/jqwidgets/styles/jqx.classic.css", "https://jqwidgets.com/public/jqwidgets/styles/jqx.classic.css")); } }
[ "ged_marc@hotmail.com" ]
ged_marc@hotmail.com
5ccbc963a192606ac8f949c0862cabec6505c6ff
e82c1473b49df5114f0332c14781d677f88f363f
/MBS/src/main/java/nta/mss/service/IGmoTransactionService.java
cbe2b85276d26a96635cb007e4a9d6d07e0e8333
[]
no_license
zhiji6/mih
fa1d2279388976c901dc90762bc0b5c30a2325fc
2714d15853162a492db7ea8b953d5b863c3a8000
refs/heads/master
2023-08-16T18:35:19.836018
2017-12-28T09:33:19
2017-12-28T09:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
257
java
package nta.mss.service; import nta.mss.misc.common.GmoPaymentHttp; public interface IGmoTransactionService { public GmoPaymentHttp.Message cancelAuth(String version, String shopId, String shopPass, String accessId, String accessPass, String JobCd); }
[ "duc_nt@nittsusystem-vn.com" ]
duc_nt@nittsusystem-vn.com
281c63de948c702a43012aaf7f9013ad8b24af03
7856c24c7a7e17d99332ca96a5469ccbfcbf67ab
/finmartserviceapi/src/main/java/magicfinmart/datacomp/com/finmartserviceapi/finmart/controller/term/ITermInsurance.java
f1bf45361c168c5d573010072b06ae67ff9ff58f
[]
no_license
umeshrchaurasia/finmart
8978e61cec3f132029f196e5f120dc9efdb73906
68138a15cb529ed55b868a26f85486f3afb6412b
refs/heads/master
2020-04-08T19:13:45.366875
2018-11-29T13:03:57
2018-11-29T13:03:57
159,645,549
0
0
null
null
null
null
UTF-8
Java
false
false
876
java
package magicfinmart.datacomp.com.finmartserviceapi.finmart.controller.term; import magicfinmart.datacomp.com.finmartserviceapi.finmart.IResponseSubcriber; import magicfinmart.datacomp.com.finmartserviceapi.finmart.requestentity.TermFinmartRequest; /** * Created by Nilesh Birhade on 05-04-2018. */ public interface ITermInsurance { void getTermQuoteApplicationList(int insurerID, int count, String type, IResponseSubcriber iResponseSubcriber); void getTermInsurer(TermFinmartRequest termRequestEntity, IResponseSubcriber iResponseSubcriber); void deleteTermQuote(String termRequestId, IResponseSubcriber iResponseSubcriber); void convertQuoteToApp(String termRequestId, String InsurerId, String fba_id, String NetPremium, IResponseSubcriber iResponseSubcriber); void updateCRN(int termRequestID,int crn,IResponseSubcriber iResponseSubcriber); }
[ "rajeev15069@gmail.com" ]
rajeev15069@gmail.com
f3ca91f8c393ef1ddaca5b6aa03f4ddd837391ec
cd9d753ecb5bd98e5e1381bc7bd2ffbd1eacc04d
/src/main/java/leecode/noClassify/Solution252.java
069744aca8e70be83dce06d4cd06fa7a79617928
[]
no_license
never123450/aDailyTopic
ea1bcdec840274442efa1223bf6ed33c0a394d3d
9b17d34197a3ef2a9f95e8b717cbf7904c8dcfe4
refs/heads/master
2022-08-06T15:49:25.317366
2022-07-24T13:47:07
2022-07-24T13:47:07
178,113,303
0
0
null
null
null
null
UTF-8
Java
false
false
813
java
package leecode.noClassify; import java.util.Arrays; /** * @description: 会议室 (会员才能看) * 给定一个会议时间安排的数组,每个会议时间都包括开始时间和结束时间[[s1,e1],[s2,e2]......](si<ei), * 请你判断一个人是否可以参加全部会议 * @author: xwy * @create: 11:29 上午 2020/10/3 **/ public class Solution252 { public boolean canAttendMettings(int[][] intervals) { if (intervals == null || intervals.length == 0) return false; // 按照会议的开始时间,从小到大排序 Arrays.sort(intervals, (m1, m2) -> { return m1[0] - m2[0]; }); for (int i = 0; i < intervals.length; i++) { if (intervals[i][0] < intervals[i - 1][1]) return false; } return true; } }
[ "845619585@qq.com" ]
845619585@qq.com
03156de648fb9fe2b9ca97b3fba776295909ad8f
b448a263b9644bc6ecc58193d38c654e4e23b3b1
/ole-common/ole-docstore-common/src/main/java/org/kuali/ole/docstore/common/response/InvoiceFailureResponse.java
03b4081dd1a7b1f94f38f8985afa9ce5ecfef7b8
[]
no_license
premkumarbalu/ole
57c418456949f1535d5f1be1ac2e101d56184c02
0bd8e322c4119f3d280a5d9144fd5402e12ebe8d
refs/heads/develop
2020-04-05T17:35:59.808546
2017-02-17T13:41:08
2017-02-17T13:41:08
47,693,858
1
0
null
2015-12-09T13:44:59
2015-12-09T13:44:59
null
UTF-8
Java
false
false
156
java
package org.kuali.ole.docstore.common.response; /** * Created by angelind on 3/15/16. */ public class InvoiceFailureResponse extends FailureResponse { }
[ "sheiksalahudeen.m@kuali.org" ]
sheiksalahudeen.m@kuali.org
559ce95e48eb1cb858c1cb89359b4677a404fb0c
95d20c83d8aff34e314c56a3ecb2b87c9fa9fc86
/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/util/VTMatchSourceAddressToAddressTableRowMapper.java
26c601b55961f21ccc4236a09deff3c7e6496802
[ "GPL-1.0-or-later", "GPL-3.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "LGPL-2.1-only", "LicenseRef-scancode-unknown-license-reference" ]
permissive
NationalSecurityAgency/ghidra
969fe0d2ca25cb8ac72f66f0f90fc7fb2dbfa68d
7cc135eb6bfabd166cbc23f7951dae09a7e03c39
refs/heads/master
2023-08-31T21:20:23.376055
2023-08-29T23:08:54
2023-08-29T23:08:54
173,228,436
45,212
6,204
Apache-2.0
2023-09-14T18:00:39
2019-03-01T03:27:48
Java
UTF-8
Java
false
false
3,554
java
/* ### * IP: GHIDRA * * 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 ghidra.feature.vt.gui.util; import docking.widgets.table.DynamicTableColumn; import docking.widgets.table.MappedTableColumn; import ghidra.docking.settings.Settings; import ghidra.feature.vt.api.main.VTAssociation; import ghidra.feature.vt.api.main.VTMatch; import ghidra.framework.plugintool.ServiceProvider; import ghidra.program.model.address.Address; import ghidra.program.model.listing.Program; import ghidra.util.table.*; import ghidra.util.table.field.ProgramLocationTableColumn; public class VTMatchSourceAddressToAddressTableRowMapper extends ProgramLocationTableRowMapper<VTMatch, Address> { @Override public <COLUMN_TYPE> DynamicTableColumn<VTMatch, COLUMN_TYPE, Program> createMappedTableColumn( DynamicTableColumn<Address, COLUMN_TYPE, Program> sourceColumn) { if (sourceColumn instanceof ProgramLocationTableColumn<?, ?>) { ProgramLocationTableColumn<Address, COLUMN_TYPE> programColumn = (ProgramLocationTableColumn<Address, COLUMN_TYPE>) sourceColumn; return new VTMatchSourceWrappedMappedProgramLocationTableColumn<COLUMN_TYPE>(this, programColumn); } return new VTMatchSourceWrappedMappedTableColumn<COLUMN_TYPE>(this, sourceColumn); } @Override public Address map(VTMatch rowObject, Program program, ServiceProvider serviceProvider) { VTAssociation association = rowObject.getAssociation(); return association.getSourceAddress(); } private class VTMatchSourceWrappedMappedProgramLocationTableColumn<COLUMN_TYPE> extends MappedProgramLocationTableColumn<VTMatch, Address, COLUMN_TYPE> { public VTMatchSourceWrappedMappedProgramLocationTableColumn( ProgramLocationTableRowMapper<VTMatch, Address> mapper, ProgramLocationTableColumn<Address, COLUMN_TYPE> tableColumn) { super(mapper, tableColumn, "VTMatchSource." + tableColumn.getUniqueIdentifier()); } @Override public String getColumnDisplayName(Settings settings) { return "Source " + super.getColumnDisplayName(settings); } @Override public String getColumnDescription() { return super.getColumnName() + " (for a match's Source address)"; } @Override public String getColumnName() { return "Source " + super.getColumnName(); } } private class VTMatchSourceWrappedMappedTableColumn<COLUMN_TYPE> extends MappedTableColumn<VTMatch, Address, COLUMN_TYPE, Program> { public VTMatchSourceWrappedMappedTableColumn( ProgramLocationTableRowMapper<VTMatch, Address> mapper, DynamicTableColumn<Address, COLUMN_TYPE, Program> tableColumn) { super(mapper, tableColumn, "VTMatchSource." + tableColumn.getUniqueIdentifier()); } @Override public String getColumnDisplayName(Settings settings) { return "Source " + super.getColumnDisplayName(settings); } @Override public String getColumnDescription() { return super.getColumnName() + " (for a match's Source address)"; } @Override public String getColumnName() { return "Source " + super.getColumnName(); } } }
[ "46821332+nsadeveloper789@users.noreply.github.com" ]
46821332+nsadeveloper789@users.noreply.github.com
61b174e9d4df2ff1b71ddcd820a0bf516f1f5494
27ac00b3add9f332aca7ea88d31468c4ebe58ad5
/project/core/src/com/simplepathstudios/gamelib/util/GenericFactory.java
0dd815c081d5dc42e655e208395b7be8f3142ec8
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
XBigTK13X/sps-gamelib
91124cf8e04ac4a5919438a360192568c299c17c
6d0203836fd4fefa55414d6e59f500d83b31d693
refs/heads/master
2016-09-10T11:59:44.411259
2014-10-10T00:30:19
2014-10-10T00:30:19
1,630,834
1
0
null
2014-08-29T16:09:14
2011-04-18T14:25:52
Java
UTF-8
Java
false
false
622
java
package com.simplepathstudios.gamelib.util; import com.simplepathstudios.gamelib.core.Logger; import com.simplepathstudios.gamelib.states.GameSystem; public class GenericFactory { public static <E> E newInstance(Class<E> type) { try { return type.newInstance(); } catch (Exception e) { Logger.exception(e); } return null; } public static <E extends GameSystem> E newGameSystem(Class<E> type) { try { return type.newInstance(); } catch (Exception e) { Logger.exception(e); } return null; } }
[ "xbigtk13x@gmail.com" ]
xbigtk13x@gmail.com
09fad505f19032f6113aac61965b83b689a5a0f1
96670d2b28a3fb75d2f8258f31fc23d370af8a03
/reverse_engineered/sources/org/apache/http/pool/PoolEntryFuture.java
50594b76dfd96034a0bb023137f601dbd6c41f3d
[]
no_license
P79N6A/speedx
81a25b63e4f98948e7de2e4254390cab5612dcbd
800b6158c7494b03f5c477a8cf2234139889578b
refs/heads/master
2020-05-30T18:43:52.613448
2019-06-02T07:57:10
2019-06-02T08:15:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,767
java
package org.apache.http.pool; import java.io.IOException; import java.util.Date; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import org.apache.http.annotation.ThreadSafe; import org.apache.http.concurrent.FutureCallback; import org.apache.http.util.Args; @ThreadSafe abstract class PoolEntryFuture<T> implements Future<T> { private final FutureCallback<T> callback; private volatile boolean cancelled; private volatile boolean completed; private final Condition condition; private final Lock lock; private T result; protected abstract T getPoolEntry(long j, TimeUnit timeUnit) throws IOException, InterruptedException, TimeoutException; PoolEntryFuture(Lock lock, FutureCallback<T> futureCallback) { this.lock = lock; this.condition = lock.newCondition(); this.callback = futureCallback; } public boolean cancel(boolean z) { this.lock.lock(); try { if (this.completed) { return false; } this.completed = true; this.cancelled = true; if (this.callback != null) { this.callback.cancelled(); } this.condition.signalAll(); this.lock.unlock(); return true; } finally { this.lock.unlock(); } } public boolean isCancelled() { return this.cancelled; } public boolean isDone() { return this.completed; } public T get() throws InterruptedException, ExecutionException { try { return get(0, TimeUnit.MILLISECONDS); } catch (Throwable e) { throw new ExecutionException(e); } } public T get(long j, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException { Args.notNull(timeUnit, "Time unit"); this.lock.lock(); try { T t; if (this.completed) { t = this.result; this.lock.unlock(); } else { this.result = getPoolEntry(j, timeUnit); this.completed = true; if (this.callback != null) { this.callback.completed(this.result); } t = this.result; this.lock.unlock(); } return t; } catch (Throwable e) { this.completed = true; this.result = null; if (this.callback != null) { this.callback.failed(e); } throw new ExecutionException(e); } catch (Throwable th) { this.lock.unlock(); } } public boolean await(Date date) throws InterruptedException { this.lock.lock(); try { if (this.cancelled) { throw new InterruptedException("Operation interrupted"); } boolean awaitUntil; if (date != null) { awaitUntil = this.condition.awaitUntil(date); } else { this.condition.await(); awaitUntil = true; } if (!this.cancelled) { return awaitUntil; } throw new InterruptedException("Operation interrupted"); } finally { this.lock.unlock(); } } public void wakeup() { this.lock.lock(); try { this.condition.signalAll(); } finally { this.lock.unlock(); } } }
[ "Gith1974" ]
Gith1974
43ccb5ab430a4fb0e8f123ca241315a019bdb6e3
08c66abe3bf28755e32145aa49409ed2249f8c47
/Reference Bots/battlefight.v5/src/main/java/net/avdw/battlefight/state/StateModel.java
597b5bf86e9d75722154c4e8548f814d80e92fbf
[]
no_license
avanderw/jbattlefight
fb8b0e9f3b041dc40661cf8782001cff795f3429
80b603590b5e4c4b37bddd2e0619d510f6dc139f
refs/heads/master
2021-01-20T17:07:18.659616
2017-09-18T08:24:36
2017-09-18T08:24:36
90,862,739
0
0
null
null
null
null
UTF-8
Java
false
false
2,622
java
package net.avdw.battlefight.state; import java.io.Serializable; import java.util.ArrayList; public class StateModel implements Serializable { public PlayerMap PlayerMap; public OpponentMap OpponentMap; public String GameVersion; public int GameLevel; public int Round; public int MapDimension; public int Phase; static public class PlayerMap implements Serializable { public Owner Owner; public ArrayList<Cell> Cells; public int MapWidth; public int MapHeight; } static public class OpponentMap implements Serializable { public boolean Alive; public int Points; public String Name; public ArrayList<OpponentShip> Ships; public ArrayList<OpponentCell> Cells; } static public class Owner implements Serializable { public int FailedFirstRoundCommands; public String Name; public ArrayList<Ship> Ships; public int Points; public int Energy; public boolean Killed; public boolean IsWinner; public int ShotsFired; public int ShotsHit; public int ShipsRemaining; public char Key; } static public class Cell implements Serializable { public boolean Occupied; public boolean Hit; public int X; public int Y; } static public class OpponentShip implements Serializable { public boolean Destroyed; public ShipType ShipType; } static public class OpponentCell implements Serializable{ public boolean Damaged; public boolean Missed; public int X; public int Y; } static public class Ship implements Serializable{ public boolean Destroyed; public boolean Placed; public ShipType ShipType; public ArrayList<Weapon> Weapons; public ArrayList<Cell> Cells; } static public class Weapon implements Serializable { public WeaponType WeaponType; public int EnergyRequired; } static public enum WeaponType implements Serializable { SingleShot, SeekerMissle, DoubleShot, DiagonalCrossShot, CornerShot, CrossShot } static public enum ShipType implements Serializable { Battleship(4), Carrier(5), Cruiser(3), Destroyer(2), Submarine(3); private final int length; private ShipType(final int length) { this.length = length; } public int length() { return length; } } }
[ "avanderw@gmail.com" ]
avanderw@gmail.com
ec89aa5530e7de01d0ba39187d43a650e7c114ea
99e9061c52e1550c6b01eb318f2f52228196d041
/src/main/java/org/example/others/algorithm/array/MyArrayQueue.java
b855cbf80e9aa818fbf02dece81332f16bcd9bf3
[]
no_license
Derek-yzh/dataStructure
3a98e83648a29363ae8ac48383932fd2981746d2
af9c4b8c8eb8c8fab2bb0602301e31f5d574c5e9
refs/heads/master
2023-04-03T11:18:55.633461
2021-01-20T09:17:04
2021-01-20T09:17:04
291,861,254
1
0
null
2021-01-20T09:12:20
2020-09-01T01:08:11
Java
UTF-8
Java
false
false
1,847
java
package org.example.others.algorithm.array; import org.example.others.dataInterface.MyList; /** * 2020-07-02 14:41:49 * 数组模拟队列 */ public class MyArrayQueue<T> implements MyList<T> { private int maxSize;//数组最大容量 private int front;//队列头 private int rear;//队列尾 private T[] arr;//该数组用于存放数据,模拟队列 /** * 初始化 * @param maxSize */ public MyArrayQueue(int maxSize){ this.maxSize = maxSize; arr = (T[]) new Object[maxSize]; front = -1;//指向队列头部,指向队列第一个数据的前一个位置 rear = -1;//指向队列尾部,指向队列的最后一个数据 } @Override public boolean isFull() { return rear == maxSize -1; } @Override public boolean isEmpty() { return rear == front; } @Override public void add(T n) { if (isFull()){ System.out.println("队列满了,不能加入数据!"); return; } rear++; arr[rear] = n; } @Override public T get() { if (isEmpty()){ throw new RuntimeException("队列为空,无法取出元素!"); } front++; return arr[front]; } @Override public void show() { if (isEmpty()){ System.out.println("队列为空,没有数据!"); return; } for (int i = front + 1; i <= rear; i++) { System.out.print(arr[i]+" "); } System.out.println(); } @Override public T first() { if (isEmpty()){ throw new RuntimeException("队列为空,没有数据!"); } return arr[front+1]; } @Override public int size() { return rear - front; } }
[ "288153@supinfo.com" ]
288153@supinfo.com
29ba9857ac15cf4fb2950c60311d50103c83b860
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/7/938.java
e3b4e1e468463702cb8666b92dcc4dd6c43817a7
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,374
java
package <missing>; public class GlobalMembers { public static int Main() { String a = new String(new char[999]); String b = new String(new char[999]); String aa; //C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged: char * bb; char[][] c = new char[999][999]; //C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged: char * cc; String d = new String(new char[999]); b = new Scanner(System.in).nextLine(); a = new Scanner(System.in).nextLine(); d = new Scanner(System.in).nextLine(); int len = a.length(); int len2 = b.length(); int k = 0; int i; int j = 0; for (bb = b; * (bb + len - 1) != '\0';bb++,k++) { i = 0; for (cc = c[k];i < len;i++,cc++) { * cc = (bb + i); } * cc = '\0'; j++; } int sp = 0; for (i = 0;i < j;i++) { if (strcmp(a,c[i]) == 0) { sp = 1; break; } } char[][] e = new char[2][999]; int pom = i; for (i = 0;i < pom;i++) { e[0][i] = b.charAt(i); e[0][pom] = '\0'; } k = 0; for (i = pom + len;i < len2;i++,k++) { e[1][k] = b.charAt(i); } e[1][k] = '\0'; if (sp == 1) { System.out.printf("%s%s%s",e[0],d,e[1]); } if (sp == 0) { System.out.println(b); } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
fd2fb460b93cd1f4fae554ee7cb6c29adf1c2e63
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_154a620beb1a320a10b92ed226df9b33e56c465a/HoyaKeys/18_154a620beb1a320a10b92ed226df9b33e56c465a_HoyaKeys_s.java
cdfb9639f8bad2caea569c0720b197e7ad7b145d
[]
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
4,641
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.hadoop.hoya; /** * Keys and various constants for Hoya */ public interface HoyaKeys extends HoyaXmlConfKeys { String ROLE_HOYA_AM = "hoya"; /** * Hoya role is "special" */ int ROLE_HOYA_AM_PRIORITY_INDEX = 0; /** * The path under which cluster and temp data are stored * {@value} */ String HOYA_BASE_DIRECTORY = ".hoya"; /** * name of the relative path to expaned an image into: {@value}. * The title of this path is to help people understand it when * they see it in their error messages */ String LOCAL_TARBALL_INSTALL_SUBDIR = "expandedarchive"; /** * Application type for YARN {@value} */ String APP_TYPE = "hoya"; /** * JVM arg to force IPv4 {@value} */ String JVM_ENABLE_ASSERTIONS = "-ea"; /** * JVM arg enable JVM system/runtime {@value} */ String JVM_ENABLE_SYSTEM_ASSERTIONS = "-esa"; /** * JVM arg to force IPv4 {@value} */ String JVM_FORCE_IPV4 = "-Djava.net.preferIPv4Stack=true"; /** * JVM arg to go headless {@value} */ String JVM_JAVA_HEADLESS = "-Djava.awt.headless=true"; String FORMAT_D_CLUSTER_NAME = "-Dhoya.cluster.name=%s"; String FORMAT_D_CLUSTER_TYPE = "-Dhoya.app.type=%s"; /** * This is the name of the dir/subdir containing * the hbase conf that is propagated via YARN * {@value} */ String PROPAGATED_CONF_DIR_NAME = "propagatedconf"; String GENERATED_CONF_DIR_NAME = "generated"; String ORIG_CONF_DIR_NAME = "original"; String DATA_DIR_NAME = "database"; String HISTORY_DIR_NAME = "history"; String HISTORY_FILENAME_SUFFIX = "json"; String HISTORY_FILENAME_PREFIX = "rolehistory-"; /** * Filename pattern is required to save in strict temporal order. * Important: older files must sort less-than newer files when using * case-sensitive name sort. */ String HISTORY_FILENAME_CREATION_PATTERN = HISTORY_FILENAME_PREFIX +"%016x."+ HISTORY_FILENAME_SUFFIX; /** * The posix regexp used to locate this */ String HISTORY_FILENAME_MATCH_PATTERN = HISTORY_FILENAME_PREFIX +"[0-9a-f]+\\."+ HISTORY_FILENAME_SUFFIX; /** * The posix regexp used to locate this */ String HISTORY_FILENAME_GLOB_PATTERN = HISTORY_FILENAME_PREFIX +"*."+ HISTORY_FILENAME_SUFFIX; String CLUSTER_SPECIFICATION_FILE = "cluster.json"; /** * XML resource listing the standard Hoya providers * {@value} */ String HOYA_XML ="org/apache/hadoop/hoya/hoya.xml"; String CLUSTER_DIRECTORY = "cluster"; /** * JVM property to define the hoya configuration directory; * this is set by the hoya script: {@value} */ String PROPERTY_HOYA_CONF_DIR = "hoya.confdir"; /** * name of generated dir for this conf: {@value} */ String SUBMITTED_HOYA_CONF_DIR = "hoya_confdir"; /** * name of the Hoya client resource * loaded when the service is loaded. */ String HOYA_CLIENT_RESOURCE = "hoya-client.xml"; /** * The name of the resource to put on the classpath * This only goes up on a real cluster, not a test run. */ String HOYA_SERVER_RESOURCE = "hoya-server.xml"; String HOYA_TMP_LOGDIR_PREFIX = "/tmp/hoya-"; String HOYA_JAR = "hoya.jar"; String JCOMMANDER_JAR = "jcommander.jar"; String SLF4J_JAR = "slf4j.jar"; String SLF4J_LOG4J_JAR = "slf4j-log4j.jar"; String ZOOKEEPER_JAR = "zookeeper.jar"; String DEFAULT_JVM_HEAP = "256M"; int DEFAULT_YARN_MEMORY = 256; String STDOUT_HOYAAM = "hoyaam.txt"; String STDERR_HOYAAM = "hoyaam-err.txt"; String DEFAULT_GC_OPTS = ""; }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3293ecdf75cc9f0c1f7a9a5acded9443ee5ad8bc
239fb7a902b74b09762637248200d4b062cccb61
/app/src/main/java/com/xy/util/UIUtil.java
2dfed00b273616ae9af51531e1ce30d5a05720da
[]
no_license
XiuyeXYE/AndroidUtil
75975a226f9453a58c0156062fc8ebe00048e5a8
b491d632e7853b1e113aab263a9c4b8de118c1c3
refs/heads/master
2022-12-29T12:17:12.373381
2020-10-12T05:41:08
2020-10-12T05:41:08
250,170,310
0
0
null
null
null
null
UTF-8
Java
false
false
4,045
java
package com.xy.util; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.pm.PackageManager; import android.os.AsyncTask; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class UIUtil { public static boolean DEBUG = true; private static Context currentActivty; public static synchronized Context getCurrentActivty() { return currentActivty; } public static synchronized void setCurrentActivty(Context activity) { currentActivty = activity;//first step // AsyncDialogThread.clearPrevActivityRelatedDialog();//second step } public static <T> void log(Context context, T... tList) { if (!DEBUG) return; String output = ""; for (T t : tList) { output += t + " "; } int idx = 0; output = output.substring(0, (idx = output.length() - 1) > 0 ? idx : 0); alert(context, context.getClass().toString(), output); } public static void alert(Context context, String title, String msg) { if (context == null) return; AsyncDialogThread thread = new AsyncDialogThread(); thread.execute(context, title, msg); } public static void logCurrentWindow() { log(getCurrentActivty(), getCurrentActivty()); } public static <T> void log(T... s) { log(getCurrentActivty(), s); } public interface Consumer<T> { void accept(T t); } public static void checkAndRequestPermission(Activity that, String permission, int requestCode, Runnable runnable) { if (ContextCompat.checkSelfPermission(that, permission) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(that, new String[]{permission}, requestCode); } else { runnable.run(); } } public static void handleRequestPermissionResult(Activity activity, int requestCode, String[] permissions, int[] grantResults, int selfRequestCode, Runnable runnable) { if (requestCode == selfRequestCode) { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { runnable.run(); } else { UIUtil.log(activity, "拒绝权限无法使用程序!"); activity.finish(); } } } } class AsyncDialogThread extends AsyncTask<Object, Void, Object> { public static List<AlertDialog> dialogs = new ArrayList<>(); @Override protected Object doInBackground(Object... dialogInfos) { if (dialogInfos.length > 0) { return dialogInfos; } return null; } public static void clearPrevActivityRelatedDialog() { // XLog.lg("before remove all dialogs",dialogs.size(),dialogs); Iterator<AlertDialog> it = dialogs.iterator(); while (it.hasNext()) { AlertDialog ad = it.next(); ad.dismiss(); it.remove(); } // XLog.lg("after remove all dialogs",dialogs.size(),dialogs); } @Override protected void onPostExecute(Object info) { super.onPostExecute(info); if (info != null) { Object[] infos = (Object[]) info; Activity currentActivity = (Activity) infos[0]; if (!currentActivity.isFinishing()) { AlertDialog.Builder builder = new AlertDialog.Builder(currentActivity); builder.setMessage(infos[2].toString()).setTitle(infos[1].toString()); AlertDialog dialog = builder.create(); dialog.show(); dialogs.add(dialog); // XLog.lg("dialogs:",dialogs); dialog.setOnDismissListener(v -> { dialogs.remove(dialog); // XLog.lg("remove dialog by itself"); }); } } } }
[ "xiuye_engineer@outlook.com" ]
xiuye_engineer@outlook.com
8a3e7c785238f961ca5d2e3816f7a191ab7cde5c
ac65a449af5d19e85efa496d378c6d01c89e6bd0
/src/main/java/com/kognitic/trial/config/AsyncConfiguration.java
cba5cf66c695e8d1d372eac43eaf33f746b2ee41
[]
no_license
jaseemmahmmdla/kognitic-trial-application
9487235a8a9981b5efbff620b93bf3a775c6ab8e
98c2b5f8bcbebfd0adb8d1a73c5bc1cc516e7e04
refs/heads/main
2023-01-09T18:04:00.590086
2020-11-15T22:20:08
2020-11-15T22:20:08
313,134,483
0
0
null
2020-11-15T22:33:31
2020-11-15T22:19:50
Java
UTF-8
Java
false
false
2,000
java
package com.kognitic.trial.config; import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor; import java.util.concurrent.Executor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; import org.springframework.boot.autoconfigure.task.TaskExecutionProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.AsyncConfigurer; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; @Configuration @EnableAsync @EnableScheduling public class AsyncConfiguration implements AsyncConfigurer { private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); private final TaskExecutionProperties taskExecutionProperties; public AsyncConfiguration(TaskExecutionProperties taskExecutionProperties) { this.taskExecutionProperties = taskExecutionProperties; } @Override @Bean(name = "taskExecutor") public Executor getAsyncExecutor() { log.debug("Creating Async Task Executor"); ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(taskExecutionProperties.getPool().getCoreSize()); executor.setMaxPoolSize(taskExecutionProperties.getPool().getMaxSize()); executor.setQueueCapacity(taskExecutionProperties.getPool().getQueueCapacity()); executor.setThreadNamePrefix(taskExecutionProperties.getThreadNamePrefix()); return new ExceptionHandlingAsyncTaskExecutor(executor); } @Override public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { return new SimpleAsyncUncaughtExceptionHandler(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
3a755ed16d34c907a1e6ad146ad958aa3ffdc5c4
90577e7daee3183e57a14c43f0a0e26c6616c6a6
/com.cssrc.ibms.core.activity/src/main/java/com/cssrc/ibms/core/bpm/entity/OutputSet.java
157b4c9fc92c6e1e63669fda63623c0ac0769c17
[]
no_license
xeon-ye/8ddp
a0fec7e10182ab4728cafc3604b9d39cffe7687e
52c7440b471c6496f505e3ada0cf4fdeecce2815
refs/heads/master
2023-03-09T17:53:38.427613
2021-02-18T02:18:55
2021-02-18T02:18:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,042
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2013.03.13 at 11:13:53 ���� CST // package com.cssrc.ibms.core.bpm.entity; import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for tOutputSet complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="tOutputSet"> * &lt;complexContent> * &lt;extension base="{http://www.omg.org/spec/BPMN/20100524/MODEL}tBaseElement"> * &lt;sequence> * &lt;element name="dataOutputRefs" type="{http://www.w3.org/2001/XMLSchema}IDREF" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="optionalOutputRefs" type="{http://www.w3.org/2001/XMLSchema}IDREF" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="whileExecutingOutputRefs" type="{http://www.w3.org/2001/XMLSchema}IDREF" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="inputSetRefs" type="{http://www.w3.org/2001/XMLSchema}IDREF" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;anyAttribute processContents='lax' namespace='##other'/> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "tOutputSet", propOrder = { "dataOutputRefs", "optionalOutputRefs", "whileExecutingOutputRefs", "inputSetRefs" }) public class OutputSet extends BaseElement { @XmlElementRef(name = "dataOutputRefs", namespace = "http://www.omg.org/spec/BPMN/20100524/MODEL", type = JAXBElement.class) protected List<JAXBElement<Object>> dataOutputRefs; @XmlElementRef(name = "optionalOutputRefs", namespace = "http://www.omg.org/spec/BPMN/20100524/MODEL", type = JAXBElement.class) protected List<JAXBElement<Object>> optionalOutputRefs; @XmlElementRef(name = "whileExecutingOutputRefs", namespace = "http://www.omg.org/spec/BPMN/20100524/MODEL", type = JAXBElement.class) protected List<JAXBElement<Object>> whileExecutingOutputRefs; @XmlElementRef(name = "inputSetRefs", namespace = "http://www.omg.org/spec/BPMN/20100524/MODEL", type = JAXBElement.class) protected List<JAXBElement<Object>> inputSetRefs; @XmlAttribute protected String name; /** * Gets the value of the dataOutputRefs property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the dataOutputRefs property. * * <p> * For example, to add a new item, do as follows: * <pre> * getDataOutputRefs().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link Object }{@code >} * * */ public List<JAXBElement<Object>> getDataOutputRefs() { if (dataOutputRefs == null) { dataOutputRefs = new ArrayList<JAXBElement<Object>>(); } return this.dataOutputRefs; } /** * Gets the value of the optionalOutputRefs property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the optionalOutputRefs property. * * <p> * For example, to add a new item, do as follows: * <pre> * getOptionalOutputRefs().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link Object }{@code >} * * */ public List<JAXBElement<Object>> getOptionalOutputRefs() { if (optionalOutputRefs == null) { optionalOutputRefs = new ArrayList<JAXBElement<Object>>(); } return this.optionalOutputRefs; } /** * Gets the value of the whileExecutingOutputRefs property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the whileExecutingOutputRefs property. * * <p> * For example, to add a new item, do as follows: * <pre> * getWhileExecutingOutputRefs().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link Object }{@code >} * * */ public List<JAXBElement<Object>> getWhileExecutingOutputRefs() { if (whileExecutingOutputRefs == null) { whileExecutingOutputRefs = new ArrayList<JAXBElement<Object>>(); } return this.whileExecutingOutputRefs; } /** * Gets the value of the inputSetRefs property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the inputSetRefs property. * * <p> * For example, to add a new item, do as follows: * <pre> * getInputSetRefs().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link Object }{@code >} * * */ public List<JAXBElement<Object>> getInputSetRefs() { if (inputSetRefs == null) { inputSetRefs = new ArrayList<JAXBElement<Object>>(); } return this.inputSetRefs; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } }
[ "john_qzl@163.com" ]
john_qzl@163.com
18448874a8d8facf53db5cded3c1aaabd673f63b
78732fc1659a1254a16c70d9b2a2d27b98c0379e
/rSYBL-control-service-pom/rSYBL-cloud-application-dependency-graph/src/main/java/org/oasis_open/docs/tosca/ns/_2011/_12/TArtifactType.java
0a6d4c6f2e445b0ffe5cb4ecc38de81d49e158e8
[ "Apache-2.0" ]
permissive
s-mariani/rSYBL
d3f610c26f44ed4d28f8560b5ce89c8225b95b15
ba472aa03922eb60657453834bb363cf9203d81c
refs/heads/master
2020-10-01T21:45:42.447584
2016-03-24T09:37:17
2016-03-24T09:37:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,137
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2013.08.07 at 02:13:29 PM CEST // package org.oasis_open.docs.tosca.ns._2011._12; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for tArtifactType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="tArtifactType"> * &lt;complexContent> * &lt;extension base="{http://docs.oasis-open.org/tosca/ns/2011/12}tEntityType"> * &lt;anyAttribute processContents='lax' namespace='##other'/> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "tArtifactType") public class TArtifactType extends TEntityType { }
[ "e.copil@dsg.tuwien.ac.at" ]
e.copil@dsg.tuwien.ac.at
227874b6ddfdebd8fd16c099b257b12b4cf8c051
af0d1cb2999d25ecf6e5e854138bbc6f62d326c7
/src/main/java/ci/projetSociaux/service/SigDepartementViewService.java
00da3d6cbfe2f6d9ed357c0a445682246af3a388
[]
no_license
syliGaye/ProjetSocial_Dev_2019
48deee4f5d870de22a939bc313c496c26be4fee4
8ce08aa7cd53ee8de531063371f2ea71d4c5d81a
refs/heads/master
2023-04-01T00:45:21.665087
2019-05-27T12:24:50
2019-05-27T12:24:50
187,012,842
0
0
null
2023-03-27T22:16:32
2019-05-16T11:19:00
Java
UTF-8
Java
false
false
1,136
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ci.projetSociaux.service; import ci.projetSociaux.entity.SigDepartementView; import ci.projetSociaux.repository.SigDepartementViewRepository; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * * @author */ @Transactional @Service public class SigDepartementViewService { @Autowired SigDepartementViewRepository SigDepartementViewRepository; public Optional<SigDepartementView> findOne(String codesigDepartement) { return SigDepartementViewRepository.findById(codesigDepartement); } public SigDepartementView getOne(String codesigDepartement) { return SigDepartementViewRepository.getOne(codesigDepartement); } public List<SigDepartementView> findAll() { return SigDepartementViewRepository.findAll(); } }
[ "sylvestregaye@gmail.com" ]
sylvestregaye@gmail.com
89e72e5271676b86dca8c812132100d7b36ba5b3
223bab45328fb318492c6457d5c35e0f7a7aefd8
/src/test/java/examples/BatchDeleteTest.java
9919557e481e20efe60e3a96f2b0f2f2d93f177b
[ "Apache-2.0" ]
permissive
taichi/aptcombo
4f7bc8ae2035d78be72e2907ccf839c94248d956
284c25373742acae2c80dd5eb657d391be3b56ba
refs/heads/master
2020-06-07T13:13:35.919715
2015-11-11T08:44:49
2015-11-11T08:44:49
28,512,803
7
0
null
null
null
null
UTF-8
Java
false
false
755
java
package examples; import java.util.List; import javax.inject.Inject; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.seasar.doma.jdbc.tx.TransactionManager; import examples.dao.EmployeeDao; import examples.entity.Employee; /** * @author nakamura-to * @author taichi */ public class BatchDeleteTest { static final UnitTestInjector injector = UnitTestInjector.create(); @Rule public DbResource resource = injector.resource(); @Inject EmployeeDao dao; @Inject TransactionManager tm; @Before public void setUp() { injector.inject(this); } @Test public void testBatchDelete() throws Exception { tm.required(() -> { List<Employee> list = dao.selectAll(); dao.batchDelete(list); }); } }
[ "ryushi@gmail.com" ]
ryushi@gmail.com
203141a6f080b2a69792048a7904ec02e099d2a5
bb45ca5f028b841ca0a08ffef60cedc40090f2c1
/app/src/main/java/io/netty/handler/codec/CodecUtil.java
56a173eddc6caf6bb3e910b31b6ca4fa7f8f734c
[]
no_license
tik5213/myWorldBox
0d248bcc13e23de5a58efd5c10abca4596f4e442
b0bde3017211cc10584b93e81cf8d3f929bc0a45
refs/heads/master
2020-04-12T19:52:17.559775
2017-08-14T05:49:03
2017-08-14T05:49:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package io.netty.handler.codec; import io.netty.channel.ChannelHandlerAdapter; final class CodecUtil { static void ensureNotSharable(ChannelHandlerAdapter handler) { if (handler.isSharable()) { throw new IllegalStateException("@Sharable annotation is not allowed"); } } private CodecUtil() { } }
[ "18631616220@163.com" ]
18631616220@163.com
f97c531b85c3bf85c0e7695ffa7c0631295941f7
72f1b77bf6dd6387f22609a1736b7ad1e86a6664
/Blackboard/src/blackboard/EhcacheArea.java
cd6d44a77b6cf5cdee9f2af975f4626a06b81afb
[]
no_license
lolybc88/LinTra
34072a5ffa8f8461857dd1203b490c2e8941de41
ec48a495bceabc2fae9a9212c9b87a79d0a3b642
refs/heads/master
2020-04-12T03:07:23.100977
2016-09-23T18:58:59
2016-09-23T18:58:59
31,598,037
0
1
null
null
null
null
UTF-8
Java
false
false
7,985
java
package blackboard; import java.util.Collection; import java.util.LinkedList; import java.util.concurrent.Semaphore; import net.sf.ehcache.Cache; import net.sf.ehcache.CacheManager; import net.sf.ehcache.Element; import net.sf.ehcache.config.CacheConfiguration; import net.sf.ehcache.config.PersistenceConfiguration; import net.sf.ehcache.config.PersistenceConfiguration.Strategy; import net.sf.ehcache.store.MemoryStoreEvictionPolicy; import blackboard.IBlackboard.Policy; public class EhcacheArea implements IArea { /** * */ private static final long serialVersionUID = 1L; String name; Policy policy; Semaphore semaphore; Cache area; CacheManager manager; public EhcacheArea(String name, Policy p) { this.name = name; this.policy = p; semaphore = new Semaphore(1, true); //Create a singleton CacheManager using defaults manager = CacheManager.create(); // Create a Cache specifying its configuration. area = new Cache( new CacheConfiguration(name, Integer.MAX_VALUE) // .memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy.LFU) // .eternal(false) // .timeToLiveSeconds(60) // .timeToIdleSeconds(30) // .diskExpiryThreadIntervalSeconds(0) // .persistence( // new PersistenceConfiguration() // .strategy(Strategy.LOCALTEMPSWAP)) ); manager.addCache(area); } public String getName() { return name; } public void setName(String name) { this.name = name; } public Policy getPolicy() { return policy; } public void setPolicy(Policy policy) { this.policy = policy; } public Semaphore getSemaphore() { return semaphore; } public void setSemaphore(Semaphore semaphore) { this.semaphore = semaphore; } public Cache getArea() { return area; } public void setArea(Cache area) { this.area = area; } @Override public IdentifiableElement read(String id) throws BlackboardException { try{ IdentifiableElement e; if (policy.equals(Policy.ALWAYS_LOCK) || policy.equals(Policy.LOCK_TO_READ)){ semaphore.acquire(); Element element = area.get(id); if (element!=null){ e = (IdentifiableElement) element.getObjectValue(); } else { e = null; } semaphore.release(); } else{ Element element = area.get(id); if (element!=null){ e = (IdentifiableElement) element.getObjectValue(); } else { e = null; } } return e; } catch (InterruptedException e){ throw new BlackboardException(); } } @Override public Collection<IdentifiableElement> readAll(Collection<String> ids) throws BlackboardException { try{ Collection<IdentifiableElement> identElems; if (policy.equals(Policy.ALWAYS_LOCK) || policy.equals(Policy.LOCK_TO_READ)){ semaphore.acquire(); identElems = toIdentifiableElementCollection(area.getAll(ids).values()); semaphore.release(); } else{ identElems = toIdentifiableElementCollection(area.getAll(ids).values()); } return identElems; } catch (InterruptedException e){ throw new BlackboardException(); } } private Collection<IdentifiableElement> toIdentifiableElementCollection( Collection<Element> elements) { Collection<IdentifiableElement> identElems = new LinkedList<IdentifiableElement>(); for (Element e : elements){ identElems.add((IdentifiableElement) e.getObjectValue()); } return identElems; } @Override public Collection<IdentifiableElement> read(ISearch searchMethod) throws BlackboardException { try { Collection<IdentifiableElement> elems; if (policy.equals(Policy.ALWAYS_LOCK) || policy.equals(Policy.LOCK_TO_READ)){ semaphore.acquire(); elems = searchMethod.search(this); semaphore.release(); } else { elems = searchMethod.search(this); } return elems; } catch (InterruptedException e) { throw new BlackboardException(); } } @Override public Collection<IdentifiableElement> read(int n) throws BlackboardException { return null; } @Override public IdentifiableElement take(String id) throws BlackboardException { try { IdentifiableElement e; if (policy.equals(Policy.ALWAYS_LOCK) || policy.equals(Policy.LOCK_TO_READ)){ semaphore.acquire(); Element elem = area.removeAndReturnElement(id); if (elem!=null){ e = (IdentifiableElement) elem.getObjectValue(); } else { e = null; } semaphore.release(); } else { Element elem = area.removeAndReturnElement(id); if (elem!=null){ e = (IdentifiableElement) elem.getObjectValue(); } else { e = null; } } return e; } catch (InterruptedException e){ throw new BlackboardException(); } } @Override public Collection<IdentifiableElement> takeAll(Collection<String> ids) throws BlackboardException { try { Collection<IdentifiableElement> elems; if (policy.equals(Policy.ALWAYS_LOCK) || policy.equals(Policy.LOCK_TO_READ)){ semaphore.acquire(); elems = takeAllAux(ids); semaphore.release(); } else { elems = takeAllAux(ids); } return elems; } catch (InterruptedException e){ throw new BlackboardException(); } } private Collection<IdentifiableElement> takeAllAux(Collection<String> ids) { Collection<IdentifiableElement> out = new LinkedList<IdentifiableElement>(); for(String id : ids){ Element elem = area.removeAndReturnElement(id); IdentifiableElement e = (IdentifiableElement) elem.getObjectValue(); if (e != null){ out.add(e); } } return out; } @Override public Collection<IdentifiableElement> take(ISearch searchMethod) throws BlackboardException { try { Collection<IdentifiableElement> elems; if (policy.equals(Policy.ALWAYS_LOCK) || policy.equals(Policy.LOCK_TO_READ)){ semaphore.acquire(); elems = searchMethod.search(this); removeElements(elems); semaphore.release(); } else { elems = searchMethod.search(this); removeElements(elems); } return elems; } catch (InterruptedException e){ throw new BlackboardException(); } } @Override public Collection<IdentifiableElement> take(int n) throws BlackboardException { return null; } private void removeElements(Collection<IdentifiableElement> elems) { for (IdentifiableElement e : elems){ area.removeAndReturnElement(e.getId()); } } @Override public boolean write(IdentifiableElement elem) throws BlackboardException { try { if (policy.equals(Policy.ALWAYS_LOCK) || policy.equals(Policy.LOCK_TO_WRITE)){ semaphore.acquire(); Element element = new Element(elem.getId(), elem); area.put(element); semaphore.release(); } else { Element element = new Element(elem.getId(), elem); area.put(element); } return true; } catch (InterruptedException e){ throw new BlackboardException(); } } @Override public boolean writeAll(Collection<IdentifiableElement> elems) throws BlackboardException { try { if (policy.equals(Policy.ALWAYS_LOCK) || policy.equals(Policy.LOCK_TO_WRITE)){ semaphore.acquire(); writeAllAux(elems); semaphore.release(); } else { writeAllAux(elems); } return true; } catch (InterruptedException e){ throw new BlackboardException(); } } private void writeAllAux(Collection<IdentifiableElement> elems) { for (IdentifiableElement e : elems){ Element element = new Element(e.getId(), e); area.put(element); } } @Override public int size() { return area.getSize(); } @Override public boolean clear() { manager.clearAllStartingWith(name); // manager.removeCache(name); // manager.shutdown(); return true; } @Override public void destroy() { area.dispose(); } @SuppressWarnings("unchecked") @Override public void print() { System.out.println("*Area: "+name+"*"); for (String id : (Collection<String>)area.getKeys()){ System.out.println(area.get(id)); } } @Override public boolean equals(Object o){ return o instanceof EhcacheArea && ((EhcacheArea) o).getName().equals(name); } }
[ "loli@lcc.uma.es" ]
loli@lcc.uma.es
b3837d918a1d7413c0f0aa581224da758ff40d50
2ac74657de3cb81bab734d18094e945a442a167d
/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/email/SMTPServerConfigurationTest.java
3b62b485e4e02c184c08afdfab6c3e20b08bd6c5
[ "MIT", "ANTLR-PD", "LicenseRef-scancode-generic-exception", "BSD-3-Clause", "LGPL-2.0-or-later", "LGPL-2.1-only", "GPL-1.0-or-later", "LicenseRef-scancode-oracle-openjdk-exception-2.0", "MPL-1.1", "MPL-2.0", "CC-PDDC", "LicenseRef-scancode-warranty-disclaimer", "EPL-2.0", "GPL-2.0-only", "EPL-1.0", "CC0-1.0", "Classpath-exception-2.0", "Apache-2.0", "LGPL-2.1-or-later", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-public-domain", "GPL-2.0-or-later", "LicenseRef-scancode-unknown-license-reference", "BSD-2-Clause", "Apache-1.1", "MPL-1.0", "CDDL-1.1", "LicenseRef-scancode-proprietary-license" ]
permissive
de-jcup/sechub
64055bb7ccd5496e32207c140e5812997e97583b
488d2d23b9ae74043e8747467623d291c7371b38
refs/heads/develop
2023-07-22T18:01:47.280074
2023-07-18T15:50:27
2023-07-18T15:50:27
199,480,695
0
1
MIT
2023-03-20T03:00:02
2019-07-29T15:37:19
Java
UTF-8
Java
false
false
3,435
java
// SPDX-License-Identifier: MIT package com.mercedesbenz.sechub.domain.notification.email; import static org.junit.Assert.*; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; import java.util.Properties; import org.junit.Before; import org.junit.Test; import org.springframework.mail.javamail.JavaMailSenderImpl; public class SMTPServerConfigurationTest { private SMTPServerConfiguration configToTest; private JavaMailSenderImpl mockedMailSender; private Properties properties; @Before public void before() { properties = new Properties(); mockedMailSender = mock(JavaMailSenderImpl.class); when(mockedMailSender.getJavaMailProperties()).thenReturn(properties); configToTest = new SMTPServerConfiguration() { @Override protected JavaMailSenderImpl createMailSender() { return mockedMailSender; } }; } @Test public void defaults() { /* prepare */ configToTest.hostname = "host1"; /* execute */ configToTest.getJavaMailSender(); /* test */ verify(mockedMailSender, never()).setPassword(any()); verify(mockedMailSender, never()).setUsername(any()); verify(mockedMailSender).setHost("host1"); verify(mockedMailSender).setPort(SMTPServerConfiguration.DEFAULT_SMTP_SERVER_PORT); assertEquals(2, properties.size()); assertEquals("smtp", properties.getProperty("mail.transport.protocol")); assertEquals("false", properties.getProperty("mail.smtp.auth")); } @Test public void all_configured_all_set_to_mailsender() { /* prepare */ configToTest.hostname = "host1"; configToTest.hostPort = 1234; configToTest.username = "usr1"; configToTest.password = "pwd1"; configToTest.smtpConfigString = "mail.smtp.auth=true,mail.smtp.timeout=4321,mail.transport.protocol=smtp"; /* execute */ configToTest.getJavaMailSender(); /* test */ verify(mockedMailSender).setPassword("pwd1"); verify(mockedMailSender).setUsername("usr1"); verify(mockedMailSender).setPort(1234); verify(mockedMailSender).setHost("host1"); assertEquals(3, properties.size()); assertEquals("smtp", properties.getProperty("mail.transport.protocol")); assertEquals("true", properties.getProperty("mail.smtp.auth")); assertEquals("4321", properties.getProperty("mail.smtp.timeout")); } @Test public void all_configured_except_credentails_all_set_to_mailsender_but_credentials_not_set() { /* prepare */ configToTest.hostname = "host1"; configToTest.hostPort = 1234; configToTest.username = ""; configToTest.password = ""; configToTest.smtpConfigString = "mail.smtp.auth=false,mail.smtp.timeout=4321"; /* execute */ configToTest.getJavaMailSender(); /* test */ verify(mockedMailSender, never()).setPassword(any()); verify(mockedMailSender, never()).setUsername(any()); verify(mockedMailSender).setPort(1234); verify(mockedMailSender).setHost("host1"); assertEquals(2, properties.size()); assertEquals("false", properties.getProperty("mail.smtp.auth")); assertEquals("4321", properties.getProperty("mail.smtp.timeout")); } }
[ "albert.tregnaghi@daimler.com" ]
albert.tregnaghi@daimler.com
6ce2482aebf2d73d68f5a47e81ef36fce69c14d7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/28/28_d10eaa80b57b5a0694fa9198fe475f4a08a21565/BlockListener/28_d10eaa80b57b5a0694fa9198fe475f4a08a21565_BlockListener_t.java
75f2f730027517f5b3bee05633d48e0c6deaf510
[]
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
7,133
java
package net.h31ix.anticheat.event; import net.h31ix.anticheat.Anticheat; import net.h31ix.anticheat.PlayerTracker; import net.h31ix.anticheat.checks.*; import net.h31ix.anticheat.manage.*; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockPlaceEvent; public class BlockListener implements Listener { Anticheat plugin; AnimationManager am; PlayerTracker tracker; EyeCheck e = new EyeCheck(); BlockManager blm; public BlockListener(Anticheat plugin) { this.plugin = plugin; this.am = plugin.am; this.tracker = plugin.tracker; this.blm = plugin.blm; } @EventHandler public void onBlockBreak(BlockBreakEvent event) { Player player = event.getPlayer(); Block block = event.getBlock(); if(player != null) { if(plugin.check(player)) { //Check if an animation was done before this if(!am.swungArm(player)) { if(!player.hasPermission("anticheat.noswing")) { tracker.increaseLevel(player,2); plugin.log(player.getName()+" didn't swing their arm on a block break!"); event.setCancelled(true); } } else { if(!player.hasPermission("anticheat.longreach")) { //If so, check the distance from the block. Is it too far away? LengthCheck c = new LengthCheck(block.getLocation(),event.getPlayer().getLocation()); if(c.getXDifference() > 6.0D || c.getZDifference() > 6.0D || c.getYDifference() > 6.0D) { plugin.log(player.getName()+" tried to break a block too far away!"); tracker.increaseLevel(player,2); event.setCancelled(true); } else { tracker.decreaseLevel(player); } } if (!player.hasPermission("anticheat.fastbreak") && !player.getInventory().getItemInHand().containsEnchantment(Enchantment.DIG_SPEED)) { if(block.getType() != Material.RED_MUSHROOM && block.getType() != Material.RED_ROSE && block.getType() != Material.BROWN_MUSHROOM && block.getType() != Material.YELLOW_FLOWER && block.getType() != Material.REDSTONE && block.getType() != Material.REDSTONE_TORCH_OFF && block.getType() != Material.REDSTONE_TORCH_ON && block.getType() != Material.REDSTONE_WIRE && block.getType() != Material.GRASS && block.getType() != Material.PAINTING && block.getType() != Material.WHEAT && block.getType() != Material.SUGAR_CANE && block.getType() != Material.SUGAR_CANE_BLOCK && block.getType() != Material.DIODE && block.getType() != Material.DIODE_BLOCK_OFF && block.getType() != Material.DIODE_BLOCK_ON && block.getType() != Material.SAPLING && block.getType() != Material.TORCH && block.getType() != Material.SNOW) { if (!blm.justBroke(player)) { blm.logBreak(player); } else { plugin.log(player.getName() + " tried to break a block too fast!"); tracker.increaseLevel(player, 2); event.setCancelled(true); } } } } } am.reset(player); } } @EventHandler public void onBlockPlace(BlockPlaceEvent event) { Player player = event.getPlayer(); Block block = event.getBlock(); if(player != null) { if(plugin.check(player)) { if(block.getType() != Material.LADDER) { //Check if the player can see the block they are placing //This is mostly used for preventing build/autobuild hacks (Logic not yet finished) if(!e.canSee(player, block) && !player.getWorld().getBlockAt(player.getLocation()).isLiquid()) { plugin.log(player.getName()+" tried to place a block that they couldn't see!"); event.setCancelled(true); } } if(!player.hasPermission("anticheat.longreach")) { //Is the player too far away? LengthCheck c = new LengthCheck(block.getLocation(),event.getPlayer().getLocation()); if(c.getXDifference() > 6.0D || c.getZDifference() > 6.0D || c.getYDifference() > 6.0D) { tracker.increaseLevel(player,2); plugin.log(player.getName()+" tried to place a block too far away!"); event.setCancelled(true); } else { tracker.decreaseLevel(player); } } if (!player.hasPermission("anticheat.fastplace")) { if (!blm.justPlaced(player)) { blm.logPlace(player); } else { plugin.log(player.getName() + " tried to place a block too fast!"); tracker.increaseLevel(player, 2); event.setCancelled(true); } } } am.reset(player); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c2ccb15d8be1fcac5a8835144f9af37643a87982
8d9c809a138f29aa3806ecca2f1a90d0e57fff86
/Principle_InterfaceIsolation/src/edu/hebeu/original/Demo.java
f726973eb0769571801f99736688ea3edc8d44d3
[]
no_license
Tyong1365137828/stu-java
e9fe76586749e06e41f55edab0001d2c245fccfd
39b452da284e0a80520359bf2dcf655c2c3d72fb
refs/heads/main
2023-04-06T11:25:18.794632
2021-04-25T07:05:14
2021-04-25T07:05:14
353,631,034
0
0
null
null
null
null
GB18030
Java
false
false
2,079
java
package edu.hebeu.original; public class Demo { public static void main(String[] args) { A a = new A(); a.depend1(new B()); a.depend2(new B()); a.depend3(new B()); C c = new C(); c.depend1(new D()); c.depend4(new D()); c.depend5(new D()); } } interface Interface1 { void operation1(); void operation2(); void operation3(); void operation4(); void operation5(); } class B implements Interface1 { @Override public void operation1() { System.out.println("类B 实现了operation1()方法"); } @Override public void operation2() { System.out.println("类B 实现了operation2()方法"); } @Override public void operation3() { System.out.println("类B 实现了operation3()方法"); } @Override public void operation4() { System.out.println("类B 实现了operation4()方法"); } @Override public void operation5() { System.out.println("类B 实现了operation5()方法"); } } class D implements Interface1 { @Override public void operation1() { System.out.println("类D 实现了operation1()方法"); } @Override public void operation2() { System.out.println("类D 实现了operation2()方法"); } @Override public void operation3() { System.out.println("类D 实现了operation3()方法"); } @Override public void operation4() { System.out.println("类D 实现了operation4()方法"); } @Override public void operation5() { System.out.println("类D 实现了operation5()方法"); } } // 类A使用接口Interface1的1、2、3方法依赖类B class A { public void depend1(Interface1 interface1) { interface1.operation1(); } public void depend2(Interface1 interface1) { interface1.operation2(); } public void depend3(Interface1 interface1) { interface1.operation3(); } } //类C使用接口Interface1的1、4、5方法依赖类D class C { public void depend1(Interface1 interface1) { interface1.operation1(); } public void depend4(Interface1 interface1) { interface1.operation4(); } public void depend5(Interface1 interface1) { interface1.operation5(); } }
[ "1365137828@qq.com" ]
1365137828@qq.com
353d3fe6ecf6f347c89006bb28d928425700b368
54fdebae828950b2253a7cdc58c7f8fc0cd10951
/Java-Cloud/ObjectClass/src/com/capgemini/collection/assignment/TestCar.java
4c1eec744c65e0f913f86bf0482e104e233d80f5
[]
no_license
KhushbuGithub/repo
97361c0ed985722c203e2e1afce7c1d5ceab5ef3
a9d1fc88b6a48d0983b62956c4e3ea0dd38c60f9
refs/heads/master
2023-01-08T15:38:53.666173
2020-06-26T17:35:37
2020-06-26T17:35:37
243,434,622
2
0
null
2023-01-07T19:31:40
2020-02-27T04:58:46
Java
UTF-8
Java
false
false
677
java
package com.capgemini.collection.assignment; import java.util.Iterator; import java.util.LinkedHashSet; public class TestCar { public static void main(String[] args) { LinkedHashSet<Car> l1= new LinkedHashSet<Car>(); l1.add(new Car("BMW", 5)); l1.add(new Car("Aulto", 1)); l1.add(new Car("Mercedez", 4)); l1.add(new Car("Duster", 3)); l1.add(new Car("Swift", 2)); System.out.println(l1); System.out.println("------------------------------"); for (Car c : l1) { System.out.println(c); } System.out.println("----------------------------------"); Iterator<Car> itr=l1.iterator(); while(itr.hasNext()) { System.out.println(itr.next()); } } }
[ "khushbukumari3031@gmail.com" ]
khushbukumari3031@gmail.com
158aa2bc520d61c25c46849b7f99e76f2590aca8
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/ui/tools/NewTaskUI.java
bc1442dfc1b4ce5a6bb3f793f77f60bd38832383
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,919
java
package com.tencent.mm.ui.tools; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.DialogInterface.OnDismissListener; import android.content.Intent; import android.os.Bundle; import com.tencent.mm.R; import com.tencent.mm.ab.e; import com.tencent.mm.ab.l; import com.tencent.mm.compatible.util.g; import com.tencent.mm.g.a.iz; import com.tencent.mm.model.au; import com.tencent.mm.modelsimple.q; import com.tencent.mm.plugin.account.ui.DisasterUI; import com.tencent.mm.sdk.b.a; import com.tencent.mm.sdk.b.b; import com.tencent.mm.sdk.b.c; import com.tencent.mm.sdk.platformtools.ad; import com.tencent.mm.sdk.platformtools.x; import com.tencent.mm.ui.LauncherUI; import com.tencent.mm.ui.MMBaseActivity; import com.tencent.mm.ui.applet.SecurityImage; import com.tencent.mm.ui.applet.SecurityImage$a; import com.tencent.mm.ui.base.h; import com.tencent.mm.ui.w; public class NewTaskUI extends MMBaseActivity implements e { static NewTaskUI uBe; private ProgressDialog eHw = null; private SecurityImage eIX = null; private c eQf = new c<iz>() { { this.sFo = iz.class.getName().hashCode(); } public final /* synthetic */ boolean a(b bVar) { iz izVar = (iz) bVar; if (izVar == null || izVar.bSF == null) { return false; } x.i("MicroMsg.NewTaskUI", "summerdiz loginDisasterListener callback content[%s], url[%s]", new Object[]{izVar.bSF.content, izVar.bSF.url}); Intent intent = new Intent(); intent.putExtra("key_disaster_content", izVar.bSF.content); intent.putExtra("key_disaster_url", izVar.bSF.url); intent.setClass(ad.getContext(), DisasterUI.class).addFlags(268435456); ad.getContext().startActivity(intent); return true; } }; private h uBf = new h(); public void onCreate(Bundle bundle) { super.onCreate(bundle); x.i("MicroMsg.NewTaskUI", "onCreate :%d", new Object[]{Integer.valueOf(hashCode())}); setContentView(R.i.background_transparent); au.DF().a(701, this); uBe = this; q qVar = new q(0, "", "", ""); au.DF().a(qVar, 0); getString(R.l.app_tip); this.eHw = h.a(this, getString(R.l.login_logining), true, new 2(this, qVar)); } public void onResume() { a.sFg.b(this.eQf); super.onResume(); } public void onPause() { super.onPause(); a.sFg.c(this.eQf); } public void onDestroy() { x.i("MicroMsg.NewTaskUI", "onDestroy :%d", new Object[]{Integer.valueOf(hashCode())}); if (equals(uBe)) { uBe = null; } if (this.eHw != null && this.eHw.isShowing()) { this.eHw.dismiss(); } if (this.eIX != null) { this.eIX.dismiss(); } au.DF().b(701, this); super.onDestroy(); } public static NewTaskUI czP() { return uBe; } public final void a(int i, int i2, String str, l lVar) { x.i("MicroMsg.NewTaskUI", "onSceneEnd :%d [%d,%d,%s]", new Object[]{Integer.valueOf(hashCode()), Integer.valueOf(i), Integer.valueOf(i2), str}); if (this.eHw != null && this.eHw.isShowing()) { this.eHw.dismiss(); } if (i == 4 && i2 == -3) { x.i("MicroMsg.NewTaskUI", "summerauth MM_ERR_PASSWORD need kick out acc ready[%b]", new Object[]{Boolean.valueOf(au.HX())}); if (w.a(uBe, i, i2, new Intent().setClass(uBe, LauncherUI.class).putExtra("Intro_Switch", true).putExtra("animation_pop_in", true).addFlags(67108864), str)) { return; } } if (i == 4 && (i2 == -6 || i2 == -311 || i2 == -310)) { if (lVar instanceof q) { q qVar = (q) lVar; this.uBf.eRQ = qVar.getSecCodeType(); this.uBf.eIZ = qVar.Rf(); this.uBf.eJa = qVar.Re(); this.uBf.eJb = qVar.Rg(); x.i("MicroMsg.NewTaskUI", "onSceneEnd dkwt imgSid:" + this.uBf.eJa + " img len" + this.uBf.eIZ.length + " " + g.Ac()); } if (this.eIX == null) { this.eIX = SecurityImage$a.a(this, R.l.regbyqq_secimg_title, this.uBf.eRQ, this.uBf.eIZ, this.uBf.eJa, this.uBf.eJb, new 3(this), new 4(this), new OnDismissListener() { public final void onDismiss(DialogInterface dialogInterface) { NewTaskUI.this.eIX = null; } }, this.uBf); return; } x.d("MicroMsg.NewTaskUI", "imgSid:" + this.uBf.eJa + " img len" + this.uBf.eIZ.length + " " + g.Ac()); this.eIX.a(this.uBf.eRQ, this.uBf.eIZ, this.uBf.eJa, this.uBf.eJb); return; } uBe = null; finish(); } }
[ "707194831@qq.com" ]
707194831@qq.com
2b9372bf8a6f94ff814be8b33b421114e19723aa
c9e1a187d3dc446722739560fb8aa1b39cd00ff8
/src/main/java/usecases/api/teleportplayerstolobby/TeleportPlayersToLobbyViewImpl.java
dc4cea7c0ea4cbb0a10d6bd0549c91ec22771aca
[]
no_license
SimonAtelier/VillagerHockey
b047103958a296cbc8e5e608b9d082448937f7b5
02b9168946a2445a18b7ed72031eb58ec137b5e2
refs/heads/master
2021-07-12T08:29:47.734324
2021-05-15T20:12:44
2021-05-15T20:12:44
121,252,224
0
2
null
2021-05-15T20:12:45
2018-02-12T13:50:55
Java
UTF-8
Java
false
false
657
java
package usecases.api.teleportplayerstolobby; import java.util.List; import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import entities.Location; import util.LocationConvert; public class TeleportPlayersToLobbyViewImpl implements TeleportPlayersToLobbyView { @Override public void displayLocation(List<UUID> viewers, Location location) { for (UUID viewer : viewers) { displayLocation(viewer, location); } } private void displayLocation(UUID viewer, Location location) { Player player = Bukkit.getPlayer(viewer); player.teleport(LocationConvert.toBukkitLocation(location)); } }
[ "simon_atelier@web.de" ]
simon_atelier@web.de
47306d8e1d3353d4b07b56eede5f2854dcbee734
faf642637ad39f7ead4e7a3d6b38f8757db97546
/private/environments-2.0/Helicopter/src/HPMDP39/HPMDP39.java
608758b9af2702c3c622513c54e83fe1f7ba8ae2
[]
no_license
taodav/rl-competition
d4557568536ca49be8c45e4c7ab4fae7a2006e04
57be3e9401b9a909ce53eb653917572e1576c215
refs/heads/master
2023-03-01T07:51:15.757975
2021-02-07T17:12:12
2021-02-07T17:12:12
336,842,467
0
0
null
null
null
null
UTF-8
Java
false
false
307
java
/* * This code was auto-generated by the parameter script. Do not change these values manually. */ package HPMDP39; import GeneralizedHelicopter.*; public class HPMDP39 extends AbstractProvingMDPHelicopter{ public HPMDP39(){ super(); setWind0(0.457820d); setWind1(0.479161d); } }
[ "ruoyutao@gmail.com" ]
ruoyutao@gmail.com
006a5253301c9cfc4d83ee0ce28d02746551b229
89dc1b23d21aa1952c0dfb415be5fed144cbbd84
/FrameWork_Util/src/framework/ressource/util/UtilClone.java
c25a83eaa93922acc45e19ae113b2b44d51ee8e5
[]
no_license
M6C/framework-util
c1bdf33f08e2ae0a3964424d7ff8737e34434253
e91c725f67a81ccae84a8410f2795abb990a1c99
refs/heads/master
2021-01-10T17:00:31.444538
2017-02-07T13:33:51
2017-02-07T13:33:51
52,559,096
0
0
null
null
null
null
UTF-8
Java
false
false
972
java
package framework.ressource.util; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; /** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: </p> * @author non attribuable * @version 1.0 */ public class UtilClone { private UtilClone() { } public static Object makeClone(Serializable pSource) throws IOException, ClassNotFoundException { Object lvClone = null; ByteArrayOutputStream lvBAOS = new ByteArrayOutputStream(); ObjectOutputStream lvOOS = new ObjectOutputStream(lvBAOS); lvOOS.writeObject(pSource); lvOOS.close(); ByteArrayInputStream lvBAIS = new ByteArrayInputStream(lvBAOS.toByteArray()); ObjectInputStream lvOIS = new ObjectInputStream(lvBAIS); lvClone = lvOIS.readObject(); lvOIS.close(); return lvClone; } }
[ "david.roca@free.fr" ]
david.roca@free.fr
d189d3c0f5c4f61f3f9232c3f4c35a9253944ad2
e5bb4c1c5cb3a385a1a391ca43c9094e746bb171
/Service/trunk/service/service-market/src/main/java/com/hzfh/service/market/mapper/DrawSettingMapper.java
a0bedf2b8fb7f85fc6fc975704b53b6f782a59bc
[]
no_license
FashtimeDotCom/huazhen
397143967ebed9d50073bfa4909c52336a883486
6484bc9948a29f0611855f84e81b0a0b080e2e02
refs/heads/master
2021-01-22T14:25:04.159326
2016-01-11T09:52:40
2016-01-11T09:52:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,099
java
package com.hzfh.service.market.mapper; import java.util.List; import com.hzfh.api.market.model.DrawSetting; import com.hzfh.api.market.model.query.DrawSettingCondition; import com.hzframework.data.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Service; /******************************************************************************* * * Copyright 2015 HZFH. All rights reserved. * Author: GuoZhenYu * Create Date: 2015/12/4 * Description: * * Revision History: * Date Author Description * ******************************************************************************/ @Service("drawSettingMapper") public interface DrawSettingMapper extends BaseMapper<DrawSetting, DrawSettingCondition> { public List<DrawSetting> getInfoListByStatus(@Param("status") int status); public DrawSetting getMinDrawSeting(int status); //public DrawSetting getNextDrawSettingByCurrentNo(@Param("currentNo")int currentNo, @Param("status")int status); public List<DrawSetting> getEndDrawSeting(int status); }
[ "ulei0343@163.com" ]
ulei0343@163.com
53549a5ebe56e6eb389d01ac49a1717a23c13e07
1d43951ef54448af86db543c31620623bfcbc3bd
/integrationwithjencore/hmc/src/com/mss/core/hmc/PickupConfirmationHMCAction.java
5ec81b7e0d3dba62680c22508b9619047f1f4af2
[]
no_license
kbudumajji/custommodulecode
28e583855ec60e03c9e5e684b8c27547b790eab2
f8ef4720bdf91f60a533f72fd550e5da6cc343e3
refs/heads/master
2020-12-25T04:54:49.821111
2016-06-08T13:49:03
2016-06-08T13:49:03
60,699,789
0
0
null
null
null
null
UTF-8
Java
false
false
1,996
java
/* * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package com.mss.core.hmc; import de.hybris.platform.basecommerce.enums.ConsignmentStatus; import de.hybris.platform.core.Registry; import de.hybris.platform.hmc.util.action.ActionEvent; import de.hybris.platform.hmc.util.action.ActionResult; import de.hybris.platform.hmc.util.action.ItemAction; import de.hybris.platform.jalo.Item; import de.hybris.platform.jalo.JaloBusinessException; import de.hybris.platform.jalo.enumeration.EnumerationManager; import de.hybris.platform.ordersplitting.jalo.Consignment; import de.hybris.platform.ordersplitting.jalo.ConsignmentProcess; import de.hybris.platform.processengine.BusinessProcessService; /** * */ public class PickupConfirmationHMCAction extends ItemAction { private static final long serialVersionUID = -5500487889164110964L; @Override public ActionResult perform(final ActionEvent event) throws JaloBusinessException { final Item item = getItem(event); if (item instanceof Consignment) { ((Consignment) item).setStatus(EnumerationManager.getInstance().getEnumerationValue(ConsignmentStatus._TYPECODE, ConsignmentStatus.PICKUP_COMPLETE.getCode())); for (final ConsignmentProcess process : ((Consignment) item).getConsignmentProcesses()) { getBusinessProcessService().triggerEvent(process.getCode() + "_ConsignmentPickup"); } return new ActionResult(ActionResult.OK, true, false); } return new ActionResult(ActionResult.FAILED, false, false); } protected BusinessProcessService getBusinessProcessService() { return Registry.getApplicationContext().getBean("businessProcessService", BusinessProcessService.class); } }
[ "Kalpana" ]
Kalpana
1d74841ac2e9a83943af827574192230c3f08587
d59ecc8ff1193c4e5f77f8b57eb85ff97daaba14
/src/main/java/com/hzth/myapp/jfreechart/NumberUtil.java
1938c4833023ffd6a60415694859255233555ce3
[]
no_license
tianyl1984/myWebApp
0d7a6dfc6ca73a339b16262e4988fbada1e93965
21edbf1f8d2a653824ddbae1540c6ed9c398dfe5
refs/heads/master
2020-04-06T09:36:06.798747
2016-09-06T07:29:44
2016-09-06T07:29:44
49,413,254
0
0
null
null
null
null
UTF-8
Java
false
false
440
java
package com.hzth.myapp.jfreechart; import java.util.Random; public class NumberUtil { public static double getRandomNum() { return getRandomNum(100d); } public static double getRandomNum(double d) { Random random = new Random(); return random.nextDouble() * d; } public static void main(String[] args) { System.out.println(getRandomNum()); System.out.println(getRandomNum()); System.out.println(getRandomNum()); } }
[ "tianyl1984@qq.com" ]
tianyl1984@qq.com
e2cfe17c07b3b5aafc6392939ec157a35142651b
e132b84b1579d4cf5a97535877c0e32639366f32
/kie-dmn/kie-dmn-backend/src/main/java/org/kie/dmn/backend/marshalling/v1_1/xstream/DMNElementConverter.java
0674466083b78aa7a3ee9b8d58b63fd9d1c5c9e2
[ "Apache-2.0" ]
permissive
karreiro/drools
142df0c92b2ae899cb4a1aa9181d09d50f95686e
fdb7c4d2486224312483d00aa0e3df3f345d5840
refs/heads/master
2021-06-12T07:04:05.099778
2017-04-10T15:19:10
2017-04-10T15:19:10
64,861,705
1
0
Apache-2.0
2021-03-04T09:17:28
2016-08-03T16:32:11
Java
UTF-8
Java
false
false
2,773
java
/* * Copyright 2016 Red Hat, Inc. and/or its affiliates. * * 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.kie.dmn.backend.marshalling.v1_1.xstream; import org.kie.dmn.model.v1_1.DMNElement; import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.converters.MarshallingContext; import com.thoughtworks.xstream.io.HierarchicalStreamReader; import com.thoughtworks.xstream.io.HierarchicalStreamWriter; public abstract class DMNElementConverter extends DMNModelInstrumentedBaseConverter { public static final String ID = "id"; public static final String LABEL = "label"; public static final String DESCRIPTION = "description"; public DMNElementConverter(XStream xstream) { super( xstream ); } @Override protected void assignChildElement(Object parent, String nodeName, Object child) { if ( DESCRIPTION.equals( nodeName ) && child instanceof String ) { ((DMNElement) parent).setDescription( (String) child ); } else { super.assignChildElement(parent, nodeName, child); } } @Override protected void assignAttributes(HierarchicalStreamReader reader, Object parent) { super.assignAttributes(reader, parent); String id = reader.getAttribute( ID ); String label = reader.getAttribute( LABEL ); DMNElement dmne = (DMNElement) parent; dmne.setId( id ); dmne.setLabel( label ); } @Override protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) { super.writeChildren(writer, context, parent); DMNElement e = (DMNElement) parent; if (e.getDescription() !=null) writeChildrenNodeAsValue(writer, context, e.getDescription(), DESCRIPTION); // TODO what about DMNElement.ExtensionElements extensionElements; } @Override protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) { super.writeAttributes(writer, parent); DMNElement e = (DMNElement) parent; if (e.getId() != null) writer.addAttribute( ID , e.getId() ); if (e.getLabel() != null) writer.addAttribute( LABEL , e.getLabel() ); } }
[ "ed.tirelli@gmail.com" ]
ed.tirelli@gmail.com
d8b3937c3412c2da59ab3c174bfa86b6e66a55a8
f6fd5de6115ef6ead4bd8787ddf36e4593cfe7ba
/srdz-supplier-api/src/main/java/cn/org/citycloud/entity/FlowCity.java
399f64f1298a67a5138b426ac192cf45aa657706
[]
no_license
xiaolowe/srdz-supplier-api
109d54bcd2868069df42fcfecc600484394ade74
bfb4ab8cbaf912ba057d68584ff9b5ed23ba8494
refs/heads/master
2021-01-17T17:39:58.053696
2018-05-20T11:43:25
2018-05-20T11:43:25
60,492,453
0
0
null
null
null
null
UTF-8
Java
false
false
1,813
java
package cn.org.citycloud.entity; import java.io.Serializable; import javax.persistence.*; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** * The persistent class for the flow_city database table. * */ @Entity @Table(name="flow_city") @NamedQuery(name="FlowCity.findAll", query="SELECT f FROM FlowCity f") @JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" }) public class FlowCity implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name="flow_city_id") @GeneratedValue(strategy = GenerationType.IDENTITY) private int flowCityId; @Column(name="flow_city_code") private int flowCityCode; @Column(name="flow_city_name") private String flowCityName; @Column(name="flow_info_id") private int flowInfoId; @ManyToOne(cascade = { CascadeType.REFRESH, CascadeType.MERGE }, optional = true) @JoinColumn(name="flow_info_id", insertable = false, updatable = false) @JsonIgnore private FlowInfo flowInfo; public FlowCity() { } public int getFlowCityId() { return this.flowCityId; } public void setFlowCityId(int flowCityId) { this.flowCityId = flowCityId; } public int getFlowCityCode() { return this.flowCityCode; } public void setFlowCityCode(int flowCityCode) { this.flowCityCode = flowCityCode; } public String getFlowCityName() { return this.flowCityName; } public void setFlowCityName(String flowCityName) { this.flowCityName = flowCityName; } public int getFlowInfoId() { return this.flowInfoId; } public void setFlowInfoId(int flowInfoId) { this.flowInfoId = flowInfoId; } public FlowInfo getFlowInfo() { return flowInfo; } public void setFlowInfo(FlowInfo flowInfo) { this.flowInfo = flowInfo; } }
[ "xiaolowe@gmail.com" ]
xiaolowe@gmail.com
e388fdbc84f126a2867b99b3cbbdf80335c08bd3
e742da60a241a7cacf1200b471b123542383519b
/app/src/main/java/com/tactfactory/kikivyhun/entities/Category.java
4334690a699005eca42cba83f83afa6ffec21c52
[]
no_license
antoinecronier/Kykivhyun
f040baecce8915e3659fa136dc7e0075ab34726f
8e7239e1a070c0350020e9ac48efd66258bf4780
refs/heads/master
2021-01-19T22:08:53.430800
2017-04-19T15:18:27
2017-04-19T15:18:27
88,759,978
0
0
null
null
null
null
UTF-8
Java
false
false
972
java
package com.tactfactory.kikivyhun.entities; import android.provider.BaseColumns; import com.tactfactory.kikivyhun.entities.base.EntityBase; /** * Created by tactfactory on 11/04/17. */ public class Category extends EntityBase { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } public static class CategoryEntry { public static final String TABLE_NAME = "category"; public static final String COLUMN_NAME_NAME = "name"; public static final String SQL_CREATE_ENTRIES = "CREATE TABLE " + CategoryEntry.TABLE_NAME + " (" + EntityBase.EntityBaseEntry.COLUMN_NAME_ID + " INTEGER PRIMARY KEY," + CategoryEntry.COLUMN_NAME_NAME + " TEXT);"; public static final String SQL_DELETE_ENTRIES = "DROP TABLE IF EXISTS " + CategoryEntry.TABLE_NAME; } }
[ "antoine.cronier@tactfactory.com" ]
antoine.cronier@tactfactory.com
d8c39ba28700c7809c790ef495d8f866269107a6
77fb90c41fd2844cc4350400d786df99e14fa4ca
/f/g/c/package_8/ListMultimap.java
5e3024b5de18905e97d5a7935a85e4d541c479ff
[]
no_license
highnes7/umaang_decompiled
341193b25351188d69b4413ebe7f0cde6525c8fb
bcfd90dffe81db012599278928cdcc6207632c56
refs/heads/master
2020-06-19T07:47:18.630455
2019-07-12T17:16:13
2019-07-12T17:16:13
196,615,053
0
0
null
null
null
null
UTF-8
Java
false
false
461
java
package f.g.c.package_8; import f.g.c.a.b; import f.g.c.d.ve; import java.util.List; import java.util.Map; @b public abstract interface ListMultimap<K, V> extends ve<K, V> { public abstract Map asMap(); public abstract boolean equals(Object paramObject); public abstract List get(Object paramObject); public abstract List removeAll(Object paramObject); public abstract List replaceValues(Object paramObject, Iterable paramIterable); }
[ "highnes.7@gmail.com" ]
highnes.7@gmail.com
15604fd7a70957a95dcfa5fb350e3f9a03bd8831
dedec48e3668f000da619cf228ecced9120cd62e
/tx-samples/tx-local-sample/src/main/java/com/baomidou/samples/localtx/entity/Account.java
9dd0876084f795fb5313c9bfd00ba0ff1fcc1ef2
[ "Apache-2.0" ]
permissive
yangsihuai/dynamic-datasource-samples
f1514844361e04e1a8be01072ef2981c22ac0fa4
f8e94f42b7dbbf7d696b61cf1c07c9c8494be89d
refs/heads/master
2023-06-21T12:52:18.509618
2021-08-03T15:37:10
2021-08-03T15:37:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,032
java
/* * Copyright © ${project.inceptionYear} organization baomidou * * 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.baomidou.samples.localtx.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import lombok.Builder; import lombok.Data; import java.util.Date; @Data @Builder public class Account { @TableId(type = IdType.AUTO) private Long id; /** * 余额 */ private Double balance; private Date lastUpdateTime; }
[ "332309254@qq.com" ]
332309254@qq.com
69bb670acce2886b53e96bed6e1f529c84f4672e
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_195/Testnull_19457.java
9e25687eb9ebef167ad4225b22095afd827a1ca7
[]
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
308
java
package org.gradle.test.performancenull_195; import static org.junit.Assert.*; public class Testnull_19457 { private final Productionnull_19457 production = new Productionnull_19457("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
9d80acad899808ebeda537cb0135dcafc29709cc
7ef286943c425c4d877e61d60f0f528a497df5ce
/IMKit/src/main/java/io/rong/imkit/widget/provider/RecallMessageItemProvider.java
763e60c1259a2dd72e311aaf6021b939cc0324b8
[]
no_license
GoogleJ/HelloWorld
2d5946ab856391d3cb75c5bfd973a2c1c7cdd408
20bbd6395e94e98ec4d9f315552e85fc479475b3
refs/heads/master
2021-07-13T01:53:44.251004
2020-07-31T14:26:18
2020-07-31T14:26:18
188,408,757
0
0
null
null
null
null
UTF-8
Java
false
false
6,039
java
// // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler) // package io.rong.imkit.widget.provider; import android.content.Context; import android.text.Spannable; import android.text.SpannableString; import android.text.TextUtils; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.View.OnClickListener; import android.widget.TextView; import io.rong.common.RLog; import io.rong.eventbus.EventBus; import io.rong.imkit.RongContext; import io.rong.imkit.RongIM; import io.rong.imkit.R.id; import io.rong.imkit.R.integer; import io.rong.imkit.R.layout; import io.rong.imkit.R.string; import io.rong.imkit.model.ProviderTag; import io.rong.imkit.model.UIMessage; import io.rong.imkit.model.Event.RecallMessageEditClickEvent; import io.rong.imkit.recallEdit.RecallEditCountDownCallBack; import io.rong.imkit.recallEdit.RecallEditManager; import io.rong.imkit.userInfoCache.RongUserInfoManager; import io.rong.imkit.widget.provider.IContainerItemProvider.MessageProvider; import io.rong.imlib.model.UserInfo; import io.rong.message.RecallNotificationMessage; import java.lang.ref.WeakReference; @ProviderTag( messageContent = RecallNotificationMessage.class, showPortrait = false, showProgress = false, showWarning = false, centerInHorizontal = true, showSummaryWithName = false ) public class RecallMessageItemProvider extends MessageProvider<RecallNotificationMessage> { public static final String TAG = RecallMessageItemProvider.class.getSimpleName(); public RecallMessageItemProvider() { } public void onItemClick(View view, int position, RecallNotificationMessage content, UIMessage message) { } public void bindView(View v, int position, RecallNotificationMessage content, final UIMessage message) { Object tag = v.getTag(); if (tag instanceof RecallMessageItemProvider.ViewHolder && content != null) { RecallMessageItemProvider.ViewHolder viewHolder = (RecallMessageItemProvider.ViewHolder)tag; viewHolder.contentTextView.setText(this.getInformation(content)); long validTime = (long)RongContext.getInstance().getResources().getInteger(integer.rc_message_recall_edit_interval); long countDownTime = System.currentTimeMillis() - content.getRecallActionTime(); if (!TextUtils.isEmpty(viewHolder.messageId)) { RecallEditManager.getInstance().cancelCountDown(viewHolder.messageId); } viewHolder.messageId = String.valueOf(message.getMessageId()); if (content.getRecallActionTime() > 0L && countDownTime < validTime * 1000L) { viewHolder.editTextView.setVisibility(0); RecallEditManager.getInstance().startCountDown(message.getMessage(), validTime * 1000L - countDownTime, new RecallMessageItemProvider.RecallEditCountDownListener(viewHolder)); viewHolder.editTextView.setOnClickListener(new OnClickListener() { public void onClick(View view) { EventBus.getDefault().post(new RecallMessageEditClickEvent(message.getMessage())); } }); } else { viewHolder.editTextView.setVisibility(8); } } } public void onItemLongClick(View view, int position, RecallNotificationMessage content, UIMessage message) { } public Spannable getContentSummary(RecallNotificationMessage data) { return null; } public Spannable getContentSummary(Context context, RecallNotificationMessage data) { return data != null ? new SpannableString(this.getInformation(data)) : null; } public View newView(Context context, ViewGroup group) { View view = LayoutInflater.from(context).inflate(layout.rc_item_information_notification_message, (ViewGroup)null); RecallMessageItemProvider.ViewHolder viewHolder = new RecallMessageItemProvider.ViewHolder(); viewHolder.contentTextView = (TextView)view.findViewById(id.rc_msg); viewHolder.contentTextView.setMovementMethod(LinkMovementMethod.getInstance()); viewHolder.editTextView = (TextView)view.findViewById(id.rc_edit); view.setTag(viewHolder); return view; } private String getInformation(RecallNotificationMessage content) { String operatorId = content.getOperatorId(); String information; if (TextUtils.isEmpty(operatorId)) { RLog.e(TAG, "RecallMessageItemProvider bindView - operatorId is empty"); information = RongContext.getInstance().getString(string.rc_recalled_a_message); } else if (content.isAdmin()) { information = RongContext.getInstance().getString(string.rc_admin_recalled_message); } else if (operatorId.equals(RongIM.getInstance().getCurrentUserId())) { information = RongContext.getInstance().getString(string.rc_you_recalled_a_message); } else { UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(operatorId); if (userInfo != null && userInfo.getName() != null) { information = userInfo.getName() + RongContext.getInstance().getString(string.rc_recalled_a_message); } else { information = operatorId + RongContext.getInstance().getString(string.rc_recalled_a_message); } } return information; } private static class RecallEditCountDownListener implements RecallEditCountDownCallBack { private WeakReference<RecallMessageItemProvider.ViewHolder> mHolder; public RecallEditCountDownListener(RecallMessageItemProvider.ViewHolder holder) { this.mHolder = new WeakReference(holder); } public void onFinish(String messageId) { RecallMessageItemProvider.ViewHolder viewHolder = (RecallMessageItemProvider.ViewHolder)this.mHolder.get(); if (viewHolder != null && messageId.equals(viewHolder.messageId)) { viewHolder.editTextView.setVisibility(8); } } } private static class ViewHolder { TextView contentTextView; TextView editTextView; String messageId; private ViewHolder() { } } }
[ "574170873@qq.com" ]
574170873@qq.com
38887afaf0ca590a234d157ee0e9a4064f01d6bf
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Mate20-9.0/src/main/java/gov/nist/javax/sip/parser/RAckParser.java
65aadab375eae6641b4609a3a62d04a471dbeec1
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,396
java
package gov.nist.javax.sip.parser; import gov.nist.javax.sip.header.RAck; import gov.nist.javax.sip.header.SIPHeader; import java.text.ParseException; import javax.sip.InvalidArgumentException; public class RAckParser extends HeaderParser { public RAckParser(String rack) { super(rack); } protected RAckParser(Lexer lexer) { super(lexer); } public SIPHeader parse() throws ParseException { if (debug) { dbg_enter("RAckParser.parse"); } RAck rack = new RAck(); try { headerName(TokenTypes.RACK); rack.setHeaderName("RAck"); rack.setRSequenceNumber(Long.parseLong(this.lexer.number())); this.lexer.SPorHT(); rack.setCSequenceNumber(Long.parseLong(this.lexer.number())); this.lexer.SPorHT(); this.lexer.match(4095); rack.setMethod(this.lexer.getNextToken().getTokenValue()); this.lexer.SPorHT(); this.lexer.match(10); if (debug) { dbg_leave("RAckParser.parse"); } return rack; } catch (InvalidArgumentException ex) { throw createParseException(ex.getMessage()); } catch (Throwable ex2) { if (debug) { dbg_leave("RAckParser.parse"); } throw ex2; } } }
[ "dstmath@163.com" ]
dstmath@163.com
4297ada3b3f584f15708995c1d56e53bd5b06a7f
5d49e39b3d6473b01b53b1c50397b2ab3e2c47b3
/Enterprise Projects/ips-outward-producer/src/main/java/com/combank/ips/outward/producer/model/camt_053_001/AttendanceContext1Code.java
6578eb2fdeddd6ff123c614cb0e334f40ae3b2b7
[]
no_license
ThivankaWijesooriya/Developer-Mock
54524e4319457fddc1050bfdb0b13c39c54017aa
3acbaa98ff4b64fe226bcef0f3e69d6738bdbf65
refs/heads/master
2023-03-02T04:14:18.253449
2023-01-28T05:54:06
2023-01-28T05:54:06
177,391,319
0
0
null
2020-01-08T17:26:30
2019-03-24T08:56:29
CSS
UTF-8
Java
false
false
1,234
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2022.08.22 at 12:41:17 AM IST // package com.combank.ips.outward.producer.model.camt_053_001; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for AttendanceContext1Code. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="AttendanceContext1Code"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="ATTD"/> * &lt;enumeration value="SATT"/> * &lt;enumeration value="UATT"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "AttendanceContext1Code") @XmlEnum public enum AttendanceContext1Code { ATTD, SATT, UATT; public String value() { return name(); } public static AttendanceContext1Code fromValue(String v) { return valueOf(v); } }
[ "thivankawijesooriya@gmail.com" ]
thivankawijesooriya@gmail.com
e528c5a52608283f4392608d4a8a6d3b16f168df
78f284cd59ae5795f0717173f50e0ebe96228e96
/factura-negocio/src/cl/stotomas/factura/negocio/ia_9/copy/copy/copy2/TestingFinalTry.java
61689dd575aa5b1528f2ba43b1232405777535ab
[]
no_license
Pattricio/Factura
ebb394e525dfebc97ee2225ffc5fca10962ff477
eae66593ac653f85d05071b6ccb97fb1e058502d
refs/heads/master
2020-03-16T03:08:45.822070
2018-05-07T15:29:25
2018-05-07T15:29:25
132,481,305
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,813
java
package cl.stotomas.factura.negocio.ia_9.copy.copy.copy2; import java.applet.Applet; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; public class TestingFinalTry { public static String decryptMessage(final byte[] message, byte[] secretKey) { try { // CÓDIGO VULNERABLE final SecretKeySpec KeySpec = new SecretKeySpec(secretKey, "DES"); final Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, KeySpec); // RECOMENDACIÓN VERACODE // final Cipher cipher = Cipher.getInstance("DES..."); // cipher.init(Cipher.DECRYPT_MODE, KeySpec); return new String(cipher.doFinal(message)); } catch(Exception e) { e.printStackTrace(); } return null; } class Echo { // Control de Proceso // Posible reemplazo de librería por una maliciosa // Donde además s enos muestra el nombre explícito de esta. public native void runEcho(); { System.loadLibrary("echo"); // Se carga librería } public void main(String[] args) { new Echo().runEcho(); } public final class TestApplet extends Applet { private static final long serialVersionUID = 1L; } public final class TestAppletDos extends Applet { private static final long serialVersionUID = 1L; } //Comparación de referencias de objeto en lugar de contenido de objeto // El if dentro de este código no se ejecutará. // porque se prioriza el String a mostrar. public final class compareStrings{ public String str1; public String str2; public void comparar() { if (str1 == str2) { System.out.println("str1 == str2"); } } } } }
[ "Adriana Molano@DESKTOP-GQ96FK8" ]
Adriana Molano@DESKTOP-GQ96FK8
f06646d11673f567b881e6a4a13d265979b95a3f
f2e744082c66f270d606bfc19d25ecb2510e337c
/sources/com/android/settings/notification/zen/ZenModeVisEffectsCustomPreferenceController.java
8911225717cd7d8bd1191605a773ee58ee7e1476
[]
no_license
AshutoshSundresh/OnePlusSettings-Java
365c49e178612048451d78ec11474065d44280fa
8015f4badc24494c3931ea99fb834bc2b264919f
refs/heads/master
2023-01-22T12:57:16.272894
2020-11-21T16:30:18
2020-11-21T16:30:18
314,854,903
4
2
null
null
null
null
UTF-8
Java
false
false
5,436
java
package com.android.settings.notification.zen; import android.app.NotificationManager; import android.content.Context; import android.provider.Settings; import androidx.preference.Preference; import androidx.preference.PreferenceScreen; import com.android.settings.C0017R$string; import com.android.settings.core.SubSettingLauncher; import com.android.settings.notification.zen.ZenCustomRadioButtonPreference; import com.android.settingslib.core.lifecycle.Lifecycle; public class ZenModeVisEffectsCustomPreferenceController extends AbstractZenModePreferenceController { private static final String[] ZENMODEVISEFFECT = {"zen_effect_intent", "zen_effect_light", "zen_effect_peek", "zen_effect_status", "zen_effect_badge", "zen_effect_ambient", "zen_effect_list"}; private static final int[] ZENMODEVISEFFECT_VALUE = {4, 8, 16, 32, 64, 128, 256}; private ZenCustomRadioButtonPreference mPreference; @Override // com.android.settingslib.core.AbstractPreferenceController public boolean isAvailable() { return true; } public ZenModeVisEffectsCustomPreferenceController(Context context, Lifecycle lifecycle, String str) { super(context, str, lifecycle); } @Override // com.android.settingslib.core.AbstractPreferenceController, com.android.settings.notification.zen.AbstractZenModePreferenceController public void displayPreference(PreferenceScreen preferenceScreen) { super.displayPreference(preferenceScreen); ZenCustomRadioButtonPreference zenCustomRadioButtonPreference = (ZenCustomRadioButtonPreference) preferenceScreen.findPreference(getPreferenceKey()); this.mPreference = zenCustomRadioButtonPreference; zenCustomRadioButtonPreference.setOnGearClickListener(new ZenCustomRadioButtonPreference.OnGearClickListener() { /* class com.android.settings.notification.zen.$$Lambda$ZenModeVisEffectsCustomPreferenceController$CCFn6jYXEaUv6rkqVzz4PUil0o */ @Override // com.android.settings.notification.zen.ZenCustomRadioButtonPreference.OnGearClickListener public final void onGearClick(ZenCustomRadioButtonPreference zenCustomRadioButtonPreference) { ZenModeVisEffectsCustomPreferenceController.this.lambda$displayPreference$0$ZenModeVisEffectsCustomPreferenceController(zenCustomRadioButtonPreference); } }); this.mPreference.setOnRadioButtonClickListener(new ZenCustomRadioButtonPreference.OnRadioButtonClickListener() { /* class com.android.settings.notification.zen.$$Lambda$ZenModeVisEffectsCustomPreferenceController$ecCIqwNkcKumrKjb4Fy1MVxkY */ @Override // com.android.settings.notification.zen.ZenCustomRadioButtonPreference.OnRadioButtonClickListener public final void onRadioButtonClick(ZenCustomRadioButtonPreference zenCustomRadioButtonPreference) { ZenModeVisEffectsCustomPreferenceController.this.lambda$displayPreference$1$ZenModeVisEffectsCustomPreferenceController(zenCustomRadioButtonPreference); } }); } /* access modifiers changed from: private */ /* renamed from: lambda$displayPreference$0 */ public /* synthetic */ void lambda$displayPreference$0$ZenModeVisEffectsCustomPreferenceController(ZenCustomRadioButtonPreference zenCustomRadioButtonPreference) { launchCustomSettings(); } /* access modifiers changed from: private */ /* renamed from: lambda$displayPreference$1 */ public /* synthetic */ void lambda$displayPreference$1$ZenModeVisEffectsCustomPreferenceController(ZenCustomRadioButtonPreference zenCustomRadioButtonPreference) { selectCustomOptions(); } private void selectCustomOptions() { String[] strArr = ZENMODEVISEFFECT; boolean z = false; for (int i = 0; i < strArr.length; i++) { z = Settings.Secure.getInt(this.mContext.getContentResolver(), strArr[i], 0) != 0; if (z) { break; } } if (z) { for (int i2 = 0; i2 < strArr.length; i2++) { this.mBackend.saveVisualEffectsPolicy(ZENMODEVISEFFECT_VALUE[i2], Settings.Secure.getInt(this.mContext.getContentResolver(), strArr[i2], 0) != 0); } return; } launchCustomSettings(); } @Override // com.android.settingslib.core.AbstractPreferenceController public void updateState(Preference preference) { super.updateState(preference); this.mPreference.setChecked(areCustomOptionsSelected()); } /* access modifiers changed from: protected */ public boolean areCustomOptionsSelected() { return !NotificationManager.Policy.areAllVisualEffectsSuppressed(this.mBackend.mPolicy.suppressedVisualEffects) && !(this.mBackend.mPolicy.suppressedVisualEffects == 0); } /* access modifiers changed from: protected */ public void select() { this.mMetricsFeatureProvider.action(this.mContext, 1399, true); } private void launchCustomSettings() { select(); SubSettingLauncher subSettingLauncher = new SubSettingLauncher(this.mContext); subSettingLauncher.setDestination(ZenModeBlockedEffectsSettings.class.getName()); subSettingLauncher.setTitleRes(C0017R$string.zen_mode_what_to_block_title); subSettingLauncher.setSourceMetricsCategory(1400); subSettingLauncher.launch(); } }
[ "ashutoshsundresh@gmail.com" ]
ashutoshsundresh@gmail.com
a81102b15a5f1a6cd50a25a73c4280b907394a61
0ec9b09bca5e448ded9866a5fe30c7a63b82b8b3
/modelViewPresenter/presentationModel/withPrototype/src/main/java/usantatecla/mastermind/views/menus/UndoCommand.java
8014c29eb6551d876de48696b1ca0a7c71b2d406
[]
no_license
pixelia-es/USantaTecla-project-mastermind-java.swing.socket.sql
04de19c29176c4b830dbae751dc4746d2de86f2e
2b5f9bf273c67eedff96189b6b3c5680c8b10958
refs/heads/master
2023-06-10T13:09:55.875570
2021-06-29T15:16:23
2021-06-29T15:16:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
528
java
package usantatecla.mastermind.views.menus; import usantatecla.mastermind.controllers.PlayController; import usantatecla.mastermind.views.models.MessageView; public class UndoCommand extends Command { UndoCommand(PlayController playController) { super(MessageView.UNDO_COMMAND.getMessage(), playController); } @Override protected void execute() { ((PlayController) this.acceptorController).undo(); } @Override protected boolean isActive() { return ((PlayController) this.acceptorController).undoable(); } }
[ "jaime.perez@alumnos.upm.es" ]
jaime.perez@alumnos.upm.es
77f7de5b689ffdf573a7d88f08f6fbfd88a9c18b
4536078b4070fc3143086ff48f088e2bc4b4c681
/v1.0.4/decompiled/e/c/a/a/b/o.java
c57448e41e68d98a08dcd5ead87ff665314ed719
[]
no_license
olealgoritme/smittestopp_src
485b81422752c3d1e7980fbc9301f4f0e0030d16
52080d5b7613cb9279bc6cda5b469a5c84e34f6a
refs/heads/master
2023-05-27T21:25:17.564334
2023-05-02T14:24:31
2023-05-02T14:24:31
262,846,147
0
0
null
null
null
null
UTF-8
Java
false
false
236
java
package e.c.a.a.b; import android.os.Parcelable.Creator; public final class o implements Parcelable.Creator<c> {} /* Location: * Qualified Name: base.e.c.a.a.b.o * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "olealgoritme@gmail.com" ]
olealgoritme@gmail.com
d1b1a677c64e92c2df74cf8d5c18b005ccb8df5b
9f3ee1e8ef205c0e2d4f2b12bf43d36e229f2ddf
/urule-console/src/main/java/com/wenba/urule/console/repository/updater/ReferenceUpdater.java
2d7fc783189dc7618fe40409a41557e1503144f1
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
WeiGaung/drools
0622223d9fded09a16b4922a4ea6f77c59b556de
390d4947785a923421df473074bb0220c55ec66c
refs/heads/master
2020-04-10T11:57:13.608789
2018-11-29T01:31:36
2018-11-29T01:31:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,020
java
/******************************************************************************* * Copyright 2017 Bstek * * 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.wenba.urule.console.repository.updater; /** * @author Jacky.gao * @since 2015年8月4日 */ public interface ReferenceUpdater { boolean contain(String path,String xml); String update(String path,String newPath,String xml); boolean support(String path); }
[ "1" ]
1
9a053f440755207e42a53172bb3ef3d651862ced
20186a33522f443e20a139f7cabacec149593a77
/src/main/java/com/fun/common/exception/user/RoleBlockedException.java
8b829eee75b38111a55bdf9b9e0a260cef4ee04f
[]
no_license
mrdjun/fun-boot
264e425f1eb6ee43bad76b720e782bcb1c0e4ff4
a476077bfb94cf284c31901337841a37b8dad052
refs/heads/master
2022-08-11T15:40:57.192993
2020-10-15T06:38:14
2020-10-15T06:38:14
206,963,507
26
10
null
2022-07-06T20:40:57
2019-09-07T12:14:25
HTML
UTF-8
Java
false
false
290
java
package com.fun.common.exception.user; /** * 角色锁定异常类 * * @author fun */ public class RoleBlockedException extends UserException { private static final long serialVersionUID = 1L; public RoleBlockedException() { super("role.blocked", null); } }
[ "mr.djun@qq.com" ]
mr.djun@qq.com
17412cc0178fdde5f3afe2d3f891d2dab3fe07b1
f260c7f5cbd42e236e75cf7baf1895917516b82b
/src/main/java/com/ruoyi/project/page/pageInfoConfig/service/PageInfoConfigServiceImpl.java
983224e72b132cdd925aad0cf5f446ff3cff6380
[ "MIT" ]
permissive
rainey520/customerservice
98ce94503123cf972385340a89fd121d2222c636
b5a731ee04a7e755e47152e0e8fe34d06cd17502
refs/heads/master
2022-09-18T12:12:47.120787
2019-09-21T02:28:36
2019-09-21T02:28:36
206,471,668
0
0
MIT
2022-09-01T23:12:36
2019-09-05T04:04:41
JavaScript
UTF-8
Java
false
false
3,460
java
package com.ruoyi.project.page.pageInfoConfig.service; import java.util.*; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.ruoyi.common.constant.PageTypeConstants; import com.ruoyi.common.utils.TimeUtil; import com.ruoyi.project.device.devIo.domain.DevIo; import com.ruoyi.project.device.devIo.mapper.DevIoMapper; import com.ruoyi.project.page.pageInfo.domain.PageInfo; import com.ruoyi.project.page.pageInfo.mapper.PageInfoMapper; import com.ruoyi.project.page.pageInfo.service.IPageInfoService; import com.ruoyi.project.page.pageInfoConfig.domain.PageInfoConfig; import com.ruoyi.project.page.pageInfoConfig.mapper.PageInfoConfigMapper; import com.ruoyi.project.production.devWorkData.domain.DevWorkData; import com.ruoyi.project.production.devWorkData.mapper.DevWorkDataMapper; import com.ruoyi.project.production.devWorkDayHour.mapper.DevWorkDayHourMapper; import com.ruoyi.project.production.devWorkOrder.domain.DevWorkOrder; import com.ruoyi.project.production.devWorkOrder.mapper.DevWorkOrderMapper; import com.ruoyi.project.production.productionLine.domain.ProductionLine; import com.ruoyi.project.production.productionLine.mapper.ProductionLineMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.common.support.Convert; import org.springframework.util.StringUtils; /** * 页面配置 服务层实现 * * @author zqm * @date 2019-04-13 */ @Service public class PageInfoConfigServiceImpl implements IPageInfoConfigService { @Autowired private PageInfoConfigMapper pageInfoConfigMapper; @Autowired private ProductionLineMapper productionLineMapper; @Autowired private PageInfoMapper pageInfoMapper; @Autowired private DevWorkOrderMapper devWorkOrderMapper; @Autowired private DevWorkDataMapper devWorkDataMapper; @Autowired private DevIoMapper devIoMapper; @Autowired private DevWorkDayHourMapper devWorkDayHourMapper; @Autowired private IPageInfoService pageInfoService; /** * 查询页面配置信息 * * @param id 页面配置ID * @return 页面配置信息 */ @Override public PageInfoConfig selectPageInfoConfigById(Integer id) { return pageInfoConfigMapper.selectPageInfoConfigById(id); } /** * 查询页面配置列表 * * @param pageInfoConfig 页面配置信息 * @return 页面配置集合 */ @Override public List<PageInfoConfig> selectPageInfoConfigList(PageInfoConfig pageInfoConfig) { return pageInfoConfigMapper.selectPageInfoConfigList(pageInfoConfig); } /** * 新增页面配置 * * @param pageInfoConfig 页面配置信息 * @return 结果 */ @Override public int insertPageInfoConfig(PageInfoConfig pageInfoConfig) { return pageInfoConfigMapper.insertPageInfoConfig(pageInfoConfig); } /** * 修改页面配置 * * @param pageInfoConfig 页面配置信息 * @return 结果 */ @Override public int updatePageInfoConfig(PageInfoConfig pageInfoConfig) { return pageInfoConfigMapper.updatePageInfoConfig(pageInfoConfig); } /** * 删除页面配置对象 * * @param ids 需要删除的数据ID * @return 结果 */ @Override public int deletePageInfoConfigByIds(String ids) { return pageInfoConfigMapper.deletePageInfoConfigByIds(Convert.toStrArray(ids)); } }
[ "1305219970@qq.com" ]
1305219970@qq.com
abb9a429d3c4f71af6ebca839d4f0f2401df46f6
dc4497107e1e5750b4f64380fbde4cb0df4b273d
/Workspace/src/workspace/service/SrvEditorJavaClasspath.java
1f1ca5a0fafe7e140c58031935e226973eca94ed
[]
no_license
M6C/workspace-neon
2c28ed019a8f9b3fbf1a30799ff2007dcf63ffef
23ea1b195dbd32eee715dac3ac07f6dada1b9e09
refs/heads/master
2022-10-24T16:23:40.743804
2022-10-18T14:37:26
2022-10-18T14:37:26
67,446,351
0
0
null
null
null
null
UTF-8
Java
false
false
6,691
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) // Source File Name: SrvEditorJavaXmlXsl.java package workspace.service; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Random; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import javax.xml.transform.TransformerException; import org.w3c.dom.Document; import framework.beandata.BeanGenerique; import framework.ressource.util.UtilFile; import framework.ressource.util.UtilPackage; import framework.ressource.util.UtilString; import framework.ressource.util.UtilVector; import workspace.adaptateur.application.AdpXmlApplication; public class SrvEditorJavaClasspath extends SrvEditorJavaXmlXsl { private Random rand = new Random(); protected void doResponse(HttpServletRequest request, HttpServletResponse response, BeanGenerique bean, String data) throws Exception { HttpSession session = request.getSession(); ServletContext context = session.getServletContext(); String application = request.getParameter("pApplication"); Document domXml = (Document)session.getAttribute("resultDom"); List listClassPathWebInf = getClasspathWebInf(context); List listClassPathJdk = getClasspathJdk(context, application, domXml); List listClassPathJre = getClasspathJre(context, application, domXml); String classpath = extractClasspathElement(data); String classPathSystem = null;//getClasspathSystem(); String classPathWebInf = toJson(listClassPathWebInf); String classPathJdk = toJson(listClassPathJdk); String classPathJre = toJson(listClassPathJre); StringBuffer pathClass = new StringBuffer("[{'id':'root0', 'text':'"+application+"', children: ["); boolean next = false; next = addJsonClasspathChild(pathClass, classpath, "CLASSPATH", next); next = addJsonClasspathChild(pathClass, classPathSystem, "CLASSPATH_SYSTEM", next); next = addJsonClasspathChild(pathClass, classPathWebInf, "CLASSPATH_WEB-INF", next); next = addJsonClasspathChild(pathClass, classPathJdk, "CLASSPATH_JDK", next); next = addJsonClasspathChild(pathClass, classPathJre, "CLASSPATH_JRE", next); pathClass.append("]}]"); super.doResponse(request, response, bean, pathClass.toString()); } private boolean addJsonClasspathChild(StringBuffer pathClass, String classpath, String rootName, boolean next) { if (classpath != null) { if (next) { pathClass.append(","); } pathClass.append("{'id':'"+rootName+"_"+rand.nextLong()+"', 'text':'"+rootName+"',"); // pathClass.append("children: ["); pathClass.append(classpath); // pathClass.append("]"); pathClass.append("}"); return true; } return next; } private String toJson(List list) { String ret = null; if (list != null && !list.isEmpty()) { ret = ""; for(int i=0 ; i<list.size() ; i++) { String str = (String)list.get(i); str = UtilString.replaceAll(str, "\\", "\\\\"); if (i>0) { ret += ","; } ret += "{" + "'id':'"+rand.nextLong()+"'" + ",'text':'"+str+"'" + ",'leaf':'true'" + "}"; } ret = "children: [" + ret + "]"; } return ret; } private String extractClasspathElement(String data) { String ret = extractChildren(data); ret = extractChildren(ret); return "children: [" + ret + "]"; } private String extractChildren(String data) { String ret = ""; int idxStart = data.indexOf('['); int idxEnd = data.lastIndexOf(']'); if(idxStart >= 0 && idxEnd > 0) { ret = data.substring(idxStart + 1, idxEnd); } return ret; } private String getClasspathSystem() { return UtilPackage.getPackageClassPath(); } private List getClasspathWebInf(ServletContext context) throws IOException { return getJar(context.getRealPath("WEB-INF")); } /** * TODO A Factoriser avec la methode ci dessous */ private List getClasspathJdk(ServletContext context, String application, Document domXml) throws TransformerException, IOException { List ret = new ArrayList<>(); //Recuperation de la home du jdk String szJdkpath = AdpXmlApplication.getJdkPathByName(context, domXml, application, "Home"); // Recuperation du repertoire lib du jdk String szJdkLib = AdpXmlApplication.getJdkJrePathByName(context, domXml, application, "Lib"); StringBuffer pathClass = new StringBuffer(); if(UtilString.isNotEmpty(szJdkpath)) { File jdkPath = new File(szJdkpath); if(jdkPath.exists()) { if(UtilString.isNotEmpty(szJdkLib)) { File jreLib = szJdkLib.indexOf(':') <= 0 ? new File(jdkPath, szJdkLib) : new File(szJdkLib); if(jreLib.exists()) { ret.addAll(getJar(jreLib.getCanonicalPath())); } } } } return ret; } /** * TODO A Factoriser avec la methode ci dessus */ private List getClasspathJre(ServletContext context, String application, Document domXml) throws TransformerException, IOException { List ret = new ArrayList<>(); //Recuperation de la home du jdk String szJdkpath = AdpXmlApplication.getJdkPathByName(context, domXml, application, "Home"); // Recuperation du repertoire home de la jre String szJreHome = AdpXmlApplication.getJdkJrePathByName(context, domXml, application, "Home"); if(UtilString.isNotEmpty(szJdkpath)) { File jdkPath = new File(szJdkpath); if(jdkPath.exists()) { if(UtilString.isNotEmpty(szJreHome)) { File jreHome = szJreHome.indexOf(':') <= 0 ? new File(jdkPath, szJreHome) : new File(szJreHome); if (jreHome.exists()) { File jreLib = new File(jreHome, "lib"); if (jreLib.exists()) { ret.addAll(getJar(jreLib.getCanonicalPath())); } } } } } return ret; } private void addToClasspath(List listJar, StringBuffer classpath) throws IOException { int max = UtilVector.safeSize(listJar); for(int i = 0; i < max; i++) { classpath.append(";").append((String)UtilVector.safeGetElementAt(listJar, i)); } } private List getJar(String path) throws IOException { return UtilFile.dir(path, true, ".jar"); } }
[ "david.roca@free.fr" ]
david.roca@free.fr
1e522187b5f8da471b5af9b5c5b9ff07ce274b42
531dc0124c384c5cf3754f45c0a0b0d9e5660711
/javase系列练习/src/第一阶段/day_04/ArrayDemo5.java
df7fcdd126a09564b81852522d25e98d5b413d8e
[]
no_license
EDT777/javase
6a99926d9228741908845b86f071ac567e16fe1e
db9c4ed5b4bd3e09f342127597107cf4d6de9000
refs/heads/master
2021-05-24T12:58:11.143254
2020-12-01T06:12:51
2020-12-01T06:12:51
253,569,902
0
0
null
null
null
null
UTF-8
Java
false
false
366
java
package 第一阶段.day_04; //求出int类型数组中最大元素值 public class ArrayDemo5 { public static void main(String[] args) { int[]a = new int[]{5,7,9,1,3,5}; int max =a[0]; for (int b:a){ if(b>max){ max =b; } } System.out.println("数组的最大值是:"+max); } }
[ "1445417290@qq.com" ]
1445417290@qq.com
eac0e9505bc880acf7b42f902837e0d8e5df73e3
aa6997aba1475b414c1688c9acb482ebf06511d9
/src/java/util/function/LongPredicate.java
f8cfbd4724a3d1daa7796e723a273031b9ed8590
[]
no_license
yueny/JDKSource1.8
eefb5bc88b80ae065db4bc63ac4697bd83f1383e
b88b99265ecf7a98777dd23bccaaff8846baaa98
refs/heads/master
2021-06-28T00:47:52.426412
2020-12-17T13:34:40
2020-12-17T13:34:40
196,523,101
4
2
null
null
null
null
UTF-8
Java
false
false
2,966
java
/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.util.function; import java.util.Objects; /** * Represents a predicate (boolean-valued function) of one {@code long}-valued * argument. This is the {@code long}-consuming primitive type specialization of * {@link Predicate}. * * <p>This is a <a href="package-summary.html">functional interface</a> * whose functional method is {@link #test(long)}. * * @see Predicate * @since 1.8 */ @FunctionalInterface public interface LongPredicate { /** * Evaluates this predicate on the given argument. * * @param value the input argument * @return {@code true} if the input argument matches the predicate, otherwise {@code false} */ boolean test(long value); /** * Returns a composed predicate that represents a short-circuiting logical * AND of this predicate and another. When evaluating the composed * predicate, if this predicate is {@code false}, then the {@code other} * predicate is not evaluated. * * <p>Any exceptions thrown during evaluation of either predicate are relayed * to the caller; if evaluation of this predicate throws an exception, the * {@code other} predicate will not be evaluated. * * @param other a predicate that will be logically-ANDed with this predicate * @return a composed predicate that represents the short-circuiting logical AND of this predicate * and the {@code other} predicate * @throws NullPointerException if other is null */ default LongPredicate and(LongPredicate other) { Objects.requireNonNull(other); return (value) -> test(value) && other.test(value); } /** * Returns a predicate that represents the logical negation of this * predicate. * * @return a predicate that represents the logical negation of this predicate */ default LongPredicate negate() { return (value) -> !test(value); } /** * Returns a composed predicate that represents a short-circuiting logical * OR of this predicate and another. When evaluating the composed * predicate, if this predicate is {@code true}, then the {@code other} * predicate is not evaluated. * * <p>Any exceptions thrown during evaluation of either predicate are relayed * to the caller; if evaluation of this predicate throws an exception, the * {@code other} predicate will not be evaluated. * * @param other a predicate that will be logically-ORed with this predicate * @return a composed predicate that represents the short-circuiting logical OR of this predicate * and the {@code other} predicate * @throws NullPointerException if other is null */ default LongPredicate or(LongPredicate other) { Objects.requireNonNull(other); return (value) -> test(value) || other.test(value); } }
[ "yueny09@163.com" ]
yueny09@163.com
23a3c6e91d704fb776752a8d5e5b0946f25e46bb
f7f9d7fa841e856927e02513ecc74dc00c935f8a
/server/src/main/java/org/codelibs/fesen/action/admin/cluster/configuration/AddVotingConfigExclusionsResponse.java
1f3315e6d3218a17410224480d803893e4a954d3
[ "CDDL-1.0", "MIT", "BSD-3-Clause", "LGPL-2.0-or-later", "LGPL-2.1-only", "NAIST-2003", "LicenseRef-scancode-generic-export-compliance", "ICU", "SunPro", "Python-2.0", "CC-BY-SA-3.0", "MPL-1.1", "GPL-2.0-only", "CPL-1.0", "LicenseRef-scancode-other-copyleft", "Apache-2.0", "LicenseRef-scancode-public-domain", "CC-PDDC", "BSD-2-Clause", "LicenseRef-scancode-unicode-mappings", "LicenseRef-scancode-unicode", "CC0-1.0", "Apache-1.1", "EPL-1.0", "Classpath-exception-2.0" ]
permissive
codelibs/fesen
3f949fd3533e8b25afc3d3475010d1b1a0d95c09
b2440fbda02e32f7abe77d2be95ead6a16c8af06
refs/heads/main
2022-07-27T21:14:02.455938
2021-12-21T23:54:20
2021-12-21T23:54:20
330,334,670
4
0
Apache-2.0
2022-05-17T01:54:31
2021-01-17T07:07:56
Java
UTF-8
Java
false
false
1,880
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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.codelibs.fesen.action.admin.cluster.configuration; import org.codelibs.fesen.action.ActionResponse; import org.codelibs.fesen.common.io.stream.StreamInput; import org.codelibs.fesen.common.io.stream.StreamOutput; import org.codelibs.fesen.common.xcontent.ToXContentObject; import org.codelibs.fesen.common.xcontent.XContentBuilder; import java.io.IOException; /** * A response to {@link AddVotingConfigExclusionsRequest} indicating that voting config exclusions have been added for the requested nodes * and these nodes have been removed from the voting configuration. */ public class AddVotingConfigExclusionsResponse extends ActionResponse implements ToXContentObject { public AddVotingConfigExclusionsResponse() { } public AddVotingConfigExclusionsResponse(StreamInput in) throws IOException { super(in); } @Override public void writeTo(StreamOutput out) throws IOException {} @Override public XContentBuilder toXContent(final XContentBuilder builder, final Params params) throws IOException { return builder; } }
[ "shinsuke@apache.org" ]
shinsuke@apache.org
b7f25fcf04cf8ae7542fc4c19260faee5f8f7a4e
3bb9e1a187cb72e2620a40aa208bf94e5cee46f5
/soa-rest-common/src/main/java/ong/eu/soon/rest/common/util/LinkUtil.java
a0d6026e9a9c8ed216fa9cac0a2d9173ca78f267
[]
no_license
eusoon/Mobile-Catalog
2e6f766864ea25f659f87548559502358ac5466c
869d7588447117b751fcd1387cd84be0bd66ef26
refs/heads/master
2021-01-22T23:49:12.717052
2013-12-10T08:22:20
2013-12-10T08:22:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,386
java
package ong.eu.soon.rest.common.util; import javax.servlet.http.HttpServletResponse; /** * Provides some constants and utility methods to build a Link Header to be stored in the {@link HttpServletResponse} object */ public final class LinkUtil { public static final String REL_COLLECTION = "collection"; public static final String REL_NEXT = "next"; public static final String REL_PREV = "prev"; public static final String REL_FIRST = "first"; public static final String REL_LAST = "last"; private LinkUtil() { throw new AssertionError(); } // /** * Creates a Link Header to be stored in the {@link HttpServletResponse} to provide Discoverability features to the user * * @param uri * the base uri * @param rel * the relative path * * @return the complete url */ public static String createLinkHeader(final String uri, final String rel) { return "<" + uri + ">; rel=\"" + rel + "\""; } public static String gatherLinkHeaders(final String... uris) { final StringBuilder linkHeaderValue = new StringBuilder(); for (final String uri : uris) { linkHeaderValue.append(uri); linkHeaderValue.append(", "); } return linkHeaderValue.substring(0, linkHeaderValue.length() - 2).toString(); } }
[ "eusoon@gmail.com" ]
eusoon@gmail.com
bb45bba3758d780f7b09624f45f6838b93862321
65a7e64b42576380daaeedd413b2a903ddf1ac50
/src/java/org/jsimpledb/cli/cmd/SetVerboseCommand.java
ab70b66f36ddb81834aceda3440bc629ac8db72f
[ "Apache-2.0" ]
permissive
mykelalvis/jsimpledb
2d47a72385a96af6ebdcb1f81ef4246aed27bf77
5ea7e4dcf0292a552a653424f0d238cc4021ed13
refs/heads/master
2021-01-15T12:20:43.609317
2016-05-01T19:55:25
2016-05-01T19:55:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,040
java
/* * Copyright (C) 2015 Archie L. Cobbs. All rights reserved. */ package org.jsimpledb.cli.cmd; import java.util.Map; import org.jsimpledb.cli.CliSession; import org.jsimpledb.parse.ParseContext; @Command public class SetVerboseCommand extends AbstractCommand { public SetVerboseCommand() { super("set-verbose verbose:boolean"); } @Override public String getHelpSummary() { return "Enables or disables verbose mode, which displays the complete stack trace when an exceptions occurs."; } @Override public CliSession.Action getAction(CliSession session, ParseContext ctx, boolean complete, Map<String, Object> params) { final boolean verbose = (Boolean)params.get("verbose"); return new CliSession.Action() { @Override public void run(CliSession session) throws Exception { session.setVerbose(verbose); session.getWriter().println((verbose ? "En" : "Dis") + "abled verbose mode."); } }; } }
[ "archie.cobbs@gmail.com" ]
archie.cobbs@gmail.com
bfbfad7f54d46a125e7228dcc9096cc423d6687f
46963c58087c98b26d8bbf2c6e8c96975832be57
/practice/src/cn/ssdut/practice/test.java
c2eec555703416c60b5262cfb05ccabd675fd99f
[]
no_license
lisongting/JAVA-Projects
bb42056d28f0b8672896bf5a2a0a53db73a4137c
7014261fc195e41afe632ee7a7a547d3030571ab
refs/heads/master
2020-06-26T18:05:24.942071
2017-03-23T13:38:03
2017-03-23T13:38:03
74,203,896
0
0
null
null
null
null
GB18030
Java
false
false
502
java
package cn.ssdut.practice; /** * 测试时间对象和字符串之间的相互转化 */ import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class test { public static void main(String[] args) { String str2 = "1989,7,8"; DateFormat df2 = new SimpleDateFormat("yyyy,MM,dd"); try{ Date d = (Date) df2.parse(str2); System.out.println(d); } catch(ParseException e){ e.printStackTrace(); } System.out.println(); } }
[ "501648152@qq.com" ]
501648152@qq.com
d46f4d9b98040693e9ae01e923cbe168173a5d37
01d83e8ce1025c07e59d61891cd4d6d7afe2616f
/app/src/main/java/org/solovyev/android/calculator/wizard/CalculatorWizards.java
a6a8eb252f97fcd35b42f8448fd9f92e4c751824
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Bubu/android-calculatorpp
6794121ca897cbd9f4a479e2ab8adb14ce410712
b93ee7812f854b2dcd4d924b30b687f8e16261ae
refs/heads/master
2022-08-30T19:04:48.174144
2022-08-04T18:54:25
2022-08-04T18:54:25
247,170,603
82
17
null
2022-08-04T18:00:47
2020-03-13T22:17:32
Java
UTF-8
Java
false
false
4,291
java
package org.solovyev.android.calculator.wizard; import android.app.Activity; import android.content.Context; import android.os.Bundle; import org.solovyev.android.calculator.release.ChooseThemeReleaseNoteStep; import org.solovyev.android.calculator.release.ReleaseNoteStep; import org.solovyev.android.calculator.release.ReleaseNotes; import org.solovyev.android.wizard.BaseWizard; import org.solovyev.android.wizard.ListWizardFlow; import org.solovyev.android.wizard.Wizard; import org.solovyev.android.wizard.WizardFlow; import org.solovyev.android.wizard.WizardStep; import org.solovyev.android.wizard.Wizards; import java.util.ArrayList; import java.util.List; import javax.annotation.Nonnull; import javax.annotation.Nullable; import static org.solovyev.android.calculator.wizard.CalculatorWizardStep.last; import static org.solovyev.android.calculator.wizard.CalculatorWizardStep.welcome; public class CalculatorWizards implements Wizards { public static final String FIRST_TIME_WIZARD = "first-wizard"; public static final String RELEASE_NOTES = "release-notes"; public static final String RELEASE_NOTES_VERSION = "version"; public static final String DEFAULT_WIZARD_FLOW = "app-wizard"; @Nonnull private final Context context; public CalculatorWizards(@Nonnull Context context) { this.context = context; } @Nonnull static WizardFlow newDefaultWizardFlow() { final List<WizardStep> wizardSteps = new ArrayList<WizardStep>(); for (WizardStep wizardStep : CalculatorWizardStep.values()) { if (wizardStep != welcome && wizardStep != last && wizardStep.isVisible()) { wizardSteps.add(wizardStep); } } return new ListWizardFlow(wizardSteps); } @Nonnull static WizardFlow newReleaseNotesWizardFlow(@Nonnull Context context, @Nullable Bundle arguments) { final List<WizardStep> wizardSteps = new ArrayList<WizardStep>(); final int startVersion = arguments != null ? arguments.getInt(RELEASE_NOTES_VERSION, 0) : 0; List<Integer> versions = ReleaseNotes.getReleaseNotesVersions(context, startVersion); final int size = versions.size(); if (size > 7) { versions = versions.subList(0, 7); } for (Integer version : versions) { switch (version) { case ChooseThemeReleaseNoteStep.VERSION_CODE: wizardSteps.add(new ChooseThemeReleaseNoteStep(version)); break; default: wizardSteps.add(new ReleaseNoteStep(version)); break; } } return new ListWizardFlow(wizardSteps); } @Nonnull static WizardFlow newFirstTimeWizardFlow() { final List<WizardStep> wizardSteps = new ArrayList<WizardStep>(); for (WizardStep wizardStep : CalculatorWizardStep.values()) { if (wizardStep.isVisible()) { wizardSteps.add(wizardStep); } } return new ListWizardFlow(wizardSteps); } @Nonnull @Override public Class<? extends Activity> getActivityClassName() { return WizardActivity.class; } @Nonnull @Override public Wizard getWizard(@Nullable String name, @Nullable Bundle arguments) { if (name == null) { return getWizard(FIRST_TIME_WIZARD, arguments); } if (FIRST_TIME_WIZARD.equals(name)) { return newBaseWizard(FIRST_TIME_WIZARD, newFirstTimeWizardFlow()); } else if (DEFAULT_WIZARD_FLOW.equals(name)) { return newBaseWizard(DEFAULT_WIZARD_FLOW, newDefaultWizardFlow()); } else if (RELEASE_NOTES.equals(name)) { return newBaseWizard(RELEASE_NOTES, newReleaseNotesWizardFlow(context, arguments)); } else { throw new IllegalArgumentException("Wizard flow " + name + " is not supported"); } } @Nonnull @Override public Wizard getWizard(@Nullable String name) throws IllegalArgumentException { return getWizard(name, null); } @Nonnull private BaseWizard newBaseWizard(@Nonnull String name, @Nonnull WizardFlow flow) { return new BaseWizard(name, context, flow); } }
[ "se.solovyev@gmail.com" ]
se.solovyev@gmail.com
98282586bb32c87f2510a3cddaea07aa334c6fd5
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/TemperatureController4876.java
867daaf28a25761b71e775bd2375ff2ea72d7b58
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
371
java
package syncregions; public class TemperatureController4876 { public int execute(int temperature4876, int targetTemperature4876) { //sync _bfpnFUbFEeqXnfGWlV4876, behaviour 1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
b343f21f3a1cad0dfe5e020f56dc0e6e7efbfe51
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/hazelcast/2015/4/RemoteEventPacketProcessor.java
f441a5b1bc161ffff7b2d33f63d362619419c5e9
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
1,557
java
/* * Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hazelcast.spi.impl.eventservice.impl; import com.hazelcast.nio.Packet; import com.hazelcast.nio.serialization.Data; import com.hazelcast.util.executor.StripedRunnable; public class RemoteEventPacketProcessor extends EventPacketProcessor implements StripedRunnable { private EventServiceImpl eventService; private Packet packet; public RemoteEventPacketProcessor(EventServiceImpl eventService, Packet packet) { super(eventService, null, packet.getPartitionId()); this.eventService = eventService; this.packet = packet; } @Override public void run() { try { Data data = packet.getData(); EventPacket eventPacket = (EventPacket) eventService.nodeEngine.toObject(data); process(eventPacket); } catch (Exception e) { eventService.logger.warning("Error while logging processing event", e); } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
8119133d7e58232f5f14dae84270fd9b0b9435ce
63da595a4e74145e86269e74e46c98ad1c1bcad3
/java/com/genscript/gsscm/common/util/MoreDetailUtil.java
d636318d71bebca9f9061069dfa1b13ab0143cc9
[]
no_license
qcamei/scm
4f2cec86fedc3b8dc0f1cc1649e9ef3be687f726
0199673fbc21396e3077fbc79eeec1d2f9bd65f5
refs/heads/master
2020-04-27T19:38:19.460288
2012-09-18T07:06:04
2012-09-18T07:06:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,876
java
package com.genscript.gsscm.common.util; public class MoreDetailUtil { private static final String customService = "customService"; private static final String peptide = "peptide"; private static final String gene = "gene"; private static final String muta = "muta"; private static final String mutaLib = "mutaLib"; private static final String orfClone = "orfClone"; private static final String rna = "rna"; private static final String cloning = "cloning"; private static final String plasmid = "plasmid"; private static final String antibody = "antibody"; private static final String arrayPeptide = "arrayPeptide"; private static final String librayPeptide = "librayPeptide"; private static final String oligo = "oligo"; private static final String sequencing = "sequencing"; private static final String pro = "pro"; private static final String prosub = "prosub"; private static final String geneSynthesis = "geneSynthesis"; private static final String mutagenesis = "mutagenesis"; private static final String custCloning = "custCloning"; private static final String pkgService = "pkgService"; private static final String plasmidPreparation = "plasmidPreparation"; private static final String Antibody_Pep = "Antibody-Pep"; public static String getShow(Integer clsId) { if (MoreDetailUtil.isProteinGroupService(clsId)) { if(MoreDetailUtil.isProteinGroupParent(clsId)){ return pro; }else{ return prosub; } } String show = ""; switch (clsId) { case -1: show = customService; break; case 1: show = peptide; break; case 3: show = gene; break; case 4: show = muta; break; case 5: show = mutaLib; break; case 6: show = orfClone; break; case 7: show = rna; break; case 8: show = rna; break; case 9: show = cloning; break; case 10: show = plasmid; break; case 11: show = antibody; break; case 12: show = antibody; break; case 28: show = antibody; break; case 29: show = customService; break; case 30: show = arrayPeptide; break; case 31: show = librayPeptide; break; case 34: show = oligo; break; case 35: show = customService; break; case 36: show = customService; break; case 37: show = customService; break; case 38: show = customService; break; case 39: show = customService; break; case 40: show = sequencing; break; case 42: show = customService; break; default: break; } return show; } // 判断是否是属于Protein&Bioprocess&Pharmeceutical&Antibody drug public static boolean isProteinGroupService(Integer clsId) { if (clsId == null) { return false; } int clsIdIntValue = clsId.intValue(); if (clsIdIntValue == 2 || clsIdIntValue == 13 || clsIdIntValue == 14 || clsIdIntValue == 15 || clsIdIntValue == 16 || clsIdIntValue == 17 || clsIdIntValue == 18 || clsIdIntValue == 19 || clsIdIntValue == 32 || clsIdIntValue == 33) { return true; } else { return false; } } // 判断是否是属于Protein&Bioprocess&Pharmeceutical&Antibody drug public static boolean isProteinGroupParent(Integer clsId) { if (clsId == null) { return false; } int clsIdIntValue = clsId.intValue(); if (clsIdIntValue == 2 || clsIdIntValue == 14 || clsIdIntValue == 16 || clsIdIntValue == 18) { return true; } else { return false; } } // 判断是否是属于Protein&Bioprocess&Pharmeceutical&Antibody drug step public static boolean isProteinGroupStep(Integer clsId) { if (clsId == null) { return false; } int clsIdIntValue = clsId.intValue(); if (clsIdIntValue == 13 || clsIdIntValue == 15 || clsIdIntValue == 17 || clsIdIntValue == 19) { return true; } else { return false; } } /** * 判断是否是父item * * @param clsId * @return */ public static boolean isOnlyParent(Integer clsId) { //判断是否是属于Protein&Bioprocess&Pharmeceutical&Antibody drug 的父级service if(MoreDetailUtil.isProteinGroupParent(clsId)){ return true; } String show = MoreDetailUtil.getShow(clsId); if (show.equals(mutaLib) || show.equals(muta) || show.equals(gene) || show.equals(rna) || show.equals(oligo) || show.equals(sequencing) || show.equals(orfClone)) { return true; } else { return false; } } public static String getServiceNameByClsId(Integer clsId) { if (MoreDetailUtil.isProteinGroupService(clsId)) { return pkgService; } String serviceName = ""; switch (clsId) { case -1: serviceName = customService; break; case 1: serviceName = peptide; break; case 3: serviceName = geneSynthesis; break; case 4: serviceName = mutagenesis; break; case 5: serviceName = mutaLib; break; case 6: serviceName = orfClone; break; case 7: serviceName = rna; break; case 8: serviceName = rna; break; case 9: serviceName = custCloning; break; case 10: serviceName = plasmidPreparation; break; case 11: serviceName = antibody; break; case 12: serviceName = antibody; break; case 28: serviceName = antibody; break; case 29: serviceName = customService; break; case 30: serviceName = arrayPeptide; break; case 31: serviceName = librayPeptide; break; case 34: serviceName = oligo; break; case 35: serviceName = customService; break; case 36: serviceName = customService; break; case 37: serviceName = customService; break; case 38: serviceName = customService; break; case 39: serviceName = customService; break; case 40: serviceName = sequencing; break; case 42: serviceName = customService; break; default: break; } return serviceName; } public static String getIntmdKeyword(String serviceName) { String intmdKeyword = ""; if (serviceName.equals(peptide)) { intmdKeyword = peptide; } else if (serviceName.equals(geneSynthesis)) { intmdKeyword = ""; } else if (serviceName.equals(mutagenesis)) { intmdKeyword = ""; } else if (serviceName.equals(custCloning)) { intmdKeyword = "CloningStrategy"; } else if (serviceName.equals(plasmidPreparation)) { intmdKeyword = plasmidPreparation; } else if(serviceName.equals(antibody)){ intmdKeyword = antibody; } else if(serviceName.equals(Antibody_Pep)){ intmdKeyword = Antibody_Pep; } else if(serviceName.equals(oligo)){ intmdKeyword = oligo; } else if(serviceName.equals(customService)){ intmdKeyword = "Custom Service"; } else if(serviceName.equals("PRE-IMMUNE")){ intmdKeyword = "PRE-IMMUNE"; } else if (serviceName.equals(mutaLib)) { intmdKeyword = "Mutation Libraries"; } return intmdKeyword; } public static String getDefaultAntigenType(){ return "GenScript Synthesized Peptide"; } }
[ "253479240@qq.com" ]
253479240@qq.com
8b74ea921d2c677d046edd6e231e3d057c3c8cf1
c20c3cb1699f726fc285a6917d0ee673915f5b06
/MogooPing/src/com/mogoo/ping/ctrl/TabWidgetController.java
c09b48cb0bad550ad115de139671abac77f3b302
[ "Apache-2.0" ]
permissive
zoozooll/MyExercise
35a18c0ead552d5be45f627066a5066f6cc8c99b
1be14e0252babb28e32951fa1e35fc867a6ac070
refs/heads/master
2023-04-04T04:24:14.275531
2021-04-18T15:01:03
2021-04-18T15:01:03
108,665,215
2
0
null
null
null
null
UTF-8
Java
false
false
7,557
java
package com.mogoo.ping.ctrl; import com.mogoo.ping.R; import com.mogoo.ping.ctrl.RemoteApksManager.OnRemoteDataSyncListener; import com.mogoo.ping.model.ApksDao; import com.mogoo.ping.model.DataBaseConfig; import com.mogoo.ping.utils.UsedDataManager; import com.mogoo.ping.vo.UsedActivityItem; import android.app.Activity; import android.database.Cursor; import android.text.format.DateFormat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView; import android.widget.BaseAdapter; import android.widget.TabHost; import android.widget.TabHost.OnTabChangeListener; import android.widget.TabWidget; import android.widget.TextView; @Deprecated public class TabWidgetController implements OnTabChangeListener, OnRemoteDataSyncListener { private final static String TAG = "TabWidgetController"; private final static String TAB_SPEC_APPLICATIONS = "Applications"; private final static String TAB_SPEC_GAMES = "Games"; private final static String TAB_SPEC_WEB = "Web"; private Activity mActivity; private TabHost mTabHost; private TabWidget mTabWidget; private ViewGroup layout_tab_content_applications; private ViewGroup layout_tab_content_game; private WebView webview_tab_content_favorite; private LayoutInflater inflater; private TabContentController mTabContentApplicationsController; private TabContentController mTabContentGamesController; private WebViewController mWebViewController; private SoftwaresAdapter applicationsLastedAdapter; private SoftwaresAdapter applicationsRecomendAdapter; private BaseAdapter applicationsUsedAdapter; private SoftwaresAdapter gamesLastedAdapter; private SoftwaresAdapter gamesRecomendAdapter; private BaseAdapter gamesUsedAdapter; public TabWidgetController(Activity activity,TabHost tabHost, TabWidget tabWidget) { super(); mActivity = activity; mTabHost = tabHost; mTabWidget = tabWidget; inflater = LayoutInflater.from(activity); init(); } private void init() { TextView tView = new TextView(mActivity); tView.setBackgroundResource(R.drawable.tab_title_applications_selector); mTabHost.addTab(mTabHost.newTabSpec(TAB_SPEC_APPLICATIONS).setIndicator(tView) .setContent(R.id.layout_tab_content_applications)); tView = new TextView(mActivity); tView.setBackgroundResource(R.drawable.tab_title_games_selector); mTabHost.addTab(mTabHost.newTabSpec(TAB_SPEC_GAMES).setIndicator(tView) .setContent(R.id.layout_tab_content_game)); tView = new TextView(mActivity); tView.setBackgroundResource(R.drawable.tab_title_web_selector); mTabHost.addTab(mTabHost.newTabSpec(TAB_SPEC_WEB).setIndicator(tView) .setContent(R.id.webview_tab_content_favorite)); layout_tab_content_applications = (ViewGroup) mTabHost.findViewById(R.id.layout_tab_content_applications); layout_tab_content_game = (ViewGroup) mTabHost.findViewById(R.id.layout_tab_content_game); layout_tab_content_game.setVisibility(View.GONE); webview_tab_content_favorite = (WebView) mTabHost.findViewById(R.id.webview_tab_content_favorite); webview_tab_content_favorite.setVisibility(View.GONE); Cursor cursor = ApksDao.getInstance(mActivity).queryAllCursorTable( DataBaseConfig.ApplicationsLastedTable.TABLE_NAME); applicationsLastedAdapter = new SoftwaresAdapter(mActivity, cursor); Cursor cursor1 = ApksDao.getInstance(mActivity).queryAllCursorTable( DataBaseConfig.ApplicationsRecomendTable.TABLE_NAME); applicationsRecomendAdapter = new SoftwaresAdapter(mActivity, cursor1); applicationsUsedAdapter = new SoftwaresUsedAdapter<UsedActivityItem>( mActivity, UsedDataManager.getFullyUsedApks(mActivity)); mTabContentApplicationsController = new TabContentController(mActivity, mTabHost, layout_tab_content_applications); mTabContentApplicationsController.setGridViewsAdapter( applicationsLastedAdapter, applicationsRecomendAdapter, applicationsUsedAdapter); mTabContentApplicationsController.setContentThreadIndexes( RemoteApksManager.TAG_APPLICATIONS_LASTED, RemoteApksManager.TAG_APPLICATIONS_RECOMEND); Cursor cursor2 = ApksDao.getInstance(mActivity).queryAllCursorTable( DataBaseConfig.GamesLastedTable.TABLE_NAME); gamesLastedAdapter = new SoftwaresAdapter(mActivity, cursor2); Cursor cursor3 = ApksDao.getInstance(mActivity).queryAllCursorTable( DataBaseConfig.GamesRecomendTable.TABLE_NAME); gamesRecomendAdapter = new SoftwaresAdapter(mActivity, cursor3); mTabContentGamesController = new TabContentController(mActivity, mTabHost, layout_tab_content_game); mTabContentGamesController.setGridViewsAdapter(gamesLastedAdapter, gamesRecomendAdapter, applicationsUsedAdapter); mTabContentGamesController.setContentThreadIndexes( RemoteApksManager.TAG_GAME_LASTED, RemoteApksManager.TAG_GAME_RECOMEND); mWebViewController = new WebViewController(webview_tab_content_favorite); mTabHost.setCurrentTab(0); //onTabChanged(TAB_SPEC_APPLICATIONS); mTabHost.setOnTabChangedListener(this); } @Override public void onTabChanged(String tabId) { if (TAB_SPEC_APPLICATIONS.endsWith(tabId)) { mTabContentApplicationsController.beginShowingInfront(TAB_SPEC_APPLICATIONS); } else if (TAB_SPEC_GAMES.endsWith(tabId)) { mTabContentGamesController.beginShowingInfront(TAB_SPEC_GAMES); } else if (TAB_SPEC_WEB.endsWith(tabId)) { mWebViewController.beginShowingInfront(); } } @Override public void onSyncSuccess(Cursor cursor, int tag) { switch (tag) { case RemoteApksManager.TAG_APPLICATIONS_LASTED: applicationsLastedAdapter.changeCursor(cursor); break; case RemoteApksManager.TAG_APPLICATIONS_RECOMEND: applicationsRecomendAdapter.changeCursor(cursor); break; case RemoteApksManager.TAG_GAME_LASTED: gamesLastedAdapter.changeCursor(cursor); break; case RemoteApksManager.TAG_GAME_RECOMEND: gamesRecomendAdapter.changeCursor(cursor); break; default: throw new RuntimeException(); } String format = mActivity.getResources().getString(R.string.toast_update_success); CharSequence dateStr = format + DateFormat.format(mActivity.getResources().getString(R.string.toast_update_data_format), System.currentTimeMillis()); /*Toast toast = Toast.makeText(mActivity, dateStr, Toast.LENGTH_SHORT); toast.setGravity(Gravity.BOTTOM, 0, 0); toast.show();*/ ToastController.makeToast(mActivity, dateStr); } @Override public void onSyncFail() { /*Toast toast = Toast.makeText(mActivity, mActivity.getResources().getString(R.string.toast_update_fail), Toast.LENGTH_SHORT); toast.setGravity(Gravity.BOTTOM, 0, 0); toast.show();*/ ToastController.makeToast(mActivity, R.string.toast_update_fail); } public void onStart() { if (TAB_SPEC_APPLICATIONS.equals(mTabHost.getCurrentTabTag())) { mTabContentApplicationsController.onStart(); } else if (TAB_SPEC_GAMES.equals(mTabHost.getCurrentTabTag())) { mTabContentGamesController.onStart(); } else if (TAB_SPEC_WEB.equals(mTabHost.getCurrentTabTag())) { mWebViewController.beginShowingInfront(); } } public void onStop() { if (TAB_SPEC_APPLICATIONS.equals(mTabHost.getCurrentTabTag())) { mTabContentApplicationsController.onStop(); } else if (TAB_SPEC_GAMES.equals(mTabHost.getCurrentTabTag())) { mTabContentGamesController.onStop(); } else if (TAB_SPEC_WEB.equals(mTabHost.getCurrentTabTag())) { //mWebViewController.beginShowingInfront(); } UsedDataManager.saveCurrentUsedApkitems(mActivity); } public void onDestroy() { } }
[ "kangkang365@gmail.com" ]
kangkang365@gmail.com
142dd841d7a5350078930565e3e18b57859f5b02
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_07fa0dea17ec10f16743323cfdb522d362529b04/SelectBusStationActivity/13_07fa0dea17ec10f16743323cfdb522d362529b04_SelectBusStationActivity_s.java
46776a54f30bcd6557bdc3580730685d27c427d5
[]
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,658
java
package com.papagiannis.tuberun; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.List; import com.google.android.maps.GeoPoint; import com.google.android.maps.MapActivity; import com.google.android.maps.MapController; import com.google.android.maps.MapView; import com.google.android.maps.Overlay; import com.google.android.maps.OverlayItem; import android.app.Dialog; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import com.papagiannis.tuberun.fetchers.*; public class SelectBusStationActivity extends MeMapActivity implements OnClickListener, LocationListener, Observer{ StationsBusFetcher fetcher; boolean has_moved=false; boolean has_moved_accurate=false; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); fetcher=new StationsBusFetcher(this); fetcher.registerCallback(this); showDialog(0); if (lastKnownLocation!=null) { GeoPoint gp=new GeoPoint((int)(lastKnownLocation.getLatitude()*1000000), (int)(lastKnownLocation.getLongitude()*1000000)); mapController.setCenter(gp); fetcher.setLocation(lastKnownLocation); fetcher.update(); } else { mapController.setCenter(gp_london); } } private Dialog wait_dialog; @Override protected Dialog onCreateDialog(int id) { wait_dialog = ProgressDialog.show(this, "", "Fetching location. Please wait...", true); return wait_dialog; } @Override protected void onPause() { super.onPause(); fetcher.abort(); } @Override protected boolean isRouteDisplayed() { return true; } public void onClick (View v) { Intent i=null; switch (v.getId()) { case R.id.button_status: i=new Intent(this, StatusActivity.class); startActivity(i); break; case R.id.button_departures: i=new Intent(this, SelectLineActivity.class); i.putExtra("type", "departures"); startActivity(i); break; } } ArrayList<BusStation> prev_result=new ArrayList<BusStation>(); /** Called when the background thread has finished the calculation of nearby stations **/ @Override public void update() { wait_dialog.dismiss(); ArrayList<BusStation> result=fetcher.getResult(); if (prev_result.size()!=result.size()) { List<Overlay> mapOverlays = mapView.getOverlays(); //mapOverlays.clear(); Drawable drawable = this.getResources().getDrawable(R.drawable.buses); BusStationsOverlay itemizedoverlay = new BusStationsOverlay(drawable, this); for (BusStation s: result){ GeoPoint point = new GeoPoint(s.getLatitude(),s.getLongtitude()); OverlayItem overlayitem = new OverlayItem(point, s.getCode(), s.getName()+" (moving "+s.getHeading()+")"); itemizedoverlay.addOverlay(overlayitem); } mapOverlays.add(itemizedoverlay); mapView.postInvalidate(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
33a997d0e004a7c203acd8f49dc2a92a0de7ddd0
4192d19e5870c22042de946f211a11c932c325ec
/hi4springJDBC-20110823/src/org/hi/base/menu/action/MenuPageInfo.java
e6c0d700bb92618dde09cbc06c1d3bfe4fedd9be
[]
no_license
arthurxiaohz/ic-card
1f635d459d60a66ebda272a09ba65e616d2e8b9e
5c062faf976ebcffd7d0206ad650f493797373a4
refs/heads/master
2021-01-19T08:15:42.625340
2013-02-01T06:57:41
2013-02-01T06:57:41
39,082,049
2
1
null
null
null
null
UTF-8
Java
false
false
4,573
java
/* */ package org.hi.base.menu.action; /* */ /* */ import org.hi.base.organization.action.HiUserPageInfo; /* */ import org.hi.framework.web.PageInfoView; /* */ /* */ public class MenuPageInfo extends PageInfoView /* */ { /* */ protected Integer f_id; /* */ protected String f_id_op; /* */ protected String f_menuName; /* */ protected String f_menuName_op; /* */ protected String f_displayRef; /* */ protected String f_displayRef_op; /* */ protected String f_description; /* */ protected String f_description_op; /* */ protected Double f_sequence; /* */ protected String f_sequence_op; /* */ protected Integer f_menuType; /* */ protected String f_menuType_op; /* */ protected MenuPageInfo parentMenu; /* */ protected HiUserPageInfo creator; /* */ /* */ public Integer getF_id() /* */ { /* 28 */ return this.f_id; /* */ } /* */ /* */ public void setF_id(Integer f_id) { /* 32 */ this.f_id = f_id; /* */ } /* */ /* */ public String getF_id_op() { /* 36 */ return this.f_id_op; /* */ } /* */ /* */ public void setF_id_op(String f_id_op) { /* 40 */ this.f_id_op = f_id_op; /* */ } /* */ /* */ public String getF_menuName() { /* 44 */ return this.f_menuName; /* */ } /* */ /* */ public void setF_menuName(String f_menuName) { /* 48 */ this.f_menuName = f_menuName; /* */ } /* */ /* */ public String getF_menuName_op() { /* 52 */ return this.f_menuName_op; /* */ } /* */ /* */ public void setF_menuName_op(String f_menuName_op) { /* 56 */ this.f_menuName_op = f_menuName_op; /* */ } /* */ /* */ public String getF_displayRef() { /* 60 */ return this.f_displayRef; /* */ } /* */ /* */ public void setF_displayRef(String f_displayRef) { /* 64 */ this.f_displayRef = f_displayRef; /* */ } /* */ /* */ public String getF_displayRef_op() { /* 68 */ return this.f_displayRef_op; /* */ } /* */ /* */ public void setF_displayRef_op(String f_displayRef_op) { /* 72 */ this.f_displayRef_op = f_displayRef_op; /* */ } /* */ /* */ public String getF_description() { /* 76 */ return this.f_description; /* */ } /* */ /* */ public void setF_description(String f_description) { /* 80 */ this.f_description = f_description; /* */ } /* */ /* */ public String getF_description_op() { /* 84 */ return this.f_description_op; /* */ } /* */ /* */ public void setF_description_op(String f_description_op) { /* 88 */ this.f_description_op = f_description_op; /* */ } /* */ /* */ public Double getF_sequence() { /* 92 */ return this.f_sequence; /* */ } /* */ /* */ public void setF_sequence(Double f_sequence) { /* 96 */ this.f_sequence = f_sequence; /* */ } /* */ /* */ public String getF_sequence_op() { /* 100 */ return this.f_sequence_op; /* */ } /* */ /* */ public void setF_sequence_op(String f_sequence_op) { /* 104 */ this.f_sequence_op = f_sequence_op; /* */ } /* */ /* */ public Integer getF_menuType() { /* 108 */ return this.f_menuType; /* */ } /* */ /* */ public void setF_menuType(Integer f_menuType) { /* 112 */ this.f_menuType = f_menuType; /* */ } /* */ /* */ public String getF_menuType_op() { /* 116 */ return this.f_menuType_op; /* */ } /* */ /* */ public void setF_menuType_op(String f_menuType_op) { /* 120 */ this.f_menuType_op = f_menuType_op; /* */ } /* */ /* */ public MenuPageInfo getParentMenu() { /* 124 */ return this.parentMenu; /* */ } /* */ /* */ public void setParentMenu(MenuPageInfo parentMenu) { /* 128 */ this.parentMenu = parentMenu; /* */ } /* */ public HiUserPageInfo getCreator() { /* 131 */ return this.creator; /* */ } /* */ /* */ public void setCreator(HiUserPageInfo creator) { /* 135 */ this.creator = creator; /* */ } /* */ } /* Location: C:\Users\Angi\Desktop\framework-boss-core-1.0.1.jar * Qualified Name: org.hi.base.menu.action.MenuPageInfo * JD-Core Version: 0.6.0 */
[ "Angi.Wang.AFE@gmail.com" ]
Angi.Wang.AFE@gmail.com
a9014d897b271cd2b6909fefe68b9ad6bf7f712f
15967180997939687404c39475ad5073480ed675
/src/main/java/io/jboot/component/swagger/annotation/SwaggerAPI.java
c49b55c11399045bbf7747b17cdd270c57ebaef3
[ "Apache-2.0" ]
permissive
jekey/jboot
4c9fe5258c9af44a0c7e1f83a5fc06f9f5dfacd4
4869553f52d5dd8dd15577854af0f40838633bba
refs/heads/master
2021-01-06T20:44:40.055251
2017-11-23T08:18:41
2017-11-23T08:18:41
99,553,857
1
0
null
2017-11-23T08:18:42
2017-08-07T08:14:18
Java
UTF-8
Java
false
false
1,585
java
/** * Copyright (c) 2015-2017, Michael Yang 杨福海 (fuhai999@gmail.com). * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.jboot.component.swagger.annotation; import java.lang.annotation.*; @Documented @Target(ElementType.METHOD) @Inherited @Retention(RetentionPolicy.RUNTIME) public @interface SwaggerAPI { public static final String TYPE_JSON = "application/json"; public static final String TYPE_XML = "application/xml"; public static final String TYPE_FORM_DATA = "multipart/form-data"; public static final String TYPE_NORMAL = "application/x-www-form-urlencoded"; public static final String METHOD_GET = "get"; public static final String METHOD_POST = "post"; String path() default ""; String apisName() default ""; String summary() default ""; String description() default ""; String operationId() default ""; String method() default METHOD_GET; String contentType() default TYPE_NORMAL; SwaggerParam[] params(); SwaggerResponse response() default @SwaggerResponse; }
[ "fuhai999@gmail.com" ]
fuhai999@gmail.com
f29aa31a9e5c491cdc147d78bdee56f8dd8146b5
cd73733881f28e2cd5f1741fbe2d32dafc00f147
/libs/common-ui/src/main/java/com/hjhq/teamface/common/weight/adapter/ItemFilterAdapter.java
22820aeb2c3e92037564adba997ef3e776f51061
[]
no_license
XiaoJon/20180914
45cfac9f7068ad85dee26e570acd2900796cbcb1
6c0759d8abd898f1f5dba77eee45cbc3d218b2e0
refs/heads/master
2020-03-28T16:48:36.275700
2018-09-14T04:10:27
2018-09-14T04:10:27
148,730,363
0
1
null
null
null
null
UTF-8
Java
false
false
1,064
java
package com.hjhq.teamface.common.weight.adapter; import android.widget.CheckBox; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.hjhq.teamface.basis.R; import com.hjhq.teamface.basis.bean.FilterFieldResultBean; import java.util.List; /** * * @author lx * @date 2017/3/28 */ public class ItemFilterAdapter extends BaseQuickAdapter<FilterFieldResultBean.DataBean.EntrysBean, BaseViewHolder> { public ItemFilterAdapter(List<FilterFieldResultBean.DataBean.EntrysBean> list) { super(R.layout.custom_item_filter, list); } @Override protected void convert(BaseViewHolder helper, FilterFieldResultBean.DataBean.EntrysBean item) { helper.setText(R.id.name, item.getLabel()); helper.setChecked(R.id.check_null, item.isChecked()); helper.addOnClickListener(R.id.check_null); CheckBox checkBox = helper.getView(R.id.check_null); checkBox.setOnCheckedChangeListener((buttonView, isChecked) -> item.setChecked(isChecked)); } }
[ "xiaojun6909@gmail.com" ]
xiaojun6909@gmail.com
6331ef7fffa51f83eead73cebb8617e12fda805a
5f4afbc92a72bd847b8aa9ae95f9be9d706ad7d8
/commons/src/main/java/com/westangel/common/bean/TWeixinProductIdInfo.java
2d07518cbfab08b01a8c5261cc39c8d07df992d8
[]
no_license
331491512/esz
dfc13ba9e142ab1cbacc92cd0bf1b55fec2a05a1
8edd10a74b75d36d3963d2ae64602d02ba548b43
refs/heads/master
2021-04-06T20:31:45.968785
2018-03-16T02:56:36
2018-03-16T02:56:36
125,451,748
1
0
null
null
null
null
UTF-8
Java
false
false
994
java
/** * * @author Da Loong * @date 2016年6月1日 下午5:25:14 */ package com.westangel.common.bean; import java.io.Serializable; /** * @author Da Loong * @date 2016年6月1日 下午5:25:14 */ public class TWeixinProductIdInfo implements Serializable{ /** * */ private static final long serialVersionUID = 1L; private int wxProductId; private int hospitalId; private String wxName; /** * @return the wxProductId */ public int getWxProductId() { return wxProductId; } /** * @param wxProductId the wxProductId to set */ public void setWxProductId(int wxProductId) { this.wxProductId = wxProductId; } /** * @return the hospitalId */ public int getHospitalId() { return hospitalId; } /** * @param hospitalId the hospitalId to set */ public void setHospitalId(int hospitalId) { this.hospitalId = hospitalId; } public String getWxName() { return wxName; } public void setWxName(String wxName) { this.wxName = wxName; } }
[ "zhuguo@qgs-china.com" ]
zhuguo@qgs-china.com
589bb18e27b02ed92763ed61b8a0738e293c8278
642e90aa1c85330cee8bbe8660ca277655bc4f78
/gameserver/src/main/java/l2s/gameserver/network/l2/s2c/ExCloseAPListWnd.java
28a9806a34b16cb8b5a0e13e367d9d4d4a0b8508
[]
no_license
BETAJIb/Studious
ac329f850d8c670d6e355ef68138c9e8fd525986
328e344c2eaa70238c403754566865e51629bd7b
refs/heads/master
2020-04-04T08:41:21.112223
2018-10-31T20:18:49
2018-10-31T20:18:49
155,790,706
0
0
null
null
null
null
UTF-8
Java
false
false
263
java
package l2s.gameserver.network.l2.s2c; /** * @author Bonux **/ public class ExCloseAPListWnd extends L2GameServerPacket { public static final L2GameServerPacket STATIC = new ExCloseAPListWnd(); @Override protected void writeImpl() { // } }
[ "gladiadorse@hotmail.com" ]
gladiadorse@hotmail.com
704670224fe58a8d7d84bfa562ce974406776b9b
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/apache/rocketmq/test/client/producer/querymsg/QueryMsgByIdIT.java
b656462758e6374252ac3b5f38f1a42cab0575e6
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
2,408
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.rocketmq.test.client.producer.querymsg; import org.apache.log4j.Logger; import org.apache.rocketmq.common.message.MessageExt; import org.apache.rocketmq.test.base.BaseConf; import org.apache.rocketmq.test.client.rmq.RMQNormalConsumer; import org.apache.rocketmq.test.client.rmq.RMQNormalProducer; import org.apache.rocketmq.test.util.TestUtils; import org.apache.rocketmq.test.util.VerifyUtils; import org.junit.Assert; import org.junit.Test; public class QueryMsgByIdIT extends BaseConf { private static Logger logger = Logger.getLogger(QueryMsgByIdIT.class); private RMQNormalProducer producer = null; private RMQNormalConsumer consumer = null; private String topic = null; @Test public void testQueryMsg() { int msgSize = 20; producer.send(msgSize); Assert.assertEquals("Not all are sent", msgSize, producer.getAllUndupMsgBody().size()); consumer.getListener().waitForMessageConsume(producer.getAllMsgBody(), BaseConf.consumeTime); Assert.assertEquals("Not all are consumed", 0, VerifyUtils.verify(producer.getAllMsgBody(), consumer.getListener().getAllMsgBody())); MessageExt recvMsg = ((MessageExt) (consumer.getListener().getFirstMsg())); MessageExt queryMsg = null; try { TestUtils.waitForMoment(3000); queryMsg = producer.getProducer().viewMessage(getOffsetMsgId()); } catch (Exception e) { } assertThat(queryMsg).isNotNull(); assertThat(new String(queryMsg.getBody())).isEqualTo(new String(recvMsg.getBody())); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
f9e8bac5e93cdea364ada193838438fe69da799a
fdfffa8cacb572a157ead4a9723f90b25ecfe50c
/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/ExponentialBackoffTest.java
bd607979ab4ea9537c822577e5ab6558ff1e791d
[ "Apache-2.0", "LicenseRef-scancode-gutenberg-2020", "CC0-1.0", "BSD-3-Clause" ]
permissive
apache/ignite
0bc83435a8db46d9c4df000fe05b1c70165b37d4
dbf1c7825d74809cd6859c85a8ac9ed9ac071e39
refs/heads/master
2023-08-31T21:31:04.618489
2023-08-31T19:43:09
2023-08-31T19:43:09
31,006,158
4,806
2,308
Apache-2.0
2023-09-14T18:56:33
2015-02-19T08:00:05
Java
UTF-8
Java
false
false
2,557
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.ignite.internal.processors.cache.persistence.pagemem; import org.junit.Test; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; /** * Tests for {@link ExponentialBackoff}. */ public class ExponentialBackoffTest { /** Starting backoff duration used for test scenarios. */ private static final long STARTING_BACKOFF_NANOS = 1000; /** Backoff ratio used for test scenarios. */ private static final double BACKOFF_RATIO = 1.1; /** The object under test. */ private final ExponentialBackoff backoff = new ExponentialBackoff(STARTING_BACKOFF_NANOS, BACKOFF_RATIO); /***/ @Test public void firstBackoffDurationShouldEqualStartingDuration() { assertThat(backoff.nextDuration(), is(STARTING_BACKOFF_NANOS)); } /***/ @Test public void nextBackoffDurationShouldBeLongerThanPreviousOne() { backoff.nextDuration(); assertThat(backoff.nextDuration(), equalTo((long)(STARTING_BACKOFF_NANOS * BACKOFF_RATIO))); } /***/ @Test public void resetInvocationShouldResetTheBackoffToInitialState() { backoff.nextDuration(); backoff.nextDuration(); backoff.reset(); assertThat(backoff.nextDuration(), is(STARTING_BACKOFF_NANOS)); } /***/ @Test public void resetShouldReturnFalseWhenBackoffIsAlreadyAtInitialState() { assertFalse(backoff.reset()); } /***/ @Test public void resetShouldReturnTrueWhenBackoffIsNotAtInitialState() { backoff.nextDuration(); assertTrue(backoff.reset()); } }
[ "samvimes@yandex.ru" ]
samvimes@yandex.ru
d03fa309051618b759e3da7476c27efeb320e7b7
5d82f3ced50601af2b804cee3cf967945da5ff97
/design-synthesis/coordination-delegates/CD-marketingapplication-basiccommunicationdevice/src/main/java/org/choreos/services/cd/BcdReceiveSmsResponse.java
411be59b40b4afb72c0004bf5f18ca04d63cfe2f
[ "Apache-2.0" ]
permissive
sesygroup/choreography-synthesis-enactment
7f345fe7a9e0288bbde539fc373b43f1f0bd1eb5
6eb43ea97203853c40f8e447597570f21ea5f52f
refs/heads/master
2022-01-26T13:20:50.701514
2020-03-20T12:18:44
2020-03-20T12:18:44
141,552,936
0
1
Apache-2.0
2022-01-06T19:56:05
2018-07-19T09:04:05
Java
UTF-8
Java
false
false
768
java
package org.choreos.services.cd; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Classe Java per bcd_receive_smsResponse complex type. * * <p>Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe. * * <pre> * &lt;complexType name="bcd_receive_smsResponse"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "bcd_receive_smsResponse") public class BcdReceiveSmsResponse { }
[ "alexander.perucci@gmail.com" ]
alexander.perucci@gmail.com
deb7f01095b183b65d0b4c0aed6491bdc51b529e
b1b93a4defa773b73862c525b423ed6f7abcaa62
/jbpm-flow-builder/src/test/java/org/jbpm/process/builder/JavaReturnValueConstraintEvaluatorBuilderTest.java
aedf097716f836c30df3e40aedbdd12195b353d0
[]
no_license
dunnlow/jbpm-2
0d1ff82ec494202d2fbec41cffb592b60edbc402
e7321b9807c666437bdf1c712dd4edf7f00bb9d7
refs/heads/master
2021-01-18T05:36:16.035150
2013-03-10T15:42:42
2013-03-10T15:42:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,053
java
package org.jbpm.process.builder; import java.io.StringReader; import java.util.ArrayList; import java.util.List; import junit.framework.TestCase; import org.drools.common.InternalKnowledgeRuntime; import org.drools.compiler.DialectCompiletimeRegistry; import org.drools.compiler.PackageBuilder; import org.drools.compiler.ReturnValueDescr; import org.drools.definitions.impl.KnowledgePackageImp; import org.drools.lang.descr.ProcessDescr; import org.drools.rule.Package; import org.drools.rule.builder.dialect.java.JavaDialect; import org.jbpm.process.builder.dialect.ProcessDialectRegistry; import org.jbpm.process.builder.dialect.java.JavaReturnValueEvaluatorBuilder; import org.jbpm.process.instance.impl.ReturnValueConstraintEvaluator; import org.jbpm.ruleflow.instance.RuleFlowProcessInstance; import org.jbpm.workflow.core.impl.WorkflowProcessImpl; import org.jbpm.workflow.instance.node.SplitInstance; import org.kie.KnowledgeBase; import org.kie.KnowledgeBaseFactory; import org.kie.definition.KnowledgePackage; import org.kie.runtime.StatefulKnowledgeSession; public class JavaReturnValueConstraintEvaluatorBuilderTest extends TestCase { public void testSimpleReturnValueConstraintEvaluator() throws Exception { final Package pkg = new Package( "pkg1" ); ProcessDescr processDescr = new ProcessDescr(); processDescr.setClassName( "Process1" ); processDescr.setName( "Process1" ); WorkflowProcessImpl process = new WorkflowProcessImpl(); process.setName( "Process1" ); process.setPackageName( "pkg1" ); ReturnValueDescr descr = new ReturnValueDescr(); descr.setText( "return value;" ); PackageBuilder pkgBuilder = new PackageBuilder( pkg ); DialectCompiletimeRegistry dialectRegistry = pkgBuilder.getPackageRegistry( pkg.getName() ).getDialectCompiletimeRegistry(); JavaDialect javaDialect = (JavaDialect) dialectRegistry.getDialect( "java" ); ProcessBuildContext context = new ProcessBuildContext( pkgBuilder, pkg, process, processDescr, dialectRegistry, javaDialect ); pkgBuilder.addPackageFromDrl( new StringReader( "package pkg1;\nglobal Boolean value;" ) ); ReturnValueConstraintEvaluator node = new ReturnValueConstraintEvaluator(); final JavaReturnValueEvaluatorBuilder builder = new JavaReturnValueEvaluatorBuilder(); builder.build( context, node, descr, null ); ProcessDialectRegistry.getDialect(JavaDialect.ID).addProcess( context ); javaDialect.compileAll(); assertEquals( 0, javaDialect.getResults().size() ); final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); List<KnowledgePackage> packages = new ArrayList<KnowledgePackage>(); packages.add( new KnowledgePackageImp(pkgBuilder.getPackage()) ); kbase.addKnowledgePackages( packages ); final StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); ksession.setGlobal( "value", true ); RuleFlowProcessInstance processInstance = new RuleFlowProcessInstance(); processInstance.setKnowledgeRuntime( (InternalKnowledgeRuntime) ksession ); SplitInstance splitInstance = new SplitInstance(); splitInstance.setProcessInstance( processInstance ); assertTrue( node.evaluate( splitInstance, null, null ) ); ksession.setGlobal( "value", false ); assertFalse( node.evaluate( splitInstance, null, null ) ); } }
[ "kris.verlaenen@gmail.com" ]
kris.verlaenen@gmail.com
231a2d57df892a0932bcc39b6107c279318524fd
052980f85449c728ca8d245e92f65706c97a4105
/org/omg/IOP/TAG_ORB_TYPE.java
f574099e08a0b885f50872bca655cd4d99d22911
[]
no_license
Folgerjun/jdk1.8.0_162_src
5592273ef81c4ff19003a4f6b3ddcc4b6f1bdde8
589ced78cfbac34395e3a71680efe91041cb6b1d
refs/heads/master
2020-03-21T22:31:18.002129
2019-01-04T08:59:49
2019-01-04T08:59:49
139,131,641
2
1
null
null
null
null
UTF-8
Java
false
false
1,358
java
package org.omg.IOP; /** * org/omg/IOP/TAG_ORB_TYPE.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u162/10278/corba/src/share/classes/org/omg/PortableInterceptor/IOP.idl * Tuesday, December 19, 2017 8:01:31 PM PST */ public interface TAG_ORB_TYPE { /** * It is often useful in the real world to be able to identify the * particular kind of ORB an object reference is coming from, to work * around problems with that particular ORB, or exploit shared * efficiencies. * <p> * The <code>TAG_ORB_TYPE</code> component has an associated value of * type unsigned long (Java long), encoded as a CDR encapsulation, * designating an ORB type ID allocated by the OMG for the ORB type of the * originating ORB. Anyone may register any ORB types by submitting * a short (one-paragraph) description of the ORB type to the OMG, * and will receive a new ORB type ID in return. A list of ORB type * descriptions and values will be made available on the OMG web server. * <p> * The <code>TAG_ORB_TYPE</code> component can appear at most once in * any IOR profile. For profiles supporting IIOP 1.1 or greater, it * is optionally present. */ public static final int value = (int)(0L); }
[ "ffj0721@163.com" ]
ffj0721@163.com
53b5929950fb1b7182fbb82958fe35e5d0b6d465
f035ec7774d63d40027fa99bcd7e7bd76e8ed304
/java/knowledge/src/main/java/net/rmiImpl2/reference/package-info.java
f2c36117c5473ebb34b3314b66c738ad19f1af7c
[]
no_license
Ravikumar1997/Daily-pracitce
b669c9df2de66a4a93dbdddaaa534bb0bb3daf34
3931bb75b8ae83a28043e136a7331215d566d95e
refs/heads/master
2020-06-01T01:44:01.478225
2019-03-30T07:29:07
2019-03-30T07:29:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
317
java
/** * Created by zzt on 4/11/17. * <p> * <h3>Responsibility</h3> * <li>translate between local and remote object references</li> * <li>create remote references</li> * * @implNote using a remote table to records the correspondence between local object * reference and remote */ package net.rmiImpl2.reference;
[ "zengzt93@gmail.com" ]
zengzt93@gmail.com
d9d9d0c5d3b879baaa5431566f5cb8ebcad9ab83
d3e4601f45428fefd1ca2d7b10ec4834f4725db3
/tool/src/org/antlr/v4/codegen/model/actions/ThisRulePropertyRef_st.java
b022eb74a05b8d248fa69eabe0e809c1c7f8dbc6
[ "BSD-3-Clause" ]
permissive
chrreisinger/antlr4
8a20bd8b3e9c0a111d0011ab1ba9c93a2a1659b5
085dd05bf17f071d22e9d089932884d914dadcdf
refs/heads/master
2021-01-20T23:31:21.956149
2011-08-13T03:51:12
2011-08-13T03:51:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,625
java
/* [The "BSD license"] Copyright (c) 2011 Terence Parr All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 org.antlr.v4.codegen.model.actions; /** */ public class ThisRulePropertyRef_st extends RulePropertyRef { public ThisRulePropertyRef_st(String label) { super(label); } }
[ "parrt@antlr.org" ]
parrt@antlr.org
e01fece8dd8b18d04ebce047cf4440d3686309d5
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
/SCT2/tags/TAG_20120820_Virtual_Time/plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/Root.java
5b5d66b4d258e80a5f1dc4bde662f6185f391aa2
[]
no_license
huybuidac20593/yakindu
377fb9100d7db6f4bb33a3caa78776c4a4b03773
304fb02b9c166f340f521f5e4c41d970268f28e9
refs/heads/master
2021-05-29T14:46:43.225721
2015-05-28T11:54:07
2015-05-28T11:54:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,226
java
/** */ package org.yakindu.sct.model.stext.stext; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Root</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link org.yakindu.sct.model.stext.stext.Root#getRoots <em>Roots</em>}</li> * </ul> * </p> * * @see org.yakindu.sct.model.stext.stext.StextPackage#getRoot() * @model * @generated */ public interface Root extends EObject { /** * Returns the value of the '<em><b>Roots</b></em>' containment reference list. * The list contents are of type {@link org.yakindu.sct.model.stext.stext.DefRoot}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Roots</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Roots</em>' containment reference list. * @see org.yakindu.sct.model.stext.stext.StextPackage#getRoot_Roots() * @model containment="true" * @generated */ EList<DefRoot> getRoots(); } // Root
[ "a.muelder@googlemail.com" ]
a.muelder@googlemail.com
d51a26988636a467efaa58bda60b5089801d9b1a
028cbe18b4e5c347f664c592cbc7f56729b74060
/external/modules/derby/10.10.2.0/java/testing/org/apache/derbyTesting/unitTests/harness/UnitTestConstants.java
b00f139c8b26778ad76cd5c6aec0a22bb23f0e69
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-generic-export-compliance" ]
permissive
dmatej/Glassfish-SVN-Patched
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
269e29ba90db6d9c38271f7acd2affcacf2416f1
refs/heads/master
2021-05-28T12:55:06.267463
2014-11-11T04:21:44
2014-11-11T04:21:44
23,610,469
1
0
null
null
null
null
UTF-8
Java
false
false
2,900
java
/* Derby - Class org.apache.derbyTesting.unitTests.harness.UnitTestConstants 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.derbyTesting.unitTests.harness; /** * UnitTestConstants contains the constants for the * unit tests to use when registering and running * the tests. * */ public interface UnitTestConstants { /** * the duration of a test can be from MICRO to FOREVER. * <p> * MICRO means the test is practically nothing more than * the call; a simple field examination, for example. */ static final int DURATION_MICRO = 0; /** * SHORT means the test is less than a second. */ static final int DURATION_SHORT = 1; /** * MEDIUM means the test is less than 30 seconds. */ static final int DURATION_MEDIUM = 2; /** * LONG means the test might take 1-5 minutes. */ static final int DURATION_LONG = 3; /** * FOREVER means the test takes more than 5 minutes, * or could loop forever if it fails. */ static final int DURATION_FOREVER = 4; /** * The TYPE of test says what sort of completeness it * tests; its thoroughness. * <p> * Note the types given here are ordered from simple to * comprehensive. Each category of tests includes * tests in earlier, simpler catagories. Thus all SANITY * tests are also BASIC tests. */ /** * SANITY means the test is simply a check that * the system is running. Little more than a consistency * check would be done. */ static final int TYPE_SANITY = 0; /** * BASIC means the test is a basic check that * the system is working. A single, very common construct * would be verified to be working. */ static final int TYPE_BASIC = 1; /** * COMMON means the test verify that the most common * cases of use of this object are working properly. */ static final int TYPE_COMMON = 2; /** * COMPLETE means that the tests verify that the * object is performing all expected functionality * correctly. */ static final int TYPE_COMPLETE = 3; }// UnitTestConstants
[ "snjezana@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5" ]
snjezana@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
84c04f1a8786772e00b36f30ebeb6ccf0e599d2a
f7aa72b4d8fe2aaf279053302ae8463d71b65308
/app/src/androidTest/java/br/com/teste/primeiroprojeto/ExampleInstrumentedTest.java
0a1c27ff2327530259c2ec8be884093b9224fcf1
[]
no_license
willtet/PrimeiroProjeto
dd20dd835fd497f01cdd95144b637f1c2308fd9d
af14c0c78e2e5020156ad7d4005964b08df2cbaa
refs/heads/master
2020-03-17T15:03:56.422263
2018-05-16T16:49:28
2018-05-16T16:49:28
133,697,077
0
0
null
null
null
null
UTF-8
Java
false
false
740
java
package br.com.teste.primeiroprojeto; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("br.com.teste.primeiroprojeto", appContext.getPackageName()); } }
[ "you@example.com" ]
you@example.com
942149510ceb0b68f5b71de912cdde6fb0f60a11
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipsejdt_cluster/47869/src_1.java
2e04d62f76f2ea469818b9a0846652fdcd06e342
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,045
java
/******************************************************************************* * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v0.5 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v05.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.jdt.internal.compiler.ast; import org.eclipse.jdt.internal.compiler.IAbstractSyntaxTreeVisitor; import org.eclipse.jdt.internal.compiler.impl.*; import org.eclipse.jdt.internal.compiler.codegen.*; import org.eclipse.jdt.internal.compiler.flow.*; import org.eclipse.jdt.internal.compiler.lookup.*; public class LocalDeclaration extends AbstractVariableDeclaration { public LocalVariableBinding binding; public LocalDeclaration( Expression expr, char[] name, int sourceStart, int sourceEnd) { initialization = expr; this.name = name; this.sourceStart = sourceStart; this.sourceEnd = sourceEnd; if (initialization != null) { this.declarationSourceEnd = initialization.sourceEnd; this.declarationEnd = initialization.sourceEnd; } else { this.declarationEnd = sourceEnd; } } public FlowInfo analyseCode( BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { // record variable initialization if any if (flowInfo.isReachable()) { bits |= IsLocalDeclarationReachableMASK; // only set if actually reached } if (initialization == null) return flowInfo; flowInfo = initialization .analyseCode(currentScope, flowContext, flowInfo) .unconditionalInits(); flowInfo.markAsDefinitelyAssigned(binding); return flowInfo; } public void checkModifiers() { //only potential valid modifier is <<final>> if (((modifiers & AccJustFlag) | AccFinal) != AccFinal) //AccModifierProblem -> other (non-visibility problem) //AccAlternateModifierProblem -> duplicate modifier //AccModifierProblem | AccAlternateModifierProblem -> visibility problem" // -x-1 returns the bitInvert modifiers = (modifiers & (-AccAlternateModifierProblem - 1)) | AccModifierProblem; } /** * Code generation for a local declaration: * i.e.&nbsp;normal assignment to a local variable + unused variable handling */ public void generateCode(BlockScope currentScope, CodeStream codeStream) { if ((bits & IsReachableMASK) == 0) { return; } int pc = codeStream.position; Constant inlinedValue; // something to initialize? if (binding.resolvedPosition != -1) { codeStream.addVisibleLocalVariable(binding); } if (initialization != null) { // initialize to constant value? if ((inlinedValue = initialization.constant) != NotAConstant) { // forget initializing unused or final locals set to constant value (final ones are inlined) if (binding.resolvedPosition != -1) { // may need to preserve variable int initPC = codeStream.position; codeStream.generateConstant(inlinedValue, initialization.implicitConversion); codeStream.recordPositionsFrom(initPC, initialization.sourceStart); codeStream.store(binding, false); binding.recordInitializationStartPC(codeStream.position); // codeStream.lastInitStateIndexWhenRemovingInits = -2; // reinitialize remove index // codeStream.lastInitStateIndexWhenAddingInits = -2; // reinitialize add index } } else { // initializing to non-constant value initialization.generateCode(currentScope, codeStream, true); // if binding unused generate then discard the value if (binding.resolvedPosition != -1) { codeStream.store(binding, false); if (binding.initializationCount == 0) { /* Variable may have been initialized during the code initializing it e.g. int i = (i = 1); */ binding.recordInitializationStartPC(codeStream.position); // codeStream.lastInitStateIndexWhenRemovingInits = -2; // reinitialize remove index // codeStream.lastInitStateIndexWhenAddingInits = -2; // reinitialize add index } } else { if ((binding.type == LongBinding) || (binding.type == DoubleBinding)) { codeStream.pop2(); } else { codeStream.pop(); } } } } codeStream.recordPositionsFrom(pc, this.sourceStart); } public String name() { return String.valueOf(name); } public void resolve(BlockScope scope) { // create a binding and add it to the scope TypeBinding tb = type.resolveType(scope); checkModifiers(); if (tb != null) { if (tb == VoidBinding) { scope.problemReporter().variableTypeCannotBeVoid(this); return; } if (tb.isArrayType() && ((ArrayBinding) tb).leafComponentType == VoidBinding) { scope.problemReporter().variableTypeCannotBeVoidArray(this); return; } } // duplicate checks if ((binding = scope.duplicateName(name)) != null) { // the name already exists... may carry on with the first binding... scope.problemReporter().redefineLocal(this); } else { binding = new LocalVariableBinding(this, tb, modifiers, false); scope.addLocalVariable(binding); binding.constant = NotAConstant; // allow to recursivelly target the binding.... // the correct constant is harmed if correctly computed at the end of this method } if (tb == null) { if (initialization != null) initialization.resolveType(scope); // want to report all possible errors return; } // store the constant for final locals if (initialization != null) { if (initialization instanceof ArrayInitializer) { TypeBinding initTb = initialization.resolveTypeExpecting(scope, tb); if (initTb != null) { ((ArrayInitializer) initialization).binding = (ArrayBinding) initTb; initialization.implicitWidening(tb, initTb); } } else { TypeBinding initTb = initialization.resolveType(scope); if (initTb != null) { if (initialization.isConstantValueOfTypeAssignableToType(initTb, tb) || (tb.isBaseType() && BaseTypeBinding.isWidening(tb.id, initTb.id)) || Scope.areTypesCompatible(initTb, tb)) initialization.implicitWidening(tb, initTb); else scope.problemReporter().typeMismatchError(initTb, tb, this); } } // change the constant in the binding when it is final // (the optimization of the constant propagation will be done later on) // cast from constant actual type to variable type binding.constant = binding.isFinal() ? initialization.constant.castTo((tb.id << 4) + initialization.constant.typeID()) : NotAConstant; } } public void traverse(IAbstractSyntaxTreeVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { type.traverse(visitor, scope); if (initialization != null) initialization.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
[ "375833274@qq.com" ]
375833274@qq.com
460a79d36806a1548093954e2fdd4d14fd4d5464
c4f86ef2844f08d64b9e19e4667be12db88a2cd9
/gui/src/main/java/org/jboss/as/console/client/shared/subsys/jca/NewManagerWizard.java
b7512aa84905cf927202c7124d51d2664f4a0a43
[]
no_license
n1hility/console
c41a1bcdc0fee4331ff204f57a9f1417125b7d9f
d7b1f97d55f3a33aa3cb5ca0d6300dcf5248cb5b
refs/heads/master
2021-01-18T22:32:41.799336
2012-02-10T20:58:34
2012-02-13T08:04:56
2,305,576
0
1
null
null
null
null
UTF-8
Java
false
false
2,974
java
package org.jboss.as.console.client.shared.subsys.jca; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; import org.jboss.as.console.client.Console; import org.jboss.as.console.client.shared.help.FormHelpPanel; import org.jboss.as.console.client.shared.subsys.Baseadress; import org.jboss.as.console.client.shared.subsys.jca.model.JcaWorkmanager; import org.jboss.ballroom.client.widgets.forms.Form; import org.jboss.ballroom.client.widgets.forms.FormValidation; import org.jboss.ballroom.client.widgets.forms.TextBoxItem; import org.jboss.ballroom.client.widgets.window.DialogueOptions; import org.jboss.ballroom.client.widgets.window.WindowContentBuilder; import org.jboss.dmr.client.ModelNode; /** * @author Heiko Braun * @date 12/1/11 */ public class NewManagerWizard { private JcaPresenter presenter; public NewManagerWizard(JcaPresenter jcaPresenter) { this.presenter = jcaPresenter; } Widget asWidget() { VerticalPanel layout = new VerticalPanel(); layout.setStyleName("window-content"); final Form<JcaWorkmanager> form = new Form(JcaWorkmanager.class); TextBoxItem nameField = new TextBoxItem("name", Console.CONSTANTS.common_label_name()); form.setFields(nameField); DialogueOptions options = new DialogueOptions( // save new ClickHandler() { @Override public void onClick(ClickEvent event) { JcaWorkmanager manager = form.getUpdatedEntity(); FormValidation validation = form.validate(); if(validation.hasErrors()) return; presenter.createNewManager(manager); } }, // cancel new ClickHandler() { @Override public void onClick(ClickEvent event) { presenter.closeDialoge(); } } ); // ---------------------------------------- Widget formWidget = form.asWidget(); final FormHelpPanel helpPanel = new FormHelpPanel( new FormHelpPanel.AddressCallback() { @Override public ModelNode getAddress() { ModelNode address = new ModelNode(); address.set(Baseadress.get()); address.add("subsystem", "jca"); address.add("workmanager", "*"); return address; } }, form ); layout.add(helpPanel.asWidget()); layout.add(formWidget); return new WindowContentBuilder(layout, options).build(); } }
[ "ike.braun@googlemail.com" ]
ike.braun@googlemail.com
2d403c801814a2b7eb23f1e71cf15bc9f78da5c4
31f63618c7f57253140e333fc21bac2d71bc4000
/maihama-common/src/main/java/org/dbflute/maihama/dbflute/cbean/cq/ciq/MemberAddressCIQ.java
2012b8966d29c34ca7f05a5ec9db4af8bcffdbfe
[ "Apache-2.0" ]
permissive
dbflute-session/memorable-saflute
b6507d3a54dad5e9c67539a9178ff74287c0fe2b
c5c6cfe19c9dd52c429d160264e1c8e30b4d51c5
refs/heads/master
2023-03-07T11:02:15.495590
2023-02-22T13:20:03
2023-02-22T13:20:03
50,719,958
0
1
null
2023-02-22T13:20:05
2016-01-30T10:26:15
Java
UTF-8
Java
false
false
6,050
java
/* * Copyright 2014-2015 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.dbflute.maihama.dbflute.cbean.cq.ciq; import java.util.Map; import org.dbflute.cbean.*; import org.dbflute.cbean.ckey.*; import org.dbflute.cbean.coption.ConditionOption; import org.dbflute.cbean.cvalue.ConditionValue; import org.dbflute.cbean.sqlclause.SqlClause; import org.dbflute.exception.IllegalConditionBeanOperationException; import org.dbflute.maihama.dbflute.cbean.*; import org.dbflute.maihama.dbflute.cbean.cq.bs.*; import org.dbflute.maihama.dbflute.cbean.cq.*; /** * The condition-query for in-line of member_address. * @author DBFlute(AutoGenerator) */ public class MemberAddressCIQ extends AbstractBsMemberAddressCQ { // =================================================================================== // Attribute // ========= protected BsMemberAddressCQ _myCQ; // =================================================================================== // Constructor // =========== public MemberAddressCIQ(ConditionQuery referrerQuery, SqlClause sqlClause , String aliasName, int nestLevel, BsMemberAddressCQ myCQ) { super(referrerQuery, sqlClause, aliasName, nestLevel); _myCQ = myCQ; _foreignPropertyName = _myCQ.xgetForeignPropertyName(); // accept foreign property name _relationPath = _myCQ.xgetRelationPath(); // accept relation path _inline = true; } // =================================================================================== // Override about Register // ======================= protected void reflectRelationOnUnionQuery(ConditionQuery bq, ConditionQuery uq) { throw new IllegalConditionBeanOperationException("InlineView cannot use Union: " + bq + " : " + uq); } @Override protected void setupConditionValueAndRegisterWhereClause(ConditionKey k, Object v, ConditionValue cv, String col) { regIQ(k, v, cv, col); } @Override protected void setupConditionValueAndRegisterWhereClause(ConditionKey k, Object v, ConditionValue cv, String col, ConditionOption op) { regIQ(k, v, cv, col, op); } @Override protected void registerWhereClause(String wc) { registerInlineWhereClause(wc); } @Override protected boolean isInScopeRelationSuppressLocalAliasName() { if (_onClause) { throw new IllegalConditionBeanOperationException("InScopeRelation on OnClause is unsupported."); } return true; } // =================================================================================== // Override about Query // ==================== protected ConditionValue xgetCValueMemberAddressId() { return _myCQ.xdfgetMemberAddressId(); } protected ConditionValue xgetCValueMemberId() { return _myCQ.xdfgetMemberId(); } protected ConditionValue xgetCValueValidBeginDate() { return _myCQ.xdfgetValidBeginDate(); } protected ConditionValue xgetCValueValidEndDate() { return _myCQ.xdfgetValidEndDate(); } protected ConditionValue xgetCValueAddress() { return _myCQ.xdfgetAddress(); } protected ConditionValue xgetCValueRegionId() { return _myCQ.xdfgetRegionId(); } protected ConditionValue xgetCValueRegisterDatetime() { return _myCQ.xdfgetRegisterDatetime(); } protected ConditionValue xgetCValueRegisterUser() { return _myCQ.xdfgetRegisterUser(); } protected ConditionValue xgetCValueUpdateDatetime() { return _myCQ.xdfgetUpdateDatetime(); } protected ConditionValue xgetCValueUpdateUser() { return _myCQ.xdfgetUpdateUser(); } protected ConditionValue xgetCValueVersionNo() { return _myCQ.xdfgetVersionNo(); } protected Map<String, Object> xfindFixedConditionDynamicParameterMap(String pp) { return null; } public String keepScalarCondition(MemberAddressCQ sq) { throwIICBOE("ScalarCondition"); return null; } public String keepSpecifyMyselfDerived(MemberAddressCQ sq) { throwIICBOE("(Specify)MyselfDerived"); return null;} public String keepQueryMyselfDerived(MemberAddressCQ sq) { throwIICBOE("(Query)MyselfDerived"); return null;} public String keepQueryMyselfDerivedParameter(Object vl) { throwIICBOE("(Query)MyselfDerived"); return null;} public String keepMyselfExists(MemberAddressCQ sq) { throwIICBOE("MyselfExists"); return null;} protected void throwIICBOE(String name) { throw new IllegalConditionBeanOperationException(name + " at InlineView is unsupported."); } // =================================================================================== // Very Internal // ============= // very internal (for suppressing warn about 'Not Use Import') protected String xinCB() { return MemberAddressCB.class.getName(); } protected String xinCQ() { return MemberAddressCQ.class.getName(); } }
[ "dbflute@gmail.com" ]
dbflute@gmail.com
0b67093dcc6d79f69a30e59c11cf576b117950fa
8cd26bc2e6a8ee5bc37fd367154718614b5a0483
/tcp/src/main/java/org/kaazing/nuklei/tcp/internal/reader/ReaderException.java
8209020e74cec2334b8f0039235cc5e89b28951c
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
gitter-badger/nuklei
7dc5cdd82cb769dc6af46984c27778d7490b076b
128b219be68429d10f4fac26869a56b0c39ac18d
refs/heads/develop
2021-01-21T09:34:14.031868
2016-03-31T17:40:14
2016-03-31T17:40:14
56,720,060
0
0
null
2016-04-20T20:51:00
2016-04-20T20:51:00
null
UTF-8
Java
false
false
1,403
java
/** * Copyright 2007-2015, Kaazing Corporation. 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 org.kaazing.nuklei.tcp.internal.reader; import org.kaazing.nuklei.Reaktive; @Reaktive @SuppressWarnings("serial") public final class ReaderException extends RuntimeException { public ReaderException() { super(); } public ReaderException( String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } public ReaderException( String message, Throwable cause) { super(message, cause); } public ReaderException( String message) { super(message); } public ReaderException( Throwable cause) { super(cause); } }
[ "john.fallows@kaazing.com" ]
john.fallows@kaazing.com
950b7b67a7f9be194ad08990bc41b49f91da91af
8c085f12963e120be684f8a049175f07d0b8c4e5
/castor/tags/1.3.0.1/cpa/src/main/java/org/castor/cpa/persistence/convertor/StringToCharacter.java
59e945f2229a2c8664cce75fcd7f4343f01ed80e
[]
no_license
alam93mahboob/castor
9963d4110126b8f4ef81d82adfe62bab8c5f5bce
974f853be5680427a195a6b8ae3ce63a65a309b6
refs/heads/master
2020-05-17T08:03:26.321249
2014-01-01T20:48:45
2014-01-01T20:48:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,618
java
/* * Copyright 2007 Ralf Joachim * * 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.castor.cpa.persistence.convertor; /** * Convert <code>String</code> to <code>Character</code>. * * @author <a href="mailto:ralf DOT joachim AT syscon DOT eu">Ralf Joachim</a> * @version $Revision: 7134 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $ * @since 1.1.3 */ public final class StringToCharacter extends AbstractSimpleTypeConvertor { //----------------------------------------------------------------------------------- /** * Default constructor. */ public StringToCharacter() { super(String.class, Character.class); } //----------------------------------------------------------------------------------- /** * {@inheritDoc} */ public Object convert(final Object object) { String str = (String ) object; return (new Character((str.length() == 0) ? 0 : str.charAt(0))); } //----------------------------------------------------------------------------------- }
[ "wguttmn@b24b0d9a-6811-0410-802a-946fa971d308" ]
wguttmn@b24b0d9a-6811-0410-802a-946fa971d308