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
a8e6f8fbfd873b5069d96ed4e288d8b12f67c3e8
597ae0da8444c42e33583ae5e34aafb787a25fbc
/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/UriParam.java
025a17b23cf35101f5cf9c7d5cdc1238f6b2ee13
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
artonio/hapi-fhir
6d0979d6da54fd01ca3a80e944ad2ab0ccb5534d
c8a3e99d8f34fbe1e077be2ebe7cdecf787b170d
refs/heads/master
2021-08-06T18:45:43.165648
2020-05-14T21:50:19
2020-05-14T21:50:19
179,379,046
1
0
Apache-2.0
2020-05-14T21:51:55
2019-04-03T22:22:40
Java
UTF-8
Java
false
false
3,063
java
package ca.uhn.fhir.rest.param; /* * #%L * HAPI FHIR - Core Library * %% * Copyright (C) 2014 - 2020 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import static org.apache.commons.lang3.StringUtils.defaultString; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.api.IQueryParameterType; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.model.primitive.UriDt; public class UriParam extends BaseParam implements IQueryParameterType { private UriParamQualifierEnum myQualifier; private String myValue; /** * Constructor */ public UriParam() { super(); } public UriParam(String theValue) { setValue(theValue); } @Override String doGetQueryParameterQualifier() { return myQualifier != null ? myQualifier.getValue() : null; } @Override String doGetValueAsQueryToken(FhirContext theContext) { return ParameterUtil.escape(myValue); } @Override void doSetValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue) { myQualifier = UriParamQualifierEnum.forValue(theQualifier); myValue = ParameterUtil.unescape(theValue); } /** * Gets the qualifier for this param (may be <code>null</code> and generally will be) */ public UriParamQualifierEnum getQualifier() { return myQualifier; } public String getValue() { return myValue; } public StringDt getValueAsStringDt() { return new StringDt(myValue); } public UriDt getValueAsUriDt() { return new UriDt(myValue); } public String getValueNotNull() { return defaultString(myValue); } public boolean isEmpty() { return StringUtils.isEmpty(myValue); } /** * Sets the qualifier for this param (may be <code>null</code> and generally will be) * * @return Returns a reference to <code>this</code> for easy method chanining */ public UriParam setQualifier(UriParamQualifierEnum theQualifier) { myQualifier = theQualifier; return this; } /** * Sets the value for this param * * @return Returns a reference to <code>this</code> for easy method chanining */ public UriParam setValue(String theValue) { myValue = theValue; return this; } @Override public String toString() { ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE); builder.append("value", getValue()); return builder.toString(); } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
96efbed182c0ed6eb2ef215db1fd6ee611aee207
830a0c753b5dd2c06d0f25f7b5c4ebf8e59341e5
/jaxrs-hibernate-client/src/test/java/com/atomikos/jaxrshibernateclient/JaxrsHibernateClientApplicationTests.java
55518de903ca67a72a00f75de7748007712ec9ee
[]
no_license
atomikos/transactions-over-rest-with-hybrid-jaxrs-stack
e9d31d5f812a4fc7808f6b247c3d5d9c8c0bbd07
e44ad5711b1581025a25f93e4d7f4120e737a26c
refs/heads/master
2023-07-09T14:53:42.982725
2020-03-31T12:17:37
2020-03-31T12:17:37
251,315,079
0
3
null
null
null
null
UTF-8
Java
false
false
227
java
package com.atomikos.jaxrshibernateclient; import org.junit.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class JaxrsHibernateClientApplicationTests { @Test void contextLoads() { } }
[ "pascal.leclercq@gmail.com" ]
pascal.leclercq@gmail.com
9eb9cfcdaa934d05260ca9e9d9acd89734d6ddf1
93c99ee9770362d2917c9494fd6b6036487e2ebd
/server/decompiled_apps/2b7122657dcb75ede8840eff964dd94a/com.bankeen.ui.transfer.account.sender/-$$Lambda$f$gynxAL_qwxqXXreFUCK6CHcmxx0.java
331abb137c9f7d4cc162ddda2f141c8e607c6652
[]
no_license
YashJaveri/Satic-Analysis-Tool
e644328e50167af812cb2f073e34e6b32279b9ce
d6f3be7d35ded34c6eb0e38306aec0ec21434ee4
refs/heads/master
2023-05-03T14:29:23.611501
2019-06-24T09:01:23
2019-06-24T09:01:23
192,715,309
0
1
null
2023-04-21T20:52:07
2019-06-19T11:00:47
Smali
UTF-8
Java
false
false
384
java
package com.bankeen.ui.transfer.account.sender; /* compiled from: lambda */ public final /* synthetic */ class -$$Lambda$f$gynxAL_qwxqXXreFUCK6CHcmxx0 implements Runnable { private final /* synthetic */ f f$0; public /* synthetic */ -$$Lambda$f$gynxAL_qwxqXXreFUCK6CHcmxx0(f fVar) { this.f$0 = fVar; } public final void run() { this.f$0.c(); } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
ccb6d0f282ac54e957a5c418ded866235e3840d2
435016c5e2d4cfbfe9f939db725aab59dd8b9240
/java-basic/src/main/java/ch23/e/CalculatorServer.java
f8b5f40ec5818c45dbfd21babde3d647cc3fb147
[]
no_license
kmincheol/bitcamp-java-2018-12
59b3c5709b1aa905035a390d553002547243a13a
32b2df6e295412207a27bfc57069e9069f85a0a4
refs/heads/master
2021-08-06T22:04:08.819338
2019-06-12T02:16:22
2019-06-12T02:16:22
163,650,686
1
1
null
2020-04-30T03:50:33
2018-12-31T08:00:45
Java
UTF-8
Java
false
false
3,531
java
// TCP : connectionful(Stateless) 응용 - 서버에서 계산 결과 유지하기 package ch23.e; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintStream; import java.net.ServerSocket; import java.net.Socket; import java.util.HashMap; public class CalculatorServer { public static void main(String[] args) { // 클라이언트의 작업 결과를 저장할 맵 객체 HashMap<Long, Integer> resultMap = new HashMap<>(); try (ServerSocket serverSocket = new ServerSocket(8888)) { System.out.println("서버 실행 중..."); // 서버의 Stateless 통신 방법에서 클라이언트를 구분하여 각 클라이언트의 계산 결과를 유지하려면? // => 커피숍에서는 고객의 쿠폰 포인트를 어떻게 관리할까? while (true) { try (Socket socket = serverSocket.accept(); BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream())); PrintStream out = new PrintStream(socket.getOutputStream());) { System.out.println("클라이언트와 연결됨! 요청처리 중..."); // 먼저 클라이언트가 보낸 세션 ID를 읽는다. long sessionId = Long.parseLong(in.readLine()); System.out.printf("세션ID : %d\n", sessionId); int result = 0; boolean isNewSessionId = false; if (sessionId == 0) { // 클라이언트에게 세션ID를 발급한 적이 없다면, 새 세션 ID를 발급한다. sessionId = System.currentTimeMillis(); isNewSessionId = true; // 세션 ID를 새로 발급했다고 표시한다. } else { // 클라이언트의 세션 ID로 기존에 저장된 결과 값을 가져온다. result = resultMap.get(sessionId); // auto-unboxing => Integer.intValue() } String[] input = in.readLine().split(" "); int b = 0; String op = null; try { op = input[0]; b = Integer.parseInt(input[1]); } catch (Exception e) { out.println("식의 형식이 바르지 않습니다."); out.flush(); continue; } switch (op) { case "+": result += b; break; case "-": result -= b; break; case "*": result *= b; break; case "/": result /= b; break; case "%": result %= b; break; default: out.printf("%s 연산자를 지원하지 않습니다.\n", op); out.flush(); continue; } // 계산결과를 세션 ID를 사용해서 서버에 저장한다. resultMap.put(sessionId, result); // 세션 ID를 새로 발급했다면 클라이언트에게 알려준다 if (isNewSessionId) { out.println(sessionId); } out.printf("현재 결과는 %d 입니다.\n", result); out.flush(); } catch (Exception e) { // 클라이언트 요청을 처리하다가 예외가 발생하면 무시하고 연결을 끊는다. System.out.println("클라이언트와 통신 중 오류 발생!"); } System.out.println("클라이언트와 연결 끊음!"); } } catch (Exception e) { e.printStackTrace(); } } }
[ "mincheol.kmc@gmail.com" ]
mincheol.kmc@gmail.com
613a8ac6c3daec01e5c92cdfac26a489b8c38245
01792e9d60f0e492af8604ca198d9d399dbd302c
/valid-perfect-square/Solution.java
1e03e40e02c0fec13ec9dda0ac15af7ebbd105de
[]
no_license
singh523/leetcode
5de3bbe101b462a3416dc0cdbd020df055da1a15
bf286849508d32b35217d5684514d1a61fd1874a
refs/heads/master
2022-04-18T21:51:59.483153
2020-04-19T07:53:14
2020-04-19T07:53:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
373
java
public class Solution { public boolean isPerfectSquare(int num) { int lower = 1; int upper = 1 << 16; while (lower <= upper) { int middle = (lower + upper) / 2; long square = (long) middle * middle; if (num == square) { return true; } else if (num < square) { upper = middle - 1; } else { lower = middle + 1; } } return false; } }
[ "charles.wangkai@gmail.com" ]
charles.wangkai@gmail.com
e486e1a6fa4103a66428ba4812c30b1570187a4b
0606f2f1dc5dabcdaa5bb234e5a82640d7de52c3
/src/main/java/cn/com/rebirth/service/middleware/server/support/ServiceRegisterSupport.java
e7488ad40f95b8c46a46f8f6b40dbd4ad4231c36
[]
no_license
dowsam/rebirth-service-middleware-server
2ac64fb1154c2b48df7f5b01c4579be7c78609d0
47e800552e5b307d3f41a3cfff81e48649eb998a
refs/heads/master
2021-01-18T16:32:31.404106
2012-09-05T06:01:26
2012-09-05T06:01:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,054
java
/* * Copyright (c) 2005-2012 www.china-cti.com All rights reserved * Info:rebirth-service-middleware-server ServiceRegisterSupport.java 2012-7-17 14:42:34 l.xue.nong$$ */ package cn.com.rebirth.service.middleware.server.support; import static java.lang.String.format; import java.util.List; import java.util.Map; import org.I0Itec.zkclient.IZkChildListener; import org.I0Itec.zkclient.IZkStateListener; import org.apache.zookeeper.Watcher.Event.KeeperState; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import cn.com.rebirth.commons.component.AbstractLifecycleComponent; import cn.com.rebirth.commons.exception.RebirthException; import cn.com.rebirth.commons.search.config.support.ZooKeeperExpand; import cn.com.rebirth.commons.settings.Settings; import cn.com.rebirth.service.middleware.commons.Message; import cn.com.rebirth.service.middleware.commons.MessageSubscriber; import cn.com.rebirth.service.middleware.commons.Messages; import cn.com.rebirth.service.middleware.server.ProviderService; import cn.com.rebirth.service.middleware.server.message.RegisterServiceMessage; import com.google.common.collect.Maps; /** * The Class ServiceRegisterSupport. * * @author l.xue.nong */ public class ServiceRegisterSupport extends AbstractLifecycleComponent<ServiceRegisterSupport> implements MessageSubscriber { /** The messages. */ private final Messages messages; /** The server support. */ private final ServerSupport serverSupport; /** * Instantiates a new service register support. * * @param settings the settings * @param messages the messages * @param serverSupport the server support */ protected ServiceRegisterSupport(Settings settings, Messages messages, ServerSupport serverSupport) { super(settings); this.messages = messages; this.serverSupport = serverSupport; } /** The logger. */ private final Logger logger = LoggerFactory.getLogger(ServiceRegisterSupport.class); /** The services. */ private Map<String, ProviderService> services; /* (non-Javadoc) * @see cn.com.rebirth.service.middleware.commons.MessageSubscriber#receive(cn.com.rebirth.service.middleware.commons.Message) */ @Override public void receive(Message<?> msg) throws RebirthException { if (!(msg instanceof RegisterServiceMessage)) { return; } final ProviderService service = ((RegisterServiceMessage) msg).getContent(); final String key = service.getKey(); if (services.containsKey(key)) { if (logger.isInfoEnabled()) { logger.info(format("service:%s already registed.", service)); } } final String pref = format("/rebirth/service/middleware/nondurable/%s/%s/%s", service.getGroup(), service.getVersion(), service.getSign()); try { String _p = format("%s%s", pref, serverSupport.getPublishAddress()); ZooKeeperExpand.getInstance().create(_p); services.put(key, service); } catch (Exception e) { logger.warn(format("create service:%s path failed", service), e); } } /* (non-Javadoc) * @see cn.com.rebirth.commons.component.AbstractLifecycleComponent#doStart() */ @Override protected void doStart() throws RebirthException { Messages.register(this, RegisterServiceMessage.class); services = Maps.newConcurrentMap(); ZooKeeperExpand.getInstance().getZkClient().subscribeStateChanges(new IZkStateListener() { @Override public void handleStateChanged(KeeperState state) throws Exception { if (KeeperState.SyncConnected.equals(state)) { if (logger.isInfoEnabled()) { logger.info("zk-server reconnected, must reRegister right now."); } for (ProviderService providerService : services.values()) { messages.post(new RegisterServiceMessage(providerService)); } } } @Override public void handleNewSession() throws Exception { } }); } /* (non-Javadoc) * @see cn.com.rebirth.commons.component.AbstractLifecycleComponent#doStop() */ @Override protected void doStop() throws RebirthException { if (services != null && !services.isEmpty()) { for (Map.Entry<String, ProviderService> entry : services.entrySet()) { ProviderService service = entry.getValue(); final String pref = format("/rebirth/service/middleware/nondurable/%s/%s/%s", service.getGroup(), service.getVersion(), service.getSign()); ZooKeeperExpand.getInstance().delete(format("%s%s", pref, serverSupport.getPublishAddress())); } } } /* (non-Javadoc) * @see cn.com.rebirth.commons.component.AbstractLifecycleComponent#doClose() */ @Override protected void doClose() throws RebirthException { } public static void main(String[] args) { System.setProperty("zk.zkConnect", "192.168.2.179:2181"); System.setProperty("rebirth.service.middleware.container.className", "cn.com.rebirth.knowledge.scheduler.InitContainer"); System.setProperty("rebirth.service.middleware.container.time.consuming.className", "cn.com.rebirth.knowledge.scheduler.InitContainer$TimeConsumingInitContainer"); System.setProperty("rebirth.service.middleware.development.model", "true"); List<String> a = ZooKeeperExpand.getInstance().list( "/rebirth/service/middleware/nondurable/DefaultGroup/defalut/36ae6073d9ddb59a1b348a08695f9011"); for (String string : a) { System.out.println(string); } ZooKeeperExpand .getInstance() .getZkClient() .subscribeChildChanges( "/rebirth/service/middleware/nondurable/DefaultGroup/defalut/36ae6073d9ddb59a1b348a08695f9011", new IZkChildListener() { @Override public void handleChildChange(String parentPath, List<String> currentChilds) throws Exception { System.out.println(currentChilds); } }); ZooKeeperExpand .getInstance() .create("/rebirth/service/middleware/nondurable/DefaultGroup/defalut/36ae6073d9ddb59a1b348a08695f9011/192.168.2.99:9701"); a = ZooKeeperExpand.getInstance().list( "/rebirth/service/middleware/nondurable/DefaultGroup/defalut/36ae6073d9ddb59a1b348a08695f9011"); for (String string : a) { System.out.println(string); } } }
[ "l.xue.nong@gmail.com" ]
l.xue.nong@gmail.com
6ae5a07f623ee3a41fa0adfa96398f7da92bc32d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_537e7eb4f0c926ceb62b4fb61825dba4f554c514/TestNetCDFProxy/16_537e7eb4f0c926ceb62b4fb61825dba4f554c514_TestNetCDFProxy_t.java
f9ffaac081083f5ac3dee40b4ca1b73d54c2b052
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,964
java
/* * Copyright 2008-2010 Microarray Informatics Team, EMBL-European Bioinformatics Institute * * 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. * * * For further details of the Gene Expression Atlas project, including source code, * downloads and documentation, please see: * * http://gxa.github.com/gxa */ package uk.ac.ebi.gxa.netcdf; import junit.framework.TestCase; import java.io.File; import java.io.IOException; import java.util.HashSet; import java.util.List; import java.util.Set; import static com.google.common.io.Closeables.close; public class TestNetCDFProxy extends TestCase { private File netCDFfile; private NetCDFProxy netCDF; @Override protected void setUp() throws Exception { netCDFfile = new File(getClass().getClassLoader().getResource("MEXP/1500/E-MEXP-1586/E-MEXP-1586_A-AFFY-44.nc").toURI()); netCDF = new NetCDFProxy(netCDFfile); } @Override protected void tearDown() throws Exception { netCDFfile = null; close(netCDF, false); netCDF = null; } public void testisOutOfDate() throws Exception { try { new NetCDFProxy(new File(getClass().getClassLoader().getResource("MEXP/1500/E-MEXP-1586/E-MEXP-1586_A-AFFY-44_old.nc").toURI())).isOutOfDate(); } catch (AtlasDataException e) { return; } fail("AtlasDataException is not thrown"); } public void testGetExperiment() throws IOException { System.out.println("Experiment: " + netCDF.getExperimentAccession()); } public void testGetArrayDesign() throws IOException { System.out.println("ArrayDesign: " + netCDF.getArrayDesignAccession()); } /* public void testGetAssays() throws IOException { System.out.print("Assays: {"); for (long assay : netCDF.getAssays()) { System.out.print(assay + ", "); } System.out.println("}"); } public void testGetSamples() throws IOException { System.out.print("Samples: {"); for (long sample : netCDF.getSamples()) { System.out.print(sample + ", "); } System.out.println("}"); } */ public void testGetFactors() throws IOException { System.out.print("EFs: {"); for (String factor : netCDF.getFactors()) { System.out.print(factor + ", "); } System.out.println("}"); } public void testGetFactorValues() throws IOException { for (String factor : netCDF.getFactors()) { System.out.print("EFVs for " + factor + " {"); for (String efv : netCDF.getFactorValues(factor)) { System.out.print(efv + ", "); } System.out.println("}"); } } public void testGetUniqueFactorValues() throws IOException { final Set<KeyValuePair> uniques = new HashSet<KeyValuePair>(); for (KeyValuePair uefv : netCDF.getUniqueFactorValues()) { if (uniques.contains(uefv)) { fail("Found a duplicate: " + uefv); } else { uniques.add(uefv); } } } public void testGetUniqueValues() throws IOException { Set<KeyValuePair> uniques = new HashSet<KeyValuePair>(); List<KeyValuePair> uVals = netCDF.getUniqueValues(); List<KeyValuePair> uefvs = netCDF.getUniqueFactorValues(); assert (uVals.size() >= uefvs.size()); for (KeyValuePair uefv : uVals) { if (uniques.contains(uefv)) { fail("Found a duplicate: " + uefv); } else { uniques.add(uefv); } } } public void testGetCharacteristics() throws IOException { System.out.print("SCs: {"); for (String characteristic : netCDF.getCharacteristics()) { System.out.print(characteristic + ", "); } System.out.println("}"); } public void testGetCharacteristicValues() throws IOException { for (String characteristic : netCDF.getCharacteristics()) { System.out.print("SCVs: {"); for (String scv : netCDF.getCharacteristicValues(characteristic)) { System.out.print(scv + ", "); } System.out.println("}"); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
918b2ab70781fee48d1b6ed538cee8a5c1f361ac
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/56/org/apache/commons/math/linear/MatrixUtils_serializeRealMatrix_734.java
3996ff4b6014dcbb50c63031a0073ed3b7da91c9
[]
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
2,228
java
org apach common math linear collect method oper matric version revis date matrix util matrixutil serial link real matrix realmatrix method intend call code write object writeobject code method call code oo write object defaultwriteobject code link real matrix realmatrix field declar code code handl serial matrix link real matrix realmatrix serializ method serial specif show simpl real matrix written pre code name matrix namedmatrix serializ string real matrix realmatrix coeffici omit constructor getter write object writeobject object output stream objectoutputstream oo except ioexcept oo write object defaultwriteobject take care field matrix util matrixutil serial real matrix serializerealmatrix coeffici oo read object readobject object input stream objectinputstream oi class found except classnotfoundexcept except ioexcept oi read object defaultreadobject take care field matrix util matrixutil deseri real matrix deserializerealmatrix coeffici oi code pre param matrix real matrix serial param oo stream real matrix written except except ioexcept object written stream deseri real matrix deserializerealmatrix object string object input stream objectinputstream serial real matrix serializerealmatrix real matrix realmatrix matrix object output stream objectoutputstream oo except ioexcept matrix row dimens getrowdimens matrix column dimens getcolumndimens oo write int writeint oo write int writeint oo write doubl writedoubl matrix entri getentri
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
ce4d955843ca943341ce6f5f29afafd447260f27
08501436cc16de8148783bec51f983d295b38df4
/value-fixture/test/org/immutables/fixture/encoding/EncodingWithDefaultDerived.java
01a2def2c16a98edbd191bcfbb41c4702a77e855
[ "Apache-2.0" ]
permissive
immutables/immutables
e00b0d91448e4af4d1fda52be2e8a27201f85aff
c98038e82512ec255a24a0dfd6971eab52bd5b8e
refs/heads/master
2023-09-01T06:53:49.897708
2023-08-27T06:09:46
2023-08-27T06:09:46
11,233,996
3,530
344
Apache-2.0
2023-08-30T15:14:06
2013-07-07T13:48:23
Java
UTF-8
Java
false
false
2,292
java
/* Copyright 2018 Immutables Authors and Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.immutables.fixture.encoding; import java.util.Date; import java.util.OptionalDouble; import java.util.OptionalInt; import org.immutables.fixture.encoding.defs.CompactDateEnabled; import org.immutables.fixture.encoding.defs.CompactOptionalDoubleEnabled; import org.immutables.fixture.encoding.defs.CompactOptionalIntEnabled; import org.immutables.fixture.encoding.defs.VoidEncodingEnabled; import org.immutables.value.Value; @CompactOptionalIntEnabled @CompactOptionalDoubleEnabled @CompactDateEnabled @Value.Immutable public abstract class EncodingWithDefaultDerived { abstract OptionalInt a(); abstract Date dt(); public @Value.Default OptionalInt i() { return OptionalInt.empty(); } public @Value.Derived OptionalDouble d() { return OptionalDouble.of(0.5); } public @Value.Default Void v() { return null; } public @Value.Derived Void dv() { return null; } public @Value.Derived Date ddt() { return null; } } @CompactOptionalDoubleEnabled @CompactOptionalIntEnabled @VoidEncodingEnabled @Value.Immutable(singleton = true) interface DefaultSomeMore { OptionalDouble f(); default @Value.Derived OptionalInt i() { return OptionalInt.of(1); } default @Value.Default OptionalDouble d() { return OptionalDouble.empty(); } } @CompactOptionalDoubleEnabled @CompactOptionalIntEnabled @Value.Immutable(builder = false) @Value.Style(privateNoargConstructor = true) interface DefaultBuilderless { @Value.Parameter OptionalDouble f(); default @Value.Derived OptionalInt i() { return OptionalInt.of(1); } default @Value.Default OptionalDouble d() { return OptionalDouble.empty(); } }
[ "e.lucash@gmail.com" ]
e.lucash@gmail.com
72347e145280e54e72096b11a641652e0a17bd64
fd9c5d4ff3c1723fb735132218cedaf0f078cae6
/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/SpringApplicationContext.java
cc7ecc154ab1d01d56947c2307bfa6326343d496
[ "Apache-2.0" ]
permissive
gaoliujie2016/aries
607ffa10a135995fcd7d4d62064b24b81db33f4b
3cf085c0d411183d6ef65f5a0bc36aae316c480c
refs/heads/trunk
2021-09-24T02:15:48.282415
2021-09-16T02:20:57
2021-09-16T02:20:57
92,562,434
0
0
null
2017-05-27T01:56:30
2017-05-27T01:56:30
null
UTF-8
Java
false
false
3,191
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.aries.blueprint.spring; import java.util.ArrayList; import java.util.List; import org.apache.aries.blueprint.services.ExtendedBlueprintContainer; import org.osgi.framework.Bundle; import org.osgi.framework.wiring.BundleWiring; import org.springframework.beans.BeansException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.support.AbstractApplicationContext; public class SpringApplicationContext extends AbstractApplicationContext { private final ExtendedBlueprintContainer container; private final DefaultListableBeanFactory beanFactory; private final List<ClassLoader> parentClassLoaders = new ArrayList<ClassLoader>(); public SpringApplicationContext(ExtendedBlueprintContainer container) { this.container = container; this.beanFactory = new BlueprintBeanFactory(container); parentClassLoaders.add(container.getClassLoader()); setClassLoader(new ClassLoader() { @Override public Class<?> loadClass(String name) throws ClassNotFoundException { for (ClassLoader cl : parentClassLoaders) { try { return cl.loadClass(name); } catch (ClassNotFoundException e) { // Ignore } } throw new ClassNotFoundException(name); } }); prepareBeanFactory(beanFactory); prepareRefresh(); } public void process() { // Invoke factory processors registered as beans in the context. invokeBeanFactoryPostProcessors(beanFactory); // Register bean processors that intercept bean creation. registerBeanPostProcessors(beanFactory); } @Override protected void refreshBeanFactory() throws BeansException, IllegalStateException { } @Override protected void closeBeanFactory() { } @Override public DefaultListableBeanFactory getBeanFactory() throws IllegalStateException { return beanFactory; } public void addSourceBundle(Bundle bundle) { // This should always be not null, but we want to support unit testing if (bundle != null) { parentClassLoaders.add(bundle.adapt(BundleWiring.class).getClassLoader()); } } }
[ "gnodet@apache.org" ]
gnodet@apache.org
b1f5f5067009249660b55b4b35be4b964480e0bb
69011b4a6233db48e56db40bc8a140f0dd721d62
/src/com/jshx/aqglb/service/JshxAqglbService.java
9bcf5c4be24139a0d66cf68a426cfab6f94ef426
[]
no_license
gechenrun/scysuper
bc5397e5220ee42dae5012a0efd23397c8c5cda0
e706d287700ff11d289c16f118ce7e47f7f9b154
refs/heads/master
2020-03-23T19:06:43.185061
2018-06-10T07:51:18
2018-06-10T07:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
961
java
package com.jshx.aqglb.service; import java.util.Map; import com.jshx.core.base.service.BaseService; import com.jshx.core.base.vo.Pagination; import com.jshx.aqglb.entity.JshxAqglb; public interface JshxAqglbService extends BaseService { /** * 分页查询 * @param page 分页信息 * @param paraMap 查询条件信息 * @return 分页信息 */ public Pagination findByPage(Pagination page, Map<String, Object> paraMap); /** * 根据主键ID查询信息 * @param id 主键ID * @return 主键ID对应的信息 */ public JshxAqglb getById(String id); /** * 保存信息 * @param model 信息 */ public void save(JshxAqglb model); /** * 修改信息 * @param model 信息 */ public void update(JshxAqglb model); /** * 物理删除信息 * @param ids 主键ID列表 */ public void delete(String[] ids); /** * 逻辑删除信息 * @param ids 主键ID列表 */ public void deleteWithFlag(String ids); }
[ "shellchange@sina.com" ]
shellchange@sina.com
f19469d7a41d2367aecb9407ad2f89b53d209eb2
c37d0d069fff859767d0f9a5fa9ca860e96d9339
/src/test/java/com/google/devtools/build/android/desugar/testing/junit/DesugarRuleTest.java
4e9ba091d5c3745192bb226e187deae4a642f1b6
[ "Apache-2.0" ]
permissive
Squadrick/bazel
e759241ce3de4038bc42303250237ac4ba8ad9e5
5a8219ada648bae84d9d342c3dff67a5b6b14be2
refs/heads/master
2020-11-28T12:44:35.135463
2019-12-23T19:25:39
2019-12-23T19:26:30
229,814,062
1
0
Apache-2.0
2019-12-23T19:50:40
2019-12-23T19:50:40
null
UTF-8
Java
false
false
5,652
java
/* * Copyright 2019 The Bazel Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.devtools.build.android.desugar.testing.junit; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth8.assertThat; import static org.junit.Assert.assertThrows; import com.google.common.flags.Flag; import com.google.common.flags.FlagSpec; import com.google.common.flags.Flags; import com.google.testing.junit.junit4.api.TestArgs; import java.lang.invoke.MethodHandles; import java.lang.reflect.Method; import java.nio.file.Paths; import java.util.Arrays; import java.util.zip.ZipEntry; import org.junit.BeforeClass; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.FieldNode; import org.objectweb.asm.tree.MethodNode; /** The test for {@link DesugarRule}. */ @RunWith(JUnit4.class) public class DesugarRuleTest { @FlagSpec(help = "The input jar to be processed under desugar operations.", name = "input_jar") private static final Flag<String> inputJar = Flag.nullString(); @Rule public final DesugarRule desugarRule = DesugarRule.builder(this, MethodHandles.lookup()) .enableIterativeTransformation(3) .addInputs(Paths.get(inputJar.getNonNull())) .build(); @LoadClass( "com.google.devtools.build.android.desugar.testing.junit.DesugarRuleTestTarget$InterfaceSubjectToDesugar") private Class<?> interfaceSubjectToDesugarClassRound1; @LoadClass( value = "com.google.devtools.build.android.desugar.testing.junit.DesugarRuleTestTarget$InterfaceSubjectToDesugar", round = 2) private Class<?> interfaceSubjectToDesugarClassRound2; @LoadClass( "com.google.devtools.build.android.desugar.testing.junit.DesugarRuleTestTarget$InterfaceSubjectToDesugar$$CC") private Class<?> interfaceSubjectToDesugarCompanionClassRound1; @LoadClass( value = "com.google.devtools.build.android.desugar.testing.junit.DesugarRuleTestTarget$InterfaceSubjectToDesugar$$CC", round = 2) private Class<?> interfaceSubjectToDesugarCompanionClassRound2; @LoadZipEntry( value = "com/google/devtools/build/android/desugar/testing/junit/DesugarRuleTestTarget$InterfaceSubjectToDesugar$$CC.class", round = 1) private ZipEntry interfaceSubjectToDesugarZipEntryRound1; @LoadZipEntry( value = "com/google/devtools/build/android/desugar/testing/junit/DesugarRuleTestTarget$InterfaceSubjectToDesugar$$CC.class", round = 2) private ZipEntry interfaceSubjectToDesugarZipEntryRound2; @LoadAsmNode( className = "com.google.devtools.build.android.desugar.testing.junit.DesugarRuleTestTarget") private ClassNode desugarRuleTestTargetClassNode; @LoadAsmNode( className = "com.google.devtools.build.android.desugar.testing.junit.DesugarRuleTestTarget$Alpha", memberName = "twoIntSum") private MethodNode twoIntSum; @LoadAsmNode( className = "com.google.devtools.build.android.desugar.testing.junit.DesugarRuleTestTarget$Alpha", memberName = "multiplier", memberDescriptor = "J") private FieldNode multiplier; @BeforeClass public static void parseFlags() throws Exception { Flags.parse(TestArgs.get()); } @Test public void staticMethodsAreMovedFromOriginatingClass() { assertThrows( NoSuchMethodException.class, () -> interfaceSubjectToDesugarClassRound1.getDeclaredMethod("staticMethod")); } @Test public void staticMethodsAreMovedFromOriginatingClass_desugarTwice() { assertThrows( NoSuchMethodException.class, () -> interfaceSubjectToDesugarClassRound2.getDeclaredMethod("staticMethod")); } @Test public void staticMethodsAreMovedToCompanionClass() { assertThat( Arrays.stream(interfaceSubjectToDesugarCompanionClassRound1.getDeclaredMethods()) .map(Method::getName)) .contains("staticMethod$$STATIC$$"); } @Test public void nestMembers() { assertThat(desugarRuleTestTargetClassNode.nestMembers) .contains( "com/google/devtools/build/android/desugar/testing/junit/DesugarRuleTestTarget$InterfaceSubjectToDesugar"); } @Test public void idempotencyOperation() { assertThat(interfaceSubjectToDesugarZipEntryRound1.getCrc()) .isEqualTo(interfaceSubjectToDesugarZipEntryRound2.getCrc()); } @Test public void classLoaders_sameInstanceInSameRound() { assertThat(interfaceSubjectToDesugarClassRound1.getClassLoader()) .isSameInstanceAs(interfaceSubjectToDesugarCompanionClassRound1.getClassLoader()); assertThat(interfaceSubjectToDesugarClassRound2.getClassLoader()) .isSameInstanceAs(interfaceSubjectToDesugarCompanionClassRound2.getClassLoader()); } @Test public void injectFieldNodes() { assertThat(twoIntSum.desc).isEqualTo("(II)I"); } @Test public void injectMethodNodes() { assertThat(multiplier.desc).isEqualTo("J"); } }
[ "copybara-worker@google.com" ]
copybara-worker@google.com
9be4474e3e39f2728fa85faa623581df55005503
72451944f5e57ce17f60442783229f4b05d207d7
/code/src/com/asiainfo/stopSelling/dao/interfaces/IStopSellMDAO.java
4516e721437991f31336dc59c28e8ac399be769e
[]
no_license
amosgavin/db2app55
ab1d29247be16bc9bbafd020e1a234f98bac1a39
61be5acb3143f5035f789cd0e0fd4e01238d9d7d
refs/heads/master
2020-04-07T08:26:20.757572
2018-07-13T01:55:47
2018-07-13T01:55:47
null
0
0
null
null
null
null
GB18030
Java
false
false
1,410
java
package com.asiainfo.stopSelling.dao.interfaces; import com.asiainfo.stopSelling.ivalues.IBOStopSellMValue; public interface IStopSellMDAO { public int save(IBOStopSellMValue[] stopSellCharge) throws Exception; public IBOStopSellMValue getStopSellMInfoById(String mainId) throws Exception; public IBOStopSellMValue[] query(String mainId, String applyName, String itemType, String principal, String cityId, String state, String beginTime, String endTime, int startNum, int endNum) throws Exception; public int queryCn(String mainId, String applyName, String itemType, String principal, String cityId, String state, String beginTime, String endTime) throws Exception; public void changeStsTo2(String mainId) throws Exception, RuntimeException; /** * 同意-修改工单状态 * * @param orderId * @throws Exception * @throws RuntimeException */ public void changeStsToAgreen(String mainId) throws Exception, RuntimeException; /** * 不同意-修改工单状态 * * @param orderId * @throws Exception * @throws RuntimeException */ public void changeStsToNo(String mainId, String choice) throws Exception, RuntimeException; /** * 该表工单状态 * * @param orderId * @param state * @throws Exception * @throws RuntimeException */ public void changeStsTo(String mainId, String state) throws Exception, RuntimeException; }
[ "chendb@asiainfo.com" ]
chendb@asiainfo.com
e416dce49542251a4b76e4830fd2a56fd8844d99
3e096dc4bd4df011aadaf236831fb2f5ba2f31f9
/src/com/casic/datadriver/model/file/File.java
3688089d1d19a535d836b85ddc0f541eb42c5575
[]
no_license
hollykunge/newnewcosim
2a42d99e7337263df4d53e0fadf20cb6c6381362
dc3f86711a003f2608c75761792ea49c3da805d1
refs/heads/master
2020-03-29T09:15:05.705190
2019-07-22T08:48:09
2019-07-22T08:48:09
149,748,589
1
5
null
2019-07-22T08:48:10
2018-09-21T10:29:04
JavaScript
UTF-8
Java
false
false
1,336
java
package com.casic.datadriver.model.file; public class File { private Integer ddFileId; private String ddFileName; private String ddFileSvrname; private String ddFileDescription; private Integer ddFileType; private Integer ddFileKeyword; public Integer getDdFileId() { return ddFileId; } public void setDdFileId(Integer ddFileId) { this.ddFileId = ddFileId; } public String getDdFileName() { return ddFileName; } public void setDdFileName(String ddFileName) { this.ddFileName = ddFileName; } public String getDdFileSvrname() { return ddFileSvrname; } public void setDdFileSvrname(String ddFileSvrname) { this.ddFileSvrname = ddFileSvrname; } public String getDdFileDescription() { return ddFileDescription; } public void setDdFileDescription(String ddFileDescription) { this.ddFileDescription = ddFileDescription; } public Integer getDdFileType() { return ddFileType; } public void setDdFileType(Integer ddFileType) { this.ddFileType = ddFileType; } public Integer getDdFileKeyword() { return ddFileKeyword; } public void setDdFileKeyword(Integer ddFileKeyword) { this.ddFileKeyword = ddFileKeyword; } }
[ "hollykunge@163.com" ]
hollykunge@163.com
2670fe61ebed34ac077c5663a295912f8c9667aa
b6178780b1897aab7ee6b427020302622afbf7e4
/src/main/java/pokecube/core/items/loot/functions/MakeMegastone.java
21606da1e16497671f853edaf00a0509f61afac6
[ "MIT" ]
permissive
Pokecube-Development/Pokecube-Core
ea9a22599fae9016f8277a30aee67a913b50d790
1343c86dcb60b72e369a06dd7f63c05103e2ab53
refs/heads/master
2020-03-26T20:59:36.089351
2020-01-20T19:00:53
2020-01-20T19:00:53
145,359,759
5
0
MIT
2019-06-08T22:58:58
2018-08-20T03:07:37
Java
UTF-8
Java
false
false
2,887
java
package pokecube.core.items.loot.functions; import java.util.Map; import java.util.Random; import java.util.logging.Level; import com.google.common.collect.Maps; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject; import com.google.gson.JsonSerializationContext; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraft.world.storage.loot.LootContext; import net.minecraft.world.storage.loot.conditions.LootCondition; import net.minecraft.world.storage.loot.functions.LootFunction; import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder; import pokecube.core.handlers.ItemGenerator; import pokecube.core.interfaces.PokecubeMod; public class MakeMegastone extends LootFunction { @ObjectHolder(value = "pokecube:megastone") public static final Item ITEM = null; private static final Map<String, Integer> nameMap = Maps.newHashMap(); final String arg; protected MakeMegastone(LootCondition[] conditionsIn, String arg) { super(conditionsIn); this.arg = arg; } @Override public ItemStack apply(ItemStack stack, Random rand, LootContext context) { if (ITEM == null) { PokecubeMod.log(Level.SEVERE, "No Megastone Item Registered?"); return stack; } if (nameMap.isEmpty()) { for (int i = 0; i < ItemGenerator.variants.size(); i++) { nameMap.put(ItemGenerator.variants.get(i), i); } } if (nameMap.containsKey(arg)) { ItemStack newStack = new ItemStack(ITEM, stack.getCount(), nameMap.get(arg)); newStack.setTagCompound(stack.getTagCompound()); return newStack; } else { PokecubeMod.log(Level.SEVERE, "Error making megastone for " + arg); } return stack; } public static class Serializer extends LootFunction.Serializer<MakeMegastone> { public Serializer() { super(new ResourceLocation("pokecube_megastone"), MakeMegastone.class); } @Override public void serialize(JsonObject object, MakeMegastone functionClazz, JsonSerializationContext serializationContext) { object.addProperty("type", functionClazz.arg); } @Override public MakeMegastone deserialize(JsonObject object, JsonDeserializationContext deserializationContext, LootCondition[] conditionsIn) { String arg = object.get("type").getAsString(); return new MakeMegastone(conditionsIn, arg); } } }
[ "elpatricimo@gmail.com" ]
elpatricimo@gmail.com
f58d8d99aa168207de3f5256c85eee8244fb7c8e
ebb8ccce2aacbde17e1b23ae87dca05564bd3f44
/app/src/main/java/com/example/liuwen/end_reader/Action/SearchBookAction.java
ebd2588c48ed1c76153710ded888353dafe61c74
[]
no_license
liuwen370494581/End_Reader
385d4ddb1489e51afe2c0f2309ea0483448a5232
29b8c602978887b6612ccbe26a3d9cb445146f40
refs/heads/master
2020-03-25T13:45:19.935788
2018-09-30T05:55:02
2018-09-30T05:55:02
143,835,942
0
0
null
null
null
null
UTF-8
Java
false
false
2,297
java
package com.example.liuwen.end_reader.Action; import com.example.liuwen.end_reader.Bean.Dish; import java.util.ArrayList; import java.util.List; /** * author : liuwen * e-mail : liuwen370494581@163.com * time : 2018/09/07 14:44 * desc :搜索书籍的数据类 全部封装在此 */ public class SearchBookAction { public static List<Dish> getReflashData() { List<Dish> list = new ArrayList<>(); list.add(new Dish("黑暗王者")); list.add(new Dish("顶级老公,太嚣张")); list.add(new Dish("网游之神级机械猎人")); list.add(new Dish("爆笑宠妃:爷我等你休妻")); list.add(new Dish("司马懿吃三国")); list.add(new Dish("总裁大人你轻点")); return list; } public static List<Dish> getReflashData_2() { List<Dish> list = new ArrayList<>(); list.add(new Dish("银河帝国")); list.add(new Dish("大主宰")); list.add(new Dish("军婚缠绵:大总裁,小甜心")); list.add(new Dish("阴阳先生")); list.add(new Dish("帝豪老公太狂热")); list.add(new Dish("踏天无痕")); return list; } public static List<Dish> getReflashData_3() { List<Dish> list = new ArrayList<>(); list.add(new Dish("豪门天价前妻")); list.add(new Dish("斗罗大陆")); list.add(new Dish("锦绣清宫:四爷的心尖宠妃")); list.add(new Dish("龙血武神")); list.add(new Dish("随声英雄杀")); list.add(new Dish("铁血宏图")); return list; } public static String getRandomColor() { List<String> colorList = new ArrayList<String>(); colorList.add("#303F9F"); colorList.add("#FF4081"); colorList.add("#59dbe0"); colorList.add("#f57f68"); colorList.add("#87d288"); colorList.add("#f8b552"); colorList.add("#990099"); colorList.add("#90a4ae"); colorList.add("#7baaf7"); colorList.add("#4dd0e1"); colorList.add("#4db6ac"); colorList.add("#aed581"); colorList.add("#f2a600"); colorList.add("#ff8a65"); colorList.add("#f48fb1"); return colorList.get((int) (Math.random() * colorList.size())); } }
[ "370494581@qq.com" ]
370494581@qq.com
ee604aabf42535a71ad4bc2b9d007dafc03212ef
9b32926df2e61d54bd5939d624ec7708044cb97f
/src/main/java/com/rocket/summer/framework/core/annotation/Qualifier.java
6983af86e81ead4a398c945ad15fa59ec8ce5917
[]
no_license
goder037/summer
d521c0b15c55692f9fd8ba2c0079bfb2331ef722
6b51014e9a3e3d85fb48899aa3898812826378d5
refs/heads/master
2022-10-08T12:23:58.088119
2019-11-19T07:58:13
2019-11-19T07:58:13
89,110,409
1
0
null
null
null
null
UTF-8
Java
false
false
599
java
package com.rocket.summer.framework.core.annotation; import java.lang.annotation.*; /** * This annotation may be used on a field or parameter as a qualifier for * candidate beans when autowiring. It may also be used to annotate other * custom annotations that can then in turn be used as qualifiers. * * @author Mark Fisher * @author Juergen Hoeller * @since 2.5 */ @Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE, ElementType.ANNOTATION_TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited @Documented public @interface Qualifier { String value() default ""; }
[ "liujie152@hotmail.com" ]
liujie152@hotmail.com
40b3f60505b89657cd3e33f4be98e8868430a223
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_4946815dc0b00ab9806b011c57c955b77dfbde07/CommandLineMessages/9_4946815dc0b00ab9806b011c57c955b77dfbde07_CommandLineMessages_t.java
af640deb937736a1eb704d4992a42f0ac128ee43
[]
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
571
java
package aQute.lib.getopt; import java.util.*; import aQute.service.reporter.*; public interface CommandLineMessages extends Messages { ERROR Option__WithArgumentNotLastInAbbreviation_(String name, char charAt, String typeDescriptor); ERROR MissingArgument__(String name, char charAt); ERROR OptionCanOnlyOccurOnce_(String name); ERROR NoSuchCommand_(String cmd); ERROR TooManyArguments_(List<String> arguments); ERROR MissingArgument_(String string); ERROR UnrecognizedOption_(String name); ERROR OptionNotSet_(String name); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ddd651670fc5741760befe71fc01ff1ef0b99862
a12962dda3ab01d5bb40472c74a6f132b96cdc41
/smarthome_wl_simplify--/src/main/java/com/fbee/smarthome_wl/adapter/EquesArlarmAdapter.java
675396cb3ed0377c93b77ef988b1159ce3ac1b00
[]
no_license
sengeiou/smarthome_wl_master1
bfc6c0447e252074f52eec71f09711f1258e8d5f
f69359df5e38d9283741621f82f5f17ae0b58c86
refs/heads/master
2021-10-10T02:13:34.351874
2019-01-06T12:51:56
2019-01-06T12:51:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,105
java
package com.fbee.smarthome_wl.adapter; import android.content.Context; import android.net.Uri; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.CheckBox; import android.widget.ImageView; import android.widget.TextView; import com.fbee.smarthome_wl.R; import com.fbee.smarthome_wl.bean.EquesAlarmInfo; import com.fbee.smarthome_wl.bean.SeleteEquesDeviceInfo; import com.fbee.smarthome_wl.utils.ImageLoader; import java.net.URL; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.List; /** * Created by WLPC on 2016/12/14. */ public class EquesArlarmAdapter extends BaseAdapter { private final List<EquesAlarmInfo.AlarmsEntity> alarms; private final List<SeleteEquesDeviceInfo> seletes; private boolean b; private List<URL> urls; private String devName; private HashMap<Integer, Boolean> isSelected; public int isCheckBoxVisiable; public static final int CHECKBOX_GONE = 2; private Context context; public EquesArlarmAdapter(Context context, String devName, List<EquesAlarmInfo.AlarmsEntity> alarms, List<SeleteEquesDeviceInfo> seletes, boolean b, List<URL> urls) { isSelectedMap = new HashMap<Integer, Boolean>(); this.b = b; this.seletes = seletes; this.alarms = alarms; this.context = context; this.devName = devName; this.urls = urls; } public void setB(boolean b) { this.b = b; } public void addAllData(List<EquesAlarmInfo.AlarmsEntity> alarms) { isSelectedMap = null; this.alarms.addAll(alarms); notifyDataSetChanged(); } private HashMap<Integer, Boolean> isSelectedMap; public boolean getisSelectedAt(int position) { //如果当前位置的key值为空,则表示该item未被选择过,返回false,否则返回true if (isSelectedMap.get(position) != null) { return isSelectedMap.get(position); } return false; } public void setItemisSelectedMap(int position, boolean isSelectedMap) { this.isSelectedMap.put(position, isSelectedMap); notifyDataSetChanged(); } @Override public int getCount() { return (alarms == null) ? 0 : alarms.size(); } @Override public Object getItem(int position) { return alarms.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(final int position, View convertView, ViewGroup parent) { EquesArlarmAdapter.ViewHolder holder = null; if (convertView == null) { convertView = LayoutInflater.from(parent.getContext()).inflate( R.layout.item_eques_visitor_list, null); holder = new EquesArlarmAdapter.ViewHolder(); holder.iv = (ImageView) convertView.findViewById(R.id.iv); holder.title = (TextView) convertView.findViewById(R.id.title); holder.summary = (TextView) convertView.findViewById(R.id.summary); holder.checkBox = (CheckBox) convertView.findViewById(R.id.checkBox); convertView.setTag(holder); } else { holder = (EquesArlarmAdapter.ViewHolder) convertView.getTag(); } if (b) { isCheckBoxVisiable = CheckBox.VISIBLE; } else { isCheckBoxVisiable = View.GONE; } holder.checkBox.setVisibility(isCheckBoxVisiable); SimpleDateFormat formatter = new SimpleDateFormat( "yyyy年MM月dd日 HH:mm:ss"); EquesAlarmInfo.AlarmsEntity alarmsEntity = alarms.get(position); if (alarmsEntity != null) { Date curDate = new Date((alarmsEntity.getCreate() == 0) ? alarmsEntity.getTime() : alarmsEntity.getCreate());// 获取当前时间 String str = formatter.format(curDate); holder.summary.setText(str); int tag = alarmsEntity.getType(); if (tag == 3) { holder.title.setText(devName + "猫眼单拍"); } else if (tag == 4) { holder.title.setText(devName + "猫眼多拍"); } else if (tag == 5) { holder.title.setText(devName + "猫眼视频"); } } ImageLoader.load(Uri.parse(urls.get(position).toString()), holder.iv, R.mipmap.item_visitor, R.mipmap.item_visitor); holder.checkBox.setChecked(getisSelectedAt(position)); // holder.iv.setImageBitmap(bitmaps.get(position)); // final int myposition = position; // holder.checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { // @Override // public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { // if(!buttonView.isPressed())return; // onItemCheckedChangedListener.onItemCheckedChanged(buttonView, myposition, isChecked); // } // }); // if(isCheckBoxVisiable==CHECKBOX_GONE){ // holder.checkBox.setVisibility(View.GONE); // }else if(isCheckBoxVisiable==CHECKBOX_VISIBLE){ // holder.checkBox.setVisibility(View.VISIBLE); // holder.checkBox.setChecked(isSelected.get(position)); // // } return convertView; } // // public interface OnItemCheckedChanged { // public void onItemCheckedChanged(CompoundButton view, int position, boolean isChecked); // } // private OnItemCheckedChanged onItemCheckedChangedListener; // public void setOnItemCheckedChangedListener(OnItemCheckedChanged onItemCheckedChangedListener) { // this.onItemCheckedChangedListener = onItemCheckedChangedListener; // } public class ViewHolder { public ImageView iv; public TextView title; public TextView summary; public CheckBox checkBox; } }
[ "418265421@qq.com" ]
418265421@qq.com
ac8c0b784d3b0a30575f5cfb05a65181898b7c98
5b18c2aa61fd21f819520f1b614425fd6bc73c71
/src/main/java/com/sinosoft/claimzy/util/BLGetMaxNo.java
05f2ea964d77eab86380297b32d55f580e21706f
[]
no_license
Akira-09/claim
471cc215fa77212099ca385e7628f3d69f83d6d8
6dd8a4d4eedb47098c09c2bf3f82502aa62220ad
refs/heads/master
2022-01-07T13:08:27.760474
2019-03-24T23:50:09
2019-03-24T23:50:09
null
0
0
null
null
null
null
GB18030
Java
false
false
1,821
java
package com.sinosoft.claimzy.util; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.Date; import com.sinosoft.utility.error.UserException; /** * 获得上传批次类 * @author yewenxiang * */ public class BLGetMaxNo { public String getMaxNo(String groupNo) throws UserException, Exception{ String strWhere = "1=1 "; BLPrpAgriMaxNo blAgriMaxNo = new BLPrpAgriMaxNo(); Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); String newdate = sdf.format(date); String batchNo=""; blAgriMaxNo.query(strWhere); String seirNo= blAgriMaxNo.getArr(0).getGroupNo(); String maxNo = blAgriMaxNo.getArr(0).getMaxNo(); String newmaxNo =""; DBPrpAgriMaxNo dbAgriMaxNo = new DBPrpAgriMaxNo(); PrpAgriMaxNoSchema schema = new PrpAgriMaxNoSchema(); if(!seirNo.substring(6,14).equals(newdate.substring(0,8))){ newmaxNo="00001"; seirNo=groupNo+newdate; dbAgriMaxNo.setGroupNo(seirNo); int num = Integer.parseInt(newmaxNo)+1; DecimalFormat dec = new DecimalFormat("00000"); String siralNo = dec.format(num); dbAgriMaxNo.setMaxNo(siralNo); blAgriMaxNo.setArr(schema); dbAgriMaxNo.update(maxNo); batchNo =seirNo+newmaxNo; }else{ seirNo=groupNo+newdate; dbAgriMaxNo.setGroupNo(seirNo); int num = Integer.parseInt(maxNo)+1; DecimalFormat dec = new DecimalFormat("00000"); String siralNo = dec.format(num); dbAgriMaxNo.setMaxNo(siralNo); blAgriMaxNo.setArr(schema); dbAgriMaxNo.update(maxNo); batchNo =seirNo+maxNo; } DBPrpAgriMaxUse dbAgriMaxUse = new DBPrpAgriMaxUse(); dbAgriMaxUse.setGroupNo(groupNo+newdate); dbAgriMaxUse.setMaxNo(maxNo); dbAgriMaxUse.insert(); return batchNo; } }
[ "26166405+vincentdk77@users.noreply.github.com" ]
26166405+vincentdk77@users.noreply.github.com
00d3cf2f8c9b134e114df07c7ea31922cf628123
8e44449fe51ea8afc88a6025c0199be4671a9bd1
/smartcontract/billing-contract/src/main/java/ru/leadersofdigitalsvo/billingcontract/BillContext.java
3ef086cdb4c9fd47e953eace385d208277987b00
[]
no_license
bukhmastov/leadersofdigitalsvo
7756f5f94b6b7d03efdad4106dbe76789c7918f2
3bac8928418f13852589da9261fbf7fbaf176031
refs/heads/master
2023-07-22T05:20:15.530476
2021-09-05T02:33:38
2021-09-05T02:33:38
402,870,453
0
0
null
null
null
null
UTF-8
Java
false
false
355
java
package ru.leadersofdigitalsvo.billingcontract; import org.hyperledger.fabric.contract.Context; import org.hyperledger.fabric.shim.ChaincodeStub; public class BillContext extends Context { public BillContext(ChaincodeStub stub) { super(stub); this.billList = new BillList(this); } public BillList billList; }
[ "bukhmastov-alex@ya.ru" ]
bukhmastov-alex@ya.ru
10cb0ce0e74c8cf72a17f9e70ae870ccb5f55098
77e2db8319e06e09e3e42ed73a48c21c9858d2ef
/studios/icvfx/pipeline-local/src/com/intelligentcreatures/pipeline/plugin/WtmCollection/v1_0_0/stages/NukeReadStage.java
2ef905dc309f48226403a8fbf43b22196323bc96
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
JimCallahan/Pipeline
8e47b6124d322bb063e54d3a99b3ab273e8f825e
948ea80b84e13de69f049210b63e1d58f7a8f9de
refs/heads/master
2021-01-10T18:37:22.859871
2015-10-26T21:05:21
2015-10-26T21:05:21
21,285,228
10
2
null
null
null
null
UTF-8
Java
false
false
4,751
java
// $Id: NukeReadStage.java,v 1.5 2008/03/23 05:09:58 jim Exp $ package com.intelligentcreatures.pipeline.plugin.WtmCollection.v1_0_0.stages; import com.intelligentcreatures.pipeline.plugin.WtmCollection.v1_0_0.*; import us.temerity.pipeline.*; import us.temerity.pipeline.builder.*; import us.temerity.pipeline.builder.BuilderInformation.StageInformation; import us.temerity.pipeline.stages.*; import java.util.*; /*------------------------------------------------------------------------------------------*/ /* N U K E R E A D S T A G E */ /*------------------------------------------------------------------------------------------*/ /** * Creates a node which uses the NukeRead action. */ public class NukeReadStage extends StandardStage { /*----------------------------------------------------------------------------------------*/ /* C O N S T R U C T O R */ /*----------------------------------------------------------------------------------------*/ /** * Construct a new stage. * * @param name * The name of the stage. * * @param desc * A description of what the stage should do. * * @param stageInfo * Class containing basic information shared among all stages. * * @param context * The {@link UtilContext} that this stage acts in. * * @param client * The instance of Master Manager that the stage performs all its actions in. * * @param nodeName * The name of the node that is to be created. * * @param imageName * The name of source image node. */ protected NukeReadStage ( String name, String desc, StageInformation stageInfo, UtilContext context, MasterMgrClient client, String nodeName, String imageName, PluginContext action ) throws PipelineException { super(name, desc, stageInfo, context, client, nodeName, "nk", null, action); addLink(new LinkMod(imageName, LinkPolicy.Dependency)); addSingleParamValue("ImageSource", imageName); } /** * Construct a new stage. * * @param stageInfo * Class containing basic information shared among all stages. * * @param context * The {@link UtilContext} that this stage acts in. * * @param client * The instance of Master Manager that the stage performs all its actions in. * * @param nodeName * The name of the node that is to be created. * * @param imageName * The name of source image node. */ public NukeReadStage ( StageInformation stageInfo, UtilContext context, MasterMgrClient client, String nodeName, String imageName ) throws PipelineException { this("NukeRead", "Creates a node which uses the NukeRead action.", stageInfo, context, client, nodeName, imageName, new PluginContext("NukeRead")); } /** * Construct a new stage. * * @param stageInfo * Class containing basic information shared among all stages. * * @param context * The {@link UtilContext} that this stage acts in. * * @param client * The instance of Master Manager that the stage performs all its actions in. * * @param nodeName * The name of the node that is to be created. * * @param imageName * The name of source image node. * * @param missingFrames * How to handle missing frames. */ public NukeReadStage ( StageInformation stageInfo, UtilContext context, MasterMgrClient client, String nodeName, String imageName, String missingFrames ) throws PipelineException { this(stageInfo, context, client, nodeName, imageName); if(missingFrames != null) addSingleParamValue("MissingFrames", missingFrames); } /*----------------------------------------------------------------------------------------*/ /* O V E R R I D E S */ /*----------------------------------------------------------------------------------------*/ /** * See {@link BaseStage#getStageFunction()} */ @Override public String getStageFunction() { return ICStageFunction.aNukeScript; } /*----------------------------------------------------------------------------------------*/ /* S T A T I C I N T E R N A L S */ /*----------------------------------------------------------------------------------------*/ private static final long serialVersionUID = 7286056856278936588L; }
[ "jim@temerity.us" ]
jim@temerity.us
2c58fffd05e8693dd9ea16af1106a3b10a792034
949c9d796c6779418d1b13c730a0acc3c22a7be0
/src/oasis/names/specification/ubl/schema/xsd/commonbasiccomponents_2/InsuranceValueAmountType.java
45a3af0f029f45f60cbedc234553241faa7b2e24
[]
no_license
gvilauy/XpandeDIAN
2c649a397e7423bffcbe5efc68824a4ee207eb3a
e27966b3b668ba2f3d4b89920e448aeebe3a3dbb
refs/heads/master
2023-04-02T09:35:04.702985
2021-04-06T14:52:52
2021-04-06T14:52:52
333,752,128
0
0
null
null
null
null
UTF-8
Java
false
false
1,253
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2021.01.28 at 09:51:24 AM UYT // package oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import oasis.names.specification.ubl.schema.xsd.unqualifieddatatypes_2.AmountType; /** * <p>Java class for InsuranceValueAmountType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="InsuranceValueAmountType"> * &lt;simpleContent> * &lt;extension base="&lt;urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2>AmountType"> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "InsuranceValueAmountType") public class InsuranceValueAmountType extends AmountType { }
[ "gabrielvila13@gmail.com" ]
gabrielvila13@gmail.com
f6ff641050cfb28147b60edab80807450fe0e4db
aa63e6cc382dcd1603f4d4950c5da06f8c8815a4
/java7-fs-dropbox/src/main/java/com/github/fge/fs/dropbox/attr/DropboxBasicFileAttributes.java
7caa16f322b9b6522f4c99b84e83d43cf5f29d4b
[]
no_license
fge/java7-filesystems
d205fd20a21a917bf38ab28a862fd914700a6f6c
f54355190e5e1f565b3187eb59087d51c6346fbc
refs/heads/master
2023-03-28T19:11:08.489416
2015-12-19T17:25:26
2015-12-19T17:25:26
47,763,462
7
2
null
null
null
null
UTF-8
Java
false
false
1,092
java
package com.github.fge.fs.dropbox.attr; import com.dropbox.core.v2.DbxFiles; import com.github.fge.fs.api.attr.attributes.AbstractBasicFileAttributes; import java.nio.file.attribute.FileTime; import java.util.Date; public final class DropboxBasicFileAttributes extends AbstractBasicFileAttributes { private final DbxFiles.Metadata metadata; public DropboxBasicFileAttributes(final DbxFiles.Metadata metadata) { this.metadata = metadata; } @Override public boolean isRegularFile() { return metadata instanceof DbxFiles.FileMetadata; } @Override public boolean isDirectory() { return metadata instanceof DbxFiles.FolderMetadata; } @Override public long size() { return isDirectory() ? 0L : ((DbxFiles.FileMetadata) metadata).size; } @Override public FileTime lastModifiedTime() { if (isDirectory()) return EPOCH; final Date modified = ((DbxFiles.FileMetadata) metadata).serverModified; return FileTime.from(modified.toInstant()); } }
[ "fgaliegue@gmail.com" ]
fgaliegue@gmail.com
fd1b52bedefac04e9ae6500a4d7238a03fde4f1c
bb6cf94ffcea85bfb06f639f2c424e4ab5a24445
/BECE/rcm-rest_gf/src/main/java/com/yk/rcm/pre/service/impl/PreMeetingInfoService.java
b0969b1dfad3bff84b2a63d6e32658c0b5a8a6b5
[]
no_license
wuguosong/riskcontrol
4c0ef81763f45e87b1782e61ea45a13006ddde95
d7a54a352f8aea0e00533d76954247a9143ae56d
refs/heads/master
2022-12-18T03:12:52.449005
2020-03-10T15:38:39
2020-03-10T15:38:39
246,329,490
0
0
null
2022-12-16T05:02:28
2020-03-10T14:53:15
JavaScript
UTF-8
Java
false
false
4,842
java
package com.yk.rcm.pre.service.impl; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.bson.Document; import org.bson.types.ObjectId; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import util.ThreadLocalUtil; import util.Util; import com.mongodb.BasicDBObject; import com.yk.common.IBaseMongo; import com.yk.rcm.formalAssessment.dao.IFormalAssessmentInfoMapper; import com.yk.rcm.pre.dao.IPreMeetingInfoMapper; import com.yk.rcm.pre.service.IPreMeetingInfoService; import common.Constants; import common.PageAssistant; /** * 投标评审参会信息service * @author shaosimin */ @Service @Transactional public class PreMeetingInfoService implements IPreMeetingInfoService { @Resource private IPreMeetingInfoMapper PreMeetingInfoMapper; @Resource private IBaseMongo baseMongo; @Override public void queryInformationList(PageAssistant page) { Map<String, Object> params = new HashMap<String, Object>(); params.put("page", page); if(!ThreadLocalUtil.getIsAdmin()){ //管理员能看所有的 params.put("createBy", ThreadLocalUtil.getUserId()); } if(page.getParamMap() != null){ params.putAll(page.getParamMap()); } List<Map<String, Object>> list = this.PreMeetingInfoMapper.queryInformationList(params); page.setList(list); } @Override public void queryInformationListed(PageAssistant page) { Map<String, Object> params = new HashMap<String, Object>(); params.put("page", page); if(!ThreadLocalUtil.getIsAdmin()){ //管理员能看所有的 params.put("createBy", ThreadLocalUtil.getUserId()); } if(page.getParamMap() != null){ params.putAll(page.getParamMap()); } List<Map<String, Object>> list = this.PreMeetingInfoMapper.queryInformationListed(params); page.setList(list); } @Override public void addMeetingInfo(String json) { Document pfr = Document.parse(json); Document meeting = new Document(); Map<String, Object> meetingInfo = new HashMap<String, Object>(); //修改oracle的stage状态 Map<String, Object> map = new HashMap<String, Object>(); map.put("stage", "3.5"); map.put("need_meeting", "1"); map.put("metting_commit_time", Util.getTime()); map.put("businessId", pfr.getString("_id")); this.PreMeetingInfoMapper.updateStage(map); //参会信息保存到mongo投标评审apply下 Document apply = (Document) pfr.get("apply"); String projectName = apply.getString("projectName"); meeting.put("projectName", projectName); meeting.put("user_id", ThreadLocalUtil.getUserId()); meeting.put("serviceType", apply.get("serviceType")); meeting.put("isUrgent", pfr.get("isUrgent")); meeting.put("projectRating", pfr.get("projectRating")); meeting.put("projectType1", pfr.get("projectType1")); meeting.put("projectType2", pfr.get("projectType2")); meeting.put("projectType3", pfr.get("projectType3")); meeting.put("ratingReason", pfr.get("ratingReason")); meeting.put("participantMode", pfr.get("participantMode")); meeting.put("division", pfr.get("division")); meeting.put("investment", pfr.get("investment")); meeting.put("agenda", pfr.get("agenda")); meeting.put("contacts", pfr.get("contacts")); meeting.put("telephone", pfr.get("telephone")); meeting.put("create_date", Util.getTime()); meetingInfo.put("meetingInfo", meeting); String id = pfr.getString("_id"); meetingInfo.put("_id",new ObjectId(id)); this.baseMongo.updateSetByObjectId(id, meetingInfo, Constants.RCM_PRE_INFO); } @Override public Map<String, Object> queryMeetingInfoById(String id) { Map<String, Object> queryByCondition = baseMongo.queryById(id, Constants.RCM_PRE_INFO); return queryByCondition; } @Override public void updateStageById(String businessId, String stage,String need_meeting) { Map<String, Object> map = new HashMap<String, Object>(); String[] businessIdArr = businessId.split(","); for (String id : businessIdArr) { map.put("businessId", id); map.put("stage", "9"); map.put("need_meeting", "0"); map.put("metting_commit_time", Util.getTime()); this.PreMeetingInfoMapper.updateStage(map); } } @Override public PageAssistant queryNotMeetingList(PageAssistant page) { Map<String, Object> params = new HashMap<String, Object>(); params.put("page", page); if(!ThreadLocalUtil.getIsAdmin()){ //管理员能看所有的 params.put("createBy", ThreadLocalUtil.getUserId()); } if(page.getParamMap() != null){ params.putAll(page.getParamMap()); } String orderBy = page.getOrderBy(); if(orderBy == null){ orderBy = " notice_create_time desc "; } params.put("orderBy", orderBy); List<Map<String,Object>> list = this.PreMeetingInfoMapper.queryNotMeetingList(params); page.setList(list); return page; } }
[ "493473498@qq.com" ]
493473498@qq.com
ec60880185c77d76e312dc8bf969c54bb385da8b
005553bcc8991ccf055f15dcbee3c80926613b7f
/generated/com/guidewire/_generated/typekey/ValidationLevelInternalAccess.java
8c33e5f5d2fa208db880ad482ee4be081497edad
[]
no_license
azanaera/toggle-isbtf
5f14209cd87b98c123fad9af060efbbee1640043
faf991ec3db2fd1d126bc9b6be1422b819f6cdc8
refs/heads/master
2023-01-06T22:20:03.493096
2020-11-16T07:04:56
2020-11-16T07:04:56
313,212,938
0
0
null
2020-11-16T08:48:41
2020-11-16T06:42:23
null
UTF-8
Java
false
false
716
java
package com.guidewire._generated.typekey; @javax.annotation.processing.Generated(value = "com.guidewire.pl.metadata.codegen.Codegen", comments = "ValidationLevel.eti;ValidationLevel.eix;ValidationLevel.etx") @java.lang.SuppressWarnings(value = {"deprecation", "unchecked"}) public class ValidationLevelInternalAccess { public static final com.guidewire.pl.system.internal.FriendAccessor<com.guidewire.pl.persistence.code.TypeKeyFriendAccess<typekey.ValidationLevel>> FRIEND_ACCESSOR = new com.guidewire.pl.system.internal.FriendAccessor<com.guidewire.pl.persistence.code.TypeKeyFriendAccess<typekey.ValidationLevel>>(typekey.ValidationLevel.class); private ValidationLevelInternalAccess() { } }
[ "azanaera691@gmail.com" ]
azanaera691@gmail.com
f3f90268ecbad4b269664217614877879f1b6ca2
8f6007d3687bb5596fe0b3941b3374213ed68293
/pizzahut/pizzahutstorefront/web/testsrc/com/pizzahutstore/storefront/controllers/cms/PurchasedCategorySuggestionComponentControllerTest.java
d82729b37344d2926c48becb5eb7aabf773ddb97
[]
no_license
vamshivushakola/Pizzahut
6ccc763ca6381c7b7c59b2f808d6c4f64b324c08
b3e226a94e9bc04316c8ea812e32444287729d73
refs/heads/master
2021-01-20T20:18:12.137312
2016-06-14T12:19:08
2016-06-14T12:19:08
61,121,176
0
0
null
null
null
null
UTF-8
Java
false
false
7,669
java
/* * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package com.pizzahutstore.storefront.controllers.cms; import de.hybris.bootstrap.annotations.UnitTest; import de.hybris.platform.acceleratorcms.model.components.PurchasedCategorySuggestionComponentModel; import de.hybris.platform.acceleratorcms.model.components.SimpleSuggestionComponentModel; import de.hybris.platform.catalog.enums.ProductReferenceTypeEnum; import de.hybris.platform.category.model.CategoryModel; import de.hybris.platform.cms2.exceptions.CMSItemNotFoundException; import de.hybris.platform.cms2.servicelayer.services.impl.DefaultCMSComponentService; import de.hybris.platform.commercefacades.product.data.ProductData; import com.pizzahutstore.facades.suggestion.SimpleSuggestionFacade; import com.pizzahutstore.storefront.controllers.ControllerConstants; import de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController; import java.util.Arrays; import java.util.Collections; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.ui.Model; import junit.framework.Assert; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.verify; /** * Unit test for {@link PurchasedCategorySuggestionComponentController} */ @UnitTest public class PurchasedCategorySuggestionComponentControllerTest { private static final String COMPONENT_UID = "componentUid"; private static final String TEST_COMPONENT_UID = "componentUID"; private static final String TEST_TYPE_CODE = SimpleSuggestionComponentModel._TYPECODE; private static final String TEST_TYPE_VIEW = ControllerConstants.Views.Cms.ComponentPrefix + StringUtils.lowerCase(TEST_TYPE_CODE); private static final String TITLE = "title"; private static final String TITLE_VALUE = "Accessories"; private static final String SUGGESTIONS = "suggestions"; private static final String COMPONENT = "component"; private static final String CATEGORY_CODE = "CategoryCode"; private PurchasedCategorySuggestionComponentController purchasedCategorySuggestionComponentController; @Mock private PurchasedCategorySuggestionComponentModel purchasedCategorySuggestionComponentModel; @Mock private Model model; @Mock private DefaultCMSComponentService cmsComponentService; @Mock private SimpleSuggestionFacade simpleSuggestionFacade; @Mock private HttpServletRequest request; @Mock private HttpServletResponse response; @Mock private ProductData productData; @Mock private CategoryModel categoryModel; private final List<ProductData> productDataList = Collections.singletonList(productData); @Before public void setUp() { MockitoAnnotations.initMocks(this); purchasedCategorySuggestionComponentController = new PurchasedCategorySuggestionComponentController(); purchasedCategorySuggestionComponentController.setCmsComponentService(cmsComponentService); ReflectionTestUtils .setField(purchasedCategorySuggestionComponentController, "simpleSuggestionFacade", simpleSuggestionFacade); } @Test public void testRenderComponent() throws Exception { given(purchasedCategorySuggestionComponentModel.getMaximumNumberProducts()).willReturn(Integer.valueOf(1)); given(purchasedCategorySuggestionComponentModel.getTitle()).willReturn(TITLE_VALUE); given(purchasedCategorySuggestionComponentModel.getProductReferenceTypes()).willReturn( Arrays.asList(ProductReferenceTypeEnum.ACCESSORIES)); given(purchasedCategorySuggestionComponentModel.getCategory()).willReturn(categoryModel); given(categoryModel.getCode()).willReturn(CATEGORY_CODE); given(Boolean.valueOf(purchasedCategorySuggestionComponentModel.isFilterPurchased())).willReturn(Boolean.TRUE); given(simpleSuggestionFacade.getReferencesForPurchasedInCategory(Mockito.anyString(), Mockito.anyList(), Mockito.anyBoolean(), Mockito.<Integer> any())).willReturn(productDataList); final String viewName = purchasedCategorySuggestionComponentController.handleComponent(request, response, model, purchasedCategorySuggestionComponentModel); verify(model, Mockito.times(1)).addAttribute(TITLE, TITLE_VALUE); verify(model, Mockito.times(1)).addAttribute(SUGGESTIONS, productDataList); Assert.assertEquals(TEST_TYPE_VIEW, viewName); } @Test public void testRenderComponentUid() throws Exception { given(request.getAttribute(COMPONENT_UID)).willReturn(TEST_COMPONENT_UID); given(cmsComponentService.getAbstractCMSComponent(TEST_COMPONENT_UID)).willReturn(purchasedCategorySuggestionComponentModel); given(purchasedCategorySuggestionComponentModel.getMaximumNumberProducts()).willReturn(Integer.valueOf(1)); given(purchasedCategorySuggestionComponentModel.getTitle()).willReturn(TITLE_VALUE); given(purchasedCategorySuggestionComponentModel.getProductReferenceTypes()).willReturn( Arrays.asList(ProductReferenceTypeEnum.ACCESSORIES)); given(purchasedCategorySuggestionComponentModel.getCategory()).willReturn(categoryModel); given(categoryModel.getCode()).willReturn(CATEGORY_CODE); given(Boolean.valueOf(purchasedCategorySuggestionComponentModel.isFilterPurchased())).willReturn(Boolean.TRUE); given(simpleSuggestionFacade.getReferencesForPurchasedInCategory(Mockito.anyString(), Mockito.anyList(), Mockito.anyBoolean(), Mockito.<Integer> any())).willReturn(productDataList); final String viewName = purchasedCategorySuggestionComponentController.handleGet(request, response, model); verify(model, Mockito.times(1)).addAttribute(COMPONENT, purchasedCategorySuggestionComponentModel); verify(model, Mockito.times(1)).addAttribute(TITLE, TITLE_VALUE); verify(model, Mockito.times(1)).addAttribute(SUGGESTIONS, productDataList); Assert.assertEquals(TEST_TYPE_VIEW, viewName); } @Test(expected = AbstractPageController.HttpNotFoundException.class) public void testRenderComponentNotFound() throws Exception { given(request.getAttribute(COMPONENT_UID)).willReturn(null); given(request.getParameter(COMPONENT_UID)).willReturn(null); purchasedCategorySuggestionComponentController.handleGet(request, response, model); } @Test(expected = AbstractPageController.HttpNotFoundException.class) public void testRenderComponentNotFound2() throws Exception { given(request.getAttribute(COMPONENT_UID)).willReturn(null); given(request.getParameter(COMPONENT_UID)).willReturn(TEST_COMPONENT_UID); given(cmsComponentService.getSimpleCMSComponent(TEST_COMPONENT_UID)).willReturn(null); purchasedCategorySuggestionComponentController.handleGet(request, response, model); } @Test(expected = AbstractPageController.HttpNotFoundException.class) public void testRenderComponentNotFound3() throws Exception { given(request.getAttribute(COMPONENT_UID)).willReturn(TEST_COMPONENT_UID); given(cmsComponentService.getSimpleCMSComponent(TEST_COMPONENT_UID)).willReturn(null); given(cmsComponentService.getSimpleCMSComponent(TEST_COMPONENT_UID)).willThrow(new CMSItemNotFoundException("")); purchasedCategorySuggestionComponentController.handleGet(request, response, model); } }
[ "vamshi.vushakola@gmail.com" ]
vamshi.vushakola@gmail.com
d79cd640c370e45547675bb45cee8d89184e0b5f
609f726c4360957d1332b38896cf3fab8c1ba5de
/oxUtil/src/main/java/org/gluu/util/Triple.java
9238c314999ebf0a5190a43825323fe661bd9277
[ "MIT" ]
permissive
GluuFederation/oxCore
f2a3749710a61c0471c9347e04d85121deb9537e
918ea9cbf7ad7d4a4a9d88108ef0c2f36cbcf733
refs/heads/master
2023-08-08T00:36:31.395698
2023-07-17T19:58:42
2023-07-17T19:58:42
18,150,075
15
16
MIT
2023-07-18T18:22:14
2014-03-26T19:00:16
Java
UTF-8
Java
false
false
2,116
java
/* * oxCore is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. * * Copyright (c) 2014, Gluu */ package org.gluu.util; /** * @author Yuriy Zabrovarnyy * @version 0.9, 26/11/2012 */ public class Triple<A, B, C> { private A first; private B second; private C third; public Triple() { } public Triple(A first, B second, C third) { this.first = first; this.second = second; this.third = third; } public A getFirst() { return first; } public void setFirst(A first) { this.first = first; } public B getSecond() { return second; } public void setSecond(B second) { this.second = second; } public C getThird() { return third; } public void setThird(C third) { this.third = third; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Triple triple = (Triple) o; if (first != null ? !first.equals(triple.first) : triple.first != null) { return false; } if (second != null ? !second.equals(triple.second) : triple.second != null) { return false; } if (third != null ? !third.equals(triple.third) : triple.third != null) { return false; } return true; } @Override public int hashCode() { int result = first != null ? first.hashCode() : 0; result = 31 * result + (second != null ? second.hashCode() : 0); result = 31 * result + (third != null ? third.hashCode() : 0); return result; } @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("Triple"); sb.append("{first=").append(first); sb.append(", second=").append(second); sb.append(", third=").append(third); sb.append('}'); return sb.toString(); } }
[ "Yuriy.Movchan@gmail.com" ]
Yuriy.Movchan@gmail.com
9e5695eeccf619eca1f4d666b3587a844879de2c
67d8a47036fb3e7a788dab265f1e63f6ec453ba3
/src/main/java/botmanager/bots/suggestionbox/commands/ReactionManagerCommand.java
99718602ed4f051ff4f9ff07a106e28e87b622c0
[]
no_license
phammalex/BotManager
d4793b5897c56aab4a1942ee28f8791505d5e61e
ad6c17b3d13b46205b770d9bfd47d85281766308
refs/heads/master
2022-12-25T00:28:42.912926
2020-10-11T17:31:32
2020-10-11T17:31:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,897
java
package botmanager.bots.suggestionbox.commands; import botmanager.bots.suggestionbox.SuggestionBox; import botmanager.bots.suggestionbox.generic.SuggestionBoxCommandBase; import net.dv8tion.jda.api.entities.Message; import net.dv8tion.jda.api.events.Event; import net.dv8tion.jda.api.events.message.guild.react.GuildMessageReactionAddEvent; /** * * @author MC_2018 <mc2018.git@gmail.com> */ public class ReactionManagerCommand extends SuggestionBoxCommandBase { public ReactionManagerCommand(SuggestionBox bot) { super(bot); } @Override public void run(Event genericEvent) { GuildMessageReactionAddEvent event; Message message; String emoteName; if (!(genericEvent instanceof GuildMessageReactionAddEvent)) { return; } event = (GuildMessageReactionAddEvent) genericEvent; emoteName = event.getReactionEmote().getName(); if (!event.getChannel().getName().equalsIgnoreCase("user-suggestions") && !event.getChannel().getName().equalsIgnoreCase("emote-suggestions")) { return; } message = event.getChannel().retrieveMessageById(event.getMessageId()).complete(); String[] messageSplit = message.getContentRaw().split(" "); String potentialId = ""; if (messageSplit.length >= 3) { potentialId = messageSplit[2]; } if (potentialId.contains(event.getMember().getId())) { event.getReaction().removeReaction(event.getUser()).queue(); return; } if (emoteName.equalsIgnoreCase("upvote") || emoteName.equalsIgnoreCase("downvote")) { return; } event.getReaction().removeReaction(event.getUser()).queue(); } @Override public String info() { return null; } }
[ "=" ]
=
1bb0db4916da397aac9da1b8dfaa51fa2a54d624
8adc4e0536ebf07054ba0acdbf0b2c2b987c267a
/xmy/xmy-user-service/src/main/java/com/zfj/xmy/user/service/wap/impl/WapShoppingCardServiceImpl.java
ca064a127df04c4bc3c2ce2a9cd2652dafbcce90
[]
no_license
haifeiforwork/xmy
f53c9e5f8d345326e69780c9ae6d7cf44e951016
abcf424be427168f9a9dac12a04f5a46224211ab
refs/heads/master
2020-05-03T02:05:40.499935
2018-03-06T09:21:15
2018-03-06T09:21:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,032
java
package com.zfj.xmy.user.service.wap.impl; import java.math.BigDecimal; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.zfj.xmy.common.ReqData; import com.zfj.xmy.common.ReqUtil; import com.zfj.xmy.common.SystemConstant; import com.zfj.xmy.common.persistence.dao.ShoppingCardMapper; import com.zfj.xmy.common.persistence.pojo.ShoppingCard; import com.zfj.xmy.user.persistence.dao.ShoppingCartExMapper; import com.zfj.xmy.user.persistence.wap.dto.ShoppingCartOutDto; import com.zfj.xmy.user.service.wap.WapShoppingCardService; @Service public class WapShoppingCardServiceImpl implements WapShoppingCardService{ @Autowired private ShoppingCardMapper shoppingCardMapper; @Autowired private ShoppingCartExMapper shoppingCartExMapper; /** * 根据用户ID查询改用户所有绑定的购物卡 */ @Override public List<ShoppingCard> findShoppingCardByUserId(Long userId) { ReqData reqData = new ReqData(); reqData.putValue("user_id", userId, SystemConstant.REQ_PARAMETER_EQ); List<ShoppingCard> selectByExample = shoppingCardMapper.selectByExample(ReqUtil.reqParameterToCriteriaParameter(reqData)); return selectByExample; } /** * 修改 */ @Override public void updateShoppingCard(Long id, Integer type, BigDecimal money) { ShoppingCard oldCard = shoppingCardMapper.selectByPrimaryKey(id); if (type == SystemConstant.userSpendPoints.SPEND_TYPE_SAVE) {//存入余额 oldCard.setBalance(oldCard.getBalance().add(money));//+ userSpendPoints.getMoneyPoint()); } else { oldCard.setBalance(oldCard.getBalance().subtract(money));//- userSpendPoints.getMoneyPoint()); } shoppingCardMapper.updateByPrimaryKey(oldCard); } @Override public Integer findCountByUserId(Long userId) { List<ShoppingCartOutDto> findShoppingCartGoodsCount = shoppingCartExMapper.findShoppingCartGoodsCount(userId); return findShoppingCartGoodsCount.size(); } }
[ "359479295@qq.com" ]
359479295@qq.com
ad33d4d1729d86fe05d7b78129855beeb5a51f0d
ce2813f714d83602ee9b3b237c7304446ae741da
/src/LINTCODE11/LINTCODE1040.java
d28ac8cb62fbb2977b450c8e25278dbbffca831f
[]
no_license
tmhbatw/LINTCODEANSWER
bc54bb40a4826b0f9aa11aead4d99978a22e1ee8
7db879f075cde6e1b2fce86f6a3068e59f4e9b34
refs/heads/master
2021-12-13T16:38:05.780408
2021-10-09T16:50:59
2021-10-09T16:50:59
187,010,547
2
0
null
null
null
null
UTF-8
Java
false
false
836
java
package LINTCODE11; public class LINTCODE1040 { /*Description * 整数数组arr(存在相同元素),将其拆分成一些“块”(分区), * 并单独对每个块进行排序. 连接它们之后,结果为升序数组. * 可以划分最多多少块? * */ public int maxChunksToSorted(int[] arr) { int count=0; for(int i=0;i<arr.length;i++){ int max=Integer.MIN_VALUE; count++; while(true){ max=Math.max(max,arr[i]); int j=arr.length-1; for(;j>i;j--){ if(arr[j]<max) break; } if(i==j) break; i++; } } return count; // Write your code here } }
[ "1060226998@qq.com" ]
1060226998@qq.com
5a3bdcc98f74c854b414b74428abb5513dd0c3dd
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/63/org/apache/commons/math/linear/SingularValueDecompositionImpl_getNorm_243.java
8354c9d5bdb3d450fd55c0529150693c88bb8fba
[]
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
783
java
org apach common math linear calcul compact singular decomposit matrix singular decomposit matrix set matric sigma time sigma time time matrix time orthogon matrix sigma time diagon matrix posit element time orthogon matrix orthogon min version revis date singular decomposit impl singularvaluedecompositionimpl inherit doc inheritdoc norm getnorm invalid matrix except invalidmatrixexcept singular valu singularvalu
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
5a3d9ae76ea6eab8b5fb16e9c63de81919e84e32
a27ebf74ca6d60337ce4f451a2059fcedf29042d
/src/com/ssiot/remote/data/ControlController.java
f4586ec380dabd2866ee384eccb1abca59ca210e
[]
no_license
ldseop/jurong
04f2964314a0f093486bbaa85a719b439bf3db19
90024ce325c6ff551221b9deb025265e21c23b65
refs/heads/master
2021-01-19T22:43:35.454508
2016-01-18T04:48:31
2016-01-18T04:48:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,134
java
package com.ssiot.remote.data; import android.text.TextUtils; import android.util.Log; import com.ssiot.jurong.JuRongActivity; import com.ssiot.remote.data.business.ControlActionInfo; import com.ssiot.remote.data.business.ControlLog; import com.ssiot.remote.data.model.ControlActionInfoModel; import com.ssiot.remote.data.model.ControlLogModel; import java.sql.Timestamp; import java.util.List; public class ControlController{ private static final String tag = "ControlController"; ControlActionInfo controlActionInfoBll = new ControlActionInfo(); ControlLog controllogbll = new ControlLog(); public boolean SaveControlTimeUser(String timeCondition, String seldevice, String UniqueID, int controlType, String DeviceNos,String updateid){ if (TextUtils.isEmpty(timeCondition)){ Log.e(tag, "----SaveControlTimeUser!!!!----timeCondition = null"); return false; } ControlActionInfoModel controlActionInfo = new ControlActionInfoModel(); // object id = Session["ControlID"]; if (!TextUtils.isEmpty(updateid)){//更新 controlActionInfo = controlActionInfoBll.GetModel(Integer.parseInt(updateid)); controlActionInfo._areaid = GetNowAccountAreaID(); controlActionInfo._controlname = getControlTypeString(controlType); controlActionInfo._uniqueid = UniqueID; controlActionInfo._deviceno = Integer.parseInt(DeviceNos); controlActionInfo._controltype = controlType; controlActionInfo._controlcondition = timeCondition; controlActionInfo._operatetime = new Timestamp(System.currentTimeMillis()); controlActionInfo._statenow = 0; controlActionInfo._operate = "打开"; return updateControlActionInfoAndAddLog(controlActionInfo); } else {//添加 if (seldevice == null && DeviceNos != ""){ if (DeviceNos.endsWith(",")){ DeviceNos = DeviceNos.substring(0, DeviceNos.length()-1); } String[] nos = DeviceNos.split(","); for (String devicetmp : nos){ controlActionInfo._areaid = GetNowAccountAreaID(); controlActionInfo._controlname = getControlTypeString(controlType);// (string)Session["controlActionName"]; controlActionInfo._uniqueid = UniqueID; controlActionInfo._deviceno = Integer.parseInt(devicetmp); controlActionInfo._controltype = controlType; controlActionInfo._controlcondition = timeCondition; controlActionInfo._operatetime = new Timestamp(System.currentTimeMillis()); controlActionInfo._statenow = 0; controlActionInfo._operate = "打开"; if(false == addControlActionInfoAndAddLog(controlActionInfo)){ return false; } } return true; } } return false; } private boolean updateControlActionInfoAndAddLog(ControlActionInfoModel controlActionInfo){//ControlActionInfo表 ControlLog表 if (controlActionInfoBll.Update(controlActionInfo)) { List<ControlLogModel> controlLog_list = DataAPI.ConvertControlActionInfoToControlLog(controlActionInfo); try { int rtnCount = controllogbll.AddManyCount(controlLog_list); if (rtnCount == 0) { return false; } else { return true; } } catch (Exception e) { e.printStackTrace(); return false; } } else { return false; } } private boolean addControlActionInfoAndAddLog(ControlActionInfoModel controlActionInfo){//ControlActionInfo表 ControlLog表 if (controlActionInfoBll.Add(controlActionInfo) > 0) { List<ControlLogModel> controlLog_list = DataAPI.ConvertControlActionInfoToControlLog(controlActionInfo); try { int rtnCount = controllogbll.AddManyCount(controlLog_list); if (rtnCount == 0) { return false; } else { return true; } } catch (Exception e) { e.printStackTrace(); return false; } } else { return false; } } private String getControlTypeString (int controlType){ String names = ""; if (controlType == 1) { names = "立即开启"; } else if (controlType == 3) { names = "定时"; } else if (controlType == 5) { names = "循环"; } return names; } private int GetNowAccountAreaID(){ if (JuRongActivity.AreaID < 0){ Log.e(tag, "----!!!! MainActivity.AreaID < 0"); } return JuRongActivity.AreaID; } }
[ "gejingbo@163.com" ]
gejingbo@163.com
e2d18603702fb41f1811c1323e94f43e5db22791
f6e2cf5e64e1047d3f2f6f583845c63f31781959
/eurekaserver/src/main/java/com/yao/controller/HelloController.java
c8032029fbf891fda8f2ae8505aac1e1ad8c4636
[]
no_license
shanyao19940801/SpringCloudDemo
b0746d78cc5982070f896f30b821fdef0d9e03a7
a21fdf3b10b68fb14fa6d5ee38e41fea268bb6c0
refs/heads/master
2020-03-24T21:20:20.269867
2018-08-12T15:08:47
2018-08-12T15:08:47
143,026,532
0
0
null
null
null
null
UTF-8
Java
false
false
309
java
package com.yao.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloController { @RequestMapping("/") public String index() { return "Greetings from Spring boot"; } }
[ "sqshanyao@163.com" ]
sqshanyao@163.com
0c282ac5b16a21eb99b96f6e5e6aa3e1a8a84a05
66ef83660729980ca40171c591750ff8eb517a3d
/src/main/java/com/jayden/mall/controller/SmsHomeRecommendSubjectController.java
b891ec0d26247ee69b89d7e5fa06a6130c8b368c
[]
no_license
BruceLee12013/mall
b24bab18109fcbd715d9683d88b4f18742d1a957
8838a1f2a3a39c0f2cc089e392ece53e8695bea9
refs/heads/master
2023-01-18T16:46:46.619486
2020-11-11T09:37:49
2020-11-11T09:37:49
311,924,301
0
0
null
null
null
null
UTF-8
Java
false
false
3,172
java
package com.jayden.mall.controller; import com.jayden.mall.common.ApiRestResponse; import com.jayden.mall.exception.BusinessExceptionEnum; import com.jayden.mall.model.pojo.SmsHomeRecommendSubject; import com.jayden.mall.service.SmsHomeRecommendSubjectService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @Api(tags = "SmsHomeRecommendSubjectController", description = "首页专题推荐管理") @RequestMapping("/home/recommendSubject") public class SmsHomeRecommendSubjectController { @Autowired private SmsHomeRecommendSubjectService recommendSubjectService; @ApiOperation("添加首页推荐专题") @PostMapping("/create") public ApiRestResponse create(@RequestBody List<SmsHomeRecommendSubject> homeBrandList) { int count = recommendSubjectService.create(homeBrandList); if (count <= 0) { return ApiRestResponse.error(BusinessExceptionEnum.CREATE_FAILED); } return ApiRestResponse.success(); } @ApiOperation("修改推荐排序") @PostMapping("/update/sort/{id}") public ApiRestResponse updateSort(@PathVariable Long id, Integer sort) { int count = recommendSubjectService.updateSort(id, sort); if (count <= 0) { return ApiRestResponse.error(BusinessExceptionEnum.UPDATE_FAILED); } return ApiRestResponse.success(); } @ApiOperation("批量删除推荐") @PostMapping("/delete") public ApiRestResponse delete(@RequestParam("ids") List<Long> ids) { int count = recommendSubjectService.delete(ids); if (count <= 0) { return ApiRestResponse.error(BusinessExceptionEnum.DELETE_FAILED); } return ApiRestResponse.success(); } @ApiOperation("批量修改推荐状态") @PostMapping( "/update/recommendStatus") public ApiRestResponse updateRecommendStatus(@RequestParam("ids") List<Long> ids, @RequestParam Integer recommendStatus) { int count = recommendSubjectService.updateRecommendStatus(ids, recommendStatus); if (count <= 0) { return ApiRestResponse.error(BusinessExceptionEnum.UPDATE_FAILED); } return ApiRestResponse.success(); } @ApiOperation("分页查询推荐") @GetMapping("/list") public ApiRestResponse list(@RequestParam(value = "subjectName", required = false) String subjectName, @RequestParam(value = "recommendStatus", required = false) Integer recommendStatus, @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { List<SmsHomeRecommendSubject> homeBrandList = recommendSubjectService.list(subjectName, recommendStatus, pageSize, pageNum); return ApiRestResponse.success(homeBrandList); } }
[ "brucelee_123@163.com" ]
brucelee_123@163.com
462ab7b14bf4d6317ec4c3d0135498d55c4f532e
82bda3ed7dfe2ca722e90680fd396935c2b7a49d
/app-meipai/src/main/java/com/arashivision/onecamera/exception/StorageFileNotExistException.java
3659174ad26723ae0c7e1b874135ebaec2bb6f2c
[]
no_license
cvdnn/PanoramaApp
86f8cf36d285af08ba15fb32348423af7f0b7465
dd6bbe0987a46f0b4cfb90697b38f37f5ad47cfc
refs/heads/master
2023-03-03T11:15:40.350476
2021-01-29T09:14:06
2021-01-29T09:14:06
332,968,433
1
1
null
null
null
null
UTF-8
Java
false
false
199
java
package com.arashivision.onecamera.exception; public class StorageFileNotExistException extends CameraIOException { public StorageFileNotExistException(String str) { super(str); } }
[ "cvvdnn@gmail.com" ]
cvvdnn@gmail.com
8bd8956c67778719aff0cfe79b884676c627ce25
90556a9e7527c78c44d02ce9920e4fee47c61d01
/src/main/java/org/brapi/test/BrAPITestServer/serializer/CustomStringToEnumConverter.java
6434e5b6f3969536dbc503e8fce04087a1adf0c3
[ "MIT" ]
permissive
plantbreeding/brapi-Java-TestServer
0f6cddb58b645294fca586a4b6068b68ffd6b911
5b600ca0fd130add5591101d39c5afd9d7b1cb06
refs/heads/brapi-server-v2
2023-08-08T01:58:53.975315
2023-07-13T16:26:26
2023-07-13T16:26:26
109,435,642
5
7
MIT
2023-09-13T15:22:18
2017-11-03T19:35:24
Java
UTF-8
Java
false
false
494
java
package org.brapi.test.BrAPITestServer.serializer; import org.springframework.core.convert.converter.Converter; import io.swagger.model.WSMIMEDataTypes; public class CustomStringToEnumConverter implements Converter<String, WSMIMEDataTypes> { @Override public WSMIMEDataTypes convert(String source) { WSMIMEDataTypes dataType = WSMIMEDataTypes.fromValue(source); if (dataType == null) { dataType = WSMIMEDataTypes.valueOf(source); } return dataType; } }
[ "ps664@cornell.edu" ]
ps664@cornell.edu
f1bef67fa56a5864a85840735d782107e8b3661f
5ee94bb2987ce16eea872f4ad8e30427213382d5
/src/main/java/com/qy/test/service/AuditEventService.java
4fca78726a22ccf4c8fbf843b69fbeede4cf308c
[]
no_license
jiangzhixiao/jhipsterSampleApplication
302435560a29d83cd9bebe0d725229a40adf66b6
90383670776ca5d8e0269e24073a3db4dd23c652
refs/heads/master
2021-08-18T23:41:38.198239
2017-11-24T07:15:58
2017-11-24T07:15:58
111,887,958
0
0
null
null
null
null
UTF-8
Java
false
false
1,761
java
package com.qy.test.service; import com.qy.test.config.audit.AuditEventConverter; import com.qy.test.repository.PersistenceAuditEventRepository; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import java.util.Optional; /** * Service for managing audit events. * <p> * This is the default implementation to support SpringBoot Actuator AuditEventRepository */ @Service @Transactional public class AuditEventService { private final PersistenceAuditEventRepository persistenceAuditEventRepository; private final AuditEventConverter auditEventConverter; public AuditEventService( PersistenceAuditEventRepository persistenceAuditEventRepository, AuditEventConverter auditEventConverter) { this.persistenceAuditEventRepository = persistenceAuditEventRepository; this.auditEventConverter = auditEventConverter; } public Page<AuditEvent> findAll(Pageable pageable) { return persistenceAuditEventRepository.findAll(pageable) .map(auditEventConverter::convertToAuditEvent); } public Page<AuditEvent> findByDates(Instant fromDate, Instant toDate, Pageable pageable) { return persistenceAuditEventRepository.findAllByAuditEventDateBetween(fromDate, toDate, pageable) .map(auditEventConverter::convertToAuditEvent); } public Optional<AuditEvent> find(Long id) { return Optional.ofNullable(persistenceAuditEventRepository.findOne(id)).map (auditEventConverter::convertToAuditEvent); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
39aa7743a56fa15d270c07a15accc8d4d8d85fd3
516fb367430d4c1393f4cd726242618eca862bda
/sources/com/google/android/gms/internal/ads/zzbii.java
2294c8d9ed39fce1df182da7146c1706600ccdf4
[]
no_license
cmFodWx5YWRhdjEyMTA5/Gaana2
75d6d6788e2dac9302cff206a093870e1602921d
8531673a5615bd9183c9a0466325d0270b8a8895
refs/heads/master
2020-07-22T15:46:54.149313
2019-06-19T16:11:11
2019-06-19T16:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,279
java
package com.google.android.gms.internal.ads; import android.annotation.TargetApi; import android.webkit.WebView; import com.google.android.gms.common.util.PlatformVersion; import com.google.android.gms.common.util.VisibleForTesting; @zzark final class zzbii { @VisibleForTesting private static Boolean zzfbi; private zzbii() { } @TargetApi(19) private static boolean zzb(WebView webView) { boolean booleanValue; synchronized (zzbii.class) { if (zzfbi == null) { try { webView.evaluateJavascript("(function(){})()", null); zzfbi = Boolean.valueOf(true); } catch (IllegalStateException unused) { zzfbi = Boolean.valueOf(false); } } booleanValue = zzfbi.booleanValue(); } return booleanValue; } @TargetApi(19) static void zza(WebView webView, String str) { if (PlatformVersion.isAtLeastKitKat() && zzb(webView)) { webView.evaluateJavascript(str, null); return; } String str2 = "javascript:"; str = String.valueOf(str); webView.loadUrl(str.length() != 0 ? str2.concat(str) : new String(str2)); } }
[ "master@master.com" ]
master@master.com
ecdc0b326b4bfa6263027aec6e4147dc1aab7554
4abd603f82fdfa5f5503c212605f35979b77c406
/html/Programs/hw7-2-diff/r04546014-117-0/Diff.java
1e67e41ed72589bd9eb7cbee79b887a38e7274db
[]
no_license
dn070017/1042-PDSA
b23070f51946c8ac708d3ab9f447ab8185bd2a34
5e7d7b1b2c9d751a93de9725316aa3b8f59652e6
refs/heads/master
2020-03-20T12:13:43.229042
2018-06-15T01:00:48
2018-06-15T01:00:48
137,424,305
0
0
null
null
null
null
UTF-8
Java
false
false
1,388
java
import java.io.BufferedReader; import java.io.FileReader; public class HandPQ { public static void main(String[] args) throws Exception { try (BufferedReader br = new BufferedReader(new FileReader(args[0]))) { String[] header = br.readLine().split("",""); int count = Integer.parseInt(header[0]); int target = Integer.parseInt(header[1]); Hand[] hand = new Hand[count];//訂出幾個人 Card[][] card = new Card[count][];//前面格子代表每一個人,後面格子代表他的每一張牌 MinPQ pq = new MinPQ(); for (int i = 0; i < count; i++) { String[] PlayerHand = br.readLine().split("","");//讀每一個player的手牌 card[i] = new Card[5]; for (int j = 0; j < 5; j++) { String[] sf = PlayerHand[i].split(""_"");//讀每一張排的花色和數字 card[i][j] = new Card(sf[1], sf[0]); } hand[i] = new Hand(card[i]); pq.insert(hand[i]); if (pq.size() > target) { pq.delMin(); } } Hand[] kk = new Hand[5]; Card[] anser = hand[count - target].getCards(); System.out.println(pq.delMin()); } } }
[ "dn070017@gmail.com" ]
dn070017@gmail.com
7ab3f05a3fab4b5f09ab8bd6ab10ef43a3bf18e3
8db683ef2d51905b802de02f4a53e9e16c87d5ec
/src/main/java/gwt/material/design/addins/client/pinch/events/OnZoomStartEvent.java
d91ca6e1692717fd0f9b7b04d9f88ae88dee8c4f
[ "Apache-2.0" ]
permissive
GwtMaterialDesign/gwt-material-addins
9ed4a713bbd66a2f7971d8372825d9ee561a410a
8b25a900f8855d043a32d581eae9e8a2eb21cedc
refs/heads/master
2023-09-04T11:22:48.392326
2023-07-28T00:00:38
2023-07-28T00:00:38
46,502,665
40
57
Apache-2.0
2023-07-28T00:00:40
2015-11-19T15:49:50
JavaScript
UTF-8
Java
false
false
1,456
java
/* * #%L * GwtMaterial * %% * Copyright (C) 2015 - 2022 GwtMaterialDesign * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ package gwt.material.design.addins.client.pinch.events; import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.GwtEvent; import com.google.gwt.event.shared.HasHandlers; public class OnZoomStartEvent extends GwtEvent<OnZoomStartEvent.OnZoomStartHandler> { public interface OnZoomStartHandler extends EventHandler { void onOnZoomStart(OnZoomStartEvent event); } public static final Type<OnZoomStartHandler> TYPE = new Type<>(); public static void fire(HasHandlers source) { source.fireEvent(new OnZoomStartEvent()); } @Override public Type<OnZoomStartHandler> getAssociatedType() { return TYPE; } @Override protected void dispatch(OnZoomStartHandler handler) { handler.onOnZoomStart(this); } }
[ "kevzlou7979@gmail.com" ]
kevzlou7979@gmail.com
af1c3be9ad78d10358d26e6d87691d1c3dfb5ed2
ef8c08782883cc81fa1ae1a57b44c1b6340db20d
/ev/endrov/flowBasic/logic/EvOpNotImage.java
93d50d1b8817f051cdbd8aa61c0cad4cf40c77c8
[]
no_license
javierfdr/Endrov-collaboration
574b9973bfa1d63748c7ad79cbb7f552fba51f8f
c45cdae3b977cf3167701d45403d900b22501291
refs/heads/master
2020-05-21T11:42:29.363246
2010-09-20T15:24:02
2010-09-20T15:24:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
836
java
/*** * Copyright (C) 2010 Johan Henriksson * This code is under the Endrov / BSD license. See www.endrov.net * for the full text and how to cite. */ package endrov.flowBasic.logic; import endrov.flow.EvOpSlice1; import endrov.imageset.EvPixels; import endrov.imageset.EvPixelsType; /** * NOT a * @author Johan Henriksson */ public class EvOpNotImage extends EvOpSlice1 { public EvPixels exec1(EvPixels... p) { return not(p[0]); } private static EvPixels not(EvPixels a) { //Should use the common higher type here a=a.getReadOnly(EvPixelsType.INT); int w=a.getWidth(); int h=a.getHeight(); EvPixels out=new EvPixels(a.getType(),w,h); int[] aPixels=a.getArrayInt(); int[] outPixels=out.getArrayInt(); for(int i=0;i<aPixels.length;i++) outPixels[i]=aPixels[i]!=0 ? 0 : 1; return out; } }
[ "mahogny@areta.org" ]
mahogny@areta.org
181eaf20af179b7ad386325a31b06246b75b85af
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/amap/location/offline/b/b/c.java
27ab0159268bf50b54494a84d62eecee1c3e3040
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
534
java
package com.amap.location.offline.b.b; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; /* compiled from: LocationDbOpenHelper */ class c extends SQLiteOpenHelper { public void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i2) { } c(Context context) { super(context, "OffLocation.db", null, 1); } public void onCreate(SQLiteDatabase sQLiteDatabase) { a.a(sQLiteDatabase); b.a(sQLiteDatabase); } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
e5e2f436c1ea74c9750fb36f427ba0e9120be7f7
e7af8f145851cf0efd31f78b20bf85723f078ef3
/src/main/java/be/ceau/chart/dataset/PieDataset.java
eee62b111023abd3ff3f5b869712b337824b25f7
[ "Apache-2.0" ]
permissive
mdewilde/chart
1b157c1357c90d873245360b7e64da281539d000
7d896c8c316a3c62bfcd0b75955bf92c559708cf
refs/heads/master
2023-08-17T14:18:09.655883
2023-08-06T16:41:47
2023-08-06T16:41:47
37,681,702
115
56
Apache-2.0
2023-08-06T16:20:22
2015-06-18T19:59:40
Java
UTF-8
Java
false
false
2,272
java
/* Copyright 2023 Marceau Dewilde <m@ceau.be> 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 be.ceau.chart.dataset; import java.math.BigDecimal; import java.util.Collection; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; @JsonInclude(Include.NON_EMPTY) @JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE) public class PieDataset extends RoundDataset<PieDataset, BigDecimal> { /** * Sets the backing data list to the argument, replacing any data already * added or set * * @param data * The data to plot in a line */ public PieDataset setData(int... data) { clearData(); if (data != null) { for (int i = 0; i < data.length; i++) { this.data.add(new BigDecimal(data[i])); } } return this; } /** * Sets the backing data list to the argument, replacing any data already * added or set * * @param data * The data to plot in a line */ public PieDataset setData(double... data) { clearData(); if (data != null) { for (int i = 0; i < data.length; i++) { this.data.add(new BigDecimal(String.valueOf(data[i]))); } } return this; } /** * Add the data point to this {@code Dataset} * * @see #setData(Collection) */ public PieDataset addData(int data) { this.data.add(new BigDecimal(data)); return this; } /** * Add the data point to this {@code Dataset} * * @see #setData(Collection) */ public PieDataset addData(double data) { this.data.add(new BigDecimal(String.valueOf(data))); return this; } }
[ "m@ceau.be" ]
m@ceau.be
978f9e105ea2b6f11ebba4f3fa020dfd59abd840
eac0b43bd7bf55f9c59c6867cc52706f5a8b9c1c
/eshop-v3/eshop-promotion/src/main/java/com/zhss/eshop/promotion/api/PromotionService.java
32c156204bcaceed12802727e6045f31bbf2558d
[]
no_license
fengqing90/Learn
b017fa9d40cb0592ee63f77f620a8a8f39f046b9
396f48eddb5b78a4fdb880d46ea1f2b109b707e4
refs/heads/master
2022-11-22T01:44:05.803929
2021-08-04T03:57:26
2021-08-04T03:57:26
144,801,377
0
3
null
2022-11-16T06:59:58
2018-08-15T03:29:15
Java
UTF-8
Java
false
false
3,816
java
package com.zhss.eshop.promotion.api; import java.util.ArrayList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.zhss.eshop.common.util.DateProvider; import com.zhss.eshop.common.util.ObjectUtils; import com.zhss.eshop.promotion.constant.CouponStatus; import com.zhss.eshop.promotion.dao.CouponAchieveDAO; import com.zhss.eshop.promotion.dao.CouponDAO; import com.zhss.eshop.promotion.dao.PromotionActivityDAO; import com.zhss.eshop.promotion.domain.CouponAchieveDO; import com.zhss.eshop.promotion.domain.CouponDTO; import com.zhss.eshop.promotion.domain.PromotionActivityDTO; /** * 促销中心service组件 * @author zhonghuashishan * */ @RestController public class PromotionService implements PromotionApi { private static final Logger logger = LoggerFactory.getLogger(PromotionService.class); /** * 促销活动管理DAO组件 */ @Autowired private PromotionActivityDAO promotionActivityDAO; /** * 优惠券领取记录管理DAO组件 */ @Autowired private CouponAchieveDAO couponAchieveDAO; /** * 优惠券管理DAO组件 */ @Autowired private CouponDAO couponDAO; /** * 日期辅助组件 */ @Autowired private DateProvider dateProvider; /** * 根据商品id查询促销活动 * @param goodsId 商品id * @return 促销活动 */ @Override public List<PromotionActivityDTO> listByGoodsId(@PathVariable("goodsId") Long goodsId) { try { return ObjectUtils.convertList(promotionActivityDAO.listEnabledByGoodsId(goodsId), PromotionActivityDTO.class); } catch (Exception e) { logger.error("error", e); return new ArrayList<PromotionActivityDTO>(); } } /** * 根据id查询促销活动 * @param id 促销活动id * @return 促销活动 */ @Override public PromotionActivityDTO getById(@PathVariable("id") Long id) { try { return promotionActivityDAO.getById(id).clone(PromotionActivityDTO.class); } catch(Exception e) { logger.error("Error", e); return null; } } /** * 查询用户当前可以使用的有效优惠券 * @param userAccountId 用户账号id * @return 有效优惠券 */ @Override public List<CouponDTO> listValidByUserAccountId(@PathVariable("userAccountId" )Long userAccountId) { List<CouponDTO> coupons = new ArrayList<CouponDTO>(); try { List<CouponAchieveDO> couponAchieves = couponAchieveDAO .listUnsedByUserAccountId(userAccountId); for(CouponAchieveDO couponAchieve : couponAchieves) { CouponDTO coupon = couponDAO.getById(couponAchieve.getCouponId()) .clone(CouponDTO.class); if(CouponStatus.GIVING_OUT.equals(coupon.getStatus()) || CouponStatus.GIVEN_OUT.equals(coupon.getStatus())) { coupons.add(coupon); } } } catch (Exception e) { logger.error("error", e); } return coupons; } /** * 使用优惠券 * @param couponId 优惠券id * @param userAccountId 用户账号id * @return 处理结果 */ @Override public Boolean useCoupon( @RequestParam("couponId") Long couponId, @RequestParam("userAccountId") Long userAccountId) { try { CouponAchieveDO couponAchieve = new CouponAchieveDO(); couponAchieve.setCouponId(couponId); couponAchieve.setUserAccountId(userAccountId); couponAchieve.setUsed(1); couponAchieve.setUsedTime(dateProvider.getCurrentTime()); couponAchieve.setGmtModified(dateProvider.getCurrentTime()); couponAchieveDAO.update(couponAchieve); return true; } catch (Exception e) { logger.error("error", e); return false; } } }
[ "fengqing@youxin.com" ]
fengqing@youxin.com
67f84cbfb68c20e4706e6092154bc0560dfd2683
0ca7e7d714da0bd969e381c92a46be74edf3219b
/src/com/jeecms/bbs/dao/impl/BbsMagicLogDaoImpl.java
a70afc4dbe7cf92fc923be1d703d6707a13fdf93
[]
no_license
huanghengmin/jeebbs
1bf6ba3eb2ab9fd3020b1230ccaf530cbc7c45f8
cf8494cdfb1539f1503ff688dbbb23e203a67ee4
refs/heads/master
2020-12-31T05:55:32.737038
2016-04-18T08:09:59
2016-04-18T08:09:59
56,489,180
0
2
null
null
null
null
UTF-8
Java
false
false
1,124
java
package com.jeecms.bbs.dao.impl; import org.springframework.stereotype.Repository; import com.jeecms.bbs.entity.BbsMemberMagic; import com.jeecms.bbs.dao.BbsMemberMagicDao; import com.jeecms.common.hibernate3.Finder; import com.jeecms.common.hibernate3.HibernateBaseDao; import com.jeecms.common.page.Pagination; @Repository public class BbsMagicLogDaoImpl extends HibernateBaseDao<BbsMemberMagic, Integer> implements BbsMemberMagicDao { public Pagination getPage(Integer userId, int pageNo, int pageSize) { String hql = "from BbsMemberMagic magic "; Finder finder = Finder.create(hql); Pagination page = find(finder, pageNo, pageSize); return page; } public BbsMemberMagic findById(Integer id) { BbsMemberMagic entity = get(id); return entity; } public BbsMemberMagic save(BbsMemberMagic bean) { getSession().save(bean); return bean; } public BbsMemberMagic deleteById(Integer id) { BbsMemberMagic entity = super.get(id); if (entity != null) { getSession().delete(entity); } return entity; } protected Class<BbsMemberMagic> getEntityClass() { return BbsMemberMagic.class; } }
[ "465805947@QQ.com" ]
465805947@QQ.com
b73b7f244133efb372d574d2b36fc2de10de5c50
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/51_jiprof-com.mentorgen.tools.profile.instrument.clfilter.CustomMultiClassLoaderFilter-0.5-8/com/mentorgen/tools/profile/instrument/clfilter/CustomMultiClassLoaderFilter_ESTest_scaffolding.java
56d35a26be450bafe6aef6108bff2a4a1df40381
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
582
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Oct 29 16:19:11 GMT 2019 */ package com.mentorgen.tools.profile.instrument.clfilter; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class CustomMultiClassLoaderFilter_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
8ddab4bd9e812c448dbd8e26df526f3a54f4084c
d110d51df5c59810142c907e7b4753812942d21a
/generator-javaee-sample-app/src/main/java/knorxx/framework/generator/javaeesampleapp/server/service/StorageService.java
3a1123a5cbcbc5f02e4c71b657a50b989d19b19d
[ "MIT" ]
permissive
janScheible/knorxx
a1b3730e9d46f4c58a1cee42052d9c829e98c480
b0885eec7ffe3870c8ea4cd1566b26b744f34bab
refs/heads/master
2021-01-25T06:05:58.474442
2015-12-22T11:27:23
2015-12-22T11:27:23
17,491,095
2
1
null
null
null
null
UTF-8
Java
false
false
1,015
java
package knorxx.framework.generator.javaeesampleapp.server.service; import com.mysema.query.jpa.impl.JPAQuery; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.servlet.http.HttpServletRequest; import knorxx.framework.generator.javaeesampleapp.server.model.QTestEntity; import knorxx.framework.generator.javaeesampleapp.server.model.TestEntity; import knorxx.framework.generator.web.client.RpcService; import org.stjs.javascript.functions.Callback1; /** * * @author sj */ public class StorageService implements RpcService { @PersistenceContext EntityManager entityManager; public TestEntity getById(HttpServletRequest request, long id, Callback1<TestEntity> callback, Object scope) { TestEntity testEntity = new JPAQuery (entityManager).from(QTestEntity.testEntity) .where(QTestEntity.testEntity.name.contains("wing")) .singleResult(QTestEntity.testEntity); return testEntity; } }
[ "janScheible@users.noreply.github.com" ]
janScheible@users.noreply.github.com
f6d0b3a7abc9a1da4fadba2eb0ef95417edea2cc
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.27.0/sources/androidx/appcompat/widget/TintResources.java
d269b43354b138b633d2e869b4445215e9bb9593
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
876
java
package androidx.appcompat.widget; import android.content.Context; import android.content.res.Resources; import android.graphics.drawable.Drawable; import androidx.annotation.NonNull; import java.lang.ref.WeakReference; class TintResources extends ResourcesWrapper { private final WeakReference<Context> mContextRef; public TintResources(@NonNull Context context, @NonNull Resources resources) { super(resources); this.mContextRef = new WeakReference(context); } public Drawable getDrawable(int i) { Drawable drawable = super.getDrawable(i); Context context = (Context) this.mContextRef.get(); if (!(drawable == null || context == null)) { AppCompatDrawableManager.get(); AppCompatDrawableManager.tintDrawableUsingColorFilter(context, i, drawable); } return drawable; } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
b4a014455594b4c426b96f50a4350a4dd8162fe1
fadfc40528c5473c8454a4835ba534a83468bb3b
/domain-services/jbb-frontend/src/main/java/org/jbb/frontend/impl/faq/FaqCaches.java
2b15b2c7952c5e17ac19522f68f88b2bd8733a78
[ "Apache-2.0" ]
permissive
jbb-project/jbb
8d04e72b2f2d6c088b870e9a6c9dba8aa2e1768e
cefa12cda40804395b2d6e8bea0fb8352610b761
refs/heads/develop
2023-08-06T15:26:08.537367
2019-08-25T21:32:19
2019-08-25T21:32:19
60,918,871
4
3
Apache-2.0
2023-09-01T22:21:04
2016-06-11T17:20:33
Java
UTF-8
Java
false
false
455
java
/* * Copyright (C) 2019 the original author or authors. * * This file is part of jBB Application Project. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 */ package org.jbb.frontend.impl.faq; import lombok.experimental.UtilityClass; @UtilityClass public class FaqCaches { public static final String FAQ = "frontend.faq"; }
[ "baart92@gmail.com" ]
baart92@gmail.com
f89c2cc672ec1c23ad08980ba7c1b63e850886b8
975dd2b911554103981d63cfd231e1225bf9fec0
/app/src/main/java/com/lida/carcare/activity/ActivityZhuXiao.java
f03c5c2ed5a31bc9304d3cb6c5721528ce34248c
[]
no_license
Asher-fei/CarCare
02b94c86e56c80bf1158736ce97d37483c93d345
07757477284219a82767b52cbfbbb6f8bf21728e
refs/heads/master
2020-04-03T06:34:49.305077
2017-09-21T03:33:33
2017-09-21T03:33:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,192
java
package com.lida.carcare.activity; import android.os.Bundle; import android.widget.Button; import android.widget.TextView; import com.lida.carcare.R; import com.midian.base.base.BaseActivity; import com.midian.base.util.UIHelper; import com.midian.base.widget.BaseLibTopbarView; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; /** * 注销账号 * Created by WeiQingFeng on 2017/5/3. */ public class ActivityZhuXiao extends BaseActivity { @BindView(R.id.topbar) BaseLibTopbarView topbar; @BindView(R.id.btnZhuXiao) Button btnZhuXiao; @BindView(R.id.tvPhone) TextView tvPhone; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_zhuxiao); ButterKnife.bind(this); topbar.setTitle("注销账号"); topbar.setLeftImageButton(R.drawable.icon_back, UIHelper.finish(_activity)); tvPhone.setText("将"+ac.phone+"所绑定的账号注销"); } @OnClick(R.id.btnZhuXiao) public void onViewClicked() { finish(); UIHelper.t(_activity, "账号已注销!"); } }
[ "1170017470@qq.com" ]
1170017470@qq.com
19ed9b828ab16255dfded792aca6567df286c79b
2d997f9fe5ecfafb97b3a73dc4c539fcda647a9b
/sources/com/ftdi/j2xx/FT_EEPROM.java
abca427bcfc7d2d80813735c38f3eb50a4757f34
[]
no_license
Riora-Innovations/reverse-eng
31af20c8496ecde2af55e02785c37892a8d0e043
613f537d9807d81fa5f6c11bffb31c0c0449bf19
refs/heads/master
2022-12-05T09:02:05.477417
2020-08-29T01:49:52
2020-08-29T01:49:52
291,220,650
0
0
null
null
null
null
UTF-8
Java
false
false
492
java
package com.ftdi.j2xx; public class FT_EEPROM { public short DeviceType = 0; public String Manufacturer = "FTDI"; public short MaxPower = 90; public String Product = "USB <-> Serial Converter"; public short ProductId = 24577; public boolean PullDownEnable = false; public boolean RemoteWakeup = false; public boolean SelfPowered = false; public boolean SerNumEnable = true; public String SerialNumber = "FT123456"; public short VendorId = 1027; }
[ "bawwa.16@cse.mrt.ac.lk" ]
bawwa.16@cse.mrt.ac.lk
0739448590b88640f0204a6693c790fa2d6aae96
d6ee393f6e3728a5cdc8dc5cbf3cb09edffcbf25
/.svn/pristine/84/84f17c42c0447ccf8a292a7f879e3e99cf85b6df.svn-base
804ec9f74bc2607f72c9c4db99ef8c8ac3ed3245
[]
no_license
wuzhining/mesParent
f4cfd11828586d738e8123c6d4b675a77d465333
d806586103327d48f26ce2725e0e201292793f94
refs/heads/master
2022-12-21T00:07:07.116066
2019-10-04T05:35:10
2019-10-04T05:35:10
212,742,010
3
0
null
2022-12-16T09:57:13
2019-10-04T05:25:37
JavaScript
UTF-8
Java
false
false
1,897
package com.techsoft.entity.bill; import java.util.Date; import com.techsoft.entity.common.BillInventory; public class BillInventoryParamVo extends BillInventory { private static final long serialVersionUID = -4828022005486181916L; public BillInventoryParamVo (){ } public BillInventoryParamVo(BillInventory value) { value.cloneProperties(this); } private Date timeStartBegin; private Date timeStartEnd; private Date timeEndBegin; private Date timeEndEnd; private Date createTimeBegin; private Date createTimeEnd; private Date modifyTimeBegin; private Date modifyTimeEnd; private Long notFinish; public Date getTimeStartBegin() { return timeStartBegin; } public void setTimeStartBegin(Date value) { this.timeStartBegin = value; } public Date getTimeStartEnd() { return timeStartEnd; } public void setTimeStartEnd(Date value) { this.timeStartEnd = value; } public Date getTimeEndBegin() { return timeEndBegin; } public void setTimeEndBegin(Date value) { this.timeEndBegin = value; } public Date getTimeEndEnd() { return timeEndEnd; } public void setTimeEndEnd(Date value) { this.timeEndEnd = value; } public Date getCreateTimeBegin() { return createTimeBegin; } public void setCreateTimeBegin(Date value) { this.createTimeBegin = value; } public Date getCreateTimeEnd() { return createTimeEnd; } public void setCreateTimeEnd(Date value) { this.createTimeEnd = value; } public Date getModifyTimeBegin() { return modifyTimeBegin; } public void setModifyTimeBegin(Date value) { this.modifyTimeBegin = value; } public Date getModifyTimeEnd() { return modifyTimeEnd; } public void setModifyTimeEnd(Date value) { this.modifyTimeEnd = value; } public Long getNotFinish() { return notFinish; } public void setNotFinish(Long notFinish) { this.notFinish = notFinish; } }
[ "wzn354753575@sina.cn" ]
wzn354753575@sina.cn
7a5fb70e2025ad477f1400a07cf6967313d36c3a
f6a584e54039b7d6478cb591d3084dfd16529ad0
/gmall-user-service/src/main/java/com/meng/gmall/user/service/impl/UserMemberReceiveAddressServiceImpl.java
f367b19d0bfcffb8150d9734c7b439285ea555cc
[]
no_license
misssong123/gmall0206
4b9dfd37e0a584b3debbd1b71a6e4b61fcdd5bcb
4e04e3e2dd91d28b631f0bb0cd3ccf45901b908f
refs/heads/main
2023-03-07T09:23:39.622480
2021-02-22T11:14:55
2021-02-22T11:14:55
336,546,723
0
0
null
null
null
null
UTF-8
Java
false
false
915
java
package com.meng.gmall.user.service.impl; import com.alibaba.dubbo.config.annotation.Service; import com.meng.gmall.bean.UmsMemberReceiveAddress; import com.meng.gmall.service.UserMemberReceiveAddressService; import com.meng.gmall.user.mapper.UmsMemberReceiveAddressMapper; import org.springframework.beans.factory.annotation.Autowired; import java.util.List; @Service public class UserMemberReceiveAddressServiceImpl implements UserMemberReceiveAddressService { @Autowired UmsMemberReceiveAddressMapper umsMemberReceiveAddressMapper; @Override public List<UmsMemberReceiveAddress> getReceiveAddressByMemberId(String memberId) { UmsMemberReceiveAddress demo = new UmsMemberReceiveAddress(); demo.setMemberId(memberId); List<UmsMemberReceiveAddress> umsMemberReceiveAddresses = umsMemberReceiveAddressMapper.select(demo); return umsMemberReceiveAddresses; } }
[ "root@qq.com" ]
root@qq.com
0dfb947ac49ffa103bee0c4af47b8bad8d695390
3cd69da4d40f2d97130b5bf15045ba09c219f1fa
/sources/kotlinx/coroutines/flow/FlowKt__ZipKt$combine$$inlined$unsafeFlow$5$lambda$1.java
a866493bbfb92e4e4360dfb9e7aadeeee90f0d3b
[]
no_license
TheWizard91/Album_base_source_from_JADX
946ea3a407b4815ac855ce4313b97bd42e8cab41
e1d228fc2ee550ac19eeac700254af8b0f96080a
refs/heads/master
2023-01-09T08:37:22.062350
2020-11-11T09:52:40
2020-11-11T09:52:40
311,927,971
0
0
null
null
null
null
UTF-8
Java
false
false
1,427
java
package kotlinx.coroutines.flow; import kotlin.Metadata; import kotlin.jvm.functions.Function0; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.Lambda; @Metadata(mo33669bv = {1, 0, 3}, mo33670d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0011\n\u0002\b\u0004\n\u0002\b\u0004\n\u0002\b\u0004\n\u0002\b\u0005\u0010\u0000\u001a\n\u0012\u0006\u0012\u0004\u0018\u0001H\u00020\u0001\"\u0006\b\u0000\u0010\u0002\u0018\u0001\"\u0004\b\u0001\u0010\u0003H\n¢\u0006\u0004\b\u0004\u0010\u0005¨\u0006\u0006"}, mo33671d2 = {"<anonymous>", "", "T", "R", "invoke", "()[Ljava/lang/Object;", "kotlinx/coroutines/flow/FlowKt__ZipKt$combine$5$1"}, mo33672k = 3, mo33673mv = {1, 1, 15}) /* compiled from: Zip.kt */ public final class FlowKt__ZipKt$combine$$inlined$unsafeFlow$5$lambda$1 extends Lambda implements Function0<T[]> { final /* synthetic */ FlowKt__ZipKt$combine$$inlined$unsafeFlow$5 this$0; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public FlowKt__ZipKt$combine$$inlined$unsafeFlow$5$lambda$1(FlowKt__ZipKt$combine$$inlined$unsafeFlow$5 flowKt__ZipKt$combine$$inlined$unsafeFlow$5) { super(0); this.this$0 = flowKt__ZipKt$combine$$inlined$unsafeFlow$5; } public final T[] invoke() { int length = this.this$0.$flows$inlined.length; Intrinsics.reifiedOperationMarker(0, "T?"); return new Object[length]; } }
[ "agiapong@gmail.com" ]
agiapong@gmail.com
225248a5736b553fbd6897e8a82c9527b2cbe28b
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/validation/org/deeplearning4j/nn/modelimport/keras/layers/convolution/KerasAtrousConvolution2DTest.java
5ea8acca803b2792b8f54106ee22ce78af53b73d
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
2,196
java
/** * ***************************************************************************** * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://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. * * SPDX-License-Identifier: Apache-2.0 * **************************************************************************** */ package org.deeplearning4j.nn.modelimport.keras.layers.convolution; import org.deeplearning4j.nn.modelimport.keras.config.Keras1LayerConfiguration; import org.deeplearning4j.nn.weights.IWeightInit; import org.deeplearning4j.nn.weights.WeightInitXavier; import org.junit.Test; /** * * * @author Max Pumperla */ public class KerasAtrousConvolution2DTest { private final String ACTIVATION_KERAS = "linear"; private final String ACTIVATION_DL4J = "identity"; private final String LAYER_NAME = "atrous_conv_2d"; private final String INIT_KERAS = "glorot_normal"; private final IWeightInit INIT_DL4J = new WeightInitXavier(); private final double L1_REGULARIZATION = 0.01; private final double L2_REGULARIZATION = 0.02; private final double DROPOUT_KERAS = 0.3; private final double DROPOUT_DL4J = 1 - (DROPOUT_KERAS); private final int[] KERNEL_SIZE = new int[]{ 1, 2 }; private final int[] DILATION = new int[]{ 2, 2 }; private final int[] STRIDE = new int[]{ 3, 4 }; private final int N_OUT = 13; private final String BORDER_MODE_VALID = "valid"; private final int[] VALID_PADDING = new int[]{ 0, 0 }; private Keras1LayerConfiguration conf1 = new Keras1LayerConfiguration(); @Test public void testAtrousConvolution2DLayer() throws Exception { Integer keras1 = 1; buildAtrousConvolution2DLayer(conf1, keras1); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
f46534e9db90bbdce9d94a2f49fe46cd6010a019
9d32980f5989cd4c55cea498af5d6a413e08b7a2
/A92s_10_0_0/src/main/java/com/color/inner/nfc/cardemulation/ApduServiceInfoWrapper.java
df65faa28916924377e256fae946e2023265dc5a
[]
no_license
liuhaosource/OppoFramework
e7cc3bcd16958f809eec624b9921043cde30c831
ebe39acabf5eae49f5f991c5ce677d62b683f1b6
refs/heads/master
2023-06-03T23:06:17.572407
2020-11-30T08:40:07
2020-11-30T08:40:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,020
java
package com.color.inner.nfc.cardemulation; import android.nfc.cardemulation.OppoBaseApduServiceInfo; import android.util.Log; import com.color.util.ColorTypeCastingHelper; public class ApduServiceInfoWrapper { private static final String TAG = "ApduServiceInfoWrapper"; private ApduServiceInfoWrapper() { } public static boolean isServiceEnabled(Object apduServiceInfoObject, String category) { try { OppoBaseApduServiceInfo baseApduServiceInfo = typeCasting(apduServiceInfoObject); if (baseApduServiceInfo != null) { return baseApduServiceInfo.isServiceEnabled(category); } return false; } catch (Throwable e) { Log.e(TAG, e.toString()); return false; } } private static OppoBaseApduServiceInfo typeCasting(Object apduServiceInfoObject) { return (OppoBaseApduServiceInfo) ColorTypeCastingHelper.typeCasting(OppoBaseApduServiceInfo.class, apduServiceInfoObject); } }
[ "dstmath@163.com" ]
dstmath@163.com
c0497a25854383d903ecf17e6ce08511de5458e3
1e3a260329a23a087faffc3a5d750f31568d811a
/src/factory_method/MainClass.java
31c3caa8b5ab0eed30d6830e3fbde91ef80f2ad8
[]
no_license
MRohit/Design-Patterns
91f30390a1549d73d530ba4aaae39f3dcb33cd39
fdfd5bd2691af30763324543c16f263b3c22300b
refs/heads/master
2021-05-16T01:02:57.351998
2017-11-02T17:40:05
2017-11-02T17:40:05
107,033,175
1
0
null
null
null
null
UTF-8
Java
false
false
210
java
package factory_method; public class MainClass { public static void main (String args[]) { MazeGame ordinaryGame = new OrdinaryMazeGame(); MazeGame magicGame = new MagicMazeGame(); } }
[ "mourya.rohit32@gmail.com" ]
mourya.rohit32@gmail.com
3055b6f723587f57ef4acc297621642ab1988a38
ada747a534de2979e717faf37baf4805c703fad2
/awaitility/src/main/java/org/awaitility/core/PredicateExceptionIgnorer.java
cac4e4c8651ae3e6747e3ab53e82500266196a3c
[ "Apache-2.0" ]
permissive
ponziani/awaitility
2c5cc60f32b051a87756c011267f75d5fe6f67ff
74022a246661362e0228247591a728d4ef99e506
refs/heads/master
2020-03-27T06:07:44.581297
2018-08-25T09:03:12
2018-08-25T09:03:12
146,080,935
0
0
Apache-2.0
2018-08-25T08:58:51
2018-08-25T08:58:50
null
UTF-8
Java
false
false
1,134
java
/* * Copyright 2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.awaitility.core; public class PredicateExceptionIgnorer implements ExceptionIgnorer { private final Predicate<? super Throwable> predicate; public PredicateExceptionIgnorer(Predicate<? super Throwable> predicate) { if (predicate == null) { throw new IllegalArgumentException("predicate cannot be null"); } this.predicate = predicate; } public boolean shouldIgnoreException(Throwable exception) { return predicate.matches(exception); } }
[ "johan.haleby@gmail.com" ]
johan.haleby@gmail.com
ffc21705edb400d873009362a3d71843afd16d27
dd76d0b680549acb07278b2ecd387cb05ec84d64
/divestory-CFR/androidx/core/view/NestedScrollingParentHelper.java
46905250254dff2765679872f3d744e785fe707b
[]
no_license
ryangardner/excursion-decompiling
43c99a799ce75a417e636da85bddd5d1d9a9109c
4b6d11d6f118cdab31328c877c268f3d56b95c58
refs/heads/master
2023-07-02T13:32:30.872241
2021-08-09T19:33:37
2021-08-09T19:33:37
299,657,052
0
0
null
null
null
null
UTF-8
Java
false
false
1,225
java
/* * Decompiled with CFR <Could not determine version>. * * Could not load the following classes: * android.view.View * android.view.ViewGroup */ package androidx.core.view; import android.view.View; import android.view.ViewGroup; public class NestedScrollingParentHelper { private int mNestedScrollAxesNonTouch; private int mNestedScrollAxesTouch; public NestedScrollingParentHelper(ViewGroup viewGroup) { } public int getNestedScrollAxes() { return this.mNestedScrollAxesTouch | this.mNestedScrollAxesNonTouch; } public void onNestedScrollAccepted(View view, View view2, int n) { this.onNestedScrollAccepted(view, view2, n, 0); } public void onNestedScrollAccepted(View view, View view2, int n, int n2) { if (n2 == 1) { this.mNestedScrollAxesNonTouch = n; return; } this.mNestedScrollAxesTouch = n; } public void onStopNestedScroll(View view) { this.onStopNestedScroll(view, 0); } public void onStopNestedScroll(View view, int n) { if (n == 1) { this.mNestedScrollAxesNonTouch = 0; return; } this.mNestedScrollAxesTouch = 0; } }
[ "ryan.gardner@coxautoinc.com" ]
ryan.gardner@coxautoinc.com
e16804d28bb368f115bd25da4338030ace8f199f
6fa701cdaa0d83caa0d3cbffe39b40e54bf3d386
/google/cloud/pubsublite/v1/google-cloud-pubsublite-v1-java/proto-google-cloud-pubsublite-v1-java/src/main/java/com/google/cloud/pubsublite/proto/SubscribeRequestOrBuilder.java
381f15abdb8de00b1a622354e50bafba9107d74c
[ "Apache-2.0" ]
permissive
oltoco/googleapis-gen
bf40cfad61b4217aca07068bd4922a86e3bbd2d5
00ca50bdde80906d6f62314ef4f7630b8cdb6e15
refs/heads/master
2023-07-17T22:11:47.848185
2021-08-29T20:39:47
2021-08-29T20:39:47
null
0
0
null
null
null
null
UTF-8
Java
false
true
2,666
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/pubsublite/v1/subscriber.proto package com.google.cloud.pubsublite.proto; public interface SubscribeRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.pubsublite.v1.SubscribeRequest) com.google.protobuf.MessageOrBuilder { /** * <pre> * Initial request on the stream. * </pre> * * <code>.google.cloud.pubsublite.v1.InitialSubscribeRequest initial = 1;</code> * @return Whether the initial field is set. */ boolean hasInitial(); /** * <pre> * Initial request on the stream. * </pre> * * <code>.google.cloud.pubsublite.v1.InitialSubscribeRequest initial = 1;</code> * @return The initial. */ com.google.cloud.pubsublite.proto.InitialSubscribeRequest getInitial(); /** * <pre> * Initial request on the stream. * </pre> * * <code>.google.cloud.pubsublite.v1.InitialSubscribeRequest initial = 1;</code> */ com.google.cloud.pubsublite.proto.InitialSubscribeRequestOrBuilder getInitialOrBuilder(); /** * <pre> * Request to update the stream's delivery cursor. * </pre> * * <code>.google.cloud.pubsublite.v1.SeekRequest seek = 2;</code> * @return Whether the seek field is set. */ boolean hasSeek(); /** * <pre> * Request to update the stream's delivery cursor. * </pre> * * <code>.google.cloud.pubsublite.v1.SeekRequest seek = 2;</code> * @return The seek. */ com.google.cloud.pubsublite.proto.SeekRequest getSeek(); /** * <pre> * Request to update the stream's delivery cursor. * </pre> * * <code>.google.cloud.pubsublite.v1.SeekRequest seek = 2;</code> */ com.google.cloud.pubsublite.proto.SeekRequestOrBuilder getSeekOrBuilder(); /** * <pre> * Request to grant tokens to the server, * </pre> * * <code>.google.cloud.pubsublite.v1.FlowControlRequest flow_control = 3;</code> * @return Whether the flowControl field is set. */ boolean hasFlowControl(); /** * <pre> * Request to grant tokens to the server, * </pre> * * <code>.google.cloud.pubsublite.v1.FlowControlRequest flow_control = 3;</code> * @return The flowControl. */ com.google.cloud.pubsublite.proto.FlowControlRequest getFlowControl(); /** * <pre> * Request to grant tokens to the server, * </pre> * * <code>.google.cloud.pubsublite.v1.FlowControlRequest flow_control = 3;</code> */ com.google.cloud.pubsublite.proto.FlowControlRequestOrBuilder getFlowControlOrBuilder(); public com.google.cloud.pubsublite.proto.SubscribeRequest.RequestCase getRequestCase(); }
[ "bazel-bot-development[bot]@users.noreply.github.com" ]
bazel-bot-development[bot]@users.noreply.github.com
17001aac31fe617af0508baed2d10c43b67a0608
7565725272da0b194a7a6b1a06a7037e6e6929a0
/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/convert/CassandraJsr310Converters.java
05fafa848846defc45aa8cc06f275658871b05eb
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-generic-cla" ]
permissive
paulokinho/spring-data-cassandra
460abd2b3f6160b67464f3a86b1c7171a8e94e35
44671e4854e8395ac33efcc144c1de3bd3d3f270
refs/heads/master
2020-02-26T16:12:25.391964
2017-03-05T22:17:01
2017-03-05T22:17:01
68,550,589
0
3
null
2017-03-05T22:17:02
2016-09-18T22:25:43
Java
UTF-8
Java
false
false
2,909
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 org.springframework.data.cassandra.convert; import java.time.LocalDate; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import org.springframework.core.convert.converter.Converter; import org.springframework.data.convert.Jsr310Converters; import org.springframework.util.ClassUtils; /** * Helper class to register JodaTime specific {@link Converter} implementations in case the library is present on the * classpath. * * @author Mark Paluch * @since 1.5 */ @SuppressWarnings("Since15") public abstract class CassandraJsr310Converters { private static final boolean JAVA_8_IS_PRESENT = ClassUtils.isPresent("java.time.LocalDateTime", Jsr310Converters.class.getClassLoader()); private CassandraJsr310Converters() {} /** * Returns the converters to be registered. Will only return converters in case we're running on Java 8. * * @return */ public static Collection<Converter<?, ?>> getConvertersToRegister() { if (!JAVA_8_IS_PRESENT) { return Collections.emptySet(); } List<Converter<?, ?>> converters = new ArrayList<Converter<?, ?>>(); converters.add(CassandraLocalDateToLocalDateConverter.INSTANCE); converters.add(LocalDateToCassandraLocalDateConverter.INSTANCE); return converters; } /** * Simple singleton to convert {@link com.datastax.driver.core.LocalDate}s to their {@link LocalDate} representation. * * @author Mark Paluch */ public enum CassandraLocalDateToLocalDateConverter implements Converter<com.datastax.driver.core.LocalDate, LocalDate> { INSTANCE; @Override public LocalDate convert(com.datastax.driver.core.LocalDate source) { return LocalDate.of(source.getYear(), source.getMonth(), source.getDay()); } } /** * Simple singleton to convert {@link LocalDate}s to their {@link com.datastax.driver.core.LocalDate} representation. * * @author Mark Paluch */ public enum LocalDateToCassandraLocalDateConverter implements Converter<LocalDate, com.datastax.driver.core.LocalDate> { INSTANCE; @Override public com.datastax.driver.core.LocalDate convert(LocalDate source) { return com.datastax.driver.core.LocalDate.fromYearMonthDay(source.getYear(), source.getMonthValue(), source.getDayOfMonth()); } } }
[ "jblum@pivotal.io" ]
jblum@pivotal.io
3753c882bc12fa5870ef19fe1de795fcf34d4d9c
38a9418eb677d671e3f7e88231689398de0d232f
/baekjoon/src/main/java/p11003/Main.java
74b255d2a53bf0caa4661869ab458e44dbb74907
[]
no_license
csj4032/enjoy-algorithm
66c4774deba531a75058357699bc29918fc3a7b6
a57f3c1af3ac977af4d127de20fbee101ad2c33c
refs/heads/master
2022-08-25T03:06:36.891511
2022-07-09T03:35:21
2022-07-09T03:35:21
99,533,493
0
1
null
null
null
null
UTF-8
Java
false
false
604
java
package p11003; import java.util.LinkedList; import java.util.Scanner; public class Main { public static void main(String[] args) { var sc = new Scanner(System.in); var n = sc.nextInt(); var l = sc.nextInt(); var queue = new LinkedList<Integer>(); var sb = new StringBuilder(); var min = Integer.MAX_VALUE; for (int i = 0; i < l - 1; i++) queue.add(Integer.MAX_VALUE); for (int i = 0; i < n; i++) { var k = sc.nextInt(); min = Math.min(k, queue.peek()); queue.add(min); sb.append(min + " "); if(queue.peek() == min) { } } System.out.println(sb.toString()); } }
[ "csj4032@gmail.com" ]
csj4032@gmail.com
5b4da139a0a9fb42254ca446a88cdcd688c9885b
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/6374427.java
73207d11b1ba74c37d69b4694bbe8d89d7e23b81
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,709
java
import java.io.UncheckedIOException; import java.io.UncheckedIOException; class c6374427 { public MyHelperClass URLEncoder; public String getTags(URL url) { StringBuffer xml = new StringBuffer(); OutputStreamWriter osw = null; BufferedReader br = null; try { MyHelperClass paramName = new MyHelperClass(); String reqData = URLEncoder.encode(paramName, "UTF-8") + "=" + URLEncoder.encode(url.toString(), "UTF-8"); MyHelperClass cmdUrl = new MyHelperClass(); URL service = new URL(cmdUrl); URLConnection urlConn =(URLConnection)(Object) service.openConnection(); urlConn.setDoOutput(true); urlConn.connect(); osw = new OutputStreamWriter(urlConn.getOutputStream()); osw.write(reqData); osw.flush(); br = new BufferedReader(new InputStreamReader(urlConn.getInputStream())); String line = null; while ((line =(String)(Object) br.readLine()) != null) { xml.append(line); } } catch (UncheckedIOException e) { e.printStackTrace(); } finally { try { if (osw != null) { osw.close(); } if (br != null) { br.close(); } } catch (UncheckedIOException e) { e.printStackTrace(); } } return xml.toString(); } } // Code below this line has been added to remove errors class MyHelperClass { public MyHelperClass encode(MyHelperClass o0, String o1){ return null; } public MyHelperClass encode(String o0, String o1){ return null; }} class URL { URL(MyHelperClass o0){} URL(){} public MyHelperClass openConnection(){ return null; }} class OutputStreamWriter { OutputStreamWriter(){} OutputStreamWriter(MyHelperClass o0){} public MyHelperClass close(){ return null; } public MyHelperClass flush(){ return null; } public MyHelperClass write(String o0){ return null; }} class BufferedReader { BufferedReader(){} BufferedReader(InputStreamReader o0){} public MyHelperClass readLine(){ return null; } public MyHelperClass close(){ return null; }} class URLConnection { public MyHelperClass getOutputStream(){ return null; } public MyHelperClass setDoOutput(boolean o0){ return null; } public MyHelperClass getInputStream(){ return null; } public MyHelperClass connect(){ return null; }} class InputStreamReader { InputStreamReader(MyHelperClass o0){} InputStreamReader(){}} class IOException extends Exception{ public IOException(String errorMessage) { super(errorMessage); } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
d7ee601b356fd5a96128e5f95c04c3d272ea0dec
59b62899bacc0aed8ffd7c74160f091d795a1760
/CT25-DataPack/build/CT25-DataPack1/game/data/scripts/handlers/bypasshandlers/BuyShadowItem.java
13c28f0f9785b0bdf611b5e53d80e9d0fdfd27ba
[]
no_license
l2jmaximun/RenerFreya
2f8d303942a80cb3d9c7381e54af049a0792061b
c0c13f48003b96b38012d20539b35aba09e25ac7
refs/heads/master
2021-08-31T19:39:30.116727
2017-12-22T15:20:03
2017-12-22T15:20:03
114,801,613
0
0
null
null
null
null
UTF-8
Java
false
false
2,211
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package handlers.bypasshandlers; import ct25.xtreme.gameserver.handler.IBypassHandler; import ct25.xtreme.gameserver.model.actor.L2Character; import ct25.xtreme.gameserver.model.actor.L2Npc; import ct25.xtreme.gameserver.model.actor.instance.L2MerchantInstance; import ct25.xtreme.gameserver.model.actor.instance.L2PcInstance; import ct25.xtreme.gameserver.network.serverpackets.NpcHtmlMessage; public class BuyShadowItem implements IBypassHandler { private static final String[] COMMANDS = { "BuyShadowItem" }; public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { if (!(target instanceof L2MerchantInstance)) return false; NpcHtmlMessage html = new NpcHtmlMessage(((L2Npc)target).getObjectId()); if (activeChar.getLevel() < 40) html.setFile(activeChar.getHtmlPrefix(), "data/html/common/shadow_item-lowlevel.htm"); else if ((activeChar.getLevel() >= 40) && (activeChar.getLevel() < 46)) html.setFile(activeChar.getHtmlPrefix(), "data/html/common/shadow_item_d.htm"); else if ((activeChar.getLevel() >= 46) && (activeChar.getLevel() < 52)) html.setFile(activeChar.getHtmlPrefix(), "data/html/common/shadow_item_c.htm"); else if (activeChar.getLevel() >= 52) html.setFile(activeChar.getHtmlPrefix(), "data/html/common/shadow_item_b.htm"); html.replace("%objectId%", String.valueOf(((L2Npc)target).getObjectId())); activeChar.sendPacket(html); return true; } public String[] getBypassList() { return COMMANDS; } }
[ "Rener@Rener-PC" ]
Rener@Rener-PC
e634192e7f7e5ae21cd53e8afb6b02c5e1b29eff
4160da090d8dc6eba384c4ccccbd0ea9e016f73f
/src/main/java/io/github/prepayments/internal/batch/prepaymentData/package-info.java
a05ddfc5aee1e3f49a55e43ede2dd81c3e6e2bdf
[]
no_license
prepayments/prepayments-server
03caffecaabcb357981947e652436fe1f314e941
34f9770076c4068322f20ac41ed9f948f970825a
refs/heads/master
2023-02-27T06:57:52.906173
2021-01-29T16:29:19
2021-01-29T16:29:19
329,243,391
0
0
null
null
null
null
UTF-8
Java
false
false
168
java
/** * This package contains configurations for prepayment-data file data file upload batch processing */ package io.github.prepayments.internal.batch.prepaymentData;
[ "mailnjeru@gmail.com" ]
mailnjeru@gmail.com
0860ceb24c9816f8d7efd918954eedf7592b48cd
3abd77888f87b9a874ee9964593e60e01a9e20fb
/sim/EJS/OSP_core/src/org/opensourcephysics/media/gif/GifVideoRecorder.java
e4620ba46c3511ccda4f7f40419806170d341a2e
[ "MIT" ]
permissive
joakimbits/Quflow-and-Perfeco-tools
7149dec3226c939cff10e8dbb6603fd4e936add0
70af4320ead955d22183cd78616c129a730a9d9c
refs/heads/master
2021-01-17T14:02:08.396445
2019-07-12T10:08:07
2019-07-12T10:08:07
1,663,824
2
1
null
null
null
null
UTF-8
Java
false
false
4,823
java
/* * Open Source Physics software is free software as described near the bottom of this code file. * * For additional information and documentation on Open Source Physics please see: * <http://www.opensourcephysics.org/> */ /* * The org.opensourcephysics.media.gif package provides GIF services * including implementations of the Video and VideoRecorder interfaces. * * Copyright (c) 2004 Douglas Brown and Wolfgang Christian. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA * or view the license online at http://www.gnu.org/copyleft/gpl.html * * For additional information and documentation on Open Source Physics, * please see <http://www.opensourcephysics.org/>. */ package org.opensourcephysics.media.gif; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Image; import java.awt.image.BufferedImage; import org.opensourcephysics.media.core.ScratchVideoRecorder; /** * This is a gif video recorder that uses scratch files. * * @author Douglas Brown * @version 1.0 */ public class GifVideoRecorder extends ScratchVideoRecorder { // instance fields private AnimatedGifEncoder encoder = new AnimatedGifEncoder(); /** * Constructs a GifVideoRecorder object. */ public GifVideoRecorder() { super(new GifVideoType()); } /** * Sets the time duration per frame. * * @param millis the duration per frame in milliseconds */ public void setFrameDuration(double millis) { super.setFrameDuration(millis); encoder.setDelay((int) frameDuration); } /** * Gets the encoder used by this recorder. The encoder has methods for * setting a transparent color, setting a repeat count (0 for continuous play), * and setting a quality factor. * * @return the gif encoder */ public AnimatedGifEncoder getGifEncoder() { return encoder; } //________________________________ protected methods _________________________________ /** * Saves the video to the current scratchFile. */ protected void saveScratch() { encoder.finish(); } /** * Starts the video recording process. * * @return true if video recording successfully started */ protected boolean startRecording() { if((dim==null)&&(frameImage!=null)) { dim = new Dimension(frameImage.getWidth(null), frameImage.getHeight(null)); } if(dim!=null) { encoder.setSize(dim.width, dim.height); } encoder.setRepeat(0); return encoder.start(scratchFile.getAbsolutePath()); } /** * Appends a frame to the current video. * * @param image the image to append * @return true if image successfully appended */ protected boolean append(Image image) { BufferedImage bi; if(image instanceof BufferedImage) { bi = (BufferedImage) image; } else { if(dim==null) { return false; } bi = new BufferedImage(dim.width, dim.height, BufferedImage.TYPE_INT_RGB); Graphics2D g = bi.createGraphics(); g.drawImage(image, 0, 0, null); } encoder.addFrame(bi); return true; } } /* * Open Source Physics software is free software; you can redistribute * it and/or modify it under the terms of the GNU General Public License (GPL) as * published by the Free Software Foundation; either version 2 of the License, * or(at your option) any later version. * Code that uses any portion of the code in the org.opensourcephysics package * or any subpackage (subdirectory) of this package must must also be be released * under the GNU GPL license. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA * or view the license online at http://www.gnu.org/copyleft/gpl.html * * Copyright (c) 2007 The Open Source Physics project * http://www.opensourcephysics.org */
[ "joakimbits@gmail.com" ]
joakimbits@gmail.com
428e18046cefeac546f8a4f6ec6baf76c9b84785
5b7b57c14b91d3d578855abebae59549048b1fd9
/AppCommon/src/main/java/com/trade/eight/mpush/util/ByteBuf.java
06f9bc17e0ca465a5aa079df1edce6c4920a645c
[]
no_license
xanhf/8yuan
8c4f50fa7c95ae5f0dfb282f67a7b1c39b0b4711
a8b7f351066f479b3bc8a6037036458008e1624c
refs/heads/master
2021-05-14T19:58:44.462393
2017-11-16T10:31:29
2017-11-16T10:31:55
114,601,135
0
0
null
null
null
null
UTF-8
Java
false
false
3,570
java
/* * (C) Copyright 2015-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. * * Contributors: * ohun@live.cn (夜色) */ package com.trade.eight.mpush.util; import java.nio.*; /** * Created by ohun on 2016/1/21. * * @author ohun@live.cn (夜色) */ public final class ByteBuf { private ByteBuffer tmpNioBuf; public static ByteBuf allocate(int capacity) { ByteBuf buffer = new ByteBuf(); buffer.tmpNioBuf = ByteBuffer.allocate(capacity); return buffer; } public static ByteBuf allocateDirect(int capacity) { ByteBuf buffer = new ByteBuf(); buffer.tmpNioBuf = ByteBuffer.allocateDirect(capacity); return buffer; } public static ByteBuf wrap(byte[] array) { ByteBuf buffer = new ByteBuf(); buffer.tmpNioBuf = ByteBuffer.wrap(array); return buffer; } public byte[] getArray() { tmpNioBuf.flip(); byte[] array = new byte[tmpNioBuf.remaining()]; tmpNioBuf.get(array); tmpNioBuf.compact(); return array; } public ByteBuf get(byte[] array) { tmpNioBuf.get(array); return this; } public byte get() { return tmpNioBuf.get(); } public ByteBuf put(byte b) { checkCapacity(1); tmpNioBuf.put(b); return this; } public short getShort() { return tmpNioBuf.getShort(); } public ByteBuf putShort(int value) { checkCapacity(2); tmpNioBuf.putShort((short) value); return this; } public int getInt() { return tmpNioBuf.getInt(); } public ByteBuf putInt(int value) { checkCapacity(4); tmpNioBuf.putInt(value); return this; } public long getLong() { return tmpNioBuf.getLong(); } public ByteBuf putLong(long value) { checkCapacity(8); tmpNioBuf.putLong(value); return this; } public ByteBuf put(byte[] value) { checkCapacity(value.length); tmpNioBuf.put(value); return this; } public ByteBuf checkCapacity(int minWritableBytes) { int remaining = tmpNioBuf.remaining(); if (remaining < minWritableBytes) { int newCapacity = newCapacity(tmpNioBuf.capacity() + minWritableBytes); ByteBuffer newBuffer = tmpNioBuf.isDirect() ? ByteBuffer.allocateDirect(newCapacity) : ByteBuffer.allocate(newCapacity); tmpNioBuf.flip(); newBuffer.put(tmpNioBuf); tmpNioBuf = newBuffer; } return this; } private int newCapacity(int minNewCapacity) { int newCapacity = 64; while (newCapacity < minNewCapacity) { newCapacity <<= 1; } return newCapacity; } public ByteBuffer nioBuffer() { return tmpNioBuf; } public ByteBuf clear() { tmpNioBuf.clear(); return this; } public ByteBuf flip() { tmpNioBuf.flip(); return this; } }
[ "enricozhang@126.com" ]
enricozhang@126.com
a39e5a70142f5f9fa4da4815f085bfc3afd2bdb0
296cdd8a3ef1d7436c1957e403b47f6a62ba5efb
/src/main/java/com/sds/acube/luxor/webservice/jaxws/GetContentList.java
9c500b923a3ace50b854a502b01d7b34062039ab
[]
no_license
seoyoungrag/byucksan_luxor
6611276e871c13cbb5ea013d49ac79be678f03e5
7ecb824ec8e78e95bd2a962ce4d6c54e3c51b6b3
refs/heads/master
2021-03-16T05:17:42.571476
2017-07-24T08:28:47
2017-07-24T08:28:47
83,280,413
0
0
null
null
null
null
UTF-8
Java
false
false
1,013
java
package com.sds.acube.luxor.webservice.jaxws; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * This class was generated by Apache CXF 2.3.0 * Thu Jul 04 09:36:34 KST 2013 * Generated source version: 2.3.0 */ @XmlRootElement(name = "getContentList", namespace = "http://webservice.luxor.acube.sds.com/") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "getContentList", namespace = "http://webservice.luxor.acube.sds.com/") public class GetContentList { @XmlElement(name = "arg0") private com.sds.acube.luxor.portal.vo.PortalContentVO arg0; public com.sds.acube.luxor.portal.vo.PortalContentVO getArg0() { return this.arg0; } public void setArg0(com.sds.acube.luxor.portal.vo.PortalContentVO newArg0) { this.arg0 = newArg0; } }
[ "truezure@gmail.com" ]
truezure@gmail.com
b95817042a5afb81ee6f33232ac64e48dd797bba
2bc551f9c2ecb57ec0cb93ad18d3ce0bafbddb34
/Spring/Source/springmvc5/src/main/java/example/WebConfig.java
19609668f37ed062d33e9dade1cf844852cc3994
[]
no_license
YiboXu/JavaLearning
c42091d6ca115826c00aad2565d9d0f29b1f5f68
97b4769ebbe096e0ab07acb6889fb177e2ca5abe
refs/heads/master
2022-10-27T23:47:54.637565
2020-06-16T09:12:09
2020-06-16T09:12:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,132
java
package example; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import org.springframework.web.servlet.view.InternalResourceViewResolver; @Configuration @EnableWebMvc @ComponentScan("example.web") //all controller will be put in package example.web public class WebConfig extends WebMvcConfigurerAdapter{ @Bean public ViewResolver viewResolver() { InternalResourceViewResolver resolver =new InternalResourceViewResolver(); resolver.setPrefix("/WEB-INF/views/"); resolver.setSuffix(".jsp"); resolver.setExposeContextBeansAsAttributes(true); return resolver; } @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { configurer.enable(); } }
[ "billtt@163.com" ]
billtt@163.com
6ed4565aa0daf9dffa26d0a6455c0d5f871b232f
7f20b1bddf9f48108a43a9922433b141fac66a6d
/csplugins/trunk/toronto/jm/cy3-stateless-taskfactory-alt1/impl/core-task-impl/src/main/java/org/cytoscape/task/internal/export/network/ExportNetworkViewTaskFactory.java
5ceb5735aaeeeb7496581a35513c6d004727aa7d
[]
no_license
ahdahddl/cytoscape
bf783d44cddda313a5b3563ea746b07f38173022
a3df8f63dba4ec49942027c91ecac6efa920c195
refs/heads/master
2020-06-26T16:48:19.791722
2013-08-28T04:08:31
2013-08-28T04:08:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
671
java
package org.cytoscape.task.internal.export.network; import org.cytoscape.io.write.CyNetworkViewWriterManager; import org.cytoscape.task.AbstractNetworkViewTaskFactory; import org.cytoscape.view.model.CyNetworkView; import org.cytoscape.work.TaskIterator; public class ExportNetworkViewTaskFactory extends AbstractNetworkViewTaskFactory { private CyNetworkViewWriterManager writerManager; public ExportNetworkViewTaskFactory(CyNetworkViewWriterManager writerManager) { this.writerManager = writerManager; } @Override public TaskIterator createTaskIterator(CyNetworkView view) { return new TaskIterator(2,new CyNetworkViewWriter(writerManager, view)); } }
[ "jm@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
jm@0ecc0d97-ab19-0410-9704-bfe1a75892f5
a575bd4ff615f6aed2e2d9956e44c879daa3b488
449cc92656d1f55bd7e58692657cd24792847353
/st-service/src/main/java/com/lj/business/st/dto/wxPmFollow/FindWxPmFollowReportGmPage.java
7f238f7bc387064d189977480a018075e727bc28
[]
no_license
cansou/HLM
f80ae1c71d0ce8ead95c00044a318796820a8c1e
69d859700bfc074b5948b6f2c11734ea2e030327
refs/heads/master
2022-08-27T16:40:17.206566
2019-12-18T06:48:10
2019-12-18T06:48:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,346
java
package com.lj.business.st.dto.wxPmFollow; import java.util.Date; import com.lj.base.core.pagination.PageParamEntity; public class FindWxPmFollowReportGmPage extends PageParamEntity { /** * */ private static final long serialVersionUID = -5906336118089412730L; /** * 商户编号 */ private String merchantNo; /** * 日报日期 */ private Date reportDate; /** * 经销商代码 */ private String dealerCode; /** * 经销商名称 */ private String companyName; /** * 门店代码 */ private String shopCode; /** * 门店名称 */ private String shopName; public String getMerchantNo() { return merchantNo; } public void setMerchantNo(String merchantNo) { this.merchantNo = merchantNo; } public Date getReportDate() { return reportDate; } public void setReportDate(Date reportDate) { this.reportDate = reportDate; } public String getDealerCode() { return dealerCode; } public void setDealerCode(String dealerCode) { this.dealerCode = dealerCode; } public String getCompanyName() { return companyName; } public void setCompanyName(String companyName) { this.companyName = companyName; } public String getShopCode() { return shopCode; } public void setShopCode(String shopCode) { this.shopCode = shopCode; } public String getShopName() { return shopName; } public void setShopName(String shopName) { this.shopName = shopName; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("FindWxPmFollowReportGmPage [merchantNo="); builder.append(merchantNo); builder.append(", reportDate="); builder.append(reportDate); builder.append(", dealerCode="); builder.append(dealerCode); builder.append(", companyName="); builder.append(companyName); builder.append(", shopCode="); builder.append(shopCode); builder.append(", shopName="); builder.append(shopName); builder.append("]"); return builder.toString(); } }
[ "37724558+wo510751575@users.noreply.github.com" ]
37724558+wo510751575@users.noreply.github.com
b1e80e5c53b5955fa6c5e47c6d85048b75292e1f
975945cf2c76b20d5d4448b89f7057e33d1a9ebc
/zxing/src/main/java/com/baozi/baoziszxing/MainActivity.java
569e5f177bb5392d0898dbed6fe0911e6bf23353
[]
no_license
gy121681/Share
aa64f67746f88d55e884e5ae48b3789422175f8f
031286dc1d2ce4ebe7fe2665ebd525d1946ad163
refs/heads/master
2021-01-15T12:02:34.908825
2017-08-08T03:01:07
2017-08-08T03:01:07
99,643,530
3
0
null
null
null
null
UTF-8
Java
false
false
2,428
java
//package com.baozi.baoziszxing; // //import android.app.Activity; //import android.content.Intent; //import android.os.Bundle; //import android.support.v4.app.Fragment; //import android.view.LayoutInflater; //import android.view.View; //import android.view.View.OnClickListener; //import android.view.ViewGroup; //import android.widget.TextView; // //import com.baozi.Zxing.CaptureActivity; //import com.example.baoziszxing.R; // ///** // * // * @author Baozi // * @联系方式: 2221673069@qq.com // * // * @描述: 1 project能扫描二维码和普通一维码 ; // * // * 2 能从相册拿到二维码照片然后进行解析 --->注意 照片中的二维码 在拍摄的时候需要正对齐 否则会解析不出 // * // * 3 针对大部分中文解决乱码问题 , 但依旧会有部分编码格式会出现中文乱码 如解决请联系我 QQ:2221673069 // * // * 4 Zxing在使用过程中发现了新问题 :如果扫描的时候手机与二维码的角度超过30度左右的时候就解析不了 如解决请联系我 // * QQ:2221673069 // * // * 谢谢大家 希望对大家有用 // */ //public class MainActivity extends Activity { // // @Override // protected void onCreate(Bundle savedInstanceState) { // super.onCreate(savedInstanceState); // setContentView(R.layout.activity_main); // // findViewById(R.id.button1).setOnClickListener(new OnClickListener() { // // @Override // public void onClick(View v) { // // TODO Auto-generated method stub // Intent intent = new Intent(MainActivity.this, // CaptureActivity.class); // // startActivityForResult(intent, 100); // // } // }); // } // // @Override // protected void onActivityResult(int arg0, int arg1, Intent data) { // super.onActivityResult(arg0, arg1, data); // // /** // * 拿到解析完成的字符串 // */ // if (data != null) { // TextView text = (TextView) findViewById(R.id.textView1); // text.setText(data.getStringExtra("result")); // } // } // // /** // * A placeholder fragment containing a simple view. // */ // public static class PlaceholderFragment extends Fragment { // // public PlaceholderFragment() { // } // // @Override // public View onCreateView(LayoutInflater inflater, ViewGroup container, // Bundle savedInstanceState) { // View rootView = inflater.inflate(R.layout.fragment_main, container, // false); // return rootView; // } // } // //}
[ "295306443@qq.com" ]
295306443@qq.com
590e51f9377bc8391d0c99d0f759fd75583a96e8
3334bee9484db954c4508ad507f6de0d154a939f
/d3n/java-src/tombola-service-api/src/main/java/de/ascendro/f4m/service/tombola/TombolaMessageTypes.java
251ab54cf4bbc26e4399ffd5eac47de1eac74b9e
[]
no_license
VUAN86/d3n
c2fc46fc1f188d08fa6862e33cac56762e006f71
e5d6ac654821f89b7f4f653e2aaef3de7c621f8b
refs/heads/master
2020-05-07T19:25:43.926090
2019-04-12T07:25:55
2019-04-12T07:25:55
180,806,736
0
1
null
null
null
null
UTF-8
Java
false
false
1,073
java
package de.ascendro.f4m.service.tombola; import de.ascendro.f4m.service.json.model.type.MessageType; public enum TombolaMessageTypes implements MessageType { TOMBOLA_GET, TOMBOLA_GET_RESPONSE, TOMBOLA_LIST, TOMBOLA_LIST_RESPONSE, TOMBOLA_BUY, TOMBOLA_BUY_RESPONSE, TOMBOLA_DRAWING_GET, TOMBOLA_DRAWING_GET_RESPONSE, TOMBOLA_DRAWING_LIST, TOMBOLA_DRAWING_LIST_RESPONSE, USER_TOMBOLA_LIST, USER_TOMBOLA_LIST_RESPONSE, USER_TOMBOLA_GET, USER_TOMBOLA_GET_RESPONSE, TOMBOLA_WINNER_LIST, TOMBOLA_WINNER_LIST_RESPONSE, MOVE_TOMBOLAS, MOVE_TOMBOLAS_RESPONSE, TOMBOLA_BUYER_LIST, TOMBOLA_BUYER_LIST_RESPONSE, TOMBOLA_OPEN_CHECKOUT, TOMBOLA_OPEN_CHECKOUT_RESPONSE, TOMBOLA_CLOSE_CHECKOUT, TOMBOLA_CLOSE_CHECKOUT_RESPONSE, TOMBOLA_DRAW, TOMBOLA_DRAW_RESPONSE; public static final String SERVICE_NAME = "tombola"; @Override public String getShortName() { return convertEnumNameToMessageShortName(name()); } @Override public String getNamespace() { return SERVICE_NAME; } }
[ "vuan86@ya.ru" ]
vuan86@ya.ru
c0bb7ba4a3b5078a5a7d994dd37cd932ab72d123
73017c737d59acdb62b0dbf6e177ddf38518cf9b
/common/src/main/java/io/github/aquerr/eaglefactions/common/commands/DisbandCommand.java
ddf4ec5f494d153453d613601f352ec82ddb2625
[ "MIT" ]
permissive
michalzielinski913/EagleFactions
88ce90bef37f9d3a951fe645ba73a1547a59c845
a5c2ac3aa71f7bc39a710b7f7b25247cef3a0a68
refs/heads/master
2022-04-12T06:38:25.743986
2020-03-08T13:28:05
2020-03-08T13:28:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,019
java
package io.github.aquerr.eaglefactions.common.commands; import io.github.aquerr.eaglefactions.api.EagleFactions; import io.github.aquerr.eaglefactions.api.entities.Faction; import io.github.aquerr.eaglefactions.common.EagleFactionsPlugin; import io.github.aquerr.eaglefactions.common.PluginInfo; import io.github.aquerr.eaglefactions.common.messaging.MessageLoader; import io.github.aquerr.eaglefactions.common.messaging.Messages; import io.github.aquerr.eaglefactions.common.messaging.Placeholders; import org.spongepowered.api.command.CommandException; import org.spongepowered.api.command.CommandResult; import org.spongepowered.api.command.CommandSource; import org.spongepowered.api.command.args.CommandContext; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.text.Text; import org.spongepowered.api.text.format.TextColors; import java.util.Collections; import java.util.Optional; public class DisbandCommand extends AbstractCommand { public DisbandCommand(EagleFactions plugin) { super(plugin); } @Override public CommandResult execute(CommandSource source, CommandContext context) throws CommandException { if(!(source instanceof Player)) throw new CommandException(Text.of(PluginInfo.ERROR_PREFIX, TextColors.RED, Messages.ONLY_IN_GAME_PLAYERS_CAN_USE_THIS_COMMAND)); final Player player = (Player) source; // There's a bit of code duplicating, but... Optional<String> optionalFactionName = context.<String>getOne("faction name"); if (optionalFactionName.isPresent()) { if (!EagleFactionsPlugin.ADMIN_MODE_PLAYERS.contains(player.getUniqueId())) throw new CommandException(Text.of(PluginInfo.ERROR_PREFIX, TextColors.RED, Messages.YOU_NEED_TO_TOGGLE_FACTION_ADMIN_MODE_TO_DO_THIS)); Faction faction = super.getPlugin().getFactionLogic().getFactionByName(optionalFactionName.get()); if (faction == null) throw new CommandException(Text.of(PluginInfo.ERROR_PREFIX, TextColors.RED, MessageLoader.parseMessage(Messages.THERE_IS_NO_FACTION_CALLED_FACTION_NAME, Collections.singletonMap(Placeholders.FACTION_NAME, Text.of(TextColors.GOLD, optionalFactionName.get()))))); boolean didSecceed = super.getPlugin().getFactionLogic().disbandFaction(faction.getName()); if (didSecceed) { player.sendMessage(Text.of(PluginInfo.PLUGIN_PREFIX, TextColors.GREEN, Messages.FACTION_HAS_BEEN_DISBANDED)); } else { player.sendMessage(Text.of(PluginInfo.PLUGIN_PREFIX, TextColors.RED, Messages.SOMETHING_WENT_WRONG)); } return CommandResult.success(); } Optional<Faction> optionalPlayerFaction = super.getPlugin().getFactionLogic().getFactionByPlayerUUID(player.getUniqueId()); if(!optionalPlayerFaction.isPresent()) throw new CommandException(Text.of(PluginInfo.ERROR_PREFIX, TextColors.RED, Messages.YOU_MUST_BE_IN_FACTION_IN_ORDER_TO_USE_THIS_COMMAND)); Faction playerFaction = optionalPlayerFaction.get(); if(playerFaction.getName().equalsIgnoreCase("SafeZone") || playerFaction.getName().equalsIgnoreCase("WarZone")) throw new CommandException(Text.of(PluginInfo.ERROR_PREFIX, TextColors.RED, "This faction cannot be disbanded!")); //If player has adminmode if(EagleFactionsPlugin.ADMIN_MODE_PLAYERS.contains(player.getUniqueId())) { boolean didSucceed = super.getPlugin().getFactionLogic().disbandFaction(playerFaction.getName()); if(didSucceed) { player.sendMessage(Text.of(PluginInfo.PLUGIN_PREFIX, TextColors.GREEN, Messages.FACTION_HAS_BEEN_DISBANDED)); EagleFactionsPlugin.AUTO_CLAIM_LIST.remove(player.getUniqueId()); EagleFactionsPlugin.CHAT_LIST.remove(player.getUniqueId()); } else { player.sendMessage(Text.of(PluginInfo.PLUGIN_PREFIX, TextColors.RED, Messages.SOMETHING_WENT_WRONG)); } return CommandResult.success(); } //If player is leader if(!playerFaction.getLeader().equals(player.getUniqueId())) throw new CommandException(Text.of(PluginInfo.ERROR_PREFIX, Messages.YOU_MUST_BE_THE_FACTIONS_LEADER_TO_DO_THIS)); boolean didSucceed = super.getPlugin().getFactionLogic().disbandFaction(playerFaction.getName()); if(didSucceed) { player.sendMessage(Text.of(PluginInfo.PLUGIN_PREFIX, TextColors.GREEN, Messages.FACTION_HAS_BEEN_DISBANDED)); EagleFactionsPlugin.AUTO_CLAIM_LIST.remove(player.getUniqueId()); EagleFactionsPlugin.CHAT_LIST.remove(player.getUniqueId()); } else { player.sendMessage(Text.of(PluginInfo.PLUGIN_PREFIX, TextColors.RED, Messages.SOMETHING_WENT_WRONG)); } return CommandResult.success(); } }
[ "nerdianin@gmail.com" ]
nerdianin@gmail.com
9d81377d6e41c1295f768755e2f694302ebe1a66
a0cf8ed1e6f806bc9c6d969f3ab2947a0ddbdfce
/MSG/.svn/pristine/2f/2fa39e51104f132f544f8f51a1c33be70e2ec1b4.svn-base
742cba6a3f6afd908b17326302d2406915c7a47c
[]
no_license
misunyu/Mujava-Clustering
35aa8480de81e6c2351ba860fc59c090b007d096
026192effef89f428dc279d76e2d8188bee86a96
refs/heads/master
2020-03-11T12:15:49.074291
2018-05-08T00:12:53
2018-05-08T00:12:53
129,992,561
0
0
null
null
null
null
UTF-8
Java
false
false
3,856
package MSG.traditional; import MSG.MSGConstraints; import MSG.MutantMonitor; public class AOISMetaMutant { public static double AOIS(double originalAfter) { int op = MutantMonitor.subID; double mutantValue = 0; if (op == MSGConstraints.U_PRE_INCREMENT) mutantValue = originalAfter; else if (op == MSGConstraints.U_PRE_DECREMENT) mutantValue = originalAfter; else if (op == MSGConstraints.U_POST_INCREMENT) mutantValue = originalAfter - 1; else if (op == MSGConstraints.U_POST_DECREMENT) mutantValue = originalAfter + 1; return mutantValue; } public static float AOIS(float originalAfter) { int op = MutantMonitor.subID; float mutantValue = 0; if (op == MSGConstraints.U_PRE_INCREMENT) mutantValue = originalAfter; else if (op == MSGConstraints.U_PRE_DECREMENT) mutantValue = originalAfter; else if (op == MSGConstraints.U_POST_INCREMENT) mutantValue = originalAfter - 1; else if (op == MSGConstraints.U_POST_DECREMENT) mutantValue = originalAfter + 1; return mutantValue; } public static int AOIS(int originalAfter) { int op = MutantMonitor.subID; int mutantValue = 0; if (op == MSGConstraints.U_PRE_INCREMENT) mutantValue = originalAfter; else if (op == MSGConstraints.U_PRE_DECREMENT) mutantValue = originalAfter; else if (op == MSGConstraints.U_POST_INCREMENT) mutantValue = originalAfter - 1; else if (op == MSGConstraints.U_POST_DECREMENT) mutantValue = originalAfter + 1; return mutantValue; } public static long AOIS(long originalAfter) { int op = MutantMonitor.subID; long mutantValue = 0; if (op == MSGConstraints.U_PRE_INCREMENT) mutantValue = originalAfter; else if (op == MSGConstraints.U_PRE_DECREMENT) mutantValue = originalAfter; else if (op == MSGConstraints.U_POST_INCREMENT) mutantValue = originalAfter - 1; else if (op == MSGConstraints.U_POST_DECREMENT) mutantValue = originalAfter + 1; return mutantValue; } public static double AOISValue(double original) { int op = MutantMonitor.subID; double returnValue = original; if (MSGConstraints.U_PRE_INCREMENT == op) { returnValue = original + 1; } else if (MSGConstraints.U_PRE_DECREMENT == op) { returnValue = original - 1; } else if (MSGConstraints.U_POST_INCREMENT == op) { returnValue = original + 1; } else if (MSGConstraints.U_POST_DECREMENT == op) { returnValue = original - 1; } return returnValue; } public static float AOISValue(float original) { int op = MutantMonitor.subID; float returnValue = original; if (MSGConstraints.U_PRE_INCREMENT == op) { returnValue = original + 1; } else if (MSGConstraints.U_PRE_DECREMENT == op) { returnValue = original - 1; } else if (MSGConstraints.U_POST_INCREMENT == op) { returnValue = original + 1; } else if (MSGConstraints.U_POST_DECREMENT == op) { returnValue = original - 1; } return returnValue; } public static int AOISValue(int original) { int op = MutantMonitor.subID; int returnValue = original; if (MSGConstraints.U_PRE_INCREMENT == op) { returnValue = original + 1; } else if (MSGConstraints.U_PRE_DECREMENT == op) { returnValue = original - 1; } else if (MSGConstraints.U_POST_INCREMENT == op) { returnValue = original + 1; } else if (MSGConstraints.U_POST_DECREMENT == op) { returnValue = original - 1; } return returnValue; } public static long AOISValue(long original) { int op = MutantMonitor.subID; long returnValue = original; if (MSGConstraints.U_PRE_INCREMENT == op) { returnValue = original + 1; } else if (MSGConstraints.U_PRE_DECREMENT == op) { returnValue = original - 1; } else if (MSGConstraints.U_POST_INCREMENT == op) { returnValue = original + 1; } else if (MSGConstraints.U_POST_DECREMENT == op) { returnValue = original - 1; } return returnValue; } }
[ "misunyu@gmail.com" ]
misunyu@gmail.com
63648d880885dfb739ee4fc79234cae26671306b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_06f5f0c8eca2984a3dd78428d9045ca16ec77460/HttpPollingFunctionalTestCase/1_06f5f0c8eca2984a3dd78428d9045ca16ec77460_HttpPollingFunctionalTestCase_t.java
6885fbdf0754640faea6b2197684497abc782787
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,277
java
package com.muleinaction; import org.mule.api.service.Service; import org.mule.api.context.notification.EndpointMessageNotificationListener; import org.mule.api.context.notification.ServerNotification; import org.mule.tck.FunctionalTestCase; import org.mule.context.notification.EndpointMessageNotification; import org.apache.commons.io.FileUtils; import org.apache.commons.io.filefilter.WildcardFileFilter; import java.io.File; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; /** * @author John D'Emic (john.demic@gmail.com) */ public class HttpPollingFunctionalTestCase extends FunctionalTestCase { private static String DEST_DIRECTORY = "./data/polling"; private CountDownLatch latch = new CountDownLatch(1); protected void doSetUp() throws Exception { super.doSetUp(); for (Object o : FileUtils.listFiles(new File(DEST_DIRECTORY), new String[]{"html"}, false)) { File file = (File) o; file.delete(); } muleContext.registerListener(new EndpointMessageNotificationListener() { public void onNotification(final ServerNotification notification) { if ("httpPollingService".equals(notification.getResourceIdentifier())) { final EndpointMessageNotification messageNotification = (EndpointMessageNotification) notification; if (messageNotification.getEndpoint().getName().equals("endpoint.file.data.polling")) { latch.countDown(); } } } }); } @Override protected String getConfigResources() { return "conf/http-polling-config.xml"; } public void testCorrectlyInitialized() throws Exception { final Service service = muleContext.getRegistry().lookupService( "httpPollingService"); assertNotNull(service); assertEquals("httpPollingModel", service.getModel().getName()); assertTrue("Message did not reach directory on time", latch.await(15, TimeUnit.SECONDS)); assertEquals(1, FileUtils.listFiles(new File(DEST_DIRECTORY), new WildcardFileFilter("*.*"), null).size()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
48875b87b3a621a28f6776774892a11b258bb56f
821ed0666d39420d2da9362d090d67915d469cc5
/core/api/src/test/java/org/onosproject/net/topology/PathServiceAdapter.java
3e699e9bd78a43de0f0cb120376f74fcbcd89e04
[ "Apache-2.0" ]
permissive
LenkayHuang/Onos-PNC-for-PCEP
03b67dcdd280565169f2543029279750da0c6540
bd7d201aba89a713f5ba6ffb473aacff85e4d38c
refs/heads/master
2021-01-01T05:19:31.547809
2016-04-12T07:25:13
2016-04-12T07:25:13
56,041,394
1
0
null
null
null
null
UTF-8
Java
false
false
1,947
java
/* * Copyright 2015 Open Networking Laboratory * * 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.onosproject.net.topology; import org.onosproject.net.DisjointPath; import org.onosproject.net.ElementId; import org.onosproject.net.Link; import org.onosproject.net.Path; import java.util.Map; import java.util.Set; /** * Test adapter for path service. */ public class PathServiceAdapter implements PathService { @Override public Set<Path> getPaths(ElementId src, ElementId dst) { return null; } @Override public Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight) { return null; } @Override public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst) { return null; } @Override public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeight weight) { return null; } @Override public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, Map<Link, Object> riskProfile) { return null; } @Override public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeight weight, Map<Link, Object> riskProfile) { return null; } }
[ "826080529@qq.com" ]
826080529@qq.com
b37f90716a1f09054c2702e84cd94907ef3f5f41
3b510e7c35a0d6d10131436f09fb81a3f9414c13
/randoop/src/main/java/randoop/operation/EnumConstant.java
d325f2bd4ec7d44dc45b585b7f49d0872b8aad7d
[ "MIT", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
Groostav/CMPT880-term-project
f9e680b5d54f6ff18ee2e21f091b0732bb831220
6120c4de0780aaea78870c3842be9a299b9e3100
refs/heads/master
2016-08-12T22:05:57.654319
2016-04-19T08:13:43
2016-04-19T08:13:43
55,188,786
0
1
null
null
null
null
UTF-8
Java
false
false
6,551
java
package randoop.operation; import java.io.PrintStream; import java.io.Serializable; import java.util.Collections; import java.util.List; import randoop.ExecutionOutcome; import randoop.NormalExecution; import randoop.sequence.Variable; import randoop.types.TypeNames; /** * EnumConstant is an {@link Operation} representing a constant value from an * enum. * <p> * Using the formal notation in {@link Operation}, a constant named BLUE from * the enum Colors is an operation BLUE : [] &rarr; Colors. * <p> * Execution simply returns the constant value. */ public class EnumConstant extends AbstractOperation implements Operation, Serializable { private static final long serialVersionUID = 849994347169442078L; public static final String ID = "enum"; private Enum<?> value; public EnumConstant(Enum<?> value) { if (value == null) { throw new IllegalArgumentException("enum constant cannot be null"); } this.value = value; } @Override public boolean equals(Object obj) { if (obj instanceof EnumConstant) { EnumConstant e = (EnumConstant) obj; return equals(e); } return false; } public boolean equals(EnumConstant e) { return (this.value.equals(e.value)); } @Override public int hashCode() { return value.hashCode(); } @Override public String toString() { return toParseableString(); } /** * {@inheritDoc} * * @return an empty list. */ @Override public List<Class<?>> getInputTypes() { return Collections.emptyList(); } public Class<?> type() { return value.getDeclaringClass(); } /** * {@inheritDoc} * * @return the enum type. */ @Override public Class<?> getOutputType() { return type(); } /** * {@inheritDoc} * * @return a {@link NormalExecution} object holding the value of the enum * constant. */ @Override public ExecutionOutcome execute(Object[] statementInput, PrintStream out) { assert statementInput.length == 0; return new NormalExecution(this.value, 0); } /** * {@inheritDoc} Adds qualified name of enum constant. */ @Override public void appendCode(List<Variable> inputVars, StringBuilder b) { b.append(TypeNames.getCompilableName(type()) + "." + this.value.name()); } /** * {@inheritDoc} Issues a string representation of an enum constant as a * type-value pair. The parse function should return an equivalent object. * * @see EnumConstant#parse(String) */ @Override public String toParseableString() { return type().getName() + ":" + value.name(); } /** * Parses the description of an enum constant value in a string as returned by * {@link EnumConstant#toParseableString()}. * * Valid strings may be of the form EnumType:EnumValue, or * OuterClass$InnerEnum:EnumValue for an enum that is an inner type of a * class. * * @param desc * string representing type-value pair for an enum constant * @return an EnumConstant representing the enum constant value in desc * @throws OperationParseException * if desc does not match expected form. */ public static EnumConstant parse(String desc) throws OperationParseException { if (desc == null) { throw new IllegalArgumentException("s cannot be null"); } int colonIdx = desc.indexOf(':'); if (colonIdx < 0) { String msg = "An enum constant description must be of the form \"" + "<type>:<value>" + " but description is \"" + desc + "\"."; throw new OperationParseException(msg); } String typeName = desc.substring(0, colonIdx).trim(); String valueName = desc.substring(colonIdx + 1).trim(); Enum<?> value = null; String errorPrefix = "Error when parsing type-value pair " + desc + " for an enum description of the form <type>:<value>."; if (typeName.isEmpty()) { String msg = errorPrefix + " No type given."; throw new OperationParseException(msg); } if (valueName.isEmpty()) { String msg = errorPrefix + " No value given."; throw new OperationParseException(msg); } String whitespacePattern = ".*\\s+.*"; if (typeName.matches(whitespacePattern)) { String msg = errorPrefix + " The type has unexpected whitespace characters."; throw new OperationParseException(msg); } if (valueName.matches(whitespacePattern)) { String msg = errorPrefix + " The value has unexpected whitespace characters."; throw new OperationParseException(msg); } Class<?> type; try { type = TypeNames.getTypeForName(typeName); } catch (ClassNotFoundException e) { String msg = errorPrefix + " The type given \"" + typeName + "\" was not recognized."; throw new OperationParseException(msg); } if (!type.isEnum()) { String msg = errorPrefix + " The type given \"" + typeName + "\" is not an enum."; throw new OperationParseException(msg); } value = valueOf(type, valueName); if (value == null) { String msg = errorPrefix + " The value given \"" + valueName + "\" is not a constant of the enum " + typeName + "."; throw new OperationParseException(msg); } return new EnumConstant(value); } /** * valueOf searches the enum constant list of a class for a constant with the * given name. Note: cannot make this work using valueOf method of Enum due to * typing. * * @param type * class that is already known to be an enum. * @param valueName * name for value that may be a constant of the enum. * @return reference to actual constant value, or null if none exists in type. */ private static Enum<?> valueOf(Class<?> type, String valueName) { for (Object obj : type.getEnumConstants()) { Enum<?> e = (Enum<?>) obj; if (e.name().equals(valueName)) { return e; } } return null; } /** * value * * @return object for value of enum constant. */ public Enum<?> value() { return this.value; } /** * {@inheritDoc} * * @return value of enum constant. */ @Override public Object getValue() { return value(); } /** * {@inheritDoc} * * @return enclosing enum type. */ @Override public Class<?> getDeclaringClass() { return value.getDeclaringClass(); } }
[ "geoff_groos@msn.com" ]
geoff_groos@msn.com
ca1d149b22fe0c1fe14799a21b82e1a7ddb19036
da0efa8ffd08b86713aad007f10794c4b04d8267
/com/google/android/gms/common/internal/safeparcel/C0675a.java
e661522d04cbfd7203a1adba1f1b3751c0a295a6
[]
no_license
ibeae/tcash
e200c209c63fdfe63928b94846824d7091533f8a
4bd25deb63ea7605202514f6a405961a14ef2553
refs/heads/master
2020-05-05T13:09:34.582260
2017-09-07T06:19:19
2017-09-07T06:19:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,930
java
package com.google.android.gms.common.internal.safeparcel; import android.os.Bundle; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import com.actionbarsherlock.view.Menu; import java.util.ArrayList; import java.util.List; public class C0675a { public static class C0674a extends RuntimeException { public C0674a(String str, Parcel parcel) { super(str + " Parcel: pos=" + parcel.dataPosition() + " size=" + parcel.dataSize()); } } public static int m1480a(int i) { return Menu.USER_MASK & i; } public static int m1481a(Parcel parcel) { return parcel.readInt(); } public static int m1482a(Parcel parcel, int i) { return (i & Menu.CATEGORY_MASK) != Menu.CATEGORY_MASK ? (i >> 16) & Menu.USER_MASK : parcel.readInt(); } public static <T extends Parcelable> T m1483a(Parcel parcel, int i, Creator<T> creator) { int a = C0675a.m1482a(parcel, i); int dataPosition = parcel.dataPosition(); if (a == 0) { return null; } Parcelable parcelable = (Parcelable) creator.createFromParcel(parcel); parcel.setDataPosition(a + dataPosition); return parcelable; } private static void m1484a(Parcel parcel, int i, int i2) { int a = C0675a.m1482a(parcel, i); if (a != i2) { throw new C0674a("Expected size " + i2 + " got " + a + " (0x" + Integer.toHexString(a) + ")", parcel); } } private static void m1485a(Parcel parcel, int i, int i2, int i3) { if (i2 != i3) { throw new C0674a("Expected size " + i3 + " got " + i2 + " (0x" + Integer.toHexString(i2) + ")", parcel); } } public static void m1486a(Parcel parcel, int i, List list, ClassLoader classLoader) { int a = C0675a.m1482a(parcel, i); int dataPosition = parcel.dataPosition(); if (a != 0) { parcel.readList(list, classLoader); parcel.setDataPosition(a + dataPosition); } } public static int m1487b(Parcel parcel) { int a = C0675a.m1481a(parcel); int a2 = C0675a.m1482a(parcel, a); int dataPosition = parcel.dataPosition(); if (C0675a.m1480a(a) != 20293) { throw new C0674a("Expected object header. Got 0x" + Integer.toHexString(a), parcel); } a = dataPosition + a2; if (a >= dataPosition && a <= parcel.dataSize()) { return a; } throw new C0674a("Size read is invalid start=" + dataPosition + " end=" + a, parcel); } public static void m1488b(Parcel parcel, int i) { parcel.setDataPosition(C0675a.m1482a(parcel, i) + parcel.dataPosition()); } public static <T> T[] m1489b(Parcel parcel, int i, Creator<T> creator) { int a = C0675a.m1482a(parcel, i); int dataPosition = parcel.dataPosition(); if (a == 0) { return null; } T[] createTypedArray = parcel.createTypedArray(creator); parcel.setDataPosition(a + dataPosition); return createTypedArray; } public static <T> ArrayList<T> m1490c(Parcel parcel, int i, Creator<T> creator) { int a = C0675a.m1482a(parcel, i); int dataPosition = parcel.dataPosition(); if (a == 0) { return null; } ArrayList<T> createTypedArrayList = parcel.createTypedArrayList(creator); parcel.setDataPosition(a + dataPosition); return createTypedArrayList; } public static boolean m1491c(Parcel parcel, int i) { C0675a.m1484a(parcel, i, 4); return parcel.readInt() != 0; } public static byte m1492d(Parcel parcel, int i) { C0675a.m1484a(parcel, i, 4); return (byte) parcel.readInt(); } public static short m1493e(Parcel parcel, int i) { C0675a.m1484a(parcel, i, 4); return (short) parcel.readInt(); } public static int m1494f(Parcel parcel, int i) { C0675a.m1484a(parcel, i, 4); return parcel.readInt(); } public static Integer m1495g(Parcel parcel, int i) { int a = C0675a.m1482a(parcel, i); if (a == 0) { return null; } C0675a.m1485a(parcel, i, a, 4); return Integer.valueOf(parcel.readInt()); } public static long m1496h(Parcel parcel, int i) { C0675a.m1484a(parcel, i, 8); return parcel.readLong(); } public static float m1497i(Parcel parcel, int i) { C0675a.m1484a(parcel, i, 4); return parcel.readFloat(); } public static double m1498j(Parcel parcel, int i) { C0675a.m1484a(parcel, i, 8); return parcel.readDouble(); } public static String m1499k(Parcel parcel, int i) { int a = C0675a.m1482a(parcel, i); int dataPosition = parcel.dataPosition(); if (a == 0) { return null; } String readString = parcel.readString(); parcel.setDataPosition(a + dataPosition); return readString; } public static IBinder m1500l(Parcel parcel, int i) { int a = C0675a.m1482a(parcel, i); int dataPosition = parcel.dataPosition(); if (a == 0) { return null; } IBinder readStrongBinder = parcel.readStrongBinder(); parcel.setDataPosition(a + dataPosition); return readStrongBinder; } public static Bundle m1501m(Parcel parcel, int i) { int a = C0675a.m1482a(parcel, i); int dataPosition = parcel.dataPosition(); if (a == 0) { return null; } Bundle readBundle = parcel.readBundle(); parcel.setDataPosition(a + dataPosition); return readBundle; } public static byte[] m1502n(Parcel parcel, int i) { int a = C0675a.m1482a(parcel, i); int dataPosition = parcel.dataPosition(); if (a == 0) { return null; } byte[] createByteArray = parcel.createByteArray(); parcel.setDataPosition(a + dataPosition); return createByteArray; } public static String[] m1503o(Parcel parcel, int i) { int a = C0675a.m1482a(parcel, i); int dataPosition = parcel.dataPosition(); if (a == 0) { return null; } String[] createStringArray = parcel.createStringArray(); parcel.setDataPosition(a + dataPosition); return createStringArray; } public static ArrayList<String> m1504p(Parcel parcel, int i) { int a = C0675a.m1482a(parcel, i); int dataPosition = parcel.dataPosition(); if (a == 0) { return null; } ArrayList<String> createStringArrayList = parcel.createStringArrayList(); parcel.setDataPosition(a + dataPosition); return createStringArrayList; } }
[ "igedetirtanata@gmail.com" ]
igedetirtanata@gmail.com
d58eab93d22d6a1455be6a7af51f4e13f2545e98
40665051fadf3fb75e5a8f655362126c1a2a3af6
/ibinti-bugvm/c7354112b42a6c63431710a0ca33ef44998cc0a3/6369/AVCaptureFileOutput.java
75c74db19326bdfc876e3c5747640b4dc399545a
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
3,533
java
/* * Copyright (C) 2013-2015 RoboVM AB * * 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.bugvm.apple.avfoundation; /*<imports>*/ import java.io.*; import java.nio.*; import java.util.*; import com.bugvm.objc.*; import com.bugvm.objc.annotation.*; import com.bugvm.objc.block.*; import com.bugvm.rt.*; import com.bugvm.rt.annotation.*; import com.bugvm.rt.bro.*; import com.bugvm.rt.bro.annotation.*; import com.bugvm.rt.bro.ptr.*; import com.bugvm.apple.foundation.*; import com.bugvm.apple.corefoundation.*; import com.bugvm.apple.dispatch.*; import com.bugvm.apple.coreanimation.*; import com.bugvm.apple.coreimage.*; import com.bugvm.apple.coregraphics.*; import com.bugvm.apple.coreaudio.*; import com.bugvm.apple.coremedia.*; import com.bugvm.apple.corevideo.*; import com.bugvm.apple.mediatoolbox.*; import com.bugvm.apple.audiotoolbox.*; import com.bugvm.apple.audiounit.*; /*</imports>*/ /*<javadoc>*/ /** * @since Available in iOS 4.0 and later. */ /*</javadoc>*/ /*<annotations>*/@Library("AVFoundation") @NativeClass/*</annotations>*/ /*<visibility>*/public/*</visibility>*/ class /*<name>*/AVCaptureFileOutput/*</name>*/ extends /*<extends>*/AVCaptureOutput/*</extends>*/ /*<implements>*//*</implements>*/ { /*<ptr>*/public static class AVCaptureFileOutputPtr extends Ptr<AVCaptureFileOutput, AVCaptureFileOutputPtr> {}/*</ptr>*/ /*<bind>*/static { ObjCRuntime.bind(AVCaptureFileOutput.class); }/*</bind>*/ /*<constants>*//*</constants>*/ /*<constructors>*/ public AVCaptureFileOutput() {} protected AVCaptureFileOutput(SkipInit skipInit) { super(skipInit); } /*</constructors>*/ /*<properties>*/ @Property(selector = "outputFileURL") public native NSURL getOutputFileURL(); @Property(selector = "isRecording") public native boolean isRecording(); @Property(selector = "recordedDuration") public native @ByVal CMTime getRecordedDuration(); @Property(selector = "recordedFileSize") public native long getRecordedFileSize(); @Property(selector = "maxRecordedDuration") public native @ByVal CMTime getMaxRecordedDuration(); @Property(selector = "setMaxRecordedDuration:") public native void setMaxRecordedDuration(@ByVal CMTime v); @Property(selector = "maxRecordedFileSize") public native long getMaxRecordedFileSize(); @Property(selector = "setMaxRecordedFileSize:") public native void setMaxRecordedFileSize(long v); @Property(selector = "minFreeDiskSpaceLimit") public native long getMinFreeDiskSpaceLimit(); @Property(selector = "setMinFreeDiskSpaceLimit:") public native void setMinFreeDiskSpaceLimit(long v); /*</properties>*/ /*<members>*//*</members>*/ /*<methods>*/ @Method(selector = "startRecordingToOutputFileURL:recordingDelegate:") public native void startRecording(NSURL outputFileURL, AVCaptureFileOutputRecordingDelegate delegate); @Method(selector = "stopRecording") public native void stopRecording(); /*</methods>*/ }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
ee7fa6c0b9860a16345ec0bac8c5d7f8db475da0
a4a0b1c6a7789094aab0ec94324916b08bd9f484
/app/src/main/java/net/fitcome/jnidemo/MainActivity.java
009e7f642fe2e3a871d8bf9f4debe7a905fbbe9e
[]
no_license
android-coco/JniDemo
1e106a095a54f262fd63a19ef3bae31a8003a145
16f55f9929c42eeb8396fc9df0beaa0a6b553212
refs/heads/master
2021-01-19T10:35:31.305830
2017-04-11T06:19:31
2017-04-11T06:19:31
87,881,612
0
0
null
null
null
null
UTF-8
Java
false
false
532
java
package net.fitcome.jnidemo; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; public class MainActivity extends AppCompatActivity { JniUtil x = new JniUtil(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextView textView = (TextView) findViewById(R.id.info); textView.setText(x.getJniAdd(1,2) + " " + x.getJniString()); } }
[ "123456" ]
123456
f327597035b98dcb2324e0e51e39d9de5f5a1831
d9f98dd1828e25bc2e8517e5467169830c5ded60
/src/main/java/com/alipay/api/response/ZhimaCreditEpLawsuitDetailGetResponse.java
de97ce7bcb1b357b2231d7d2a586be118ae3cc11
[]
no_license
benhailong/open_kit
6c99f3239de6dcd37f594f7927dc8b0e666105dc
a45dd2916854ee8000d2fb067b75160b82bc2c04
refs/heads/master
2021-09-19T18:22:23.628389
2018-07-30T08:18:18
2018-07-30T08:18:26
117,778,328
1
1
null
null
null
null
UTF-8
Java
false
false
972
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.domain.EpInfo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: zhima.credit.ep.lawsuit.detail.get response. * * @author auto create * @since 1.0, 2017-10-13 14:43:31 */ public class ZhimaCreditEpLawsuitDetailGetResponse extends AlipayResponse { private static final long serialVersionUID = 6213198283162949671L; /** * 芝麻信用对于每一次请求返回的业务号。后续可以通过此业务号进行对账 */ @ApiField("biz_no") private String bizNo; /** * 企业涉诉详情 */ @ApiField("lawsuit_detail") private EpInfo lawsuitDetail; public void setBizNo(String bizNo) { this.bizNo = bizNo; } public String getBizNo( ) { return this.bizNo; } public void setLawsuitDetail(EpInfo lawsuitDetail) { this.lawsuitDetail = lawsuitDetail; } public EpInfo getLawsuitDetail( ) { return this.lawsuitDetail; } }
[ "694201656@qq.com" ]
694201656@qq.com
7a433f62c2ca6a245fbf2646ab950da624da64fe
efcf3233a2a21411eb1ae2bff3b71baa548c6f04
/tracking/src/main/java/org/lcsim/recon/tracking/vsegment/hit/base/DigiTrackerHitElemental.java
04a484476064b59a40f2b88d064e4485cdfa4026
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
slaclab/lcsim
95af8a8821bd1e7638f3c9c039655f9b4f797a92
afdee47b0e511a6f96595deae758dedaef2f4ae3
refs/heads/master
2023-07-06T19:40:04.589633
2023-03-20T21:38:33
2023-03-20T21:38:33
95,500,068
1
7
NOASSERTION
2023-03-20T21:10:47
2017-06-27T00:08:43
Java
UTF-8
Java
false
false
2,500
java
package org.lcsim.recon.tracking.vsegment.hit.base; import java.util.List; import java.util.ArrayList; import org.lcsim.event.MCParticle; import org.lcsim.recon.tracking.vsegment.geom.Sensor; import org.lcsim.recon.tracking.vsegment.hit.DigiTrackerHit; /** * Elemental DigiTrackerHit. * In simulation, this is a digitized signal from a single channel produced by a * single <tt>MCParticle</tt>. In data, this is a single channel signal after calibration. * * @author D.Onoprienko * @version $Id: DigiTrackerHitElemental.java,v 1.1 2008/12/06 21:53:44 onoprien Exp $ */ public class DigiTrackerHitElemental extends DigiTrackerHitAdapter { // -- Constructors : ---------------------------------------------------------- /** Constract from parameters. */ public DigiTrackerHitElemental(double signal, double time, Sensor sensor, int channel, MCParticle mcParticle) { _signal = signal; _time = time; _sensor = sensor; _channel = channel; _mcParticle = mcParticle; } /** Constract from parameters with no associated <tt>MCParticle</tt>. */ public DigiTrackerHitElemental(double signal, double time, Sensor sensor, int channel) { this(signal, time, sensor, channel, null); } /** Copy constructor. */ public DigiTrackerHitElemental(DigiTrackerHitElemental digiHit) { _signal = digiHit._signal; _time = digiHit._time; _sensor = digiHit._sensor; _channel = digiHit._channel; _mcParticle = digiHit._mcParticle; } // -- Getters : --------------------------------------------------------------- /** * Returns <tt>true</tt> if the hit is a superposition of more than one elemental hit. * Objects of this class always return <tt>false</tt>. */ public boolean isComposite() {return false;} /** * Returns <tt>MCParticle</tt> that produced the hit. * If the hit is composite, or does not have <tt>MCParticle</tt> associated with * it (noise, beam test data, etc.), returns <tt>null</tt>. */ public MCParticle getMCParticle() {return _mcParticle;} /** * Returns a list of underlying elemental hits. * Since the hit is not composite, returns a list with a single element - this hit. */ public List<DigiTrackerHit> getElementalHits() { List<DigiTrackerHit> hitList = new ArrayList<DigiTrackerHit>(1); hitList.add(this); return hitList; } // -- Private parts : --------------------------------------------------------- protected MCParticle _mcParticle; }
[ "jermccormick@gmail.com" ]
jermccormick@gmail.com
7faafb87d0dc6bb2e417f8a7f7e6bd4bdd143c96
98e5b3aec60935f6768cb4e2a24b21da0b528b6d
/datalayer/message/src/main/java/com/waben/stock/datalayer/message/service/RedisCache.java
d495d17c958ef319d68ee83a006009d64d577d5a
[]
no_license
sunliang123/zhongbei-zhonghang-zhongzi-yidian
3eb95a77658d7ad9de1cdf9c3f85714ee007a871
54fed94b9784f5e392b4b9517cb5fe19c1b34443
refs/heads/master
2020-03-29T05:26:02.515289
2018-09-20T09:11:48
2018-09-20T09:11:48
149,582,090
1
5
null
null
null
null
UTF-8
Java
false
false
1,632
java
package com.waben.stock.datalayer.message.service; import javax.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPoolConfig; import redis.clients.jedis.Protocol; @Component("messageRedisCache") public class RedisCache { @Value("${redis.host}") private String redisHost; @Value("${redis.port}") private String redisPort; @Value("${redis.password}") private String redisPassword; private JedisPool pool; @PostConstruct public void initJedisPool() { if (redisPassword != null && !"".equals(redisPassword.trim())) { pool = new JedisPool(new JedisPoolConfig(), redisHost, Integer.parseInt(redisPort), Protocol.DEFAULT_TIMEOUT, redisPassword); } else { pool = new JedisPool(new JedisPoolConfig(), redisHost, Integer.parseInt(redisPort)); } } public String get(String key) { Jedis jedis = null; try { jedis = pool.getResource(); return jedis.get(key); } finally { if (jedis != null) { jedis.close(); } } } public void set(String key, String value) { Jedis jedis = null; try { jedis = pool.getResource(); jedis.set(key, value); } finally { if (jedis != null) { jedis.close(); } } } public void set(String key, String value, int seconds) { Jedis jedis = null; try { jedis = pool.getResource(); jedis.setex(key, seconds, value); } finally { if (jedis != null) { jedis.close(); } } } public JedisPool getPool() { return pool; } }
[ "sunliang_s666@163.com" ]
sunliang_s666@163.com
08034d4ff370473cce538d0218f6aafba3630ba4
f15304b7b3ff986df90b40ad088db167685e1d8e
/bookmarks-springmvc/src/main/java/com/sivalabs/bookmarks/entities/BookMark.java
589dc3f73bf9c0ad5ba945b6515ecde3c41901ac
[]
no_license
achintayya/spring-samples
7801d115797b2543bab7314c996ce3c0110ac3a4
ccf8db253b35d79faf45ba499323120bae78732b
refs/heads/master
2020-12-03T10:26:53.556740
2014-06-29T13:13:21
2014-06-29T13:13:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,215
java
/** * */ package com.sivalabs.bookmarks.entities; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.xml.bind.annotation.XmlRootElement; import org.apache.commons.lang.StringUtils; /** * @author Siva * */ @Entity @Table(name = "bookmarks") @XmlRootElement public class BookMark implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "bookmark_id") private Integer id; @Column(nullable=false) private String title; @Column(nullable=false) private String url; private String description; @ManyToOne @JoinColumn(name="user_id") private User user; @ManyToMany(cascade=CascadeType.ALL) @JoinTable(name = "bookmark_tag", joinColumns = {@JoinColumn(name="bookmark_id")}, inverseJoinColumns = {@JoinColumn(name="tag_id")} ) private Set<Tag> tags; public BookMark() { } public BookMark(Integer id) { super(); this.id = id; } public BookMark(Integer id, String title, String url, String description) { super(); this.id = id; this.title = title; this.url = url; this.description = description; } public BookMark(Integer id, String title, String url) { super(); this.id = id; this.title = title; this.url = url; } public BookMark(Integer id, String title, String url, String description, User user) { super(); this.id = id; this.title = title; this.url = url; this.description = description; this.user = user; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public Set<Tag> getTags() { if(tags == null){ tags = new HashSet<Tag>(); } return tags; } public void setTags(Set<Tag> tags) { this.tags = tags; } public String getFormattedTags() { StringBuilder sb = new StringBuilder(); for (Tag tag : tags) { sb.append(tag.getTagName()+","); } String str = sb.toString(); /*if(str.length()>0){ str = str.substring(0,str.length()-1); }*/ str = StringUtils.chomp(str, ","); return str; } }
[ "sivaprasadreddy.k@gmail.com" ]
sivaprasadreddy.k@gmail.com
23c33fb87a0c719a3faefe40882297d50178e560
5b7b2efab0a2bf8e789a303f8e4d9c56bd220b78
/src/main/java/com/kov/lectures/lecture_2_StringsAndRegularExpressions/item_4/Main.java
922f490cc0fda848bd04b6c76df030fb1fe418e2
[]
no_license
DenisLaptev/ProgrammingLectures
04e9f5618e209157ffb6b59be7182a5bdbd795c5
bad94c1d6a83fd433f13c87d0635e32c824ed91b
refs/heads/master
2021-01-12T12:47:10.992714
2016-10-03T14:14:29
2016-10-03T14:14:29
69,856,827
0
0
null
null
null
null
UTF-8
Java
false
false
1,155
java
package com.kov.lectures.lecture_2_StringsAndRegularExpressions.item_4; import java.util.ArrayList; import java.util.List; /** * Created by Kovantonlenko on 11/2/2015. */ public class Main { public static void main(String[] args) { String s = "The world is mine"; String s1 = "test"; String s2 = new String(); String name = s.substring(4, s.length()-8); String name1 = s.substring(4, 9); System.out.println("length = " + s.length()); System.out.println(name); // �� ������� ������� "world" System.out.println(name1); // �� ������� ������� "world" String domain = s.substring(s.length()); System.out.println(domain); // подстрока, начиная с N+1 буквы. Получим пустую строку. String substring = s1.substring(4); // System.out.println(s.substring(4)); System.out.println(substring.equals("")); System.out.println(substring);//подстрока, начиная с N+1 буквы. Получим пустую строку. } }
[ "laptev.denis@mail.ru" ]
laptev.denis@mail.ru
cf890509ade1af62db46c70c3967651a0bf4f46f
4b027a96e457f90fdd146c73a92a99a63b5f6cab
/level37/lesson10/big01/AmigoSet.java
e168eede0c777070012af5c9c6a94e15f7369708
[]
no_license
Byshevsky/JavaRush
c44a3b25afca677bbe5b6c015aec7c2561ca4830
d8965bc8b5f060af558cc86924ae6488727cdbd4
refs/heads/master
2021-05-02T12:17:48.896494
2016-12-26T21:56:12
2016-12-26T21:56:12
52,143,706
1
0
null
null
null
null
UTF-8
Java
false
false
2,650
java
package com.javarush.test.level37.lesson10.big01; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.*; /** * Created by IGOR on 31.01.2016. */ public class AmigoSet<E> extends AbstractSet implements Cloneable, Serializable, Set { private static final Object PRESENT = new Object(); private transient HashMap<E, Object> map; public AmigoSet() { map = new HashMap<>(); } public AmigoSet(Collection<? extends E> collection) { int capacity = 0; if (collection.size()/.75f > 16) { capacity = (int) (collection.size()/.75f); } else capacity = 16; map = new HashMap<>(capacity); this.addAll(collection); } @Override public boolean add(Object o) { map.put((E) o, PRESENT); return map.get(o) != null; } @Override public Iterator<E> iterator() { Set<E> keys = map.keySet(); return keys.iterator(); } @Override public int size() { return map.keySet().size(); } @Override public Object clone() { AmigoSet<E> result = null; try { result = (AmigoSet<E>) super.clone(); result.map = (HashMap<E, Object>) this.map.clone(); } catch (Exception e) { throw new InternalError(); } return result; } @Override public boolean isEmpty() { return map.keySet().isEmpty(); } @Override public boolean contains(Object o) { return map.keySet().contains(o); } @Override public void clear() { map.keySet().clear(); } @Override public boolean remove(Object o) { return map.keySet().remove(o); } private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); out.writeInt(HashMapReflectionHelper.<Integer>callHiddenMethod(map, "capacity")); out.writeFloat(HashMapReflectionHelper.<Float>callHiddenMethod(map, "loadFactor")); out.writeObject(new HashSet<Integer>((Collection<Integer>) map.keySet())); } private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); int capacity = in.readInt(); float loadFactor = in.readFloat(); map = new HashMap<>(capacity, loadFactor); addAll((Collection) in.readObject()); } }
[ "igberda2011@gmail.com" ]
igberda2011@gmail.com
d3940cb086b6586c8f2643cd4535a6ee1c5a551e
c06b04186855e4e0fe5e771239b31983d92bbdd7
/T1809-Java_Architect/01_Java_Beginner/01_Java300/010_Network/doc/Code/003_Net/246-250/Net_study03/src/com/sxt/chat04/Client.java
58e5a3f0a2fe688cb83c964d4f7474e1946b1159
[ "MIT" ]
permissive
specter01wj/ShangXueTang_Course
0c6b8895c684891f72ee3f42c14ac3884d1b7db4
1de238c3385585f07e19815f680277672d2e1b9b
refs/heads/master
2020-04-05T16:46:57.934281
2019-04-17T06:12:26
2019-04-17T06:12:26
157,028,215
0
1
null
null
null
null
UTF-8
Java
false
false
862
java
package com.sxt.chat04; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.Socket; import java.net.UnknownHostException; /** * 在线聊天室: 客户端 * 目标: 加入容器实现群聊 * @author 裴新 QQ:3401997271 * */ public class Client { public static void main(String[] args) throws UnknownHostException, IOException { System.out.println("-----Client-----"); BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); System.out.println("请输入用户名:"); String name =br.readLine(); //1、建立连接: 使用Socket创建客户端 +服务的地址和端口 Socket client =new Socket("localhost",8888); //2、客户端发送消息 new Thread(new Send(client,name)).start(); new Thread(new Receive(client)).start(); } }
[ "specter01wj@gmail.com" ]
specter01wj@gmail.com
51868f787dab8c5145801ac86fb48716390cfd3c
9e8afc827742e6ebf18c547071dfa2e96ab945a9
/HMI112_V01/app_net/src/main/java/com/uninew/net/JT905/bean/P_ParamQuery.java
01288c6698e1597f46b16f71725d847dc768988f
[]
no_license
hgdsys007/Uninew
23c0957e58f8bdaa698db0102f62eecc91d3f538
efedd89a2d296ca6427c48441bbdb8490c2c42bb
refs/heads/master
2021-12-30T05:40:15.482254
2018-02-06T01:29:01
2018-02-06T01:29:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,378
java
package com.uninew.net.JT905.bean; import com.uninew.net.JT905.common.BaseMsgID; import com.uninew.net.JT905.common.ProtocolTool; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.List; /** * 参数查询 * Created by Administrator on 2017/8/19 0019. */ public class P_ParamQuery extends BaseBean { private List<Integer> paramIds;//参数列表 public P_ParamQuery() { } public P_ParamQuery(byte[] body) { getDataPacket(body); } public P_ParamQuery(List<Integer> paramIds) { this.paramIds = paramIds; } public List<Integer> getParamIds() { return paramIds; } public void setParamIds(List<Integer> paramIds) { this.paramIds = paramIds; } @Override public int getTcpId() { return this.tcpId; } @Override public void setTcpId(int tcpId) { this.tcpId = tcpId; } @Override public int getTransportId() { return this.transportId; } @Override public void setTransportId(int transportId) { this.transportId = transportId; } @Override public String getSmsPhoneNumber() { return this.smsPhonenumber; } @Override public void setSmsPhoneNumber(String smsPhonenumber) { this.smsPhonenumber = smsPhonenumber; } @Override public int getSerialNumber() { return this.serialNumber; } @Override public void setSerialNumber(int serialNumber) { this.serialNumber = serialNumber; } @Override public int getMsgId() { return BaseMsgID.TERMINAL_PARAM_QUERY; } @Override public byte[] getDataBytes() { byte[] datas = null; ByteArrayOutputStream stream = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(stream); try { for (Integer integer:paramIds){ out.writeShort(integer); } out.flush(); datas = stream.toByteArray(); } catch (IOException e) { e.printStackTrace(); } finally { try { if (stream != null) { stream.close(); } if (out != null) { out.close(); } } catch (IOException e) { e.printStackTrace(); } } return datas; } @Override public P_ParamQuery getDataPacket(byte[] datas) { ByteArrayInputStream stream = new ByteArrayInputStream(datas); DataInputStream in = new DataInputStream(stream); try { int number=datas.length/2;//参数ID根数 int paramId; for (int i=0;i<number;i++){ paramId=in.readShort(); paramIds.add(paramId); } } catch (Exception e) { e.printStackTrace(); } finally { try { if (stream != null) { stream.close(); } if (in != null) { in.close(); } } catch (IOException e) { e.printStackTrace(); } } return this; } }
[ "782508551@qq.com" ]
782508551@qq.com
de7d0b661c9dd72889d82bb3e6862bc9ffea31b0
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/dm-20151123/src/main/java/com/aliyun/dm20151123/models/QueryTaskByParamRequest.java
6ae07a3c159da15d9c58e9b0983f2e75cd5c63b5
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
2,273
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.dm20151123.models; import com.aliyun.tea.*; public class QueryTaskByParamRequest extends TeaModel { @NameInMap("KeyWord") public String keyWord; @NameInMap("OwnerId") public Long ownerId; @NameInMap("PageNo") public Integer pageNo; @NameInMap("PageSize") public Integer pageSize; @NameInMap("ResourceOwnerAccount") public String resourceOwnerAccount; @NameInMap("ResourceOwnerId") public Long resourceOwnerId; @NameInMap("Status") public Integer status; public static QueryTaskByParamRequest build(java.util.Map<String, ?> map) throws Exception { QueryTaskByParamRequest self = new QueryTaskByParamRequest(); return TeaModel.build(map, self); } public QueryTaskByParamRequest setKeyWord(String keyWord) { this.keyWord = keyWord; return this; } public String getKeyWord() { return this.keyWord; } public QueryTaskByParamRequest setOwnerId(Long ownerId) { this.ownerId = ownerId; return this; } public Long getOwnerId() { return this.ownerId; } public QueryTaskByParamRequest setPageNo(Integer pageNo) { this.pageNo = pageNo; return this; } public Integer getPageNo() { return this.pageNo; } public QueryTaskByParamRequest setPageSize(Integer pageSize) { this.pageSize = pageSize; return this; } public Integer getPageSize() { return this.pageSize; } public QueryTaskByParamRequest setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; return this; } public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } public QueryTaskByParamRequest setResourceOwnerId(Long resourceOwnerId) { this.resourceOwnerId = resourceOwnerId; return this; } public Long getResourceOwnerId() { return this.resourceOwnerId; } public QueryTaskByParamRequest setStatus(Integer status) { this.status = status; return this; } public Integer getStatus() { return this.status; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
7a75e8a9e7a27068d7ca460e720d03442781b7de
332560b666f4d2f49089ecef9f68c6ed4f5b6b28
/src/test/java/org/emamotor/hfdp/state/gumball/GumballMachineTest.java
8e306e8fc09fbcb5149c52375f2cd118ea2aab6a
[]
no_license
emag-notes/hf-dp
9e08801f15aa617ee307041ac38dcdb2276ab464
28d18f7f7801b1e93a218fe81a854e5bb76e9bde
refs/heads/master
2020-04-10T22:24:06.320151
2013-12-26T12:59:17
2013-12-26T12:59:17
8,603,452
0
0
null
null
null
null
UTF-8
Java
false
false
959
java
package org.emamotor.hfdp.state.gumball; import org.junit.Test; /** * @author Yoshimasa Tanabe */ public class GumballMachineTest { @Test public void testAllMethod() throws Exception { // Setup GumballMachine sut = new GumballMachine(5); // Exercise // Verify System.out.println(sut); sut.insertQuarter(); sut.turnCrank(); System.out.println(sut); sut.insertQuarter(); sut.ejectQuarter(); sut.turnCrank(); System.out.println(sut); sut.insertQuarter(); sut.turnCrank(); sut.insertQuarter(); sut.turnCrank(); sut.ejectQuarter(); System.out.println(sut); sut.insertQuarter(); sut.insertQuarter(); sut.turnCrank(); sut.insertQuarter(); sut.turnCrank(); sut.insertQuarter(); sut.turnCrank(); System.out.println(sut); } }
[ "lanabe.lanabe@gmail.com" ]
lanabe.lanabe@gmail.com
638f1addef0de872b38b285aa0d81d0c1a930420
18c70f2a4f73a9db9975280a545066c9e4d9898e
/mirror-cmdb/cmdb-agent/src/main/java/com/aspire/cmdb/agent/client/LldpInfoServiceClient.java
e9ae10eebb2e6d6a1c24899c77a8017ac61b8092
[]
no_license
iu28igvc9o0/cmdb_aspire
1fe5d8607fdacc436b8a733f0ea44446f431dfa8
793eb6344c4468fe4c61c230df51fc44f7d8357b
refs/heads/master
2023-08-11T03:54:45.820508
2021-09-18T01:47:25
2021-09-18T01:47:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
709
java
package com.aspire.cmdb.agent.client; import com.aspire.mirror.elasticsearch.api.dto.LldpInfo; import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import java.util.List; @FeignClient("ELASTICSEARCH-SERVICE") @Component public interface LldpInfoServiceClient { @GetMapping("/v1/lldp/querylldpInfoByidcAndIp") List<LldpInfo> querylldpInfoByidcAndIp(@RequestParam(value = "idcType", required = false) String idcType, @RequestParam(value = "ips", required = false) String ips); }
[ "jiangxuwen7515@163.com" ]
jiangxuwen7515@163.com
6bd21784e8c6f7d9b9e702a3cd6a6019699186d1
cde22ead6409a28a7858aef68dc536d21ae1eaaa
/core/src/test/java/io/undertow/server/handlers/proxy/AbstractLoadBalancingProxyTestCase.java
afcd21c5c0cabc68a15058d7064f0dac8a40074d
[ "Apache-2.0" ]
permissive
tmescic/undertow
9f5e6910b81d218b232f8df2cabe8367c4765933
a7f9ba00e892904b7af0e532ab62944d0bafa847
refs/heads/master
2021-01-18T05:51:10.951982
2014-07-02T15:31:40
2014-07-02T15:31:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,956
java
/* * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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.undertow.server.handlers.proxy; import io.undertow.Undertow; import io.undertow.server.HttpHandler; import io.undertow.server.HttpServerExchange; import io.undertow.server.session.Session; import io.undertow.server.session.SessionCookieConfig; import io.undertow.server.session.SessionManager; import io.undertow.testutils.DefaultServer; import io.undertow.testutils.HttpClientUtils; import io.undertow.testutils.TestHttpClient; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import java.io.IOException; /** * Tests the load balancing proxy * * @author Stuart Douglas */ @RunWith(DefaultServer.class) public abstract class AbstractLoadBalancingProxyTestCase { private static final String COUNT = "count"; protected static Undertow server1; protected static Undertow server2; @AfterClass public static void teardown() { server1.stop(); server2.stop(); } @Test public void testLoadShared() throws IOException { final StringBuilder resultString = new StringBuilder(); for (int i = 0; i < 6; ++i) { TestHttpClient client = new TestHttpClient(); try { HttpGet get = new HttpGet(DefaultServer.getDefaultServerURL() + "/name"); HttpResponse result = client.execute(get); Assert.assertEquals(200, result.getStatusLine().getStatusCode()); resultString.append(HttpClientUtils.readResponse(result)); resultString.append(' '); } finally { client.getConnectionManager().shutdown(); } } Assert.assertTrue(resultString.toString().contains("server1")); Assert.assertTrue(resultString.toString().contains("server2")); } @Test public void testLoadSharedWithServerShutdown() throws IOException { final StringBuilder resultString = new StringBuilder(); for (int i = 0; i < 6; ++i) { TestHttpClient client = new TestHttpClient(); try { HttpGet get = new HttpGet(DefaultServer.getDefaultServerURL() + "/name"); HttpResponse result = client.execute(get); Assert.assertEquals(200, result.getStatusLine().getStatusCode()); resultString.append(HttpClientUtils.readResponse(result)); resultString.append(' '); } catch (Throwable t) { throw new RuntimeException("Failed with i=" + i, t); } finally { client.getConnectionManager().shutdown(); } server1.stop(); server1.start(); server2.stop(); server2.start(); } Assert.assertTrue(resultString.toString().contains("server1")); Assert.assertTrue(resultString.toString().contains("server2")); } @Test public void testStickySessions() throws IOException { int expected = 0; TestHttpClient client = new TestHttpClient(); try { for (int i = 0; i < 6; ++i) { try { HttpGet get = new HttpGet(DefaultServer.getDefaultServerURL() + "/session"); get.addHeader("Connection", "close"); HttpResponse result = client.execute(get); Assert.assertEquals(200, result.getStatusLine().getStatusCode()); int count = Integer.parseInt(HttpClientUtils.readResponse(result)); Assert.assertEquals(expected++, count); } catch (Exception e) { throw new RuntimeException("Test failed with i=" + i, e); } } } finally { client.getConnectionManager().shutdown(); } } protected static final class SessionTestHandler implements HttpHandler { private final SessionCookieConfig sessionConfig; protected SessionTestHandler(SessionCookieConfig sessionConfig) { this.sessionConfig = sessionConfig; } @Override public void handleRequest(final HttpServerExchange exchange) throws Exception { final SessionManager manager = exchange.getAttachment(SessionManager.ATTACHMENT_KEY); Session session = manager.getSession(exchange, sessionConfig); if (session == null) { session = manager.createSession(exchange, sessionConfig); session.setAttribute(COUNT, 0); } Integer count = (Integer) session.getAttribute(COUNT); session.setAttribute(COUNT, count + 1); exchange.getResponseSender().send("" + count); } } protected static final class StringSendHandler implements HttpHandler { private final String serverName; protected StringSendHandler(String serverName) { this.serverName = serverName; } @Override public void handleRequest(final HttpServerExchange exchange) throws Exception { exchange.getResponseSender().send(serverName); } } }
[ "stuart.w.douglas@gmail.com" ]
stuart.w.douglas@gmail.com
b8b792418599865003e2a9287b8ba957706b4c46
fff8f77f810bbd5fb6b4e5f7a654568fd9d3098d
/src/main/java/kotlin/reflect/jvm/internal/impl/load/kotlin/KotlinClassFinder.java
bb445b163e5eb4696c7a045b1e8e772d1cacd319
[]
no_license
TL148/gorkiy
b6ac8772587e9e643d939ea399bf5e7a42e89f46
da8fbd017277cf72020c8c800326954bb1a0cee3
refs/heads/master
2021-05-21T08:24:39.286900
2020-04-03T02:57:49
2020-04-03T02:57:49
252,618,229
0
0
null
2020-04-03T02:54:39
2020-04-03T02:54:39
null
UTF-8
Java
false
false
3,507
java
package kotlin.reflect.jvm.internal.impl.load.kotlin; import java.util.Arrays; import kotlin.jvm.internal.Intrinsics; import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass; import kotlin.reflect.jvm.internal.impl.name.ClassId; import kotlin.reflect.jvm.internal.impl.serialization.deserialization.KotlinMetadataFinder; /* compiled from: KotlinClassFinder.kt */ public interface KotlinClassFinder extends KotlinMetadataFinder { Result findKotlinClassOrContent(JavaClass javaClass); Result findKotlinClassOrContent(ClassId classId); /* compiled from: KotlinClassFinder.kt */ public static abstract class Result { private Result() { } public /* synthetic */ Result(DefaultConstructorMarker defaultConstructorMarker) { this(); } public final KotlinJvmBinaryClass toKotlinJvmBinaryClass() { KotlinClass kotlinClass = (KotlinClass) (!(this instanceof KotlinClass) ? null : this); if (kotlinClass != null) { return kotlinClass.getKotlinJvmBinaryClass(); } return null; } /* compiled from: KotlinClassFinder.kt */ public static final class KotlinClass extends Result { private final KotlinJvmBinaryClass kotlinJvmBinaryClass; public boolean equals(Object obj) { if (this != obj) { return (obj instanceof KotlinClass) && Intrinsics.areEqual(this.kotlinJvmBinaryClass, ((KotlinClass) obj).kotlinJvmBinaryClass); } return true; } public int hashCode() { KotlinJvmBinaryClass kotlinJvmBinaryClass2 = this.kotlinJvmBinaryClass; if (kotlinJvmBinaryClass2 != null) { return kotlinJvmBinaryClass2.hashCode(); } return 0; } public String toString() { return "KotlinClass(kotlinJvmBinaryClass=" + this.kotlinJvmBinaryClass + ")"; } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public KotlinClass(KotlinJvmBinaryClass kotlinJvmBinaryClass2) { super(null); Intrinsics.checkParameterIsNotNull(kotlinJvmBinaryClass2, "kotlinJvmBinaryClass"); this.kotlinJvmBinaryClass = kotlinJvmBinaryClass2; } public final KotlinJvmBinaryClass getKotlinJvmBinaryClass() { return this.kotlinJvmBinaryClass; } } /* compiled from: KotlinClassFinder.kt */ public static final class ClassFileContent extends Result { private final byte[] content; public boolean equals(Object obj) { if (this != obj) { return (obj instanceof ClassFileContent) && Intrinsics.areEqual(this.content, ((ClassFileContent) obj).content); } return true; } public int hashCode() { byte[] bArr = this.content; if (bArr != null) { return Arrays.hashCode(bArr); } return 0; } public String toString() { return "ClassFileContent(content=" + Arrays.toString(this.content) + ")"; } public final byte[] getContent() { return this.content; } } } }
[ "itaysontesterlab@gmail.com" ]
itaysontesterlab@gmail.com
db5a1f9b67986ce8a6f64b390e08d058bf055f02
30b2eba9a7b563509fff637e10b8879c10657a76
/web/box-front/src/main/java/com/boxamazing/webfront/util/CheckCode.java
53c91a82381382a77062d7578504e63f0bf9757c
[]
no_license
hecj/box
73f60c11c293cac4a66b9b0b33ba79ff5aadfc2d
e59cc1cceb238b1a6d5b35ae8a98b68b7da5918f
refs/heads/master
2020-09-24T06:11:08.248173
2016-08-25T05:55:48
2016-08-25T05:55:48
66,528,932
0
0
null
null
null
null
UTF-8
Java
false
false
1,354
java
package com.boxamazing.webfront.util; import java.io.Serializable; /** * 存验证码的VO对象 */ public class CheckCode implements Serializable { private static final long serialVersionUID = 1L; /** * 手机验证码session key */ public static final String PHONE_CODE = "PHONE_CODE"; /** * 邮箱验证码session key */ public static final String EMAIL_CODE = "EMAIL_CODE"; /** * 用户id */ private Long user_id; /** * 验证码 */ private String randomCode ; /** * 手机号 */ private String phone; /** * 邮箱 */ private String email; /** * 发送时间 */ private Long sendTime; public Long getUser_id() { return user_id; } public void setUser_id(Long user_id) { this.user_id = user_id; } public String getRandomCode() { return randomCode; } public void setRandomCode(String randomCode) { this.randomCode = randomCode; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Long getSendTime() { return sendTime; } public void setSendTime(Long sendTime) { this.sendTime = sendTime; } }
[ "275070023@qq.com" ]
275070023@qq.com
e0ea3a7bf8a8019fed2b0d8f551293fbe2d34dd0
23de2c10f72a30ade795ac8d4d7923036c575de5
/src/org/anddev/andengine/opengl/view/LogWriter.java
240deb1107c2ec23231a4aea9f7691279bab08d0
[]
no_license
PARTHIBANMS/com.divmob.doodlebubble
a2c179ad9aa762668c69c0302bb17958e895148e
4718ee64c5edc9bcfc95861754ad9b876bd7fd5d
refs/heads/master
2020-06-04T22:30:50.560385
2014-07-17T10:39:23
2014-07-17T10:39:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,073
java
package org.anddev.andengine.opengl.view; import android.util.Log; import java.io.Writer; class LogWriter extends Writer { private final StringBuilder mBuilder = new StringBuilder(); private void flushBuilder() { if (this.mBuilder.length() > 0) { Log.v("GLSurfaceView", this.mBuilder.toString()); this.mBuilder.delete(0, this.mBuilder.length()); } } public void close() { flushBuilder(); } public void flush() { flushBuilder(); } public void write(char[] paramArrayOfChar, int paramInt1, int paramInt2) { int i = 0; if (i >= paramInt2) { return; } char c = paramArrayOfChar[(paramInt1 + i)]; if (c == '\n') { flushBuilder(); } for (;;) { i++; break; this.mBuilder.append(c); } } } /* Location: C:\Users\PARTHIBAN\Desktop\source\dex2jar-0.0.9.15\classes_dex2jar.jar * Qualified Name: org.anddev.andengine.opengl.view.LogWriter * JD-Core Version: 0.7.0.1 */
[ "bsauniv30@BSAs-iMac-93.local" ]
bsauniv30@BSAs-iMac-93.local
a8c12148045ef4defa3eaac059fe485e67661d6e
c47d97b1b0cf94fa19dce9d3bd49a171731b45ef
/voyager/src/main/java/pk/home/voyager/dao/LTypeDAO.java
b75e0ad74ae6e2e384c7cdaad71df6d6389720dd
[]
no_license
povloid/voyager
efdb3e1b197351ac8b5bab8ec298f77d87ba5171
5004a23a780c488300d1880d49bbf77012078be2
refs/heads/master
2016-09-06T10:58:17.225375
2011-11-04T14:53:10
2011-11-04T14:53:10
2,067,249
0
0
null
null
null
null
UTF-8
Java
false
false
236
java
/** * */ package pk.home.voyager.dao; import pk.home.pulibs.basic.intefaces.dao.DAOCRUDFunctional; import pk.home.voyager.domain.LType; /** * @author traveler * */ public interface LTypeDAO extends DAOCRUDFunctional<LType> { }
[ "t34box@gmail.com" ]
t34box@gmail.com
a75885de7ca1f70e613420b72c75c7df4ea18713
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/smile/nlp/keyword/CooccurrenceKeywordExtractorTest.java
4eaef6382cc34e8773cfc49e1d7eb83f536f6133
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
1,770
java
/** * ***************************************************************************** * Copyright (c) 2010 Haifeng Li * * 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 smile.nlp.keyword; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Scanner; import org.junit.Assert; import org.junit.Test; import smile.data.parser.IOUtils; import smile.nlp.NGram; /** * * * @author Haifeng Li */ public class CooccurrenceKeywordExtractorTest { public CooccurrenceKeywordExtractorTest() { } /** * Test of extract method, of class KeywordExtractorTest. */ @Test public void testExtract() throws FileNotFoundException { System.out.println("extract"); Scanner scanner = new Scanner(IOUtils.getTestDataReader("text/turing.txt")); String text = scanner.useDelimiter("\\Z").next(); scanner.close(); CooccurrenceKeywordExtractor instance = new CooccurrenceKeywordExtractor(); ArrayList<NGram> result = instance.extract(text); Assert.assertEquals(10, result.size()); for (NGram ngram : result) { System.out.println(ngram); } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
410831c26d604d1df7f6f6df4cf7f14df5e63407
f97ba375da68423d12255fa8231365104867d9b0
/study-notes/j2ee-collection/framework/00-项目驱动/12_Spring05_Converter/src/main/java/com/sq/converter/DateConverter.java
559e9bf1e6fb4fb66f5d519cbca22dbbff81be40
[ "MIT" ]
permissive
lei720/coderZsq.practice.server
7a728612e69c44e0877c0153c828b50d8ea7fa7c
4ddf9842cd088d4a0c2780ac22d41d7e6229164b
refs/heads/master
2023-07-16T11:21:26.942849
2021-09-08T04:38:07
2021-09-08T04:38:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
741
java
package com.sq.converter; import org.springframework.core.convert.converter.Converter; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; public class DateConverter implements Converter<String, Date> { private List<String> formats; public void setFormats(List<String> formats) { this.formats = formats; } @Override public Date convert(String s) { for (String format : formats) { try { SimpleDateFormat fmt = new SimpleDateFormat(format); return fmt.parse(s); } catch (ParseException e) { // e.printStackTrace(); } } return null; } }
[ "a13701777868@yahoo.com" ]
a13701777868@yahoo.com