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
3bdd75e36b172b359db627e8cfc60d761d45c987
6617a7091490a0f600de9a21a7748d0d2de3e2d3
/search/src/main/java/org/cucina/search/marshall/DateSearchCriterionUnmarshaller.java
33787d41bb275df9c7bdcf81e84ca9d0ad129656
[ "Apache-2.0" ]
permissive
cucina/opencucina
f80ee908eb9d7138493b9f720aefe9270ad1a3c4
ac683668bf7b2fa6c31491c6eafbfb5c95b651eb
refs/heads/master
2021-05-15T02:00:45.714499
2018-03-09T06:37:41
2018-03-09T06:37:43
30,875,325
1
0
null
null
null
null
UTF-8
Java
false
false
3,762
java
package org.cucina.search.marshall; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import org.cucina.core.utils.NameUtils; import org.cucina.search.query.SearchCriterion; import org.cucina.search.query.criterion.DateRelativeSearchCriterion; import org.cucina.search.query.criterion.DateSearchCriterion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.util.Assert; import java.text.ParseException; import java.util.Calendar; import java.util.Date; import java.util.Map; /** * Unmarshalls DateSearchCriterion from criteria Map * * @author $Author: $ * @version $Revision: $ */ public class DateSearchCriterionUnmarshaller extends NotSearchCriterionUnmarshaller { private static final Logger LOG = LoggerFactory.getLogger(DateSearchCriterionUnmarshaller.class); /** * Unmarshall DateSearchCriterion * * @param propertyName String. * @param alias String. * @param rootType String. * @param rootAlias String. * @param criteria Map<String, Object>. * @return SearchCriterion populated with values from criteria Map. */ @SuppressWarnings("unchecked") @Override protected SearchCriterion doUnmarshall(String propertyName, String alias, String rootType, String rootAlias, Map<String, Object> marshalledCriterion) { Object from = marshalledCriterion.get(NameUtils.concat(alias, SearchCriterionMarshaller.FROM_PROPERTY)); Object to = marshalledCriterion.get(NameUtils.concat(alias, SearchCriterionMarshaller.TO_PROPERTY)); if ((from == null) && (to == null)) { Map<String, Object> criteria = (Map<String, Object>) marshalledCriterion.get(alias); if (MapUtils.isNotEmpty(criteria)) { from = criteria.get(SearchCriterionMarshaller.FROM_PROPERTY); to = criteria.get(SearchCriterionMarshaller.TO_PROPERTY); } } if ((from != null) || (to != null)) { from = convertDate(from); to = convertDate(to); if (from instanceof Date || to instanceof Date) { Assert.isTrue((from == null) || from instanceof Date, "Both from and to must be of same type, i.e. Date"); Assert.isTrue((to == null) || to instanceof Date, "Both from and to must be of same type, i.e. Date"); if (to != null) { Calendar cal = Calendar.getInstance(); cal.setTime((Date) to); cal.set(Calendar.HOUR_OF_DAY, 23); cal.set(Calendar.MINUTE, 59); cal.set(Calendar.SECOND, 59); cal.set(Calendar.MILLISECOND, 999); to = cal.getTime(); } return new DateSearchCriterion(propertyName, alias, rootAlias, (Date) from, (Date) to); } else if (from instanceof String || to instanceof String) { Assert.isTrue((from == null) || from instanceof String, "Both from and to must be of same type, i.e. relative Date"); Assert.isTrue((to == null) || to instanceof String, "Both from and to must be of same type, i.e. relative Date"); return new DateRelativeSearchCriterion(propertyName, alias, rootAlias, (String) from, (String) to); } } return null; } /** * Parse the provided <code>String</code> into the required * <code>Date</code> * * @param value * @return * @throws ParseException */ private Object convertDate(Object value) { Object date = null; if (value instanceof Date) { date = value; } else if (value instanceof String && StringUtils.isNotBlank((String) value)) { String sValue = (String) value; if (StringUtils.isNumeric(sValue)) { try { date = new Date(Long.valueOf(sValue) * 1000); // date = dateFormat.parse(sValue); } catch (NumberFormatException e) { LOG.error(e.getLocalizedMessage()); } } else { date = value; } } return date; } }
[ "viktor.levine@gmail.com" ]
viktor.levine@gmail.com
17bd82af44a9417bbbfe07fdfb9ff53e0e459406
29345337bf86edc938f3b5652702d551bfc3f11a
/core/src/test/java/com/alibaba/alink/operator/batch/dataproc/AggLookupTest.java
37482bb5e9bfeb665b852a90b3c1f225874f46da
[ "Apache-2.0" ]
permissive
vacaly/Alink
32b71ac4572ae3509d343e3d1ff31a4da2321b6d
edb543ee05260a1dd314b11384d918fa1622d9c1
refs/heads/master
2023-07-21T03:29:07.612507
2023-07-12T12:41:31
2023-07-12T12:41:31
283,079,072
0
0
Apache-2.0
2020-07-28T02:46:14
2020-07-28T02:46:13
null
UTF-8
Java
false
false
3,895
java
package com.alibaba.alink.operator.batch.dataproc; import org.apache.flink.types.Row; import com.alibaba.alink.common.linalg.VectorUtil; import com.alibaba.alink.operator.batch.BatchOperator; import com.alibaba.alink.operator.batch.source.MemSourceBatchOp; import com.alibaba.alink.pipeline.dataproc.AggLookup; import com.alibaba.alink.testutil.AlinkTestBase; import org.junit.Test; import java.util.Arrays; import java.util.List; public class AggLookupTest extends AlinkTestBase { Row[] array1 = new Row[] { Row.of("1,2,3,4", "1,2,3,4", "1,2,3,4", "1,2,3,4", "1,2,3,4") }; MemSourceBatchOp data = new MemSourceBatchOp(Arrays.asList(array1), new String[] {"seq0", "seq1", "seq2", "seq3", "seq4"}); Row[] array3 = new Row[] { Row.of("1,2", "1,2,3", "1,2,3,4", "1,2,4", "4") }; MemSourceBatchOp data1 = new MemSourceBatchOp(Arrays.asList(array3), new String[] {"seq0", "seq1", "seq2", "seq3", "seq4"}); Row[] array2 = new Row[] { Row.of("1", "1.0,2.0,3.0,4.0"), Row.of("2", "2.0,3.0,4.0,5.0"), Row.of("3", "3.0,2.0,3.0,4.0"), Row.of("4", "4.0,5.0,6.0,5.0") }; MemSourceBatchOp embedding = new MemSourceBatchOp(Arrays.asList(array2), new String[] {"id", "vec"}); @Test public void testAggLookup() { AggLookupBatchOp lookup = new AggLookupBatchOp() .setClause("CONCAT(seq0,3) as e0, AVG(seq1) as e1, SUM(seq2) as e2,MAX(seq3) as e3,MIN(seq4) as e4") .setDelimiter(",") .setReservedCols(); Row row = lookup.linkFrom(embedding, data).collect().get(0); assert (VectorUtil.serialize(row.getField(0)).equals("1.0 2.0 3.0 4.0 2.0 3.0 4.0 5.0 3.0 2.0 3.0 4.0")); assert (VectorUtil.serialize(row.getField(1)).equals("2.5 3.0 4.0 4.5")); assert (VectorUtil.serialize(row.getField(2)).equals("10.0 12.0 16.0 18.0")); assert (VectorUtil.serialize(row.getField(3)).equals("4.0 5.0 6.0 5.0")); assert (VectorUtil.serialize(row.getField(4)).equals("1.0 2.0 3.0 4.0")); } @Test public void testAggLookupPipe() throws Exception { AggLookup lookup = new AggLookup().setModelData(embedding) .setClause("CONCAT(seq0,3) as e0, AVG(seq1) as e1, SUM(seq2) as e2,MAX(seq3) as e3,MIN(seq4) as e4") .setDelimiter(",") .setReservedCols(); Row row = lookup.transform(data).collect().get(0); assert (VectorUtil.serialize(row.getField(0)).equals("1.0 2.0 3.0 4.0 2.0 3.0 4.0 5.0 3.0 2.0 3.0 4.0")); assert (VectorUtil.serialize(row.getField(1)).equals("2.5 3.0 4.0 4.5")); assert (VectorUtil.serialize(row.getField(2)).equals("10.0 12.0 16.0 18.0")); assert (VectorUtil.serialize(row.getField(3)).equals("4.0 5.0 6.0 5.0")); assert (VectorUtil.serialize(row.getField(4)).equals("1.0 2.0 3.0 4.0")); } @Test public void testAggLookup1() throws Exception { new AggLookupBatchOp() .setClause( "CONCAT(seq0, 5) as e0, CONCAT(seq1) as e1, CONCAT(seq2) as e2,CONCAT(seq3) as e3,CONCAT(seq4) as e4") .setDelimiter(",") .setReservedCols(new String[] {}).linkFrom(embedding, data1).lazyPrint(1); new AggLookupBatchOp() .setClause("AVG(seq0) as e0, AVG(seq1) as e1, AVG(seq2) as e2,AVG(seq3) as e3,AVG(seq4) as e4") .setDelimiter(",") .setReservedCols(new String[] {}).linkFrom(embedding, data1).lazyPrint(1); new AggLookupBatchOp() .setClause("SUM(seq0) as e0, SUM(seq1) as e1, SUM(seq2) as e2,SUM(seq3) as e3,SUM(seq4) as e4") .setDelimiter(",") .setReservedCols(new String[] {}).linkFrom(embedding, data1).lazyPrint(1); new AggLookupBatchOp() .setClause("MAX(seq0) as e0, MAX(seq1) as e1, MAX(seq2) as e2,MAX(seq3) as e3,MAX(seq4) as e4") .setDelimiter(",") .setReservedCols(new String[] {}).linkFrom(embedding, data1).lazyPrint(1); new AggLookupBatchOp() .setClause("MIN(seq0) as e0, MIN(seq1) as e1, MIN(seq2) as e2,MIN(seq3) as e3,MIN(seq4) as e4") .setDelimiter(",") .setReservedCols(new String[] {}).linkFrom(embedding, data1).lazyPrint(1); BatchOperator.execute(); } }
[ "shaomeng.wang.w@gmail.com" ]
shaomeng.wang.w@gmail.com
33ef020179420e41b43e7fbc0573d7b9a2d144b9
85247953ad8257ea702183ba13bd86155ef3cee8
/src/test/java/sh/ory/keto/model/InternalRelationTupleTest.java
4f0fc2f50be0e3a67adf42428f98eb44dc08e066
[ "Apache-2.0" ]
permissive
JeffreyThijs/keto-client-java
0e686dbe184ea8221cc6dddf37e1e9dcf6e74d9f
5a07528527fca8ff78c434287710e34c8bc16553
refs/heads/master
2023-03-31T13:08:24.403453
2021-04-07T17:55:27
2021-04-07T17:55:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,730
java
/* * ORY Keto * Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs. * * The version of the OpenAPI document: v0.6.0-alpha.1 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package sh.ory.keto.model; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for InternalRelationTuple */ public class InternalRelationTupleTest { private final InternalRelationTuple model = new InternalRelationTuple(); /** * Model tests for InternalRelationTuple */ @Test public void testInternalRelationTuple() { // TODO: test InternalRelationTuple } /** * Test the property 'namespace' */ @Test public void namespaceTest() { // TODO: test namespace } /** * Test the property '_object' */ @Test public void _objectTest() { // TODO: test _object } /** * Test the property 'relation' */ @Test public void relationTest() { // TODO: test relation } /** * Test the property 'subject' */ @Test public void subjectTest() { // TODO: test subject } }
[ "3372410+aeneasr@users.noreply.github.com" ]
3372410+aeneasr@users.noreply.github.com
b0c3cf87c131a814b15ba4fee741ab63699aa172
7f287b27f6f0a4accb3ab01da7452f23565396ae
/dist/progetto/src/it/unibas/dist/modello/Utente.java
78ec683408de1ae9458e6aa105fac2a44693cd24
[]
no_license
MihaiSoanea/Java-Projects
d941776f7a0bd79527dde805e1a549f609484dd6
56c0d5d2792160c8fa4e4f5c43938fefd48ddd4f
refs/heads/master
2020-09-01T15:06:47.126318
2019-11-01T13:47:48
2019-11-01T13:47:48
218,987,814
0
0
null
null
null
null
UTF-8
Java
false
false
4,753
java
package it.unibas.dist.modello; import it.unibas.dist.Costanti; import java.io.Serializable; import java.util.Calendar; import java.util.GregorianCalendar; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @Entity(name = "utente") public class Utente implements Serializable, Comparable<Utente> { private static Log logger = LogFactory.getLog(Utente.class); private Long id; private String nomeUtente; private String password; private String nome; private String ruolo = ""; private boolean attivo = true; private Calendar lastLogin = new GregorianCalendar(2014, Calendar.JANUARY, 1, 1, 0, 0); private boolean autenticato; private transient String passwordInChiaro; @Id @GeneratedValue(strategy=GenerationType.TABLE) public Long getId() { return id; } protected void setId(Long id) { this.id = id; } @Column(unique=true) public String getNomeUtente() { return nomeUtente; } public void setNomeUtente(String nomeUtente) { this.nomeUtente = nomeUtente; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public String getRuolo() { return ruolo; } public void setRuolo(String ruolo) { this.ruolo = ruolo; } @Transient public boolean isAutenticato() { return autenticato; } public void setAutenticato(boolean autenticato) { this.autenticato = autenticato; } public void verifica(String password){ String hashPasswordFornita = md5hash(password); if (this.getPassword().equals(hashPasswordFornita)) { this.setAutenticato(true); } else { this.setAutenticato(false); } } private String md5hash(String password) { String hashString = null; try { java.security.MessageDigest digest = java.security.MessageDigest.getInstance("MD5"); byte[] hash = digest.digest(password.getBytes()); hashString = ""; for (int i = 0; i < hash.length; i++) { hashString += Integer.toHexString( (hash[i] & 0xFF) | 0x100 ).toLowerCase().substring(1,3); } } catch (java.security.NoSuchAlgorithmException e) { logger.error(e); } return hashString; } /** * @return the attivo */ public boolean isAttivo() { return attivo; } /** * @param attivo the attivo to set */ public void setAttivo(boolean attivo) { this.attivo = attivo; } /** * @return the lastLogin */ @Temporal(TemporalType.TIMESTAMP) public Calendar getLastLogin() { return lastLogin; } /** * @param lastLogin the lastLogin to set */ public void setLastLogin(Calendar lastLogin) { this.lastLogin = lastLogin; } public void setPasswordInChiaro(String passwordInChiaro){ this.passwordInChiaro = passwordInChiaro; } @Transient public String getPasswordInChiaro(){ return passwordInChiaro; } @Transient public boolean isFirstLogin(){ Calendar dataCal = new GregorianCalendar(2014, Calendar.JANUARY, 1, 1, 0, 0); if(lastLogin.equals(dataCal)){ return true; } return false; } public void cambiaPassword(){ logger.info("\n\n **** hash md5 : " + md5hash(passwordInChiaro)); this.password = md5hash(passwordInChiaro); } @Transient public boolean isRuoloOperatore(){ if(this.ruolo.equalsIgnoreCase("Operatore")){ return true; } return false; } @Transient public boolean isRuoloAdmin(){ if(this.ruolo.equalsIgnoreCase("amministratore")){ return true; } return false; } @Transient public boolean isRuoloDataEntry(){ if(this.ruolo.equalsIgnoreCase("dataentry")){ return true; } return false; } public int compareTo(Utente o) { return this.nomeUtente.compareTo(o.nomeUtente); } }
[ "mihaisoanea@yahoo.it" ]
mihaisoanea@yahoo.it
f1210a13ba41bf240f6f02b9d8d95daf952170e1
e3241b8f3744d0488aaafd9a5dfbc211de1a0b27
/src/test/java/general/capabilities/TP_oneM2M_CSE_GEN_RET_001.java
2289004dacc529c6c5b3a7ec6ea1ff1bf98ba1d8
[]
no_license
jaswantIISC/Example1
2fb6b8bebddded529f45cc464018f4daa342542c
f99d4cd5c8619bfe4b9430aa6a8a2728ac1ff0c5
refs/heads/master
2022-11-10T19:03:08.931915
2020-07-08T09:49:06
2020-07-08T09:49:06
278,051,509
0
0
null
null
null
null
UTF-8
Java
false
false
7,436
java
package general.capabilities; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.UUID; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import cdot.ccsp.dmr.ContainerCreateTestCases; import cdot.ccsp.onem2mTester.utils.GeneralRetrieveTestCases; import cdot.ccsp.onem2mTester.utils.TestingParams; import cdot.ccsp.registration.AERegistration; import cdot.onem2m.common.dto.OneM2MRequest; import cdot.onem2m.common.dto.OneM2MResponse; import cdot.onem2m.common.enums.M2MOperation; import cdot.onem2m.common.enums.M2MReleaseVersion; import cdot.onem2m.common.enums.M2MStatus; import cdot.onem2m.common.enums.MediaType; import cdot.onem2m.platform.originatorActions.business.OriginatorActions; import cdot.onem2m.platform.originatorActions.business.OriginatorActionsBean; import cdot.onem2m.resource.xsd.AE; import cdot.onem2m.resource.xsd.Container; import initializer.ConfigurationExtension; @ExtendWith({ ConfigurationExtension.class }) @Tag("TP_oneM2M_CSE_GEN_RET_001") public class TP_oneM2M_CSE_GEN_RET_001 { String aeId; String aeResourceID; String aeStructuredResourceID; String container1ResourceId; String container1StructuredResourceId; AERegistration aeRegister = new AERegistration(); ContainerCreateTestCases contCreate = new ContainerCreateTestCases(); GeneralRetrieveTestCases retResource = new GeneralRetrieveTestCases(); @BeforeAll static void beforeAllSetup() { System.out.println("##########################################################################################################"); } @BeforeEach void beforeEachSetup() { System.out.println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"); } @Test @Tag("TP_oneM2M_CSE_GEN_RET_001_CSR") void TP_oneM2M_CSE_GEN_RET_001_CSR() { aeStructuredResourceID = TestingParams.CSE_BASE_RESOURCE_NAME; // INITIAL STATE STARTS // AE-REGISTRATION OneM2MResponse aeMResponse = aeRegister.AERegisterWithEmptyFrom(TestingParams.CSE_BASE_RESOURCE_ID, TestingParams.GENERAL_ADN_AE_ID, TestingParams.getSecurityParams(TestingParams.GENERAL_ADN_AE_ID)); AE ae = (AE) aeMResponse.getPrimitiveContent().getAny(); assertEquals(M2MStatus.CREATED.getOnem2mStatusCode(), aeMResponse.getResponseStatusCode()); // AE-REGISTRATION DONE aeId = ae.getAEID(); aeResourceID = ae.getResourceID(); aeStructuredResourceID = aeStructuredResourceID + "/" + ae.getResourceName(); // CONTAINER CREATE 1 OneM2MResponse container1Response = contCreate.createWithAnyAttribute(aeResourceID, aeId, TestingParams.getSecurityParams(TestingParams.GENERAL_ADN_AE_ID)); assertEquals(M2MStatus.CREATED.getOnem2mStatusCode(), container1Response.getResponseStatusCode()); // CONTAINER CREATE 1 ENDS Container cont = (Container) container1Response.getPrimitiveContent().getAny(); container1ResourceId = cont.getResourceID(); container1StructuredResourceId = aeStructuredResourceID + "/" + cont.getResourceName(); // INITIAL STATE ENDS // TEST EVENT STARTS // CONTAINER UPDATE OneM2MResponse containerUpdateResponse = retResource.retrieveResource(container1ResourceId, aeId, TestingParams.getSecurityParams(TestingParams.GENERAL_ADN_AE_ID)); assertEquals(M2MStatus.OK.getOnem2mStatusCode(), containerUpdateResponse.getResponseStatusCode()); // CONTAINER UPDATE ENDS // TEST EVENT ENDS System.out.println(" AE-ID : " + aeId); System.out.println(" AE RESOURCE ID : " + aeResourceID); System.out.println(" AE STRUCTURED RESOURCE ID : " + aeStructuredResourceID); System.out.println(" CONTAINER 1 RESOURCE ID : " + container1ResourceId); System.out.println(" CONTAINER 1 STRUCTURED RESOURCE ID : " + container1StructuredResourceId); } @Test @Tag("TP_oneM2M_CSE_GEN_RET_001_SPR") void TP_oneM2M_CSE_GEN_RET_001_SPR() { aeStructuredResourceID = TestingParams.CSE_BASE_RESOURCE_NAME; // INITIAL STATE STARTS // AE-REGISTRATION OneM2MResponse aeMResponse = aeRegister.AERegisterWithEmptyFrom(TestingParams.CSE_ID + "/" + TestingParams.CSE_BASE_RESOURCE_ID, TestingParams.GENERAL_ADN_AE_ID, TestingParams.getSecurityParams(TestingParams.GENERAL_ADN_AE_ID)); AE ae = (AE) aeMResponse.getPrimitiveContent().getAny(); assertEquals(M2MStatus.CREATED.getOnem2mStatusCode(), aeMResponse.getResponseStatusCode()); // AE-REGISTRATION DONE aeId = ae.getAEID(); aeResourceID = ae.getResourceID(); aeStructuredResourceID = aeStructuredResourceID + "/" + ae.getResourceName(); // CONTAINER CREATE 1 OneM2MResponse container1Response = contCreate.createWithAnyAttribute(TestingParams.CSE_ID + "/" + aeResourceID, aeId, TestingParams.getSecurityParams(TestingParams.GENERAL_ADN_AE_ID)); assertEquals(M2MStatus.CREATED.getOnem2mStatusCode(), container1Response.getResponseStatusCode()); // CONTAINER CREATE 1 ENDS Container cont = (Container) container1Response.getPrimitiveContent().getAny(); container1ResourceId = cont.getResourceID(); container1StructuredResourceId = aeStructuredResourceID + "/" + cont.getResourceName(); // INITIAL STATE ENDS // TEST EVENT STARTS // CONTAINER UPDATE OneM2MResponse containerUpdateResponse = retResource.retrieveResource(TestingParams.CSE_ID + "/" + container1ResourceId, aeId, TestingParams.getSecurityParams(TestingParams.GENERAL_ADN_AE_ID)); assertEquals(M2MStatus.OK.getOnem2mStatusCode(), containerUpdateResponse.getResponseStatusCode()); // CONTAINER UPDATE ENDS // TEST EVENT ENDS System.out.println(" AE-ID : " + aeId); System.out.println(" AE RESOURCE ID : " + aeResourceID); System.out.println(" AE STRUCTURED RESOURCE ID : " + aeStructuredResourceID); System.out.println(" CONTAINER 1 RESOURCE ID : " + container1ResourceId); System.out.println(" CONTAINER 1 STRUCTURED RESOURCE ID : " + container1StructuredResourceId); } @AfterAll static void afterAllSetup() { System.out.println("############################################################################################################"); } @AfterEach void afterEachSetup() { System.out.println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"); if (TestingParams.DELETE_ALL_RESOURCES) { UUID resourceID = UUID.randomUUID(); Object idObject = resourceID; OneM2MRequest oneM2MRequest = new OneM2MRequest(); oneM2MRequest.setRequestIdentifier(String.valueOf(idObject)); oneM2MRequest.setContentType(MediaType.JSON_RESOURCE); oneM2MRequest.setAcceptType(MediaType.JSON_RESOURCE); oneM2MRequest.setReleaseVersionIndicator(M2MReleaseVersion.RELEASE_2A.getReleaseVersion()); oneM2MRequest.setTo(TestingParams.GENERAL_ADN_AE_ID); oneM2MRequest.setFrom(TestingParams.GENERAL_ADN_AE_ID); oneM2MRequest.setOperation(M2MOperation.DELETE.getOperationId()); OriginatorActions originatorActions = new OriginatorActionsBean(); OneM2MResponse oneM2MResponse = originatorActions.execute(oneM2MRequest, TestingParams.getCSEPoA(), TestingParams.getSecurityParams(TestingParams.GENERAL_ADN_AE_ID)); } aeId = null; aeResourceID = null; aeStructuredResourceID = null; container1ResourceId = null; container1StructuredResourceId = null; } }
[ "jaswant.meena10@gmail.com" ]
jaswant.meena10@gmail.com
0a1204044aa4865174d19b09be5d7d983ed4602b
80403ec5838e300c53fcb96aeb84d409bdce1c0c
/server/modules/study/src/org/labkey/study/specimen/report/request/RequestLocationReportFactory.java
d708f4cf8e8c6b1c4cc28f9ba3be95558ec74db3
[]
no_license
scchess/LabKey
7e073656ea494026b0020ad7f9d9179f03d87b41
ce5f7a903c78c0d480002f738bccdbef97d6aeb9
refs/heads/master
2021-09-17T10:49:48.147439
2018-03-22T13:01:41
2018-03-22T13:01:41
126,447,224
0
1
null
null
null
null
UTF-8
Java
false
false
5,263
java
/* * Copyright (c) 2008-2014 LabKey Corporation * * 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.labkey.study.specimen.report.request; import org.labkey.api.data.SimpleFilter; import org.labkey.api.study.Location; import org.labkey.api.util.PageFlowUtil; import org.labkey.api.util.Pair; import org.labkey.study.SpecimenManager; import org.labkey.study.controllers.specimen.SpecimenController; import org.labkey.study.model.LocationImpl; import org.labkey.study.model.StudyManager; import org.labkey.study.model.VisitImpl; import org.labkey.study.specimen.report.SpecimenVisitReport; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * User: brittp * Created: Jan 24, 2008 1:38:40 PM */ public class RequestLocationReportFactory extends BaseRequestReportFactory { private Integer _locationId; public Integer getLocationId() { return _locationId; } public void setLocationId(Integer locationId) { _locationId = locationId; } public boolean allowsAvailabilityFilter() { return false; } public String getLabel() { Location location = _locationId != null ? StudyManager.getInstance().getLocation(getContainer(), _locationId) : null; return "Requested by Requesting Location" + (location != null ? ": " + location.getLabel() : ""); } @Override public String getReportType() { return "RequestedByRequestingLocation"; } protected List<? extends SpecimenVisitReport> createReports() { LocationImpl[] locations; if (getLocationId() != null) locations = new LocationImpl[] { StudyManager.getInstance().getLocation(getContainer(), getLocationId()) }; else locations = SpecimenManager.getInstance().getSitesWithRequests(getContainer()); if (locations == null) return Collections.emptyList(); List<SpecimenVisitReport> reports = new ArrayList<>(); List<VisitImpl> visits = SpecimenManager.getInstance().getVisitsWithSpecimens(getContainer(), getUser(), getCohort()); for (LocationImpl location : locations) { SimpleFilter filter = new SimpleFilter(); Object[] params; if (isCompletedRequestsOnly()) params = new Object[] { Boolean.TRUE, Boolean.TRUE, location.getRowId(), getContainer().getId()}; else params = new Object[] { Boolean.TRUE, location.getRowId(), getContainer().getId()}; filter.addWhereClause("globaluniqueid IN\n" + "(\n" + " SELECT specimenglobaluniqueid FROM study.samplerequestspecimen WHERE samplerequestid IN\n" + " (\n" + " SELECT r.rowid FROM study.SampleRequest r JOIN study.SampleRequestStatus rs ON\n" + " r.StatusId = rs.RowId\n" + " AND rs.SpecimensLocked = ?\n" + (isCompletedRequestsOnly() ? " AND rs.FinalState = ?\n" : "") + " WHERE destinationsiteid = ? AND r.container = ?\n" + " )\n" + ")", params); addBaseFilters(filter); reports.add(new RequestLocationReport(location.getLabel(), filter, this, visits, location.getRowId(), isCompletedRequestsOnly())); } return reports; } public Class<? extends SpecimenController.SpecimenVisitReportAction> getAction() { return SpecimenController.RequestSiteReportAction.class; } public List<Pair<String, String>> getAdditionalFormInputHtml() { StringBuilder builder = new StringBuilder(); builder.append("<select name=\"locationId\">\n" + "<option value=\"\">All Requesting Locations</option>\n"); for (LocationImpl location : SpecimenManager.getInstance().getSitesWithRequests(getContainer())) { builder.append("<option value=\"").append(location.getRowId()).append("\""); if (_locationId != null && location.getRowId() == _locationId) builder.append(" SELECTED"); builder.append(">"); builder.append(PageFlowUtil.filter(location.getLabel())); builder.append("</option>\n"); } builder.append("</select>"); List<Pair<String, String>> inputs = new ArrayList<>(super.getAdditionalFormInputHtml()); inputs.add(new Pair<>("Requesting location(s)", builder.toString())); return inputs; } }
[ "klum@labkey.com" ]
klum@labkey.com
1bbeabf7c58940e528e8b5d52e1a750e0836111b
f6b31f61d9f5999f0e19358d606f3b51fa4e7b98
/projeto-de-sistemas/src/main/java/br/unicesumar/aula20210317/composite/AppComposite.java
4ab2418e9b2c14fbedff883506ca564557fda483
[]
no_license
aczavads/adsis5s2021ProjetoDeSistemas
8855fbaf83fd5e1775f3bfe167d616a0248b76c9
64527d3983c95ed5c2e136d26f5fb4dae7e7f38e
refs/heads/main
2023-04-13T22:47:24.754943
2021-04-22T23:04:13
2021-04-22T23:04:13
337,882,483
0
5
null
null
null
null
UTF-8
Java
false
false
761
java
package br.unicesumar.aula20210317.composite; import br.unicesumar.aula20210311.strategyCarroComMotor.Carro; import br.unicesumar.aula20210311.strategyCarroComMotor.Fiasa1000cc; public class AppComposite { public static void main(String[] args) { Carro meuCarro = new Carro(); MotorComposite motorComposite = new MotorComposite(); motorComposite.addMotor(new Fiasa1000cc()); motorComposite.addMotor(new Fiasa1000cc()); motorComposite.addMotor(new Fiasa1000cc()); motorComposite.addMotor(motorComposite); //meuCarro.setMotor(new Fiasa1000cc()); meuCarro.setMotor(motorComposite); meuCarro.acelerar(100, 20); System.out.println(meuCarro.getVelocidadeAtual()); } }
[ "aczavads@gmail.com" ]
aczavads@gmail.com
c2d940f5877cd19f2a23ecf6f3044f7404aa13b7
d1696d362bdbb05fa4ea236f50e1b6fe66cf2922
/src/quiz01/Quiz21.java
9542ef4812ae2762492872135995e6f23f536587
[]
no_license
HaejinYoon/Quiz
532c2d414a3f0e0cf617b9af81e712efff858970
9d4fbc1e14dbee0e35be882fe4a57d8d1fb17ad9
refs/heads/master
2023-07-28T22:29:03.587614
2021-09-02T00:41:35
2021-09-02T00:41:35
401,640,548
0
0
null
null
null
null
UTF-8
Java
false
false
659
java
package quiz01; import java.util.Arrays; public class Quiz21 { public static void main(String[] args) { //버블정렬 int[] arr = { 5, 23, 1, 43, 100, 200, 40}; //5, 1, 23, 43, 100, 40, 200 //1, 5, 23, 43, 40, 100, 200 //1, 5, 23, 40, 43, 100, 200 int temp; for (int i = arr.length-1; i > 0; i--) { for (int j = 0; j < i; j++) { if(arr[j] > arr[j+1]) { temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; } } System.out.println("중간과정 : " + Arrays.toString(arr)); } System.out.println("최종결과 : " + Arrays.toString(arr)); } }
[ "hjyoomp@gmail.com" ]
hjyoomp@gmail.com
410a3436092155f962fee224a79632cf1a8751e7
eab22f819437d108d88b6d527d0121ac94d0c93b
/app/src/main/java/ranggacikal/com/myapplication/SharedPreference/SharedPreferencedConfig.java
f5da826fa8e274eb85446726c40e5ae044333797
[]
no_license
ranggacikal/PointOfSaleJCodeCloth
7ad5e273beca584a97d77330096a4d3f230d4804
1b3817d87122e63c5c662373253562bfe1cf3a3d
refs/heads/master
2023-01-23T15:05:57.647745
2020-11-24T11:27:47
2020-11-24T11:27:47
315,610,173
0
0
null
null
null
null
UTF-8
Java
false
false
2,096
java
package ranggacikal.com.myapplication.SharedPreference; import android.content.Context; import android.content.SharedPreferences; public class SharedPreferencedConfig { public static final String PREFERENCE_ESTORE_APP = "prefPosJcodeApp"; public static final String PREFERENCE_ID_USER = "prefIdUser"; public static final String PREFERENCE_NAMA_LENGKAP = "prefNamaLengkap"; public static final String PREFERENCE_EMAIL = "prefEMail"; public static final String PREFERENCE_IMAGE = "prefImage"; public static final String PREFERENCE_LEVEL_USER = "prefLevelUser"; public static final String PREFERENCE_IS_LOGIN = "prefIsLogin"; SharedPreferences preferences; SharedPreferences.Editor preferencesEditor; public SharedPreferencedConfig(Context context) { preferences = context.getSharedPreferences(PREFERENCE_ESTORE_APP, Context.MODE_PRIVATE); preferencesEditor = preferences.edit(); } public void savePrefString(String keyPref, String value){ preferencesEditor.putString(keyPref, value); preferencesEditor.commit(); } public void savePrefInt(String keyPref, int value){ preferencesEditor.putInt(keyPref, value); preferencesEditor.commit(); } public void savePrefBoolean(String keyPref, boolean value){ preferencesEditor.putBoolean(keyPref, value); preferencesEditor.commit(); } public String getPreferenceIdUser(){ return preferences.getString(PREFERENCE_ID_USER, ""); } public String getPreferenceEmail(){ return preferences.getString(PREFERENCE_EMAIL, ""); } public String getPreferenceLevelUser(){ return preferences.getString(PREFERENCE_LEVEL_USER, ""); } public String getPreferenceNamaLengkap() { return preferences.getString(PREFERENCE_NAMA_LENGKAP, ""); } public String getPreferenceImage(){ return preferences.getString(PREFERENCE_IMAGE, ""); } public Boolean getPreferenceIsLogin(){ return preferences.getBoolean(PREFERENCE_IS_LOGIN, false); } }
[ "ranggacikal2@gmail.com" ]
ranggacikal2@gmail.com
86250a01c77e8a078f2de9cd652477f21ca806ba
9a4560a273ced89ec39c217ad060407a43369d88
/coffee-shop/src/test/java/com/sebastian_daschner/coffee_shop/orders/TestData.java
41f1de6fa818849d3bd292aefdc3c0ed525fa01d
[ "Apache-2.0" ]
permissive
sdaschner/coffee-testing
e523d58f0c868dacbebf3d79babd586a9136b767
9d80ecb4d6e1b1d071a805ecc9e2b04c64062a46
refs/heads/master
2023-05-11T15:48:11.540730
2023-04-29T16:39:58
2023-04-29T16:42:38
128,915,122
54
54
Apache-2.0
2022-01-18T22:02:38
2018-04-10T10:26:00
Java
UTF-8
Java
false
false
1,267
java
package com.sebastian_daschner.coffee_shop.orders; import com.sebastian_daschner.coffee_shop.orders.entity.CoffeeType; import com.sebastian_daschner.coffee_shop.orders.entity.Order; import com.sebastian_daschner.coffee_shop.orders.entity.Origin; import java.util.EnumSet; import java.util.List; import java.util.Set; import java.util.UUID; import java.util.stream.Collectors; import java.util.stream.Stream; public final class TestData { private TestData() { } public static List<Order> unfinishedOrders() { Origin colombia = new Origin("Colombia"); return List.of( new Order(UUID.randomUUID(), CoffeeType.ESPRESSO, colombia), new Order(UUID.randomUUID(), CoffeeType.LATTE, colombia), new Order(UUID.randomUUID(), CoffeeType.POUR_OVER, colombia) ); } public static Set<CoffeeType> validCoffeeTypes() { return EnumSet.allOf(CoffeeType.class); } public static List<Origin> validOrigins() { Set<CoffeeType> coffeeTypes = validCoffeeTypes(); return Stream.of("Colombia", "Ethiopia") .map(Origin::new) .peek(o -> o.getCoffeeTypes().addAll(coffeeTypes)) .collect(Collectors.toList()); } }
[ "git@sebastian-daschner.de" ]
git@sebastian-daschner.de
8e879c00edd3abcc8c63f32a25bb7373fe67de4d
ccf82688f082e26cba5fc397c76c77cc007ab2e8
/Mage.Sets/src/mage/cards/u/UginsMastery.java
c0990abe4642fc50fdaea80d4820baa120deac46
[ "MIT" ]
permissive
magefree/mage
3261a89320f586d698dd03ca759a7562829f247f
5dba61244c738f4a184af0d256046312ce21d911
refs/heads/master
2023-09-03T15:55:36.650410
2023-09-03T03:53:12
2023-09-03T03:53:12
4,158,448
1,803
1,133
MIT
2023-09-14T20:18:55
2012-04-27T13:18:34
Java
UTF-8
Java
false
false
4,155
java
package mage.cards.u; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.keyword.ManifestEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.FilterSpell; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreatureSpell; import mage.filter.predicate.card.FaceDownPredicate; import mage.filter.predicate.mageobject.ColorlessPredicate; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetPermanent; import java.util.Objects; import java.util.UUID; /** * @author TheElk801 */ public final class UginsMastery extends CardImpl { private static final FilterSpell filter = new FilterCreatureSpell("a colorless creature spell"); static { filter.add(ColorlessPredicate.instance); } public UginsMastery(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}"); // Whenever you cast a colorless creature spell, manifest the top card of your library. this.addAbility(new SpellCastControllerTriggeredAbility(new ManifestEffect(1), filter, false)); // Whenever you attack with creatures with total power 6 or greater, you may turn a face-down creature you control face up. this.addAbility(new UginsMasteryTriggeredAbility()); } private UginsMastery(final UginsMastery card) { super(card); } @Override public UginsMastery copy() { return new UginsMastery(this); } } class UginsMasteryTriggeredAbility extends TriggeredAbilityImpl { UginsMasteryTriggeredAbility() { super(Zone.BATTLEFIELD, new UginsMasteryEffect()); this.setTriggerPhrase("Whenever you attack with creatures with total power 6 or greater, "); } private UginsMasteryTriggeredAbility(final UginsMasteryTriggeredAbility ability) { super(ability); } @Override public UginsMasteryTriggeredAbility copy() { return new UginsMasteryTriggeredAbility(this); } @Override public boolean checkEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS; } @Override public boolean checkTrigger(GameEvent event, Game game) { return isControlledBy(event.getPlayerId()) && game .getCombat() .getAttackers() .stream() .map(game::getPermanent) .filter(Objects::nonNull) .map(MageObject::getPower) .mapToInt(MageInt::getValue) .sum() >= 6; } } class UginsMasteryEffect extends OneShotEffect { private static final FilterPermanent filter = new FilterControlledCreaturePermanent("a face-down creature you control"); static { filter.add(FaceDownPredicate.instance); } UginsMasteryEffect() { super(Outcome.Benefit); staticText = "you may turn a face-down creature you control face up"; } private UginsMasteryEffect(final UginsMasteryEffect effect) { super(effect); } @Override public UginsMasteryEffect copy() { return new UginsMasteryEffect(this); } @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player == null) { return false; } TargetPermanent target = new TargetPermanent(0, 1, filter, true); player.choose(outcome, target, source, game); Permanent permanent = game.getPermanent(target.getFirstTarget()); return permanent != null && permanent.turnFaceUp(source, game, source.getControllerId()); } }
[ "theelk801@gmail.com" ]
theelk801@gmail.com
e31cccc3fbafeb94f244a485dbde4db1207697e1
70f7a06017ece67137586e1567726579206d71c7
/alimama/src/main/java/com/xiaomi/clientreport/manager/b.java
fe478f68f62e5da8b45b6b0d2e4252e9e6ce7e74
[]
no_license
liepeiming/xposed_chatbot
5a3842bd07250bafaffa9f468562021cfc38ca25
0be08fc3e1a95028f8c074f02ca9714dc3c4dc31
refs/heads/master
2022-12-20T16:48:21.747036
2020-10-14T02:37:49
2020-10-14T02:37:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
273
java
package com.xiaomi.clientreport.manager; import com.xiaomi.push.bd; class b implements Runnable { final /* synthetic */ a a; b(a aVar) { this.a = aVar; } public void run() { a.a(this.a).execute(new bd(a.a(this.a), a.a(this.a))); } }
[ "zhangquan@snqu.com" ]
zhangquan@snqu.com
7e1b025c4be63ecdb5dc95d4fe4f1c583ca979e6
3f3620a5542b0c51b69a26bb36934af256e9392e
/src/main/java/com/LeetCode/code/q207/CourseSchedule/Solution.java
c82af49dba9fb41b7ca8ee8a828bd53587d5fb62
[]
no_license
dengxiny/LeetCode
f4b2122ba61076fa664dbb4a04de824a7be21bfd
66a8e937e57f9fa817e9bf5c5b0a2187851b0ab0
refs/heads/master
2022-06-24T01:40:27.339596
2019-09-24T07:19:41
2019-09-24T07:19:41
210,536,818
0
0
null
2020-10-13T16:15:41
2019-09-24T07:15:33
Java
UTF-8
Java
false
false
2,011
java
package com.LeetCode.code.q207.CourseSchedule; /** * @QuestionId : 207 * @difficulty : Medium * @Title : Course Schedule * @TranslatedTitle:课程表 * @url : https://leetcode-cn.com/problems/course-schedule/ * @TranslatedContent:现在你总共有 n 门课需要选,记为 0 到 n-1。 在选修某些课程之前需要一些先修课程。 例如,想要学习课程 0 ,你需要先完成课程 1 ,我们用一个匹配来表示他们: [0,1] 给定课程总量以及它们的先决条件,判断是否可能完成所有课程的学习? 示例 1: 输入: 2, [[1,0]] 输出: true 解释: 总共有 2 门课程。学习课程 1 之前,你需要完成课程 0。所以这是可能的。 示例 2: 输入: 2, [[1,0],[0,1]] 输出: false 解释: 总共有 2 门课程。学习课程 1 之前,你需要先完成​课程 0;并且学习课程 0 之前,你还应先完成课程 1。这是不可能的。 说明: 输入的先决条件是由边缘列表表示的图形,而不是邻接矩阵。详情请参见<a href="http://blog.csdn.net/woaidapaopao/article/details/51732947" target="_blank">图的表示法。 你可以假定输入的先决条件中没有重复的边。 提示: 这个问题相当于查找一个循环是否存在于有向图中。如果存在循环,则不存在拓扑排序,因此不可能选取所有课程进行学习。 <a href="https://www.coursera.org/specializations/algorithms" target="_blank">通过 DFS 进行拓扑排序 - 一个关于Coursera的精彩视频教程(21分钟),介绍拓扑排序的基本概念。 拓扑排序也可以通过 <a href="https://baike.baidu.com/item/%E5%AE%BD%E5%BA%A6%E4%BC%98%E5%85%88%E6%90%9C%E7%B4%A2/5224802?fr=aladdin&amp;fromid=2148012&amp;fromtitle=%E5%B9%BF%E5%BA%A6%E4%BC%98%E5%85%88%E6%90%9C%E7%B4%A2" target="_blank">BFS 完成。 */ class Solution { public boolean canFinish(int numCourses, int[][] prerequisites) { } }
[ "dengxy@YFB-DENGXY.sumpay.local" ]
dengxy@YFB-DENGXY.sumpay.local
c00286d5f3bf78c6cec96c6637f7b81e57fd6309
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Junit/Junit620.java
fb4cdddd69a27a24c72756e6aa113b1dad19c617
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
628
java
private static List<Method> getDefaultMethods(Class<?> clazz) { // @formatter:off // Visible default methods are interface default methods that have not // been overridden. List<Method> visibleDefaultMethods = Arrays.stream(clazz.getMethods()) .filter(Method::isDefault) .collect(toCollection(ArrayList::new)); if (visibleDefaultMethods.isEmpty()) { return visibleDefaultMethods; } return Arrays.stream(clazz.getInterfaces()) .map(ReflectionUtils::getMethods) .flatMap(List::stream) .filter(visibleDefaultMethods::contains) .collect(toCollection(ArrayList::new)); // @formatter:on }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
dd35a3613fdce5331167055bcb65faab8383299e
f7770e21f34ef093eb78dae21fd9bde99b6e9011
/src/main/java/com/hengyuan/hicash/domain/query/user/CmbcIdentifySendCodeQuery.java
70a5c147516fafbcc4cb7656355ba6fde24e534c
[]
no_license
webvul/HicashAppService
9ac8e50c00203df0f4666cd81c108a7f14a3e6e0
abf27908f537979ef26dfac91406c1869867ec50
refs/heads/master
2020-03-22T19:58:41.549565
2017-12-26T08:30:04
2017-12-26T08:30:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,534
java
package com.hengyuan.hicash.domain.query.user; import java.sql.ResultSet; import java.sql.SQLException; import org.apache.log4j.Logger; import com.hengyuan.hicash.dao.AbstractDAO; import com.hengyuan.hicash.dao.collection.ConnManager; import com.hengyuan.hicash.entity.user.CmbcIdentifySendCodeEntity; import com.hengyuan.hicash.parameters.request.user.CmbcIdentifySendCodeReq; import com.hengyuan.hicash.utils.RecordUtils; import com.hengyuan.hicash.utils.StringUtils; /** * 民生银行代扣业务身份认证-用于发送动态验证码到用户手机。CP0032 * * @author leaf.Ren * @create date 2015-12-01 */ public class CmbcIdentifySendCodeQuery extends AbstractDAO<CmbcIdentifySendCodeEntity> { private static Logger logger = Logger.getLogger(CmbcIdentifySendCodeQuery.class); private static final String QUERY_SQL = "SELECT * FROM cmbc_identify_val WHERE 1 = 1 "; @Override public CmbcIdentifySendCodeEntity mapping(ResultSet rs) throws SQLException { CmbcIdentifySendCodeEntity entity = null; if(rs != null ){ entity = new CmbcIdentifySendCodeEntity(); entity.setUserName(StringUtils.valueOf(rs.getObject("USERNAME"))); entity.setCertNo(StringUtils.valueOf(rs.getObject("IDENTIfY_NO"))); entity.setAccountNo(StringUtils.valueOf(rs.getObject("account_no"))); entity.setAccountName(StringUtils.valueOf(rs.getObject("account_name"))); entity.setCreateTime(StringUtils.valueOf(rs.getObject("CREATE_time"))); entity.setUpdateTime(StringUtils.valueOf(rs.getObject("update_time"))); entity.setBussflowNo(StringUtils.valueOf(rs.getObject("BUSS_FLOWNO"))); entity.setValStatus(StringUtils.valueOf(rs.getObject("val_STATUS"))); entity.setMobileNo(StringUtils.valueOf(rs.getObject("mobile_no"))); entity.setPhoneToken(StringUtils.valueOf(rs.getObject("phone_Token"))); entity.setPhoneVerCode(StringUtils.valueOf(rs.getObject("phone_VerCode"))); entity.setBussflowNoConfirm(StringUtils.valueOf(rs.getObject("buss_flowNo_Confirm"))); entity.setBussflowNoQuery(StringUtils.valueOf(rs.getObject("buss_flowNo_Query"))); } return entity; } /** * 获取用户四要素验证通过记录 * @return */ public CmbcIdentifySendCodeEntity querySendCodeSucc(CmbcIdentifySendCodeReq sendCodeReq){ StringBuffer querySql = new StringBuffer(QUERY_SQL); querySql.append(" AND account_name = '"+ sendCodeReq.getAccountName() +"' AND account_no = '"+ sendCodeReq.getAccountNo() +"' "); querySql.append(" AND IDENTIFY_NO = '"+ sendCodeReq.getCertNo() +"' AND mobile_no = '"+ sendCodeReq.getMobileNo() +"' AND username = '"+ sendCodeReq.getUserName() +"' "); // 验证状态为等待中,已经验证成功, querySql.append(" AND val_STATUS ='VALSUCC' "); RecordUtils.writeAction(logger, null, querySql.toString()); return ConnManager.singleQuery(querySql.toString(), this); } /** * 获取用户四要素验证通过记录,这一步现在暂时去掉,因为这个用户有可能用不同的 * @return */ public CmbcIdentifySendCodeEntity querySendCodeWait(CmbcIdentifySendCodeReq sendCodeReq){ StringBuffer querySql = new StringBuffer(QUERY_SQL); querySql.append(" AND account_name = '"+ sendCodeReq.getAccountName() +"' AND account_no = '"+ sendCodeReq.getAccountNo() +"' "); querySql.append(" AND IDENTIfY_NO = '"+ sendCodeReq.getCertNo() +"' AND mobile_no = '"+ sendCodeReq.getMobileNo() +"' AND username = '"+ sendCodeReq.getUserName() +"' "); // 验证状态为等待中,已经验证成功, querySql.append(" AND val_STATUS ='VALWAIT' "); RecordUtils.writeAction(logger, null, querySql.toString()); return ConnManager.singleQuery(querySql.toString(), this); } /** * 获取用户四要素验证通过记录,这一步现在暂时去掉,因为这个用户有可能用不同的 * @return */ public CmbcIdentifySendCodeEntity querySendCodeLimit(CmbcIdentifySendCodeReq sendCodeReq){ StringBuffer querySql = new StringBuffer(QUERY_SQL); querySql.append(" AND account_name = '"+ sendCodeReq.getAccountName() +"' AND account_no = '"+ sendCodeReq.getAccountNo() +"' "); querySql.append(" AND IDENTIfY_NO = '"+ sendCodeReq.getCertNo() +"' AND mobile_no = '"+ sendCodeReq.getMobileNo() +"' AND username = '"+ sendCodeReq.getUserName() +"' "); // 验证状态为等待中,已经验证成功, querySql.append(" AND val_STATUS ='VALSUCC' "); RecordUtils.writeAction(logger, null, querySql.toString()); return ConnManager.singleQuery(querySql.toString(), this); } }
[ "hanlu@dpandora.cn" ]
hanlu@dpandora.cn
57bbd413fff7acf407c42954513a8c646fa856de
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.1.jar/classes.jar/mbu.java
86afeaeb14a2c65adffb703ac7254b3f60fb57da
[]
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
1,660
java
import android.os.Parcel; import android.os.Parcelable.Creator; import cooperation.qzone.model.FaceData; public final class mbu implements Parcelable.Creator { public FaceData a(Parcel paramParcel) { FaceData localFaceData = new FaceData(); localFaceData.jdField_a_of_type_JavaLangString = paramParcel.readString(); localFaceData.jdField_b_of_type_JavaLangString = paramParcel.readString(); localFaceData.jdField_a_of_type_Long = paramParcel.readLong(); localFaceData.jdField_b_of_type_Long = paramParcel.readLong(); localFaceData.jdField_c_of_type_Long = paramParcel.readLong(); localFaceData.jdField_d_of_type_Long = paramParcel.readLong(); localFaceData.jdField_e_of_type_Long = paramParcel.readLong(); localFaceData.jdField_a_of_type_Int = paramParcel.readInt(); localFaceData.jdField_f_of_type_Long = paramParcel.readLong(); localFaceData.jdField_c_of_type_JavaLangString = paramParcel.readString(); localFaceData.jdField_d_of_type_JavaLangString = paramParcel.readString(); localFaceData.g = paramParcel.readLong(); localFaceData.jdField_e_of_type_JavaLangString = paramParcel.readString(); localFaceData.h = paramParcel.readLong(); localFaceData.jdField_f_of_type_JavaLangString = paramParcel.readString(); localFaceData.jdField_a_of_type_AndroidGraphicsBitmap = null; return localFaceData; } public FaceData[] a(int paramInt) { return null; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.1.jar\classes.jar * Qualified Name: mbu * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
7c5b9b90007d286a890bd9b25121222b636338bc
2eaf2f5defae3edf125e193f26c7249e9f410e22
/chat_v2/src/chat/_Callback_ChatModerator_getMessage.java
6aa1ef6e0b4d95850a144f214df2871730b19a5d
[]
no_license
urrutiaitor/ICE
f1e0257619c5e277ffb4498c39e2d3015ccfa776
c92221be5fcce1237b8a6045a84fe06d38dbaa7c
refs/heads/master
2021-06-22T00:21:41.999364
2017-04-12T10:20:08
2017-04-12T10:20:08
52,436,986
0
0
null
null
null
null
UTF-8
Java
false
false
641
java
// ********************************************************************** // // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** // // Ice version 3.6.1 // // <auto-generated> // // Generated from file `Chat.ice' // // Warning: do not edit this file. // // </auto-generated> // package chat; public interface _Callback_ChatModerator_getMessage extends Ice.TwowayCallback { public void response(boolean __ret, String msg); }
[ "aitorurrutiazubikarai@gmail.com" ]
aitorurrutiazubikarai@gmail.com
b5a81e3573fd1f55bc6e48120680d622a9ffbaa2
fec4a09f54f4a1e60e565ff833523efc4cc6765a
/Dependencies/work/decompile-00fabbe5/net/minecraft/world/entity/animal/EntityPerchable.java
1b9b8c4dbe69c4b5646482b844d38b083e04ade4
[]
no_license
DefiantBurger/SkyblockItems
012d2082ae3ea43b104ac4f5bf9eeb509889ec47
b849b99bd4dc52ae2f7144ddee9cbe2fd1e6bf03
refs/heads/master
2023-06-23T17:08:45.610270
2021-07-27T03:27:28
2021-07-27T03:27:28
389,780,883
0
0
null
null
null
null
UTF-8
Java
false
false
1,120
java
package net.minecraft.world.entity.animal; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.level.EntityPlayer; import net.minecraft.world.entity.EntityTameableAnimal; import net.minecraft.world.entity.EntityTypes; import net.minecraft.world.level.World; public abstract class EntityPerchable extends EntityTameableAnimal { private static final int RIDE_COOLDOWN = 100; private int rideCooldownCounter; protected EntityPerchable(EntityTypes<? extends EntityPerchable> entitytypes, World world) { super(entitytypes, world); } public boolean b(EntityPlayer entityplayer) { NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.setString("id", this.getSaveID()); this.save(nbttagcompound); if (entityplayer.h(nbttagcompound)) { this.die(); return true; } else { return false; } } @Override public void tick() { ++this.rideCooldownCounter; super.tick(); } public boolean fH() { return this.rideCooldownCounter > 100; } }
[ "joseph.cicalese@gmail.com" ]
joseph.cicalese@gmail.com
145cb0edcec57777c593fa0227ce56eca227fa5b
cc31915a4827ffdaf96f8974912c5dfe6167548c
/seed-simcoder/src/main/java/com/jadyer/seed/simcoder/helper/DBHelper.java
34a621703923a2dfdc5ff41857a7766381114d78
[ "Apache-2.0" ]
permissive
pupsnow/seed
136d83c1c835f9f61503b21aaaa56350b5066b4f
45987029fb5140e217d35078e4b1b16c5369f759
refs/heads/master
2020-03-23T23:22:33.200631
2018-07-23T11:42:13
2018-07-23T11:42:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,073
java
package com.jadyer.seed.simcoder.helper; import com.jadyer.seed.comm.util.DBUtil; import com.jadyer.seed.simcoder.SimcoderRun; import com.jadyer.seed.simcoder.model.Column; import com.jadyer.seed.simcoder.model.Table; import org.apache.commons.lang3.StringUtils; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.List; /** * Created by 玄玉<http://jadyer.cn/> on 2017/9/7 17:18. */ class DBHelper { private static final String DB_URL = "jdbc:mysql://" + SimcoderRun.DB_ADDRESS + "/" + SimcoderRun.DB_NAME + "?useUnicode=true&characterEncoding=UTF8&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai"; private static final String DB_USERNAME = SimcoderRun.DB_USERNAME; private static final String DB_PASSWORD = SimcoderRun.DB_PASSWORD; private static final String SQL_GET_TABLE = "SELECT TABLE_NAME, TABLE_COMMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA=?;"; private static final String SQL_GET_COLUMN = "SELECT COLUMN_NAME as name, COLUMN_COMMENT as comment, DATA_TYPE as type, ifnull(CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION) as length, if(IS_NULLABLE='yes', true, false) as nullable, if(COLUMN_KEY='pri', true, false) as isPrikey, if(EXTRA='auto_increment', true, false) as isAutoIncrement FROM information_schema.COLUMNS WHERE TABLE_NAME=? ORDER BY ORDINAL_POSITION;"; /** * 获取数据库中的所有表信息 */ static List<Table> getTableList(String databaseName){ List<Table> tableList = new ArrayList<>(); Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try{ conn = DBUtil.INSTANCE.getConnection(DB_URL, DB_USERNAME, DB_PASSWORD); pstmt = conn.prepareStatement(SQL_GET_TABLE); pstmt.setString(1, databaseName); rs = pstmt.executeQuery(); while(rs.next()){ Table table = new Table(); table.setName(rs.getString("table_name")); table.setComment(rs.getString("table_comment")); tableList.add(table); } }catch(Exception e){ throw new RuntimeException(e); }finally{ DBUtil.INSTANCE.closeAll(rs, pstmt, conn); } return tableList; } /** * 获取某张表的所有列信息 */ static List<Column> getColumnList(String tableName){ List<Column> columnList = new ArrayList<>(); Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try{ conn = DBUtil.INSTANCE.getConnection(DB_URL, DB_USERNAME, DB_PASSWORD); pstmt = conn.prepareStatement(SQL_GET_COLUMN); pstmt.setString(1, tableName); rs = pstmt.executeQuery(); while(rs.next()){ Column column = new Column(); column.setName(rs.getString("name")); column.setComment(rs.getString("comment")); column.setNullable(rs.getBoolean("nullable")); column.setPrikey(rs.getBoolean("isPrikey")); column.setAutoIncrement(rs.getBoolean("isAutoIncrement")); column.setType(rs.getString("type")); String length = rs.getString("length"); column.setLength(StringUtils.isBlank(length) ? 0 : StringUtils.equals("longtext", column.getType()) ? 999999999 : Integer.parseInt(length)); columnList.add(column); } }catch(Exception e){ throw new RuntimeException(e); }finally{ DBUtil.INSTANCE.closeAll(rs, pstmt, conn); } return columnList; } /** * 通过表名构建类名 * ---------------------------------------------------------------------------------------- * 表明若以“t_”打头则会忽略,比如:t_mpp_info,那么构建得到类名为:MppInfo.java * ---------------------------------------------------------------------------------------- */ static String buildClassnameFromTablename(String tablename){ if(StringUtils.isBlank(tablename)){ throw new RuntimeException("表名不能为空"); } if(tablename.startsWith("t_")){ tablename = tablename.substring(2); } StringBuilder sb = new StringBuilder(); for(String obj : tablename.split("_")){ sb.append(StringUtils.capitalize(obj)); } return sb.toString(); } /** * 通过列名构建属性名 */ static String buildFieldnameFromColumnname(String columnname){ if(StringUtils.isBlank(columnname)){ throw new RuntimeException("列名不能为空"); } String[] columnnames = columnname.split("_"); StringBuilder sb = new StringBuilder(); for(int i=0; i<columnnames.length; i++){ if(i == 0){ sb.append(columnnames[0]); }else{ sb.append(StringUtils.capitalize(columnnames[i])); } } return sb.toString(); } /** * 通过数据库列类型构建Java中的属性类型 * <ul> * <li>MySQL中的datetime和timestamp区别如下</li> * <li>timestamp使用4字节的存储空间,datetime则使用8字节</li> * <li>timestamp的范围为1970--2037年,datetime则为0001--9999年</li> * <li>timestamp不允许空(空的时候它会拿当前时间填充),datetime允许空</li> * <li>timestamp的值受时区的影响,datetime则不受。比如20170908174242,若修改时区为东9区(mysql> set time_zone='+9:00';),则timestamp会增加一个小时变成20170908184242,而datetime则不变</li>、 * <li>https://stackoverflow.com/questions/409286/should-i-use-field-datetime-or-timestamp:Timestamps in MySQL generally used to track changes to records, and are often updated every time the record is changed. If you want to store a specific value you should use a datetime field.</li> * </ul> */ static String buildJavatypeFromDbtype(String dbtype){ if(StringUtils.isBlank(dbtype)){ throw new RuntimeException("数据库列类型不能为空"); } if(StringUtils.equalsAnyIgnoreCase(dbtype, "tinyint", "smallint", "mediumint")){ return "Integer"; } if(StringUtils.equalsAnyIgnoreCase(dbtype, "int", "bigint")){ return "Long"; } if(StringUtils.equalsAnyIgnoreCase(dbtype, "char", "varchar", "tinytext", "text", "mediumtext")){ return "String"; } if(StringUtils.equalsAnyIgnoreCase(dbtype,"datetime", "timestamp")){ return "Date"; } if(StringUtils.equalsIgnoreCase(dbtype, "decimal")){ return "BigDecimal"; } throw new RuntimeException("不支持的数据库列类型[" + dbtype + "]"); } }
[ "jadyer@yeah.net" ]
jadyer@yeah.net
41a0aab45fe2d4f811c3fbda0a252882bd8ee1d9
148100c6a5ac58980e43aeb0ef41b00d76dfb5b3
/sources/com/google/android/gms/auth/api/signin/internal/GoogleSignInOptionsExtensionParcelable.java
63c528d36a00b1e6562596f245bf53025d50374b
[]
no_license
niravrathod/car_details
f979de0b857f93efe079cd8d7567f2134755802d
398897c050436f13b7160050f375ec1f4e05cdf8
refs/heads/master
2020-04-13T16:36:29.854057
2018-12-27T19:03:46
2018-12-27T19:03:46
163,325,703
0
0
null
null
null
null
UTF-8
Java
false
false
1,970
java
package com.google.android.gms.auth.api.signin.internal; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.annotation.KeepForSdk; import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Class; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Constructor; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Field; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Param; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.VersionField; @Class(creator = "GoogleSignInOptionsExtensionCreator") public class GoogleSignInOptionsExtensionParcelable extends AbstractSafeParcelable { public static final Creator<GoogleSignInOptionsExtensionParcelable> CREATOR = new zaa(); @VersionField(id = 1) /* renamed from: a */ private final int f19623a; @Field(getter = "getType", id = 2) /* renamed from: b */ private int f19624b; @Field(getter = "getBundle", id = 3) /* renamed from: c */ private Bundle f19625c; @Constructor GoogleSignInOptionsExtensionParcelable(@Param(id = 1) int i, @Param(id = 2) int i2, @Param(id = 3) Bundle bundle) { this.f19623a = i; this.f19624b = i2; this.f19625c = bundle; } @KeepForSdk /* renamed from: a */ public int m25991a() { return this.f19624b; } public void writeToParcel(Parcel parcel, int i) { i = SafeParcelWriter.beginObjectHeader(parcel); SafeParcelWriter.writeInt(parcel, 1, this.f19623a); SafeParcelWriter.writeInt(parcel, 2, m25991a()); SafeParcelWriter.writeBundle(parcel, 3, this.f19625c, false); SafeParcelWriter.finishObjectHeader(parcel, i); } }
[ "niravrathod473@gmail.com" ]
niravrathod473@gmail.com
a4d90a5a9904efbce55f93ed7e92b6d75da0ae5c
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/stanfordnlp--CoreNLP/18bef5178a38404164957974eb6ee841eb10ca6b/before/CorefDocumentProcessor.java
2c197f37bdfeab11106f3fdfe640a09d6e645639
[]
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
1,803
java
package edu.stanford.nlp.coref; import java.util.Properties; import edu.stanford.nlp.coref.data.DocumentMaker; import edu.stanford.nlp.coref.data.Dictionaries; import edu.stanford.nlp.coref.data.Document; import edu.stanford.nlp.pipeline.StanfordCoreNLP; import edu.stanford.nlp.util.logging.Redwood; /** * An interface for classes that iterate through coreference documents and process them one by one. * @author Kevin Clark */ public interface CorefDocumentProcessor { public void process(int id, Document document); public void finish() throws Exception; public default String getName() { return this.getClass().getName(); } public default void run(Properties props, Dictionaries dictionaries) throws Exception { run(new DocumentMaker(props, dictionaries)); } public default void runFromScratch(Properties props, Dictionaries dictionaries) throws Exception { // Some annotators produce slightly different outputs when running over the same input data // twice. Here we first clear annotator pool to avoid this. StanfordCoreNLP.clearAnnotatorPool(); run(new DocumentMaker(props, dictionaries)); } public default void run(DocumentMaker docMaker) throws Exception { Redwood.hideChannelsEverywhere("debug-mention", "debug-preprocessor", "debug-docreader", "debug-md"); int docId = 0; Document document = docMaker.nextDoc(); long time = System.currentTimeMillis(); while (document != null) { document.extractGoldCorefClusters(); process(docId, document); Redwood.log(getName(), "Processed document " + docId + " in " + (System.currentTimeMillis() - time) / 1000.0 + "s"); time = System.currentTimeMillis(); docId++; document = docMaker.nextDoc(); } finish(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
58baa424d9eb585bda5065a1ab3120db865b03bc
61727d340aa2d8e8366a10e7826813b377c203b5
/src/main/java/org/csid/repository/AssignmentManagerRepository.java
86c6a184029e78ade39a186c30a5cba8c859f76c
[]
no_license
BulkSecurityGeneratorProject/DematNotes
09986a479124836e3eec9948c4c4e7a63bb55e7f
c92c542bc32abeb0baf8397b68c50532123c17ba
refs/heads/master
2022-12-16T17:51:26.007088
2018-07-03T21:03:43
2018-07-03T21:03:43
296,653,829
0
0
null
2020-09-18T15:03:43
2020-09-18T15:03:42
null
UTF-8
Java
false
false
1,279
java
package org.csid.repository; import org.csid.domain.AssignmentManager; import org.csid.domain.AssignmentModule; import org.springframework.stereotype.Repository; import org.springframework.data.jpa.repository.*; import org.springframework.data.repository.query.Param; import java.time.LocalDate; import java.util.List; /** * Spring Data JPA repository for the AssignmentManager entity. */ @SuppressWarnings("unused") @Repository public interface AssignmentManagerRepository extends JpaRepository<AssignmentManager, Long> { @Query("select distinct assignment_manager from AssignmentManager assignment_manager left join fetch assignment_manager.managers") List<AssignmentManager> findAllWithEagerRelationships(); @Query("select assignment_manager from AssignmentManager assignment_manager left join fetch assignment_manager.managers where assignment_manager.id =:id") AssignmentManager findOneWithEagerRelationships(@Param("id") Long id); @Query("select assignment_manager from AssignmentManager assignment_manager left join fetch assignment_manager.managers where assignment_manager.schoolYear.startDate<=:date and assignment_manager.schoolYear.endDate>=:date") List<AssignmentManager> findAllByCurrentSchoolYear(@Param("date") LocalDate date); }
[ "christopher.lukombo@outlook.fr" ]
christopher.lukombo@outlook.fr
e1974b0a870e14e2d80fcaecfb510f4ee5634a1f
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-1.3.1/mule/core/src/main/java/org/mule/routing/outbound/OutboundPassThroughRouter.java
8ee61ffd709c49d0fdb8e729cd996145a9c88cb0
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
2,451
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the MuleSource MPL * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.routing.outbound; import org.mule.umo.UMOFilter; import org.mule.umo.UMOImmutableDescriptor; import org.mule.umo.UMOMessage; import org.mule.umo.UMOSession; import org.mule.umo.endpoint.UMOEndpoint; import org.mule.umo.routing.RoutingException; import java.util.List; /** * <code>InboundPassThroughRouter</code> allows outbound routing over a single * endpoint without any filtering. This class is used by Mule when a single outbound * router is set on a UMODescriptor. * * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a> * @version $Revision$ */ public class OutboundPassThroughRouter extends FilteringOutboundRouter { public OutboundPassThroughRouter() { super(); } public OutboundPassThroughRouter(UMOImmutableDescriptor descriptor) { super(); if (descriptor != null && descriptor.getOutboundEndpoint() != null) { addEndpoint(descriptor.getOutboundEndpoint()); } } public void addEndpoint(UMOEndpoint endpoint) { if (endpoint == null) { return; } if (endpoints.size() == 1) { throw new IllegalArgumentException("Only one endpoint can be set on the PassThrough router"); } super.addEndpoint(endpoint); } public void setEndpoints(List endpoints) { if (endpoints.size() > 1) { throw new IllegalArgumentException("Only one endpoint can be set on the PassThrough router"); } super.setEndpoints(endpoints); } public void setFilter(UMOFilter filter) { throw new UnsupportedOperationException( "The Pass Through cannot use filters, use the FilteringOutboundRouter instead"); } public UMOMessage route(UMOMessage message, UMOSession session, boolean synchronous) throws RoutingException { if (endpoints == null || endpoints.size() == 0) { return message; } return super.route(message, session, synchronous); } }
[ "lajos@bf997673-6b11-0410-b953-e057580c5b09" ]
lajos@bf997673-6b11-0410-b953-e057580c5b09
293586a222a07e61df512278e44badd2bb211473
59ca721ca1b2904fbdee2350cd002e1e5f17bd54
/aliyun-java-sdk-aegis/src/main/java/com/aliyuncs/aegis/transform/v20161111/DescribeSuspTrendStatisticsResponseUnmarshaller.java
a152006af23aba5b7fa9399610fd291589669c00
[ "Apache-2.0" ]
permissive
longtx/aliyun-openapi-java-sdk
8fadfd08fbcf00c4c5c1d9067cfad20a14e42c9c
7a9ab9eb99566b9e335465a3358553869563e161
refs/heads/master
2020-04-26T02:00:35.360905
2019-02-28T13:47:08
2019-02-28T13:47:08
173,221,745
2
0
NOASSERTION
2019-03-01T02:33:35
2019-03-01T02:33:35
null
UTF-8
Java
false
false
1,840
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.aegis.transform.v20161111; import java.util.ArrayList; import java.util.List; import com.aliyuncs.aegis.model.v20161111.DescribeSuspTrendStatisticsResponse; import java.util.Map; import com.aliyuncs.transform.UnmarshallerContext; public class DescribeSuspTrendStatisticsResponseUnmarshaller { public static DescribeSuspTrendStatisticsResponse unmarshall(DescribeSuspTrendStatisticsResponse describeSuspTrendStatisticsResponse, UnmarshallerContext context) { describeSuspTrendStatisticsResponse.setRequestId(context.stringValue("DescribeSuspTrendStatisticsResponse.RequestId")); describeSuspTrendStatisticsResponse.setStartTime(context.integerValue("DescribeSuspTrendStatisticsResponse.StartTime")); describeSuspTrendStatisticsResponse.setInterval(context.integerValue("DescribeSuspTrendStatisticsResponse.Interval")); List<String> suspiciousItems = new ArrayList<String>(); for (int i = 0; i < context.lengthValue("DescribeSuspTrendStatisticsResponse.SuspiciousItems.Length"); i++) { suspiciousItems.add(context.stringValue("DescribeSuspTrendStatisticsResponse.SuspiciousItems["+ i +"]")); } describeSuspTrendStatisticsResponse.setSuspiciousItems(suspiciousItems); return describeSuspTrendStatisticsResponse; } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
8ce6106d2cfe98f2bcd14ea11826c2a0fe4581c0
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/12/org/jfree/data/xy/VectorSeries_getVectorXValue_142.java
5c796ca5ecf8154dd215c198f2bb9067749244cc
[]
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
536
java
org jfree data list delta deltax delta deltai data item vector seri collect vectorseriescollect vector seri vectorseri compar object seri comparableobjectseri return compon vector item seri param index item index compon vector vector getvectorxvalu index vector data item vectordataitem item vector data item vectordataitem data item getdataitem index item vector getvectorx
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
dfb9d848deee2965ebb065458c351e83bc1821f4
e6c5205c9e4d0d81095f7a764a7a2df002d60830
/src/org/apache/ctakes/typesystem/type/relation/ManagesTreats_Type.java
f378fd323ab77f5687205ef00cee3bcdd8a09086
[ "Apache-2.0" ]
permissive
harryhoch/DeepPhe
796009a6f583bd7f0032d26300cad8692b0d7a6d
fe8c2d2c79ec53bb048235816535901bee961090
refs/heads/master
2020-12-26T03:22:44.606278
2015-05-22T15:21:45
2015-05-22T15:21:45
50,454,055
0
0
null
2016-01-26T19:39:54
2016-01-26T19:39:54
null
UTF-8
Java
false
false
1,953
java
/* First created by JCasGen Mon May 11 11:00:52 EDT 2015 */ package org.apache.ctakes.typesystem.type.relation; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import org.apache.uima.cas.impl.CASImpl; import org.apache.uima.cas.impl.FSGenerator; import org.apache.uima.cas.FeatureStructure; import org.apache.uima.cas.impl.TypeImpl; import org.apache.uima.cas.Type; /** * Updated by JCasGen Mon May 11 11:00:52 EDT 2015 * @generated */ public class ManagesTreats_Type extends ElementRelation_Type { /** @generated * @return the generator for this type */ @Override protected FSGenerator getFSGenerator() {return fsGenerator;} /** @generated */ private final FSGenerator fsGenerator = new FSGenerator() { public FeatureStructure createFS(int addr, CASImpl cas) { if (ManagesTreats_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = ManagesTreats_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new ManagesTreats(addr, ManagesTreats_Type.this); ManagesTreats_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new ManagesTreats(addr, ManagesTreats_Type.this); } }; /** @generated */ @SuppressWarnings ("hiding") public final static int typeIndexID = ManagesTreats.typeIndexID; /** @generated @modifiable */ @SuppressWarnings ("hiding") public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.ctakes.typesystem.type.relation.ManagesTreats"); /** initialize variables to correspond with Cas Type and Features * @generated * @param jcas JCas * @param casType Type */ public ManagesTreats_Type(JCas jcas, Type casType) { super(jcas, casType); casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); } }
[ "tseytlin@pitt.edu" ]
tseytlin@pitt.edu
c16d01fa9dc09abd8fb63a91ef4ff7e5a3c9272f
f1e5fde9af08dabad3e624418e4ac3747f23a325
/app/src/main/java/com/ypwl/xiaotouzi/utils/animation/PuffOutAnimation.java
eb968565ce9dd57a1183aa1c98dab368dc18786e
[]
no_license
freedomjavaer/XTZ
63fd7d9b99a5462011db132008c22340fd64e63f
173a20e9de009b184c1b78bc1470caffa27a6b88
refs/heads/master
2021-01-11T02:58:29.446859
2016-10-14T07:14:45
2016-10-14T07:14:45
70,871,985
3
0
null
null
null
null
UTF-8
Java
false
false
3,541
java
package com.ypwl.xiaotouzi.utils.animation; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.TimeInterpolator; import android.view.View; import android.view.ViewGroup; import android.view.animation.AccelerateDecelerateInterpolator; /** * This animation scales up and fades out the view. On animation end, the view * is restored to its original state and is set to <code>View.INVISIBLE</code>. */ @SuppressWarnings("unused") public class PuffOutAnimation extends Animation { TimeInterpolator interpolator; long duration; AnimationListener listener; /** * This animation scales up and fades out the view. On animation end, the * view is restored to its original state and is set to * <code>View.INVISIBLE</code>. * * @param view The view to be animated. */ public PuffOutAnimation(View view) { this.view = view; interpolator = new AccelerateDecelerateInterpolator(); duration = DURATION_LONG; listener = null; } @Override public void animate() { ViewGroup parentView = (ViewGroup) view.getParent(), rootView = (ViewGroup) view.getRootView(); while (parentView != rootView) { parentView.setClipChildren(false); parentView = (ViewGroup) parentView.getParent(); } rootView.setClipChildren(false); final float originalScaleX = view.getScaleX(), originalScaleY = view.getScaleY(), originalAlpha = view.getAlpha(); view.animate().scaleX(4f).scaleY(4f).alpha(0f) .setInterpolator(interpolator).setDuration(duration) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { view.setVisibility(View.INVISIBLE); view.setScaleX(originalScaleX); view.setScaleY(originalScaleY); view.setAlpha(originalAlpha); if (getListener() != null) { getListener().onAnimationEnd(PuffOutAnimation.this); } } }); } /** * @return The interpolator of the entire animation. */ public TimeInterpolator getInterpolator() { return interpolator; } /** * @param interpolator The interpolator of the entire animation to set. */ public PuffOutAnimation setInterpolator(TimeInterpolator interpolator) { this.interpolator = interpolator; return this; } /** * @return The duration of the entire animation. */ public long getDuration() { return duration; } /** * @param duration The duration of the entire animation to set. * @return This object, allowing calls to methods in this class to be * chained. */ public PuffOutAnimation setDuration(long duration) { this.duration = duration; return this; } /** * @return The listener for the end of the animation. */ public AnimationListener getListener() { return listener; } /** * @param listener The listener to set for the end of the animation. * @return This object, allowing calls to methods in this class to be * chained. */ public PuffOutAnimation setListener(AnimationListener listener) { this.listener = listener; return this; } }
[ "pengdakai@163.com" ]
pengdakai@163.com
93a2b675c4d5ef52a15ec4f24f3d83f8c4e66048
18c70f2a4f73a9db9975280a545066c9e4d9898e
/mirror-composite/composite-service/src/main/java/com/migu/tsg/microservice/atomicservice/composite/controller/configManagement/ModuleCustomizedViewController.java
96a5f8125ca61724b4fc82ea0fd3adb2ad0177f9
[]
no_license
iu28igvc9o0/cmdb_aspire
1fe5d8607fdacc436b8a733f0ea44446f431dfa8
793eb6344c4468fe4c61c230df51fc44f7d8357b
refs/heads/master
2023-08-11T03:54:45.820508
2021-09-18T01:47:25
2021-09-18T01:47:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,877
java
package com.migu.tsg.microservice.atomicservice.composite.controller.configManagement; import com.aspire.mirror.composite.service.configManagement.IModuleCustomizedViewService; import com.aspire.mirror.composite.service.configManagement.payload.ModuleCustomizedViewPayload; import com.migu.tsg.microservice.atomicservice.composite.clientservice.rabc.ModuleCustomizedViewServiceClient; import com.migu.tsg.microservice.atomicservice.composite.controller.CommonResourceController; import com.migu.tsg.microservice.atomicservice.composite.controller.authcontext.RequestAuthContext; import com.migu.tsg.microservice.atomicservice.composite.controller.authcontext.ResAction; import com.migu.tsg.microservice.atomicservice.composite.controller.util.PayloadParseUtil; import com.migu.tsg.microservice.atomicservice.composite.vo.rbac.RbacResource; import com.migu.tsg.microservice.atomicservice.rbac.dto.ModuleCustomizedViewRequest; import com.migu.tsg.microservice.atomicservice.rbac.dto.ModuleCustomizedViewUpdateRequest; import com.migu.tsg.microservice.atomicservice.rbac.dto.model.ModuleCustomizedViewDTO; import tk.mybatis.mapper.util.StringUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import java.util.Date; import java.util.List; /** * <p> * 页面定制 * </p> * @title ModuleCustomizedCotroller.java * @package com.migu.tsg.microservice.atomicservice.composite.controller.configManagement * @author * @version */ @RestController public class ModuleCustomizedViewController extends CommonResourceController implements IModuleCustomizedViewService { @Autowired private ModuleCustomizedViewServiceClient moduleCustomizedViewServiceClient; protected String modelId = "index"; // @Override // @Authentication(anonymous = true) // @ResAction(resType = "ModuleCustomizedView", action = "insert") // @Override // public ModuleCustomizedViewPayload saveModuleCustomizedView(ModuleCustomizedViewPayload m) { // ModuleCustomizedViewRequest dto=new ModuleCustomizedViewRequest(); // dto.setUserId(m.getUserId()); // dto.setModuleId(m.getModuleId()); // List<ModuleCustomizedViewDTO> pay=moduleCustomizedViewServiceClient.select(dto); // Object returnO=null; // //存在则修改 // if(pay!=null&&pay.size()>0) { // returnO =moduleCustomizedViewServiceClient.modifyByPrimaryKey(PayloadParseUtil.jacksonBaseParse(ModuleCustomizedUpdateRequest.class,m)); // } // //否则为新增 // else { // returnO=moduleCustomizedViewServiceClient.createdModuleCustomized(PayloadParseUtil.jacksonBaseParse(ModuleCustomizedCreateRequest.class,m)); // } // return PayloadParseUtil.jacksonBaseParse(ModuleCustomizedViewPayload.class,returnO); // } @Override @ResAction(resType = "ModuleCustomizedView", action = "create") public ResponseEntity<String> saveModuleCustomizedView(@RequestBody ModuleCustomizedViewPayload m) { RequestAuthContext reqCtx = RequestAuthContext.currentRequestAuthContext(); resAuthHelper.resourceActionVerify(reqCtx.getUser(), new RbacResource(), reqCtx.getResAction(), reqCtx .getFlattenConstraints()); ModuleCustomizedViewRequest dto=new ModuleCustomizedViewRequest(); dto.setUserId(m.getUserId()); if(m.getName()!=null) { dto.setName(m.getName()); } List<ModuleCustomizedViewDTO> pay=moduleCustomizedViewServiceClient.select(dto); Object returnO=null; //存在则修改 if(pay!=null&&pay.size()>0) { throw new RuntimeException("the view name is exist"); } //否则为新增 else { if(StringUtil.isEmpty(m.getModuleId())) { m.setModuleId(modelId); } if(m.getCreateTime() == null) { m.setCreateTime(new Date()); } return moduleCustomizedViewServiceClient.createdModuleCustomizedView(PayloadParseUtil.jacksonBaseParse(ModuleCustomizedViewRequest.class,m)); } } @Override @ResAction(resType = "ModuleCustomizedView", action = "update") public ResponseEntity<String> designView(@RequestBody ModuleCustomizedViewPayload m) { RequestAuthContext reqCtx = RequestAuthContext.currentRequestAuthContext(); resAuthHelper.resourceActionVerify(reqCtx.getUser(), new RbacResource(), reqCtx.getResAction(), reqCtx .getFlattenConstraints()); moduleCustomizedViewServiceClient.modifyByPrimaryKey(PayloadParseUtil.jacksonBaseParse(ModuleCustomizedViewUpdateRequest.class,m)); return new ResponseEntity<String>("success",HttpStatus.OK); } @Override @ResAction(resType = "ModuleCustomizedView", action = "delete") public ResponseEntity<String> deleteByPrimaryKey(@PathVariable("id") String id) { RequestAuthContext reqCtx = RequestAuthContext.currentRequestAuthContext(); resAuthHelper.resourceActionVerify(reqCtx.getUser(), new RbacResource(), reqCtx.getResAction(), reqCtx .getFlattenConstraints()); moduleCustomizedViewServiceClient.deleteByPrimaryKey(id); return new ResponseEntity<String>("success", HttpStatus.OK); } @Override @ResAction(resType = "ModuleCustomizedView", action = "update") public ResponseEntity<String> updateModuleCustomizedView(@RequestBody ModuleCustomizedViewPayload m) { RequestAuthContext reqCtx = RequestAuthContext.currentRequestAuthContext(); resAuthHelper.resourceActionVerify(reqCtx.getUser(), new RbacResource(), reqCtx.getResAction(), reqCtx .getFlattenConstraints()); moduleCustomizedViewServiceClient.modifyByPrimaryKey(PayloadParseUtil.jacksonBaseParse(ModuleCustomizedViewUpdateRequest.class,m)); return new ResponseEntity<String>("success", HttpStatus.OK); } @Override @ResAction(action = "view", resType = "ModuleCustomizedView") public List<ModuleCustomizedViewPayload> select(@RequestBody ModuleCustomizedViewPayload m) { RequestAuthContext reqCtx = RequestAuthContext.currentRequestAuthContext(); resAuthHelper.resourceActionVerify(reqCtx.getUser(), new RbacResource(), reqCtx.getResAction(), reqCtx .getFlattenConstraints()); ModuleCustomizedViewRequest dto=new ModuleCustomizedViewRequest(); if(StringUtil.isNotEmpty(m.getId())) { dto.setId(m.getId()); } if(!reqCtx.getUser().isAdmin() && !reqCtx.getUser().isSuperUser()) { if(StringUtil.isNotEmpty(m.getUserId())){ dto.setUserId(m.getUserId()); } } if(StringUtil.isNotEmpty(m.getSystemId())){ dto.setUserId(m.getSystemId()); } if(StringUtil.isNotEmpty(m.getName())){ dto.setUserId(m.getName()); } List<ModuleCustomizedViewDTO> pay=moduleCustomizedViewServiceClient.select(dto); return PayloadParseUtil.jacksonBaseParse(ModuleCustomizedViewPayload.class,pay); } }
[ "jiangxuwen7515@163.com" ]
jiangxuwen7515@163.com
4879c62b1a845758b1fea7c6b26ae6e696326e4c
38dc903b2eba0003d22efb8bf3e6fefa672b7dff
/src/main/java/com/apsd/hspcloud/repository/QuestionRepository.java
3074bb5bad817183cffe815742ead7f723d431b2
[]
no_license
yanxinorg/hsphou
882097f72ca5f9cfb6e4fbcc65e47195ed865679
ab35a1d9e072a40a3741212ff1f7b3152c3a4bbc
refs/heads/master
2020-04-05T04:36:20.687013
2018-11-07T03:46:18
2018-11-07T03:46:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
222
java
package com.apsd.hspcloud.repository; import com.apsd.hspcloud.bean.Question; import org.springframework.data.jpa.repository.JpaRepository; public interface QuestionRepository extends JpaRepository<Question,String> { }
[ "11143526@qq.com" ]
11143526@qq.com
64fc6ca70f80509f83ebdd440382938572ec9aef
2024fcc39ab55d98c9a7ce52730dcac69624ea16
/src/main/java/com/dominator/app/service/RepairService.java
3477b7cbec6f4a757cc6487fd5a92500f6d93109
[]
no_license
n040661/pms-allinpayb
f0366d2801dad9479d24d5a4450f60e60a686611
b98cac46b94c890f49fcab4b953346cc6c930415
refs/heads/master
2020-03-19T01:05:11.494661
2018-05-29T01:36:02
2018-05-29T01:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
477
java
package com.dominator.app.service; import com.dominFramework.core.typewrap.Dto; import com.dominator.utils.api.ApiMessage; public interface RepairService { ApiMessage listpage(Dto dto); ApiMessage addrepair(Dto dto); /** * 报修详情 * @param dto * @return */ ApiMessage repairDetail(Dto dto); /** * 我的维修 * @param * @return */ ApiMessage myrepair(Dto dto); ApiMessage completeRepair(Dto dto); }
[ "zhangsuliang_job@163.com" ]
zhangsuliang_job@163.com
88b57a0b40a9e0c39e57936ef48190f297b0b20f
f0ec508f4b480d8d5399a2880e4cbb0533fc2fc1
/com.study.ouchgzee.web/src/main/java/com/ouchgzee/study/web/filter/CommonFilter.java
521d5d00a185a9298d354969a0547851660660ee
[]
no_license
lizm335/MyLizm
a327bd4d08a33c79e9b6ef97144d63dae7114a52
1bcca82395b54d431fb26817e61a294f9d7dd867
refs/heads/master
2020-03-11T17:25:25.687426
2018-04-19T03:10:28
2018-04-19T03:10:28
130,146,458
3
0
null
null
null
null
UTF-8
Java
false
false
3,495
java
package com.ouchgzee.study.web.filter; import java.io.IOException; import java.io.PrintWriter; 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.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.gzedu.xlims.common.constants.MessageCode; import com.gzedu.xlims.common.constants.ResponseModel; import com.gzedu.xlims.common.exception.CommonException; //@Component("commonFilter") public class CommonFilter implements Filter { private static final Log log = LogFactory.getLog(CommonFilter.class); @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void doFilter(ServletRequest req, ServletResponse response, FilterChain chain) throws IOException, ServletException { try { HttpServletRequest request = ((HttpServletRequest) req); String url = request.getServletPath(); if(url.contains("/pcenter") || url.contains("/wx")) { // 如果请求html,不拦截response的write方法 // 如果返回的是流则过滤掉 if(url.contains("html") || url.endsWith("ToFile") || url.endsWith("expAdmissionTicket") || url.endsWith("downGradesExcel")) { chain.doFilter(request, response); } else { chain.doFilter(request, new FilterResponse((HttpServletResponse)response)); try { ResponseModel rm = new ResponseModel(MessageCode.RESP_OK.getMsgCode(), 0, MessageCode.RESP_OK.getMessage()); this.writeJson(response, rm); } catch (Exception e) { } } } else { chain.doFilter(request, response); } }catch (Exception e) { ResponseModel rm; if (e.getCause() != null) { Throwable cause = e.getCause(); if (cause instanceof CommonException) { CommonException ce = (CommonException)cause; if (ce.getMessageCode() != null) { rm = new ResponseModel(ce.getMessageCode(), ce.getErrorMessage()); } else { rm = new ResponseModel(ce.getBusCode(), ce.getErrorMessage()); } } else { log.error(e.getMessage(), e); rm = new ResponseModel(MessageCode.SYSTEM_ERROR.getMsgCode(), 0, MessageCode.SYSTEM_ERROR.getMessage()); } } else { if (e instanceof CommonException) { CommonException ce = (CommonException)e; if (ce.getMessageCode() != null) { rm = new ResponseModel(ce.getMessageCode(), ce.getErrorMessage()); } else { rm = new ResponseModel(ce.getBusCode(), ce.getErrorMessage()); } } else { log.error(e.getMessage(), e); rm = new ResponseModel(MessageCode.SYSTEM_ERROR.getMsgCode(), 0, MessageCode.SYSTEM_ERROR.getMessage()); } } this.writeJson(response, rm); } } @Override public void destroy() { } private void writeJson(ServletResponse response, ResponseModel rm) { PrintWriter pw = null; Gson gson = new GsonBuilder().serializeNulls().create(); try { response.setContentType("application/json;charset=utf-8"); response.setCharacterEncoding("utf-8"); pw = response.getWriter(); pw.write(gson.toJson(rm)); pw.flush(); } catch (IOException e) { log.error(e.getMessage(), e); } finally { if( pw != null ){ pw.close(); } } } }
[ "lizengming@eenet.com" ]
lizengming@eenet.com
ce325221406bdee76df07371eb0abcb55a370b85
22e506ee8e3620ee039e50de447def1e1b9a8fb3
/java_src/android/support/p007v4/p009os/EnvironmentCompatKitKat.java
f6925f8ae12cd8845195604f2718865e7231f926
[]
no_license
Qiangong2/GraffitiAllianceSource
477152471c02aa2382814719021ce22d762b1d87
5a32de16987709c4e38594823cbfdf1bd37119c5
refs/heads/master
2023-07-04T23:09:23.004755
2021-08-11T18:10:17
2021-08-11T18:10:17
395,075,728
0
0
null
null
null
null
UTF-8
Java
false
false
342
java
package android.support.p007v4.p009os; import android.os.Environment; import java.io.File; /* renamed from: android.support.v4.os.EnvironmentCompatKitKat */ class EnvironmentCompatKitKat { EnvironmentCompatKitKat() { } public static String getStorageState(File path) { return Environment.getStorageState(path); } }
[ "sassafrass@fasizzle.com" ]
sassafrass@fasizzle.com
a842c81ddee067569ed6fdaf2cfe712260f40562
6246ead40970de7586337989821a53ad21909a2f
/app/src/main/java/com/power/travel/xixuntravel/model/ViewsportModel.java
6a4bdb55acd198c3195ee1445f3d0ab0ca619b6a
[]
no_license
Power-Android/xixun
7f05f65e12dfd0d8bb9b4a61df4ca8d39c4f87c1
c0421e147222fecc630b34f3252d5cd28de8e84e
refs/heads/master
2021-05-08T07:40:57.952498
2018-03-19T08:48:36
2018-03-19T08:48:36
106,783,602
0
0
null
null
null
null
UTF-8
Java
false
false
1,508
java
package com.power.travel.xixuntravel.model; import java.io.Serializable; @SuppressWarnings("serial") public class ViewsportModel implements Serializable { private String id; private String title;// private String thumb;// private String description;// private String star;// private String label;// private String Apart;// private String coordinate_x;//116 private String coordinate_y;//39 public String getId() { return id; } public void setId(String id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getThumb() { return thumb; } public void setThumb(String thumb) { this.thumb = thumb; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getStar() { return star; } public void setStar(String star) { this.star = star; } public String getLabel() { return label; } public void setLabel(String label) { this.label = label; } public String getApart() { return Apart; } public void setApart(String apart) { Apart = apart; } public String getCoordinate_x() { return coordinate_x; } public void setCoordinate_x(String coordinate_x) { this.coordinate_x = coordinate_x; } public String getCoordinate_y() { return coordinate_y; } public void setCoordinate_y(String coordinate_y) { this.coordinate_y = coordinate_y; } }
[ "power_android@163.com" ]
power_android@163.com
123b10cee077eec7da1502a6b0aeedc52fa8c67e
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_25759.java
5d442e1c5ce95fac764516dc5b58155a60a3bf6a
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
138
java
private static boolean shouldUseGuavaHashCode(Context context){ return Source.instance(context).compareTo(Source.lookup("1.7")) <= 0; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
abe47a7e7e7535182c6492dbbb8b47a8cbdd2821
fed41971c78ff70c701d754cfd023e3ea671ee85
/gd-order-intf/src/main/java/com/gudeng/commerce/gd/order/dto/WeighCarOrderDTO.java
16f3e6168f1badc165e63bdffe4486acafb0c655
[]
no_license
f3226912/gd
204647c822196b52513e5f0f8e475b9d47198d2a
882332a9da91892a38e38443541d93ddd91c7fec
refs/heads/master
2021-01-19T06:47:44.052835
2017-04-07T03:42:12
2017-04-07T03:42:12
87,498,686
0
6
null
null
null
null
UTF-8
Java
false
false
1,535
java
package com.gudeng.commerce.gd.order.dto; import java.io.Serializable; import java.util.Date; public class WeighCarOrderDTO implements Serializable{ /** * */ private static final long serialVersionUID = 1L; private Long orderNo; private String account; private String memberName; private String carNumber; private Double tareWeight; private Double totalWeight; private Double netWeight; private Date createTime; public Long getOrderNo() { return orderNo; } public void setOrderNo(Long orderNo) { this.orderNo = orderNo; } public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } public String getMemberName() { return memberName; } public void setMemberName(String memberName) { this.memberName = memberName; } public String getCarNumber() { return carNumber; } public void setCarNumber(String carNumber) { this.carNumber = carNumber; } public Double getTareWeight() { return tareWeight; } public void setTareWeight(Double tareWeight) { this.tareWeight = tareWeight; } public Double getTotalWeight() { return totalWeight; } public void setTotalWeight(Double totalWeight) { this.totalWeight = totalWeight; } public Double getNetWeight() { return netWeight; } public void setNetWeight(Double netWeight) { this.netWeight = netWeight; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } }
[ "253332973@qq.com" ]
253332973@qq.com
1dff52d31f834acc5275f97d3eb6b8600912e4ef
d320db6e9e0fcd023ad702136242c2a542ec2018
/swak-http/src/main/java/com/swak/oss/OssConfig.java
ff812433a00a2446204a0b828aa6b28c0e89a495
[ "Apache-2.0" ]
permissive
youbooks/swak
f7e249932c7dc3d3154ed40313c392645c2ee64d
d8d6ca32d80783667d9c27e0d2d56c9fd05ea918
refs/heads/master
2023-02-13T03:10:14.061240
2021-01-11T03:51:58
2021-01-11T03:51:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,485
java
package com.swak.oss; import java.net.URI; import java.util.Map; /** * Oss 配置 * * @author lifeng */ public interface OssConfig { /** * 存储的节点 * * @return */ URI getEndpoint(); /** * APP Key * * @return */ String getAccessKeyId(); /** * APP Secret * * @return */ String getAccessKeySecret(); /** * 存储的位置 * * @return */ Map<String, Bucket> getBuckets(); /** * 不同的类型存储在不同的地方 * * @author lifeng */ public static class Bucket { private String name; private String domain; private boolean auth = true; public boolean isAuth() { return auth; } public void setAuth(boolean auth) { this.auth = auth; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDomain() { return domain; } public void setDomain(String domain) { this.domain = domain; } public static Bucket newBucket(String name) { Bucket bucket = new Bucket(); bucket.setName(name); return bucket; } public static Bucket newBucket(String name, String domain) { Bucket bucket = new Bucket(); bucket.setName(name); bucket.setDomain(domain); return bucket; } public static Bucket newBucket(String name, String domain, boolean auth) { Bucket bucket = new Bucket(); bucket.setName(name); bucket.setDomain(domain); bucket.setAuth(auth); return bucket; } } }
[ "618lf@163.com" ]
618lf@163.com
9b92ce01ea80901c1c9fec72ae207f12e3f5df49
74a53525e0cdad6b2f2f30ed6eb5ad56842b5292
/app/src/main/java/Modules/quest/Display/TaskFooters/PlaceNowFromInventoryOrPan.java
d798e7b6dff1e96b68e0547059f0714230663eb9
[]
no_license
Leoxinghai/Citiville
28ed8b29323ebe124b581f6fa73dea491abbe01f
e788cef3c52d5ff8bbd38155573533c7c06c4475
refs/heads/master
2021-01-18T17:27:02.763391
2017-03-31T09:19:12
2017-03-31T09:19:12
86,801,515
1
0
null
null
null
null
UTF-8
Java
false
false
2,971
java
package Modules.quest.Display.TaskFooters; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Paint.Align; import android.media.MediaPlayer; import android.os.Bundle; import android.view.Display; import android.view.Menu; import android.view.MenuItem; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.Window; import android.view.WindowManager; import android.graphics.*; import com.xiyu.util.Array; import com.xiyu.util.Dictionary; import Display.DialogUI.*; import Display.aswingui.*; import Engine.Classes.*; import com.zynga.skelly.util.*; //import flash.events.*; import org.aswing.*; import org.aswing.event.*; public class PlaceNowFromInventoryOrPan extends PlaceNowFromInventory implements ITaskFooter { public PlaceNowFromInventoryOrPan (GenericDialogView param1 ,String param2 ) { super(param1, param2); return; }//end public Component getComponent () { CustomButton _loc_2 =null ; Component _loc_1 =null ; if (Global.player.inventory.getItemCountByName(m_type) > 0) { _loc_1 = getFooterComponent(); m_dialogView.addEventListener(Event.CLOSE, onClose, false, CLEANUP_EVENT_PRIORITY); } else { _loc_2 = new CustomButton(ZLoc.t("Dialogs", "ScrollTo"), null, "GreenSmallButtonUI"); _loc_2.addActionListener(Curry.curry(this.onViewClick)); return _loc_2; } return _loc_1; }//end private void onViewClick (AWEvent event ) { Array _loc_2 =null ; WorldObject _loc_3 =null ; if (_loc_3 == null) { _loc_2 = Global.world.getObjectsByNames(.get(m_type)); if (_loc_2.length > 0) { _loc_3 =(WorldObject) _loc_2.get(0); } } if (_loc_3 == null) { _loc_2 = Global.world.getObjectsByTargetName(m_type); if (_loc_2.length > 0) { _loc_3 =(WorldObject) _loc_2.get(0); } } if (_loc_3 == null) { return; } Global.world.centerOnObject(_loc_3); m_dialogView.close(); removeListeners(); return; }//end }
[ "leoxinghai@hotmail.com" ]
leoxinghai@hotmail.com
64d6bea7eef02315cae777ec487287e26fcd4fed
1f3f826cf519d98b67a4e436e5280d05f949ca2a
/src/com/crazy/chapter15/duplicate/SerializeMutable.java
66ce2acf2c11cbc6d3a4245ffdaf0a3196534346
[]
no_license
hyperaeon/CrazyAndOptimize
ae7b0d089fbb65df1add6ffbbc1b22706a76047d
aafcc9ab8d2a49c3e9e6d7280424ba159713f66d
refs/heads/master
2022-12-20T19:40:41.791672
2021-06-12T03:32:48
2021-06-12T03:32:48
35,353,861
3
2
null
2022-12-16T02:54:30
2015-05-10T02:27:55
Java
UTF-8
Java
false
false
893
java
package com.crazy.chapter15.duplicate; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; public class SerializeMutable { public static void main(String[] args) { try (ObjectOutputStream oos = new ObjectOutputStream( new FileOutputStream(Constants.basicPath + "mutable.txt")); ObjectInputStream ois = new ObjectInputStream( new FileInputStream(Constants.basicPath + "mutable.txt"))) { Person p = new Person("sunwukong", 500); oos.writeObject(p); p.setName("zhubajie"); oos.writeObject(p); Person p1 = (Person) ois.readObject(); Person p2 = (Person) ois.readObject(); System.out.println("p1 and p2 same object? " + (p1 == p2)); System.out.println("p2.getName(): " + p2.getName()); } catch (Exception e) { e.printStackTrace(); } } }
[ "flyloeswing@163.com" ]
flyloeswing@163.com
4530479e63ddf500425a3e468a4415e266498597
ba90ba9bcf91c4dbb1121b700e48002a76793e96
/com-gameportal-admin/src/main/java/com/gameportal/manage/proxy/service/IProxyInfoService.java
d7e351d1378745c8093b52210fb93911a4287f8c
[]
no_license
portalCMS/xjw
1ab2637964fd142f8574675bd1c7626417cf96d9
f1bdba0a0602b8603444ed84f6d7afafaa308b63
refs/heads/master
2020-04-16T13:33:21.792588
2019-01-18T02:29:40
2019-01-18T02:29:40
165,632,513
0
9
null
null
null
null
UTF-8
Java
false
false
1,789
java
package com.gameportal.manage.proxy.service; import java.util.List; import java.util.Map; import com.gameportal.manage.proxy.model.ProxyInfo; import com.gameportal.manage.proxy.model.ProxyReportEntity; /** * @ClassName: IProxyInfoService * @Description: TODO(代理) * @author chenyun * @date 2015-5-10 下午4:39:05 */ public abstract interface IProxyInfoService { public abstract ProxyInfo queryProxyInfoById(Long id); public abstract List<ProxyInfo> queryProxyInfo(Long id, Long parentid, String name, Integer startNo, Integer pageSize); public abstract List<ProxyInfo> queryProxyInfo(Map<String, Object> params,Integer startNo, Integer pageSize); public abstract Long queryProxyInfoCount(Map<String, Object> params); public abstract List<ProxyInfo> queryProxyInfo(Long id,Long parentid, String name, Integer status, Integer startNo, Integer pageSize); public abstract Long queryProxyInfoCount(Long id,Long parentid, String name); public abstract Long queryProxyInfoCount(Long id,Long parentid, String name, Integer status); public abstract Long queryProxyInfoCount(Long id,Long parentid, String name, String domainname, String platformkey, String ciphercode, String returnUrl, String noticeUrl, Integer status); public abstract ProxyInfo saveProxyInfo(ProxyInfo proxyInfo) throws Exception; public abstract boolean saveOrUpdateProxyInfo(ProxyInfo proxyInfo) throws Exception; public abstract boolean deleteProxyInfo(Long id) throws Exception; /** * 获取代理报表 * @param params * @return */ public ProxyReportEntity getProxyFrom(Map<String, Object> params); /** * 获取代理结算 * @param params * @return */ public ProxyReportEntity getProxyClearing(Map<String, Object> params); }
[ "sunny@gmail.com" ]
sunny@gmail.com
1f228fe1b40d128ff967f4fe92616bc290323f18
3f584814fa06866fb3e83bb07e688fe56aeaab04
/TestFX_17_h/src/ru/javabegin/training/fastjava2/javafx/objects/Person.java
3641be93c9c05a331ddfe2be23e970706e38877d
[]
no_license
noctuaIv/-javaBegin--JavaFX
c9d1733d727bee604d7f3c525fbc26059eda359c
29b7e39f48df79a52e7d405b932dc2ba207e88ca
refs/heads/master
2020-04-28T19:05:19.418987
2019-03-13T21:21:07
2019-03-13T21:21:07
175,500,681
0
1
null
null
null
null
UTF-8
Java
false
false
499
java
package ru.javabegin.training.fastjava2.javafx.objects; public class Person { private String fio; private String phone; public Person(String fio, String phone) { this.fio = fio; this.phone = phone; } public String getFio() { return fio; } public void setFio(String fio) { this.fio = fio; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } }
[ "noctua.vt@gmail.com" ]
noctua.vt@gmail.com
163996d3adc2ed4e1adf861580cd987dba574b46
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/alibaba--fastjson/96e322fd4460facb592ba2db335d87cc7ec4e861/before/FastMatchCheckTest.java
92fceff99168a0c2933189df51f3532ae46d1a4b
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,537
java
package com.alibaba.json.bvt.parser; import junit.framework.TestCase; import org.junit.Assert; import com.alibaba.fastjson.parser.JSONToken; import com.alibaba.fastjson.parser.deserializer.ArrayDeserializer; import com.alibaba.fastjson.parser.deserializer.AtomicIntegerArrayDeserializer; import com.alibaba.fastjson.parser.deserializer.AtomicLongArrayDeserializer; import com.alibaba.fastjson.parser.deserializer.CharacterDeserializer; import com.alibaba.fastjson.parser.deserializer.CharsetDeserializer; import com.alibaba.fastjson.parser.deserializer.FileDeserializer; import com.alibaba.fastjson.parser.deserializer.InetAddressDeserializer; import com.alibaba.fastjson.parser.deserializer.InetSocketAddressDeserializer; import com.alibaba.fastjson.parser.deserializer.JSONArrayDeserializer; import com.alibaba.fastjson.parser.deserializer.JSONObjectDeserializer; import com.alibaba.fastjson.parser.deserializer.LocaleDeserializer; import com.alibaba.fastjson.parser.deserializer.NumberDeserializer; import com.alibaba.fastjson.parser.deserializer.TimestampDeserializer; public class FastMatchCheckTest extends TestCase { public void test_match() throws Exception { Assert.assertEquals(JSONToken.LBRACKET, AtomicIntegerArrayDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LBRACKET, AtomicLongArrayDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LITERAL_STRING, InetAddressDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LITERAL_STRING, LocaleDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LITERAL_INT, NumberDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LITERAL_INT, TimestampDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LITERAL_STRING, CharsetDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LITERAL_STRING, FileDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LBRACKET, JSONArrayDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LBRACKET, ArrayDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LBRACE, JSONObjectDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LBRACE, InetSocketAddressDeserializer.instance.getFastMatchToken()); Assert.assertEquals(JSONToken.LITERAL_STRING, CharacterDeserializer.instance.getFastMatchToken()); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
9f89124e55b489459d428cfe241dd7fbe5c216ca
a85d2dccd5eab048b22b2d66a0c9b8a3fba4d6c2
/rebellion_h5_realm/java/l2r/gameserver/stats/conditions/ConditionPlayerMaxLevel.java
c10d36631a3ce58e178154fade60afa3ef9e7de7
[]
no_license
netvirus/reb_h5_storm
96d29bf16c9068f4d65311f3d93c8794737d4f4e
861f7845e1851eb3c22d2a48135ee88f3dd36f5c
refs/heads/master
2023-04-11T18:23:59.957180
2021-04-18T02:53:10
2021-04-18T02:53:10
252,070,605
0
0
null
2021-04-18T02:53:11
2020-04-01T04:19:39
HTML
UTF-8
Java
false
false
347
java
package l2r.gameserver.stats.conditions; import l2r.gameserver.stats.Env; public class ConditionPlayerMaxLevel extends Condition { private final int _level; public ConditionPlayerMaxLevel(int level) { _level = level; } @Override protected boolean testImpl(Env env) { return env.character.getLevel() <= _level; } }
[ "l2agedev@gmail.com" ]
l2agedev@gmail.com
7cc8aa352dfbba8d6228bba82818036d00b3c1cc
d720bf4b0a1bb70170a5f383023958a3c8b84407
/MustardEnglish/app/src/main/java/com/demo/administrator/mustardenglish/bean/SubBranch.java
41f85c4e3318c7bcd9153ecb7212e4b0e7f29292
[]
no_license
jspfei/news
ec681a9c454f4f41e0298ea14d7530a6c70ad2d2
f9eb6a3ba4c3759aee6af2f9007d5bc0876fc12f
refs/heads/master
2021-01-12T01:13:07.855934
2017-02-27T07:25:23
2017-02-27T07:25:41
78,357,965
0
0
null
null
null
null
UTF-8
Java
false
false
823
java
package com.demo.administrator.mustardenglish.bean; import java.io.Serializable; /** * Created by admin on 2017/1/11. */ public class SubBranch implements Serializable { private int branch_id; //分类ID private String branch_title;//分类名称 private String branch_class;//分类类别 b_1 public String getBranch_class() { return branch_class; } public void setBranch_class(String branch_class) { this.branch_class = branch_class; } public int getBranch_id() { return branch_id; } public void setBranch_id(int branch_id) { this.branch_id = branch_id; } public String getBranch_title() { return branch_title; } public void setBranch_title(String branch_title) { this.branch_title = branch_title; } }
[ "jiangfeifan8@163.com" ]
jiangfeifan8@163.com
effd5a1103af71909a66c9274c6b0ccf332617fe
fcff31355663251a9d81ef8c92a957a612dbca7f
/camel-idea-plugin/src/main/java/org/apache/camel/idea/model/ComponentOptionModel.java
361d1775c5926682511b557aa1754ed7bb515971
[ "Apache-2.0" ]
permissive
snurmine/camel-idea-plugin
fa7d97d9074a95e4cc8d5cf9322818e126069758
9e70b831761c820dc9aa503d64d7d3e25a5b3365
refs/heads/master
2021-04-27T00:12:56.298776
2018-11-29T13:26:23
2018-11-29T13:26:23
123,772,244
0
0
Apache-2.0
2018-03-04T08:58:17
2018-03-04T08:58:17
null
UTF-8
Java
false
false
2,818
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.camel.idea.model; public class ComponentOptionModel { private String name; private String kind; private String group; private String required; private String type; private String javaType; private String deprecated; private String secret; private String description; private String defaultValue; private String enums; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getKind() { return kind; } public void setKind(String kind) { this.kind = kind; } public String getGroup() { return group; } public void setGroup(String group) { this.group = group; } public String getRequired() { return required; } public void setRequired(String required) { this.required = required; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getJavaType() { return javaType; } public void setJavaType(String javaType) { this.javaType = javaType; } public String getDeprecated() { return deprecated; } public void setDeprecated(String deprecated) { this.deprecated = deprecated; } public String getSecret() { return secret; } public void setSecret(String secret) { this.secret = secret; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getDefaultValue() { return defaultValue; } public void setDefaultValue(String defaultValue) { this.defaultValue = defaultValue; } public String getEnums() { return enums; } public void setEnums(String enums) { this.enums = enums; } }
[ "claus.ibsen@gmail.com" ]
claus.ibsen@gmail.com
f1c167b837658488b6a6457fd5d725a0e21c1111
8316e42b37cb613fa3e926a749b344e7e31b72d8
/consumer/src/test/java/com/liang/consumer/ConsumerApplicationTests.java
bd9878c3234bdc689ab4802df65957d0af0ac8f6
[]
no_license
liangliangmax/springcloud-config-tut
943d080b38f958a749e5712c207627e150dff1fa
d1c6a27af5c8def6aa3205dfaf224af5fdcbd663
refs/heads/master
2020-04-16T10:25:57.556585
2019-01-18T05:46:37
2019-01-18T05:46:37
165,505,414
0
0
null
null
null
null
UTF-8
Java
false
false
347
java
package com.liang.consumer; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class ConsumerApplicationTests { @Test public void contextLoads() { } }
[ "32696645+max-translia@users.noreply.github.com" ]
32696645+max-translia@users.noreply.github.com
d7757812f4ccccb8d281dc77e009ba122c48f118
c105dc33c53c6b1ff642fd627534747e21909b01
/cloud-elasticsearch/src/main/java/com/ferdiando/elasticsearch/EsApplication.java
60a7ee13c7b868f8ead22987abd9bfedf0c7f899
[]
no_license
Ferdiando/demo-jest-es
c5ce9a326bd7a21258066514a62430ea4daebfba
c9e441b672d8f438037f72c84321123adbc8a60d
refs/heads/master
2020-05-01T05:58:46.559947
2019-03-23T17:22:18
2019-03-23T17:22:18
177,317,756
0
0
null
null
null
null
UTF-8
Java
false
false
317
java
package com.ferdiando.elasticsearch; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class EsApplication { public static void main(String[] args) { SpringApplication.run(EsApplication.class); } }
[ "huyang3868@163.com" ]
huyang3868@163.com
afa0f7341407838e9a690e6d80b81c2593fab4ce
6c8987d48d600fe9ad2640174718b68932ed4a22
/OpenCylocs-Gradle/src/main/java/nl/strohalm/cyclos/entities/accounts/fees/account/AccountFeeQuery.java
7ad294138c11e7d24340041f1486e415299c7848
[]
no_license
hvarona/ocwg
f89140ee64c48cf52f3903348349cc8de8d3ba76
8d4464ec66ea37e6ad10255efed4236457b1eacc
refs/heads/master
2021-01-11T20:26:38.515141
2017-03-04T19:49:40
2017-03-04T19:49:40
79,115,248
0
0
null
null
null
null
UTF-8
Java
false
false
3,718
java
/* This file is part of Cyclos (www.cyclos.org). A project of the Social Trade Organisation (www.socialtrade.org). Cyclos is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Cyclos 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 Cyclos; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package nl.strohalm.cyclos.entities.accounts.fees.account; import java.util.Calendar; import java.util.Collection; import nl.strohalm.cyclos.entities.accounts.AccountType; import nl.strohalm.cyclos.entities.groups.MemberGroup; import nl.strohalm.cyclos.utils.TimePeriod; import nl.strohalm.cyclos.utils.query.QueryParameters; /** * Parameters for an account fee query * @author luis */ public class AccountFeeQuery extends QueryParameters { private static final long serialVersionUID = -857557436214976940L; private Collection<MemberGroup> groups; private AccountType accountType; private Byte day; private Byte hour; private TimePeriod.Field recurrence; private boolean returnDisabled; private AccountFee.RunMode type; private Calendar enabledBefore; public AccountType getAccountType() { return accountType; } public Byte getDay() { return day; } public Calendar getEnabledBefore() { return enabledBefore; } public Collection<MemberGroup> getGroups() { return groups; } public Byte getHour() { return hour; } public TimePeriod.Field getRecurrence() { return recurrence; } public AccountFee.RunMode getType() { return type; } /** * checks if the account fee is disabled * * @return true if the account fee is disabled. */ public boolean isReturnDisabled() { return returnDisabled; } public void setAccountType(final AccountType accountType) { this.accountType = accountType; } public void setDay(final Byte day) { this.day = day; } public void setEnabledBefore(final Calendar enabledBefore) { this.enabledBefore = enabledBefore; } public void setGroups(final Collection<MemberGroup> groups) { this.groups = groups; } public void setHour(final Byte hour) { this.hour = hour; } /** * setting this will make the query search for fees matching the given recurrence * * @param recurrence a <code>TimePeriod.field</code> indicating how often the fee is to be repeated in time. */ public void setRecurrence(final TimePeriod.Field recurrence) { this.recurrence = recurrence; } /** * sets the query to search for enabled/disabled fees * * @param returnDisabled if true, search will be for disabled fees */ public void setReturnDisabled(final boolean returnDisabled) { this.returnDisabled = returnDisabled; } public void setType(final AccountFee.RunMode type) { this.type = type; } }
[ "wladimir2113@gmail.com" ]
wladimir2113@gmail.com
ffb6f5bb335c5c9a39d5eee16fa497658424ba0d
44b18053cdd56f054821e0af93eef1b116053bc9
/api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/model/support/ldap/FollowReferralSearchEntryHandlersProperties.java
af867888c1f9d5494f85e27c87ec35fc101dc2c2
[ "Apache-2.0", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
dongyongok/cas
c364f27fe5ff10b779737f9764ea7a0f5623087b
45139a50fbdf5fe37302d556260395fd73a67007
refs/heads/master
2022-09-19T10:31:20.645502
2022-09-06T03:43:15
2022-09-06T03:43:15
231,773,571
0
0
Apache-2.0
2022-09-19T01:52:27
2020-01-04T14:06:27
Java
UTF-8
Java
false
false
788
java
package org.apereo.cas.configuration.model.support.ldap; import org.apereo.cas.configuration.support.RequiresModule; import com.fasterxml.jackson.annotation.JsonFilter; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; import java.io.Serializable; /** * This is {@link FollowReferralSearchEntryHandlersProperties}. * * @author Misagh Moayyed * @since 5.2.0 */ @RequiresModule(name = "cas-server-support-ldap") @Getter @Accessors(chain = true) @Setter @JsonFilter("FollowReferralSearchEntryHandlersProperties") public class FollowReferralSearchEntryHandlersProperties implements Serializable { private static final long serialVersionUID = 7138108925310792763L; /** * The default referral limit. */ private int limit = 10; }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
860aad892f5724e8e7c2b639e6e976e957e46cba
a18afe55c8f8b05c574d7a4e24d6c5f3254dc642
/src/com/syntax/class31/CollectionsSortClass.java
2905a1662ee093f75fbf553ae17270ca5ff2db9c
[]
no_license
tugba54-test/asel
f8df693ed084e91d1490a195443d87317b548eef
edb8876aa022291bbff0d711b58499115997cdbb
refs/heads/master
2021-03-31T18:18:46.442768
2020-06-15T18:13:33
2020-06-15T18:13:33
248,124,499
0
0
null
null
null
null
UTF-8
Java
false
false
865
java
package com.syntax.class31; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; class StringLengthComparator implements Comparator<String>{ public int compare(String a1,String a2) { return 0; } } public class CollectionsSortClass { public static void main(String[] args) { Set<String>animal=new LinkedHashSet<>(); animal.add("elephant"); animal.add("Goril"); animal.add("Zebra"); animal.add("Bird"); animal.add("lion"); //Collections.sort(animal); for(String animals:animal) { System.out.println(animals); } List<Integer>number=new ArrayList<>(); number.add(123); number.add(9); number.add(345); number.add(876); number.add(3); Collections.sort(number); } }
[ "akcatugba@yahoo.com" ]
akcatugba@yahoo.com
9f1c99410f1a0c7cf056e9f83206195feae05604
3ab0d056aae83fd3398d73cb345261d37fcbba4f
/OOPOverview/src/AverageGrades/Main.java
6d4d867aeaeaf556b1fd1f7d0b3fdd814786963d
[]
no_license
danielanikolova/Java-DB-Advanced
375fc56e622f63d8f0c6d4e85375770b69e9992d
acf1cf1cdaeacd4b3a970f91f43a62525789e303
refs/heads/master
2021-01-01T03:59:33.162701
2017-08-11T11:07:10
2017-08-11T11:07:10
97,096,969
0
0
null
null
null
null
UTF-8
Java
false
false
1,630
java
package AverageGrades; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int studentsNumber = Integer.parseInt(scanner.nextLine()); List<Student> students = new ArrayList<Student>(); for (int i = 0; i < studentsNumber; i++) { String[] student = scanner.nextLine().split(" "); if ( student.length<1){ continue; }else { String name = student[0]; List<Double> grades = new ArrayList<Double>(); Double currentStudentGrades = 0.0; for (int j = 1; j < student.length; j++) { String grade = student[j]; Double gradeValue = Double.parseDouble(grade); grades.add(gradeValue); currentStudentGrades += gradeValue; } double averageGrade = currentStudentGrades / (student.length - 1); Student currentStudent = new Student(name, grades, averageGrade); students.add(currentStudent); } } students.stream() .filter(w -> w.getAverageGrade()>=5) .sorted(Comparator.comparing(Student::getName) .thenComparing(Comparator.comparing(Student::getAverageGrade).reversed())) .forEach(a -> { System.out.printf("%s -> %.2f\n", a.getName(), a.getAverageGrade()); }); } }
[ "daniela.a.nikolova@gmail.com" ]
daniela.a.nikolova@gmail.com
0ede2a5d1dfd5c2b71ea117a0c3104cf5c477796
e8e48a96f2aba9040f4f55ab61efaab1a9eb6a23
/interviewbit/DP/MaxSumPathinBinaryTree.java
afa9550d6366a52595057eebdbc6bb0217a8e525
[]
no_license
arnabs542/algorithmic-problems
67342172c2035d9ffb2ee2bf0f1901e651dcce12
5d19d2e9cddc20e8a6949ac38fe6fb73dfc81bf4
refs/heads/master
2021-12-14T05:41:50.177195
2017-04-15T07:42:41
2017-04-15T07:42:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,345
java
/* Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. Example : Given the below binary tree, 1 / \ 2 3 Return 6. */ /** * Definition for binary tree * class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ // O(n) public class Solution { class Info{ long pathIncludingRoot; long bestPath; public Info(long p, long b){ pathIncludingRoot = p; bestPath = b; } } public Info maxSum(TreeNode node) { if(node == null) return new Info(Integer.MIN_VALUE, Integer.MIN_VALUE); Info left = maxSum(node.left); Info right = maxSum(node.right); long x = Math.max(Math.max(left.pathIncludingRoot, 0), Math.max(0, right.pathIncludingRoot)) + node.val; long y = Math.max(left.pathIncludingRoot, 0) + Math.max(0, right.pathIncludingRoot) + node.val; long z = Math.max(left.bestPath, right.bestPath); long bestPath = Math.max(y, z); return new Info(x, bestPath); } public int maxPathSum(TreeNode node) { if(node == null) return 0; Info r = maxSum(node); return (int)r.bestPath; } }
[ "masruba@gmail.com" ]
masruba@gmail.com
3258b25440952202030ee11a061dbad78d7ca50d
3f2069806b5d5f8b74d2a09256f783220fa912f3
/jOOQ/src/main/java/org/jooq/MergeNotMatchedValuesStep22.java
5a5dbd44d2bf0d8cebc13bda9c9da3fd5f81aa28
[ "Apache-2.0" ]
permissive
alokmenghrajani/jOOQ
a8636dd4dfde71c033756521932941700eec9993
0a52ca4bc15b0045163cb77aa01b5bf8cfa4089b
refs/heads/master
2021-01-14T14:33:09.732026
2015-04-20T13:46:17
2015-04-20T13:46:17
24,614,906
1
0
null
2015-04-20T22:47:01
2014-09-29T22:08:00
Java
UTF-8
Java
false
false
4,150
java
/** * Copyright (c) 2009-2015, Data Geekery GmbH (http://www.datageekery.com) * All rights reserved. * * This work is dual-licensed * - under the Apache Software License 2.0 (the "ASL") * - under the jOOQ License and Maintenance Agreement (the "jOOQ License") * ============================================================================= * You may choose which license applies to you: * * - If you're using this work with Open Source databases, you may choose * either ASL or jOOQ License. * - If you're using this work with at least one commercial database, you must * choose jOOQ License * * For more information, please visit http://www.jooq.org/licenses * * Apache Software License 2.0: * ----------------------------------------------------------------------------- * 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. * * jOOQ License and Maintenance Agreement: * ----------------------------------------------------------------------------- * Data Geekery grants the Customer the non-exclusive, timely limited and * non-transferable license to install and use the Software under the terms of * the jOOQ License and Maintenance Agreement. * * This library is distributed with a LIMITED WARRANTY. See the jOOQ License * and Maintenance Agreement for more details: http://www.jooq.org/licensing */ package org.jooq; import static org.jooq.SQLDialect.CUBRID; // ... import static org.jooq.SQLDialect.HSQLDB; // ... // ... // ... import java.util.Collection; import javax.annotation.Generated; /** * This type is used for the {@link Merge}'s DSL API. * <p> * Example: <code><pre> * DSLContext create = DSL.using(configuration); * * create.mergeInto(table) * .using(select) * .on(condition) * .whenMatchedThenUpdate() * .set(field1, value1) * .set(field2, value2) * .whenNotMatchedThenInsert(field1, field2) * .values(value1, value2) * .execute(); * </pre></code> * * @author Lukas Eder */ @Generated("This class was generated using jOOQ-tools") public interface MergeNotMatchedValuesStep22<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22> { /** * Set <code>VALUES</code> for <code>INSERT</code> in the <code>MERGE</code> * statement's <code>WHEN NOT MATCHED THEN INSERT</code> clause. */ @Support({ CUBRID, HSQLDB }) MergeNotMatchedWhereStep<R> values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14, T15 value15, T16 value16, T17 value17, T18 value18, T19 value19, T20 value20, T21 value21, T22 value22); /** * Set <code>VALUES</code> for <code>INSERT</code> in the <code>MERGE</code> * statement's <code>WHEN NOT MATCHED THEN INSERT</code> clause. */ @Support({ CUBRID, HSQLDB }) MergeNotMatchedWhereStep<R> values(Field<T1> value1, Field<T2> value2, Field<T3> value3, Field<T4> value4, Field<T5> value5, Field<T6> value6, Field<T7> value7, Field<T8> value8, Field<T9> value9, Field<T10> value10, Field<T11> value11, Field<T12> value12, Field<T13> value13, Field<T14> value14, Field<T15> value15, Field<T16> value16, Field<T17> value17, Field<T18> value18, Field<T19> value19, Field<T20> value20, Field<T21> value21, Field<T22> value22); /** * Set <code>VALUES</code> for <code>INSERT</code> in the <code>MERGE</code> * statement's <code>WHEN NOT MATCHED THEN INSERT</code> clause. */ @Support({ CUBRID, HSQLDB }) MergeNotMatchedWhereStep<R> values(Collection<?> values); }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
1c54670d22e1ff08cdc0764a1fa7ee98c49e3413
f733f6e2a2e699ddcb347c7e835eb861f73a25b7
/ASDW1D6/src/w1d6_1/Reporter.java
e3e0e8539510ff7188a7aba6259edb07dd36c038
[]
no_license
gakyvan/EclipseProjects
1d9e3010154cc275b674f32de51250a349680f9e
540838bd46537ea9192efcbbdc88cf81d2d397f8
refs/heads/master
2020-03-17T07:59:46.540033
2018-05-14T20:54:44
2018-05-14T20:54:44
133,420,372
0
0
null
null
null
null
UTF-8
Java
false
false
173
java
package w1d6_1; public class Reporter extends AbstractAgent { @Override public void handleRequest(CallRecord req) { System.out.println(req.toString()); } }
[ "37524284+gakyvan@users.noreply.github.com" ]
37524284+gakyvan@users.noreply.github.com
f6ae56ff48f2fd45dca04c9071dff7fbd5672706
838fe21048f4da4ba6a2ec1679e2a9e3aff188c9
/Calix-Gigaspire-V2-Android/app/src/main/java/com/calix/calixgigaspireapp/ui/devices/Devices.java
bcebbf9e189ffd73f360735753a3b80dee461124
[]
no_license
PrithivDharmarajan/Projects
03b162e0666dc08888d73bd3c6fa7771525677c7
1548b60025adc4f7a0570d51950c144a1cacce3a
refs/heads/master
2020-03-30T22:36:22.465572
2018-11-12T16:39:01
2018-11-12T16:39:01
151,672,600
0
0
null
null
null
null
UTF-8
Java
false
false
6,893
java
package com.calix.calixgigaspireapp.ui.devices; import android.os.Build; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import com.calix.calixgigaspireapp.R; import com.calix.calixgigaspireapp.adapter.devices.DeviceAdapter; import com.calix.calixgigaspireapp.main.BaseActivity; import com.calix.calixgigaspireapp.output.model.DeviceEntity; import com.calix.calixgigaspireapp.output.model.DeviceListResponse; import com.calix.calixgigaspireapp.services.APIRequestHandler; import com.calix.calixgigaspireapp.ui.dashboard.Alert; import com.calix.calixgigaspireapp.ui.dashboard.Dashboard; import com.calix.calixgigaspireapp.utils.AppConstants; import com.calix.calixgigaspireapp.utils.DialogManager; import com.calix.calixgigaspireapp.utils.InterfaceBtnCallback; import com.calix.calixgigaspireapp.utils.NumberUtil; import java.io.IOException; import java.util.ArrayList; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; public class Devices extends BaseActivity { @BindView(R.id.header_txt) TextView mHeaderTxt; @BindView(R.id.devices_header_bg_lay) RelativeLayout mDevicesHeaderBgLay; @BindView(R.id.devices_recycler_view) RecyclerView mDevicesRecyclerView; /* Footer Variables */ @BindView(R.id.footer_first_img) ImageView mFooterFirstImg; @BindView(R.id.footer_one_txt) TextView mFooterOneTxt; @BindView(R.id.footer_second_img) ImageView mFooterSecondImg; @BindView(R.id.footer_second_txt) TextView mFooterSecondTxt; @BindView(R.id.footer_notification_count_lay) RelativeLayout mFooterNotificationCountLay; @BindView(R.id.footer_notification_count_temp_txt) TextView mFooterNotificationCountTempTxt; @BindView(R.id.footer_notification_count_txt) TextView mFooterNotificationCountTxt; @BindView(R.id.footer_third_lay) LinearLayout mFooterThirdLay; @BindView(R.id.footer_third_view) View mFooterThirdView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ui_devices); initView(); } /*View initialization*/ private void initView() { /*For error track purpose - log with class name*/ AppConstants.TAG = this.getClass().getSimpleName(); /*ButterKnife for variable initialization*/ ButterKnife.bind(this); setHeaderView(); setFooterVIew(); deviceListAPICall(); } private void setHeaderView() { /*Header*/ mHeaderTxt.setVisibility(View.VISIBLE); String headerTitle = Character.toUpperCase(AppConstants.CATEGORY_ENTITY.getName().charAt(0)) + AppConstants.CATEGORY_ENTITY.getName().substring(1).toLowerCase(); mHeaderTxt.setText(headerTitle); /*Set header adjustment - status bar we applied transparent color so header tack full view*/ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { mDevicesHeaderBgLay.post(new Runnable() { public void run() { int heightInt = getResources().getDimensionPixelSize(R.dimen.size45); mDevicesHeaderBgLay.setLayoutParams(new RelativeLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, heightInt + NumberUtil.getInstance().getStatusBarHeight(Devices.this))); mDevicesHeaderBgLay.setPadding(0, NumberUtil.getInstance().getStatusBarHeight(Devices.this), 0, 0); } }); } } /*Set Footer View */ private void setFooterVIew(){ if(AppConstants.ALERT_COUNT > 0){ mFooterNotificationCountLay.setVisibility(View.VISIBLE); mFooterNotificationCountTempTxt.setText(String.valueOf(AppConstants.ALERT_COUNT)); mFooterNotificationCountTxt.setText(String.valueOf(AppConstants.ALERT_COUNT)); } else { mFooterNotificationCountLay.setVisibility(View.GONE); } mFooterFirstImg.setImageResource(R.drawable.ic_dashboard); mFooterOneTxt.setText(getString(R.string.dashboard)); mFooterSecondImg.setImageResource(R.drawable.ic_notification); mFooterSecondTxt.setText(getString(R.string.alert)); mFooterThirdLay.setVisibility(View.GONE); mFooterThirdView.setVisibility(View.GONE); } /*View onClick*/ @OnClick({R.id.header_left_img_lay,R.id.footer_first_lay,R.id.footer_second_lay}) public void onClick(View v) { switch (v.getId()) { case R.id.header_left_img_lay: onBackPressed(); break; case R.id.footer_first_lay: previousScreen(Dashboard.class); break; case R.id.footer_second_lay: nextScreen(Alert.class); break; } } /*Device List API calls*/ private void deviceListAPICall(){ APIRequestHandler.getInstance().deviceListAPICall(String.valueOf(AppConstants.CATEGORY_ENTITY.getType()),this); } /*API request success and failure*/ @Override public void onRequestSuccess(Object resObj) { super.onRequestSuccess(resObj); if (resObj instanceof DeviceListResponse) { DeviceListResponse deviceListResponse = (DeviceListResponse) resObj; setData(deviceListResponse.getDevices()); } } private void setData(ArrayList<DeviceEntity> deviceList) { Log.d("Device lis",deviceList.get(0).getName()); mDevicesRecyclerView.setLayoutManager(new LinearLayoutManager(this)); mDevicesRecyclerView.setNestedScrollingEnabled(false); mDevicesRecyclerView.setAdapter(new DeviceAdapter(deviceList, this)); } @Override public void onRequestFailure(final Object resObj, Throwable t) { super.onRequestFailure(resObj, t); if (t instanceof IOException) { DialogManager.getInstance().showNetworkErrorPopup(this, (t instanceof java.net.ConnectException ? getString(R.string.no_internet) : getString(R.string .connect_time_out)), new InterfaceBtnCallback() { @Override public void onPositiveClick() { if (resObj instanceof DeviceListResponse) deviceListAPICall(); } }); } } /*Default back button action*/ @Override public void onBackPressed() { backScreen(); } }
[ "prithiviraj@smaatapps.com" ]
prithiviraj@smaatapps.com
59c5b94fd19e931cd4570655fee93cfc3b4f5655
7fce9877cd5fa8f61061ccb4f40a7269675856fa
/src/main/java/com/ducetech/app/controller/DictionaryController.java
3a80bb959931ca50ed1b4aa139017a6ac14f46d2
[ "Apache-2.0" ]
permissive
zhaoshiling1017/monitor-platform
d15d5177e9b0934f0b6e56d341ec581e8bd16c4d
dece433ceca02b83c2d8e56f3d70af015f7a8784
refs/heads/master
2020-09-07T08:00:31.306551
2017-07-30T12:30:47
2017-07-30T12:30:47
94,422,122
0
0
null
null
null
null
UTF-8
Java
false
false
3,488
java
package com.ducetech.app.controller; import com.alibaba.fastjson.JSONArray; import com.ducetech.app.model.Dictionary; import com.ducetech.app.model.User; import com.ducetech.app.model.vo.DictionaryQuery; import com.ducetech.app.service.DictionaryService; import com.ducetech.framework.controller.BaseController; import com.ducetech.framework.web.view.OperationResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.util.Date; import java.util.List; import java.util.Map; /** * Created by lenzhao on 17-4-27. */ @Controller public class DictionaryController extends BaseController { private static final Logger LOG = LoggerFactory.getLogger(DictionaryController.class); @Autowired private DictionaryService dictionaryService; @RequestMapping(value = "/dics", method = RequestMethod.GET) public String index(DictionaryQuery query, Model model) { if (null == query) { query = new DictionaryQuery(); } String nodes = dictionaryService.createTree(); model.addAttribute("nodes", nodes); return "dictionary/index"; } @RequestMapping(value = "/dics/{nodeCode}/beforeDel", method = RequestMethod.GET) @ResponseBody public OperationResult beforeDel(@PathVariable(value="nodeCode") String nodeCode) { Long count = dictionaryService.getCountByPCode(nodeCode); if (count > 0) { return OperationResult.buildFailureResult("该节点或其子节点被关联中,删除失败!", 0); } else { return OperationResult.buildSuccessResult("", 1); } } @RequestMapping(value = "/dics/{nodeCode}", method = RequestMethod.DELETE) @ResponseBody public OperationResult destory(@PathVariable(value="nodeCode") String nodeCode) { dictionaryService.deleteDic(nodeCode); return OperationResult.buildSuccessResult("节点删除成功!", 1); } @RequestMapping(value = "/dics", method = RequestMethod.POST) @ResponseBody public Dictionary create(HttpServletRequest request, String name, @RequestParam(value = "pId") String pCode) { String nodeCode = dictionaryService.getNodeCode(pCode); User user = getLoginUser(request); Dictionary dic = new Dictionary(); dic.setCreatedAt(new Date()); dic.setCreatorId(user.getUserId()); dic.setUpdatorId(user.getUserId()); dic.setIsDeleted(0); dic.setNodeCode(nodeCode); dic.setNodeName(name); dic.setNodeOrder(1); dic.setUpdatedAt(new Date()); dictionaryService.saveDic(dic); return dic; } @RequestMapping(value = "/dics/{nodeCode}", method = RequestMethod.PUT) @ResponseBody public OperationResult update(HttpServletRequest request, @PathVariable(value="nodeCode") String nodeCode, String nodeName) { User user = getLoginUser(request); Dictionary dic = dictionaryService.findByCode(nodeCode); if (null != dic) { dic.setNodeName(nodeName); dic.setUpdatedAt(new Date()); dic.setUpdatorId(user.getUserId()); dictionaryService.updateDic(dic); } return OperationResult.buildSuccessResult("", 1); } }
[ "lenzhao@yahoo.com" ]
lenzhao@yahoo.com
1cd4bd51b52a55e4abc2f8b96ddbd230a55853a0
24ad2dc00687f44623256cc1b270101866143e43
/Algo/src/CodingStudySamsungProblem/아기상어.java
1f98de6710341b1338f6052eb87e3071f83b65b1
[]
no_license
Jangsukwoo/Algorithm
9a1e7234749768bdf05550f38c63b8d809ef065f
570fefe5b7f42b729e6701664094c2e95340e63e
refs/heads/master
2022-12-10T23:49:26.114824
2022-12-09T02:37:41
2022-12-09T02:37:41
206,563,752
5
1
null
null
null
null
UTF-8
Java
false
false
5,267
java
package CodingStudySamsungProblem; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.LinkedList; import java.util.Queue; import java.util.StringTokenizer; /* * 가장 처음 아기상어의 크기는 2 * 1초에 상하좌우로 이동 * 자기보다 큰 물고기가 있는 칸은 이동할 수 없다. * 자기보다 작은 물고기는 먹을 수 있다. * 자기랑 같은 크기를 가지는 물고기는 지나갈 수 있다. * 먹을 수 있는 물고기가 1마리면 그 물고기를 먹으러감 * 1마리보다 더 많으면 거리가 가장 가까운 물고기 먹으러 감. * 거리가 가장 가까운 물고기가 많으면 가장 위, 왼쪽에 있는 물고기를 먹음. * 물고기를 먹으면 그 칸은 빈칸이 됌. * 아기 상어는 자신의 크기와 같은 수의 물고기를 먹으면 크기가 1증가함 * 몇초동안 먹을 수 있는지? * */ public class 아기상어 { static int N; static int[][] space; static ArrayList<Fish> fishlist; static BabyShark babyShark; static int time; static class BabyShark{ int row; int col; int size; int eat; public BabyShark(int row, int col, int size, int eat) { this.row = row; this.col = col; this.size = size; this.eat = eat; } } static class Fish{ int row; int col; int dist; public Fish(int row, int col, int dist) { this.row = row; this.col = col; this.dist = dist; } } public static void main(String[] args) throws IOException { setData(); fishing(); System.out.println(time); } private static void fishing(){ while(true){ if(possibleCheck()){//가능하면 getFishList(); if(fishlist.size()==0){//먹을 수 있는 물고기가 있지만 지나갈 수 없어서 못먹은 경우 return; } else if(fishlist.size()==1){//먹을 수 있는 물고기가 딱 한마리인 경우 space[babyShark.row][babyShark.col]=0; babyShark.row = fishlist.get(0).row; babyShark.col = fishlist.get(0).col; space[babyShark.row][babyShark.col]=9; time+=fishlist.get(0).dist; babyShark.eat+=1; }else if(fishlist.size()>1){//정렬 Collections.sort(fishlist, new Comparator<Fish>() { @Override public int compare(Fish o1, Fish o2) { if(o1.dist==o2.dist){ if(o1.row==o2.row) return Integer.compare(o1.col,o2.col); else return Integer.compare(o1.row,o2.row); } return Integer.compare(o1.dist,o2.dist);//위 조건에 안걸리면 가장 가까운 물고기 } }); space[babyShark.row][babyShark.col]=0; babyShark.row = fishlist.get(0).row; babyShark.col = fishlist.get(0).col; space[babyShark.row][babyShark.col]=9; time+=fishlist.get(0).dist; babyShark.eat+=1; } }else return; //먹을 수 있는 물고기가 한마리도 없다면 if(babyShark.eat==babyShark.size){//먹은 물고기양이 현재 사이즈랑 같으면 babyShark.size+=1;//사이즈증가 babyShark.eat=0; } } } private static void getFishList() { int[] dr = {-1,0,1,0}; int[] dc = {0,1,0,-1};//상우하좌 boolean[][] visit = new boolean[N][N]; Queue<int[]> q = new LinkedList<int[]>(); fishlist = new ArrayList<Fish>(); q.add(new int[] {babyShark.row,babyShark.col}); visit[babyShark.row][babyShark.col]=true; int dist=0; while(!q.isEmpty()){ dist++; int size = q.size(); for(int i=0;i<size;i++){ int[] currentShark = q.poll(); int currentRow = currentShark[0]; int currentCol = currentShark[1]; for(int dir=0;dir<4;dir++) { int nextRow = currentRow+dr[dir]; int nextCol = currentCol+dc[dir]; if(rangeCheck(nextRow,nextCol)){//영역 만족하고 if(visit[nextRow][nextCol]==false){//방문 안했고 if(space[nextRow][nextCol]<=babyShark.size){ //같은 크기면 지나갈 수 있으니깐 visit[nextRow][nextCol] = true; q.add(new int[] {nextRow,nextCol}); if(space[nextRow][nextCol]>0 && space[nextRow][nextCol]<babyShark.size) { fishlist.add(new Fish(nextRow,nextCol,dist)); } } } } } } } } private static boolean rangeCheck(int nextRow, int nextCol) { if(nextRow>=0 && nextRow<N && nextCol>=0 && nextCol<N) return true; return false; } private static boolean possibleCheck(){ for(int row=0;row<N;row++) { for(int col=0;col<N;col++){ if(row==babyShark.row && col==babyShark.col) continue; if(space[row][col]<babyShark.size && space[row][col]>0){//아직 아기상어보다 작은 물고기가 존재하면 return true; } } }//못만났으면 false return false; } private static void setData() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; N = Integer.parseInt(br.readLine()); space = new int[N][N]; for(int row=0;row<N;row++) { st = new StringTokenizer(br.readLine()); for(int col=0;col<N;col++){ space[row][col] = Integer.parseInt(st.nextToken()); if(space[row][col]==9) { babyShark = new BabyShark(row,col,2,0); } } } } }
[ "wwwkdtjrdn@naver.com" ]
wwwkdtjrdn@naver.com
079af2e3067902af7c26027190b8e9ce84e9025a
4761a66291f892ca829523b0a855ee304f1ca5d0
/android/third_party/apkbuilder/src/main/java/zhao/arsceditor/ResDecoder/data/value/ResIntBasedValue.java
647c1841b13ebc3d8d5b9422723125f25126c317
[ "Apache-2.0" ]
permissive
Tornaco/Thanox
dacd0e01c37c1c0e0a22b72132933cef02f171c8
98b077e268c75f598dfba73c7425a25639d8982b
refs/heads/master
2023-09-06T03:58:39.010663
2023-09-05T01:25:18
2023-09-05T01:25:18
228,014,878
1,539
85
Apache-2.0
2023-09-06T21:21:12
2019-12-14T11:54:54
Java
UTF-8
Java
false
false
985
java
/** * Copyright 2014 Ryszard Wiśniewski <brut.alll@gmail.com> * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package zhao.arsceditor.ResDecoder.data.value; /** * @author Matt Mastracci <matthew@mastracci.com> */ public class ResIntBasedValue extends ResValue { private int mRawIntValue; protected ResIntBasedValue(int rawIntValue) { mRawIntValue = rawIntValue; } public int getRawIntValue() { return mRawIntValue; } }
[ "tornaco@163.com" ]
tornaco@163.com
ad7c8d30e23065806beb02dfc7f96ab67b8e34b5
196c18d4ee7670ca1a8099d789dec81dc8bd5011
/platform/component/util/source/src/main/java/com/sinosoft/one/util/web/kaptcha/ZHWordRender.java
976f67c3000c62288c8897d2de0264ed8b569738
[]
no_license
zhanght86/one
d1ea3b712823bd549c0270ea740681ea464c0967
6dcbb0f8c8253fb9097f424626a4402d522bdfaa
refs/heads/master
2021-06-08T00:36:18.290551
2016-06-02T07:48:01
2016-06-02T07:48:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,158
java
package com.sinosoft.one.util.web.kaptcha; import java.awt.Font; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.font.GlyphVector; import java.awt.image.BufferedImage; import java.util.Random; import com.google.code.kaptcha.text.WordRenderer; import com.google.code.kaptcha.util.Configurable; /** * kaptcha 用于控制中文字体样式 * @author qc * */ public class ZHWordRender extends Configurable implements WordRenderer{ public BufferedImage renderWord(String word, int width, int height) { int fontSize = getConfig().getTextProducerFontSize(); // 这个地方我们自定义了验证码文本字符样式,虽然是可以配置的,但是字体展示都粗体,我们希望不是粗体就只有自定义这个渲染类了 String paramName = "kaptcha.textproducer.font.names"; String paramValue = (String)getConfig().getProperties().get(paramName); String fontNames[] = paramValue.split(","); Font fonts[] = new Font[fontNames.length]; for(int i = 0; i < fontNames.length; i++){ fonts[i] = new Font(fontNames[i], Font.PLAIN, fontSize); } java.awt.Color color = getConfig().getTextProducerFontColor(); int charSpace = getConfig().getTextProducerCharSpace(); BufferedImage image = new BufferedImage(width, height, 2); Graphics2D g2D = image.createGraphics(); g2D.setColor(color); RenderingHints hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); hints.add(new RenderingHints(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY)); g2D.setRenderingHints(hints); java.awt.font.FontRenderContext frc = g2D.getFontRenderContext(); Random random = new Random(); int startPosY = (height - fontSize) / 5 + fontSize; char wordChars[] = word.toCharArray(); Font chosenFonts[] = new Font[wordChars.length]; int charWidths[] = new int[wordChars.length]; int widthNeeded = 0; for(int i = 0; i < wordChars.length; i++) { chosenFonts[i] = fonts[random.nextInt(fonts.length)]; char charToDraw[] = { wordChars[i] }; GlyphVector gv = chosenFonts[i].createGlyphVector(frc, charToDraw); charWidths[i] = (int)gv.getVisualBounds().getWidth(); if(i > 0) widthNeeded += 2; widthNeeded += charWidths[i]; } int startPosX = (width - widthNeeded) / 2; for(int i = 0; i < wordChars.length; i++) { g2D.setFont(chosenFonts[i]); char charToDraw[] = { wordChars[i] }; g2D.drawChars(charToDraw, 0, charToDraw.length, startPosX, startPosY); startPosX = startPosX + charWidths[i] + charSpace; } return image; } }
[ "hp@hp-HP" ]
hp@hp-HP
087a834cd09486fd0398ce95b03f1cb8b34c928c
689cdf772da9f871beee7099ab21cd244005bfb2
/classes/com/android/dazhihui/ui/delegate/screen/hk/b.java
ccc2ee652b4e3b7aa4c01f7238351481ea13fd6f
[]
no_license
waterwitness/dazhihui
9353fd5e22821cb5026921ce22d02ca53af381dc
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
refs/heads/master
2020-05-29T08:54:50.751842
2016-10-08T08:09:46
2016-10-08T08:09:46
70,314,359
2
4
null
null
null
null
UTF-8
Java
false
false
788
java
package com.android.dazhihui.ui.delegate.screen.hk; import android.view.View; import android.view.View.OnClickListener; import android.widget.PopupWindow; class b implements View.OnClickListener { b(DropDownCurrencyView paramDropDownCurrencyView) {} public void onClick(View paramView) { if (DropDownCurrencyView.a(this.a).getCount() > 0) { if ((DropDownCurrencyView.b(this.a) != null) && (DropDownCurrencyView.b(this.a).isShowing())) { DropDownCurrencyView.b(this.a).dismiss(); } } else { return; } DropDownCurrencyView.c(this.a); } } /* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\android\dazhihui\ui\delegate\screen\hk\b.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
41eed3aec8e833528b82ae8ca831e98202c97f25
55211260620a1c211cadaa616b864eca4846eec0
/src/main/java/ticTacToe/controllers/PresenterController.java
83fb0cebddd51c14bdde87e2617126a15c5b6584
[]
no_license
MasterCloudApps/1.ADCS.pruebas
7af46e3bb03f51fb255911c644cdf79edd30d2a5
6d5d3481981516a24d4b995d801f25d00eb05806
refs/heads/master
2021-07-15T22:53:40.246047
2020-02-23T23:33:50
2020-02-23T23:33:50
216,838,459
0
1
null
2020-10-13T16:54:27
2019-10-22T14:47:17
Java
UTF-8
Java
false
false
184
java
package ticTacToe.controllers; import ticTacToe.models.Color; import ticTacToe.models.Coordinate; public interface PresenterController { Color getColor(Coordinate coordinate); }
[ "setillofm@gmail.com" ]
setillofm@gmail.com
ba271c80c4b7ae4e1ea562c6e6f7f6c1c8c6ef49
a678a015230699d48a384fafb6b182acac974033
/documents-core/src/main/java/ru/ezhov/document/core/name/ColumnName.java
5923bf271d01a5946944294e6491620915d83355
[]
no_license
ezhov-da/documents-agregator
ecbecd19fd2c771f0389b58dc5cbfed9852bf49b
b7ad06227be3727462cfae962eb4a7710d9e5aba
refs/heads/master
2021-09-12T16:59:29.892376
2018-03-24T21:13:25
2018-03-24T21:13:25
125,927,048
1
0
null
null
null
null
UTF-8
Java
false
false
177
java
package ru.ezhov.document.core.name; public class ColumnName implements Name { @Override public String get() { return "C" + System.currentTimeMillis(); } }
[ "ezhdenis@yandex.ru" ]
ezhdenis@yandex.ru
cbaa0131762534ea73b04c206a7c519e26e8f288
2a2e4b81efbf5ad263b835b8c717155e61f31c4b
/Mesh4j/tags/Ektoo_0_0_8/GoogleSpreadsheetAdapter/src/org/mesh4j/sync/adapters/googlespreadsheet/model/GSSpreadsheet.java
7923f010554cd0922951965d2ab863431f01f77f
[]
no_license
ptyagi108/mesh4x
0c9f68a5048362ed2853dd3de4b90dfadef6ebe0
c7d360d703b51d87f0795101a07d9dcf99ef8d19
refs/heads/master
2021-01-13T02:37:05.390793
2010-10-12T13:31:40
2010-10-12T13:31:40
33,174,471
0
0
null
null
null
null
UTF-8
Java
false
false
2,892
java
package org.mesh4j.sync.adapters.googlespreadsheet.model; import java.util.LinkedHashMap; import java.util.Map; import com.google.gdata.data.PlainTextConstruct; import com.google.gdata.data.spreadsheet.SpreadsheetEntry; import com.google.gdata.data.spreadsheet.WorksheetEntry; /** * This class is to wrap a {@link SpreadsheetEntry}, also contains a list of reference * to {@link GSWorksheet} as the worksheets it contains * * @author sharif * @Version 1.0, 29-03-09 * */ public class GSSpreadsheet<C> extends GSBaseElement<C>{ // MODEL VARIABLES // BUSINESS METHODS public GSSpreadsheet(SpreadsheetEntry spreadsheet) { super(); this.parentElement = null; this.baseEntry = spreadsheet; this.childElements = new LinkedHashMap<String, C>(); } /** * get the core {@link SpreadsheetEntry} object wrapped by this * {@link GSSpreadsheet} * @return */ public SpreadsheetEntry getSpreadsheet() { return (SpreadsheetEntry) getBaseEntry(); } /** * get all child {@link GSWorksheet} of this {@link GSSpreadsheet} * @return */ public Map<String, C> getGSWorksheets() { return getNonDeletedChildElements(); } /** * get a {@link GSWorksheet} from this {@link GSSpreadsheet} by row index * @param rowIndex * @return */ public C getGSWorksheet(int rowIndex) { return getChildElement(Integer.toString(rowIndex)); } /** * get a {@link GSWorksheet} by key from this {@link GSSpreadsheet} * * @param key * @return */ public C getGSWorksheet(String key){ return getChildElement(key); } /** * get a {@link GSWorksheet} by sheet name or title * @param sheetName * @return */ @SuppressWarnings("unchecked") public C getGSWorksheetBySheetName(String sheetName) { for (C gsWorksheet : getChildElements().values()) { if ( !((IGSElement)gsWorksheet).isDeleteCandidate() && ((GSWorksheet<?>) gsWorksheet) .getWorksheetEntry().getTitle().getPlainText() .equalsIgnoreCase(sheetName) ) return gsWorksheet; } return null; } /** * create a new worksheet with a name worksheetName also add it as a child element * of this spreadsheet * * @param worksheetName * @return */ @SuppressWarnings("unchecked") public GSWorksheet<GSRow<GSCell>> createNewWorksheet(String worksheetName) { WorksheetEntry worksheet = new WorksheetEntry(); worksheet.setTitle(new PlainTextConstruct(worksheetName)); // TODO: need to review what should be the default row count of the // sheet worksheet.setRowCount(100); worksheet.setColCount(10); GSWorksheet<GSRow<GSCell>> gsWorksheet = new GSWorksheet<GSRow<GSCell>>( worksheet, this.getChildElements().size() + 1, this); this.addChildElement(gsWorksheet.getElementId(), (C) gsWorksheet); return gsWorksheet; } }
[ "jtondato@gmail.com@8593f39d-8f4b-0410-bdb6-4f53e344ee92" ]
jtondato@gmail.com@8593f39d-8f4b-0410-bdb6-4f53e344ee92
5f06363cdeb86c0b8aa98f98aaf80ac26d3c4fa8
363c936f4a89b7d3f5f4fb588e8ca20c527f6022
/AL-Game/data/scripts/system/handlers/quest/altgard/_2213PoisonRootPotentFruit.java
a83033b0cb50c5e33c02983eb2e72afc7d04cddf
[]
no_license
G-Robson26/AionServer-4.9F
d628ccb4307aa0589a70b293b311422019088858
3376c78b8d90bd4d859a7cfc25c5edc775e51cbf
refs/heads/master
2023-09-04T00:46:47.954822
2017-08-09T13:23:03
2017-08-09T13:23:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,887
java
/** * This file is part of Aion-Lightning <aion-lightning.org>. * * Aion-Lightning is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Aion-Lightning is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Aion-Lightning. * If not, see <http://www.gnu.org/licenses/>. */ package quest.altgard; import com.aionemu.gameserver.model.gameobjects.Npc; import com.aionemu.gameserver.model.gameobjects.player.Player; import com.aionemu.gameserver.questEngine.handlers.QuestHandler; import com.aionemu.gameserver.model.DialogAction; import com.aionemu.gameserver.questEngine.model.QuestEnv; import com.aionemu.gameserver.questEngine.model.QuestState; import com.aionemu.gameserver.questEngine.model.QuestStatus; /** * @author Mr. Poke */ public class _2213PoisonRootPotentFruit extends QuestHandler { private final static int questId = 2213; public _2213PoisonRootPotentFruit() { super(questId); } @Override public void register() { qe.registerQuestNpc(203604).addOnQuestStart(questId); qe.registerQuestNpc(203604).addOnTalkEvent(questId); qe.registerQuestNpc(700057).addOnTalkEvent(questId); qe.registerQuestNpc(203604).addOnTalkEvent(questId); qe.addHandlerSideQuestDrop(questId, 700057, 182203208, 1, 100); qe.registerGetingItem(182203208, questId); } @Override public boolean onDialogEvent(final QuestEnv env) { final Player player = env.getPlayer(); int targetId = 0; if (env.getVisibleObject() instanceof Npc) { targetId = ((Npc) env.getVisibleObject()).getNpcId(); } final QuestState qs = player.getQuestStateList().getQuestState(questId); if (qs == null) { if (targetId == 203604) { if (env.getDialog() == DialogAction.QUEST_SELECT) { return sendQuestDialog(env, 1011); } else { return sendQuestStartDialog(env); } } } else if (qs.getStatus() == QuestStatus.START) { switch (targetId) { case 700057: { if (env.getDialog() == DialogAction.USE_OBJECT) { return true; // loot } } case 203604: { if (qs.getQuestVarById(0) == 1) { if (env.getDialog() == DialogAction.QUEST_SELECT) { return sendQuestDialog(env, 2375); } else if (env.getDialogId() == DialogAction.SELECT_QUEST_REWARD.id()) { removeQuestItem(env, 182203208, 1); qs.setStatus(QuestStatus.REWARD); updateQuestStatus(env); return sendQuestEndDialog(env); } else { return sendQuestEndDialog(env); } } } } } else if (qs.getStatus() == QuestStatus.REWARD) { if (targetId == 203604) { return sendQuestEndDialog(env); } } return false; } @Override public boolean onGetItemEvent(QuestEnv env) { return defaultOnGetItemEvent(env, 0, 1, false); // 1 } }
[ "falke34@a70f7278-c47d-401d-a0e4-c9401b7f63ed" ]
falke34@a70f7278-c47d-401d-a0e4-c9401b7f63ed
03c84a1e88d1fa9e239f06edea9203ee021adcf4
7ef841751c77207651aebf81273fcc972396c836
/cstream/src/main/java/com/loki/cstream/stubs/SampleClass5141.java
7e05481162def3090fd3e6317514ee4ca2872d5a
[]
no_license
SergiiGrechukha/ModuleApp
e28e4dd39505924f0d36b4a0c3acd76a67ed4118
00e22d51c8f7100e171217bcc61f440f94ab9c52
refs/heads/master
2022-05-07T13:27:37.704233
2019-11-22T07:11:19
2019-11-22T07:11:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
274
java
package com.loki.cstream.stubs; public class SampleClass5141 { private SampleClass5142 sampleClass; public SampleClass5141(){ sampleClass = new SampleClass5142(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
785ebef000bf3cdab5815f16c62ad1a2e0069d16
0180e8cdf5e23161a3408e1b4dfb616ccbbccb60
/src/util/I18N.java
fb8f45f124c73c768b5ddfb3e459f1b6f0981342
[]
no_license
salingers/Java
4d6ddf2ec8fe0ece212097cc1fa9858e13f5ea5b
0486b0d309a2bd1d305988b3a56a5bf772aa5f65
refs/heads/master
2020-05-22T00:03:53.896471
2017-04-18T08:44:20
2017-04-18T08:44:20
63,207,503
0
0
null
null
null
null
UTF-8
Java
false
false
328
java
package util; import static java.lang.System.out; import java.util.ResourceBundle; public class I18N { public static void main(String[] args) { ResourceBundle res = ResourceBundle.getBundle("messages"); out.print(res.getString("cc.openhome.welcome") + "!"); out.println(res.getString("cc.openhome.name") + "!"); } }
[ "salingersms@msn.com" ]
salingersms@msn.com
21f32611609a97c98d044fa2e1ad19c306dd3393
7ef841751c77207651aebf81273fcc972396c836
/bstream/src/main/java/com/loki/bstream/stubs/SampleClass3575.java
0ea84f097f6551668c4588655c2c25892167117d
[]
no_license
SergiiGrechukha/ModuleApp
e28e4dd39505924f0d36b4a0c3acd76a67ed4118
00e22d51c8f7100e171217bcc61f440f94ab9c52
refs/heads/master
2022-05-07T13:27:37.704233
2019-11-22T07:11:19
2019-11-22T07:11:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
274
java
package com.loki.bstream.stubs; public class SampleClass3575 { private SampleClass3576 sampleClass; public SampleClass3575(){ sampleClass = new SampleClass3576(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
dbbe85b7200967534fac29f1bd881b6475951a92
3de3dae722829727edfdd6cc3b67443a69043475
/edexOsgi/com.raytheon.uf.common.dataplugin.shef/src/com/raytheon/uf/common/dataplugin/shef/tables/Ofsdatatrans.java
71911f8606decb00039d29421da294db145079f4
[ "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,499
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 javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.Column; import javax.persistence.EmbeddedId; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; /** * Ofsdatatrans 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 * * </pre> * * @author jkorman * @version 1.1 */ @Entity @Table(name = "ofsdatatrans") @com.raytheon.uf.common.serialization.annotations.DynamicSerialize public class Ofsdatatrans extends com.raytheon.uf.common.dataplugin.persist.PersistableDataObject implements java.io.Serializable { private static final long serialVersionUID = 1L; @com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement private OfsdatatransId id; @com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement private Shefpe shefpe; @com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement private Shefex shefex; @com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement private Shefdur shefdur; @com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement private String ofsDataType; @com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement private Float fwdTimeWindow; @com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement private Float bkwTimeWindow; public Ofsdatatrans() { } public Ofsdatatrans(OfsdatatransId id, Shefpe shefpe, Shefex shefex, Shefdur shefdur) { this.id = id; this.shefpe = shefpe; this.shefex = shefex; this.shefdur = shefdur; } public Ofsdatatrans(OfsdatatransId id, Shefpe shefpe, Shefex shefex, Shefdur shefdur, String ofsDataType, Float fwdTimeWindow, Float bkwTimeWindow) { this.id = id; this.shefpe = shefpe; this.shefex = shefex; this.shefdur = shefdur; this.ofsDataType = ofsDataType; this.fwdTimeWindow = fwdTimeWindow; this.bkwTimeWindow = bkwTimeWindow; } @EmbeddedId @AttributeOverrides( { @AttributeOverride(name = "pe", column = @Column(name = "pe", nullable = false, length = 2)), @AttributeOverride(name = "dur", column = @Column(name = "dur", nullable = false)), @AttributeOverride(name = "extremum", column = @Column(name = "extremum", nullable = false, length = 1)) }) public OfsdatatransId getId() { return this.id; } public void setId(OfsdatatransId id) { this.id = id; } @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "pe", nullable = false, insertable = false, updatable = false) public Shefpe getShefpe() { return this.shefpe; } public void setShefpe(Shefpe shefpe) { this.shefpe = shefpe; } @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "extremum", nullable = false, insertable = false, updatable = false) public Shefex getShefex() { return this.shefex; } public void setShefex(Shefex shefex) { this.shefex = shefex; } @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "dur", nullable = false, insertable = false, updatable = false) public Shefdur getShefdur() { return this.shefdur; } public void setShefdur(Shefdur shefdur) { this.shefdur = shefdur; } @Column(name = "ofs_data_type", length = 4) public String getOfsDataType() { return this.ofsDataType; } public void setOfsDataType(String ofsDataType) { this.ofsDataType = ofsDataType; } @Column(name = "fwd_time_window", precision = 8, scale = 8) public Float getFwdTimeWindow() { return this.fwdTimeWindow; } public void setFwdTimeWindow(Float fwdTimeWindow) { this.fwdTimeWindow = fwdTimeWindow; } @Column(name = "bkw_time_window", precision = 8, scale = 8) public Float getBkwTimeWindow() { return this.bkwTimeWindow; } public void setBkwTimeWindow(Float bkwTimeWindow) { this.bkwTimeWindow = bkwTimeWindow; } }
[ "mjames@unidata.ucar.edu" ]
mjames@unidata.ucar.edu
99fe211b472b741c22f2a612e9e6b398e325e5ba
9ca1e87ac44925130517765079157c2bf1ff4f5e
/ANDROID_SOURCE_CODE/packages/apps/Settings/src/com/android/settings/wifi/p2p/WifiP2pEnabler.java
0747d64edf5cb92fd58a6b9baf3218d0c5235c61
[ "Apache-2.0" ]
permissive
zhxzhxustc/AFrame
ba4ac10726200a9c3d4749f9e85bf045a3c911ca
e79bcf659660746b937fda182189cf928f84657a
refs/heads/master
2021-01-17T08:48:09.294888
2016-07-13T00:55:20
2016-07-13T00:55:20
63,128,807
3
1
null
2020-03-09T17:18:11
2016-07-12T05:23:26
null
UTF-8
Java
false
false
3,997
java
/* * Copyright (C) 2011 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.settings.wifi.p2p; import com.android.settings.R; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.wifi.p2p.WifiP2pManager; import android.os.Message; import android.preference.CheckBoxPreference; import android.preference.Preference; import android.provider.Settings; import android.util.Log; /** * WifiP2pEnabler is a helper to manage the Wifi p2p on/off */ public class WifiP2pEnabler implements Preference.OnPreferenceChangeListener { private static final String TAG = "WifiP2pEnabler"; private final Context mContext; private final CheckBoxPreference mCheckBox; private final IntentFilter mIntentFilter; private WifiP2pManager mWifiP2pManager; private WifiP2pManager.Channel mChannel; private final BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION.equals(action)) { handleP2pStateChanged(intent.getIntExtra( WifiP2pManager.EXTRA_WIFI_STATE, WifiP2pManager.WIFI_P2P_STATE_DISABLED)); } } }; public WifiP2pEnabler(Context context, CheckBoxPreference checkBox) { mContext = context; mCheckBox = checkBox; mWifiP2pManager = (WifiP2pManager) context.getSystemService(Context.WIFI_P2P_SERVICE); if (mWifiP2pManager != null) { mChannel = mWifiP2pManager.initialize(mContext, mContext.getMainLooper(), null); if (mChannel == null) { //Failure to set up connection Log.e(TAG, "Failed to set up connection with wifi p2p service"); mWifiP2pManager = null; mCheckBox.setEnabled(false); } } else { Log.e(TAG, "mWifiP2pManager is null!"); } mIntentFilter = new IntentFilter(WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION); } public void resume() { if (mWifiP2pManager == null) return; mContext.registerReceiver(mReceiver, mIntentFilter); mCheckBox.setOnPreferenceChangeListener(this); } public void pause() { if (mWifiP2pManager == null) return; mContext.unregisterReceiver(mReceiver); mCheckBox.setOnPreferenceChangeListener(null); } public boolean onPreferenceChange(Preference preference, Object value) { if (mWifiP2pManager == null) return false; mCheckBox.setEnabled(false); final boolean enable = (Boolean) value; if (enable) { mWifiP2pManager.enableP2p(mChannel); } else { mWifiP2pManager.disableP2p(mChannel); } return false; } private void handleP2pStateChanged(int state) { mCheckBox.setEnabled(true); switch (state) { case WifiP2pManager.WIFI_P2P_STATE_ENABLED: mCheckBox.setChecked(true); break; case WifiP2pManager.WIFI_P2P_STATE_DISABLED: mCheckBox.setChecked(false); break; default: Log.e(TAG,"Unhandled wifi state " + state); break; } } }
[ "zhxzhxustc@gmail.com" ]
zhxzhxustc@gmail.com
c2a133f740daa8c4bb55cc13212067ecc7f37de1
638d957ed8f3c5a054752510e5d01b2bd86adc25
/lib/utils/src/main/java/net/datatp/util/text/matcher/AnyStringMatcher.java
ad4ce7b708f82a02921008037d6138ad73bc79c0
[]
no_license
tuan08/datatp
3bfed7c6175fe3950659443ebc1a580b510e466a
7d7ff6bed36199627b143d37dd254cdb6dbf269c
refs/heads/master
2020-04-12T06:22:53.010673
2016-12-07T03:19:53
2016-12-07T03:19:53
62,194,565
3
1
null
null
null
null
UTF-8
Java
false
false
396
java
package net.datatp.util.text.matcher; public class AnyStringMatcher implements StringMatcher { private StringMatcher[] matchers; public AnyStringMatcher(StringMatcher ... matchers) { this.matchers = matchers; } @Override public boolean matches(String string) { for(StringMatcher sel : matchers) { if(sel.matches(string)) return true; } return false; } }
[ "tuan08@gmail.com" ]
tuan08@gmail.com
a932682d31dabae558af3d0b156b2239c330e23f
8a5927a062d3c8fe5f6a6f199b95547e608c390d
/wechat-boardgame-toolkit/app/src/main/java/xdean/wechat/bg/service/impl/GameStateHandlerServiceImpl.java
43fbf052a185b26661c785e0b1aaceb27455fe78
[ "Apache-2.0" ]
permissive
XDean/WeChat-Application
14ab74cb7555895552a07eb0619e9aac95227fde
502e3bc064e363dfc2424e598bd559ac7d244abc
refs/heads/master
2021-04-12T12:37:11.189808
2018-08-30T12:50:44
2018-08-30T12:50:44
126,693,438
0
0
null
null
null
null
UTF-8
Java
false
false
1,383
java
package xdean.wechat.bg.service.impl; import static xdean.wechat.common.spring.IllegalDefineException.assertNonNull; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.inject.Inject; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.stereotype.Service; import xdean.wechat.bg.annotation.StateHandler; import xdean.wechat.bg.model.Player; import xdean.wechat.bg.service.GameStateHandler; import xdean.wechat.bg.service.GameStateHandlerService; import xdean.wechat.common.spring.IllegalDefineException; @Service public class GameStateHandlerServiceImpl implements GameStateHandlerService { private final Map<String, GameStateHandler> stateHandlers = new HashMap<>(); @Inject public void init(List<GameStateHandler> handlers) { handlers.forEach(h -> Arrays.stream(AnnotationUtils.getAnnotation(h.getClass(), StateHandler.class).value()) .forEach(s -> { GameStateHandler old = stateHandlers.put(s, h); IllegalDefineException.assertTrue(old == null, String.format("Multiple handler defined for %s: %s and %s", s, old, h)); })); } @Override public GameStateHandler getStateHandler(Player player) { return assertNonNull(stateHandlers.get(player.getState()), "GameStateHandler not found: " + player.getState()); } }
[ "373216024@qq.com" ]
373216024@qq.com
978f036c4549aa91ec0b2ff03112911c9f97c1c0
7385d3df1cee12101c07eee9f5c518c2755f4109
/app/src/main/java/com/postman/ui/module/main/find/adapter/KeyListAdapter.java
d5e16ddbe03dec5a92391bcf5997a99a9ab16c0d
[]
no_license
cheng-junfeng/postman
ed6d12ed37cbbd806539de86a67634d60bb37c71
104ebdc39e073b2792e30e6b8729dbb3810490ef
refs/heads/master
2020-03-19T11:23:16.284711
2018-07-06T09:02:44
2018-07-06T09:02:44
136,452,288
1
0
null
null
null
null
UTF-8
Java
false
false
4,068
java
package com.postman.ui.module.main.find.adapter; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.ImageView; import com.base.app.adapter.BaseRecyAdapter; import com.hint.listener.OnChooseListener; import com.postman.R; import com.postman.config.Extra; import com.postman.ui.module.main.find.bean.KeyListBean; import com.postman.ui.module.main.find.view.InputAddActvity; import java.util.ArrayList; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; public class KeyListAdapter extends BaseRecyAdapter<KeyListAdapter.ViewHolder> { OnChooseListener mOnClickListener; List<KeyListBean> data; Context mContext; public KeyListAdapter(Context context, List<KeyListBean> data) { this.mContext = context; this.data = data; } public void setDatas(List<KeyListBean> datas) { if (datas == null) { datas = new ArrayList<>(); } this.data = datas; } public void setOnListener(OnChooseListener mOnItemClickListener) { this.mOnClickListener = mOnItemClickListener; } @Override public void myBindViewHolder(final ViewHolder holder, final int position) { KeyListBean userModel = data.get(position); if(userModel.set){ holder.hmKey.setText(userModel.key); holder.hmValue.setText(userModel.value); } holder.txDelete.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { holder.hmKey.setText(""); holder.hmValue.setText(""); if (mOnClickListener != null) { mOnClickListener.onPositive(position); } } }); holder.hmKey.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { startInputEdit(position); } }); holder.hmValue.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { startInputEdit(position); } }); } private void startInputEdit(int position){ Intent intent = new Intent(mContext, InputAddActvity.class); Bundle bundle = new Bundle(); bundle.putInt(Extra.DATA_INPUT_POS, position); intent.putExtras(bundle); mContext.startActivity(intent); } @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_key_list, parent, false)); } @Override public int getItemCount() { return data.size(); } public KeyListBean getItem(int pos) { if (data == null || pos >= data.size()) { return null; } return data.get(pos); } public void delete(int index) { data.remove(index); } public void clear() { data.clear(); } public List<KeyListBean> getData() { return data; } class ViewHolder extends RecyclerView.ViewHolder { @BindView(R.id.hm_key) EditText hmKey; @BindView(R.id.hm_value) EditText hmValue; @BindView(R.id.tx_delete) ImageView txDelete; ViewHolder(View view) { super(view); ButterKnife.bind(this, view); hmKey.setCursorVisible(false); hmKey.setFocusable(false); hmKey.setFocusableInTouchMode(false); // hmValue.setCursorVisible(false); // hmValue.setFocusable(false); // hmValue.setFocusableInTouchMode(false); hmValue.setFocusable(false); hmValue.setFocusableInTouchMode(false); } } }
[ "sjun945@outlook.com" ]
sjun945@outlook.com
b11ba87cdbf22146c7be690055525f29cad0bb68
5719a5044dfc47da1894fb1ca6a6bde4fae63b34
/route/src/main/java/com/SPI/ImageHello.java
5cffd305d173f8d2674bc92bb81676feae44d0b6
[]
no_license
hashboy1/routetesting
9e33058d1482fecdd746e6db9b1644c9d5cb71ef
d1aba9d73a4f2943e1e4aa80f8bcbc492c570486
refs/heads/master
2020-04-04T18:03:22.102831
2019-05-16T05:20:06
2019-05-16T05:20:06
156,147,824
0
0
null
null
null
null
UTF-8
Java
false
false
154
java
package com.SPI; public class ImageHello implements HelloInterface { @Override public void sayHello() { System.out.println("Image Hello"); } }
[ "email" ]
email
53714c0633dcbdf2ef139a4b434e174874f6dde9
14f8e80f05020ae0416122248faf0262a2505b4b
/Java/Semester 1 usorteret/Lektion23_enum/src/application/Plads.java
12d77562845433068e9216390052ac29fa23b515
[]
no_license
saphyron/randomstuff
6befba6ffba0818b8f57683f028b425239cb92a9
e21ba06758818ab11c28a19a608b3804bd589e3f
refs/heads/main
2023-05-19T15:59:31.006362
2021-06-09T07:57:13
2021-06-09T07:57:13
360,878,053
0
0
null
null
null
null
ISO-8859-15
Java
false
false
1,461
java
package application; import java.util.ArrayList; public class Plads { private int nr; private Område område; private final ArrayList<Reservation> reservering = new ArrayList<>(); private static double standardTimePris = 50; public Plads(int nr, Område område) { this.nr = nr; this.område = område; } public int getNr() { return nr; } public Område getOmråde() { return område; } public static double getStandardTimePris() { return standardTimePris; } public static void setStandardTimePris(double standardTimePris) { Plads.standardTimePris = standardTimePris; } public ArrayList<Reservation> getReservation() { return new ArrayList<>(reservering); } public void addReservation(Reservation reservation) { if (!reservering.contains(reservation)) { reservering.add(reservation); reservation.addPlads(this); } } public void removeReservation(Reservation reservation) { if (reservering.contains(reservation)) { reservering.remove(reservation); reservation.removePlads(this); } } public double pris(int timer) { double pris = 0; if (område == Område.STANDARD) { pris = standardTimePris * timer; } else if (område == Område.BØRNE) { pris = standardTimePris * 0.8 * timer; } else if (område == Område.TURNERING) { pris = standardTimePris * 1.1 * timer; } else if (område == Område.VIP) { pris = standardTimePris * 1.25 * timer; } return pris; } }
[ "30288325+saphyron@users.noreply.github.com" ]
30288325+saphyron@users.noreply.github.com
3f225ce401219bc4435b9b351e1e658759eb6207
03482d89174b363d8b7ca03d7eaf05c12a012a77
/cws_model_to_java_skel_ampliacion/src/uo/ri/model/types/Address.java
3b35512f54bd531c9260df176395efdd148486f8
[]
no_license
cafeteru/RI
15c2145cc19dae890484b181ca3be4efd25ec969
dd2f3e32eec71178e95bbb0287e6850604b92652
refs/heads/master
2022-01-09T02:43:24.159852
2018-10-17T22:45:24
2018-10-17T22:45:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,481
java
package uo.ri.model.types; public class Address { private String street; private String city; private String zipCode; public Address(String street, String city, String zipCode) { super(); this.street = street; this.city = city; this.zipCode = zipCode; } public String getStreet() { return street; } public String getCity() { return city; } public String getZipCode() { return zipCode; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((city == null) ? 0 : city.hashCode()); result = prime * result + ((street == null) ? 0 : street.hashCode()); result = prime * result + ((zipCode == null) ? 0 : zipCode.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Address other = (Address) obj; if (city == null) { if (other.city != null) return false; } else if (!city.equals(other.city)) return false; if (street == null) { if (other.street != null) return false; } else if (!street.equals(other.street)) return false; if (zipCode == null) { if (other.zipCode != null) return false; } else if (!zipCode.equals(other.zipCode)) return false; return true; } @Override public String toString() { return "Address [street=" + street + ", city=" + city + ", zipCode=" + zipCode + "]"; } }
[ "ivangonzalezmahagamage@gmail.com" ]
ivangonzalezmahagamage@gmail.com
a43307940db34faa22ecf40ecc3f9647f409f35f
b7a3f838ed814e60df5b248d889e6a624a8480e9
/sample-java/src/main/java/learningtest/java/lang/RuntimeTest.java
0031ca3937acbd0be191a8226bb0355baa6bb005
[]
no_license
izeye/sample-java
cb4fb4972fe766db41d5a8497110d56181f4fcb8
dfcdc6f71169b88c446a70fc1aa195168e487d10
refs/heads/master
2021-01-01T06:55:25.586591
2019-11-05T05:19:09
2019-11-05T05:19:09
13,823,838
0
1
null
2020-07-01T19:49:06
2013-10-24T05:56:18
Java
UTF-8
Java
false
false
303
java
package learningtest.java.lang; public class RuntimeTest { public static void main(String[] args) throws InterruptedException { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { System.out.println("test"); } }); Thread.sleep(Long.MAX_VALUE); } }
[ "izeye@naver.com" ]
izeye@naver.com
7ecde0cf776d2c7c6f862fb934e7661bfa56795c
5598faaaaa6b3d1d8502cbdaca903f9037d99600
/code_changes/Apache_projects/HDFS-59/dd049a2f6097da189ccce2f5890a2b9bc77fa73f/~SharedFileDescriptorFactory.java
8c330d46f10e767b11409be7baba7ec696bce91b
[]
no_license
SPEAR-SE/LogInBugReportsEmpirical_Data
94d1178346b4624ebe90cf515702fac86f8e2672
ab9603c66899b48b0b86bdf63ae7f7a604212b29
refs/heads/master
2022-12-18T02:07:18.084659
2020-09-09T16:49:34
2020-09-09T16:49:34
286,338,252
0
2
null
null
null
null
UTF-8
Java
false
false
3,579
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.io.nativeio; import java.io.FileInputStream; import java.io.IOException; import java.io.FileDescriptor; import org.apache.commons.lang.SystemUtils; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; import com.google.common.base.Preconditions; /** * A factory for creating shared file descriptors inside a given directory. * Typically, the directory will be /dev/shm or /tmp. * * We will hand out file descriptors that correspond to unlinked files residing * in that directory. These file descriptors are suitable for sharing across * multiple processes and are both readable and writable. * * Because we unlink the temporary files right after creating them, a JVM crash * usually does not leave behind any temporary files in the directory. However, * it may happen that we crash right after creating the file and before * unlinking it. In the constructor, we attempt to clean up after any such * remnants by trying to unlink any temporary files created by previous * SharedFileDescriptorFactory instances that also used our prefix. */ @InterfaceAudience.Private @InterfaceStability.Unstable public class SharedFileDescriptorFactory { private final String prefix; private final String path; /** * Create a SharedFileDescriptorFactory. * * @param prefix Prefix to add to all file names we use. * @param path Path to use. */ public SharedFileDescriptorFactory(String prefix, String path) throws IOException { Preconditions.checkArgument(NativeIO.isAvailable()); Preconditions.checkArgument(SystemUtils.IS_OS_UNIX); this.prefix = prefix; this.path = path; deleteStaleTemporaryFiles0(prefix, path); } /** * Create a shared file descriptor which will be both readable and writable. * * @param length The starting file length. * * @return The file descriptor, wrapped in a FileInputStream. * @throws IOException If there was an I/O or configuration error creating * the descriptor. */ public FileInputStream createDescriptor(int length) throws IOException { return new FileInputStream(createDescriptor0(prefix, path, length)); } /** * Delete temporary files in the directory, NOT following symlinks. */ private static native void deleteStaleTemporaryFiles0(String prefix, String path) throws IOException; /** * Create a file with O_EXCL, and then resize it to the desired size. */ private static native FileDescriptor createDescriptor0(String prefix, String path, int length) throws IOException; }
[ "archen94@gmail.com" ]
archen94@gmail.com
7f7b8c1faf59dc29dee5b21a017bfc1b45d0bfea
866d73b0913835c201da71cc3f615ba9655996c8
/src/com/orte/javaprofessional/strings/example1_string/string_pool/Main.java
dacf4536fbf9790371f41c71725237d41aa5cb37
[]
no_license
Orte82/JastApp
471e633611df3c66c5b95df8c6b71bb285f82422
2d40932b692af9b6b122fd4733cf644971cfd222
refs/heads/master
2020-07-29T09:48:58.058765
2019-09-20T09:16:25
2019-09-20T09:16:25
209,751,648
0
0
null
null
null
null
UTF-8
Java
false
false
1,018
java
package com.orte.javaprofessional.strings.example1_string.string_pool; public class Main { public static void main(String[] args) { // Value in pool String s1 = "World"; //pool String s2 = "World"; //pool // Create string value through constructor and doesn't apply it to pool String s3 = new String("World"); String s4 = new String("World"); System.out.println(s1 == s2);// true System.out.println(s1 == s3);// false System.out.println(s3 == s2);// false System.out.println(); Integer a = 10; Integer b = 10; Integer c1 = 128; Integer c2 = 128; // // Integer aNew = new Integer(10); // Integer bNew = new Integer(10); // System.out.println(aNew == bNew); //false; // Integer value wrapper classes put their value in pool System.out.println(a == b);// true // if leaving 1 byte range receive false System.out.println(c1 == c2);// false } }
[ "kortes29@gmail.com" ]
kortes29@gmail.com
1ea4cf9bd6690a11e703ec879ac03990f746ed2b
91945432326100e7b6f069f7a234e21c8d6b18f6
/engsoft1globalcode/PortaCachorro/src/TestePorta.java
e232bbb75c791cd1012d20a37664b7313912497e
[ "MIT" ]
permissive
andersonsilvade/workspacejava
15bd27392f68649fe92df31483f09c441d457e0e
dd85abad734b7d484175c2580fbaad3110653ef4
refs/heads/master
2016-09-05T13:03:02.963321
2014-09-16T12:49:41
2014-09-16T12:49:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
314
java
public class TestePorta { public static void main(String[] args) { Porta porta = new Porta(); Controle controle = new Controle(porta); Reconhecedor rec = new Reconhecedor(porta,"x"); controle.pressButton(); controle.pressButton(); rec.reconhecer("z"); } }
[ "andersonsilvade@gmail.com" ]
andersonsilvade@gmail.com
b2f6a4591114b94f3f6cfaf7fd2dbf889aae054c
024be66c0d6b280690546ea1e6aa6ff0aabcda50
/runelite-client/src/main/java/net/runelite/client/plugins/mta/MTAConfig.java
d5e356d5795ab27824d2565a84d8d79075a1cf68
[ "BSD-2-Clause", "LicenseRef-scancode-free-unknown" ]
permissive
Hashes/runelite
df1552c65a2519a63d70e1b353a1c7d05a4f9a44
78a4edcf5350c5cf7a58a8c9c5adb67d58066471
refs/heads/master
2020-03-21T11:55:34.629514
2018-06-25T01:41:02
2018-06-25T01:41:02
133,041,305
0
1
BSD-2-Clause
2018-05-16T00:51:09
2018-05-11T13:11:38
Java
UTF-8
Java
false
false
2,660
java
/* * Copyright (c) 2018, Jasper Ketelaar <Jasper0781@gmail.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY 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. */ package net.runelite.client.plugins.mta; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; @ConfigGroup( keyName = "mta", name = "Mage Training Arena", description = "Configuration for the Mage Training Arena plugin" ) public interface MTAConfig extends Config { @ConfigItem( keyName = "alchemy", name = "Enable alchemy room", description = "Configures whether or not the alchemy room overlay is enabled.", position = 0 ) default boolean alchemy() { return true; } @ConfigItem( keyName = "graveyard", name = "Enable graveyard room", description = "Configures whether or not the graveyard room overlay is enabled.", position = 1 ) default boolean graveyard() { return true; } @ConfigItem( keyName = "telekinetic", name = "Enable telekinetic room", description = "Configures whether or not the telekinetic room overlay is enabled.", position = 2 ) default boolean telekinetic() { return true; } @ConfigItem( keyName = "enchantment", name = "Enable enchantment room", description = "Configures whether or not the enchantment room overlay is enabled.", position = 3 ) default boolean enchantment() { return true; } }
[ "Adam@anope.org" ]
Adam@anope.org
331fce413980f59dfe8d8964b7088fb62d6d3627
7b733d7be68f0fa4df79359b57e814f5253fc72d
/modules/perc-ant/src/main/java/com/percussion/ant/install/PSUpdateWebApps.java
a0a4a64fbc43768241b307176491d99ca28a0626
[ "LicenseRef-scancode-dco-1.1", "Apache-2.0", "OFL-1.1", "LGPL-2.0-or-later" ]
permissive
percussion/percussioncms
318ac0ef62dce12eb96acf65fc658775d15d95ad
c8527de53c626097d589dc28dba4a4b5d6e4dd2b
refs/heads/development
2023-08-31T14:34:09.593627
2023-08-31T14:04:23
2023-08-31T14:04:23
331,373,975
18
6
Apache-2.0
2023-09-14T21:29:25
2021-01-20T17:03:38
Java
UTF-8
Java
false
false
7,058
java
/* * Copyright 1999-2023 Percussion Software, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * limitations under the License. */ package com.percussion.ant.install; import com.percussion.install.PSLogger; import com.percussion.util.IOTools; import java.io.File; import java.io.FileWriter; import java.io.IOException; /** * PSUpdateWebApps deploys existing non-system webapps into the appropriate * location during upgrade. Classloader scoping is also added. * *<br> * Example Usage: *<br> *<pre> * * First set the taskdef: * * <code> * &lt;taskdef name="updateWebApps" * class="com.percussion.ant.install.PSUpdateWebApps" * classpathref="INSTALL.CLASSPATH"/&gt; * </code> * * Now use the task to update the webapps. * * <code> * &lt;updateWebApps sysWebapps="webapp1, webapp2"/&gt; * </code> * * </pre> * */ public class PSUpdateWebApps extends PSAction { // see base class @Override public void execute() { try { PSLogger.logInfo("Updating webapps"); File fWeb = new File(m_webappsDir); if (!fWeb.exists()) { PSLogger.logInfo("Webapps directory does not exist : " + m_webappsDir); return; } File fDep = new File(m_deployDir); if (!fDep.exists()) { PSLogger.logInfo("Deploy directory does not exist : " + m_deployDir); return; } //Deploy webapps deployWebapps(fWeb, fDep); } catch (Exception e) { PSLogger.logInfo("ERROR : " + e.getMessage()); PSLogger.logInfo(e); } } /*************************************************************************** * private functions ***************************************************************************/ /** * Deploys all non-system webapps into the new deploy directory. Adds * appropriate classloader scoping to each webapp. * * @param webappsDir the old webapps directory * @param deployDir the new deploy directory * @throws ServiceException if error occurs during deployment */ private void deployWebapps(File webappsDir, File deployDir) { File[] webapps = webappsDir.listFiles(); String deployPath = deployDir.getAbsolutePath(); int i; for (i=0; i < webapps.length; i++) { File webapp = webapps[i]; //Webapps are directories if (!webapp.isDirectory()) continue; String webappName = webapp.getName(); if (!isSysWebapp(webappName)) { //Found a non-system webapp, so deploy it PSLogger.logInfo("Deploying webapp: " + webappName); String deployAbsPath = deployPath + File.separator + webappName + ".war"; File newWebapp = new File(deployAbsPath); if (!newWebapp.exists()) newWebapp.mkdir(); File[] webappFiles = webapp.listFiles(); for (int j=0; j < webappFiles.length; j++) { try { IOTools.copyToDir(webappFiles[j], newWebapp); } catch (IOException e) { PSLogger.logError("Error deploying webapp: " + webappName); PSLogger.logError("Exception: " + e.getMessage()); } } //Add classloader scoping try { PSLogger.logInfo("Adding classloader scoping to webapp: " + newWebapp.getName()); addClassloaderScoping(newWebapp); } catch (IOException e) { PSLogger.logError("Classloader scoping failed"); PSLogger.logError("Exception: " + e.getMessage()); } } } } /** * Determines if a webapp is a system webapp. * * @param webapp the name of the webapp * @return <code>true</code> if the webapp is a system webapp, <code>false</code> * otherwise */ private boolean isSysWebapp(String webapp) { boolean sysWebapp = false; int i; for (i=0; i < sysWebapps.length; i++) { if (webapp.equalsIgnoreCase(sysWebapps[i])) { sysWebapp = true; break; } } return sysWebapp; } /** * Adds appropriate classloader scoping to a webapp by adding a jboss-web.xml * file to the WEB-INF directory of the webapp. * * @param webapp file representing the webapp * @throws IOException if error occurs during scoping */ private void addClassloaderScoping(File webapp) throws IOException { String scopingFilePath = webapp.getAbsolutePath() + File.separator + "WEB-INF" + File.separator + scopingFile; FileWriter fwriter = new FileWriter(scopingFilePath); String contents = "<jboss-web>\n" + " <class-loading>\n" + " <loader-repository>percussion.com:loader=" + webapp.getName() + "</loader-repository>\n" + " </class-loading>\n" + "</jboss-web>"; fwriter.write(contents); fwriter.close(); } /*************************************************************************** * Bean properties ***************************************************************************/ /** * Returns the names of the pre-6.0 system webapps. * @return the names of the system webapps in an array */ public String[] getSysWebapps() { return sysWebapps; } /** * Sets the names of the pre-6.0 system webapps. * @param sysWebapps the array containing the names of the system webapps */ public void setSysWebapps(String sysWebapps) { this.sysWebapps = convertToArray(sysWebapps); } /************************************************************************** * properties **************************************************************************/ /** * Path of the pre-6.0 webapps directory */ private String m_webappsDir = getRootDir() + File.separator + "AppServer.bak/webapps"; /** * Path of the 6.0 deploy directory */ private String m_deployDir = getRootDir() + File.separator + "AppServer/server/rx/deploy"; /** * Names of the pre-6.0 system webapps */ private String[] sysWebapps = new String[0]; /** * Name of the classloader scoping file */ private String scopingFile = "jboss-web.xml"; }
[ "nate.chadwick@gmail.com" ]
nate.chadwick@gmail.com
a15fbc21c952d8ba6e8c02471ada15d68a1cd479
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/eclipse.jdt.core/3008.java
0de3e7960b2023183b5095b97dd8a8e5233ce154
[ "MIT" ]
permissive
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
d3fd21745dfddb2979e8ac262588cfdfe471899f
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
refs/heads/master
2020-03-31T15:52:01.005505
2018-10-01T23:38:50
2018-10-01T23:38:50
152,354,327
1
0
MIT
2018-10-10T02:57:02
2018-10-10T02:57:02
null
UTF-8
Java
false
false
7,131
java
/******************************************************************************* * Copyright (c) 2008, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.compiler; import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; import org.eclipse.jdt.internal.compiler.util.Messages; public class ProcessTaskManager implements Runnable { Compiler compiler; private int unitIndex; private Thread processingThread; CompilationUnitDeclaration unitToProcess; private Throwable caughtException; // queue volatile int currentIndex, availableIndex, size, sleepCount; CompilationUnitDeclaration[] units; public static final int PROCESSED_QUEUE_SIZE = 12; public ProcessTaskManager(Compiler compiler, int startingIndex) { this.compiler = compiler; this.unitIndex = startingIndex; this.currentIndex = 0; this.availableIndex = 0; this.size = PROCESSED_QUEUE_SIZE; // 0 is no one, +1 is the processing thread & -1 is the writing/main thread this.sleepCount = 0; this.units = new CompilationUnitDeclaration[this.size]; synchronized (this) { //$NON-NLS-1$ this.processingThread = new Thread(this, "Compiler Processing Task"); this.processingThread.setDaemon(true); this.processingThread.start(); } } // add unit to the queue - wait if no space is available private synchronized void addNextUnit(CompilationUnitDeclaration newElement) { while (this.units[this.availableIndex] != null) { //System.out.print('a'); //if (this.sleepCount < 0) throw new IllegalStateException(Integer.valueOf(this.sleepCount).toString()); this.sleepCount = 1; try { wait(250); } catch (InterruptedException ignore) { } this.sleepCount = 0; } this.units[this.availableIndex++] = newElement; if (this.availableIndex >= this.size) this.availableIndex = 0; if (this.sleepCount <= -1) // wake up writing thread to accept next unit - could be the last one - must avoid deadlock notify(); } public CompilationUnitDeclaration removeNextUnit() throws Error { CompilationUnitDeclaration next = null; boolean yield = false; synchronized (this) { next = this.units[this.currentIndex]; if (next == null || this.caughtException != null) { do { if (this.processingThread == null) { if (this.caughtException != null) { // rethrow the caught exception from the processingThread in the main compiler thread if (this.caughtException instanceof Error) throw (Error) this.caughtException; throw (RuntimeException) this.caughtException; } return null; } //System.out.print('r'); //if (this.sleepCount > 0) throw new IllegalStateException(Integer.valueOf(this.sleepCount).toString()); this.sleepCount = -1; try { wait(100); } catch (InterruptedException ignore) { } this.sleepCount = 0; next = this.units[this.currentIndex]; } while (next == null); } this.units[this.currentIndex++] = null; if (this.currentIndex >= this.size) this.currentIndex = 0; if (this.sleepCount >= 1 && ++this.sleepCount > 4) { // wake up processing thread to add next unit but only after removing some elements first notify(); yield = this.sleepCount > 8; } } if (yield) Thread.yield(); return next; } public void run() { boolean noAnnotations = this.compiler.annotationProcessorManager == null; while (this.processingThread != null) { this.unitToProcess = null; int index = -1; boolean cleanup = noAnnotations || this.compiler.shouldCleanup(this.unitIndex); try { synchronized (this) { if (this.processingThread == null) return; this.unitToProcess = this.compiler.getUnitToProcess(this.unitIndex); if (this.unitToProcess == null) { this.processingThread = null; return; } index = this.unitIndex++; if (this.unitToProcess.compilationResult.hasBeenAccepted) continue; } try { this.compiler.reportProgress(Messages.bind(Messages.compilation_processing, new String(this.unitToProcess.getFileName()))); if (this.compiler.options.verbose) this.compiler.out.println(Messages.bind(Messages.compilation_process, new String[] { String.valueOf(index + 1), String.valueOf(this.compiler.totalUnits), new String(this.unitToProcess.getFileName()) })); this.compiler.process(this.unitToProcess, index); } finally { // cleanup compilation unit result, but only if not annotation processed. if (this.unitToProcess != null && cleanup) this.unitToProcess.cleanUp(); } addNextUnit(this.unitToProcess); } catch (Error e) { synchronized (this) { this.processingThread = null; this.caughtException = e; } return; } catch (RuntimeException e) { synchronized (this) { this.processingThread = null; this.caughtException = e; } return; } } } public void shutdown() { try { Thread t = null; synchronized (this) { if (this.processingThread != null) { t = this.processingThread; this.processingThread = null; notifyAll(); } } if (t != null) // do not wait forever t.join(250); } catch (InterruptedException ignored) { } } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
0325aa622f3afa3c58f67da6282cf4aef7846728
12a99ab3fe76e5c7c05609c0e76d1855bd051bbb
/src/main/java/com/alipay/api/response/KoubeiMarketingMallTradeBindResponse.java
12af5e74bb10ffaef19d77d8e9834a75dcfcf465
[ "Apache-2.0" ]
permissive
WindLee05-17/alipay-sdk-java-all
ce2415cfab2416d2e0ae67c625b6a000231a8cfc
19ccb203268316b346ead9c36ff8aa5f1eac6c77
refs/heads/master
2022-11-30T18:42:42.077288
2020-08-17T05:57:47
2020-08-17T05:57:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
625
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.marketing.mall.trade.bind response. * * @author auto create * @since 1.0, 2019-06-11 16:25:01 */ public class KoubeiMarketingMallTradeBindResponse extends AlipayResponse { private static final long serialVersionUID = 1862947339499985429L; /** * 备注信息 */ @ApiField("remark") private String remark; public void setRemark(String remark) { this.remark = remark; } public String getRemark( ) { return this.remark; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
9311a658b428e31932cad70efff6ca036220dab5
1adfe7c660f414f04d83c0d5d1cde22af014b9cf
/esf-fitav-portlet/docroot/WEB-INF/src/it/ethica/esf/portlet/ESFShooterQualificationPortlet.java
bbbcdf172f9d1b00dfbe6068e241dcb3cee38a63
[]
no_license
ematedev/fitav-issues
90ad3ca896fa29321a6d3e94cd78c556b2f6238a
0702f824b29a526fb83bfff320d6f9bb3b1cb2ad
refs/heads/master
2020-05-01T18:45:14.464435
2019-07-09T14:43:26
2019-07-09T14:43:26
177,630,969
1
0
null
null
null
null
UTF-8
Java
false
false
1,934
java
package it.ethica.esf.portlet; import it.ethica.esf.model.ESFShooterQualification; import it.ethica.esf.service.ESFShooterQualificationLocalServiceUtil; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.ParamUtil; import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContextFactory; import com.liferay.util.bridges.mvc.MVCPortlet; /** * Portlet implementation class ESFShooterQualificationPortlet */ public class ESFShooterQualificationPortlet extends MVCPortlet { public void editESFShooterQualification(ActionRequest request, ActionResponse response) throws PortalException, SystemException { ServiceContext serviceContext = ServiceContextFactory.getInstance( ESFShooterQualification.class.getName(), request); long esfShooterQualificationId = ParamUtil.getLong(request, "esfShooterQualificationId"); String name = ParamUtil.getString(request, "name"); String description = ParamUtil.getString(request, "description"); String code = ParamUtil.getString(request, "code"); if (esfShooterQualificationId > 0) { ESFShooterQualificationLocalServiceUtil.updateESFShooterQualification( esfShooterQualificationId, name, description, code, serviceContext); } else { ESFShooterQualificationLocalServiceUtil.addESFShooterQualification( serviceContext.getUserId(), name, description, code, serviceContext); } } public void deleteESFShooterQualification(ActionRequest request, ActionResponse response) throws PortalException, SystemException { long esfShooterQualificationId = ParamUtil.getLong(request, "esfShooterQualificationId"); ESFShooterQualificationLocalServiceUtil .deleteESFShooterQualification(esfShooterQualificationId); } }
[ "c.spataro@tecso.biz" ]
c.spataro@tecso.biz
e1dcacdb66e28d65d9c78cd82f1fb9f06b4b4bcf
91ed795664679f7deab728922548e4093a617f00
/app/src/main/java/com/land/ch/smartnewcountryside/bean/HomeTypeBean.java
432deeca4e1120d26a2f85b51facff3a30eec1f3
[]
no_license
forhaodream/SNC
134845e02310622bf9b466ff67c8d98eb28790bc
7571d71ddee28b3ef4cc9f3f6d0a2662a003b189
refs/heads/master
2020-04-02T08:18:24.648081
2018-11-12T09:51:45
2018-11-12T09:51:45
153,878,209
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
package com.land.ch.smartnewcountryside.bean; import java.util.List; /** * Created by CH * on 2018/10/16 16:23 */ public class HomeTypeBean { private String title; private int img; private Class<?> clz; public HomeTypeBean(String title, int img, Class<?> clz) { this.title = title; this.img = img; this.clz = clz; } public Class<?> getClz() { return clz; } public void setClz(Class<?> clz) { this.clz = clz; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public int getImg() { return img; } public void setImg(int img) { this.img = img; } }
[ "ch00209@163.com" ]
ch00209@163.com
7f2d4f3c738f23a6bfe8416e7285a2ca1d04db3a
be3169c6835017b8979f23656b952f345bab5af6
/plover/repr/plover-restful/src/main/java/com/bee32/plover/restful/UnsupportedVerbException.java
a8474501472a50199b96733a10e166c599088ed2
[]
no_license
lenik/stack
5ca08d14a71e661f1d5007ba756eff264716f3a3
a69e2719d56d08a410c19cc73febf0f415d8d045
refs/heads/master
2023-07-10T10:54:14.351577
2017-07-23T00:10:15
2017-07-23T00:12:33
395,319,044
0
0
null
null
null
null
UTF-8
Java
false
false
507
java
package com.bee32.plover.restful; public class UnsupportedVerbException extends RESTfulException { private static final long serialVersionUID = 1L; public UnsupportedVerbException() { super(); } public UnsupportedVerbException(String message, Throwable cause) { super(message, cause); } public UnsupportedVerbException(String message) { super(message); } public UnsupportedVerbException(Throwable cause) { super(cause); } }
[ "xjl@99jsj.com" ]
xjl@99jsj.com
cfb77622a1261195012e83b44c6a128e77f8d020
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a117/A117058Test.java
0a05f335f335b3d4d0a47a767e6b1abfc1b1bf32
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a117; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A117058Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
c316ee41f7c16cd06721f6ffb802704a3a8fa386
85fdcf0631ca2cc72ce6385c2bc2ac3c1aea4771
/src/minecraft_server/net/minecraft/src/Achievement.java
5c983232c3e4b6d4c0aad68b51498a8f5ce75910
[]
no_license
lcycat/Cpsc410-Code-Trip
c3be6d8d0d12fd7c32af45b7e3b8cd169e0e28d4
cb7f76d0f98409af23b602d32c05229f5939dcfb
refs/heads/master
2020-12-24T14:45:41.058181
2014-11-21T06:54:49
2014-11-21T06:54:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,801
java
package net.minecraft.src; import java.util.List; public class Achievement extends StatBase { /** * Is the column (related to center of achievement gui, in 24 pixels unit) that the achievement will be displayed. */ public final int displayColumn; /** * Is the row (related to center of achievement gui, in 24 pixels unit) that the achievement will be displayed. */ public final int displayRow; /** * Holds the parent achievement, that must be taken before this achievement is avaiable. */ public final Achievement parentAchievement; /** * Holds the description of the achievement, ready to be formatted and/or displayed. */ private final String achievementDescription; /** * Holds the ItemStack that will be used to draw the achievement into the GUI. */ public final ItemStack theItemStack; /** * Special achievements have a 'spiked' (on normal texture pack) frame, special achievements are the hardest ones to * achieve. */ private boolean isSpecial; public Achievement(int par1, String par2Str, int par3, int par4, Item par5Item, Achievement par6Achievement) { this(par1, par2Str, par3, par4, new ItemStack(par5Item), par6Achievement); } public Achievement(int par1, String par2Str, int par3, int par4, Block par5Block, Achievement par6Achievement) { this(par1, par2Str, par3, par4, new ItemStack(par5Block), par6Achievement); } public Achievement(int par1, String par2Str, int par3, int par4, ItemStack par5ItemStack, Achievement par6Achievement) { super(0x500000 + par1, (new StringBuilder()).append("achievement.").append(par2Str).toString()); theItemStack = par5ItemStack; achievementDescription = (new StringBuilder()).append("achievement.").append(par2Str).append(".desc").toString(); displayColumn = par3; displayRow = par4; if (par3 < AchievementList.minDisplayColumn) { AchievementList.minDisplayColumn = par3; } if (par4 < AchievementList.minDisplayRow) { AchievementList.minDisplayRow = par4; } if (par3 > AchievementList.maxDisplayColumn) { AchievementList.maxDisplayColumn = par3; } if (par4 > AchievementList.maxDisplayRow) { AchievementList.maxDisplayRow = par4; } parentAchievement = par6Achievement; } /** * Indicates whether or not the given achievement or statistic is independent (i.e., lacks prerequisites for being * update). */ public Achievement setIndependent() { isIndependent = true; return this; } /** * Special achievements have a 'spiked' (on normal texture pack) frame, special achievements are the hardest ones to * achieve. */ public Achievement setSpecial() { isSpecial = true; return this; } /** * Adds the achievement on the internal list of registered achievements, also, it's check for duplicated id's. */ public Achievement registerAchievement() { super.registerStat(); AchievementList.achievementList.add(this); return this; } /** * Register the stat into StatList. */ public StatBase registerStat() { return registerAchievement(); } /** * Initializes the current stat as independent (i.e., lacking prerequisites for being updated) and returns the * current instance. */ public StatBase initIndependentStat() { return setIndependent(); } }
[ "kye.13@hotmail.com" ]
kye.13@hotmail.com
525c889cce9de4c9eb91949cb8cf7ad4b57cadad
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam/Nicad_t1_beam341.java
46b3c4191b9c883cd72b4f6765577d76551fe98f
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
558
java
// clone pairs:2330:80% // 2530:beam/runners/flink/1.5/src/main/java/org/apache/beam/runners/flink/translation/types/CoderTypeSerializer.java public class Nicad_t1_beam341 { public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CoderTypeSerializerConfigSnapshot<?> that = (CoderTypeSerializerConfigSnapshot<?>) o; return coderName != null ? coderName.equals(that.coderName) : that.coderName == null; } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
b3b0f7f6f76f00283d6ee3fd332350592cb9175d
206989531cb57770edb8b2b7079639af4bff5875
/Socialize/demo/src/com/socialize/demo/implementations/twitter/UserTimelineActivity.java
0e1b7aa70dec11613563f7599bb972b03770063f
[]
no_license
jbailey2010/Boozle
543f6bac00423aa34d06013fac97661bff8e7458
3a50809e01708f68f98839f077656934e99651c1
refs/heads/master
2020-04-13T12:30:42.391029
2015-04-21T02:50:38
2015-04-21T02:50:38
16,244,666
2
1
null
null
null
null
UTF-8
Java
false
false
3,539
java
/* * Copyright (c) 2012 Socialize Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.socialize.demo.implementations.twitter; import android.app.Activity; import com.socialize.api.SocializeSession; import com.socialize.demo.SDKDemoActivity; import com.socialize.error.SocializeException; import com.socialize.listener.SocializeAuthListener; import com.socialize.networks.SocialNetwork; import com.socialize.networks.SocialNetworkPostListener; import com.socialize.networks.twitter.TwitterUtils; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; /** * @author Jason Polites * */ public class UserTimelineActivity extends SDKDemoActivity { /* (non-Javadoc) * @see com.socialize.demo.DemoActivity#executeDemo() */ @Override public void executeDemo(String text) { TwitterUtils.link(this, new SocializeAuthListener() { @Override public void onError(SocializeException error) { handleError(UserTimelineActivity.this, error); } @Override public void onCancel() { handleCancel(); } @Override public void onAuthSuccess(SocializeSession session) { TwitterUtils.get(UserTimelineActivity.this, "statuses/user_timeline.json", null, new SocialNetworkPostListener() { @Override public void onNetworkError(Activity context, SocialNetwork network, Exception error) { handleError(context, error); } @Override public void onCancel() { handleCancel(); } @Override public void onAfterPost(Activity parent, SocialNetwork socialNetwork, JSONObject responseObject) { try { JSONArray jsonArray = responseObject.getJSONArray("data"); StringBuilder builder = new StringBuilder(); int len = jsonArray.length(); for (int i = 0; i < len; i++) { if(i > 0) { builder.append("\n"); } builder.append(jsonArray.getString(i)); } handleResult(builder.toString()); } catch (JSONException e) { handleError(parent, e); } } }); } @Override public void onAuthFail(SocializeException error) { handleError(UserTimelineActivity.this, error); } }); } @Override public boolean isTextEntryRequired() { return false; } /* (non-Javadoc) * @see com.socialize.demo.DemoActivity#getButtonText() */ @Override public String getButtonText() { return "Show My Timeline"; } }
[ "bailey27@illinois.edu" ]
bailey27@illinois.edu
d714858f0a3a7441762d7fb47392ce9c9df0fa3d
bd9d83c3470ecde06de79e8ce04f8f2f65664b04
/line/sample-line-webapp/src/main/java/com/github/yukihane/samplelinewebapp/controller/MyController.java
bbf0cb26058f49da793a9d075508b376b3520566
[]
no_license
yukihane/hello-java
b85a482e797892743bb43a60944b3708e87af21d
305c0eb113a41f9c393c35f927fb2183324f2222
refs/heads/main
2023-03-10T08:40:51.328711
2023-01-27T04:47:37
2023-01-27T04:47:37
43,946,811
10
2
null
2023-03-07T05:08:33
2015-10-09T09:44:52
Java
UTF-8
Java
false
false
506
java
package com.github.yukihane.samplelinewebapp.controller; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.oauth2.core.user.OAuth2User; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class MyController { @RequestMapping("/") public OAuth2User welcome(@AuthenticationPrincipal final OAuth2User user) { return user; } }
[ "yukihane.feather@gmail.com" ]
yukihane.feather@gmail.com
2e96d0b7cab5f0ea01644365af44192fdf913ab2
752587440fca334c79c743bc30571abd5980916e
/model/src/main/java/com/melexis/Lot.java
958a7d0812dd39bc0f53d8a9b64fbd517d294bc9
[]
no_license
bhoflack/electronic_wafermapping
135f1cd853f1a547cc1402f1e8054643c73064b2
73fff82f8e4af6cb248f12baecaf741d8601c681
refs/heads/master
2020-05-20T04:24:31.369611
2011-03-03T08:55:56
2011-03-03T08:55:56
1,273,995
0
0
null
null
null
null
UTF-8
Java
false
false
5,295
java
package com.melexis; import java.util.HashSet; import java.util.HashMap; import java.util.Map; import java.util.Set; import static org.apache.commons.lang.Validate.*; public class Lot implements Configurable { private String name; private String item; private String organization; private String probelocation; private String subcontractor; private Set<Wafer> wafers = new HashSet<Wafer>(); private Map<String, String> config = new HashMap<String, String>(); public Lot() {} public Lot(final String name, final String item, final String organization, final String probelocation, final String subcontractor) { this(); this.name = name; this.item = item; this.organization = organization; this.probelocation = probelocation; this.subcontractor = subcontractor; } /** * The order in which the order for the configuration. * The last fields have the most detail. */ public String[] getFieldOrder() { return new String[] { "subcontractor", "probelocation", "organization", "device", "item", "name" }; } public String getDevice() { notNull(item, "The item can't be null!"); isTrue(item.length() >= 9, "The item can't have less then 9 numbers."); return item.substring(2, 7); } public void addWafer(final Wafer w) { wafers.add(w); } public Wafer findWaferWithNumber(final int i) { for (final Wafer w : wafers) { if (w.getWafernumber() == i) { return w; } } throw new IllegalArgumentException("Invalid wafer number"); } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getItem() { return item; } public void setItem(String item) { this.item = item; } public String getOrganization() { return organization; } public void setOrganization(String organization) { this.organization = organization; } public String getProbelocation() { return probelocation; } public void setProbelocation(String probelocation) { this.probelocation = probelocation; } public String getSubcontractor() { return subcontractor; } public void setSubcontractor(String subcontractor) { this.subcontractor = subcontractor; } public Set<Wafer> getWafers() { return wafers; } public void setWafers(Set<Wafer> wafers) { this.wafers = wafers; } public void setConfig(final Map<String, String> config) { this.config = config; } public Map<String, String> getConfig() { return config; } @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("Lot"); sb.append("{name='").append(name).append('\''); sb.append(", item='").append(item).append('\''); sb.append(", organization='").append(organization).append('\''); sb.append(", probelocation='").append(probelocation).append('\''); sb.append(", subcontractor='").append(subcontractor).append('\''); sb.append(", wafers=").append(wafers); sb.append(", config=").append(config); sb.append('}'); return sb.toString(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Lot lot = (Lot) o; if (item != null ? !item.equals(lot.item) : lot.item != null) { return false; } if (name != null ? !name.equals(lot.name) : lot.name != null) { return false; } if (organization != null ? !organization.equals(lot.organization) : lot.organization != null) { return false; } if (probelocation != null ? !probelocation.equals(lot.probelocation) : lot.probelocation != null) { return false; } if (subcontractor != null ? !subcontractor.equals(lot.subcontractor) : lot.subcontractor != null) { return false; } if (wafers != null ? !wafers.equals(lot.wafers) : lot.wafers != null) { return false; } if (config != null ? !config.equals(lot.config) : lot.config != null) { return false; } return true; } @Override public int hashCode() { int result = name != null ? name.hashCode() : 0; result = 31 * result + (item != null ? item.hashCode() : 0); result = 31 * result + (organization != null ? organization.hashCode() : 0); result = 31 * result + (probelocation != null ? probelocation.hashCode() : 0); result = 31 * result + (subcontractor != null ? subcontractor.hashCode() : 0); result = 31 * result + (wafers != null ? wafers.hashCode() : 0); result = 31 * result + (config != null ? config.hashCode() : 0); return result; } }
[ "brh@melexis.com" ]
brh@melexis.com
f66cf7e00256cd226a389555ecc8af53e2c90d56
861af6e8ac42ff1457413fbef1295d51d477b546
/org.goko.core.workspace/src/org/goko/core/workspace/io/xml/XmlURIResourceLocation.java
ea0f3f497f7d239eec9a4110778d3c0f2eccfa6f
[]
no_license
hantomas/Goko
5d7b3804edb592c7fc05a45aa287bb9e0cd74a04
9205afec77507a41f410f379b5036991199024a5
refs/heads/master
2022-01-07T06:19:15.287328
2018-08-23T20:17:03
2018-08-23T20:17:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
556
java
package org.goko.core.workspace.io.xml; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.DerivedType; /** * @author PsyKo * @date 19 mars 2016 */ @DerivedType(parent=XmlResourceLocation.class, name="resource:uri") public class XmlURIResourceLocation extends XmlResourceLocation{ /** The URI of the target resource */ @Attribute private String uri; /** * @return the uri */ public String getUri() { return uri; } /** * @param uri the uri to set */ public void setUri(String uri) { this.uri = uri; } }
[ "contact@goko.fr" ]
contact@goko.fr
928a4982ce6a828e24649b70f0ecb0ccb3e6ba27
ec7cdb58fa20e255c23bc855738d842ee573858f
/java/defpackage/ff.java
ae956e17f5637dc02522cd8e276db96696b50fed
[]
no_license
BeCandid/JaDX
591e0abee58764b0f58d1883de9324bf43b52c56
9a3fa0e7c14a35bc528d0b019f850b190a054c3f
refs/heads/master
2021-01-13T11:23:00.068480
2016-12-24T10:39:48
2016-12-24T10:39:48
77,222,067
1
0
null
null
null
null
UTF-8
Java
false
false
2,748
java
package defpackage; import android.animation.ValueAnimator; import android.graphics.Paint; import android.view.View; import android.view.ViewParent; /* compiled from: ViewCompatHC */ class ff { static long a() { return ValueAnimator.getFrameDelay(); } public static float a(View view) { return view.getAlpha(); } public static void a(View view, int layerType, Paint paint) { view.setLayerType(layerType, paint); } public static int b(View view) { return view.getLayerType(); } public static int a(int size, int measureSpec, int childMeasuredState) { return View.resolveSizeAndState(size, measureSpec, childMeasuredState); } public static int c(View view) { return view.getMeasuredWidthAndState(); } public static int d(View view) { return view.getMeasuredHeightAndState(); } public static int e(View view) { return view.getMeasuredState(); } public static float f(View view) { return view.getTranslationX(); } public static float g(View view) { return view.getTranslationY(); } public static float h(View view) { return view.getScaleX(); } public static void a(View view, float value) { view.setTranslationX(value); } public static void b(View view, float value) { view.setTranslationY(value); } public static void c(View view, float value) { view.setAlpha(value); } public static void d(View view, float value) { view.setScaleX(value); } public static void e(View view, float value) { view.setScaleY(value); } public static void i(View view) { view.jumpDrawablesToCurrentState(); } public static void a(View view, boolean enabled) { view.setSaveFromParentEnabled(enabled); } public static void b(View view, boolean activated) { view.setActivated(activated); } public static int a(int curState, int newState) { return View.combineMeasuredStates(curState, newState); } static void a(View view, int offset) { view.offsetTopAndBottom(offset); ff.j(view); ViewParent parent = view.getParent(); if (parent instanceof View) { ff.j((View) parent); } } static void b(View view, int offset) { view.offsetLeftAndRight(offset); ff.j(view); ViewParent parent = view.getParent(); if (parent instanceof View) { ff.j((View) parent); } } private static void j(View view) { float y = view.getTranslationY(); view.setTranslationY(1.0f + y); view.setTranslationY(y); } }
[ "admin@timo.de.vc" ]
admin@timo.de.vc
80fd83c4212453de1faf70d4d0aedd1e2c8c3288
67fa6dce2ce8837a4482a78f782da81fcde63140
/LearnMybatis/src/main/java/com/csl/dao/impl/UsersMapperImpl.java
2ca5a61f2ccdd385a0ed85b020c0893677c27206
[]
no_license
gituserchenshuangliang/GitRepository
d6d94e6e182960dde749421134f3813fdc675522
dc429b1f8b7777edc85a88da0bf3234e8d24f5fc
refs/heads/master
2020-03-27T03:02:03.412011
2018-08-27T02:48:08
2018-08-27T02:48:08
145,834,614
0
0
null
null
null
null
UTF-8
Java
false
false
1,238
java
package com.csl.dao.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import com.alibaba.dubbo.config.annotation.Service; import com.csl.dao.UsersMapper; import com.csl.entity.Users; import com.csl.entity.UsersExample; import com.csl.inter.UsersInter; @Service public class UsersMapperImpl implements UsersInter { @Autowired private UsersMapper usersMapper; @Override public long countByExample(UsersExample example) { return usersMapper.countByExample(example); } @Override public int deleteByExample(UsersExample example) { return usersMapper.deleteByExample(example); } @Override public int insert(Users record) { return usersMapper.insert(record); } @Override public int insertSelective(Users record) { return usersMapper.insertSelective(record); } @Override public List<Users> selectByExample(UsersExample example) { return usersMapper.selectByExample(example); } @Override public int updateByExampleSelective(Users record, UsersExample example) { return usersMapper.updateByExampleSelective(record, example); } @Override public int updateByExample(Users record, UsersExample example) { return usersMapper.updateByExample(record, example); } }
[ "=" ]
=
b7ea1c572d3fc7196eb20db01eebd2171693a1af
5c1fa085ef9616bed11ec5fee035676783660c9d
/src/main/java/com/example/demo/config/MvcConfig.java
be27203d8a9625c174d8b9f55162a067bebf5153
[]
no_license
h5dde45/WB_220818
60cb4a8b40d63ef1cc4af3d4debb876aa3676837
26471273517ecd5b7caa6c40b81d5990606f7b8c
refs/heads/master
2020-03-27T04:42:40.698863
2018-08-30T12:57:58
2018-08-30T12:57:58
145,962,458
0
0
null
null
null
null
UTF-8
Java
false
false
1,190
java
package com.example.demo.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.client.RestTemplate; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration public class MvcConfig implements WebMvcConfigurer { @Value("${upload.path}") private String uploadPath; @Bean public RestTemplate getRestTemplate(){ return new RestTemplate(); } public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/login").setViewName("login"); } @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/img/**") .addResourceLocations("file:///" + uploadPath + "/"); registry.addResourceHandler("/static/**") .addResourceLocations("classpath:/static/"); } }
[ "tmvf@yandex.ru" ]
tmvf@yandex.ru
ee5452c60c4fef8d6e47692a04914d0a2ee920ee
882d3591752a93792bd8c734dd91b1e5439c5ffe
/android/QNLiveShow/liveshowApp/src/main/java/com/qpidnetwork/livemodule/httprequest/item/IntToEnumUtils.java
ba8f13b51203719ffe86547ff0630a59b01c4e36
[]
no_license
KingsleyYau/LiveClient
f4d4d2ae23cbad565668b1c4d9cd849ea5ca2231
cdd2694ddb4f1933bef40c5da3cc7d1de8249ae2
refs/heads/master
2022-10-15T13:01:57.566157
2022-09-22T07:37:05
2022-09-22T07:37:05
93,734,517
27
14
null
null
null
null
UTF-8
Java
false
false
2,384
java
package com.qpidnetwork.livemodule.httprequest.item; import com.qpidnetwork.livemodule.im.listener.IMClientListener; import java.util.ArrayList; import java.util.List; /** * Created by Hunter Mun on 2017/9/26. */ public class IntToEnumUtils { /** * Jni整形装Java enum * @param interestType * @return */ public static InterestType intToInterestType(int interestType){ InterestType interet = InterestType.unknown; if( interestType < 0 || interestType >= InterestType.values().length ) { interet = InterestType.unknown; } else { interet = InterestType.values()[interestType]; } return interet; } /** * 兴趣爱好数组转兴趣enum List * @param interests * @return */ public static List<InterestType> intArrayToInterestTypeList(int[] interests){ List<InterestType> interestList = new ArrayList<InterestType>(); if(interests != null){ for(int type : interests){ InterestType temp = intToInterestType(type); //屏蔽无效不识别的兴趣 if(temp != InterestType.unknown) { interestList.add(temp); } } } return interestList; } /** * Jni整形装Java enum * @param errType * @return */ public static HttpLccErrType intToHttpErrorType(int errType){ HttpLccErrType httpErrorType = HttpLccErrType.HTTP_LCC_ERR_FAIL; if( errType < 0 || errType >= HttpLccErrType.values().length ) { httpErrorType = HttpLccErrType.HTTP_LCC_ERR_FAIL; } else { httpErrorType = HttpLccErrType.values()[errType]; } return httpErrorType; } /** * int status 转 enum * @param status * @return */ public static HangoutInviteStatus intToHangoutInviteStatus(int status){ HangoutInviteStatus hangoutInviteStatus = HangoutInviteStatus.Unknown; if( status < 0 || status >= HangoutInviteStatus.values().length ) { hangoutInviteStatus = HangoutInviteStatus.Unknown; } else { hangoutInviteStatus = HangoutInviteStatus.values()[status]; } return hangoutInviteStatus; } }
[ "Kingsleyyau@gmail.com" ]
Kingsleyyau@gmail.com
11f8bb1d73c32d3e53824c3652100030c345a03a
efb7efbbd6baa5951748dfbe4139e18c0c3608be
/sources/org/bitcoinj/core/UnsafeByteArrayOutputStream.java
ac4e5009332cc63f94270135c6c0a1f528ce9a0a
[]
no_license
blockparty-sh/600302-1_source_from_JADX
08b757291e7c7a593d7ec20c7c47236311e12196
b443bbcde6def10895756b67752bb1834a12650d
refs/heads/master
2020-12-31T22:17:36.845550
2020-02-07T23:09:42
2020-02-07T23:09:42
239,038,650
0
0
null
null
null
null
UTF-8
Java
false
false
1,685
java
package org.bitcoinj.core; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; public class UnsafeByteArrayOutputStream extends ByteArrayOutputStream { public UnsafeByteArrayOutputStream() { super(32); } public UnsafeByteArrayOutputStream(int i) { super(i); } public void write(int i) { int i2 = this.count + 1; if (i2 > this.buf.length) { this.buf = C3447Utils.copyOf(this.buf, Math.max(this.buf.length << 1, i2)); } this.buf[this.count] = (byte) i; this.count = i2; } public void write(byte[] bArr, int i, int i2) { if (i >= 0 && i <= bArr.length && i2 >= 0) { int i3 = i + i2; if (i3 <= bArr.length && i3 >= 0) { if (i2 != 0) { int i4 = this.count + i2; if (i4 > this.buf.length) { this.buf = C3447Utils.copyOf(this.buf, Math.max(this.buf.length << 1, i4)); } System.arraycopy(bArr, i, this.buf, this.count, i2); this.count = i4; return; } return; } } throw new IndexOutOfBoundsException(); } public void writeTo(OutputStream outputStream) throws IOException { outputStream.write(this.buf, 0, this.count); } public void reset() { this.count = 0; } public byte[] toByteArray() { return this.count == this.buf.length ? this.buf : C3447Utils.copyOf(this.buf, this.count); } public int size() { return this.count; } }
[ "hello@blockparty.sh" ]
hello@blockparty.sh
facc92ce31b1f21fc8fc30aeaf521779cc99c56a
9fb0737aff646f7d1781a28235a9a7f0ede7dcc0
/src/main/java/com/softwareverde/devtokens/configuration/DatabaseProperties.java
ef6f7e241745f236fc56df1a08761827dc028c0c
[ "MIT" ]
permissive
SoftwareVerde/dev-tokens
4c73719f3fa591fc531c00a5bbc4317291f8e77a
143ead7c0c05eb3bcb850f452d562ad5bc82a12c
refs/heads/master
2023-03-05T23:15:38.775029
2021-02-08T23:14:53
2021-02-08T23:14:53
336,951,128
1
0
null
null
null
null
UTF-8
Java
false
false
1,363
java
package com.softwareverde.devtokens.configuration; import com.softwareverde.database.properties.MutableDatabaseProperties; import java.io.File; public class DatabaseProperties extends MutableDatabaseProperties { protected Boolean _shouldUseEmbeddedDatabase; protected File _dataDirectory; protected File _installationDirectory; public DatabaseProperties() { } public DatabaseProperties(final DatabaseProperties databaseProperties) { super(databaseProperties); _shouldUseEmbeddedDatabase = databaseProperties.shouldUseEmbeddedDatabase(); _dataDirectory = databaseProperties.getDataDirectory(); _installationDirectory = databaseProperties.getInstallationDirectory(); } public Boolean shouldUseEmbeddedDatabase() { return _shouldUseEmbeddedDatabase; } public File getDataDirectory() { return _dataDirectory; } public File getInstallationDirectory() { return _installationDirectory; } public void setShouldUseEmbeddedDatabase(final Boolean shouldUseEmbeddedDatabase) { _shouldUseEmbeddedDatabase = shouldUseEmbeddedDatabase; } public void setDataDirectory(final File dataDirectory) { _dataDirectory = dataDirectory; } public void setInstallationDirectory(final File installationDirectory) { _installationDirectory = installationDirectory; } }
[ "josh@softwareverde.com" ]
josh@softwareverde.com
33629732604a5449b1dd2e53982c726cad6ae3de
b83c321c54b299e4c3cfc620e3002372e3a83f48
/src/main/java/com/epam/tariffs/parsing/InvalidFileToParsingException.java
c18e51f4843d4ec3420da3e44400d833787b664f
[]
no_license
kononir/tariffsParsing
33c87d5f9b86a2471711c7d0bc81da3e3b0f148c
4d9671bbdc2e8da65b3d207cd77f222b3ec3cde3
refs/heads/master
2020-04-25T16:39:03.889948
2019-03-05T13:54:03
2019-03-05T13:54:03
172,916,722
0
0
null
null
null
null
UTF-8
Java
false
false
189
java
package com.epam.tariffs.parsing; public class InvalidFileToParsingException extends Exception { public InvalidFileToParsingException(String message) { super(message); } }
[ "novlad26@gmail.com" ]
novlad26@gmail.com
b362c3a76eee483f22cb02b92112fc175264de18
48bf8cca600aa538ec981e3d13ef0dd0133c0840
/clas-scigraph/src/main/java/org/jlab/scichart/canvas/ChartCanvasPads.java
9e487b033f5d0742ced387bc4ff8a1106fac9ef4
[]
no_license
theodoregoetz/clas12
e2a0b897373cc3b5831328b0243e6d0cc6cb3d6e
b521ce30436bba446ba99964c3bb7fe0d4e2be14
refs/heads/master
2021-01-15T08:42:19.668906
2015-08-13T15:16:27
2015-08-13T15:16:27
36,526,252
1
0
null
2015-08-07T18:58:09
2015-05-29T20:03:25
Java
UTF-8
Java
false
false
2,222
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package org.jlab.scichart.canvas; import java.util.ArrayList; /** * * @author gavalian */ public class ChartCanvasPads { private int numColumns = 1; private int numRows = 1; private ArrayList<Double> positionX = new ArrayList<Double>(); private ArrayList<Double> positionY = new ArrayList<Double>(); private ArrayList<Double> heights = new ArrayList<Double>(); private ArrayList<Double> widths = new ArrayList<Double>(); private int sizeWidth = 100; private int sizeHeight = 100; public ChartCanvasPads(){ } public double getX(int index) { return positionX.get(index);} public double getY(int index) { return positionY.get(index);} public double getWidth(int index) { return widths.get(index);} public double getHeight(int index) { return heights.get(index);} public void divide(int columns, int rows){ numColumns = columns; numRows = rows; this.updateCoordinates(); } public void setSize(int w, int h){ sizeWidth = w; sizeHeight = h; this.updateCoordinates(); } public void setSize(int w, int h,int ncol, int nrow){ numColumns = ncol; numRows = nrow; sizeWidth = w; sizeHeight = h; this.updateCoordinates(); } public int getNPads(){ return numColumns*numRows; } private void updateCoordinates(){ positionX.clear(); positionY.clear(); widths.clear(); heights.clear(); //System.err.print(" graph Pad " + numColumns + " " + numRows); for(int ir = 0; ir < numRows; ir++){ for(int ic = 0; ic < numColumns; ic++){ positionX.add( (double) ic*sizeWidth/numColumns); positionY.add( (double) ir*sizeHeight/numRows); widths.add((double) sizeWidth/numColumns ); heights.add((double) sizeHeight/numRows); } } } }
[ "gavalian@meson.jlab.org" ]
gavalian@meson.jlab.org