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
7ca47087e5e70b6a08fe5ab2999bca9995ab68c2
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/java/java-tests/testData/codeInsight/overrideImplement/beforeInterfaceAndAbstractClass.java
74b4f0a7bcede14d3e077a8928766a0c17a283f2
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
156
java
abstract class A { public abstract D foo(); } interface B { F foo(); } class C extends A implements B { <caret> } class D {} class F extends D {}
[ "anna.kozlova@jetbrains.com" ]
anna.kozlova@jetbrains.com
34f4bf378aeaa27b2fad1b5f878b0ada8f8576dc
29196e2d4adfb14ddd7c2ca8c1e60f8c10c26dad
/src/main/java/it/csi/siac/siaccecser/model/CECDataDictionary.java
8b3111c3aacd1e817d6b9e77d772664a90a349d1
[]
no_license
unica-open/siacbilitf
bbeef5ceca40e9fb83d5b1176e7f54e8d84592bf
85f3254c05c719a0016fe55cea1a105bcb6b89b2
refs/heads/master
2021-01-06T14:51:17.786934
2020-03-03T13:27:47
2020-03-03T13:27:47
241,366,581
0
0
null
null
null
null
UTF-8
Java
false
false
420
java
/* *SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte *SPDX-License-Identifier: EUPL-1.2 */ package it.csi.siac.siaccecser.model; /** * Caratteristiche del Data Dictionary di CEC. Contiene la versione corrente del * dd * * * @author Domenico * */ public interface CECDataDictionary { String VERSION = "1.0"; String NAME = "cec"; String NAMESPACE = "http://siac.csi.it/" + NAME + "/data/" + VERSION; }
[ "barbara.malano@csi.it" ]
barbara.malano@csi.it
829687555fe7f804e7448ca3fe8111ae9af63096
b40a28d249bb907a67ecf209a59205c0b2c5c35c
/src/test/java/config/typed/runtime/DefValStr_GlobalYes_LocalYesIT.java
b93a3a837ea715b004fdbb70bcba8af890ec922a
[]
no_license
ArekLopus/ConfiguratorTest
1268347ca6e48234ab3fd2b29c914f1098ba5baa
ab724ea9d75f869fb52a9d9ea36be0254ab4df05
refs/heads/master
2021-08-07T15:51:04.388217
2019-12-10T18:10:53
2019-12-10T18:10:53
227,130,322
0
0
null
null
null
null
UTF-8
Java
false
false
3,321
java
package config.typed.runtime; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; import java.util.Arrays; import java.util.HashSet; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.Entity; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.GenericType; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.junit.After; import org.junit.Before; import org.junit.Test; import configurator.TypedProperty; public class DefValStr_GlobalYes_LocalYesIT { Client client; boolean runtime = false; @Before public void init() { client = ClientBuilder.newClient(); WebTarget getRuntime = client.target("http://localhost:8080/ConfiguratorTest/res/config/getRuntime"); Response resp = getRuntime.request(MediaType.TEXT_PLAIN).get(); runtime = resp.readEntity(Boolean.class); } @After public void clean() { WebTarget getRuntime = client.target("http://localhost:8080/ConfiguratorTest/res/config/changeRuntime/" + runtime); getRuntime.request(MediaType.TEXT_PLAIN).get(); client.close(); } @Test // If both true, always reload. If requested target changed we can see the change in the next request. public void typed_String_DefVal_runtimeCheckTrue_AnnotationRuntimeCheckYes() { HashSet<String> newPaths = new HashSet<String>(Arrays.asList("/config/prop1changed.properties")); HashSet<String> oldPaths = client.target("http://localhost:8080/ConfiguratorTest/res/config/getOldPaths").request(MediaType.APPLICATION_JSON).get(new GenericType<HashSet<String>>(){}); WebTarget setOldPaths = client.target("http://localhost:8080/ConfiguratorTest/res/config/setOldPaths"); WebTarget setNewPaths = client.target("http://localhost:8080/ConfiguratorTest/res/config/setNewPaths"); WebTarget setRuntimecheckToTrue = client.target("http://localhost:8080/ConfiguratorTest/res/config/changeRuntime?runtime=true"); WebTarget runtimeCheck = client.target("http://localhost:8080/ConfiguratorTest/res/config/typedDefValGlobalRuntimeYesLocalRuntimeYes/test"); setRuntimecheckToTrue.request().get(); Response requestForFirstTimeResponse = runtimeCheck.request().get(); setNewPaths.request().post(Entity.entity(newPaths, MediaType.APPLICATION_JSON)); Response checkAfterChangeResponse = runtimeCheck.request().get(); setOldPaths.request().post(Entity.entity(oldPaths, MediaType.APPLICATION_JSON)); TypedProperty<String> entity = requestForFirstTimeResponse.readEntity(new GenericType<TypedProperty<String>>(){}); //String entity = requestForFirstTimeResponse.readEntity(String.class); assertNotNull(entity); // first check assertNotNull(entity.getDefaultValue()); assertThat(entity.getDefaultValue(), instanceOf(String.class)); assertThat(entity.getDefaultValue(), is("This is a default value property from the file 'prop1.properties'")); // after change check entity = checkAfterChangeResponse.readEntity(new GenericType<TypedProperty<String>>(){}); assertNotNull(entity.getDefaultValue()); assertThat(entity.getDefaultValue(), instanceOf(String.class)); assertThat(entity.getDefaultValue(), is("testFilePropDefVal changed.")); } }
[ "abc@example.com" ]
abc@example.com
c6832c6fc2cce322d340749964ddd2bb9aaf3154
d1dea6217a38ff6f92bc955504a82d8da62d49c2
/PepCoding/src/sept_01_2018/graph_001/Topic_002_ArtculationPointAndEdge.java
7d2ae3b1f4e898dec438cf8be74bc280ae0664f3
[]
no_license
rajneeshkumar146/java_workspace
fbdf12d0a8f8a99f6a800d3a9fa37dac9ec81ac5
f77fbbb82dccbb3762fd27618dd366388724cf9b
refs/heads/master
2020-03-31T04:51:22.151046
2018-10-27T11:54:20
2018-10-27T11:54:20
151,922,604
5
1
null
null
null
null
UTF-8
Java
false
false
1,803
java
package sept_01_2018.graph_001; import java.util.Scanner; public class Topic_002_ArtculationPointAndEdge { public static Scanner scn = new Scanner(System.in); static int[][] graph; static int[] discT, lowT, parent; static boolean[] isdone, isAP; static int time = 0; public static void main(String[] args) throws Exception { graph = new int[6][6]; graph[0][1] = 1; graph[1][0] = 1; graph[0][5] = 1; graph[5][0] = 1; graph[1][3] = 1; graph[3][1] = 1; graph[1][2] = 1; graph[2][1] = 1; graph[3][4] = 1; graph[4][3] = 1; graph[3][2] = 1; graph[2][3] = 1; graph[2][4] = 1; graph[4][2] = 1; discT = new int[graph.length]; lowT = new int[graph.length]; parent = new int[graph.length]; isdone = new boolean[graph.length]; isAP = new boolean[graph.length]; solve(); } public static void solve() throws Exception { for (int i = 0; i < graph.length; i++) { if (isdone[i]) { continue; } parent[i] = -1; DFT(i); } for (int i = 0; i < isAP.length; i++) { if (isAP[i]) { System.out.println(i); } } } private static void DFT(int src) { isdone[src] = true; discT[src] = lowT[src] = ++time; int count = 0; for (int i = 0; i < graph[0].length; i++) { if (graph[src][i] == 0) { // Not_A_vertex. continue; } if (!isdone[i]) { // freshNbrs. count++; parent[i] = src; DFT(i); lowT[src] = Math.min(lowT[i], lowT[src]); if (parent[src] != -1) { if (lowT[i] >= discT[src]) { // System.out.println(src); isAP[src] = true; } } else if (parent[src] == -1) { // root. if (count > 1) { // System.out.println(src); isAP[src] = true; } } } else if (parent[src] != i) { lowT[src] = Math.min(lowT[src], discT[i]); } } } }
[ "rajneeshkumar146@gmail.com" ]
rajneeshkumar146@gmail.com
b3b8387b372d0e28dd2efa03f8795ca681037b90
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12798-89-23-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/XWiki_ESTest_scaffolding.java
292a1c780b14a5940784d471e19d38006607335b
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
423
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Apr 02 18:54:11 UTC 2020 */ package com.xpn.xwiki; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class XWiki_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
da59aeef19c62b3f4d6dea6252b0e280a71e88c7
83204cdcdf62a8f78dc701eb68d7f26131c4b474
/ch16/src/main/java/com/apress/prospring3/ch16/jms/JmsListenerSample.java
95d18f838d7a929dc631320c8ab3a0ef003eb947
[]
no_license
wikibook/prospring3
1974189e573b8bf7c42ba570339375c84b29ee12
1a463948898753d8817088d093e14c819ce0e040
refs/heads/master
2021-01-01T05:31:25.398537
2013-10-25T13:57:17
2013-10-25T13:57:17
13,862,097
1
0
null
null
null
null
UTF-8
Java
false
false
458
java
/** * Created on Nov 25, 2011 */ package com.apress.prospring3.ch16.jms; import org.springframework.context.support.GenericXmlApplicationContext; /** * @author Clarence * */ public class JmsListenerSample { public static void main(String[] args) { GenericXmlApplicationContext ctx = new GenericXmlApplicationContext(); ctx.load("classpath:jms-listener-app-context.xml"); ctx.refresh(); while (true) { } } }
[ "dylee@wikibook.co.kr" ]
dylee@wikibook.co.kr
f2498f5107165515a965288bcfd0e714143da0cc
e56c0c78a24d37e80d507fb915e66d889c58258d
/seeds-reflect/src/main/java/net/tribe7/common/reflect/TypeParameter.java
529ee6d288ff62b37963a9b61bd6c9d7689952dd
[]
no_license
jjzazuet/seeds-libraries
d4db7f61ff3700085a36eec77eec0f5f9a921bb5
87f74a006632ca7a11bff62c89b8ec4514dc65ab
refs/heads/master
2021-01-23T20:13:04.801382
2014-03-23T21:51:46
2014-03-23T21:51:46
8,710,960
30
2
null
null
null
null
UTF-8
Java
false
false
1,901
java
/* * Copyright (C) 2011 The Guava 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 net.tribe7.common.reflect; import static net.tribe7.common.base.Preconditions.checkArgument; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import javax.annotation.Nullable; import net.tribe7.common.annotations.Beta; /** * Captures a free type variable that can be used in {@link TypeToken#where}. * For example: * * <pre> {@code * static <T> TypeToken<List<T>> listOf(Class<T> elementType) { * return new TypeToken<List<T>>() {} * .where(new TypeParameter<T>() {}, elementType); * }}</pre> * * @author Ben Yu * @since 12.0 */ @Beta public abstract class TypeParameter<T> extends TypeCapture<T> { final TypeVariable<?> typeVariable; protected TypeParameter() { Type type = capture(); checkArgument(type instanceof TypeVariable, "%s should be a type variable.", type); this.typeVariable = (TypeVariable<?>) type; } @Override public final int hashCode() { return typeVariable.hashCode(); } @Override public final boolean equals(@Nullable Object o) { if (o instanceof TypeParameter) { TypeParameter<?> that = (TypeParameter<?>) o; return typeVariable.equals(that.typeVariable); } return false; } @Override public String toString() { return typeVariable.toString(); } }
[ "jjzazuet@gmail.com" ]
jjzazuet@gmail.com
6d57dbba59588652642fda431611611b2caa8ed4
267ccb51333f528a50f2f8720fe989437596fd2b
/oncecloud-docker-api/src/main/java/com/github/dockerjava/jaxrs/InspectExecCmdExec.java
b9ee33d61c8abf105989f2fb34bdbf8ef9e83081
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
XJW163/OnceCloud
55e393175b3073f94c074b2458b7cc25d7683081
7400154f41021704cd7eedec88489916b6d9eefb
refs/heads/master
2021-05-30T05:28:44.261493
2015-12-22T12:07:43
2015-12-22T12:07:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
960
java
package com.github.dockerjava.jaxrs; import com.github.dockerjava.api.command.InspectExecCmd; import com.github.dockerjava.api.command.InspectExecResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; public class InspectExecCmdExec extends AbstrDockerCmdExec<InspectExecCmd, InspectExecResponse> implements InspectExecCmd.Exec { private static final Logger LOGGER = LoggerFactory.getLogger(InspectExecCmdExec.class); public InspectExecCmdExec(WebTarget baseResource) { super(baseResource); } @Override protected InspectExecResponse execute(InspectExecCmd command) { WebTarget webResource = getBaseResource().path("/exec/{id}/json").resolveTemplate("id", command.getExecId()); LOGGER.debug("GET: {}", webResource); return webResource.request().accept(MediaType.APPLICATION_JSON).get(InspectExecResponse.class); } }
[ "guzychina@163.com" ]
guzychina@163.com
347944f95458c77531439dad9ced6b6ba16a2815
df134b422960de6fb179f36ca97ab574b0f1d69f
/com/google/gson/LongSerializationPolicy.java
a2aea38d66f293c92e3dde205a713c09bd79994d
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
1,073
java
/* */ package com.google.gson; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public enum LongSerializationPolicy /* */ { /* 34 */ DEFAULT { /* */ public JsonElement serialize(Long value) { /* 36 */ return new JsonPrimitive(value); /* */ } /* */ }, /* */ /* */ /* */ /* */ /* */ /* */ /* 45 */ STRING { /* */ public JsonElement serialize(Long value) { /* 47 */ return new JsonPrimitive(String.valueOf(value)); /* */ } /* */ }; /* */ /* */ public abstract JsonElement serialize(Long paramLong); /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\com\google\gson\LongSerializationPolicy.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
f067f84c74d3331158186a017840a17e0165b06f
204d80af21c91be323fd607feb334bb76c72cecc
/evector-web/evector-web/src/univ/evector/db/dao/GramWordDao.java
80a2c9af7b76b325e141d63bb144aa537376270a
[]
no_license
lukasonokoleg/evector
3cb708f93de05b5e1944339ffed472f50ad89ca9
942855db30b3210485beebb84789b7043f407af2
refs/heads/master
2021-01-10T19:41:00.324499
2015-01-07T09:17:09
2015-01-07T09:17:09
25,296,524
1
0
null
null
null
null
UTF-8
Java
false
false
520
java
package univ.evector.db.dao; import java.util.List; import lt.jmsys.spark.bind.executor.plsql.errors.SparkBusinessException; import org.springframework.stereotype.Repository; import univ.evector.beans.book.GramWord; @Repository public interface GramWordDao { GramWord findGramWord(String word) throws SparkBusinessException; List<GramWord> findGramWords(List<String> words) throws SparkBusinessException; List<GramWord> findGramWords(Long prgId) throws SparkBusinessException; }
[ "lukasonokoleg@gmail.com" ]
lukasonokoleg@gmail.com
62debec23438abdc9f7a30b681de66c1fd72e13d
7c0dc5cd25ccc19e836416e5fc22cdfec56de7e2
/csolver-java-core/csolver/kernel/solver/propagation/event/ConstraintEvent.java
a0490163e047854ac9225a5a8796cb1fc00fde06
[]
no_license
EmilioDiez/csolver
3b453833566e36151014a36ab914548fe4569dc1
44202f7b3c5bcf3d244f0fd617261b63aa411a68
refs/heads/master
2020-12-29T03:30:55.881640
2018-11-18T03:04:14
2018-11-18T03:04:14
68,049,900
0
0
null
null
null
null
UTF-8
Java
false
false
4,324
java
/* * Javascript Constraint Solver (CSolver) Copyright (c) 2016, * Emilio Diez,All rights reserved. * * * Choco Copyright (c) 1999-2010, Ecole des Mines de Nantes * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the Ecole des Mines de Nantes nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ package csolver.kernel.solver.propagation.event; import csolver.kernel.solver.ContradictionException; import csolver.kernel.solver.propagation.Propagator; import nitoku.log.Logger; /** * A class for constraint revisions in the propagation process. */ public class ConstraintEvent implements PropagationEvent { private static int _value = 1; public final static int UNARY = _value++; public final static int BINARY = _value++; public final static int TERNARY = _value++; public final static int LINEAR = _value++; public final static int QUADRATIC = _value++; public final static int CUBIC = _value++; public final static int VERY_SLOW = _value++; public final static int NB_PRIORITY = _value; /** * The touched constraint. */ private Propagator touchedConstraint; /** * Specifies if the constraint should be initialized. */ private boolean initialized = false; /** * Returns the priority of the var. */ private int priority = (-1); /** * Constructs a new var with the specified values for the fileds. */ public ConstraintEvent(Propagator constraint, boolean init, int prio) { this.touchedConstraint = constraint; this.initialized = init; this.priority = prio; } public Object getModifiedObject() { return touchedConstraint; } /** * Returns the priority of the var. */ @Override public int getPriority() { return priority; } /** * Propagates the var: awake or propagate depending on the init status. * * @throws csolver.kernel.solver.ContradictionException * */ public boolean propagateEvent() throws ContradictionException { if (this.initialized) { assert (this.touchedConstraint.isActive()); this.touchedConstraint.propagate(); } else { this.touchedConstraint.setActiveSilently(); this.touchedConstraint.awake(); } return true; } /** * Returns if the constraint is initialized. */ public boolean isInitialized() { return this.initialized; } /** * Sets if the constraint is initialized. */ public void setInitialized(boolean init) { this.initialized = init; } /** * Testing whether an event is active in the propagation network */ public boolean isActive(int idx) { return true; } /** * Clears the var. This should not be called with this kind of var. */ public void clear() { Logger.warning(ConstraintEvent.class,"Const Awake Event does not need to be cleared !"); } }
[ "emilio@mail.nitoku.com" ]
emilio@mail.nitoku.com
34975aa1c4eeec4b547d0faca4268bf7871d1824
c9f2bd34255a1f7822fe0fbf4c7e51fa26eede14
/java-project/src/main/examples/ar/uba/dc/simple/TwoCallsToSameMethod.java
4f8bf072445206a767dcd7f991c9c59a834f2ef2
[]
no_license
billy-mosse/jconsume
eca93b696eaf8edcb8af5730eebd95f49e736fd4
b782a55f20c416a73c967b2225786677af5f52ba
refs/heads/master
2022-09-22T18:10:43.784966
2020-03-09T01:00:38
2020-03-09T01:00:38
97,016,318
4
0
null
2022-09-01T22:58:04
2017-07-12T14:18:01
C
UTF-8
Java
false
false
281
java
package ar.uba.dc.simple; public class TwoCallsToSameMethod { public static void main(String[] args) { a1(); } public static void a1() { Integer i = a0(); Integer j = a0(); Integer k = a0(); } public static Integer a0() { return new Integer(4); } }
[ "billy.mosse@gmail.com" ]
billy.mosse@gmail.com
6c73e8ce1f13eae3c6cad9426c899a5421c66f43
f66fc1aca1c2ed178ac3f8c2cf5185b385558710
/reladomo/src/test/java/com/gs/fw/common/mithra/test/domain/ConcreteChild.java
06613d5f0e19231f7264b6b8f9f33979b1dcdc56
[ "Apache-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-public-domain" ]
permissive
goldmansachs/reladomo
9cd3e60e92dbc6b0eb59ea24d112244ffe01bc35
a4f4e39290d8012573f5737a4edc45d603be07a5
refs/heads/master
2023-09-04T10:30:12.542924
2023-07-20T09:29:44
2023-07-20T09:29:44
68,020,885
431
122
Apache-2.0
2023-07-07T21:29:52
2016-09-12T15:17:34
Java
UTF-8
Java
false
false
864
java
/* Copyright 2018 Mohammad Rezaei 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.gs.fw.common.mithra.test.domain; public class ConcreteChild extends ConcreteChildAbstract { public ConcreteChild() { super(); // You must not modify this constructor. Mithra calls this internally. // You can call this constructor. You can also add new constructors. } }
[ "mohammad.rezaei@gs.com" ]
mohammad.rezaei@gs.com
2f55e0cf059980aff3156abc893c36ca56109e15
16917d6d633c9d7c9b006bb4128a5146f61b65e6
/src/main/java/org/zwobble/couscous/interpreter/values/UnitInterpreterValue.java
59792c6225121e1c359b3031a2a06aae63577ac9
[]
no_license
mwilliamson/java-couscous
c3e70e296f03263ee2210d3b6e11c6be5480427d
6d423939b255f42a3334925d7c82e81b0865b318
refs/heads/master
2020-04-12T09:06:08.503582
2018-01-28T12:06:58
2018-01-28T12:06:58
43,388,866
5
1
null
null
null
null
UTF-8
Java
false
false
1,290
java
package org.zwobble.couscous.interpreter.values; import org.zwobble.couscous.interpreter.errors.NoSuchField; import org.zwobble.couscous.interpreter.types.InterpreterType; import org.zwobble.couscous.interpreter.types.IntrinsicInterpreterType; import org.zwobble.couscous.values.PrimitiveValue; import org.zwobble.couscous.values.PrimitiveValues; import java.util.Optional; public class UnitInterpreterValue implements InterpreterValue { private static final InterpreterType TYPE = IntrinsicInterpreterType.builder(UnitInterpreterValue.class, "Unit").build(); public static final UnitInterpreterValue UNIT = new UnitInterpreterValue(); private UnitInterpreterValue() { } @Override public InterpreterType getType() { return TYPE; } @Override public Optional<PrimitiveValue> toPrimitiveValue() { return Optional.of(PrimitiveValues.UNIT); } @Override public InterpreterValue getField(String fieldName) { throw new NoSuchField(fieldName); } @Override public void setField(String fieldName, InterpreterValue value) { throw new NoSuchField(fieldName); } @java.lang.Override public java.lang.String toString() { return "UnitInterpreterValue()"; } }
[ "mike@zwobble.org" ]
mike@zwobble.org
800e5ad3e50a6b7e6a5fbf619f1a2be77244f3b3
a9de22590675be8ee38163127a2c24a20c248a0b
/src/com/iremote/infraredcode/stb/codequery/AndTian.java
411b2f154a2d1aa1a4756a7f141b9dab6236c37b
[]
no_license
jessicaallen777/iremote2
0943622300286f8d16e9bb4dca349613ffc23bb1
b27aa81785fc8bf5467a1ffcacd49a04e41f6966
refs/heads/master
2023-03-16T03:20:00.746888
2019-12-12T04:02:30
2019-12-12T04:02:30
null
0
0
null
null
null
null
GB18030
Java
false
false
1,127
java
package com.iremote.infraredcode.stb.codequery; import com.iremote.infraredcode.tv.codequery.CodeQueryBase; public class AndTian extends CodeQueryBase { @Override public String getProductor() { return "AndTian"; } @Override public String[] getQueryCodeLiberay() { return querycode; } private static String[] querycode = new String[] { //机顶盒 和田(And Tian) 1 "00e047003382358110291f291f28652821282028202865291f2a65296529202865296528202820286628652965291f29652820281f292028202820281f2965291f296529662966286528899c823b8086280000000000000000000000000000000000000000000000000000000000", //机顶盒 和田(And Tian) 2 "00e047003582338111291f281f2966281f281f29202866281f28652965291f286628662820281f296529652865291f2965291f281f281f28202820291f28652a1f2a6529652866296628899b823c8087280000000000000000000000000000000000000000000000000000000000", //机顶盒 和田(And Tian) 3 "00e047003382348110291f291f281f2966281f282028662820286529652965281f296629662865282028202866281f2865291f291f291f2820286728202866291f296629652865296529899b823c8086290000000000000000000000000000000000000000000000000000000000", }; }
[ "stevenbluesky@163.com" ]
stevenbluesky@163.com
c7dc49d4bfa4f4694906a1b60e0d61d467af39cc
26d459097a814cf68985748dded27ec0ad17e6e9
/cdst-business/conferenza/src/main/java/conferenza/DTO/RispostaBoolean.java
f85bae52dafb2d668224b42408b5120c36322050
[]
no_license
christiandeangelis/meetpad-public
096af0f7d058a1dd78ce3ca667e8077302f4b20a
d7bac39cc93056859ac34cda2aa1e85cec3f73ea
refs/heads/main
2023-07-13T20:34:52.657949
2021-09-01T12:19:32
2021-09-01T12:19:32
402,055,182
0
0
null
2021-09-01T12:37:26
2021-09-01T12:37:26
null
UTF-8
Java
false
false
197
java
package conferenza.DTO; import conferenza.DTO.bean.Risposta; import io.swagger.annotations.ApiModel; @ApiModel(value="BooleanResponse") public class RispostaBoolean extends Risposta<Boolean>{ }
[ "antonio.genghi@regione.emilia-romagna.it" ]
antonio.genghi@regione.emilia-romagna.it
809cd90848ba925c5495e80d6682b8569267c771
a94503718e5b517e0d85227c75232b7a238ef24f
/src/main/java/net/dryuf/comp/gallery/dao/GallerySourceDao.java
f23f6ee73dff62624dceedd89571fd4139764258
[]
no_license
kvr000/dryuf-old-comp
795c457e6131bb0b08f538290ff96f8043933c9f
ebb4a10b107159032dd49b956d439e1994fc320a
refs/heads/master
2023-03-02T20:44:19.336992
2022-04-04T21:51:59
2022-04-04T21:51:59
229,681,213
0
0
null
2023-02-22T02:52:16
2019-12-23T05:14:49
Java
UTF-8
Java
false
false
2,139
java
package net.dryuf.comp.gallery.dao; import java.util.Map; import java.util.List; import net.dryuf.comp.gallery.GallerySource; import net.dryuf.core.EntityHolder; import net.dryuf.core.CallerContext; import net.dryuf.transaction.TransactionHandler; public interface GallerySourceDao extends net.dryuf.dao.DynamicDao<GallerySource, net.dryuf.comp.gallery.GallerySource.Pk> { public GallerySource refresh(GallerySource obj); public GallerySource loadByPk(net.dryuf.comp.gallery.GallerySource.Pk pk); public List<GallerySource> listAll(); public void insert(GallerySource obj); public void insertTxNew(GallerySource obj); public GallerySource update(GallerySource obj); public void remove(GallerySource obj); public boolean removeByPk(net.dryuf.comp.gallery.GallerySource.Pk pk); public List<GallerySource> listByCompos(net.dryuf.comp.gallery.GalleryRecord.Pk compos); public long removeByCompos(net.dryuf.comp.gallery.GalleryRecord.Pk compos); public net.dryuf.comp.gallery.GallerySource.Pk importDynamicKey(Map<String, Object> data); public Map<String, Object> exportDynamicData(EntityHolder<GallerySource> holder); public Map<String, Object> exportEntityData(EntityHolder<GallerySource> holder); public GallerySource createDynamic(EntityHolder<?> composition, Map<String, Object> data); public EntityHolder<GallerySource> retrieveDynamic(EntityHolder<?> composition, net.dryuf.comp.gallery.GallerySource.Pk pk); public GallerySource updateDynamic(EntityHolder<GallerySource> roleObject, net.dryuf.comp.gallery.GallerySource.Pk pk, Map<String, Object> updates); public boolean deleteDynamic(EntityHolder<?> composition, net.dryuf.comp.gallery.GallerySource.Pk pk); public long listDynamic(List<EntityHolder<GallerySource>> results, EntityHolder<?> composition, Map<String, Object> filter, List<String> sorts, Long start, Long limit); public TransactionHandler keepContextTransaction(CallerContext callerContext); public <R> R runTransactioned(java.util.concurrent.Callable<R> code) throws Exception; public <R> R runTransactionedNew(java.util.concurrent.Callable<R> code) throws Exception; }
[ "kvr@centrum.cz" ]
kvr@centrum.cz
e6ec8a8d70d5a1e593449fc81d62733e64e62157
60fe78bb64c3d6038972acd0652ea4fe02791bb5
/app/src/main/java/com/hc/hcppjoke/view/RecordView.java
2fb28bcc2106609da883269ba84f346823c22761
[]
no_license
hcgrady2/hcjoke
95c9c3d0f39c88905ddbf08bff6e7f4fcb6b9f1e
a65f9dfde789782ec44862dcafb1db468da06160
refs/heads/master
2023-07-03T03:06:35.289488
2021-08-06T06:31:44
2021-08-06T06:31:44
267,067,312
0
0
null
null
null
null
UTF-8
Java
false
false
5,589
java
package com.hc.hcppjoke.view; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; import androidx.annotation.Nullable; import com.hc.hcppjoke.R; import com.hc.libcommon.utils.PixUtils; public class RecordView extends View implements View.OnLongClickListener, View.OnClickListener { private static final int PROGRESS_INTERVAL = 100; private final Paint fillPaint; private final Paint progressPaint; private int progressMaxValue; private final int radius; private final int progressWidth; private final int progressColor; private final int fillColor; private final int maxDuration; private int progressValue; private boolean isRecording; private long startRecordTime; private onRecordListener mListener; public RecordView(Context context) { this(context, null); } public RecordView(Context context, @Nullable AttributeSet attrs) { this(context, attrs, 0); } public RecordView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { this(context, attrs, defStyleAttr, 0); } public RecordView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RecordView, defStyleAttr, defStyleRes); radius = typedArray.getDimensionPixelOffset(R.styleable.RecordView_radius, 0); progressWidth = typedArray.getDimensionPixelOffset(R.styleable.RecordView_progress_width, PixUtils.dp2px(3)); progressColor = typedArray.getColor(R.styleable.RecordView_progress_color, Color.RED); fillColor = typedArray.getColor(R.styleable.RecordView_fill_color, Color.WHITE); maxDuration = typedArray.getInteger(R.styleable.RecordView_duration, 10); setMaxDuration(maxDuration); typedArray.recycle(); fillPaint = new Paint(Paint.ANTI_ALIAS_FLAG); fillPaint.setColor(fillColor); fillPaint.setStyle(Paint.Style.FILL); progressPaint = new Paint(Paint.ANTI_ALIAS_FLAG); progressPaint.setColor(progressColor); progressPaint.setStyle(Paint.Style.STROKE); progressPaint.setStrokeWidth(progressWidth); Handler handler = new Handler(Looper.getMainLooper()) { @Override public void handleMessage(Message msg) { super.handleMessage(msg); progressValue++; postInvalidate(); if (progressValue <= progressMaxValue) { sendEmptyMessageDelayed(0, PROGRESS_INTERVAL); } else { finishRecord(); } } }; setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { isRecording = true; startRecordTime = System.currentTimeMillis(); handler.sendEmptyMessage(0); } else if (event.getAction() == MotionEvent.ACTION_UP) { long now = System.currentTimeMillis(); if (now - startRecordTime > ViewConfiguration.getLongPressTimeout()) { finishRecord(); } handler.removeCallbacksAndMessages(null); isRecording = false; startRecordTime = 0; progressValue = 0; postInvalidate(); } return false; } }); setOnClickListener(this); setOnLongClickListener(this); } private void finishRecord() { if (mListener != null) { mListener.onFinish(); } } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); int width = getWidth(); int height = getHeight(); if (isRecording) { canvas.drawCircle(width / 2, height / 2, width / 2, fillPaint); int left = progressWidth / 2; int top = progressWidth / 2; int right = width - progressWidth / 2; int bottom = height - progressWidth / 2; float sweepAngle = (progressValue * 1.0f / progressMaxValue) * 360; canvas.drawArc(left, top, right, bottom, -90, sweepAngle, false, progressPaint); } else { canvas.drawCircle(width / 2, height / 2, radius, fillPaint); } } public void setMaxDuration(int maxDuration) { this.progressMaxValue = maxDuration * 1000 / PROGRESS_INTERVAL; } public void setOnRecordListener(onRecordListener listener) { mListener = listener; } @Override public boolean onLongClick(View v) { if (mListener != null) { mListener.onLongClick(); } return true; } @Override public void onClick(View v) { if (mListener != null) { mListener.onClick(); } } public interface onRecordListener { void onClick(); void onLongClick(); void onFinish(); } }
[ "hcwang1024@163.com" ]
hcwang1024@163.com
3bcea2b531caff526bfd489ab61b6a698223b2eb
4312a71c36d8a233de2741f51a2a9d28443cd95b
/RawExperiments/TB/Math95/AstorMain-math_95/src/variant-872/org/apache/commons/math/distribution/FDistributionImpl.java
1f3307b2b7462fb4679e2593c4990ab5806896c1
[]
no_license
SajjadZaidi/AutoRepair
5c7aa7a689747c143cafd267db64f1e365de4d98
e21eb9384197bae4d9b23af93df73b6e46bb749a
refs/heads/master
2021-05-07T00:07:06.345617
2017-12-02T18:48:14
2017-12-02T18:48:14
112,858,432
0
0
null
null
null
null
UTF-8
Java
false
false
2,722
java
package org.apache.commons.math.distribution; public class FDistributionImpl extends org.apache.commons.math.distribution.AbstractContinuousDistribution implements java.io.Serializable , org.apache.commons.math.distribution.FDistribution { private static final long serialVersionUID = -8516354193418641566L; private double numeratorDegreesOfFreedom; private double denominatorDegreesOfFreedom; public FDistributionImpl(double numeratorDegreesOfFreedom ,double denominatorDegreesOfFreedom) { super(); setNumeratorDegreesOfFreedom(numeratorDegreesOfFreedom); setDenominatorDegreesOfFreedom(denominatorDegreesOfFreedom); } public double cumulativeProbability(double x) throws org.apache.commons.math.MathException { double ret; if (x <= 0.0) { ret = 0.0; } else { double n = getNumeratorDegreesOfFreedom(); double m = getDenominatorDegreesOfFreedom(); ret = org.apache.commons.math.special.Beta.regularizedBeta(((n * x) / (m + (n * x))), (0.5 * n), (0.5 * m)); } return ret; } public double inverseCumulativeProbability(final double p) throws org.apache.commons.math.MathException { if (p == 1) { return java.lang.Double.POSITIVE_INFINITY; } if (p == 1) { return java.lang.Double.POSITIVE_INFINITY; } return super.inverseCumulativeProbability(p); } protected double getDomainLowerBound(double p) { return 0.0; } protected double getDomainUpperBound(double p) { return java.lang.Double.MAX_VALUE; } protected double getInitialDomain(double p) { double ret; double d = getDenominatorDegreesOfFreedom(); ret = d / (d - 2.0); return ret; } public void setNumeratorDegreesOfFreedom(double degreesOfFreedom) { if (degreesOfFreedom <= 0.0) { throw new java.lang.IllegalArgumentException("degrees of freedom must be positive."); } org.apache.commons.math.distribution.FDistributionImpl.this.numeratorDegreesOfFreedom = degreesOfFreedom; } public double getNumeratorDegreesOfFreedom() { return numeratorDegreesOfFreedom; } public void setDenominatorDegreesOfFreedom(double degreesOfFreedom) { if (degreesOfFreedom <= 0.0) { throw new java.lang.IllegalArgumentException("degrees of freedom must be positive."); } org.apache.commons.math.distribution.FDistributionImpl.this.denominatorDegreesOfFreedom = degreesOfFreedom; } public double getDenominatorDegreesOfFreedom() { return denominatorDegreesOfFreedom; } }
[ "sajjad.syed@ucalgary.ca" ]
sajjad.syed@ucalgary.ca
d71e4da375dc3de957f50755b07353d5af0d7699
4312a71c36d8a233de2741f51a2a9d28443cd95b
/RawExperiments/DB/Math70/AstorMain-math70/src/variant-656/org/apache/commons/math/analysis/solvers/BisectionSolver.java
5b9f48ab992c094253056f2432730385261ec1b8
[]
no_license
SajjadZaidi/AutoRepair
5c7aa7a689747c143cafd267db64f1e365de4d98
e21eb9384197bae4d9b23af93df73b6e46bb749a
refs/heads/master
2021-05-07T00:07:06.345617
2017-12-02T18:48:14
2017-12-02T18:48:14
112,858,432
0
0
null
null
null
null
UTF-8
Java
false
false
2,231
java
package org.apache.commons.math.analysis.solvers; public class BisectionSolver extends org.apache.commons.math.analysis.solvers.UnivariateRealSolverImpl { @java.lang.Deprecated public BisectionSolver(org.apache.commons.math.analysis.UnivariateRealFunction f) { super(f, 100, 1.0E-6); } public BisectionSolver() { super(100, 1.0E-6); } @java.lang.Deprecated public double solve(double min, double max, double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return solve(f, min, max); } @java.lang.Deprecated public double solve(double min, double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return solve(f, min, max); } public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, double min, double max, double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return super.getMinImpl(); } public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, double min, double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { clearResult(); verifyInterval(min, max); double m; double fm; double fmin; int i = 0; while (i < (maximalIterationCount)) { m = org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils.midpoint(min, max); fmin = f.value(min); fm = f.value(m); if ((fm * fmin) > 0.0) { min = m; } else { max = m; } if ((java.lang.Math.abs((max - min))) <= (absoluteAccuracy)) { m = org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils.midpoint(min, max); setResult(m, i); return m; } ++i; } throw new org.apache.commons.math.MaxIterationsExceededException(maximalIterationCount); } }
[ "sajjad.syed@ucalgary.ca" ]
sajjad.syed@ucalgary.ca
01afeb0b7ddf655c3aec9e4da135578c9c4aaeb2
3a5985651d77a31437cfdac25e594087c27e93d6
/driver-tests/performance/JMSBased/jmsBasedBenchmarkDriver/src/com/sun/jbi/performance/jmsbd/EventCollector.java
1b2e5f8237f2b3220de74c2926cc8a5ec87a0865
[]
no_license
vitalif/openesb-components
a37d62133d81edb3fdc091abd5c1d72dbe2fc736
560910d2a1fdf31879e3d76825edf079f76812c7
refs/heads/master
2023-09-04T14:40:55.665415
2016-01-25T13:12:22
2016-01-25T13:12:33
48,222,841
0
5
null
null
null
null
UTF-8
Java
false
false
6,255
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.sun.jbi.performance.jmsbd; import com.sun.jbi.engine.iep.core.runtime.operator.Inserter; import com.sun.jbi.engine.iep.core.runtime.operator.Operator; import com.sun.jbi.engine.iep.core.runtime.util.Util; import java.sql.Connection; import java.sql.PreparedStatement; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Properties; import java.util.StringTokenizer; import javax.jms.JMSException; import javax.jms.QueueReceiver; import javax.jms.QueueSession; import javax.jms.TextMessage; /** * * @author Bing Lu */ public class EventCollector implements Runnable { static final int mServerConnectionRetries = 10; static final int mServerConectionRetryInterval = 2000; private static int mRetryCount = 0; private Operator mOperator; private String mJmsServerHostName; private String mJmsServerPort; private String mQueueName; private Properties mProperties; private Thread mThread; private boolean mRunning; private boolean mStopped; private Object mStoppedMonitor = new Object(); private List<Object[]> mRowList = new LinkedList<Object[]>(); public EventCollector(Operator operator, String queueName, Properties properties) { mOperator = operator; mQueueName = queueName; mProperties = properties; mJmsServerHostName = mProperties.getProperty("JmsServerHostName"); mJmsServerPort = mProperties.getProperty("JmsServerPort"); } public void start() { mThread = new Thread(this, "Event collector"); mThread.start(); } public void run() { HashMap hashMap = null; Connection con = null; PreparedStatement insertStmt = null; try { con = Util.getConnection(mProperties); con.setAutoCommit(false); insertStmt = ((Inserter) mOperator).getInsertStatement(con, true); hashMap = JMSHelper.createQueueReceiver(mJmsServerHostName, mJmsServerPort, mQueueName); QueueReceiver queueReceiver = (QueueReceiver)hashMap.get("QueueReceiver"); QueueSession queueSession = (QueueSession)hashMap.get("QueueSession"); TextMessage receivedTextMessage = null; mRunning = true; mStopped = false; while (mRunning) { try { receivedTextMessage = (TextMessage) queueReceiver.receive(1000); if (receivedTextMessage == null) { continue; } } catch (JMSException e) { hashMap = retryConnection(); if (hashMap != null) { // reset retry count mRetryCount = 0; queueReceiver = (QueueReceiver)hashMap.get("QueueReceiver"); queueSession = (QueueSession)hashMap.get("QueueSession"); continue; } else { throw e; } } try { while (mRunning) { process(receivedTextMessage); // 1 millisecond is the smallest time period to specify receivedTextMessage = (TextMessage) queueReceiver.receive(1); if (receivedTextMessage == null) { // time is expired break; } } batchProcess(con, insertStmt); } catch (Exception e) { e.printStackTrace(); } } } catch (Exception e) { if (mRunning) { e.printStackTrace(); } } finally { Util.close(insertStmt); Util.close(con); JMSHelper.closeConnectionAndSession(hashMap); mStopped = true; synchronized (mStoppedMonitor) { mStoppedMonitor.notifyAll(); } System.out.println("Event collector is stopped successfully"); } } public void stopAndWait() { mRunning = false; while (!mStopped) { synchronized (mStoppedMonitor) { try { mStoppedMonitor.wait(); } catch (InterruptedException e) { } } } } private void process(TextMessage msg) { try { String txt = msg.getText(); StringTokenizer st = new StringTokenizer(txt, ","); ArrayList list = new ArrayList(); while (st.hasMoreTokens()) { list.add(st.nextToken()); } mRowList.add(list.toArray()); } catch (Exception e) { e.printStackTrace(); } } private void batchProcess(Connection con, PreparedStatement insertStmt) throws Exception { insertStmt.clearBatch(); for (Object[] row : mRowList) { for (int i = 0; i < row.length; i++) { insertStmt.setObject(i+1, row[i]); } insertStmt.addBatch(); } insertStmt.executeBatch(); con.commit(); mRowList.clear(); } private HashMap retryConnection() { try { if (mRetryCount++ < mServerConnectionRetries) { System.out.println("Waiting " + mServerConectionRetryInterval + " secs before restarting JMS server"); try { Thread.sleep(mServerConectionRetryInterval * 1000); } catch(InterruptedException e) { System.out.println("Exception occurred while the thread was sleeping."); } return JMSHelper.createQueueReceiver(mJmsServerHostName, mJmsServerPort, mQueueName); } } catch (Exception e) { if (mRetryCount < mServerConnectionRetries) { return retryConnection(); } } return null; } }
[ "bitbucket@bitbucket02.private.bitbucket.org" ]
bitbucket@bitbucket02.private.bitbucket.org
8c8a5b2df040b2efa64641e5fbc0621a8959d5ee
1c9bac38deccf17d10b4c90196f9a4832fc10f26
/src/main/java/com/book/store/dao/CategoryDao.java
c72b7e0581d33267ee5ffbdc211914aabcf319d9
[]
no_license
Imdrmas/book-store-spring
bc3c731261d2c657f95fbdf7a72a70895388a417
d0ff504716e67a2173b4af9e6e173981efa9d789
refs/heads/main
2023-02-11T17:04:00.013851
2021-01-09T19:35:37
2021-01-09T19:35:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
202
java
package com.book.store.dao; import org.springframework.data.jpa.repository.JpaRepository; import com.book.store.modal.Category; public interface CategoryDao extends JpaRepository<Category, Long>{ }
[ "imdrmas@gmail.com" ]
imdrmas@gmail.com
16065181a2605a852937ce79e35ee4d9cf7259d5
2a985a74214487a77cfe2d8fcbbc1de885edc987
/app/src/main/java/com/example/admin/calandburn/SevenAdapter.java
4515820fef7168b334f1bb94c5ea2202db31a92d
[]
no_license
masterUNG/Cal-and-Burn-from-Gun2
0e90c8b8d8dfc7b10371a253f33d9b7b07bb4cee
dd2131cb0570da96a4f28ccdf5a2f3dbc49d8346
refs/heads/master
2021-01-01T05:26:20.185193
2016-05-21T10:39:40
2016-05-21T10:39:40
59,281,386
0
0
null
null
null
null
UTF-8
Java
false
false
2,013
java
package com.example.admin.calandburn; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; public class SevenAdapter extends BaseAdapter{ //Explicit private Context objContext; private String[] nameCalStrings, dateStrings, numCalString, CalString; private int[] iconInts; public SevenAdapter(Context objContext, String[] nameCalStrings, String[] dateStrings, String[] numCalString, String[] CalString) { this.objContext = objContext; this.nameCalStrings = nameCalStrings; this.dateStrings = dateStrings; this.numCalString = numCalString; this.CalString = CalString; } // Constructor @Override public int getCount() { return nameCalStrings.length; } @Override public Object getItem(int i) { return null; } @Override public long getItemId(int i) { return 0; } @Override public View getView(int i, View view, ViewGroup viewGroup) { LayoutInflater objLayoutInflater = (LayoutInflater) objContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View objView1 = objLayoutInflater.inflate(R.layout.seven_listview, viewGroup, false); //Setup Title TextView dateTextView = (TextView) objView1.findViewById(R.id.textView95); dateTextView.setText(dateStrings[i]); TextView nameTextView = (TextView) objView1.findViewById(R.id.namelist1); nameTextView.setText(nameCalStrings[i]); TextView numTextView = (TextView) objView1.findViewById(R.id.numlist1); numTextView.setText(numCalString[i]); TextView calTextView = (TextView) objView1.findViewById(R.id.callist1); calTextView.setText(CalString[i]); return objView1; } } // Main Class
[ "phrombutr@gmail.com" ]
phrombutr@gmail.com
50b4bd609053585631727b8cac5d6db654810d04
0d430563d908de7cda867380b6fe85e77be11c3d
/workspace/spring-security-demo-02-basic-security/src/main/java/com/luv2code/springsecurity/demo/config/DemoSecurityConfig.java
8bf140b2e5d3ebb96c8a44cd585a1928e4b9fa62
[]
no_license
hshar89/MyCodes
e2eec3b9a2649fec04e5b391d0ca3d4d9d5ae6dc
e388f005353c9606873b6cafdfce1e92d13273e7
refs/heads/master
2022-12-23T00:36:01.951137
2020-04-03T13:39:22
2020-04-03T13:39:22
252,720,397
1
0
null
2022-12-16T00:35:41
2020-04-03T12:04:10
Java
UTF-8
Java
false
false
1,536
java
package com.luv2code.springsecurity.demo.config; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.User.UserBuilder; @Configuration @EnableWebSecurity public class DemoSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { //add our users for in memory authentication UserBuilder users = User.withDefaultPasswordEncoder(); auth.inMemoryAuthentication() .withUser(users.username("john").password("test123").roles("EMPLOYEE")) .withUser(users.username("susan").password("test123").roles("ADMIN")) .withUser(users.username("mary").password("test123").roles("MANAGER")); super.configure(auth); } @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .anyRequest().authenticated() .and() .formLogin() .loginPage("/showMyLoginPage") .loginProcessingUrl("/authenticateTheUser") .permitAll(); super.configure(http); } }
[ "harshsharma3@deloitte.com" ]
harshsharma3@deloitte.com
a4c593605cfd746e41e749c04e40425980f627fb
2f812bb134b09e1f0607e879cfcabf08ac296853
/app/src/main/java/com/unipad/http/HitopQuitLogin.java
b63c60ffa2abd4fa6eadab4b8667a8f61349f539
[ "Apache-2.0" ]
permissive
qiuzichi/MadBrain
35c455ebc0da891a50bfc5b5f0ed119b5baba6ad
3dcc615df19ae31e2d125b54e707825d5aba5a21
refs/heads/master
2020-04-05T22:53:59.532601
2016-11-01T06:08:12
2016-11-01T06:08:12
62,781,641
0
2
null
2016-07-07T06:42:38
2016-07-07T06:42:37
null
UTF-8
Java
false
false
1,362
java
package com.unipad.http; import com.unipad.AppContext; import com.unipad.brain.App; import com.unipad.brain.consult.entity.AdPictureBean; import com.unipad.brain.home.dao.NewsService; import com.unipad.brain.personal.dao.PersonCenterService; import com.unipad.common.Constant; import org.json.JSONArray; import org.json.JSONObject; import java.util.ArrayList; import java.util.List; /** * Created by gongkan on 2016/6/12. */ public class HitopQuitLogin extends HitopRequest<List<AdPictureBean>> { public HitopQuitLogin() { super(HttpConstant.USER_QUIT_APPLICATION); mParams.addBodyParameter("user_id", AppContext.instance().loginUser.getUserId()); } @Override public String buildRequestURL() { return null; } @Override public List handleJsonData(String json) { JSONObject jsObj = null; int result = -1; try { jsObj = new JSONObject(json); if (jsObj != null && jsObj.toString().length() != 0) { if (jsObj.getInt("ret_code") == 0) { result = 0; } } } catch (Exception e) { return null; } ((PersonCenterService) AppContext.instance().getService(Constant.PERSONCENTER)).noticeDataChange(HttpConstant.QUIT_APPLICATION, result); return null; } }
[ "410133912@qq.com" ]
410133912@qq.com
4e1f4124d922c8ed5a71e5294c0a8678e1d9452b
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribeImageComponentsResponse.java
e844ee6820e893319789c7f382fb3fbc2dc19d6d
[ "Apache-2.0" ]
permissive
caojiele/aliyun-openapi-java-sdk
b6367cc95469ac32249c3d9c119474bf76fe6db2
ecc1c949681276b3eed2500ec230637b039771b8
refs/heads/master
2023-06-02T02:30:02.232397
2021-06-18T04:08:36
2021-06-18T04:08:36
172,076,930
0
0
NOASSERTION
2019-02-22T14:08:29
2019-02-22T14:08:29
null
UTF-8
Java
false
false
4,300
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.ecs.model.v20140526; import java.util.List; import com.aliyuncs.AcsResponse; import com.aliyuncs.ecs.transform.v20140526.DescribeImageComponentsResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class DescribeImageComponentsResponse extends AcsResponse { private String requestId; private Integer totalCount; private String nextToken; private Integer maxResults; private List<ImageComponentSet> imageComponent; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public Integer getTotalCount() { return this.totalCount; } public void setTotalCount(Integer totalCount) { this.totalCount = totalCount; } public String getNextToken() { return this.nextToken; } public void setNextToken(String nextToken) { this.nextToken = nextToken; } public Integer getMaxResults() { return this.maxResults; } public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } public List<ImageComponentSet> getImageComponent() { return this.imageComponent; } public void setImageComponent(List<ImageComponentSet> imageComponent) { this.imageComponent = imageComponent; } public static class ImageComponentSet { private String creationTime; private String imageComponentId; private String name; private String description; private String systemType; private String componentType; private String content; private String resourceGroupId; private List<Tag> tags; public String getCreationTime() { return this.creationTime; } public void setCreationTime(String creationTime) { this.creationTime = creationTime; } public String getImageComponentId() { return this.imageComponentId; } public void setImageComponentId(String imageComponentId) { this.imageComponentId = imageComponentId; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } public String getSystemType() { return this.systemType; } public void setSystemType(String systemType) { this.systemType = systemType; } public String getComponentType() { return this.componentType; } public void setComponentType(String componentType) { this.componentType = componentType; } public String getContent() { return this.content; } public void setContent(String content) { this.content = content; } public String getResourceGroupId() { return this.resourceGroupId; } public void setResourceGroupId(String resourceGroupId) { this.resourceGroupId = resourceGroupId; } public List<Tag> getTags() { return this.tags; } public void setTags(List<Tag> tags) { this.tags = tags; } public static class Tag { private String tagKey; private String tagValue; public String getTagKey() { return this.tagKey; } public void setTagKey(String tagKey) { this.tagKey = tagKey; } public String getTagValue() { return this.tagValue; } public void setTagValue(String tagValue) { this.tagValue = tagValue; } } } @Override public DescribeImageComponentsResponse getInstance(UnmarshallerContext context) { return DescribeImageComponentsResponseUnmarshaller.unmarshall(this, context); } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
9fd6388e458cdbae062132b982b496c31c1c9a71
e66dfd2f3250e0e271dcdac4883227873e914429
/zml-jce/src/main/java/com/jce/framework/weixin/api/core/handler/impl/WeixinReqDefaultHandler.java
37507602e3dac218c245fff7126c9f456fd9ce9d
[]
no_license
tianshency/zhuminle
d13b45a8a528f0da2142aab0fd999775fe476e0c
c864d0ab074dadf447504f54a82b2fc5b149b97e
refs/heads/master
2020-03-18T00:54:16.153820
2018-05-20T05:20:08
2018-05-20T05:20:08
134,118,245
0
1
null
null
null
null
UTF-8
Java
false
false
2,222
java
package com.jce.framework.weixin.api.core.handler.impl; import java.util.Map; import org.apache.log4j.Logger; import com.jce.framework.weixin.api.core.annotation.ReqType; import com.jce.framework.weixin.api.core.exception.WexinReqException; import com.jce.framework.weixin.api.core.handler.WeiXinReqHandler; import com.jce.framework.weixin.api.core.req.model.WeixinReqConfig; import com.jce.framework.weixin.api.core.req.model.WeixinReqParam; import com.jce.framework.weixin.api.core.util.HttpRequestProxy; import com.jce.framework.weixin.api.core.util.WeiXinConstant; import com.jce.framework.weixin.api.core.util.WeiXinReqUtil; public class WeixinReqDefaultHandler implements WeiXinReqHandler { private static Logger logger = Logger.getLogger(WeixinReqDefaultHandler.class); public String doRequest(WeixinReqParam weixinReqParam) throws WexinReqException { String strReturnInfo = ""; if (weixinReqParam.getClass().isAnnotationPresent(ReqType.class)) { ReqType reqType = (ReqType)weixinReqParam.getClass().getAnnotation(ReqType.class); WeixinReqConfig objConfig = WeiXinReqUtil.getWeixinReqConfig(reqType.value()); if (objConfig != null) { String reqUrl = objConfig.getUrl(); String method = objConfig.getMethod(); String datatype = objConfig.getDatatype(); Map parameters = WeiXinReqUtil.getWeixinReqParam(weixinReqParam); if (WeiXinConstant.JSON_DATA_TYPE.equalsIgnoreCase(datatype)) { parameters.clear(); parameters.put("access_token", weixinReqParam.getAccess_token()); weixinReqParam.setAccess_token(null); String jsonData = WeiXinReqUtil.getWeixinParamJson(weixinReqParam); strReturnInfo = HttpRequestProxy.doJsonPost(reqUrl, parameters, jsonData); } else if (WeiXinConstant.REQUEST_GET.equalsIgnoreCase(method)) { strReturnInfo = HttpRequestProxy.doGet(reqUrl, parameters, "UTF-8"); } else { strReturnInfo = HttpRequestProxy.doPost(reqUrl, parameters, "UTF-8"); } } } else { logger.info("没有找到对应的配置信息"); } return strReturnInfo; } }
[ "tianshencaoyin@163.com" ]
tianshencaoyin@163.com
167bed8cc1856dddcce336b16f38feb37f32c196
eecc0c30a156f387c58e470a5ca2e25fd25afc4a
/rightangleoverlineview/src/androidTest/java/com/anwesh/uiprojects/rightangleoverlineview/ExampleInstrumentedTest.java
5b7e7d6246c8fec8c16de3f73c80fc811ad64d8a
[]
no_license
Anwesh43/LinkedRightAngleOverLineView
24dbed71ad02c3739828406be400f4675da7ad79
3dc8782fc3f57394e100abfba93516537336a41a
refs/heads/master
2020-06-25T12:41:45.279511
2019-07-28T16:17:54
2019-07-28T16:17:54
199,310,108
0
0
null
null
null
null
UTF-8
Java
false
false
794
java
package com.anwesh.uiprojects.rightangleoverlineview; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.anwesh.uiprojects.rightangleoverlineview.test", appContext.getPackageName()); } }
[ "anweshthecool0@gmail.com" ]
anweshthecool0@gmail.com
50ce89348507aeab40896e56001ec4f178dd33e4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_3100248714a579293991936e25aea49170747b6a/QuestionValidation/26_3100248714a579293991936e25aea49170747b6a_QuestionValidation_t.java
6bf7b65632e8c3c88b77dd4865e0b1d07aa45efe
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,922
java
package com.forum.repository; import org.apache.commons.lang.StringEscapeUtils; import org.springframework.stereotype.Repository; @Repository public class QuestionValidation { private static final int MINIMUM_CHARACTERS = 20; private static final int JAVA_SPACE = 32; private static final int HTML_SPACE = 160; public boolean isQuestionValid(String question) { if (question == null) return false; question = getPlainText(question); question = reduceBlanks(question); if (question == "" || question.length() < MINIMUM_CHARACTERS) return false; return true; } private String getPlainText(String question) { question = question.replaceAll("\\<.*?>", ""); return StringEscapeUtils.unescapeHtml(question); } private String reduceBlanks(String question) { int spaceCount = 0; StringBuilder refactoredQuestion = new StringBuilder(question.length()); for (int i = 0; i < question.length(); i++) { boolean spaceCharacter = question.charAt(i) == JAVA_SPACE || question.charAt(i) == HTML_SPACE; if (spaceCharacter) spaceCount++; if (!spaceCharacter || spaceCount <= 1) { refactoredQuestion.append(question.charAt(i)); } if (!spaceCharacter) spaceCount = 0; } return refactoredQuestion.toString(); } public String insertApostrophe(String question) { StringBuilder refactoredQuestion = new StringBuilder(question.length()); String apostrophe = "'"; for (int i = 0; i < question.length(); i++) { refactoredQuestion.append(question.charAt(i)); if (question.charAt(i) == '\'') { refactoredQuestion.append(apostrophe); } } return refactoredQuestion.toString(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
316e5f893af2e7b913801dcba3eb4bfa14f9ec3d
06418ffe256664e0633de3cb1088260b7db8a1b7
/source_BubbleShoot_noServer/BubbleShoot_BubbleMonster/src/com/lavagame/bubblemonster/actor/Actor.java
b61b73c7062e573cb1320b969dbcbf5dc18d16c6
[]
no_license
hoangwin/pi-cac-chu-old-version
7472b04cedbfad2465a969e5efa6ff2d4b26100a
0857a97225f99e5d62cda54f75b3dcf13ea1938c
refs/heads/master
2016-09-05T19:09:34.300481
2015-05-27T04:19:39
2015-05-27T04:19:39
33,906,095
0
0
null
null
null
null
UTF-8
Java
false
false
3,339
java
package com.lavagame.bubblemonster.actor; import java.util.Random; import com.lavagame.bubblemonster.GameLayer; import com.lavagame.bubblemonster.GameLib; import com.lavagame.bubblemonster.MainActivity; import com.lavagame.bubblemonster.Sprite; import android.graphics.Color; public class Actor { //type of Actor public static Random random = new Random(); public int m_x = 100; public int m_y = 100; public int m_Width = 12; public int m_Height = 12; public int m_Speed = 6; public static final int DIRECTION_UP = 0; public static final int DIRECTION_RIGHT = 1; public static final int DIRECTION_DOWN = 2; public static final int DIRECTION_LEFT = 3; // state public int mstate = 0; public int mdirection; public int m_Target_x = -1; public int m_Target_y = -1; public int m_Target_Pos_Rows = -1; public int m_Target_Pos_Cols = -1; public int m_pos_rows = -1; public int m_pos_cols = -1; public static Sprite sprite; // int currentFrame; // int currentAnimation; public int angleDegree = 0; public double angleRadian = 0; public int state = -1; public int _currentFrame = -1; public int _waitDelay = -1; public int _currentAnimation = -1; public int _xpos = -1; public int _ypos = -1; public boolean _canLoop = false; public boolean _ShowLastFrame = true; public Actor() { } public Actor(int x, int y, int w, int h, String Name, String Type) { // sprite = new Sprite(pathSprite, true); m_x = x; m_y = y; m_Width = w; m_Height = h; } public void setPostion(int x, int y) { m_x = x; m_y = y; } public void drawRect(int x, int y, int w, int h) { GameLib.mainPaint.setColor(Color.RED); GameLib.mainCanvas.drawRect(x, y, x + w, y + h, GameLib.mainPaint); } public void render() { GameLib.mainCanvas.drawRect((m_x + GameLayer.screenOffsetX), (m_y + GameLayer.screenOffsetY), (m_x + GameLayer.screenOffsetX) + m_Width, (m_y + GameLayer.screenOffsetY) + m_Height, GameLib.mainPaint); MainActivity.mainCanvas.drawText( "Object", (m_x + GameLayer.screenOffsetX), (m_y + GameLayer.screenOffsetY),MainActivity.android_FontSmall); //TapTapZooCrush.fontsmall_White.drawString(GameLib.mainCanvas, "Object", (m_x + GameLayer.screenOffsetX), (m_y + GameLayer.screenOffsetY), 0); //sprite.drawAnim(GameLib.mainCanvas, m_x, m_y); } //ACTOR TYPE public static final int ACTOR_TYPE_MAINMC = 0; public static final int ACTOR_TYPE_DOOR = 1; public static Actor createActor(int x, int y, int w, int h, String Name, String type) { int typeInt = getActorTypeFromString(type); switch (typeInt) { case ACTOR_TYPE_MAINMC: return null; //case ACTOR_TYPE_DOOR: // return new Door(x, y, w, h, Name, type); default: break; } return null; } public static int getActorTypeFromString(String type) { if (type.equals("mainmc")) { return ACTOR_TYPE_MAINMC; } else if (type.equals("door")) { return ACTOR_TYPE_DOOR; } return -1; } public static boolean checkCollision(Actor actor1, Actor actor2) { //true when it have collition return !(actor1.m_x > actor2.m_x + actor2.m_Width || actor1.m_x + actor1.m_Width < actor2.m_x || actor1.m_y > actor2.m_y + actor2.m_Height || actor1.m_y + actor1.m_Height < actor2.m_y); } public void update() { //it will overide in child class // TODO Auto-generated method stub } }
[ "hoang.nguyenmau@hotmail.com" ]
hoang.nguyenmau@hotmail.com
56d0f73dec570188684efcb185c1e1840d8ecdcf
fc6c869ee0228497e41bf357e2803713cdaed63e
/weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/ipcall/a/d/m.java
244de7564a05ebd8fb29a51bf921bb08cbe306e4
[]
no_license
hyb1234hi/reverse-wechat
cbd26658a667b0c498d2a26a403f93dbeb270b72
75d3fd35a2c8a0469dbb057cd16bca3b26c7e736
refs/heads/master
2020-09-26T10:12:47.484174
2017-11-16T06:54:20
2017-11-16T06:54:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,561
java
package com.tencent.mm.plugin.ipcall.a.d; import com.tencent.gmtrace.GMTrace; import com.tencent.mm.ad.b; import com.tencent.mm.ad.b.a; import com.tencent.mm.ad.b.b; import com.tencent.mm.ad.b.c; import com.tencent.mm.network.q; import com.tencent.mm.protocal.c.bcd; import com.tencent.mm.protocal.c.bce; import com.tencent.mm.protocal.c.bqg; import com.tencent.mm.sdk.platformtools.w; import java.util.LinkedList; public final class m extends com.tencent.mm.ad.k implements com.tencent.mm.network.k { private b fUa; private com.tencent.mm.ad.e fUd; private bcd mlV; public bce mlW; public m(int paramInt1, int paramInt2, LinkedList<bqg> paramLinkedList) { GMTrace.i(11580842442752L, 86284); this.fUa = null; this.mlV = null; this.mlW = null; b.a locala = new b.a(); locala.gtF = new bcd(); locala.gtG = new bce(); locala.gtE = 871; locala.uri = "/cgi-bin/micromsg-bin/sendwcofeedback"; locala.gtH = 0; locala.gtI = 0; this.fUa = locala.DA(); this.mlV = ((bcd)this.fUa.gtC.gtK); this.mlV.uEq = paramInt2; this.mlV.uOU = paramLinkedList; this.mlV.uOT = paramLinkedList.size(); this.mlV.uOV = paramInt1; w.i("MicroMsg.NetSceneIPCallSendFeedback", "NetSceneIPCallSendFeedback roomid=%d, level=%d, feedbackCount=%d", new Object[] { Integer.valueOf(paramInt1), Integer.valueOf(paramInt2), Integer.valueOf(paramLinkedList.size()) }); GMTrace.o(11580842442752L, 86284); } public final int a(com.tencent.mm.network.e parame, com.tencent.mm.ad.e parame1) { GMTrace.i(11581110878208L, 86286); this.fUd = parame1; int i = a(parame, this.fUa, this); GMTrace.o(11581110878208L, 86286); return i; } public final void a(int paramInt1, int paramInt2, int paramInt3, String paramString, q paramq, byte[] paramArrayOfByte) { GMTrace.i(11581245095936L, 86287); w.i("MicroMsg.NetSceneIPCallSendFeedback", "onGYNetEnd, errType: %d, errCode: %d", new Object[] { Integer.valueOf(paramInt2), Integer.valueOf(paramInt3) }); this.mlW = ((bce)((b)paramq).gtD.gtK); if (this.fUd != null) { this.fUd.a(paramInt2, paramInt3, paramString, this); } GMTrace.o(11581245095936L, 86287); } public final int getType() { GMTrace.i(11580976660480L, 86285); GMTrace.o(11580976660480L, 86285); return 871; } } /* Location: D:\tools\apktool\weixin6519android1140\jar\classes3-dex2jar.jar!\com\tencent\mm\plugin\ipcall\a\d\m.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "robert0825@gmail.com" ]
robert0825@gmail.com
58c3c52acd4f0e47802afb3a0c2ba5abcc5340ab
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_new2/Nicad_t1_beam_new22083.java
fc74a5cb29e0841e0f7777b65341c115fd7c1b57
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
510
java
// clone pairs:10155:70% // 13625:beam/sdks/java/core/src/main/java/org/apache/beam/sdk/values/ValueWithRecordId.java public class Nicad_t1_beam_new22083 { public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof ValueWithRecordId)) { return false; } ValueWithRecordId<?> otherRecord = (ValueWithRecordId<?>) other; return Objects.deepEquals(id, otherRecord.id) && Objects.deepEquals(value, otherRecord.value); } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
f29bafc4318ec99ac6948d3990b5fe4e6d077757
28dff536ddbb2492edbf52da7bfb8604b7d399ed
/src/main/java/io/dimasan/jdk/concurrency/deadlock/SimplestDeadlock.java
f20f9bb260a9c89a460e2c32742a4ac48d059126
[]
no_license
DimaSanKiev/Snippets
88e8552bc23865d488a17b7b8447d0974034db45
f41f373d30c4ddd651097705ee2a18abd0275438
refs/heads/master
2021-01-11T22:20:04.131044
2017-01-17T19:31:29
2017-01-17T19:31:29
78,896,679
0
0
null
null
null
null
UTF-8
Java
false
false
373
java
package io.dimasan.jdk.concurrency.deadlock; public class SimplestDeadlock { /* Thread.currentThread() returns a reference on the current thread (on main thread). And we join() it, but it cannot die because it waits for its death. Deadlock. */ public static void main(String[] args) throws InterruptedException { Thread.currentThread().join(); } }
[ "dmytro.burdyga@gmail.com" ]
dmytro.burdyga@gmail.com
235b9037a9fecacdc05765605884dea18c26de9e
7c1430c53b4d66ad0e96dd9fc7465a5826fdfb77
/grape-system-1.0.1s/src/org/mariadb/jdbc/internal/com/read/ErrorPacket.java
0bd3f12175119c12ee82e6112155eabe05c5846c
[]
no_license
wang3624270/online-learning-server
ef97fb676485f2bfdd4b479235b05a95ad62f841
2d81920fef594a2d0ac482efd76669c8d95561f1
refs/heads/master
2020-03-20T04:33:38.305236
2019-05-22T06:31:05
2019-05-22T06:31:05
137,187,026
1
0
null
null
null
null
UTF-8
Java
false
false
3,680
java
/* MariaDB Client for Java Copyright (c) 2012-2014 Monty Program Ab. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to Monty Program Ab info@montyprogram.com. This particular MariaDB Client for Java file is work derived from a Drizzle-JDBC. Drizzle-JDBC file which is covered by subject to the following copyright and notice provisions: Copyright (c) 2009-2011, Marcus Eriksson Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the driver nor the names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.mariadb.jdbc.internal.com.read; import java.nio.charset.StandardCharsets; public class ErrorPacket { private final short errorNumber; private final byte sqlStateMarker; private final byte[] sqlState; private final String message; /** * Reading error stream. * * @param buffer current stream rawBytes */ public ErrorPacket(Buffer buffer) { buffer.skipByte(); this.errorNumber = buffer.readShort(); this.sqlStateMarker = buffer.readByte(); if (sqlStateMarker == '#') { this.sqlState = buffer.readRawBytes(5); this.message = buffer.readStringNullEnd(StandardCharsets.UTF_8); } else { // Pre-4.1 message, still can be output in newer versions (e.g with 'Too many connections') buffer.position -= 1; this.message = new String(buffer.buf, buffer.position, buffer.limit - buffer.position, StandardCharsets.UTF_8); this.sqlState = "HY000".getBytes(); } } public String getMessage() { return message; } public short getErrorNumber() { return errorNumber; } public String getSqlState() { return new String(sqlState); } public byte getSqlStateMarker() { return sqlStateMarker; } }
[ "3624270@qq.com" ]
3624270@qq.com
daf8299bd1bf994c685edefe7ae8058610f03859
3cc644883c3be68dc4aca8d9e35941a592f33670
/core/metamodel/src/main/java/org/apache/isis/core/metamodel/valuesemantics/CommandDtoValueSemantics.java
0a759e8594d2acc0386d0bee2f54e9b934dd30ed
[ "Apache-2.0" ]
permissive
IsisVgoddess/isis
0e09eba4d9a791612dd03b01898d8574452b29a9
d34e5ed20578d274635424a9f41b4450c5109365
refs/heads/master
2023-03-07T08:57:38.060227
2022-03-11T05:55:55
2022-03-11T05:55:55
208,384,527
1
0
Apache-2.0
2023-03-06T22:25:01
2019-09-14T03:42:20
Java
UTF-8
Java
false
false
1,800
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.isis.core.metamodel.valuesemantics; import javax.inject.Named; import org.springframework.stereotype.Component; import org.apache.isis.applib.util.schema.CommandDtoUtils; import org.apache.isis.commons.collections.Can; import org.apache.isis.schema.cmd.v2.CommandDto; @Component @Named("isis.val.CommandDtoValueSemantics") public class CommandDtoValueSemantics extends XmlValueSemanticsAbstract<CommandDto> { @Override public final Class<CommandDto> getCorrespondingClass() { return CommandDto.class; } // -- ENCODER DECODER @Override public final String toXml(final CommandDto commandDto) { return CommandDtoUtils.toXml(commandDto); } @Override public final CommandDto fromXml(final String xml) { return CommandDtoUtils.fromXml(xml); } // -- EXAMPLES @Override public Can<CommandDto> getExamples() { return Can.of(new CommandDto(), new CommandDto()); } }
[ "ahuber@apache.org" ]
ahuber@apache.org
5207b75ca89d35bb25ae7d6988435a24cb3cd333
1b96e0764761bf0abbdafc51d98e2a06914a40fa
/M3ClassRosterV4SpringFWXML/src/main/java/com/sg/classroster/dao/ClassRosterPersistenceException.java
91e40b3614f79e301eac3109fa428f3e1847e8e6
[]
no_license
NarishSingh/SG4-Spring
2210b27d6a0d2924deda06fa5f0b70796b561814
95bb4c1b270cc5a930321051f91c782d7227426a
refs/heads/master
2022-12-01T21:05:35.555479
2020-07-31T03:52:15
2020-07-31T03:52:15
272,453,527
0
0
null
null
null
null
UTF-8
Java
false
false
382
java
/* This is the error class for our application. It extends Exception. */ package com.sg.classroster.dao; public class ClassRosterPersistenceException extends Exception { public ClassRosterPersistenceException(String message) { super(message); } public ClassRosterPersistenceException(String message, Throwable cause) { super(message, cause); } }
[ "62305841+NarishSingh@users.noreply.github.com" ]
62305841+NarishSingh@users.noreply.github.com
5310bab43f484be38c2efb9ea9d5cb5661815af2
346e09e8d3300a46936eac585884bd3e89aae596
/app/src/main/java/com/yunma/nettyplugin/receiver/CompleteReceiver.java
4b7a3014db11448181c842d1f81ed657f6dafd11
[]
no_license
huyonggang/NettyPlugin
760aeea4cc596061b950341a92ba8a5fce82922d
c0f516f6757968e06dfaaaaedcd71a54f7eef604
refs/heads/master
2020-04-01T22:56:56.894692
2018-11-22T09:05:16
2018-11-22T09:05:16
153,734,161
0
0
null
null
null
null
UTF-8
Java
false
false
2,245
java
package com.yunma.nettyplugin.receiver; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.SystemClock; import android.util.Log; import com.yunma.nettyplugin.service.ClientService; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; /** * Created by huyg on 2018/11/11. */ public class CompleteReceiver extends BroadcastReceiver { public static final String ACTION_THREE_CLOCK_REBOOT = "ACTION_THREE_CLOCK_REBOOT"; public static final String ACTION_TIME_SET = "android.intent.action.TIME_TICK"; public static final String ACTION_BOOT_COMPLETE = "android.intent.action.BOOT_COMPLETED"; public static final String TAG = "CompleteReceiver"; @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); switch (action) { case ACTION_TIME_SET: start3Clock(context); break; case ACTION_THREE_CLOCK_REBOOT: reboot(context); break; case ACTION_BOOT_COMPLETE: Intent service = new Intent(context, ClientService.class); context.startService(service); break; } } public void start3Clock(Context context) { AlarmManager mg = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); Intent mFifteenIntent = new Intent(ACTION_THREE_CLOCK_REBOOT); PendingIntent p = PendingIntent.getBroadcast(context, 0, mFifteenIntent, 0); Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 16); calendar.set(Calendar.MINUTE, 40); long selectTime = calendar.getTimeInMillis(); mg.setRepeating(AlarmManager.RTC, selectTime, AlarmManager.INTERVAL_DAY, p); } public static void reboot(Context context) { Intent intent=new Intent(Intent.ACTION_REBOOT); intent.putExtra("nowait", 1); intent.putExtra("interval", 1); intent.putExtra("window", 0); context.sendBroadcast(intent); } }
[ "742315209@qq.com" ]
742315209@qq.com
483758be78a531b1a1fc1f1ed6a8abd0aaa6824b
c8a7974ebdf8c2f2e7cdc34436d667e3f1d29609
/src/main/java/com/tencentcloudapi/vpc/v20170312/models/AssistantCidr.java
e0b473fcc672e2e1c1ad62f5859565015728e722
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java-en
d6f099a0de82ffd3e30d40bf7465b9469f88ffa6
ba403db7ce36255356aeeb4279d939a113352990
refs/heads/master
2023-08-23T08:54:04.686421
2022-06-28T08:03:02
2022-06-28T08:03:02
193,018,202
0
3
Apache-2.0
2022-06-28T08:03:04
2019-06-21T02:40:54
Java
UTF-8
Java
false
false
4,491
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.vpc.v20170312.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class AssistantCidr extends AbstractModel{ /** * The `ID` of a `VPC` instance, such as `vpc-6v2ht8q5`. */ @SerializedName("VpcId") @Expose private String VpcId; /** * The secondary CIDR, such as `172.16.0.0/16`. */ @SerializedName("CidrBlock") @Expose private String CidrBlock; /** * The secondary CIDR block type. 0: common secondary CIDR block. 1: container secondary CIDR block. Default: 0. */ @SerializedName("AssistantType") @Expose private Long AssistantType; /** * Subnets divided by the secondary CIDR. Note: This field may return null, indicating that no valid values can be obtained. */ @SerializedName("SubnetSet") @Expose private Subnet [] SubnetSet; /** * Get The `ID` of a `VPC` instance, such as `vpc-6v2ht8q5`. * @return VpcId The `ID` of a `VPC` instance, such as `vpc-6v2ht8q5`. */ public String getVpcId() { return this.VpcId; } /** * Set The `ID` of a `VPC` instance, such as `vpc-6v2ht8q5`. * @param VpcId The `ID` of a `VPC` instance, such as `vpc-6v2ht8q5`. */ public void setVpcId(String VpcId) { this.VpcId = VpcId; } /** * Get The secondary CIDR, such as `172.16.0.0/16`. * @return CidrBlock The secondary CIDR, such as `172.16.0.0/16`. */ public String getCidrBlock() { return this.CidrBlock; } /** * Set The secondary CIDR, such as `172.16.0.0/16`. * @param CidrBlock The secondary CIDR, such as `172.16.0.0/16`. */ public void setCidrBlock(String CidrBlock) { this.CidrBlock = CidrBlock; } /** * Get The secondary CIDR block type. 0: common secondary CIDR block. 1: container secondary CIDR block. Default: 0. * @return AssistantType The secondary CIDR block type. 0: common secondary CIDR block. 1: container secondary CIDR block. Default: 0. */ public Long getAssistantType() { return this.AssistantType; } /** * Set The secondary CIDR block type. 0: common secondary CIDR block. 1: container secondary CIDR block. Default: 0. * @param AssistantType The secondary CIDR block type. 0: common secondary CIDR block. 1: container secondary CIDR block. Default: 0. */ public void setAssistantType(Long AssistantType) { this.AssistantType = AssistantType; } /** * Get Subnets divided by the secondary CIDR. Note: This field may return null, indicating that no valid values can be obtained. * @return SubnetSet Subnets divided by the secondary CIDR. Note: This field may return null, indicating that no valid values can be obtained. */ public Subnet [] getSubnetSet() { return this.SubnetSet; } /** * Set Subnets divided by the secondary CIDR. Note: This field may return null, indicating that no valid values can be obtained. * @param SubnetSet Subnets divided by the secondary CIDR. Note: This field may return null, indicating that no valid values can be obtained. */ public void setSubnetSet(Subnet [] SubnetSet) { this.SubnetSet = SubnetSet; } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "VpcId", this.VpcId); this.setParamSimple(map, prefix + "CidrBlock", this.CidrBlock); this.setParamSimple(map, prefix + "AssistantType", this.AssistantType); this.setParamArrayObj(map, prefix + "SubnetSet.", this.SubnetSet); } }
[ "zhiqiangfan@tencent.com" ]
zhiqiangfan@tencent.com
5f24709725275d47cfc65c05d94b4fec7a724891
c95b26c2f7dd77f5e30e2d1cd1a45bc1d936c615
/azureus-core/src/main/java/org/gudy/azureus2/plugins/update/UpdateProgressListener.java
a292667e322c96d957336c1a5783f1d469cb9b52
[]
no_license
ostigter/testproject3
b918764f5c7d4c10d3846411bd9270ca5ba2f4f2
2d2336ef19631148c83636c3e373f874b000a2bf
refs/heads/master
2023-07-27T08:35:59.212278
2023-02-22T09:10:45
2023-02-22T09:10:45
41,742,046
2
1
null
2023-07-07T22:07:12
2015-09-01T14:02:08
Java
UTF-8
Java
false
false
997
java
/* * Created on 01-Dec-2004 * Created by Paul Gardner * Copyright (C) Azureus Software, Inc, All Rights Reserved. * * 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 2 * 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ package org.gudy.azureus2.plugins.update; /** * @author parg * */ public interface UpdateProgressListener { public void reportProgress(String str); }
[ "oscar.stigter@e0aef87a-ea4e-0410-81cd-4b1fdc67522b" ]
oscar.stigter@e0aef87a-ea4e-0410-81cd-4b1fdc67522b
6188e8a60a5e5eb52714656b8da0e874183ab5b7
62959cd23bf4335ec582e25e34842bc7ee235297
/src/main/java/org/sagebionetworks/csv/utils/ObjectIteratorCSVWriter.java
882a310bcc7ada4515f4d03edb03d4cc69863a3a
[]
no_license
Sage-Bionetworks/csv-utilities
9a022746178c8c57de1550f10f05c22e3e2d9d27
d45cefece92865c4b6492a18e0f72dadcb3ccddb
refs/heads/develop
2021-12-22T09:48:22.650909
2021-12-20T18:52:55
2021-12-20T18:52:55
43,978,840
0
3
null
2021-12-20T18:52:55
2015-10-09T20:34:41
Java
UTF-8
Java
false
false
880
java
package org.sagebionetworks.csv.utils; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.util.Iterator; public class ObjectIteratorCSVWriter { /** * Read each record from the iterator and write it to an output stream * * @param it - the iterator to get records * @param out - the output stream to write records to * @param headers - the format of a record * @param clazz - the type of the record * @throws IOException */ public static <T> void write(Iterator<T> it, OutputStream out, String[] headers, Class<T> clazz) throws IOException { OutputStreamWriter osw = new OutputStreamWriter(out); ObjectCSVWriter<T> writer = new ObjectCSVWriter<T>(osw, clazz, headers); while (it.hasNext()) { T record = it.next(); writer.append(record); } writer.close(); osw.close(); out.flush(); } }
[ "kimyen0816@gmail.com" ]
kimyen0816@gmail.com
1a276091968c5246c322448579e0c6dbe2caed15
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/google/android/gms/ads/p743c/C14742b.java
c70f8cd0ff6ee67e834ca2a650f77757bff84795
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,663
java
package com.google.android.gms.ads.p743c; import android.content.Context; import android.view.View; import android.view.ViewGroup; import com.google.android.gms.ads.C14732b; import com.google.android.gms.ads.C14745e; import com.google.android.gms.internal.ads.C15522at; import com.google.android.gms.internal.ads.C6505uv; import com.google.android.gms.internal.ads.afm; @C6505uv /* renamed from: com.google.android.gms.ads.c.b */ public final class C14742b extends ViewGroup { /* renamed from: a */ private final C15522at f38093a; public final C14732b getAdListener() { return this.f38093a.f41003b; } public final C14745e getAdSize() { return this.f38093a.mo40010b(); } public final String getAdUnitId() { return this.f38093a.mo40012c(); } public final void setAdListener(C14732b bVar) { this.f38093a.mo40002a(bVar); } public final void setAdSize(C14745e eVar) { this.f38093a.mo40009a(eVar); } public final void setAdUnitId(String str) { this.f38093a.mo40007a(str); } /* access modifiers changed from: protected */ public final void onLayout(boolean z, int i, int i2, int i3, int i4) { View childAt = getChildAt(0); if (childAt != null && childAt.getVisibility() != 8) { int measuredWidth = childAt.getMeasuredWidth(); int measuredHeight = childAt.getMeasuredHeight(); int i5 = ((i3 - i) - measuredWidth) / 2; int i6 = ((i4 - i2) - measuredHeight) / 2; childAt.layout(i5, i6, measuredWidth + i5, measuredHeight + i6); } } /* access modifiers changed from: protected */ public final void onMeasure(int i, int i2) { int i3; int i4 = 0; View childAt = getChildAt(0); if (childAt == null || childAt.getVisibility() == 8) { C14745e eVar = null; try { eVar = getAdSize(); } catch (NullPointerException e) { afm.m45778b("Unable to retrieve ad size.", e); } if (eVar != null) { Context context = getContext(); int b = eVar.mo37450b(context); i3 = eVar.mo37448a(context); i4 = b; } else { i3 = 0; } } else { measureChild(childAt, i, i2); i4 = childAt.getMeasuredWidth(); i3 = childAt.getMeasuredHeight(); } setMeasuredDimension(View.resolveSize(Math.max(i4, getSuggestedMinimumWidth()), i), View.resolveSize(Math.max(i3, getSuggestedMinimumHeight()), i2)); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
0dce7ff18fcfdc62759791a9a9a4626d706c675a
7c3e769ad1e036004fcd47540d018524d8cf69c4
/bogoLive/src/main/java/com/bogokj/live/model/App_requestCancelPKRequest.java
cf104eb6b8e61cdcf2a57a24700ec6cc2ea27517
[]
no_license
zkbqhuang/bogo_live_android
b813ed99f7237f4dd2e77014c311bc8da74ecbf9
a51799fa7038f089b10209e7ec446a0000a68d8a
refs/heads/master
2022-07-06T15:29:08.344192
2020-05-11T03:11:12
2020-05-11T03:11:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
340
java
package com.bogokj.live.model; import com.bogokj.hybrid.model.BaseActModel; public class App_requestCancelPKRequest extends BaseActModel { private String to_user_id; public String getTo_user_id() { return to_user_id; } public void setTo_user_id(String to_user_id) { this.to_user_id = to_user_id; } }
[ "986008261@qq.com" ]
986008261@qq.com
63f697f49ad073e3f5645b4350ef86308a329a56
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5631989306621952_1/java/diesel301/TheLastWord.java
746a7da52e9e6d2b22291bd7ba1f635b5199a764
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
1,080
java
import java.io.File; import java.io.PrintWriter; import java.util.Scanner; /** * Created by russinko on 4/15/16. */ public class TheLastWord { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(new File("A-large.in")); PrintWriter pw = new PrintWriter(new File("output.txt")); int caseCount = Integer.valueOf(sc.nextLine()); for(int i = 0; i < caseCount; i++) { String b = sc.nextLine(); pw.printf("Case #%d: %s\n", i + 1, build(b)); } pw.close(); } static String build(String input) { String out = input.substring(0, 1); String remaining = input.substring(1, input.length()); while (remaining.length() > 0) { String first = remaining.substring(0, 1); remaining = remaining.substring(1, remaining.length()); if(first.compareTo(out.substring(0, 1)) >= 0) { out = first + out; } else { out = out + first; } } return out; } }
[ "alexandra1.back@gmail.com" ]
alexandra1.back@gmail.com
ef99538c3e38b63ef030dd6d108f6b780d4e0e45
5580e487d0b5078b305e7a081e067becdd8aa6e4
/Collected_Solutions/70-85/Q70/Test.java
e4e5bdf332da4d495ea17ea0ff2f3214a0b50f3e
[]
no_license
mostafiz9900/OCP-809
2255aac0e6836420bd8cdc81dd2837c1898f681a
5704fa471909c2cb7b12eb10c452e7cb69ce40e6
refs/heads/master
2023-02-13T23:57:06.674659
2021-01-09T16:39:53
2021-01-09T16:39:53
324,604,637
0
0
null
null
null
null
UTF-8
Java
false
false
748
java
package com.coderbd.Q70; class Resource implements AutoCloseable{ public void close()throws Exception{ System.out.println("Close-"); } public void open(){ System.out.println("Open-"); } } public class Test { public static void main(String[] args) { Resource res1=new Resource(); try{ res1.open(); res1.close(); }catch(Exception e){ System.out.println("Exception -1"); } try(res1=new Resource()){ //line n1 res1.open(); }catch(Exception e){ System.out.println("Exception -2"); } //// Ans: D ---> A compilation Error Occurs at line n1 } }
[ "mostafiz9900@gmail.com" ]
mostafiz9900@gmail.com
e62deba9ee98dd9c9e6f186c6e7dcb875c3a54f4
e39ec0adbf5c9bafa5db2856b2cc6f3559473972
/src/main/java/com/gmail/socraticphoenix/sponge/menu/impl/formatter/tree/TriConsumer.java
6865a2ee886420d8ada1bd75c376ef0560dace37
[]
no_license
Sir-Will/Menu
06150bc236f80d4d800cbea8dd9e95ff4c694bec
074c36b33e294a68104354fb0bcd078ca3904a60
refs/heads/master
2021-01-21T18:15:13.072135
2017-05-29T23:30:55
2017-05-29T23:30:55
92,028,101
0
0
null
2017-05-22T08:07:36
2017-05-22T08:07:36
null
UTF-8
Java
false
false
1,328
java
/* * The MIT License (MIT) * * Copyright (c) 2016 socraticphoenix@gmail.com * Copyright (c) 2016 contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and * associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, publish, distribute, * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or * substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package com.gmail.socraticphoenix.sponge.menu.impl.formatter.tree; public interface TriConsumer<A, B, C> { void accept(A a, B b, C c); }
[ "socraticphoenix@gmail.com" ]
socraticphoenix@gmail.com
d634841d2622f6c058162191270216270184721f
ceced64751c092feca544ab3654cf40d4141e012
/zookeeper/src/main/java/com/pri/lock/ZookeeperDistrbuteLock.java
57a4c24082b3aaa2bed0953cf321620ebbba5394
[]
no_license
1163646727/pri_play
80ec6fc99ca58cf717984db82de7db33ef1e71ca
fbd3644ed780c91bfc535444c54082f4414b8071
refs/heads/master
2022-06-30T05:14:02.082236
2021-01-05T08:02:40
2021-01-05T08:02:40
196,859,419
0
0
null
null
null
null
UTF-8
Java
false
false
1,562
java
package com.pri.lock; import java.util.concurrent.CountDownLatch; import org.I0Itec.zkclient.IZkDataListener; /** * className: ZookeeperDistrbuteLock <BR> * description: Zookeeper抽象锁<BR> * remark: 具体实现类<BR> * 参考:每特教育<BR> * author: ChenQi <BR> * createDate: 2019-11-18 16:45 <BR> */ public class ZookeeperDistrbuteLock extends ZookeeperAbstractLock{ @Override boolean getTheLock() { try { zkClient.createEphemeral(lockPath,60*100); return true; } catch (Exception e) { return false; } } @Override void waitLock() { // 使用zk临时事件监听 ChenQi; IZkDataListener iZkDataListener = new IZkDataListener() { // 监听连接删除事件ChenQi; public void handleDataDeleted(String path) throws Exception { if (countDownLatch != null) { countDownLatch.countDown(); } } public void handleDataChange(String arg0, Object arg1) throws Exception { } }; // 注册事件通知 ChenQi; zkClient.subscribeDataChanges(lockPath, iZkDataListener); if (zkClient.exists(lockPath)) { countDownLatch = new CountDownLatch(1); try { countDownLatch.await(); } catch (Exception e) { } } // 监听完毕后,移除事件通知 ChenQi; zkClient.unsubscribeDataChanges(lockPath, iZkDataListener); } }
[ "1163646727@qq.com" ]
1163646727@qq.com
c6fccd46173d9e9aa798d5b1d35a05337e70a3ef
4ad8f282fa015116c227e480fe913779dc3c311b
/src/test/java/com/alibaba/druid/bvt/sql/mysql/createTable/MySqlCreateTableTest99.java
5df5667e2a4f5415003cb24dbdd4dde2585fba81
[ "Apache-2.0" ]
permissive
lonelyit/druid
91b6f36cdebeef4f96fec5b5c42e666c28e6019b
08da6108e409f18d38a30c0656553ab7fcbfc0f8
refs/heads/master
2023-07-24T17:37:14.479317
2021-09-20T06:26:47
2021-09-20T06:26:47
164,882,032
0
1
Apache-2.0
2021-09-20T13:40:13
2019-01-09T14:52:14
Java
UTF-8
Java
false
false
2,259
java
package com.alibaba.druid.bvt.sql.mysql.createTable; import com.alibaba.druid.sql.MysqlTest; import com.alibaba.druid.sql.ast.SQLStatement; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlCreateTableStatement; import com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser; import java.util.List; public class MySqlCreateTableTest99 extends MysqlTest { public void test_0() throws Exception { String sql = "CREATE TABLE IF NOT EXISTS srcTable\n" + "(\n" + " `id` BIGINT(20) NOT NULL,\n" + " `queue_id` BIGINT(20) NOT NULL DEFAULT '-1',\n" + " `status` TINYINT(4) NOT NULL DEFAULT '1',\n" + " PRIMARY KEY (`id`)\n" + ") ENGINE=INNODB AUTO_INCREMENT 10 AVG_ROW_LENGTH 10 DEFAULT CHARACTER SET=utf8 DEFAULT COLLATE = utf8_general_ci\n" + "CHECKSUM=0 COMPRESSION='NONE' CONNECTION = 'connect_string' DELAY_KEY_WRITE = 0 ENCRYPTION 'N' INSERT_METHOD FIRST\n" + "MAX_ROWS 1000 MIN_ROWS=10 PACK_KEYS DEFAULT PASSWORD '12345678' STATS_AUTO_RECALC 0 STATS_PERSISTENT 0 \n" + "STATS_SAMPLE_PAGES 10"; // System.out.println(sql); MySqlStatementParser parser = new MySqlStatementParser(sql); List<SQLStatement> statementList = parser.parseStatementList(); MySqlCreateTableStatement stmt = (MySqlCreateTableStatement)statementList.get(0); assertEquals(1, statementList.size()); assertEquals(4, stmt.getTableElementList().size()); assertEquals("CREATE TABLE IF NOT EXISTS srcTable (\n" + "\t`id` BIGINT(20) NOT NULL,\n" + "\t`queue_id` BIGINT(20) NOT NULL DEFAULT '-1',\n" + "\t`status` TINYINT(4) NOT NULL DEFAULT '1',\n" + "\tPRIMARY KEY (`id`)\n" + ") ENGINE = INNODB AUTO_INCREMENT = 10 AVG_ROW_LENGTH = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci CHECKSUM = 0 COMPRESSION = 'NONE' CONNECTION = 'connect_string' DELAY_KEY_WRITE = 0 ENCRYPTION = 'N' INSERT_METHOD = FIRST MAX_ROWS = 1000 MIN_ROWS = 10 PACK_KEYS = DEFAULT PASSWORD = '12345678' STATS_AUTO_RECALC = 0 STATS_PERSISTENT = 0 STATS_SAMPLE_PAGES = 10", stmt.toString()); } }
[ "szujobs@hotmail.com" ]
szujobs@hotmail.com
bc3723a7919a7c5d7cb968f82bf073ba80189d57
d937646fcd3ba303cab55d729cf7f2a8d8a93c83
/app/src/main/java/zhuyekeji/zhengzhou/jxlifecircle/frament/home/TouPaioAllFrament.java
2a8ade3503eda0912d4e34d1c55c9149cf894464
[]
no_license
jingzhixb/jxlifecircle
7e2e61ba3c0207ba547ff2bb228589a402df8121
5247754504d92383fb93f5bda60e03766d84ecce
refs/heads/master
2020-03-19T20:34:15.281494
2018-07-23T12:03:54
2018-07-23T12:03:54
136,907,546
0
0
null
null
null
null
UTF-8
Java
false
false
706
java
package zhuyekeji.zhengzhou.jxlifecircle.frament.home; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import zhuyekeji.zhengzhou.jxlifecircle.R; import zhuyekeji.zhengzhou.jxlifecircle.base.BaseFragment; /** * Created by Administrator on 2018/6/8. */ public class TouPaioAllFrament extends BaseFragment { private View view; @Override protected View initView(LayoutInflater inflater, ViewGroup container) { view=LayoutInflater.from(getActivity()).inflate(R.layout.utils_item,null); return view; } @Override protected void initListener() { } @Override protected void initData() { } }
[ "1390056147qq.com" ]
1390056147qq.com
c9905c0135f6173513152b3dc18bcb8c6798d671
dd61169a3da99ff1f1df94c50fc735ee46b52ef0
/VAReadmissionMoonstoneWorkspace/Moonstone/src/moonstone/api/MoonstoneAnnotationRelation.java
f45368f2f9f1590da00625bf8aef736b8fee1510
[]
no_license
bbauta/VAReadmissionMoonstone
6ef61c94d76964d90a1a84ad4cdc2033b9bb8a3a
7ca0b9cc3f73273a95db7ddca5ace69053c0a685
refs/heads/master
2021-03-10T17:35:15.386095
2019-04-18T22:31:02
2019-04-18T22:31:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,538
java
/* Copyright 2018 Wendy Chapman (wendy.chapman\@utah.edu) & Lee Christensen (leenlp\@q.com) Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package moonstone.api; public class MoonstoneAnnotationRelation { private MoonstoneAnnotation annotation = null; private String relation = null; private MoonstoneAnnotation subject = null; private MoonstoneAnnotation modifier = null; public MoonstoneAnnotationRelation(MoonstoneAnnotation annotation, String relation, MoonstoneAnnotation subject, MoonstoneAnnotation modifier) { this.annotation = annotation; this.relation = relation; this.subject = subject; this.modifier = modifier; } public String toString() { String str = this.relation + "(" + this.subject.getId() + "," + this.modifier.getId() + ")"; return str; } public MoonstoneAnnotation getAnnotation() { return annotation; } public String getRelation() { return relation; } public MoonstoneAnnotation getSubject() { return subject; } public MoonstoneAnnotation getModifier() { return modifier; } }
[ "leenlp@q.com" ]
leenlp@q.com
a87c9f02d72fda820ec8313c7804f480d465b14a
b9d48d1f0ed3ebc26a9a83173fd8454b60d6a834
/work/decompile-e341bf68/net/minecraft/server/MinecraftVersion.java
bf5eceac09934fbde469dae1aa8089de9bca36ba
[]
no_license
HitWRight/SlangelizmoServas
70ac99cfd097acd13d654ecf39a308ba8570f06f
017acfe3b1009901226086b9a16260d7aa720344
refs/heads/master
2022-09-27T04:24:29.978046
2020-12-21T20:45:06
2020-12-21T20:45:06
230,753,446
0
0
null
2022-09-16T18:06:17
2019-12-29T13:22:53
Java
UTF-8
Java
false
false
4,641
java
package net.minecraft.server; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.mojang.bridge.game.GameVersion; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.time.ZonedDateTime; import java.util.Date; import java.util.UUID; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class MinecraftVersion implements GameVersion { private static final Logger LOGGER = LogManager.getLogger(); private final String b; private final String c; private final boolean d; private final int e; private final int f; private final int g; private final Date h; private final String i; public MinecraftVersion() { this.b = UUID.randomUUID().toString().replaceAll("-", ""); this.c = "1.15"; this.d = true; this.e = 2225; this.f = 573; this.g = 5; this.h = new Date(); this.i = "1.15"; } protected MinecraftVersion(JsonObject jsonobject) { this.b = ChatDeserializer.h(jsonobject, "id"); this.c = ChatDeserializer.h(jsonobject, "name"); this.i = ChatDeserializer.h(jsonobject, "release_target"); this.d = ChatDeserializer.j(jsonobject, "stable"); this.e = ChatDeserializer.n(jsonobject, "world_version"); this.f = ChatDeserializer.n(jsonobject, "protocol_version"); this.g = ChatDeserializer.n(jsonobject, "pack_version"); this.h = Date.from(ZonedDateTime.parse(ChatDeserializer.h(jsonobject, "build_time")).toInstant()); } public static GameVersion a() { try { InputStream inputstream = MinecraftVersion.class.getResourceAsStream("/version.json"); Throwable throwable = null; MinecraftVersion minecraftversion; try { if (inputstream != null) { InputStreamReader inputstreamreader = new InputStreamReader(inputstream); Throwable throwable1 = null; try { Object object; try { object = new MinecraftVersion(ChatDeserializer.a((Reader) inputstreamreader)); return (GameVersion) object; } catch (Throwable throwable2) { object = throwable2; throwable1 = throwable2; throw throwable2; } } finally { if (inputstreamreader != null) { if (throwable1 != null) { try { inputstreamreader.close(); } catch (Throwable throwable3) { throwable1.addSuppressed(throwable3); } } else { inputstreamreader.close(); } } } } MinecraftVersion.LOGGER.warn("Missing version information!"); minecraftversion = new MinecraftVersion(); } catch (Throwable throwable4) { throwable = throwable4; throw throwable4; } finally { if (inputstream != null) { if (throwable != null) { try { inputstream.close(); } catch (Throwable throwable5) { throwable.addSuppressed(throwable5); } } else { inputstream.close(); } } } return minecraftversion; } catch (JsonParseException | IOException ioexception) { throw new IllegalStateException("Game version information is corrupt", ioexception); } } public String getId() { return this.b; } public String getName() { return this.c; } public String getReleaseTarget() { return this.i; } public int getWorldVersion() { return this.e; } public int getProtocolVersion() { return this.f; } public int getPackVersion() { return this.g; } public Date getBuildTime() { return this.h; } public boolean isStable() { return this.d; } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
ec3d1a7fa797d48d00c691905262df25e6f3c352
7f52c1414ee44a3efa9fae60308e4ae0128d9906
/core/src/test/java/com/alibaba/druid/bvt/filter/wall/mysql/MySqlWallTest4.java
fed3a0a041d361c11c1ef08eaf9cf7c23419b1bb
[ "Apache-2.0" ]
permissive
luoyongsir/druid
1f6ba7c7c5cabab2879a76ef699205f484f2cac7
37552f849a52cf0f2784fb7849007e4656851402
refs/heads/master
2022-11-19T21:01:41.141853
2022-11-19T13:21:51
2022-11-19T13:21:51
474,518,936
0
1
Apache-2.0
2022-03-27T02:51:11
2022-03-27T02:51:10
null
UTF-8
Java
false
false
1,145
java
/* * Copyright 1999-2018 Alibaba Group Holding Ltd. * * 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.alibaba.druid.bvt.filter.wall.mysql; import junit.framework.TestCase; import org.junit.Assert; import com.alibaba.druid.wall.WallUtils; /** * SQLServerWallTest * * @author RaymondXiu * @version 1.0, 2012-3-18 * @see */ public class MySqlWallTest4 extends TestCase { public void test_stuff() throws Exception { Assert.assertFalse(WallUtils.isValidateMySql(// "SSELECT a.*,b.name FROM vote_info a left join vote_item b on a.item_id=b.id where a.id<10 or 1=1 limit 1,10")); } }
[ "shaojin.wensj@alibaba-inc.com" ]
shaojin.wensj@alibaba-inc.com
5dd4122e41a6cc0666d597eaba54d80f229eafb5
4dbbf63c1937a523890390c5ee34e81589f78e5e
/bus-oauth/src/main/java/org/aoju/bus/oauth/provider/QqProvider.java
d555fc8d62212181eea3be1cafe5e97ececdec42
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
q040407/bus
9b0970b829264899857a5035396ddbb1052e0aac
f10136c6ea472e8886355a76caa331cb607d59ef
refs/heads/master
2022-04-23T10:10:50.686780
2020-04-14T06:43:17
2020-04-14T06:43:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,900
java
/********************************************************************************* * * * The MIT License * * * * Copyright (c) 2015-2020 aoju.org and other contributors. * * * * Permission is hereby granted, free of charge, to any person obtaining a copy * * of this software and associated documentation files (the "Software"), to deal * * in the Software without restriction, including without limitation the rights * * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included in * * all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * * THE SOFTWARE. * ********************************************************************************/ package org.aoju.bus.oauth.provider; import com.alibaba.fastjson.JSONObject; import org.aoju.bus.cache.metric.ExtendCache; import org.aoju.bus.core.lang.Normal; import org.aoju.bus.core.lang.Symbol; import org.aoju.bus.core.lang.exception.AuthorizedException; import org.aoju.bus.core.utils.StringUtils; import org.aoju.bus.http.Httpx; import org.aoju.bus.oauth.Builder; import org.aoju.bus.oauth.Context; import org.aoju.bus.oauth.Registry; import org.aoju.bus.oauth.magic.AccToken; import org.aoju.bus.oauth.magic.Callback; import org.aoju.bus.oauth.magic.Message; import org.aoju.bus.oauth.magic.Property; import java.util.Map; /** * qq登录 * * @author Kimi Liu * @version 5.8.6 * @since JDK 1.8+ */ public class QqProvider extends DefaultProvider { public QqProvider(Context context) { super(context, Registry.QQ); } public QqProvider(Context context, ExtendCache extendCache) { super(context, Registry.QQ, extendCache); } @Override protected AccToken getAccessToken(Callback Callback) { return getAuthToken(doGetAuthorizationCode(Callback.getCode())); } @Override public Message refresh(AccToken token) { String response = Httpx.get(refreshTokenUrl(token.getRefreshToken())); return Message.builder().errcode(Builder.ErrorCode.SUCCESS.getCode()).data(getAuthToken(response)).build(); } @Override protected Property getUserInfo(AccToken token) { String openId = this.getOpenId(token); JSONObject object = JSONObject.parseObject(doGetUserInfo(token)); if (object.getIntValue("ret") != 0) { throw new AuthorizedException(object.getString("msg")); } String avatar = object.getString("figureurl_qq_2"); if (StringUtils.isEmpty(avatar)) { avatar = object.getString("figureurl_qq_1"); } String location = String.format("%s-%s", object.getString("province"), object.getString("city")); return Property.builder() .username(object.getString("nickname")) .nickname(object.getString("nickname")) .avatar(avatar) .location(location) .uuid(openId) .gender(Normal.Gender.getGender(object.getString("gender"))) .token(token) .source(source.toString()) .build(); } /** * 获取QQ用户的OpenId,支持自定义是否启用查询unionid的功能,如果启用查询unionid的功能, * 那就需要开发者先通过邮件申请unionid功能,参考链接 {@see http://wiki.connect.qq.com/unionid%E4%BB%8B%E7%BB%8D} * * @param token 通过{@link QqProvider#getAccessToken(Callback)}获取到的{@code authToken} * @return openId */ private String getOpenId(AccToken token) { String response = Httpx.get(Builder.fromUrl("https://graph.qq.com/oauth2.0/me") .queryParam("access_token", token.getAccessToken()) .queryParam("unionid", context.isUnionId() ? 1 : 0) .build()); String removePrefix = StringUtils.replace(response, "callback(", Normal.EMPTY); String removeSuffix = StringUtils.replace(removePrefix, ");", Normal.EMPTY); String openId = StringUtils.trim(removeSuffix); JSONObject object = JSONObject.parseObject(openId); if (object.containsKey("error")) { throw new AuthorizedException(object.get("error") + Symbol.COLON + object.get("error_description")); } token.setOpenId(object.getString("openid")); if (object.containsKey("unionid")) { token.setUnionId(object.getString("unionid")); } return StringUtils.isEmpty(token.getUnionId()) ? token.getOpenId() : token.getUnionId(); } /** * 返回获取userInfo的url * * @param token 用户授权token * @return 返回获取userInfo的url */ @Override protected String userInfoUrl(AccToken token) { return Builder.fromUrl(source.userInfo()) .queryParam("access_token", token.getAccessToken()) .queryParam("oauth_consumer_key", context.getAppKey()) .queryParam("openid", token.getOpenId()) .build(); } private AccToken getAuthToken(String response) { Map<String, String> accessTokenObject = parseStringToMap(response); if (!accessTokenObject.containsKey("access_token") || accessTokenObject.containsKey("code")) { throw new AuthorizedException(accessTokenObject.get("msg")); } return AccToken.builder() .accessToken(accessTokenObject.get("access_token")) .expireIn(Integer.valueOf(accessTokenObject.get("expires_in"))) .refreshToken(accessTokenObject.get("refresh_token")) .build(); } }
[ "839536@qq.com" ]
839536@qq.com
2f30539aa54d35a1bfe2e3f161ec082d8e49a3b9
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
/PROMISE/archives/poi/2.0/org/apache/poi/hssf/record/LabelSSTRecord.java
cc7deced76de1bcdde4eb981223192be5e259e40
[]
no_license
hvdthong/DEFECT_PREDICTION
78b8e98c0be3db86ffaed432722b0b8c61523ab2
76a61c69be0e2082faa3f19efd76a99f56a32858
refs/heads/master
2021-01-20T05:19:00.927723
2018-07-10T03:38:14
2018-07-10T03:38:14
89,766,606
5
1
null
null
null
null
UTF-8
Java
false
false
7,371
java
package org.apache.poi.hssf.record; import org.apache.poi.util.LittleEndian; /** * Title: Label SST Record<P> * Description: Refers to a string in the shared string table and is a column * value. <P> * REFERENCE: PG 325 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P> * @author Andrew C. Oliver (acoliver at apache dot org) * @author Jason Height (jheight at chariot dot net dot au) * @version 2.0-pre */ public class LabelSSTRecord extends Record implements CellValueRecordInterface, Comparable { public final static short sid = 0xfd; private int field_1_row; private short field_2_column; private short field_3_xf_index; private int field_4_sst_index; public LabelSSTRecord() { } /** * Constructs an LabelSST record and sets its fields appropriately. * * @param id id must be 0xfd or an exception will be throw upon validation * @param size the size of the data area of the record * @param data data of the record (should not contain sid/len) */ public LabelSSTRecord(short id, short size, byte [] data) { super(id, size, data); } /** * Constructs an LabelSST record and sets its fields appropriately. * * @param id id must be 0xfd or an exception will be throw upon validation * @param size the size of the data area of the record * @param data data of the record (should not contain sid/len) * @param offset of the record's data */ public LabelSSTRecord(short id, short size, byte [] data, int offset) { super(id, size, data, offset); } protected void validateSid(short id) { if (id != sid) { throw new RecordFormatException("NOT A valid LabelSST RECORD"); } } protected void fillFields(byte [] data, short size, int offset) { field_1_row = LittleEndian.getUShort(data, 0 + offset); field_2_column = LittleEndian.getShort(data, 2 + offset); field_3_xf_index = LittleEndian.getShort(data, 4 + offset); field_4_sst_index = LittleEndian.getInt(data, 6 + offset); } public void setRow(int row) { field_1_row = row; } public void setColumn(short col) { field_2_column = col; } /** * set the index to the extended format record * * @see org.apache.poi.hssf.record.ExtendedFormatRecord * @param index - the index to the XF record */ public void setXFIndex(short index) { field_3_xf_index = index; } /** * set the index to the string in the SSTRecord * * @param index - of string in the SST Table * @see org.apache.poi.hssf.record.SSTRecord */ public void setSSTIndex(int index) { field_4_sst_index = index; } public int getRow() { return field_1_row; } public short getColumn() { return field_2_column; } /** * get the index to the extended format record * * @see org.apache.poi.hssf.record.ExtendedFormatRecord * @return the index to the XF record */ public short getXFIndex() { return field_3_xf_index; } /** * get the index to the string in the SSTRecord * * @return index of string in the SST Table * @see org.apache.poi.hssf.record.SSTRecord */ public int getSSTIndex() { return field_4_sst_index; } public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("[LABELSST]\n"); buffer.append(" .row = ") .append(Integer.toHexString(getRow())).append("\n"); buffer.append(" .column = ") .append(Integer.toHexString(getColumn())).append("\n"); buffer.append(" .xfindex = ") .append(Integer.toHexString(getXFIndex())).append("\n"); buffer.append(" .sstindex = ") .append(Integer.toHexString(getSSTIndex())).append("\n"); buffer.append("[/LABELSST]\n"); return buffer.toString(); } public int serialize(int offset, byte [] data) { LittleEndian.putShort(data, 0 + offset, sid); LittleEndian.putShort(data, 2 + offset, ( short ) 10); LittleEndian.putShort(data, 4 + offset, ( short )getRow()); LittleEndian.putShort(data, 6 + offset, getColumn()); LittleEndian.putShort(data, 8 + offset, getXFIndex()); LittleEndian.putInt(data, 10 + offset, getSSTIndex()); return getRecordSize(); } public int getRecordSize() { return 14; } public short getSid() { return this.sid; } public boolean isBefore(CellValueRecordInterface i) { if (this.getRow() > i.getRow()) { return false; } if ((this.getRow() == i.getRow()) && (this.getColumn() > i.getColumn())) { return false; } if ((this.getRow() == i.getRow()) && (this.getColumn() == i.getColumn())) { return false; } return true; } public boolean isAfter(CellValueRecordInterface i) { if (this.getRow() < i.getRow()) { return false; } if ((this.getRow() == i.getRow()) && (this.getColumn() < i.getColumn())) { return false; } if ((this.getRow() == i.getRow()) && (this.getColumn() == i.getColumn())) { return false; } return true; } public boolean isEqual(CellValueRecordInterface i) { return ((this.getRow() == i.getRow()) && (this.getColumn() == i.getColumn())); } public boolean isInValueSection() { return true; } public boolean isValue() { return true; } public int compareTo(Object obj) { CellValueRecordInterface loc = ( CellValueRecordInterface ) obj; if ((this.getRow() == loc.getRow()) && (this.getColumn() == loc.getColumn())) { return 0; } if (this.getRow() < loc.getRow()) { return -1; } if (this.getRow() > loc.getRow()) { return 1; } if (this.getColumn() < loc.getColumn()) { return -1; } if (this.getColumn() > loc.getColumn()) { return 1; } return -1; } public boolean equals(Object obj) { if (!(obj instanceof CellValueRecordInterface)) { return false; } CellValueRecordInterface loc = ( CellValueRecordInterface ) obj; if ((this.getRow() == loc.getRow()) && (this.getColumn() == loc.getColumn())) { return true; } return false; } public Object clone() { LabelSSTRecord rec = new LabelSSTRecord(); rec.field_1_row = field_1_row; rec.field_2_column = field_2_column; rec.field_3_xf_index = field_3_xf_index; rec.field_4_sst_index = field_4_sst_index; return rec; } }
[ "hvdthong@github.com" ]
hvdthong@github.com
2f816b5c2af20aff821ec9325fe8d68e3642f155
c8548cedfa8106f63d38ee8cb4cc33509e22fc64
/src/main/java/cn/smbms/dao/user/UserDao.java
8438522d42c23bd6cad1bcec211ec40f58f639cd
[]
no_license
Cod4Man/SMBMS_SSM
28e209a94474d4b8d845fd352a6e911b8033f737
1e58599e92604dba71cc96d52259e6bc3ad53541
refs/heads/master
2020-05-02T23:54:12.431239
2019-04-10T03:52:58
2019-04-10T03:52:58
178,293,654
0
0
null
null
null
null
UTF-8
Java
false
false
1,587
java
package cn.smbms.dao.user; import java.sql.Connection; import java.util.List; import cn.smbms.pojo.User; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.session.RowBounds; public interface UserDao { /** * 增加用户信息 * @param connection * @param user * @return * @ */ public int add(User user); /** * 通过userCode获取User * @param connection * @param userCode * @return * @ */ public User getLoginUser(@Param("userCode") String userCode); /** * 通过条件查询-userList * @param connection * @param userName * @param userRole * @return * @ */ public List<User> getUserList( @Param("userName") String userName, @Param("userRole") int userRole, RowBounds rowBounds); /** * 通过条件查询-用户表记录数 * @param connection * @param userName * @param userRole * @return * @ */ public int getUserCount(@Param("userName") String userName, @Param("userRole") int userRole); /** * 通过userId删除user * @param delId * @return * @ */ public int deleteUserById(@Param("delId") Integer delId); /** * 通过userId获取user * @param connection * @param id * @return * @ */ public User getUserById(@Param("id") String id); /** * 修改用户信息 * @param connection * @param user * @return * @ */ public int modify(User user); /** * 修改当前用户密码 * @param connection * @param id * @param pwd * @return * @ */ public int updatePwd(@Param("id") int id, @Param("pwd") String pwd); }
[ "fresh_zz@163.com" ]
fresh_zz@163.com
cfb2e86ae35d8447293992576dd549471b294e4b
55dca62e858f1a44c2186774339823a301b48dc7
/code/my-app/functions/7/getCategory_ZeroOneNumberRule.java
5fcd7db3ebf57dc91466b86eef5109495fbe3303
[]
no_license
jwiszowata/code_reaper
4fff256250299225879d1412eb1f70b136d7a174
17dde61138cec117047a6ebb412ee1972886f143
refs/heads/master
2022-12-15T14:46:30.640628
2022-02-10T14:02:45
2022-02-10T14:02:45
84,747,455
0
0
null
2022-12-07T23:48:18
2017-03-12T18:26:11
Java
UTF-8
Java
false
false
160
java
public Category getCategory(double input) { if (input == 0 || input == 1) { return Category.one; } else { return Category.other; } }
[ "wiszowata.joanna@gmail.com" ]
wiszowata.joanna@gmail.com
00b775ade7c536ab4f753ab753b234d0c3502719
d98ed4986ecdd7df4c04e4ad09f38fdb7a7043e8
/Hero_Charms/src/main/java/net/sf/anathema/hero/charms/model/learn/BasicLearningModel.java
8952f56acd50a1011ded18939fbc22f1d6ff6c96
[]
no_license
bjblack/anathema_3e
3d1d42ea3d9a874ac5fbeed506a1a5800e2a99ac
963f37b64d7cf929f086487950d4870fd40ac67f
refs/heads/master
2021-01-19T07:12:42.133946
2018-12-18T23:57:41
2018-12-18T23:57:41
67,353,965
0
0
null
2016-09-04T15:47:48
2016-09-04T15:47:48
null
UTF-8
Java
false
false
386
java
package net.sf.anathema.hero.charms.model.learn; import net.sf.anathema.magic.data.Charm; public interface BasicLearningModel { boolean isCurrentlyLearned (Charm charm); boolean isLearnedOnCreation (Charm charm); boolean isLearnedWithExperience (Charm charm); void toggleLearnedOnCreation (Charm charm); void toggleExperienceLearnedCharm (Charm charm); }
[ "BJ@BJ-PC" ]
BJ@BJ-PC
698f1f4cfe513aab1b0c1eb04969723c96da5eea
3ebaee3a565d5e514e5d56b44ebcee249ec1c243
/assetBank 3.77 decomplied fixed/src/java/com/bright/assetbank/user/action/ViewRegisterAction.java
4eb2c3ee126ff78cf244f1e9a505de23d843700c
[]
no_license
webchannel-dev/Java-Digital-Bank
89032eec70a1ef61eccbef6f775b683087bccd63
65d4de8f2c0ce48cb1d53130e295616772829679
refs/heads/master
2021-10-08T19:10:48.971587
2017-11-07T09:51:17
2017-11-07T09:51:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,395
java
/* */ package com.bright.assetbank.user.action; /* */ /* */ import com.bn2web.common.exception.Bn2Exception; /* */ import com.bright.assetbank.customfield.service.CustomFieldManager; /* */ import com.bright.assetbank.language.service.LanguageManager; /* */ import com.bright.assetbank.marketing.service.MarketingGroupManager; /* */ import com.bright.assetbank.orgunit.bean.OrgUnitSearchCriteria; /* */ import com.bright.assetbank.orgunit.constant.OrgUnitConstants; /* */ import com.bright.assetbank.orgunit.service.OrgUnitManager; /* */ import com.bright.assetbank.user.bean.ABUser; /* */ import com.bright.assetbank.user.bean.ABUserProfile; /* */ import com.bright.assetbank.user.form.RegisterForm; /* */ import com.bright.assetbank.user.service.ABUserManager; /* */ import com.bright.framework.customfield.util.CustomFieldUtil; /* */ import com.bright.framework.database.bean.DBTransaction; /* */ import com.bright.framework.language.bean.Language; /* */ import com.bright.framework.language.util.LanguageUtils; /* */ import com.bright.framework.user.bean.User; /* */ import com.bright.framework.user.bean.UserProfile; /* */ import java.util.List; /* */ import java.util.Vector; /* */ import javax.servlet.http.HttpServletRequest; /* */ import javax.servlet.http.HttpServletResponse; /* */ import org.apache.struts.action.ActionForm; /* */ import org.apache.struts.action.ActionForward; /* */ import org.apache.struts.action.ActionMapping; /* */ /* */ public class ViewRegisterAction extends UserAction /* */ implements OrgUnitConstants /* */ { /* 61 */ private OrgUnitManager m_orgUnitManager = null; /* 62 */ private MarketingGroupManager m_marketingGroupManager = null; /* 63 */ private LanguageManager m_languageManager = null; /* 64 */ private CustomFieldManager m_fieldManager = null; /* */ /* */ public ActionForward execute(ActionMapping a_mapping, ActionForm a_form, HttpServletRequest a_request, HttpServletResponse a_response, DBTransaction a_dbTransaction) /* */ throws Bn2Exception /* */ { /* 82 */ ActionForward afForward = null; /* 83 */ RegisterForm form = (RegisterForm)a_form; /* 84 */ ABUserProfile userProfile = (ABUserProfile)UserProfile.getUserProfile(a_request.getSession()); /* */ /* 87 */ RegisterUserAction.stripHtml(form.getUser()); /* */ /* 90 */ long lInvitedBy = getLongParameter(a_request, "invitedBy"); /* 91 */ form.getUser().setInvitedByUserId(lInvitedBy); /* */ /* 94 */ OrgUnitSearchCriteria search = new OrgUnitSearchCriteria(); /* 95 */ Vector vecOrgUnits = this.m_orgUnitManager.getOrgUnitList(a_dbTransaction, search, false); /* 96 */ form.setOrgUnitList(vecOrgUnits); /* */ /* 99 */ Vector vecDivisions = getUserManager().getAllDivisions(a_dbTransaction); /* 100 */ form.setDivisionList(vecDivisions); /* */ /* 103 */ Vector vecGroups = getUserManager().getBrandGroups(a_dbTransaction); /* 104 */ form.setRegisterGroupList(vecGroups); /* */ /* 107 */ List marketingGroups = this.m_marketingGroupManager.getMarketingGroups(a_dbTransaction, form.getUser().getLanguage()); /* 108 */ LanguageUtils.setLanguageOnAll(marketingGroups, userProfile.getCurrentLanguage()); /* 109 */ form.setMarketingGroups(marketingGroups); /* */ /* 112 */ List languages = this.m_languageManager.getLanguages(a_dbTransaction, true, false); /* 113 */ form.setLanguages(languages); /* */ /* 116 */ Language language = userProfile.getCurrentLanguage(); /* */ /* 118 */ form.setSelectedLanguage(language.getId()); /* */ /* 120 */ if ((userProfile.getUser() != null) && (!form.isPopulatedviaReload())) /* */ { /* 122 */ List marketingGroupIds = this.m_marketingGroupManager.getMarketingGroupIdsForUser(a_dbTransaction, userProfile.getUser().getId()); /* 123 */ form.setMarketingGroupIds((String[])(String[])marketingGroupIds.toArray(new String[marketingGroups.size()])); /* */ } /* */ /* 127 */ CustomFieldUtil.prepCustomFields(a_request, form, form.getUser(), this.m_fieldManager, a_dbTransaction, 1L, null); /* 128 */ afForward = a_mapping.findForward("Success"); /* */ /* 130 */ return afForward; /* */ } /* */ /* */ public boolean getAvailableNotLoggedIn() /* */ { /* 145 */ return true; /* */ } /* */ /* */ public void setOrgUnitManager(OrgUnitManager a_orgUnitManager) /* */ { /* 150 */ this.m_orgUnitManager = a_orgUnitManager; /* */ } /* */ /* */ public void setMarketingGroupManager(MarketingGroupManager marketingGroupManager) /* */ { /* 155 */ this.m_marketingGroupManager = marketingGroupManager; /* */ } /* */ /* */ public void setLanguageManager(LanguageManager a_languageManager) /* */ { /* 160 */ this.m_languageManager = a_languageManager; /* */ } /* */ /* */ public void setCustomFieldManager(CustomFieldManager a_fieldManager) /* */ { /* 165 */ this.m_fieldManager = a_fieldManager; /* */ } /* */ } /* Location: C:\Users\mamatha\Desktop\com.zip * Qualified Name: com.bright.assetbank.user.action.ViewRegisterAction * JD-Core Version: 0.6.0 */
[ "42003122+code7885@users.noreply.github.com" ]
42003122+code7885@users.noreply.github.com
ab4efdb9f07c060427b582b685569d27963097a1
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project32/src/main/java/org/gradle/test/performance32_3/Production32_218.java
cb4a4c9889b773a0bed0cf2a2b08c4e3639c8e08
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance32_3; public class Production32_218 extends org.gradle.test.performance13_3.Production13_218 { private final String property; public Production32_218() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
129ff3f3d0578b3e6fd253bfd13124254867ea28
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE197_Numeric_Truncation_Error/s01/CWE197_Numeric_Truncation_Error__int_large_to_byte_71a.java
6d631b30226f204893f966cf3d6a1839588dc4fc
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
2,042
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE197_Numeric_Truncation_Error__int_large_to_byte_71a.java Label Definition File: CWE197_Numeric_Truncation_Error__int.label.xml Template File: sources-sink-71a.tmpl.java */ /* * @description * CWE: 197 Numeric Truncation Error * BadSource: large Set data to a number larger than Short.MAX_VALUE * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: to_byte * BadSink : Convert data to a byte * Flow Variant: 71 Data flow: data passed as an Object reference argument from one method to another in different classes in the same package * * */ package testcases.CWE197_Numeric_Truncation_Error.s01; import testcasesupport.*; public class CWE197_Numeric_Truncation_Error__int_large_to_byte_71a extends AbstractTestCase { public void bad() throws Throwable { int data; /* FLAW: Use a number larger than Short.MAX_VALUE */ data = Short.MAX_VALUE + 5; (new CWE197_Numeric_Truncation_Error__int_large_to_byte_71b()).badSink((Object)data ); } public void good() throws Throwable { goodG2B(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { int data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; (new CWE197_Numeric_Truncation_Error__int_large_to_byte_71b()).goodG2BSink((Object)data ); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
b3091f812d37bc2b3f161da7b1b330ecf888caf9
2a1469663aa74535060fec05b1887a4c70c1801a
/src/test/java/org/mydomain/app/classloader/ClassLoaderUtil.java
40ad2784af3c7bc56bf77dcf370ecb189ec5f5fc
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
baowp/jpetstore-6
797e07fdc87795f440d2b7650cd3887d38234c44
c62c874a985dc9c40adca3afdea749bf0320432e
refs/heads/master
2021-01-18T18:22:52.378905
2013-11-05T13:51:04
2013-11-05T13:51:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,627
java
/** * Project: jpetstore-6 * * File Created at Sep 27, 2013 * $Id$Corporation * * Copyright 2013-2015 Colomob.com Corporation Limited. * All rights reserved. */ package org.mydomain.app.classloader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; /** * @author baowp * */ public class ClassLoaderUtil { public synchronized static void reloadClassesFromPath() { isLoad = false; loadClassesFromPath(); } public synchronized static void loadClassesFromPath() { if (!isLoad) { // String property = System.getProperty("user.dir");// // "sun.boot.class.path" try { URL resource = ClassLoaderUtil.class.getResource("/"); URI uri = resource.toURI(); String property = new File(uri).getPath(); String[] paths = property.split(";"); for (String path : paths) { File file = new File(path); if (file.isFile() && path.endsWith(".jar")) { listClassesInZip(file); } else if (file.isDirectory()) { listClassesInDirectory(path + File.separatorChar, file); } } } catch (URISyntaxException e) { e.printStackTrace(); } } } private synchronized static void listClassesInDirectory(String rootPath, File file) { File[] subFiles = file.listFiles(); for (File subFile : subFiles) { if (subFile.canRead()) { if (subFile.isFile()) { String path = subFile.getPath(); if (path.endsWith(".class")) { try { String className = getClassName(path .substring(rootPath.length())); CLASSES.add(Class.forName(className)); } catch (Throwable e) { e.printStackTrace(); } } else if (path.endsWith(".jar")) { listClassesInZip(subFile); } } else if (subFile.isDirectory()) { listClassesInDirectory(rootPath, subFile); } } } } private synchronized static void listClassesInZip(File jarFile) { ZipInputStream in = null; try { in = new ZipInputStream(new FileInputStream(jarFile)); ZipEntry ze = null; while ((ze = in.getNextEntry()) != null) { if (ze.isDirectory()) { continue; } else { try { String name = ze.getName(); if (!name.endsWith(".class")) continue; String className = getClassName(name); CLASSES.add(Class.forName(className)); } catch (Throwable e) { } } } } catch (Throwable e) { } finally { if (in != null) { try { in.close(); } catch (IOException e) { } } } } private static String getClassName(String path) { return path.replace('/', '.').replace('\\', '.') .replaceAll(".class$", ""); } public static List<Class<?>> getSubClasses(Class<?> clazz) { List<Class<?>> subClasses = SUB_CLASSES_MAP.get(clazz); if (subClasses == null) { subClasses = new ArrayList<Class<?>>(10); for (Class<?> tmpClass : CLASSES) { if (clazz.isAssignableFrom(tmpClass) && !tmpClass.isAssignableFrom(clazz)) { subClasses.add(tmpClass); } } SUB_CLASSES_MAP.put(clazz, subClasses); } return Collections.unmodifiableList(subClasses); } private static final List<Class<?>> CLASSES = new ArrayList<Class<?>>(200); private static final Map<Class<?>, List<Class<?>>> SUB_CLASSES_MAP = new HashMap<Class<?>, List<Class<?>>>(); private static boolean isLoad; static { loadClassesFromPath(); } }
[ "122515909@qq.com" ]
122515909@qq.com
8872bf56eeaf4efb93bd3a8689147cacecea2921
c28324889711ae8457ebe5077c87ce620f53b91f
/src/main/java/com/walker/design/graphic/abstraction/list/ListFactory.java
62888e641fc3b00f0214344bdacbb2d05faee4c3
[]
no_license
walker911/design-pattern
359a96113f13f07250ad66d7a92549e2e5b0968c
f4a3aa53709a401e7b394bc83e4c40708640f1dc
refs/heads/master
2020-08-26T12:48:48.744600
2019-11-12T09:46:52
2019-11-12T09:46:52
217,014,602
0
0
null
null
null
null
UTF-8
Java
false
false
753
java
package com.walker.design.graphic.abstraction.list; import com.walker.design.graphic.abstraction.factory.Factory; import com.walker.design.graphic.abstraction.factory.Link; import com.walker.design.graphic.abstraction.factory.Page; import com.walker.design.graphic.abstraction.factory.Tray; /** * 具体的工厂 * * @author walker * @date 2019/10/30 */ public class ListFactory extends Factory { @Override public Link createLink(String caption, String url) { return new ListLink(caption, url); } @Override public Tray createTray(String caption) { return new ListTray(caption); } @Override public Page createPage(String title, String author) { return new ListPage(title, author); } }
[ "qinmu911@163.com" ]
qinmu911@163.com
823a6fc6051be71c6df6e62f2956ec70946bd53e
0af8b92686a58eb0b64e319b22411432aca7a8f3
/api-vs-impl-small/domain/src/main/java/org/gradle/testdomain/performancenull_23/Productionnull_2260.java
9abd99e2e158d6ee3adeb93dd23fbff988020968
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
591
java
package org.gradle.testdomain.performancenull_23; public class Productionnull_2260 { private final String property; public Productionnull_2260(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
0ff4e857ee53e5db42eaf948c69b6086cf5fd0a7
98c9d4575781bfbd26fa20673ba5a216c4a06429
/src/main/java/com/minshang/erp/common/vo/AccessToken.java
18c69cd57cec699a2a36341650ab618f1670e6fa
[]
no_license
JackLuhan/minshang_back
e06e21899b142a489715fa8110cfad5874992ad8
f54c6a36798005012029d96b355ba9518a33aef3
refs/heads/master
2020-04-13T17:50:56.929733
2019-01-10T16:38:03
2019-01-10T16:38:03
163,357,735
1
5
null
null
null
null
UTF-8
Java
false
false
152
java
package com.minshang.erp.common.vo; import lombok.Data; /** * @author houyi */ @Data public class AccessToken { private String access_token; }
[ "1317406121@qq.com" ]
1317406121@qq.com
e823d10b92f99bcd11c64fec4a1bb3444be16497
8dfc9785d2022c5937d1b26eb472c48cb58d0cd2
/Shiro-Limit/src/main/java/com/nh/limit/common/properties/SwaggerProperties.java
8faf902191fce98597af12bfd36ad70030f4a9bf
[]
no_license
iosdouble/ItemLib
da1b924338af2ce84b5bbaf00258d68497f16193
5c4c639dd2bd9ae4c814b3c57f1651cb3760f016
refs/heads/master
2022-09-11T02:01:27.181795
2020-01-03T06:31:21
2020-01-03T06:31:21
214,361,565
0
0
null
2022-09-01T23:13:57
2019-10-11T06:36:07
HTML
UTF-8
Java
false
false
491
java
package com.nh.limit.common.properties; import lombok.Data; /** * @Classname SwaggerProperties * @Description TODO Swagger 配置类封装 * @Date 2019/10/12 9:44 AM * @Created by nihui */ @Data public class SwaggerProperties { private String basePackage; private String title; private String description; private String version; private String author; private String url; private String email; private String license; private String licenseUrl; }
[ "18202504057@163.com" ]
18202504057@163.com
54cf64bb106bf3295e5960f1fcc9f96cf1b288b9
d18af2a6333b1a868e8388f68733b3fccb0b4450
/java/src/com/google/android/gms/internal/zzaf$7.java
a4475f7594a1f9bf09671590cd65036d0912c8da
[]
no_license
showmaxAlt/showmaxAndroid
60576436172495709121f08bd9f157d36a077aad
d732f46d89acdeafea545a863c10566834ba1dec
refs/heads/master
2021-03-12T20:01:11.543987
2015-08-19T20:31:46
2015-08-19T20:31:46
41,050,587
0
1
null
null
null
null
UTF-8
Java
false
false
678
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.google.android.gms.internal; import java.util.Map; // Referenced classes of package com.google.android.gms.internal: // zzcv, zzaf, zzic class zznI implements zzcv { final zzaf zznI; public void zza(zzic zzic1, Map map) { if (!zznI.zza(map)) { return; } else { zznI.zza(zzic1.getWebView(), map); return; } } (zzaf zzaf1) { zznI = zzaf1; super(); } }
[ "invisible@example.com" ]
invisible@example.com
d9837cb868bf311c9ea2ac8c2badde398a712b4f
dd08849a71940a7cb921dc383e12606e210def97
/src/codechef/problems/SportsStadium.java
fe3743506bf0c2275f5cc188b2e0352f6e9ed7c4
[]
no_license
brhmshrnv/Solutions
e3581cf1fc5ac7c391b3f62ef087b55c195ad345
0d3a6124030bbe2a2c5b653fc957eba19b631978
refs/heads/master
2022-12-17T22:52:19.455791
2020-09-26T11:15:52
2020-09-26T11:15:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,189
java
package codechef.problems; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class SportsStadium { public static void main(String[] args) { Scanner in = new Scanner(System.in); int stadiums = in.nextInt(); Slot[] slots = new Slot[stadiums]; for (int s = 0; s < stadiums; s++) { slots[s] = new Slot(in.nextInt(), in.nextInt()); } Arrays.sort(slots, new Slot(-1, -1)); //System.out.println(Arrays.asList(slots)); int max = getMaxAlloc(slots); System.out.println(max); } private static int getMaxAlloc(Slot[] slots) { // greedy approach. int count = 1; int end = slots[0].end; for (int i = 1; i < slots.length; i++) { //System.out.println(slots[i].start); if (slots[i].start >= end) { count++; end = slots[i].end+1; } } return count; } static class Slot implements Comparator<Slot> { private final int start, end; public Slot(int start, int length) { this.start = start; this.end = this.start + length; } @Override public String toString() { return this.start+"-"+this.end; } @Override public int compare(Slot s1, Slot s2) { return (s1.end - s2.end); } } }
[ "Gurpreet-makkar" ]
Gurpreet-makkar
922d0c19c28162b984ecec050d622a64dcc854ce
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/zuiyou/sources/com/facebook/imagepipeline/d/e.java
563d0c717e52332533877325badcdd30894348a9
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
195
java
package com.facebook.imagepipeline.d; import java.util.concurrent.Executor; public interface e { Executor a(); Executor b(); Executor c(); Executor d(); Executor e(); }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
6ee7f7caaf5be6ef0258c0ed4e10db951376f13b
e2adb3fadf79028a22780bc6d1c1490051d5111b
/getty-core/src/main/java/com/gettyio/core/channel/starter/Starter.java
a0bf13a798b081b4e3766e055c2d99345043c1ca
[ "Apache-2.0" ]
permissive
endlessc/getty
4b2d4d7faa7dcdd6d51ca6e84b82255652a1a2bb
d44fc467ed9fe15bc96d2e2b7ef0ab5a885fe8a1
refs/heads/master
2022-07-03T06:29:06.388147
2020-04-22T00:40:26
2020-04-22T00:40:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
787
java
package com.gettyio.core.channel.starter;/* * 类名:Starter * 版权:Copyright by www.getty.com * 描述: * 修改人:gogym * 时间:2020/4/8 */ public abstract class Starter { /** * Boss线程数,获取cpu核心,核心小于4设置线程为3,大于4设置和cpu核心数一致 */ protected int bossThreadNum = Runtime.getRuntime().availableProcessors() < 4 ? 3 : Runtime.getRuntime().availableProcessors(); /** * Boss共享给Worker的线程数,核心小于4设置线程为1,大于4右移两位 */ protected int bossShareToWorkerThreadNum = bossThreadNum > 4 ? bossThreadNum >> 2 : bossThreadNum - 2; /** * Worker线程数 */ protected int workerThreadNum = bossThreadNum - bossShareToWorkerThreadNum; }
[ "34082822+gogym@users.noreply.github.com" ]
34082822+gogym@users.noreply.github.com
c29b50041399bc03ed685d51e6772626ef5b8cbe
ced62ae5fb068627312a5e63a15fcc26e1596432
/tests/simplify-01/src/test/java/org/jvnet/jaxb2_commons/plugin/simplify/tests01/Gh4Test.java
0226d78e8dd5a68d1f9ab5724f18531a53218aa8
[ "BSD-2-Clause" ]
permissive
ja6a/jaxb2-basics
3201d4fa346d4e0ab7aa9a9dfe8198c94a0f2a32
fb6979be02e8acf3ba4674a4a91cd0f25d067148
refs/heads/master
2020-02-26T16:46:45.464595
2014-12-19T14:50:27
2014-12-19T14:50:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,081
java
package org.jvnet.jaxb2_commons.plugin.simplify.tests01; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; import org.junit.Assert; import org.junit.Before; import org.junit.Test; public class Gh4Test { private JAXBContext context; @Before public void setUp() throws Exception { context = JAXBContext.newInstance(getClass().getPackage().getName()); } @Test public void compiles() { final SimplifyReferencesPropertyAsElementPropertyType item = new SimplifyReferencesPropertyAsElementPropertyType(); item.getBase(); item.getBaseElement(); } @Test public void unmarshalls() throws Exception { @SuppressWarnings("unchecked") SimplifyReferencesPropertyAsElementPropertyType value = ((JAXBElement<SimplifyReferencesPropertyAsElementPropertyType>) context .createUnmarshaller() .unmarshal( getClass() .getResourceAsStream( "simplifyReferencesPropertyAsElementProperty.xml"))) .getValue(); Assert.assertEquals(3, value.getBase().size()); Assert.assertEquals(3, value.getBaseElement().size()); } }
[ "aleksei.valikov@gmail.com" ]
aleksei.valikov@gmail.com
890d679877e59411284fb9ed456a7344ff42885b
f378ddd47c8b7de6e9cf1d4228c84f73e9dc59f1
/projetos/Web/Object_catalog/src/ru/spbstu/telematics/objectCatalog/DeleteStyleServlet.java
d3c1203fa7dddf5bd77ff75ba6daa5562babed5d
[]
no_license
charles-marques/dataset-375
29e2f99ac1ba323f8cb78bf80107963fc180487c
51583daaf58d5669c69d8208b8c4ed4e009001a5
refs/heads/master
2023-01-20T07:23:09.445693
2020-11-27T22:35:49
2020-11-27T22:35:49
283,315,149
0
1
null
null
null
null
UTF-8
Java
false
false
653
java
package ru.spbstu.telematics.objectCatalog; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class DeleteStyleServlet extends HttpServlet{ ObjectCatalog catalog = new ObjectCatalog(); @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String styleId = req.getParameter("styleId"); if (styleId != null) catalog.deleteStyle(styleId); req.getRequestDispatcher("/style/delete_style.jsp").forward(req, resp); } }
[ "suporte@localhost.localdomain" ]
suporte@localhost.localdomain
f2c60d5a3e6d4431a470ca648be68434e9f83ba4
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_373/Testnull_37295.java
53fc626266751cf0ecb5ea9267bcda9fe31b0c88
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_373; import static org.junit.Assert.*; public class Testnull_37295 { private final Productionnull_37295 production = new Productionnull_37295("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
10599fc55d56e038b07b2d843a22e6aceacb1799
30cc96af0327f00c2830fc6ba9f856aeb74c179c
/core/src/main/java/ru/nikita/platform/sms/providers/ProtocolsRegistry.java
120338533d28a090e4de9b6c9c069bf9c90b76da
[]
no_license
nikelin/SMSi
6562ec04f74a8abe3bd72a055136fe02f025c2f1
9c79af8ae9a6c61ec054c899a2303d1fe3a7e9d3
refs/heads/master
2021-01-17T17:05:44.661627
2012-03-18T10:52:37
2012-03-18T10:52:37
3,754,302
0
1
null
null
null
null
UTF-8
Java
false
false
809
java
package ru.nikita.platform.sms.providers; import com.redshape.utils.IEnum; import ru.nikita.platform.sms.providers.impl.ESMEProvider; import java.util.HashMap; import java.util.Map; /** * This class is not suitable to be used in RMI context! */ public final class ProtocolsRegistry { private static Map<ProtocolType, Class<? extends IProvider>> registry = new HashMap<ProtocolType, Class<? extends IProvider>>(); static { registry.put( ProtocolType.SMSC, ESMEProvider.class ); } public static Class<? extends IProvider> get( ProtocolType type ) { return registry.get( type ); } public static void register( ProtocolType type, Class<? extends IProvider> protocolClazz ) { registry.put( type, protocolClazz ); } }
[ "self@nikelin.ru" ]
self@nikelin.ru
0b8b88298f0781aa720462563e4fae109a38a507
4fff4285330949b773e0b615484fb9c4562ff2cd
/vc-web/vc-web-front/src/main/java/com/ccclubs/admin/model/CsCan.java
462ffe5674f48746ce9f238b56a8334a11ca9a3b
[ "Apache-2.0" ]
permissive
soldiers1989/project-2
de21398f32f0e468e752381b99167223420728d5
dc670d7ba700887d951287ec7ff4a7db90ad9f8f
refs/heads/master
2020-03-29T08:48:58.549798
2018-07-24T03:28:08
2018-07-24T03:28:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,783
java
package com.ccclubs.admin.model; import java.util.Date; import java.util.HashMap; import java.util.Map; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Transient; import com.fasterxml.jackson.annotation.JsonFormat; import org.springframework.format.annotation.DateTimeFormat; import com.ccclubs.frm.spring.resolver.Resolver; /** * 车辆实时CAN信息 * @author Joel */ public class CsCan implements java.io.Serializable { private static final long serialVersionUID = 1L; /** * [csc_id]编号 */ private @Id@GeneratedValue(strategy = GenerationType.IDENTITY) Long cscId; /** * [csc_access]接入商 */ private Integer cscAccess; /** * [csc_number]车机号 */ private String cscNumber; /** * [csc_car]车辆 */ private Integer cscCar; /** * [csc_model]适配车型 */ private Short cscModel; /** * [csc_type]CAN类型1:11bit 2:29bit */ private Short cscType; /** * [csc_order]订单号 */ private Long cscOrder; /** * [csc_data]报文数据 */ private String cscData; /** * [csc_upload_time]报文时间 */ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8") private Date cscUploadTime; /** * [csc_add_time]接收时间 */ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8") private Date cscAddTime; /** * [csc_status]状态 */ private Short cscStatus; //默认构造函数 public CsCan(){ } //主键构造函数 public CsCan(Long id){ this.cscId = id; } //设置非空字段 public CsCan setNotNull(Long cscId,Integer cscAccess,String cscNumber,Date cscUploadTime,Date cscAddTime){ this.cscId=cscId; this.cscAccess=cscAccess; this.cscNumber=cscNumber; this.cscUploadTime=cscUploadTime; this.cscAddTime=cscAddTime; return this; } public Object getCscAccessText(){ return resolve("cscAccessText"); } public Object getCscNumberText(){ return resolve("cscNumberText"); } public Object getCscCarText(){ return resolve("cscCarText"); } public Object getCscTypeText(){ return resolve("cscTypeText"); } @Transient Map<String, Resolver<CsCan>> resolvers = new HashMap<String, Resolver<CsCan>>(); public void registResolver(Resolver<CsCan> resolver){ this.resolvers.put(resolver.getName(), resolver); } public Object resolve(String key){ if(resolvers.get(key)!=null){ return resolvers.get(key).execute(this); } return null; } /*******************************编号**********************************/ /** * 编号 [非空] **/ public Long getCscId(){ return this.cscId; } /** * 编号 [非空] **/ public void setCscId(Long cscId){ this.cscId = cscId; } /*******************************接入商**********************************/ /** * 接入商 [非空] **/ public Integer getCscAccess(){ return this.cscAccess; } /** * 接入商 [非空] **/ public void setCscAccess(Integer cscAccess){ this.cscAccess = cscAccess; } /*******************************车机号**********************************/ /** * 车机号 [非空] **/ public String getCscNumber(){ return this.cscNumber; } /** * 车机号 [非空] **/ public void setCscNumber(String cscNumber){ this.cscNumber = cscNumber; } /*******************************车辆**********************************/ /** * 车辆 [可空] **/ public Integer getCscCar(){ return this.cscCar; } /** * 车辆 [可空] **/ public void setCscCar(Integer cscCar){ this.cscCar = cscCar; } /*******************************适配车型**********************************/ /** * 适配车型 [可空] **/ public Short getCscModel(){ return this.cscModel; } /** * 适配车型 [可空] **/ public void setCscModel(Short cscModel){ this.cscModel = cscModel; } /*******************************CAN类型**********************************/ /** * CAN类型 [可空] **/ public Short getCscType(){ return this.cscType; } /** * CAN类型 [可空] **/ public void setCscType(Short cscType){ this.cscType = cscType; } /*******************************订单号**********************************/ /** * 订单号 [可空] **/ public Long getCscOrder(){ return this.cscOrder; } /** * 订单号 [可空] **/ public void setCscOrder(Long cscOrder){ this.cscOrder = cscOrder; } /*******************************报文数据**********************************/ /** * 报文数据 [可空] **/ public String getCscData(){ return this.cscData; } /** * 报文数据 [可空] **/ public void setCscData(String cscData){ this.cscData = cscData; } /*******************************报文时间**********************************/ /** * 报文时间 [非空] **/ public Date getCscUploadTime(){ return this.cscUploadTime; } /** * 报文时间 [非空] **/ public void setCscUploadTime(Date cscUploadTime){ this.cscUploadTime = cscUploadTime; } /*******************************接收时间**********************************/ /** * 接收时间 [非空] **/ public Date getCscAddTime(){ return this.cscAddTime; } /** * 接收时间 [非空] **/ public void setCscAddTime(Date cscAddTime){ this.cscAddTime = cscAddTime; } /*******************************状态**********************************/ /** * 状态 [可空] **/ public Short getCscStatus(){ return this.cscStatus; } /** * 状态 [可空] **/ public void setCscStatus(Short cscStatus){ this.cscStatus = cscStatus; } }
[ "niuge@ccclubs.com" ]
niuge@ccclubs.com
40cb886260a18743350bed9d545461b188ad9ffb
b9559e00a99cc08ee72efb30d3a04166054651e2
/Java/ZipMe/Base/net/sf/zipme/CheckedOutputStream.java
4d1f7abfaab0c4e22ef0799cc532aeca0e312bd9
[]
no_license
joliebig/featurehouse_fstcomp_examples
d4dd7d90a77ae3b20b6118677a17001fdb53ee93
20dd7dc9a807ec0c20939eb5c6e00fcc1ce19d20
refs/heads/master
2021-01-19T08:08:37.797995
2013-01-29T13:48:20
2013-01-29T13:48:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,374
java
// package net.sf.zipme; import java.io.IOException; import java.io.OutputStream; /** * OutputStream that computes a checksum of data being written using a * supplied Checksum object. * @see Checksum * @author Tom Tromey * @date May 17, 1999 */ public class CheckedOutputStream extends OutputStream { /** * This is the subordinate <code>OutputStream</code> that this class * redirects its method calls to. */ protected OutputStream out; /** * Creates a new CheckInputStream on top of the supplied OutputStream * using the supplied Checksum. */ public CheckedOutputStream( OutputStream out, Checksum cksum){ this.out=out; this.sum=cksum; } /** * Returns the Checksum object used. To get the data checksum computed so * far call <code>getChecksum.getValue()</code>. */ public Checksum getChecksum(){ return sum; } /** * Writes one byte to the OutputStream and updates the Checksum. */ public void write( int bval) throws IOException { out.write(bval); sum.update(bval); } /** * This method writes all the bytes in the specified array to the underlying * <code>OutputStream</code>. It does this by calling the three parameter * version of this method - <code>write(byte[], int, int)</code> in this * class instead of writing to the underlying <code>OutputStream</code> * directly. This allows most subclasses to avoid overriding this method. * @param buf The byte array to write bytes from * @exception IOException If an error occurs */ public void write( byte[] buf) throws IOException { write(buf,0,buf.length); } /** * Writes the byte array to the OutputStream and updates the Checksum. */ public void write( byte[] buf, int off, int len) throws IOException { out.write(buf,off,len); sum.update(buf,off,len); } /** * This method closes the underlying <code>OutputStream</code>. Any * further attempts to write to this stream may throw an exception. * @exception IOException If an error occurs */ public void close() throws IOException { flush(); out.close(); } /** * This method attempt to flush all buffered output to be written to the * underlying output sink. * @exception IOException If an error occurs */ public void flush() throws IOException { out.flush(); } /** * The checksum object. */ private Checksum sum; }
[ "apel" ]
apel
d2fe2187ca130d65d090ebcfb2066b563e8c7790
c359beff19d9fbb944ef04e28b3e7f9e59a742a2
/sources/com/android/keyguard/widget/IAodClock.java
2e7ecbc515563bd4d5ab06283f4c575f23d50ef7
[]
no_license
minz1/MIUISystemUI
872075cae3b18a86f58c5020266640e89607ba17
5cd559e0377f0e51ad4dc0370cac445531567c6d
refs/heads/master
2020-07-16T05:43:35.778470
2019-09-01T21:12:11
2019-09-01T21:12:11
205,730,364
3
1
null
null
null
null
UTF-8
Java
false
false
328
java
package com.android.keyguard.widget; import android.view.View; import java.util.TimeZone; public interface IAodClock { void bindView(View view); int getLayoutResource(); void setPaint(int i); void setTimeZone(TimeZone timeZone); void setTimeZone2(TimeZone timeZone); void updateTime(boolean z); }
[ "emerytang@gmail.com" ]
emerytang@gmail.com
557cb96b4818bab90487b391810adcd80f55933d
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
/app/src/main/java/com/p118pd/sdk/C9005ooOo00O0.java
6e832d9ea4243e4ee873fbe1cef50c22eba937ea
[]
no_license
rcoolboy/guilvN
3817397da465c34fcee82c0ca8c39f7292bcc7e1
c779a8e2e5fd458d62503dc1344aa2185101f0f0
refs/heads/master
2023-05-31T10:04:41.992499
2021-07-07T09:58:05
2021-07-07T09:58:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,322
java
package com.p118pd.sdk; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.pm.ResolveInfo; import java.util.ArrayList; import java.util.List; /* renamed from: com.pd.sdk.ooOo00O0 reason: case insensitive filesystem */ public class C9005ooOo00O0<T extends BroadcastReceiver> { public List<T> OooO00o; /* renamed from: OooO00o reason: collision with other method in class */ public List<T> m20672OooO00o(Context context, String str, Class cls) { if (this.OooO00o == null) { OooO00o(context, str, cls); } return this.OooO00o; } /* renamed from: OooO00o reason: collision with other method in class */ public T m20671OooO00o(Context context, String str, Class cls) { if (this.OooO00o == null) { OooO00o(context, str, cls); } if (this.OooO00o.size() > 0) { return this.OooO00o.get(0); } return null; } /* JADX DEBUG: Multi-variable search result rejected for r1v7, resolved type: java.util.List<T extends android.content.BroadcastReceiver> */ /* JADX WARN: Multi-variable type inference failed */ private void OooO00o(Context context, String str, Class cls) { this.OooO00o = new ArrayList(); if (context != null) { Intent intent = new Intent(str); intent.setPackage(context.getPackageName()); try { List<ResolveInfo> queryBroadcastReceivers = context.getPackageManager().queryBroadcastReceivers(intent, 64); if (queryBroadcastReceivers != null) { for (ResolveInfo resolveInfo : queryBroadcastReceivers) { if (resolveInfo.activityInfo != null && resolveInfo.activityInfo.packageName.equals(context.getPackageName())) { String str2 = resolveInfo.activityInfo.name; if (cls.isAssignableFrom(Class.forName(str2))) { this.OooO00o.add((BroadcastReceiver) Class.forName(str2).newInstance()); } } } } } catch (Exception e) { e.printStackTrace(); } } } }
[ "593746220@qq.com" ]
593746220@qq.com
5eca509f26bc948ddf2ab32067812428bd695b00
768ee7fe3fba51f3a270626ff717a9d7e9390def
/src/main/java/com/faendir/acra/ui/view/app/tabs/StatisticsTab.java
cdc9d99f35f5d568d267348380fdd993a7b685da
[ "Apache-2.0", "BSD-3-Clause", "EPL-1.0", "CDDL-1.1", "W3C", "LGPL-2.1-only", "MPL-1.1", "LicenseRef-scancode-unknown-license-reference", "MIT", "GPL-2.0-only" ]
permissive
mirzazulfan/Acrarium
e8f0c21ce7ea7ebec2e8fb7ccccb54201c4ddc7d
53feb1e015f59395fd57d9c5ddcdd5a4dfe452f0
refs/heads/master
2020-04-06T09:17:35.065902
2018-11-13T07:17:55
2018-11-13T07:17:55
157,336,065
0
0
Apache-2.0
2018-11-13T07:08:32
2018-11-13T07:08:32
null
UTF-8
Java
false
false
2,203
java
/* * (C) Copyright 2018 Lukas Morawietz (https://github.com/F43nd1r) * * 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.faendir.acra.ui.view.app.tabs; import com.faendir.acra.i18n.Messages; import com.faendir.acra.model.App; import com.faendir.acra.service.DataService; import com.faendir.acra.ui.navigation.NavigationManager; import com.faendir.acra.ui.view.base.statistics.Statistics; import com.vaadin.spring.annotation.SpringComponent; import com.vaadin.spring.annotation.ViewScope; import com.vaadin.ui.Component; import com.vaadin.ui.Panel; import com.vaadin.ui.themes.AcraTheme; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.lang.NonNull; import org.vaadin.spring.i18n.I18N; /** * @author Lukas * @since 22.05.2017 */ @SpringComponent @ViewScope public class StatisticsTab implements AppTab { @NonNull private final DataService dataService; @NonNull private final I18N i18n; @Autowired public StatisticsTab(@NonNull DataService dataService, @NonNull I18N i18n) { this.dataService = dataService; this.i18n = i18n; } @Override public Component createContent(@NonNull App app, @NonNull NavigationManager navigationManager) { Panel root = new Panel(new Statistics(app, null, dataService, i18n)); root.setSizeFull(); root.addStyleNames(AcraTheme.NO_BACKGROUND, AcraTheme.NO_BORDER); return root; } @Override public String getCaption() { return i18n.get(Messages.STATISTICS); } @Override public String getId() { return "statistics"; } @Override public int getOrder() { return 2; } }
[ "lukas.morawietz@gmail.com" ]
lukas.morawietz@gmail.com
0ddb6fa8d0145c34a07960e0598931c1cd5d6768
b07968d5519a345c7b53b5fa33720c32d6812a88
/heima_day10_/src/netTest/SunziAb.java
3c74d4f98274ae66943dc61c0f3024a171c89ab1
[]
no_license
ni247/jialian_c-2Java
d67a24800a53844b352e5ca7febc16d254e28249
1b478c10699c45ee0da70f29548029ae338ad0d9
refs/heads/master
2021-01-02T08:48:47.588902
2017-08-05T14:32:29
2017-08-05T14:32:29
99,066,589
0
0
null
null
null
null
UTF-8
Java
false
false
212
java
package netTest; public class SunziAb extends Parenst { @Override public void make() { System.out.println("做"); } @Override public void getSum() { System.out.println("求和"); } }
[ "Administrator@DESKTOP-SLN17N8" ]
Administrator@DESKTOP-SLN17N8
4b1cc4f5a5f81991652bab586e775c7ffae27200
23036ebbc82ffaf6760056bcc427e8e95c08b91f
/org.jrebirth/core/src/main/java/org/jrebirth/core/ui/adapter/DefaultMouseAdapter.java
ecd8aff6b1e86092d56ea5b02e548f75911a2936
[]
no_license
AndrewLiu/JRebirth
67d52a04fabeb6a578cd864aeb1500b38bfc8d93
275a0f0e73e3cca25d04130a6d531f6f89b01ce2
refs/heads/master
2020-04-08T22:49:10.006352
2012-10-06T14:01:26
2012-10-06T14:01:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,027
java
/** * Copyright JRebirth.org © 2011-2012 * Contact : sebastien.bordes@jrebirth.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jrebirth.core.ui.adapter; import javafx.scene.input.MouseEvent; import org.jrebirth.core.ui.AbstractController; /** * The class <strong>DefaultMouseAdapter</strong>. * * @author Sébastien Bordes * * @param <C> The controller class which manage this event adapter */ public class DefaultMouseAdapter<C extends AbstractController<?, ?>> extends AbstractDefaultAdapter<C> implements MouseAdapter { /** * {@inheritDoc} */ @Override public void mouse(final MouseEvent mouseEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void mouseDragDetected(final MouseEvent mouseEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void mouseClicked(final MouseEvent mouseEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void mouseDragged(final MouseEvent mouseEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void mouseEntered(final MouseEvent mouseEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void mouseEnteredTarget(final MouseEvent mouseEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void mouseExited(final MouseEvent mouseEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void mouseExitedTarget(final MouseEvent mouseEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void mouseMoved(final MouseEvent mouseEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void mousePressed(final MouseEvent mouseEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void mouseReleased(final MouseEvent mouseEvent) { // Nothing to do yet must be overridden } }
[ "sebastien.bordes@jrebirth.org" ]
sebastien.bordes@jrebirth.org
fffa08c00174b9488645e7b6b86941960888feb4
98faf4361afaef498c45b3a23576fc961f2a503d
/Hangman/app/src/main/java/com/example/huntertsai/hangman/WelcomeActivity.java
b0d200edf0e9dd63e006fb52941dd625c575cc3c
[]
no_license
as5823934/Android-Studio-InClass-Example
0a2e1c6229ca367c7cb4f4458cb35919a506a839
51fa68631529c40f0428ee6a58455360f6fa4023
refs/heads/master
2020-03-21T04:24:54.262832
2018-06-21T02:12:10
2018-06-21T02:12:10
138,106,938
0
0
null
null
null
null
UTF-8
Java
false
false
1,443
java
package com.example.huntertsai.hangman; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import com.hanks.htextview.HTextView; import com.hanks.htextview.HTextViewType; public class WelcomeActivity extends AppCompatActivity { private HTextView hTextView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_welcome); hTextView = (HTextView) findViewById(R.id.htext); hTextView.setAnimateType(HTextViewType.TYPER); hTextView.animateText("What do you want to play today?"); // animate } public void to_Tic_tac_toe_player(View view) { Intent intent = new Intent(this, TicTacToe_Player_Activity.class); startActivity(intent); } public void to_Tic_tac_toe_ai(View view) { Intent intent = new Intent(this, TicTacToe_AI_Activity.class); startActivity(intent); } public void to_Hangman(View view) { Intent intent = new Intent(this, HangmanActivity.class); startActivity(intent); } @Override protected void onResume() { super.onResume(); hTextView = (HTextView) findViewById(R.id.htext); hTextView.setAnimateType(HTextViewType.TYPER); hTextView.animateText("What do you want to play today?"); // animate } }
[ "as5823934@gmail.com" ]
as5823934@gmail.com
5311accec8e7aa4ecc5d9e0c302029e2b86b0409
faad188c4d5c2b8944ac7c47316e451f5143aa63
/src/main/java/de/processmining/app/config/ApplicationProperties.java
909dcd211d0722239d2da8d434668424b4913b3b
[]
no_license
ChristopherWy/processmining
bdc8e05435d7251bb10aba13f56a2bc95ad355a7
2ebd3eda2b89cca833acd2232d6c8ff89752d5ba
refs/heads/master
2023-01-22T08:39:34.245517
2020-12-05T20:49:19
2020-12-05T20:49:19
287,061,773
0
0
null
2020-10-20T19:46:18
2020-08-12T16:23:30
Java
UTF-8
Java
false
false
433
java
package de.processmining.app.config; import org.springframework.boot.context.properties.ConfigurationProperties; /** * Properties specific to Processmining. * <p> * Properties are configured in the {@code application.yml} file. * See {@link io.github.jhipster.config.JHipsterProperties} for a good example. */ @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) public class ApplicationProperties {}
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
621d0bb089ef475d4e67b3e00af2eda491b14f2b
37183ae97e9b183af57ccbe5e38e92c225a0d3d7
/app/src/main/java/com/arnoldvaz27/countriesofasia/JavaClasses/ImageFetch.java
33b43470b50dff8df4a273b259f387a4a4f9eead
[]
no_license
arnoldvaz27/CountriesOfAsia
6f23ad0f40160eac85742fa3ee68fb4381336dc5
8e2d446c23ac05b655c1f02892a37dc055e3db08
refs/heads/master
2023-08-16T20:40:08.240736
2021-08-24T07:05:54
2021-08-24T07:05:54
385,628,770
0
0
null
null
null
null
UTF-8
Java
false
false
1,760
java
package com.arnoldvaz27.countriesofasia.JavaClasses; import android.content.Context; import android.net.Uri; import android.widget.ImageView; import android.widget.Toast; import com.arnoldvaz27.countriesofasia.R; import com.github.twocoffeesoneteam.glidetovectoryou.GlideToVectorYou; import com.github.twocoffeesoneteam.glidetovectoryou.GlideToVectorYouListener; import okhttp3.Cache; import okhttp3.OkHttpClient; public class ImageFetch { private static OkHttpClient httpClient; // this method is used to fetch svg and load it into target imageview. public static void fetchSvg(Context context, String url, final ImageView target) { if (httpClient == null) { //used for caching the image and storing it locally so that the user can view the images in offline mode as well httpClient = new OkHttpClient.Builder() .cache(new Cache(context.getCacheDir(), 5 * 1024 * 1024)) .build(); } //used to display all the images that are the retrieved from the url into the imageview GlideToVectorYou .init() .with(context.getApplicationContext()) .withListener(new GlideToVectorYouListener() { @Override public void onLoadFailed() { Toast.makeText(context.getApplicationContext(), "Load failed, please connect to internet to fetch the flag", Toast.LENGTH_SHORT).show(); } @Override public void onResourceReady() { } }) .setPlaceHolder(R.drawable.android, R.drawable.android) .load(Uri.parse(url), target); } }
[ "arnoldvaz27.github@gmail.com" ]
arnoldvaz27.github@gmail.com
4e805b52e1f165436ea02466aca015b0a4ca90df
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/neo4j/testing/498/IndexProviders.java
da4bfb4fff8e31a010f0719c5c8e897b11f08c86
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,236
java
/* * Copyright (c) 2002-2018 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j 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 org.neo4j.kernel.spi.legacyindex; import org.neo4j. kernel.spi.explicitindex.IndexImplementation; /** * Registry of currently active index implementations. Indexing extensions should register the implementation * here on startup, and unregister it on stop. * @deprecated removed in 4.0 */ @Deprecated public interface IndexProviders { void registerIndexProvider( String name, IndexImplementation index ); boolean unregisterIndexProvider( String name ); }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
20aa67aca8d93ba1ba3ed14d4e07a52f9867d6f6
60feada88a66bf1c9a68a74ecf588c5dc9d42e1a
/src/main/java/com/bookerdimaio/scrabble/web/rest/AccountResource.java
30a7ff96592af259e813a32b537640baf5c8edf1
[]
no_license
cmavelis/scr-gate
a877c40aec4ec2c8cd97856289407905b020677a
be55a73622ac8bd0fd12e9b8ec88fc201eb6231a
refs/heads/master
2022-12-24T22:32:37.880800
2019-08-22T16:18:40
2019-08-22T16:18:40
204,721,722
0
0
null
2022-12-16T05:03:16
2019-08-27T14:30:35
TypeScript
UTF-8
Java
false
false
7,566
java
package com.bookerdimaio.scrabble.web.rest; import com.bookerdimaio.scrabble.domain.User; import com.bookerdimaio.scrabble.repository.UserRepository; import com.bookerdimaio.scrabble.security.SecurityUtils; import com.bookerdimaio.scrabble.service.MailService; import com.bookerdimaio.scrabble.service.UserService; import com.bookerdimaio.scrabble.service.dto.PasswordChangeDTO; import com.bookerdimaio.scrabble.service.dto.UserDTO; import com.bookerdimaio.scrabble.web.rest.errors.*; import com.bookerdimaio.scrabble.web.rest.vm.KeyAndPasswordVM; import com.bookerdimaio.scrabble.web.rest.vm.ManagedUserVM; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; import java.util.*; /** * REST controller for managing the current user's account. */ @RestController @RequestMapping("/api") public class AccountResource { private static class AccountResourceException extends RuntimeException { private AccountResourceException(String message) { super(message); } } private final Logger log = LoggerFactory.getLogger(AccountResource.class); private final UserRepository userRepository; private final UserService userService; private final MailService mailService; public AccountResource(UserRepository userRepository, UserService userService, MailService mailService) { this.userRepository = userRepository; this.userService = userService; this.mailService = mailService; } /** * {@code POST /register} : register the user. * * @param managedUserVM the managed user View Model. * @throws InvalidPasswordException {@code 400 (Bad Request)} if the password is incorrect. * @throws EmailAlreadyUsedException {@code 400 (Bad Request)} if the email is already used. * @throws LoginAlreadyUsedException {@code 400 (Bad Request)} if the login is already used. */ @PostMapping("/register") @ResponseStatus(HttpStatus.CREATED) public void registerAccount(@Valid @RequestBody ManagedUserVM managedUserVM) { if (!checkPasswordLength(managedUserVM.getPassword())) { throw new InvalidPasswordException(); } User user = userService.registerUser(managedUserVM, managedUserVM.getPassword()); mailService.sendActivationEmail(user); } /** * {@code GET /activate} : activate the registered user. * * @param key the activation key. * @throws RuntimeException {@code 500 (Internal Server Error)} if the user couldn't be activated. */ @GetMapping("/activate") public void activateAccount(@RequestParam(value = "key") String key) { Optional<User> user = userService.activateRegistration(key); if (!user.isPresent()) { throw new AccountResourceException("No user was found for this activation key"); } } /** * {@code GET /authenticate} : check if the user is authenticated, and return its login. * * @param request the HTTP request. * @return the login if the user is authenticated. */ @GetMapping("/authenticate") public String isAuthenticated(HttpServletRequest request) { log.debug("REST request to check if the current user is authenticated"); return request.getRemoteUser(); } /** * {@code GET /account} : get the current user. * * @return the current user. * @throws RuntimeException {@code 500 (Internal Server Error)} if the user couldn't be returned. */ @GetMapping("/account") public UserDTO getAccount() { return userService.getUserWithAuthorities() .map(UserDTO::new) .orElseThrow(() -> new AccountResourceException("User could not be found")); } /** * {@code POST /account} : update the current user information. * * @param userDTO the current user information. * @throws EmailAlreadyUsedException {@code 400 (Bad Request)} if the email is already used. * @throws RuntimeException {@code 500 (Internal Server Error)} if the user login wasn't found. */ @PostMapping("/account") public void saveAccount(@Valid @RequestBody UserDTO userDTO) { String userLogin = SecurityUtils.getCurrentUserLogin().orElseThrow(() -> new AccountResourceException("Current user login not found")); Optional<User> existingUser = userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()); if (existingUser.isPresent() && (!existingUser.get().getLogin().equalsIgnoreCase(userLogin))) { throw new EmailAlreadyUsedException(); } Optional<User> user = userRepository.findOneByLogin(userLogin); if (!user.isPresent()) { throw new AccountResourceException("User could not be found"); } userService.updateUser(userDTO.getFirstName(), userDTO.getLastName(), userDTO.getEmail(), userDTO.getLangKey(), userDTO.getImageUrl()); } /** * {@code POST /account/change-password} : changes the current user's password. * * @param passwordChangeDto current and new password. * @throws InvalidPasswordException {@code 400 (Bad Request)} if the new password is incorrect. */ @PostMapping(path = "/account/change-password") public void changePassword(@RequestBody PasswordChangeDTO passwordChangeDto) { if (!checkPasswordLength(passwordChangeDto.getNewPassword())) { throw new InvalidPasswordException(); } userService.changePassword(passwordChangeDto.getCurrentPassword(), passwordChangeDto.getNewPassword()); } /** * {@code POST /account/reset-password/init} : Send an email to reset the password of the user. * * @param mail the mail of the user. * @throws EmailNotFoundException {@code 400 (Bad Request)} if the email address is not registered. */ @PostMapping(path = "/account/reset-password/init") public void requestPasswordReset(@RequestBody String mail) { mailService.sendPasswordResetMail( userService.requestPasswordReset(mail) .orElseThrow(EmailNotFoundException::new) ); } /** * {@code POST /account/reset-password/finish} : Finish to reset the password of the user. * * @param keyAndPassword the generated key and the new password. * @throws InvalidPasswordException {@code 400 (Bad Request)} if the password is incorrect. * @throws RuntimeException {@code 500 (Internal Server Error)} if the password could not be reset. */ @PostMapping(path = "/account/reset-password/finish") public void finishPasswordReset(@RequestBody KeyAndPasswordVM keyAndPassword) { if (!checkPasswordLength(keyAndPassword.getNewPassword())) { throw new InvalidPasswordException(); } Optional<User> user = userService.completePasswordReset(keyAndPassword.getNewPassword(), keyAndPassword.getKey()); if (!user.isPresent()) { throw new AccountResourceException("No user was found for this reset key"); } } private static boolean checkPasswordLength(String password) { return !StringUtils.isEmpty(password) && password.length() >= ManagedUserVM.PASSWORD_MIN_LENGTH && password.length() <= ManagedUserVM.PASSWORD_MAX_LENGTH; } }
[ "cmavelis@gmail.com" ]
cmavelis@gmail.com
2266e3ee68592ff4f83acbec209d78052648461b
5d7b7c9c49c3808bb638b986a00a87dabb3f4361
/boot/single-angular-swagger-jpa-typescript/src/main/java/com/omnicns/medicine/domain/CorpGrpAuth.java
8f20f338cafaadee41a6331ba5e032c614820110
[]
no_license
kopro-ov/lib-spring
f4e67f8d9e81f9ec4cfbf190e30479013a2bcc1c
89e7d4b9a6318138d24f81e4e0fc2646f2d6a3d5
refs/heads/master
2023-04-04T07:56:14.312704
2021-02-15T01:59:59
2021-02-15T01:59:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
596
java
package com.omnicns.medicine.domain; import com.omnicns.medicine.domain.base.CorpGrpAuthBase; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @Getter @Setter @EqualsAndHashCode(callSuper=false) @Entity @Table(name = "T_CORP_GRP_AUTH") public class CorpGrpAuth extends CorpGrpAuthBase { @ManyToOne @JoinColumn(name="AUTH_ID" , referencedColumnName = "AUTH_ID", insertable = false, updatable = false) private Auth auth; }
[ "visualkhh@gmail.com" ]
visualkhh@gmail.com
0925264b07699a88a715f4145716ae245d1e7095
dbc258080422b91a8ff08f64146261877e69d047
/java-opensaml2-2.3.1/src/main/java/org/opensaml/samlext/saml2mdquery/impl/AttributeQueryDescriptorTypeImpl.java
9a64fd2cffb07ad1a7d3b0cce8e22e5cc096b960
[]
no_license
mayfourth/greference
bd99bc5f870ecb2e0b0ad25bbe776ee25586f9f9
f33ac10dbb4388301ddec3ff1b130b1b90b45922
refs/heads/master
2020-12-05T02:03:59.750888
2016-11-02T23:45:58
2016-11-02T23:45:58
65,941,369
0
0
null
null
null
null
UTF-8
Java
false
false
2,648
java
/* * Copyright [2006] [University Corporation for Advanced Internet Development, Inc.] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.opensaml.samlext.saml2mdquery.impl; import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.xml.namespace.QName; import org.opensaml.saml2.metadata.AttributeConsumingService; import org.opensaml.saml2.metadata.Endpoint; import org.opensaml.samlext.saml2mdquery.AttributeQueryDescriptorType; import org.opensaml.xml.XMLObject; import org.opensaml.xml.util.XMLObjectChildrenList; /** * Concrete implementation of {@link AttributeQueryDescriptorType}. */ public class AttributeQueryDescriptorTypeImpl extends QueryDescriptorTypeImpl implements AttributeQueryDescriptorType { /** Attribute consuming endpoints. */ private XMLObjectChildrenList<AttributeConsumingService> attributeConsumingServices; /** * Constructor. * * @param namespaceURI the namespace the element is in * @param elementLocalName the local name of the XML element this Object represents * @param namespacePrefix the prefix for the given namespace */ protected AttributeQueryDescriptorTypeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) { super(namespaceURI, elementLocalName, namespacePrefix); attributeConsumingServices = new XMLObjectChildrenList<AttributeConsumingService>(this); } /** {@inheritDoc} */ public List<AttributeConsumingService> getAttributeConsumingServices() { return attributeConsumingServices; } /** {@inheritDoc} */ public List<Endpoint> getEndpoints() { return new ArrayList<Endpoint>(); } /** {@inheritDoc} */ public List<Endpoint> getEndpoints(QName type) { return null; } /** {@inheritDoc} */ public List<XMLObject> getOrderedChildren() { ArrayList<XMLObject> children = new ArrayList<XMLObject>(); children.addAll(super.getOrderedChildren()); children.addAll(attributeConsumingServices); return Collections.unmodifiableList(children); } }
[ "kai.xu@service-now.com" ]
kai.xu@service-now.com
4e67f152dc81bb66e3d7a54223b51e644bab02f9
ee54576ff8996536f2f753e71221f768c478efb2
/src/main/java/io/github/pascalgrimaud/testjhipsteronline/config/CloudDatabaseConfiguration.java
3998ade32d0f53e2e8316a4f7695ec55c8606740
[]
no_license
pascalgrimaud/TestJhipsterOnlineGateway
6e3777f9430ce02d28871137f8c4925e31b06dd5
810f9c5d256ddb8116b348cc3d7d58f1e62488f4
refs/heads/master
2021-01-01T15:28:45.538925
2017-07-18T17:51:02
2017-07-18T17:51:02
97,627,598
0
0
null
null
null
null
UTF-8
Java
false
false
789
java
package io.github.pascalgrimaud.testjhipsteronline.config; import io.github.jhipster.config.JHipsterConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cache.CacheManager; import org.springframework.cloud.config.java.AbstractCloudConfig; import org.springframework.context.annotation.*; import javax.sql.DataSource; @Configuration @Profile(JHipsterConstants.SPRING_PROFILE_CLOUD) public class CloudDatabaseConfiguration extends AbstractCloudConfig { private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class); @Bean public DataSource dataSource(CacheManager cacheManager) { log.info("Configuring JDBC datasource from a cloud provider"); return connectionFactory().dataSource(); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
8fe9d7b2f488268e4e2849830dd9fa4d89df4b9b
f7cc8938ccf25a514c6a6ccdfb4dcc49f80b5c12
/microvibe-booster/booster-core/src/main/java/io/microvibe/booster/core/base/entity/UpdateUserRecordable.java
b2d777548816082e0c1a658fc9ce944808381cc8
[ "Apache-2.0" ]
permissive
microsignal/vibe
6f8b8d91aa6fa0dfc7020ca023ea8c3cb0d82e37
4b3e2d5b5a6f3b3e021276b7e496d6eaa1b7b665
refs/heads/master
2021-09-25T13:07:16.911688
2018-10-22T05:14:14
2018-10-22T05:14:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
204
java
package io.microvibe.booster.core.base.entity; import java.io.Serializable; public interface UpdateUserRecordable<ID extends Serializable> { ID getUpdateUser(); void setUpdateUser(ID updateUser); }
[ "kylinmania@163.com" ]
kylinmania@163.com
1a9c4cce68f5f54e3e7876dedfd3cf1f64f19865
c8dc0ebd2cd46c99db299c464be168af758d7f4d
/src/main/java/jabara/wicket/ValidatorUtil.java
a76f7c0b42d5909fe6a45abb1244dc5f46ed910d
[]
no_license
jabaraster/jabara-wicket
f0f5024d81b2acb9879aa92d519063ae976a65f9
e0f1a212461d932703d2b8c32c296ebc8562bcd6
refs/heads/master
2021-01-10T10:25:40.073839
2015-03-04T16:16:07
2015-03-04T16:16:07
8,442,999
0
0
null
null
null
null
UTF-8
Java
false
false
5,303
java
/** * */ package jabara.wicket; import jabara.general.ArgUtil; import jabara.general.ExceptionUtil; import jabara.general.NotFound; import java.io.Serializable; import java.lang.reflect.Field; import javax.persistence.metamodel.Attribute; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import org.apache.wicket.markup.html.form.FormComponent; import org.apache.wicket.validation.IValidator; import org.apache.wicket.validation.validator.StringValidator; /** * @author jabaraster */ public final class ValidatorUtil { private ValidatorUtil() { // } /** * 文字列入力用コンポーネントの基本的な入力チェックを追加します. <br> * 対象のフィールドにアノテーション{@link Size}が付与されている必要があります. <br> * アノテーション{@link NotNull}が付与されている場合、{@link FormComponent#setRequired(boolean)}にtrueがセットされます. <br> * <br> * 現在の仕様では、型Tの<strong>サブクラス</strong>のフィールドに対して処理出来ません. <br> * フィールドが定義されている型そのもののClassオブジェクトを指定するようにして下さい. <br> * * @param pComponent Wicketの入力コンポーネント. * @param pCheckTargetObjectType チェック対象オブジェクトの型. * @param pPropertyName チェック対象プロパティ. * @return 追加したチェックに関する情報. */ public static ValidatorInfo setSimpleStringValidator( // final FormComponent<String> pComponent // , final Class<?> pCheckTargetObjectType // , final String pPropertyName) { ArgUtil.checkNull(pComponent, "pComponent"); //$NON-NLS-1$ ArgUtil.checkNull(pCheckTargetObjectType, "pCheckTargetObjectType"); //$NON-NLS-1$ ArgUtil.checkNullOrEmpty(pPropertyName, "pPropertyName"); //$NON-NLS-1$ final boolean required = isRequired(pCheckTargetObjectType, pPropertyName); final Size size = getSizeAnnotation(pCheckTargetObjectType, pPropertyName); pComponent.setRequired(required); if (size != null) { pComponent.add(createStringValidator(size)); } return new ValidatorInfo(required, size); } /** * {@link #setSimpleStringValidator(FormComponent, Class, String)}と同じ効果です. * * @param <T> チェック対象オブジェクトの型. * @param pComponent Wicketの入力コンポーネント. * @param pCheckTargetObjectType チェック対象オブジェクトの型. * @param pPropertyName チェック対象プロパティ. * @return 追加したチェックに関する情報. */ public static <T> ValidatorInfo setSimpleStringValidator( // final FormComponent<String> pComponent // , final Class<T> pCheckTargetObjectType // , final Attribute<T, String> pPropertyName) { ArgUtil.checkNull(pComponent, "pComponent"); //$NON-NLS-1$ ArgUtil.checkNull(pCheckTargetObjectType, "pCheckTargetObjectType"); //$NON-NLS-1$ ArgUtil.checkNull(pPropertyName, "pPropertyName"); //$NON-NLS-1$ return setSimpleStringValidator(pComponent, pCheckTargetObjectType, pPropertyName.getName()); } private static <T> IValidator<String> createStringValidator(final Size pSize) { return new StringValidator(Integer.valueOf(pSize.min()), Integer.valueOf(pSize.max())); } private static Field getField(final Class<?> pCheckTargetObjectType, final String pPropertyName) { try { return pCheckTargetObjectType.getDeclaredField(pPropertyName); } catch (final NoSuchFieldException e) { throw ExceptionUtil.rethrow(e); } } private static <T> Size getSizeAnnotation(final Class<T> pCheckTargetObjectType, final String pPropertyName) { final Field field = getField(pCheckTargetObjectType, pPropertyName); return field.getAnnotation(Size.class); } private static <T> boolean isRequired(final Class<T> pCheckTargetObjectType, final String pPropertyName) { final Field field = getField(pCheckTargetObjectType, pPropertyName); return field.isAnnotationPresent(NotNull.class); } /** * @author jabaraster */ public static class ValidatorInfo implements Serializable { private static final long serialVersionUID = -5292946437870881954L; private final boolean required; private final Size size; /** * @param pRequired - * @param pSize - */ public ValidatorInfo(final boolean pRequired, final Size pSize) { this.required = pRequired; this.size = pSize; } /** * @return sizeを返す. * @throws NotFound - */ public Size getSize() throws NotFound { if (this.size == null) { throw NotFound.GLOBAL; } return this.size; } /** * @return requiredを返す. */ public boolean isRequired() { return this.required; } } }
[ "jabaraster@gmail.com" ]
jabaraster@gmail.com
9d3e3ad825d1fc4b076d6852876b23d32847ef11
a31467252e383a5cf8b527627686be70211edf39
/src/main/java/object/HelloDate.java
31aa1e8349a41bafe4489dcb15ce5caced3c3c12
[]
no_license
xiaozhiliaoo/thinkinginjava-practice
214604f6e843ffc989b2c8bc2f62e11fc17622f5
c47a8c578dfef275cfe956252a2462554f245020
refs/heads/master
2022-08-09T18:08:39.063874
2022-07-30T09:57:35
2022-07-30T09:57:35
248,148,101
0
0
null
2020-10-13T20:26:58
2020-03-18T05:41:16
Java
UTF-8
Java
false
false
598
java
//: object/HelloDate.java package object; import java.util.*; /** The first Thinking in Java example program. * Displays a string and today's date. i am lili * @author Bruce Eckel * @author www.MindView.net * @version 4.0 */ //P30 public class HelloDate { /** Entry point to class & application. * @param args array of string arguments * @throws exceptions No exceptions thrown */ public static void main(String[] args) { System.out.println("Hello, it's: "); System.out.println(new Date()); } } /* Output: (55% match) Hello, it's: Wed Oct 05 14:39:36 MDT 2005 *///:~
[ "lili@chainup.com" ]
lili@chainup.com
8f9d83d198a460210ae14d6e4ca9ddffba6e0f4c
a4a2f08face8d49aadc16b713177ba4f793faedc
/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/SourceFetcher.java
5a658b6e102dacfef28765c027229bf3dbc56ba0
[ "BSD-3-Clause", "MIT", "OFL-1.1", "ISC", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
wyfsxs/blink
046d64afe81a72d4d662872c007251d94eb68161
aef25890f815d3fce61acb3d1afeef4276ce64bc
refs/heads/master
2021-05-16T19:05:23.036540
2020-03-27T03:42:35
2020-03-27T03:42:35
250,431,969
0
1
Apache-2.0
2020-03-27T03:48:25
2020-03-27T03:34:26
Java
UTF-8
Java
false
false
3,890
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.flink.streaming.runtime.io; import org.apache.flink.streaming.api.functions.source.SourceFunction; import org.apache.flink.streaming.api.functions.source.SourceRecord; import org.apache.flink.streaming.api.operators.StreamSourceV2; import org.apache.flink.streaming.api.watermark.Watermark; import org.apache.flink.streaming.runtime.tasks.InputSelector.InputSelection; import static org.apache.flink.util.Preconditions.checkNotNull; import static org.apache.flink.util.Preconditions.checkState; /** * The type Source fetcher. */ class SourceFetcher implements InputFetcher { private final StreamSourceV2 operator; private final SourceInputProcessor processor; private final SourceFunction.SourceContext context; private final InputSelection inputSelection; private boolean isIdle = false; private volatile boolean finishedInput = false; private InputFetcherAvailableListener listener; /** * Instantiates a new Source fetcher. * * @param operator the operator * @param context the context * @param processor the processor */ public SourceFetcher( InputSelection inputSelection, StreamSourceV2 operator, SourceFunction.SourceContext context, SourceInputProcessor processor) { this.inputSelection = checkNotNull(inputSelection); this.operator = checkNotNull(operator); this.processor = checkNotNull(processor); this.context = checkNotNull(context); } @Override public void setup() throws Exception { } @SuppressWarnings("unchecked") @Override public boolean fetchAndProcess() throws Exception { if (isFinished()) { finishInput(); return false; } final SourceRecord sourceRecord = operator.next(); if (sourceRecord != null) { final Object out = sourceRecord.getRecord(); if (sourceRecord.getWatermark() != null) { context.emitWatermark(sourceRecord.getWatermark()); } if (out != null) { if (sourceRecord.getTimestamp() > 0) { context.collectWithTimestamp(out, sourceRecord.getTimestamp()); } else { context.collect(out); } } isIdle = false; } else { context.markAsTemporarilyIdle(); isIdle = true; } if (isFinished()) { finishInput(); return false; } // TODO: return !idle status, register a timer return !isIdle; } private void finishInput() throws Exception { if (!finishedInput) { context.emitWatermark(Watermark.MAX_WATERMARK); synchronized (context.getCheckpointLock()) { processor.endInput(); processor.release(); } finishedInput = true; } } @Override public boolean isFinished() { return operator.isFinished(); } @Override public boolean moreAvailable() { // TODO: register a timer to trigger available return !isFinished(); } @Override public void cleanup() { } @Override public void cancel() { operator.cancel(); } @Override public InputSelection getInputSelection() { return inputSelection; } @Override public void registerAvailableListener(InputFetcherAvailableListener listener) { checkState(this.listener == null); this.listener = listener; } }
[ "yafei.wang@transwarp.io" ]
yafei.wang@transwarp.io
c7cfc5741a8a63c7fc5dcd79bd28a86265b52446
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/google/android/gms/ads/mediation/C14883b.java
4365dc2bfc3e5e7c943f1e8f62b4742f3fcd28fd
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
745
java
package com.google.android.gms.ads.mediation; import android.os.Bundle; /* renamed from: com.google.android.gms.ads.mediation.b */ public interface C14883b { /* renamed from: com.google.android.gms.ads.mediation.b$a */ public static class C14884a { /* renamed from: a */ private int f38519a; /* renamed from: a */ public final C14884a mo37907a(int i) { this.f38519a = 1; return this; } /* renamed from: a */ public final Bundle mo37906a() { Bundle bundle = new Bundle(); bundle.putInt("capabilities", this.f38519a); return bundle; } } void onDestroy(); void onPause(); void onResume(); }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
eaf2b523919227b38eff4a4e2cd27c262cccdaa9
993cae9edae998529d4ef06fc67e319d34ee83ef
/src/cn/edu/sau/javashop/core/service/IMemberAddressManager.java
b2ae245258fdf7351fd31735fba394e7c10bc1e7
[]
no_license
zhangyuanqiao93/MySAUShop
77dfe4d46d8ac2a9de675a9df9ae29ca3cae1ef7
cc72727b2bc1148939666b0f1830ba522042b779
refs/heads/master
2021-01-25T05:02:20.602636
2017-08-03T01:06:43
2017-08-03T01:06:43
93,504,556
0
0
null
null
null
null
UTF-8
Java
false
false
615
java
package cn.edu.sau.javashop.core.service; import java.util.List; import cn.edu.sau.app.base.core.model.MemberAddress; /** * 会员中心-接收地址 * @author zyq<br/> * 2010-3-17 下午02:49:23<br/> * version 1.0<br/> */ public interface IMemberAddressManager { /** * 列表接收地址 * @return */ public List listAddress(); /** * 取得地址详细信息 * @param addr_id * @return */ public MemberAddress getAddress(int addr_id); public void addAddress(MemberAddress address); public void updateAddress(MemberAddress address); public void deleteAddress(int addr_id); }
[ "zhangyuanqiao0912@163.com" ]
zhangyuanqiao0912@163.com
484e5a8a046398b34674733a0ba491135ff43134
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/smallest/346b1d3c1cdc3032d07222a8a5e0027a2abf95bb1697b9d367d7cca7db1af769d8298e232c56471a122f05e87e79f4bd965855c9c0f8b173ebc0ef5d0abebc7b/010/mutations/220/smallest_346b1d3c_010.java
826733d29d8dec62bc8a12291b83364c54c98bb7
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,705
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class smallest_346b1d3c_010 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { smallest_346b1d3c_010 mainClass = new smallest_346b1d3c_010 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj a = new IntObj (), b = new IntObj (), c = new IntObj (), d = new IntObj (), num_1 = new IntObj (), num_2 = new IntObj (), num_3 = new IntObj (), num_4 = new IntObj (); output += (String.format ("Please enter 4 numbers separated by spaces > ")); num_1.value = scanner.nextInt (); num_2.value = scanner.nextInt (); num_3.value = scanner.nextInt (); num_4.value = scanner.nextInt (); a.value = (num_1.value); b.value = (num_2.value); c.value = (num_3.value); d.value = (num_4.value); if (a.value <= b.value && a.value <= c.value && (a.value) <= (b.value)) { output += (String.format ("%d is the smallest\n", a.value)); if (true) return;; } else if (b.value <= a.value && b.value <= c.value && b.value <= d.value) { output += (String.format ("%d is the smalles\n", b.value)); if (true) return;; } else if (c.value <= a.value && c.value <= b.value && c.value <= d.value) { output += (String.format ("%d is the smallest\n", c.value)); if (true) return;; } else if (d.value <= a.value && d.value <= b.value && d.value <= c.value) { output += (String.format ("%d is the smallest\n", d.value)); if (true) return;; } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
188ce26c7090429b24ba2059f628699843d15465
3a2f04ae5a5d39ca6e3fba0e5bd101bf4edd1cfa
/vas/v10-soap/src/test/java/io/motown/vas/v10/soap/VasConversionServiceTest.java
85bb810bc4e7d4089d4edebdfc1ee1eeb238c7be
[ "Apache-2.0" ]
permissive
motown-io/motown
c0a0d934e1c962ce98ec01e70b553e95d455d6d3
783ccda7c28b273a529ddd47defe8673b1ea365b
refs/heads/master
2020-04-05T05:51:06.645765
2019-02-01T10:32:58
2019-02-01T10:32:58
14,305,692
31
18
null
null
null
null
UTF-8
Java
false
false
1,970
java
/** * Copyright (C) 2013 Motown.IO (info@motown.io) * * 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.motown.vas.v10.soap; import io.motown.vas.v10.soap.schema.ChargePoint; import io.motown.vas.viewmodel.persistence.entities.ChargingStation; import org.junit.Before; import org.junit.Test; import static io.motown.domain.api.chargingstation.test.ChargingStationTestUtils.CHARGING_STATION_ID; public class VasConversionServiceTest { private VasConversionService service; @Before public void setup() { service = new VasConversionService(); } @Test public void getVasRepresentationNewChargingStationNoExceptions() { service.getVasRepresentation(new ChargingStation(CHARGING_STATION_ID.getId())); } @Test public void getVasRepresentationNewChargingStationValidateReturnValue() { ChargingStation cs = new ChargingStation(CHARGING_STATION_ID.getId()); ChargePoint vasRepresentation = service.getVasRepresentation(cs); VasSoapTestUtils.compareChargingStationToVasRepresentation(cs, vasRepresentation); } @Test public void getVasRepresentationFilledChargingStationValidateReturnValue() { ChargingStation cs = VasSoapTestUtils.getConfiguredAndFilledChargingStation(); ChargePoint vasRepresentation = service.getVasRepresentation(cs); VasSoapTestUtils.compareChargingStationToVasRepresentation(cs, vasRepresentation); } }
[ "eric.ettes@ihomer.nl" ]
eric.ettes@ihomer.nl
d19f46abc59bf9ebe0c1a9d93033bfdf0720202b
4d6c00789d5eb8118e6df6fc5bcd0f671bbcdd2d
/src/main/java/com/alipay/api/domain/AlipayFundAuthOrderUnfreezeModel.java
6e8479a8cde5c380f2f1f37b67061913df29314d
[ "Apache-2.0" ]
permissive
weizai118/payment-alipay
042898e172ce7f1162a69c1dc445e69e53a1899c
e3c1ad17d96524e5f1c4ba6d0af5b9e8fce97ac1
refs/heads/master
2020-04-05T06:29:57.113650
2018-11-06T11:03:05
2018-11-06T11:03:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,761
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 预授权资金解冻接口 * * @author auto create * @since 1.0, 2018-07-23 11:31:38 */ public class AlipayFundAuthOrderUnfreezeModel extends AlipayObject { private static final long serialVersionUID = 2122243151539979538L; /** * 本次操作解冻的金额,单位为:元(人民币),精确到小数点后两位,取值范围:[0.01,100000000.00] */ @ApiField("amount") private String amount; /** * 支付宝资金授权订单号 */ @ApiField("auth_no") private String authNo; /** * 解冻扩展信息,json格式;unfreezeBizInfo 目前为芝麻消费字段,支持Key值如下: "bizComplete":"true" -- 选填:标识本次解冻用户是否履约,如果true信用单会完结为COMPLETE */ @ApiField("extra_param") private String extraParam; /** * 商户本次资金操作的请求流水号,同一商户每次不同的资金操作请求,商户请求流水号不能重复 */ @ApiField("out_request_no") private String outRequestNo; /** * 商户对本次解冻操作的附言描述,长度不超过100个字母或50个汉字 */ @ApiField("remark") private String remark; /** * Gets amount. * * @return the amount */ public String getAmount() { return this.amount; } /** * Sets amount. * * @param amount the amount */ public void setAmount(String amount) { this.amount = amount; } /** * Gets auth no. * * @return the auth no */ public String getAuthNo() { return this.authNo; } /** * Sets auth no. * * @param authNo the auth no */ public void setAuthNo(String authNo) { this.authNo = authNo; } /** * Gets extra param. * * @return the extra param */ public String getExtraParam() { return this.extraParam; } /** * Sets extra param. * * @param extraParam the extra param */ public void setExtraParam(String extraParam) { this.extraParam = extraParam; } /** * Gets out request no. * * @return the out request no */ public String getOutRequestNo() { return this.outRequestNo; } /** * Sets out request no. * * @param outRequestNo the out request no */ public void setOutRequestNo(String outRequestNo) { this.outRequestNo = outRequestNo; } /** * Gets remark. * * @return the remark */ public String getRemark() { return this.remark; } /** * Sets remark. * * @param remark the remark */ public void setRemark(String remark) { this.remark = remark; } }
[ "hanley@thlws.com" ]
hanley@thlws.com
fdee7fab5ea5c04e6fe6c91c3fa78618f05022b7
4901cda2ff40bea3a4dbe9c9a32ea7b43e5d5393
/java02/src/step06/Exam055_3.java
23a51ea0f8099246b4f76da06997090439772ae8
[]
no_license
Liamkimjihwan/java01
287adc817ba7c7c4e711c392cb78e965d967742c
3e0c75e63b81acbb94c9e91a63251a252c18af77
refs/heads/master
2021-06-07T16:22:28.061338
2016-11-04T11:38:44
2016-11-04T11:38:44
72,842,529
0
0
null
null
null
null
UTF-8
Java
false
false
491
java
package step06; public class Exam055_3 { static void swap(int[] values) { int temp = values[0]; values[0] = values[1]; values[1] = temp; } public static void main(String[] args) { int[] values = {10, 20}; System.out.printf("main():%d, %d\n", values[0], values[1]); swap(values); System.out.printf("main():%d, %d\n", values[0], values[1]); } } /* call by value -메서드를 호출할 때 넘겨주는 것이 일반 값일 경우 */
[ "wwwwwwlghskdlekd@naver.com" ]
wwwwwwlghskdlekd@naver.com
e64c6738ee17fd6e75790ad14f4b560240f5f7ba
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1158/src/main/java/module1158packageJava0/Foo74.java
041328f249ef8ccb11aa0a9ff2c9210310a355d2
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
431
java
package module1158packageJava0; import java.lang.Integer; public class Foo74 { Integer int0; Integer int1; public void foo0() { new module1158packageJava0.Foo73().foo6(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
711c759f493252749dbc7a84b405580e8dbe1304
377e5e05fb9c6c8ed90ad9980565c00605f2542b
/bin/ext-accelerator/acceleratorcms/src/de/hybris/platform/acceleratorcms/services/impl/DefaultCMSDynamicAttributeService.java
962b59527cda84801e2d231c2f902bb8fd91aa49
[]
no_license
automaticinfotech/HybrisProject
c22b13db7863e1e80ccc29774f43e5c32e41e519
fc12e2890c569e45b97974d2f20a8cbe92b6d97f
refs/heads/master
2021-07-20T18:41:04.727081
2017-10-30T13:24:11
2017-10-30T13:24:11
108,957,448
0
0
null
null
null
null
UTF-8
Java
false
false
1,622
java
/* * [y] hybris Platform * * Copyright (c) 2000-2016 SAP SE or an SAP affiliate company. * All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.acceleratorcms.services.impl; import de.hybris.platform.acceleratorcms.services.CMSDynamicAttributeService; import de.hybris.platform.cms2.model.contents.CMSItemModel; import de.hybris.platform.cms2.model.contents.components.AbstractCMSComponentModel; import de.hybris.platform.cms2.model.contents.contentslot.ContentSlotModel; import java.util.Collections; import java.util.Map; import javax.servlet.jsp.PageContext; /** * Default implementation of {@link CMSDynamicAttributeService}. */ public class DefaultCMSDynamicAttributeService implements CMSDynamicAttributeService { @Override public Map<String, String> getDynamicComponentAttributes(final AbstractCMSComponentModel component, final ContentSlotModel contentSlot) { return Collections.emptyMap(); } @Override public Map<String, String> getDynamicContentSlotAttributes(final ContentSlotModel contentSlot, final PageContext pageContext, final Map<String, String> initialMaps) { return Collections.emptyMap(); } @Override public void afterAllItems(final PageContext pageContext) { // no-op default implementation } @Override public String getFallbackElement(final CMSItemModel cmsItemModel) { return null; } }
[ "santosh.kshirsagar@automaticinfotech.com" ]
santosh.kshirsagar@automaticinfotech.com
7101994065d83d86635a8967269369bbda19d612
6907dff5566e1e2419790724316cbe0702cb88f0
/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/SchemaObjectLoader.java
520c96cdefca464e9bab9165dd94315676a4daad
[ "EPL-1.0", "OLDAP-2.8", "BSD-3-Clause", "Apache-1.1", "Apache-2.0" ]
permissive
apache/directory-studio
388b38d3d8793aa03adf060d1490c1a786f56375
2be96c08b29e5ffad7bc4bb78d75523099632c3f
refs/heads/master
2023-09-03T07:05:39.365794
2023-07-26T15:37:38
2023-07-26T15:37:38
205,407
110
62
Apache-2.0
2023-06-26T08:52:27
2009-05-20T01:52:19
Java
UTF-8
Java
false
false
6,865
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.directory.studio.ldapbrowser.core.utils; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.directory.api.ldap.model.schema.AttributeType; import org.apache.directory.api.ldap.model.schema.ObjectClass; import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin; import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection; import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema; /** * A class exposing some common methods on the schema. * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ public class SchemaObjectLoader { /** The browser connection */ private IBrowserConnection browserConnection; /** The array of attributes names and OIDs */ private String[] attributeNamesAndOids; /** The array of ObjectClasses and OIDs */ private String[] objectClassesAndOids; /** * An interface to allow the getSchemaObjectNamesAndOid() to be called for any schema object */ private interface SchemaAdder { /** * Adds the schema object names and OIDs to the given set. * * @param schema the schema * @param schemaObjectNamesList the schema object names list * @param oidsList the OIDs name list */ void add( Schema schema, List<String> schemaObjectNamesList, List<String> oidsList ); } /** * Gets the array containing the objectClass names and OIDs. * * @return the array containing the objectClass names and OIDs */ public String[] getObjectClassNamesAndOids() { objectClassesAndOids = getSchemaObjectsAnddOids( objectClassesAndOids, new SchemaAdder() { @Override public void add( Schema schema, List<String> objectClassNamesList, List<String> oidsList ) { if ( schema != null ) { for ( ObjectClass ocd : schema.getObjectClassDescriptions() ) { // OID if ( !oidsList.contains( ocd.getOid() ) ) { oidsList.add( ocd.getOid() ); } // Names for ( String name : ocd.getNames() ) { if ( !objectClassNamesList.contains( name ) ) { objectClassNamesList.add( name ); } } } } } }); return objectClassesAndOids; } /** * Gets the array containing the attribute names and OIDs. * * @return the array containing the attribute names and OIDs */ public String[] getAttributeNamesAndOids() { attributeNamesAndOids = getSchemaObjectsAnddOids( attributeNamesAndOids, new SchemaAdder() { @Override public void add( Schema schema, List<String> attributeNamesList, List<String> oidsList ) { if ( schema != null ) { for ( AttributeType atd : schema.getAttributeTypeDescriptions() ) { // OID if ( !oidsList.contains( atd.getOid() ) ) { oidsList.add( atd.getOid() ); } // Names for ( String name : atd.getNames() ) { if ( !attributeNamesList.contains( name ) ) { attributeNamesList.add( name ); } } } } } }); return attributeNamesAndOids; } /** * Gets the array containing the schemaObjects and OIDs. * * @return the array containing the Schema objects and OIDs */ private String[] getSchemaObjectsAnddOids( String[] schemaObjects, SchemaAdder schemaAdder ) { // Checking if the array has already be generated if ( ( schemaObjects == null ) || ( schemaObjects.length == 0 ) ) { List<String> schemaObjectNamesList = new ArrayList<String>(); List<String> oidsList = new ArrayList<String>(); if ( browserConnection == null ) { // Getting all connections in the case where no connection is found IBrowserConnection[] connections = BrowserCorePlugin.getDefault().getConnectionManager() .getBrowserConnections(); for ( IBrowserConnection connection : connections ) { schemaAdder.add( connection.getSchema(), schemaObjectNamesList, oidsList ); } } else { // Only adding schema object names and OIDs from the associated connection schemaAdder.add( browserConnection.getSchema(), schemaObjectNamesList, oidsList ); } // Also adding schemaObject names and OIDs from the default schema schemaAdder.add( Schema.DEFAULT_SCHEMA, schemaObjectNamesList, oidsList ); // Sorting the set Collections.sort( schemaObjectNamesList ); Collections.sort( oidsList ); schemaObjects = new String[schemaObjectNamesList.size() + oidsList.size()]; System.arraycopy( schemaObjectNamesList.toArray(), 0, schemaObjects, 0, schemaObjectNamesList .size() ); System.arraycopy( oidsList.toArray(), 0, schemaObjects, schemaObjectNamesList .size(), oidsList.size() ); } return schemaObjects; } }
[ "elecharny@apache.org" ]
elecharny@apache.org