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
f18ce4f7a52ad70a9d20315735ebfd1f6fb2cb98
1fb3757d9ee82d86bb66cd3a7a4ae5039876baa7
/tre-am/tre-am-master/src/br/jus/tream/saude/DTO/GuiaProcedimentoParamsDTO.java
537abdef5059ac4c14798f8e5ac29c5feffea194
[]
no_license
brancoisrael/ctis
0443ac12683ed12a1c40d68e4128871edf51daf5
828cfd76dc33935f38bf396f4f8263b12751ba85
refs/heads/master
2021-06-28T01:39:36.875411
2021-06-03T03:41:07
2021-06-03T03:41:07
232,383,272
0
0
null
null
null
null
UTF-8
Java
false
false
5,756
java
package br.jus.tream.saude.DTO; import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; public class GuiaProcedimentoParamsDTO implements Serializable { private static final long serialVersionUID = -669124188008707564L; private Long numeroGuia; private String anoExercicio; private Short idSituacaoGuia; private BigDecimal valor; private String nomeProcedimento; private LocalDate dataInicial; private String dataInicialString; private LocalDate dataFinal; private String dataFinalString; private Long idCredenciada; private Long idTabela; private String codProcedimento; public GuiaProcedimentoParamsDTO() { } public Long getNumeroGuia() { return numeroGuia; } public void setNumeroGuia(Long numeroGuia) { this.numeroGuia = numeroGuia; } public String getAnoExercicio() { return anoExercicio; } public void setAnoExercicio(String anoExercicio) { this.anoExercicio = anoExercicio; } public Short getIdSituacaoGuia() { return idSituacaoGuia; } public void setIdSituacaoGuia(Short idSituacaoGuia) { this.idSituacaoGuia = idSituacaoGuia; } public BigDecimal getValor() { return valor; } public void setValor(BigDecimal valor) { this.valor = valor; } public String getNomeProcedimento() { return nomeProcedimento; } public void setNomeProcedimento(String nomeProcedimento) { this.nomeProcedimento = nomeProcedimento; } public LocalDate getDataInicial() { return dataInicial; } public void setDataInicial(LocalDate dataInicial) { this.dataInicial = dataInicial; } public LocalDate getDataFinal() { return dataFinal; } public void setDataFinal(LocalDate dataFinal) { this.dataFinal = dataFinal; } public Long getIdCredenciada() { return idCredenciada; } public void setIdCredenciada(Long idCredenciada) { this.idCredenciada = idCredenciada; } public Long getIdTabela() { return idTabela; } public void setIdTabela(Long idTabela) { this.idTabela = idTabela; } public String getCodProcedimento() { return codProcedimento; } public void setCodProcedimento(String codProcedimento) { this.codProcedimento = codProcedimento; } public String getDataInicialString() { return dataInicialString; } public void setDataInicialString(String dataInicialString) { this.dataInicialString = dataInicialString; } public String getDataFinalString() { return dataFinalString; } public void setDataFinalString(String dataFinalString) { this.dataFinalString = dataFinalString; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((anoExercicio == null) ? 0 : anoExercicio.hashCode()); result = prime * result + ((codProcedimento == null) ? 0 : codProcedimento.hashCode()); result = prime * result + ((dataFinal == null) ? 0 : dataFinal.hashCode()); result = prime * result + ((dataFinalString == null) ? 0 : dataFinalString.hashCode()); result = prime * result + ((dataInicial == null) ? 0 : dataInicial.hashCode()); result = prime * result + ((dataInicialString == null) ? 0 : dataInicialString.hashCode()); result = prime * result + ((idCredenciada == null) ? 0 : idCredenciada.hashCode()); result = prime * result + ((idSituacaoGuia == null) ? 0 : idSituacaoGuia.hashCode()); result = prime * result + ((idTabela == null) ? 0 : idTabela.hashCode()); result = prime * result + ((nomeProcedimento == null) ? 0 : nomeProcedimento.hashCode()); result = prime * result + ((numeroGuia == null) ? 0 : numeroGuia.hashCode()); result = prime * result + ((valor == null) ? 0 : valor.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; GuiaProcedimentoParamsDTO other = (GuiaProcedimentoParamsDTO) obj; if (anoExercicio == null) { if (other.anoExercicio != null) return false; } else if (!anoExercicio.equals(other.anoExercicio)) return false; if (codProcedimento == null) { if (other.codProcedimento != null) return false; } else if (!codProcedimento.equals(other.codProcedimento)) return false; if (dataFinal == null) { if (other.dataFinal != null) return false; } else if (!dataFinal.equals(other.dataFinal)) return false; if (dataFinalString == null) { if (other.dataFinalString != null) return false; } else if (!dataFinalString.equals(other.dataFinalString)) return false; if (dataInicial == null) { if (other.dataInicial != null) return false; } else if (!dataInicial.equals(other.dataInicial)) return false; if (dataInicialString == null) { if (other.dataInicialString != null) return false; } else if (!dataInicialString.equals(other.dataInicialString)) return false; if (idCredenciada == null) { if (other.idCredenciada != null) return false; } else if (!idCredenciada.equals(other.idCredenciada)) return false; if (idSituacaoGuia == null) { if (other.idSituacaoGuia != null) return false; } else if (!idSituacaoGuia.equals(other.idSituacaoGuia)) return false; if (idTabela == null) { if (other.idTabela != null) return false; } else if (!idTabela.equals(other.idTabela)) return false; if (nomeProcedimento == null) { if (other.nomeProcedimento != null) return false; } else if (!nomeProcedimento.equals(other.nomeProcedimento)) return false; if (numeroGuia == null) { if (other.numeroGuia != null) return false; } else if (!numeroGuia.equals(other.numeroGuia)) return false; if (valor == null) { if (other.valor != null) return false; } else if (!valor.equals(other.valor)) return false; return true; } }
ee99ab852653ff7611ea5a3766009d7c2b5302b6
5ed62f088f324352bd878f58788ebeb0ffe5cd2a
/src/main/java/org/assertj/core/error/ShouldBeInSameYear.java
04e8da2d4a62c39eedbf6c784b81559e82ddd1c0
[ "Apache-2.0" ]
permissive
jstrachan/assertj-core
85f7355f8d41c5dfb6c27f0bbe8d576fa4042273
ac9e201c22c1a7132005bbb9e728ef0bfe2c89cc
refs/heads/master
2020-12-31T07:19:04.828438
2016-04-09T22:15:20
2016-04-09T22:15:20
56,042,912
0
1
null
2016-04-12T07:58:10
2016-04-12T07:58:09
null
UTF-8
Java
false
false
1,459
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. * * Copyright 2012-2016 the original author or authors. */ package org.assertj.core.error; import java.util.Date; /** * Creates an error message indicating that an assertion that verifies that a {@link Date} is in same year as another one failed. * * @author Joel Costigliola */ public class ShouldBeInSameYear extends BasicErrorMessageFactory { /** * Creates a new </code>{@link ShouldBeInSameYear}</code>. * @param actual the actual value in the failed assertion. * @param other the value used in the failed assertion to compare the actual value to. * @return the created {@code ErrorMessageFactory}. */ public static ErrorMessageFactory shouldBeInSameYear(Date actual, Date other) { return new ShouldBeInSameYear(actual, other); } private ShouldBeInSameYear(Date actual, Date other) { super("%nExpecting:%n <%s>%nto be on same year as:%n <%s>", actual, other); } }
449f3e41b53c58b516d1589fec5e2d89f71bcdb1
88fa5202233b149f24aa1640125fcbd7d8c2e9a5
/src/main/java/concurrence/longguo/providerConsumer/Tmall.java
2704ae4af283c9cab400b43e460139054dc4355e
[]
no_license
never123450/the-data-structure
03c89c12a0e12d52d43dd2e83a0ea90a1fbe33dd
3ca52debe2e00c1e66dbd0dde29b1a9942f471e7
refs/heads/master
2020-04-17T00:04:31.576460
2019-01-24T14:11:55
2019-01-24T14:11:55
166,036,311
0
0
null
null
null
null
UTF-8
Java
false
false
1,069
java
package concurrence.longguo.providerConsumer; public class Tmall { private int count; public final int MAX_COUNT = 10; public synchronized void push() { while (count > MAX_COUNT) { System.out.println(Thread.currentThread().getName() + "库存数量达到上限" ); try { wait(); } catch (InterruptedException e) { e.printStackTrace(); } } count++; System.out.println(Thread.currentThread().getName() + "生产者生产,当前库存为:" + count); notifyAll(); } public synchronized void take() { while (count <= 0) { System.out.println(Thread.currentThread().getName() + "库存数量为0" ); try { wait(); } catch (InterruptedException e) { e.printStackTrace(); } } count--; System.out.println(Thread.currentThread().getName() + "消费者消费,当前库存为:" + count); notifyAll(); } }
70fe61b1d381d030573c93e6f97f28d68369f2e3
f0568343ecd32379a6a2d598bda93fa419847584
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201402/cm/AdGroupBidModifierService.java
8a03c47ff597d47cafa0802db986eff5e7788652
[ "Apache-2.0" ]
permissive
frankzwang/googleads-java-lib
bd098b7b61622bd50352ccca815c4de15c45a545
0cf942d2558754589a12b4d9daa5902d7499e43f
refs/heads/master
2021-01-20T23:20:53.380875
2014-07-02T19:14:30
2014-07-02T19:14:30
21,526,492
1
0
null
null
null
null
UTF-8
Java
false
false
3,044
java
package com.google.api.ads.adwords.jaxws.v201402.cm; import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceFeature; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.4-b01 * Generated source version: 2.1 * */ @WebServiceClient(name = "AdGroupBidModifierService", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201402", wsdlLocation = "https://adwords.google.com/api/adwords/cm/v201402/AdGroupBidModifierService?wsdl") public class AdGroupBidModifierService extends Service { private final static URL ADGROUPBIDMODIFIERSERVICE_WSDL_LOCATION; private final static WebServiceException ADGROUPBIDMODIFIERSERVICE_EXCEPTION; private final static QName ADGROUPBIDMODIFIERSERVICE_QNAME = new QName("https://adwords.google.com/api/adwords/cm/v201402", "AdGroupBidModifierService"); static { URL url = null; WebServiceException e = null; try { url = new URL("https://adwords.google.com/api/adwords/cm/v201402/AdGroupBidModifierService?wsdl"); } catch (MalformedURLException ex) { e = new WebServiceException(ex); } ADGROUPBIDMODIFIERSERVICE_WSDL_LOCATION = url; ADGROUPBIDMODIFIERSERVICE_EXCEPTION = e; } public AdGroupBidModifierService() { super(__getWsdlLocation(), ADGROUPBIDMODIFIERSERVICE_QNAME); } public AdGroupBidModifierService(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName); } /** * * @return * returns AdGroupBidModifierServiceInterface */ @WebEndpoint(name = "AdGroupBidModifierServiceInterfacePort") public AdGroupBidModifierServiceInterface getAdGroupBidModifierServiceInterfacePort() { return super.getPort(new QName("https://adwords.google.com/api/adwords/cm/v201402", "AdGroupBidModifierServiceInterfacePort"), AdGroupBidModifierServiceInterface.class); } /** * * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. * @return * returns AdGroupBidModifierServiceInterface */ @WebEndpoint(name = "AdGroupBidModifierServiceInterfacePort") public AdGroupBidModifierServiceInterface getAdGroupBidModifierServiceInterfacePort(WebServiceFeature... features) { return super.getPort(new QName("https://adwords.google.com/api/adwords/cm/v201402", "AdGroupBidModifierServiceInterfacePort"), AdGroupBidModifierServiceInterface.class, features); } private static URL __getWsdlLocation() { if (ADGROUPBIDMODIFIERSERVICE_EXCEPTION!= null) { throw ADGROUPBIDMODIFIERSERVICE_EXCEPTION; } return ADGROUPBIDMODIFIERSERVICE_WSDL_LOCATION; } }
6962fd5b4b1855eb33d3f8e97ff673932365ec7e
bdb880513a6d1333b3251e8986fbaa9411b049e8
/qmt-tlive/qmt-tlive-rpc-core/src/main/java/com/lesports/qmt/tlive/cache/TVoteCache.java
d9abad260f85d2cdbb74110ce283f5b914c2bb9b
[]
no_license
wang-shun/qmt
fe937cffe59781815fdefccdfa88362cef68b113
c3c2e6a1bd9b4f3d852a698f64b6831b977093d1
refs/heads/master
2020-04-12T23:23:29.066091
2018-12-17T12:51:58
2018-12-17T12:51:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
595
java
package com.lesports.qmt.tlive.cache; import com.lesports.qmt.tlive.api.dto.TVote; import com.lesports.repository.LeCrudRepository; /** * Created by lufei1 on 2015/9/16. */ public interface TVoteCache extends LeCrudRepository<TVote, Long> { /** * 增加投票 * * @param voteId * @param optionId * @return */ public int incrVoteNum(long voteId, long optionId); /** * 获取投票数 * * @param voteId * @param optionId * @return */ public int getVoteNum(long voteId, long optionId); }
def47e4b42961ff85ef4381e210bf9ee97841434
56710f14a5b450e5b61ec40725453a3e7229af31
/LeetCode/src/main/java/com/binea/www/leetcodepractice/algorithm/LongestWordInDictionary.java
d2a1b83796acc2fc215956f1ed7dd17e18078bb6
[]
no_license
xu6148152/Algorithm-Practice
f9885707a1dde6841681be0e8e3849af79ce8da8
f7d7c3303773a7f935e8e332549e009fdf80688a
refs/heads/master
2022-08-09T07:08:05.193441
2022-08-01T11:49:39
2022-08-01T11:49:39
49,108,802
0
0
null
null
null
null
UTF-8
Java
false
false
3,407
java
package com.binea.www.leetcodepractice.algorithm; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; /** * Created by binea on 3/9/17. */ public class LongestWordInDictionary { /** * Given a string and a string dictionary, find the longest string in the dictionary that can be formed by deleting some characters of the given string. If there are more than one possible results, return the longest word with the smallest lexicographical order. If there is no possible result, return the empty string. * <p> * Example 1: * Input: * s = "abpcplea", d = ["ale","apple","monkey","plea"] * <p> * Output: * "apple" * Example 2: * Input: * s = "abpcplea", d = ["a","b","c"] * <p> * Output: * "a" * Note: * All the strings in the input will only contain lower-case letters. * The size of the dictionary won't exceed 1,000. * The length of all the strings in the input won't exceed 1,000. * * @param s * @param d * @return */ public String findLongestWord(String s, List<String> d) { String longest = ""; for (String dictWord : d) { int i = 0; for (char c : s.toCharArray()) { if (i < dictWord.length() && c == dictWord.charAt(i)) i++; } if (i == dictWord.length() && dictWord.length() >= longest.length()) { if (dictWord.length() > longest.length() || dictWord.compareTo(longest) < 0) { longest = dictWord; } } } return longest; } public String findLongestWord_35ms(String s, List<String> d) { if (s == null || d == null) return ""; Collections.sort(d, new Comparator<String>() { public int compare(String a, String b) { if (a.length() != b.length()) return b.length() - a.length(); else return a.compareTo(b); } }); char[] searchingWord = s.toCharArray(); char[] wordinDictionary; int i, j; for (String word : d) { wordinDictionary = word.toCharArray(); j = 0; i = 0; while (j < searchingWord.length && i < wordinDictionary.length) { while (j < searchingWord.length && wordinDictionary[i] != searchingWord[j]) j++; if (j < searchingWord.length && searchingWord[j] == wordinDictionary[i]) i++; j++; } if (i >= wordinDictionary.length) return new String(wordinDictionary); } return ""; } public String findLongestWord_17ms(String s, List<String> d) { String longest = ""; for (String word : d) if (isBetter(word, longest) && isSubsequence(word, s)) longest = word; return longest; } private boolean isBetter(String a, String b) { return a.length() > b.length() || a.length() == b.length() && a.compareTo(b) < 0; } private boolean isSubsequence(String a, String b) { int start = -1; for (int i = 0; i < a.length(); i++) { start = b.indexOf(a.charAt(i), start + 1); if (start < 0) return false; } return true; } }
fa9b1f273ffe7aa82f8c1fe26b4d01afc5fbced7
d01ddc583cd4077dcf8cf338fcf2897908daa4ad
/jooby/src/main/java/org/jooby/internal/routes/CorsHandler.java
ef51180e8f9da00cdb9f98c5825ec70123656901
[ "Apache-2.0" ]
permissive
gustvn/jooby
61656793a2a8e753d962dffe414a8c668735c94c
d039d466be272c0c35a8ca9c78df4e04a27fc2f5
refs/heads/master
2021-01-24T16:48:43.300086
2015-07-30T19:42:29
2015-07-30T19:42:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,057
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.jooby.internal.routes; import static java.util.Objects.requireNonNull; import java.util.Collections; import java.util.List; import java.util.Optional; import org.jooby.Cors; import org.jooby.Request; import org.jooby.Response; import org.jooby.Route; import org.jooby.Route.Chain; import org.jooby.Status; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.base.Joiner; import com.google.common.base.Splitter; public class CorsHandler implements Route.Filter { private static final String ORIGIN = "Origin"; private static final String ANY_ORIGIN = "*"; private static final String AC_REQUEST_METHOD = "Access-Control-Request-Method"; private static final String AC_REQUEST_HEADERS = "Access-Control-Request-Headers"; private static final String AC_MAX_AGE = "Access-Control-Max-Age"; private static final String AC_EXPOSE_HEADERS = "Access-Control-Expose-Headers"; private static final String AC_ALLOW_ORIGIN = "Access-Control-Allow-Origin"; private static final String AC_ALLOW_HEADERS = "Access-Control-Allow-Headers"; private static final String AC_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials"; private static final String AC_ALLOW_METHODS = "Access-Control-Allow-Methods"; /** The logging system. */ private final Logger log = LoggerFactory.getLogger(Cors.class); private Optional<Cors> cors; public CorsHandler(final Optional<Cors> cors) { this.cors = requireNonNull(cors, "Cors is required."); } @Override public void handle(final Request req, final Response rsp, final Chain chain) throws Exception { Optional<String> origin = req.header("Origin").toOptional(); Cors cors = this.cors.orElseGet(() -> req.require(Cors.class)); if (cors.enabled() && origin.isPresent()) { cors(cors, req, rsp, origin.get()); } chain.next(req, rsp); } private void cors(final Cors cors, final Request req, final Response rsp, final String origin) throws Exception { if (cors.allowOrigin(origin)) { log.debug("allowed origin: {}", origin); if (preflight(req)) { log.debug("handling preflight for: {}", origin); preflight(cors, req, rsp, origin); } else { log.debug("handling simple cors for: {}", origin); if ("null".equals(origin)) { rsp.header(AC_ALLOW_ORIGIN, ANY_ORIGIN); } else { rsp.header(AC_ALLOW_ORIGIN, origin); if (!cors.anyOrigin()) { rsp.header("Vary", ORIGIN); } if (cors.credentials()) { rsp.header(AC_ALLOW_CREDENTIALS, true); } if (!cors.exposedHeaders().isEmpty()) { rsp.header(AC_EXPOSE_HEADERS, join(cors.exposedHeaders())); } } } } } private boolean preflight(final Request req) { return req.method().equals("OPTIONS") && req.header(AC_REQUEST_METHOD).isSet(); } private void preflight(final Cors cors, final Request req, final Response rsp, final String origin) { /** * Allowed method */ boolean allowMethod = req.header(AC_REQUEST_METHOD).toOptional() .map(cors::allowMethod) .orElse(false); if (!allowMethod) { return; } /** * Allowed headers */ List<String> headers = req.header(AC_REQUEST_HEADERS).toOptional().map(header -> Splitter.on(',').trimResults().omitEmptyStrings().splitToList(header) ).orElse(Collections.emptyList()); if (!cors.allowHeaders(headers)) { return; } /** * Allowed methods */ rsp.header(AC_ALLOW_METHODS, join(cors.allowedMethods())); List<String> allowedHeaders = cors.anyHeader() ? headers : cors.allowedHeaders(); rsp.header(AC_ALLOW_HEADERS, join(allowedHeaders)); /** * Allow credentials */ if (cors.credentials()) { rsp.header(AC_ALLOW_CREDENTIALS, true); } if (cors.maxAge() > 0) { rsp.header(AC_MAX_AGE, cors.maxAge()); } rsp.header(AC_ALLOW_ORIGIN, origin); if (!cors.anyOrigin()) { rsp.header("Vary", ORIGIN); } rsp.status(Status.OK).end(); } private String join(final List<String> values) { return Joiner.on(',').join(values); } }
09609a078b9566e2f49df9cda126c4d0df7d9a91
44316a54755e5ee4118a3e82352094ea3a35358f
/no.sintef.bvr.table.resolution/src/no/sintef/bvr/table/resolution/custom/VirtualVClassifierImpl.java
73a9ac03f6303138ae17380150d28d665bb6cccb
[]
no_license
vassik/bvr
98a811ae7d21fbe5ea0701d04891d28b129f9e9b
3fa1a48d401aa29fabcd5ea4153c696e7e39da0e
refs/heads/master
2020-05-25T13:35:27.784701
2015-04-29T13:22:36
2015-04-29T13:22:36
34,623,094
0
0
null
2015-04-26T17:41:13
2015-04-26T17:41:12
null
UTF-8
Java
false
false
2,854
java
/** */ package no.sintef.bvr.table.resolution.custom; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import bvr.BvrPackage; import bvr.VSpecResolution; import bvr.impl.VSpecResolutionImpl; /** * <!-- begin-user-doc --> An implementation of the model object ' * <em><b>VirtualVClassifier</b></em>'. <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link no.sintef.bvr.model.impl.VInstanceImpl#getType <em>Type</em>}</li> * </ul> * </p> * * @generated NOT */ public class VirtualVClassifierImpl extends VSpecResolutionImpl implements VirtualVClassifier { /** * The cached value of the '{@link #getType() <em>Type</em>}' reference. * <!-- begin-user-doc --> <!-- end-user-doc --> * * @see #getType() * @generated NOT * @ordered */ protected VSpecResolution parent; /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated NOT */ protected VirtualVClassifierImpl() { super(); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated NOT */ @Override protected EClass eStaticClass() { // This class is not in Bvr Model return null; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ public VSpecResolution getParent() { if (parent != null && parent.eIsProxy()) { InternalEObject oldType = (InternalEObject) parent; parent = (VSpecResolution) eResolveProxy(oldType); if (parent != oldType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, BvrPackage.VINSTANCE__TYPE, oldType, parent)); } } return parent; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ public VSpecResolution basicGetParent() { return parent; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ public void setParent(VSpecResolution newParent) { parent = newParent; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated NOT */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated NOT */ @Override public void eSet(int featureID, Object newValue) { super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated NOT */ @Override public void eUnset(int featureID) { super.eUnset(featureID); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated NOT */ @Override public boolean eIsSet(int featureID) { return super.eIsSet(featureID); } } // VirtualVClassifierImpl
c9e5dd292a95beef2c9e8a48a4076a9859d5f8c3
bfb18fb441a97e4091eba85b0afff6d4d254337c
/2.JavaCore/src/com/javarush/task/task15/task1503/Solution.java
a2ce54acc6cab9dbfc54c4ff0453232d4ca972e1
[]
no_license
HappyRomio/JavaRushTasks
75a184f890e08d8b821594e65bbd4f8a5ac3df4b
4e0936eb6faacf170042b3a20ded5a589698486c
refs/heads/master
2021-04-17T09:55:07.472906
2020-03-23T13:37:31
2020-03-23T13:37:31
249,435,804
0
1
null
null
null
null
UTF-8
Java
false
false
1,463
java
package com.javarush.task.task15.task1503; /* ООП - машинки */ public class Solution { public static void main(String[] args) { new Solution.LuxuriousCar().printlnDesire(); new Solution.CheapCar().printlnDesire(); new Solution.Ferrari().printlnDesire(); new Solution.Lanos().printlnDesire(); } public static class Ferrari extends LuxuriousCar { public void printlnDesire() { System.out.println(Constants.WANT_STRING + Constants.FERRARI_NAME); } } public static class Lanos extends CheapCar { public void printlnDesire() { System.out.println(Constants.WANT_STRING + Constants.LANOS_NAME); } } public static class Constants { public static String WANT_STRING = "Я хочу ездить на "; public static String LUXURIOUS_CAR = "роскошной машине"; public static String CHEAP_CAR = "дешевой машине"; public static String FERRARI_NAME = "Феррари"; public static String LANOS_NAME = "Ланосе"; } public static class LuxuriousCar { protected void printlnDesire() { System.out.println(Constants.WANT_STRING + Constants.LUXURIOUS_CAR ); } } public static class CheapCar { protected void printlnDesire() { System.out.println(Constants.WANT_STRING + Constants.CHEAP_CAR); } } }
3893c52bd484ccd851b9f9f5948669a21642775a
c5215075d6e2e91cb4f6cbe7706e3b379d111185
/src/main/java/com/lcc/service/impl/RolePermissionsServiceImpl.java
051cfece919a4422fbb9e34a5d99e8830a18fe42
[]
no_license
liangchengcheng/springmvc_admin_master
59e378271c5120a6fa18dbd12b771c3321fb4489
d57dece5045e4c457250c066b8a83a8a372a31d5
refs/heads/master
2021-01-12T07:05:06.173532
2016-12-24T06:16:35
2016-12-24T06:16:35
76,905,713
0
0
null
null
null
null
UTF-8
Java
false
false
3,807
java
package com.lcc.service.impl; import java.util.List; import com.lcc.bean.Result; import com.lcc.bean.entity.RcRolePermissions; import com.lcc.dao.RolePermissionsDao; import com.lcc.service.RolePermissionsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class RolePermissionsServiceImpl implements RolePermissionsService { @Autowired private RolePermissionsDao dao; @Override public Result<RcRolePermissions> query(long id) { Result<RcRolePermissions> result = new Result<RcRolePermissions>(); if (id < 0) { result.setErrMsg("此id无效"); return result; } RcRolePermissions rcRolePermissions = dao.selectById(id); if (rcRolePermissions != null) { result.setErrCode(0); result.setStatus(true); result.setResultData(rcRolePermissions); } return result; } @Override public Result<List<RcRolePermissions>> queryByRoleId(long id) { Result<List<RcRolePermissions>> result = new Result<List<RcRolePermissions>>(); if (id < 0) { result.setErrMsg("此id无效"); return result; } List<RcRolePermissions> resultList = dao.selectByRoleId(id); if (resultList.size() > 0) { result.setErrCode(0); result.setStatus(true); result.setResultData(resultList); } return result; } @Override public Result<Integer> insert(RcRolePermissions rcRolePermissions) { Result<Integer> result = new Result<Integer>(); if (rcRolePermissions.getRoleId() < 0) { result.setErrMsg("此角色id无效"); return result; } if (rcRolePermissions.getPermissionId() < 0) { result.setErrMsg("此权限id无效"); return result; } int resultNum = dao.insert(rcRolePermissions); if (resultNum > 0) { result.setErrCode(0); result.setStatus(true); } return result; } @Override public Result<Integer> update(RcRolePermissions rcRolePermissions) { Result<Integer> result = new Result<Integer>(); if (rcRolePermissions.getRoleId() < 0) { result.setErrMsg("此角色id无效"); return result; } if (rcRolePermissions.getPermissionId() < 0) { result.setErrMsg("此权限id无效"); return result; } int resultNum = dao.update(rcRolePermissions); if (resultNum > 0) { result.setErrCode(0); result.setStatus(true); } return result; } @Override public Result<Integer> delete(long id) { Result<Integer> result = new Result<Integer>(); if (id < 0) { result.setErrMsg("此id无效"); return result; } int resultNum = dao.deleteById(id); if (resultNum > 0) { result.setErrCode(0); result.setStatus(true); } return result; } @Override public Result<Integer> deleteByRolePermissions(RcRolePermissions rcRolePermissions) { Result<Integer> result = new Result<Integer>(); if (rcRolePermissions.getRoleId() < 0) { result.setErrMsg("此角色id无效"); return result; } if (rcRolePermissions.getPermissionId() < 0) { result.setErrMsg("此权限id无效"); return result; } int resultNum = dao.delectByRolePermissions(rcRolePermissions); if (resultNum > 0) { result.setErrCode(0); result.setStatus(true); } return result; } }
385abbd3bafab21c11d337020da301450621b1df
e6d716fde932045d076ab18553203e2210c7bc44
/bluesky-pentaho-kettle/engine/src/main/java/org/pentaho/di/trans/steps/monetdbagilemart/MonetDBRowLimitException.java
9224432eb3d5e508b9b27a2e961659d272770fe3
[]
no_license
BlueCodeBoy/bluesky
d04032e6c0ce87a18bcbc037191ca20d03aa133e
6fc672455b6047979527da9ba8e3fc220d5cee37
refs/heads/master
2020-04-18T10:47:20.434313
2019-01-25T03:30:47
2019-01-25T03:30:47
167,478,568
6
0
null
null
null
null
UTF-8
Java
false
false
2,719
java
/*! ****************************************************************************** * * Pentaho Data Integration * * Copyright (C) 2002-2013 by Pentaho : http://www.pentaho.com * ******************************************************************************* * * 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.pentaho.di.trans.steps.monetdbagilemart; import org.pentaho.di.core.exception.KettleException; /** * Custom exception to indicate that the row limit has been reached User: RFellows Date: 10/31/12 */ public class MonetDBRowLimitException extends KettleException { private static final long serialVersionUID = -2456127057531651057L; /** * Constructs a new {@link Throwable} with null as its detail message. */ public MonetDBRowLimitException() { super(); } /** * Constructs a new {@link Throwable} with the specified detail message. * * @param message * - the detail message. The detail message is saved for later retrieval by the getMessage() method. */ public MonetDBRowLimitException( String message ) { super( message ); } /** * Constructs a new throwable with the specified cause and a detail message of (cause==null ? null : cause.toString()) * (which typically contains the class and detail message of cause). * * @param cause * the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public MonetDBRowLimitException( Throwable cause ) { super( cause ); } /** * Constructs a new throwable with the specified detail message and cause. * * @param message * the detail message (which is saved for later retrieval by the getMessage() method). * @param cause * the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public MonetDBRowLimitException( String message, Throwable cause ) { super( message, cause ); } }
4cf779a18b5c65f523b869c1eb7ba86ddeda4e85
f9fcde801577e7b9d66b0df1334f718364fd7b45
/icepdf-5.0.3/icepdf/core/src/org/icepdf/core/pobjects/graphics/ImagePool.java
3d2a78bb889fecd987e5d505e06a5e2e3fac0650
[ "Apache-2.0" ]
permissive
numbnet/icepdf_FULL-versii
86d74147dc107e4f2239cd4ac312f15ebbeec473
b67e1ecb60aca88cacdca995d24263651cf8296b
refs/heads/master
2021-01-12T11:13:57.107091
2016-11-04T16:43:45
2016-11-04T16:43:45
72,880,329
1
1
null
null
null
null
UTF-8
Java
false
false
4,761
java
/* * Copyright 2006-2013 ICEsoft Technologies Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.icepdf.core.pobjects.graphics; import org.icepdf.core.pobjects.Reference; import org.icepdf.core.util.Defs; import java.awt.image.BufferedImage; import java.awt.image.DataBuffer; import java.util.LinkedHashMap; import java.util.Map; import java.util.logging.Logger; /** * The Image pool is a Map of the most recently used images. The pools size * by default is setup to be 1/4 the heap size. So as the pool grows it * will self trim to keep the memory foot print at the specified max. The * max pool size can be specified by using the org.icepdf.core.views.imagePoolSize * system property. The value is specified in MB. * <p/> * The pool also contains an executor pool for processing Images. The executor * allows the pageInitialization thread to continue while the executor processes * the image data on another thread. * * @since 5.0 */ public class ImagePool { private static final Logger log = Logger.getLogger(ImagePool.class.toString()); // Image pool private final LinkedHashMap<Reference, BufferedImage> fCache; private static int defaultSize; static { // Default size is 1/4 of heap size. defaultSize = (int) ((Runtime.getRuntime().maxMemory() / 1024L / 1024L) / 4L); defaultSize = Defs.intProperty("org.icepdf.core.views.imagePoolSize", defaultSize); } public ImagePool() { this(defaultSize * 1024 * 1024); } public ImagePool(long maxCacheSize) { fCache = new MemoryImageCache(maxCacheSize); } public void put(Reference ref, BufferedImage image) { // create a new reference so we don't have a hard link to the page // which will likely keep a page from being GC'd. fCache.put(new Reference(ref.getObjectNumber(), ref.getGenerationNumber()), image); } public BufferedImage get(Reference ref) { return fCache.get(ref); } private static class MemoryImageCache extends LinkedHashMap<Reference, BufferedImage> { private final long maxCacheSize; private long currentCacheSize; public MemoryImageCache(long maxCacheSize) { super(16, 0.75f, true); this.maxCacheSize = maxCacheSize; } @Override public BufferedImage put(Reference key, BufferedImage value) { if (containsKey(key)) { BufferedImage removed = remove(key); currentCacheSize = currentCacheSize - sizeOf(removed) + sizeOf(value); super.put(key, value); return removed; } else { currentCacheSize += sizeOf(value); return super.put(key, value); } } private long sizeOf(BufferedImage image) { if (image == null) { return 0L; } DataBuffer dataBuffer = image.getRaster().getDataBuffer(); int dataTypeSize; switch (dataBuffer.getDataType()) { case DataBuffer.TYPE_BYTE: dataTypeSize = 1; break; case DataBuffer.TYPE_SHORT: case DataBuffer.TYPE_USHORT: dataTypeSize = 2; break; case DataBuffer.TYPE_INT: case DataBuffer.TYPE_FLOAT: dataTypeSize = 4; break; case DataBuffer.TYPE_DOUBLE: case DataBuffer.TYPE_UNDEFINED: default: dataTypeSize = 8; break; } return dataBuffer.getSize() * dataTypeSize; } @Override protected boolean removeEldestEntry(Map.Entry<Reference, BufferedImage> eldest) { boolean remove = currentCacheSize > maxCacheSize; if (remove) { long size = sizeOf(eldest.getValue()); currentCacheSize -= size; } return remove; } } }
[ "patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74" ]
patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74
626e9e09c53559568767f814660ac05b6c0f4f99
12e507dd7b7c5e8d379a8b8fb3c71ea367228414
/src/main/java/com/nam/_000/acmp_0006/Main.java
8c82e16885ec50791fb425aedcbafe8fbc40cb0f
[]
no_license
YershovAleksandr/Java_020_ACMP
20f4be6627da6fb6b8f499d1f57eabb58da343f3
0349206072fcb289fb46cc50c3f7a83412e04db0
refs/heads/master
2020-03-30T01:25:03.686715
2019-02-16T18:01:17
2019-02-16T18:01:17
150,574,834
0
0
null
null
null
null
UTF-8
Java
false
false
1,566
java
package com.nam._000.acmp_0006; import java.io.PrintWriter; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner in = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); String step = in.nextLine(); if (!isCorrectValue(step)){ out.println("ERROR"); } else if (isCorrectStep(step)){ out.println("YES"); } else { out.println("NO"); } out.flush(); } public static boolean isCorrectValue(String step){ if ((step.length() != 5) || (step.charAt(2) != '-') || step.charAt(0) < 'A' || step.charAt(0) > 'H' || step.charAt(3) < 'A' || step.charAt(3) > 'H' || step.charAt(1) < '1' || step.charAt(1) > '8' || step.charAt(4) < '1' || step.charAt(4) > '8'){ return false; } return true; } public static boolean isCorrectStep(String step) { int vStep = step.charAt(1) - step.charAt(4); int hStep = step.charAt(0) - step.charAt(3); if ((vStep == -2 && hStep == -1) || (vStep == -2 && hStep == 1) || (vStep == 2 && hStep == -1) || (vStep == 2 && hStep == 1) || (vStep == -1 && hStep == 2) || (vStep == -1 && hStep == -2) || (vStep == 1 && hStep == 2) || (vStep == 1 && hStep == -2)){ return true; } return false; } }
264aa8aee030de451e17a5bbd8eb93299de7b7dd
9216ec7959de16732284c87372fe8ab388b5e384
/service/hive/src/main/java/org/saarus/service/sql/io/TableRCFileWriter.java
ee4e7a95016e00b25e7b1c8252a3e731e9d5debc
[]
no_license
tuan08/Saarus
9d4c3061052bea8dd0d79a2301d62966a33860ac
b7d6fca9ffe71ab813a58b44c002590772e1aeab
refs/heads/master
2020-07-15T11:34:04.654042
2015-02-15T12:34:20
2015-02-15T12:34:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,808
java
package org.saarus.service.sql.io; import java.io.IOException; import java.util.Iterator; import java.util.Map; import java.util.Properties; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.ql.io.RCFile; import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.columnar.BytesRefArrayWritable; import org.apache.hadoop.hive.serde2.columnar.BytesRefWritable; import org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe; import org.apache.hadoop.io.Text; import org.apache.hadoop.io.compress.DefaultCodec; public class TableRCFileWriter implements TableWriter { private FileSystem fs ; private String file ; private RCFile.Writer writer ; private ColumnarSerDe serDe ; public TableRCFileWriter(FileSystem fs, String file, String[] colNames, Map<String, String> meta) throws Exception { this.fs = fs ; this.file = file ; Configuration conf = fs.getConf() ; Text[] textHeader = null ; if(meta == null ) { textHeader = new Text[] {} ; } else { textHeader = new Text[meta.size() * 2] ; Iterator<Map.Entry<String, String>> i = meta.entrySet().iterator() ; int count = 0 ; while(i.hasNext()) { Map.Entry<String, String> entry = i.next() ; textHeader[count] = new Text(entry.getKey()) ; textHeader[count + 1] = new Text(entry.getValue()) ; count += 2 ; } } conf.setInt(RCFile.COLUMN_NUMBER_CONF_STR, colNames.length) ; writer = new RCFile.Writer(fs, conf, new Path(file), null, RCFile.createMetadata(textHeader), new DefaultCodec()); serDe = new ColumnarSerDe(); serDe.initialize(conf, createProperties()); } public void writeRow(String ... data) throws IOException { BytesRefArrayWritable bytes = new BytesRefArrayWritable(data.length); for(int i = 0; i < data.length; i++) { byte[] buf = null ; if(data[i] == null) buf = "NULL".getBytes("UTF-8"); else buf = data[i].getBytes("UTF-8") ; bytes.set(i, new BytesRefWritable(buf, 0, buf.length)); } writer.append(bytes); bytes.clear(); } public void close() throws IOException { writer.close() ; } static Properties createProperties() { Properties tbl = new Properties(); // Set the configuration parameters tbl.setProperty(serdeConstants.SERIALIZATION_FORMAT, "9"); tbl.setProperty("columns", "abyte,ashort,aint,along,adouble,astring,anullint,anullstring"); tbl.setProperty("columns.types","tinyint:smallint:int:bigint:double:string:int:string"); tbl.setProperty(serdeConstants.SERIALIZATION_NULL_FORMAT, "NULL"); return tbl; } }
496eaae2551c71576d1898d83efea13ecdf6a84c
fbcc22b603fdcfff37dfdf4da4c69b0096a44fa3
/springboot/SpringBoot-shiro/SpringBoot-Shiro-Vue/back/src/main/java/com/heeexy/example/config/exception/GlobalExceptionHandler.java
1b671326cee275e65c79361e72f32a253e2d1f27
[]
no_license
chunchengmeigui/dalyNote
0d4b40866ce142ec915f9aadb587f79bafe96b3a
deb9a4a634952d05e4a5a34bebc8cc51294a70b6
refs/heads/master
2021-06-15T07:10:48.307819
2021-04-23T09:54:03
2021-04-23T09:54:03
175,994,544
3
0
null
2020-12-14T15:45:13
2019-03-16T16:13:05
Java
UTF-8
Java
false
false
3,064
java
package com.heeexy.example.config.exception; import com.alibaba.fastjson.JSONObject; import com.heeexy.example.util.CommonUtil; import com.heeexy.example.util.constants.ErrorEnum; import org.apache.shiro.authz.UnauthenticatedException; import org.apache.shiro.authz.UnauthorizedException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.HttpRequestMethodNotSupportedException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; /** * @author: hxy * @description: 统一异常拦截 * @date: 2017/10/24 10:31 */ @ControllerAdvice @ResponseBody public class GlobalExceptionHandler { private Logger logger = LoggerFactory.getLogger(this.getClass().getName()); @ExceptionHandler(value = Exception.class) public JSONObject defaultErrorHandler(HttpServletRequest req, Exception e) { String errorPosition = ""; //如果错误堆栈信息存在 if (e.getStackTrace().length > 0) { StackTraceElement element = e.getStackTrace()[0]; String fileName = element.getFileName() == null ? "未找到错误文件" : element.getFileName(); int lineNumber = element.getLineNumber(); errorPosition = fileName + ":" + lineNumber; } JSONObject jsonObject = new JSONObject(); jsonObject.put("code", ErrorEnum.E_400.getErrorCode()); jsonObject.put("msg", ErrorEnum.E_400.getErrorMsg()); JSONObject errorObject = new JSONObject(); errorObject.put("errorLocation", e.toString() + " 错误位置:" + errorPosition); jsonObject.put("info", errorObject); logger.error("异常", e); return jsonObject; } /** * GET/POST请求方法错误的拦截器 * 因为开发时可能比较常见,而且发生在进入controller之前,上面的拦截器拦截不到这个错误 * 所以定义了这个拦截器 */ @ExceptionHandler(HttpRequestMethodNotSupportedException.class) public JSONObject httpRequestMethodHandler() { return CommonUtil.errorJson(ErrorEnum.E_500); } /** * 本系统自定义错误的拦截器 * 拦截到此错误之后,就返回这个类里面的json给前端 * 常见使用场景是参数校验失败,抛出此错,返回错误信息给前端 */ @ExceptionHandler(CommonJsonException.class) public JSONObject commonJsonExceptionHandler(CommonJsonException commonJsonException) { return commonJsonException.getResultJson(); } /** * 权限不足报错拦截 */ @ExceptionHandler(UnauthorizedException.class) public JSONObject unauthorizedExceptionHandler() { return CommonUtil.errorJson(ErrorEnum.E_502); } /** * 未登录报错拦截 * 在请求需要权限的接口,而连登录都还没登录的时候,会报此错 */ @ExceptionHandler(UnauthenticatedException.class) public JSONObject unauthenticatedException() { return CommonUtil.errorJson(ErrorEnum.E_20011); } }
[ "d903321643" ]
d903321643
fd90f648bb782b36e03acc6e8e5c63ae49d961b8
3fbe8559e6690c360c4948521170df29a771c095
/SLA/src/main/java/com/inapp/cms/utils/RandomString.java
eda4403705e0d90afd0e8c549e783ba06a4a7721
[]
no_license
cibye221b/SLA
b6ddf25b7f5fa8d72b6ea2b2e06d4068e0af2132
624468806873e324546b5c2cb1670ea33d412a6e
refs/heads/master
2020-12-11T03:38:30.447001
2016-09-03T10:21:07
2016-09-03T10:21:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
810
java
package com.inapp.cms.utils; /** * @author Jinesh George */ import java.util.Random; public class RandomString { private static char[] symbols; static { StringBuilder tmp = new StringBuilder(); for (char ch = '0'; ch <= '9'; ++ch) tmp.append(ch); for (char ch = 'a'; ch <= 'z'; ++ch) tmp.append(ch); symbols = tmp.toString().toCharArray(); } private final Random random = new Random(); private final char[] buf; public RandomString(int length) { if (length < 1) throw new IllegalArgumentException("length < 1: " + length); buf = new char[length]; } public String nextString() { for (int idx = 0; idx < buf.length; ++idx) buf[idx] = symbols[random.nextInt(symbols.length)]; return new String(buf); } }
cf9e38356cdc9bb2d5cf3bc6f5c3dedf6e532a84
19f7e40c448029530d191a262e5215571382bf9f
/decompiled/instagram/sources/p000X/DD9.java
b81edb45a2f6db7c41d9296c77926e31a87b0d3e
[]
no_license
stanvanrooy/decompiled-instagram
c1fb553c52e98fd82784a3a8a17abab43b0f52eb
3091a40af7accf6c0a80b9dda608471d503c4d78
refs/heads/master
2022-12-07T22:31:43.155086
2020-08-26T03:42:04
2020-08-26T03:42:04
283,347,288
18
1
null
null
null
null
UTF-8
Java
false
false
1,393
java
package p000X; import com.facebook.react.uimanager.BaseViewManager; import java.nio.ByteBuffer; /* renamed from: X.DD9 */ public final class DD9 extends DDK implements C29869DEe { public final void ABR(ByteBuffer byteBuffer, int i) { int A00 = DD3.A00(byteBuffer, i, 0); if (A00 != 0) { byteBuffer.getInt(A00); } DDP ddp = (DDP) DD3.A02(byteBuffer, i, 1, DDP.class); if (ddp != null) { this.A03 = ddp; float f = BaseViewManager.CAMERA_DISTANCE_NORMALIZATION_MULTIPLIER; int A002 = DD3.A00(byteBuffer, i, 2); if (A002 != 0) { f = byteBuffer.getFloat(A002); } this.A01 = f; float f2 = BaseViewManager.CAMERA_DISTANCE_NORMALIZATION_MULTIPLIER; int A003 = DD3.A00(byteBuffer, i, 3); if (A003 != 0) { f2 = byteBuffer.getFloat(A003); } this.A00 = f2; C29846DDh dDh = (C29846DDh) DD3.A01(byteBuffer, i, 4, C29845DDg.class); if (dDh != null) { this.A02 = dDh; this.A04 = (C29877DEm[]) DD3.A08(byteBuffer, i, 5, DDI.class); return; } throw new IllegalArgumentException("root layer cannot be null"); } throw new IllegalArgumentException("size cannot be null"); } }
629fb4fee87cc4d8cb3dbf57516d04dcb04fcfaf
dd01522057d622e942cc7c9058cbca61377679aa
/hybris/bin/platform/bootstrap/gensrc/de/hybris/platform/acceleratorservices/data/RequestContextData.java
8707071e4001def71b524714a83db83a816acc4b
[]
no_license
grunya404/bp-core-6.3
7d73db4db81015e4ae69eeffd43730f564e17679
9bc11bc514bd0c35d7757a9e949af89b84be634f
refs/heads/master
2021-05-19T11:32:39.663520
2017-09-01T11:36:21
2017-09-01T11:36:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,065
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! * --- Generated at 25 Aug 2017 4:31:24 PM * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2016 SAP SE * All rights reserved. * * This software is the confidential and proprietary information of SAP * Hybris ("Confidential Information"). You shall not disclose such * Confidential Information and shall use it only in accordance with the * terms of the license agreement you entered into with SAP Hybris. */ package de.hybris.platform.acceleratorservices.data; import de.hybris.platform.category.model.CategoryModel; import de.hybris.platform.commerceservices.search.pagedata.SearchPageData; import de.hybris.platform.core.model.product.ProductModel; /** * Holds context data for rendering the current request */ public class RequestContextData implements java.io.Serializable { /** <i>Generated property</i> for <code>RequestContextData.product</code> property defined at extension <code>acceleratorcms</code>. */ private ProductModel product; /** <i>Generated property</i> for <code>RequestContextData.category</code> property defined at extension <code>acceleratorcms</code>. */ private CategoryModel category; /** <i>Generated property</i> for <code>RequestContextData.search</code> property defined at extension <code>acceleratorcms</code>. */ private SearchPageData search; public RequestContextData() { // default constructor } public void setProduct(final ProductModel product) { this.product = product; } public ProductModel getProduct() { return product; } public void setCategory(final CategoryModel category) { this.category = category; } public CategoryModel getCategory() { return category; } public void setSearch(final SearchPageData search) { this.search = search; } public SearchPageData getSearch() { return search; } }
49cb643999df005228f462b1d8dda2055bde584f
0fbd372915d09df44cf65271beae89a97d2fcdf2
/src/main/java/com/hermes/infrastructure/dataaccess/services/CargoServiceImpl.java
0c26522c83358a2bd870e60e09beea4c4270f0f1
[]
no_license
netcrackerschool/hermes
799811ff882ae857e707a4aab829d04fcb2b8daa
381bec35232c8ac6962b12884d40f552392ceb1c
refs/heads/master
2021-08-08T04:24:54.086142
2017-11-09T15:22:48
2017-11-09T15:22:48
110,107,630
0
0
null
null
null
null
UTF-8
Java
false
false
334
java
package com.hermes.infrastructure.dataaccess.services; import com.hermes.domain.cargo.AbstractCargo; /** * 05.10.15. */ public class CargoServiceImpl extends GenericServiceImpl<AbstractCargo> implements CargoService { public CargoServiceImpl(GenericRepository<AbstractCargo> repository) { super(repository); } }
2eb4b67737ad60f5bf67734c6be4882eb76d3801
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/106/org/apache/commons/math/analysis/UnivariateRealIntegrator_setMaximalIterationCount_40.java
ba8399c48c8d00135ce328384028244d2017ef99
[]
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
512
java
org apach common math analysi interfac univari real integr algorithm version revis date univari real integr univariaterealintegr set upper limit number iter high iter count converg problem reason vari wide case user advis code converg except convergenceexcept code thrown number exceed param count maximum number iter set maxim iter count setmaximaliterationcount count
e54aa3fa7eb7a548ad6272156c82654d932d1ab7
eb5f5353f49ee558e497e5caded1f60f32f536b5
/org/omg/CORBA/UShortSeqHelper.java
2a423d8b9904c6dc3b96d0cc2f9350e8216ad7e7
[]
no_license
mohitrajvardhan17/java1.8.0_151
6fc53e15354d88b53bd248c260c954807d612118
6eeab0c0fd20be34db653f4778f8828068c50c92
refs/heads/master
2020-03-18T09:44:14.769133
2018-05-23T14:28:24
2018-05-23T14:28:24
134,578,186
0
2
null
null
null
null
UTF-8
Java
false
false
1,783
java
package org.omg.CORBA; import org.omg.CORBA.portable.InputStream; import org.omg.CORBA.portable.OutputStream; public abstract class UShortSeqHelper { private static String _id = "IDL:omg.org/CORBA/UShortSeq:1.0"; private static TypeCode __typeCode = null; public UShortSeqHelper() {} public static void insert(Any paramAny, short[] paramArrayOfShort) { OutputStream localOutputStream = paramAny.create_output_stream(); paramAny.type(type()); write(localOutputStream, paramArrayOfShort); paramAny.read_value(localOutputStream.create_input_stream(), type()); } public static short[] extract(Any paramAny) { return read(paramAny.create_input_stream()); } public static synchronized TypeCode type() { if (__typeCode == null) { __typeCode = ORB.init().get_primitive_tc(TCKind.tk_ushort); __typeCode = ORB.init().create_sequence_tc(0, __typeCode); __typeCode = ORB.init().create_alias_tc(id(), "UShortSeq", __typeCode); } return __typeCode; } public static String id() { return _id; } public static short[] read(InputStream paramInputStream) { short[] arrayOfShort = null; int i = paramInputStream.read_long(); arrayOfShort = new short[i]; paramInputStream.read_ushort_array(arrayOfShort, 0, i); return arrayOfShort; } public static void write(OutputStream paramOutputStream, short[] paramArrayOfShort) { paramOutputStream.write_long(paramArrayOfShort.length); paramOutputStream.write_ushort_array(paramArrayOfShort, 0, paramArrayOfShort.length); } } /* Location: C:\Program Files (x86)\Java\jre1.8.0_151\lib\rt.jar!\org\omg\CORBA\UShortSeqHelper.class * Java compiler version: 8 (52.0) * JD-Core Version: 0.7.1 */
619a1aa89abe22bc6ffefbaf96f5852f3a467b41
ab673fd010e3970a3cd26024244a5eb4bf43cb93
/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/MaterialDesignFragment.java
7a820c43034632091e2337d78bb2c9b9b6ac9df5
[ "Apache-2.0" ]
permissive
dandycheung/XUI
9cbd03a7f28c2cdd3a05fbcfafc8e57688f5d102
111e6008ccd97978d892c6807be1a50f544908ee
refs/heads/master
2023-07-11T08:00:08.614364
2023-06-25T17:40:30
2023-06-25T17:40:30
239,179,628
0
0
Apache-2.0
2023-06-29T18:19:32
2020-02-08T18:08:35
Java
UTF-8
Java
false
false
3,842
java
package com.xuexiang.xuidemo.fragment.expands; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xpage.core.PageOption; import com.xuexiang.xuidemo.R; import com.xuexiang.xuidemo.activity.MaterialDesignThemeActivity; import com.xuexiang.xuidemo.activity.SettingsActivity; import com.xuexiang.xuidemo.base.BaseSimpleListFragment; import com.xuexiang.xuidemo.fragment.expands.materialdesign.BadgeDrawableFragment; import com.xuexiang.xuidemo.fragment.expands.materialdesign.BehaviorFragment; import com.xuexiang.xuidemo.fragment.expands.materialdesign.BottomSheetDialogFragment; import com.xuexiang.xuidemo.fragment.expands.materialdesign.ConstraintLayoutFragment; import com.xuexiang.xuidemo.fragment.expands.materialdesign.DrawerLayoutFragment; import com.xuexiang.xuidemo.fragment.expands.materialdesign.ItemTouchHelperFragment; import com.xuexiang.xuidemo.fragment.expands.materialdesign.MaterialButtonFragment; import com.xuexiang.xuidemo.fragment.expands.materialdesign.ShapeableImageViewFragment; import com.xuexiang.xuidemo.fragment.expands.materialdesign.TextInputLayoutFragment; import com.xuexiang.xuidemo.fragment.expands.materialdesign.ToolBarFragment; import com.xuexiang.xutil.app.ActivityUtils; import java.util.List; import static com.xuexiang.xuidemo.base.BaseActivity.KEY_SUPPORT_SLIDE_BACK; /** * @author xuexiang * @since 2019-05-07 23:30 */ @Page(name = "Material Design", extra = R.drawable.ic_expand_material_design) public class MaterialDesignFragment extends BaseSimpleListFragment { /** * 初始化例子 * * @param lists * @return */ @Override protected List<String> initSimpleData(List<String> lists) { lists.add("ToolBar使用"); lists.add("Behavior\n手势行为"); lists.add("DrawerLayout + NavigationView\n常见主页布局"); lists.add("ConstraintLayout\n约束布局"); lists.add("ItemTouchHelper+RecyclerView\n实现列表拖拽"); lists.add("AppCompatPreferenceActivity\n设置页面"); lists.add("BottomSheetDialog"); lists.add("BadgeDrawable"); lists.add("ShapeableImageView"); lists.add("MaterialButton"); lists.add("TextInputLayout"); return lists; } /** * 条目点击 * * @param position */ @Override protected void onItemClick(int position) { switch (position) { case 0: openPage(ToolBarFragment.class); break; case 1: openPage(BehaviorFragment.class); break; case 2: openNewPage(DrawerLayoutFragment.class, KEY_SUPPORT_SLIDE_BACK, false); break; case 3: openPage(ConstraintLayoutFragment.class); break; case 4: openPage(ItemTouchHelperFragment.class); break; case 5: ActivityUtils.startActivity(SettingsActivity.class); break; case 6: openPage(BottomSheetDialogFragment.class); break; case 7: PageOption.to(BadgeDrawableFragment.class) .setNewActivity(true, MaterialDesignThemeActivity.class) .open(this); break; case 8: openPage(ShapeableImageViewFragment.class); break; case 9: PageOption.to(MaterialButtonFragment.class) .setNewActivity(true, MaterialDesignThemeActivity.class) .open(this); break; case 10: openPage(TextInputLayoutFragment.class); break; default: break; } } }
04c3ac77551ad3a54a85c88531ff0303ed4a17dd
e27942cce249f7d62b7dc8c9b86cd40391c1ddd4
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201702/mcm/AccountLabelServiceInterfacemutate.java
871d10b63295e44b7ea07805d0ddd508212eebe3
[ "Apache-2.0" ]
permissive
mo4ss/googleads-java-lib
b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a
efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641
refs/heads/master
2022-12-05T00:30:56.740813
2022-11-16T10:47:15
2022-11-16T10:47:15
108,132,394
0
0
Apache-2.0
2022-11-16T10:47:16
2017-10-24T13:41:43
Java
UTF-8
Java
false
false
3,453
java
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.adwords.jaxws.v201702.mcm; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * * Possible actions: * <ul> * <li> Create a new label - create a new {@link Label} and call mutate with ADD operator * <li> Edit the label name - set the appropriate fields in your {@linkplain Label} and call * mutate with the SET operator. Null fields will be interpreted to mean "no change" * <li> Delete the label - call mutate with REMOVE operator * </ul> * * @param operations list of unique operations to be executed in a single transaction, in the * order specified. * @return the mutated labels, in the same order that they were in as the parameter * @throws ApiException if problems occurs while modifying label information * * * <p>Java class for mutate element declaration. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;element name="mutate"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="operations" type="{https://adwords.google.com/api/adwords/mcm/v201702}AccountLabelOperation" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "operations" }) @XmlRootElement(name = "mutate") public class AccountLabelServiceInterfacemutate { protected List<AccountLabelOperation> operations; /** * Gets the value of the operations property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the operations property. * * <p> * For example, to add a new item, do as follows: * <pre> * getOperations().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link AccountLabelOperation } * * */ public List<AccountLabelOperation> getOperations() { if (operations == null) { operations = new ArrayList<AccountLabelOperation>(); } return this.operations; } }
8a05cbb299d054947900824366c5a9f1a1549c34
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/aweme/challenge/p1084c/C23678f.java
ff9fa9abe89c19c5078978a353b5a998e03e7106
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,713
java
package com.p280ss.android.ugc.aweme.challenge.p1084c; import android.os.Message; import android.text.TextUtils; import android.util.Log; import com.google.common.collect.C17777bq; import com.p280ss.android.ugc.aweme.base.C23397p; import com.p280ss.android.ugc.aweme.challenge.api.ChallengeApi; import com.p280ss.android.ugc.aweme.challenge.model.SearchChallenge; import com.p280ss.android.ugc.aweme.challenge.model.SearchChallengeList; import com.p280ss.android.ugc.aweme.common.C25640a; import com.p280ss.android.ugc.aweme.discover.model.Challenge; import com.p280ss.android.ugc.aweme.shortvideo.util.C41530am; import java.util.ArrayList; import java.util.concurrent.Callable; /* renamed from: com.ss.android.ugc.aweme.challenge.c.f */ public final class C23678f extends C25640a<SearchChallengeList> { public final boolean checkParams(Object... objArr) { if (objArr == null || objArr.length != 2) { return false; } return true; } /* access modifiers changed from: 0000 */ /* renamed from: a */ public final /* synthetic */ boolean mo61608a(SearchChallenge searchChallenge) { String str; if (searchChallenge.challenge == null) { str = null; } else { str = searchChallenge.challenge.getChallengeName(); } return TextUtils.equals(str, ((SearchChallengeList) this.mData).keyword); } public final boolean sendRequest(final Object... objArr) { if (!super.sendRequest(objArr)) { return false; } C23397p.m76735a().mo60807a(this.mHandler, new Callable() { public final Object call() throws Exception { C23678f.this.mIsLoading = false; return ChallengeApi.m77600a((String) objArr[0], 20, (String) objArr[1]); } }, 0); return true; } public final void handleMsg(Message message) { if (message.obj instanceof Exception) { Exception exc = (Exception) message.obj; if (exc.getMessage() != null) { StringBuilder sb = new StringBuilder("challenge search failed, message:"); sb.append(exc.getMessage()); C41530am.m132283b(sb.toString()); } StringBuilder sb2 = new StringBuilder("challenge search failed, stack trace:"); sb2.append(Log.getStackTraceString(exc)); C41530am.m132283b(sb2.toString()); } super.handleMsg(message); } /* access modifiers changed from: private */ /* renamed from: a */ public void handleData(SearchChallengeList searchChallengeList) { if (searchChallengeList != null) { this.mData = searchChallengeList; if (((SearchChallengeList) this.mData).items == null) { ((SearchChallengeList) this.mData).items = new ArrayList(); } if (!searchChallengeList.isMatch) { boolean isEmpty = ((SearchChallengeList) this.mData).items.isEmpty(); if (!isEmpty) { isEmpty = !C17777bq.m59104e(((SearchChallengeList) this.mData).items, new C23680g(this)).isPresent(); } if (isEmpty) { Challenge challenge = new Challenge(); challenge.setChallengeName(((SearchChallengeList) this.mData).keyword); SearchChallenge searchChallenge = new SearchChallenge(); searchChallenge.challenge = challenge; searchChallenge.isFake = true; ((SearchChallengeList) this.mData).items.add(0, searchChallenge); } } } } }
8355b1adf17cf8b4befcc9cd1c0d3a51c2aa21b8
ba7279b2abcd1a3630e464777d8ab219cbcd09b5
/app/src/main/java/com/renyu/androidcommonlibrary/activity/RetrofitActivity.java
1e65921a6517a92e36d12740b2605262a2656db9
[]
no_license
mingfenghappy/AndroidCommonLibrary
29995f66edc5c3e031c89bd5699e516a99d43c4a
eb0a8841ade570ed079f1b455875be03d0dcad74
refs/heads/master
2020-03-25T02:09:52.729433
2018-07-24T09:36:47
2018-07-24T09:36:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,630
java
package com.renyu.androidcommonlibrary.activity; import android.graphics.Color; import android.widget.Toast; import com.renyu.androidcommonlibrary.ExampleApp; import com.renyu.androidcommonlibrary.bean.AccessTokenResponse; import com.renyu.androidcommonlibrary.api.RetrofitImpl; import com.renyu.androidcommonlibrary.di.module.ReposModule; import com.renyu.commonlibrary.baseact.BaseActivity; import com.renyu.commonlibrary.commonutils.Utils; import com.renyu.commonlibrary.network.BaseObserver; import com.renyu.commonlibrary.network.Retrofit2Utils; import com.renyu.commonlibrary.network.RetryFunction; import com.trello.rxlifecycle2.android.ActivityEvent; import javax.inject.Inject; public class RetrofitActivity extends BaseActivity { @Inject RetrofitImpl retrofitImpl = null; @Override public void initParams() { ((ExampleApp) (com.blankj.utilcode.util.Utils.getApp())).appComponent.plusAct(new ReposModule()).inject(this); } @Override public int initViews() { return 0; } @Override public void loadData() { getAccessToken(); } @Override public int setStatusBarColor() { return Color.BLACK; } @Override public int setStatusBarTranslucent() { return 0; } private void getAccessToken() { int timestamp = (int) (System.currentTimeMillis() / 1000); String random = "abcdefghijklmn"; String signature = "app_id=46877648&app_secret=kCkrePwPpHOsYYSYWTDKzvczWRyvhknG&device_id=" + Utils.getUniquePsuedoID() + "&rand_str=" + random + "&timestamp=" + timestamp; retrofitImpl.getAccessToken("nj", timestamp, "46877648", random, Utils.getMD5(signature), Utils.getUniquePsuedoID(), "v1.0", 0, 1, 6000) .retryWhen(new RetryFunction(3, 3)) .compose(Retrofit2Utils.background()) .compose(bindUntilEvent(ActivityEvent.DESTROY)) .subscribe(new BaseObserver<AccessTokenResponse>(this) { @Override public void onNext(AccessTokenResponse accessTokenResponse) { String access_token = accessTokenResponse.getAccess_token(); Toast.makeText(RetrofitActivity.this, access_token, Toast.LENGTH_SHORT).show(); networkLoadingDialog.close(); } }); } }
795bbea092cf9b34e0eeffd9b8fb32622721746b
48fd0b689f9cdb660ad06a191107e14d47542fd8
/Ada55/src/MinimumLogicStep.java
d1b1ccfa2bd459e215633a8565d881cbc0199ba5
[ "MIT" ]
permissive
chiendarrendor/AlbertsAdalogicalAenigmas
3dfc6616d47c361ad6911e2ee4e3a3ec24bb6b75
c6f91d4718999089686f3034a75a11b312fa1458
refs/heads/master
2022-08-28T11:34:02.261386
2022-07-08T22:45:24
2022-07-08T22:45:24
115,220,665
1
1
null
null
null
null
UTF-8
Java
false
false
2,134
java
import grid.graph.GridGraph; import grid.logic.LogicStatus; import grid.puzzlebits.Direction; import java.awt.*; import java.util.Set; // this class explores the behavior of the regions of the grid that we // know are connected by paths. public class MinimumLogicStep extends CommonLogicStep { public MinimumLogicStep() { super(true); } @Override public LogicStatus applyToGroup(Board thing, Set<Point> cells, Set<Point> numbers,GridGraph gg) { LogicStatus result = LogicStatus.STYMIED; if (numbers.size() > 2) return LogicStatus.CONTRADICTION; // all cells of a group must be connected to each other. for (Point p : cells) { for (Direction d: Utility.OPDIRS) { Point np = d.delta(p,1); if (!cells.contains(np)) continue; EdgeState es = thing.getEdge(p.x,p.y,d); if (es == EdgeState.WALL) return LogicStatus.CONTRADICTION; if (es == EdgeState.UNKNOWN) { result = LogicStatus.LOGICED; thing.setEdge(p.x,p.y,d,EdgeState.PATH); } } } int maxsize; if (numbers.size() < 2) maxsize = thing.getMax() - 1; else { int pairmax = numbers.stream().mapToInt(it->thing.getNumber(it.x,it.y)).max().getAsInt(); int pairmin = numbers.stream().mapToInt(it->thing.getNumber(it.x,it.y)).min().getAsInt(); if ((pairmax - pairmin) < 2) return LogicStatus.CONTRADICTION; maxsize = pairmax - 1; } if (cells.size() > maxsize) return LogicStatus.CONTRADICTION; /* BlastOut is breathtakingly expensive! if (numbers.size() > 0) { BlastOut bo = new BlastOut(thing,gg,cells,numbers); if (numbers.size() == 1) { LogicStatus bostat = bo.singleNumberExtend(thing); if (bostat == LogicStatus.CONTRADICTION) return LogicStatus.CONTRADICTION; if (bostat == LogicStatus.LOGICED) result = LogicStatus.LOGICED; } } */ return result; } }
5269df4c52f5de01cea33e811d5f30a19f886f98
baa08c46ff681b957217b0f8c06434986fbeb8e9
/Java OOP/b_Inheritance/person/Person.java
fbea39d2a9f35c1251c031037a8d3128a4ce35ea
[]
no_license
anayankova/SoftUni-Software-Engineering
c4b06034995e4da28f2ce7550b5d9a87fd0c59b6
377063b55a5a044f9f4954108366fa3989abdd2d
refs/heads/master
2022-06-24T17:58:58.121622
2020-04-05T09:30:38
2020-04-05T09:30:38
186,245,186
1
0
null
2022-06-21T03:04:59
2019-05-12T11:16:44
Java
UTF-8
Java
false
false
321
java
package b_Inheritance.person; public class Person { private String name; private int age; public Person(String name, int age) { this.name = name; this.age = age; } public String getName() { return this.name; } public int getAge() { return this.age; } }
942069aef56bd7fcdf586b8f5fd58601f8f39843
1ecae42ff90c437ce67b217b66856fee393e013f
/.JETEmitters/src/org/talend/designer/codegen/translators/business/marketo/TMarketoListOperationBeginJava.java
9ae02b2e3eaca6ac82b573a01bce53f27e4cbf8b
[]
no_license
dariofabbri/etl
e66233c970ab95a191816afe8c2ef64a8819562a
cb700ac6375ad57e5b78b8ab82958e4a3f9a09a7
refs/heads/master
2021-01-19T07:41:08.260696
2013-02-09T11:57:12
2013-02-09T11:57:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,651
java
package org.talend.designer.codegen.translators.business.marketo; import org.talend.core.model.process.INode; import org.talend.core.model.process.ElementParameterParser; import org.talend.core.model.metadata.IMetadataTable; import org.talend.core.model.process.IConnection; import org.talend.core.model.process.IConnectionCategory; import org.talend.designer.codegen.config.CodeGeneratorArgument; import java.util.List; public class TMarketoListOperationBeginJava { protected static String nl; public static synchronized TMarketoListOperationBeginJava create(String lineSeparator) { nl = lineSeparator; TMarketoListOperationBeginJava result = new TMarketoListOperationBeginJava(); nl = null; return result; } public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; protected final String TEXT_1 = "int nb_call_"; protected final String TEXT_2 = " = 0;" + NL + "globalMap.put(\""; protected final String TEXT_3 = "_NB_CALL\",0); "; protected final String TEXT_4 = NL + "\t\t\t\t\tboolean firstList_"; protected final String TEXT_5 = " = true;" + NL + "\t\t\t\t\tString listTypeFlag_"; protected final String TEXT_6 = "=\"\";" + NL + "\t\t\t\t\tString listValueFlag_"; protected final String TEXT_7 = "=\"\";"; protected final String TEXT_8 = NL + "\t\t\t\torg.talend.marketo.Client client_"; protected final String TEXT_9 = " = new org.talend.marketo.Client("; protected final String TEXT_10 = ","; protected final String TEXT_11 = ","; protected final String TEXT_12 = ");" + NL + "\t\t\t\tclient_"; protected final String TEXT_13 = ".setTimeout("; protected final String TEXT_14 = ");" + NL + "\t\t\t\tjava.util.List<com.marketo.www.mktows.LeadKey> leadKeyList_"; protected final String TEXT_15 = " = new java.util.ArrayList<com.marketo.www.mktows.LeadKey>();" + NL + "\t\t\t\tcom.marketo.www.mktows.ResultListOperation resultListOperation_"; protected final String TEXT_16 = " = null;" + NL + "\t\t\t\t" + NL + "\t\t\t\tboolean whetherReject_"; protected final String TEXT_17 = " = false;"; public String generate(Object argument) { final StringBuffer stringBuffer = new StringBuffer(); CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument; INode node = (INode)codeGenArgument.getArgument(); String cid = node.getUniqueName(); String endpoint = ElementParameterParser.getValue(node, "__ENDPOINT__"); String secretKey = ElementParameterParser.getValue(node, "__SECRET_KEY__"); String clientAccessID = ElementParameterParser.getValue(node, "__CLIENT_ACCESSID__"); String operation = ElementParameterParser.getValue(node, "__OPERATION__"); boolean mutipleOperation = ("true").equals(ElementParameterParser.getValue(node,"__MUTIPLE_OPERATION__")); boolean isMutiple = false; if(mutipleOperation&&!operation.equals("ISMEMBEROFLIST")){ isMutiple = true; } String timeout = ElementParameterParser.getValue(node, "__TIMEOUT__"); List<IMetadataTable> metadatas = node.getMetadataList(); stringBuffer.append(TEXT_1); stringBuffer.append(cid); stringBuffer.append(TEXT_2); stringBuffer.append(cid ); stringBuffer.append(TEXT_3); if ((metadatas!=null)&&(metadatas.size()>0)) {//1 IMetadataTable metadata = metadatas.get(0); if (metadata!=null) {//2 List< ? extends IConnection> conns = node.getIncomingConnections(); for (IConnection conn : conns) {//3 if (conn.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {//4 if(isMutiple){ stringBuffer.append(TEXT_4); stringBuffer.append(cid); stringBuffer.append(TEXT_5); stringBuffer.append(cid); stringBuffer.append(TEXT_6); stringBuffer.append(cid); stringBuffer.append(TEXT_7); } stringBuffer.append(TEXT_8); stringBuffer.append(cid); stringBuffer.append(TEXT_9); stringBuffer.append(endpoint); stringBuffer.append(TEXT_10); stringBuffer.append(secretKey); stringBuffer.append(TEXT_11); stringBuffer.append(clientAccessID); stringBuffer.append(TEXT_12); stringBuffer.append(cid); stringBuffer.append(TEXT_13); stringBuffer.append(timeout); stringBuffer.append(TEXT_14); stringBuffer.append(cid); stringBuffer.append(TEXT_15); stringBuffer.append(cid); stringBuffer.append(TEXT_16); stringBuffer.append(cid); stringBuffer.append(TEXT_17); } } } } return stringBuffer.toString(); } }
4e93313644d4c687fc1f4b9b55d3ff79b0813d0f
8e77ed1d11d3ee6486976bdc6b7c5c1043c4d6df
/src/cn/com/oims/service/IEyelxdzxService.java
d92e5498c5955fc196783f3e960f3b7dc5234a20
[]
no_license
498473645/OIMS
e553f266629b7baf0e0dc31bd50edcd534c83c21
4477b5882e6478c3cac44c83a2d2539eb98e887a
refs/heads/main
2023-08-07T04:41:21.592563
2021-09-23T03:10:21
2021-09-23T03:10:21
409,429,603
0
0
null
null
null
null
UTF-8
Java
false
false
409
java
package cn.com.oims.service; import cn.com.oims.dao.pojo.Eyelxdzx; import java.io.Serializable; import org.springframework.stereotype.Service; @Service public interface IEyelxdzxService { void updateEyelxdzx(Eyelxdzx paramEyelxdzx); Serializable saveEyelxdzx(Eyelxdzx paramEyelxdzx); Eyelxdzx selectEyelxdzxByEyelxdzx(Eyelxdzx paramEyelxdzx); void deleteEyelxdzx(Eyelxdzx paramEyelxdzx); }
b24c20dc5776b78b8f7461f451481d33f6833658
ce44e9fec5f4ee3eff79c3e6fbb0064fbb94753d
/main/geo/test/boofcv/alg/distort/TestAddRadialNtoN_F64.java
39b4e086370c5266320b00b67859c810e323e159
[ "Apache-2.0" ]
permissive
wsjhnsn/BoofCV
74fc0687e29c45df1d2fc125b28d777cd91a8158
bdae47003090c03386b6b23e2a884bceba242241
refs/heads/master
2020-12-24T12:34:02.996379
2014-06-27T21:15:21
2014-06-27T21:15:21
21,334,100
1
0
null
null
null
null
UTF-8
Java
false
false
1,544
java
/* * Copyright (c) 2011-2013, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * 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 boofcv.alg.distort; import georegression.struct.point.Point2D_F64; import org.junit.Test; import static org.junit.Assert.assertEquals; /** * @author Peter Abeles */ public class TestAddRadialNtoN_F64 { /** * Manually compute the distorted coordinate for a point and see if it matches */ @Test public void againstManual() { double radial[]= new double[]{0.01,-0.03}; Point2D_F64 orig = new Point2D_F64(0.1,-0.2); // manually compute the distortion double r2 = orig.x*orig.x + orig.y*orig.y; double mag = radial[0]*r2 + radial[1]*r2*r2; double distX = orig.x*(1+mag); double distY = orig.y*(1+mag); AddRadialNtoN_F64 alg = new AddRadialNtoN_F64(); alg.set(radial); Point2D_F64 found = new Point2D_F64(); alg.compute(orig.x,orig.y,found); assertEquals(distX,found.x,1e-4); assertEquals(distY,found.y,1e-4); } }
bf1926eb163f2403c967feaa339f0f77fab281b4
1374237fa0c18f6896c81fb331bcc96a558c37f4
/java/com/winnertel/ems/epon/iad/bbs4000/gui/r400/DeviceBaseQosMapTablePanel.java
d8f5c3c44c7952efb86a8d9606d5bf8d693abcc2
[]
no_license
fangniude/lct
0ae5bc550820676f05d03f19f7570dc2f442313e
adb490fb8d0c379a8b991c1a22684e910b950796
refs/heads/master
2020-12-02T16:37:32.690589
2017-12-25T01:56:32
2017-12-25T01:56:32
96,560,039
0
0
null
null
null
null
UTF-8
Java
false
false
7,070
java
/** * Created by Zhou Chao, 2010/5/26 */ package com.winnertel.ems.epon.iad.bbs4000.gui.r400; import com.winnertel.ems.epon.iad.bbs4000.mib.r400.DeviceBaseQosMapTable; import com.winnertel.em.framework.IApplication; import com.winnertel.em.framework.gui.swing.UPanel; import com.winnertel.em.standard.util.gui.layout.HSpacer; import com.winnertel.em.standard.util.gui.layout.NTLayout; import com.winnertel.em.standard.util.gui.layout.VSpacer; import javax.swing.*; import java.awt.*; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; public class DeviceBaseQosMapTablePanel extends UPanel { private int[] baseQosMapRuleIndexVList = new int[]{1, 2, 3,}; private String[] baseQosMapRuleIndexTList = new String[]{ fStringMap.getString("cos"), //1 fStringMap.getString("tos"), //2 fStringMap.getString("diffserv"), //3 }; private JComboBox tfBaseQosMapRuleIndex = new JComboBox(baseQosMapRuleIndexTList); private String[] baseQosMapOctet8VList = null; private String[] baseQosMapOctet16VList = null; private String[] baseQosMapOctet64VList = null; private JComboBox[] tfBaseQosMapOctet = null; private final String baseQosMapRuleIndex = fStringMap.getString("deviceBaseQosMapRuleIndex") + " : "; private final String baseQosMapOctet = fStringMap.getString("deviceBaseQosMapOctet") + " : "; public DeviceBaseQosMapTablePanel(IApplication app) { super(app); init(); } public void initGui() { JPanel baseInfoPanel = new JPanel(); NTLayout layout = new NTLayout(1, 3, NTLayout.FILL, NTLayout.CENTER, 5, 5); layout.setMargins(6, 10, 6, 10); baseInfoPanel.setLayout(layout); baseInfoPanel.setBorder(BorderFactory.createEtchedBorder()); baseInfoPanel.add(new JLabel(baseQosMapRuleIndex)); baseInfoPanel.add(tfBaseQosMapRuleIndex); baseInfoPanel.add(new HSpacer()); tfBaseQosMapRuleIndex.setEnabled(false); //BaseQosMapOctet panel JPanel baseQosMapOctetPanel = new JPanel(); NTLayout layout1 = new NTLayout(16, 8, NTLayout.FILL, NTLayout.CENTER, 5, 5); layout1.setMargins(6, 10, 6, 10); baseQosMapOctetPanel.setLayout(layout1); baseQosMapOctetPanel.setBorder(BorderFactory.createTitledBorder(fStringMap.getString(baseQosMapOctet))); baseQosMapOctet8VList = new String[8]; for (int i = 0; i < baseQosMapOctet8VList.length; i++) { baseQosMapOctet8VList[i] = String.valueOf(i); } baseQosMapOctet16VList = new String[16]; for (int i = 0; i < baseQosMapOctet16VList.length; i++) { baseQosMapOctet16VList[i] = String.valueOf(i); } baseQosMapOctet64VList = new String[64]; for (int i = 0; i < baseQosMapOctet64VList.length; i++) { baseQosMapOctet64VList[i] = String.valueOf(i); } tfBaseQosMapOctet = new JComboBox[64]; for (int i = 0; i < tfBaseQosMapOctet.length; i++) { tfBaseQosMapOctet[i] = new JComboBox(); tfBaseQosMapOctet[i].setEnabled(false); baseQosMapOctetPanel.add(new JLabel(fStringMap.getString("priority") + i)); baseQosMapOctetPanel.add(tfBaseQosMapOctet[i]); } tfBaseQosMapRuleIndex.setSelectedItem(null); tfBaseQosMapRuleIndex.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { int rule = tfBaseQosMapRuleIndex.getSelectedIndex() + 1; selectBaseQosMaoOctetPanel(rule); } }); JPanel allPanel = new JPanel(); layout = new NTLayout(3, 1, NTLayout.FILL, NTLayout.FILL, 5, 3); layout.setMargins(6, 10, 6, 10); allPanel.setLayout(layout); allPanel.add(baseInfoPanel); allPanel.add(baseQosMapOctetPanel); allPanel.add(new VSpacer()); setLayout(new BorderLayout()); add(new JScrollPane(allPanel), BorderLayout.CENTER); setPreferredSize(new Dimension(500, 400)); } protected void initForm() { } public void selectBaseQosMaoOctetPanel(int rule) { switch (rule) { case 1: //cos for (int i = 0; i < tfBaseQosMapOctet.length; i++) { tfBaseQosMapOctet[i].setModel(new DefaultComboBoxModel(baseQosMapOctet8VList)); tfBaseQosMapOctet[i].setEnabled(i < 8); } break; case 2: //tos for (int i = 0; i < tfBaseQosMapOctet.length; i++) { tfBaseQosMapOctet[i].setModel(new DefaultComboBoxModel(baseQosMapOctet16VList)); tfBaseQosMapOctet[i].setEnabled(i < 16); } break; default: //diffserv for (int i = 0; i < tfBaseQosMapOctet.length; i++) { tfBaseQosMapOctet[i].setModel(new DefaultComboBoxModel(baseQosMapOctet64VList)); tfBaseQosMapOctet[i].setEnabled(i < 64); } break; } } public void refresh() { DeviceBaseQosMapTable mbean = (DeviceBaseQosMapTable) getModel(); if (mbean == null) return; tfBaseQosMapRuleIndex.setSelectedIndex(getIndexFromValue(baseQosMapRuleIndexVList, mbean.getDeviceBaseQosMapRuleIndex())); //selectBaseQosMaoOctetPanel(mbean.getDeviceBaseQosMapRuleIndex()); //manually trigger 'addItemListener' setBaseQosMapOctet(mbean.getDeviceBaseQosMapRuleIndex(), mbean.getDeviceBaseQosMapOctet()); } public void updateModel() { DeviceBaseQosMapTable mbean = (DeviceBaseQosMapTable) getModel(); if (mbean == null) return; mbean.setDeviceBaseQosMapOctet(getBaseQosMapOctet(mbean.getDeviceBaseQosMapRuleIndex())); } private byte[] getBaseQosMapOctet(int rule) { int validLength = (rule == 1 ? 8 : rule == 2 ? 16 : 64); return getByteMap(tfBaseQosMapOctet, validLength); } private void setBaseQosMapOctet(int rule, byte[] queueMap) { int validLength = (rule == 1 ? 8 : rule == 2 ? 16 : 64); setByteMap(tfBaseQosMapOctet, validLength, queueMap); } private byte[] getByteMap(JComboBox[] boxes, int validLength) { byte[] b = new byte[validLength]; for (int i = 0; (i < validLength) && (i <= boxes.length); i++) b[i] = (byte) Integer.parseInt((String) boxes[i].getSelectedItem()); return b; } private void setByteMap(JComboBox[] boxes, int validLength, byte[] mibValue) { //for (int i = 0; i < boxes.length; i++) // boxes[i].setSelectedItem(-1); for (int i = 0; (i < validLength) && (i < mibValue.length); i++) boxes[i].setSelectedItem(Byte.toString(mibValue[i])); } public int getIndexFromValue(int[] list, int v) { for (int i = 0; i != list.length; i++) { if (list[i] == v) return i; } return 0; } }
32d0ad309a23d6592e7d0e61128681598796a8e1
dc2abd1a2d7153f429e909355b8e40d03531eb7a
/src/com/primeresponse/testcases/Accounts/Send_SocialIntegrationEmail.java
d0c77043c6fe705fa5594a46b782b13cfacb0a2a
[]
no_license
rajkrsingh/Prime-Project
acdf4bb466f9a821fffe2d96031af06b6257cd21
60e0250cafcd93a7d58ea98fa30d1550b4028a5d
refs/heads/master
2020-03-19T02:53:49.344714
2018-06-01T05:47:00
2018-06-01T05:47:00
135,672,472
0
0
null
null
null
null
UTF-8
Java
false
false
2,331
java
package com.primeresponse.testcases.Accounts; import org.testng.annotations.AfterMethod; import org.testng.annotations.Test; import com.primeresponse.pagehelper.AccountsHelper; import com.primeresponse.pagehelper.HeaderHelper; import com.primeresponse.pagehelper.LoginHelper; import com.primeresponse.util.DriverTestCase; import com.primeresponse.util.ExecutionLog; public class Send_SocialIntegrationEmail extends DriverTestCase { @Test public void testSend_SocialIntegrationEmail() throws Exception { // Initialize objects loginHelper = new LoginHelper(getWebDriver()); headerHelper = new HeaderHelper(getWebDriver()); AccountsHelper accountsHelper = new AccountsHelper(getWebDriver()); ExecutionLog.LogAddClass(this.getClass().getName() + " and Test method " + Thread.currentThread().getStackTrace()[1].getMethodName()); try { // Open application getWebDriver().navigate().to(applicationUrl); ExecutionLog.Log("open application giturl"); // login to the application login("Admin"); ExecutionLog.Log("log-in into application"); // Select "Selenium Test" Account if not selected selectAccount(); ExecutionLog.Log("Select Selenium Test Account if not selected"); //Click on logged in account edit icon headerHelper.clickOnEditIconOfLoggedAccount(); ExecutionLog.Log("Click on logged in account edit icon"); //Click on Accounts->Users getWebDriver().navigate().to("https://app.prime-response.com/accounts/13594/accounts_users"); //headerHelper.clickOnUsers(); //ExecutionLog.Log("Click on Accounts->Users"); //Method to Send Social Integration accountsHelper.sendSocialIntegration(userEmail); ExecutionLog.Log("Method to Send Social Integration"); //verify the success notification headerHelper.checkSuccessMessage("Email successfully sent to "+userEmail+" for social integration."); ExecutionLog.Log("success message"); } catch (Error e) { captureScreenshot("testSend_SocialIntegrationEmail"); ExecutionLog.LogErrorMessage(e); throw e; } catch (Exception e) { captureScreenshot("testSend_SocialIntegrationEmail"); ExecutionLog.LogExceptionMessage(e); throw e; } } @AfterMethod public void endMethods() throws Exception { ExecutionLog.LogEndClass(this.getClass().getName()); } }
86cf19b6287a16e3508e353050ee67e298960574
9410ef0fbb317ace552b6f0a91e0b847a9a841da
/src/main/java/com/tencentcloudapi/tdid/v20210519/models/DownCptResponse.java
ff8a06fe60b73fba1a6ee8a1c522f312d95b1b00
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java-intl-en
274de822748bdb9b4077e3b796413834b05f1713
6ca868a8de6803a6c9f51af7293d5e6dad575db6
refs/heads/master
2023-09-04T05:18:35.048202
2023-09-01T04:04:14
2023-09-01T04:04:14
230,567,388
7
4
Apache-2.0
2022-05-25T06:54:45
2019-12-28T06:13:51
Java
UTF-8
Java
false
false
2,445
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.tdid.v20210519.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class DownCptResponse extends AbstractModel{ /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @return RequestId The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ public String getRequestId() { return this.RequestId; } /** * Set The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @param RequestId The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } public DownCptResponse() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public DownCptResponse(DownCptResponse source) { if (source.RequestId != null) { this.RequestId = new String(source.RequestId); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
7fd4f931ca1e830d617db801aeb59d9c6f0831cc
df71f195c8d6e84f2f4c485569c3be4b5fea5836
/src/main/java/com/cloud/distribution/web/rest/ProductTypeResource.java
be586b4338c6813c0297f5dff15111454e9a6573
[]
no_license
bobying/distribution
1366e6bdfb99ce27ce4f1356d4e5f3d8e08f8258
2c0225010276f20d6f407da9f916a5f4d97b331a
refs/heads/master
2021-05-06T15:08:26.984615
2017-12-07T04:24:44
2017-12-07T04:24:44
113,430,964
0
0
null
null
null
null
UTF-8
Java
false
false
6,800
java
package com.cloud.distribution.web.rest; import com.codahale.metrics.annotation.Timed; import com.cloud.distribution.service.ProductTypeService; import com.cloud.distribution.web.rest.errors.BadRequestAlertException; import com.cloud.distribution.web.rest.util.HeaderUtil; import com.cloud.distribution.web.rest.util.PaginationUtil; import com.cloud.distribution.service.dto.ProductTypeDTO; import com.cloud.distribution.service.dto.ProductTypeCriteria; import com.cloud.distribution.service.ProductTypeQueryService; import io.github.jhipster.web.util.ResponseUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.Optional; import java.util.stream.StreamSupport; import static org.elasticsearch.index.query.QueryBuilders.*; /** * REST controller for managing ProductType. */ @RestController @RequestMapping("/api") public class ProductTypeResource { private final Logger log = LoggerFactory.getLogger(ProductTypeResource.class); private static final String ENTITY_NAME = "productType"; private final ProductTypeService productTypeService; private final ProductTypeQueryService productTypeQueryService; public ProductTypeResource(ProductTypeService productTypeService, ProductTypeQueryService productTypeQueryService) { this.productTypeService = productTypeService; this.productTypeQueryService = productTypeQueryService; } /** * POST /product-types : Create a new productType. * * @param productTypeDTO the productTypeDTO to create * @return the ResponseEntity with status 201 (Created) and with body the new productTypeDTO, or with status 400 (Bad Request) if the productType has already an ID * @throws URISyntaxException if the Location URI syntax is incorrect */ @PostMapping("/product-types") @Timed public ResponseEntity<ProductTypeDTO> createProductType(@RequestBody ProductTypeDTO productTypeDTO) throws URISyntaxException { log.debug("REST request to save ProductType : {}", productTypeDTO); if (productTypeDTO.getId() != null) { throw new BadRequestAlertException("A new productType cannot already have an ID", ENTITY_NAME, "idexists"); } ProductTypeDTO result = productTypeService.save(productTypeDTO); return ResponseEntity.created(new URI("/api/product-types/" + result.getId())) .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) .body(result); } /** * PUT /product-types : Updates an existing productType. * * @param productTypeDTO the productTypeDTO to update * @return the ResponseEntity with status 200 (OK) and with body the updated productTypeDTO, * or with status 400 (Bad Request) if the productTypeDTO is not valid, * or with status 500 (Internal Server Error) if the productTypeDTO couldn't be updated * @throws URISyntaxException if the Location URI syntax is incorrect */ @PutMapping("/product-types") @Timed public ResponseEntity<ProductTypeDTO> updateProductType(@RequestBody ProductTypeDTO productTypeDTO) throws URISyntaxException { log.debug("REST request to update ProductType : {}", productTypeDTO); if (productTypeDTO.getId() == null) { return createProductType(productTypeDTO); } ProductTypeDTO result = productTypeService.save(productTypeDTO); return ResponseEntity.ok() .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, productTypeDTO.getId().toString())) .body(result); } /** * GET /product-types : get all the productTypes. * * @param pageable the pagination information * @param criteria the criterias which the requested entities should match * @return the ResponseEntity with status 200 (OK) and the list of productTypes in body */ @GetMapping("/product-types") @Timed public ResponseEntity<List<ProductTypeDTO>> getAllProductTypes(ProductTypeCriteria criteria, Pageable pageable) { log.debug("REST request to get ProductTypes by criteria: {}", criteria); Page<ProductTypeDTO> page = productTypeQueryService.findByCriteria(criteria, pageable); HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/product-types"); return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK); } /** * GET /product-types/:id : get the "id" productType. * * @param id the id of the productTypeDTO to retrieve * @return the ResponseEntity with status 200 (OK) and with body the productTypeDTO, or with status 404 (Not Found) */ @GetMapping("/product-types/{id}") @Timed public ResponseEntity<ProductTypeDTO> getProductType(@PathVariable Long id) { log.debug("REST request to get ProductType : {}", id); ProductTypeDTO productTypeDTO = productTypeService.findOne(id); return ResponseUtil.wrapOrNotFound(Optional.ofNullable(productTypeDTO)); } /** * DELETE /product-types/:id : delete the "id" productType. * * @param id the id of the productTypeDTO to delete * @return the ResponseEntity with status 200 (OK) */ @DeleteMapping("/product-types/{id}") @Timed public ResponseEntity<Void> deleteProductType(@PathVariable Long id) { log.debug("REST request to delete ProductType : {}", id); productTypeService.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build(); } /** * SEARCH /_search/product-types?query=:query : search for the productType corresponding * to the query. * * @param query the query of the productType search * @param pageable the pagination information * @return the result of the search */ @GetMapping("/_search/product-types") @Timed public ResponseEntity<List<ProductTypeDTO>> searchProductTypes(@RequestParam String query, Pageable pageable) { log.debug("REST request to search for a page of ProductTypes for query {}", query); Page<ProductTypeDTO> page = productTypeService.search(query, pageable); HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, "/api/_search/product-types"); return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK); } }
67d80258dd08438a6a8c05615ab9e10c475f61bc
1d9492a95cfcd1120b3c886cbfc12b609f3f313d
/springhub-web/src/main/java/com/mjeanroy/springhub/exceptions/UploadException.java
1942b2e80b0545819d2431e3f41e1e68ce7271c1
[]
no_license
mjeanroy/springhub
59a4273f3079b1ffdc61fe99e878645762e738a9
5dbfe89fb8e8b2ba40731383cac625a452534880
refs/heads/master
2021-05-15T02:02:38.685508
2020-02-12T08:02:55
2020-02-12T08:02:55
9,960,985
0
2
null
2020-02-12T08:02:56
2013-05-09T14:35:08
Java
UTF-8
Java
false
false
437
java
package com.mjeanroy.springhub.exceptions; public class UploadException extends ApplicationException { private UploadExceptionType type; public UploadException(UploadExceptionType type, String msg) { super(msg); this.type = type; } @Override public String getType() { return "UPLOAD_" + this.type.toString(); } public static enum UploadExceptionType { MULTIPART_HTTP, FILE_NOT_FOUND, FILE_EMPTY, FILE_TYPE } }
34707e90e2e1baad34812d07dc4c1c39115fde9a
24cc25194f81803501694288e84aae2e1482b62a
/java/core/src/main/java/com/greenscriptool/ResourceType.java
2d7d173072180196d1e4c6111ea0693473a5c201
[ "MIT", "Apache-2.0" ]
permissive
novadata/greenscript
40096bf9984186ed9c81a4465d4b8a66420add84
26ae7fb9d07a0d81005d66beaba0cfcec126f969
refs/heads/master
2021-01-18T15:09:11.447600
2015-07-21T08:31:42
2015-07-21T08:31:42
39,362,281
1
0
null
2015-07-20T03:55:41
2015-07-20T03:55:41
null
UTF-8
Java
false
false
665
java
package com.greenscriptool; import java.util.Arrays; import java.util.List; /** * Resource type enumeration * * @author [email protected] * @version 1.0, 2010-10-13 * @since 1.0 */ public enum ResourceType { JS(".js", ".coffee"), CSS(".css", ".less"); private ResourceType(String... extension) { if (extension.length == 0) throw new IllegalArgumentException("needs at least one extension"); exts_ = extension; } private String[] exts_; public String getExtension() { return exts_[0]; } public List<String> getAllExtensions() { return Arrays.asList(exts_); } }
65e90233f6db8a2f9d6e505b4d00b7971c7c68ff
846a3695e2c5257b6b812e3d389caf94eca82b47
/app/src/main/java/com/weima/aishangyi/jiaoshi/activity/UserClassroomOrderActivity.java
b5f3f04ae703c68553512b8282cd54d6f41dc813
[]
no_license
cgy529387306/AiShangYiTeacher
2482759cb8540cf4c30b02bc1a62a1146de2e5d2
6129f6aa5396a95bb9a9ebb73873b30cd359f4be
refs/heads/master
2020-04-26T03:21:41.866430
2019-03-01T08:32:27
2019-03-01T08:32:27
173,264,544
0
0
null
null
null
null
UTF-8
Java
false
false
2,754
java
package com.weima.aishangyi.jiaoshi.activity; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import android.util.DisplayMetrics; import com.weima.aishangyi.jiaoshi.R; import com.weima.aishangyi.jiaoshi.base.BaseActivity; import com.weima.aishangyi.jiaoshi.fragment.ClassroomOrderFragment; import com.weima.aishangyi.jiaoshi.tabstrip.PagerSlidingTabStrip; /** * 课程/课室订单 */ public class UserClassroomOrderActivity extends BaseActivity { private PagerSlidingTabStrip tabstrip; private ViewPager viewpager; private int status = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.common_trip_viewpager); setCustomTitle("课程/课室订单"); initUI(); } private void initUI() { status = getIntent().getIntExtra("status",0); tabstrip = (PagerSlidingTabStrip) findViewById(R.id.tabstrip); viewpager = (ViewPager) findViewById(R.id.viewpager); viewpager.setAdapter(new MyAdapter(getSupportFragmentManager())); tabstrip.setViewPager(viewpager); viewpager.setCurrentItem(status); //初始化显示0 tabstrip.setTextColor(getResources().getColor(R.color.text_color));//未选中字体的颜色 tabstrip.setSelectedTextColor(getResources().getColor(R.color.base_orange));//选中选项中字体的颜色 DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm);//获取屏幕宽度 int width = dm.widthPixels;//宽度 tabstrip.setTextSize(width / 28);//字体的大小 } public class MyAdapter extends FragmentStatePagerAdapter { private final String[] titles = {"全部", "待确认", "待授课","待评价"}; public MyAdapter(FragmentManager fm) { super(fm); } @Override public CharSequence getPageTitle(int position) { return titles[position]; } @Override public int getCount() { return titles.length; } @Override public Fragment getItem(int position) { if (position == 1) { return ClassroomOrderFragment.newInstance(0); } else if (position == 2) { return ClassroomOrderFragment.newInstance(1); } else if (position == 3) { return ClassroomOrderFragment.newInstance(2); }else{ return ClassroomOrderFragment.newInstance(-1); } } } }
64da83401995f8aef3bc86137570fd70fc3063d5
5ecd15baa833422572480fad3946e0e16a389000
/framework/MCS-Open/subsystems/runtime/main/api/java/com/volantis/mcs/runtime/policies/PolicyReferenceResolver.java
cec4edcb48173dfd591b6faac17caed263c7e08c
[]
no_license
jabley/volmobserverce
4c5db36ef72c3bb7ef20fb81855e18e9b53823b9
6d760f27ac5917533eca6708f389ed9347c7016d
refs/heads/master
2021-01-01T05:31:21.902535
2009-02-04T02:29:06
2009-02-04T02:29:06
38,675,289
0
1
null
null
null
null
UTF-8
Java
false
false
2,451
java
/* This file is part of Volantis Mobility Server. Volantis Mobility Server is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Volantis Mobility Server is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Volantis Mobility Server.  If not, see <http://www.gnu.org/licenses/>. */ /* ---------------------------------------------------------------------------- * (c) Volantis Systems Ltd 2005. * ---------------------------------------------------------------------------- */ package com.volantis.mcs.runtime.policies; import com.volantis.mcs.expression.PolicyExpression; import com.volantis.mcs.policies.PolicyType; import com.volantis.mcs.protocols.assets.LinkAssetReference; import com.volantis.mcs.protocols.assets.ScriptAssetReference; import com.volantis.mcs.protocols.assets.TextAssetReference; import com.volantis.mcs.integration.PageURLType; import com.volantis.mcs.themes.StyleValue; import com.volantis.mcs.themes.StyleString; import com.volantis.mcs.themes.StyleComponentURI; /** * @mock.generate */ public interface PolicyReferenceResolver { /** * @param policyExpression * @return */ RuntimePolicyReference resolvePolicyExpression( PolicyExpression policyExpression); RuntimePolicyReference resolveUnquotedPolicyExpression( String expressionAsString, PolicyType policyType); LinkAssetReference resolveQuotedLinkExpression( String expression, PageURLType urlType); ScriptAssetReference resolveQuotedScriptExpression( String expression); TextAssetReference resolveQuotedTextExpression(String expression); TextAssetReference resolveUnquotedTextExpression(String name); /** * Resolve the possibly quoted text expression as a style value. * * @param expression The possibly quoted text expression. * @return The style value, may be a {@link StyleString}, or a {@link * StyleComponentURI}. */ StyleValue resolveQuotedTextExpressionAsStyleValue(String expression); }
[ "iwilloug@b642a0b7-b348-0410-9912-e4a34d632523" ]
iwilloug@b642a0b7-b348-0410-9912-e4a34d632523
e9d1ad46a9eb291dc58a6bfef28f995da81dfd31
47119d527d55e9adcb08a3a5834afe9a82dd2254
/exportLibraries/vnxe/src/main/java/com/emc/storageos/vnxe/models/BlockHostAccess.java
a1f542d680477a1061aefd137b1ef982b461397f
[]
no_license
chrisdail/coprhd-controller
1c3ddf91bb840c66e4ece3d4b336a6df421b43e4
38a063c5620135a49013aae5e078aeb6534a5480
refs/heads/master
2020-12-03T10:42:22.520837
2015-06-08T15:24:36
2015-06-08T15:24:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
/** * Copyright 2015 EMC Corporation * All Rights Reserved */ /** * Copyright (c) 2014 EMC Corporation * All Rights Reserved * * This software contains the intellectual property of EMC Corporation * or is licensed to EMC Corporation from third parties. Use of this * software and the intellectual property contained therein is expressly * limited to the terms and conditions of the License Agreement under which * it is provided by or on behalf of EMC. */ package com.emc.storageos.vnxe.models; public class BlockHostAccess { private VNXeBase host; private int accessMask; public VNXeBase getHost() { return host; } public void setHost(VNXeBase host) { this.host = host; } public int getAccessMask() { return accessMask; } public void setAccessMask(int accessMask) { this.accessMask = accessMask; } public static enum HostLUNAccessEnum { NOACCESS(0), PRODUCTION(1), SNAPSHOT(2), BOTH(3); private int value; private HostLUNAccessEnum(int value) { this.value = value; } public int getValue() { return value; } } }
77d4ef72b26d50fe1e3e96869cf5a2deee4d933f
02127aef528ff9ba18ae478f481ab37cf3c2fb4c
/src/main/java/com/wanliang/small/service/CartItemService.java
be07ec838e318df2d27c891134820b1ca4075d49
[]
no_license
pf5512/small
2f2c78a9fcc7f0fc9df56fb4d251df49ea037ae8
923eda30e9c85214a9efb78fc3750b7fc3e572d4
refs/heads/master
2021-01-01T06:53:32.059039
2015-04-13T01:15:50
2015-04-13T01:15:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
286
java
package com.wanliang.small.service; import com.wanliang.small.entity.CartItem; import com.wanliang.small.entity.CartItem; /** * Service - 购物车项 * * @author [email protected] Team * @version 3.0 */ public interface CartItemService extends BaseService<CartItem, Long> { }
213bb79ad0b863f8ce574e1445d295ba8ea28125
36a80ecec12da8bf43980768a920c28842d2763b
/src/main/java/com/tools20022/repository/entity/SettlementTimeRequest.java
d0921adfae8d86a7dcd51b6f786805082ee06125
[]
no_license
bukodi/test02
e9045f6f88d44a5833b1cf32b15a3d7b9a64aa83
30990a093e1239b4244c2a64191b6fe1eacf3b00
refs/heads/master
2021-05-08T03:22:32.792980
2017-10-24T23:00:52
2017-10-24T23:00:52
108,186,993
0
0
null
null
null
null
UTF-8
Java
false
false
4,513
java
package com.tools20022.repository.entity; import com.tools20022.metamodel.MMBusinessAssociationEnd; import com.tools20022.metamodel.MMBusinessAttribute; import com.tools20022.metamodel.MMBusinessComponent; import com.tools20022.repository.datatype.ISODateTime; import java.util.Arrays; import java.util.concurrent.atomic.AtomicReference; /** * Provides information on the requested settlement time(s) of the payment * instruction. */ public class SettlementTimeRequest { final static private AtomicReference<MMBusinessComponent> mmObject_lazy = new AtomicReference<>(); /** * Payment for which settlement times are specified. */ public static final MMBusinessAssociationEnd Payment = new MMBusinessAssociationEnd() { { isDerived = false; elementContext_lazy = () -> SettlementTimeRequest.mmObject(); registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.REGISTERED; name = "Payment"; definition = "Payment for which settlement times are specified."; maxOccurs = 1; minOccurs = 0; opposite_lazy = () -> com.tools20022.repository.entity.Payment.SettlementTimeRequest; aggregation = com.tools20022.metamodel.MMAggregation.NONE; type_lazy = () -> com.tools20022.repository.entity.Payment.mmObject(); } }; /** * Time by which the amount of money must be credited, with confirmation, to * the CLS Bank's account at the central bank.<br> * Usage: Time must be expressed in Central European Time (CET). */ public static final MMBusinessAttribute CLSTime = new MMBusinessAttribute() { { isDerived = false; elementContext_lazy = () -> SettlementTimeRequest.mmObject(); registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.REGISTERED; name = "CLSTime"; definition = "Time by which the amount of money must be credited, with confirmation, to the CLS Bank's account at the central bank.\r\nUsage: Time must be expressed in Central European Time (CET)."; maxOccurs = 1; minOccurs = 1; simpleType_lazy = () -> ISODateTime.mmObject(); } }; /** * Time until when the payment may be settled. */ public static final MMBusinessAttribute TillTime = new MMBusinessAttribute() { { isDerived = false; elementContext_lazy = () -> SettlementTimeRequest.mmObject(); registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.REGISTERED; name = "TillTime"; definition = "Time until when the payment may be settled."; maxOccurs = 1; minOccurs = 1; simpleType_lazy = () -> ISODateTime.mmObject(); } }; /** * Time as from when the payment may be settled. */ public static final MMBusinessAttribute FromTime = new MMBusinessAttribute() { { isDerived = false; elementContext_lazy = () -> SettlementTimeRequest.mmObject(); registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.REGISTERED; name = "FromTime"; definition = "Time as from when the payment may be settled."; maxOccurs = 1; minOccurs = 1; simpleType_lazy = () -> ISODateTime.mmObject(); } }; /** * Time by when the payment must be settled to avoid rejection. */ public static final MMBusinessAttribute RejectTime = new MMBusinessAttribute() { { isDerived = false; elementContext_lazy = () -> SettlementTimeRequest.mmObject(); registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.REGISTERED; name = "RejectTime"; definition = "Time by when the payment must be settled to avoid rejection."; maxOccurs = 1; minOccurs = 1; simpleType_lazy = () -> ISODateTime.mmObject(); } }; static public MMBusinessComponent mmObject() { mmObject_lazy.compareAndSet(null, new MMBusinessComponent() { { dataDictionary_lazy = () -> com.tools20022.repository.GeneratedRepository.dataDict; registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.REGISTERED; name = "SettlementTimeRequest"; definition = "Provides information on the requested settlement time(s) of the payment instruction."; associationDomain_lazy = () -> Arrays.asList(com.tools20022.repository.entity.Payment.SettlementTimeRequest); element_lazy = () -> Arrays.asList(com.tools20022.repository.entity.SettlementTimeRequest.Payment, com.tools20022.repository.entity.SettlementTimeRequest.CLSTime, com.tools20022.repository.entity.SettlementTimeRequest.TillTime, com.tools20022.repository.entity.SettlementTimeRequest.FromTime, com.tools20022.repository.entity.SettlementTimeRequest.RejectTime); } }); return mmObject_lazy.get(); } }
daa695a104c6e3c5e2a4a381a3ed4da10fbf4dab
beb2fbdd8e5343fe76c998824c7228a546884c5e
/com.kabam.marvelbattle/src/com/google/android/gms/drive/realtime/internal/BeginCompoundOperationRequest.java
4c3b4df3c852ee12cb129e744d9f07324ce1e82f
[]
no_license
alamom/mcoc_11.2.1_store_apk
4a988ab22d6c7ad0ca5740866045083ec396841b
b43c41d3e8a43f63863d710dad812774cd14ace0
refs/heads/master
2021-01-11T17:13:02.358134
2017-01-22T19:51:35
2017-01-22T19:51:35
79,740,812
0
0
null
null
null
null
UTF-8
Java
false
false
1,080
java
package com.google.android.gms.drive.realtime.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; public class BeginCompoundOperationRequest implements SafeParcelable { public static final Parcelable.Creator<BeginCompoundOperationRequest> CREATOR = new a(); final int BR; final boolean Ri; final boolean Rj; final String mName; BeginCompoundOperationRequest(int paramInt, boolean paramBoolean1, String paramString, boolean paramBoolean2) { this.BR = paramInt; this.Ri = paramBoolean1; this.mName = paramString; this.Rj = paramBoolean2; } public int describeContents() { return 0; } public void writeToParcel(Parcel paramParcel, int paramInt) { a.a(this, paramParcel, paramInt); } } /* Location: C:\tools\androidhack\com.kabam.marvelbattle\classes.jar!\com\google\android\gms\drive\realtime\internal\BeginCompoundOperationRequest.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
8deaabc0e90e7283dda7c89e1647b85f20b65f8e
f22016e5670e437bd7c1338f28aedfe7871580f9
/axl/src/main/java/ru/cg/cda/axl/generated/ListImeRouteFilterElementRes.java
ca36a3e117126bc706237580ad2c66199c244624
[]
no_license
ilgiz-badamshin/cda
4e3c75407a0b2edbb7321b83b66e4cf455157eae
0a16d90fc9be74932ef3df682013b444d425741e
refs/heads/master
2020-05-17T05:34:17.707445
2015-12-18T13:38:49
2015-12-18T13:38:49
39,076,024
0
0
null
null
null
null
UTF-8
Java
false
false
4,094
java
package ru.cg.cda.axl.generated; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ListImeRouteFilterElementRes complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ListImeRouteFilterElementRes"> * &lt;complexContent> * &lt;extension base="{http://www.cisco.com/AXL/API/10.0}APIResponse"> * &lt;sequence> * &lt;element name="return"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="imeRouteFilterElement" type="{http://www.cisco.com/AXL/API/10.0}LImeRouteFilterElement" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ListImeRouteFilterElementRes", propOrder = { "_return" }) public class ListImeRouteFilterElementRes extends APIResponse { @XmlElement(name = "return", required = true) protected ListImeRouteFilterElementRes.Return _return; /** * Gets the value of the return property. * * @return * possible object is * {@link ListImeRouteFilterElementRes.Return } * */ public ListImeRouteFilterElementRes.Return getReturn() { return _return; } /** * Sets the value of the return property. * * @param value * allowed object is * {@link ListImeRouteFilterElementRes.Return } * */ public void setReturn(ListImeRouteFilterElementRes.Return value) { this._return = value; } /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="imeRouteFilterElement" type="{http://www.cisco.com/AXL/API/10.0}LImeRouteFilterElement" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "imeRouteFilterElement" }) public static class Return { protected List<LImeRouteFilterElement> imeRouteFilterElement; /** * Gets the value of the imeRouteFilterElement property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the imeRouteFilterElement property. * * <p> * For example, to add a new item, do as follows: * <pre> * getImeRouteFilterElement().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link LImeRouteFilterElement } * * */ public List<LImeRouteFilterElement> getImeRouteFilterElement() { if (imeRouteFilterElement == null) { imeRouteFilterElement = new ArrayList<LImeRouteFilterElement>(); } return this.imeRouteFilterElement; } } }
4337e79c3f7a1b639b84428f80283598a4c7c3ee
01a0c2148e07ad08fb7c4fa7d08c1caddd095e6a
/src/com/tz/act/observer/observe/Observe2.java
482d4d0aa7963dc3c3e51f9ae7929e17a3464f71
[]
no_license
tz1992/designModel
18168c8879c8e640936f4e77c74cbaa33ba5d6f3
87f9abe927ef3473af1c5befb8aa41122613996d
refs/heads/master
2020-03-13T03:23:16.578421
2018-05-15T02:15:05
2018-05-15T02:15:05
130,943,133
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package com.tz.act.observer.observe; import com.tz.act.observer.observed.Subject; public class Observe2 extends Observer { public Observe2(Subject subject) { this.subject=subject; subject.attach(this); } @Override public void update() { System.out.println("观察者2"+this.subject.getState()); } }
7b7f2d0b83f5b59a82f0c18880996462c706a242
e8fe1ad1386db55324e86a1ebccc45f565f129a4
/src/mobi/hsz/idea/gitignore/actions/IgnoreFileGroupAction.java
4717986a6df03bd11a3960bccac87de6707a49a9
[ "MIT", "LicenseRef-scancode-free-unknown" ]
permissive
Deckhandfirststar01/idea-gitignore
232202f593c64d6df0616a837a876383439cc2a4
aae29d82fadfe37ac85c681de2d76d6819e8187c
refs/heads/master
2023-06-26T18:36:37.802008
2018-01-30T07:05:22
2018-01-30T07:05:22
117,659,536
0
0
MIT
2022-09-08T18:59:03
2018-01-16T09:01:33
Java
UTF-8
Java
false
false
7,375
java
/* * The MIT License (MIT) * * Copyright (c) 2017 hsz Jakub Chrzanowski <[email protected]> * * 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 mobi.hsz.idea.gitignore.actions; import com.intellij.openapi.actionSystem.ActionGroup; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.containers.ContainerUtil; import mobi.hsz.idea.gitignore.IgnoreBundle; import mobi.hsz.idea.gitignore.file.type.IgnoreFileType; import mobi.hsz.idea.gitignore.lang.IgnoreLanguage; import mobi.hsz.idea.gitignore.util.CommonDataKeys; import mobi.hsz.idea.gitignore.util.ExternalFileException; import mobi.hsz.idea.gitignore.util.Utils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.PropertyKey; import java.util.Collections; import java.util.List; import java.util.Map; import static mobi.hsz.idea.gitignore.IgnoreBundle.BUNDLE_NAME; /** * Group action that ignores specified file or directory. * {@link ActionGroup} expands single action into a more child options to allow user specify * the IgnoreFile that will be used for file's path storage. * * @author Jakub Chrzanowski <[email protected]> * @since 0.5 */ public class IgnoreFileGroupAction extends ActionGroup { /** Maximum filename length for the action name. */ private static final int FILENAME_MAX_LENGTH = 30; /** List of suitable Gitignore {@link VirtualFile}s that can be presented in an IgnoreFile action. */ @NotNull private final Map<IgnoreFileType, List<VirtualFile>> files = ContainerUtil.newHashMap(); /** Action presentation's text for single element. */ @PropertyKey(resourceBundle = BUNDLE_NAME) private final String presentationTextSingleKey; /** {@link Project}'s base directory. */ @Nullable private VirtualFile baseDir; /** * Builds a new instance of {@link IgnoreFileGroupAction}. * Describes action's presentation. */ public IgnoreFileGroupAction() { this("action.addToIgnore.group", "action.addToIgnore.group.description", "action.addToIgnore.group.noPopup"); } /** * Builds a new instance of {@link IgnoreFileGroupAction}. * Describes action's presentation. * * @param textKey Action presentation's text key * @param descriptionKey Action presentation's description key */ public IgnoreFileGroupAction(@PropertyKey(resourceBundle = BUNDLE_NAME) String textKey, @PropertyKey(resourceBundle = BUNDLE_NAME) String descriptionKey, @PropertyKey(resourceBundle = BUNDLE_NAME) String textSingleKey) { final Presentation p = getTemplatePresentation(); p.setText(IgnoreBundle.message(textKey)); p.setDescription(IgnoreBundle.message(descriptionKey)); this.presentationTextSingleKey = textSingleKey; } /** * Presents a list of suitable Gitignore files that can cover currently selected {@link VirtualFile}. * Shows a subgroup with available files or one option if only one Gitignore file is available. * * @param e action event */ @Override public void update(AnActionEvent e) { final VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); final Project project = e.getData(CommonDataKeys.PROJECT); final Presentation presentation = e.getPresentation(); files.clear(); if (project != null && file != null) { try { presentation.setVisible(true); baseDir = project.getBaseDir(); for (IgnoreLanguage language : IgnoreBundle.LANGUAGES) { final IgnoreFileType fileType = language.getFileType(); List<VirtualFile> list = Utils.getSuitableIgnoreFiles(project, fileType, file); Collections.reverse(list); files.put(fileType, list); } } catch (ExternalFileException e1) { presentation.setVisible(false); } } setPopup(countFiles() > 1); } /** * Creates subactions bound to the specified Gitignore {@link VirtualFile}s using {@link IgnoreFileAction}. * * @param e action event * @return actions list */ @NotNull @Override public AnAction[] getChildren(@Nullable AnActionEvent e) { AnAction[] actions; int count = countFiles(); if (count == 0 || baseDir == null) { actions = new AnAction[0]; } else { actions = new AnAction[count]; int i = 0; for (Map.Entry<IgnoreFileType, List<VirtualFile>> entry : files.entrySet()) { for (VirtualFile file : entry.getValue()) { IgnoreFileAction action = createAction(file); actions[i++] = action; String name = Utils.getRelativePath(baseDir, file); if (StringUtil.isNotEmpty(name)) { name = StringUtil.shortenPathWithEllipsis(name, FILENAME_MAX_LENGTH); } if (count == 1) { name = IgnoreBundle.message(presentationTextSingleKey, name); } Presentation presentation = action.getTemplatePresentation(); presentation.setIcon(entry.getKey().getIcon()); presentation.setText(name); } } } return actions; } /** * Creates new {@link IgnoreFileAction} action instance. * * @param file current file * @return action instance */ protected IgnoreFileAction createAction(@NotNull VirtualFile file) { return new IgnoreFileAction(file); } /** * Counts items in {@link #files} map. * * @return files amount */ private int countFiles() { int size = 0; for (List value : files.values()) { size += value.size(); } return size; } }
76c03da9e282eeb22af1cc05093eb6fb16d53d77
5194d8757a49139f0174a8932125aaffb293ca60
/org.opentravel/_2014B/opentravel-schema/golf/src/main/java/org/jibx/schema/org/opentravel/_2014B/golf/ws/GolfService.java
bb335ba57038048c220e71e21aec00bb0d0e5393
[]
no_license
mrshishirr/schema-library
ad18c208cc321c91fef483d1dca36dbd39581b3f
37e3432665aaa10544c0491dc550c3c5ca293641
refs/heads/master
2022-03-31T23:19:13.476699
2020-01-27T05:04:54
2020-01-27T05:04:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
256
java
package org.jibx.schema.org.opentravel._2014B.golf.ws; import org.jibx.schema.org.opentravel._2014B.golf.*; public interface GolfService { /** * Service the xyz request. * @param request * @return */ // TODO public XyzRS xyz(XyzRQ request); }
e25113d19354d3233b955c8333c0de94fca01b59
d931eae55c638dc24565cb7e8e4b7569f0c178d4
/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/template/TemplateContainer.java
e978ac25c96087beb1187d3f1616d5c12d242479
[ "Apache-2.0" ]
permissive
qll3609120/bboss-elasticsearch
af93d350e50cc22e0f1debdc7a1781dc7e492f4e
d112946dbeb8183e06086dec40bb83569f9c1c56
refs/heads/master
2021-04-23T06:20:06.750481
2020-03-20T15:38:07
2020-03-20T15:38:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,847
java
package org.frameworkset.elasticsearch.template; /** * Copyright 2008 biaoping.yin * <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. */ import com.frameworkset.util.DaemonThread; import com.frameworkset.util.ResourceInitial; import java.util.Set; /** * <p>Description: </p> * <p></p> * <p>Copyright (c) 2018</p> * @Date 2020/1/17 14:36 * @author biaoping.yin * @version 1.0 */ public interface TemplateContainer { public final String NAME_perKeyDSLStructionCacheSize = "perKeyDSLStructionCacheSize"; public final String NAME_alwaysCacheDslStruction = "alwaysCacheDslStruction"; public final String NAME_templateFile = "templateFile"; public final String NAME_templateName = "templateName"; public final String NAME_istpl = "istpl"; public final String NAME_multiparser = "multiparser"; String getNamespace(); Set getTempalteNames(); TemplateMeta getProBean(String key); void destroy(boolean b); void reinit(ESUtil esUtil); /** * 命名空间对应的全局每一个template对应的dsl语法缓冲区大小 * @return */ int getPerKeyDSLStructionCacheSize(); /** * 命名空间对应的全局是否开启每一个template对应的dsl语法缓冲机制 * @return */ boolean isAlwaysCacheDslStruction(); void monitor(DaemonThread daemonThread, ResourceInitial resourceTempateRefresh); }
03be3a719f76680d7fcbb97d9c470136a820a65c
9dfb07095844525a9d1b5a3e5de3cb840486c12b
/MinecraftServer/src/net/minecraft/network/play/server/SPacketUnloadChunk.java
e31021b2921160d1ff5a66fdc354535fc5051797
[]
no_license
ilYYYa/ModdedMinecraftServer
0ae1870e6ba9d388afb8fd6e866ca6a62f96a628
7b8143a11f848bf6411917e3d9c60b0289234a3f
refs/heads/master
2020-12-24T20:10:30.533606
2017-04-03T15:32:15
2017-04-03T15:32:15
86,241,373
0
0
null
null
null
null
UTF-8
Java
false
false
1,146
java
package net.minecraft.network.play.server; import java.io.IOException; import net.minecraft.network.Packet; import net.minecraft.network.PacketBuffer; import net.minecraft.network.play.INetHandlerPlayClient; public class SPacketUnloadChunk implements Packet<INetHandlerPlayClient> { private int x; private int z; public SPacketUnloadChunk() { } public SPacketUnloadChunk(int xIn, int zIn) { this.x = xIn; this.z = zIn; } /** * Reads the raw packet data from the data stream. */ public void readPacketData(PacketBuffer buf) throws IOException { this.x = buf.readInt(); this.z = buf.readInt(); } /** * Writes the raw packet data to the data stream. */ public void writePacketData(PacketBuffer buf) throws IOException { buf.writeInt(this.x); buf.writeInt(this.z); } /** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayClient handler) { handler.processChunkUnload(this); } }
b16ffe918af0317f619b67a9388c69278b6c75d5
b2bfac7b91b2542228931c10c668ca2f67e86b51
/fba/app/src/main/java/com/ppu/fba/ui/dy.java
79e21470938225998d695b9ccf0625d92c48f08f
[]
no_license
abozanona/fbaAndroid
b58be90fc94ceec5170d84133c1e8c4e2be8806f
f058eb0317df3e76fd283e285c4dd3dbc354aef5
refs/heads/master
2021-09-26T22:05:31.517265
2018-11-03T07:21:17
2018-11-03T07:21:17
108,681,428
1
0
null
null
null
null
UTF-8
Java
false
false
506
java
package com.ppu.fba.ui; import com.ppu.fba.p009d.C0309f; import java.util.Comparator; public class dy implements Comparator { final /* synthetic */ bg f1790a; dy(bg bgVar) { this.f1790a = bgVar; } public int m2130a(String str, String str2) { return (str == null || str2 == null) ? -1 : C0309f.m1980c(str).compareTo(C0309f.m1980c(str2)); } public /* synthetic */ int compare(Object obj, Object obj2) { return m2130a((String) obj, (String) obj2); } }
a6975b8569307135f02b57d66b145fdf3ed49ad2
8217a23d88d4c230a3ace95c722c2c752713b8ec
/app/src/main/java/com/cds/iot/util/DimenUtils.java
b7d300053c1c0997ce9378787f88b8d453fffb18
[ "Apache-2.0" ]
permissive
TonyJava/Iot_Project
b1d370c9c0c76713adf2b471c5aab6f9ed857850
68ab418cb934c267897a166b39e2ee3f0c0f3caf
refs/heads/master
2022-02-22T08:44:51.481730
2019-07-02T09:33:25
2019-07-02T09:33:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,976
java
package com.cds.iot.util; import android.content.Context; import android.util.DisplayMetrics; import android.util.TypedValue; import android.view.View; import android.view.ViewGroup; /** * Created by Michael Smith on 2016/8/2. */ public class DimenUtils { /** * dp转px */ public static int dp2px(Context context, float dpValue) { final float scale = context.getResources().getDisplayMetrics().density; return (int) (dpValue * scale + 0.5f); } /** * px转dp */ public static int px2dp(Context context, float pxValue) { final float scale = context.getResources().getDisplayMetrics().density; return (int) (pxValue / scale + 0.5f); } /** * sp转px */ public static int sp2px(Context context, float spValue) { final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; return (int) (spValue * fontScale + 0.5f); } /** * px转sp */ public static int px2sp(Context context, float pxValue) { final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; return (int) (pxValue / fontScale + 0.5f); } /** * 各种单位转换 * 该方法存在于TypedValue */ public static float applyDimension(int unit, float value, DisplayMetrics metrics) { switch (unit) { case TypedValue.COMPLEX_UNIT_PX: return value; case TypedValue.COMPLEX_UNIT_DIP: return value * metrics.density; case TypedValue.COMPLEX_UNIT_SP: return value * metrics.scaledDensity; case TypedValue.COMPLEX_UNIT_PT: return value * metrics.xdpi * (1.0f / 72); case TypedValue.COMPLEX_UNIT_IN: return value * metrics.xdpi; case TypedValue.COMPLEX_UNIT_MM: return value * metrics.xdpi * (1.0f / 25.4f); } return 0; } /** * 在onCreate()即可强行获取View的尺寸 */ public static int[] forceGetViewSize(View view) { int widthMeasureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); int heightMeasureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); view.measure(widthMeasureSpec, heightMeasureSpec); return new int[]{view.getMeasuredWidth(), view.getMeasuredHeight()}; } /** * ListView中提前测量View尺寸 * 如headerView,用的时候拷贝到ListView中 */ private void measureView(View view) { ViewGroup.LayoutParams p = view.getLayoutParams(); if (p == null) { p = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); } int width = ViewGroup.getChildMeasureSpec(0, 0, p.width); int height; int tempHeight = p.height; if (tempHeight > 0) { height = View.MeasureSpec.makeMeasureSpec(tempHeight, View.MeasureSpec.EXACTLY); } else { height = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); } view.measure(width, height); } }
ce087ea5608a73f986d3a0e3774b93bcf7f62ac4
b5389245f454bd8c78a8124c40fdd98fb6590a57
/big_variable_tree/androidAppModule55/src/main/java/androidAppModule55packageJava0/Foo3.java
956f99d357ad467e95eb3c1833a96dd52a09188b
[]
no_license
jin/android-projects
3bbf2a70fcf9a220df3716b804a97b8c6bf1e6cb
a6d9f050388cb8af84e5eea093f4507038db588a
refs/heads/master
2021-10-09T11:01:51.677994
2018-12-26T23:10:24
2018-12-26T23:10:24
131,518,587
29
1
null
2018-12-26T23:10:25
2018-04-29T18:21:09
Java
UTF-8
Java
false
false
264
java
package androidAppModule55packageJava0; public class Foo3 { public void foo0() { new androidAppModule55packageJava0.Foo2().foo3(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } }
d97ed33c1b4c011248aaa28ea8172309d77d0060
2bef59efd6fbf74a0168debfe4b5c3eaf5616a08
/src/main/java/net/fabricmc/loader/transformer/EnvironmentStrippingData.java
cdd7c295b94a7b28d687bfd70ca85f79768877b2
[ "Apache-2.0" ]
permissive
modmuss50/fabric-loader
07476f6570c563c1fb9d8cb91c8fd56494851527
c46087e6bc8265fa7781bc861a6a5c02f4d0fc23
refs/heads/master
2023-07-06T21:42:20.226007
2019-09-18T21:41:21
2019-09-18T21:41:21
211,907,484
4
1
Apache-2.0
2021-06-24T06:50:57
2019-09-30T16:43:35
null
UTF-8
Java
false
false
5,052
java
/* * Copyright 2016 FabricMC * * 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 net.fabricmc.loader.transformer; import net.fabricmc.api.Environment; import net.fabricmc.api.EnvironmentInterface; import net.fabricmc.api.EnvironmentInterfaces; import org.objectweb.asm.*; import java.util.Collection; import java.util.HashSet; /** * Scans a class for Environment and EnvironmentInterface annotations to figure out what needs to be stripped. */ public class EnvironmentStrippingData extends ClassVisitor { private static final String ENVIRONMENT_DESCRIPTOR = Type.getDescriptor(Environment.class); private static final String ENVIRONMENT_INTERFACE_DESCRIPTOR = Type.getDescriptor(EnvironmentInterface.class); private static final String ENVIRONMENT_INTERFACES_DESCRIPTOR = Type.getDescriptor(EnvironmentInterfaces.class); private final String envType; private boolean stripEntireClass = false; private final Collection<String> stripInterfaces = new HashSet<>(); private final Collection<String> stripFields = new HashSet<>(); private final Collection<String> stripMethods = new HashSet<>(); private class EnvironmentAnnotationVisitor extends AnnotationVisitor { private final Runnable onEnvMismatch; private EnvironmentAnnotationVisitor(int api, Runnable onEnvMismatch) { super(api); this.onEnvMismatch = onEnvMismatch; } @Override public void visitEnum(String name, String descriptor, String value) { if ("value".equals(name) && !envType.equals(value)) { onEnvMismatch.run(); } } } private class EnvironmentInterfaceAnnotationVisitor extends AnnotationVisitor { private boolean envMismatch; private Type itf; private EnvironmentInterfaceAnnotationVisitor(int api) { super(api); } @Override public void visitEnum(String name, String descriptor, String value) { if ("value".equals(name) && !envType.equals(value)) { envMismatch = true; } } @Override public void visit(String name, Object value) { if ("itf".equals(name)) { itf = (Type) value; } } @Override public void visitEnd() { if (envMismatch) { stripInterfaces.add(itf.getInternalName()); } } } private AnnotationVisitor visitMemberAnnotation(String descriptor, boolean visible, Runnable onEnvMismatch) { if (ENVIRONMENT_DESCRIPTOR.equals(descriptor)) { return new EnvironmentAnnotationVisitor(api, onEnvMismatch); } return null; } public EnvironmentStrippingData(int api, String envType) { super(api); this.envType = envType; } @Override public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) { if (ENVIRONMENT_DESCRIPTOR.equals(descriptor)) { return new EnvironmentAnnotationVisitor(api, () -> stripEntireClass = true); } else if (ENVIRONMENT_INTERFACE_DESCRIPTOR.equals(descriptor)) { return new EnvironmentInterfaceAnnotationVisitor(api); } else if (ENVIRONMENT_INTERFACES_DESCRIPTOR.equals(descriptor)) { return new AnnotationVisitor(api) { @Override public AnnotationVisitor visitArray(String name) { if ("value".equals(name)) { return new AnnotationVisitor(api) { @Override public AnnotationVisitor visitAnnotation(String name, String descriptor) { return new EnvironmentInterfaceAnnotationVisitor(api); } }; } return null; } }; } return null; } @Override public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) { return new FieldVisitor(api) { @Override public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) { return visitMemberAnnotation(descriptor, visible, () -> stripFields.add(name + descriptor)); } }; } @Override public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) { String methodId = name + descriptor; return new MethodVisitor(api) { @Override public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) { return visitMemberAnnotation(descriptor, visible, () -> stripMethods.add(methodId)); } }; } public boolean stripEntireClass() { return stripEntireClass; } public Collection<String> getStripInterfaces() { return stripInterfaces; } public Collection<String> getStripFields() { return stripFields; } public Collection<String> getStripMethods() { return stripMethods; } public boolean isEmpty() { return stripInterfaces.isEmpty() && stripFields.isEmpty() && stripMethods.isEmpty(); } }
0e2bd666cf2517379c913c80044bd70a6488692b
4dd22e45d6216df9cd3b64317f6af953f53677b7
/LMS/src/main/java/com/ulearning/ulms/content/ugroupship/dao/UGroupShipDAOFactory.java
2ea405e43ac3f16b4cf6592ce835aef4f7b46c24
[]
no_license
tianpeijun198371/flowerpp
1325344032912301aaacd74327f24e45c32efa1e
169d3117ee844594cb84b2114e3fd165475f4231
refs/heads/master
2020-04-05T23:41:48.254793
2008-02-16T18:03:08
2008-02-16T18:03:08
40,278,397
0
0
null
null
null
null
UTF-8
Java
false
false
1,032
java
/** * Copyright (c) 2000-2005.Huaxia Dadi Distance Learning Services Co.,Ltd. * All rights reserved. */ package com.ulearning.ulms.content.ugroupship.dao; import com.ulearning.ulms.content.ugroupship.exceptions.UGroupShipDAOSysException; /** * Class description goes here. * <p/> * Created by Auto Code Produce System * User: xiejh * Date: 20060317 * Time: 103906 */ public class UGroupShipDAOFactory { public static UGroupShipDAO getDAO() throws UGroupShipDAOSysException { UGroupShipDAO dao = null; try { dao = new UGroupShipDAOImpl(); } catch (Exception se) { throw new UGroupShipDAOSysException( "UGroupShipDAOFactory.getDAO: Exception while getting DAO type : \n" + se.getMessage()); } return dao; } }
[ "flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626" ]
flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626
7b1138689f1aa3c145ebdd39b1e268b86a1a8eb9
f33516ffd4ac82b741f936ae2f7ef974b5f7e2f9
/changedPlugins/org.emftext.language.java.resource.java/src-gen/org/emftext/language/java/resource/java/mopp/JavaAntlrScanner.java
a8c5b5e09a485b62ed51cc28cf27d31a3a4bbbf0
[]
no_license
ichupakhin/sdq
e8328d5fdc30482c2f356da6abdb154e948eba77
32cc990e32b761aa37420f9a6d0eede330af50e2
refs/heads/master
2023-01-06T13:33:20.184959
2020-11-01T13:29:04
2020-11-01T13:29:04
246,244,334
0
0
null
null
null
null
UTF-8
Java
false
false
1,633
java
/******************************************************************************* * Copyright (c) 2006-2015 * Software Technology Group, Dresden University of Technology * DevBoost GmbH, Dresden, Amtsgericht Dresden, HRB 34001 * * 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: * Software Technology Group - TU Dresden, Germany; * DevBoost GmbH - Dresden, Germany * - initial API and implementation ******************************************************************************/ package org.emftext.language.java.resource.java.mopp; import org.antlr.runtime3_4_0.ANTLRStringStream; import org.antlr.runtime3_4_0.Lexer; import org.antlr.runtime3_4_0.Token; public class JavaAntlrScanner implements org.emftext.language.java.resource.java.IJavaTextScanner { private Lexer antlrLexer; public JavaAntlrScanner(Lexer antlrLexer) { this.antlrLexer = antlrLexer; } public org.emftext.language.java.resource.java.IJavaTextToken getNextToken() { if (antlrLexer.getCharStream() == null) { return null; } final Token current = antlrLexer.nextToken(); if (current == null || current.getType() < 0) { return null; } org.emftext.language.java.resource.java.IJavaTextToken result = new org.emftext.language.java.resource.java.mopp.JavaANTLRTextToken(current); return result; } public void setText(String text) { antlrLexer.setCharStream(new ANTLRStringStream(text)); } }
69cfb1d43b4925c8f2c5790362ce844dc299f64f
339265c37840a7a8fece6418c0398f93b0a95ac4
/src/com/engc/oamobile/ui/home/MainActivity.java
05d4b19ae2c1c8e32c0b1cf11c9e1aac6151e28f
[]
no_license
giserh/OAMobile
f93b69ea72f21ac8a4b7cc4de032fb7c41fef10b
98e7fafc63b003f5f6b77e15397a0524a431441e
refs/heads/master
2021-01-14T14:06:42.335423
2014-07-17T16:23:42
2014-07-17T16:23:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,303
java
package com.engc.oamobile.ui.home; import java.util.ArrayList; import java.util.List; import android.annotation.SuppressLint; import android.app.ActionBar; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.engc.oamobile.R; import com.engc.oamobile.support.utils.BitmapManager; import com.engc.oamobile.support.utils.GlobalContext; import com.engc.oamobile.support.widgets.ShowMorePopupWindow; import com.engc.oamobile.ui.audit.OnlineAudit; @SuppressLint("NewApi") public class MainActivity extends Activity { private GridView gvModem; public List<String> imgtitleList; // 存放应用标题list public List<Integer> imgList; // 存放应用图片list public View[] itemViews; private ShowMorePopupWindow smPw; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ActionBar action = getActionBar(); action.hide(); initView(); initGridData(); } private void initView() { gvModem = (GridView) findViewById(R.id.gvmodem); ImageView imgMore = (ImageView) findViewById(R.id.img_titlebar_more); imgMore.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { showPopupWindow(); showPopupView(); } }); gvModem.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent intent; switch (position) { case 0: intent = new Intent(MainActivity.this, OnlineAudit.class); startActivity(intent); break; case 1: break; default: break; } } }); } public void showPopupWindow() { smPw = new ShowMorePopupWindow(MainActivity.this, itemsOnClick); // 显示窗口 View view = MainActivity.this.findViewById(R.id.img_titlebar_more); // 计算坐标的偏移量 int xoffInPixels = smPw.getWidth() - view.getWidth() + 10; smPw.showAsDropDown(view, -xoffInPixels, 0); } // 为弹出窗口实现监听类 private OnClickListener itemsOnClick = new OnClickListener() { public void onClick(View v) { smPw.dismiss(); } }; // 设置popupView private void showPopupView() { View view = ShowMorePopupWindow.initView(); /* ImageView userFace = (ImageView) view.findViewById(R.id.userface); TextView userName = (TextView) view.findViewById(R.id.username);*/ // userName.setText(GlobalContext.getInstance().getSpUtil().getUserInfo().getUsername()); // String url // =GlobalContext.getInstance().getSpUtil().getUserInfo().getPhoto(); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); /* * if (id == R.id.action_settings) { return true; } */ return super.onOptionsItemSelected(item); } private void initGridData() { imgtitleList = new ArrayList<String>(); imgList = new ArrayList<Integer>(); imgtitleList.clear(); imgList.clear(); imgtitleList.add("新闻公告"); imgtitleList.add("在线审批"); imgtitleList.add("请假"); imgtitleList.add("即时消息"); imgtitleList.add("通讯录"); imgtitleList.add("请假记录"); imgList.add(R.drawable.icon_news); imgList.add(R.drawable.icon_online_audit); imgList.add(R.drawable.icon_leave); imgList.add(R.drawable.icon_message); imgList.add(R.drawable.icon_contact); imgList.add(R.drawable.icon_leave_record); gvModem.setAdapter(new GridViewModemAdapter(imgtitleList, imgList)); } /** * * @ClassName: GridViewModemAdapter * @Description: APPs 九宫格 数据适配源 * @author wutao * @date 2013-10-10 上午11:23:54 * */ public class GridViewModemAdapter extends BaseAdapter { public GridViewModemAdapter(List<String> imgTitles, List<Integer> images) { itemViews = new View[images.size()]; for (int i = 0; i < itemViews.length; i++) { itemViews[i] = makeItemView(imgTitles.get(i), images.get(i)); } } public View makeItemView(String imageTitilsId, int imageId) { // try { // LayoutInflater inflater = (LayoutInflater) // UtitlsModemFragment.this // .getSystemService(LAYOUT_INFLATER_SERVICE); // View // view=LayoutInflater.from(getActivity().getApplicationContext()).inflate(R.layout.grid_apps_item, // null); LayoutInflater inflater = LayoutInflater.from(MainActivity.this); View itemView = inflater.inflate(R.layout.grid_apps_item, null); TextView title = (TextView) itemView.findViewById(R.id.TextItemId); title.setText(imageTitilsId); ImageView image = (ImageView) itemView .findViewById(R.id.ImageItemId); image.setImageResource(imageId); // image.setScaleType(ImageView.ScaleType.FIT_CENTER); return itemView; /* * } catch (Exception e) { * System.out.println("makeItemView Exception error" + * e.getMessage()); return null; } */ } @Override public int getCount() { // TODO Auto-generated method stub return itemViews.length; } @Override public Object getItem(int position) { // TODO Auto-generated method stub return itemViews[position]; } @Override public long getItemId(int position) { // TODO Auto-generated method stub return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub if (convertView == null) { return itemViews[position]; } return convertView; } } }
4c336672ace5fb5488997275eb5b48f81058b3b1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/35/35_7f0863e3a13e435aad9b0eba2d6a314c2adb9f44/IO/35_7f0863e3a13e435aad9b0eba2d6a314c2adb9f44_IO_t.java
26ffc7dbee366157cfeae5fe5dd72377e495afe3
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,230
java
package tdt4186.exercise3.code; public class IO { private Queue ioQueue; private Statistics statistics; private long ioWait; private Gui gui; private Process activeProcess = null; public IO(Queue ioQueue, Statistics statistics, EventQueue eventQueue, long ioWait, Gui gui) { this.ioQueue = ioQueue; this.statistics = statistics; this.gui = gui; this.ioWait = ioWait; } public boolean addProcess(Process p) { ioQueue.insert(p); if (activeProcess == null) { start(); return true; } else { return false; } } public Process start() { if (ioQueue.isEmpty()) { return null; } Process p = (Process) ioQueue.removeNext(); activeProcess = p; gui.setIoActive(p); return p; } public Process getProcess() { Process p = activeProcess; activeProcess = null; gui.setIoActive(activeProcess); return p; } public long getIoTime() { return (long) (Math.random() * (ioWait * 2) + ioWait / 2); } public void updateTime(long timePassed) { long l = this.ioQueue.getQueueLength(); statistics.ioQueueLengthTime += l*timePassed; if(l > statistics.longestIoQueueLength) statistics.longestIoQueueLength = l; } }
3c6b24f265539e79b7a1dedc8a42347e367518bc
80e32257a04999dbe7fd74cebf9c86df6284c670
/stage-1/stage-1-lesson-4/src/main/java/com/zhang/deep/in/java/fucntional/FunctionDemo.java
f72118affde7ac43ef7b5faf0a048d5317f3dbe5
[]
no_license
zhang1990zxc/deep-in-java
19cede7833b38257b8f5587a8368ee31764c5447
0661fcdc48d9f6d702a08797bbd7279cdeab1826
refs/heads/master
2023-05-01T05:40:30.117242
2020-09-21T10:33:22
2020-09-21T10:33:22
253,047,624
0
0
null
2023-04-17T19:34:58
2020-04-04T16:36:51
Java
UTF-8
Java
false
false
619
java
package com.zhang.deep.in.java.fucntional; import java.util.function.Function; /** * @ClassName FunctionDemo * @Description 整条街最靓的仔,写点注释吧 * @Author 天涯 * @Date 2020/4/7 23:30 * @Version 1.0 **/ public class FunctionDemo { public static void main(String[] args) { Function<String, Long> stringToLong = Long::valueOf; System.out.println(stringToLong.apply("1")); Function<Long, String> longToString = String::valueOf; System.out.println(longToString.apply(1L)); Long value = stringToLong.compose(String::valueOf).apply(1L); } }
fffde435adcfab051f18035aca5c2748cd68e345
ba2386ce813d793d4ed122065575878bd4a9bd38
/app/src/main/java/ve/com/abicelis/cryptomaster/data/local/CachedCoinDao.java
66753330ac7de0cbda6b594ec7cc6985054a61e6
[ "MIT" ]
permissive
abicelis/CryptoMaster
1b9bdc9ae5341d0f986562502c54620494563dd9
cad16738bdad5e36dfc6ae9e091b4db6e35638b1
refs/heads/master
2020-03-18T05:10:59.880500
2019-01-04T20:47:43
2019-01-04T20:47:43
134,328,677
1
2
null
null
null
null
UTF-8
Java
false
false
3,325
java
package ve.com.abicelis.cryptomaster.data.local; import android.arch.persistence.room.Dao; import android.arch.persistence.room.Delete; import android.arch.persistence.room.Insert; import android.arch.persistence.room.OnConflictStrategy; import android.arch.persistence.room.Query; import android.arch.persistence.room.RoomWarnings; import android.arch.persistence.room.Transaction; import android.arch.persistence.room.Update; import java.util.List; import io.reactivex.Maybe; import io.reactivex.Single; import ve.com.abicelis.cryptomaster.data.model.CachedCoin; import ve.com.abicelis.cryptomaster.data.model.Coin; /** * Created by abicelis on 23/6/2018. */ @Dao public abstract class CachedCoinDao { @Query("SELECT count(*) FROM cached_coin") public abstract Single<Integer> count(); @Query("SELECT * FROM cached_coin") public abstract Single<List<CachedCoin>> getAll(); @Query("SELECT * FROM cached_coin where cached_coin_id = :cachedCoinId") public abstract Maybe<CachedCoin> getById(long cachedCoinId); @Query("SELECT * FROM cached_coin where cached_coin_id IN (:cachedCoinIds)") public abstract Maybe<List<CachedCoin>> getByIds(long[] cachedCoinIds); @Query("SELECT * FROM cached_coin where code = :code") public abstract Maybe<CachedCoin> getByCode(String code); @Query("SELECT * FROM cached_coin where code IN (:codes)") public abstract Maybe<List<CachedCoin>> getByCodes(String codes); @Query("SELECT * FROM cached_coin where name = :name") public abstract Maybe<CachedCoin> getByName(String name); @Query("SELECT * FROM cached_coin where name IN (:names)") public abstract Maybe<List<CachedCoin>> getByNames(String names); @Query("SELECT * FROM cached_coin ORDER BY rank ASC LIMIT :limit") public abstract Single<List<CachedCoin>> getByRank(int limit); @SuppressWarnings(RoomWarnings.CURSOR_MISMATCH) //Skip warning, mismatch with calculated column relevance @Query("SELECT *" + ",(name LIKE :query) +" + " (website_slug LIKE :query) +" + " (CASE WHEN code LIKE :query THEN 2 ELSE 0 END)" + " AS relevance" + " FROM cached_coin" + " WHERE name LIKE :query OR code LIKE :query OR website_slug LIKE :query" + " ORDER BY [relevance] desc") public abstract Single<List<CachedCoin>> find(String query); @SuppressWarnings(RoomWarnings.CURSOR_MISMATCH) //Skip warning, mismatch with calculated column relevance @Query("SELECT *" + ",(name LIKE :query) +" + " (website_slug LIKE :query) +" + " (CASE WHEN code LIKE :query THEN 2 ELSE 0 END)" + " AS relevance" + " FROM cached_coin" + " WHERE name LIKE :query OR code LIKE :query OR website_slug LIKE :query" + " ORDER BY [relevance] desc" + " LIMIT :limit") public abstract Single<List<CachedCoin>> find(String query, int limit); @Insert(onConflict = OnConflictStrategy.REPLACE) public abstract long[] insert(List<CachedCoin> coins); @Query("DELETE FROM cached_coin") public abstract int deleteAll(); @Transaction public void deleteCachedCoinsAndInsertNewOnes(List<CachedCoin> coins) { deleteAll(); insert(coins); } }
d75135af0bd90036b6d5316250d6eedb293c7c20
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project95/src/main/java/org/gradle/test/performance95_5/Production95_486.java
f40137d57c278ca24f20cf42be6fae7a68014483
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance95_5; public class Production95_486 extends org.gradle.test.performance17_5.Production17_486 { private final String property; public Production95_486() { this.property = "foo"; } public String getProperty() { return property; } }
33735d13db2bc927c0546e581dea466ac809a60e
32cd70512c7a661aeefee440586339211fbc9efd
/aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/model/CreateByteMatchSetRequest.java
c0260048eff00dbc564fce711a6983e5a0cf4cc4
[ "Apache-2.0" ]
permissive
twigkit/aws-sdk-java
7409d949ce0b0fbd061e787a5b39a93db7247d3d
0b8dd8cf5e52ad7ae57acd2ce7a584fd83a998be
refs/heads/master
2020-04-03T16:40:16.625651
2018-05-04T12:05:14
2018-05-04T12:05:14
60,255,938
0
1
Apache-2.0
2018-05-04T12:48:26
2016-06-02T10:40:53
Java
UTF-8
Java
false
false
5,791
java
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights * Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.waf.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** * */ public class CreateByteMatchSetRequest extends AmazonWebServiceRequest implements Serializable, Cloneable { /** * <p> * A friendly name or description of the <a>ByteMatchSet</a>. You can't * change <code>Name</code> after you create a <code>ByteMatchSet</code>. * </p> */ private String name; /** * <p> * The value returned by the most recent call to <a>GetChangeToken</a>. * </p> */ private String changeToken; /** * <p> * A friendly name or description of the <a>ByteMatchSet</a>. You can't * change <code>Name</code> after you create a <code>ByteMatchSet</code>. * </p> * * @param name * A friendly name or description of the <a>ByteMatchSet</a>. You * can't change <code>Name</code> after you create a * <code>ByteMatchSet</code>. */ public void setName(String name) { this.name = name; } /** * <p> * A friendly name or description of the <a>ByteMatchSet</a>. You can't * change <code>Name</code> after you create a <code>ByteMatchSet</code>. * </p> * * @return A friendly name or description of the <a>ByteMatchSet</a>. You * can't change <code>Name</code> after you create a * <code>ByteMatchSet</code>. */ public String getName() { return this.name; } /** * <p> * A friendly name or description of the <a>ByteMatchSet</a>. You can't * change <code>Name</code> after you create a <code>ByteMatchSet</code>. * </p> * * @param name * A friendly name or description of the <a>ByteMatchSet</a>. You * can't change <code>Name</code> after you create a * <code>ByteMatchSet</code>. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateByteMatchSetRequest withName(String name) { setName(name); return this; } /** * <p> * The value returned by the most recent call to <a>GetChangeToken</a>. * </p> * * @param changeToken * The value returned by the most recent call to * <a>GetChangeToken</a>. */ public void setChangeToken(String changeToken) { this.changeToken = changeToken; } /** * <p> * The value returned by the most recent call to <a>GetChangeToken</a>. * </p> * * @return The value returned by the most recent call to * <a>GetChangeToken</a>. */ public String getChangeToken() { return this.changeToken; } /** * <p> * The value returned by the most recent call to <a>GetChangeToken</a>. * </p> * * @param changeToken * The value returned by the most recent call to * <a>GetChangeToken</a>. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateByteMatchSetRequest withChangeToken(String changeToken) { setChangeToken(changeToken); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getName() != null) sb.append("Name: " + getName() + ","); if (getChangeToken() != null) sb.append("ChangeToken: " + getChangeToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateByteMatchSetRequest == false) return false; CreateByteMatchSetRequest other = (CreateByteMatchSetRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getChangeToken() == null ^ this.getChangeToken() == null) return false; if (other.getChangeToken() != null && other.getChangeToken().equals(this.getChangeToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getChangeToken() == null) ? 0 : getChangeToken().hashCode()); return hashCode; } @Override public CreateByteMatchSetRequest clone() { return (CreateByteMatchSetRequest) super.clone(); } }
d8dddaf736af8552f683d3ab220fbf6dfe0f8b5e
0910327122a149aa546cb721fe51d84e5d9f4150
/yxx-streaming/src/main/java/com/yxx/framework/config/MySparkContextConfig.java
9ca4b75120261813e3cf045115b8514c9f071d56
[]
no_license
HoldMe/yxx-project
538be14870941ba4f0a8442b9f3040ef7899b558
6145fd4e4c3a4bff4787ba51c8e58e863dbd1698
refs/heads/master
2022-12-22T16:11:39.694497
2021-02-19T00:58:36
2021-02-19T00:58:36
218,025,927
0
1
null
2022-12-15T23:55:50
2019-10-28T10:55:47
Java
UTF-8
Java
false
false
803
java
package com.yxx.framework.config; import org.apache.spark.SparkConf; import org.apache.spark.api.java.JavaSparkContext; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * <p> * desc * </p> * * @author wangpan * @date 2019/11/4 */ @Configuration public class MySparkContextConfig { @Bean @ConditionalOnMissingBean(SparkConf.class) public SparkConf sparkConf(){ return new SparkConf().setAppName("spark_test").setMaster("local"); } @Bean @ConditionalOnMissingBean(JavaSparkContext.class) public JavaSparkContext javaSparkContext() throws Exception { return new JavaSparkContext(sparkConf()); } }
866ad95ca47a4bed3e02c7814b7ec77fcc26951f
fd49852c3426acf214b390c33927b5a30aeb0e0a
/aosp/javalib/android/graphics/drawable/TransitionDrawable.java
210746913caef205559a507b76fe420571c7bdfb
[]
no_license
HanChangHun/MobilePlus-Prototype
fb72a49d4caa04bce6edb4bc060123c238a6a94e
3047c44a0a2859bf597870b9bf295cf321358de7
refs/heads/main
2023-06-10T19:51:23.186241
2021-06-26T08:28:58
2021-06-26T08:28:58
333,411,414
0
0
null
null
null
null
UTF-8
Java
false
false
5,309
java
package android.graphics.drawable; import android.content.res.Resources; import android.graphics.Canvas; import android.os.SystemClock; public class TransitionDrawable extends LayerDrawable implements Drawable.Callback { private static final int TRANSITION_NONE = 2; private static final int TRANSITION_RUNNING = 1; private static final int TRANSITION_STARTING = 0; private int mAlpha = 0; private boolean mCrossFade; private int mDuration; private int mFrom; private int mOriginalDuration; private boolean mReverse; private long mStartTimeMillis; private int mTo; private int mTransitionState = 2; TransitionDrawable() { this(new TransitionState(null, null, null), (Resources)null); } private TransitionDrawable(TransitionState paramTransitionState, Resources paramResources) { super(paramTransitionState, paramResources); } private TransitionDrawable(TransitionState paramTransitionState, Drawable[] paramArrayOfDrawable) { super(paramArrayOfDrawable, paramTransitionState); } public TransitionDrawable(Drawable[] paramArrayOfDrawable) { this(new TransitionState(null, null, null), paramArrayOfDrawable); } LayerDrawable.LayerState createConstantState(LayerDrawable.LayerState paramLayerState, Resources paramResources) { return new TransitionState((TransitionState)paramLayerState, this, paramResources); } public void draw(Canvas paramCanvas) { boolean bool = true; int i = this.mTransitionState; if (i != 0) { if (i == 1 && this.mStartTimeMillis >= 0L) { float f = (float)(SystemClock.uptimeMillis() - this.mStartTimeMillis) / this.mDuration; if (f >= 1.0F) { bool = true; } else { bool = false; } f = Math.min(f, 1.0F); i = this.mFrom; this.mAlpha = (int)(i + (this.mTo - i) * f); } } else { this.mStartTimeMillis = SystemClock.uptimeMillis(); bool = false; this.mTransitionState = 1; } i = this.mAlpha; boolean bool1 = this.mCrossFade; LayerDrawable.ChildDrawable[] arrayOfChildDrawable = this.mLayerState.mChildren; if (bool) { if (!bool1 || i == 0) (arrayOfChildDrawable[0]).mDrawable.draw(paramCanvas); if (i == 255) (arrayOfChildDrawable[1]).mDrawable.draw(paramCanvas); return; } Drawable drawable = (arrayOfChildDrawable[0]).mDrawable; if (bool1) drawable.setAlpha(255 - i); drawable.draw(paramCanvas); if (bool1) drawable.setAlpha(255); if (i > 0) { Drawable drawable1 = (arrayOfChildDrawable[1]).mDrawable; drawable1.setAlpha(i); drawable1.draw(paramCanvas); drawable1.setAlpha(255); } if (!bool) invalidateSelf(); } public boolean isCrossFadeEnabled() { return this.mCrossFade; } public void resetTransition() { this.mAlpha = 0; this.mTransitionState = 2; invalidateSelf(); } public void reverseTransition(int paramInt) { long l1 = SystemClock.uptimeMillis(); long l2 = this.mStartTimeMillis; long l3 = this.mDuration; char c = 'ÿ'; if (l1 - l2 > l3) { if (this.mTo == 0) { this.mFrom = 0; this.mTo = 255; this.mAlpha = 0; this.mReverse = false; } else { this.mFrom = 255; this.mTo = 0; this.mAlpha = 255; this.mReverse = true; } this.mOriginalDuration = paramInt; this.mDuration = paramInt; this.mTransitionState = 0; invalidateSelf(); return; } int i = this.mReverse ^ true; this.mReverse = i; this.mFrom = this.mAlpha; paramInt = c; if (i != 0) paramInt = 0; this.mTo = paramInt; if (this.mReverse) { l1 -= this.mStartTimeMillis; } else { l1 = this.mOriginalDuration - l1 - this.mStartTimeMillis; } this.mDuration = (int)l1; this.mTransitionState = 0; } public void setCrossFadeEnabled(boolean paramBoolean) { this.mCrossFade = paramBoolean; } public void showSecondLayer() { this.mAlpha = 255; this.mReverse = false; this.mTransitionState = 2; invalidateSelf(); } public void startTransition(int paramInt) { this.mFrom = 0; this.mTo = 255; this.mAlpha = 0; this.mOriginalDuration = paramInt; this.mDuration = paramInt; this.mReverse = false; this.mTransitionState = 0; invalidateSelf(); } static class TransitionState extends LayerDrawable.LayerState { TransitionState(TransitionState param1TransitionState, TransitionDrawable param1TransitionDrawable, Resources param1Resources) { super(param1TransitionState, param1TransitionDrawable, param1Resources); } public int getChangingConfigurations() { return this.mChangingConfigurations; } public Drawable newDrawable() { return new TransitionDrawable(this, (Resources)null); } public Drawable newDrawable(Resources param1Resources) { return new TransitionDrawable(this, param1Resources); } } } /* Location: /home/chun/Desktop/temp/!/android/graphics/drawable/TransitionDrawable.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
ba27bafaa0623586f3bc05569c7bcde380141efd
18afe6d7aeba352762f6a5d413e0c417390d8d1b
/roboto-examples/roboto-examples-springboot/src/main/java/roboto/examples/springboot/controller/BarController.java
ac61f25ff023d6497fb2030484ef9b5de967751e
[ "Apache-2.0" ]
permissive
gregwhitaker/roboto
97dbe854dc330337a8ea07701fee62c4c21e5e27
81e05074fd29ca0f5d3bedbbce23c55051779d6c
refs/heads/master
2020-03-18T05:34:33.403138
2018-05-27T05:26:31
2018-05-27T05:26:31
134,349,691
1
0
null
null
null
null
UTF-8
Java
false
false
1,467
java
/* * Copyright 2018 Greg Whitaker * * 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 roboto.examples.springboot.controller; import com.github.gregwhitaker.roboto.spring.annotation.DisallowRobots; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; /** * Example controller with all methods excluded from robots.txt file. */ @Controller @DisallowRobots public class BarController { // SEO is disabled for this endpoint due to the class-level @DenySEO annotation @GetMapping("/bar/1") public String bar1(Model model) { model.addAttribute("message", "This is Bar1"); return "bar"; } // SEO is disabled for this endpoint due to the class-level @DenySEO annotation @GetMapping("/bar/2") public String bar2(Model model) { model.addAttribute("message", "This is Bar2"); return "bar"; } }
987e65e6e58f2ed60f182c97c0504a921656e334
d4439f3ea17fefbc63011fb6e1b48f3758329944
/src/test/java/com/pm/demo/DemoApplicationTests.java
bd3ca1aaf2a8136fbb2dbd118f5177d94d00f643
[]
no_license
sameershrestha333/PersonalProjectManagement
a211a003399ef6766e26bee9a673090d6b037757
6bd22e601c19ed3d0b9857c41c683c1589b7436a
refs/heads/master
2020-09-11T18:08:44.236234
2019-11-16T19:22:44
2019-11-16T19:22:44
222,113,845
0
0
null
null
null
null
UTF-8
Java
false
false
210
java
package com.pm.demo; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class DemoApplicationTests { @Test void contextLoads() { } }
6eb7423838b56967e576923e0cde2b7404161a52
a5d27cf82b8830b91fdfe216bda48697ecb9c01f
/src/main/java/org/kordamp/jsr377/formatter/ShortFormatter.java
3dfb352283b6e484160ae67964305ceddc09fe38
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
jsr377/jsr377-converters
20c1912d062ca2ac628b65a708d78c6771e587dd
36d9881ec4502fda994fe577917053e66a1e705a
refs/heads/master
2021-11-25T08:48:51.816639
2021-11-06T23:15:20
2021-11-06T23:15:20
109,632,426
0
3
Apache-2.0
2018-09-28T16:00:31
2017-11-06T01:25:46
Java
UTF-8
Java
false
false
1,229
java
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kordamp.jsr377.formatter; /** * @author Andres Almiray */ public class ShortFormatter extends AbstractNumberFormatter<Short> { public ShortFormatter() { this(null); } public ShortFormatter(String pattern) { super(pattern); } @Override public Short parse(String str) throws ParseException { if (isBlank(str)) { return null; } try { return numberFormat.parse(str).shortValue(); } catch (java.text.ParseException e) { throw new ParseException(e); } } }
1aa162b0ae74834166750ea62432bd2b1b16404a
7c80a13408420b14a6feab806ca81b6685b41228
/colab/colab-test/colab/client/ColabClientTester.java
7b10acc1f7c2c42dd6fcf5bb336a3ee28aceef27
[]
no_license
chris-martin/gatech-cs-3300-software-engineering
41537c68b2b2d795ab294a2efc04f1ba9e8e0d22
f95d150ce131426687e3ee9b69690045d7bb9bdc
refs/heads/master
2021-01-22T14:32:31.691027
2014-01-06T06:37:24
2014-01-06T06:38:45
15,667,013
0
1
null
null
null
null
UTF-8
Java
false
false
2,244
java
package colab.client; import junit.framework.TestCase; import colab.common.exception.UnableToConnectException; import colab.server.ColabServer; import colab.server.MockColabServer; /** * Test cases for {@link ColabClient}. */ public final class ColabClientTester extends TestCase { /** The port on which the server runs. */ private static final int PORT = 12863; /** A server used for testing connectivity. */ private ColabServer server; /** * Creates a server and binds it to the RMI registry. * * @throws Exception if any exception is thrown */ @Override public void setUp() throws Exception { this.server = new MockColabServer(); this.server.publish(PORT); } /** * Unbinds the server from the RMI registry. * * @throws Exception if any exception is thrown */ @Override public void tearDown() throws Exception { this.server.unpublish(); } /** * Tests attempting to connect to an incorrect address. * * @throws Exception if any unexpected exception is thrown */ public void testConnectFailure() throws Exception { ColabClient client = new ColabClient(); UnableToConnectException expectedException = null; try { client.connect("bad server"); } catch (UnableToConnectException e) { expectedException = e; } assertNotNull(expectedException); } /** * Creates a new client and connects to the server. * * @throws Exception if any exception is thrown */ public void testConnectSuccess() throws Exception { ColabClient client = new ColabClient(); client.connect("localhost:" + PORT); } /* ConnectionRemote connection = server.connect(client); connection.logIn(new UserName("Chris"), "pass4".toCharArray()); Logger.log("User logged in."); CommunityName communityName = new CommunityName("Team Awesome"); connection.logIn(communityName, "awesomePass".toCharArray()); Logger.log("Logged into community."); */ }
f2c9a35abdaeaf7b12d58dc28e402dbf1d8a2a66
2a7906626f6f57fba24b5b236d817d9e69c023ae
/exercise20_1/src/main/java/cs544/exercise20_1/IBookDao.java
6caf40f5c23ea9823bc02a70b5c3fb3958256e1e
[]
no_license
jimkatunguka/Enterprise-Architecture
60d0c4ccf2f821ab5efc31e718f843d1a58161f5
9658455c44e06d018806cafc40189759cb68914e
refs/heads/master
2022-12-23T12:01:47.760506
2020-03-11T19:07:16
2020-03-11T19:07:16
243,116,570
0
0
null
null
null
null
UTF-8
Java
false
false
295
java
package cs544.exercise20_1; import java.util.List; public interface IBookDao { public abstract List<Book> getAll(); public abstract void add(Book book); public abstract Book get(int id); public abstract void update(int bookId, Book book); public abstract void delete(int bookId); }
68d505cd25b65e71300021e3a3e29f6a841e5e35
f15889af407de46a94fd05f6226c66182c6085d0
/smartsis/src/main/java/com/oreon/smartsis/web/action/domain/DepartmentActionBase.java
03538e4e32d3d774c468a68ddb8c6ebe23e8dea6
[]
no_license
oreon/sfcode-full
231149f07c5b0b9b77982d26096fc88116759e5b
bea6dba23b7824de871d2b45d2a51036b88d4720
refs/heads/master
2021-01-10T06:03:27.674236
2015-04-27T10:23:10
2015-04-27T10:23:10
55,370,912
0
0
null
null
null
null
UTF-8
Java
false
false
5,166
java
package com.oreon.smartsis.web.action.domain; import com.oreon.smartsis.domain.Department; import org.witchcraft.seam.action.BaseAction; import java.util.ArrayList; import java.util.List; import javax.faces.event.ValueChangeEvent; import javax.faces.model.SelectItem; import javax.persistence.EntityManager; import org.hibernate.Criteria; import org.hibernate.criterion.Restrictions; import org.apache.commons.lang.StringUtils; import org.jboss.seam.ScopeType; import org.jboss.seam.annotations.Scope; import org.jboss.seam.annotations.Begin; import org.jboss.seam.annotations.End; import org.jboss.seam.annotations.Factory; import org.jboss.seam.annotations.In; import org.jboss.seam.annotations.Logger; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Out; import org.jboss.seam.Component; import org.jboss.seam.security.Identity; import org.jboss.seam.annotations.datamodel.DataModel; import org.jboss.seam.annotations.datamodel.DataModelSelection; import org.jboss.seam.faces.FacesMessages; import org.jboss.seam.log.Log; import org.jboss.seam.annotations.Observer; import org.witchcraft.base.entity.FileAttachment; import org.apache.commons.io.FileUtils; import org.richfaces.event.UploadEvent; import org.richfaces.model.UploadItem; import com.oreon.smartsis.domain.Employee; public abstract class DepartmentActionBase extends BaseAction<Department> implements java.io.Serializable { @In(create = true) @Out(required = false) @DataModelSelection private Department department; @In(create = true, value = "employeeAction") com.oreon.smartsis.web.action.domain.EmployeeAction employeesAction; @DataModel private List<Department> departmentRecordList; public void setDepartmentId(Long id) { if (id == 0) { clearInstance(); clearLists(); loadAssociations(); return; } setId(id); if (!isPostBack()) loadAssociations(); } /** for modal dlg we need to load associaitons regardless of postback * @param id */ public void setDepartmentIdForModalDlg(Long id) { setId(id); clearLists(); loadAssociations(); } public Long getDepartmentId() { return (Long) getId(); } public Department getEntity() { return department; } //@Override public void setEntity(Department t) { this.department = t; loadAssociations(); } public Department getDepartment() { return (Department) getInstance(); } @Override protected Department createInstance() { Department instance = super.createInstance(); return instance; } public void load() { if (isIdDefined()) { wire(); } } public void wire() { getInstance(); } public boolean isWired() { return true; } public Department getDefinedInstance() { return (Department) (isIdDefined() ? getInstance() : null); } public void setDepartment(Department t) { this.department = t; if (department != null) setDepartmentId(t.getId()); loadAssociations(); } @Override public Class<Department> getEntityClass() { return Department.class; } public com.oreon.smartsis.domain.Department findByUnqName(String name) { return executeSingleResultNamedQuery("department.findByUnqName", name); } /** This function is responsible for loading associations for the given entity e.g. when viewing an order, we load the customer so * that customer can be shown on the customer tab within viewOrder.xhtml * @see org.witchcraft.seam.action.BaseAction#loadAssociations() */ public void loadAssociations() { initListEmployees(); } public void updateAssociations() { com.oreon.smartsis.domain.Employee employees = (com.oreon.smartsis.domain.Employee) org.jboss.seam.Component .getInstance("employee"); employees.setDepartment(department); events.raiseTransactionSuccessEvent("archivedEmployee"); } protected List<com.oreon.smartsis.domain.Employee> listEmployees = new ArrayList<com.oreon.smartsis.domain.Employee>(); void initListEmployees() { if (listEmployees.isEmpty()) listEmployees.addAll(getInstance().getEmployees()); } public List<com.oreon.smartsis.domain.Employee> getListEmployees() { prePopulateListEmployees(); return listEmployees; } public void prePopulateListEmployees() { } public void setListEmployees( List<com.oreon.smartsis.domain.Employee> listEmployees) { this.listEmployees = listEmployees; } public void deleteEmployees(int index) { listEmployees.remove(index); } @Begin(join = true) public void addEmployees() { initListEmployees(); Employee employees = new Employee(); employees.setDepartment(getInstance()); getListEmployees().add(employees); } public void updateComposedAssociations() { if (listEmployees != null) { getInstance().getEmployees().clear(); getInstance().getEmployees().addAll(listEmployees); } } public void clearLists() { listEmployees.clear(); } public String viewDepartment() { load(currentEntityId); return "viewDepartment"; } }
[ "singhj@38423737-2f20-0410-893e-9c0ab9ae497d" ]
singhj@38423737-2f20-0410-893e-9c0ab9ae497d
f0f86d0175c0534fcc7256dd8d479f759a92dcca
e3b4fbb378bd349bd5eb87b8f8bd4145a1f0c2ad
/ComponentImpl/src/main/java/com/xiaojinzi/component/impl/interceptor/OpenOnceInterceptor.java
683fde2a6e1f24b5153212a71370f0a49174a440
[ "Apache-2.0" ]
permissive
hpdx/Component
ffd00061c6f014ce55c96355570eaa85da381a94
d5ff6d370fbb8084523256b8afbb8036d14576df
refs/heads/master
2020-07-30T13:05:17.523507
2019-09-15T08:48:01
2019-09-15T08:48:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,054
java
package com.xiaojinzi.component.impl.interceptor; import android.net.Uri; import com.xiaojinzi.component.error.ignore.NavigationFailException; import com.xiaojinzi.component.impl.RouterInterceptor; /** * 这个拦截器必须在其他任何一个拦截器之前执行 * 从根本上限制同一个界面在一秒钟内只能打开一次,这个拦截器会被框架最先执行 * note: 这个拦截器没有连同 {@link Uri#getScheme()} 一起判断,其实应该一起的, * 但是现实中应该也不会出现一秒钟 host 和 path 都相同的两次路由了 * * time : 2019/01/23 * * @author : xiaojinzi 30212 */ public class OpenOnceInterceptor implements RouterInterceptor { private OpenOnceInterceptor() { } private static class SingletonInstance { private static final OpenOnceInterceptor INSTANCE = new OpenOnceInterceptor(); } public static OpenOnceInterceptor getInstance() { return OpenOnceInterceptor.SingletonInstance.INSTANCE; } private String preHost; private String prePath; /** * 记录上一个界面跳转的时间 */ private long preTargetTime; @Override public void intercept(Chain chain) throws Exception { Uri uri = chain.request().uri; String currentHost = uri.getHost(); String currentPath = uri.getPath(); // 调试的情况下可能会失效,因为你断点打到这里慢慢的往下走那么可能时间已经过了一秒,就失去了限制的作用 long currentTime = System.currentTimeMillis(); // 如果匹配了 if (currentHost.equals(preHost) && currentPath.equals(prePath) && (currentTime - preTargetTime) < 1000) { chain.callback().onError(new NavigationFailException("target '" + uri.toString() + "' can't launch twice in a second")); } else { preHost = currentHost; prePath = currentPath; preTargetTime = currentTime; // 放过执行 chain.proceed(chain.request()); } } }
d5706e08bea28683ff9c18322ae4368efe213c6d
58fcc56982486817b13f65fc10c1e04e0a4c81f8
/src/main/java/com/ruyicai/scorecenter/controller/ResponseData.java
8ac56bf28fa5acf1d597b7253642af98feb4078c
[]
no_license
yilucode/scorecenter
c44dac8ad73da07f94267852532d28c4902e6bc2
322da4b4aba58a539445a70b08e310ea88a25de0
refs/heads/master
2021-05-27T07:07:31.731494
2014-08-19T02:32:06
2014-08-19T02:32:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
259
java
package com.ruyicai.scorecenter.controller; import org.springframework.roo.addon.javabean.RooJavaBean; import org.springframework.roo.addon.json.RooJson; @RooJson @RooJavaBean public class ResponseData { private String errorCode; private Object value; }
66f5f117779e0a7433dbd38c11308cef69cb61d9
aaccdc6095fe8111f7c6a0d6368f3da893cff573
/src/com/freedom/search/services/ArticleService.java
09d374607b5e0f06dd413a1de538210116490a48
[]
no_license
hecj/solr-search
b08daf1b579684c90fe42c29ef9629a9b9adf1a2
65a7fb89ea0c5663a47c6b223ccce5fb1d3a2b41
refs/heads/master
2021-01-01T16:31:16.937843
2015-03-19T08:43:25
2015-03-19T08:43:25
27,591,848
0
0
null
null
null
null
UTF-8
Java
false
false
2,073
java
package com.freedom.search.services; import java.util.List; import java.util.Map; import com.freedom.search.hibernate.entity.LaArticle; /** * @类功能说明:文章业务类 * @类修改者: * @修改日期: * @修改说明: * @作者:HECJ * @创建时间:2014-12-4 上午09:45:35 * @版本:V1.0 */ public interface ArticleService { /** * @函数功能说明 根据文章ID查询 * @修改作者名字 HECJ * @修改时间 2014-12-2 * @修改内容 * @参数: @param id * @参数: @return * @return Article * @throws */ public LaArticle searchArticleById(String pArticleNo); /** * @函数功能说明 添加 * @修改作者名字 HECJ * @修改时间 2014-12-3 * @修改内容 * @参数: @param article * @return void * @throws */ public void addArticle(LaArticle pArticle); /** * @函数功能说明 添加 * @修改作者名字 HECJ * @修改时间 2014-12-3 * @修改内容 * @参数: @param article * @return void * @throws */ public void addArticle(List<LaArticle> pArticles); /** * @函数功能说明 根据文章Id删除 * @修改作者名字 HECJ * @修改时间 2014-12-5 * @修改内容 * @参数: @param pArticleNo * @return void * throws */ public void deleteArticle(String pArticleNo); /** * @函数功能说明 分页查询文章集合 * @修改作者名字 HECJ * @修改时间 2014-12-5 * @修改内容 * @参数: @param pParams{pagination:Pagination}<br> * @参数: @return{rArticleList:List<Article/>,pPagination:Pagination} * @return Map<String,Object> * throws */ public Map<String,Object> searchArticleList(Map<String,Object> pParams); /** * @函数功能说明 从solr中查询文章集合 * @修改作者名字 HECJ * @修改时间 2014-12-8 * @修改内容 * @参数: @param pParams * @参数: @return * @return Map<String,Object> * throws */ public Map<String,Object> searchArticleListBySolr(Map<String,Object> pParams); }
724a2e48c770bf88f4e502acdb198171b155f2a7
542efb2d447273d5142ef92129bbbdd9914344a2
/onedrivesdk/src/main/java/com/onedrive/sdk/generated/IBaseThumbnailStreamRequestBuilder.java
9c329046dd3023b49a74979fe7bd316330e8e4fa
[ "MIT" ]
permissive
spudi/onedrive-sdk-android
d8c58640345a7f7e6e35efc6e1c68384c93e21df
1553371690e52d9b4ff9c9ee0b89c44879b43711
refs/heads/master
2021-04-27T00:22:41.735684
2018-03-05T14:32:55
2018-03-05T14:32:55
123,801,688
0
0
MIT
2018-03-04T15:25:44
2018-03-04T15:25:44
null
UTF-8
Java
false
false
2,089
java
// ------------------------------------------------------------------------------ // Copyright (c) 2015 Microsoft Corporation // // 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.onedrive.sdk.generated; import com.onedrive.sdk.concurrency.*; import com.onedrive.sdk.core.*; import com.onedrive.sdk.extensions.*; import com.onedrive.sdk.http.*; import com.onedrive.sdk.generated.*; import com.onedrive.sdk.options.*; import com.onedrive.sdk.serializer.*; import java.util.*; // **NOTE** This file was generated by a tool and any changes will be overwritten. /** * The interface for the Base Thumbnail Stream Request Builder. */ public interface IBaseThumbnailStreamRequestBuilder extends IRequestBuilder { /** * Creates the request */ IThumbnailStreamRequest buildRequest(); /** * Creates the request with specific options instead of the existing options */ IThumbnailStreamRequest buildRequest(final List<Option> options); }
7ad503eb6a5e3a8d821fb897c31fac65043711f4
7ac08ae2bf5ca5b5de9ea50834add1a94e4216e0
/webapp/src/main/java/de/nitram509/mkat/api/search/KeywordCombination.java
894c41022034201e7bddc4d41fb4dee67a902fa6
[]
no_license
nitram509/mkat
bdae7c37b4dabbac69a9a10a53309ed01b1d8292
64f68d633df715e837769871915f94d361287f5b
refs/heads/master
2023-01-23T21:38:09.757682
2023-01-21T10:47:55
2023-01-21T10:47:55
15,527,535
2
0
null
2023-01-21T10:48:33
2013-12-30T12:41:39
Java
UTF-8
Java
false
false
433
java
package de.nitram509.mkat.api.search; public enum KeywordCombination { OR, AND; public static KeywordCombination valueFrom(String value, KeywordCombination defaultValue) { if (value != null) { value = value.toUpperCase(); for (KeywordCombination keywordCombination : values()) { if (keywordCombination.toString().equals(value)) return keywordCombination; } } return defaultValue; } }
d93125be0175f51e32d5a442848f1d787a63a7ba
7e3d5d0a35ec01c562a75150220b7f9afe9a6f12
/src/pl/datasets/utils/Pallete.java
e67596c28c6ab83c2b6132c2929a14c8a6b2cbe4
[]
no_license
Marchuck/Datasets
48bfd8682e2da8b3f14b529c480e391c8030f338
be7c02076dec17e6e35e20dff8b31084a2c82d6c
refs/heads/master
2020-05-21T23:13:27.320040
2016-06-22T22:42:30
2016-06-22T22:42:30
59,765,238
2
1
null
null
null
null
UTF-8
Java
false
false
884
java
package pl.datasets.utils; import java.awt.*; /** * @author Lukasz * @since 26.05.2016. * Defines the app colors here */ public class Pallete { private Pallete() { } public static Color hex2Rgb(String colorStr) { return new Color( Integer.valueOf(colorStr.substring(1, 3), 16), Integer.valueOf(colorStr.substring(3, 5), 16), Integer.valueOf(colorStr.substring(5, 7), 16)); } public static Color primaryColor() { return hex2Rgb("#3F51B5"); } public static Color primaryDarkColor() { return hex2Rgb("#FFC107"); } public static Color accentColor() { return hex2Rgb("#3f51b5"); } public static Color primaryTextColor() { return hex2Rgb("#212121"); } public static Color secondaryTextColor() { return hex2Rgb("#727272"); } }
251474d87919e925bf58075cb32be0498d0fa86a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_fcd3e8f059326743f6ae13579e41f7cbb6799bcc/Plus1BannerView/3_fcd3e8f059326743f6ae13579e41f7cbb6799bcc_Plus1BannerView_t.java
1335c4c1ec15dbb68a0c17dada5a0c2b909c7141
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,076
java
/** * Copyright (c) 2011, Alexander Klestov <[email protected]> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the "Wapstart" nor the names * of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package ru.wapstart.plus1.sdk; import android.content.Context; import android.content.Intent; import android.graphics.*; import android.util.AttributeSet; import android.view.View; import android.view.animation.Animation; import android.view.animation.TranslateAnimation; import android.widget.ImageView; import android.widget.TextView; import android.widget.LinearLayout; /** * @author Alexander Klestov <[email protected]> * @copyright Copyright (c) 2011, Wapstart */ public class Plus1BannerView extends LinearLayout { private Plus1Banner banner; private TextView title; private TextView content; private ImageView image; private Animation hideAnimation = null; private Animation showAnimation = null; public Plus1BannerView(Context context) { super(context); init(); } public Plus1BannerView(Context context, AttributeSet attr) { super(context, attr); init(); } public Plus1Banner getBanner() { return banner; } public void setBanner(Plus1Banner banner) { this.banner = banner; if ((banner != null) && (banner.getId() > 0)) { if (getVisibility() == INVISIBLE) { startAnimation(showAnimation); setVisibility(VISIBLE); } title.setText(banner.getTitle()); content.setText(banner.getTitle()); String imageUrl = null; if (!banner.getPictureUrl().equals("")) imageUrl = banner.getPictureUrl(); else if (!banner.getPictureUrlPng().equals("")) imageUrl = banner.getPictureUrlPng(); if (imageUrl != null) new ImageDowloader(this.image).execute(imageUrl); } else if (getVisibility() == VISIBLE) { startAnimation(hideAnimation); setVisibility(INVISIBLE); } } private void init() { setBackgroundResource(R.drawable.wp_banner_background); ImageView shild = new ImageView(getContext()); shild.setImageResource(R.drawable.wp_banner_shild); shild.setMaxWidth(9); addView(shild); LinearLayout ll = new LinearLayout(getContext()); ll.setOrientation(VERTICAL); this.title = new TextView(getContext()); title.setTypeface(Typeface.SANS_SERIF, Typeface.BOLD); title.setTextSize(14f); title.setTextColor(Color.WHITE); ll.addView(title); this.content = new TextView(getContext()); content.setTypeface(Typeface.SANS_SERIF); content.setTextSize(13f); content.setTextColor(Color.WHITE); ll.addView(content); this.image = new ImageView(getContext()); ll.addView(image); addView(ll); setOnClickListener( new OnClickListener() { public void onClick(View view) { if ( (banner == null) || (banner.getLink() == null) ) return; // TODO: click2call getContext().startActivity( new Intent( Intent.ACTION_VIEW, android.net.Uri.parse(banner.getLink()) ) ); } } ); this.showAnimation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, -1f, Animation.RELATIVE_TO_SELF, 0f ); showAnimation.setDuration(500); this.hideAnimation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, -1f ); hideAnimation.setDuration(500); setVisibility(INVISIBLE); } }
c491bcfdb0c27440100b42a7cdb9d705e2085c5b
b23404e272db01f2bf46320565c11b9e02cf0c61
/new/pps/src/main/java/ice/cn/joy/ggg/api/model/CollectHolder.java
ab036f8c44759142c0cd6abbf0342df8974c7908
[]
no_license
brucesq/brucedamon001
95ab98798f1c29d722a397681956c24ff4091385
92ab181f90005afffb354d10768921545912119c
refs/heads/master
2021-05-29T09:35:05.115101
2011-12-20T05:42:28
2011-12-20T05:42:28
32,131,555
0
1
null
null
null
null
UTF-8
Java
false
false
749
java
// ********************************************************************** // // Copyright (c) 2003-2010 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.4.0 package cn.joy.ggg.api.model; // <auto-generated> // // Generated from file `community.ice' // // Warning: do not edit this file. // // </auto-generated> public final class CollectHolder { public CollectHolder() { } public CollectHolder(Collect value) { this.value = value; } public Collect value; }
[ "quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141" ]
quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141
1528d732bc1bfc124f861b720dc7681fed535807
36e2316e4f39a48cab5def7aa4bf53551fabcd79
/设计模式/src/com/dp/composite/example2/Client.java
8957e4afed4b4d802e896d7df95abdf69c7ff18b
[]
no_license
PlumpMath/DesignPattern-327
b47f935638541367214812a5d1cafe45af5d543e
aee4c13e94d04279792c5c34dd58ce068f2e9a8d
refs/heads/master
2021-01-20T09:36:48.199768
2015-09-25T00:57:52
2015-09-25T00:57:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
739
java
package com.dp.composite.example2; /** * @desc 请用一句话描述此文件 * @creator caozhiqing * @data 2015/8/12 */ public class Client { public static void main(String[] arg){ Component root = new Composite("服装"); Component man = new Composite("男装"); Component wom = new Composite("女装"); root.addChild(man); root.addChild(wom); Component leaf1 = new Leaf("夹克"); Component leaf2 = new Leaf("寸衫"); man.addChild(leaf1); man.addChild(leaf2); Component leaf3 = new Leaf("短裙"); Component leaf4 = new Leaf("Browse"); wom.addChild(leaf3); wom.addChild(leaf4); root.operation(""); } }
0cd320584f540734744147371bda096e5b912bb1
531419143e516f38e1d210660d7c8f523f89fe5a
/projects/Java/src/com/chronoxor/test/fbe/FinalModelEnumEmpty.java
ca86e7df9fd929500823d6c286502fbc4c130c74
[ "MIT" ]
permissive
rizalgowandy/FastBinaryEncoding
e4d9cde5183054e476d17447bdf6c9fb1a7b6632
413acbf08567585a0a44b656236d174d46b202de
refs/heads/master
2023-02-25T22:12:03.245908
2021-12-18T21:31:14
2021-12-18T21:31:14
190,369,220
0
0
MIT
2021-12-19T23:08:22
2019-06-05T09:47:52
C++
UTF-8
Java
false
false
1,591
java
// Automatically generated by the Fast Binary Encoding compiler, do not modify! // https://github.com/chronoxor/FastBinaryEncoding // Source: test.fbe // Version: 1.7.0.0 package com.chronoxor.test.fbe; // Fast Binary Encoding EnumEmpty final model public final class FinalModelEnumEmpty extends com.chronoxor.fbe.FinalModel { public FinalModelEnumEmpty(com.chronoxor.fbe.Buffer buffer, long offset) { super(buffer, offset); } // Get the allocation size public long fbeAllocationSize(com.chronoxor.test.EnumEmpty value) { return fbeSize(); } // Get the final size @Override public long fbeSize() { return 4; } // Check if the value is valid @Override public long verify() { if ((_buffer.getOffset() + fbeOffset() + fbeSize()) > _buffer.getSize()) return Long.MAX_VALUE; return fbeSize(); } // Get the value public com.chronoxor.test.EnumEmpty get(com.chronoxor.fbe.Size size) { if ((_buffer.getOffset() + fbeOffset() + fbeSize()) > _buffer.getSize()) return new com.chronoxor.test.EnumEmpty(); size.value = fbeSize(); return new com.chronoxor.test.EnumEmpty(readInt32(fbeOffset())); } // Set the value public long set(com.chronoxor.test.EnumEmpty value) { assert ((_buffer.getOffset() + fbeOffset() + fbeSize()) <= _buffer.getSize()) : "Model is broken!"; if ((_buffer.getOffset() + fbeOffset() + fbeSize()) > _buffer.getSize()) return 0; write(fbeOffset(), value.getRaw()); return fbeSize(); } }
b948a263a1b8c00e1a4745f60b9c3e066996e8d9
473fc28d466ddbe9758ca49c7d4fb42e7d82586e
/app/src/main/java/com/syd/source/aosp/external/droiddriver/src/io/appium/droiddriver/duo/DuoDriver.java
0ad84bf7420c2b217d248990972550cf88c4edbb
[ "Apache-2.0" ]
permissive
lz-purple/Source
a7788070623f2965a8caa3264778f48d17372bab
e2745b756317aac3c7a27a4c10bdfe0921a82a1c
refs/heads/master
2020-12-23T17:03:12.412572
2020-01-31T01:54:37
2020-01-31T01:54:37
237,205,127
4
2
null
null
null
null
UTF-8
Java
false
false
2,233
java
/* * Copyright (C) 2016 DroidDriver committers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.appium.droiddriver.duo; import android.annotation.TargetApi; import android.app.Activity; import android.app.Instrumentation; import io.appium.droiddriver.base.AbstractDroidDriver; import io.appium.droiddriver.base.CompositeDroidDriver; import io.appium.droiddriver.instrumentation.InstrumentationDriver; import io.appium.droiddriver.uiautomation.UiAutomationDriver; import io.appium.droiddriver.util.ActivityUtils; import io.appium.droiddriver.util.InstrumentationUtils; /** * Implementation of DroidDriver that attempts to use the best driver for the current activity. * If the activity is part of the application under instrumentation, the InstrumentationDriver is * used. Otherwise, the UiAutomationDriver is used. */ @TargetApi(18) public class DuoDriver extends CompositeDroidDriver { private final String targetApkPackage; private final UiAutomationDriver uiAutomationDriver; private final InstrumentationDriver instrumentationDriver; public DuoDriver() { Instrumentation instrumentation = InstrumentationUtils.getInstrumentation(); targetApkPackage = InstrumentationUtils.getTargetContext().getPackageName(); uiAutomationDriver = new UiAutomationDriver(instrumentation); instrumentationDriver = new InstrumentationDriver(instrumentation); } @Override protected AbstractDroidDriver getApplicableDriver() { Activity activity = ActivityUtils.getRunningActivity(); if (activity != null && targetApkPackage.equals( activity.getApplicationContext().getPackageName())) { return instrumentationDriver; } return uiAutomationDriver; } }
e95d04699005f1a984fff2fc32ef994536ed5a8c
b89d6fdfca0fbd67ec966adb96fa424a46d6281e
/src/creational_patterns/factory_method_pattern/calculator/factory/OperationMulFactory.java
5fa0ddc0aa9a9946cd93e2b401637b79ca21e6dc
[]
no_license
GeniusDSY/DesignPatterns
6dbd0a9dcb6aa3d76038f33e7425a419f8b4efda
679de181200d9de9a00a27ecb34c846276e9f417
refs/heads/master
2020-04-29T23:03:44.597880
2019-04-10T15:00:05
2019-04-10T15:00:05
176,466,068
0
0
null
null
null
null
UTF-8
Java
false
false
523
java
package creational_patterns.factory_method_pattern.calculator.factory; import creational_patterns.factory_method_pattern.calculator.production.OperationMulProduction; import creational_patterns.factory_method_pattern.calculator.production.OperationProduction; /** * @author :DengSiYuan * @date :2019/3/19 21:21 * @desc :乘法工厂 */ public class OperationMulFactory implements OperationFactory { @Override public OperationProduction createOperation() { return new OperationMulProduction(); } }
f8b491448f39bdc042c60e4a570024fe63c4d69c
7a53bcc441dddf1de30e3d8bcb4090a1ea7fe6ce
/src/org/neusoft/action/TeacherAction.java
9eec0302f0dc4e4837329815222111b81784cdc5
[]
no_license
drduan/neusoftsms
726ec3f611c77c83d22aea4db5ad230e66e623b4
805146a58b14c87060157a3b8ec843a776a1945c
refs/heads/master
2021-01-20T18:34:04.703047
2016-08-02T13:51:08
2016-08-02T13:51:08
60,894,670
0
0
null
null
null
null
UTF-8
Java
false
false
1,998
java
package org.neusoft.action; import java.io.Serializable; import java.util.List; import java.util.Map; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.Namespace; import org.apache.struts2.convention.annotation.ParentPackage; import org.apache.struts2.convention.annotation.Result; import org.apache.struts2.convention.annotation.Results; import org.neusoft.hb.entites.Classinfo; import org.neusoft.hb.entites.Student; import org.neusoft.hb.entites.Teacher; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Controller; import com.opensymphony.xwork2.ActionContext; @Namespace(value = "/neusoft/crol/teacheraction") @Results(value = { @Result(name = "infoes", location = "/WEB-INF/infoes/info_teacher.jsp"), @Result(name = "insert_or_update", location = "/WEB-INF/update/insert_teacher.jsp") }) public class TeacherAction extends BaseAction { private Teacher teacher; private List<Teacher> batch_list; public void setBatch_list(List<Teacher> batch_list) { this.batch_list = batch_list; } public Teacher getTeacher() { return teacher; } public void setTeacher(Teacher teacher) { this.teacher = teacher; } @Override public String getKey() { // TODO Auto-generated method stub return getService().TEACHER; } @Override public List getBatch_list() { // TODO Auto-generated method stub return batch_list; } public Serializable getEntity() { // TODO Auto-generated method stub return this.teacher; } @Action(value = "toInsertOrUpdate") public String toInsertOrUpdate() { if (teacher != null && teacher.getTid() != null) { this.teacher = (Teacher) getService().getInfoByID(getKey(), teacher.getTid()); } List<Teacher> infoes = this.getService().getAll( getService().TEACHER); Map<String, Object> mp = (Map<String, Object>) ActionContext .getContext().get("request"); mp.put("infoes", infoes); return "insert_or_update"; } }
6df6384414bd29f3f51ae8b6fbb58ecb3204a135
9100ac076370edee44b778d4d67c22cab4192088
/workspace/day02/src/com/igeek/array/ArrayTest2.java
ebc9010a2bd2d3896943c8f9269908d0744d346e
[]
no_license
easemeng/java
a515514b83da288cda18c74bb2a45c037d263579
dcc5a27b0b60a33ce1e5063b4eb244f2287dcbaa
refs/heads/master
2020-04-09T02:33:28.580362
2018-12-17T13:13:59
2018-12-17T13:13:59
159,945,154
2
0
null
null
null
null
GB18030
Java
false
false
318
java
package com.igeek.array; public class ArrayTest2 { @SuppressWarnings("unused") public static void main(String[] args) { //二维数组 。 动态的创建方式 。 int [][] arrays = new int[2][3]; //里面嵌套N个一维数组 。 {1,2,3} int [][] staticArrays = {{1,2,3},{1,2,3},{1,2,3}}; } }
508c687784fa4f92e84194849c9e3683fd9f2a61
14b389df8efcde6eb5c043bd9afec6c9772d03dd
/src/day21/test10/MyAnno2.java
de56471be19a17d5fcd84faebd57772f9b353131
[]
no_license
if123456/work
3ea03fd5722e2ed125c31f875aa0023848addbec
26258d5563135cee402bef2fd68f98183ac2f498
refs/heads/master
2020-12-11T08:24:24.900033
2020-01-18T09:28:18
2020-01-18T09:28:18
233,799,873
0
0
null
null
null
null
UTF-8
Java
false
false
312
java
package day21.test10; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface MyAnno2 { String type() default "java"; }
[ "l" ]
l
6d381f83ee8c2e238ec15885cb0a051187b66c39
c80f25f9c8faa1ea9db5bb1b8e36c3903a80a58b
/laosiji-sources/feng/android/sources/com/meizu/cloud/pushsdk/networking/internal/SynchronousCall.java
4fac84c0756f4631d474edbefcd9259b02d4af51
[]
no_license
wenzhaot/luobo_tool
05c2e009039178c50fd878af91f0347632b0c26d
e9798e5251d3d6ba859bb15a00d13f085bc690a8
refs/heads/master
2020-03-25T23:23:48.171352
2019-09-21T07:09:48
2019-09-21T07:09:48
144,272,972
0
0
null
null
null
null
UTF-8
Java
false
false
5,249
java
package com.meizu.cloud.pushsdk.networking.internal; import com.feng.car.utils.FengConstant; import com.meizu.cloud.pushsdk.networking.common.ANRequest; import com.meizu.cloud.pushsdk.networking.common.ANResponse; import com.meizu.cloud.pushsdk.networking.common.ResponseType; import com.meizu.cloud.pushsdk.networking.error.ANError; import com.meizu.cloud.pushsdk.networking.http.Response; import com.meizu.cloud.pushsdk.networking.utils.SourceCloseUtil; import com.meizu.cloud.pushsdk.networking.utils.Utils; public final class SynchronousCall { private SynchronousCall() { } public static <T> ANResponse<T> execute(ANRequest request) { switch (request.getRequestType()) { case 0: return executeSimpleRequest(request); case 1: return executeDownloadRequest(request); case 2: return executeUploadRequest(request); default: return new ANResponse(new ANError()); } } private static <T> ANResponse<T> executeSimpleRequest(ANRequest request) { ANResponse<T> response; Response okHttpResponse = null; try { okHttpResponse = InternalNetworking.performSimpleRequest(request); if (okHttpResponse == null) { response = new ANResponse(Utils.getErrorForConnection(new ANError())); } else if (request.getResponseAs() == ResponseType.OK_HTTP_RESPONSE) { response = new ANResponse((Object) okHttpResponse); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } else if (okHttpResponse.code() >= FengConstant.SINGLE_IMAGE_MAX_WIDTH) { response = new ANResponse(Utils.getErrorForServerResponse(new ANError(okHttpResponse), request, okHttpResponse.code())); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } else { response = request.parseResponse(okHttpResponse); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } } catch (Throwable se) { response = new ANResponse(Utils.getErrorForConnection(new ANError(se))); } catch (Exception e) { response = new ANResponse(Utils.getErrorForNetworkOnMainThreadOrConnection(e)); } finally { SourceCloseUtil.close(okHttpResponse, request); } return response; } private static <T> ANResponse<T> executeDownloadRequest(ANRequest request) { try { Response okHttpResponse = InternalNetworking.performDownloadRequest(request); if (okHttpResponse == null) { return new ANResponse(Utils.getErrorForConnection(new ANError())); } ANResponse<T> response; if (okHttpResponse.code() >= FengConstant.SINGLE_IMAGE_MAX_WIDTH) { response = new ANResponse(Utils.getErrorForServerResponse(new ANError(okHttpResponse), request, okHttpResponse.code())); response.setOkHttpResponse(okHttpResponse); return response; } response = new ANResponse((Object) "success"); response.setOkHttpResponse(okHttpResponse); return response; } catch (Throwable se) { return new ANResponse(Utils.getErrorForConnection(new ANError(se))); } catch (Exception e) { return new ANResponse(Utils.getErrorForNetworkOnMainThreadOrConnection(e)); } } private static <T> ANResponse<T> executeUploadRequest(ANRequest request) { ANResponse<T> response; Response okHttpResponse = null; try { okHttpResponse = InternalNetworking.performUploadRequest(request); if (okHttpResponse == null) { response = new ANResponse(Utils.getErrorForConnection(new ANError())); } else if (request.getResponseAs() == ResponseType.OK_HTTP_RESPONSE) { response = new ANResponse((Object) okHttpResponse); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } else if (okHttpResponse.code() >= FengConstant.SINGLE_IMAGE_MAX_WIDTH) { response = new ANResponse(Utils.getErrorForServerResponse(new ANError(okHttpResponse), request, okHttpResponse.code())); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } else { response = request.parseResponse(okHttpResponse); response.setOkHttpResponse(okHttpResponse); SourceCloseUtil.close(okHttpResponse, request); } } catch (ANError se) { response = new ANResponse(Utils.getErrorForConnection(se)); } catch (Exception e) { response = new ANResponse(Utils.getErrorForNetworkOnMainThreadOrConnection(e)); } finally { SourceCloseUtil.close(okHttpResponse, request); } return response; } }
af5a5d73fa72b396ec56d02cadd3ca382b3a8f12
642cb4ce82e92729e69447ea26086d57d0266296
/sdks/java/http_client/v1/src/test/java/org/openapitools/client/model/V1QueueTest.java
b5ec60a3dc3c51a08ff2cef5b71251c95093f391
[ "Apache-2.0" ]
permissive
vamsikavuru/polyaxon
243c91b2a2998260f6b21e864b02347629c4867f
f1695c98f320c2e5c9fdf72e7f7885954df755a9
refs/heads/master
2022-08-24T05:22:04.806006
2020-05-28T14:50:54
2020-05-28T15:04:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,587
java
// Copyright 2018-2020 Polyaxon, 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. /* * Polyaxon SDKs and REST API specification. * Polyaxon SDKs and REST API specification. * * The version of the OpenAPI document: 1.0.92 * Contact: [email protected] * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client.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.threeten.bp.OffsetDateTime; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for V1Queue */ public class V1QueueTest { private final V1Queue model = new V1Queue(); /** * Model tests for V1Queue */ @Test public void testV1Queue() { // TODO: test V1Queue } /** * Test the property 'uuid' */ @Test public void uuidTest() { // TODO: test uuid } /** * Test the property 'agent' */ @Test public void agentTest() { // TODO: test agent } /** * Test the property 'name' */ @Test public void nameTest() { // TODO: test name } /** * Test the property 'priority' */ @Test public void priorityTest() { // TODO: test priority } /** * Test the property 'concurrency' */ @Test public void concurrencyTest() { // TODO: test concurrency } /** * Test the property 'createdAt' */ @Test public void createdAtTest() { // TODO: test createdAt } /** * Test the property 'updatedAt' */ @Test public void updatedAtTest() { // TODO: test updatedAt } }
0bcb7b380720f27668cb52d868edc36fa4570e4f
54d4b72e4b37cdcec0a0b2b46b83717e15eb0d9c
/app/src/main/java/com/broadchance/entity/serverentity/PreSetImg.java
92459b3a05f33b91bfb61759643c5663d6830a06
[]
no_license
devryan915/wdecgrec_as
6af887efb55908fd515411d238334b841ac79ab7
4b41de5f9fc09cc04a3e93f0a5634119e7fec4f1
refs/heads/master
2020-06-22T19:50:15.544052
2016-12-12T03:45:24
2016-12-12T03:45:24
74,725,426
0
0
null
null
null
null
UTF-8
Java
false
false
310
java
package com.broadchance.entity.serverentity; public class PreSetImg extends Object { public PreSetImg(){} private int ID; public int getID() { return ID;} public void setID(int _ID){this.ID = _ID;} private String Url; public String getUrl() { return Url;} public void setUrl(String _Url){this.Url = _Url;} }
58dce08c5c09159bb1694f41fc0dd0af0ec9d0dc
135d248546775a2db1ad132178a92a759086e158
/src/main/java/com/yuen/fight/action/impl/MidRoundAction.java
c3e53cadf4424bf657d8f8c08661dbd37fd34d69
[]
no_license
orangeevan/fight
0def675a0ed68437d7d7ef0da253934071e20570
8c5a7110483f46d82699515b8b6eca42d38efd45
refs/heads/master
2023-04-21T10:02:29.828635
2021-05-06T08:33:41
2021-05-06T08:33:41
362,714,425
0
0
null
null
null
null
UTF-8
Java
false
false
1,250
java
package com.yuen.fight.action.impl; import com.yuen.fight.Creature; import com.yuen.fight.IBoard; import com.yuen.fight.action.IAction; import com.yuen.fight.handler.impl.MwnFightHandler; /** * @author: yuanchengyan * @description: * @since 10:29 2021/4/28 */ public class MidRoundAction extends IAction<MidRoundAction.Board, MwnFightHandler.BoardBox> { @Override public boolean isEnd() { if (box.getDefender().isDead()) { return true; } if (box.getDefender().isDead()) { return true; } return board.round >= 100; } @Override public void circleEnd() { super.circleEnd(); board.round++; } @Override public void end() { System.err.println("MidRoundAction- end -"+board.round); } @Override public void action() { Creature attacker = box.getAttacker(); Creature defender = box.getDefender(); //TODO 战斗逻辑 System.err.println("MidRoundAction- action -"+board.round); } public static class Board implements IBoard<MwnFightHandler.BoardBox> { int round = 0; @Override public void initBoard(MwnFightHandler.BoardBox box) { } } }
1ff78d4b7ecbde50bd6e8819e69796c9808acc89
701980910117b797b5f7ca5a61a7262ccbc3ee7b
/core/src/main/java/com/matthewmitchell/peercoinj/core/PeerEventListener.java
721956ae0f6c29a01dc2fb9b3c1f6e4750b27908
[ "Apache-2.0" ]
permissive
MatthewLM/peercoinj
c76f356e8cfa5b0cdc133a3bc91df867468e9c28
c385a2347dfad73fa8959362c115970b62e0e8de
refs/heads/master
2023-04-06T19:27:20.008332
2023-03-20T16:07:05
2023-03-20T16:07:05
22,102,786
11
30
null
2015-07-27T16:57:10
2014-07-22T12:19:41
Java
UTF-8
Java
false
false
3,864
java
/** * Copyright 2011 Google 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.matthewmitchell.peercoinj.core; import javax.annotation.Nullable; import java.util.List; /** * <p>Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, * they can pre-filter messages before they are procesesed by a {@link Peer} or {@link PeerGroup}, and they can * provide transactions to remote peers when they ask for them.</p> */ public interface PeerEventListener { /** * Called on a Peer thread when a block is received.<p> * * The block may have transactions or may be a header only once getheaders is implemented. * * @param peer the peer receiving the block * @param block the downloaded block * @param blocksLeft the number of blocks left to download */ public void onBlocksDownloaded(Peer peer, Block block, int blocksLeft); /** * Called when a download is started with the initial number of blocks to be downloaded. * * @param peer the peer receiving the block * @param blocksLeft the number of blocks left to download */ public void onChainDownloadStarted(Peer peer, int blocksLeft); /** * Called when a peer is connected. If this listener is registered to a {@link Peer} instead of a {@link PeerGroup}, * peerCount will always be 1. * * @param peer * @param peerCount the total number of connected peers */ public void onPeerConnected(Peer peer, int peerCount); /** * Called when a peer is disconnected. Note that this won't be called if the listener is registered on a * {@link PeerGroup} and the group is in the process of shutting down. If this listener is registered to a * {@link Peer} instead of a {@link PeerGroup}, peerCount will always be 0. * * @param peer * @param peerCount the total number of connected peers */ public void onPeerDisconnected(Peer peer, int peerCount); /** * <p>Called when a message is received by a peer, before the message is processed. The returned message is * processed instead. Returning null will cause the message to be ignored by the Peer returning the same message * object allows you to see the messages received but not change them. The result from one event listeners * callback is passed as "m" to the next, forming a chain.</p> * * <p>Note that this will never be called if registered with any executor other than * {@link com.matthewmitchell.peercoinj.utils.Threading#SAME_THREAD}</p> */ public Message onPreMessageReceived(Peer peer, Message m); /** * Called when a new transaction is broadcast over the network. */ public void onTransaction(Peer peer, Transaction t); /** * <p>Called when a peer receives a getdata message, usually in response to an "inv" being broadcast. Return as many * items as possible which appear in the {@link GetDataMessage}, or null if you're not interested in responding.</p> * * <p>Note that this will never be called if registered with any executor other than * {@link com.matthewmitchell.peercoinj.utils.Threading#SAME_THREAD}</p> */ @Nullable public List<Message> getData(Peer peer, GetDataMessage m); }
230542af5bb426d815e3ab709e5d9abb31a68e22
26da0aea2ab0a2266bbee962d94a96d98a770e5f
/nam/nam-view/src/main/java/nam/model/messaging/MessagingRecord_OverviewsSection.java
d6a178e196550e5ccaf1eebf786c033832cc8c28
[ "Apache-2.0" ]
permissive
tfisher1226/ARIES
1de2bc076cf83488703cf18f7e3f6e3c5ef1b40b
814e3a4b4b48396bcd6d082e78f6519679ccaa01
refs/heads/master
2021-01-10T02:28:07.807313
2015-12-10T20:30:00
2015-12-10T20:30:00
44,076,313
2
0
null
null
null
null
UTF-8
Java
false
false
1,033
java
package nam.model.messaging; import java.io.Serializable; import javax.enterprise.context.SessionScoped; import javax.inject.Named; import org.apache.commons.lang.StringUtils; import org.aries.ui.AbstractWizardPage; import nam.model.Messaging; import nam.model.util.MessagingUtil; @SessionScoped @Named("messagingOverviewsSection") public class MessagingRecord_OverviewsSection extends AbstractWizardPage<Messaging> implements Serializable { private Messaging messaging; public MessagingRecord_OverviewsSection() { setName("Overviews"); setUrl("overviews"); } public Messaging getMessaging() { return messaging; } public void setMessaging(Messaging messaging) { this.messaging = messaging; } @Override public void initialize(Messaging messaging) { setEnabled(true); setBackEnabled(true); setNextEnabled(true); setFinishEnabled(false); setMessaging(messaging); } @Override public void validate() { if (messaging == null) { validator.missing("Messaging"); } else { } } }
402b1061d2bfce13d3253f6a3fc26f3e7a89fe33
8f0e091169ae645a6ee8eb0e51c0bfe3368ea984
/app/src/androidTest/java/com/example/taskmanager/ExampleInstrumentedTest.java
568934eea895f653e7c7d7ca0abf2f156c42e0f4
[]
no_license
Rakhshanipr/TaskManager
31a5cca05cb3b25c62ef139e2e81f0039605fe1e
87129fe34837990b962b33b2c1a1799655fb7898
refs/heads/master
2023-03-03T19:42:56.209569
2021-02-03T12:05:34
2021-02-03T12:05:34
329,834,366
2
0
null
null
null
null
UTF-8
Java
false
false
760
java
package com.example.taskmanager; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.example.taskmanager", appContext.getPackageName()); } }
7b47b7e4aa28cb6f686b15a7eac4c8baebc2a1ec
1671d87c2e414de8186570983c65c220888f20b1
/第一阶段/day08/src/com/atguigu/lgl/ArrayUtils_Luo2.java
1517e240c3050d69b7dec6c27d31af52de4fb77b
[]
no_license
qisirendexudoudou/BigData_0722
4f25b508b4c20088d4155abb2d52e1d39c8b0e81
e474e6ebcbbfedd12f859f0198238f58b73e5bec
refs/heads/master
2022-07-21T17:41:47.611707
2019-11-16T05:59:11
2019-11-16T05:59:11
221,875,869
0
0
null
2022-06-21T02:14:43
2019-11-15T08:10:07
Java
UTF-8
Java
false
false
2,279
java
package com.atguigu.lgl; import java.util.Arrays; public class ArrayUtils_Luo2 { public static void main(String[] args) { int[] numbers1 = {3,1,7,9,5,11}; ArrayUtils_Luo run2 = new ArrayUtils_Luo(); System.out.println(run2.maxNumber(numbers1)); System.out.println(run2.minNumber(numbers1)); System.out.println(run2.sum(numbers1)); System.out.println(run2.ever(numbers1)); System.out.println(Arrays.toString(run2.copyNumber(numbers1))); System.out.println(Arrays.toString(run2.fanzhuan(numbers1))); System.out.println(run2.findNumber(numbers1,9)); System.out.println(Arrays.toString(run2.sort(numbers1,true))); System.out.println(Arrays.toString(run2.sort(numbers1,false))); } //排序 public int[] sort(int[] a,boolean boo){ if (boo){ for (int i = 0; i < a.length-1; i++) { for (int j = 0; j < a.length-i-1; j++) { if (a[j] > a[j+1]) { int tmpe = a[j]; a[j] = a[j+1]; a[j+1] = tmpe; } } } }else { for (int i = 0; i < a.length-1; i++) { for (int j = 0; j < a.length-i-1; j++) { if (a[j] < a[j+1]) { int tmpe = a[j]; a[j] = a[j+1]; a[j+1] = tmpe; } } } } return a; } //查找 public int findNumber(int[] a,int b){ int index = -1; for (int i = 0; i < a.length; i++) { if ( a[i] == b) { index = i; } } return index; } //反转 public int[] fanzhuan(int[] a){ for (int i = 0,j=a.length-1; i < a.length/2; i++,j--) { int tmpe = a[i]; a[i] = a[j]; a[j] = tmpe; } return a; } //复制 public int[] copyNumber(int[] a){ int[] copyNumber = new int[a.length]; for (int i = 0; i < copyNumber.length; i++) { copyNumber[i] = a[i]; } return copyNumber; } //求平均值 public int ever(int[] a){ return sum(a)/a.length; } //求和 public int sum(int[] a){ int sum = 0; for (int i = 0; i < a.length; i++) { sum += a[i]; } return sum; } //最小值 public int minNumber(int[] a){ int minNum = a[0]; for (int i = 0; i < a.length; i++) { if (a[i] < minNum) { minNum = a[i]; } } return minNum; } //最大值 public int maxNumber(int[] a){ int maxNum = a[0]; for (int i = 0; i < a.length; i++) { if (a[i] > maxNum) { maxNum = a[i]; } } return maxNum; } }
c7db4299aab2fc8ef426f42e4561fb41bca6f268
297096090165fdc3bd77db64cccf63c9d32dea99
/src/main/java/com/example/filedown/service/FileService.java
7c5b5a93a01d61d1974fc86415142724c9f5e3cb
[]
no_license
XDFHTY/filedown
b5ba863ce39b6455546445c1a50f45e24ed8cac5
ed007b41a36ffc79f88179c372408d8eaa49d4ab
refs/heads/master
2021-03-31T02:17:36.386009
2018-03-11T10:04:54
2018-03-11T10:04:54
124,743,591
0
0
null
null
null
null
UTF-8
Java
false
false
454
java
package com.example.filedown.service; import com.example.filedown.entity.DownWx; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; public interface FileService { //添加微信助手下载记录 public int addDownWX(DownWx downWx); //文件下载 public void downLoad(HttpServletRequest request, HttpServletResponse response, String name) throws IOException; }
d2690e99ae41ccf4f84b95cac40aa768f62cc2de
6b0cc0c8f9619c24a8ca30606d2fb41fc8fb9dc7
/fabric/fabric-commands/src/main/java/io/fabric8/commands/ProfileRefreshAction.java
534f5a5a1db318c8ef7ddedc9133d1d4259ff87a
[ "Apache-2.0" ]
permissive
brozow/fabric8
ae52aa1270bd21eed48b82f724ddb70213e6de50
82ecd4d0493e704c6a3de27d22437b2b2009472a
refs/heads/master
2020-12-25T10:42:27.785835
2014-07-11T07:42:28
2014-07-11T13:22:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,409
java
/** * Copyright 2005-2014 Red Hat, Inc. * * Red Hat 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 io.fabric8.commands; import io.fabric8.api.FabricService; import io.fabric8.api.Profile; import io.fabric8.api.Version; import io.fabric8.utils.FabricValidations; import io.fabric8.zookeeper.ZkDefs; import org.apache.felix.gogo.commands.Argument; import org.apache.felix.gogo.commands.Command; import org.apache.karaf.shell.console.AbstractAction; @Command(name = "profile-refresh", scope = "fabric", description = "Performs a change to the profile, that triggers the deployment agent. It's intended to be used for scanning for snapshot changes", detailedDescription = "classpath:profileRefresh.txt") public class ProfileRefreshAction extends AbstractAction { @Argument(index = 0, name = "profile", description = "The target profile to edit", required = true, multiValued = false) private String profileName; @Argument(index = 1, name = "version", description = "The version of the profile to edit. Defaults to the current default version.", required = false, multiValued = false) private String versionName = ZkDefs.DEFAULT_VERSION; private final FabricService fabricService; ProfileRefreshAction(FabricService fabricService) { this.fabricService = fabricService; } public FabricService getFabricService() { return fabricService; } @Override protected Object doExecute() throws Exception { FabricValidations.validateProfileName(profileName); Version version = versionName != null ? fabricService.getVersion(versionName) : fabricService.getDefaultVersion(); Profile profile = version.getProfile(profileName); if (profile == null) { throw new IllegalArgumentException("No profile found with name:" + profileName + " and version:" + version.getId()); } profile.refresh(); return null; } }
15ce5193b2ec3b7ff26508efff7e24456fa41164
07ae17e3daf4245fe1c66e7d3c0a8cba1c583b32
/providers/ecc-s3/src/test/java/org/jclouds/ecc/ECCWalrusAsyncClientTestDisabled.java
cb9236cdaea5ede56cdaa7389bb0a7e480e9b61a
[ "Apache-2.0" ]
permissive
PradyumnaNagendra/jclouds
0a14535e8c135702341453fc059e74db7a3c8b62
f7576dfc697e54a68baf09967bccc8f708735992
refs/heads/master
2020-04-12T10:02:21.260099
2011-01-19T01:56:24
2011-01-19T01:56:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,335
java
/** * * Copyright (C) 2010 Cloud Conscious, LLC. <[email protected]> * * ==================================================================== * 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.jclouds.ecc; import org.testng.annotations.Test; /** * @author Adrian Cole */ // NOTE:without testName, this will not call @Before* and fail w/NPE during surefire @Test(enabled = false, groups = "unit", testName = "ECCWalrusAsyncClientTest") public class ECCWalrusAsyncClientTestDisabled extends org.jclouds.walrus.WalrusAsyncClientTestDisabled { public ECCWalrusAsyncClientTestDisabled() { this.provider = "ecc"; this.url = "commondatastorage.googleapis.com"; } // TODO parameterize this test so that it can pass }
6d9a941dad411d7385c9db85f984f06cc4c8edb6
6e0f1b371d5f4c35ce4845b03f7273533cc9f0bc
/src/main/java/com/ivo/mrp/entity/packaging/SupplierPackage.java
c389e3970472004a0fc61aa25bdb618102f2cb8f
[]
no_license
badby001/mrp
4067068a00989ffa713d0e501e59ef456625bd43
0e8e6c0601023f4087afc0575515eeba8eecced9
refs/heads/master
2022-12-17T14:53:19.114740
2020-09-27T03:32:49
2020-09-27T03:32:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,607
java
package com.ivo.mrp.entity.packaging; import com.ivo.common.model.AutoIncreaseEntityModel; import lombok.Getter; import lombok.Setter; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.OneToMany; import javax.persistence.Table; import java.util.ArrayList; import java.util.Date; import java.util.List; /** * 包材的供应商 * @author wj * @version 1.0 */ @Setter @Getter @Entity @Table(name = "MRP3_Supplier_Package") public class SupplierPackage extends AutoIncreaseEntityModel { /** * 月份 */ private String month; /** * 机种 */ private String project; /** * 单片/连片类型 */ private String linkType; /** * 连片数 */ private Double linkQty; /** * 包装数量 */ private Double panelQty; /** * 厂别类型 */ private String type; /** * MODEL */ private String model; /** * 切片数 */ private Double cut; @OneToMany(mappedBy="supplierPackage", cascade= CascadeType.ALL) private List<SupplierPackageDetail> supplierList = new ArrayList<>(); /** * 有效性标识 */ private boolean validFlag = true; /** * 备注 */ private String memo = ""; /** * 创建者 */ private String creator = ""; /** * 创建时间 */ private Date createDate = new Date(); /** * 修改者 */ private String updater = ""; /** * 修改时间 */ private Date updateDate = new Date(); }
20bdf77b91d35a7435e2a9df684add6fad5911f4
ebe222e23b4022e29c95ea5823ff7b646ef51d5a
/zxingScan/src/main/java/com/runtai/zxinglib/zxing/decode/DecodeFormatManager.java
d2a3f144712a192bd6504eb2cb8d10a4a5af764c
[]
no_license
hailinliu/Dexintong
902a0875bc6060b9031235e7af1d2cff2c062930
abacf20126b79d0f42a67c626634a2c73b97fbf3
refs/heads/master
2021-05-15T04:18:45.814739
2018-02-04T14:53:35
2018-02-04T14:53:35
114,599,643
0
0
null
null
null
null
UTF-8
Java
false
false
1,699
java
/* * Copyright (C) 2010 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.runtai.zxinglib.zxing.decode; import com.google.zxing.BarcodeFormat; import java.util.Collection; import java.util.EnumSet; import java.util.Set; public class DecodeFormatManager { // 1D解码 static final Set<BarcodeFormat> PRODUCT_FORMATS; static final Set<BarcodeFormat> INDUSTRIAL_FORMATS; static final Set<BarcodeFormat> ONE_D_FORMATS; // 二维码解码 static final Set<BarcodeFormat> QR_CODE_FORMATS; static { PRODUCT_FORMATS = EnumSet.of(BarcodeFormat.UPC_A, BarcodeFormat.UPC_E, BarcodeFormat.EAN_13, BarcodeFormat.EAN_8, BarcodeFormat.RSS_14, BarcodeFormat.RSS_EXPANDED); INDUSTRIAL_FORMATS = EnumSet.of(BarcodeFormat.CODE_39, BarcodeFormat.CODE_93, BarcodeFormat.CODE_128, BarcodeFormat.ITF, BarcodeFormat.CODABAR); ONE_D_FORMATS = EnumSet.copyOf(PRODUCT_FORMATS); ONE_D_FORMATS.addAll(INDUSTRIAL_FORMATS); QR_CODE_FORMATS = EnumSet.of(BarcodeFormat.QR_CODE); } public static Collection<BarcodeFormat> getQrCodeFormats() { return QR_CODE_FORMATS; } public static Collection<BarcodeFormat> getBarCodeFormats() { return ONE_D_FORMATS; } }
384a82eda079de9cbed3e83c36ff89955d56b059
28042a70f18edda4df9d14eb7335ca544564c923
/src/main/java/com/kazuki43zoo/jpetstore/ui/controller/OrderForm.java
c4091b789e86ca0d925b442fcd884617288e9022
[]
no_license
jiangjj/mybatis-spring-boot-jpetstore
aadb8887bf09431189251f9b947f6e40347dee94
dcaa49ed4ce8a5a7972b2a2d6a8c8902e6259343
refs/heads/master
2021-01-18T22:37:35.314723
2017-04-02T13:05:26
2017-04-02T13:05:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,402
java
/** * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.kazuki43zoo.jpetstore.ui.controller; import com.kazuki43zoo.jpetstore.component.validation.NumericCharacters; import com.kazuki43zoo.jpetstore.domain.Account; import com.kazuki43zoo.jpetstore.domain.Order; import lombok.Getter; import lombok.Setter; import com.kazuki43zoo.jpetstore.ui.Cart; import org.springframework.beans.BeanUtils; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; import java.io.Serializable; /** * @author Kazuki Shimizu */ @Getter @Setter public class OrderForm implements Serializable { private static final long serialVersionUID = 6321792448424424931L; @NotNull @Size(max = 40) private String cardType; @NotNull @Size(max = 80) @NumericCharacters private String creditCard; @NotNull @Pattern(regexp = "^\\d{2}/\\d{4}$") private String expiryDate; @NotNull @Size(max = 40) private String billToFirstName; @NotNull @Size(max = 40) private String billToLastName; @Size(max = 40) private String billAddress1; @Size(max = 40) private String billAddress2; @Size(max = 40) private String billCity; @Size(max = 40) private String billState; @Size(max = 20) @NumericCharacters private String billZip; @Size(max = 20) private String billCountry; private boolean shippingAddressRequired; @NotNull @Size(max = 40) private String shipToFirstName; @NotNull @Size(max = 40) private String shipToLastName; @NotNull @Size(max = 40) private String shipAddress1; @Size(max = 40) private String shipAddress2; @NotNull @Size(max = 40) private String shipCity; @Size(max = 40) private String shipState; @NotNull @Size(max = 20) @NumericCharacters private String shipZip; @NotNull @Size(max = 20) private String shipCountry; void initialize(Account account) { this.billToFirstName = account.getFirstName(); this.billToLastName = account.getLastName(); this.billAddress1 = account.getAddress1(); this.billAddress2 = account.getAddress2(); this.billCity = account.getCity(); this.billState = account.getState(); this.billZip = account.getZip(); this.billCountry = account.getCountry(); this.shipToFirstName = account.getFirstName(); this.shipToLastName = account.getLastName(); this.shipAddress1 = account.getAddress1(); this.shipAddress2 = account.getAddress2(); this.shipCity = account.getCity(); this.shipState = account.getState(); this.shipZip = account.getZip(); this.shipCountry = account.getCountry(); } Order toOrder(Cart cart) { Order order = new Order(); BeanUtils.copyProperties(this, order); order.setTotalPrice(cart.getSubTotal()); cart.getCartItems().forEach(x -> order.addLine(x.toOrderLine())); return order; } }
7b828c1afb5a7bcf3750290a1cbee284b00ce25e
80dbe293f549c773d3e227e90c01833213b99ab5
/chapter7_8/KiloConverterWindowPhase2/KilometerConverterDemo.java
af3c29073854b8de665048f1f7e76e8354f01c84
[]
no_license
htankhai/Org.StartingoutwithJava
9174cf162481c7edb628a62602e7ceba8ee48a10
215c96f55e92829d0b29119b739a56ebec653055
refs/heads/master
2020-04-15T00:45:45.784385
2015-06-20T22:08:59
2015-06-20T22:08:59
37,787,735
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
package KiloConverterWindowPhase2; import KiloConverterWindowPhase2.KiloConverterWindow; /** This program creates an instance of the KiloConverterWindow class, which displays a window on the screen. */ public class KilometerConverterDemo{ public static void main(String[] args) { KiloConverterWindow kc = new KiloConverterWindow(); } }
2a02bb5540d1d46580174f1795ef4ec61363d4b0
a1a51aad102f9f82647bb4624940bf1fd0486def
/engines/dyn4j/src/org/dyn4j/collision/manifold/ManifoldSolver.java
0a90d8833cefc1c923e2e64f811d56481d140000
[]
no_license
Madzi/featurea
337c187b19c69e82956a4b8d711eb40dbbf07f7a
4ee44d5910617c1233a77e0787d85717ee5347a0
refs/heads/master
2020-12-11T05:58:44.584623
2016-07-25T20:54:07
2016-07-25T20:54:07
64,206,389
0
1
null
2016-07-26T09:00:15
2016-07-26T09:00:15
null
UTF-8
Java
false
false
3,675
java
/* * Copyright (c) 2010-2016 William Bittle http://www.dyn4j.org/ * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted * provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this list of conditions * and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions * and the following disclaimer in the documentation and/or other materials provided with the * distribution. * * Neither the name of dyn4j nor the names of its contributors may be used to endorse or * promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.dyn4j.collision.manifold; import org.dyn4j.collision.narrowphase.NarrowphaseDetector; import org.dyn4j.collision.narrowphase.Penetration; import org.dyn4j.geometry.Convex; import org.dyn4j.geometry.Shape; import org.dyn4j.geometry.Transform; /** * Finds a contact {@link Manifold} for two given {@link Convex} {@link Shape}s that are in collision. * <p> * A contact {@link Manifold} is a collection of contact points for a collision. For two dimensions, this will never * be more than two contacts. * <p> * A {@link ManifoldSolver} relies on the {@link Penetration} object returned from a {@link NarrowphaseDetector} to * determine the contact {@link Manifold}. The {@link Manifold}s have ids to facilitate caching of contact information. * <p> * It's possible that no contact points are returned, in which case the {@link #getManifold(Penetration, Convex, Transform, Convex, Transform, Manifold)} * method will return false. * @author William Bittle * @version 3.2.0 * @since 1.0.0 * @see Manifold */ public interface ManifoldSolver { /** * Returns true if there exists a valid contact manifold between the two {@link Convex} {@link Shape}s. * <p> * When returning true, this method fills in the {@link Manifold} object with the points, depth, and normal. * <p> * The given {@link Manifold} object will be cleared using the {@link Manifold#clear()} method. This allows reuse of the * {@link Manifold} if desired. * <p> * The {@link Penetration} object will be left unchanged by this method. * @param penetration the {@link Penetration} * @param convex1 the first {@link Convex} {@link Shape} * @param transform1 the first {@link Shape}'s {@link Transform} * @param convex2 the second {@link Convex} {@link Shape} * @param transform2 the second {@link Shape}'s {@link Transform} * @param manifold the {@link Manifold} object to fill * @return boolean */ public abstract boolean getManifold(Penetration penetration, Convex convex1, Transform transform1, Convex convex2, Transform transform2, Manifold manifold); }
70ab61b1c8ec4552e966f0c7c2674ad8d38aa6b6
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_0306.java
1d70dcf2116cd16a2718b2f2f47b4247744ff752
[ "Apache-2.0" ]
permissive
lesaint/experimenting-annotation-processing
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
1e9692ceb0d3d2cda709e06ccc13290262f51b39
refs/heads/master
2021-01-23T11:20:19.836331
2014-11-13T10:37:14
2014-11-13T10:37:14
26,336,984
1
0
null
null
null
null
UTF-8
Java
false
false
151
java
package fr.javatronic.blog.massive.annotation1.sub1; import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_0306 { }