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
e54f5a67c9b55adb83b6d04f279bbb55e3e283ff
a006be286d4482aecf4021f62edd8dd9bb600040
/src/main/java/com/alipay/api/response/AlipayCommerceDataSendResponse.java
e661feeb1e6e00200256d18b040579823a3a0bb7
[]
no_license
zero-java/alipay-sdk
16e520fbd69974f7a7491919909b24be9278f1b1
aac34d987a424497d8e8b1fd67b19546a6742132
refs/heads/master
2021-07-19T12:34:20.765988
2017-12-13T07:43:24
2017-12-13T07:43:24
96,759,166
0
0
null
2017-07-25T02:02:45
2017-07-10T09:20:13
Java
UTF-8
Java
false
false
342
java
package com.alipay.api.response; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.commerce.data.send response. * * @author auto create * @since 1.0, 2016-11-02 21:11:24 */ public class AlipayCommerceDataSendResponse extends AlipayResponse { private static final long serialVersionUID = 8231174689947757817L; }
[ "443683059a" ]
443683059a
5836b8c26f637da806e9ead62e7aafd2bae0b302
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project65/src/main/java/org/gradle/test/performance65_1/Production65_55.java
1cf5dc6ff745b16a535b914cc62b880a952eb539
[]
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
302
java
package org.gradle.test.performance65_1; public class Production65_55 extends org.gradle.test.performance15_1.Production15_55 { private final String property; public Production65_55() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
e46fd050d60eee631c01ea3761490e7ec663b648
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/appbrand/jsapi/af/e.java
5c04c7f34eb5d43b6e676d7445c77dc7a07faf11
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
4,560
java
package com.tencent.mm.plugin.appbrand.jsapi.af; import android.os.IInterface; import android.text.TextUtils; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.plugin.appbrand.jsapi.k; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.sdk.trafficcard.ITencentSmartcardOpenService; import java.util.HashMap; import java.util.Map; import org.json.JSONObject; public final class e extends a { public static final int CTRL_INDEX = 897; public static final String NAME = "issueTrafficCard"; protected final void a(k paramk, int paramInt, IInterface paramIInterface, JSONObject paramJSONObject) { AppMethodBeat.i(325906); if (paramJSONObject == null) { paramIInterface = new HashMap(); paramIInterface.put("errCode", Integer.valueOf(b.sxO.errorCode)); paramk.callback(paramInt, m("fail:" + b.sxO.errorMsg, paramIInterface)); t(3, b.sxO.errorCode, "deviceData is null"); Log.e("MicroMsg.JsApiIssueTrafficCard", "deviceData is null, invoke fail: [%s] ! with appId[%s] callbackId[%s]", new Object[] { b.sxO.errorMsg, paramk.getAppId(), Integer.valueOf(paramInt) }); AppMethodBeat.o(325906); return; } HashMap localHashMap = new HashMap(); String str1 = paramJSONObject.optString("issuerID"); String str2 = paramJSONObject.optString("orderNo"); String str3 = paramJSONObject.optString("cityCode"); paramJSONObject = paramJSONObject.optString("orderStatus"); localHashMap.put("issuerID", str1); localHashMap.put("orderNo", str2); localHashMap.put("appID", "APP-WECHAT"); localHashMap.put("operation", "1"); localHashMap.put("cityCode", str3); localHashMap.put("orderStatus", paramJSONObject); boolean bool = paramIInterface instanceof com.huawei.b.a.a.a; if (bool) {} for (;;) { try { ((com.huawei.b.a.a.a)paramIInterface).preIssueCard(localHashMap); paramIInterface = ((com.huawei.b.a.a.a)paramIInterface).issueCard(localHashMap); if (TextUtils.isEmpty(paramIInterface)) { continue; } paramIInterface = new JSONObject(paramIInterface); } catch (Exception paramIInterface) { Log.e("MicroMsg.JsApiIssueTrafficCard", "call remote interface fail: [%s] ! ", new Object[] { paramIInterface.getMessage() }); paramIInterface = null; continue; int i = paramIInterface.optInt("resultCode"); if (i == b.sxN.errorCode) { continue; } if (!bool) { continue; } paramIInterface = b.Bb(i); paramJSONObject = paramIInterface; if (paramIInterface != b.syA) { continue; } paramJSONObject = b.sys; localHashMap.put("errCode", Integer.valueOf(paramJSONObject.errorCode)); paramk.callback(paramInt, m("fail:" + paramJSONObject.errorMsg, localHashMap)); t(3, paramJSONObject.errorCode, paramJSONObject.errorMsg); Log.e("MicroMsg.JsApiIssueTrafficCard", "Return code from remote interface! with RetCode issueCard[%s] ", new Object[] { Integer.valueOf(i) }); AppMethodBeat.o(325906); return; paramIInterface = b.Bc(i); continue; localHashMap.put("errCode", Integer.valueOf(b.sxN.errorCode)); paramk.callback(paramInt, m(b.sxN.errorMsg, localHashMap)); t(3, b.sxN.errorCode, ""); AppMethodBeat.o(325906); return; } localHashMap = new HashMap(); if (paramIInterface == null) { localHashMap.put("errCode", Integer.valueOf(b.sxS.errorCode)); paramk.callback(paramInt, m("fail:" + b.sxS.errorMsg, localHashMap)); t(3, b.sxS.errorCode, "call remote interface exception"); Log.e("MicroMsg.JsApiIssueTrafficCard", "call remote interface exception."); AppMethodBeat.o(325906); return; if (!(paramIInterface instanceof ITencentSmartcardOpenService)) { break label632; } ((ITencentSmartcardOpenService)paramIInterface).preIssueCard(localHashMap); paramIInterface = ((ITencentSmartcardOpenService)paramIInterface).issueCard(localHashMap); } label632: paramIInterface = ""; } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes11.jar * Qualified Name: com.tencent.mm.plugin.appbrand.jsapi.af.e * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
5d2503990b196487cb9317a772a94e0039411059
aa2f56c3a108da41dafcf53b12e39f520032ca30
/wsclient/src/main/java/org/hpccsystems/ws/client/gen/wsworkunits/v1_71/WUClusterJobQueueXLS.java
47db96ca9016b3576b276948bf64e6b596f65c77
[]
no_license
drealeed/HPCC-JAPIs
459e6c0ab0bbf8d7893fafb775167197567cc573
ee652f4d5163d0f7daa7949015dc4d815b64749d
refs/heads/master
2022-06-24T13:46:14.497602
2019-05-21T18:24:47
2019-05-21T18:24:47
23,236,635
0
0
null
null
null
null
UTF-8
Java
false
false
7,272
java
/** * WUClusterJobQueueXLS.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package org.hpccsystems.ws.client.gen.wsworkunits.v1_71; public class WUClusterJobQueueXLS implements java.io.Serializable { private java.lang.String cluster; private java.lang.String startDate; private java.lang.String endDate; private java.lang.String showType; public WUClusterJobQueueXLS() { } public WUClusterJobQueueXLS( java.lang.String cluster, java.lang.String startDate, java.lang.String endDate, java.lang.String showType) { this.cluster = cluster; this.startDate = startDate; this.endDate = endDate; this.showType = showType; } /** * Gets the cluster value for this WUClusterJobQueueXLS. * * @return cluster */ public java.lang.String getCluster() { return cluster; } /** * Sets the cluster value for this WUClusterJobQueueXLS. * * @param cluster */ public void setCluster(java.lang.String cluster) { this.cluster = cluster; } /** * Gets the startDate value for this WUClusterJobQueueXLS. * * @return startDate */ public java.lang.String getStartDate() { return startDate; } /** * Sets the startDate value for this WUClusterJobQueueXLS. * * @param startDate */ public void setStartDate(java.lang.String startDate) { this.startDate = startDate; } /** * Gets the endDate value for this WUClusterJobQueueXLS. * * @return endDate */ public java.lang.String getEndDate() { return endDate; } /** * Sets the endDate value for this WUClusterJobQueueXLS. * * @param endDate */ public void setEndDate(java.lang.String endDate) { this.endDate = endDate; } /** * Gets the showType value for this WUClusterJobQueueXLS. * * @return showType */ public java.lang.String getShowType() { return showType; } /** * Sets the showType value for this WUClusterJobQueueXLS. * * @param showType */ public void setShowType(java.lang.String showType) { this.showType = showType; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof WUClusterJobQueueXLS)) return false; WUClusterJobQueueXLS other = (WUClusterJobQueueXLS) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.cluster==null && other.getCluster()==null) || (this.cluster!=null && this.cluster.equals(other.getCluster()))) && ((this.startDate==null && other.getStartDate()==null) || (this.startDate!=null && this.startDate.equals(other.getStartDate()))) && ((this.endDate==null && other.getEndDate()==null) || (this.endDate!=null && this.endDate.equals(other.getEndDate()))) && ((this.showType==null && other.getShowType()==null) || (this.showType!=null && this.showType.equals(other.getShowType()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getCluster() != null) { _hashCode += getCluster().hashCode(); } if (getStartDate() != null) { _hashCode += getStartDate().hashCode(); } if (getEndDate() != null) { _hashCode += getEndDate().hashCode(); } if (getShowType() != null) { _hashCode += getShowType().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(WUClusterJobQueueXLS.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("urn:hpccsystems:ws:wsworkunits", ">WUClusterJobQueueXLS")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("cluster"); elemField.setXmlName(new javax.xml.namespace.QName("urn:hpccsystems:ws:wsworkunits", "Cluster")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("startDate"); elemField.setXmlName(new javax.xml.namespace.QName("urn:hpccsystems:ws:wsworkunits", "StartDate")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("endDate"); elemField.setXmlName(new javax.xml.namespace.QName("urn:hpccsystems:ws:wsworkunits", "EndDate")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("showType"); elemField.setXmlName(new javax.xml.namespace.QName("urn:hpccsystems:ws:wsworkunits", "ShowType")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "rodrigo.pastrana@lexisnexis.com" ]
rodrigo.pastrana@lexisnexis.com
55a8c21f24ce0fd6763d884f6cd3d4b16df596b4
e481454b7687abb6b62485bc67edd76da6d32772
/src/test/java/org/synyx/urlaubsverwaltung/web/sicknote/SickNoteConvertFormValidatorTest.java
73d1f2235ec2d0faaff4eaecd2e7d803c3e34191
[ "Apache-2.0" ]
permissive
builder-bob/urlaubsverwaltung
6223cd23f06f507cb940b7452b9112156bea3101
ca7a70f7853a2f0f5a7b9dfb44678b978a600da2
refs/heads/master
2020-04-27T21:04:25.456577
2019-03-08T16:44:40
2019-03-08T16:44:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,911
java
package org.synyx.urlaubsverwaltung.web.sicknote; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; import org.springframework.validation.Errors; import org.synyx.urlaubsverwaltung.core.sicknote.SickNote; /** * Unit test for {@link SickNoteConvertFormValidator}. * * @author Aljona Murygina - murygina@synyx.de */ public class SickNoteConvertFormValidatorTest { private SickNoteConvertFormValidator validator; private Errors errors; @Before public void setUp() { validator = new SickNoteConvertFormValidator(); errors = Mockito.mock(Errors.class); } @Test public void ensureNullReasonIsNotValid() { SickNoteConvertForm convertForm = new SickNoteConvertForm(new SickNote()); convertForm.setReason(null); validator.validate(convertForm, errors); Mockito.verify(errors).rejectValue("reason", "error.entry.mandatory"); } @Test public void ensureEmptyReasonIsNotValid() { SickNoteConvertForm convertForm = new SickNoteConvertForm(new SickNote()); convertForm.setReason(""); validator.validate(convertForm, errors); Mockito.verify(errors).rejectValue("reason", "error.entry.mandatory"); } @Test public void ensureThereIsAMaximumCharLengthForReason() { SickNoteConvertForm convertForm = new SickNoteConvertForm(new SickNote()); convertForm.setReason( "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt" + " ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud " + "exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. "); validator.validate(convertForm, errors); Mockito.verify(errors).rejectValue("reason", "error.entry.tooManyChars"); } }
[ "murygina@synyx.de" ]
murygina@synyx.de
43e0cc75098904959f26cb4c6790e27cadda06d4
cca87c4ade972a682c9bf0663ffdf21232c9b857
/com/tinkerboots/sdk/a/a/b.java
2e2a7be5ff7a41fae2ad621e79fac1731e77ee3c
[]
no_license
ZoranLi/wechat_reversing
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
refs/heads/master
2021-07-05T01:17:20.533427
2017-09-25T09:07:33
2017-09-25T09:07:33
104,726,592
12
1
null
null
null
null
UTF-8
Java
false
false
154
java
package com.tinkerboots.sdk.a.a; import java.util.Map; public interface b { boolean aDm(); void aDn(); void w(Map<String, String> map); }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
878358f6574fd9fc07a3c5b1e7d445a799c98d57
c37d2a36312534a55c319b19b61060649c7c862c
/app/src/main/java/com/spongycastle/cert/CertException.java
872185d5a5e788640d62deb633cf6a135d47b456
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
trwinowiecki/AndroidTexting
f5626ad91a07ea7b3cd3ee75893abf8b1fe7154f
27e84a420b80054e676c390b898705856364b340
refs/heads/master
2020-12-30T23:10:17.542572
2017-02-01T01:46:13
2017-02-01T01:46:13
80,580,124
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
package com.spongycastle.cert; /** * General checked Exception thrown in the cert package and its sub-packages. */ public class CertException extends Exception { private Throwable cause; public CertException(String msg, Throwable cause) { super(msg); this.cause = cause; } public CertException(String msg) { super(msg); } public Throwable getCause() { return cause; } }
[ "trw0511@gmail.com" ]
trw0511@gmail.com
57267da8635b491de198c3dbc59347326333e1e2
f2e297ec31af0ff8fed9ee5bfd714f35dd3c602b
/org.idempiere.test.assertj/src/org/idempiere/test/assertj/AbstractS_ResourceUnAvailableAssert.java
374d66f229ef32b6acc623fbe716b042faacd917
[]
no_license
kriegfrj/idempiere-test
c6382226d3a8f3b511edf59fc1cecc62b869d5fd
9730ac505607eddcc0727687797ba57f5c614c7c
refs/heads/master
2022-11-28T15:59:12.092607
2020-08-17T07:02:22
2020-08-17T07:02:22
275,079,977
0
0
null
2020-08-17T07:02:23
2020-06-26T05:21:40
Java
UTF-8
Java
false
false
3,827
java
/****************************************************************************** * Product: iDempiere ERP & CRM Smart Business Solution * * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * * This program is free software, you can redistribute it and/or modify it * * under the terms version 2 of the GNU General Public License as published * * by the Free Software Foundation. This program is distributed in the hope * * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * * with this program, if not, write to the Free Software Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * For the text or an alternative of this public license, you may reach us * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Assertion Class - DO NOT CHANGE */ package org.idempiere.test.assertj; import java.util.Objects; import javax.annotation.Generated; import org.compiere.model.X_S_ResourceUnAvailable; /** Generated assertion class for S_ResourceUnAvailable * @author idempiere-test (generated) * @version Release 6.2 - $Id$ */ @Generated("class org.idempiere.test.generator.ModelAssertionGenerator") public abstract class AbstractS_ResourceUnAvailableAssert<SELF extends AbstractS_ResourceUnAvailableAssert<SELF, ACTUAL>, ACTUAL extends X_S_ResourceUnAvailable> extends AbstractPOAssert<SELF, ACTUAL> { /** Standard Constructor */ public AbstractS_ResourceUnAvailableAssert (ACTUAL actual, Class<SELF> selfType) { super (actual, selfType); } public SELF hasDateFrom(Object expected) { isNotNull(); dateAssert("DateFrom", actual.getDateFrom(), expected); return myself; } public SELF hasDateTo(Object expected) { isNotNull(); dateAssert("DateTo", actual.getDateTo(), expected); return myself; } public SELF hasDescription(String expected) { isNotNull(); String actualField = actual.getDescription(); if (!Objects.equals(expected, actualField)) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have Description: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasS_Resource_ID(int expected) { isNotNull(); int actualField = actual.getS_Resource_ID(); if (expected != actualField) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have S_Resource_ID: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasS_ResourceUnAvailable_ID(int expected) { isNotNull(); int actualField = actual.getS_ResourceUnAvailable_ID(); if (expected != actualField) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have S_ResourceUnAvailable_ID: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasS_ResourceUnAvailable_UU(String expected) { isNotNull(); String actualField = actual.getS_ResourceUnAvailable_UU(); if (!Objects.equals(expected, actualField)) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have S_ResourceUnAvailable_UU: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } }
[ "fr.jkrieg@greekwelfaresa.org.au" ]
fr.jkrieg@greekwelfaresa.org.au
e5d2ceda339f0c3c1b819cd5efd5deab67c221f5
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-ehpc/src/main/java/com/aliyuncs/ehpc/transform/v20180412/ListUsersAsyncResponseUnmarshaller.java
55014744e0d659b080adc4436720ea818c408a83
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
2,349
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.ehpc.transform.v20180412; import java.util.ArrayList; import java.util.List; import com.aliyuncs.ehpc.model.v20180412.ListUsersAsyncResponse; import com.aliyuncs.ehpc.model.v20180412.ListUsersAsyncResponse.UserInfo; import com.aliyuncs.transform.UnmarshallerContext; public class ListUsersAsyncResponseUnmarshaller { public static ListUsersAsyncResponse unmarshall(ListUsersAsyncResponse listUsersAsyncResponse, UnmarshallerContext _ctx) { listUsersAsyncResponse.setRequestId(_ctx.stringValue("ListUsersAsyncResponse.RequestId")); listUsersAsyncResponse.setPageSize(_ctx.integerValue("ListUsersAsyncResponse.PageSize")); listUsersAsyncResponse.setPageNumber(_ctx.integerValue("ListUsersAsyncResponse.PageNumber")); listUsersAsyncResponse.setTotalCount(_ctx.integerValue("ListUsersAsyncResponse.TotalCount")); listUsersAsyncResponse.setAsyncId(_ctx.stringValue("ListUsersAsyncResponse.AsyncId")); listUsersAsyncResponse.setAsyncStatus(_ctx.stringValue("ListUsersAsyncResponse.AsyncStatus")); List<UserInfo> users = new ArrayList<UserInfo>(); for (int i = 0; i < _ctx.lengthValue("ListUsersAsyncResponse.Users.Length"); i++) { UserInfo userInfo = new UserInfo(); userInfo.setName(_ctx.stringValue("ListUsersAsyncResponse.Users["+ i +"].Name")); userInfo.setAddTime(_ctx.stringValue("ListUsersAsyncResponse.Users["+ i +"].AddTime")); userInfo.setGroup(_ctx.stringValue("ListUsersAsyncResponse.Users["+ i +"].Group")); userInfo.setUserId(_ctx.stringValue("ListUsersAsyncResponse.Users["+ i +"].UserId")); userInfo.setGroupId(_ctx.stringValue("ListUsersAsyncResponse.Users["+ i +"].GroupId")); users.add(userInfo); } listUsersAsyncResponse.setUsers(users); return listUsersAsyncResponse; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
76c8c3a1514a758615770acc31ee10b9e18211fa
83628ce2f3af1446d32596a526200a3aa893dea2
/taskling-core/src/main/java/com/siiconcatel/taskling/core/blocks/requests/ListBlockRequest.java
d4336df6c8552b26397911c73ae53971466df628
[ "MIT" ]
permissive
Vanlightly/java-taskling
704793f1312c05aed192cd72398bd0cc029267d9
ca5a28885b99055b0b155bb4ac7c25202ddcda80
refs/heads/master
2022-12-07T20:47:19.595248
2019-07-26T08:09:47
2019-07-26T08:09:47
190,373,386
0
0
MIT
2022-11-16T12:36:45
2019-06-05T10:16:37
Java
UTF-8
Java
false
false
2,116
java
package com.siiconcatel.taskling.core.blocks.requests; import com.siiconcatel.taskling.core.blocks.common.BlockType; import com.siiconcatel.taskling.core.blocks.listblocks.ListUpdateMode; import java.util.List; public class ListBlockRequest extends BlockRequest { public ListBlockRequest() { super.setBlockType(BlockType.List); } private List<String> serializedValues; private String serializedHeader; private int compressionThreshold; private int maxStatusReasonLength; private int maxBlockSize; private ListUpdateMode listUpdateMode; private int uncommittedItemsThreshold; public List<String> getSerializedValues() { return serializedValues; } public void setSerializedValues(List<String> serializedValues) { this.serializedValues = serializedValues; } public String getSerializedHeader() { return serializedHeader; } public void setSerializedHeader(String serializedHeader) { this.serializedHeader = serializedHeader; } public int getCompressionThreshold() { return compressionThreshold; } public void setCompressionThreshold(int compressionThreshold) { this.compressionThreshold = compressionThreshold; } public int getMaxStatusReasonLength() { return maxStatusReasonLength; } public void setMaxStatusReasonLength(int maxStatusReasonLength) { this.maxStatusReasonLength = maxStatusReasonLength; } public int getMaxBlockSize() { return maxBlockSize; } public void setMaxBlockSize(int maxBlockSize) { this.maxBlockSize = maxBlockSize; } public ListUpdateMode getListUpdateMode() { return listUpdateMode; } public void setListUpdateMode(ListUpdateMode listUpdateMode) { this.listUpdateMode = listUpdateMode; } public int getUncommittedItemsThreshold() { return uncommittedItemsThreshold; } public void setUncommittedItemsThreshold(int uncommittedItemsThreshold) { this.uncommittedItemsThreshold = uncommittedItemsThreshold; } }
[ "vanlightly@gmail.com" ]
vanlightly@gmail.com
4f0ad2e2c01d4692b45561f2f56cabd015894c1a
52e9164c0077fbcf7d09f9ab801f588adc7cada3
/javaandscalatest/src/main/scala/com/testframwork/jdk8/jdk8Thingking/flapMapTest/FlatMap.java
1fdff51c9eda71c43ad8cff8b1b9667ec58f9e54
[]
no_license
wherowsj/testframwork
aa33ac16786a40106f54b8f22742135e790a4c15
1493149b4b0caf1692270d17c703193231421635
refs/heads/master
2022-06-13T01:35:32.239505
2020-04-11T07:17:53
2020-04-11T07:17:53
262,540,048
1
0
null
2020-05-09T09:53:02
2020-05-09T09:53:01
null
UTF-8
Java
false
false
655
java
package com.testframwork.jdk8.jdk8Thingking.flapMapTest; import java.util.Arrays; import java.util.stream.Stream; //从映射返回的每个流都会自动扁平为组成它的字符串 public class FlatMap { public static void main(String[] args) { Arrays.asList("1", "2", "3").stream() .flatMap(i -> Stream.of("jrbing", "byy", "Beaker")).forEach(e -> System.out.println(e)); System.out.println("================================="); Arrays.asList("1", "2", "3").stream() .map(i -> Stream.of("jrbing", "byy", "Beaker")).forEach(e -> System.out.println(e.reduce((k,v)->k+" "+v))); } }
[ "719203729@qq.com" ]
719203729@qq.com
db03d4596c05762ed3963b44dd33514aff8a8848
3245eaa2e90e417d144f282313f57c7fa7e85327
/Integracao/IntegracaoCipEJB/src/br/com/sicoob/sisbr/sicoobdda/integracaocip/xml/modelo/mensagens/sspb/envio/ObjectFactory.java
3ec83d0ca71149a387f23d89360a5e12b7cb927b
[]
no_license
pabllo007/DDA
01ca636fc56cb7200d6d87d4c9f69e9eb68486db
e900c03b37e03231e929a08ce66a7ac0ac269a49
refs/heads/master
2022-11-30T19:00:02.651730
2019-10-27T21:25:14
2019-10-27T21:25:14
217,918,454
0
0
null
2022-11-24T06:24:00
2019-10-27T21:23:22
Java
UTF-8
Java
false
false
1,598
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: 2015.05.05 at 03:37:34 PM BRT // package br.com.sicoob.sisbr.sicoobdda.integracaocip.xml.modelo.mensagens.sspb.envio; import javax.xml.bind.annotation.XmlRegistry; /** * This object contains factory methods for each Java content interface and Java element interface generated in the * br.com.sicoob.sisbr.sicoobdda.integracaocip.xml.modelo.mensagens.DDA0501 package. * <p> * An ObjectFactory allows you to programatically construct new instances of the Java representation for XML content. The Java representation of XML content can * consist of schema derived interfaces and classes representing the binding of schema type definitions, element declarations and model groups. Factory methods * for each of these are provided in this class. * */ @XmlRegistry public class ObjectFactory { /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: * br.com.sicoob.sisbr.sicoobdda.integracaocip.xml.modelo.mensagens * */ public ObjectFactory() { } public HeaderEnvio createHeader() { return new HeaderEnvio(); } public MsgSPBEnvio createMsgSPB() { return new MsgSPBEnvio(); } public MQEnvio createMQEnvio() { return new MQEnvio(); } }
[ "=" ]
=
cbc7224ae04c69b1f5086d1d6f95a900ae5f5b86
8cdf1478981964e70c1d1e7cf829b4ed2844f492
/dis_rest_server/src/main/java/ph/txtdis/repository/TruckRepository.java
82096ecd2c2b3c941b8d8e517d75e9b6f153239b
[]
no_license
txtdis/DIS-REST-Server
ffaa362c10cf8eac6711fe2f9705cec6abd7bb6f
f8956a4e3b6519348eaff898a0227aac058650b6
refs/heads/master
2020-04-05T23:17:06.873036
2016-02-10T08:42:57
2016-02-10T08:42:57
44,206,421
0
0
null
null
null
null
UTF-8
Java
false
false
216
java
package ph.txtdis.repository; import org.springframework.stereotype.Repository; import ph.txtdis.domain.Truck; @Repository("truckRepository") public interface TruckRepository extends NameListRepository<Truck> { }
[ "txtDIS@txtDIS.ph" ]
txtDIS@txtDIS.ph
d1f1eab1519d4695cd9fc93af58882194f4523a1
79021a38ea91cd2fdf58ab5c210230a279edb6f2
/src/main/java/com/etherealscope/invoices/service/dto/ItemDTO.java
faaf7da41a93e56cbfea0e688135213c9edceb9d
[]
no_license
kubav182/Invoices
3006d362b8a85dc1b9dd417e741d39bd5983f6ba
e123ce16ec4a927d460d00a904ed9962186bf3a4
refs/heads/master
2020-03-23T16:39:09.106739
2018-07-21T14:54:11
2018-07-21T14:54:11
141,821,561
0
0
null
null
null
null
UTF-8
Java
false
false
1,585
java
package com.etherealscope.invoices.service.dto; import java.io.Serializable; import java.util.Objects; /** * A DTO for the Item entity. */ public class ItemDTO implements Serializable { private Long id; private String itemName; private String unit; private Integer price; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getItemName() { return itemName; } public void setItemName(String itemName) { this.itemName = itemName; } public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit; } public Integer getPrice() { return price; } public void setPrice(Integer price) { this.price = price; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ItemDTO itemDTO = (ItemDTO) o; if (itemDTO.getId() == null || getId() == null) { return false; } return Objects.equals(getId(), itemDTO.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } @Override public String toString() { return "ItemDTO{" + "id=" + getId() + ", itemName='" + getItemName() + "'" + ", unit='" + getUnit() + "'" + ", price=" + getPrice() + "}"; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
0229f31be8aa812c34b9586fa63335a771561321
62fe6dc101fb7828e84eb1c33dc8e8b8eb9c37ac
/src/main/java/com/carrillo/merchandise/web/rest/errors/InvalidPasswordException.java
8a51efd6540e0b66f7871f30ca8871ace6c1b866
[]
no_license
CarlosCarrillo13/merch-platform
9f4119afe16cef2c8207bfcf9a209264c0b7165b
cfa1a6d44e260eaee1fff8be5be4c7aec9443c52
refs/heads/master
2022-12-24T05:09:16.543557
2019-10-03T15:23:34
2019-10-03T15:23:34
212,612,712
0
0
null
2022-12-16T05:06:05
2019-10-03T15:23:20
Java
UTF-8
Java
false
false
411
java
package com.carrillo.merchandise.web.rest.errors; import org.zalando.problem.AbstractThrowableProblem; import org.zalando.problem.Status; public class InvalidPasswordException extends AbstractThrowableProblem { private static final long serialVersionUID = 1L; public InvalidPasswordException() { super(ErrorConstants.INVALID_PASSWORD_TYPE, "Incorrect password", Status.BAD_REQUEST); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
611e37b74cc96d483ab185e07545c5582fff0d9e
3d31bd81c8d211d3ced31f3e418c9b590b717c00
/concurrency/src/test/java/sc_jcip/VisualComponent.java
1e53c99e81f179faa07c81ffcc40749f7817e27a
[]
no_license
silloy/boot-in-action
2e709be73068fcb64a9b6dad6dc81d8f70425d4a
3c044de7af970d90fce069e7de065dcd232347a2
refs/heads/master
2021-05-06T09:30:58.908397
2018-04-20T14:16:03
2018-04-20T14:16:03
114,078,066
2
0
null
null
null
null
UTF-8
Java
false
false
971
java
package sc_jcip; import java.awt.event.KeyListener; import java.awt.event.MouseListener; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; /** * VisualComponent * <p/> * Delegating thread safety to multiple underlying state variables * * @author Brian Goetz and Tim Peierls */ public class VisualComponent { private final List<KeyListener> keyListeners = new CopyOnWriteArrayList<KeyListener>(); private final List<MouseListener> mouseListeners = new CopyOnWriteArrayList<MouseListener>(); public void addKeyListener(KeyListener listener) { keyListeners.add(listener); } public void addMouseListener(MouseListener listener) { mouseListeners.add(listener); } public void removeKeyListener(KeyListener listener) { keyListeners.remove(listener); } public void removeMouseListener(MouseListener listener) { mouseListeners.remove(listener); } }
[ "sshzh90@gmail.com" ]
sshzh90@gmail.com
1f7ef1b09861e12219220eea663d6a7266afba6e
814169b683b88f1b7498f1edf530a8d1bec2971f
/mall-product/src/main/java/com/bootx/mall/product/dao/CartDao.java
e881ae7f26d634f809bc12dd222c3b43ead841a6
[]
no_license
springwindyike/mall-auth
fe7f216c7241d8fd9247344e40503f7bc79fe494
3995d258955ecc3efbccbb22ef4204d148ec3206
refs/heads/master
2022-10-20T15:12:19.329363
2020-07-05T13:04:29
2020-07-05T13:04:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package com.bootx.mall.product.dao; import com.bootx.mall.product.entity.Cart; /** * Dao - 购物车 * * @author BOOTX Team * @version 6.1 */ public interface CartDao extends BaseDao<Cart, Long> { /** * 删除过期购物车 */ void deleteExpired(); }
[ "a12345678" ]
a12345678
72343eb17955d70ea1a20a12fe69c1a53c1429e4
b8dd7af8660eacc0074dfdeee5d520f929ba4047
/geoapi-pending/src/main/java/org/opengis/filter/sort/package-info.java
c9088a58886161f1d4140944c8d0ba534945d9f2
[ "LicenseRef-scancode-ogc" ]
permissive
rouault/geoapi
4a248a939c8703143c17c4bd1ba2355ec9a726fb
edd4136fb78a01384c7f393941bf26c7442c087c
refs/heads/master
2020-03-09T18:11:35.133846
2018-03-30T09:58:44
2018-03-30T09:58:44
128,926,294
1
0
null
2018-04-10T12:05:01
2018-04-10T12:05:00
null
UTF-8
Java
false
false
3,252
java
/* * GeoAPI - Java interfaces for OGC/ISO standards * http://www.geoapi.org * * Copyright (C) 2006-2018 Open Geospatial Consortium, Inc. * All Rights Reserved. http://www.opengeospatial.org/ogc/legal * * Permission to use, copy, and modify this software and its documentation, with * or without modification, for any purpose and without fee or royalty is hereby * granted, provided that you include the following on ALL copies of the software * and documentation or portions thereof, including modifications, that you make: * * 1. The full text of this NOTICE in a location viewable to users of the * redistributed or derivative work. * 2. Notice of any changes or modifications to the OGC files, including the * date changes were made. * * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE * NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT * THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY * PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. * * COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR * CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. * * The name and trademarks of copyright holders may NOT be used in advertising or * publicity pertaining to the software without specific, written prior permission. * Title to copyright in this software and any associated documentation will at all * times remain with copyright holders. */ /** * Indicates the ordering requested during a data query. * The following is adapted from the following specifications: * <ul> * <li><a href="http://docs.opengeospatial.org/is/09-026r2/09-026r2.html">OGC® Filter Encoding 2.0 Encoding Standard</a></li> * <li><a href="http://portal.opengeospatial.org/files/?artifact_id=5929">OpenGIS® Catalogue Service Implementation Specification 2.0.1</a></li> * </ul> * * <p>An <cite>SortBy</cite> can be formed using the elements: * {@link org.opengis.filter.expression.Add}, {@link org.opengis.filter.expression.Subtract}, * {@link org.opengis.filter.expression.Multiply}, {@link org.opengis.filter.expression.Divide}, * {@link org.opengis.filter.expression.PropertyName}, {@link org.opengis.filter.expression.Literal} * and {@link org.opengis.filter.expression.Function}. They all belong to the substitution group * expression which means that any of them can be used wherever an expression is called for. In addition, * the combinaison of these elements are themselves expressions and can be used wherever an expression is * called for.</p> * * <h3>FeatureCollections</h3> * <p>The contents of a FeatureCollection are not defined with respect to order.</p> * * <h3>FeatureLists</h3> * <p>A FeatureList represents an ordered collection of features, possibly using a * siers of SortBy elements to define the intended order.</p> * * <h3>Catalog and Web Feature Server</h3> * <p>Both the Catalog and Web Feature Server specifications all the use of SortBy during requests.</p> */ package org.opengis.filter.sort;
[ "martin.desruisseaux@geomatys.com" ]
martin.desruisseaux@geomatys.com
8e61b91a7213636987740d970872d899b95b69af
df52571a1a0ead38e3e3b353be602a0ec7b7c133
/app/src/androidTest/java/com/tellh/androidlibraryarchitecturedemo/RetrofitCacheTest.java
b323d4ac75b54f1faceb80a4c6e6f77589de2e94
[]
no_license
TellH/AndroidLibraryArchitectureDemo
e1b51555873dae23827eb2cd0fa5e96dd6047fbc
a4be2142d7ee84327f4bd7d46ba4596683e2b170
refs/heads/master
2021-01-17T05:21:27.880745
2016-08-16T16:28:40
2016-08-16T16:28:40
63,488,211
1
0
null
null
null
null
UTF-8
Java
false
false
1,778
java
package com.tellh.androidlibraryarchitecturedemo; import android.app.Application; import android.test.ApplicationTestCase; import com.tellh.androidlibraryarchitecturedemo.retrofit.CacheInterceptor; import com.tellh.androidlibraryarchitecturedemo.retrofit.GithubApiClient; import java.io.File; import java.io.IOException; import java.util.List; import okhttp3.Cache; import okhttp3.OkHttpClient; import retrofit2.Call; import retrofit2.Response; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; /** * Created by tlh on 2016/8/14 :) */ public class RetrofitCacheTest extends ApplicationTestCase<Application> { public RetrofitCacheTest(Class<Application> applicationClass) { super(applicationClass); // setUp(); } public void setUp() { File cacheFile = new File(getContext().getCacheDir(), "response"); Cache cache = new Cache(cacheFile, 1024 * 1024 * 100); //100Mb OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(new CacheInterceptor(getContext())) .cache(cache) .build(); Retrofit retrofit = new Retrofit.Builder() .addConverterFactory(GsonConverterFactory.create()) .client(client) .baseUrl(GithubApiClient.GITHUB_URL) .build(); GithubApiClient.ReposService reposService = retrofit.create(GithubApiClient.ReposService.class); Call<List<GithubApiClient.ReposService.Contributor>> call = reposService.getContributors("square", "retrofit"); try { Response<List<GithubApiClient.ReposService.Contributor>> response = call.execute(); } catch (IOException e) { e.printStackTrace(); } } }
[ "570495627@qq.com" ]
570495627@qq.com
62fc17f552cd890ab15e332b47e950ca3d7e538b
36bbde826ff3e123716dce821020cf2a931abf6e
/plugin/core/src/main/gen/com/perl5/lang/perl/psi/impl/PsiPerlTypeConstraintsImpl.java
a44c797f6816c099712c4713ff63e82882918d7a
[ "Apache-2.0" ]
permissive
Camelcade/Perl5-IDEA
0332dd4794aab5ed91126a2c1ecd608f9c801447
deecc3c4fcdf93b4ff35dd31b4c7045dd7285407
refs/heads/master
2023-08-08T07:47:31.489233
2023-07-27T05:18:40
2023-07-27T06:17:04
33,823,684
323
79
NOASSERTION
2023-09-13T04:36:15
2015-04-12T16:09:15
Java
UTF-8
Java
false
true
1,016
java
// This is a generated file. Not intended for manual editing. package com.perl5.lang.perl.psi.impl; import java.util.List; import org.jetbrains.annotations.*; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; import com.intellij.psi.util.PsiTreeUtil; import static com.perl5.lang.perl.lexer.PerlElementTypesGenerated.*; import com.perl5.lang.perl.psi.*; public class PsiPerlTypeConstraintsImpl extends PerlCompositeElementImpl implements PsiPerlTypeConstraints { public PsiPerlTypeConstraintsImpl(ASTNode node) { super(node); } public void accept(@NotNull PsiPerlVisitor visitor) { visitor.visitTypeConstraints(this); } @Override public void accept(@NotNull PsiElementVisitor visitor) { if (visitor instanceof PsiPerlVisitor) accept((PsiPerlVisitor)visitor); else super.accept(visitor); } @Override @Nullable public PsiPerlExpr getExpr() { return PsiTreeUtil.getChildOfType(this, PsiPerlExpr.class); } }
[ "hurricup@gmail.com" ]
hurricup@gmail.com
3160162d6017fb5e98cafe2fe7e8097913b53aac
bcdcfb873617f90c963f2a37718a1196b08a4501
/workplace/mBanking/src/com/act/mbanking/manager/NPaymentPhone.java
8df54d25e23a8fe98f075625fa2ea860edb63876
[]
no_license
realjune/androidCode
13dc10be2becbdc4778ed2fb768c1acd199aee85
9437d3154ed01fa8a25ef918151e49bcd47fd9b6
refs/heads/master
2021-01-01T18:02:55.627149
2014-05-04T10:22:24
2014-05-04T10:22:24
11,117,339
0
0
null
null
null
null
UTF-8
Java
false
false
463
java
package com.act.mbanking.manager; import java.util.List; import com.act.mbanking.bean.AccountsForServiceModel; import com.act.mbanking.bean.PhoneRecipient; public abstract class NPaymentPhone extends NPayment<AccountsForServiceModel,PhoneRecipient> { public List<PhoneRecipient>getPayees(){ if(getRecipientListModel!=null){ return getRecipientListModel.getPhoneRecipientList(); } return null; } }
[ "7978241a@163.com" ]
7978241a@163.com
77577f0fbf61843c18a2c2d5745b09bc920ea52e
cff6935385c6c6276c982744d1f05fb092810b21
/cdt-java-client/src/main/java/com/github/kklisura/cdt/protocol/types/runtime/Evaluate.java
3e65d38d458188ca7e341f7dff400f7ad64391da
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sinaa/chrome-devtools-java-client
1121a40e0bb972066f967cd1900f87963e51a0e0
5123704e373059460314e8411cfe22686ce4ed45
refs/heads/master
2023-08-17T12:18:16.730326
2021-08-28T12:00:57
2021-08-28T12:00:57
199,551,385
0
0
Apache-2.0
2019-07-30T01:26:35
2019-07-30T01:26:35
null
UTF-8
Java
false
false
1,351
java
package com.github.kklisura.cdt.protocol.types.runtime; /*- * #%L * cdt-java-client * %% * Copyright (C) 2018 - 2021 Kenan Klisura * %% * 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. * #L% */ import com.github.kklisura.cdt.protocol.support.annotations.Optional; public class Evaluate { private RemoteObject result; @Optional private ExceptionDetails exceptionDetails; /** Evaluation result. */ public RemoteObject getResult() { return result; } /** Evaluation result. */ public void setResult(RemoteObject result) { this.result = result; } /** Exception details. */ public ExceptionDetails getExceptionDetails() { return exceptionDetails; } /** Exception details. */ public void setExceptionDetails(ExceptionDetails exceptionDetails) { this.exceptionDetails = exceptionDetails; } }
[ "kklisura@hotmail.com" ]
kklisura@hotmail.com
a9ab25c23ccc6e63dbb3045b62fa8c06e4db99f6
d8772960b3b2b07dddc8a77595397cb2618ec7b0
/rhServer/src/main/java/com/rhlinkcon/payload/classificacaoInternacionalDoenca/ClassificacaoInternacionalDoencaRequest.java
b52082e72c01694b4af1b0332e7db005c35b2ec3
[]
no_license
vctrmarques/interno-rh-sistema
c0f49a17923b5cdfaeb148c6f6da48236055cf29
7a7a5d9c36c50ec967cb40a347ec0ad3744d896e
refs/heads/main
2023-03-17T02:07:10.089496
2021-03-12T19:06:05
2021-03-12T19:06:05
347,168,924
0
1
null
null
null
null
UTF-8
Java
false
false
1,122
java
package com.rhlinkcon.payload.classificacaoInternacionalDoenca; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; public class ClassificacaoInternacionalDoencaRequest { private Long id; @NotBlank @NotNull private String codigo; @NotBlank @NotNull private String descricao; private Long categoriaDoencaId; private Long subCategoriaDoencaId; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getCodigo() { return codigo; } public void setCodigo(String codigo) { this.codigo = codigo; } public String getDescricao() { return descricao; } public void setDescricao(String descricao) { this.descricao = descricao; } public Long getCategoriaDoencaId() { return categoriaDoencaId; } public void setCategoriaDoencaId(Long categoriaDoencaId) { this.categoriaDoencaId = categoriaDoencaId; } public Long getSubCategoriaDoencaId() { return subCategoriaDoencaId; } public void setSubCategoriaDoencaId(Long subCategoriaDoencaId) { this.subCategoriaDoencaId = subCategoriaDoencaId; } }
[ "vctmarques@gmail.com" ]
vctmarques@gmail.com
8c712dae5756b4055497e35b10f5b2b45ca04f87
73340dd6cbcd855ddd0294d1bf40f1c173b956ed
/aw-lib-csv/src/main/java/af/gov/anar/lib/csv/bean/BeanToCsv.java
0b8d77be57d9efeae4b65f89df9d6956fa0a8579
[]
no_license
mohbadar/mmo-backoffice
00f5cc72048f777a121e2b26923024f741b8c7a5
eb55863762d3cce4a04502ed458813027da6cec9
refs/heads/master
2022-11-19T13:58:30.545140
2021-02-20T04:36:59
2021-02-20T04:36:59
222,090,501
4
2
null
2022-11-16T01:21:20
2019-11-16T11:38:59
Java
UTF-8
Java
false
false
2,461
java
package af.gov.anar.lib.csv.bean; import af.gov.anar.lib.csv.writer.CsvWriter; import java.beans.IntrospectionException; import java.beans.PropertyDescriptor; import java.io.Writer; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; /** * Allows to export Java beans content to a new CSV spreadsheet file. */ public class BeanToCsv<T> { public BeanToCsv() {} public boolean write(MappingStrategy<T> mapper, Writer writer, List<?> objects) { return write(mapper, new CsvWriter(writer), objects); } public boolean write(MappingStrategy<T> mapper, CsvWriter csv, List<?> objects) { if (objects == null || objects.isEmpty()) return false; try { csv.writeNext(processHeader(mapper)); List<Method> getters = findGetters(mapper); for (Object obj : objects) { List<String> line = processObject(getters, obj); csv.writeNext(line); } return true; } catch (Exception e) { throw new RuntimeException("Error writing CSV !", e); } } protected List<String> processHeader(MappingStrategy<T> mapper) throws IntrospectionException { List<String> values = new ArrayList<String>(); int i = 0; PropertyDescriptor prop = mapper.findDescriptor(i); while (prop != null) { values.add(prop.getName()); i++; prop = mapper.findDescriptor(i); } return values; } protected List<String> processObject(List<Method> getters, Object bean) throws IntrospectionException, IllegalArgumentException, IllegalAccessException, InvocationTargetException { List<String> values = new ArrayList<String>(); // retrieve bean values for (Method getter : getters) { Object value = getter.invoke(bean, (Object[]) null); if (value == null) { values.add("null"); } else { values.add(value.toString()); } } return values; } /** * Build getters list from provided mapper. */ private List<Method> findGetters(MappingStrategy<T> mapper) throws IntrospectionException { int i = 0; PropertyDescriptor prop = mapper.findDescriptor(i); // build getters methods list List<Method> readers = new ArrayList<Method>(); while (prop != null) { readers.add(prop.getReadMethod()); i++; prop = mapper.findDescriptor(i); } return readers; } }
[ "mohammadbadarhashimi@gmail.com" ]
mohammadbadarhashimi@gmail.com
96daaeeb0e587ac6d1d058d8469afcaa4e5804c4
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/6_jnfe-br.com.jnfe.base.CStat-0.5-2/br/com/jnfe/base/CStat_ESTest.java
6c9f01ba0b6c778a792bc48afe7ee6de7e30b070
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
632
java
/* * This file was automatically generated by EvoSuite * Tue Oct 29 09:20:42 GMT 2019 */ package br.com.jnfe.base; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class CStat_ESTest extends CStat_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
1fa1191d8ea58378936d40c69f4821e1b8d71d7c
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/spring-projects--spring-framework/257318eb8754068e543e876e04fb8f4eadabeef1/after/AbstractListenerWriteFlushProcessor.java
66ac22db6b101690f3cd62aa77a6ece75b3bd320
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
6,898
java
/* * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.http.server.reactive; import java.io.IOException; import java.util.Objects; import java.util.concurrent.atomic.AtomicReference; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.reactivestreams.Processor; import org.reactivestreams.Publisher; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; /** * An alternative to {@link AbstractListenerWriteProcessor} but instead writing * a {@code Publisher<Publisher<T>>} with flush boundaries enforces after * the completion of each nested Publisher. * * @author Arjen Poutsma * @author Violeta Georgieva * @author Rossen Stoyanchev * @since 5.0 */ public abstract class AbstractListenerWriteFlushProcessor<T> implements Processor<Publisher<? extends T>, Void> { protected final Log logger = LogFactory.getLog(getClass()); private final WriteResultPublisher resultPublisher = new WriteResultPublisher(); private final AtomicReference<State> state = new AtomicReference<>(State.UNSUBSCRIBED); private volatile boolean subscriberCompleted; private Subscription subscription; // Subscriber implementation... @Override public final void onSubscribe(Subscription subscription) { if (logger.isTraceEnabled()) { logger.trace(this.state + " onSubscribe: " + subscription); } this.state.get().onSubscribe(this, subscription); } @Override public final void onNext(Publisher<? extends T> publisher) { if (logger.isTraceEnabled()) { logger.trace(this.state + " onNext: " + publisher); } this.state.get().onNext(this, publisher); } @Override public final void onError(Throwable t) { if (logger.isTraceEnabled()) { logger.trace(this.state + " onError: " + t); } this.state.get().onError(this, t); } @Override public final void onComplete() { if (logger.isTraceEnabled()) { logger.trace(this.state + " onComplete"); } this.state.get().onComplete(this); } // Publisher implementation... @Override public final void subscribe(Subscriber<? super Void> subscriber) { this.resultPublisher.subscribe(subscriber); } /** * Listeners can call this method to cancel further writing. */ protected void cancel() { this.subscription.cancel(); } /** * Create a new processor for subscribing to the next flush boundary. */ protected abstract Processor<? super T, Void> createWriteProcessor(); /** * Flush the output. */ protected abstract void flush() throws IOException; private boolean changeState(State oldState, State newState) { return this.state.compareAndSet(oldState, newState); } private void writeComplete() { if (logger.isTraceEnabled()) { logger.trace(this.state + " writeComplete"); } this.state.get().writeComplete(this); } private enum State { UNSUBSCRIBED { @Override public <T> void onSubscribe(AbstractListenerWriteFlushProcessor<T> processor, Subscription subscription) { Objects.requireNonNull(subscription, "Subscription cannot be null"); if (processor.changeState(this, REQUESTED)) { processor.subscription = subscription; subscription.request(1); } else { super.onSubscribe(processor, subscription); } } }, REQUESTED { @Override public <T> void onNext(AbstractListenerWriteFlushProcessor<T> processor, Publisher<? extends T> chunk) { if (processor.changeState(this, RECEIVED)) { Processor<? super T, Void> chunkProcessor = processor.createWriteProcessor(); chunk.subscribe(chunkProcessor); chunkProcessor.subscribe(new WriteSubscriber(processor)); } } @Override public <T> void onComplete(AbstractListenerWriteFlushProcessor<T> processor) { if (processor.changeState(this, COMPLETED)) { processor.resultPublisher.publishComplete(); } } }, RECEIVED { @Override public <T> void writeComplete(AbstractListenerWriteFlushProcessor<T> processor) { try { processor.flush(); } catch (IOException ex) { processor.cancel(); processor.onError(ex); } if (processor.subscriberCompleted) { if (processor.changeState(this, COMPLETED)) { processor.resultPublisher.publishComplete(); } } else { if (processor.changeState(this, REQUESTED)) { processor.subscription.request(1); } } } @Override public <T> void onComplete(AbstractListenerWriteFlushProcessor<T> processor) { processor.subscriberCompleted = true; } }, COMPLETED { @Override public <T> void onNext(AbstractListenerWriteFlushProcessor<T> processor, Publisher<? extends T> publisher) { // ignore } @Override public <T> void onError(AbstractListenerWriteFlushProcessor<T> processor, Throwable t) { // ignore } @Override public <T> void onComplete(AbstractListenerWriteFlushProcessor<T> processor) { // ignore } }; public <T> void onSubscribe(AbstractListenerWriteFlushProcessor<T> processor, Subscription subscription) { subscription.cancel(); } public <T> void onNext(AbstractListenerWriteFlushProcessor<T> processor, Publisher<? extends T> publisher) { throw new IllegalStateException(toString()); } public <T> void onError(AbstractListenerWriteFlushProcessor<T> processor, Throwable ex) { if (processor.changeState(this, COMPLETED)) { processor.resultPublisher.publishError(ex); } } public <T> void onComplete(AbstractListenerWriteFlushProcessor<T> processor) { throw new IllegalStateException(toString()); } public <T> void writeComplete(AbstractListenerWriteFlushProcessor<T> processor) { // ignore } private static class WriteSubscriber implements Subscriber<Void> { private final AbstractListenerWriteFlushProcessor<?> processor; public WriteSubscriber(AbstractListenerWriteFlushProcessor<?> processor) { this.processor = processor; } @Override public void onSubscribe(Subscription subscription) { subscription.request(Long.MAX_VALUE); } @Override public void onNext(Void aVoid) { } @Override public void onError(Throwable ex) { this.processor.cancel(); this.processor.onError(ex); } @Override public void onComplete() { this.processor.writeComplete(); } } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
0e49a595e44a96eb7b1a87b509d165b33701cc86
eb31160e5915c422860267acbd1dcb3c3743c09c
/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/records/TBookToBookStoreRecord.java
e8da75eceea9b499073b5ef3bf44346935c3e7ca
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
digulla/jOOQ
b75b43c2e15b4e46d3412aca9d08d65c240c94f3
6c3334d5b73749a2045ae038e71a0003ba5f6139
refs/heads/master
2022-06-20T17:34:48.041188
2022-06-04T21:52:39
2022-06-04T21:52:39
4,752,073
0
0
NOASSERTION
2022-06-04T21:52:40
2012-06-22T14:36:17
Java
UTF-8
Java
false
false
3,501
java
/** * This class is generated by jOOQ */ package org.jooq.test.cubrid.generatedclasses.tables.records; /** * This class is generated by jOOQ. */ public class TBookToBookStoreRecord extends org.jooq.impl.UpdatableRecordImpl<org.jooq.test.cubrid.generatedclasses.tables.records.TBookToBookStoreRecord> { private static final long serialVersionUID = -1140647159; /** * An uncommented item * * PRIMARY KEY * <p> * <code><pre> * CONSTRAINT t_book_to_book_store__fk_b2bs_bs_name * FOREIGN KEY (book_store_name) * REFERENCES DBA.t_book_store (name) * </pre></code> */ public void setBookStoreName(java.lang.String value) { setValue(org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME, value); } /** * An uncommented item * * PRIMARY KEY * <p> * <code><pre> * CONSTRAINT t_book_to_book_store__fk_b2bs_bs_name * FOREIGN KEY (book_store_name) * REFERENCES DBA.t_book_store (name) * </pre></code> */ public java.lang.String getBookStoreName() { return getValue(org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME); } /** * An uncommented item * * PRIMARY KEY * <p> * <code><pre> * CONSTRAINT t_book_to_book_store__fk_b2bs_bs_name * FOREIGN KEY (book_store_name) * REFERENCES DBA.t_book_store (name) * </pre></code> */ public org.jooq.test.cubrid.generatedclasses.tables.records.TBookStoreRecord fetchTBookStore() { return create() .selectFrom(org.jooq.test.cubrid.generatedclasses.tables.TBookStore.T_BOOK_STORE) .where(org.jooq.test.cubrid.generatedclasses.tables.TBookStore.NAME.equal(getValue(org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME))) .fetchOne(); } /** * An uncommented item * * PRIMARY KEY * <p> * <code><pre> * CONSTRAINT t_book_to_book_store__fk_b2bs_b_id * FOREIGN KEY (book_id) * REFERENCES DBA.t_book (id) * </pre></code> */ public void setBookId(java.lang.Integer value) { setValue(org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_ID, value); } /** * An uncommented item * * PRIMARY KEY * <p> * <code><pre> * CONSTRAINT t_book_to_book_store__fk_b2bs_b_id * FOREIGN KEY (book_id) * REFERENCES DBA.t_book (id) * </pre></code> */ public java.lang.Integer getBookId() { return getValue(org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_ID); } /** * An uncommented item * * PRIMARY KEY * <p> * <code><pre> * CONSTRAINT t_book_to_book_store__fk_b2bs_b_id * FOREIGN KEY (book_id) * REFERENCES DBA.t_book (id) * </pre></code> */ public org.jooq.test.cubrid.generatedclasses.tables.records.TBookRecord fetchTBook() { return create() .selectFrom(org.jooq.test.cubrid.generatedclasses.tables.TBook.T_BOOK) .where(org.jooq.test.cubrid.generatedclasses.tables.TBook.ID.equal(getValue(org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_ID))) .fetchOne(); } /** * An uncommented item */ public void setStock(java.lang.Integer value) { setValue(org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.STOCK, value); } /** * An uncommented item */ public java.lang.Integer getStock() { return getValue(org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.STOCK); } /** * Create a detached TBookToBookStoreRecord */ public TBookToBookStoreRecord() { super(org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE); } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
1ed9aa40ceb0b7bf86c24746c79181357d0d1742
54f352a242a8ad6ff5516703e91da61e08d9a9e6
/Source Codes/AtCoder/arc036/B/1940035.java
812db5c02dbf07736796d4c7199083c283c022f1
[]
no_license
Kawser-nerd/CLCDSA
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
aee32551795763b54acb26856ab239370cac4e75
refs/heads/master
2022-02-09T11:08:56.588303
2022-01-26T18:53:40
2022-01-26T18:53:40
211,783,197
23
9
null
null
null
null
UTF-8
Java
false
false
4,117
java
import java.io.*; import java.util.*; import java.math.*; // import java.awt.Point; public class Main { InputStream is; PrintWriter out; String INPUT = ""; long MOD = 1_000_000_007; int inf = Integer.MAX_VALUE; List<Integer>[] arr; List<Integer>[] arr2; boolean[] seen; int[] count; void solve(){ int n = ni(); int[] a = new int[n]; int[] b = new int[n-1]; for(int i = 0; i < n; i++){ a[i] = ni(); } for(int i = 0; i < n-1; i++){ b[i] = a[i+1] - a[i]; } int s = -1; int ans = 1; for(int i = 0; i < n-2; i++){ if(b[i]<0&&b[i+1]>0){ // out.println(i); int res = i-s+1; ans = Math.max(res, ans); s = i; } } ans = Math.max(ans, n-2-s+1); out.println(ans); } void run() throws Exception { is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes()); out = new PrintWriter(System.out); long s = System.currentTimeMillis(); solve(); out.flush(); if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+"ms"); } public static void main(String[] args) throws Exception { new Main().run(); } private byte[] inbuf = new byte[1024]; private int lenbuf = 0, ptrbuf = 0; private int readByte() { if(lenbuf == -1)throw new InputMismatchException(); if(ptrbuf >= lenbuf){ ptrbuf = 0; try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); } if(lenbuf <= 0)return -1; } return inbuf[ptrbuf++]; } private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); } private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; } private double nd() { return Double.parseDouble(ns()); } private char nc() { return (char)skip(); } private String ns() { int b = skip(); StringBuilder sb = new StringBuilder(); while(!(isSpaceChar(b) && b != ' ')){ sb.appendCodePoint(b); b = readByte(); } return sb.toString(); } private char[] ns(int n) { char[] buf = new char[n]; int b = skip(), p = 0; while(p < n && !(isSpaceChar(b))){ buf[p++] = (char)b; b = readByte(); } return n == p ? buf : Arrays.copyOf(buf, p); } private char[][] nm(int n, int m) { char[][] map = new char[n][]; for(int i = 0;i < n;i++)map[i] = ns(m); return map; } private int[] na(int n) { int[] a = new int[n]; for(int i = 0;i < n;i++)a[i] = ni(); return a; } private int ni() { int num = 0, b; boolean minus = false; while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')); if(b == '-'){ minus = true; b = readByte(); } while(true){ if(b >= '0' && b <= '9'){ num = num * 10 + (b - '0'); }else{ return minus ? -num : num; } b = readByte(); } } private long nl() { long num = 0; int b; boolean minus = false; while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')); if(b == '-'){ minus = true; b = readByte(); } while(true){ if(b >= '0' && b <= '9'){ num = num * 10 + (b - '0'); }else{ return minus ? -num : num; } b = readByte(); } } private static void tr(Object... o) { System.out.println(Arrays.deepToString(o)); } }
[ "kwnafi@yahoo.com" ]
kwnafi@yahoo.com
3bae8beb360664d3687876fe22afbd2ff6604aa6
caf76991b058e77da493c3d4f66f34add461ec91
/book-crazy-java-5-codes/05/5.3/ScopeTest3.java
6180358b2098a0763f419951467886c071adc0ae
[ "Apache-2.0" ]
permissive
zou-zhicheng/awesome-java
44122083582e85ecc40ddcd1a422c2e70e327efe
99eaaf93525ffe48598b28c9eb342ddde8de4492
refs/heads/main
2023-09-03T22:20:55.729979
2021-10-29T06:44:20
2021-10-29T06:44:20
366,591,784
1
1
null
null
null
null
UTF-8
Java
false
false
485
java
/** * Description: * 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a><br> * Copyright (C), 2001-2020, Yeeku.H.Lee<br> * This program is protected by copyright laws.<br> * Program Name:<br> * Date:<br> * @author Yeeku.H.Lee kongyeeku@163.com * @version 5.0 */ public class ScopeTest3 { public static void main(String[] args) { // 定义一个代码块局部变量作为循环变量 for (var i = 0; i < 10; i++) { System.out.println("Hello"); } } }
[ "zhichengzou@creditease.cn" ]
zhichengzou@creditease.cn
73e206b893db155b3961859fa20f42564b67963b
1c67af2f5e80f2ffcf4e80ef7b030d7189384ffb
/src/main/java/com/teammetallurgy/atum/items/artifacts/atum/AtumsHomecomingItem.java
806a227d84e2acebbda4b61faa0679f508cb406a
[]
no_license
SamuraiShogun1102/Atum2
9059bd028be3616591de9237212fe28077a446b6
af6443d3c751b898d715b1c25db0337d550acf77
refs/heads/master
2022-11-17T10:23:00.929707
2020-07-12T16:19:51
2020-07-12T16:19:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,051
java
package com.teammetallurgy.atum.items.artifacts.atum; import com.teammetallurgy.atum.init.AtumParticles; import com.teammetallurgy.atum.items.tools.AmuletItem; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.network.play.server.SPlayerPositionLookPacket; import net.minecraft.util.*; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; import javax.annotation.Nonnull; import java.util.EnumSet; import java.util.Set; public class AtumsHomecomingItem extends AmuletItem { public AtumsHomecomingItem() { super(new Item.Properties().maxDamage(20)); } @Override @Nonnull public ActionResult<ItemStack> onItemRightClick(World world, PlayerEntity player, @Nonnull Hand hand) { ItemStack heldStack = player.getHeldItem(hand); BlockPos pos = player.getBedLocation(player.dimension); if (pos == null) { BlockPos spawnPointPos = player.world.getSpawnPoint(); while (spawnPointPos.getY() > 1 && world.isAirBlock(spawnPointPos)) { spawnPointPos = spawnPointPos.down(); } while (!world.canBlockSeeSky(spawnPointPos)) { spawnPointPos = spawnPointPos.up(); } pos = new BlockPos(spawnPointPos.getX(), spawnPointPos.getY(), spawnPointPos.getZ()); } teleport(world, player, hand, pos.getX(), pos.getY(), pos.getZ()); if (!player.isCreative()) { heldStack.damageItem(1, player, (e) -> { e.sendBreakAnimation(hand); }); } onTeleport(world, player); return new ActionResult<>(ActionResultType.PASS, heldStack); } private static void teleport(World world, Entity entity, Hand hand, int x, int y, int z) { float yaw = entity.rotationYaw; float pitch = entity.rotationPitch; if (entity instanceof ServerPlayerEntity) { Set<SPlayerPositionLookPacket.Flags> set = EnumSet.noneOf(SPlayerPositionLookPacket.Flags.class); float f = MathHelper.wrapDegrees(yaw); float f1 = MathHelper.wrapDegrees(pitch); entity.stopRiding(); onTeleport(world, entity); ((ServerPlayerEntity) entity).connection.setPlayerLocation(x, y, z, f, f1, set); entity.setRotationYawHead(f); } else { float f2 = MathHelper.wrapDegrees(yaw); float f3 = MathHelper.wrapDegrees(pitch); f3 = MathHelper.clamp(f3, -90.0F, 90.0F); entity.setLocationAndAngles(x, y, z, f2, f3); entity.setRotationYawHead(f2); } if (!(entity instanceof LivingEntity) || !((LivingEntity) entity).isElytraFlying()) { Vec3d motion = entity.getMotion(); entity.setMotion(new Vec3d(motion.x, 0.0D, motion.z)); entity.onGround = true; } } private static void onTeleport(World world, Entity entity) { if (world instanceof ServerWorld) { float timesRandom = world.rand.nextFloat() * 4.0F; float cosRandom = world.rand.nextFloat() * ((float) Math.PI * 2F); double x = MathHelper.cos(cosRandom) * timesRandom; double y = 0.01D + (world.rand.nextDouble() * 0.5D); double z = MathHelper.sin(cosRandom) * timesRandom; ServerWorld serverWorld = (ServerWorld) world; serverWorld.spawnParticle(AtumParticles.LIGHT_SPARKLE, entity.getPosX() + x * 0.1D, entity.getPosY() + 0.3D, entity.getPosZ() + z * 0.1D, 250, 0.25D, y, 0.25D, 0.005D); } world.playSound(null, entity.getPosition(), SoundEvents.ENTITY_SHULKER_TELEPORT, SoundCategory.PLAYERS, 1.0F, 1.0F); } }
[ "faj10@msn.com" ]
faj10@msn.com
9a0b72b91f0bb29373f190926ac3a3caa5f56ae4
1e2a3700115a42ce0bd71f56680d9ad550862b7f
/java/com/l2jmobius/gameserver/model/entity/clanhall/SiegableHall.java
ff3159a9c5c6b9e8d14da14041f9403d6e2c105c
[]
no_license
toudakos/HighFive
5a75313d43209193ad7bec89ce0f177bd7dddb6f
e76b6a497277f5e88093204b86f004101d0dca52
refs/heads/master
2021-04-23T00:34:59.390728
2020-03-25T04:17:38
2020-03-25T04:17:38
249,884,195
0
0
null
2020-03-25T04:08:31
2020-03-25T04:08:30
null
UTF-8
Java
false
false
6,051
java
/* * This file is part of the L2J Mobius project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jmobius.gameserver.model.entity.clanhall; import java.sql.Connection; import java.sql.PreparedStatement; import java.util.Calendar; import java.util.logging.Level; import com.l2jmobius.commons.database.DatabaseFactory; import com.l2jmobius.gameserver.model.L2Clan; import com.l2jmobius.gameserver.model.L2SiegeClan; import com.l2jmobius.gameserver.model.L2SiegeClan.SiegeClanType; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.entity.ClanHall; import com.l2jmobius.gameserver.model.zone.type.L2SiegableHallZone; import com.l2jmobius.gameserver.model.zone.type.L2SiegeZone; import com.l2jmobius.gameserver.network.serverpackets.SiegeInfo; /** * @author BiggBoss */ public final class SiegableHall extends ClanHall { private static final String SQL_SAVE = "UPDATE siegable_clanhall SET ownerId=?, nextSiege=? WHERE clanHallId=?"; private Calendar _nextSiege; private final long _siegeLength; private final int[] _scheduleConfig = { 7, 0, 0, 12, 0 }; private SiegeStatus _status = SiegeStatus.REGISTERING; private L2SiegeZone _siegeZone; private ClanHallSiegeEngine _siege; public SiegableHall(StatsSet set) { super(set); _siegeLength = set.getLong("siegeLenght"); final String[] rawSchConfig = set.getString("scheduleConfig").split(";"); if (rawSchConfig.length == 5) { for (int i = 0; i < 5; i++) { try { _scheduleConfig[i] = Integer.parseInt(rawSchConfig[i]); } catch (Exception e) { LOGGER.warning("SiegableHall - " + getName() + ": Wrong schedule_config parameters!"); } } } else { LOGGER.warning(getName() + ": Wrong schedule_config value in siegable_halls table, using default (7 days)"); } _nextSiege = Calendar.getInstance(); final long nextSiege = set.getLong("nextSiege"); if ((nextSiege - System.currentTimeMillis()) < 0) { updateNextSiege(); } else { _nextSiege.setTimeInMillis(nextSiege); } if (getOwnerId() != 0) { _isFree = false; loadFunctions(); } } public void spawnDoor() { spawnDoor(false); } public void spawnDoor(boolean isDoorWeak) { for (L2DoorInstance door : getDoors()) { if (door.isDead()) { door.doRevive(); if (isDoorWeak) { door.setCurrentHp(door.getMaxHp() / 2); } else { door.setCurrentHp(door.getMaxHp()); } } if (door.isOpen()) { door.closeMe(); } } } @Override public final void updateDb() { try (Connection con = DatabaseFactory.getConnection(); PreparedStatement ps = con.prepareStatement(SQL_SAVE)) { ps.setInt(1, getOwnerId()); ps.setLong(2, getNextSiegeTime()); ps.setInt(3, getId()); ps.execute(); } catch (Exception e) { LOGGER.log(Level.WARNING, "Exception: SiegableHall.updateDb(): " + e.getMessage(), e); } } public final void setSiege(ClanHallSiegeEngine siegable) { _siege = siegable; _siegeZone.setSiegeInstance(siegable); } public final ClanHallSiegeEngine getSiege() { return _siege; } public final Calendar getSiegeDate() { return _nextSiege; } public final long getNextSiegeTime() { return _nextSiege.getTimeInMillis(); } public long getSiegeLenght() { return _siegeLength; } public final void setNextSiegeDate(long date) { _nextSiege.setTimeInMillis(date); } public final void setNextSiegeDate(Calendar c) { _nextSiege = c; } public final void updateNextSiege() { final Calendar c = Calendar.getInstance(); c.add(Calendar.DAY_OF_YEAR, _scheduleConfig[0]); c.add(Calendar.MONTH, _scheduleConfig[1]); c.add(Calendar.YEAR, _scheduleConfig[2]); c.set(Calendar.HOUR_OF_DAY, _scheduleConfig[3]); c.set(Calendar.MINUTE, _scheduleConfig[4]); c.set(Calendar.SECOND, 0); setNextSiegeDate(c); updateDb(); } public final void addAttacker(L2Clan clan) { if (_siege != null) { _siege.getAttackers().put(clan.getId(), new L2SiegeClan(clan.getId(), SiegeClanType.ATTACKER)); } } public final void removeAttacker(L2Clan clan) { if (_siege != null) { _siege.getAttackers().remove(clan.getId()); } } public final boolean isRegistered(L2Clan clan) { return (_siege != null) && _siege.checkIsAttacker(clan); } public SiegeStatus getSiegeStatus() { return _status; } public final boolean isRegistering() { return _status == SiegeStatus.REGISTERING; } public final boolean isInSiege() { return _status == SiegeStatus.RUNNING; } public final boolean isWaitingBattle() { return _status == SiegeStatus.WAITING_BATTLE; } public final void updateSiegeStatus(SiegeStatus status) { _status = status; } public final L2SiegeZone getSiegeZone() { return _siegeZone; } public final void setSiegeZone(L2SiegeZone zone) { _siegeZone = zone; } public final void updateSiegeZone(boolean active) { _siegeZone.setIsActive(active); } public final void showSiegeInfo(L2PcInstance player) { player.sendPacket(new SiegeInfo(this, player)); } @Override public final boolean isSiegableHall() { return true; } @Override public L2SiegableHallZone getZone() { return (L2SiegableHallZone) super.getZone(); } }
[ "danielbarionn@gmail.com" ]
danielbarionn@gmail.com
8c2d2ed323e3dc225de2d9fc79b902c71b267d25
52aa753885647b44c60abf691bfb0116be6fca4e
/src/edu/cmu/cs/stage3/alice/core/response/queue/QueueResponse.java
83bfe84fe013b09cb0c0a3ff0bca3b695e35962a
[ "MIT" ]
permissive
ai-ku/langvis
10083029599dac0a0098cdc4cbf77f3e1bdf6d43
4ccd37107a3dea4b7b12696270a25df9c17d579d
refs/heads/master
2020-12-24T15:14:43.644569
2014-03-26T13:43:25
2014-03-26T14:09:03
15,770,922
1
0
null
null
null
null
UTF-8
Java
false
false
1,508
java
/* * Copyright (c) 1999-2003, Carnegie Mellon University. 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. Products derived from the software may not be called "Alice", * nor may "Alice" appear in their name, without prior written * permission of Carnegie Mellon University. * * 4. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes software developed by Carnegie Mellon University" */ package edu.cmu.cs.stage3.alice.core.response.queue; import edu.cmu.cs.stage3.alice.core.property.QueueProperty; public class QueueResponse extends edu.cmu.cs.stage3.alice.core.Response { public final QueueProperty queue = new QueueProperty( this, "queue", null ); public class RuntimeQueueResponse extends RuntimeResponse { protected edu.cmu.cs.stage3.alice.core.Queue getQueue() { return QueueResponse.this.queue.getQueueValue(); } } }
[ "emreunal99@gmail.com" ]
emreunal99@gmail.com
4ef22c176c60267784dc4e3f8f1b5fff4173a63b
70123d8b25800e4a1743626822eb651c38513cd7
/rdf/Semantics/src/com/rift/coad/rdf/semantic/util/DateHelper.java
889a8f826731b6be0246579c8394fca9e13d9079
[]
no_license
brettchaldecott/dipforge
bb9205cddaba60d61ab7f65b58c22a058264b698
ca2fe194156754d142fc48fdb8b963f37aa7c6a3
refs/heads/master
2021-03-19T12:14:25.926735
2016-01-22T12:06:22
2016-01-22T12:06:22
1,043,676
2
1
null
null
null
null
UTF-8
Java
false
false
2,225
java
/* * CoaduntionSemantics: The semantic library for coadunation os * Copyright (C) 2009 2015 Burntjam * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DateHelper.java */ // package imports package com.rift.coad.rdf.semantic.util; // java imports import java.util.Date; import java.text.SimpleDateFormat; // coadunation imports import com.rift.coad.rdf.semantic.Constants; /** * This object is responsible for converting dates to and from strings and for * handling date values. * * @author brett chaldecott */ public class DateHelper { // private member variables private Date value; /** * This constructor sets the date value for the helper. * * @param value The value to generate the string representation from. */ public DateHelper(Date value) { this.value = value; } /** * This method is responsible for parsing the string value. * * @param value The value to that has to be converted to string */ public static Date parse(String value) throws UtilException { try { return new SimpleDateFormat(Constants.DATE_FORMAT).parse(value); } catch (Exception ex) { throw new UtilException("Failed to parse the date : " + ex.getMessage(),ex); } } /** * This method converts the date format to a string. * * @return The formated string value. */ public String toString() { return new SimpleDateFormat(Constants.DATE_FORMAT).format(value); } }
[ "brett.chaldecott@gmail.com" ]
brett.chaldecott@gmail.com
98feaf676806c67894f0937509d5274aa1330e71
2b2fcb1902206ad0f207305b9268838504c3749b
/WakfuClientSources/srcx/class_10336_dRP.java
11a0d8e8709e581ec41cb94ee4ae777ce8f4827d
[]
no_license
shelsonjava/Synx
4fbcee964631f747efc9296477dee5a22826791a
0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d
refs/heads/master
2021-01-15T13:51:41.816571
2013-11-17T10:46:22
2013-11-17T10:46:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
793
java
class dRP implements cvW { private final bKm mnv; private Qh mnw; private dwo mnx; dRP(bKm parambKm) { this.mnv = parambKm; } public void a(aqv paramaqv, boolean paramBoolean) { byz localbyz = byv.bFN().bFO(); this.mnw = new VD(this, localbyz); this.mnx = new VC(this); this.mnv.aeL().a(this.mnw); localbyz.a(this.mnx); } public void b(aqv paramaqv, boolean paramBoolean) { this.mnv.aeL().b(this.mnw); byv.bFN().bFO().b(this.mnx); this.mnw = null; this.mnx = null; } public boolean a(cWG paramcWG) { switch (paramcWG.getId()) { case 19992: case 19995: byv.bFN().b(this); return false; } return true; } public long getId() { return 0L; } public void a(long paramLong) { } }
[ "music_inme@hotmail.fr" ]
music_inme@hotmail.fr
ddf148c43cbbc3ccc23072edbec9df7ad5d0bfcf
d5644e529f2c067b6f3c3783e9782cf6df7c1611
/bitcamp-java/src/main/java/com/eomcs/net/ex02/Client0310.java
a912af23b7c45421970d86dcdb5b791f7366fcb3
[]
no_license
JUNE-29/bitcamp-study
1806c5f392a41580268b62fbbf6d846d3d4d502b
d53b079f29bce74d2d67a31061b74fdc5972dcc0
refs/heads/master
2022-08-02T12:24:18.732053
2020-05-27T04:03:39
2020-05-27T04:03:39
225,501,857
0
0
null
null
null
null
UTF-8
Java
false
false
1,453
java
// 타임아웃 시간 설정하기 package com.eomcs.net.ex02; import java.net.InetSocketAddress; import java.net.Socket; import java.net.SocketAddress; import java.util.Scanner; public class Client0310 { public static void main(String[] args) throws Exception { // 실행을 잠시 중단시키기 위해 사용 Scanner keyScan = new Scanner(System.in); System.out.println("클라이언트 실행!"); // 1) 소켓을 생성한다. Socket socket = new Socket(); System.out.println("소켓 생성됨."); // 2) 연결할 서버의 주소를 준비한다. SocketAddress socketAddress = new InetSocketAddress("localhost", 8888); // 3) 서버와의 연결을 시도한다. // => 타임아웃으로 지정된 시간 안에 서버와 연결되지 않으면 즉시 예외가 발생한다. // System.out.println("서버와 연결 중..."); socket.connect(socketAddress, 5000); // timeout : milliseconds // 문자열로 주소를 적을 수 없다. // SocketAddress 를 넣을수 없으니 추상클래스 객체여서 // 그래서 SoketAddress를 상속받은 일반 클래스의 객체를 넣어줘야 한다. // System.out.println("서버와 연결되었음!"); keyScan.nextLine(); // 사용자가 엔터를 칠 때까지 다음 코드로 이동하지 않는다. socket.close(); System.out.println("서버와의 연결을 끊었음."); keyScan.close(); } }
[ "jiyuni529@gmail.com" ]
jiyuni529@gmail.com
8591e40fb857589f7035c58c5491f377f59312eb
2f24ca77cfac900d46a87edd93482c212b11155e
/app/src/main/java/star/liuwen/com/cash_books/Activity/PaymentActivity.java
c38455aa92d762d3cf7345a9142c357a4c078c36
[]
no_license
jzxyouok/Cash_Book
261e6f3ee53c3178c941a6cd76cb8d802e93dc0c
3c240647f81bfb6a07cd7cf0e664db986c017997
refs/heads/master
2021-01-16T17:48:58.531725
2017-01-13T09:31:08
2017-01-13T09:31:08
78,915,872
0
1
null
2017-01-14T05:18:32
2017-01-14T05:18:32
null
UTF-8
Java
false
false
5,426
java
package star.liuwen.com.cash_books.Activity; import android.app.Activity; import android.content.Intent; import android.os.Build; import android.os.Handler; import android.os.Message; import android.view.View; import android.view.ViewStub; import android.view.Window; import android.view.WindowManager; import android.widget.RelativeLayout; import android.widget.TextView; import com.bigkoo.pickerview.TimePickerView; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import star.liuwen.com.cash_books.Base.BaseActivity; import star.liuwen.com.cash_books.R; import star.liuwen.com.cash_books.Utils.DateTimeUtil; import star.liuwen.com.cash_books.Utils.StatusBarUtils; import star.liuwen.com.cash_books.Utils.ToastUtils; import star.liuwen.com.cash_books.View.NumberAnimTextView; /** * Created by liuwen on 2016/12/30. */ public class PaymentActivity extends BaseActivity { private RelativeLayout mRyBg; private TimePickerView pvTime; private TextView tvYear, tvZhuangZhang, tvChu, tvRu; private NumberAnimTextView tvAccount; private String AccountSetting; private ViewStub mViewStub; Handler handler = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); switch (msg.what) { case 0: ToastUtils.showToast(PaymentActivity.this, "发消息了啊"); break; } } }; @Override public int activityLayoutRes() { return R.layout.payment_activity; } @Override public void initView() { mRyBg = (RelativeLayout) findViewById(R.id.pay_ry); mViewStub = (ViewStub) findViewById(R.id.view_stub); mViewStub.inflate(); setRightText(getString(R.string.pay_setting), new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(PaymentActivity.this, PaySettingActivity.class); intent.putExtra("666", AccountSetting); startActivity(intent); } }); tvYear = (TextView) findViewById(R.id.pay_txt_year); tvAccount = (NumberAnimTextView) findViewById(R.id.pay_txt_account); tvZhuangZhang = (TextView) findViewById(R.id.pay_zhuanzhuang); tvChu = (TextView) findViewById(R.id.pay_chu); tvRu = (TextView) findViewById(R.id.pay_ru); String value = getIntent().getStringExtra("paySetting"); if (value.equals("zhifubao")) { mRyBg.setBackgroundColor(this.getResources().getColor(R.color.zhifubao)); setTitleBg(R.color.zhifubao); StatusBarUtils.setWindowStatusBarColor(PaymentActivity.this, R.color.zhifubao); setTitle("支付宝"); AccountSetting = "zfb"; setTexTSizeAndColor(); } else if (value.equals("xinyaka")) { mRyBg.setBackgroundColor(this.getResources().getColor(R.color.xinyongka)); setTitleBg(R.color.xinyongka); StatusBarUtils.setWindowStatusBarColor(PaymentActivity.this, R.color.xinyongka); setTitle("信用卡"); AccountSetting = "xyk"; setTexTSizeAndColor(); } else if (value.equals("cash")) { mRyBg.setBackgroundColor(this.getResources().getColor(R.color.xianjian)); setTitleBg(R.color.xianjian); StatusBarUtils.setWindowStatusBarColor(PaymentActivity.this, R.color.xianjian); setTitle("现金"); AccountSetting = "cash"; setTexTSizeAndColor(); } else if (value.equals("chuxuka")) { mRyBg.setBackgroundColor(this.getResources().getColor(R.color.chuxuka)); StatusBarUtils.setWindowStatusBarColor(PaymentActivity.this, R.color.chuxuka); setTitleBg(R.color.chuxuka); setTitle("储蓄卡"); AccountSetting = "cxk"; setTexTSizeAndColor(); } setBackView(); } public void setTexTSizeAndColor() { setLeftText("钱包"); setLeftTextColor(this.getResources().getColor(R.color.white)); setRightTxtColor(this.getResources().getColor(R.color.white)); setTitlesColor(this.getResources().getColor(R.color.white)); } public void toData(View view) { //时间选择器 pvTime = new TimePickerView(this, TimePickerView.Type.YEAR_MONTH); //设置标题 pvTime.setTitle("选择日期"); //控制时间范围 Calendar calendar = Calendar.getInstance(); pvTime.setRange(calendar.get(Calendar.YEAR) - 20, calendar.get(Calendar.YEAR) + 30); pvTime.setTime(new Date()); //设置是否循环 pvTime.setCyclic(false); //设置是否可以关闭 pvTime.setCancelable(true); //设置选择监听 pvTime.setOnTimeSelectListener(new TimePickerView.OnTimeSelectListener() { @Override public void onTimeSelect(Date date) { handler.sendEmptyMessage(0); tvYear.setText(DateTimeUtil.getTime(date)); } }); //显示 pvTime.show(); } public void toZhuangZhang(View view) { tvAccount.setPrefixString("¥"); tvAccount.setNumberString("85260"); } public void toYuer(View view) { } }
[ "370494581@qq.com" ]
370494581@qq.com
3139500b69e722484d79d9f8e51571a5184bb51a
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module59/src/main/java/module59packageJava0/Foo158.java
b44b5de127750075fc703c4a147dd1f89eeb48f4
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
389
java
package module59packageJava0; import java.lang.Integer; public class Foo158 { Integer int0; Integer int1; public void foo0() { new module59packageJava0.Foo157().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
cabcaf44a5d2623fad71eeaaea812444fe296b13
c5a67e2aeabbde81c93a329ae2e9c7ccc3631246
/src/main/java/com/vnw/data/jooq/tables/TblemployerCompanyimage.java
b9147084b9ba172b13cdfb6e97070f1ced596bfc
[]
no_license
phuonghuynh/dtools
319d773d01c32093fd17d128948ef89c81f3f4bf
883d15ef19da259396a7bc16ac9df590e8add015
refs/heads/master
2016-09-14T03:46:53.463230
2016-05-25T04:04:32
2016-05-25T04:04:32
59,534,869
1
0
null
null
null
null
UTF-8
Java
false
false
6,833
java
/** * This class is generated by jOOQ */ package com.vnw.data.jooq.tables; import com.vnw.data.jooq.Keys; import com.vnw.data.jooq.VnwCore; import com.vnw.data.jooq.tables.records.TblemployerCompanyimageRecord; import java.sql.Timestamp; import java.util.Arrays; import java.util.List; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Identity; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; import org.jooq.UniqueKey; import org.jooq.impl.TableImpl; import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.8.0" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TblemployerCompanyimage extends TableImpl<TblemployerCompanyimageRecord> { private static final long serialVersionUID = -177795504; /** * The reference instance of <code>vnw_core.tblemployer_companyimage</code> */ public static final TblemployerCompanyimage TBLEMPLOYER_COMPANYIMAGE = new TblemployerCompanyimage(); /** * The class holding records for this type */ @Override public Class<TblemployerCompanyimageRecord> getRecordType() { return TblemployerCompanyimageRecord.class; } /** * The column <code>vnw_core.tblemployer_companyimage.id</code>. */ public final TableField<TblemployerCompanyimageRecord, UInteger> ID = createField("id", org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); /** * The column <code>vnw_core.tblemployer_companyimage.companyid</code>. id of company */ public final TableField<TblemployerCompanyimageRecord, Integer> COMPANYID = createField("companyid", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, " id of company"); /** * The column <code>vnw_core.tblemployer_companyimage.type</code>. 0: cover photo 1: gallery photo 2: Job photo */ public final TableField<TblemployerCompanyimageRecord, Byte> TYPE = createField("type", org.jooq.impl.SQLDataType.TINYINT.nullable(false), this, " 0: cover photo 1: gallery photo 2: Job photo"); /** * The column <code>vnw_core.tblemployer_companyimage.fileExtension</code>. extension of image ex : jpg */ public final TableField<TblemployerCompanyimageRecord, String> FILEEXTENSION = createField("fileExtension", org.jooq.impl.SQLDataType.VARCHAR.length(255).nullable(false), this, " extension of image ex : jpg "); /** * The column <code>vnw_core.tblemployer_companyimage.mineName</code>. short path of image ex : image/jpeg */ public final TableField<TblemployerCompanyimageRecord, String> MINENAME = createField("mineName", org.jooq.impl.SQLDataType.VARCHAR.length(50).nullable(false), this, " short path of image ex : image/jpeg "); /** * The column <code>vnw_core.tblemployer_companyimage.path</code>. path of image ex : http://images.vietnamworks.com/pictureofresume/c4/1.jpg */ public final TableField<TblemployerCompanyimageRecord, String> PATH = createField("path", org.jooq.impl.SQLDataType.VARCHAR.length(255), this, "path of image ex : http://images.vietnamworks.com/pictureofresume/c4/1.jpg"); /** * The column <code>vnw_core.tblemployer_companyimage.size</code>. size of image */ public final TableField<TblemployerCompanyimageRecord, UInteger> SIZE = createField("size", org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).defaultValue(org.jooq.impl.DSL.field("0", org.jooq.impl.SQLDataType.INTEGERUNSIGNED)), this, "size of image"); /** * The column <code>vnw_core.tblemployer_companyimage.height</code>. height of image */ public final TableField<TblemployerCompanyimageRecord, UInteger> HEIGHT = createField("height", org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).defaultValue(org.jooq.impl.DSL.field("0", org.jooq.impl.SQLDataType.INTEGERUNSIGNED)), this, "height of image"); /** * The column <code>vnw_core.tblemployer_companyimage.width</code>. width of image */ public final TableField<TblemployerCompanyimageRecord, UInteger> WIDTH = createField("width", org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).defaultValue(org.jooq.impl.DSL.field("0", org.jooq.impl.SQLDataType.INTEGERUNSIGNED)), this, "width of image"); /** * The column <code>vnw_core.tblemployer_companyimage.createdDate</code>. First day upload image */ public final TableField<TblemployerCompanyimageRecord, Timestamp> CREATEDDATE = createField("createdDate", org.jooq.impl.SQLDataType.TIMESTAMP, this, " First day upload image"); /** * The column <code>vnw_core.tblemployer_companyimage.isApprove</code>. */ public final TableField<TblemployerCompanyimageRecord, Byte> ISAPPROVE = createField("isApprove", org.jooq.impl.SQLDataType.TINYINT.nullable(false).defaultValue(org.jooq.impl.DSL.field("1", org.jooq.impl.SQLDataType.TINYINT)), this, ""); /** * Create a <code>vnw_core.tblemployer_companyimage</code> table reference */ public TblemployerCompanyimage() { this("tblemployer_companyimage", null); } /** * Create an aliased <code>vnw_core.tblemployer_companyimage</code> table reference */ public TblemployerCompanyimage(String alias) { this(alias, TBLEMPLOYER_COMPANYIMAGE); } private TblemployerCompanyimage(String alias, Table<TblemployerCompanyimageRecord> aliased) { this(alias, aliased, null); } private TblemployerCompanyimage(String alias, Table<TblemployerCompanyimageRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); } /** * {@inheritDoc} */ @Override public Schema getSchema() { return VnwCore.VNW_CORE; } /** * {@inheritDoc} */ @Override public Identity<TblemployerCompanyimageRecord, UInteger> getIdentity() { return Keys.IDENTITY_TBLEMPLOYER_COMPANYIMAGE; } /** * {@inheritDoc} */ @Override public UniqueKey<TblemployerCompanyimageRecord> getPrimaryKey() { return Keys.KEY_TBLEMPLOYER_COMPANYIMAGE_PRIMARY; } /** * {@inheritDoc} */ @Override public List<UniqueKey<TblemployerCompanyimageRecord>> getKeys() { return Arrays.<UniqueKey<TblemployerCompanyimageRecord>>asList(Keys.KEY_TBLEMPLOYER_COMPANYIMAGE_PRIMARY); } /** * {@inheritDoc} */ @Override public TblemployerCompanyimage as(String alias) { return new TblemployerCompanyimage(alias, this); } /** * Rename this table */ public TblemployerCompanyimage rename(String name) { return new TblemployerCompanyimage(name, null); } }
[ "phuonghqh@gmail.com" ]
phuonghqh@gmail.com
e9501c9a672ad7163e5ebd5b422aef6539d24c75
8388d3009c0be9cb4e3ea25abbce7a0ad6f9b299
/business/agriclaim/agriclaim-core/src/main/java/com/sinosoft/agriclaim/core/common/utils/XMLUtils.java
81ba296c020e703e1a7bbb4d68590d6bb967d423
[]
no_license
foxhack/NewAgri2018
a182bd34d0c583a53c30d825d5e2fa569f605515
be8ab05e0784c6e7e7f46fea743debb846407e4f
refs/heads/master
2021-09-24T21:58:18.577979
2018-10-15T11:24:21
2018-10-15T11:24:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,406
java
package com.sinosoft.agriclaim.core.common.utils; import java.io.File; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * @description xml和bean相互转化工具类 * @author 杨航 * @date 2017年11月30日 下午3:25:53 */ public final class XMLUtils { public static Document newDocument() throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(true); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.newDocument(); return document; } public static Document parse(File file) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(file); document.normalize(); return document; } public static Document parse(InputStream is) throws Exception { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document document = builder.parse(is); document.normalize(); return document; } public static Document parse(String fileName) throws Exception { return parse(new File(fileName)); } public static Node getSingleNodeByTag(Document document, String tagName) { NodeList nodeList = document.getElementsByTagName(tagName); int length = nodeList.getLength(); if (length == 1) { return nodeList.item(0); } return null; } public static String getNodeAttribute(Node currentNode, String attrName) { String value = ""; if (currentNode.getAttributes().getNamedItem(attrName) != null) { value = currentNode.getAttributes().getNamedItem(attrName).getNodeValue(); } value = nullToEmpty(value); return value; } public static Node getChildNodeByTagName(Node currentNode, String tagName) { Node returnNode = null; NodeList nodeList = currentNode.getChildNodes(); Node node = null; int i = 0; for (int n = nodeList.getLength(); i < n; ++i) { node = nodeList.item(i); if (node.getNodeName().equals(tagName)) { returnNode = node; break; } } return returnNode; } /** * @description 根据标签名获取所有的子节点对象 * @author 杨航 * @date 2017年12月2日 上午10:47:38 * @param currentNode 当前的节点 * @param tagName 标签名 * @return tempNodes 获取到的节点数组 */ public static Node[] getChildNodesByTagName(Node currentNode, String tagName) { List<Node> nodes = new ArrayList<>(); if ((currentNode == null) || (!currentNode.hasChildNodes())) { return new Node[0]; } NodeList nodeList = currentNode.getChildNodes(); Node node = null; int i = 0; for (int n = nodeList.getLength(); i < n; ++i) { node = nodeList.item(i); if (node.getNodeName().equals(tagName)) { nodes.add(node); } } Node[] tempNodes = new Node[nodes.size()]; nodes.toArray(tempNodes); return tempNodes; } public static Node[] getChildElements(Node currentNode) { List<Node> nodes = new ArrayList<>(); if ((currentNode == null) || (!currentNode.hasChildNodes())) { return new Node[0]; } NodeList nodeList = currentNode.getChildNodes(); Node node = null; int i = 0; for (int n = nodeList.getLength(); i < n; ++i) { node = nodeList.item(i); if (node.getNodeType() == 1) { nodes.add(node); } } Node[] tempNodes = new Node[nodes.size()]; nodes.toArray(tempNodes); return tempNodes; } /** * @description 获取子节点的值 * @author 杨航 * @date 2017年12月2日 上午10:46:19 * @param currentNode 当前节点 * @param nodeName 子节点的名称 * @return value 子节点的值 */ public static String getChildNodeValue(Node currentNode, String nodeName) { String value = ""; NodeList nodeList = currentNode.getChildNodes(); Node node = null; int i = 0; for (int n = nodeList.getLength(); i < n; ++i) { node = nodeList.item(i); if (node.getNodeName().equals(nodeName)) { if (node.getFirstChild() == null) break; value = nullToEmpty(node.getFirstChild().getNodeValue()); break; } } return value; } private static String nullToEmpty(String str) { return (str == null) ? "" : str; } public static void writeXMLFile(Document document, String fileName) throws Exception { DOMSource source = new DOMSource(document); writeXMLFile(source, fileName); } public static void writeXMLFile(DOMSource source, String fileName) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(true); factory.setNamespaceAware(true); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); StreamResult fileResult = new StreamResult(new File(fileName)); transformer.transform(source, fileResult); } public static void writeXMLFile(Node node, String fileName) throws Exception { DOMSource source = new DOMSource(node); writeXMLFile(source, fileName); } /** * @description 根据路径获取子节点 * @author 杨航 * @date 2017年12月2日 上午10:49:06 * @param currentNode 当前的节点 * @param path 路径 * @return node 获取到的节点对象 */ public static Node getChildNodeByPath(Node currentNode, String path) { String tagName = path; int pos = path.indexOf("/"); if (pos > -1) { tagName = path.substring(0, pos); path = path.substring(pos + 1); if (tagName.equals("")) { return getChildNodeByPath(currentNode, path); } if (tagName.equals("/")) { return getChildNodeByPath(currentNode.getOwnerDocument(), path); } Node node = getChildNodeByTagName(currentNode, tagName); if (node == null) { return null; } return getChildNodeByPath(node, path); } return getChildNodeByTagName(currentNode, tagName); } public static void main(String[] args) throws Exception { } }
[ "vicentdk77@users.noreply.github.com" ]
vicentdk77@users.noreply.github.com
a677d4a15470fcc7a142115bf6f5d26de7168d6c
05cb5ac927da698e0f5d25bbaebdbcabcd4190c2
/22e/21_10_07_variables_tasks/src/de/telran/Main.java
28dc577a5db467de55a233d9009b8745ffdc6a27
[]
no_license
sharf85/tasks
8a1bc617848bc35abb59cd7d8ed5dff4a5d11d4e
403349e79022402ea2e72f28bf3820be80e706f5
refs/heads/master
2023-03-15T19:11:20.045262
2022-06-15T10:50:07
2022-06-15T10:50:07
205,693,802
17
47
null
2023-03-04T19:05:29
2019-09-01T15:12:47
JavaScript
UTF-8
Java
false
false
951
java
package de.telran; public class Main { public static void main(String[] args) { // Masha ate 2.5 apples, Petya ate 3.5 apples. How many apples did they eat together? double mashaAppleAteNumber = 2.5; double petyaAppleAteNumber = 3.5; double totalAppleAteNumber = mashaAppleAteNumber + petyaAppleAteNumber; System.out.println("They ate " + totalAppleAteNumber + " in total"); // Masha ate 1/2 of a pie, Petya ate twice less than Masha, Vasya ate 4 times more than Masha and Petya ate together. // How much did they eat all together? double mashaPieAteAmount = 1d / 2; double petyaPieAteAmount = mashaPieAteAmount / 2; double vasyaPieAteAmount = (mashaPieAteAmount + petyaPieAteAmount) * 4; double pieAteInTotal = mashaPieAteAmount + petyaPieAteAmount + vasyaPieAteAmount; System.out.println("They ate " + pieAteInTotal + " pie in total"); } }
[ "evgeny.sharfarets@gmail.com" ]
evgeny.sharfarets@gmail.com
0e95acd2971285dfa03e307f2738e9432c97a9be
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project19/src/main/java/org/gradle/test/performance19_2/Production19_192.java
af4ba4c9c205106db1ce9e6540e6c1d8f1bdc74a
[]
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
305
java
package org.gradle.test.performance19_2; public class Production19_192 extends org.gradle.test.performance11_2.Production11_192 { private final String property; public Production19_192() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
9972f34326db7833169c47b275d1e664d411ed95
fe9e1e526d2a103a023d01d907bef329569c1066
/disconnect-highcharts/src/main/java/com/github/fluorumlabs/disconnect/highcharts/SeriesBellcurveDataMarkerStatesNormalOptions.java
8be141bdecc6f315123bc7fdc7ce9485a75132a3
[ "Apache-2.0" ]
permissive
Heap-leak/disconnect-project
0a7946b4c79ec25cb6a602ebb220a64b90f0db94
04f6d77d4db3c385bcbeb5b701c97bd411540059
refs/heads/master
2022-11-14T05:23:30.074640
2020-04-29T14:14:47
2020-04-29T14:14:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,587
java
package com.github.fluorumlabs.disconnect.highcharts; import javax.annotation.Nullable; import js.lang.Any; import js.lang.Unknown; import org.teavm.jso.JSProperty; /** * (Highcharts, Highstock, Highmaps) The normal state of a single point marker. * Currently only used for setting animation when returning to normal state from * hover. * * @see <a href="https://api.highcharts.com/highcharts/series.bellcurve.data.marker.states.normal">https://api.highcharts.com/highcharts/series.bellcurve.data.marker.states.normal</a> * @see <a href="https://api.highcharts.com/highstock/series.bellcurve.data.marker.states.normal">https://api.highcharts.com/highstock/series.bellcurve.data.marker.states.normal</a> * @see <a href="https://api.highcharts.com/highmaps/series.bellcurve.data.marker.states.normal">https://api.highcharts.com/highmaps/series.bellcurve.data.marker.states.normal</a> * */ public interface SeriesBellcurveDataMarkerStatesNormalOptions extends Any { /** * (Highcharts, Highstock, Highmaps) Animation when returning to normal * state after hovering. * * @see <a href="https://api.highcharts.com/highcharts/series.bellcurve.data.marker.states.normal.animation">https://api.highcharts.com/highcharts/series.bellcurve.data.marker.states.normal.animation</a> * @see <a href="https://api.highcharts.com/highstock/series.bellcurve.data.marker.states.normal.animation">https://api.highcharts.com/highstock/series.bellcurve.data.marker.states.normal.animation</a> * @see <a href="https://api.highcharts.com/highmaps/series.bellcurve.data.marker.states.normal.animation">https://api.highcharts.com/highmaps/series.bellcurve.data.marker.states.normal.animation</a> * * @implspec animation?: (boolean|AnimationOptionsObject); * */ @JSProperty("animation") @Nullable Unknown getAnimation(); /** * (Highcharts, Highstock, Highmaps) Animation when returning to normal * state after hovering. * * @see <a href="https://api.highcharts.com/highcharts/series.bellcurve.data.marker.states.normal.animation">https://api.highcharts.com/highcharts/series.bellcurve.data.marker.states.normal.animation</a> * @see <a href="https://api.highcharts.com/highstock/series.bellcurve.data.marker.states.normal.animation">https://api.highcharts.com/highstock/series.bellcurve.data.marker.states.normal.animation</a> * @see <a href="https://api.highcharts.com/highmaps/series.bellcurve.data.marker.states.normal.animation">https://api.highcharts.com/highmaps/series.bellcurve.data.marker.states.normal.animation</a> * * @implspec animation?: (boolean|AnimationOptionsObject); * */ @JSProperty("animation") void setAnimation(boolean value); /** * (Highcharts, Highstock, Highmaps) Animation when returning to normal * state after hovering. * * @see <a href="https://api.highcharts.com/highcharts/series.bellcurve.data.marker.states.normal.animation">https://api.highcharts.com/highcharts/series.bellcurve.data.marker.states.normal.animation</a> * @see <a href="https://api.highcharts.com/highstock/series.bellcurve.data.marker.states.normal.animation">https://api.highcharts.com/highstock/series.bellcurve.data.marker.states.normal.animation</a> * @see <a href="https://api.highcharts.com/highmaps/series.bellcurve.data.marker.states.normal.animation">https://api.highcharts.com/highmaps/series.bellcurve.data.marker.states.normal.animation</a> * * @implspec animation?: (boolean|AnimationOptionsObject); * */ @JSProperty("animation") void setAnimation(AnimationOptionsObject value); }
[ "fluorumlabs@users.noreply.github.com" ]
fluorumlabs@users.noreply.github.com
75727f40917bc290e6e458fbd3c80fad54dbbb37
ff449d15ac7ddcfa41b1f25c28e22e086d661e3a
/src/main/java/com/churchmutual/restclient/RestclientApplication.java
24bd25c408f438f89d5c7d737798d63b5fe2bf75
[]
no_license
kousen/site_geocoder
6df081032b7964ea89a917af0c3a31fe55b9cf6a
7cf3a7dbe4825bd05abaaf8f853c26411ef4cd2e
refs/heads/master
2021-09-24T18:11:23.184251
2021-09-16T04:19:56
2021-09-16T04:19:56
239,876,344
0
0
null
null
null
null
UTF-8
Java
false
false
991
java
package com.churchmutual.restclient; import com.churchmutual.restclient.dao.SiteRepository; import com.churchmutual.restclient.entities.Site; import com.churchmutual.restclient.services.GeocoderService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import java.util.List; @SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection") @SpringBootApplication public class RestclientApplication implements CommandLineRunner { @Autowired private GeocoderService service; public static void main(String[] args) { SpringApplication.run(RestclientApplication.class, args); } @Override public void run(String... args) throws Exception { service.addSite("Merrill", "WI"); service.addSite("Green Bay", "WI"); service.addSite("Wausau", "WI"); } }
[ "ken.kousen@kousenit.com" ]
ken.kousen@kousenit.com
3ae2072770db5fc3200cff54dc2e4933df002327
87f970ab8b4b504c8215f6aac2d6e98ac0e9f9d5
/src/java/com/wonders/stpt/exam/service/ExamQuestionService.java
ce1bc4ef8dbef9e1c995f35642131a83c59e436b
[]
no_license
Q-jone/wd-portal
f7339fd76e89744576780b0f02761c74a77b9a13
7dd219cf23c7474d2a81f3ae61cfed6e458f8e88
refs/heads/master
2021-01-19T18:41:43.377611
2015-06-24T15:57:18
2015-06-24T15:57:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
473
java
package com.wonders.stpt.exam.service; import java.util.List; import com.wonders.stpt.exam.entity.ExamGroup; import com.wonders.stpt.exam.entity.ExamQuestion; public interface ExamQuestionService { public ExamQuestion find(String id); public List<ExamQuestion> findByMainId(String mainId); public List<ExamQuestion> findByGroupId(String groupId); public ExamQuestion save(ExamQuestion bo,String[] sid,String[] options); public int deleteById(String id); }
[ "657603429@qq.com" ]
657603429@qq.com
5510bfe4f6d3d4f385c9a5dac309de971fa9c7da
d66be5471ac454345de8f118ab3aa3fe55c0e1ee
/providers/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/domain/Task.java
2c5cdd3331eea6dc4bdb011b121ed8fb1d4f45cf
[ "Apache-2.0" ]
permissive
adiantum/jclouds
3405b8daf75b8b45e95a24ff64fda6dc3eca9ed6
1cfbdf00f37fddf04249feedd6fc18ee122bdb72
refs/heads/master
2021-01-18T06:02:46.877904
2011-04-05T07:14:18
2011-04-05T07:14:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,917
java
package org.jclouds.savvis.vpdc.domain; import static com.google.common.base.Preconditions.checkNotNull; import java.net.URI; import java.util.Date; import javax.annotation.Nullable; /** * The result of a client request cannot be returned immediately, the server creates a task entity * and returns its URL to the client. The client can use this URL in a subsequent GET request to * obtain the current status of the task. * * @see <a href="https://api.sandbox.symphonyvpdc.savvis.net/doc/spec/api/getTask.html" /> */ public class Task extends ResourceImpl { public static Builder builder() { return new Builder(); } public static class Builder extends ResourceImpl.Builder { private Status status; private Date startTime; private Date endTime; private Resource owner; private Resource result; private TaskError error; public Builder status(Status status) { this.status = status; return this; } public Builder startTime(Date startTime) { this.startTime = startTime; return this; } public Builder endTime(Date endTime) { this.endTime = endTime; return this; } public Builder owner(Resource owner) { this.owner = owner; return this; } public Builder result(Resource result) { this.result = result; return this; } public Builder error(TaskError error) { this.error = error; return this; } @Override public Builder id(String id) { return Builder.class.cast(super.id(id)); } @Override public Builder name(String name) { return Builder.class.cast(super.name(name)); } @Override public Builder type(String type) { return Builder.class.cast(super.type(type)); } @Override public Builder href(URI href) { return Builder.class.cast(super.href(href)); } @Override public Task build() { return new Task(id, name, type, href, status, startTime, endTime, owner, result, error); } public static Builder fromTask(Task in) { return new Builder().id(in.getId()).name(in.getName()).type(in.getType()).href(in.getHref()) .status(in.getStatus()).startTime(in.getStartTime()).endTime(in.getEndTime()).owner(in.getOwner()) .error(in.getError()).result(in.getResult()); } } public enum Status { /** * Savvis VPDC successfully provisioned and available for use. */ SUCCESS, /** * Savvis VPDC is processing the user request, please wait for the provisioning process to * complete. */ RUNNING, /** * Savvis VPDC is processing the user request, please wait for the provisioning process to * complete. */ QUEUED, /** * Savvis VPDC is failed, please kindly contact Savvis administrator for further * clarification/assistance with the respective request data. */ ERROR, /** * Unexpected Savvus VPDC Status, Savvis VPDC is failed, please kindly contact Savvis * administrator for further clarification/assistance with the respective request data. */ NONE, UNRECOGNIZED; public String value() { return name().toLowerCase(); } @Override public String toString() { return value(); } public static Status fromValue(String status) { try { return valueOf(checkNotNull(status, "status").toUpperCase()); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } } } private final Status status; private final Date startTime; private final Date endTime; private final Resource owner; private final Resource result; private final TaskError error; public Task(String id, String name, String type, URI href, Status status, Date startTime, Date endTime, Resource result, Resource owner, TaskError error) { super(id, name, type, href); this.status = status; this.startTime = startTime; this.endTime = endTime; this.owner = owner; this.result = result; this.error = error; } /** * The current status of the task. */ public Status getStatus() { return status; } /** * date and time when the task was started. */ public Date getStartTime() { return startTime; } /** * date and time when the task completed. Does not appear for running tasks. */ @Nullable public Date getEndTime() { return endTime; } /** * A link to the object that owns the task. For copy operations, the owner is the copy that is * being created. For delete operations, the owner is the deleted object, so this element is not * included. For all other operations, the owner is the object to which the request was made. */ @Nullable public Resource getOwner() { return owner; } /** * Result is represent outcome of request url. if any VM related operation, the result will * present as get VApp. if any VMDK related operation, the result will present as get VMKD */ @Nullable public Resource getResult() { return result; } /** * error message or related information returned by the task */ @Nullable public TaskError getError() { return error; } public Builder toBuilder() { return Builder.fromTask(this); } @Override public String toString() { return "[id=" + id + ", name=" + name + ", type=" + type + ", href=" + href + ", status=" + status + ", startTime=" + startTime + ", endTime=" + endTime + ", owner=" + owner + ", result=" + result + ", error=" + error + "]"; } }
[ "adrian@jclouds.org" ]
adrian@jclouds.org
912aca0245de82ba097e69d17b364a2800a81ea2
34c3b0887f71165a6d4a533bc06ffa2624c2dc10
/summer-alipay-core/src/main/java/com/alipay/api/domain/AccessOrdersFeedBackResult.java
476f4d88c5358d6588568b381588a9dbb27f9b6f
[]
no_license
songhaoran/summer-alipay
91a7a7fdddf67265241785cd6bb2b784c0f0f1c4
d02e33d9ab679dfc56160af4abd759c0abb113a4
refs/heads/master
2021-05-04T16:39:11.272890
2018-01-17T09:52:32
2018-01-17T09:52:32
120,255,759
1
0
null
2018-02-05T04:42:15
2018-02-05T04:42:15
null
UTF-8
Java
false
false
1,778
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 物料单据反馈结果 * * @author auto create * @since 1.0, 2017-07-27 19:41:21 */ public class AccessOrdersFeedBackResult extends AlipayObject { private static final long serialVersionUID = 8379318132872421249L; /** * 错误码 */ @ApiField("error_code") private String errorCode; /** * 错误描述 */ @ApiField("error_desc") private String errorDesc; /** * 反馈主键ID(生产单ID或者采购单ID或者码token) */ @ApiField("feedback_id") private String feedbackId; /** * 生产单:PRODUCE_ORDER 采购单:PURCHASE_ORDER 二维码:QRCODE */ @ApiField("order_type") private String orderType; /** * 外部单据号 */ @ApiField("out_biz_no") private String outBizNo; /** * 每条记录处理结果 */ @ApiField("success") private Boolean success; public String getErrorCode() { return this.errorCode; } public void setErrorCode(String errorCode) { this.errorCode = errorCode; } public String getErrorDesc() { return this.errorDesc; } public void setErrorDesc(String errorDesc) { this.errorDesc = errorDesc; } public String getFeedbackId() { return this.feedbackId; } public void setFeedbackId(String feedbackId) { this.feedbackId = feedbackId; } public String getOrderType() { return this.orderType; } public void setOrderType(String orderType) { this.orderType = orderType; } public String getOutBizNo() { return this.outBizNo; } public void setOutBizNo(String outBizNo) { this.outBizNo = outBizNo; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } }
[ "1467237221@qq.com" ]
1467237221@qq.com
0aa41b8c1f391633ad678be3ef43b42ecddc9d31
a0e4f155a7b594f78a56958bca2cadedced8ffcd
/test/src/test/java/org/zstack/test/TestNewQuery.java
6bcda50d8274a627aeb9c0aa05cebcf7b45703f6
[ "Apache-2.0" ]
permissive
zhao-qc/zstack
e67533eabbbabd5ae9118d256f560107f9331be0
b38cd2324e272d736f291c836f01966f412653fa
refs/heads/master
2020-08-14T15:03:52.102504
2019-10-14T03:51:12
2019-10-14T03:51:12
215,187,833
3
0
Apache-2.0
2019-10-15T02:27:17
2019-10-15T02:27:16
null
UTF-8
Java
false
false
1,743
java
package org.zstack.test; import org.junit.Before; import org.junit.Test; import org.zstack.core.Platform; import org.zstack.core.componentloader.ComponentLoader; import org.zstack.header.query.QueryBuilder; import org.zstack.header.query.QueryOp; import org.zstack.header.storage.primary.APIQueryPrimaryStorageMsg; import org.zstack.header.storage.primary.PrimaryStorageInventory; import org.zstack.header.vm.APIQueryVmInstanceMsg; import org.zstack.header.vm.VmInstanceInventory; import org.zstack.query.MysqlQueryBuilderImpl3; /** */ public class TestNewQuery { ComponentLoader loader; MysqlQueryBuilderImpl3 query; @Before public void setUp() throws Exception { BeanConstructor con = new BeanConstructor(); loader = con.build(); query = loader.getComponent(MysqlQueryBuilderImpl3.class); } @Test public void test() throws ApiSenderException, InterruptedException { APIQueryPrimaryStorageMsg msg = new APIQueryPrimaryStorageMsg(); msg.addQueryCondition("uuid", QueryOp.EQ, Platform.getUuid()); msg.addQueryCondition("attachedClusterUuids", QueryOp.NOT_IN, Platform.getUuid(), Platform.getUuid()); query.start(); QueryBuilder qb = (QueryBuilder) query; qb.query(msg, PrimaryStorageInventory.class); APIQueryVmInstanceMsg imsg = new APIQueryVmInstanceMsg(); imsg.addQueryCondition("vmNics.uuid", QueryOp.EQ, Platform.getUuid()); imsg.addQueryCondition("vmNics.l3NetworkUuid", QueryOp.NOT_EQ, Platform.getUuid()); imsg.addQueryCondition("name", QueryOp.EQ, "vm"); imsg.addQueryCondition("allVolumes.uuid", QueryOp.IN, Platform.getUuid()); qb.query(imsg, VmInstanceInventory.class); } }
[ "xuexuemiao@yeah.net" ]
xuexuemiao@yeah.net
e452fdf81e297aaafcd0c50b87b76f42022e7a83
ad64a14fac1f0d740ccf74a59aba8d2b4e85298c
/linkwee-supermarket-admin/src/main/java/com/linkwee/web/dao/SmDynamicNewsMapper.java
d22562584cbd80de1231750ed66610667ce4fa4e
[]
no_license
zhangjiayin/supermarket
f7715aa3fdd2bf202a29c8683bc9322b06429b63
6c37c7041b5e1e32152e80564e7ea4aff7128097
refs/heads/master
2020-06-10T16:57:09.556486
2018-10-30T07:03:15
2018-10-30T07:03:15
193,682,975
0
1
null
2019-06-25T10:03:03
2019-06-25T10:03:03
null
UTF-8
Java
false
false
1,020
java
package com.linkwee.web.dao; import java.util.List; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.session.RowBounds; import com.linkwee.core.datatable.DataTable; import com.linkwee.core.generic.GenericDao; import com.linkwee.core.orm.paging.Page; import com.linkwee.web.model.SmDynamicNews; import com.linkwee.web.request.DynamicNewsRequest; import com.linkwee.web.response.DynamicNewsResponse; /** * * @描述: Dao接口 * * @创建人: Mignet * * @创建时间:2016年10月18日 19:01:10 * * Copyright (c) 深圳领会科技有限公司-版权所有 */ public interface SmDynamicNewsMapper extends GenericDao<SmDynamicNews,Long>{ /** * 封装DataTable对象查询 * @param dt * @param page * @return */ List<SmDynamicNews> selectBySearchInfo(@Param("dt")DataTable dt,RowBounds page); List<DynamicNewsResponse> findDynamicNewsList(DynamicNewsRequest dynamicNewsRequest, Page<DynamicNewsRequest> page); }
[ "liqimoon@qq.com" ]
liqimoon@qq.com
47ba0bf9277995a990977a13e34f879e19c8bb4a
bf4c38f33e9352d9fae0f1581862677af21ab5ca
/fr.inria.diverse.examples.fsm.metamodel.timed/src/timedfsm/fsm/FsmFactory.java
515eed1f87e6497b12b583d0ada2b742846fd8a7
[]
no_license
diverse-project/melange-examples
c0a2b7ecb0659a22e21e1c18202b3682579c7ffa
f6b809429a625104f68f0d8321dd10861de724bf
refs/heads/master
2021-01-19T06:29:01.262950
2017-06-28T13:09:43
2017-06-28T13:09:43
95,668,567
0
1
null
null
null
null
UTF-8
Java
false
false
3,212
java
/** */ package timedfsm.fsm; import org.eclipse.emf.ecore.EFactory; /** * <!-- begin-user-doc --> * The <b>Factory</b> for the model. * It provides a create method for each non-abstract class of the model. * <!-- end-user-doc --> * @see timedfsm.fsm.FsmPackage * @generated */ public interface FsmFactory extends EFactory { /** * The singleton instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ FsmFactory eINSTANCE = timedfsm.fsm.impl.FsmFactoryImpl.init(); /** * Returns a new object of class '<em>Named Element</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Named Element</em>'. * @generated */ NamedElement createNamedElement(); /** * Returns a new object of class '<em>State Machine</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>State Machine</em>'. * @generated */ StateMachine createStateMachine(); /** * Returns a new object of class '<em>State</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>State</em>'. * @generated */ State createState(); /** * Returns a new object of class '<em>Final State</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Final State</em>'. * @generated */ FinalState createFinalState(); /** * Returns a new object of class '<em>Initial State</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Initial State</em>'. * @generated */ InitialState createInitialState(); /** * Returns a new object of class '<em>Transition</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Transition</em>'. * @generated */ Transition createTransition(); /** * Returns a new object of class '<em>Timed Transition</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Timed Transition</em>'. * @generated */ TimedTransition createTimedTransition(); /** * Returns a new object of class '<em>Trigger</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Trigger</em>'. * @generated */ Trigger createTrigger(); /** * Returns a new object of class '<em>Pseudostate</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Pseudostate</em>'. * @generated */ Pseudostate createPseudostate(); /** * Returns a new object of class '<em>Fork</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Fork</em>'. * @generated */ Fork createFork(); /** * Returns a new object of class '<em>Join</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Join</em>'. * @generated */ Join createJoin(); /** * Returns the package supported by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the package supported by this factory. * @generated */ FsmPackage getFsmPackage(); } //FsmFactory
[ "degueule@cwi.nl" ]
degueule@cwi.nl
b22e26678fdaa299b85d035f8720f5c009c37183
512de6277b29d1524300c12bdaa57bf88fa51f54
/uberfire-backend/uberfire-backend-server/src/test/java/org/uberfire/backend/TestAppSetup.java
049a492e07dc41cd7d80c8c07815eac401691625
[ "Apache-2.0" ]
permissive
SidorevichMaksim/uberfire
25db5a6aebe462077feaf6604d4861e258f2ca57
81ef5b2e47e2252e36d6915b2995811e0c8c4c69
refs/heads/master
2020-12-25T22:46:45.448711
2014-01-22T17:11:13
2014-01-22T17:11:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,761
java
/* * Copyright 2012 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.uberfire.backend; import javax.annotation.PostConstruct; import javax.enterprise.inject.Alternative; import javax.enterprise.inject.Produces; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; import org.uberfire.backend.server.IOWatchServiceNonDotImpl; import org.uberfire.io.IOService; import org.uberfire.io.attribute.DublinCoreView; import org.uberfire.java.nio.base.version.VersionAttributeView; import org.uberfire.metadata.backend.lucene.LuceneIndexEngine; import org.uberfire.metadata.backend.lucene.LuceneSetup; import org.uberfire.metadata.backend.lucene.fields.SimpleFieldFactory; import org.uberfire.metadata.backend.lucene.metamodels.InMemoryMetaModelStore; import org.uberfire.metadata.backend.lucene.setups.RAMLuceneSetup; import org.uberfire.metadata.engine.MetaIndexEngine; import org.uberfire.metadata.engine.MetaModelStore; import org.uberfire.metadata.io.IOServiceIndexedImpl; import org.uberfire.rpc.SessionInfo; import org.uberfire.rpc.impl.SessionInfoImpl; @Singleton @Alternative public class TestAppSetup { @Inject private IOWatchServiceNonDotImpl watchService; private final LuceneSetup luceneSetup = new RAMLuceneSetup(); private SessionInfo sessionInfo = new SessionInfoImpl(); private IOService ioService; @PostConstruct public void init() { final MetaModelStore metaModelStore = new InMemoryMetaModelStore(); final MetaIndexEngine indexEngine = new LuceneIndexEngine( metaModelStore, luceneSetup, new SimpleFieldFactory() ); ioService = new IOServiceIndexedImpl( watchService, indexEngine, DublinCoreView.class, VersionAttributeView.class ); } @Produces @Named("ioStrategy") public IOService ioService() { return ioService; } @Produces public SessionInfo getSessionInfo() { return this.sessionInfo; } }
[ "alexandre.porcelli@gmail.com" ]
alexandre.porcelli@gmail.com
aae87ed70c59698c1258482e15500e5f216ff137
fd961a8042eedbde9a62d0f7d1c7fb4c6c04b35d
/app/src/main/java/com/rxjy/rxcompound/des/mvp/contract/XunjianXQYContract.java
72377df9ed5db7b17219111fd81131ba82c5a688
[]
no_license
WCYu/RXCompound
89c20a30fa6a2fd533917021837368e84636f011
ce3dd40787b24c26d0971d4c3e97790115636eb8
refs/heads/master
2020-03-19T19:40:21.400210
2018-07-30T11:25:16
2018-07-30T11:25:16
136,868,996
1
0
null
null
null
null
UTF-8
Java
false
false
2,042
java
package com.rxjy.rxcompound.des.mvp.contract; import com.rxjy.rxcompound.commons.base.BaseModel; import com.rxjy.rxcompound.commons.base.BasePresenter; import com.rxjy.rxcompound.commons.base.BaseView; import com.rxjy.rxcompound.des.entity.GetXunjianXQYInfo; import com.rxjy.rxcompound.des.entity.UpXJPicInfo; import java.util.List; import rx.Observable; /** * Created by Administrator on 2017/10/24. */ public interface XunjianXQYContract { interface View extends BaseView { void responseGetXunjianXinxiData(GetXunjianXQYInfo info); void responseUpXunjianXinxiData(String msg); void responseXunjianDataError(String msg); void UpKaigongPicInfo(UpXJPicInfo info); void UpKaigongPicInfoError(UpXJPicInfo info); void DeleteKaigongPicInfo(GetXunjianXQYInfo.BodyBean.ChildListBean info, int position); void showDialog(); void hideDialog(); } interface Model extends BaseModel { Observable<String> GetScheduleCheckIno( String sc_id ); Observable<String> SubmitCheckDes( String sc_id, String description, String address ); Observable<String> UploadCheckImages( String sc_Id, List<String> imgList ); Observable<String> DeleteloadCheckImages( String sc_Id, String fileName ); } abstract class Presenter extends BasePresenter<View, Model> { public abstract void GetScheduleCheckIno( String sc_id ); public abstract void SubmitCheckDes( String sc_id, String description, String address ); public abstract void UploadCheckImages( String sc_Id, List<String> imgList ); public abstract void DeleteloadCheckImages( String sc_Id, String fileName ); } }
[ "13466941275@163.com" ]
13466941275@163.com
faf5cfbb697577d4bc42e6b3c31e5baa2460b8a1
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/2/org/apache/commons/lang3/Validate_notEmpty_370.java
6db2bcd8971278211d54bcb54a10e04dd37fec44
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,993
java
org apach common lang3 assist valid argument valid method base principl invalid code argument link null pointer except nullpointerexcept code argument link illeg argument except illegalargumentexcept invalid index arrai collect map string link index bound except indexoutofboundsexcept except messag href http doc oracl javas doc api java util formatt html syntax format string defin java platform pre valid true istru greater valid null notnul surnam surnam pre thread safe threadsaf version java lang string format string object valid valid argument map code size element throw except pre valid empti notempti map mymap pre messag except quot valid map empti quot param map type param map map check valid method valid map code method chain null pointer except nullpointerexcept map code illeg argument except illegalargumentexcept map empti empti notempti map string object map empti notempti map empti notempti map default empti map messag
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
bb31994109fd62080af7961868335c7f8b0d4005
c81963cab526c4dc24bee21840f2388caf7ff4cf
/com/google/errorprone/annotations/concurrent/LazyInit.java
75bbc9aeff2d8e3e480a347921db1a1936e265db
[]
no_license
ryank231231/jp.co.penet.gekidanprince
ba2f38e732828a4454402aa7ef93a501f8b7541e
d76db01eeadf228d31006e4e71700739edbf214f
refs/heads/main
2023-02-19T01:38:54.459230
2021-01-16T10:04:22
2021-01-16T10:04:22
329,815,191
0
0
null
null
null
null
UTF-8
Java
false
false
494
java
package com.google.errorprone.annotations.concurrent; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD}) public @interface LazyInit {} /* Location: Y:\classes-dex2jar.jar!\com\google\errorprone\annotations\concurrent\LazyInit.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "ryank231231@gmail.com" ]
ryank231231@gmail.com
309352e3525d9ca2669a54b1e8174712e1648c0d
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1095/src/main/java/module1095packageJava0/Foo10.java
d540f5ed9790804734dc0e4a8bfeb27da67e2cfe
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
310
java
package module1095packageJava0; import java.lang.Integer; public class Foo10 { Integer int0; Integer int1; public void foo0() { new module1095packageJava0.Foo9().foo3(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
98075071342a3f5360e66d8157506fe2d9883f00
60d7e80403bf5bb98a396da18478257358e35531
/SliddingMenu/src/com/opensource/slidingmenu/adapter/MenuAdapter.java
1f6d010aab5beb8232ae5fe95048717e80f6fff4
[ "Apache-2.0" ]
permissive
yinglovezhuzhu/SlidingMenu
29077b4ed06daf6187c92aef0c7817c40276a3f0
0f5795f2698d866ece1dbb6d9f254441501c5dbc
refs/heads/master
2021-01-24T06:37:29.312785
2014-08-08T06:48:54
2014-08-08T06:48:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,185
java
/* * 文件名:MenuAdapter.java * 版权:<版权> * 描述:<描述> * 创建人:xiaoying * 创建时间:2013-5-31 * 修改人:xiaoying * 修改时间:2013-5-31 * 版本:v1.0 */ package com.opensource.slidingmenu.adapter; import java.util.ArrayList; import java.util.Collection; import java.util.List; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.RadioButton; import com.opensource.R; /** * 功能:菜单列表适配器 * @author xiaoying * */ public class MenuAdapter extends BaseAdapter { private Context mContext = null; private List<String> mMenuDatas = new ArrayList<String>(); public MenuAdapter(Context context) { this.mContext = context; } public void addAll(Collection<String> menus) { mMenuDatas.addAll(menus); notifyDataSetChanged(); } /* (non-Javadoc) * @see android.widget.Adapter#getCount() */ @Override public int getCount() { return mMenuDatas.size(); } /* (non-Javadoc) * @see android.widget.Adapter#getItem(int) */ @Override public String getItem(int position) { return mMenuDatas.get(position); } /* (non-Javadoc) * @see android.widget.Adapter#getItemId(int) */ @Override public long getItemId(int position) { return position; } /* (non-Javadoc) * @see android.widget.Adapter#getView(int, android.view.View, android.view.ViewGroup) */ @Override public View getView(int position, View convertView, ViewGroup parent) { RadioButton itemView = null; if(convertView == null) { convertView = View.inflate(mContext, R.layout.item_slidingmenu, null); itemView = (RadioButton) convertView; convertView.setTag(itemView); } else { itemView = (RadioButton) convertView.getTag(); } itemView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_menu_default, 0, 0, 0); itemView.setText(mMenuDatas.get(position)); return convertView; } // private class MenuComparator implements Comparator<ConfigResp.ConfigData> { // // @Override // public int compare(ConfigData lhs, ConfigData rhs) { // return rhs.getOrder() - rhs.getOrder(); // } // // } }
[ "yinglovezhuzhu@139.com" ]
yinglovezhuzhu@139.com
c9730b1a514e2e65fa913c149bf0da8daee89926
3de3dae722829727edfdd6cc3b67443a69043475
/edexOsgi/com.raytheon.uf.common.dataplugin.shef/src/com/raytheon/uf/common/dataplugin/shef/tables/AgriculturalId.java
4432b8e0f93d2301f118fc52910b81232b6e24f2
[ "LicenseRef-scancode-public-domain", "Apache-2.0" ]
permissive
Unidata/awips2
9aee5b7ec42c2c0a2fa4d877cb7e0b399db74acb
d76c9f96e6bb06f7239c563203f226e6a6fffeef
refs/heads/unidata_18.2.1
2023-08-18T13:00:15.110785
2023-08-09T06:06:06
2023-08-09T06:06:06
19,332,079
161
75
NOASSERTION
2023-09-13T19:06:40
2014-05-01T00:59:04
Java
UTF-8
Java
false
false
5,786
java
/** * This software was developed and / or modified by Raytheon Company, * pursuant to Contract DG133W-05-CQ-1067 with the US Government. * * U.S. EXPORT CONTROLLED TECHNICAL DATA * This software product contains export-restricted data whose * export/transfer/disclosure is restricted by U.S. law. Dissemination * to non-U.S. persons whether in the United States or abroad requires * an export license or other authorization. * * Contractor Name: Raytheon Company * Contractor Address: 6825 Pine Street, Suite 340 * Mail Stop B8 * Omaha, NE 68106 * 402.291.0100 * * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ package com.raytheon.uf.common.dataplugin.shef.tables; // default package // Generated Oct 17, 2008 2:22:17 PM by Hibernate Tools 3.2.2.GA import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Embeddable; import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; /** * AgriculturalId generated by hbm2java * * * <pre> * * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Oct 17, 2008 Initial generation by hbm2java * Aug 19, 2011 10672 jkorman Move refactor to new project * Oct 07, 2013 2361 njensen Removed XML annotations * May 23, 2016 5590 bkowal Cleanup. * * </pre> * * @author jkorman */ @Embeddable @DynamicSerialize public class AgriculturalId extends PersistableDataObject<AgriculturalId> implements Serializable { private static final long serialVersionUID = 1L; @DynamicSerializeElement private String lid; @DynamicSerializeElement private String pe; @DynamicSerializeElement private short dur; @DynamicSerializeElement private String ts; @DynamicSerializeElement private String extremum; @DynamicSerializeElement private Date obstime; public AgriculturalId() { } public AgriculturalId(String lid, String pe, short dur, String ts, String extremum, Date obstime) { this.lid = lid; this.pe = pe; this.dur = dur; this.ts = ts; this.extremum = extremum; this.obstime = obstime; } @Column(name = "lid", nullable = false, length = 8) public String getLid() { return this.lid; } public void setLid(String lid) { this.lid = lid; } @Column(name = "pe", nullable = false, length = 2) public String getPe() { return this.pe; } public void setPe(String pe) { this.pe = pe; } @Column(name = "dur", nullable = false) public short getDur() { return this.dur; } public void setDur(short dur) { this.dur = dur; } @Column(name = "ts", nullable = false, length = 2) public String getTs() { return this.ts; } public void setTs(String ts) { this.ts = ts; } @Column(name = "extremum", nullable = false, length = 1) public String getExtremum() { return this.extremum; } public void setExtremum(String extremum) { this.extremum = extremum; } @Column(name = "obstime", nullable = false, length = 29) public Date getObstime() { return this.obstime; } public void setObstime(Date obstime) { this.obstime = obstime; } public boolean equals(Object other) { if ((this == other)) return true; if ((other == null)) return false; if (!(other instanceof AgriculturalId)) return false; AgriculturalId castOther = (AgriculturalId) other; return ((this.getLid() == castOther.getLid()) || (this.getLid() != null && castOther.getLid() != null && this.getLid().equals( castOther.getLid()))) && ((this.getPe() == castOther.getPe()) || (this.getPe() != null && castOther.getPe() != null && this.getPe().equals( castOther.getPe()))) && (this.getDur() == castOther.getDur()) && ((this.getTs() == castOther.getTs()) || (this.getTs() != null && castOther.getTs() != null && this.getTs().equals( castOther.getTs()))) && ((this.getExtremum() == castOther.getExtremum()) || (this .getExtremum() != null && castOther.getExtremum() != null && this .getExtremum().equals(castOther.getExtremum()))) && ((this.getObstime() == castOther.getObstime()) || (this .getObstime() != null && castOther.getObstime() != null && this .getObstime().equals(castOther.getObstime()))); } public int hashCode() { int result = 17; result = 37 * result + (getLid() == null ? 0 : this.getLid().hashCode()); result = 37 * result + (getPe() == null ? 0 : this.getPe().hashCode()); result = 37 * result + this.getDur(); result = 37 * result + (getTs() == null ? 0 : this.getTs().hashCode()); result = 37 * result + (getExtremum() == null ? 0 : this.getExtremum().hashCode()); result = 37 * result + (getObstime() == null ? 0 : this.getObstime().hashCode()); return result; } }
[ "mjames@unidata.ucar.edu" ]
mjames@unidata.ucar.edu
bfbc84614d97acf316a9890b69feb0c4d58f8c5a
ba45eb8a7fe06ba3fb5a34f1bd0192392d48cd3d
/ChemConnectApplication/src/main/java/info/esblurock/reaction/chemconnect/core/client/info/mission/MissionStatement.java
1ba515cb24f90de5d489ff75926a571bec1acb78
[]
no_license
blurock/ChemConnectApplication
282ae0bac88cee22c65bd084fd98ab29e0bd6fb0
de5f3d3b1e6afb1d529b2d966106e90ff38fea57
refs/heads/master
2022-07-12T10:55:08.362173
2019-12-11T10:17:50
2019-12-11T10:17:50
188,542,672
0
0
null
2022-05-24T20:54:07
2019-05-25T08:48:07
Java
UTF-8
Java
false
false
1,953
java
package info.esblurock.reaction.chemconnect.core.client.info.mission; import com.google.gwt.core.client.GWT; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.Widget; import gwt.material.design.client.ui.MaterialLink; import gwt.material.design.client.ui.MaterialPanel; import info.esblurock.reaction.chemconnect.core.client.resources.info.about.InfoAboutResources; import info.esblurock.reaction.chemconnect.core.client.ui.view.MissionStatementView; public class MissionStatement extends Composite implements MissionStatementView { Presenter listener; private static MissionStatementUiBinder uiBinder = GWT.create(MissionStatementUiBinder.class); interface MissionStatementUiBinder extends UiBinder<Widget, MissionStatement> { } InfoAboutResources about = GWT.create(InfoAboutResources.class); public MissionStatement() { initWidget(uiBinder.createAndBindUi(this)); init(); } @UiField MaterialPanel sitegoaltext; @UiField MaterialPanel fairdatasummarytext; @UiField MaterialPanel TOPtext; @UiField MaterialLink sitegoallink; @UiField MaterialLink fairdatasummarylink; @UiField MaterialLink TOPlink; private void init() { HTML sitegoalhtml = new HTML(about.SiteGoal().getText()); sitegoaltext.add(sitegoalhtml); sitegoallink.setText("Site Goal"); HTML fairdatasummaryhtml = new HTML(about.FAIRDataSummary().getText()); fairdatasummarytext.add(fairdatasummaryhtml); fairdatasummarylink.setText("FAIR Data"); HTML TOPhtml = new HTML(about.TransparencyAndOpennessPromotionSummary().getText()); TOPtext.add(TOPhtml); TOPlink.setText("Transparency and Openness Promotion"); } @Override public void setName(String titleName) { } @Override public void setPresenter(Presenter listener) { this.listener = listener; } }
[ "edward.blurock@gmail.com" ]
edward.blurock@gmail.com
05ee1c90acbb4f9977b1a5dd604165818ecac937
5af114cd9c468cf6e8bce2eba1ada7e2d0fc3f11
/src/com/servlet/PrivFilter.java
2600a887dfe3da87361d6c085d11f306432992b6
[]
no_license
DanDaye/TianmaAirport
94fdcd9133ab4390f733f6232fb1396e3fa7baf4
112ae273eb2d445fd5f7b5cd95bf3de01d36564b
refs/heads/master
2020-04-26T07:09:28.058878
2019-03-02T00:39:21
2019-03-02T00:39:21
173,386,100
0
0
null
null
null
null
UTF-8
Java
false
false
2,587
java
package com.servlet; import java.io.IOException; import java.net.Authenticator.RequestorType; import java.util.Map; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.annotation.WebFilter; import javax.servlet.http.*; import com.entity.Admin; /** * Servlet Filter implementation class PrivFilter */ public class PrivFilter implements Filter { private FilterConfig filterConfig = null; private static final String[] dir = { "/Facility",// "/Flight",// "/News",// "/Role", "/User" }; /** * Default constructor. */ public PrivFilter() { // TODO Auto-generated constructor stub } /** * @see Filter#destroy() */ public void destroy() { // TODO Auto-generated method stub } /** * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain) */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { // TODO Auto-generated method stub // place your code here //System.out.println("start"); HttpServletRequest req = (HttpServletRequest) request; HttpSession session = (req).getSession(); if(session.getAttribute("admin")==null){ // System.out.println("admin is null in privfilter"); session.removeAttribute("empno"); session.removeAttribute("priv0"); session.removeAttribute("priv1"); session.removeAttribute("priv2"); session.removeAttribute("priv3"); session.removeAttribute("priv4"); } String user=(String) session.getAttribute("empno"); Boolean[] priv={(Boolean) session.getAttribute("priv0"),(Boolean) session.getAttribute("priv1"),(Boolean) session.getAttribute("priv2"),(Boolean) session.getAttribute("priv3"),(Boolean) session.getAttribute("priv4")}; String url = req.getRequestURI().substring( req.getContextPath().length()); for(int i=0;i<5;i++){ if(url.startsWith(dir[i])){ if(user==null||session.getAttribute("admin")==null){ request.getRequestDispatcher("/login.jsp").forward(request, response); }else if(priv[i]==null||!priv[i]){ request.getRequestDispatcher("/error.jsp").forward(request, response); } } } // pass the request along the filter chain chain.doFilter(request, response); } /** * @see Filter#init(FilterConfig) */ public void init(FilterConfig fConfig) throws ServletException { // TODO Auto-generated method stub this.filterConfig = filterConfig; } }
[ "jinsi_l@foxmail.com" ]
jinsi_l@foxmail.com
f5170647fec27b8ab979720a6932367d93f6de93
ceea68028d5ec5b9011eb050ca22f154160495c1
/src/main/java/com/alekseysamoylov/repair/center/site/model/table/WebRepairSectionTable.java
b4eb39155e1db04c8c8d90186381a1363eae1400
[]
no_license
AlekseySamoylov/center-old
1140113f71e88d9125dcf24b80ef2ee2185cbde3
26f7460425c8c0809a72ecd936da5f51855092df
refs/heads/master
2020-03-28T19:49:23.484360
2018-09-17T04:34:02
2018-09-17T04:34:02
149,012,788
0
0
null
null
null
null
UTF-8
Java
false
false
395
java
package com.alekseysamoylov.repair.center.site.model.table; import com.alekseysamoylov.repair.center.site.model.element.WebRepairSection; import java.util.List; /** * Created by alekseysamoylov on 7/9/16. */ public class WebRepairSectionTable extends ParentTable<WebRepairSection> { public WebRepairSectionTable(List<WebRepairSection> webList) { this.webList = webList; } }
[ "alekseysamoylov89@gmail.com" ]
alekseysamoylov89@gmail.com
c66b6b88748bf1211431471699e6a8099c22827b
61f0a3924ce3433b178cf032a8cda24ddff3000b
/framework/src/main/java/edu/x/framework/skillsystem/skills/ReceiverSkill.java
3233a542fab848889ea80b6fabc4aa00d4167ca2
[]
no_license
orochigalois/ROBOCUP_SSL_EDU_PLATFORM
46e0e011baedea8e9f4643656a8319bf65208175
5e7b39559cf32d6682e3a78ace199d9df8ccf395
refs/heads/master
2021-07-16T08:08:36.893055
2017-10-21T03:20:27
2017-10-21T03:20:27
107,742,374
0
0
null
null
null
null
UTF-8
Java
false
false
4,413
java
/* * ********************************************************* * Copyright (c) 2017 智动天地(北京)科技有限公司 * All rights reserved. * Project: 标准平台决策开发系统 * Authors: * 智动天地(北京)科技有限公司 * ********************************************************* */ package edu.x.framework.skillsystem.skills; import java.awt.Color; import java.util.ArrayList; import java.util.List; import com.github.g3force.configurable.Configurable; import edu.tigers.sumatra.ai.data.EShapesLayer; import edu.tigers.sumatra.drawable.DrawableLine; import edu.tigers.sumatra.drawable.IDrawableShape; import edu.tigers.sumatra.math.GeoMath; import edu.tigers.sumatra.math.ILine; import edu.tigers.sumatra.math.IVector2; import edu.tigers.sumatra.math.IVector3; import edu.tigers.sumatra.math.Line; import edu.tigers.sumatra.math.Vector3; import edu.tigers.sumatra.statemachine.IState; import edu.tigers.sumatra.wp.data.TrackedBall; import edu.x.framework.skillsystem.ESkill; public class ReceiverSkill extends AReceiveSkill { @Configurable(comment = "Dribbler speed [rpm] for receiving the ball") private static int dribbleSpeed = 10000; @Configurable(comment = "Vel [m/s] when ball is considered moving") private static double ballVelMoveBorder = 0.3; @Configurable(comment = "max speed [m/s] the bot move back when recieving") private static double maxMoveBackSpeed = 2; @Configurable(comment = "max speed [m/s] till the bot can controll the ball without moving") private static double safePassSpeed = 2; private IVector3 curDest = null; public enum EReceiverMode { KEEP_DRIBBLING, STOP_DRIBBLER } public enum EReceiverState { RECEIVING, } public ReceiverSkill(final EReceiverMode mode) { super(ESkill.RECEIVER); IState receive = new ReceiveState(); setInitialState(receive); } @Override protected IVector3 getPose() { if (curDest == null) { curDest = new Vector3(getDesiredDestination(), 0); } Vector3 pose = new Vector3(curDest); if (getWorldFrame().getBall().getVel().getLength() < ballVelMoveBorder) { double bot2Ball = getWorldFrame().getBall().getPos().subtractNew(getPos()).getAngle(); pose = new Vector3(getDesiredDestination(), bot2Ball); return pose; } TrackedBall ball = getWorldFrame().getBall(); ILine ballLine = new Line(ball.getPos(), ball.getVel().multiplyNew(1000)); IVector2 dest = GeoMath.leadPointOnLine(getPos(), ballLine); if (GeoMath.distancePP(ball.getPos(), getPos()) > 200) { pose.set(2, ball.getPos().subtractNew(dest).getAngle()); } // drive backwards // the distance should be calculated basedon the ball speed // double ballVel = ball.getVelByPos(getTBot().getBotKickerPos()); // double ballVelDiff = Math.max(0, ballVel - safePassSpeed); // double acc = getMoveCon().getMoveConstraints().getAccMax(); // double speedUpDistance = (2 / acc) * Math.pow(ballVelDiff, 2) * 1000; // if ((GeoMath.distancePP(getPos(), ball.getPos()) < speedUpDistance) && (ballVelDiff > 0)) // { // double dist = (2 * speedUpDistance) + (10 * ballVelDiff); // (ballVelDiff / acc) // // double dist = 50; // dest = dest.addNew(ball.getVel().scaleToNew(dist)); // } pose.set(0, dest.x()); pose.set(1, dest.y()); List<IDrawableShape> shapes = new ArrayList<>(1); shapes.add(new DrawableLine(ballLine, Color.magenta)); getPathDriver().setShapes(EShapesLayer.RECEIVER_SKILL, shapes); return pose; } private class ReceiveState implements IState { @Override public void doEntryActions() { getMatchCtrl().setDribblerSpeed(dribbleSpeed); if (getDesiredDestination() == null) { setDesiredDestination(getPos()); } curDest = new Vector3(getDesiredDestination(), getWorldFrame().getBall().getPos().subtractNew(getPos()).getAngle()); } @Override public void doExitActions() { } @Override public void doUpdate() { if (getWorldFrame().getBall().getVel().getLength() < ballVelMoveBorder) { getMatchCtrl().setDribblerSpeed(0); } else if (!getTBot().hasBallContact()) { getMatchCtrl().setDribblerSpeed(dribbleSpeed); } } @Override public Enum<?> getIdentifier() { return EReceiverState.RECEIVING; } } public final void setReceiveDestination(final IVector2 dest) { setDesiredDestination(dest); } }
[ "fudanyinxin@gmail.com" ]
fudanyinxin@gmail.com
1aa56626b8b901ef1482742261d0724d1d57c6cd
a1d34d57e8bbdb5d9331d600d0de9fded269c871
/main/java/secfox/soc/integration/sni/wsdl/client/ServiceMBean.java
1085a335c3b5b9901e6bd568b2bfd6b195752f98
[]
no_license
zhanght86/melon-sg
b26117cca6a4c31011781acb73671505bef8304b
6bdd1f06cf532727ea6b639de852bfeaf405babb
refs/heads/master
2022-04-13T11:18:19.355386
2015-04-07T09:30:11
2015-04-07T09:30:11
104,092,166
0
0
null
2020-03-31T10:14:30
2017-09-19T15:20:11
JavaScript
UTF-8
Java
false
false
3,456
java
package secfox.soc.integration.sni.wsdl.client; import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceFeature; import javax.xml.ws.Service; /** * This class was generated by Apache CXF 3.0.2 * 2014-11-27T15:08:04.015+08:00 * Generated source version: 3.0.2 * */ @WebServiceClient(name = "ServiceMBean", wsdlLocation = "http://172.10.1.160:8199/services/interfaces?wsdl", targetNamespace = "http://service.soa.system.soc.secfox/") public class ServiceMBean extends Service { public final static URL WSDL_LOCATION; public final static QName SERVICE = new QName("http://service.soa.system.soc.secfox/", "ServiceMBean"); public final static QName ServiceMBeanPort = new QName("http://service.soa.system.soc.secfox/", "ServiceMBeanPort"); static { URL url = null; try { url = new URL("http://172.10.1.160:8199/services/interfaces?wsdl"); } catch (MalformedURLException e) { java.util.logging.Logger.getLogger(ServiceMBean.class.getName()) .log(java.util.logging.Level.INFO, "Can not initialize the default wsdl from {0}", "http://172.10.1.160:8199/services/interfaces?wsdl"); } WSDL_LOCATION = url; } public ServiceMBean(URL wsdlLocation) { super(wsdlLocation, SERVICE); } public ServiceMBean(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName); } public ServiceMBean() { super(WSDL_LOCATION, SERVICE); } //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 //compliant code instead. // public ServiceMBean(WebServiceFeature ... features) { // super(WSDL_LOCATION, SERVICE, features); // } //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 //compliant code instead. // public ServiceMBean(URL wsdlLocation, WebServiceFeature ... features) { // super(wsdlLocation, SERVICE, features); // } //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 //compliant code instead. // public ServiceMBean(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) { // super(wsdlLocation, serviceName, features); // } /** * * @return * returns ServiceMBeanPortType */ @WebEndpoint(name = "ServiceMBeanPort") public ServiceMBeanPortType getServiceMBeanPort() { return super.getPort(ServiceMBeanPort, ServiceMBeanPortType.class); } /** * * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. * @return * returns ServiceMBeanPortType */ @WebEndpoint(name = "ServiceMBeanPort") public ServiceMBeanPortType getServiceMBeanPort(WebServiceFeature... features) { return super.getPort(ServiceMBeanPort, ServiceMBeanPortType.class, features); } }
[ "493449712@qq.com" ]
493449712@qq.com
a2d4d7bcb1952ee64d5365ea1518ded68aa1bfa2
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_bc5f2b1361aed6d09f6b8bc351aaeaa9d7e11c20/mfMethodService/12_bc5f2b1361aed6d09f6b8bc351aaeaa9d7e11c20_mfMethodService_t.java
64b9aec70bc20264cf9468ffdaeee9295c78705d
[]
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
6,316
java
package monbulk.MediaFlux.Services; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Window; import com.google.gwt.xml.client.XMLParser; import arc.mf.client.Output; import arc.mf.client.ServiceContext; import arc.mf.client.ServiceRequest; import arc.mf.client.xml.XmlElement; import arc.mf.session.ServiceResponseHandler; import arc.mf.session.Session; import monbulk.shared.Architecture.IPresenter; import monbulk.shared.Architecture.iModel; import monbulk.shared.Form.iFormField; import monbulk.shared.Model.IPojo; import monbulk.shared.Model.pojo.pojoMethod; import monbulk.shared.Model.pojo.pojoMethodComplete; import monbulk.shared.Services.MethodService; import monbulk.shared.util.MonbulkEnums.ServiceActions; public class mfMethodService extends MethodService { private class MethodResponseHandler implements ServiceResponseHandler { private MethodServiceHandler m_handler = null; private MethodRequest m_request; private MethodUpdateHandler mu_handler; public MethodResponseHandler(MethodServiceHandler handler, MethodRequest request) { m_handler = handler; m_request = request; } public MethodResponseHandler(MethodUpdateHandler handler, MethodRequest request) { mu_handler = handler; m_request = request; } public void processResponse(XmlElement xe, List<Output> outputs) throws Throwable { ArrayList<pojoMethod> methods = new ArrayList<pojoMethod>(); switch (m_request) { case List: { /* * <response><method name="Animal-MRI-Simple" description="Animal MRI acquisition with simple method." version="1.1">727.1.1</method> * <method name="Animal-MRI-Simple-pvt" description="Animal MRI acquisition with simple method amd some meta in private fields" version="1.1">727.1.2</method> * <method name="Human-MRI-Simple-noRS" description="Human MRI acquisition with simple method and no R-Subject" version="1.1">727.1.3</method> * </response> */ //Window.alert(xe.elements().); try { List<XmlElement> elemMethods = xe.elements("method"); Iterator<XmlElement> i = elemMethods.iterator(); while(i.hasNext()) { XmlElement tmpItem = i.next(); String Name = tmpItem.value("@name"); String ID = tmpItem.value(); String Description = tmpItem.value("@description"); pojoMethod tmpMethod = new pojoMethod(); tmpMethod.setMethodID(ID); tmpMethod.setFieldVale(pojoMethod.MethodDescriptionField, Description); tmpMethod.setMethodName(Name); methods.add(tmpMethod); } //Window.alert(xe.values("method").toString()); m_handler.onReadMethodList(methods); break; } catch(Exception ex) { GWT.log("Error occurs @ mfMethodService.processResponse-LIST" + ex.getMessage() + ex.getStackTrace().toString()); } } case Describe: try { /*<response> * <method id="727.1.1" asset="92" version="1"> * <name>Animal-MRI-Simple</name> * <description>Animal MRI acquisition with simple method.</description> * <version>1.1</version> * <step id="1"> * <name>MRI acquisition</name> * <description>MRI acquisition of subject</description> * <study><type>Magnetic Resonance Imaging</type><dicom><modality>MR</modality></dicom></study> * </step> * <subject> * <project> * <public> * <metadata><definition requirement="mandatory">hfi.pssd.animal.disease</definition></metadata> * <metadata><definition requirement="mandatory">hfi.pssd.identity</definition></metadata> * <metadata><definition requirement="mandatory">hfi.pssd.subject</definition><value><type>constant(animal)</type></value></metadata> * <metadata><definition requirement="mandatory">hfi.pssd.animal.subject</definition></metadata> * * </public> * </project> * </subject> * </method> * </response> */ //Window.alert(xe.toString()); //We need to create pojoMethodComplete pmc = new pojoMethodComplete(xe.elements().get(0).attributes().get(0).value()); pmc.readInput("XML", xe.toString()); m_handler.onReadMethod(pmc); } catch(Exception ex) { GWT.log("Exception caught at mfMethodService.onReadMethod" + ex.getMessage()); } //pmc.getMethodDetails().readInput("XML", xe.stringValue("/method")); //XMLParser.parse(contents) //m_handler.onReadMethod(pmc); break; case Create: try { //Window.alert(xe.stringValue("id"));' if(xe.hasElements()) { mu_handler.onUpdateMethod(xe.stringValue("id")); } else { mu_handler.onUpdateMethod(""); } } catch(Exception ex) { GWT.log("Exception caught at mfMethodService.onReadMethod" + ex.getMessage()); } break; default: break; } } } private String generateXML(String ID) { return ID; } @Override public void getMethodList(MethodServiceHandler handler) { Session.execute(new ServiceContext("mfMethodService.getMethodList"), "om.pssd.method.list", "", null, 0, new MethodResponseHandler(handler, MethodRequest.List), true); } @Override public void getMethod(String ID, MethodServiceHandler handler) { Session.execute( new ServiceContext("mfMethodService.getMethod"), "om.pssd.method.describe", "<id>" + ID + "</id>", null, 0, new MethodResponseHandler(handler, MethodRequest.Describe), true); } @Override public void createOrUpdate(String xml, MethodUpdateHandler handler) { Session.execute( new ServiceContext("mfMethodService.update"), "om.pssd.method.for.subject.update", xml, null, 0, new MethodResponseHandler(handler, MethodRequest.Create), true); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
342927636ade073d30c1e7ffd51e6878e693afa1
16384d90e3207069e80bd8e275e09bec5a9cfba8
/security-browser/src/main/java/govind/service/UsernamePasswordService.java
bb9497a9892511b339de075afc51443bde7389d6
[]
no_license
gaocn/OAuth
e5a6304c44cb181b064fd756786b21817ae13fd9
0b109805e487c1a3d001518a0fa2b53d321036fd
refs/heads/master
2020-04-09T15:55:21.063757
2018-12-24T02:20:02
2018-12-24T02:20:02
160,439,562
0
0
null
null
null
null
UTF-8
Java
false
false
1,108
java
package govind.service; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Component; @Component @Slf4j public class UsernamePasswordService implements UserDetailsService { @Autowired PasswordEncoder passwordEncoder; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { log.info("登录用户名: {}", username); String password = passwordEncoder.encode("1234qwer"); log.info("从数据获取用户密码:{}", password); User user = new User(username, password, AuthorityUtils.commaSeparatedStringToAuthorityList("admin")); return user; } }
[ "gaowenwencn@163.com" ]
gaowenwencn@163.com
1b2ff42efe9a61acb284401220a95d1ea19dfc3c
0a2924f4ae6dafaa6aa28e2b947a807645494250
/dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/UpdateModemGateWayConfigAction.java
e9a002c0695dd700a33fb5e25e50c38c616d0b73
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
filoi/ImmunizationRepository
9483ee02afd0b46d0f321a1e1ff8a0f6d8ca7f71
efb9f2bb9ae3da8c6ac60e5d5661b8a79a6939d5
refs/heads/master
2023-03-16T03:26:34.564453
2023-03-06T08:32:07
2023-03-06T08:32:07
126,012,725
0
0
BSD-3-Clause
2022-12-16T05:59:21
2018-03-20T12:17:24
Java
UTF-8
Java
false
false
5,636
java
package org.hisp.dhis.mobile.action; /* * Copyright (c) 2004-2015, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 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. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import org.hisp.dhis.sms.config.ModemGatewayConfig; import org.hisp.dhis.sms.config.SmsConfiguration; import org.hisp.dhis.sms.config.SmsConfigurationManager; import org.springframework.beans.factory.annotation.Autowired; import com.opensymphony.xwork2.Action; /** * @author Dang Duy Hieu */ public class UpdateModemGateWayConfigAction implements Action { // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- @Autowired private SmsConfigurationManager smsConfigurationManager; // ------------------------------------------------------------------------- // Input // ------------------------------------------------------------------------- private String gatewayType; public void setGatewayType( String gatewayType ) { this.gatewayType = gatewayType; } private String name; public void setName( String name ) { this.name = name; } private String port; public void setPort( String port ) { this.port = port; } private Integer baudRate; public void setBaudRate( Integer baudRate ) { this.baudRate = baudRate; } private Integer pollingInterval; public void setPollingInterval( Integer pollingInterval ) { this.pollingInterval = pollingInterval; } private String manufacturer; public void setManufacturer( String manufacturer ) { this.manufacturer = manufacturer; } private String model; public void setModel( String model ) { this.model = model; } private String pin; public void setPin( String pin ) { this.pin = pin; } public boolean inbound; public void setInbound( boolean inbound ) { this.inbound = inbound; } public boolean outbound; public void setOutbound( boolean outbound ) { this.outbound = outbound; } // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @Override public String execute() throws Exception { if ( gatewayType != null && gatewayType.equals( "modem" ) ) { SmsConfiguration config = smsConfigurationManager.getSmsConfiguration(); if ( config != null ) { ModemGatewayConfig gatewayConfig = (ModemGatewayConfig) smsConfigurationManager .checkInstanceOfGateway( ModemGatewayConfig.class ); int index = -1; if ( gatewayConfig == null ) { gatewayConfig = new ModemGatewayConfig(); } else { index = config.getGateways().indexOf( gatewayConfig ); } gatewayConfig.setName( name ); gatewayConfig.setPort( port ); gatewayConfig.setBaudRate( baudRate ); gatewayConfig.setPollingInterval( pollingInterval ); gatewayConfig.setManufacturer( manufacturer ); gatewayConfig.setModel( model ); gatewayConfig.setPin( pin ); gatewayConfig.setInbound( inbound ); gatewayConfig.setOutbound( outbound ); if ( config.getGateways() == null || config.getGateways().isEmpty() ) { gatewayConfig.setDefault( true ); } if ( index >= 0 ) { config.getGateways().set( index, gatewayConfig ); } else { config.getGateways().add( gatewayConfig ); } smsConfigurationManager.updateSmsConfiguration( config ); } } return SUCCESS; } }
[ "neeraj@filoi.in" ]
neeraj@filoi.in
dee4f595d0a7842beb4b6fa2e26f975e1299bf28
711e906f2b6490ef1e4f1f58ca840fd14b857ce2
/com/android/settingslib/media/BluetoothMediaDevice.java
78cc3d42df522710254296cf9e431bcecc4e9188
[]
no_license
dovanduy/SystemUIGoogle
51a29b812000d1857145f429f983e93c02bff14c
cd41959ee1bd39a22d0d4e95dc40cefb72a75ec8
refs/heads/master
2022-07-09T01:48:40.088858
2020-05-16T16:01:21
2020-05-16T16:01:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,905
java
// // Decompiled by Procyon v0.5.36 // package com.android.settingslib.media; import android.bluetooth.BluetoothClass; import com.android.settingslib.bluetooth.BluetoothUtils; import android.graphics.drawable.Drawable; import android.media.MediaRoute2Info; import android.media.MediaRouter2Manager; import android.content.Context; import com.android.settingslib.bluetooth.CachedBluetoothDevice; public class BluetoothMediaDevice extends MediaDevice { private CachedBluetoothDevice mCachedDevice; BluetoothMediaDevice(final Context context, final CachedBluetoothDevice mCachedDevice, final MediaRouter2Manager mediaRouter2Manager, final MediaRoute2Info mediaRoute2Info, final String s) { super(context, 3, mediaRouter2Manager, mediaRoute2Info, s); this.mCachedDevice = mCachedDevice; this.initDeviceRecord(); } public CachedBluetoothDevice getCachedDevice() { return this.mCachedDevice; } @Override public Drawable getIcon() { return (Drawable)BluetoothUtils.getBtRainbowDrawableWithDescription(super.mContext, this.mCachedDevice).first; } @Override public String getId() { return MediaDeviceUtils.getId(this.mCachedDevice); } @Override public String getName() { return this.mCachedDevice.getName(); } @Override protected boolean isCarKitDevice() { final BluetoothClass bluetoothClass = this.mCachedDevice.getDevice().getBluetoothClass(); if (bluetoothClass != null) { final int deviceClass = bluetoothClass.getDeviceClass(); if (deviceClass == 1032 || deviceClass == 1056) { return true; } } return false; } @Override public boolean isConnected() { return this.mCachedDevice.getBondState() == 12 && this.mCachedDevice.isConnected(); } }
[ "ethan.halsall@gmail.com" ]
ethan.halsall@gmail.com
b91b902a851f4c33fcc1c634ce173559af00f793
69736cac0f131234afe0c6aa02e2ac4679f42874
/Dddml.Wms.JavaServices/src/org/dddml/wms/domain/hibernate/HibernateUserClaimMvoStateRepository.java
35f775e20c50a1a14ae1571e3c8b5c341fe6411a
[]
no_license
573000126/wms-4
4455f5238eb651a5026c15bdcbea9071cfb9c5de
7ed986e44a8a801b221288511e7f23c76548d2e9
refs/heads/master
2021-03-10T22:28:53.440247
2016-08-18T09:32:17
2016-08-18T09:32:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,493
java
package org.dddml.wms.domain.hibernate; import java.util.*; import java.util.Date; import org.hibernate.Session; import org.hibernate.Criteria; import org.hibernate.criterion.Order; import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Projections; import org.hibernate.SessionFactory; import org.dddml.wms.domain.*; import org.dddml.wms.specialization.*; import org.dddml.wms.specialization.hibernate.*; import org.springframework.transaction.annotation.Transactional; public class HibernateUserClaimMvoStateRepository implements UserClaimMvoStateRepository { private SessionFactory sessionFactory; public SessionFactory getSessionFactory() { return this.sessionFactory; } public void setSessionFactory(SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } protected Session getCurrentSession() { return this.sessionFactory.getCurrentSession(); } @Transactional(readOnly = true) public UserClaimMvoState get(UserClaimId id) { UserClaimMvoState state = (UserClaimMvoState)getCurrentSession().get(AbstractUserClaimMvoState.SimpleUserClaimMvoState.class, id); if (state == null) { state = new AbstractUserClaimMvoState.SimpleUserClaimMvoState(); state.setUserClaimId(id); } return state; } @Transactional(readOnly = true) public Iterable<UserClaimMvoState> getAll(Integer firstResult, Integer maxResults) { Criteria criteria = getCurrentSession().createCriteria(AbstractUserClaimMvoState.SimpleUserClaimMvoState.class); if (firstResult != null) { criteria.setFirstResult(firstResult); } if (maxResults != null) { criteria.setMaxResults(maxResults); } addNotDeletedRestriction(criteria); return criteria.list(); } public void save(UserClaimMvoState state) { if(state.getUserVersion() == null) { getCurrentSession().save(state); }else { getCurrentSession().update(state); } if (state instanceof Saveable) { Saveable saveable = (Saveable) state; saveable.save(); } } @Transactional(readOnly = true) public Iterable<UserClaimMvoState> get(Iterable<Map.Entry<String, Object>> filter, List<String> orders, Integer firstResult, Integer maxResults) { Criteria criteria = getCurrentSession().createCriteria(UserClaimMvoState.class); HibernateUtils.criteriaAddFilterAndOrdersAndSetFirstResultAndMaxResults(criteria, filter, orders, firstResult, maxResults); addNotDeletedRestriction(criteria); return criteria.list(); } @Transactional(readOnly = true) public Iterable<UserClaimMvoState> get(org.dddml.support.criterion.Criterion filter, List<String> orders, Integer firstResult, Integer maxResults) { Criteria criteria = getCurrentSession().createCriteria(UserClaimMvoState.class); HibernateUtils.criteriaAddFilterAndOrdersAndSetFirstResultAndMaxResults(criteria, filter, orders, firstResult, maxResults); addNotDeletedRestriction(criteria); return criteria.list(); } @Transactional(readOnly = true) public UserClaimMvoState getFirst(Iterable<Map.Entry<String, Object>> filter, List<String> orders) { List<UserClaimMvoState> list = (List<UserClaimMvoState>)get(filter, orders, 0, 1); if (list == null || list.size() <= 0) { return null; } return list.get(0); } @Transactional(readOnly = true) public UserClaimMvoState getFirst(Map.Entry<String, Object> keyValue, List<String> orders) { List<Map.Entry<String, Object>> filter = new ArrayList<>(); filter.add(keyValue); return getFirst(filter, orders); } @Transactional(readOnly = true) public Iterable<UserClaimMvoState> getByProperty(String propertyName, Object propertyValue, List<String> orders, Integer firstResult, Integer maxResults) { Map.Entry<String, Object> keyValue = new java.util.AbstractMap.SimpleEntry<String, Object> (propertyName, propertyValue); List<Map.Entry<String, Object>> filter = new ArrayList<Map.Entry<String, Object>>(); filter.add(keyValue); return get(filter, orders, firstResult, maxResults); } @Transactional(readOnly = true) public long getCount(Iterable<Map.Entry<String, Object>> filter) { Criteria criteria = getCurrentSession().createCriteria(UserClaimMvoState.class); criteria.setProjection(Projections.rowCount()); if (filter != null) { HibernateUtils.criteriaAddFilter(criteria, filter); } addNotDeletedRestriction(criteria); return (long)criteria.uniqueResult(); } @Transactional(readOnly = true) public long getCount(org.dddml.support.criterion.Criterion filter) { Criteria criteria = getCurrentSession().createCriteria(UserClaimMvoState.class); criteria.setProjection(Projections.rowCount()); if (filter != null) { org.hibernate.criterion.Criterion hc = CriterionUtils.toHibernateCriterion(filter); criteria.add(hc); } addNotDeletedRestriction(criteria); return (long)criteria.uniqueResult(); } protected static void addNotDeletedRestriction(Criteria criteria) { criteria.add(org.hibernate.criterion.Restrictions.eq("deleted", false)); } }
[ "yangjiefeng@gmail.com" ]
yangjiefeng@gmail.com
03042cea982a471e7760cc5c7609da39e87b6b76
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_c05e1a70d1d682505d5062b2b89d984f41a5d3f0/StatusActivity/9_c05e1a70d1d682505d5062b2b89d984f41a5d3f0_StatusActivity_s.java
cff9eba03d439a21243de133aad3cec4c31bb968
[]
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,202
java
package dk.lang.android.yamba; import com.android.debug.hv.ViewServer; import winterwell.jtwitter.Twitter; import winterwell.jtwitter.TwitterException; import android.os.AsyncTask; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.graphics.Color; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; public class StatusActivity extends Activity implements OnClickListener, TextWatcher { private static final String TAG = "StatusActivity"; EditText editText; Button updateButton; TextView textCount; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ViewServer.get(this).addWindow(this); /* only used for debugging */ setContentView(R.layout.activity_status); // Find views editText = (EditText) findViewById(R.id.editText); updateButton = (Button) findViewById(R.id.buttonUpdate); updateButton.setOnClickListener(this); textCount = (TextView) findViewById(R.id.textCount); textCount.setText(Integer.toString(140)); textCount.setTextColor(Color.GREEN); editText.addTextChangedListener(this); } public void onDestroy() { /* only used for debugging */ super.onDestroy(); ViewServer.get(this).removeWindow(this); } public void onResume() { /* only used for debugging */ super.onResume(); ViewServer.get(this).setFocusedWindow(this); } // Asynchronously post to twitter // (without this, we will get an android.os.NetworkOnMainThreadException) // Gingerbread let you do networking on the UI threat, from Honeycomb this is no longer possible class PostToTwitter extends AsyncTask<String, Integer, String> { // Called to initiate the background activity @Override protected String doInBackground(String... statuses) { try { YambaApplication yamba = ((YambaApplication) getApplication()); Twitter.Status status = yamba.getTwitter().updateStatus(statuses[0]); return status.text; } catch (TwitterException e) { Log.e(TAG, e.toString()); e.printStackTrace(); return "Failed to post"; } } // Called when there is a status to be updated @Override protected void onProgressUpdate(Integer... values) { super.onProgressUpdate(values); // Not used in this case (but java demands that it is implemented anyway .. ) } // Called once the background activity has completed @Override protected void onPostExecute(String result) { Toast.makeText(StatusActivity.this, result, Toast.LENGTH_LONG).show(); } } // Called when button is clicked // public void onClick(View v) { String status = editText.getText().toString(); new PostToTwitter().execute(status); Log.d(TAG, "onClicked"); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch(item.getItemId()) { case R.id.itemServiceStart: startService(new Intent(this, UpdaterService.class)); break; case R.id.itemServiceStop: stopService(new Intent(this, UpdaterService.class)); break; case R.id.itemPrefs: startActivity(new Intent(this, PrefsActivity.class)); break; } return true; } // TextWatcher methods public void afterTextChanged(Editable statusText) { int count = 140 - statusText.length(); textCount.setText(Integer.toString(count)); textCount.setTextColor(Color.GREEN); if (count < 10) textCount.setTextColor(Color.YELLOW); if (count < 0) textCount.setTextColor(Color.RED); } public void beforeTextChanged(CharSequence s, int start, int count, int after) {} public void onTextChanged(CharSequence s, int start, int before, int count) {} }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8a3031989594dc465c2358342276590a5e9de2d1
6dd10e6261b4b85264443b6c160db84548502861
/Javachobo/Day20_160125/FileEx5.java
0db2182b054233d55ffcd12b956bb101977054d7
[]
no_license
mirikim/JavaSamples
a139c23dc64397f8b37448c660b8911dd550ef3c
465cb9793a661670df4ed59341c3b9b00682f016
refs/heads/master
2021-01-10T06:42:52.188095
2016-02-14T04:25:12
2016-02-14T04:25:12
50,391,133
0
0
null
null
null
null
UTF-8
Java
false
false
2,752
java
package Day20_160125; import java.io.*; import java.text.*; import java.util.*; public class FileEx5 { public static void main(String[] args) { if (args.length != 1 || args[0].length() != 1 || "tTlLnN".indexOf(args[0]) == -1) { System.out.println("USAGE : java FileEx5 SORT_OPTION "); System.out.println(" SORT_OPTION : "); System.out.println(" t Time ascending sort. "); System.out.println(" T Time descending sort. "); System.out.println(" l Length ascending sort. "); System.out.println(" L Length descending sort. "); System.out.println(" n Name ascending sort. "); System.out.println(" N Name descending sort. "); System.exit(0); } final char option = args[0].charAt(0); String currDir = System.getProperty("user.dir"); File dir = new File(currDir); File[] files = dir.listFiles(); Comparator comp = new Comparator() { public int compare(Object o1, Object o2) { long time1 = ((File) o1).lastModified(); long time2 = ((File) o2).lastModified(); long length1 = ((File) o1).length(); long length2 = ((File) o2).length(); String name1 = ((File) o1).getName().toLowerCase(); String name2 = ((File) o2).getName().toLowerCase(); int result = 0; switch (option) { case 't': if (time1 - time2 > 0) result = 1; else if (time1 - time2 == 0) result = 0; else if (time1 - time2 < 0) result = -1; break; case 'T': if (time1 - length2 > 0) result = 1; else if (length1 - length2 == 0) result = 0; else if (length1 - length2 < 0) result = -1; break; case 'L': if (length1 - length2 > 0) result = -1; else if (length1 - length2 == 0) result = 0; else if (length1 - length2 < 0) result = 1; break; case 'n': result = name1.compareTo(name2); break; case 'N': result = name2.compareTo(name1); break; } return result; }// compare public boolean equals(Object o) { return false; }// not used. };// end of Comparator Arrays.sort(files, comp); for (int i = 0; i < files.length; i++) { File f = files[i]; String name = f.getName(); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm"); String attribute = ""; String size = ""; if (files[i].isDirectory()) { attribute = "DIR"; } else { size = f.length() + ""; attribute = f.canRead() ? "R" : ""; attribute += f.canWrite() ? "W" : ""; attribute += f.isHidden() ? "H" : ""; } System.out.printf("%s %3s %6s %s\n", df.format(new Date(f.lastModified())), attribute, size, name); } // for }// main }// end of class
[ "rlaalfl92@nate.com" ]
rlaalfl92@nate.com
b9174d5daa485b036f63b8d5b31d439238686126
e688058ed386400fc3517d5dc68a7a4e36c9de9e
/src/main/java/com/google/devtools/build/lib/rules/cpp/FeatureConfigurationCommandLine.java
4a27e13d06c15e7b2f529c691d7cb2ae6b23fc7b
[ "Apache-2.0" ]
permissive
nikola-sh/bazel
ed1554097f98231a57cc21918ce1b8ed42fa65b6
83d7e1d27a84f2db0d6197af50955e26a9db04fb
refs/heads/master
2021-07-11T09:21:32.671426
2019-12-03T14:47:45
2019-12-03T14:48:54
224,307,143
0
0
Apache-2.0
2019-11-26T23:51:30
2019-11-26T23:51:29
null
UTF-8
Java
false
false
4,220
java
// Copyright 2019 The Bazel Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.devtools.build.lib.rules.cpp; import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Artifact.ArtifactExpander; import com.google.devtools.build.lib.actions.CommandLine; import com.google.devtools.build.lib.actions.CommandLineExpansionException; import com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures.ExpansionException; import com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures.FeatureConfiguration; /** * A representation of command line for C++ actions ({@link CppCompileAction}, {@link * CppLinkAction}, {@link LtoBackendAction}...). * * <p>This class is an adapter from {@link FeatureConfiguration} and {@link CcToolchainVariables} to * {@link CommandLine}. Using this we're able to pass C++ command lines to {@link * com.google.devtools.build.lib.analysis.actions.SpawnAction} or to give access to C++ command * lines to Starlark aspects. * * <p>See {@link CompileCommandLine#getArguments} for inline subclass of CommandLine that does all * of this plus some more specifics for CppCompileAction. */ public class FeatureConfigurationCommandLine extends CommandLine { private final FeatureConfiguration featureConfiguration; private final CcToolchainVariables buildVariables; private final String actionName; private final boolean usePic; /** * Create a {@link CommandLine} instance from given {@link FeatureConfiguration} and {@link * CcToolchainVariables}. */ public static FeatureConfigurationCommandLine from( FeatureConfiguration featureConfiguration, CcToolchainVariables ccToolchainVariables, String actionName) { return new FeatureConfigurationCommandLine( featureConfiguration, ccToolchainVariables, actionName, /* usePic= */ false); } /** * Do not use for new code. * * <p>TODO(hlopko): Refactor to remove the usePic field. * * @deprecated Only there for legacy/technical debt reasons for ThinLTO. */ @Deprecated public static FeatureConfigurationCommandLine forLtoBackendAction( FeatureConfiguration featureConfiguration, CcToolchainVariables ccToolchainVariables, boolean usePic) { return new FeatureConfigurationCommandLine( featureConfiguration, ccToolchainVariables, CppActionNames.LTO_BACKEND, usePic); } private FeatureConfigurationCommandLine( FeatureConfiguration featureConfiguration, CcToolchainVariables ccToolchainVariables, String actionName, boolean usePic) { this.featureConfiguration = featureConfiguration; this.buildVariables = ccToolchainVariables; this.actionName = actionName; this.usePic = usePic; } @Override public Iterable<String> arguments() throws CommandLineExpansionException { return arguments(/* artifactExpander= */ null); } @Override public Iterable<String> arguments(ArtifactExpander artifactExpander) throws CommandLineExpansionException { ImmutableList.Builder<String> args = ImmutableList.builder(); try { args.addAll( featureConfiguration.getCommandLine(actionName, buildVariables, artifactExpander)); } catch (ExpansionException e) { throw new CommandLineExpansionException(e.getMessage()); } // If this is a PIC compile (set based on the CppConfiguration), the PIC // option should be added after the rest of the command line so that it // cannot be overridden. This is consistent with the ordering in the // CppCompileAction's compiler options. if (usePic) { args.add("-fPIC"); } return args.build(); } }
[ "copybara-worker@google.com" ]
copybara-worker@google.com
ae19ee6650eacc2177cf2ac8d4062c1cad31ff0a
ec229de2aa961e0a3882b66b2c4c3f494fb4b2aa
/smaliDeObfuscator/src/com/zhangwei/parser/Rule_cmdSgetByte.java
286b19dc562d61dc278f108d372641428f2b7401
[]
no_license
zhangweiwuhan/smaliDeObfuscator
7454b398b9e04c96ee396271ec1eeb9a8dc55d31
8f924b18272deac1b40eebb1c6a40570b3b70557
refs/heads/master
2016-09-06T09:14:33.476384
2014-03-11T01:15:47
2014-03-11T01:15:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,283
java
/* ----------------------------------------------------------------------------- * Rule_cmdSgetByte.java * ----------------------------------------------------------------------------- * * Producer : com.parse2.aparse.Parser 2.3 * Produced : Wed Sep 18 15:17:10 CST 2013 * * ----------------------------------------------------------------------------- */ package com.zhangwei.parser; import java.util.ArrayList; final public class Rule_cmdSgetByte extends Rule { private Rule_cmdSgetByte(String spelling, ArrayList<Rule> rules) { super(spelling, rules); } public Object accept(Visitor visitor) { return visitor.visit(this); } public static Rule_cmdSgetByte parse(ParserContext context) { context.push("cmdSgetByte"); boolean parsed = true; int s0 = context.index; ArrayList<Rule> e0 = new ArrayList<Rule>(); Rule rule; parsed = false; if (!parsed) { { ArrayList<Rule> e1 = new ArrayList<Rule>(); int s1 = context.index; parsed = true; if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { rule = Rule_optPadding.parse(context); if ((f1 = rule != null)) { e1.add(rule); c1++; } } parsed = c1 == 1; } if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { rule = Terminal_StringValue.parse(context, "sget-byte"); if ((f1 = rule != null)) { e1.add(rule); c1++; } } parsed = c1 == 1; } if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { rule = Rule_padding.parse(context); if ((f1 = rule != null)) { e1.add(rule); c1++; } } parsed = c1 == 1; } if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { rule = Rule_codeRegisterVDst.parse(context); if ((f1 = rule != null)) { e1.add(rule); c1++; } } parsed = c1 == 1; } if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { rule = Rule_listSeparator.parse(context); if ((f1 = rule != null)) { e1.add(rule); c1++; } } parsed = c1 == 1; } if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { rule = Rule_smaliFieldRef.parse(context); if ((f1 = rule != null)) { e1.add(rule); c1++; } } parsed = c1 == 1; } if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { rule = Rule_optPadding.parse(context); if ((f1 = rule != null)) { e1.add(rule); c1++; } } parsed = c1 == 1; } if (parsed) { boolean f1 = true; @SuppressWarnings("unused") int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { int g1 = context.index; parsed = false; if (!parsed) { { ArrayList<Rule> e2 = new ArrayList<Rule>(); int s2 = context.index; parsed = true; if (parsed) { boolean f2 = true; int c2 = 0; for (int i2 = 0; i2 < 1 && f2; i2++) { rule = Rule_padding.parse(context); if ((f2 = rule != null)) { e2.add(rule); c2++; } } parsed = c2 == 1; } if (parsed) { boolean f2 = true; int c2 = 0; for (int i2 = 0; i2 < 1 && f2; i2++) { rule = Rule_commentSequence.parse(context); if ((f2 = rule != null)) { e2.add(rule); c2++; } } parsed = c2 == 1; } if (parsed) e1.addAll(e2); else context.index = s2; } } f1 = context.index > g1; if (parsed) c1++; } parsed = true; } if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { rule = Rule_CRLF.parse(context); if ((f1 = rule != null)) { e1.add(rule); c1++; } } parsed = c1 == 1; } if (parsed) e0.addAll(e1); else context.index = s1; } } rule = null; if (parsed) rule = new Rule_cmdSgetByte(context.text.substring(s0, context.index), e0); else context.index = s0; context.pop("cmdSgetByte", parsed); return (Rule_cmdSgetByte)rule; } } /* ----------------------------------------------------------------------------- * eof * ----------------------------------------------------------------------------- */
[ "zhangweihust@gmail.com" ]
zhangweihust@gmail.com
98c507f31681e1e6205a78abbd54cf9302ee9e99
95ea92360a655265240a0da03f777a87861992c6
/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/XTestCase_71Record.java
3259414139f35f24373ef09391822383b1a5e1b6
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
hekar/jOOQ
886bd8579d6d1069d477f8d1322a51b6f4acfce0
d5945b9ee37ac92949fa6f5e9cd229046923c2e0
refs/heads/master
2021-01-17T21:58:21.141951
2012-09-03T02:11:51
2012-09-03T02:11:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,346
java
/** * This class is generated by jOOQ */ package org.jooq.test.sybase.generatedclasses.tables.records; /** * This class is generated by jOOQ. */ public class XTestCase_71Record extends org.jooq.impl.UpdatableRecordImpl<org.jooq.test.sybase.generatedclasses.tables.records.XTestCase_71Record> { private static final long serialVersionUID = 1438993511; /** * The table column <code>DBA.x_test_case_71.ID</code> * <p> * This column is part of the table's PRIMARY KEY */ public void setId(java.lang.Integer value) { setValue(org.jooq.test.sybase.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.ID, value); } /** * The table column <code>DBA.x_test_case_71.ID</code> * <p> * This column is part of the table's PRIMARY KEY */ public java.lang.Integer getId() { return getValue(org.jooq.test.sybase.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.ID); } /** * The table column <code>DBA.x_test_case_71.TEST_CASE_64_69_ID</code> * <p> * This column is part of a FOREIGN KEY: <code><pre> * CONSTRAINT x_test_case_71__fk_x_test_case_71 * FOREIGN KEY (TEST_CASE_64_69_ID) * REFERENCES DBA.x_test_case_64_69 (ID) * </pre></code> */ public void setTestCase_64_69Id(java.lang.Integer value) { setValue(org.jooq.test.sybase.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.TEST_CASE_64_69_ID, value); } /** * The table column <code>DBA.x_test_case_71.TEST_CASE_64_69_ID</code> * <p> * This column is part of a FOREIGN KEY: <code><pre> * CONSTRAINT x_test_case_71__fk_x_test_case_71 * FOREIGN KEY (TEST_CASE_64_69_ID) * REFERENCES DBA.x_test_case_64_69 (ID) * </pre></code> */ public java.lang.Integer getTestCase_64_69Id() { return getValue(org.jooq.test.sybase.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.TEST_CASE_64_69_ID); } /** * Link this record to a given {@link org.jooq.test.sybase.generatedclasses.tables.records.XTestCase_64_69Record * XTestCase_64_69Record} */ public void setTestCase_64_69Id(org.jooq.test.sybase.generatedclasses.tables.records.XTestCase_64_69Record value) { if (value == null) { setValue(org.jooq.test.sybase.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.TEST_CASE_64_69_ID, null); } else { setValue(org.jooq.test.sybase.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.TEST_CASE_64_69_ID, value.getValue(org.jooq.test.sybase.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.ID)); } } /** * The table column <code>DBA.x_test_case_71.TEST_CASE_64_69_ID</code> * <p> * This column is part of a FOREIGN KEY: <code><pre> * CONSTRAINT x_test_case_71__fk_x_test_case_71 * FOREIGN KEY (TEST_CASE_64_69_ID) * REFERENCES DBA.x_test_case_64_69 (ID) * </pre></code> */ public org.jooq.test.sybase.generatedclasses.tables.records.XTestCase_64_69Record fetchXTestCase_64_69() { return create() .selectFrom(org.jooq.test.sybase.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69) .where(org.jooq.test.sybase.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.ID.equal(getValue(org.jooq.test.sybase.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.TEST_CASE_64_69_ID))) .fetchOne(); } /** * Create a detached XTestCase_71Record */ public XTestCase_71Record() { super(org.jooq.test.sybase.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71); } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
0950256986f91e78f1d2c424e6e17163d86e614e
fa29571ec1a5c6988e2054078b144262b5fbbef0
/fml-parser/src/main/java/org/openflexo/foundation/fml/parser/node/AStarIdIdMultiplicativeExpression.java
4c8b78c4334594a9680a19804ac75b732ba68a33
[]
no_license
woutersl/openflexo-core
e4dde5b21b7fa5f416bd4ac99d5d88398419493b
85fe6334f5534b57d22fbef7d4f6138062890ca2
refs/heads/1.7.1
2021-01-22T20:34:43.071812
2015-04-02T08:45:59
2015-04-02T08:45:59
33,298,501
0
0
null
2015-04-02T08:38:01
2015-04-02T08:38:01
null
UTF-8
Java
false
false
6,978
java
/* This file was generated by SableCC (http://www.sablecc.org/). */ package org.openflexo.foundation.fml.parser.node; import java.util.*; import org.openflexo.foundation.fml.parser.analysis.*; @SuppressWarnings("nls") public final class AStarIdIdMultiplicativeExpression extends PMultiplicativeExpression { private TIdentifier _identifier1_; private final LinkedList<PAdditionalIdentifier> _additionalIdentifiers1_ = new LinkedList<PAdditionalIdentifier>(); private TStar _star_; private TIdentifier _identifier2_; private final LinkedList<PAdditionalIdentifier> _additionalIdentifiers2_ = new LinkedList<PAdditionalIdentifier>(); public AStarIdIdMultiplicativeExpression() { // Constructor } public AStarIdIdMultiplicativeExpression( @SuppressWarnings("hiding") TIdentifier _identifier1_, @SuppressWarnings("hiding") List<PAdditionalIdentifier> _additionalIdentifiers1_, @SuppressWarnings("hiding") TStar _star_, @SuppressWarnings("hiding") TIdentifier _identifier2_, @SuppressWarnings("hiding") List<PAdditionalIdentifier> _additionalIdentifiers2_) { // Constructor setIdentifier1(_identifier1_); setAdditionalIdentifiers1(_additionalIdentifiers1_); setStar(_star_); setIdentifier2(_identifier2_); setAdditionalIdentifiers2(_additionalIdentifiers2_); } @Override public Object clone() { return new AStarIdIdMultiplicativeExpression( cloneNode(this._identifier1_), cloneList(this._additionalIdentifiers1_), cloneNode(this._star_), cloneNode(this._identifier2_), cloneList(this._additionalIdentifiers2_)); } public void apply(Switch sw) { ((Analysis) sw).caseAStarIdIdMultiplicativeExpression(this); } public TIdentifier getIdentifier1() { return this._identifier1_; } public void setIdentifier1(TIdentifier node) { if(this._identifier1_ != null) { this._identifier1_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._identifier1_ = node; } public LinkedList<PAdditionalIdentifier> getAdditionalIdentifiers1() { return this._additionalIdentifiers1_; } public void setAdditionalIdentifiers1(List<PAdditionalIdentifier> list) { this._additionalIdentifiers1_.clear(); this._additionalIdentifiers1_.addAll(list); for(PAdditionalIdentifier e : list) { if(e.parent() != null) { e.parent().removeChild(e); } e.parent(this); } } public TStar getStar() { return this._star_; } public void setStar(TStar node) { if(this._star_ != null) { this._star_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._star_ = node; } public TIdentifier getIdentifier2() { return this._identifier2_; } public void setIdentifier2(TIdentifier node) { if(this._identifier2_ != null) { this._identifier2_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._identifier2_ = node; } public LinkedList<PAdditionalIdentifier> getAdditionalIdentifiers2() { return this._additionalIdentifiers2_; } public void setAdditionalIdentifiers2(List<PAdditionalIdentifier> list) { this._additionalIdentifiers2_.clear(); this._additionalIdentifiers2_.addAll(list); for(PAdditionalIdentifier e : list) { if(e.parent() != null) { e.parent().removeChild(e); } e.parent(this); } } @Override public String toString() { return "" + toString(this._identifier1_) + toString(this._additionalIdentifiers1_) + toString(this._star_) + toString(this._identifier2_) + toString(this._additionalIdentifiers2_); } @Override void removeChild(@SuppressWarnings("unused") Node child) { // Remove child if(this._identifier1_ == child) { this._identifier1_ = null; return; } if(this._additionalIdentifiers1_.remove(child)) { return; } if(this._star_ == child) { this._star_ = null; return; } if(this._identifier2_ == child) { this._identifier2_ = null; return; } if(this._additionalIdentifiers2_.remove(child)) { return; } throw new RuntimeException("Not a child."); } @Override void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) { // Replace child if(this._identifier1_ == oldChild) { setIdentifier1((TIdentifier) newChild); return; } for(ListIterator<PAdditionalIdentifier> i = this._additionalIdentifiers1_.listIterator(); i.hasNext();) { if(i.next() == oldChild) { if(newChild != null) { i.set((PAdditionalIdentifier) newChild); newChild.parent(this); oldChild.parent(null); return; } i.remove(); oldChild.parent(null); return; } } if(this._star_ == oldChild) { setStar((TStar) newChild); return; } if(this._identifier2_ == oldChild) { setIdentifier2((TIdentifier) newChild); return; } for(ListIterator<PAdditionalIdentifier> i = this._additionalIdentifiers2_.listIterator(); i.hasNext();) { if(i.next() == oldChild) { if(newChild != null) { i.set((PAdditionalIdentifier) newChild); newChild.parent(this); oldChild.parent(null); return; } i.remove(); oldChild.parent(null); return; } } throw new RuntimeException("Not a child."); } }
[ "sylvain@openflexo.org" ]
sylvain@openflexo.org
f7ff5f186b9f9f8da3e3e4efd4a8b1079ef71bdb
56fe53e612720292dc30927072e6f76c2eea6567
/onvif/src/org/onvif/ver10/device/wsdl/GetDot11Capabilities.java
38096ff1c555579f4dc22c53dbdbcb161cc5c499
[]
no_license
guishijin/onvif4java
f0223e63cda3a7fcd44e49340eaae1d7e5354ad0
9b15dba80f193ee4ba952aad377dda89a9952343
refs/heads/master
2020-04-08T03:22:51.810275
2019-10-23T11:16:46
2019-10-23T11:16:46
124,234,334
1
1
null
null
null
null
UTF-8
Java
false
false
1,714
java
package org.onvif.ver10.device.wsdl; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.w3c.dom.Element; /** * <p> * Java class for anonymous complex type. * * <p> * The following schema fragment specifies the expected content contained within * this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;any/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "any" }) @XmlRootElement(name = "GetDot11Capabilities") public class GetDot11Capabilities { @XmlAnyElement(lax = true) protected List<Object> any; /** * Gets the value of the any 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 any property. * * <p> * For example, to add a new item, do as follows: * * <pre> * getAny().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list {@link Object } * {@link Element } * * */ public List<Object> getAny() { if (any == null) { any = new ArrayList<Object>(); } return this.any; } }
[ "420188751@qq.com" ]
420188751@qq.com
ea909c644172605686402d50d75b24141e9b7230
73953608d778745c19d93f3334ef0e38b3628338
/src/main/java/javassist/bytecode/annotation/ShortMemberValue.java
3fbfd2f56139efdf35051fdbfe1d3d69d943ba25
[]
no_license
N3wb13GG/N3wb13-s-Core
4ccb002f95aee24f10fcd0c183fd7dbcc467e2d3
c58e54eca2f8d08448ea02962be32eceab9b90a3
refs/heads/master
2020-03-07T18:36:40.031910
2018-08-06T04:20:50
2018-08-06T04:20:50
127,645,526
0
0
null
null
null
null
UTF-8
Java
false
false
2,907
java
/* * Javassist, a Java-bytecode translator toolkit. * Copyright (C) 2004 Bill Burke. All Rights Reserved. * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. Alternatively, the contents of this file may be used under * the terms of the GNU Lesser General Public License Version 2.1 or later, * or the Apache License Version 2.0. * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. */ package javassist.bytecode.annotation; import javassist.ClassPool; import javassist.bytecode.ConstPool; import java.io.IOException; import java.lang.reflect.Method; /** * Short integer constant value. * * @author <a href="mailto:bill@jboss.org">Bill Burke</a> * @author Shigeru Chiba */ public class ShortMemberValue extends MemberValue { int valueIndex; /** * Constructs a short constant value. The initial value is specified * by the constant pool entry at the given index. * * @param index the index of a CONSTANT_Integer_info structure. */ public ShortMemberValue(int index, ConstPool cp) { super('S', cp); this.valueIndex = index; } /** * Constructs a short constant value. * * @param s the initial value. */ public ShortMemberValue(short s, ConstPool cp) { super('S', cp); setValue(s); } /** * Constructs a short constant value. The initial value is 0. */ public ShortMemberValue(ConstPool cp) { super('S', cp); setValue((short)0); } Object getValue(ClassLoader cl, ClassPool cp, Method m) { return new Short(getValue()); } Class getType(ClassLoader cl) { return short.class; } /** * Obtains the value of the member. */ public short getValue() { return (short)cp.getIntegerInfo(valueIndex); } /** * Sets the value of the member. */ public void setValue(short newValue) { valueIndex = cp.addIntegerInfo(newValue); } /** * Obtains the string representation of this object. */ public String toString() { return Short.toString(getValue()); } /** * Writes the value. */ public void write(AnnotationsWriter writer) throws IOException { writer.constValueIndex(getValue()); } /** * Accepts a visitor. */ public void accept(MemberValueVisitor visitor) { visitor.visitShortMemberValue(this); } }
[ "takayugg.0807@gmail.com" ]
takayugg.0807@gmail.com
8b3579e2b5d79a65e8e246a399b9c238c11036a2
c371f7aae90bfbb45a3f07d7b933467bd104e857
/java/src/generated/java/net/asam/openscenario/v1_0/impl/RoadConditionImpl.java
eaa41cca81a7e1f9fafe02e161698946ee50bec7
[ "Apache-2.0", "BSD-3-Clause", "MIT", "Zlib" ]
permissive
lsy234009/openscenario.api.test
bdef7912f40249623a8191e639a191e0681be10d
9de4645c79b22e080ddb8715d871b8668d4704d1
refs/heads/master
2023-04-16T04:46:05.619335
2021-04-27T14:48:24
2021-04-27T14:48:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,482
java
/* * Copyright 2020 RA Consulting * * RA Consulting GmbH licenses this file 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 net.asam.openscenario.v1_0.impl; import java.util.ArrayList; import java.util.Date; import java.util.Hashtable; import java.util.List; import net.asam.openscenario.api.IOpenScenarioFlexElement; import net.asam.openscenario.api.KeyNotSupportedException; import net.asam.openscenario.api.SimpleType; import net.asam.openscenario.common.IParserMessageLogger; import net.asam.openscenario.impl.BaseImpl; import net.asam.openscenario.parser.ParserHelper; import net.asam.openscenario.v1_0.api.IProperties; import net.asam.openscenario.v1_0.api.IRoadCondition; import net.asam.openscenario.v1_0.common.OscConstants; /** * This is a automatic generated file according to the OpenSCENARIO specification version 1.0 * * <p>Value class that implements IRoadCondition. With setter methods to fill the properties. * * <ul> * <li>getter methods for properties (implemented methods of IRoadCondition) * <li>setter methods for properties * <li>getChildren method to collect all children * <li>clone function to make a deep copy * <li>overrides from BaseImpl * </ul> * * @author RA Consulting OpenSCENARIO generation facility */ public class RoadConditionImpl extends BaseImpl implements IRoadCondition { protected static Hashtable<String, SimpleType> propertyToType = new Hashtable<>(); /** Filling the property to type map */ static { propertyToType.put(OscConstants.ATTRIBUTE__FRICTION_SCALE_FACTOR, SimpleType.DOUBLE); } private Double frictionScaleFactor; private IProperties properties; /** Default constructor */ public RoadConditionImpl() { super(); addAdapter(RoadConditionImpl.class, this); addAdapter(IRoadCondition.class, this); } @Override public IOpenScenarioFlexElement getOpenScenarioFlexElement() { return this; } @Override public Double getFrictionScaleFactor() { return this.frictionScaleFactor; } @Override public IProperties getProperties() { return this.properties; } /** * Sets the value of model property frictionScaleFactor * * @param frictionScaleFactor from OpenSCENARIO class model specification: [Friction scale factor. * Range: [0..inf[] */ public void setFrictionScaleFactor(Double frictionScaleFactor) { this.frictionScaleFactor = frictionScaleFactor; } /** * Sets the value of model property properties * * @param properties from OpenSCENARIO class model specification: [Additional properties to * describe the road condition.] */ public void setProperties(IProperties properties) { this.properties = properties; } @Override public void resolveParameterInternal( IParserMessageLogger logger, String attributeKey, String parameterLiteralValue) { if (attributeKey.equals(OscConstants.ATTRIBUTE__FRICTION_SCALE_FACTOR)) { // Simple type this.frictionScaleFactor = ParserHelper.parseDouble(logger, parameterLiteralValue, getTextmarker(attributeKey)); addResolvedParameter(attributeKey); } } @Override public SimpleType getTypeFromAttributeName(String attributeKey) { return propertyToType.get(attributeKey); } /** * A list of all aggregated children (lists are flattened). This may be used for applying a * specific method for any child. * * @return a list with all children (as BaseImpl) */ @Override public List<BaseImpl> getChildren() { List<BaseImpl> result = new ArrayList<>(); IProperties properties = null; properties = getProperties(); if (properties != null) { result.add((BaseImpl) properties); } return result; } /** * Making a (deep) clone this object. This is useful and used for importing elements from * catalogs. * * @return a deep copy of the object. */ @Override public RoadConditionImpl clone() { RoadConditionImpl clonedObject = new RoadConditionImpl(); cloneStartMarker(clonedObject); cloneEndMarker(clonedObject); cloneAttributeKeyToStartMarker(clonedObject); cloneAttributeKeyToEndMarker(clonedObject); cloneAttributeKeyToParameterNameMap(clonedObject); // clone attributes; // Simple type clonedObject.setFrictionScaleFactor(getFrictionScaleFactor()); // clone children IProperties properties = null; properties = getProperties(); if (properties != null) { PropertiesImpl clonedChild = ((PropertiesImpl) properties).clone(); clonedObject.setProperties(clonedChild); clonedChild.setParent(clonedObject); } return clonedObject; } // Implement the IOpenScenarioFlexElement interface @Override public String getStringProperty(String key) throws KeyNotSupportedException { // proxies and string attributes throw new KeyNotSupportedException(); } @Override public Long getUnsignedIntProperty(String key) throws KeyNotSupportedException { throw new KeyNotSupportedException(); } @Override public Integer getIntProperty(String key) throws KeyNotSupportedException { throw new KeyNotSupportedException(); } @Override public Double getDoubleProperty(String key) throws KeyNotSupportedException { if (key == null) { throw new KeyNotSupportedException(); } if (key.equals(OscConstants.ATTRIBUTE__FRICTION_SCALE_FACTOR)) { return getFrictionScaleFactor(); } throw new KeyNotSupportedException(); } @Override public Integer getUnsignedShortProperty(String key) throws KeyNotSupportedException { throw new KeyNotSupportedException(); } @Override public Boolean getBooleanProperty(String key) throws KeyNotSupportedException { throw new KeyNotSupportedException(); } @Override public Date getDateTimeProperty(String key) throws KeyNotSupportedException { throw new KeyNotSupportedException(); } @Override public IOpenScenarioFlexElement getChildElement(String key) throws KeyNotSupportedException { if (key == null) { throw new KeyNotSupportedException(); } if (key.equals(OscConstants.ELEMENT__PROPERTIES)) { return (IOpenScenarioFlexElement) getProperties(); } throw new KeyNotSupportedException(); } @Override public List<IOpenScenarioFlexElement> getListChildElement(String key) throws KeyNotSupportedException { throw new KeyNotSupportedException(); } @Override public IOpenScenarioFlexElement getParentFlexElement() { return (IOpenScenarioFlexElement) getParent(); } @Override public IOpenScenarioFlexElement getReferencedElement(String key, String name) throws KeyNotSupportedException { throw new KeyNotSupportedException(); } @Override public String getEnumerationLiteral(String key) throws KeyNotSupportedException { throw new KeyNotSupportedException(); } @Override public String getModelType() { return "RoadCondition"; } }
[ "a.hege@rac.de" ]
a.hege@rac.de
693751c6560a7ff4d5ce6ae4e51c6f398a3f7cb9
d6e29965b0fca3ee31a2a48ed86870229592daae
/nd4j-backends/nd4j-backend-impls/nd4j-cuda-7.5/src/main/java/org/nd4j/jita/allocator/enums/AllocationStatus.java
f6d956bb09d382a69f10a3bc8a0f9ee448a96009
[ "Apache-2.0" ]
permissive
atssada/nd4j
159990f0b47790d57e818a64a00df292985b4e47
6be627e06cfefee6fa2cdbeee6a7aabd78a349e4
refs/heads/master
2021-01-24T21:30:06.806390
2016-03-20T23:29:18
2016-03-20T23:29:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
199
java
package org.nd4j.jita.allocator.enums; /** * @author raver119@gmail.com */ public enum AllocationStatus { UNDEFINED, HOST, DEVICE, ZERO, DEALLOCATED, PARTIAL, NESTED }
[ "raver119@gmail.com" ]
raver119@gmail.com
4ebc9c82fec643b6f503b2f7d6d4d253e6bd2716
6d9d90789f91d4010c30344409aad49fa99099e3
/lucene-analyzers-kuromoji/src/test/java/org/apache/lucene/analysis/ja/TestExtendedMode.java
460713ebbda268a9da950f26582476cf7f27b13e
[ "Apache-2.0" ]
permissive
bighaidao/lucene
8c2340f399c60742720e323a0b0c0a70b2651147
bd5d75e31526b599296c3721bc2081a3bde3e251
refs/heads/master
2021-08-07T07:01:42.438869
2012-08-22T09:16:08
2012-08-22T09:16:08
8,878,381
1
2
Apache-2.0
2021-08-02T17:05:32
2013-03-19T12:48:16
Java
UTF-8
Java
false
false
2,941
java
package org.apache.lucene.analysis.ja; /** * 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. */ import java.io.IOException; import java.io.Reader; import java.io.StringReader; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.ReusableAnalyzerBase; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.ja.JapaneseTokenizer.Mode; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.util.UnicodeUtil; import org.apache.lucene.util._TestUtil; public class TestExtendedMode extends BaseTokenStreamTestCase { private final Analyzer analyzer = new ReusableAnalyzerBase() { @Override protected TokenStreamComponents createComponents(String fieldName, Reader reader) { Tokenizer tokenizer = new JapaneseTokenizer(reader, null, true, Mode.EXTENDED); return new TokenStreamComponents(tokenizer, tokenizer); } }; /** simple test for supplementary characters */ public void testSurrogates() throws IOException { assertAnalyzesTo(analyzer, "𩬅艱鍟䇹愯瀛", new String[] { "𩬅", "艱", "鍟", "䇹", "愯", "瀛" }); } /** random test ensuring we don't ever split supplementaries */ public void testSurrogates2() throws IOException { int numIterations = atLeast(10000); for (int i = 0; i < numIterations; i++) { String s = _TestUtil.randomUnicodeString(random, 100); TokenStream ts = analyzer.tokenStream("foo", new StringReader(s)); CharTermAttribute termAtt = ts.addAttribute(CharTermAttribute.class); ts.reset(); while (ts.incrementToken()) { assertTrue(UnicodeUtil.validUTF16String(termAtt)); } } } /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { checkRandomData(random, analyzer, 10000*RANDOM_MULTIPLIER); } /** blast some random large strings through the analyzer */ public void testRandomHugeStrings() throws Exception { checkRandomData(random, analyzer, 200*RANDOM_MULTIPLIER, 8192); } }
[ "joergprante@gmail.com" ]
joergprante@gmail.com
0c798ebea255880c26b644e47128034cfaf35b7b
6193f2aab2b5aba0fcf24c4876cdcb6f19a1be88
/hgpu/src/test/nc/bs/pub/action/N_F3_EDIT.java
1105444a0325cda4a82b24479eb4030300c5d900
[]
no_license
uwitec/nc-wandashan
60b5cac6d1837e8e1e4f9fbb1cc3d9959f55992c
98d9a19dc4eb278fa8aa15f120eb6ebd95e35300
refs/heads/master
2016-09-06T12:15:04.634079
2011-11-05T02:29:15
2011-11-05T02:29:15
41,097,642
0
0
null
null
null
null
GB18030
Java
false
false
2,472
java
// Decompiled by DJ v2.9.9.60 Copyright 2000 Atanas Neshkov Date: 2004-08-10 09:02:59 // Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version! // Decompiler options: packimports(3) ansi // Source File Name: N_F3_EDIT.java package nc.bs.pub.action; import java.util.Hashtable; import nc.bs.ep.dj.HgCheckFreezeNmnyBo; import nc.bs.pub.compiler.AbstractCompiler2; import nc.vo.arap.exception.ExceptionHandler; import nc.vo.ep.dj.DJZBVO; import nc.vo.pub.compiler.PfParameterVO; public class N_F3_EDIT extends AbstractCompiler2 { public N_F3_EDIT() { m_methodReturnHas = new Hashtable<String, Object>(); m_keyHas = null; } public String getCodeRemark() { return "\t//nc.vo.ep.dj.DJZBVO retObj=(nc.vo.ep.dj.DJZBVO)getVo();\n\t\t//####本脚本必须含有返回值,返回DLG和PNL的组件不允许有返回值####\n\tObject retObj =null;\n\t//####重要说明:生成的业务组件方法尽量不要进行修改####\n\t//方法说明:null\n\tretObj =runClassCom@ \"nc.bs.ep.dj.DJZBBO\", \"editDj\", \"nc.vo.ep.dj.DJZBVO:F3\"@;\n\t//##################################################\n\treturn retObj;\n"; } public Object runComClass(PfParameterVO pfparametervo) throws nc.vo.pub.BusinessException { try { super.m_tmpVo = pfparametervo; //add by zhw 2011-06-27 做付款单保存时,系统自动校验,当前供应商的应付款余额-付款(预付款不受限制)是否小于零, HgCheckFreezeNmnyBo bo = new HgCheckFreezeNmnyBo(); bo.checkNmny((DJZBVO)getVo()); // zhw end Object obj = null; obj = runClass("nc.bs.ep.dj.DJZBBO", "editDj", "nc.vo.ep.dj.DJZBVO:F3", pfparametervo, m_keyHas, m_methodReturnHas); if(obj != null) m_methodReturnHas.put("editDj", obj); return obj; } catch(Exception exception) { throw ExceptionHandler.handleException(this.getClass(), exception); } } // private void setParameter(String s, Object obj) // { // if(m_keyHas == null) // m_keyHas = new Hashtable<String, Object>(); // if(obj != null) // m_keyHas.put(s, obj); // } private Hashtable<String, Object> m_methodReturnHas; private Hashtable<String, Object> m_keyHas; }
[ "liuyushi_alice@163.com" ]
liuyushi_alice@163.com
3513a01de1fae520b6aa18a3ae62daf97872de35
27d5abcdef2cd3583800cf69bd53b59c0b5ce65e
/src/test/java/pl/gpiwowsz/estateapp2/cucumber/CucumberContextConfiguration.java
41248b4a7af2294a8c2f3851f6bddccf18fbc911
[]
no_license
LaYatiX/estateApp2
e5a51d6a9b31ada84f90e682ae15852d1c75cacc
61a71d16e5a9416a2836110ec69cef27a0b6f383
refs/heads/master
2020-05-20T05:03:14.459574
2019-05-07T12:23:32
2019-05-07T12:23:32
185,396,557
0
0
null
null
null
null
UTF-8
Java
false
false
630
java
package pl.gpiwowsz.estateapp2.cucumber; import pl.gpiwowsz.estateapp2.EstateApp2App; import cucumber.api.java.Before; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.web.WebAppConfiguration; @SpringBootTest @WebAppConfiguration @ContextConfiguration(classes = EstateApp2App.class) public class CucumberContextConfiguration { @Before public void setup_cucumber_spring_context(){ // Dummy method so cucumber will recognize this class as glue // and use its context configuration. } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
3d867fbede5a81c83ffbb43d5aa8263084f92234
4acc3acebe988ec4e13c29625d4f1ea22b0a17c5
/第2章/bigCLOB/src/test/SelectById1.java
8abaf437e82604cd5a87187e87c1fcfa9de7b4a0
[ "MIT" ]
permissive
finersoft/JavaEECoreFrameworkPractisesV2Code
e78d65e892754162d9ac992337f987bffa083c72
a9fb5f0395a169c6522612e18c64990b7f81b069
refs/heads/master
2021-09-10T17:39:14.216582
2018-03-30T08:00:29
2018-03-30T08:00:29
119,354,905
1
1
null
null
null
null
UTF-8
Java
false
false
516
java
package test; import java.io.IOException; import org.apache.ibatis.session.SqlSession; import dbtools.GetSqlSession; import entity.BigText; import mapping.BigTextMapper; public class SelectById1 { public static void main(String[] args) throws IOException { SqlSession session = GetSqlSession.getSqlSession(); BigTextMapper mapper = session.getMapper(BigTextMapper.class); BigText bigtext = mapper.selectById1(); System.out.println(bigtext.getBigtext()); System.out.println(); session.close(); } }
[ "290384427@qq.com" ]
290384427@qq.com
4e577844ff9b09d81ba053cc56168d2a86c572b4
d7c5121237c705b5847e374974b39f47fae13e10
/airspan.netspan/src/main/java/Netspan/NBI_17_5/Status/EnbRfStatusGetResponse.java
36a8a2d25f3d9ae1929603d1d718f66930b0db1d
[]
no_license
AirspanNetworks/SWITModules
8ae768e0b864fa57dcb17168d015f6585d4455aa
7089a4b6456621a3abd601cc4592d4b52a948b57
refs/heads/master
2022-11-24T11:20:29.041478
2020-08-09T07:20:03
2020-08-09T07:20:03
184,545,627
1
0
null
2022-11-16T12:35:12
2019-05-02T08:21:55
Java
UTF-8
Java
false
false
1,767
java
package Netspan.NBI_17_5.Status; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="EnbRfStatusGetResult" type="{http://Airspan.Netspan.WebServices}LteRfGetResult" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "enbRfStatusGetResult" }) @XmlRootElement(name = "EnbRfStatusGetResponse") public class EnbRfStatusGetResponse { @XmlElement(name = "EnbRfStatusGetResult") protected LteRfGetResult enbRfStatusGetResult; /** * Gets the value of the enbRfStatusGetResult property. * * @return * possible object is * {@link LteRfGetResult } * */ public LteRfGetResult getEnbRfStatusGetResult() { return enbRfStatusGetResult; } /** * Sets the value of the enbRfStatusGetResult property. * * @param value * allowed object is * {@link LteRfGetResult } * */ public void setEnbRfStatusGetResult(LteRfGetResult value) { this.enbRfStatusGetResult = value; } }
[ "ggrunwald@airspan.com" ]
ggrunwald@airspan.com
229c03f4d0e38e5088bc394d1173366772decd9b
c8e581d7109756f755e46bc3bd77f83816ea0d7d
/src/main/java/com/tencentcloudapi/dcdb/v20180411/models/CloneAccountResponse.java
2b126f2cba264398ea7f41ded58aaeae18e49a7f
[ "Apache-2.0" ]
permissive
kent-wu/tencentcloud-sdk-java
3e7c88f7cc917dd2eb513cf8a870fdb531da5098
bfff84ef9efe90890e8f6375f0da4316e5970487
refs/heads/master
2020-03-31T20:50:49.941361
2018-10-11T08:27:46
2018-10-11T08:27:46
152,557,472
0
0
Apache-2.0
2018-10-11T08:28:17
2018-10-11T08:28:17
null
UTF-8
Java
false
false
2,513
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.dcdb.v20180411.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class CloneAccountResponse extends AbstractModel{ /** * 异步任务流程ID */ @SerializedName("FlowId") @Expose private Integer FlowId; /** * 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 */ @SerializedName("RequestId") @Expose private String RequestId; /** * 获取异步任务流程ID * @return FlowId 异步任务流程ID */ public Integer getFlowId() { return this.FlowId; } /** * 设置异步任务流程ID * @param FlowId 异步任务流程ID */ public void setFlowId(Integer FlowId) { this.FlowId = FlowId; } /** * 获取唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 * @return RequestId 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 */ public String getRequestId() { return this.RequestId; } /** * 设置唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 * @param RequestId 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。 */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } /** * 内部实现,用户禁止调用 */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "FlowId", this.FlowId); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
d90e71aae631527f141d4faa11c3f9536ea94846
9da2a3149b5668c02841191640b8c60e2597a8cf
/wecard-cms/src/main/java/com/cn/thinkx/wxapi/process/OAuthAccessToken.java
b9020800288276746db6a1138208c33b2dbe8865
[]
no_license
wang-shun/wecard-maindir
e1ff253978d37a54ad2dcc68c7e720678dccc439
438070cfb10f8a466d016858ea62c340cf4b2a46
refs/heads/master
2022-07-17T07:37:11.638365
2019-05-04T07:48:05
2019-05-04T07:48:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
631
java
package com.cn.thinkx.wxapi.process; /** * OAuth token */ public class OAuthAccessToken extends AccessToken{ //oauth2.0 private String oauthAccessToken;//刷新token private String openid; private String scope; public String getOauthAccessToken() { return oauthAccessToken; } public void setOauthAccessToken(String oauthAccessToken) { this.oauthAccessToken = oauthAccessToken; } public String getOpenid() { return openid; } public void setOpenid(String openid) { this.openid = openid; } public String getScope() { return scope; } public void setScope(String scope) { this.scope = scope; } }
[ "zhu_qiuyou@ebeijia.com" ]
zhu_qiuyou@ebeijia.com
b3eaa34dc48ca5cd65fa996c87455912c947531d
e112ee9fba8cfcf368217277dfc25b976026a232
/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java
6c7c82a4baa51690b41ce9c8313d9966d4fb5847
[ "Apache-2.0", "W3C-19980720", "BSD-3-Clause", "W3C", "LicenseRef-scancode-proprietary-license", "MIT" ]
permissive
apache/tuscany-sca-2.x
3ea2dc984b980d925ac835b6ac0dfcd4541f94b6
89f2d366d4b0869a4e42ff265ccf4503dda4dc8b
refs/heads/trunk
2023-09-01T06:21:08.318064
2013-09-10T16:50:53
2013-09-10T16:50:53
390,004
19
22
Apache-2.0
2023-08-29T21:33:50
2009-11-30T09:00:10
Java
UTF-8
Java
false
false
2,664
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tuscany.sca.itest.databindings.jaxb.impl; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.tuscany.sca.itest.databindings.jaxb.HelloLocalServiceSimple; import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimpleClient; import org.oasisopen.sca.annotation.Reference; import org.oasisopen.sca.annotation.Service; /** * An implementation of HelloServiceSimpleClient. * The client forwards the request to the service component and returns the response from the service component. */ @Service(HelloServiceSimpleClient.class) public class HelloLocalServiceSimpleClientImpl implements HelloServiceSimpleClient { private HelloLocalServiceSimple service; @Reference(required=false) protected void setHelloLocalServiceSimple(HelloLocalServiceSimple service) { this.service = service; } public String getGreetingsForward(String name) { return service.getGreetings(name); } public String[] getGreetingsArrayForward(String[] names) { return service.getGreetingsArray(names); } public List<String> getGreetingsListForward(List<String> names) { return service.getGreetingsList(names); } public Map<String, String> getGreetingsMapForward(Map<String, String> namesMap) { return service.getGreetingsMap(namesMap); } public ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names) { return service.getGreetingsArrayList(names); } public HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap) { return service.getGreetingsHashMap(namesMap); } public String getGreetingsVarArgsForward(String... names) { return service.getGreetingsVarArgs(names[0], names[1], names[2]); } }
[ "antelder@apache.org" ]
antelder@apache.org
cec1cc0ed2de5576ba8e4eb5610a5d8696177a28
2cdadf093d8d58666e8380e0e7e67eff3e23a855
/src/main/java/cn/com/webxml/WeatherWebServiceHttpGet.java
37b6dced919dcf71c22b0205aa90479e05422d00
[]
no_license
footprintes/Struts2
cb8e8cdc9120441cc71ce5b80fc6b7c81fa95115
53d680f3d5e98c14389cc4e25397d82a6fa9153e
refs/heads/master
2020-04-06T04:31:43.856993
2015-11-17T04:46:50
2015-11-17T04:46:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,925
java
package cn.com.webxml; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.xml.bind.annotation.XmlSeeAlso; /** * This class was generated by Apache CXF 2.7.6 * 2014-01-13T09:02:27.706+08:00 * Generated source version: 2.7.6 * */ @WebService(targetNamespace = "http://WebXml.com.cn/", name = "WeatherWebServiceHttpGet") @XmlSeeAlso({ObjectFactory.class}) @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) public interface WeatherWebServiceHttpGet { /** * <br><h3>根据城市或地区名称查询获得未来三天内天气情况、现在的天气实况、天气和生活指数</h3><p>调用方法如下:输入参数:theCityName = 城市中文名称(国外城市可用英文)或城市代码(不输入默认为上海市),如:上海 或 58367,如有城市名称重复请使用城市代码查询(可通过 getSupportCity 或 getSupportDataSet 获得);返回数据: 一个一维数组 String(22),共有23个元素。<br />String(0) 到 String(4):省份,城市,城市代码,城市图片名称,最后更新时间。String(5) 到 String(11):当天的 气温,概况,风向和风力,天气趋势开始图片名称(以下称:图标一),天气趋势结束图片名称(以下称:图标二),现在的天气实况,天气和生活指数。String(12) 到 String(16):第二天的 气温,概况,风向和风力,图标一,图标二。String(17) 到 String(21):第三天的 气温,概况,风向和风力,图标一,图标二。String(22) 被查询的城市或地区的介绍 <br /><a href="http://www.webxml.com.cn/images/weather.zip">下载天气图标<img src="http://www.webxml.com.cn/images/download_w.gif" border="0" align="absbottom" /></a>(包含大、中、小尺寸) <a href="http://www.webxml.com.cn/zh_cn/weather_icon.aspx" target="_blank">天气图例说明</a> <a href="http://www.webxml.com.cn/files/weather_eg.zip">调用此天气预报Web Services实例下载</a> (VB ASP.net 2.0)</p><br /> */ @WebResult(name = "ArrayOfString", targetNamespace = "http://WebXml.com.cn/", partName = "Body") @WebMethod public ArrayOfString getWeatherbyCityName( @WebParam(partName = "theCityName", name = "theCityName", targetNamespace = "http://WebXml.com.cn/") java.lang.String theCityName ); /** * <br><h3>获得本天气预报Web Services支持的洲、国内外省份和城市信息</h3><p>输入参数:无;返回:DataSet 。DataSet.Tables(0) 为支持的洲和国内省份数据,DataSet.Tables(1) 为支持的国内外城市或地区数据。DataSet.Tables(0).Rows(i).Item("ID") 主键对应 DataSet.Tables(1).Rows(i).Item("ZoneID") 外键。<br />Tables(0):ID = ID主键,Zone = 支持的洲、省份;Tables(1):ID 主键,ZoneID = 对应Tables(0)ID的外键,Area = 城市或地区,AreaCode = 城市或地区代码。</p><br /> */ @WebResult(name = "DataSet", targetNamespace = "http://WebXml.com.cn/", partName = "Body") @WebMethod public DataSet getSupportDataSet(); /** * <br><h3>根据城市或地区名称查询获得未来三天内天气情况、现在的天气实况、天气和生活指数(For商业用户)</h3><p>调用方法同 getWeatherbyCityName,输入参数:theUserID = 商业用户ID</p><br /> */ @WebResult(name = "ArrayOfString", targetNamespace = "http://WebXml.com.cn/", partName = "Body") @WebMethod public ArrayOfString getWeatherbyCityNamePro( @WebParam(partName = "theCityName", name = "theCityName", targetNamespace = "http://WebXml.com.cn/") java.lang.String theCityName, @WebParam(partName = "theUserID", name = "theUserID", targetNamespace = "http://WebXml.com.cn/") java.lang.String theUserID ); /** * <br /><h3>获得本天气预报Web Services支持的洲、国内外省份和城市信息</h3><p>输入参数:无; 返回数据:一个一维字符串数组 String(),内容为洲或国内省份的名称。</p><br /> */ @WebResult(name = "ArrayOfString", targetNamespace = "http://WebXml.com.cn/", partName = "Body") @WebMethod public ArrayOfString getSupportProvince(); /** * <br /><h3>查询本天气预报Web Services支持的国内外城市或地区信息</h3><p>输入参数:byProvinceName = 指定的洲或国内的省份,若为ALL或空则表示返回全部城市;返回数据:一个一维字符串数组 String(),结构为:城市名称(城市代码)。</p><br /> */ @WebResult(name = "ArrayOfString", targetNamespace = "http://WebXml.com.cn/", partName = "Body") @WebMethod public ArrayOfString getSupportCity( @WebParam(partName = "byProvinceName", name = "byProvinceName", targetNamespace = "http://WebXml.com.cn/") java.lang.String byProvinceName ); }
[ "928200207@qq.com" ]
928200207@qq.com
e7f49d783c5b0002d585dea161c261b9cad2a833
3d9592eaa5a8cc1da686caa98b4cbdbaf9cb5d52
/code/java-basic/src/kr/ac/kopo/day11/abs02/HPPrinter.java
e917a75092351dee2c96d94dc0c8b063bc6e3d8b
[]
no_license
hennylee/kopo-02-java
a2b980c77a25527162c5d18af0cf44f074a3b591
0adf492c5d98af74382372236d424cbfbec60eb2
refs/heads/main
2023-06-21T05:45:40.107515
2021-07-28T06:31:15
2021-07-28T06:31:15
345,571,951
0
2
null
null
null
null
UTF-8
Java
false
false
168
java
package kr.ac.kopo.day11.abs02; public class HPPrinter extends Printer { @Override public void print() { System.out.println("HP프린터로 출력중..."); } }
[ "haenyilee@kakao.com" ]
haenyilee@kakao.com
bc0fe74882621e73ecece8b1b7833d3ea7c2545e
12801f12a9940eac8f1f1323a4c1b63fd35327a3
/app/src/main/java/com/driveway/Utility/GpsLocationReceiver.java
675153bf7d37ba07a0ad5a5f7024d7680c892a8d
[]
no_license
nisargtrivedi/MyDriveway
c2074e7b905e2867adfbe1e1002ff8987bab5187
cb8c990d2d9aace39f61398b77c2819f1f1d45bb
refs/heads/master
2023-01-08T16:12:03.806287
2020-11-10T05:46:45
2020-11-10T05:46:45
311,547,882
0
0
null
null
null
null
UTF-8
Java
false
false
2,264
java
package com.driveway.Utility; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.location.LocationManager; import android.provider.Settings; import androidx.appcompat.app.AlertDialog; import com.driveway.Activity.MainNavigationScreen; import static android.content.Context.LOCATION_SERVICE; public class GpsLocationReceiver extends BroadcastReceiver { AppPreferences appPreferences; @Override public void onReceive(Context context, Intent intent) { appPreferences=new AppPreferences(context); if (intent.getAction().matches("android.location.PROVIDERS_CHANGED")) { try { LocationManager locationManager = (LocationManager) context.getSystemService(LOCATION_SERVICE); if (!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { checkLocationServices(context); } }catch (Exception ex){ } } } public void checkLocationServices(Context context) { LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); boolean gps_enabled = false; boolean network_enabled = false; try { gps_enabled = lm.isProviderEnabled(LocationManager.GPS_PROVIDER); } catch (Exception ex) { } try { network_enabled = lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER); } catch (Exception ex) { } if (!gps_enabled && !network_enabled) { // notify user new AlertDialog.Builder(context) .setCancelable(false) .setMessage("Location services is disabled by user,please turn on the location services.") .setPositiveButton("open settings", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface paramDialogInterface, int paramInt) { context.startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS)); } }).show(); } } }
[ "nisarg.trivedi@vovance.com" ]
nisarg.trivedi@vovance.com
ad2835aa09fc063e256829ebf9dac9c66e18bb73
612dcd2dda7b762cec49ef740497b4481be2fdbf
/test/com/rtg/vcf/annotation/AnnotationDataTypeTest.java
defa7b45268156e6a0e774e81b7f5dff88690d52
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
usernamegemaoa/rtg-tools
01c38c2d88ef318f2bddedde5bb08821f5c9d204
eb13bbb82d2fbeab7d54a92e8493ddd2acf0d349
refs/heads/master
2021-01-19T21:41:59.433014
2016-10-17T21:47:27
2016-10-17T21:47:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,031
java
/* * Copyright (c) 2014. Real Time Genomics Limited. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.rtg.vcf.annotation; import com.rtg.util.TestUtils; import com.rtg.vcf.header.MetaType; import junit.framework.TestCase; /** */ public class AnnotationDataTypeTest extends TestCase { public void testEnum() { TestUtils.testEnum(AnnotationDataType.class, "[BOOLEAN, INTEGER, DOUBLE, STRING]"); assertEquals(0, AnnotationDataType.BOOLEAN.ordinal()); assertEquals(1, AnnotationDataType.INTEGER.ordinal()); assertEquals(2, AnnotationDataType.DOUBLE.ordinal()); assertEquals(3, AnnotationDataType.STRING.ordinal()); assertEquals(4, AnnotationDataType.values().length); } public void testGetClassType() { assertEquals(String.class, AnnotationDataType.STRING.getClassType()); assertEquals(Double.class, AnnotationDataType.DOUBLE.getClassType()); assertEquals(Boolean.class, AnnotationDataType.BOOLEAN.getClassType()); assertEquals(Integer.class, AnnotationDataType.INTEGER.getClassType()); } public void testIsMetaTypeCompatiable() { assertTrue(AnnotationDataType.STRING.isMetaTypeCompatible(MetaType.STRING)); assertTrue(AnnotationDataType.STRING.isMetaTypeCompatible(MetaType.CHARACTER)); assertFalse(AnnotationDataType.STRING.isMetaTypeCompatible(MetaType.INTEGER)); assertFalse(AnnotationDataType.STRING.isMetaTypeCompatible(MetaType.FLAG)); assertFalse(AnnotationDataType.STRING.isMetaTypeCompatible(MetaType.FLOAT)); assertTrue(AnnotationDataType.INTEGER.isMetaTypeCompatible(MetaType.INTEGER)); assertFalse(AnnotationDataType.INTEGER.isMetaTypeCompatible(MetaType.CHARACTER)); assertFalse(AnnotationDataType.INTEGER.isMetaTypeCompatible(MetaType.STRING)); assertFalse(AnnotationDataType.INTEGER.isMetaTypeCompatible(MetaType.FLAG)); assertFalse(AnnotationDataType.INTEGER.isMetaTypeCompatible(MetaType.FLOAT)); assertTrue(AnnotationDataType.DOUBLE.isMetaTypeCompatible(MetaType.FLOAT)); assertFalse(AnnotationDataType.DOUBLE.isMetaTypeCompatible(MetaType.CHARACTER)); assertFalse(AnnotationDataType.DOUBLE.isMetaTypeCompatible(MetaType.INTEGER)); assertFalse(AnnotationDataType.DOUBLE.isMetaTypeCompatible(MetaType.FLAG)); assertFalse(AnnotationDataType.DOUBLE.isMetaTypeCompatible(MetaType.STRING)); assertTrue(AnnotationDataType.BOOLEAN.isMetaTypeCompatible(MetaType.FLAG)); assertFalse(AnnotationDataType.BOOLEAN.isMetaTypeCompatible(MetaType.CHARACTER)); assertFalse(AnnotationDataType.BOOLEAN.isMetaTypeCompatible(MetaType.INTEGER)); assertFalse(AnnotationDataType.BOOLEAN.isMetaTypeCompatible(MetaType.STRING)); assertFalse(AnnotationDataType.BOOLEAN.isMetaTypeCompatible(MetaType.FLOAT)); } public void testConvert() { for (AnnotationDataType adt : AnnotationDataType.values()) { assertNull(adt.stringToObjectOfType(null)); if (adt != AnnotationDataType.STRING && adt != AnnotationDataType.BOOLEAN) { try { adt.stringToObjectOfType("adsafsfd"); fail(adt + " formatted bad value"); } catch (IllegalArgumentException iae) { // expected } } } Object o = AnnotationDataType.STRING.stringToObjectOfType("banana"); assertTrue(o instanceof String); assertEquals("banana", o); o = AnnotationDataType.INTEGER.stringToObjectOfType("123"); assertTrue(o instanceof Integer); assertEquals(123, o); o = AnnotationDataType.DOUBLE.stringToObjectOfType("123"); assertTrue(o instanceof Double); assertEquals(123.0, o); o = AnnotationDataType.BOOLEAN.stringToObjectOfType("true"); assertTrue(o instanceof Boolean); assertEquals(Boolean.TRUE, o); } }
[ "len@realtimegenomics.com" ]
len@realtimegenomics.com
6bd9bfd60f351c3560ca58740532e007f1cd333b
e1e5bd6b116e71a60040ec1e1642289217d527b0
/H5/L2jMaster_org/L2jMaster_org_2019_07_02/L2JMaster_Server/src/main/java/com/l2jserver/gameserver/model/drops/strategy/IAmountMultiplierStrategy.java
52396cd085eb54d8b9b232fa11dbe5fc3a486595
[]
no_license
serk123/L2jOpenSource
6d6e1988a421763a9467bba0e4ac1fe3796b34b3
603e784e5f58f7fd07b01f6282218e8492f7090b
refs/heads/master
2023-03-18T01:51:23.867273
2020-04-23T10:44:41
2020-04-23T10:44:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,440
java
/* * Copyright (C) 2004-2019 L2J Server * * This file is part of L2J Server. * * L2J Server is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * L2J Server is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jserver.gameserver.model.drops.strategy; import com.l2jserver.Config; import com.l2jserver.gameserver.datatables.ItemTable; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.drops.GeneralDropItem; import com.l2jserver.gameserver.model.itemcontainer.Inventory; /** * @author Battlecruiser */ public interface IAmountMultiplierStrategy { public static final IAmountMultiplierStrategy DROP = DEFAULT_STRATEGY(Config.RATE_DEATH_DROP_AMOUNT_MULTIPLIER); public static final IAmountMultiplierStrategy SPOIL = DEFAULT_STRATEGY(Config.RATE_CORPSE_DROP_AMOUNT_MULTIPLIER); public static final IAmountMultiplierStrategy STATIC = (item, victim) -> 1; public static IAmountMultiplierStrategy DEFAULT_STRATEGY(final double defaultMultiplier) { return (item, victim) -> { double multiplier = 1; if (victim.isChampion()) { multiplier *= item.getItemId() != Inventory.ADENA_ID ? Config.L2JMOD_CHAMPION_REWARDS_AMOUNT : Config.L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT; } Float dropAmountMultiplier = Config.RATE_DROP_AMOUNT_MULTIPLIER.get(item.getItemId()); if (dropAmountMultiplier != null) { multiplier *= dropAmountMultiplier; } else if (ItemTable.getInstance().getTemplate(item.getItemId()).hasExImmediateEffect()) { multiplier *= Config.RATE_HERB_DROP_AMOUNT_MULTIPLIER; } else if (victim.isRaid()) { multiplier *= Config.RATE_RAID_DROP_AMOUNT_MULTIPLIER; } else { multiplier *= defaultMultiplier; } return multiplier; }; } public double getAmountMultiplier(GeneralDropItem item, L2Character victim); }
[ "64197706+L2jOpenSource@users.noreply.github.com" ]
64197706+L2jOpenSource@users.noreply.github.com
4e92576197bb437f6fb2e1bbf5bcbb3127cbeeed
b39d7e1122ebe92759e86421bbcd0ad009eed1db
/sources/android/telephony/-$$Lambda$TelephonyManager$eMNW6lCcxHLvIrcBQvhUXUKuLFU.java
5af712a3887df7625fc5562894e6e2790e2b482a
[]
no_license
AndSource/miuiframework
ac7185dedbabd5f619a4f8fc39bfe634d101dcef
cd456214274c046663aefce4d282bea0151f1f89
refs/heads/master
2022-03-31T11:09:50.399520
2020-01-02T09:49:07
2020-01-02T09:49:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
763
java
package android.telephony; import com.android.internal.util.FunctionalUtils.ThrowingRunnable; import java.util.concurrent.Executor; import java.util.function.Consumer; /* compiled from: lambda */ public final /* synthetic */ class -$$Lambda$TelephonyManager$eMNW6lCcxHLvIrcBQvhUXUKuLFU implements ThrowingRunnable { private final /* synthetic */ Executor f$0; private final /* synthetic */ Consumer f$1; public /* synthetic */ -$$Lambda$TelephonyManager$eMNW6lCcxHLvIrcBQvhUXUKuLFU(Executor executor, Consumer consumer) { this.f$0 = executor; this.f$1 = consumer; } public final void runOrThrow() { this.f$0.execute(new -$$Lambda$TelephonyManager$qjhLNTc5_Bq4btM7q4y_F5cdAK0(this.f$1)); } }
[ "shivatejapeddi@gmail.com" ]
shivatejapeddi@gmail.com
35c278259f1c465facdbc1effe2155fa6157a15b
b6a711bda0014064b6899ef507b2431d2b6b5030
/src/test/java/rx/internal/operators/OperatorSwitchIfEmptyTest.java
044662d1a9274a1fe984295f964240b9e5641cd5
[ "Apache-2.0" ]
permissive
akarnokd/RxJavaFlow
0c106d2dc0c71d18fd4248c69d37af7bdadabc3c
5c74270f438e19d4f66194724cddc571ec1821cb
refs/heads/master
2020-06-02T20:37:01.647294
2015-03-06T10:37:09
2015-03-06T10:37:09
31,422,563
9
3
null
null
null
null
UTF-8
Java
false
false
5,311
java
/** * Copyright 2014 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package rx.internal.operators; import static org.junit.Assert.*; import java.util.*; import java.util.concurrent.atomic.AtomicBoolean; import org.junit.Test; import rx.*; import rx.Observable; import rx.functions.Action0; import rx.observers.TestSubscriber; import rx.subscriptions.Subscriptions; public class OperatorSwitchIfEmptyTest { @Test public void testSwitchWhenNotEmpty() throws Exception { final AtomicBoolean subscribed = new AtomicBoolean(false); final Observable<Integer> observable = Observable.just(4).switchIfEmpty(Observable.just(2) .doOnSubscribe(new Action0() { @Override public void call() { subscribed.set(true); } })); assertEquals(4, observable.toBlocking().single().intValue()); assertFalse(subscribed.get()); } @Test public void testSwitchWhenEmpty() throws Exception { final Observable<Integer> observable = Observable.<Integer>empty().switchIfEmpty(Observable.from(Arrays.asList(42))); assertEquals(42, observable.toBlocking().single().intValue()); } @Test public void testSwitchWithProducer() throws Exception { final AtomicBoolean emitted = new AtomicBoolean(false); Observable<Long> withProducer = Observable.create(new Observable.OnSubscribe<Long>() { @Override public void call(final Subscriber<? super Long> subscriber) { subscriber.setProducer(new Producer() { @Override public void request(long n) { if (n > 0 && !emitted.get()) { emitted.set(true); subscriber.onNext(42L); subscriber.onComplete(); } } }); } }); final Observable<Long> observable = Observable.<Long>empty().switchIfEmpty(withProducer); assertEquals(42, observable.toBlocking().single().intValue()); } @Test public void testSwitchTriggerUnsubscribe() throws Exception { final Subscription empty = Subscriptions.empty(); Observable<Long> withProducer = Observable.create(new Observable.OnSubscribe<Long>() { @Override public void call(final Subscriber<? super Long> subscriber) { subscriber.add(empty); subscriber.onNext(42L); } }); final Subscription sub = Observable.<Long>empty().switchIfEmpty(withProducer).lift(new Observable.Operator<Long, Long>() { @Override public Subscriber<? super Long> call(final Subscriber<? super Long> child) { return new Subscriber<Long>(child) { @Override public void onComplete() { } @Override public void onError(Throwable e) { } @Override public void onNext(Long aLong) { unsubscribe(); } }; } }).subscribe(); assertTrue(empty.isUnsubscribed()); assertTrue(sub.isUnsubscribed()); } @Test public void testSwitchShouldTriggerUnsubscribe() { final Subscription s = Subscriptions.empty(); Observable.create(new Observable.OnSubscribe<Long>() { @Override public void call(final Subscriber<? super Long> subscriber) { subscriber.add(s); subscriber.onComplete(); } }).switchIfEmpty(Observable.<Long>never()).subscribe(); assertTrue(s.isUnsubscribed()); } @Test public void testSwitchRequestAlternativeObservableWithBackpressure() { TestSubscriber<Integer> ts = new TestSubscriber<Integer>() { @Override public void onStart() { request(1); } }; Observable.<Integer>empty().switchIfEmpty(Observable.just(1, 2, 3)).subscribe(ts); assertEquals(Arrays.asList(1), ts.getOnNextEvents()); ts.assertNoErrors(); } @Test public void testBackpressureNoRequest() { TestSubscriber<Integer> ts = new TestSubscriber<Integer>() { @Override public void onStart() { request(0); } }; Observable.<Integer>empty().switchIfEmpty(Observable.just(1, 2, 3)).subscribe(ts); assertTrue(ts.getOnNextEvents().isEmpty()); ts.assertNoErrors(); } }
[ "akarnokd@gmail.com" ]
akarnokd@gmail.com
38ff04c06ffec24978b88198b294d8a4b47811f9
2b0cd7405327f2b598951dbbf25d947e42f9f363
/dev_java/src/teacher/address/AddressBookInterface.java
4e0bac68c651a2f8487f2c8efe7d73b46e39eb7a
[]
no_license
8kosmo/workspace_java
8212cc0513dcec738f5ff6eef935c11845a9d79c
5faeeee72df1fbcb7c69b8e2f48e0ec450ee7bf7
refs/heads/master
2020-06-15T19:17:52.322189
2019-07-19T09:37:09
2019-07-19T09:37:09
195,372,162
0
0
null
null
null
null
UTF-8
Java
false
false
670
java
package teacher.address; import java.util.List; import java.util.Map; public interface AddressBookInterface { //상세조회 처리를 위한 추상 메소드 선언 public AddressVO getAddressDetail(AddressVO paVO); //입력처리를 위한 추상 메소드 선언 public AddressVO addresssInsert(AddressVO paVO); //수정처리를 위한 추상 메소드 선언 public AddressVO addresssUpdate(AddressVO paVO); //삭제처리를 위한 추상 메소드 선언 public AddressVO addresssDelete(AddressVO paVO); //전체 조회 처리를 위한 추상 메소드 선언 public List<AddressVO> getAddress(); public List<Map<String, Object>> getAddressMap(); }
[ "titicaca-lake@naver.com" ]
titicaca-lake@naver.com
457dd5fc3525597208f0ba2ad241318a8009f9cf
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/19/19_07f0f0e10a943282509693f7b6f475a3152d295a/ServiceFacade/19_07f0f0e10a943282509693f7b6f475a3152d295a_ServiceFacade_s.java
130d18bb2a3b6d9b09a40677570bdc58ed4b5b87
[]
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
6,620
java
package es.rchavarria.raccount.bussines; import java.io.IOException; import java.sql.SQLException; import java.util.HashMap; import java.util.List; import java.util.Map; import es.rchavarria.raccount.db.Session; import es.rchavarria.raccount.db.dao.AccountDAO; import es.rchavarria.raccount.db.dao.ConceptDAO; import es.rchavarria.raccount.db.dao.DAOException; import es.rchavarria.raccount.db.dao.MovementDAO; import es.rchavarria.raccount.db.isession.DBSession; import es.rchavarria.raccount.db.isession.TransactionalDBSession; import es.rchavarria.raccount.model.Account; import es.rchavarria.raccount.model.Concept; import es.rchavarria.raccount.model.DoubleMovement; import es.rchavarria.raccount.model.Movement; /** * Fachada para separar las funcionalidades de los DAOs * * @author RChavarria */ public class ServiceFacade { public List<Account> getAccountabelAccountList() throws SQLException, DAOException, IOException { Session session = null; try { session = DBSession.getSession(); return new AccountDAO(session).listAll(); } finally { if (session != null) { session.close(); } } } public List<Concept> getVisibleConceptList() throws DAOException, SQLException, IOException { Session session = null; try { session = DBSession.getSession(); return new ConceptDAO(session).listAllVisible(); } finally { if (session != null) { session.close(); } } } public List<Movement> listLastNMovements(final Account account, final int n) throws BussinessException, SQLException, IOException { Session session = null; try { session = DBSession.getSession(); return new MovementBussiness(session).listLastNMovements(account, n); } finally { if (session != null) { session.close(); } } } public void updateConcept(final Concept c) throws SQLException, BussinessException, IOException { Session session = null; try { session = DBSession.getSession(); new ConceptBussiness(session).update(c); } finally { if (session != null) { session.close(); } } } public void updateAccount(final Account a) throws BussinessException, SQLException, IOException { Session session = null; try { session = DBSession.getSession(); new AccountBussiness(session).update(a); } finally { if (session != null) { session.close(); } } } public Account findAccount(final long idAccount) throws BussinessException, SQLException, IOException { Session session = null; try { session = DBSession.getSession(); return new AccountBussiness(session).find(idAccount); } finally { if (session != null) { session.close(); } } } public List<Movement> getMovementList() throws DAOException, SQLException, IOException { Session session = null; try { session = DBSession.getSession(); return new MovementDAO(session).listAll(); } finally { if (session != null) { session.close(); } } } public Concept findConcept(final long idConcept) throws SQLException, BussinessException, IOException { Session session = null; try { session = DBSession.getSession(); return new ConceptBussiness(session).find(idConcept); } finally { if (session != null) { session.close(); } } } public long insertConcept(final Concept c) throws BussinessException, SQLException, IOException { Session session = null; try { session = DBSession.getSession(); return new ConceptBussiness(session).insert(c); } finally { if (session != null) { session.close(); } } } public long insertAccount(final Account a) throws BussinessException, SQLException, IOException { Session session = null; try { session = DBSession.getSession(); return new AccountBussiness(session).insert(a); } finally { if (session != null) { session.close(); } } } public long insertMovement(final Movement m) throws BussinessException, SQLException, IOException { Session session = null; try { session = DBSession.getSession(); return new MovementBussiness(session).insert(m); } finally { if (session != null) { session.close(); } } } public void insertDoubleMovement(final DoubleMovement dm) throws BussinessException, SQLException, IOException { Session session = null; try { session = TransactionalDBSession.getSession(); new MovementBussiness(session).insertDoubleMovement(dm); } finally { if (session != null) { session.close(); } } } public Map<Concept, Double> getMonthTotalExpenses(int month) throws BussinessException, DAOException, SQLException, IOException { Map<Concept, Double> expenses = new HashMap<Concept, Double>(); List<Concept> concepts = getVisibleConceptList(); Account account = findAccount(1L); Session session = null; try { session = TransactionalDBSession.getSession(); MovementBussiness mb = new MovementBussiness(session); for(Concept concept : concepts){ double expense = mb.getMonthExpenses(month, account, concept); expenses.put(concept, expense); } } finally { if (session != null) { session.close(); } } System.out.println("Hay " + concepts.size() + " concetos"); Double d = 1d; for(Concept c : concepts){ expenses.put(c, d); d += 1.5d; } return expenses; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f61e48e930b0a882dfc2f973fb0e174d9367f4dd
5d77abfba31d2f0a5cb2f92f937904859785e7ff
/Java/java_examples Hyd/ejb2/ex12/Sec.java
da71959a827052bdb4cc1ac66dd3a654c0881d13
[]
no_license
thinkpavan/artefacts
d93a1c0be0b6158cb0976aae9af9c6a016ebfdae
04bcf95450243dfe2f4fa8f09d96274034428e4d
refs/heads/master
2020-04-01T20:24:34.142409
2016-07-07T16:27:47
2016-07-07T16:27:47
62,716,135
0
0
null
null
null
null
UTF-8
Java
false
false
1,148
java
/* This is a sesssion bean to show how the transaction can be mainitained by a client. Version : 1.0 Author : Team -J */ package sec; import javax.ejb.*; import java.sql.*; import javax.naming.*; import java.util.*; import javax.sql.*; public class Sec implements SessionBean{ private SessionContext context; // these methods will be called when ejb is created public void ejbCreate() throws CreateException { } // following are the methods defined in SessionBean interface public void setSessionContext(SessionContext sc) { context =sc; } public void ejbRemove() { } public void ejbActivate() { } public void ejbPassivate() { } public void busMethod1(){ System.out.println("Bus Method 1 called"); System.out.println(" No code in methods1 to take care of security"); } public void busMethod2(){ System.out.println("Bus Method 2 called"); System.out.println(" No code in methods2 to take care of security"); java.security.Principal p=context.getCallerPrincipal(); System.out.println(p.getName()); System.out.println("iscaller in role " +context.isCallerInRole("role1")); } }
[ "lazygeeks.in@gmail.com" ]
lazygeeks.in@gmail.com
49a3acb627978d7b847fd8fa3adc9f62f139d008
fc6c7a82fcad534ddc06cb368d9209384f74a385
/3.JavaMultithreading/src/com/javarush/task/task28/task2805/Solution.java
7e53876809d33da4faa34559d870152177454bfc
[]
no_license
edmams789/JavaRushTasks
51d2cb4525b98f3e79718a58fb6301aa8eb43570
d8c8d33af04cd1ea67d846db1d0a435462fabd60
refs/heads/master
2023-05-05T12:20:34.636306
2021-05-19T14:45:35
2021-05-19T14:45:35
368,760,470
0
0
null
null
null
null
UTF-8
Java
false
false
2,000
java
package com.javarush.task.task28.task2805; /* Приоритеты в Threads В отдельном файле создай класс MyThread унаследовавшись от Thread. MyThread должен: 1. Иметь возможность быть созданным используя любой конструктор супер-класса (Alt+Insert). 2. Приоритет у трэдов должен проставляться циклично от минимального значения до максимального значения. 3. если у трэда установлена трэд-группа(ThreadGroup), то приоритет трэда не может быть больше максимального приоритета его трэд-группы. Требования: 1. Создай класс MyThread в отдельном файле. Унаследуй его от Thread. 2. В классе MyThread должны присутствовать конструкторы, аналогичные конструкторам супер-класса. 3. Приоритет у объектов MyThread должен проставляться циклично, от MIN_PRIORITY до MAX_PRIORITY. 4. Если у объекта MyThread установлена ThreadGroup, приоритет MyThread не должен быть выше максимального приоритета ThreadGroup. */ public class Solution { public static void main(String[] args) { for (int i = 0; i < 12; i++) { System.out.print(new MyThread().getPriority() + " "); } //output //1 2 3 4 5 6 7 8 9 10 1 2 System.out.println(); ThreadGroup group = new ThreadGroup("someName"); group.setMaxPriority(7); for (int i = 0; i < 12; i++) { System.out.print(new MyThread(group, "name" + i).getPriority() + " "); } //output //3 4 5 6 7 7 7 7 1 2 3 4 } }
[ "edmams789@gmail.com" ]
edmams789@gmail.com
eb089ea46a255f7d2ea6b4e0fc76802a94d779e5
97c72fef227775120c1cfd695f118100a56dbace
/authority/src/main/java/com/agama/authority/system/utils/SessionListener.java
0179bae691a2c9115833ecd8f89db1b81a676fae
[]
no_license
vipsql/mms
50c88133dabe38a9f52fffb6c75a4e032aa79218
2c94a05510ee97956719b55f14b7aed76d37de45
refs/heads/master
2020-03-07T17:21:13.599093
2016-03-11T16:29:50
2016-03-11T16:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,689
java
package com.agama.authority.system.utils; import java.util.HashSet; import javax.servlet.ServletContext; import javax.servlet.annotation.WebListener; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * session监听器 * @author ty * @date 2015年1月15日 */ @WebListener public class SessionListener implements HttpSessionListener { private Logger log=LoggerFactory.getLogger(SessionListener.class); @SuppressWarnings({ "rawtypes", "unchecked" }) public void sessionCreated(HttpSessionEvent event) { HttpSession session = event.getSession(); ServletContext application = session.getServletContext(); // 在application范围由一个HashSet集保存所有的session HashSet sessions = (HashSet) application.getAttribute("sessions"); if (sessions == null) { sessions = new HashSet(); application.setAttribute("sessions", sessions); } // 新创建的session均添加到HashSet集中 sessions.add(session); log.info("session:"+session.getId()+" add"); // 可以在别处从application范围中取出sessions集合 // 然后使用sessions.size()获取当前活动的session数,即为“在线人数” } @SuppressWarnings("rawtypes") public void sessionDestroyed(HttpSessionEvent event) { HttpSession session = event.getSession(); ServletContext application = session.getServletContext(); HashSet sessions = (HashSet) application.getAttribute("sessions"); // 销毁的session均从HashSet集中移除 sessions.remove(session); log.info("session:"+session.getId()+" remove"); } }
[ "scutak.o@gmail.com" ]
scutak.o@gmail.com
d68c624dcbae217a14c62ff91a59d28ebd09d402
a715e8312a90d099b72c24e5b7da1372c9fe67fb
/android/android/src/com/android/tools/idea/lang/proguard/ProguardParserDefinition.java
64c8bb3e7d5de35e271f2bc2fea2b4eb7f29b7e3
[ "Apache-2.0" ]
permissive
wiltonlazary/bugvm-studio
ff98c1beca1f890013aa05ecd67f137a14a70c32
5861389424a51181c58178576c78cf35c0ceb1b5
refs/heads/master
2021-01-24T20:58:41.730805
2015-12-18T19:34:14
2015-12-18T19:34:14
56,322,614
2
1
null
2016-04-15T13:34:56
2016-04-15T13:34:56
null
UTF-8
Java
false
false
2,802
java
/* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.tools.idea.lang.proguard; import com.android.tools.idea.lang.proguard.grammar.ProguardLexer; import com.android.tools.idea.lang.proguard.parser.ProguardParser; import com.android.tools.idea.lang.proguard.psi.ProguardTypes; import com.intellij.lang.ASTNode; import com.intellij.lang.Language; import com.intellij.lang.ParserDefinition; import com.intellij.lang.PsiParser; import com.intellij.lexer.Lexer; import com.intellij.openapi.project.Project; import com.intellij.psi.FileViewProvider; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.psi.TokenType; import com.intellij.psi.tree.IFileElementType; import com.intellij.psi.tree.TokenSet; import org.jetbrains.annotations.NotNull; public class ProguardParserDefinition implements ParserDefinition { /** Token set for comments. */ public static final TokenSet COMMENTS = TokenSet.create(ProguardTypes.LINE_CMT); /** Token set for white spaces. */ public static final TokenSet WHITE_SPACES = TokenSet.create(TokenType.WHITE_SPACE); /** File node type for Proguard files. */ public static final IFileElementType FILE = new IFileElementType(Language.findInstance(ProguardLanguage.class)); @NotNull @Override public Lexer createLexer(Project project) { return new ProguardLexer(); } @Override public PsiParser createParser(Project project) { return new ProguardParser(); } @Override public IFileElementType getFileNodeType() { return FILE; } @NotNull @Override public TokenSet getWhitespaceTokens() { return WHITE_SPACES; } @NotNull @Override public TokenSet getCommentTokens() { return COMMENTS; } @NotNull @Override public TokenSet getStringLiteralElements() { return TokenSet.EMPTY; } @NotNull @Override public PsiElement createElement(ASTNode node) { return ProguardTypes.Factory.createElement(node); } @Override public PsiFile createFile(FileViewProvider viewProvider) { return new ProguardFile(viewProvider); } @Override public SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode left, ASTNode right) { return SpaceRequirements.MAY; } }
[ "github@ibinti.com" ]
github@ibinti.com
80adf073d1e040566700da58dc66000f18212f56
75950d61f2e7517f3fe4c32f0109b203d41466bf
/modules/tags/fabric3-modules-parent-pom-0.7/kernel/impl/fabric3-contribution/src/test/java/org/fabric3/contribution/MetaDataStoreImplTestCase.java
00d0d4201c6edd0936fdf453a0c7cd3417b0ec4d
[]
no_license
codehaus/fabric3
3677d558dca066fb58845db5b0ad73d951acf880
491ff9ddaff6cb47cbb4452e4ddbf715314cd340
refs/heads/master
2023-07-20T00:34:33.992727
2012-10-31T16:32:19
2012-10-31T16:32:19
36,338,853
0
0
null
null
null
null
MacCentralEurope
Java
false
false
5,306
java
/* * Fabric3 * Copyright © 2008 Metaform Systems Limited * * This proprietary software may be used only connection with the Fabric3 license * (the “License”), a copy of which is included in the software or may be * obtained at: http://www.metaformsystems.com/licenses/license.html. * Software distributed under the License is distributed on an “as is” basis, * without warranties or conditions of any kind. See the License for the * specific language governing permissions and limitations of use of the software. * This software is distributed in conjunction with other software licensed under * different terms. See the separate licenses for those programs included in the * distribution for the permitted and restricted uses of such software. * */ package org.fabric3.contribution; import java.io.File; import java.io.Serializable; import java.net.URI; import java.net.URL; import java.util.HashMap; import java.util.Map; import java.util.Set; import javax.xml.namespace.QName; import junit.framework.TestCase; import org.easymock.EasyMock; import org.fabric3.contribution.wire.ContributionWireInstantiator; import org.fabric3.contribution.wire.ContributionWireInstantiatorRegistryImpl; import org.fabric3.contribution.wire.QNameWireInstantiator; import org.fabric3.spi.classloader.ClassLoaderRegistry; import org.fabric3.spi.contribution.Contribution; import org.fabric3.spi.contribution.ContributionManifest; import org.fabric3.spi.contribution.ContributionWire; import org.fabric3.spi.contribution.Import; import org.fabric3.spi.contribution.Resource; import org.fabric3.spi.contribution.ResourceElement; import org.fabric3.spi.contribution.manifest.QNameExport; import org.fabric3.spi.contribution.manifest.QNameImport; import org.fabric3.spi.contribution.manifest.QNameSymbol; import org.fabric3.util.io.FileHelper; /** * @version $Rev$ $Date$ */ public class MetaDataStoreImplTestCase extends TestCase { private static final URI RESOURCE_URI = URI.create("test-resource"); private static final URI RESOURCE_URI2 = URI.create("test-resource2"); private static final QName IMPORT_EXPORT_QNAME = new QName("test", "test"); private static final QName IMPORT_EXPORT_QNAME2 = new QName("test2", "test2"); private MetaDataStoreImpl store; public void testResolve() throws Exception { URI uri = URI.create("source"); QNameImport imprt = new QNameImport(IMPORT_EXPORT_QNAME); ContributionWire<?, ?> wire = store.resolve(uri, imprt); assertEquals(RESOURCE_URI, wire.getExportContributionUri()); } public void testResolveContainingResource() throws Exception { URI uri = URI.create("resource"); Contribution contribution = new Contribution(uri); QName qname = new QName("foo", "bar"); QNameSymbol symbol = new QNameSymbol(qname); ResourceElement<QNameSymbol, Serializable> element = new ResourceElement<QNameSymbol, Serializable>(symbol); Resource resource = new Resource(new URL("file://foo"), "resource"); resource.addResourceElement(element); contribution.addResource(resource); store.store(contribution); assertEquals(resource, store.resolveContainingResource(uri, symbol)); } public void testResolveDependentContributions() throws Exception { Set<Contribution> contributions = store.resolveDependentContributions(RESOURCE_URI); assertEquals(RESOURCE_URI2, contributions.iterator().next().getUri()); } protected void setUp() throws Exception { super.setUp(); ClassLoaderRegistry registry = EasyMock.createMock(ClassLoaderRegistry.class); EasyMock.expect(registry.getClassLoader(URI.create("resource"))).andReturn(getClass().getClassLoader()); EasyMock.replay(registry); store = new MetaDataStoreImpl(registry, null); Map<Class<? extends Import>, ContributionWireInstantiator<?, ?, ?>> instantiators = new HashMap<Class<? extends Import>, ContributionWireInstantiator<?, ?, ?>>(); instantiators.put(QNameImport.class, new QNameWireInstantiator()); ContributionWireInstantiatorRegistryImpl instantiatorRegistry = new ContributionWireInstantiatorRegistryImpl(); instantiatorRegistry.setInstantiators(instantiators); store.setInstantiatorRegistry(instantiatorRegistry); Contribution contribution = new Contribution(RESOURCE_URI); ContributionManifest manifest = contribution.getManifest(); QNameExport export = new QNameExport(IMPORT_EXPORT_QNAME); manifest.addExport(export); store.store(contribution); Contribution contribution2 = new Contribution(RESOURCE_URI2); ContributionManifest manifest2 = contribution2.getManifest(); QNameImport imprt = new QNameImport(IMPORT_EXPORT_QNAME); manifest2.addImport(imprt); QNameExport export2 = new QNameExport(IMPORT_EXPORT_QNAME2); manifest2.addExport(export2); store.store(contribution2); ContributionWire<?, ?> wire = store.resolve(RESOURCE_URI2, imprt); contribution2.addWire(wire); } protected void tearDown() throws Exception { super.tearDown(); FileHelper.deleteDirectory(new File("target/repository")); } }
[ "meerajk@83866bfc-822f-0410-aa35-bd5043b85eaf" ]
meerajk@83866bfc-822f-0410-aa35-bd5043b85eaf
781c41d9310bf569eb1521707bc4d28b659fa39a
204d80af21c91be323fd607feb334bb76c72cecc
/spark-gwt-application/src/lt/jmsys/spark/gwt/application/common/client/application/AsyncActivityMapper.java
56dcebdfebe8d499ac7a44637f1fdafec5f93f19
[]
no_license
lukasonokoleg/evector
3cb708f93de05b5e1944339ffed472f50ad89ca9
942855db30b3210485beebb84789b7043f407af2
refs/heads/master
2021-01-10T19:41:00.324499
2015-01-07T09:17:09
2015-01-07T09:17:09
25,296,524
1
0
null
null
null
null
UTF-8
Java
false
false
329
java
package lt.jmsys.spark.gwt.application.common.client.application; import com.google.gwt.activity.shared.Activity; import com.google.gwt.place.shared.Place; import com.google.gwt.user.client.rpc.AsyncCallback; public interface AsyncActivityMapper { public void getActivity(Place place, AsyncCallback<Activity> callback); }
[ "lukasonokoleg@gmail.com" ]
lukasonokoleg@gmail.com
7e77863257848a863a0a782d38b96097e7dc3d51
18aa0c66b7521db1dd1b4700db64aa6fc21e5705
/src/main/java/com/qding/bigdata/ds/component/CommonDataServiceLoggetComsumer.java
a991fadb0a37b50b408920204e51d017be21f32e
[]
no_license
cainiao22/ds
716834a86a66e7c592788032ec2e9d0b52c41008
fd80e539cc6ae0d54a793fd7b387b717cc23a59c
refs/heads/master
2022-12-21T09:33:42.022611
2019-09-19T03:24:51
2019-09-19T03:24:51
214,326,271
0
0
null
2022-12-16T09:45:15
2019-10-11T02:30:08
JavaScript
UTF-8
Java
false
false
478
java
package com.qding.bigdata.ds.component; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.kafka.listener.MessageListener; /** * @author yanpf * @date 2018/7/2 17:30 * @description */ public class CommonDataServiceLoggetComsumer implements MessageListener<String, String> { @Override public void onMessage(ConsumerRecord<String, String> record) { String value = record.value(); System.out.println(value); } }
[ "yanpengfei@qding.me" ]
yanpengfei@qding.me