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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
29571fe61c3e1e537d351efc88d9ddd0cf86c067
|
87514d13de195adc59a5fc22cde31a741a23f3d8
|
/plugin/src/main/java/com/stratio/cassandra/lucene/search/condition/builder/AllConditionBuilder.java
|
954606b76f5ae83c9f77e108ab396dd6a2c6ecae
|
[
"Apache-2.0"
] |
permissive
|
denniskline/cassandra-lucene-index
|
eb6cfb3dadbd13cd1d2220713bb4f86f880063f5
|
e6f36a89879a6f99aac587156923e29e06a34acb
|
refs/heads/master
| 2021-12-03T09:20:32.717996
| 2017-04-10T08:05:20
| 2017-04-10T08:05:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,558
|
java
|
/*
* Licensed to STRATIO (C) under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. The STRATIO (C) 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 com.stratio.cassandra.lucene.search.condition.builder;
import com.stratio.cassandra.lucene.search.condition.AllCondition;
import org.codehaus.jackson.annotate.JsonCreator;
/**
* {@link ConditionBuilder} for building a new {@link AllCondition}.
*
* @author Andres de la Pena {@literal <adelapena@stratio.com>}
*/
public class AllConditionBuilder extends ConditionBuilder<AllCondition, AllConditionBuilder> {
/**
* Creates a new {@link AllConditionBuilder}.
*/
@JsonCreator
public AllConditionBuilder() {
}
/**
* Returns the {@link AllCondition} represented by this builder.
*
* @return a new all condition
*/
@Override
public AllCondition build() {
return new AllCondition(boost);
}
}
|
[
"a.penya.garcia@gmail.com"
] |
a.penya.garcia@gmail.com
|
9afe9f8af19877fa3dde45ffff6791f9be1e8557
|
dd80a584130ef1a0333429ba76c1cee0eb40df73
|
/development/tools/idegen/src/com/android/idegen/StandardModule.java
|
f7b24b08563f6ac5c7476b68513ff23c034e040c
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
karunmatharu/Android-4.4-Pay-by-Data
|
466f4e169ede13c5835424c78e8c30ce58f885c1
|
fcb778e92d4aad525ef7a995660580f948d40bc9
|
refs/heads/master
| 2021-03-24T13:33:01.721868
| 2017-02-18T17:48:49
| 2017-02-18T17:48:49
| 81,847,777
| 0
| 2
|
MIT
| 2020-03-09T00:02:12
| 2017-02-13T16:47:00
| null |
UTF-8
|
Java
| false
| false
| 7,204
|
java
|
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.idegen;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Module constructed from a make file.
*
* TODO: read the make file and understand included source dirs in addition to searching
* sub-directories. Make files can include sources that are not sub-directories. For example,
* the framework module includes sources from:
*
* external/libphonenumber/java/src
*
* to provide:
*
* com.android.i18n.phonenumbers.PhoneNumberUtil;
*/
public class StandardModule extends Module {
static final String REL_OUT_APP_DIR = "out/target/common/obj/APPS";
private static final Logger logger = Logger.getLogger(StandardModule.class.getName());
private static final Pattern SRC_PATTERN = Pattern.compile(
".*\\(call all-java-files-under, (.*)\\)");
private static final String[] AUTO_DEPENDENCIES = new String[]{
IntellijProject.FRAMEWORK_MODULE, "libcore"
};
private static final String[] DIRS_WITH_AUTO_DEPENDENCIES = new String[]{
"packages", "vendor", "frameworks/ex", "frameworks/opt", "frameworks/support"
};
String moduleName;
File makeFile;
File moduleRoot;
File repoRoot;
Set<String> directDependencies = Sets.newHashSet();
File intermediatesDir;
MakeFileParser makeFileParser;
boolean searchForSrc;
public StandardModule(String moduleName, String makeFile) {
this(moduleName, new File(makeFile), false);
}
public StandardModule(String moduleName, String makeFile, boolean searchForSrc) {
this(Preconditions.checkNotNull(moduleName), new File(Preconditions.checkNotNull(makeFile)),
searchForSrc);
}
public StandardModule(String moduleName, File makeFile, boolean searchForSrc) {
this.moduleName = moduleName;
this.makeFile = makeFile;
this.moduleRoot = makeFile.getParentFile();
this.repoRoot = DirectorySearch.findRepoRoot(makeFile);
this.intermediatesDir = new File(repoRoot.getAbsolutePath() + File.separator +
REL_OUT_APP_DIR + File.separator + getName() + "_intermediates" +
File.separator + "src");
this.searchForSrc = searchForSrc;
// TODO: auto-detect when framework dependency is needed instead of using coded list.
for (String dir : DIRS_WITH_AUTO_DEPENDENCIES) {
// length + 2 to account for slash
boolean isDir = makeFile.getAbsolutePath().startsWith(repoRoot + "/" + dir);
if (isDir) {
for (String dependency : AUTO_DEPENDENCIES) {
this.directDependencies.add(dependency);
}
}
}
makeFileParser = new MakeFileParser(makeFile, moduleName);
}
protected void build() throws IOException {
makeFileParser.parse();
buildDependencyList();
buildDependentModules();
//buildImlFile();
logger.info("Done building module " + moduleName);
logger.info(toString());
}
@Override
protected File getDir() {
return moduleRoot;
}
@Override
protected String getName() {
return moduleName;
}
@Override
protected List<File> getIntermediatesDirs() {
return Lists.newArrayList(intermediatesDir);
}
@Override
public File getRepoRoot() {
return this.repoRoot;
}
public Set<String> getDirectDependencies() {
return this.directDependencies;
}
@Override
protected ImmutableList<File> getSourceDirs() {
ImmutableList<File> srcDirs;
if (searchForSrc) {
srcDirs = DirectorySearch.findSourceDirs(makeFile);
} else {
srcDirs = parseSourceFiles(makeFile);
}
return srcDirs;
}
@Override
protected ImmutableList<File> getExcludeDirs() {
return DirectorySearch.findExcludeDirs(makeFile);
}
@Override
protected boolean isAndroidModule() {
File manifest = new File(moduleRoot, "AndroidManifest.xml");
return manifest.exists();
}
private ImmutableList<File> parseSourceFiles(File root) {
ImmutableList.Builder<File> builder = ImmutableList.builder();
File rootDir;
if (root.isFile()) {
rootDir = root.getParentFile();
} else {
rootDir = root;
}
Iterable<String> values = makeFileParser.getValues(Key.LOCAL_SRC_FILES.name());
if (values != null) {
for (String value : values) {
Matcher matcher = SRC_PATTERN.matcher(value);
if (matcher.matches()) {
String dir = matcher.group(1);
builder.add(new File(rootDir, dir));
} else if (value.contains("/")) {
// Treat as individual file.
builder.add(new File(rootDir, value));
}
}
}
return builder.build();
}
private void buildDependencyList() {
parseDirectDependencies(Key.LOCAL_STATIC_JAVA_LIBRARIES);
parseDirectDependencies(Key.LOCAL_JAVA_LIBRARIES);
}
private void parseDirectDependencies(Key key) {
Iterable<String> names = makeFileParser.getValues(key.name());
if (names != null) {
for (String dependency : names) {
directDependencies.add(dependency);
}
}
}
@Override
public int hashCode() {
return Objects.hashCode(getName());
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
StandardModule other = (StandardModule) obj;
return Objects.equal(getName(), other.getName());
}
@Override
public String toString() {
return Objects.toStringHelper(this)
.add("super", super.toString())
.add("makeFileParser", makeFileParser)
.add("directDependencies", Iterables.toString(directDependencies))
.toString();
}
}
|
[
"karun.matharu@gmail.com"
] |
karun.matharu@gmail.com
|
815f3445580dfa3d6fd8a884e104b73982fa5423
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_5662291475300352_0/java/goalboy1015/C.java
|
76caea6209d4b5a3f1700c65ff0f9fd7542cfc1a
|
[] |
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,937
|
java
|
import java.io.File;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class C {
static final Boolean SAMPLE = false;
static final String PROBLEM = "C";
static final String INPUT = "small1";
static final String ID = "0";
static final String PATH = "/Users/wangkai/Documents/codejam-commandline-1.2-beta1/source/";
public static void main(String[] args) throws Throwable {
Scanner in = SAMPLE ? new Scanner(System.in) : new Scanner(new File(
PATH + PROBLEM + "-" + INPUT + "-" + ID + ".in"));
PrintStream out = SAMPLE ? System.out : new PrintStream(PATH + PROBLEM
+ "-" + INPUT + "-" + ID + ".out");
int test = in.nextInt();
for (int t = 1; t <= test; t++) {
out.print("Case #" + t + ": ");
int N = in.nextInt();
List<Hiker> hikers = new ArrayList<Hiker>();
for (int i = 0; i < N; i++) {
int D = in.nextInt();
int H = in.nextInt();
int M = in.nextInt();
for (int j = 0; j < H; j++) {
hikers.add(new Hiker(D, M + j));
}
}
int encounter;
if (hikers.size() <= 1) {
encounter = 0;
} else {
Hiker faster = hikers.get(0);
Hiker slower = hikers.get(1);
if (faster.time > slower.time) {
Hiker temp = faster;
faster = slower;
slower = temp;
}
if (faster.time == slower.time) {
encounter = 0;
} else {
int distance;
if (faster.pos <= slower.pos) {
distance = slower.pos - faster.pos + 360;
} else {
distance = 360 - (faster.pos - slower.pos);
}
if ((long) distance * faster.time > (360L - slower.pos)
* (slower.time - faster.time)) {
encounter = 0;
} else {
encounter = 1;
}
}
}
out.println(encounter);
}
out.close();
in.close();
System.out.println("finish!");
}
}
class Hiker {
int pos;
int time;
Hiker(int pos, int time) {
this.pos = pos;
this.time = time;
}
}
|
[
"eewestman@gmail.com"
] |
eewestman@gmail.com
|
f636ff6b25191efbd99742dc3cdf4508fe525cc7
|
fed57605ab754316194bb951be9d11e35529dfd4
|
/src/main/java/com/test/shopping/ShoppingCart.java
|
964722d1ff2ecacf6120779422148ab1b6eb529d
|
[] |
no_license
|
alextimonov/firstBelApp
|
7edbd85d269b5ddf737b8e8fa56f84361978cc04
|
3bee68c6a6ec279c4eda71dc97e2378e3a41cf93
|
refs/heads/master
| 2021-01-19T09:51:57.857152
| 2017-02-16T06:11:12
| 2017-02-16T06:11:12
| 82,145,814
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 798
|
java
|
package com.test.shopping;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* Created by Alex on 15.02.2017.
*/
public class ShoppingCart {
private List<ShoppingItem> items = new ArrayList<>();
public void addItem( ShoppingItem item )
{
items.add( item );
}
public List<ShoppingItem> getItems()
{
return items;
}
public boolean deleteItem( String productName )
{
Iterator<ShoppingItem> iterator = items.iterator();
while( iterator.hasNext() )
{
ShoppingItem item = iterator.next();
if( item.product.equals( productName ) )
{
iterator.remove();
return true;
}
}
return false;
}
}
|
[
"timalex1206@gmail.com"
] |
timalex1206@gmail.com
|
06cffc6b1b6cde89d97cc839de2426cfd1250702
|
dedd8b238961dbb6889a864884e011ce152d1d5c
|
/src/com/google/android/gms/location/GeofencingRequest.java
|
8f119b904ca6d3202e37463f39b4b58bfc9d6365
|
[] |
no_license
|
reverseengineeringer/gov.cityofboston.commonwealthconnect
|
d553a8a7a4fcd7b846eebadb6c1e3e9294919eb7
|
1a829995d5527f4d5798fa578ca1b0fe499839e1
|
refs/heads/master
| 2021-01-10T05:08:31.188375
| 2016-03-19T20:37:17
| 2016-03-19T20:37:17
| 54,285,966
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,912
|
java
|
package com.google.android.gms.location;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.internal.jx;
import com.google.android.gms.internal.nn;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class GeofencingRequest
implements SafeParcelable
{
public static final Parcelable.Creator<GeofencingRequest> CREATOR = new a();
public static final int INITIAL_TRIGGER_DWELL = 4;
public static final int INITIAL_TRIGGER_ENTER = 1;
public static final int INITIAL_TRIGGER_EXIT = 2;
private final int CK;
private final List<nn> ago;
private final int agp;
GeofencingRequest(int paramInt1, List<nn> paramList, int paramInt2)
{
CK = paramInt1;
ago = paramList;
agp = paramInt2;
}
private GeofencingRequest(List<nn> paramList, int paramInt)
{
this(1, paramList, paramInt);
}
public int describeContents()
{
return 0;
}
public List<Geofence> getGeofences()
{
ArrayList localArrayList = new ArrayList();
localArrayList.addAll(ago);
return localArrayList;
}
public int getInitialTrigger()
{
return agp;
}
public int getVersionCode()
{
return CK;
}
public List<nn> ng()
{
return ago;
}
public void writeToParcel(Parcel paramParcel, int paramInt)
{
a.a(this, paramParcel, paramInt);
}
public static final class Builder
{
private final List<nn> ago = new ArrayList();
private int agp = 5;
public static int ew(int paramInt)
{
return paramInt & 0x7;
}
public Builder addGeofence(Geofence paramGeofence)
{
jx.b(paramGeofence, "geofence can't be null.");
jx.b(paramGeofence instanceof nn, "Geofence must be created using Geofence.Builder.");
ago.add((nn)paramGeofence);
return this;
}
public Builder addGeofences(List<Geofence> paramList)
{
if ((paramList == null) || (paramList.isEmpty())) {}
for (;;)
{
return this;
paramList = paramList.iterator();
while (paramList.hasNext())
{
Geofence localGeofence = (Geofence)paramList.next();
if (localGeofence != null) {
addGeofence(localGeofence);
}
}
}
}
public GeofencingRequest build()
{
if (!ago.isEmpty()) {}
for (boolean bool = true;; bool = false)
{
jx.b(bool, "No geofence has been added to this request.");
return new GeofencingRequest(ago, agp, null);
}
}
public Builder setInitialTrigger(int paramInt)
{
agp = ew(paramInt);
return this;
}
}
}
/* Location:
* Qualified Name: com.google.android.gms.location.GeofencingRequest
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
1294fe01aee8fa18783bfe6e254174268664e884
|
b54adddee8ce715a63a06211560625e3c78d0a90
|
/src/test/java/com/acmutv/ontoqa/benchmark/extra/QuestionE01Test.java
|
1a3a707df6d5b49fb9029e579bbf1450eeab839b
|
[
"MIT"
] |
permissive
|
walaa-elnozahy/ontoqa
|
774825addb5d2ad385ba058dc8fa5f053899b03a
|
b480b4f06419298e28c39b6b42c60515c3e20152
|
refs/heads/master
| 2020-06-25T04:51:39.819319
| 2017-05-17T12:42:20
| 2017-05-17T12:42:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,968
|
java
|
/*
The MIT License (MIT)
Copyright (c) 2016 Antonella Botte, Giacomo Marciani and Debora Partigianoni
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.acmutv.ontoqa.benchmark.extra;
import com.acmutv.ontoqa.benchmark.Common;
import com.acmutv.ontoqa.core.CoreController;
import com.acmutv.ontoqa.core.exception.OntoqaFatalException;
import com.acmutv.ontoqa.core.exception.QueryException;
import com.acmutv.ontoqa.core.exception.QuestionException;
import com.acmutv.ontoqa.core.grammar.CommonGrammar;
import com.acmutv.ontoqa.core.grammar.Grammar;
import com.acmutv.ontoqa.core.knowledge.answer.Answer;
import com.acmutv.ontoqa.core.knowledge.answer.SimpleAnswer;
import com.acmutv.ontoqa.core.knowledge.ontology.Ontology;
import com.acmutv.ontoqa.core.semantics.dudes.DudesTemplates;
import com.acmutv.ontoqa.core.semantics.sltag.SimpleSltag;
import com.acmutv.ontoqa.core.semantics.sltag.Sltag;
import com.acmutv.ontoqa.core.semantics.sltag.SltagBuilder;
import com.acmutv.ontoqa.core.syntax.ltag.LtagTemplates;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.jena.query.Query;
import org.apache.jena.query.QueryFactory;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import static com.acmutv.ontoqa.benchmark.Common.*;
/**
* JUnit tests for questions of class [CLASS EXTRA-01].
* `Is Satya Nadella the CEO of Microsoft?`
* @author Antonella Botte {@literal <abotte@acm.org>}
* @author Giacomo Marciani {@literal <gmarciani@acm.org>}
* @author Debora Partigianoni {@literal <dpartigianoni@acm.org>}
* @since 1.0
*/
public class QuestionE01Test {
private static final Logger LOGGER = LoggerFactory.getLogger(QuestionE01Test.class);
private static final String QUESTION = "Is Satya Nadella the CEO of Microsoft?";
private static final Answer ANSWER = new SimpleAnswer("true");
private static final String QUERY_1 = String.format("ASK\n" +
"WHERE\n" +
" { <%s>\n" +
" <%s> <%s>}\n", MICROSOFT_IRI, HAS_CEO_IRI, SATYA_NADELLA_IRI);
private static final String QUERY_2 = String.format("ASK\n" +
"WHERE\n" +
" { <%s>\n" +
" <%s> <%s>}\n", MICROSOFT_IRI, HAS_CEO_IRI, SATYA_NADELLA_IRI);
/**
* Tests the question-answering with parsing.
* @throws QuestionException when the question is malformed.
* @throws OntoqaFatalException when the question cannot be processed due to some fatal errors.
*/
@Test
public void test_nlp() throws Exception {
final Grammar grammar = Common.getGrammar();
final Ontology ontology = Common.getOntology();
final Pair<Query,Answer> result = CoreController.process(QUESTION, grammar, ontology);
final Query query = result.getKey();
final Answer answer = result.getValue();
LOGGER.info("Query: {}", query);
LOGGER.info("Answer: {}", answer);
Assert.assertEquals(QUERY_1, query.toString());
Assert.assertEquals(ANSWER, answer);
}
/**
* Tests the question-answering with parsing.
* @throws QuestionException when the question is malformed.
* @throws OntoqaFatalException when the question cannot be processed due to some fatal errors.
*/
@Test
public void test_nlp_wired() throws Exception {
final Grammar grammar = CommonGrammar.build_completeGrammar();
final Ontology ontology = Common.getOntology();
final Pair<Query,Answer> result = CoreController.process(QUESTION, grammar, ontology);
final Query query = result.getKey();
final Answer answer = result.getValue();
LOGGER.info("Query: {}", query);
LOGGER.info("Answer: {}", answer);
Assert.assertEquals(QUERY_2, query.toString());
Assert.assertEquals(ANSWER, answer);
}
/**
* Tests the question-answering with manual compilation of SLTAG.
* @throws QuestionException when question is malformed.
* @throws OntoqaFatalException when question cannot be processed due to some fatal errors.
*/
@Test
public void test_manual() throws Exception {
/* is */
Sltag is = new SimpleSltag(
LtagTemplates.copulaInterrogative("is", "1", "2"),
DudesTemplates.copulaInterrogative("1", "2"));
LOGGER.info("is:\n{}", is.toPrettyString());
/* Satya Nadella */
Sltag satya = new SimpleSltag(
LtagTemplates.properNoun("Satya Nadella"),
DudesTemplates.properNoun(SATYA_NADELLA_IRI));
LOGGER.info("Satya Nadella:\n{}", satya.toPrettyString());
/* the */
Sltag the = new SimpleSltag(
LtagTemplates.determiner("the", "np"),
DudesTemplates.determiner("np"));
LOGGER.info("the:\n{}", the.toPrettyString());
/* CEO of */
Sltag ceoOf = new SimpleSltag(
LtagTemplates.relationalPrepositionalNoun("CEO", "of", "company", false),
DudesTemplates.relationalNoun_bis(HAS_CEO_IRI, "company",false)
);
LOGGER.info("CEO of:\n{}", ceoOf.toPrettyString());
/* Microsoft */
Sltag microsoft = new SimpleSltag(
LtagTemplates.properNoun("Microsoft"),
DudesTemplates.properNoun(MICROSOFT_IRI));
LOGGER.info("Microsoft:\n{}", microsoft.toPrettyString());
/* is Satya Nadella */
LOGGER.info("is Satya Nadella: processing...");
Sltag isSatyaNadella = new SltagBuilder(is)
.substitution(satya, "1")
.build();
LOGGER.info("is Satya Nadella:\n{}", isSatyaNadella.toPrettyString());
/* the CEO of */
LOGGER.info("the CEO of: processing...");
Sltag theCEOOf = new SltagBuilder(the)
.substitution(ceoOf, "np")
.build();
LOGGER.info("the CEO of:\n{}", theCEOOf.toPrettyString());
/* the CEO of Microsoft */
LOGGER.info("the CEO of Microsoft:");
Sltag theCEOOfMicrosoft = new SltagBuilder(theCEOOf)
.substitution(microsoft, "company")
.build();
LOGGER.info("the CEO of Microsoft:\n{}", theCEOOfMicrosoft.toPrettyString());
/* is Satya Nadella the CEO of Microsoft */
LOGGER.info("is Satya Nadella the CEO of Microsoft: processing...");
Sltag isSatyaNadellaTheCEOOfMicrosoft = new SltagBuilder(isSatyaNadella)
.substitution(theCEOOfMicrosoft, "2")
.build();
LOGGER.info("is Satya Nadella the CEO of Microsoft:\n{}", isSatyaNadellaTheCEOOfMicrosoft.toPrettyString());
/* SPARQL */
LOGGER.info("SPARQL query: processing...");
Query query = isSatyaNadellaTheCEOOfMicrosoft.convertToSPARQL();
LOGGER.info("SPARQL query:\n{}", query);
Common.test_query(query, ANSWER);
}
/**
* Tests the ontology answering on raw SPARQL query submission.
*/
@Test
public void test_ontology() throws OntoqaFatalException, IOException, QueryException {
String sparql = String.format("ASK WHERE { <%s> <%s> <%s> }", MICROSOFT_IRI, HAS_CEO_IRI, SATYA_NADELLA_IRI);
Query query = QueryFactory.create(sparql);
LOGGER.debug("SPARQL query:\n{}", query);
Common.test_query(query, ANSWER);
}
}
|
[
"giacomo.marciani@gmail.com"
] |
giacomo.marciani@gmail.com
|
fe7fcc986bed07c803e922bd022a0009b9369053
|
673bcb929f538e311a535490992185a1c2eb89d7
|
/src/byCodeGame/game/navigation/Navigation.java
|
4c28f5ae33bad460968fa4fd45455bef538ee1ca
|
[] |
no_license
|
hackerlank/zjfGameServer
|
94658747632d008e15d2c6e663f384c9ecdae639
|
84a43be7b6c70b36a87137591bb131669b827e64
|
refs/heads/master
| 2020-03-12T06:23:42.726577
| 2016-05-22T15:58:03
| 2016-05-22T15:58:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,521
|
java
|
package byCodeGame.game.navigation;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import byCodeGame.game.module.market.action.MarketBuyGoodsAction;
import byCodeGame.game.module.market.action.MarketShowGoodsAction;
import byCodeGame.game.module.register.action.RegisterAction;
/**
* 通信指令导航
*
*/
public class Navigation {
// 登录
private static RegisterAction registerAction;
// 商城
private static MarketShowGoodsAction marketShowGoodsAction;
private static MarketBuyGoodsAction marketBuyGoodsAction;
// 导航集合
public static Map<Short, ActionSupport> navigate = new ConcurrentHashMap<Short, ActionSupport>();
// 初始化导航
public static void init() {
// 注册与登陆
navigate.put(NavigationModule.REGISTER_ACTION, registerAction);
// 商城
navigate.put(NavigationModule.MARKET_SHOW_GOODS, marketShowGoodsAction);
navigate.put(NavigationModule.MARKET_BUY_GOODS, marketBuyGoodsAction);
}
// 根据消息头获取导航
public static ActionSupport getAction(short type) {
return navigate.get(type);
}
public static void setRegisterAction(RegisterAction registerAction) {
Navigation.registerAction = registerAction;
}
public static void setMarketBuyGoodsAction(MarketBuyGoodsAction marketBuyGoodsAction) {
Navigation.marketBuyGoodsAction = marketBuyGoodsAction;
}
public static void setMarketShowGoodsAction(MarketShowGoodsAction marketShowGoodsAction) {
Navigation.marketShowGoodsAction = marketShowGoodsAction;
}
}
|
[
"1101697681@qq.com"
] |
1101697681@qq.com
|
2637303161999e1945db0f8ea244e5a6bcfac7fe
|
7c9b43b1ce640e0522a0fe34b7901a61684ea6e4
|
/src/test/java/com/pholser/dulynoted/AnnotatedPathFromClassToClassHierarchyTest.java
|
6984b4c08ae0083305313503f59411e2cfbe35a2
|
[] |
no_license
|
pholser/duly-noted
|
b81529a3908f37b294f2aa8d63c3a299e0dd8522
|
82b142c9cd80d0f3df1703a2a7d69813363a1e79
|
refs/heads/master
| 2023-04-09T20:46:02.930881
| 2021-04-09T01:30:08
| 2021-04-09T01:30:08
| 114,586,595
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,927
|
java
|
package com.pholser.dulynoted;
import com.pholser.dulynoted.annotated.AnnotationsGalore;
import com.pholser.dulynoted.annotations.Iota;
import org.junit.jupiter.api.Test;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.util.List;
import static com.pholser.dulynoted.Presences.ASSOCIATED;
import static com.pholser.dulynoted.Presences.DIRECT;
import static com.pholser.dulynoted.Presences.DIRECT_OR_INDIRECT;
import static com.pholser.dulynoted.Presences.PRESENT;
import static com.pholser.dulynoted.annotations.Annotations.annoValue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;
class AnnotatedPathFromClassToClassHierarchyTest {
@Test void findFirstDirectFromClassThruDepthHierarchy() {
AnnotatedPath path =
AnnotatedPath.fromClass(AnnotationsGalore.class)
.toDepthHierarchy()
.build();
Iota i =
path.findFirst(Iota.class, DIRECT)
.orElseGet(() -> fail("Missing annotation"));
assertEquals(3, i.value());
}
@Test void findAllByTypeDirectIndirectFromClassThruDepthHierarchy() {
AnnotatedPath path =
AnnotatedPath.fromClass(AnnotationsGalore.class)
.toDepthHierarchy()
.build();
List<Iota> iotas = path.findAll(Iota.class, DIRECT_OR_INDIRECT);
assertEquals(
List.of(
annoValue(Iota.class, 3),
annoValue(Iota.class, -10),
annoValue(Iota.class, -11),
annoValue(Iota.class, -12),
annoValue(Iota.class, -13),
annoValue(Iota.class, -14),
annoValue(Iota.class, -15),
annoValue(Iota.class, -16),
annoValue(Iota.class, -17)),
iotas);
}
@Test void findAllByTypeDirectIndirectFromClassThruBreadthHierarchy() {
AnnotatedPath path =
AnnotatedPath.fromClass(AnnotationsGalore.class)
.toBreadthHierarchy()
.build();
List<Iota> iotas = path.findAll(Iota.class, DIRECT_OR_INDIRECT);
assertEquals(
List.of(
annoValue(Iota.class, 3),
annoValue(Iota.class, -10),
annoValue(Iota.class, -14),
annoValue(Iota.class, -12),
annoValue(Iota.class, -11),
annoValue(Iota.class, -16),
annoValue(Iota.class, -15),
annoValue(Iota.class, -13),
annoValue(Iota.class, -17)),
iotas);
}
@Test void findFirstOnEmptyHierarchy() {
AnnotatedPath path =
AnnotatedPath.fromClass(Object.class)
.toClassEnclosure()
.build();
path.findFirst(Documented.class, PRESENT)
.ifPresent(d -> fail("Should not have found " + d));
}
@Test void findAllOnEmptyHierarchy() {
AnnotatedPath path =
AnnotatedPath.fromClass(Object.class)
.toClassEnclosure()
.build();
List<Retention> retentions =
path.findAll(Retention.class, ASSOCIATED);
assertEquals(List.of(), retentions);
}
}
|
[
"pholser@alumni.rice.edu"
] |
pholser@alumni.rice.edu
|
4726ccc2a97207006ec4bf5b1d623018c1a4297d
|
652f4628ed4f0e975dc4a3f3aba13c3841e71765
|
/java/java-web-ee/ejb-livraria/src/main/java/br/com/caelum/livraria/modelo/Autor.java
|
71957929f53042895fc23180ac6d32c4bc05ae39
|
[
"Apache-2.0"
] |
permissive
|
wesleyegberto/courses-projects
|
f71700c0d55a41fb0421af0b1ed4b2977a1e43cd
|
e64fca6121cc26e97bfb2abed6b1bce105f5d8bb
|
refs/heads/master
| 2022-07-07T15:58:52.247117
| 2022-06-26T00:38:19
| 2022-06-26T00:38:19
| 70,363,527
| 1
| 0
|
Apache-2.0
| 2020-09-29T19:57:20
| 2016-10-08T23:43:46
|
TypeScript
|
UTF-8
|
Java
| false
| false
| 716
|
java
|
package br.com.caelum.livraria.modelo;
import javax.persistence.Cacheable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
@Cacheable(true) // cachear toda a entity (não só o ID)
public class Autor {
@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
private Integer id;
private String nome;
public Autor() {
}
public Autor(Integer id, String nome) {
this.id = id;
this.nome = nome;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
}
|
[
"wesleyegberto@gmail.com"
] |
wesleyegberto@gmail.com
|
b281de39abb5f15b02cae15c246e6d481129c85a
|
0aff735c9a49ccf9c004ea07e94cd60f911c8338
|
/net/minecraft/block/BlockOldLog.java
|
8ffb539eca49d1d8a7b852987e14e583c9ea640e
|
[] |
no_license
|
a3535ed54a5ee6917a46cfa6c3f12679/a775b0d7_phenix_mc_InDev
|
00be6df18da5ce388ba49d8c275ef664453e7bd8
|
9581b9fcf37b967a438ea7cfe1c58720268fd134
|
refs/heads/master
| 2021-09-06T10:02:23.512201
| 2018-02-05T08:50:24
| 2018-02-05T08:50:24
| 120,032,615
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,380
|
java
|
package net.minecraft.block;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class BlockOldLog extends BlockLog
{
public static final String[] field_150168_M = new String[] {"oak", "spruce", "birch", "jungle"};
private static final String __OBFID = "CL_00000281";
public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_)
{
p_149666_3_.add(new ItemStack(p_149666_1_, 1, 0));
p_149666_3_.add(new ItemStack(p_149666_1_, 1, 1));
p_149666_3_.add(new ItemStack(p_149666_1_, 1, 2));
p_149666_3_.add(new ItemStack(p_149666_1_, 1, 3));
}
public void registerBlockIcons(IIconRegister p_149651_1_)
{
this.field_150167_a = new IIcon[field_150168_M.length];
this.field_150166_b = new IIcon[field_150168_M.length];
for (int var2 = 0; var2 < this.field_150167_a.length; ++var2)
{
this.field_150167_a[var2] = p_149651_1_.registerIcon(this.getTextureName() + "_" + field_150168_M[var2]);
this.field_150166_b[var2] = p_149651_1_.registerIcon(this.getTextureName() + "_" + field_150168_M[var2] + "_top");
}
}
}
|
[
"unknowlk@tuta.io"
] |
unknowlk@tuta.io
|
ec5ea34438434f7054ccdc8af5164f3cce12decc
|
5598faaaaa6b3d1d8502cbdaca903f9037d99600
|
/code_changes/Apache_projects/YARN-63/a3f0bea238af069d035d7631d7949111ae360446/TestSliderTestUtils.java
|
a6e7db800eb64b4fc0f17da3eddce8712e5113eb
|
[] |
no_license
|
SPEAR-SE/LogInBugReportsEmpirical_Data
|
94d1178346b4624ebe90cf515702fac86f8e2672
|
ab9603c66899b48b0b86bdf63ae7f7a604212b29
|
refs/heads/master
| 2022-12-18T02:07:18.084659
| 2020-09-09T16:49:34
| 2020-09-09T16:49:34
| 286,338,252
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,707
|
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.slider.common.tools;
import org.apache.hadoop.conf.Configuration;
import org.apache.slider.utils.SliderTestUtils;
import org.junit.Test;
import org.junit.internal.AssumptionViolatedException;
/**
* Test slider test utils.
*/
public class TestSliderTestUtils extends SliderTestUtils {
@Test
public void testAssumeTrue() throws Throwable {
try {
assume(true, "true");
} catch (AssumptionViolatedException e) {
throw new Exception(e);
}
}
@Test
public void testAssumeFalse() throws Throwable {
try {
assume(false, "false");
fail("expected an exception");
} catch (AssumptionViolatedException ignored) {
//expected
}
}
@Test
public void testAssumeBoolOptionSetInConf() throws Throwable {
Configuration conf = new Configuration(false);
conf.set("key", "true");
try {
assumeBoolOption(conf, "key", false);
} catch (AssumptionViolatedException e) {
throw new Exception(e);
}
}
@Test
public void testAssumeBoolOptionUnsetInConf() throws Throwable {
Configuration conf = new Configuration(false);
try {
assumeBoolOption(conf, "key", true);
} catch (AssumptionViolatedException e) {
throw new Exception(e);
}
}
@Test
public void testAssumeBoolOptionFalseInConf() throws Throwable {
Configuration conf = new Configuration(false);
conf.set("key", "false");
try {
assumeBoolOption(conf, "key", true);
fail("expected an exception");
} catch (AssumptionViolatedException ignored) {
//expected
}
}
@Test
public void testAssumeBoolOptionFalseUnsetInConf() throws Throwable {
Configuration conf = new Configuration(false);
try {
assumeBoolOption(conf, "key", false);
fail("expected an exception");
} catch (AssumptionViolatedException ignored) {
//expected
}
}
}
|
[
"archen94@gmail.com"
] |
archen94@gmail.com
|
9db3d1d3081e7c828791beded624e80082318f52
|
54d2f3c7b2723c1f866f7adf23456b5e6d9eb050
|
/plugins/org.jboss.tools.fuse.reddeer/src/org/jboss/tools/fuse/reddeer/utils/TransformationDragAndDropManager.java
|
9145f7b0e81e095e480e6ceabd43649bba79057e
|
[] |
no_license
|
asmigala/jbosstools-integration-stack-tests
|
d9eb14f42a4d16f5285e7d52552721d6acae0a01
|
e19aced8d415bd8e15c1a30bd4f910da25341d88
|
refs/heads/master
| 2021-01-22T18:28:31.697420
| 2015-07-31T06:27:12
| 2015-07-31T06:27:12
| 26,013,904
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,792
|
java
|
package org.jboss.tools.fuse.reddeer.utils;
import java.awt.AWTException;
import java.awt.Point;
import java.awt.Robot;
import java.awt.event.InputEvent;
import org.eclipse.swt.widgets.Composite;
import org.jboss.reddeer.common.logging.Logger;
import org.jboss.reddeer.swt.api.TableItem;
import org.jboss.reddeer.swt.api.TreeItem;
import org.jboss.reddeer.swt.impl.table.DefaultTableItem;
import org.jboss.reddeer.swt.impl.tree.DefaultTree;
import org.jboss.reddeer.swt.impl.tree.DefaultTreeItem;
import org.jboss.reddeer.swt.util.Display;
import org.jboss.reddeer.swt.util.ResultRunnable;
import org.jboss.reddeer.swt.wait.AbstractWait;
import org.jboss.reddeer.swt.wait.TimePeriod;
import org.jboss.reddeer.swt.widgets.Widget;
/**
* Utilizes Drag&Drop items in Data Transformation Editor to create a transformation
*
* @author tsedmik
*/
public class TransformationDragAndDropManager {
private Logger log = Logger.getLogger(TransformationDragAndDropManager.class);
/**
* Performs Drag&Drop operations via AWT Robot
*/
public void performDragAndDrop(String[] from, String[] to) {
final Point fromCoords = getCoords(getFromTreeItem(from));
final Point toCoords = getCoords(getToTreeItem(to));
doDragAndDrop(fromCoords, toCoords);
}
public void performVariableDragAndDrop(String from, String[] to) {
final Point fromCoords = getCoords(getFromTableItem(from));
final Point toCoords = getCoords(getToTreeItemVariable(to));
doDragAndDrop(fromCoords, toCoords);
}
private TreeItem getFromTreeItem(String[] from) {
log.debug("Tries to access 'From' item: " + from);
return new DefaultTreeItem(new DefaultTree(0), from);
}
private TreeItem getToTreeItem(String[] to) {
log.debug("Tries to access 'To' item: " + to);
boolean isFound = false;
for (TreeItem item : new DefaultTree(1).getAllItems()) {
if (isFound) {
item.select();
break;
}
if (item.getText().equals(to[to.length - 1])) {
isFound = true;
continue;
}
}
return new DefaultTreeItem(new DefaultTree(1), to);
}
private TreeItem getToTreeItemVariable(String[] to) {
log.debug("Tries to access 'To' item: " + to);
boolean isFound = false;
for (TreeItem item : new DefaultTree().getAllItems()) {
if (isFound) {
item.select();
break;
}
if (item.getText().equals(to[to.length - 1])) {
isFound = true;
continue;
}
}
return new DefaultTreeItem(new DefaultTree(), to);
}
private TableItem getFromTableItem(String name) {
return new DefaultTableItem(name);
}
private Point getCoords(Widget item) {
if (item instanceof TreeItem) {
TreeItem temp = (TreeItem) item;
temp.select();
final org.eclipse.swt.widgets.TreeItem widget = temp.getSWTWidget();
return Display.syncExec(new ResultRunnable<Point>() {
@Override
public Point run() {
int x = widget.getBounds().x;
int y = widget.getBounds().y;
Composite parent = widget.getParent();
x += parent.toDisplay(1, 1).x;
y += parent.toDisplay(1, 1).y;
return new Point(x + 10, y + 10);
}
});
} else {
TableItem temp = (TableItem) item;
temp.select();
final org.eclipse.swt.widgets.TableItem widget = temp.getSWTWidget();
return Display.syncExec(new ResultRunnable<Point>() {
@Override
public Point run() {
int x = widget.getBounds().x;
int y = widget.getBounds().y;
Composite parent = widget.getParent();
x += parent.toDisplay(1, 1).x;
y += parent.toDisplay(1, 1).y;
return new Point(x + 10, y + 10);
}
});
}
}
private void doDragAndDrop(final Point fromCoords, final Point toCoords) {
Display.syncExec(new Runnable() {
@Override
public void run() {
Robot robot;
try {
robot = new Robot();
robot.mouseMove(fromCoords.x, fromCoords.y);
robot.mousePress(InputEvent.BUTTON1_MASK);
int i = fromCoords.y;
if (fromCoords.y > toCoords.y) {
while (i > toCoords.y) {
i -= 1;
robot.mouseMove(fromCoords.x + 10, i);
}
} else {
while (i < toCoords.y) {
i += 1;
robot.mouseMove(fromCoords.x + 10, i);
}
}
i = fromCoords.x + 10;
while (i < toCoords.x) {
i += 1;
robot.mouseMove(i, toCoords.y);
}
robot.delay(1000);
} catch (AWTException e) {
log.error("Error during AWT Robot manipulation");
}
}
});
AbstractWait.sleep(TimePeriod.getCustom(3));
Display.syncExec(new Runnable() {
@Override
public void run() {
Robot robot;
try {
robot = new Robot();
robot.mouseMove(toCoords.x, toCoords.y);
robot.delay(2000);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
} catch (AWTException e) {
log.error("Error during AWT Robot manipulation");
}
}
});
}
}
|
[
"apodhrad@redhat.com"
] |
apodhrad@redhat.com
|
127dd45f0a6d2ae7d947c3f89f3bf66e3730360a
|
9f763caaa6ce779360df8118d986a8995bfbf669
|
/modules/core/src/com/vk/api/sdk/objects/newsfeed/List.java
|
3a2ad489568dd9c04d9815c2a03ec4dbf5e96673
|
[] |
no_license
|
SevDan/blacklist
|
4ac82e9bee5e69387c29fefe1c81e900ba87a8df
|
62a5512cc3c888457dea0adfa1e4919d9d4486f0
|
refs/heads/master
| 2023-03-14T09:49:22.008922
| 2021-03-06T12:54:56
| 2021-03-06T12:54:56
| 203,603,711
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,562
|
java
|
package com.vk.api.sdk.objects.newsfeed;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.vk.api.sdk.objects.Validable;
import com.vk.api.sdk.objects.annotations.Required;
import java.util.Objects;
/**
* List object
*/
public class List implements Validable {
/**
* List ID
*/
@SerializedName("id")
@Required
private Integer id;
/**
* List title
*/
@SerializedName("title")
@Required
private String title;
public Integer getId() {
return id;
}
public List setId(Integer id) {
this.id = id;
return this;
}
public String getTitle() {
return title;
}
public List setTitle(String title) {
this.title = title;
return this;
}
@Override
public int hashCode() {
return Objects.hash(id, title);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
List list = (List) o;
return Objects.equals(id, list.id) &&
Objects.equals(title, list.title);
}
@Override
public String toString() {
final Gson gson = new Gson();
return gson.toJson(this);
}
public String toPrettyString() {
final StringBuilder sb = new StringBuilder("List{");
sb.append("id=").append(id);
sb.append(", title='").append(title).append("'");
sb.append('}');
return sb.toString();
}
}
|
[
"danielsevostyanov@gmail.com"
] |
danielsevostyanov@gmail.com
|
06548b5d7d107242c1263a69ab3c07771fc6ad8f
|
d593a680a99c890f8dadf0438892a1ed60f20d95
|
/src/main/java/io/mybatis/demo/service/UserService.java
|
39dd9fe00add5b4907024a8bec6b7f1e43daf404
|
[] |
no_license
|
abel533/mapper-move-spring-boot
|
f28558c47ffd2df69b3cfdcc87b61631c0bd9d41
|
4a842e728394f6931bf4fdedadfb7f27fd358b5a
|
refs/heads/master
| 2023-03-11T22:11:46.262923
| 2020-03-16T14:43:09
| 2020-03-16T14:43:09
| 247,243,340
| 7
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 471
|
java
|
package io.mybatis.demo.service;
import io.mybatis.demo.model.User;
import java.util.List;
public interface UserService {
/**
* 获取所有
*
* @return
*/
List<User> getAll();
/**
* 移动节点顺序
*
* @param movingId 移动的 id
* @param targetId 目标 id
* @param isBefore 目标节点的上方true or 下面false
* @return
*/
int move(Long movingId, Long targetId, boolean isBefore);
}
|
[
"abel533@gmail.com"
] |
abel533@gmail.com
|
836056198c794cb2e8e30f8a8f5671b56bc64c88
|
fb66e4a8940bd183b09848c82d9905f4e06f12ad
|
/src/main/java/com/pos/daoImpl/SalesInvoiceDaoImpl.java
|
6d0bcff9aae942ddaa834a1365abb029311d8d84
|
[] |
no_license
|
bd-mahfuz/pos-spring-boot
|
e38cb0248246c631819a3a7ff9821c882cb13448
|
af04e05e85e3501b25835e7f5ea5204b2946b2de
|
refs/heads/master
| 2020-03-14T15:49:10.577446
| 2019-01-21T16:46:03
| 2019-01-21T16:46:03
| 131,684,669
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,717
|
java
|
package com.pos.daoImpl;
import com.pos.dao.SalesInvoiceDao;
import com.pos.dto.Purchase;
import com.pos.dto.SalesInvoice;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import javax.transaction.Transactional;
import java.util.List;
@Repository("salesInvoiceDao")
@Transactional
public class SalesInvoiceDaoImpl implements SalesInvoiceDao{
@Autowired
SessionFactory sessionFactory;
@Override
public boolean add(SalesInvoice salesInvoice) {
salesInvoice.setSerialNo(getAll().size() + 1);
try {
sessionFactory.getCurrentSession().persist(salesInvoice);
return true;
}catch (Exception e) {
e.printStackTrace();
return false;
}
}
@Override
public boolean update(SalesInvoice salesInvoice) {
try {
sessionFactory.getCurrentSession().update(salesInvoice);
return true;
}catch (Exception e) {
e.printStackTrace();
return false;
}
}
@Override
public boolean delete(int id) {
try {
sessionFactory.getCurrentSession()
.createQuery("delete from SalesInvoice where id=:id")
.setParameter("id", id)
.executeUpdate();
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
@Override
public List<SalesInvoice> getAll() {
try {
return sessionFactory.getCurrentSession()
.createQuery("from SalesInvoice")
.list();
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
@Override
public SalesInvoice get(int id) {
try {
return sessionFactory.getCurrentSession().get(SalesInvoice.class, id);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
@Override
public SalesInvoice getSalesInvoiceByInvoiceNo(int sellInvoiceNo) {
String hql = "from SalesInvoice where sellInvoice = :sellInvoice";
try {
List<SalesInvoice> salesInvoices = sessionFactory.getCurrentSession().createQuery(hql)
.setParameter("sellInvoice", sellInvoiceNo)
.list();
if (salesInvoices.size() > 0) {
return salesInvoices.get(0);
} else {
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}
|
[
"bt23.mahfuz@gmail.com"
] |
bt23.mahfuz@gmail.com
|
f5367ac40f610441abaa021b4bc95e64f7ccf6a1
|
5ed62f088f324352bd878f58788ebeb0ffe5cd2a
|
/src/test/java/org/assertj/core/api/UrlAssertBaseTest.java
|
39b6556e0b3e2b1db2e1d6b34dcbf3c436354a70
|
[
"Apache-2.0"
] |
permissive
|
jstrachan/assertj-core
|
85f7355f8d41c5dfb6c27f0bbe8d576fa4042273
|
ac9e201c22c1a7132005bbb9e728ef0bfe2c89cc
|
refs/heads/master
| 2020-12-31T07:19:04.828438
| 2016-04-09T22:15:20
| 2016-04-09T22:15:20
| 56,042,912
| 0
| 1
| null | 2016-04-12T07:58:10
| 2016-04-12T07:58:09
| null |
UTF-8
|
Java
| false
| false
| 1,318
|
java
|
/**
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Copyright 2012-2016 the original author or authors.
*/
package org.assertj.core.api;
import static org.mockito.Mockito.mock;
import java.net.MalformedURLException;
import java.net.URL;
import org.assertj.core.internal.Urls;
/**
* Base class for {@link UrlAssert} tests.
*/
public abstract class UrlAssertBaseTest extends BaseTestTemplate<UrlAssert, URL> {
protected Urls urls;
@Override
protected UrlAssert create_assertions() {
try {
return new UrlAssert(new URL("http://example.com/pages/"));
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
@Override
protected void inject_internal_objects() {
super.inject_internal_objects();
urls = mock(Urls.class);
assertions.urls = urls;
}
}
|
[
"joel.costigliola@gmail.com"
] |
joel.costigliola@gmail.com
|
91d534c643c984ecf982d072eb204ed051166eac
|
e680d302ffbd9046606f8c4b5c1b9a9e64148b0c
|
/springrestdemo/src/main/java/com/webstack/springrestdemo/service/ProductService.java
|
6078f6940d304df666c2fe7d3d8ef312d9f559f8
|
[] |
no_license
|
keyur2714/SpringBoot
|
0c66680fff5a7ee6acaf8e5c6e2f918ec75c7cff
|
12f103c57d03cd3aad38c297ac2661e0fdad6d2a
|
refs/heads/master
| 2023-01-04T09:37:05.418692
| 2020-11-03T04:57:19
| 2020-11-03T04:57:19
| 269,909,721
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 245
|
java
|
package com.webstack.springrestdemo.service;
import java.util.List;
import com.webstack.springrestdemo.dto.ProductDTO;
public interface ProductService extends IService<ProductDTO>{
List<ProductDTO> getProductByName(String productName);
}
|
[
"keyur.555kn@gmail.com"
] |
keyur.555kn@gmail.com
|
7b497a4788850f6a97a7f2f4b77479b7c08b231a
|
4ac51f07e5e4d5da395caa5cc8c3516923ef3012
|
/taverna-reference-api/src/main/java/net/sf/taverna/t2/reference/IdentifiedList.java
|
032906fb6aa7fb22a6035829d7cbf1a177d016dd
|
[] |
no_license
|
taverna-incubator/incubator-taverna-engine
|
eb2b5d2c956982696e06b9404c6b94a2346417fe
|
1eca6315f88bfd19672114e3f3b574246a2994a5
|
refs/heads/master
| 2021-01-01T18:11:06.502122
| 2015-02-21T23:43:42
| 2015-02-21T23:43:42
| 28,545,860
| 0
| 1
| null | 2015-02-04T15:45:25
| 2014-12-27T20:40:19
|
Java
|
UTF-8
|
Java
| false
| false
| 2,146
|
java
|
/*******************************************************************************
* Copyright (C) 2007 The University of Manchester
*
* Modifications to the initial code base are copyright of their
* respective authors, or their employers as appropriate.
*
* This program 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 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser 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
******************************************************************************/
package net.sf.taverna.t2.reference;
import java.util.List;
/**
* An identified list is a list which is identified by a T2Reference. Lists are
* immutable once named - if getId() returns a non null value all list methods
* modifying the underlying list data will throw {@link IllegalStateException}.
* In the reference management API this list sub-interface is used to represent
* both collections of identifiers (i.e. 'raw' stored lists) and more fully
* resolved structures where the types in the list can be reference sets, error
* documents and other lists of such. The {@link ListDao} interface uses only
* the 'raw' form consisting of flat lists of identifiers.
* <p>
* The IdentifiedList has a unique T2Reference associated with it. If this is
* null the contents of the list may be modified, otherwise all modification
* operations throw {@link IllegalStateException}. Lists in T2, once named, are
* immutable.
*
* @author Tom Oinn
*
* @param <T>
*/
public interface IdentifiedList<T> extends List<T>, Identified {
}
|
[
"stain@apache.org"
] |
stain@apache.org
|
3ec28881fb21291fd26c3d64930c5322171c077f
|
8d9293642d3c12f81cc5f930e0147a9d65bd6efb
|
/src/main/java/net/minecraft/world/level/block/PoweredBlock.java
|
313703a421f1430a31cdd31d8f6862e80e1a803c
|
[] |
no_license
|
NicholasBlackburn1/Blackburn-1.17
|
7c086591ac77cf433af248435026cf9275223daa
|
fd960b995b33df75ce61865ba119274d9b0e4704
|
refs/heads/main
| 2022-07-28T03:27:14.736924
| 2021-09-23T15:55:53
| 2021-09-23T15:55:53
| 399,960,376
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 624
|
java
|
package net.minecraft.world.level.block;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
public class PoweredBlock extends Block {
public PoweredBlock(BlockBehaviour.Properties p_55206_) {
super(p_55206_);
}
public boolean isSignalSource(BlockState p_55213_) {
return true;
}
public int getSignal(BlockState p_55208_, BlockGetter p_55209_, BlockPos p_55210_, Direction p_55211_) {
return 15;
}
}
|
[
"nickblackburn02@gmail.com"
] |
nickblackburn02@gmail.com
|
fa26cef8d64b276adc5b4574119ecc8d5c52be8b
|
b0d8d01f5c5e33b68a6091b520e3fbb28d4abdfd
|
/src/com/xkcoding/idea/plugins/yapi_helper/yapi/model/YApiGlobal.java
|
513ff6762703c99d5da7a33cafb128ca58c4b332
|
[] |
no_license
|
zhangyd-c/yapi-helper
|
344d68ba7da7980be592e9d05470649b721ebb10
|
64dad6eecf1d0a96f00bb8f46a2f8c30219abde3
|
refs/heads/main
| 2023-04-18T07:07:39.635129
| 2021-04-25T06:57:48
| 2021-04-25T06:57:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 316
|
java
|
package com.xkcoding.idea.plugins.yapi_helper.yapi.model;
import lombok.Data;
import java.io.Serializable;
@Data
public class YApiGlobal implements Serializable {
private static final long serialVersionUID = 6928390299424588771L;
private String _id;
private String name;
private String value;
}
|
[
"237497819@qq.com"
] |
237497819@qq.com
|
d705ceb69053d5c54c684c657cc35b198413d6bc
|
e977c424543422f49a25695665eb85bfc0700784
|
/benchmark/icse15/1062952/buggy-version/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
|
5b749938b9b408f02d0f4c71f5c30ffc600a42bd
|
[] |
no_license
|
amir9979/pattern-detector-experiment
|
17fcb8934cef379fb96002450d11fac62e002dd3
|
db67691e536e1550245e76d7d1c8dced181df496
|
refs/heads/master
| 2022-02-18T10:24:32.235975
| 2019-09-13T15:42:55
| 2019-09-13T15:42:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,629
|
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.cassandra.utils;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicLongArray;
import org.apache.cassandra.io.ICompactSerializer;
public class EstimatedHistogram
{
/**
* The series of values to which the counts in `buckets` correspond:
* 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 15, 18, 22, etc.
* Thus, a `buckets` of [0, 0, 1, 10] would mean we had seen one value of 3 and 10 values of 4.
*
* The series starts at 1 and grows by 1.2 each time (rounding and removing duplicates). It goes from 1
* to around 36M by default (creating 90+1 buckets), which will give us timing resolution from microseconds to
* 36 seconds, with less precision as the numbers get larger.
*/
private long[] bucketOffsets;
private int numBuckets;
final AtomicLongArray buckets;
public static EstimatedHistogramSerializer serializer = new EstimatedHistogramSerializer();
public EstimatedHistogram()
{
this(90);
}
public EstimatedHistogram(int bucketCount)
{
makeOffsets(bucketCount);
buckets = new AtomicLongArray(numBuckets);
}
public EstimatedHistogram(long[] bucketData)
{
makeOffsets(bucketData.length - 1);
buckets = new AtomicLongArray(bucketData);
}
public EstimatedHistogram(long[] offsets, long[] bucketData)
{
assert bucketData.length == offsets.length +1;
bucketOffsets = offsets;
buckets = new AtomicLongArray(bucketData);
numBuckets = bucketData.length;
}
private void makeOffsets(int size)
{
bucketOffsets = new long[size];
long last = 1;
bucketOffsets[0] = last;
for(int i = 1; i < size; i++)
{
long next = Math.round(last * 1.2);
if (next == last)
next++;
bucketOffsets[i] = next;
last = next;
}
numBuckets = bucketOffsets.length + 1;
}
public long[] getBucketOffsets()
{
return bucketOffsets;
}
public void add(long n)
{
int index = Arrays.binarySearch(bucketOffsets, n);
if (index < 0)
{
//inexact match, find closest bucket
index = -index - 1;
}
else
{
//exact match, so we want the next highest one
index += 1;
}
buckets.incrementAndGet(index);
}
public long[] get(boolean reset)
{
long[] rv = new long[numBuckets];
for (int i = 0; i < numBuckets; i++)
rv[i] = buckets.get(i);
if (reset)
for (int i = 0; i < numBuckets; i++)
buckets.set(i, 0L);
return rv;
}
public long min()
{
for (int i = 0; i < numBuckets; i++)
{
if (buckets.get(i) > 0)
return bucketOffsets[i == 0 ? 0 : i - 1];
}
return 0;
}
public long max()
{
int lastBucket = numBuckets - 1;
if (buckets.get(lastBucket) > 0)
throw new IllegalStateException("Unable to compute ceiling for max when all buckets are full");
for (int i = lastBucket - 1; i >= 0; i--)
{
if (buckets.get(i) > 0)
return bucketOffsets[i];
}
return 0;
}
public long median()
{
long max = 0;
long median = 0;
for (int i = 0; i < numBuckets; i++)
{
if (max < 1 || buckets.get(i) > max)
{
max = buckets.get(i);
if (max > 0)
median = bucketOffsets[i == 0 ? 0 : i - 1];
}
}
return median;
}
public static class EstimatedHistogramSerializer implements ICompactSerializer<EstimatedHistogram>
{
public void serialize(EstimatedHistogram eh, DataOutputStream dos) throws IOException
{
long[] offsets = eh.getBucketOffsets();
long[] buckets = eh.get(false);
dos.writeInt(buckets.length);
for (int i = 0; i < buckets.length; i++)
{
dos.writeLong(offsets[i == 0 ? 0 : i - 1]);
dos.writeLong(buckets[i]);
}
}
public EstimatedHistogram deserialize(DataInputStream dis) throws IOException
{
int size = dis.readInt();
long[] offsets = new long[size - 1];
long[] buckets = new long[size];
for (int i = 0; i < size; i++) {
offsets[i == 0 ? 0 : i - 1] = dis.readLong();
buckets[i] = dis.readLong();
}
return new EstimatedHistogram(offsets, buckets);
}
}
}
|
[
"durieuxthomas@hotmail.com"
] |
durieuxthomas@hotmail.com
|
fb5dd1c4c4a415e9b9a4e8f8a2e193e9b01dccbb
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/inspections/quickfix/ConvertToGrayQuickFixTest.java
|
73968f055be0356c9ded97cebfdf3bf0920f819f
|
[
"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
| 1,291
|
java
|
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.idea.devkit.inspections.quickfix;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.idea.devkit.DevkitJavaTestsUtil;
@TestDataPath("$CONTENT_ROOT/testData/inspections/useGrayFix")
public class ConvertToGrayQuickFixTest extends ConvertToGrayQuickFixTestBase {
@Override
protected String getBasePath() {
return DevkitJavaTestsUtil.TESTDATA_PATH + "inspections/useGrayFix";
}
@Override
protected @NotNull String getFileExtension() {
return "java";
}
public void testUseGrayConstantFixInConstant() {
doTest(CONVERT_TO_GRAY_FIX_NAME_PATTERN.formatted(125));
}
public void testUseGrayConstantFixInLocalVariable() {
doTest(CONVERT_TO_GRAY_FIX_NAME_PATTERN.formatted(25));
}
public void testUseGrayConstantFixInMethodParam() {
doTest(CONVERT_TO_GRAY_FIX_NAME_PATTERN.formatted(125));
}
public void testUseGrayConstantFixInJBColorParam() {
doTest(CONVERT_TO_GRAY_FIX_NAME_PATTERN.formatted(25));
}
public void testUseGrayConstantFixWhenNumberConstantsReferenced() {
doTest(CONVERT_TO_GRAY_FIX_NAME_PATTERN.formatted(125));
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
e5bf85d15b28a6e773ca30c71abb0fb60bdb9900
|
1c17d8626bb77a51010bdcc19dd9307ebc5cbaa5
|
/handypoi-excel/src/test/java/cn/com/bluemoon/handypoi/excel/example/MultiHeadExampleBean.java
|
8fc849b9ae8a437b18bd89ffafacb7ceac8811af
|
[
"Apache-2.0"
] |
permissive
|
jufeng98/java-master
|
299257f04fba29110fe72d124c63595b8c955af9
|
a1fc18a6af52762ae90f78e0181073f2a95d454a
|
refs/heads/master
| 2023-07-24T01:42:27.140862
| 2023-07-09T03:01:07
| 2023-07-09T03:01:07
| 191,107,543
| 123
| 65
|
Apache-2.0
| 2022-12-16T04:38:20
| 2019-06-10T06:10:04
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,626
|
java
|
package cn.com.bluemoon.handypoi.excel.example;
import cn.com.bluemoon.handypoi.excel.annos.ExcelColumn;
import cn.com.bluemoon.handypoi.excel.annos.ExcelColumnDate;
import cn.com.bluemoon.handypoi.excel.annos.ExcelColumnDecimal;
import cn.com.bluemoon.handypoi.excel.annos.ExcelColumnMoney;
import cn.com.bluemoon.handypoi.excel.enums.MoneyUnit;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* @author yudong
* @date 2019/6/9
*/
public class MultiHeadExampleBean {
@ExcelColumn(columnName = {"序号", "序号"})
private Integer index;
@ExcelColumn(columnName = {"订单信息", "订单编码"})
private String orderCode;
@ExcelColumnMoney(moneyFormat = "0.00", moneyUnit = MoneyUnit.CENT)
@ExcelColumn(columnName = {"订单信息", "订单金额"})
private Long orderPrice;
@ExcelColumnDecimal(decimalFormat = "0.0000")
@ExcelColumn(columnName = {"订单信息", "订单基数"})
private Double orderBase;
@ExcelColumnDate(datePattern = "yyyy年MM月dd日 HH时mm分ss秒")
@ExcelColumn(columnName = {"订单信息", "支付时间"}, columnWidth = 9000)
private Date payTime;
@ExcelColumn(columnName = {"订单信息", "消费者姓名"})
private String customerName;
@ExcelColumn(columnName = {"订单信息", "消费者联系电话"})
private String customerPhone;
@ExcelColumn(columnName = {"地址信息", "省份"})
private String province;
@ExcelColumn(columnName = {"地址信息", "城市"})
private String city;
@ExcelColumn(columnName = {"地址信息", "县区"})
private String village;
@ExcelColumn(columnName = {"地址信息", "街道"})
private String street;
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
}
public Integer getIndex() {
return index;
}
public void setIndex(Integer index) {
this.index = index;
}
public String getOrderCode() {
return orderCode;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public Long getOrderPrice() {
return orderPrice;
}
public void setOrderPrice(Long orderPrice) {
this.orderPrice = orderPrice;
}
public Double getOrderBase() {
return orderBase;
}
public void setOrderBase(Double orderBase) {
this.orderBase = orderBase;
}
public Date getPayTime() {
return payTime;
}
public void setPayTime(Date payTime) {
this.payTime = payTime;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerPhone() {
return customerPhone;
}
public void setCustomerPhone(String customerPhone) {
this.customerPhone = customerPhone;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getVillage() {
return village;
}
public void setVillage(String village) {
this.village = village;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
}
|
[
"liangyudong@bluemoon.com.cn"
] |
liangyudong@bluemoon.com.cn
|
b289b0fdd8fd55843dc6f278b2834a0f6b503bf3
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/33/33_eeb3fd43d83714031023078735fcfcd4d4f5121c/remote_lat/33_eeb3fd43d83714031023078735fcfcd4d4f5121c_remote_lat_s.java
|
f1b3a873bb6a30cbd2efedd9bfdb1b2cfe1580e6
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,219
|
java
|
package io.crossroads;
import com.sun.jna.Native;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
public class remote_lat {
public static void main(String [] args) {
if (args.length != 3) {
System.out.printf("argc was %d\n", args.length);
System.out.printf("usage: remote_lat <connect-to> <message-size> <roundtrip-count>\n");
return;
}
XsLibrary xs = (XsLibrary) Native.loadLibrary("xs_d", XsLibrary.class);
String connect_to;
int roundtrip_count;
int message_size;
Pointer ctx = null;
Pointer s = null;
int rc;
int i;
XsMsg msg = new XsMsg();
Pointer watch = null;
long elapsed = 0;
double latency = 0.0;
connect_to = args[0];
message_size = Integer.parseInt(args[1]);
roundtrip_count = Integer.parseInt(args[2]);
System.out.printf("args: %s | %d | %d\n",
connect_to, message_size, roundtrip_count);
NativeLong nl = new NativeLong(message_size);
ctx = xs.xs_init();
if (ctx == null) {
System.out.printf("error in xs_init: %s\n",
xs.xs_strerror(xs.xs_errno()));
return;
}
System.out.printf("XS inited\n");
s = xs.xs_socket(ctx, xs.XS_REQ);
if (s == null) {
System.out.printf("error in xs_socket: %s\n",
xs.xs_strerror(xs.xs_errno()));
return;
}
System.out.printf("XS REQ socket created\n");
rc = xs.xs_connect(s, connect_to);
if (rc == -1) {
System.out.printf("error in xs_connect: %s\n",
xs.xs_strerror(xs.xs_errno()));
return;
}
System.out.printf("XS REQ socket connected to %s\n", connect_to);
rc = xs.xs_msg_init_size(msg, nl);
if (rc != 0) {
System.out.printf("error in xs_msg_init_size: %s\n",
xs.xs_strerror(xs.xs_errno()));
return;
}
System.out.printf("XS msg inited\n");
// memset (xs_msg_data (&msg), 0, message_size);
watch = xs.xs_stopwatch_start();
System.out.printf("XS running %d iterations...\n", roundtrip_count);
for (i = 0; i != roundtrip_count; i++) {
rc = xs.xs_sendmsg(s, msg, 0);
if (rc < 0) {
System.out.printf("error in xs_sendmsg: %s\n",
xs.xs_strerror(xs.xs_errno()));
return;
}
rc = xs.xs_recvmsg (s, msg, 0);
if (rc < 0) {
System.out.printf("error in xs_recvmsg: %s\n",
xs.xs_strerror(xs.xs_errno()));
return;
}
long ms = xs.xs_msg_size(msg).longValue();
if (ms != message_size) {
System.out.printf("message of incorrect size received\n");
return;
}
}
elapsed = xs.xs_stopwatch_stop(watch).longValue();
rc = xs.xs_msg_close(msg);
if (rc != 0) {
System.out.printf("error in xs_msg_close: %s\n",
xs.xs_strerror(xs.xs_errno()));
return;
}
latency = (double) elapsed / (roundtrip_count * 2);
System.out.printf("message size: %d [B]\n", message_size);
System.out.printf("roundtrip count: %d\n", roundtrip_count);
System.out.printf("average latency: %.3f [us]\n", latency);
rc = xs.xs_close(s);
if (rc != 0) {
System.out.printf("error in xs_close: %s\n",
xs.xs_strerror(xs.xs_errno()));
return;
}
rc = xs.xs_term(ctx);
if (rc != 0) {
System.out.printf("error in xs_term: %s\n",
xs.xs_strerror(xs.xs_errno()));
return;
}
System.out.printf("XS done running\n");
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
db0753d3191578f899352c6cedda18b01de875fc
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Log4j/Log4j1392.java
|
9df7b023d67658cdf94d87983e4e8e67e37a8a4c
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 461
|
java
|
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append(super.toString());
sb.append("[leftAlign=");
sb.append(leftAlign);
sb.append(", maxLength=");
sb.append(maxLength);
sb.append(", minLength=");
sb.append(minLength);
sb.append(", leftTruncate=");
sb.append(leftTruncate);
sb.append(']');
return sb.toString();
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
3708109d40647574e3525fd933937b8e063a7dc7
|
69b9b29572ab802ed800f8adb9cc04327a94bc8f
|
/jee/src/test/java/com/anzymus/neogeo/hiscores/converter/DateDDMMYYYYConverterTest.java
|
e2e2e16de534cba45c2b331676b478221f721847
|
[] |
no_license
|
jsmadja/neogeo-hiscores
|
d195e03b29eaf3d66bad348f8694f1b11c23a543
|
790ef1902dd9a97074c96ee24878ba1cf1b49efd
|
refs/heads/master
| 2016-09-06T14:57:44.159562
| 2015-06-16T16:32:40
| 2015-06-16T16:32:40
| 2,079,660
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,488
|
java
|
/**
* Copyright (C) 2011 Julien SMADJA <julien dot smadja at gmail dot 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 com.anzymus.neogeo.hiscores.converter;
import java.util.Calendar;
import java.util.Date;
import junit.framework.Assert;
import org.junit.Test;
public class DateDDMMYYYYConverterTest {
DateDDMMYYYYConverter converter = new DateDDMMYYYYConverter();
@Test
public void should_format_correctly() {
Calendar cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 4);
cal.set(Calendar.MONTH, 6);
cal.set(Calendar.YEAR, 2011);
Date date = cal.getTime();
String strDate = converter.getAsString(null, null, date);
Assert.assertEquals("4 Jul 2011", strDate);
}
@Test(expected = UnsupportedOperationException.class)
public void should_throw_exception() {
converter.getAsObject(null, null, null);
}
}
|
[
"julien.smadja@gmail.com"
] |
julien.smadja@gmail.com
|
4391f79744de3e42b67cd980d0a9dc15a79b0791
|
a106eff7f5eb23d3987bac74ba0926a04a149921
|
/praxis.components/src/net/neilcsmith/praxis/components/array/ArrayIterator.java
|
b7a0d0f59df3d5df263e2c8d595facc9580f3dd5
|
[] |
no_license
|
lxlxlo/praxis-devel
|
fc72ad961eb628b7a6f459ae89e7d72f77855268
|
b096b0894887778ca9a7c7ed098e91f98925c954
|
refs/heads/master
| 2021-01-01T03:52:16.750859
| 2016-05-11T16:33:49
| 2016-05-11T16:33:49
| 59,583,579
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,283
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2010 Neil C Smith.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 only, as
* published by the Free Software Foundation.
*
* This code 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
* version 3 for more details.
*
* You should have received a copy of the GNU General Public License version 3
* along with this work; if not, see http://www.gnu.org/licenses/
*
*
* Please visit http://neilcsmith.net if you need additional information or
* have any questions.
*/
package net.neilcsmith.praxis.components.array;
import java.util.Random;
import net.neilcsmith.praxis.core.ControlPort;
//import net.neilcsmith.praxis.core.impl.MultiArgProperty;
import net.neilcsmith.praxis.core.Port;
import net.neilcsmith.praxis.core.types.PArray;
import net.neilcsmith.praxis.core.types.PString;
import net.neilcsmith.praxis.impl.AbstractComponent;
import net.neilcsmith.praxis.impl.ArrayProperty;
import net.neilcsmith.praxis.impl.BooleanProperty;
import net.neilcsmith.praxis.impl.DefaultControlOutputPort;
import net.neilcsmith.praxis.impl.IntProperty;
import net.neilcsmith.praxis.impl.TriggerControl;
/**
*
* @author Neil C Smith
*/
//@TODO add reset control / port
public class ArrayIterator extends AbstractComponent {
private static enum LoopMode {
None, Forward, Backward, BiDi
};
private PArray values;
private ControlPort.Output output;
private Random random = new Random();
private int index = 0;
private IntProperty minSkip;
private IntProperty maxSkip;
private BooleanProperty pingPong;
private boolean forwards;
public ArrayIterator() {
build();
}
private void build() {
values = PArray.EMPTY;
ArrayProperty vals = ArrayProperty.create( new ArrayProperty.Binding() {
public void setBoundValue(long time, PArray value) {
values = value;
index = 0;
forwards = true;
}
public PArray getBoundValue() {
return values;
}
}, values);
TriggerControl trigger = TriggerControl.create( new TriggerControl.Binding() {
public void trigger(long time) {
send(time);
}
});
registerControl("trigger", trigger);
registerPort("trigger", trigger.createPort());
output = new DefaultControlOutputPort(this);
registerPort(Port.OUT, output);
registerControl("values", vals);
registerPort("values", vals.createPort());
minSkip = IntProperty.create( 0, 1024, 1);
registerControl("min-skip", minSkip);
maxSkip = IntProperty.create( 0, 1024, 1);
registerControl("max-skip", maxSkip);
pingPong = BooleanProperty.create(this, false);
registerControl("ping-pong", pingPong);
}
private void send(long time) {
int count = values.getSize();
if (count == 0) {
output.send(time, PString.EMPTY);
} else if (count == 1) {
output.send(time, values.get(0));
} else {
output.send(time, values.get(index));
nextIdx();
}
}
private int nextIdx() {
boolean pp = pingPong.getValue();
if (!pp) {
forwards = true;
}
int min = minSkip.getValue();
int max = Math.max(min, maxSkip.getValue());
int idx = index;
int oldIdx = idx;
int count = values.getSize();
int delta;
if (min == max) {
delta = min;
} else {
delta = random.nextInt(max + 1 - min) + min;
}
if (forwards) {
idx += delta;
} else {
idx -= delta;
}
while (idx < 0 || idx >= count) {
if (pp) {
if (idx < 0) {
idx = 0 - idx;
forwards = true;
} else {
int hi = count - 1;
idx = hi - (idx - hi);
forwards = false;
}
} else {
if (idx < 0) {
idx = 0 - idx;
} else {
idx %= count;
}
}
}
// don't allow duplicates at change of direction.
if (idx == oldIdx && min > 0) {
if (forwards) {
if (idx < count - 1) {
idx++;
} else if (pp) {
idx--;
forwards = false;
} else {
idx = 0;
}
} else {
if (idx > 0) {
idx--;
} else {
idx++;
forwards = true;
}
}
}
index = idx;
return index;
}
}
|
[
"neilcsmith.net@googlemail.com"
] |
neilcsmith.net@googlemail.com
|
d06f78eacc53db9c7c194fdfdf229955d408fd0c
|
e27942cce249f7d62b7dc8c9b86cd40391c1ddd4
|
/modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201702/LabelEntityAssociationErrorReason.java
|
d139026dc16c9936dd6a06da6f407cf670a9d976
|
[
"Apache-2.0"
] |
permissive
|
mo4ss/googleads-java-lib
|
b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a
|
efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641
|
refs/heads/master
| 2022-12-05T00:30:56.740813
| 2022-11-16T10:47:15
| 2022-11-16T10:47:15
| 108,132,394
| 0
| 0
|
Apache-2.0
| 2022-11-16T10:47:16
| 2017-10-24T13:41:43
|
Java
|
UTF-8
|
Java
| false
| false
| 4,158
|
java
|
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* LabelEntityAssociationErrorReason.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.dfp.axis.v201702;
public class LabelEntityAssociationErrorReason implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected LabelEntityAssociationErrorReason(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _DUPLICATE_ASSOCIATION = "DUPLICATE_ASSOCIATION";
public static final java.lang.String _INVALID_ASSOCIATION = "INVALID_ASSOCIATION";
public static final java.lang.String _DUPLICATE_ASSOCIATION_WITH_NEGATION = "DUPLICATE_ASSOCIATION_WITH_NEGATION";
public static final java.lang.String _UNKNOWN = "UNKNOWN";
public static final LabelEntityAssociationErrorReason DUPLICATE_ASSOCIATION = new LabelEntityAssociationErrorReason(_DUPLICATE_ASSOCIATION);
public static final LabelEntityAssociationErrorReason INVALID_ASSOCIATION = new LabelEntityAssociationErrorReason(_INVALID_ASSOCIATION);
public static final LabelEntityAssociationErrorReason DUPLICATE_ASSOCIATION_WITH_NEGATION = new LabelEntityAssociationErrorReason(_DUPLICATE_ASSOCIATION_WITH_NEGATION);
public static final LabelEntityAssociationErrorReason UNKNOWN = new LabelEntityAssociationErrorReason(_UNKNOWN);
public java.lang.String getValue() { return _value_;}
public static LabelEntityAssociationErrorReason fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
LabelEntityAssociationErrorReason enumeration = (LabelEntityAssociationErrorReason)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static LabelEntityAssociationErrorReason fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumSerializer(
_javaType, _xmlType);
}
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(LabelEntityAssociationErrorReason.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201702", "LabelEntityAssociationError.Reason"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
|
[
"api.cseeley@gmail.com"
] |
api.cseeley@gmail.com
|
c346810dd9107c947f62654eb00f01980b29ffec
|
f321db1ace514d08219cc9ba5089ebcfff13c87a
|
/generated-tests/random/tests/s14/21_wheelwebtool/evosuite-tests/wheel/asm/FieldWriter_ESTest_scaffolding.java
|
1a4186f7d027d57abbb6810f99b916e5d663b5a6
|
[] |
no_license
|
sealuzh/dynamic-performance-replication
|
01bd512bde9d591ea9afa326968b35123aec6d78
|
f89b4dd1143de282cd590311f0315f59c9c7143a
|
refs/heads/master
| 2021-07-12T06:09:46.990436
| 2020-06-05T09:44:56
| 2020-06-05T09:44:56
| 146,285,168
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,837
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Mar 22 22:50:19 GMT 2019
*/
package wheel.asm;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class FieldWriter_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "wheel.asm.FieldWriter";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "/home/apaniche/performance/Dataset/gordon_scripts/projects/21_wheelwebtool");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(FieldWriter_ESTest_scaffolding.class.getClassLoader() ,
"wheel.asm.FieldVisitor",
"org.apache.commons.io.filefilter.IOFileFilter",
"wheel.asm.ClassVisitor",
"org.apache.commons.io.filefilter.AndFileFilter",
"wheel.asm.Attribute",
"wheel.asm.MethodWriter",
"org.apache.commons.io.filefilter.AbstractFileFilter",
"wheel.asm.ClassReader",
"org.apache.commons.io.filefilter.ConditionalFileFilter",
"wheel.asm.Label",
"wheel.asm.AnnotationWriter",
"wheel.asm.Item",
"wheel.asm.Edge",
"wheel.asm.ByteVector",
"wheel.asm.AnnotationVisitor",
"wheel.asm.FieldWriter",
"wheel.asm.ClassWriter",
"wheel.asm.Type",
"wheel.asm.MethodVisitor",
"wheel.asm.Frame"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(FieldWriter_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"wheel.asm.FieldWriter",
"wheel.asm.ClassReader",
"wheel.asm.ClassWriter",
"wheel.asm.ByteVector",
"wheel.asm.Item",
"wheel.asm.Attribute",
"wheel.asm.Edge",
"wheel.asm.MethodWriter",
"wheel.asm.AnnotationWriter",
"wheel.asm.Frame",
"wheel.asm.Label",
"org.apache.commons.io.filefilter.AbstractFileFilter",
"org.apache.commons.io.filefilter.AndFileFilter"
);
}
}
|
[
"granogiovanni90@gmail.com"
] |
granogiovanni90@gmail.com
|
10548954aa0758dde2c4ceb03208b68fb2cd4589
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/module2040_public/tests/unittests/src/java/module2040_public_tests_unittests/a/Foo0.java
|
f967d31a1f154473f8a6ef3449659b68b7d807ba
|
[
"BSD-3-Clause"
] |
permissive
|
salesforce/bazel-ls-demo-project
|
5cc6ef749d65d6626080f3a94239b6a509ef145a
|
948ed278f87338edd7e40af68b8690ae4f73ebf0
|
refs/heads/master
| 2023-06-24T08:06:06.084651
| 2023-03-14T11:54:29
| 2023-03-14T11:54:29
| 241,489,944
| 0
| 5
|
BSD-3-Clause
| 2023-03-27T11:28:14
| 2020-02-18T23:30:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,328
|
java
|
package module2040_public_tests_unittests.a;
import java.nio.file.*;
import java.sql.*;
import java.util.logging.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.annotation.processing.Completion
* @see javax.lang.model.AnnotatedConstruct
* @see javax.management.Attribute
*/
@SuppressWarnings("all")
public abstract class Foo0<K> implements module2040_public_tests_unittests.a.IFoo0<K> {
javax.naming.directory.DirContext f0 = null;
javax.net.ssl.ExtendedSSLSession f1 = null;
javax.rmi.ssl.SslRMIClientSocketFactory f2 = null;
public K element;
public static Foo0 instance;
public static Foo0 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return null;
}
public String getName() {
return element.toString();
}
public void setName(String string) {
return;
}
public K get() {
return element;
}
public void set(Object element) {
this.element = (K)element;
}
public K call() throws Exception {
return (K)getInstance().call();
}
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
0a6867df1fa38bc4252a8cc896da7ac031b5a5c5
|
317b7cd636030cef403141aa1812f13c2b823566
|
/Server/src/main/java/org/xdi/oxauth/service/fido/u2f/ApplicationService.java
|
ee449823776dfebc5dff1428e56eb2f68ca1a384
|
[
"MIT"
] |
permissive
|
rkaniyamkattil/oxAuth
|
3f6bc5b52dbbade050b2940a4751be889fd4449e
|
c546d4c24a1c693de32630782b1bc057fb3d1464
|
refs/heads/master
| 2021-04-30T01:21:15.811453
| 2018-02-13T08:19:44
| 2018-02-13T08:19:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,235
|
java
|
/*
* oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
*
* Copyright (c) 2014, Gluu
*/
package org.xdi.oxauth.service.fido.u2f;
import java.net.URI;
import java.net.URISyntaxException;
import javax.ejb.Stateless;
import javax.inject.Named;
import org.xdi.net.InetAddressUtility;
import org.xdi.oxauth.exception.fido.u2f.BadConfigurationException;
/**
* Provides operations with U2F applications
*
* @author Yuriy Movchan Date: 05/19/2015
*/
@Stateless
@Named
public class ApplicationService {
private boolean validateApplication = true;
public boolean isValidateApplication() {
return validateApplication;
}
/**
* Throws {@link BadConfigurationException} if the given App ID is found to
* be incompatible with the U2F specification or any major U2F Client
* implementation.
*
* @param appId
* the App ID to be validated
*/
public void checkIsValid(String appId) {
if (!appId.contains(":")) {
throw new BadConfigurationException("App ID does not look like a valid facet or URL. Web facets must start with 'https://'.");
}
if (appId.startsWith("http:")) {
throw new BadConfigurationException("HTTP is not supported for App IDs. Use HTTPS instead.");
}
if (appId.startsWith("https://")) {
URI url = checkValidUrl(appId);
checkPathIsNotSlash(url);
checkNotIpAddress(url);
}
}
private void checkPathIsNotSlash(URI url) {
if ("/".equals(url.getPath())) {
throw new BadConfigurationException(
"The path of the URL set as App ID is '/'. This is probably not what you want -- remove the trailing slash of the App ID URL.");
}
}
private URI checkValidUrl(String appId) {
URI url = null;
try {
url = new URI(appId);
} catch (URISyntaxException e) {
throw new BadConfigurationException("App ID looks like a HTTPS URL, but has syntax errors.", e);
}
return url;
}
private void checkNotIpAddress(URI url) {
if (InetAddressUtility.isIpAddress(url.getAuthority()) || (url.getHost() != null && InetAddressUtility.isIpAddress(url.getHost()))) {
throw new BadConfigurationException("App ID must not be an IP-address, since it is not supported. Use a host name instead.");
}
}
}
|
[
"Yuriy.Movchan@gmail.com"
] |
Yuriy.Movchan@gmail.com
|
fe3bfc344271bd4311c342f430fcb89f1ec592df
|
8a59fc6208231e2d7843e523cfdc9a3a362813b4
|
/org.caleydo.view.dvi/src/org/caleydo/view/dvi/contextmenu/ShowViewWithoutDataItem.java
|
993b4c4c388818661d5709d39e5477bc1b2350d2
|
[] |
no_license
|
Caleydo/caleydo
|
17c51b10a465512a0c077e680da648d9a6061136
|
c2f1433baf5bd2c0c5bea8c0990d67e946ed5412
|
refs/heads/develop
| 2020-04-07T06:26:03.464510
| 2016-12-15T17:07:08
| 2016-12-15T17:07:08
| 9,451,506
| 37
| 11
| null | 2016-12-15T17:07:08
| 2013-04-15T15:13:38
|
Java
|
UTF-8
|
Java
| false
| false
| 1,085
|
java
|
/*******************************************************************************
* Caleydo - Visualization for Molecular Biology - http://caleydo.org
* Copyright (c) The Caleydo Team. All rights reserved.
* Licensed under the new BSD license, available at http://caleydo.org/license
******************************************************************************/
/**
*
*/
package org.caleydo.view.dvi.contextmenu;
import org.caleydo.core.view.contextmenu.AContextMenuItem;
import org.caleydo.view.dvi.event.ShowViewWithoutDataEvent;
/**
* Context menu item that is used to open and show views that do not display
* data.
*
* @author Christian Partl
*
*/
public class ShowViewWithoutDataItem extends AContextMenuItem {
/**
* @param viewID
* ID of the view to show
* @param text
* Text that is displayed in the context menu.
*/
public ShowViewWithoutDataItem(String viewID, String text) {
setLabel(text);
ShowViewWithoutDataEvent event = new ShowViewWithoutDataEvent(viewID);
event.setSender(this);
registerEvent(event);
}
}
|
[
"marc.streit@jku.at"
] |
marc.streit@jku.at
|
07eb4066699713aae1e349fbf8054e744d14cd94
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/5/5_74fdd84106f9dc8d5819281d217fd077821b4095/BaseHandler/5_74fdd84106f9dc8d5819281d217fd077821b4095_BaseHandler_t.java
|
1c22d7148f32cd57676f0f51f7103deaaaa0488c
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,113
|
java
|
package org.ebookdroid.droids.fb2.codec.handlers;
import org.ebookdroid.droids.fb2.codec.ParsedContent;
import java.util.LinkedList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.emdev.common.fonts.data.FontStyle;
import org.emdev.common.textmarkup.JustificationMode;
import org.emdev.common.textmarkup.MarkupElement;
import org.emdev.common.textmarkup.RenderingStyle;
import org.emdev.common.textmarkup.TextStyle;
public abstract class BaseHandler implements IContentHandler {
protected static final Pattern notesPattern = Pattern.compile("n([0-9]+)|n_([0-9]+)|note_([0-9]+)|.*?([0-9]+)");
public final ParsedContent parsedContent;
protected final int[] starts = new int[10000];
protected final int[] lengths = new int[10000];
protected RenderingStyle crs;
protected final LinkedList<RenderingStyle> renderingStates = new LinkedList<RenderingStyle>();
protected String currentStream = null;
protected String oldStream = null;
protected int noteId = -1;
public BaseHandler(final ParsedContent content) {
parsedContent = content;
currentStream = null;
crs = new RenderingStyle(content, TextStyle.TEXT);
}
protected final RenderingStyle setPrevStyle() {
if (!renderingStates.isEmpty()) {
crs = renderingStates.removeFirst();
}
return crs;
}
protected final RenderingStyle setTitleStyle(final TextStyle font) {
renderingStates.addFirst(crs);
crs = new RenderingStyle(crs, font, JustificationMode.Center);
return crs;
}
protected final RenderingStyle setEpigraphStyle() {
renderingStates.addFirst(crs);
crs = new RenderingStyle(parsedContent, crs, JustificationMode.Right,
org.emdev.common.fonts.data.FontStyle.ITALIC);
return crs;
}
protected final RenderingStyle setBoldStyle() {
renderingStates.addFirst(crs);
crs = new RenderingStyle(parsedContent, crs, true);
return crs;
}
protected final RenderingStyle setSupStyle() {
renderingStates.addFirst(crs);
crs = new RenderingStyle(crs, RenderingStyle.Script.SUPER);
return crs;
}
protected final RenderingStyle setSubStyle() {
renderingStates.addFirst(crs);
crs = new RenderingStyle(crs, RenderingStyle.Script.SUB);
return crs;
}
protected final RenderingStyle setStrikeThrough() {
renderingStates.addFirst(crs);
crs = new RenderingStyle(crs, RenderingStyle.Strike.THROUGH);
return crs;
}
protected final RenderingStyle setEmphasisStyle() {
renderingStates.addFirst(crs);
crs = new RenderingStyle(parsedContent, crs, FontStyle.ITALIC);
return crs;
}
protected final RenderingStyle setSubtitleStyle() {
renderingStates.addFirst(crs);
crs = new RenderingStyle(parsedContent, crs, TextStyle.SUBTITLE, JustificationMode.Center, FontStyle.BOLD);
return crs;
}
protected final RenderingStyle setTextAuthorStyle(final boolean italic) {
renderingStates.addFirst(crs);
crs = new RenderingStyle(parsedContent, crs, JustificationMode.Right, italic ? FontStyle.ITALIC
: FontStyle.REGULAR);
return crs;
}
protected final RenderingStyle setPoemStyle() {
renderingStates.addFirst(crs);
crs = new RenderingStyle(parsedContent, crs, JustificationMode.Left, FontStyle.ITALIC);
return crs;
}
protected final RenderingStyle setPreformatted() {
renderingStates.addFirst(crs);
crs = new RenderingStyle(parsedContent, parsedContent.mono, TextStyle.PREFORMATTED);
return crs;
}
protected MarkupElement emptyLine(final int textSize) {
return crs.paint.emptyLine;
}
protected String getNoteId(final String noteName, final boolean bracket) {
final Matcher matcher = notesPattern.matcher(noteName);
String n = noteName;
if (matcher.matches()) {
for (int i = 1; i <= matcher.groupCount(); i++) {
if (matcher.group(i) != null) {
noteId = Integer.parseInt(matcher.group(i));
n = "" + noteId + (bracket ? ")" : "");
break;
}
noteId = -1;
}
}
return n;
}
protected int getNoteId(final char[] ch, final int st, final int len) {
int id = -2;
try {
int last = len - 1;
final char lc = ch[st + last];
if (lc == '.' || lc == ')') {
last--;
}
final String fw = new String(ch, st, last + 1);
id = Integer.parseInt(fw);
} catch (final Exception e) {
id = -2;
}
return id;
}
@Override
public boolean skipCharacters() {
return false;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
572196f51c325471723226e012cdd8e949b14fd9
|
1f8f7c3b849fa161068683f4e6a63f1206ec6f74
|
/website-test-dbunit/src/test/java/net/sunxu/website/test/dbunit/DbUnitExpectTest.java
|
d062acd6ca3eedd4d96a150790a3a3741227c4ce
|
[
"MIT"
] |
permissive
|
sunxuia/website-utils
|
72946a9e24d4d10f0d2b5356cff3d434a78f30c5
|
1a743b2208aadb9aaea86d8f136da626907ee7ff
|
refs/heads/master
| 2020-07-21T20:34:00.127909
| 2019-12-15T09:33:22
| 2019-12-15T09:33:22
| 206,969,363
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,852
|
java
|
package net.sunxu.website.test.dbunit;
import java.sql.SQLException;
import javax.annotation.PostConstruct;
import javax.sql.DataSource;
import net.sunxu.website.test.dbunit.annotation.DbUnitExpect;
import net.sunxu.website.test.dbunit.annotation.DbUnitSetup;
import net.sunxu.website.test.dbunit.annotation.DbUnitSetup.OperationType;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class DbUnitExpectTest {
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
private DbUnitRuleFactory factory;
@Autowired
private DataSource dataSource;
@Rule
public DbUnitRule dbUnitRule;
@PostConstruct
public void initial() throws SQLException {
dbUnitRule = factory.builder().connection(dataSource.getConnection()).build();
}
@Test
@DbUnitSetup(locations = "sampleData.xml", operationType = OperationType.CLEAN_INSERT)
@DbUnitExpect(locations = "expectedData.xml")
public void testNormal() {
jdbcTemplate.update("update test_table set is_active = 0");
}
@Test
@DbUnitSetup(locations = "sampleData.xml", operationType = OperationType.CLEAN_INSERT)
@DbUnitExpect(locations = "expectedData.xml", ignoreColumn = "test_table.is_active")
public void testIgnoreColumn() {
// do nothing
}
@Test
@DbUnitSetup(locations = "sampleData.xml", operationType = OperationType.CLEAN_INSERT)
@DbUnitExpect(locations = "expectedData.xml", tableName = "test_table2")
public void testTableName() {
// do nothing
}
}
|
[
"ntsunxu@163.com"
] |
ntsunxu@163.com
|
eb8ecbde662db126dd40403178332b902e9dd0a9
|
aaf2ecd33e5ad88c42d9af2ef18a574c1f31c690
|
/src/main/java/org/bian/service/FiduciaryAgreementApiServiceImpl.java
|
af28bedb6aab1cb3b9060e31694f994613593cb7
|
[
"Apache-2.0"
] |
permissive
|
bianapis/sd-fiduciary-agreement-v3
|
66084bd25c2df2a682684ad92865dc2016726078
|
02aead5790c9ab908bce6d7df12c079642a91f45
|
refs/heads/master
| 2022-12-22T03:45:09.370255
| 2020-09-27T03:38:39
| 2020-09-27T03:38:39
| 298,787,082
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,958
|
java
|
/**
* @author Virtusa
*/
package org.bian.service;
import java.util.List;
import org.springframework.stereotype.Service;
import org.bian.dto.*;
import org.bian.util.JsonReader;
import com.fasterxml.jackson.core.type.TypeReference;
@Service
public class FiduciaryAgreementApiServiceImpl implements FiduciaryAgreementApiService {
public SDFiduciaryAgreementActivateOutputModel activate(SDFiduciaryAgreementActivateInputModel request){
return JsonReader.read("activate-SDFiduciaryAgreementActivateOutputModel.json",new TypeReference<SDFiduciaryAgreementActivateOutputModel>(){});
}
public SDFiduciaryAgreementConfigureOutputModel configure(String sdReferenceId, SDFiduciaryAgreementConfigureInputModel request){
return JsonReader.read("configure-SDFiduciaryAgreementConfigureOutputModel.json",new TypeReference<SDFiduciaryAgreementConfigureOutputModel>(){});
}
public CRFiduciaryRelationshipArrangementControlOutputModel control(String sdReferenceId, String crReferenceId, CRFiduciaryRelationshipArrangementControlInputModel request){
return JsonReader.read("control-CRFiduciaryRelationshipArrangementControlOutputModel.json",new TypeReference<CRFiduciaryRelationshipArrangementControlOutputModel>(){});
}
public BQAgreementExchangeOutputModel exchangeAgreement(String sdReferenceId, String crReferenceId, String bqReferenceId, BQAgreementExchangeInputModel request){
return JsonReader.read("exchange-BQAgreementExchangeOutputModel.json",new TypeReference<BQAgreementExchangeOutputModel>(){});
}
public BQFeesExchangeOutputModel exchangeFees(String sdReferenceId, String crReferenceId, String bqReferenceId, BQFeesExchangeInputModel request){
return JsonReader.read("exchange-BQFeesExchangeOutputModel.json",new TypeReference<BQFeesExchangeOutputModel>(){});
}
public BQFulfillmentExchangeOutputModel exchangeFulfillment(String sdReferenceId, String crReferenceId, String bqReferenceId, BQFulfillmentExchangeInputModel request){
return JsonReader.read("exchange-BQFulfillmentExchangeOutputModel.json",new TypeReference<BQFulfillmentExchangeOutputModel>(){});
}
public CRFiduciaryRelationshipArrangementExchangeOutputModel exchange(String sdReferenceId, String crReferenceId, CRFiduciaryRelationshipArrangementExchangeInputModel request){
return JsonReader.read("exchange-CRFiduciaryRelationshipArrangementExchangeOutputModel.json",new TypeReference<CRFiduciaryRelationshipArrangementExchangeOutputModel>(){});
}
public CRFiduciaryRelationshipArrangementExecuteOutputModel execute(String sdReferenceId, String crReferenceId, CRFiduciaryRelationshipArrangementExecuteInputModel request){
return JsonReader.read("execute-CRFiduciaryRelationshipArrangementExecuteOutputModel.json",new TypeReference<CRFiduciaryRelationshipArrangementExecuteOutputModel>(){});
}
public SDFiduciaryAgreementFeedbackOutputModel feedback(String sdReferenceId, SDFiduciaryAgreementFeedbackInputModel request){
return JsonReader.read("feedback-SDFiduciaryAgreementFeedbackOutputModel.json",new TypeReference<SDFiduciaryAgreementFeedbackOutputModel>(){});
}
public CRFiduciaryRelationshipArrangementInitiateOutputModel initiate(String sdReferenceId, CRFiduciaryRelationshipArrangementInitiateInputModel request){
return JsonReader.read("initiate-CRFiduciaryRelationshipArrangementInitiateOutputModel.json",new TypeReference<CRFiduciaryRelationshipArrangementInitiateOutputModel>(){});
}
public BQAgreementInitiateOutputModel initiateAgreement(String sdReferenceId, String crReferenceId, BQAgreementInitiateInputModel request){
return JsonReader.read("initiate-BQAgreementInitiateOutputModel.json",new TypeReference<BQAgreementInitiateOutputModel>(){});
}
public BQAssessmentandReportingInitiateOutputModel initiateAssessmentandreporting(String sdReferenceId, String crReferenceId, BQAssessmentandReportingInitiateInputModel request){
return JsonReader.read("initiate-BQAssessmentandReportingInitiateOutputModel.json",new TypeReference<BQAssessmentandReportingInitiateOutputModel>(){});
}
public BQAgreementRequestOutputModel requestAgreement(String sdReferenceId, String crReferenceId, String bqReferenceId, BQAgreementRequestInputModel request){
return JsonReader.read("request-BQAgreementRequestOutputModel.json",new TypeReference<BQAgreementRequestOutputModel>(){});
}
public BQFeesRequestOutputModel requestFees(String sdReferenceId, String crReferenceId, String bqReferenceId, BQFeesRequestInputModel request){
return JsonReader.read("request-BQFeesRequestOutputModel.json",new TypeReference<BQFeesRequestOutputModel>(){});
}
public BQFulfillmentRequestOutputModel requestFulfillment(String sdReferenceId, String crReferenceId, String bqReferenceId, BQFulfillmentRequestInputModel request){
return JsonReader.read("request-BQFulfillmentRequestOutputModel.json",new TypeReference<BQFulfillmentRequestOutputModel>(){});
}
public CRFiduciaryRelationshipArrangementRequestOutputModel request(String sdReferenceId, String crReferenceId, CRFiduciaryRelationshipArrangementRequestInputModel request){
return JsonReader.read("request-CRFiduciaryRelationshipArrangementRequestOutputModel.json",new TypeReference<CRFiduciaryRelationshipArrangementRequestOutputModel>(){});
}
public CRFiduciaryRelationshipArrangementRetrieveOutputModel retrieve(String sdReferenceId, String crReferenceId){
return JsonReader.read("retrieve-CRFiduciaryRelationshipArrangementRetrieveOutputModel.json",new TypeReference<CRFiduciaryRelationshipArrangementRetrieveOutputModel>(){});
}
public List<String> retrieveBQIds(String sdReferenceId, String crReferenceId, String behaviorQualifier){
return JsonReader.read("retrieveBQIds-String.json",new TypeReference<List<String>>(){});
}
public List<String> retrieveBQs(){
return JsonReader.read("retrieveBQs-String.json",new TypeReference<List<String>>(){});
}
public List<String> retrieveRefIds(String sdReferenceId){
return JsonReader.read("retrieveRefIds-String.json",new TypeReference<List<String>>(){});
}
public BQAgreementRetrieveOutputModel retrieveAgreement(String sdReferenceId, String crReferenceId, String bqReferenceId){
return JsonReader.read("retrieve-BQAgreementRetrieveOutputModel.json",new TypeReference<BQAgreementRetrieveOutputModel>(){});
}
public BQAssessmentandReportingRetrieveOutputModel retrieveAssessmentandreporting(String sdReferenceId, String crReferenceId, String bqReferenceId){
return JsonReader.read("retrieve-BQAssessmentandReportingRetrieveOutputModel.json",new TypeReference<BQAssessmentandReportingRetrieveOutputModel>(){});
}
public BQFeesRetrieveOutputModel retrieveFees(String sdReferenceId, String crReferenceId, String bqReferenceId){
return JsonReader.read("retrieve-BQFeesRetrieveOutputModel.json",new TypeReference<BQFeesRetrieveOutputModel>(){});
}
public BQFulfillmentRetrieveOutputModel retrieveFulfillment(String sdReferenceId, String crReferenceId, String bqReferenceId){
return JsonReader.read("retrieve-BQFulfillmentRetrieveOutputModel.json",new TypeReference<BQFulfillmentRetrieveOutputModel>(){});
}
public SDFiduciaryAgreementRetrieveOutputModel retrieveSD(String sdReferenceId){
return JsonReader.read("retrieveSD-SDFiduciaryAgreementRetrieveOutputModel.json",new TypeReference<SDFiduciaryAgreementRetrieveOutputModel>(){});
}
public CRFiduciaryRelationshipArrangementUpdateOutputModel update(String sdReferenceId, String crReferenceId, CRFiduciaryRelationshipArrangementUpdateInputModel request){
return JsonReader.read("update-CRFiduciaryRelationshipArrangementUpdateOutputModel.json",new TypeReference<CRFiduciaryRelationshipArrangementUpdateOutputModel>(){});
}
public BQAgreementUpdateOutputModel updateAgreement(String sdReferenceId, String crReferenceId, String bqReferenceId, BQAgreementUpdateInputModel request){
return JsonReader.read("update-BQAgreementUpdateOutputModel.json",new TypeReference<BQAgreementUpdateOutputModel>(){});
}
}
|
[
"spabandara@Virtusa.com"
] |
spabandara@Virtusa.com
|
135db3c3cc6c71c08289efc2f3adc3123ffd367d
|
4572bcab49eec6a44dfe97cfceb6c96232093fa2
|
/j360-trace-dubbo/src/main/java/me/j360/trace/dubbo/J360DubboServerFilter.java
|
c6bdf7f3adfe249745679f2122747ce892a5f81b
|
[] |
no_license
|
hhhcommon/j360-trace
|
24d014e81f06c34e2a7f322407d22ab3031c18ce
|
b2378a39af13edbfea3e13fe2b67413decb36379
|
refs/heads/master
| 2020-03-30T00:41:51.681189
| 2017-04-27T10:17:06
| 2017-04-27T10:17:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,801
|
java
|
package me.j360.trace.dubbo;
import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.extension.Activate;
import com.alibaba.dubbo.rpc.*;
import me.j360.trace.collector.core.*;
import me.j360.trace.collector.core.internal.Nullable;
import me.j360.trace.http.BraveHttpHeaders;
import java.net.SocketAddress;
import java.util.Collection;
import java.util.Collections;
import static com.google.common.base.Preconditions.checkNotNull;
import static me.j360.trace.collector.core.IdConversion.convertToLong;
/**
* 使用构造方法注入
* 修改dubbo:provider中添加配置的dubbo:provider filter="xxxFilter"> <dubbo:parameter key="qaccesslog" value="9"/> <dubbo:parameter key="qloglevel" value="8"/> </dubbo:provider>
*
*/
@Activate(group = {Constants.PROVIDER})
public class J360DubboServerFilter implements Filter {
private ServerRequestInterceptor serverRequestInterceptor;
private ServerResponseInterceptor serverResponseInterceptor;
private Brave brave;
public void setBrave(Brave brave) {
this.brave = brave;
this.serverRequestInterceptor = checkNotNull(brave.serverRequestInterceptor());
this.serverResponseInterceptor = checkNotNull(brave.serverResponseInterceptor());
}
public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
if ("com.alibaba.dubbo.monitor.MonitorService".equals(invoker.getInterface().getName())) {
return invoker.invoke(invocation);
}
RpcContext context = RpcContext.getContext();
serverRequestInterceptor.handle(new DubboServerRequestAdapter(context, invocation));
Result result = invoker.invoke(invocation);
serverResponseInterceptor.handle(new DubboServerResponseAdapter(result));
return result;
}
static final class DubboServerRequestAdapter implements ServerRequestAdapter {
private RpcContext context;
private Invocation invocation;
public DubboServerRequestAdapter(RpcContext context,Invocation invocation) {
this.context = checkNotNull(context);
this.invocation = checkNotNull(invocation);
}
@Override
public TraceData getTraceData() {
final String sampled = invocation.getAttachment(BraveHttpHeaders.Sampled.getName());
if (sampled != null) {
if (sampled.equals("0") || sampled.toLowerCase().equals("false")) {
return TraceData.builder().sample(false).build();
} else {
final String parentSpanId = invocation.getAttachment(BraveHttpHeaders.ParentSpanId.getName());
final String traceId = invocation.getAttachment(BraveHttpHeaders.TraceId.getName());
final String spanId = invocation.getAttachment(BraveHttpHeaders.SpanId.getName());
if (traceId != null && spanId != null) {
SpanId span = getSpanId(traceId, spanId, parentSpanId);
return TraceData.builder().sample(true).spanId(span).build();
}
}
}
return TraceData.builder().build();
}
@Override
public String getSpanName() {
return context.getMethodName();
}
@Override
public Collection<KeyValueAnnotation> requestAnnotations() {
SocketAddress socketAddress = context.getRemoteAddress();
if (socketAddress != null) {
KeyValueAnnotation remoteAddrAnnotation = KeyValueAnnotation.create(
DubboKeys.DUBBO_REMOTE_ADDR, socketAddress.toString());
return Collections.singleton(remoteAddrAnnotation);
} else {
return Collections.emptyList();
}
}
}
static final class DubboServerResponseAdapter implements ServerResponseAdapter {
private final Result result;
public DubboServerResponseAdapter(Result result) {
this.result = result;
}
@Override
@SuppressWarnings("unchecked")
public Collection<KeyValueAnnotation> responseAnnotations() {
return result.getException() == null
? Collections.<KeyValueAnnotation>emptyList()
: Collections.singletonList(KeyValueAnnotation.create(DubboKeys.DUBBO_EXCEPTION_NAME, result.getException().getMessage()));
}
}
static SpanId getSpanId(String traceId, String spanId, String parentSpanId) {
return SpanId.builder()
.traceId(convertToLong(traceId))
.spanId(convertToLong(spanId))
.parentId(parentSpanId == null ? null : convertToLong(parentSpanId)).build();
}
}
|
[
"xumin_wlt@163.com"
] |
xumin_wlt@163.com
|
8e0d5dd10e031072c0a47acfd3e4db6f6229097a
|
a1e49f5edd122b211bace752b5fb1bd5c970696b
|
/projects/org.springframework.context/src/test/java/org/springframework/scheduling/backportconcurrent/ConcurrentTaskExecutorTests.java
|
0d8729dfdf392cbb44b81e7bfe282d75e3ba691f
|
[
"Apache-2.0"
] |
permissive
|
savster97/springframework-3.0.5
|
4f86467e2456e5e0652de9f846f0eaefc3214cfa
|
34cffc70e25233ed97e2ddd24265ea20f5f88957
|
refs/heads/master
| 2020-04-26T08:48:34.978350
| 2019-01-22T14:45:38
| 2019-01-22T14:45:38
| 173,434,995
| 0
| 0
|
Apache-2.0
| 2019-03-02T10:37:13
| 2019-03-02T10:37:12
| null |
UTF-8
|
Java
| false
| false
| 1,682
|
java
|
/*
* Copyright 2002-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.scheduling.backportconcurrent;
import junit.framework.TestCase;
import org.springframework.core.task.NoOpRunnable;
/**
* @author Rick Evans
* @author Juergen Hoeller
*/
public class ConcurrentTaskExecutorTests extends TestCase {
public void testZeroArgCtorResultsInDefaultTaskExecutorBeingUsed() throws Exception {
ConcurrentTaskExecutor executor = new ConcurrentTaskExecutor();
// must not throw a NullPointerException
executor.execute(new NoOpRunnable());
}
public void testPassingNullExecutorToCtorResultsInDefaultTaskExecutorBeingUsed() throws Exception {
ConcurrentTaskExecutor executor = new ConcurrentTaskExecutor(null);
// must not throw a NullPointerException
executor.execute(new NoOpRunnable());
}
public void testPassingNullExecutorToSetterResultsInDefaultTaskExecutorBeingUsed() throws Exception {
ConcurrentTaskExecutor executor = new ConcurrentTaskExecutor();
executor.setConcurrentExecutor(null);
// must not throw a NullPointerException
executor.execute(new NoOpRunnable());
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
a01e0aa8abdef610dbc29aa4c55d22abcfdcb8a7
|
dba87418d2286ce141d81deb947305a0eaf9824f
|
/sources/p011io/grpc/internal/ProxyDetectorImpl.java
|
1de1f0014411865db61162e782642bf8492b35a8
|
[] |
no_license
|
Sluckson/copyOavct
|
1f73f47ce94bb08df44f2ba9f698f2e8589b5cf6
|
d20597e14411e8607d1d6e93b632d0cd2e8af8cb
|
refs/heads/main
| 2023-03-09T12:14:38.824373
| 2021-02-26T01:38:16
| 2021-02-26T01:38:16
| 341,292,450
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,900
|
java
|
package p011io.grpc.internal;
import com.google.common.base.Supplier;
import java.io.IOException;
import java.net.Authenticator;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.MalformedURLException;
import java.net.PasswordAuthentication;
import java.net.Proxy;
import java.net.ProxySelector;
import java.net.SocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nullable;
import p011io.grpc.HttpConnectProxiedSocketAddress;
import p011io.grpc.ProxiedSocketAddress;
import p011io.grpc.ProxyDetector;
/* renamed from: io.grpc.internal.ProxyDetectorImpl */
class ProxyDetectorImpl implements ProxyDetector {
private static final AuthenticationProvider DEFAULT_AUTHENTICATOR = new AuthenticationProvider() {
public PasswordAuthentication requestPasswordAuthentication(String str, InetAddress inetAddress, int i, String str2, String str3, String str4) {
URL url;
try {
url = new URL(str2, str, i, "");
} catch (MalformedURLException unused) {
ProxyDetectorImpl.log.log(Level.WARNING, String.format("failed to create URL for Authenticator: %s %s", new Object[]{str2, str}));
url = null;
}
return Authenticator.requestPasswordAuthentication(str, inetAddress, i, str2, str3, str4, url, Authenticator.RequestorType.PROXY);
}
};
private static final Supplier<ProxySelector> DEFAULT_PROXY_SELECTOR = new Supplier<ProxySelector>() {
public ProxySelector get() {
return ProxySelector.getDefault();
}
};
@Deprecated
private static final String GRPC_PROXY_ENV_VAR = "GRPC_PROXY_EXP";
static final String PROXY_SCHEME = "https";
/* access modifiers changed from: private */
public static final Logger log = Logger.getLogger(ProxyDetectorImpl.class.getName());
private final AuthenticationProvider authenticationProvider;
private final InetSocketAddress overrideProxyAddress;
private final Supplier<ProxySelector> proxySelector;
/* renamed from: io.grpc.internal.ProxyDetectorImpl$AuthenticationProvider */
interface AuthenticationProvider {
PasswordAuthentication requestPasswordAuthentication(String str, InetAddress inetAddress, int i, String str2, String str3, String str4);
}
public ProxyDetectorImpl() {
this(DEFAULT_PROXY_SELECTOR, DEFAULT_AUTHENTICATOR, System.getenv(GRPC_PROXY_ENV_VAR));
}
/* JADX WARNING: type inference failed for: r1v0, types: [com.google.common.base.Supplier<java.net.ProxySelector>, java.lang.Object] */
/* JADX WARNING: Unknown variable types count: 1 */
@com.google.common.annotations.VisibleForTesting
/* Code decompiled incorrectly, please refer to instructions dump. */
ProxyDetectorImpl(com.google.common.base.Supplier<java.net.ProxySelector> r1, p011io.grpc.internal.ProxyDetectorImpl.AuthenticationProvider r2, @javax.annotation.Nullable java.lang.String r3) {
/*
r0 = this;
r0.<init>()
java.lang.Object r1 = com.google.common.base.Preconditions.checkNotNull(r1)
com.google.common.base.Supplier r1 = (com.google.common.base.Supplier) r1
r0.proxySelector = r1
java.lang.Object r1 = com.google.common.base.Preconditions.checkNotNull(r2)
io.grpc.internal.ProxyDetectorImpl$AuthenticationProvider r1 = (p011io.grpc.internal.ProxyDetectorImpl.AuthenticationProvider) r1
r0.authenticationProvider = r1
if (r3 == 0) goto L_0x001c
java.net.InetSocketAddress r1 = overrideProxy(r3)
r0.overrideProxyAddress = r1
goto L_0x001f
L_0x001c:
r1 = 0
r0.overrideProxyAddress = r1
L_0x001f:
return
*/
throw new UnsupportedOperationException("Method not decompiled: p011io.grpc.internal.ProxyDetectorImpl.<init>(com.google.common.base.Supplier, io.grpc.internal.ProxyDetectorImpl$AuthenticationProvider, java.lang.String):void");
}
@Nullable
public ProxiedSocketAddress proxyFor(SocketAddress socketAddress) throws IOException {
if (!(socketAddress instanceof InetSocketAddress)) {
return null;
}
if (this.overrideProxyAddress != null) {
return HttpConnectProxiedSocketAddress.newBuilder().setProxyAddress(this.overrideProxyAddress).setTargetAddress((InetSocketAddress) socketAddress).build();
}
return detectProxy((InetSocketAddress) socketAddress);
}
private ProxiedSocketAddress detectProxy(InetSocketAddress inetSocketAddress) throws IOException {
String str = null;
try {
try {
URI uri = new URI(PROXY_SCHEME, (String) null, GrpcUtil.getHost(inetSocketAddress), inetSocketAddress.getPort(), (String) null, (String) null, (String) null);
ProxySelector proxySelector2 = this.proxySelector.get();
if (proxySelector2 == null) {
log.log(Level.FINE, "proxy selector is null, so continuing without proxy lookup");
return null;
}
List<Proxy> select = proxySelector2.select(uri);
if (select.size() > 1) {
log.warning("More than 1 proxy detected, gRPC will select the first one");
}
Proxy proxy = select.get(0);
if (proxy.type() == Proxy.Type.DIRECT) {
return null;
}
InetSocketAddress inetSocketAddress2 = (InetSocketAddress) proxy.address();
PasswordAuthentication requestPasswordAuthentication = this.authenticationProvider.requestPasswordAuthentication(GrpcUtil.getHost(inetSocketAddress2), inetSocketAddress2.getAddress(), inetSocketAddress2.getPort(), PROXY_SCHEME, "", (String) null);
if (inetSocketAddress2.isUnresolved()) {
inetSocketAddress2 = new InetSocketAddress(InetAddress.getByName(inetSocketAddress2.getHostName()), inetSocketAddress2.getPort());
}
HttpConnectProxiedSocketAddress.Builder proxyAddress = HttpConnectProxiedSocketAddress.newBuilder().setTargetAddress(inetSocketAddress).setProxyAddress(inetSocketAddress2);
if (requestPasswordAuthentication == null) {
return proxyAddress.build();
}
HttpConnectProxiedSocketAddress.Builder username = proxyAddress.setUsername(requestPasswordAuthentication.getUserName());
if (requestPasswordAuthentication.getPassword() != null) {
str = new String(requestPasswordAuthentication.getPassword());
}
return username.setPassword(str).build();
} catch (URISyntaxException e) {
log.log(Level.WARNING, "Failed to construct URI for proxy lookup, proceeding without proxy", e);
return null;
}
} catch (Throwable th) {
log.log(Level.WARNING, "Failed to get host for proxy lookup, proceeding without proxy", th);
return null;
}
}
private static InetSocketAddress overrideProxy(String str) {
if (str == null) {
return null;
}
String[] split = str.split(":", 2);
int i = 80;
if (split.length > 1) {
i = Integer.parseInt(split[1]);
}
log.warning("Detected GRPC_PROXY_EXP and will honor it, but this feature will be removed in a future release. Use the JVM flags \"-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT\" to set the https proxy for this JVM.");
return new InetSocketAddress(split[0], i);
}
}
|
[
"lucksonsurprice94@gmail.com"
] |
lucksonsurprice94@gmail.com
|
32cccfd402fc98d7bbdd77a0cad187274b76e681
|
32d373bdd62a23a8d1db79accde683d835bf1aa8
|
/j2ee/jproj/src/com/tencent/service/DownloadService.java
|
c935a3f9fac0c97dd27a1010fc2dad62d52b4cf5
|
[] |
no_license
|
sqsgalaxys/workspace
|
77f585574111369e1ea892838e7b4737e9e943f8
|
0777c68f530aaabffa9a5a294b14c449774b6ac3
|
refs/heads/master
| 2021-01-01T17:27:06.512834
| 2016-09-20T12:19:55
| 2016-09-20T12:19:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,462
|
java
|
package com.tencent.service;
import com.tencent.dao.BaseDao;
import com.tencent.impl.DownloadListener;
import com.tencent.impl.Downloadable;
import com.tencent.utils.IOUtils;
import com.tencent.utils.LogUtils;
import com.tencent.utils.NetUtils;
import com.tencent.utils.StringUtils;
import com.tencent.vo.Zz_upload;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Author : samlv .
* Date : 2016/1/7 9:54.
*/
public class DownloadService {
private List<Object> downloads;
private String savePath;
private List<DownloadListener> listeners = new ArrayList<DownloadListener>();
public void loadUploadEntitys(Class clazz){
BaseDao<Zz_upload> baseDao = new BaseDao<Zz_upload>(Zz_upload.class);
try {
Map<Object,Object> conditions = new HashMap<Object,Object>();
conditions.put("p_id",8);
this.downloads = baseDao.findByNameQuery(clazz.newInstance(),conditions,false);
} catch (Exception e) {
e.printStackTrace();
}
}
public String getSavePath() {
return savePath;
}
public void setSavePath(String savePath) {
this.savePath = savePath;
}
public void addDownloadListener(DownloadListener listener){
this.listeners.add(listener);
}
public void startDownload() throws IOException {
for (Object object : downloads){
Downloadable downItem = (Downloadable) object;
LogUtils.outLine("下载项目:"+downItem);
if(savePath == null || "".equals(savePath)){
savePath = IOUtils.getBasePath()+IOUtils.FILE_SP+"tmp";
File tmpDir = new File(savePath);
if(!tmpDir.exists()){
if(!tmpDir.mkdir()){
throw new IOException("无法创建tmp目录"+savePath);
}
}
}
String fullFName = savePath + IOUtils.FILE_SP + downItem.getFileName();
if(NetUtils.download(downItem.getUrl(),fullFName)){
notifyListener("finish",fullFName);
}
}
}
public void notifyListener(String type,String saveFile){
if("finish".equals(type)){
for (DownloadListener listener : listeners){
listener.downloadFinishd(saveFile);
}
}
}
}
|
[
"samlv@tencent.com"
] |
samlv@tencent.com
|
bdf3f23520aaab6408df8cb25b5e8b1d8d0d514a
|
60ad3755ef8d566d194f74e457cd08d823d4672f
|
/modules/activiti-rest/src/test/java/org/activiti/rest/conf/engine/ActivitiEngineConfiguration.java
|
201041cb04bda071ce7b18da965745f8f4baa907
|
[
"Apache-2.0"
] |
permissive
|
erdemedeiros/Activiti
|
fd0c62236b558e13139e55065cc4fc9958d12d59
|
bb32fac4a2a731de6a1790826c8967a1fabca7f2
|
refs/heads/master
| 2020-05-21T04:08:14.458613
| 2017-06-22T08:23:46
| 2017-06-22T08:26:45
| 84,570,538
| 2
| 0
| null | 2017-03-10T14:54:53
| 2017-03-10T14:54:53
| null |
UTF-8
|
Java
| false
| false
| 4,021
|
java
|
package org.activiti.rest.conf.engine;
import javax.sql.DataSource;
import org.activiti.engine.FormService;
import org.activiti.engine.HistoryService;
import org.activiti.engine.IdentityService;
import org.activiti.engine.ManagementService;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngineConfiguration;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.activiti.engine.impl.history.HistoryLevel;
import org.activiti.spring.ProcessEngineFactoryBean;
import org.activiti.spring.SpringProcessEngineConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.jdbc.datasource.SimpleDriverDataSource;
import org.springframework.transaction.PlatformTransactionManager;
@Configuration
public class ActivitiEngineConfiguration {
private final Logger log = LoggerFactory.getLogger(ActivitiEngineConfiguration.class);
@Bean
public DataSource dataSource() {
SimpleDriverDataSource ds = new SimpleDriverDataSource();
ds.setDriverClass(org.h2.Driver.class);
// Connection settings
ds.setUrl("jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000");
ds.setUsername("sa");
return ds;
}
@Bean(name = "transactionManager")
public PlatformTransactionManager annotationDrivenTransactionManager() {
DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();
transactionManager.setDataSource(dataSource());
return transactionManager;
}
@Bean(name="processEngineFactoryBean")
public ProcessEngineFactoryBean processEngineFactoryBean() {
ProcessEngineFactoryBean factoryBean = new ProcessEngineFactoryBean();
factoryBean.setProcessEngineConfiguration(processEngineConfiguration());
return factoryBean;
}
@Bean(name="processEngine")
public ProcessEngine processEngine() {
// Safe to call the getObject() on the @Bean annotated processEngineFactoryBean(), will be
// the fully initialized object instanced from the factory and will NOT be created more than once
try {
return processEngineFactoryBean().getObject();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Bean(name="processEngineConfiguration")
public ProcessEngineConfigurationImpl processEngineConfiguration() {
SpringProcessEngineConfiguration processEngineConfiguration = new SpringProcessEngineConfiguration();
processEngineConfiguration.setDataSource(dataSource());
processEngineConfiguration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
processEngineConfiguration.setTransactionManager(annotationDrivenTransactionManager());
processEngineConfiguration.setJobExecutorActivate(false);
processEngineConfiguration.setAsyncExecutorEnabled(true);
processEngineConfiguration.setAsyncExecutorActivate(false);
processEngineConfiguration.setHistoryLevel(HistoryLevel.FULL);
return processEngineConfiguration;
}
@Bean
public RepositoryService repositoryService() {
return processEngine().getRepositoryService();
}
@Bean
public RuntimeService runtimeService() {
return processEngine().getRuntimeService();
}
@Bean
public TaskService taskService() {
return processEngine().getTaskService();
}
@Bean
public HistoryService historyService() {
return processEngine().getHistoryService();
}
@Bean
public FormService formService() {
return processEngine().getFormService();
}
@Bean
public IdentityService identityService() {
return processEngine().getIdentityService();
}
@Bean
public ManagementService managementService() {
return processEngine().getManagementService();
}
}
|
[
"tijs.rademakers@gmail.com"
] |
tijs.rademakers@gmail.com
|
1a56c57ed41641f8e937a1a008ecd0ce73a076bb
|
e15874d3959a8aef6fef4352e26d34543f2c152f
|
/app/src/main/java/com/fragments/ProjectHeatMCrouselFragment.java
|
6af0c06ed2422649c98057de2ca3de8c248b008f
|
[] |
no_license
|
ankitmehtag/AnkitRahejaSales
|
c726d0a93403ce9368ec95f53447d05addb76ae4
|
7b9909a15975c1a8c508acfae6fe1fc0097575af
|
refs/heads/master
| 2022-12-17T13:02:54.058088
| 2020-09-22T07:31:02
| 2020-09-22T07:31:02
| 297,567,881
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,529
|
java
|
package com.fragments;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.sp.ProjectHeatmapActivity;
import com.sp.R;
import com.helper.BMHConstants;
import com.helper.UrlFactory;
import com.interfaces.CrouselOnItemClickListner;
import com.model.ProjectsListRespModel;
import com.utils.Utils;
import com.squareup.picasso.Picasso;
public class ProjectHeatMCrouselFragment extends Fragment {
public static final int FAVORITE_CLICK = 1;
public static final int CAROUSEL_ITEM_CLICK = 2;
public ProjectsListRespModel.Data heatmapDataModel;
public static ProjectHeatMCrouselFragment newInstance(ProjectsListRespModel.Data heatmapDataModel) {
ProjectHeatMCrouselFragment fragmentFirst = new ProjectHeatMCrouselFragment();
Bundle args = new Bundle();
args.putSerializable("obj", heatmapDataModel);
fragmentFirst.setArguments(args);
return fragmentFirst;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
if (container == null) {
return null;
}
final View mView = inflater.inflate(R.layout.project_crousel_item, container, false);
LinearLayout ll_crousel = (LinearLayout)mView.findViewById(R.id.ll_crousel);
LinearLayout ll_empty_view = (LinearLayout)mView.findViewById(R.id.ll_empty_view);
ImageView img = (ImageView) mView.findViewById(R.id.imageViewProp);
TextView tvRating = (TextView) mView.findViewById(R.id.tv_rating);
TextView tv_status = (TextView)mView.findViewById(R.id.tv_status);
TextView tvReturns = (TextView) mView.findViewById(R.id.returns);
TextView tv_builder_name = (TextView) mView.findViewById(R.id.tv_builder_name);
TextView tv_project_name = (TextView) mView.findViewById(R.id.tv_project_name);
TextView tv_locality = (TextView) mView.findViewById(R.id.tv_locality);
TextView tv_bhk = (TextView) mView.findViewById(R.id.tv_bhk);
TextView tv_psf = (TextView) mView.findViewById(R.id.tv_psf);
ImageView iv_fav = (ImageView)mView.findViewById(R.id.iv_fav);
TextView tvInfra = (TextView) mView.findViewById(R.id.tv_infra);
TextView tvNeeds = (TextView) mView.findViewById(R.id.tv_needs);
TextView tvLife = (TextView) mView.findViewById(R.id.tv_lifestyle);
heatmapDataModel = (ProjectsListRespModel.Data) this.getArguments().getSerializable("obj");
if(heatmapDataModel != null && heatmapDataModel.getID() != null) {
ll_crousel.setVisibility(View.VISIBLE);
ll_empty_view.setVisibility(View.GONE);
//BMHApplication app = (BMHApplication) getActivity().getApplication();
int rating = Utils.toInt(heatmapDataModel.getRatings_average());
tvRating.setText(String.valueOf(rating));
tvReturns.setText(heatmapDataModel.getPrice_one_year());
tv_status.setText(heatmapDataModel.getStatus());
tv_builder_name.setText(heatmapDataModel.getBuilder_name());
tv_project_name.setText(Html.fromHtml(heatmapDataModel.getDisplay_name()));
tv_locality.setText(heatmapDataModel.getExactlocation());
tv_bhk.setText(heatmapDataModel.getUnit_type());
String priceTxt = heatmapDataModel.getPsf() + " " + heatmapDataModel.getPsf_unit();
float pricePsf = Utils.toFloat(heatmapDataModel.getPsf());
if(pricePsf > 0) priceTxt = Utils.priceFormat(pricePsf) + " " + heatmapDataModel.getPsf_unit();
tv_psf.setText(priceTxt);
//String infra = heatmapDataModel.getInfra();
//String needs = heatmapDataModel.getNeeds();
//String life = heatmapDataModel.getLife_style();
tvInfra.setText(heatmapDataModel.getInfra());
tvNeeds.setText(heatmapDataModel.getNeeds());
tvLife.setText(heatmapDataModel.getLife_style());
if (heatmapDataModel.isFavorite()) {
iv_fav.setImageResource(R.drawable.favorite_filled);
} else {
iv_fav.setImageResource(R.drawable.new_heart);
}
if (heatmapDataModel.getBanner_img() != null && !heatmapDataModel.getBanner_img().isEmpty()) {
String imgurl = UrlFactory.getShortImageByWidthUrl(BMHConstants.CRAOUSEL_IMAGE_WIDTH, heatmapDataModel.getBanner_img());
Picasso.with(getActivity())
.load(imgurl)
.placeholder(BMHConstants.PLACE_HOLDER)
.error(BMHConstants.PLACE_HOLDER)
/*.error(BMHConstants.NO_IMAGE)*/
.resize(BMHConstants.CRAOUSEL_IMAGE_WIDTH, BMHConstants.CRAOUSEL_IMAGE_HEIGHT)
.into(img);
}
mView.setTag(R.integer.project_item, heatmapDataModel);
iv_fav.setTag(R.integer.project_item, heatmapDataModel);
iv_fav.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (getActivity() instanceof ProjectHeatmapActivity) {
CrouselOnItemClickListner mCrouselOnItemClickListner = (CrouselOnItemClickListner) getActivity();
v.setTag(R.integer.event, FAVORITE_CLICK);
mCrouselOnItemClickListner.onclickCrouselItem(v);
}
}
});
mView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (getActivity() instanceof ProjectHeatmapActivity) {
CrouselOnItemClickListner mCrouselOnItemClickListner = (CrouselOnItemClickListner) getActivity();
v.setTag(R.integer.event, CAROUSEL_ITEM_CLICK);
mCrouselOnItemClickListner.onclickCrouselItem(v);
}
}
});
}else{
ll_crousel.setVisibility(View.GONE);
ll_empty_view.setVisibility(View.VISIBLE);
}
return mView;
}
}
|
[
"sanjay01feb@gmail.com"
] |
sanjay01feb@gmail.com
|
be74c71a555f07f59f535f9e2d9ffb91d110f4eb
|
7e1315bb98e4247417770442aacb969ef6ed1c98
|
/src/chap05/BoxesPanel.java
|
42e2152174ef79f7d643f4e3fd3ea2e05090c1ae
|
[] |
no_license
|
htankhai/Org.JavaSoftwareSolution
|
f67fc335a1473c09fcb2d82d3d0d3a05caa8e421
|
64d320dcfb0f8d553ef77acf6f200e2559efb12f
|
refs/heads/master
| 2021-01-22T05:24:22.637657
| 2015-06-20T21:59:13
| 2015-06-20T21:59:13
| 37,787,257
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,037
|
java
|
package chap05;
//********************************************************************
// BoxesPanel.java Author: Lewis/Loftus
//
// Demonstrates the use of conditionals and loops to guide drawing.
//********************************************************************
import javax.swing.JPanel;
import java.awt.*;
import java.util.Random;
public class BoxesPanel extends JPanel
{
private final int NUM_BOXES = 50, THICKNESS = 5, MAX_SIDE = 50;
private final int MAX_X = 350, MAX_Y = 250;
private Random generator;
//-----------------------------------------------------------------
// Sets up the drawing panel.
//-----------------------------------------------------------------
public BoxesPanel ()
{
generator = new Random();
setBackground (Color.black);
setPreferredSize (new Dimension(400, 300));
}
//-----------------------------------------------------------------
// Paints boxes of random width and height in a random location.
// Narrow or short boxes are highlighted with a fill color.
//-----------------------------------------------------------------
public void paintComponent(Graphics page)
{
super.paintComponent (page);
int x, y, width, height;
for (int count = 0; count < NUM_BOXES; count++)
{
x = generator.nextInt(MAX_X) + 1;
y = generator.nextInt(MAX_Y) + 1;
width = generator.nextInt(MAX_SIDE) + 1;
height = generator.nextInt(MAX_SIDE) + 1;
if (width <= THICKNESS) // check for narrow box
{
page.setColor (Color.yellow);
page.fillRect (x, y, width, height);
}
else
if (height <= THICKNESS) // check for short box
{
page.setColor (Color.green);
page.fillRect (x, y, width, height);
}
else
{
page.setColor (Color.white);
page.drawRect (x, y, width, height);
}
}
}
}
|
[
"htan.khai@yahoo.com"
] |
htan.khai@yahoo.com
|
6eb6637fde6d745e77980ac0398a5a630f590a50
|
d1bd1246f161b77efb418a9c24ee544d59fd1d20
|
/android/myapplication/trunk/src/org/javenstudio/android/data/media/CacheReader.java
|
e4b6ff26bc9577a8826d39eac272230eaac6b9d0
|
[] |
no_license
|
navychen2003/javen
|
f9a94b2e69443291d4b5c3db5a0fc0d1206d2d4a
|
a3c2312bc24356b1c58b1664543364bfc80e816d
|
refs/heads/master
| 2021-01-20T12:12:46.040953
| 2015-03-03T06:14:46
| 2015-03-03T06:14:46
| 30,912,222
| 0
| 1
| null | 2023-03-20T11:55:50
| 2015-02-17T10:24:28
|
Java
|
UTF-8
|
Java
| false
| false
| 2,049
|
java
|
package org.javenstudio.android.data.media;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import org.javenstudio.android.data.CacheData;
import org.javenstudio.cocoka.storage.StorageFile;
import org.javenstudio.cocoka.util.Utils;
import org.javenstudio.common.util.Logger;
public abstract class CacheReader {
private static final Logger LOG = Logger.getLogger(CacheReader.class);
private final CacheData mService;
public CacheReader(CacheData service) {
mService = service;
}
protected String getCacheFileName(MediaSet mediaSet) {
return mediaSet.getDataPath().toString();
}
public final boolean readCache(MediaSet mediaSet) {
InputStream stream = null;
try {
String filename = getCacheFileName(mediaSet);
StorageFile file = mService.openFile(filename, 0);
if (file != null) {
stream = file.openFile();
if (stream != null) {
DataInputStream in = new DataInputStream(stream);
return read(in);
}
} else {
if (LOG.isDebugEnabled())
LOG.debug("Cannot open cache file: " + filename);
}
} catch (Throwable e) {
if (LOG.isErrorEnabled())
LOG.error(e.toString(), e);
} finally {
Utils.closeSilently(stream);
}
return false;
}
protected abstract boolean read(DataInput in) throws IOException;
protected boolean isInterrupt() { return false; }
protected void readMediaItem(DataInput in, MediaSet set) throws IOException {}
protected void readMediaSet(DataInput in, MediaSet set) throws IOException {}
protected void readItems(DataInput in, MediaSet set) throws IOException {
{
int count = in.readInt();
for (int i=0; i < count; i++) {
readMediaItem(in, set);
}
}
{
int count = in.readInt();
for (int i=0; i < count; i++) {
readMediaSet(in, set);
if (isInterrupt()) break;
}
}
}
}
|
[
"navychen2003@hotmail.com"
] |
navychen2003@hotmail.com
|
52ebe50f735048fe918284f1a164d1142700ad1c
|
69077023d6ddbfc2d488122e91e626c82d72f5be
|
/play2-providers/play2-provider-play21/src/main/java/com/google/code/play2/provider/play21/Play21Provider.java
|
217c6a2ae2b7381b59aa1efbf25152a450dda856
|
[
"Apache-2.0"
] |
permissive
|
mabrcosta/play2-maven-plugin
|
20111ccd353b4740db1fc3485efe382796e0ea3f
|
eb3baf1d95d648ed7cedddb295b25836c73dec3a
|
refs/heads/master
| 2020-05-18T08:23:38.076641
| 2019-04-30T16:18:47
| 2019-04-30T17:55:09
| 184,292,984
| 0
| 0
| null | 2019-04-30T16:07:11
| 2019-04-30T16:07:11
| null |
UTF-8
|
Java
| false
| false
| 2,471
|
java
|
/*
* Copyright 2013-2019 Grzegorz Slowikowski (gslowikowski at gmail dot 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 com.google.code.play2.provider.play21;
import com.google.code.play2.provider.api.Play2CoffeescriptCompiler;
import com.google.code.play2.provider.api.Play2EbeanEnhancer;
import com.google.code.play2.provider.api.Play2JavaEnhancer;
import com.google.code.play2.provider.api.Play2JavascriptCompiler;
import com.google.code.play2.provider.api.Play2LessCompiler;
import com.google.code.play2.provider.api.Play2Provider;
import com.google.code.play2.provider.api.Play2RoutesCompiler;
import com.google.code.play2.provider.api.Play2Runner;
import com.google.code.play2.provider.api.Play2TemplateCompiler;
import org.codehaus.plexus.component.annotations.Component;
/**
* Plugin provider for Play! 2.1.x
*/
@Component( role = Play2Provider.class, hint = "play21", description = "Play! 2.1.x" )
public class Play21Provider
implements Play2Provider
{
@Override
public Play2LessCompiler getLessCompiler()
{
return new Play21LessCompiler();
}
@Override
public Play2CoffeescriptCompiler getCoffeescriptCompiler()
{
return new Play21CoffeescriptCompiler();
}
@Override
public Play2JavascriptCompiler getJavascriptCompiler()
{
return new Play21JavascriptCompiler();
}
@Override
public Play2RoutesCompiler getRoutesCompiler()
{
return new Play21RoutesCompiler();
}
@Override
public Play2TemplateCompiler getTemplatesCompiler()
{
return new Play21TemplateCompiler();
}
@Override
public Play2JavaEnhancer getEnhancer()
{
return new Play21JavaEnhancer();
}
@Override
public Play2EbeanEnhancer getEbeanEnhancer()
{
return new Play21EbeanEnhancer();
}
@Override
public Play2Runner getRunner()
{
return new Play21Runner();
}
}
|
[
"gslowikowski@gmail.com"
] |
gslowikowski@gmail.com
|
3d486642bbc8ba410b14df52a0608d42b9c561b8
|
0688ed4fbbbd19613cc453c568af75ba59ae5144
|
/app/src/main/java/com/baofeng/mj/vrplayer/util/SoundUtils.java
|
3b2d1d1df56c8c71921f2d3301fc2916c0825ac5
|
[] |
no_license
|
playbar/testplayer
|
49c068e53a5b93768b4d46f4f9b8d2bb739ff7fe
|
b4869ed9193739ab48c067cd51b4f5084943e924
|
refs/heads/master
| 2021-05-07T03:37:09.438661
| 2017-11-20T03:38:59
| 2017-11-20T03:38:59
| 110,958,488
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,322
|
java
|
package com.baofeng.mj.vrplayer.util;
import android.content.Context;
import android.media.AudioManager;
/**
* Created by wanghongfang on 2016/7/22.
*/
public class SoundUtils {
/**
* 设置声音百分比
* @param level
*/
public static void SetSoundVolume(Context mContext, int level){
AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
int max = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
int current =(int)( max*(level/100f));
am.setStreamVolume(AudioManager.STREAM_MUSIC, current, 0);
}
public static void addSoundVolume(Context mContext, int add){
AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
int current = am.getStreamVolume(AudioManager.STREAM_MUSIC);
int max = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
am.setStreamVolume(AudioManager.STREAM_MUSIC, Math.max(Math.min(max, current + add), 0), 0);
}
/**
* 静音或关闭静音
* @param ismute true:静音 false:关闭静音
*/
public static void SetVolumeMute(Context mContext, boolean ismute){
AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
am.setStreamMute(AudioManager.STREAM_MUSIC,ismute);
}
public static boolean isVolumeMute(Context mContext){
int volume = GetSystemCurVolume(mContext);
return volume==0;
}
public static int GetCurrentVolumePercent(Context mContext){
AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
int current = am.getStreamVolume(AudioManager.STREAM_MUSIC);
int max = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
int c = (int)((current/((float)max))*100);
return c;
}
public static int GetSystemCurVolume(Context mContext){
AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
int current = am.getStreamVolume(AudioManager.STREAM_MUSIC);
return current;
}
public static void SetSystemVolume(Context mContext, int value){
AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
am.setStreamVolume(AudioManager.STREAM_MUSIC, value, 0);
}
}
|
[
"hgl868@126.com"
] |
hgl868@126.com
|
810d2a1530f2b9c3b63f61d0bccf35a33bd2c977
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MOCKITO-10b-9-21-PESA_II-WeightedSum:TestLen:CallDiversity/org/mockito/internal/handler/MockHandlerImpl_ESTest_scaffolding.java
|
9afb74715732699fb1c2c9f5ec12cda58ad479b7
|
[] |
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
| 448
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 09:44:51 UTC 2020
*/
package org.mockito.internal.handler;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class MockHandlerImpl_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
0995f5ab085cc75369fa778ccbb5372aae28d004
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava4/Foo124.java
|
c5c9ca61299202a40cd85e0778608eaf8df2445d
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 346
|
java
|
package applicationModulepackageJava4;
public class Foo124 {
public void foo0() {
new applicationModulepackageJava4.Foo123().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
21d07bb3882dd58b38e92f1042505c49c047783f
|
a3529b16fb338a4283e0b8a29eb75c3632ee0c38
|
/src/test/java/org/jacpfx/test/vertx/spring/InjectionTestConfiguration.java
|
fd6f57bda952c160459ca89c37f2e64a2077d8a5
|
[
"Apache-2.0"
] |
permissive
|
hyowong/spring-vertx-ext
|
42870012091be7b7ff1aee74d1d655985e7bfd69
|
beda41d5d82d0559c32ed0276bc639472b8c0682
|
refs/heads/master
| 2020-07-27T00:27:02.994478
| 2019-04-03T17:04:36
| 2019-04-03T17:04:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 443
|
java
|
package org.jacpfx.test.vertx.spring;
import io.vertx.core.Vertx;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class InjectionTestConfiguration {
@Autowired Vertx vertx;
@Bean
public InjectionTestService testService() {
return new InjectionTestService();
}
}
|
[
"amo.ahcp@gmail.com"
] |
amo.ahcp@gmail.com
|
4108f6d85d372041de6f78792173fd5b93b5d0db
|
2f1a723296a3701c767e9b5c188f1dc1b7383ea5
|
/src/main/java/com/ibcs/desco/admin/dao/ObjectRefDaoImpl.java
|
4713d7c79680cfdebc7fc6fd1a7c918708af2c1f
|
[] |
no_license
|
abutaleb6/Inventory_Management
|
1c27f43ddbd4741fbe13f4748e6c7594bac8494d
|
b85f76e8f0ebc5399d00a0ce7dcc2d6e6ea9bec1
|
refs/heads/master
| 2021-01-13T10:18:02.988037
| 2017-01-26T14:38:30
| 2017-01-26T14:38:30
| 69,749,923
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,088
|
java
|
package com.ibcs.desco.admin.dao;
import java.util.List;
import javax.transaction.Transactional;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.stereotype.Repository;
import com.ibcs.desco.admin.model.ObjectReference;
@Repository
public class ObjectRefDaoImpl implements ObjectRefDao {
// sessionFactory for get Current Session and comes form servlet-context.xml
private SessionFactory sessionFactory;
// sessionFactory set from servlet-context.xml
public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
@SuppressWarnings("unchecked")
@Override
@Transactional
public List<ObjectReference> listObjects() {
Session session = this.sessionFactory.getCurrentSession();
return (List<ObjectReference>) session.createCriteria(
ObjectReference.class).list();
}
@Override
@Transactional
public ObjectReference getObjectReference(int id){
Session session = this.sessionFactory.getCurrentSession();
return (ObjectReference)session.get(ObjectReference.class, id);
}
}
|
[
"abu.taleb@ibcs-primax.com"
] |
abu.taleb@ibcs-primax.com
|
64caec37389e11963548dac9f5a07d826ca3be08
|
60f7b508bed2dffa32cff6c3f50d6dd6b0f25507
|
/user-center/src/main/java/com/boyu/erp/platform/usercenter/TPOS/service/impl/ItemUploadingImpl.java
|
e47561208eef4f79a4d4c3d4e5db51446eae226f
|
[] |
no_license
|
clfbai/heoll
|
8cca5d62eb8bce47d0882b07fb328baf508612b5
|
69845c4e78437bb0aea79a32d6a24c2fc299f388
|
refs/heads/master
| 2022-09-29T09:03:58.700436
| 2019-12-21T05:06:43
| 2019-12-21T05:06:43
| 165,189,003
| 0
| 0
| null | 2022-09-01T23:17:47
| 2019-01-11T06:08:00
|
Java
|
UTF-8
|
Java
| false
| false
| 6,168
|
java
|
package com.boyu.erp.platform.usercenter.TPOS.service.impl;
import com.boyu.erp.platform.usercenter.TPOS.common.goods.Item;
import com.boyu.erp.platform.usercenter.TPOS.common.goods.ItemExtendProps;
import com.boyu.erp.platform.usercenter.TPOS.common.goods.listgoods.Items;
import com.boyu.erp.platform.usercenter.TPOS.common.goods.listgoods.ListItems;
import com.boyu.erp.platform.usercenter.TPOS.common.goods.singgoods.SingleItem;
import com.boyu.erp.platform.usercenter.TPOS.entity.godown.common.ResponseOrder;
import com.boyu.erp.platform.usercenter.TPOS.model.CwmsUrlParamModel;
import com.boyu.erp.platform.usercenter.TPOS.service.ItemUploadingService;
import com.boyu.erp.platform.usercenter.TPOS.service.RequestTPOService;
import com.boyu.erp.platform.usercenter.entity.goods.ProdCls;
import com.boyu.erp.platform.usercenter.entity.goods.Product;
import com.boyu.erp.platform.usercenter.entity.system.SysUser;
import com.boyu.erp.platform.usercenter.exception.ServiceException;
import com.boyu.erp.platform.usercenter.mapper.goods.ProdClsMapper;
import com.boyu.erp.platform.usercenter.service.base.InterfaceLog;
import com.boyu.erp.platform.usercenter.utils.DateUtil;
import com.boyu.erp.platform.usercenter.utils.RandomStringUtils;
import com.boyu.erp.platform.usercenter.utils.StringUtils;
import com.boyu.erp.platform.usercenter.vo.CommonFainl;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
@Slf4j
@Service
@Transactional
public class ItemUploadingImpl implements ItemUploadingService {
@Autowired
private InterfaceLog interfaceLog;
@Autowired
private RequestTPOService requestTPOService;
@Autowired
private ProdClsMapper prodClsMapper;
@Value("${secret}")
private String secret;
@Value("${app_key}")
private String appKey;
@Value("${customer_id}")
private String customerId;
/**
* 功能描述: 批量同步
*
* @param:
* @return:
* @auther: CLF
* @date: 2019/11/26 11:22
*/
@Override
public ListItems createItems(ProdCls prodCls, String type, SysUser user) throws ServiceException {
List<Map<String, Object>> list = prodClsMapper.selectCwmsUploading(prodCls);
if (CollectionUtils.isEmpty(list)) {
log.info("没有商品明细无须同步");
return null;
}
ListItems listItems = this.MapItems(list);
listItems.setActionType(type);
return listItems;
}
@Override
public void sendCwmsItme(ListItems listItems, SysUser user) throws Exception {
CwmsUrlParamModel cwmsUrlParamModel = new CwmsUrlParamModel();
//前缀 目前按照给的 demo 就是 app_key
cwmsUrlParamModel.setSecret(secret);
cwmsUrlParamModel.setAppKey(appKey);
cwmsUrlParamModel.setCustomerid(customerId);
cwmsUrlParamModel.setRequestMapping("/api/qm2");
cwmsUrlParamModel.setMethod("taobao.qimen");
cwmsUrlParamModel.setTimestamp(DateUtil.dateToString(new Date()));
cwmsUrlParamModel.setObjXml(requestTPOService.createObjXml(listItems));
String uuid = RandomStringUtils.crateUuid(6);
ResponseOrder responseOrder = requestTPOService.createCwmsURL(cwmsUrlParamModel, uuid, ResponseOrder.class);
interfaceLog.CWMSLog(cwmsUrlParamModel, responseOrder, "CMS同步商品", uuid, user);
}
/**
* 功能描述: 单条同步
*
* @param:
* @return:
* @auther: CLF
* @date: 2019/11/26 11:22
*/
@Override
public SingleItem createItem(Product product, String type, SysUser user) {
return null;
}
public ListItems MapItems(List<Map<String, Object>> maps) throws ServiceException {
ListItems listItems = new ListItems();
List<Item> itemList = new ArrayList<>();
for (Map<String, Object> map : maps) {
if (StringUtils.NullEmpty(String.valueOf(map.get("warehouseCode")))) {
throw new ServiceException("403", "商品存储仓库为空");
}
if (StringUtils.NullEmpty(String.valueOf(map.get("ownerCode")))) {
throw new ServiceException("403", "商品管理组织为空");
}
if (StringUtils.NullEmpty(String.valueOf(map.get("barCode")))) {
throw new ServiceException("403", "商品code为空");
}
Item goods = new Item();
goods.setColor(String.valueOf(map.get("color")));
goods.setItemId(String.valueOf(map.get("itemId")));
goods.setBarCode(String.valueOf(map.get("barCode")));
goods.setItemCode(String.valueOf(map.get("itemCode")));
goods.setItemName(String.valueOf(map.get("itemName")));
goods.setItemType("ZC");
goods.setIsSku(CommonFainl.TRUE);
Double pr = StringUtils.NullEmpty(map.get("purchasePrice") + "") == true ? 0d : (Double.parseDouble(map.get("purchasePrice") + ""));
goods.setPurchasePrice(pr);
goods.setBrandCode(Double.parseDouble(map.get("brandCode") + ""));
goods.setBrandName(String.valueOf(map.get("brandName")));
Double gr = StringUtils.NullEmpty(map.get("grossWeight") + "") == true ? 0d : (Double.parseDouble(map.get("grossWeight") + ""));
goods.setGrossWeight(gr);
goods.setSeasonCode(String.valueOf(map.get("seasonCode")));
itemList.add(goods);
listItems.setWarehouseCode(String.valueOf(map.get("warehouseCode")));
listItems.setOwnerCode(String.valueOf(map.get("ownerCode")));
ItemExtendProps extendProps = new ItemExtendProps();
extendProps.setBoxLength(0);
goods.setExtendProps(extendProps);
}
Items items = new Items();
items.setItem(itemList);
listItems.setItems(items);
return listItems;
}
}
|
[
"https://gitee.com/onecaolf/mytext.git"
] |
https://gitee.com/onecaolf/mytext.git
|
906681904d3d6f149125bce764806c6777262713
|
a7d2b45e72d745f51db450cc16dc332269a6b5f1
|
/AlmullaExchange/src/com/amg/exchange/bco/bean/HeadOfficeComplianceOfficerBean.java
|
e9f57be73fa794a45cd182739febe216aef101d0
|
[] |
no_license
|
Anilreddyvasantham/AlmullaExchange
|
2974ecd53b1d752931c50b7ecd22c5a37fa05a03
|
b68bca218ce4b7585210deeda2a8cf84c6306ee3
|
refs/heads/master
| 2021-05-08T17:48:01.976582
| 2018-02-02T09:32:22
| 2018-02-02T09:32:22
| 119,484,446
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,159
|
java
|
package com.amg.exchange.bco.bean;
import java.io.IOException;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.event.AjaxBehaviorEvent;
import org.apache.log4j.Logger;
import org.primefaces.context.RequestContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import com.amg.exchange.common.model.CompanyMaster;
import com.amg.exchange.common.model.CountryMaster;
import com.amg.exchange.common.model.CountryMasterDesc;
import com.amg.exchange.common.service.IGeneralService;
import com.amg.exchange.registration.model.CustomerIdProof;
import com.amg.exchange.treasury.bean.FundEstimationBean;
import com.amg.exchange.treasury.model.BankAccount;
import com.amg.exchange.treasury.model.BankBranch;
import com.amg.exchange.treasury.model.BankMaster;
import com.amg.exchange.treasury.model.CurrencyMaster;
import com.amg.exchange.treasury.service.IBankAccountService;
import com.amg.exchange.treasury.service.IBankApprovalService;
import com.amg.exchange.treasury.service.IFundEstimationService;
import com.amg.exchange.util.SessionStateManage;
@Component("hoco")
@Scope("session")
public class HeadOfficeComplianceOfficerBean<T> implements Serializable {
private static final long serialVersionUID = 1L;
private static final Logger LOG = Logger
.getLogger(HeadOfficeComplianceOfficerBean.class);
private boolean headOfficeRender=false;
public void pageNavigation() {
setHeadOfficeRender(false);
try {
FacesContext.getCurrentInstance().getExternalContext()
.redirect("../bco/headofficecomplianceofficer.xhtml");
} catch (Exception e) {
e.printStackTrace();
}
}
public void submitBranchOfficer(){
}
//Properties get/set
public boolean isHeadOfficeRender() {
return headOfficeRender;
}
public void setHeadOfficeRender(boolean headOfficeRender) {
this.headOfficeRender = headOfficeRender;
}
}
|
[
"anilreddy.vasantham@gmail.com"
] |
anilreddy.vasantham@gmail.com
|
a6f7517166a671eb61574a47a687576fd555cd2e
|
2f45b99b684f62b2e9413a302a22a7677c22580c
|
/cts/tests/tests/webkitsecurity/src/android/webkitsecurity/cts/WebkitDestroyCellWithSelectionCrashTest.java
|
4b9ea13af1dd16bcc0622d6e2adaed6212f22a2b
|
[] |
no_license
|
b2gdev/Android-JB-4.1.2
|
05e15a4668781cd9c9f63a1fa96bf08d9bdf91de
|
e66aea986bbf29ff70e5ec4440504ca24f8104e1
|
refs/heads/user
| 2020-04-06T05:44:17.217452
| 2018-04-13T15:43:57
| 2018-04-13T15:43:57
| 35,256,753
| 3
| 12
| null | 2020-03-09T00:08:24
| 2015-05-08T03:32:21
| null |
UTF-8
|
Java
| false
| false
| 3,932
|
java
|
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.webkitsecurity.cts;
import java.util.Date;
import android.net.Uri;
import android.util.Log;
import junit.framework.Assert;
import java.io.File;
import java.io.FileInputStream;
import android.webkit.WebView;
import android.webkit.WebSettings;
import android.webkit.MimeTypeMap;
import android.cts.util.PollingCheck;
import android.content.Context;
import android.content.res.AssetManager;
import android.test.UiThreadTest;
import android.test.ActivityInstrumentationTestCase2;
import android.webkitsecurity.cts.WebViewStubActivity;
/*
* This file acts as a template for the generation of other webkit tests.
*
* The contents of the assets/webkitsecuritytests directory will be scanned
* for html files, and for each one found a new class will be generated based
* on this template.
*
* The specific things that have to be done to this template are:
*
* 1. Change the name to Webkit + javify(testname) + Test
* 2. Change the private TEST_PATH value to the test's name
* 3. Change the logtag to shellify(testname)
* 4. Change the constructor name to <classname>
* 5. Save this as <classname>.java
* 6. TODO: Remove this comment
*
*/
public class WebkitDestroyCellWithSelectionCrashTest extends ActivityInstrumentationTestCase2<WebViewStubActivity> {
private static final String LOGTAG = "WebkitDestroyCellWithSelectionCrashTest";
private static final String TEST_PATH = "destroy-cell-with-selection-crash.html";
private static final int INITIAL_PROGRESS = 100;
private static long TEST_TIMEOUT = 20000L;
private static long TIME_FOR_LAYOUT = 1000L;
private WebView mWebView;
private boolean mIsUiThreadDone;
public WebkitDestroyCellWithSelectionCrashTest() {
super("android.webkitsecurity.cts", WebViewStubActivity.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
mWebView = getActivity().getWebView();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}
@UiThreadTest
public void testWebkitCrashes() throws Exception {
// set up the webview
mWebView = new WebView(getActivity());
getActivity().setContentView(mWebView);
// We need to be able to run JS for most of these tests
WebSettings settings = mWebView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
// Get the url for the test
Log.d(LOGTAG, TEST_PATH);
String url = "file:///android_asset/" + TEST_PATH;
Log.d(LOGTAG, url.toString());
// Run the test
assertLoadUrlSuccessfully(url);
}
private void assertLoadUrlSuccessfully(String url) {
mWebView.loadUrl(url);
waitForLoadComplete();
}
private void waitForLoadComplete() {
new PollingCheck(TEST_TIMEOUT) {
@Override
protected boolean check() {
return mWebView.getProgress() == 100;
}
}.run();
try {
Thread.sleep(TIME_FOR_LAYOUT);
} catch (InterruptedException e) {
Log.w(LOGTAG, "waitForLoadComplete() interrupted while sleeping for layout delay.");
}
}
}
|
[
"ruvindad@zone24x7.com"
] |
ruvindad@zone24x7.com
|
d311dfa9d4b80f516275cc801e68f292cfe3c409
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/java-design-patterns/learning/853/App.java
|
066a686ca65108c689e0e6697c9cd5351fba1cd2
|
[] |
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
| 4,946
|
java
|
/**
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
* <p>
* 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:
* <p>
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p>
* 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.iluwatar.featuretoggle;
import com.iluwatar.featuretoggle.pattern.Service;
import com.iluwatar.featuretoggle.pattern.propertiesversion.PropertiesFeatureToggleVersion;
import com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion;
import com.iluwatar.featuretoggle.user.User;
import com.iluwatar.featuretoggle.user.UserGroup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Properties;
/**
* The Feature Toggle pattern allows for complete code executions to be turned on or off with ease. This allows features
* to be controlled by either dynamic methods just as {@link User} information or by {@link Properties}. In the App
* below there are two examples. Firstly the {@link Properties} version of the feature toggle, where the enhanced
* version of the welcome message which is personalised is turned either on or off at instance creation. This method
* is not as dynamic as the {@link User} driven version where the feature of the personalised welcome message is
* dependant on the {@link UserGroup} the {@link User} is in. So if the user is a memeber of the
* {@link UserGroup#isPaid(User)} then they get an ehanced version of the welcome message.
*
* Note that this pattern can easily introduce code complexity, and if not kept in check can result in redundant
* unmaintained code within the codebase.
*
*/
public class App {
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
/**
* Block 1 shows the {@link PropertiesFeatureToggleVersion} being run with {@link Properties} setting the feature
* toggle to enabled.
*
* Block 2 shows the {@link PropertiesFeatureToggleVersion} being run with {@link Properties} setting the feature
* toggle to disabled. Notice the difference with the printed welcome message the username is not included.
*
* Block 3 shows the {@link com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion} being
* set up with two users on who is on the free level, while the other is on the paid level. When the
* {@link Service#getWelcomeMessage(User)} is called with the paid {@link User} note that the welcome message
* contains their username, while the same service call with the free tier user is more generic. No username is
* printed.
*
* @see User
* @see UserGroup
* @see Service
* @see PropertiesFeatureToggleVersion
* @see com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion
*/
public static void main(String[] args) {
final Properties properties = new Properties();
properties.put("enhancedWelcome", true);
Service service = new PropertiesFeatureToggleVersion(properties);
final String welcomeMessage = service.getWelcomeMessage(new User("Jamie No Code"));
LOGGER.info(welcomeMessage);
// ---------------------------------------------
final Properties turnedOff = new Properties();
turnedOff.put("enhancedWelcome", false);
Service turnedOffService = new PropertiesFeatureToggleVersion(turnedOff);
final String welcomeMessageturnedOff = turnedOffService.getWelcomeMessage(new User("Jamie No Code"));
LOGGER.info(welcomeMessageturnedOff);
// --------------------------------------------
Service service2 = new TieredFeatureToggleVersion();
final User paidUser = new User("Jamie Coder");
final User freeUser = new User("Alan Defect");
UserGroup.addUserToPaidGroup(paidUser);
UserGroup.addUserToFreeGroup(freeUser);
final String welcomeMessagePaidUser = service2.getWelcomeMessage(paidUser);
final String welcomeMessageFreeUser = service2.getWelcomeMessage(freeUser);
LOGGER.info(welcomeMessageFreeUser);
LOGGER.info(welcomeMessagePaidUser);
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
38be13072f90c087e82b6cdd7e29d3979850d85d
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_381/Testnull_38052.java
|
cabb7b4a0495138cd6c544d1f8c5778a85e30d3e
|
[] |
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_381;
import static org.junit.Assert.*;
public class Testnull_38052 {
private final Productionnull_38052 production = new Productionnull_38052("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
40302c572da22931b515c163760ce2e1c32e8d1f
|
9d31c5ea5cbca020ba8403de3a5a8b00b016cf89
|
/android/src/main/java/com/github/ray8876/tx_call/TxCallPlugin.java
|
f85094437375643b56aa74daf9d682f5f812c663
|
[] |
no_license
|
Ray8876/tx-call
|
601a68ecfc4a323fe1f8511e715c9068802cf598
|
258a4be2ed6be20a5f34690e7ffe985c9ebca34f
|
refs/heads/master
| 2022-07-17T15:11:34.548257
| 2020-05-13T14:02:09
| 2020-05-13T14:02:09
| 263,586,268
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,083
|
java
|
package com.github.ray8876.tx_call;
import android.content.Context;
import androidx.annotation.NonNull;
import com.github.ray8876.tx_call.util.GenerateTestUserSig;
import com.github.ray8876.tx_call.util.MessageToFlutter;
import com.github.ray8876.tx_call.util.OneForOne;
import java.util.Map;
import io.flutter.embedding.engine.plugins.FlutterPlugin;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
/** TxCallPlugin */
public class TxCallPlugin implements FlutterPlugin, MethodCallHandler {
public static Context context;
@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
final MethodChannel channel = new MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "tx_call");
channel.setMethodCallHandler(new TxCallPlugin());
MessageToFlutter.initEventChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor());
}
// public static void registerWith(Registrar registrar) {
// final MethodChannel channel = new MethodChannel(registrar.messenger(), "tx_call");
// channel.setMethodCallHandler(new TxCallPlugin());
// }
@Override
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
switch (call.method){
case "getPlatformVersion":
result.success("Android " + android.os.Build.VERSION.RELEASE);
break;
case "enterRoom":
try{
Map mp = (Map) call.arguments;
int _userId = (int) mp.get("userId");
int appID = (int) mp.get("appID");
String userId = String.valueOf(_userId);
String userSign = GenerateTestUserSig.genTestUserSig(userId);
OneForOne.Init(userId,appID,userSign,context);
// MessageToFlutter.events.success("that amazing!!");
result.success("enterRoom Done");
}catch (Exception e){
result.success(e.toString());
}
break;
case "sendCall":
try{
Map mp = (Map) call.arguments;
int _userId = (int) mp.get("userId");
String userId = String.valueOf(_userId);
OneForOne.sendCall(userId);
result.success("sendCall Done");
}catch (Exception e){
result.success(e.toString());
}
break;
case "getCall":
try{
Map mp = (Map) call.arguments;
int data = (int) mp.get("data");
if (data == 2){
OneForOne.hangup();
result.success("挂了");
}
else if (data == 1) {
OneForOne.accept();
result.success("接了");
}
else {
OneForOne.reject();
result.success("没接");
}
}catch (Exception e){
result.success(e.toString());
}
case "setHandsFree":
try{
Map mp = (Map) call.arguments;
int data = (int) mp.get("data");
if (data == 1) {
OneForOne.setHandsFree(true);
result.success("免提");
}
else {
OneForOne.setHandsFree(false);
result.success("听筒");
}
}catch (Exception e){
result.success(e.toString());
}
case "setMicMute":
try{
Map mp = (Map) call.arguments;
int data = (int) mp.get("data");
if (data == 1) {
OneForOne.setMicMute(true);
result.success("开启静音");
}
else {
OneForOne.setMicMute(false);
result.success("关闭静音");
}
}catch (Exception e){
result.success(e.toString());
}
result.success("不要点了,方法还没写呢");
break;
default:
result.success("方法名写错了?");
break;
}
}
@Override
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
}
}
|
[
"123456"
] |
123456
|
20fc5499b6989381d6ddbd02c4c881954e77103c
|
b78d96a8660f90649035c7a6d6698cabb2946d62
|
/solutions/ModelJoin/src/main/java/CIM/IEC61970/OperationalLimits/OperationalLimitDirectionKind.java
|
e48bf26e8d8c2243e84d9f8805438b23897b3272
|
[
"MIT"
] |
permissive
|
suchaoxiao/ttc2017smartGrids
|
d7b677ddb20a0adc74daed9e3ae815997cc86e1a
|
2997f1c202f5af628e50f5645c900f4d35f44bb7
|
refs/heads/master
| 2021-06-19T10:21:22.740676
| 2017-07-14T12:13:22
| 2017-07-14T12:13:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,769
|
java
|
/**
*/
package CIM.IEC61970.OperationalLimits;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Operational Limit Direction Kind</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see CIM.IEC61970.OperationalLimits.OperationalLimitsPackage#getOperationalLimitDirectionKind()
* @model
* @generated
*/
public enum OperationalLimitDirectionKind implements Enumerator {
/**
* The '<em><b>High</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #HIGH_VALUE
* @generated
* @ordered
*/
HIGH(0, "high", "high"),
/**
* The '<em><b>Absolute Value</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #ABSOLUTE_VALUE_VALUE
* @generated
* @ordered
*/
ABSOLUTE_VALUE(1, "absoluteValue", "absoluteValue"),
/**
* The '<em><b>Low</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #LOW_VALUE
* @generated
* @ordered
*/
LOW(2, "low", "low");
/**
* The '<em><b>High</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>High</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #HIGH
* @model name="high"
* @generated
* @ordered
*/
public static final int HIGH_VALUE = 0;
/**
* The '<em><b>Absolute Value</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Absolute Value</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #ABSOLUTE_VALUE
* @model name="absoluteValue"
* @generated
* @ordered
*/
public static final int ABSOLUTE_VALUE_VALUE = 1;
/**
* The '<em><b>Low</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Low</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #LOW
* @model name="low"
* @generated
* @ordered
*/
public static final int LOW_VALUE = 2;
/**
* An array of all the '<em><b>Operational Limit Direction Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final OperationalLimitDirectionKind[] VALUES_ARRAY =
new OperationalLimitDirectionKind[] {
HIGH,
ABSOLUTE_VALUE,
LOW,
};
/**
* A public read-only list of all the '<em><b>Operational Limit Direction Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<OperationalLimitDirectionKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Operational Limit Direction Kind</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param literal the literal.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static OperationalLimitDirectionKind get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
OperationalLimitDirectionKind result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Operational Limit Direction Kind</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name the name.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static OperationalLimitDirectionKind getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
OperationalLimitDirectionKind result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Operational Limit Direction Kind</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the integer value.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static OperationalLimitDirectionKind get(int value) {
switch (value) {
case HIGH_VALUE: return HIGH;
case ABSOLUTE_VALUE_VALUE: return ABSOLUTE_VALUE;
case LOW_VALUE: return LOW;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private OperationalLimitDirectionKind(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //OperationalLimitDirectionKind
|
[
"hinkel@fzi.de"
] |
hinkel@fzi.de
|
5b1692b90fbd995aa11207a41907c6bedd08a1dd
|
df250bd0a8132668848b253d2d415711a2ca67aa
|
/app/src/main/java/com/cxw/cxwproject/inter/OrderDetailsViewInter.java
|
595077ab7c216e04be51cbf5190781ee67afa210
|
[] |
no_license
|
Sekei/cxwpoject
|
1038a76052d38b92d25d84c420663a5b6fd1bd3a
|
5dc96fa45ae4d0bf2225908a44f95e3db0a33de1
|
refs/heads/master
| 2020-03-16T14:51:00.620413
| 2018-05-09T07:00:45
| 2018-05-09T07:00:45
| 132,715,177
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 327
|
java
|
package com.cxw.cxwproject.inter;
public interface OrderDetailsViewInter {
/**
* 查看详情回调接口
* @param obj
*/
public void OrderDetailsViewOnClick(Object obj);
// public void OrderPaymentViewOnClick(Object obj);
/**
* 订单评论
* @param obj
*/
public void OrderEvaluateViewOnClick(Object obj);
}
|
[
"juanjuan19941019"
] |
juanjuan19941019
|
a6e7a3cf00d062aadbdf40b815e53347542222fc
|
686e3e18f9111bd6d8f8020e4dd80335cef443de
|
/app/src/main/java/com/news/keep/bean/ItemMsg.java
|
b84151d06a95738b217ed961df0adf290bebc359
|
[] |
no_license
|
longshihan1/Keep
|
291a7aee151b2a4ac6cefeadf66673ebb2f8cd2d
|
9cb250ef00b053ba79858d82691c2a1a5dfc24cc
|
refs/heads/master
| 2021-01-21T13:44:14.658570
| 2016-06-03T16:09:40
| 2016-06-03T16:09:42
| 54,817,039
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,976
|
java
|
package com.news.keep.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* @author Administrator
* @time 2016/5/19 0019 上午 11:30
* @des ${TODO}
* @updateAuthor $Author$
* @updateDate $Date$
* @updateDes ${TODO}
*/
public class ItemMsg {
/**
* _id : 573c1e8e4e540bac61105231
* content : 变形🙈🙈🙈 @Keep #我要上精选#
* photo : http://static1.gotokeep
* .com/picture/2016/05/18/15/36b6836a55dace73b4790bf995c62d8af5c53545.jpg
* author : {"_id":"55fe52c51b03358600f70e4a","id":"55fe52c51b03358600f70e4a",
* "created":"2015-09-20T06:31:33.000Z","username":"我是Amy姐","avatar":"http://static1.gotokeep
* .com/avatar/2016/05/12/00/4065863328568853da8d4c7e6cdaaa297ec0cdc8.jpg","gender":"F"}
* __v : 0
* modified : 2016-05-18T07:49:34.408Z
* stateValue : 30
* state : hot
* achievements : []
* viewCount : 1
* favoriteCount : 10
* contentType : ["text","photo"]
* type : direct
* geo : []
* noise : false
* public : true
* likes : 323
* comments : 36
* meta : {"name":" 新版功能 ","count":1}
* created : 2016-05-18T07:49:34.000Z
* id : 573c1e8e4e540bac61105231
* hasLiked : false
* hasFollowed : false
* hasBlack : false
* hasMutualFollow : false
* relation : 0
*/
private String _id;
private String content;
private String photo;
/**
* _id : 55fe52c51b03358600f70e4a
* id : 55fe52c51b03358600f70e4a
* created : 2015-09-20T06:31:33.000Z
* username : 我是Amy姐
* avatar : http://static1.gotokeep.com/avatar/2016/05/12/00/4065863328568853da8d4c7e6cdaaa297ec0cdc8.jpg
* gender : F
*/
private AuthorBean author;
private int __v;
private String modified;
private int stateValue;
private String state;
private int viewCount;
private int favoriteCount;
private String type;
private boolean noise;
@SerializedName("public")
private boolean publicX;
private int likes;
private int comments;
/**
* name : 新版功能
* count : 1
*/
private MetaBean meta;
private String created;
private String id;
private boolean hasLiked;
private boolean hasFollowed;
private boolean hasBlack;
private boolean hasMutualFollow;
private int relation;
private List<?> achievements;
private List<String> contentType;
private List<?> geo;
public String get_id() {
return _id;
}
public void set_id(String _id) {
this._id = _id;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
public AuthorBean getAuthor() {
return author;
}
public void setAuthor(AuthorBean author) {
this.author = author;
}
public int get__v() {
return __v;
}
public void set__v(int __v) {
this.__v = __v;
}
public String getModified() {
return modified;
}
public void setModified(String modified) {
this.modified = modified;
}
public int getStateValue() {
return stateValue;
}
public void setStateValue(int stateValue) {
this.stateValue = stateValue;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public int getViewCount() {
return viewCount;
}
public void setViewCount(int viewCount) {
this.viewCount = viewCount;
}
public int getFavoriteCount() {
return favoriteCount;
}
public void setFavoriteCount(int favoriteCount) {
this.favoriteCount = favoriteCount;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public boolean isNoise() {
return noise;
}
public void setNoise(boolean noise) {
this.noise = noise;
}
public boolean isPublicX() {
return publicX;
}
public void setPublicX(boolean publicX) {
this.publicX = publicX;
}
public int getLikes() {
return likes;
}
public void setLikes(int likes) {
this.likes = likes;
}
public int getComments() {
return comments;
}
public void setComments(int comments) {
this.comments = comments;
}
public MetaBean getMeta() {
return meta;
}
public void setMeta(MetaBean meta) {
this.meta = meta;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public boolean isHasLiked() {
return hasLiked;
}
public void setHasLiked(boolean hasLiked) {
this.hasLiked = hasLiked;
}
public boolean isHasFollowed() {
return hasFollowed;
}
public void setHasFollowed(boolean hasFollowed) {
this.hasFollowed = hasFollowed;
}
public boolean isHasBlack() {
return hasBlack;
}
public void setHasBlack(boolean hasBlack) {
this.hasBlack = hasBlack;
}
public boolean isHasMutualFollow() {
return hasMutualFollow;
}
public void setHasMutualFollow(boolean hasMutualFollow) {
this.hasMutualFollow = hasMutualFollow;
}
public int getRelation() {
return relation;
}
public void setRelation(int relation) {
this.relation = relation;
}
public List<?> getAchievements() {
return achievements;
}
public void setAchievements(List<?> achievements) {
this.achievements = achievements;
}
public List<String> getContentType() {
return contentType;
}
public void setContentType(List<String> contentType) {
this.contentType = contentType;
}
public List<?> getGeo() {
return geo;
}
public void setGeo(List<?> geo) {
this.geo = geo;
}
public static class AuthorBean {
private String _id;
private String id;
private String created;
private String username;
private String avatar;
private String gender;
public String get_id() {
return _id;
}
public void set_id(String _id) {
this._id = _id;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
}
public static class MetaBean {
private String name;
private int count;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
}
}
|
[
"577093937@qq.com"
] |
577093937@qq.com
|
d55b85c962bf56f0e6d744016a4878ade96c78aa
|
1b101a8d160ca7c724afbe14c5883fd706f41ec6
|
/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationBasedExporter.java
|
f18030c791d70a0540f1f767685f77eeef8989d7
|
[
"Apache-2.0"
] |
permissive
|
xxsheng/springSource5.0.4
|
3bac2ad78e590d52a70f3cbbfe8e3f12a70c0e4b
|
23cacf08931d39a589cdeb468b9bba84d4424d0e
|
refs/heads/master
| 2021-07-01T14:06:47.525889
| 2020-10-14T16:24:14
| 2020-10-14T16:24:14
| 181,528,599
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,551
|
java
|
/*
* Copyright 2002-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.remoting.support;
import java.lang.reflect.InvocationTargetException;
/**
* Abstract base class for remote service exporters that are based
* on deserialization of {@link RemoteInvocation} objects.
*
* <p>Provides a "remoteInvocationExecutor" property, with a
* {@link DefaultRemoteInvocationExecutor} as default strategy.
*
* @author Juergen Hoeller
* @since 1.1
* @see RemoteInvocationExecutor
* @see DefaultRemoteInvocationExecutor
*/
public abstract class RemoteInvocationBasedExporter extends RemoteExporter {
private RemoteInvocationExecutor remoteInvocationExecutor = new DefaultRemoteInvocationExecutor();
/**
* Set the RemoteInvocationExecutor to use for this exporter.
* Default is a DefaultRemoteInvocationExecutor.
* <p>A custom invocation executor can extract further context information
* from the invocation, for example user credentials.
*/
public void setRemoteInvocationExecutor(RemoteInvocationExecutor remoteInvocationExecutor) {
this.remoteInvocationExecutor = remoteInvocationExecutor;
}
/**
* Return the RemoteInvocationExecutor used by this exporter.
*/
public RemoteInvocationExecutor getRemoteInvocationExecutor() {
return this.remoteInvocationExecutor;
}
/**
* Apply the given remote invocation to the given target object.
* The default implementation delegates to the RemoteInvocationExecutor.
* <p>Can be overridden in subclasses for custom invocation behavior,
* possibly for applying additional invocation parameters from a
* custom RemoteInvocation subclass. Note that it is preferable to use
* a custom RemoteInvocationExecutor which is a reusable strategy.
* @param invocation the remote invocation
* @param targetObject the target object to apply the invocation to
* @return the invocation result
* @throws NoSuchMethodException if the method name could not be resolved
* @throws IllegalAccessException if the method could not be accessed
* @throws InvocationTargetException if the method invocation resulted in an exception
* @see RemoteInvocationExecutor#invoke
*/
protected Object invoke(RemoteInvocation invocation, Object targetObject)
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
if (logger.isTraceEnabled()) {
logger.trace("Executing " + invocation);
}
try {
return getRemoteInvocationExecutor().invoke(invocation, targetObject);
}
catch (NoSuchMethodException ex) {
if (logger.isDebugEnabled()) {
logger.warn("Could not find target method for " + invocation, ex);
}
throw ex;
}
catch (IllegalAccessException ex) {
if (logger.isDebugEnabled()) {
logger.warn("Could not access target method for " + invocation, ex);
}
throw ex;
}
catch (InvocationTargetException ex) {
if (logger.isDebugEnabled()) {
logger.debug("Target method failed for " + invocation, ex.getTargetException());
}
throw ex;
}
}
/**
* Apply the given remote invocation to the given target object, wrapping
* the invocation result in a serializable RemoteInvocationResult object.
* The default implementation creates a plain RemoteInvocationResult.
* <p>Can be overridden in subclasses for custom invocation behavior,
* for example to return additional context information. Note that this
* is not covered by the RemoteInvocationExecutor strategy!
* @param invocation the remote invocation
* @param targetObject the target object to apply the invocation to
* @return the invocation result
* @see #invoke
*/
protected RemoteInvocationResult invokeAndCreateResult(RemoteInvocation invocation, Object targetObject) {
try {
// 激活代理中对应invocation中的方法
Object value = invoke(invocation, targetObject);
// 封装结果以便于序列化
return new RemoteInvocationResult(value);
}
catch (Throwable ex) {
return new RemoteInvocationResult(ex);
}
}
}
|
[
"1558281773@qq.com"
] |
1558281773@qq.com
|
9dcb63cc6e2a3678678c1edb82828bb9d9a634da
|
377e5e05fb9c6c8ed90ad9980565c00605f2542b
|
/bin/ext-accelerator/acceleratorservices/src/de/hybris/platform/acceleratorservices/payment/cybersource/converters/populators/PaymentDataPopulator.java
|
97890aba356ec053624fef24eb70072698958e07
|
[] |
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,985
|
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.acceleratorservices.payment.cybersource.converters.populators;
import de.hybris.platform.acceleratorservices.payment.cybersource.converters.populators.response.AbstractResultPopulator;
import de.hybris.platform.acceleratorservices.payment.data.CreateSubscriptionRequest;
import de.hybris.platform.acceleratorservices.payment.data.PaymentData;
import org.springframework.util.Assert;
import static de.hybris.platform.servicelayer.util.ServicesUtil.validateParameterNotNull;
public class PaymentDataPopulator extends AbstractResultPopulator<CreateSubscriptionRequest, PaymentData>
{
@Override
public void populate(final CreateSubscriptionRequest source, final PaymentData target)
{
//Validate parameters and related data
validateParameterNotNull(source, "Parameter source (CreateSubscriptionRequest) cannot be null");
validateParameterNotNull(target, "Parameter target (PaymentData) cannot be null");
Assert.isInstanceOf(CreateSubscriptionRequest.class, source);
Assert.notNull(source.getCustomerBillToData(), "customerBillToData cannot be null");
Assert.notNull(source.getCustomerShipToData(), "customerShipToData cannot be null");
Assert.notNull(source.getOrderInfoData(), "orderInfoData cannot be null");
Assert.notNull(source.getPaymentInfoData(), "paymentInfoData cannot be null");
Assert.notNull(source.getSignatureData(), "signatureData cannot be null");
Assert.notNull(source.getSubscriptionSignatureData(), "subscriptionSignatureData cannot be null");
target.setPostUrl(source.getRequestUrl());
}
}
|
[
"santosh.kshirsagar@automaticinfotech.com"
] |
santosh.kshirsagar@automaticinfotech.com
|
b791e2fc34d1f2b8c4fcefdb88cb457f26f6af70
|
712a5e8475b6c9276bd4f8f857be95fdf6f30b9f
|
/com/google/android/gms/internal/zzmd.java
|
ac1b0e50e793d89044cfe4e1a5322638e0ae5225
|
[] |
no_license
|
swapnilsen/OCR_2
|
b29bd22a51203b4d39c2cc8cb03c50a85a81218f
|
1889d208e17e94a55ddeae91336fe92110e1bd2d
|
refs/heads/master
| 2021-01-20T08:46:03.508508
| 2017-05-03T19:50:52
| 2017-05-03T19:50:52
| 90,187,623
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 224
|
java
|
package com.google.android.gms.internal;
public interface zzmd {
public static class zza implements zzmd {
public void zza(Throwable th, String str) {
}
}
void zza(Throwable th, String str);
}
|
[
"swasen@cisco.com"
] |
swasen@cisco.com
|
5185f634f9bae157f9916f560e407806f1cf4fbb
|
5f79cada0986856ea165068a433757fc03725ce5
|
/src/main/java/org/bouncycastle2/asn1/ASN1Null.java
|
209ab7441f169a89ec4462e1dc26580b5b357b93
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
votingsystem/votingsystem-android-bouncycastle
|
4ab973bf873580ea67f6d891c70b0a4ac11be20d
|
e50d48400893e2d9847e75ed3bcecb8fe416f0d4
|
refs/heads/master
| 2020-12-10T21:26:57.110743
| 2016-09-10T18:14:08
| 2016-09-10T18:14:08
| 34,624,496
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 551
|
java
|
package org.bouncycastle2.asn1;
import java.io.IOException;
/**
* A NULL object.
*/
public abstract class ASN1Null
extends ASN1Object
{
public ASN1Null()
{
}
public int hashCode()
{
return -1;
}
boolean asn1Equals(
DERObject o)
{
if (!(o instanceof ASN1Null))
{
return false;
}
return true;
}
abstract void encode(DEROutputStream out)
throws IOException;
public String toString()
{
return "NULL";
}
}
|
[
"jgzornoza@gmail.com"
] |
jgzornoza@gmail.com
|
d9c50e4b296040708f3f79763eafc24f7e3e9098
|
875d88ee9cf7b40c9712178d1ee48f0080fa0f8a
|
/geronimo-jaxb_2.2_spec/src/main/java/javax/xml/bind/DatatypeConverterHelper.java
|
323c921e922fd8d3cee2197a444123353b9693a2
|
[
"Apache-2.0",
"W3C",
"W3C-19980720"
] |
permissive
|
jgallimore/geronimo-specs
|
b152164488692a7e824c73a9ba53e6fb72c6a7a3
|
09c09bcfc1050d60dcb4656029e957837f851857
|
refs/heads/trunk
| 2022-12-15T14:02:09.338370
| 2020-09-14T18:21:46
| 2020-09-14T18:21:46
| 284,994,475
| 0
| 1
|
Apache-2.0
| 2020-09-14T18:21:47
| 2020-08-04T13:51:47
|
Java
|
UTF-8
|
Java
| false
| false
| 7,119
|
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 javax.xml.bind;
import java.util.Calendar;
import java.util.TimeZone;
import java.math.BigInteger;
import java.math.BigDecimal;
import javax.xml.namespace.QName;
import javax.xml.namespace.NamespaceContext;
/**
* Wrapper for DatatypeConverterInterface that provides {@link #printDate(Calendar)} method that
* outputs time zone information. All other methods are delegated to the original converter.
* See {@link https://jaxb.dev.java.net/issues/show_bug.cgi?id=761} for more information.
*/
class DatatypeConverterHelper implements DatatypeConverterInterface {
private final DatatypeConverterInterface delegate;
DatatypeConverterHelper(DatatypeConverterInterface delegate) {
this.delegate = delegate;
}
public String parseAnySimpleType(String lexicalXSDAnySimpleType) {
return delegate.parseAnySimpleType(lexicalXSDAnySimpleType);
}
public byte[] parseBase64Binary(String lexicalXSDBase64Binary) {
return delegate.parseBase64Binary(lexicalXSDBase64Binary);
}
public boolean parseBoolean(String lexicalXSDBoolean) {
return delegate.parseBoolean(lexicalXSDBoolean);
}
public byte parseByte(String lexicalXSDByte) {
return delegate.parseByte(lexicalXSDByte);
}
public Calendar parseDate(String lexicalXSDDate) {
return delegate.parseDate(lexicalXSDDate);
}
public Calendar parseDateTime(String lexicalXSDDateTime) {
return delegate.parseDateTime(lexicalXSDDateTime);
}
public BigDecimal parseDecimal(String lexicalXSDDecimal) {
return delegate.parseDecimal(lexicalXSDDecimal);
}
public double parseDouble(String lexicalXSDDouble) {
return delegate.parseDouble(lexicalXSDDouble);
}
public float parseFloat(String lexicalXSDFloat) {
return delegate.parseFloat(lexicalXSDFloat);
}
public byte[] parseHexBinary(String lexicalXSDHexBinary) {
return delegate.parseHexBinary(lexicalXSDHexBinary);
}
public int parseInt(String lexicalXSDInt) {
return delegate.parseInt(lexicalXSDInt);
}
public BigInteger parseInteger(String lexicalXSDInteger) {
return delegate.parseInteger(lexicalXSDInteger);
}
public long parseLong(String lexicalXSDLong) {
return delegate.parseLong(lexicalXSDLong);
}
public QName parseQName(String lexicalXSDQName, NamespaceContext nsc) {
return delegate.parseQName(lexicalXSDQName, nsc);
}
public short parseShort(String lexicalXSDShort) {
return delegate.parseShort(lexicalXSDShort);
}
public String parseString(String lexicalXSDString) {
return delegate.parseString(lexicalXSDString);
}
public Calendar parseTime(String lexicalXSDTime) {
return delegate.parseTime(lexicalXSDTime);
}
public long parseUnsignedInt(String lexicalXSDUnsignedInt) {
return delegate.parseUnsignedInt(lexicalXSDUnsignedInt);
}
public int parseUnsignedShort(String lexicalXSDUnsignedShort) {
return delegate.parseUnsignedShort(lexicalXSDUnsignedShort);
}
public String printAnySimpleType(String val) {
return delegate.printAnySimpleType(val);
}
public String printBase64Binary(byte[] val) {
return delegate.printBase64Binary(val);
}
public String printBoolean(boolean val) {
return delegate.printBoolean(val);
}
public String printByte(byte val) {
return delegate.printByte(val);
}
public String printDate(Calendar cal) {
StringBuilder buf = new StringBuilder();
int year = cal.get(Calendar.YEAR);
if (year < 0) {
buf.append("-");
year = -year;
}
append(buf, year, 4);
buf.append('-');
append(buf, cal.get(Calendar.MONTH) + 1, 2);
buf.append('-');
append(buf, cal.get(Calendar.DAY_OF_MONTH), 2);
TimeZone tz = cal.getTimeZone();
if (tz != null) {
int offset = cal.get(Calendar.ZONE_OFFSET);
if (tz.inDaylightTime(cal.getTime())) {
offset += cal.get(Calendar.DST_OFFSET);
}
if (offset == 0) {
buf.append('Z');
} else {
if (offset < 0) {
buf.append('-');
offset = -offset;
} else {
buf.append('+');
}
offset /= 60 * 1000;
append(buf, offset / 60, 2);
buf.append(':');
append(buf, offset % 60, 2);
}
}
return buf.toString();
}
private static void append(StringBuilder buf, int value, int minLength) {
String str = String.valueOf(value);
for (int i = str.length(); i < minLength; i++) {
buf.append('0');
}
buf.append(str);
}
public String printDateTime(Calendar val) {
return delegate.printDateTime(val);
}
public String printDecimal(BigDecimal val) {
return delegate.printDecimal(val);
}
public String printDouble(double val) {
return delegate.printDouble(val);
}
public String printFloat(float val) {
return delegate.printFloat(val);
}
public String printHexBinary(byte[] val) {
return delegate.printHexBinary(val);
}
public String printInt(int val) {
return delegate.printInt(val);
}
public String printInteger(BigInteger val) {
return delegate.printInteger(val);
}
public String printLong(long val) {
return delegate.printLong(val);
}
public String printQName(QName val, NamespaceContext nsc) {
return delegate.printQName(val, nsc);
}
public String printShort(short val) {
return delegate.printShort(val);
}
public String printString(String val) {
return delegate.printString(val);
}
public String printTime(Calendar val) {
return delegate.printTime(val);
}
public String printUnsignedInt(long val) {
return delegate.printUnsignedInt(val);
}
public String printUnsignedShort(int val) {
return delegate.printUnsignedShort(val);
}
}
|
[
"gawor@apache.org"
] |
gawor@apache.org
|
aa5312256821dfc4d11fc568773be8e3b24314f3
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/commonsguy--cw-omnibus/3c740bc1d84c288d31a5b76c0499d28d67caa66a/before/WordReadyEvent.java
|
46cb76eb1584e5f36c73b638826b4162f0f828ad
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 864
|
java
|
/***
Copyright (c) 2014 CommonsWare, LLC
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.
From _The Busy Coder's Guide to Android Development_
https://commonsware.com/Android
*/
package com.commonsware.android.eventbus;
class WordReadyEvent {
private String word;
WordReadyEvent(String word) {
this.word=word;
}
String getWord() {
return(word);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
287af1392caff89ad28280fd14c178a862247f3d
|
f38cc59518903e8ceef22f2153944279f0481134
|
/rift_lib/src/rift_extractor/classgen/classes/_11107.java
|
66ab2350e5a523f5963a669a3a24007e1898057d
|
[] |
no_license
|
imathrowback/riftools
|
8de04a5efc906a1ecadf7913a9747091ef6706ec
|
a9c4021783c1b89c701fa227100260b359ae563d
|
refs/heads/master
| 2023-03-31T10:45:49.780385
| 2023-03-24T07:46:59
| 2023-03-24T07:46:59
| 94,748,733
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 689
|
java
|
package rift_extractor.classgen.classes;
import org.imathrowback.datparser.CObject;
import static rift_extractor.classgen.ClassUtils.*;
import rift_extractor.classgen.ClassUtils;
/** 11107 **/
@com.thoughtworks.xstream.annotations.XStreamAlias("_11107")
public class _11107
{
public _11107(){}
@com.thoughtworks.xstream.annotations.XStreamAsAttribute
java.lang.Long unk0;
java.lang.String unk1;
TextEntry unk2;
public void parse(CObject obj)
{
ClassUtils.assertType(obj, 11107);
unk0 = ClassUtils.getFieldMember(java.lang.Long.class,obj, 0);
unk1 = ClassUtils.getFieldMember(java.lang.String.class,obj, 1);
unk2 = ClassUtils.getFieldMember(TextEntry.class,obj, 2);
}
}
|
[
"imathrowback@nowhere.com"
] |
imathrowback@nowhere.com
|
f7d0a81129ea319f27e41c6de3fddb01decfbbd7
|
fa9fba650e8deb518fff2bed727bd077c094779e
|
/src/main/java/lk/gov/health/phsp/facade/ItemFacade.java
|
37fdda892761e9aa601ba16eadf9503bae8caa3d
|
[
"MIT"
] |
permissive
|
buddhika75/researchtools
|
5154df9613b6a2e33d0c8d2d77b463952a5fb13b
|
7d12ef2d070053a3446d6f07a0321bca82b7a8f4
|
refs/heads/master
| 2022-09-06T15:46:00.931096
| 2020-02-19T12:45:58
| 2020-02-19T12:45:58
| 239,170,869
| 0
| 0
|
MIT
| 2022-07-06T20:55:38
| 2020-02-08T17:10:33
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,720
|
java
|
/*
* The MIT License
*
* Copyright 2019 Dr M H B Ariyaratne<buddhika.ari@gmail.com>.
*
* 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 lk.gov.health.phsp.facade;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import lk.gov.health.phsp.entity.Item;
/**
*
* @author Dr M H B Ariyaratne<buddhika.ari@gmail.com>
*/
@Stateless
public class ItemFacade extends AbstractFacade<Item> {
@PersistenceContext(unitName = "hmisPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public ItemFacade() {
super(Item.class);
}
}
|
[
"buddhika.ari@gmail.com"
] |
buddhika.ari@gmail.com
|
db7c18c2c3fb6f583bf37c8330b10481d1df305e
|
0727e648eb765b6ab86f9196f0f0c45bf4f482e7
|
/java1/Data_and_operation/Variable.java
|
bc5256c6746ca959724347b0f5d998e9c302545f
|
[] |
no_license
|
Ellie-Jung/Java-Study
|
16d4ebf5dd823d9bcd141c3f0201c796f252c96d
|
d41065e6b94566fec2d369567097bd1b2745ec1a
|
refs/heads/master
| 2023-09-05T10:38:14.395318
| 2021-11-13T10:44:15
| 2021-11-13T10:44:15
| 365,295,347
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 287
|
java
|
public class Variable {
public static void main(String[] args) {
int a = 1; //Number -> integer 정수
System.out.println(a);
double b = 1.1;//real number 실수 double
System.out.println(b);
String c = "Hello World"; //문자열
System.out.println(c);
}
}
|
[
"jssoyeon@gmail.com"
] |
jssoyeon@gmail.com
|
bb622b603135db2df0410289446295a7c8d938ce
|
dcefd96a707d439ca2248eceeb0f63d32a7ae7eb
|
/zuul_proxy_server/feign-hystrix-client/src/main/java/com/example/demo/IntegrationClient.java
|
54ba0decde4e19ee8460846d9f1e0c8389553b66
|
[] |
no_license
|
kavya-amin/FSD-Spring-Boot
|
d7d0105bbbaa6ace26815e7d26fb3f59d59565d4
|
f29bf57a4baf774d09962dee06cd919e76a4aba1
|
refs/heads/master
| 2023-04-27T17:08:34.639768
| 2019-12-16T05:41:17
| 2019-12-16T05:41:17
| 219,980,316
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,064
|
java
|
package com.example.demo;
import java.util.Arrays;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
@Component
public class IntegrationClient {
@Autowired
private OffersServiceClient offServiceClient;
@Autowired
private RecommendationServiceClient reServiceClient;
public Collection<Product> getRecommendationFallback(){
System.out.println("=======getRecommendationFallback=========");
return Arrays.asList();
}
@HystrixCommand(fallbackMethod = "getRecommendationFallback")
public Collection<Product> getRecommendations(){
return this.reServiceClient.getRecommendations();
}
public Collection<Offers> getOffersFallback() {
System.out.println("===========getOffersFallback===========");
return Arrays.asList();
}
@HystrixCommand(fallbackMethod = "getOffersFallback")
public Collection<Offers> getOffers() {
return this.offServiceClient.getCurrentOffers();
}
}
|
[
"b8ibmjava19@iiht.tech"
] |
b8ibmjava19@iiht.tech
|
df488ba7c8a9f8a4a0155f57ecdc80b8add7de9f
|
0f77c5ec508d6e8b558f726980067d1058e350d7
|
/1_39_120042/com/ankamagames/baseImpl/graphics/script/function/mobile/SetMobileAlpha.java
|
1fa8c5b261ec83ce8ec70dbfa0cc730063fcdf04
|
[] |
no_license
|
nightwolf93/Wakxy-Core-Decompiled
|
aa589ebb92197bf48e6576026648956f93b8bf7f
|
2967f8f8fba89018f63b36e3978fc62908aa4d4d
|
refs/heads/master
| 2016-09-05T11:07:45.145928
| 2014-12-30T16:21:30
| 2014-12-30T16:21:30
| 29,250,176
| 5
| 5
| null | 2015-01-14T15:17:02
| 2015-01-14T15:17:02
| null |
UTF-8
|
Java
| false
| false
| 1,798
|
java
|
package com.ankamagames.baseImpl.graphics.script.function.mobile;
import org.apache.log4j.*;
import com.ankamagames.baseImpl.graphics.alea.mobile.*;
import org.keplerproject.luajava.*;
import com.ankamagames.framework.script.*;
public class SetMobileAlpha extends JavaFunctionEx
{
private static final Logger m_logger;
private static final String NAME = "setMobileAlpha";
private static final LuaScriptParameterDescriptor[] PARAMS;
public SetMobileAlpha(final LuaState luaState) {
super(luaState);
}
@Override
public String getName() {
return "setMobileAlpha";
}
@Override
public String getDescription() {
return "Change l'opacit? d'un mobile";
}
@Override
public LuaScriptParameterDescriptor[] getParameterDescriptors() {
return SetMobileAlpha.PARAMS;
}
@Override
public final LuaScriptParameterDescriptor[] getResultDescriptors() {
return null;
}
public void run(final int paramCount) throws LuaException {
final long mobileId = this.getParamLong(0);
final float alpha = (float)this.getParamDouble(1);
final Mobile mobile = MobileManager.getInstance().getMobile(mobileId);
if (mobile != null) {
mobile.setAlpha(alpha);
}
else {
this.writeError(SetMobileAlpha.m_logger, "le mobile " + mobileId + " n'existe pas ");
}
}
static {
m_logger = Logger.getLogger((Class)SetMobileAlpha.class);
PARAMS = new LuaScriptParameterDescriptor[] { new LuaScriptParameterDescriptor("mobileId", "Id du mobile", LuaScriptParameterType.LONG, false), new LuaScriptParameterDescriptor("alpha", "Valeur de l'opacit?", LuaScriptParameterType.NUMBER, false) };
}
}
|
[
"totomakers@hotmail.fr"
] |
totomakers@hotmail.fr
|
ec036cd61257daace5bcf29a1b058a23ca4d9c82
|
39e32f672b6ef972ebf36adcb6a0ca899f49a094
|
/dcm4jboss-all/branches/DCM4CHEE_2_10_BRANCH/dcm4jboss-sar/src/java/org/dcm4chex/archive/mbean/HttpUserInfo.java
|
bf04ba4f9f6f1cbfc97a2aa4e6aee8846e73ff3f
|
[
"Apache-2.0"
] |
permissive
|
medicayun/medicayundicom
|
6a5812254e1baf88ad3786d1b4cf544821d4ca0b
|
47827007f2b3e424a1c47863bcf7d4781e15e814
|
refs/heads/master
| 2021-01-23T11:20:41.530293
| 2017-06-05T03:11:47
| 2017-06-05T03:11:47
| 93,123,541
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,748
|
java
|
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is part of dcm4che, an implementation of DICOM(TM) in
* Java(TM), available at http://sourceforge.net/projects/dcm4che.
*
* The Initial Developer of the Original Code is
* Agfa-Gevaert Group.
* Portions created by the Initial Developer are Copyright (C) 2003-2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* See @authors listed below.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
package org.dcm4chex.archive.mbean;
import java.net.InetAddress;
import java.net.UnknownHostException;
import javax.security.jacc.PolicyContext;
import javax.security.jacc.PolicyContextException;
import javax.servlet.http.HttpServletRequest;
/**
* @author Gunter Zeilinger <gunterze@gmail.com>
* @version $Revision: 3313 $ $Date: 2007-05-07 19:52:31 +0800 (周一, 07 5月 2007) $
* @since Mar 7, 2007
*/
public class HttpUserInfo {
private static final String WEB_REQUEST_KEY =
"javax.servlet.http.HttpServletRequest";
private String userId;
private String ip;
private String hostName;
public HttpUserInfo(boolean enableDNSLookups) {
try {
HttpServletRequest rq = (HttpServletRequest)
PolicyContext.getContext(WEB_REQUEST_KEY);
init(rq, enableDNSLookups);
} catch (PolicyContextException e) {
userId = "UNKOWN_USER";
}
}
public HttpUserInfo(HttpServletRequest rq, boolean enableDNSLookups) {
init(rq, enableDNSLookups);
}
private void init(HttpServletRequest rq, boolean enableDNSLookups) {
userId = rq.getRemoteUser();
String xForward = (String) rq.getHeader("x-forwarded-for");
if (xForward != null) {
int pos = xForward.indexOf(',');
ip = (pos > 0 ? xForward.substring(0,pos) : xForward).trim();
} else {
ip = rq.getRemoteAddr();
}
if ( enableDNSLookups ) {
try {
hostName = InetAddress.getByName(ip).getHostName();
} catch (UnknownHostException ignore) {
hostName = ip;
}
} else {
hostName = ip;
}
}
public String getUserId() {
return userId;
}
public String getIP() {
return ip;
}
public String getHostName() {
return hostName;
}
}
|
[
"liliang_lz@icloud.com"
] |
liliang_lz@icloud.com
|
1de72a92f785b6c95649b1e2e776dd51aa9ae615
|
d1134514736c13cbf74dc759568654e1a79cfa37
|
/plugin/play2-provider-api/src/main/java/com/google/code/play2/provider/api/AssetCompilationException.java
|
59a5fd4ca35ab871a85b7f03a3549f6467789d41
|
[] |
no_license
|
gavioto/pla2-maven-plugin
|
f9995f04b5d7fcc4daf7d395cc29d288e097681e
|
56cbcb4dff1065845f96e20d0c36a6a1640d0bec
|
refs/heads/master
| 2021-01-20T12:12:35.776228
| 2014-11-15T17:53:59
| 2014-11-15T17:53:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,785
|
java
|
/*
* Copyright 2013-2014 Grzegorz Slowikowski (gslowikowski at gmail dot 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 com.google.code.play2.provider.api;
import java.io.File;
public class AssetCompilationException
extends Exception
{
private static final long serialVersionUID = 1L;
private File source;
private Integer line;
private Integer position;
public AssetCompilationException( File source, String message, Integer atLine, Integer column )
{
super( "Compilation error[" + message + "]" );
this.source = source;
this.line = atLine;
this.position = column;
}
public AssetCompilationException( File source, String message, Integer atLine, Integer column, Throwable cause )
{
super( "Compilation error[" + message + "]", cause );
this.source = source;
this.line = atLine;
this.position = column;
}
/**
* Error line number, if defined.
*/
public Integer line()
{
return line;
}
/**
* Column position, if defined.
*/
public Integer position()
{
return position;
}
/**
* Source file.
*/
public File source()
{
return source;
}
}
|
[
"gslowikowski@gmail.com"
] |
gslowikowski@gmail.com
|
0f00ebd0325145bf8b0a66b2aefc616be5790020
|
6cccbbd7c647a7168b55f3c54f0372df81e83620
|
/cms/src/main/java/com/yesmywine/cms/dao/FlashPurchasePositionDao.java
|
1e33eb29527374760c35e20828493611a95c3b12
|
[] |
no_license
|
Loeng/yesmywine_ms
|
4dd111edeabefd3a813a7e59837862b660e1085c
|
207e6d1f352172999649ba324f07aeb68953f9d6
|
refs/heads/master
| 2021-10-20T03:56:03.729552
| 2019-02-25T15:34:25
| 2019-02-25T15:34:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 394
|
java
|
package com.yesmywine.cms.dao;
import com.yesmywine.base.record.repository.BaseRepository;
import com.yesmywine.cms.entity.FlashPurchasePosition;
import java.util.List;
/**
* Created by wangdiandian on 2017/5/26.
*/
public interface FlashPurchasePositionDao extends BaseRepository<FlashPurchasePosition,Integer> {
List<FlashPurchasePosition> findByPositionId(Integer positionId);
}
|
[
"603446367@qq.com"
] |
603446367@qq.com
|
5385bdc7246034ed90d4cab8bd95453492c67d03
|
d7b9d118c36a1e3f2ec242227962f03a92efa651
|
/app/src/main/java/seoyuki/yuza/DetailActivity.java
|
60a51a0a0f58b78c7078d137ffb5657787609da5
|
[
"MIT"
] |
permissive
|
MobileSeoul/2016seoul-08
|
b1b8a80bf982f97defa25e7e0f4af09a6b2fe589
|
62318b98ad4d99ef28138d1a49cb02a102252fb3
|
refs/heads/master
| 2021-07-06T01:59:17.637387
| 2017-09-28T05:24:28
| 2017-09-28T05:24:28
| 105,101,640
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,062
|
java
|
package seoyuki.yuza;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import java.io.InputStream;
import java.net.URLDecoder;
/**
* Created by Administrator on 2016-10-02.
*/
public class DetailActivity extends Activity {
String decodeStr = "";
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.detail_activity);
TextView name_text = (TextView) findViewById(R.id.textView);
TextView address_text = (TextView) findViewById(R.id.textView2);
TextView content_text = (TextView) findViewById(R.id.textView3);
ImageView image_text = (ImageView) findViewById(R.id.imageView);
ImageView image_start = (ImageView) findViewById(R.id.detailStartImage);
TextView detailBottomMsg = (TextView) findViewById(R.id.detailBottomMsg); // 최하단 메시지
// 이전 액티비티로부터 넘어온 데이터를 꺼낸다.
final String name = getIntent().getStringExtra("name");
final String address = getIntent().getStringExtra("address");
final String content = getIntent().getStringExtra("content");
final String wido = getIntent().getStringExtra("wido");
final String kyungdo = getIntent().getStringExtra("kyungdo");
final String id = getIntent().getStringExtra("id");
LogManager.printLog(wido+"::"+kyungdo);
String image = getIntent().getStringExtra("image");
try {
decodeStr = URLDecoder.decode(image, "UTF-8");
} catch(Exception e) {
}
//넘어온 데이터를 String값으로 받아온다.
// class ImageDownloader extends AsyncTask<String, Void, Bitmap> {
// //AsyncTask를 사용해 url 이미지 보여주기
// ImageView bmImage;
// public ImageDownloader(ImageView bmImage) {
// this.bmImage = bmImage;
// }
//
// @Override
// protected Bitmap doInBackground(String... params) {
// String url = params[0];
// Bitmap mIcon = null;
// try {
// InputStream is = new java.net.URL(url).openStream();
// mIcon = BitmapFactory.decodeStream(is);
// //디코딩된 소스를 비트맵에 넣는다.
// } catch (Exception e) {
// }
// return mIcon;
// }
// @Override
// protected void onPostExecute(Bitmap result) {
// bmImage.setImageBitmap(result);
// //결과를 비트맵에 저장한다.
// }
// }
name_text.setText(name);
address_text.setText(address);
content_text.setText(content);
image_start.setImageResource(R.drawable.detail_start);
image_start.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// 유적지 길찾기 코드
Bundle extras = new Bundle();
extras.putString("mokwido", wido);
extras.putString("mokkyungdo",kyungdo);
extras.putString("mokid",id);
extras.putString("mokname",name);
// 인텐트를 생성한다.
// 컨텍스트로 현재 액티비티를, 생성할 액티비티로 DetailActivity 를 지정한다.
Intent intent = new Intent(DetailActivity.this, MainActivity.class);
// 위에서 만든 Bundle을 인텐트에 넣는다.
intent.putExtras(extras);
// 액티비티를 생성한다.
startActivity(intent);
finish();
}
});
// new ImageDownloader(image_text).execute(decodeStr);
Glide.with(getBaseContext()).load(decodeStr).into(image_text);
//받아온 내용들을 뿌려준다.
detailBottomMsg.setText("여행할 목적지가 있다는 것은 좋은 일이다.\n그러나 중요한 것은 여행 자체다.\n\n어슐러 K. 르 귄(Ursula Kroeber Le Guin)");
}
@Override
protected void onDestroy() {
RecycleUtils.recursiveRecycle(getWindow().getDecorView());
System.gc();
super.onDestroy();
}
@Override
public void onBackPressed(){
Intent intent = new Intent(DetailActivity.this,MainActivity.class);
startActivity(intent);
finish();
}
}
|
[
"mobile@seoul.go.kr"
] |
mobile@seoul.go.kr
|
64e1db68bb0a37300715dd58db9f6f087ace763f
|
36698a8464c18cfe4476b954eed4c9f3911b5e2c
|
/ZimbraServer/src/java/com/zimbra/cs/index/BrowseTerm.java
|
f78a37ac3ae04e5612d0a84e8535aeb42e524213
|
[] |
no_license
|
mcsony/Zimbra-1
|
392ef27bcbd0e0962dce99ceae3f20d7a1e9d1c7
|
4bf3dc250c68a38e38286bdd972c8d5469d40e34
|
refs/heads/master
| 2021-12-02T06:45:15.852374
| 2011-06-13T13:10:57
| 2011-06-13T13:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,322
|
java
|
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2009, 2010 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
* ***** END LICENSE BLOCK *****
*/
package com.zimbra.cs.index;
public class BrowseTerm {
public final String term;
public final int freq;
public BrowseTerm(String term, int freq) {
this.term = term;
this.freq = freq;
}
@Override
public int hashCode() {
return term.hashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final BrowseTerm other = (BrowseTerm) obj;
if (term == null) {
if (other.term != null)
return false;
} else if (!term.equals(other.term))
return false;
return true;
}
}
|
[
"dstites@autobase.net"
] |
dstites@autobase.net
|
3c8935727962d8d502451350e5ac6102b8f049b7
|
e42b64eb93f609e98a3c2beb783a07cd22517dda
|
/prolib/src/main/java/com/mx/pro/lib/banner/view/BannerViewPager.java
|
9e9f8bc32cb2ff50b7ca3931765dfc38ed4f5336
|
[
"Apache-2.0"
] |
permissive
|
CharlesMing/beilu-android-open-project
|
c0cfab0ca37b9c76527b722bc6ac3f6c8eca5966
|
20b148189d05639c85842fb78895bef64276a9b0
|
refs/heads/master
| 2021-06-29T02:34:40.399361
| 2020-12-17T06:48:50
| 2020-12-17T06:48:50
| 203,488,655
| 14
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,178
|
java
|
package com.mx.pro.lib.banner.view;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
public class BannerViewPager extends ViewPager {
private boolean scrollable = true;
public BannerViewPager(Context context) {
super(context);
}
public BannerViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
if(this.scrollable) {
if (getCurrentItem() == 0 && getChildCount() == 0) {
return false;
}
return super.onTouchEvent(ev);
} else {
return false;
}
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if(this.scrollable) {
if (getCurrentItem() == 0 && getChildCount() == 0) {
return false;
}
return super.onInterceptTouchEvent(ev);
} else {
return false;
}
}
public void setScrollable(boolean scrollable) {
this.scrollable = scrollable;
}
}
|
[
"12345678"
] |
12345678
|
54e1f9da8588f0cabaf8cf77bf5c2cb20b48ab1b
|
75394abecf3532c228a8a9fd1dc62599c8414d31
|
/zap/src/main/java/org/parosproxy/paros/view/SessionGeneralPanel.java
|
1e57d811a3febf193676b64f0274bf7035e01d50
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-free-unknown"
] |
permissive
|
netsec/zaproxy
|
4020780845bd946fef4229bf218451b235e07583
|
a372a9b17c1f72409a99dd6498d2920d325106ed
|
refs/heads/develop
| 2020-06-26T19:41:16.544628
| 2019-07-30T14:31:20
| 2019-07-30T14:31:20
| 199,734,091
| 1
| 1
|
Apache-2.0
| 2019-07-30T22:07:38
| 2019-07-30T22:05:32
|
Java
|
UTF-8
|
Java
| false
| false
| 7,088
|
java
|
/*
*
* Paros and its related class files.
*
* Paros is an HTTP/HTTPS proxy for assessing web application security.
* Copyright (C) 2003-2004 Chinotec Technologies Company
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Clarified Artistic License
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Clarified Artistic License for more details.
*
* You should have received a copy of the Clarified Artistic License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// ZAP: 2011/05/15 i19n
// ZAP: 2012/02/18 Rationalised session handling
// ZAP: 2012/04/14 Changed the method initParam to discard all edits.
// ZAP: 2012/04/23 Added @Override annotation to all appropriate methods.
// ZAP: 2012/10/02 Issue 385: Added support for Contexts
// ZAP: 2015/02/05 Issue 1524: New Persist Session dialog
// ZAP: 2015/02/10 Issue 1528: Support user defined font size
// ZAP: 2017/01/09 Remove method no longer needed.
// ZAP: 2017/06/01 Issue 3555: setTitle() functionality moved in order to ensure consistent
// application
// ZAP: 2017/06/07 Don't close the Session when changing session's name/description.
// ZAP: 2019/06/01 Normalise line endings.
// ZAP: 2019/06/05 Normalise format/style.
package org.parosproxy.paros.view;
import java.awt.CardLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JLabel;
import javax.swing.JPanel;
import org.apache.log4j.Logger;
import org.parosproxy.paros.Constant;
import org.parosproxy.paros.control.Control;
import org.parosproxy.paros.model.Model;
import org.parosproxy.paros.model.Session;
import org.zaproxy.zap.utils.ZapTextArea;
import org.zaproxy.zap.utils.ZapTextField;
import org.zaproxy.zap.view.LayoutHelper;
public class SessionGeneralPanel extends AbstractParamPanel {
private static final long serialVersionUID = -8337361808959321380L;
private static final Logger LOGGER = Logger.getLogger(SessionGeneralPanel.class);
private JPanel panelSession = null; // @jve:decl-index=0:visual-constraint="10,320"
private ZapTextField txtSessionName = null;
private ZapTextArea txtDescription = null;
private ZapTextArea location = null;
public SessionGeneralPanel() {
super();
initialize();
}
/** This method initializes this */
private void initialize() {
this.setLayout(new CardLayout());
this.setName(Constant.messages.getString("session.general"));
this.add(getPanelSession(), getPanelSession().getName());
}
/**
* This method initializes panelSession
*
* @return javax.swing.JPanel
*/
private JPanel getPanelSession() {
if (panelSession == null) {
panelSession = new JPanel();
panelSession.setLayout(new GridBagLayout());
panelSession.setName(Constant.messages.getString("session.general"));
if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption()
== 0) {
panelSession.setSize(180, 101);
}
panelSession.add(
new JLabel(Constant.messages.getString("session.label.name")),
LayoutHelper.getGBC(0, 0, 1, 1.0D));
panelSession.add(
getTxtSessionName(),
LayoutHelper.getGBC(0, 1, 1, 1.0D, new Insets(2, 0, 2, 0)));
panelSession.add(
new JLabel(Constant.messages.getString("session.label.loc")),
LayoutHelper.getGBC(0, 2, 1, 1.0D));
panelSession.add(getSessionLocation(), LayoutHelper.getGBC(0, 3, 1, 1.0D));
panelSession.add(
new JLabel(Constant.messages.getString("session.label.desc")),
LayoutHelper.getGBC(0, 4, 1, 1.0D, new Insets(2, 0, 2, 0)));
panelSession.add(
getTxtDescription(),
LayoutHelper.getGBC(
0, 5, 1, 1.0D, 1.0D, GridBagConstraints.BOTH, new Insets(2, 0, 2, 0)));
}
return panelSession;
}
/**
* This method initializes txtSessionName
*
* @return org.zaproxy.zap.utils.ZapTextField
*/
private ZapTextField getTxtSessionName() {
if (txtSessionName == null) {
txtSessionName = new ZapTextField();
}
return txtSessionName;
}
/**
* This method initializes txtDescription
*
* @return org.zaproxy.zap.utils.ZapTextArea
*/
private ZapTextArea getTxtDescription() {
if (txtDescription == null) {
txtDescription = new ZapTextArea();
txtDescription.setBorder(
javax.swing.BorderFactory.createBevelBorder(
javax.swing.border.BevelBorder.LOWERED));
txtDescription.setLineWrap(true);
}
return txtDescription;
}
private ZapTextArea getSessionLocation() {
if (location == null) {
location = new ZapTextArea();
location.setEditable(false);
}
return location;
}
@Override
public void initParam(Object obj) {
Session session = (Session) obj;
getTxtSessionName().setText(session.getSessionName());
getTxtSessionName().discardAllEdits();
getTxtDescription().setText(session.getSessionDesc());
getTxtDescription().discardAllEdits();
if (session.getFileName() != null) {
getSessionLocation().setText(session.getFileName());
getSessionLocation().setToolTipText(session.getFileName()); // In case its really long
}
}
@Override
public void saveParam(Object obj) throws Exception {
Session session = (Session) obj;
boolean changed = false;
if (!getTxtSessionName().getText().equals(session.getSessionName())) {
session.setSessionName(getTxtSessionName().getText());
changed = true;
}
if (!getTxtDescription().getText().equals(session.getSessionDesc())) {
session.setSessionDesc(getTxtDescription().getText());
changed = true;
}
if (changed) {
try {
Control.getSingleton().persistSessionProperties();
} catch (Exception e) {
LOGGER.error("Failed to persist the session properties:", e);
throw new Exception(
Constant.messages.getString("session.general.error.persist.session.props"));
}
}
}
@Override
public String getHelpIndex() {
// ZAP: added help index support
return "ui.dialogs.sessprop";
}
} // @jve:decl-index=0:visual-constraint="10,10"
|
[
"thc202@gmail.com"
] |
thc202@gmail.com
|
c675e1567a7b7b69ed410ccc1814fb50b17b8480
|
d7c5121237c705b5847e374974b39f47fae13e10
|
/airspan.netspan/src/main/java/Netspan/NBI_16_0/Lte/EnbFromEcgiGet.java
|
7562eb368aab4bb2e0dade68889129a74ddc03c5
|
[] |
no_license
|
AirspanNetworks/SWITModules
|
8ae768e0b864fa57dcb17168d015f6585d4455aa
|
7089a4b6456621a3abd601cc4592d4b52a948b57
|
refs/heads/master
| 2022-11-24T11:20:29.041478
| 2020-08-09T07:20:03
| 2020-08-09T07:20:03
| 184,545,627
| 1
| 0
| null | 2022-11-16T12:35:12
| 2019-05-02T08:21:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,995
|
java
|
package Netspan.NBI_16_0.Lte;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Ecgi" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"ecgi"
})
@XmlRootElement(name = "EnbFromEcgiGet")
public class EnbFromEcgiGet {
@XmlElement(name = "Ecgi")
@XmlSchemaType(name = "unsignedLong")
protected List<BigInteger> ecgi;
/**
* Gets the value of the ecgi property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the ecgi property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getEcgi().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link BigInteger }
*
*
*/
public List<BigInteger> getEcgi() {
if (ecgi == null) {
ecgi = new ArrayList<BigInteger>();
}
return this.ecgi;
}
}
|
[
"build.Airspan.com"
] |
build.Airspan.com
|
3d04ea86f3d0b02051b4b207085d3e53323df032
|
a320ecb4b1de60c55169dd6fd26b84ca7cedd167
|
/rish/src/main/java/rikka/rish/RishService.java
|
59de15194568909cb93c8b243bda303ba07d1cb6
|
[
"MIT"
] |
permissive
|
RikkaApps/Shizuku-API
|
437c25f3f93962458c255a9db593df01c5297f0d
|
c42a5c81584dcfa6ca3fbe0bdb73d9d09323c2cb
|
refs/heads/master
| 2023-08-05T01:01:49.240233
| 2023-07-19T12:17:58
| 2023-07-19T12:17:58
| 328,887,217
| 481
| 102
|
MIT
| 2023-08-14T02:35:00
| 2021-01-12T05:57:54
|
Java
|
UTF-8
|
Java
| false
| false
| 4,451
|
java
|
package rikka.rish;
import android.os.Binder;
import android.os.IBinder;
import android.os.Parcel;
import android.os.ParcelFileDescriptor;
import android.system.Os;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.util.HashMap;
import java.util.Map;
public abstract class RishService {
private static final String TAG = "RishService";
private static final Map<Integer, RishHost> HOSTS = new HashMap<>();
private static final boolean IS_ROOT = Os.getuid() == 0;
private void createHost(
String[] args, String[] env, String dir,
byte tty,
ParcelFileDescriptor stdin, ParcelFileDescriptor stdout, ParcelFileDescriptor stderr) {
int callingPid = Binder.getCallingPid();
// Termux app set PATH and LD_PRELOAD to Termux's internal path.
// Adb does not have sufficient permissions to access such places.
// Under adb, users need to set RISH_PRESERVE_ENV=1 to preserve env.
// Under root, keep env unless RISH_PRESERVE_ENV=0 is set.
boolean allowEnv = IS_ROOT;
for (String e : env) {
if ("RISH_PRESERVE_ENV=1".equals(e)) {
allowEnv = true;
break;
} else if ("RISH_PRESERVE_ENV=0".equals(e)) {
allowEnv = false;
break;
}
}
if (!allowEnv) {
env = null;
}
RishHost host = new RishHost(args, env, dir, tty, stdin, stdout, stderr);
host.start();
Log.d(TAG, "Forked " + host.getPid());
HOSTS.put(callingPid, host);
}
private void setWindowSize(long size) {
int callingPid = Binder.getCallingPid();
RishHost host = HOSTS.get(callingPid);
if (host == null) {
Log.d(TAG, "Not existing host created by " + callingPid);
return;
}
host.setWindowSize(size);
}
private int getExitCode() {
int callingPid = Binder.getCallingPid();
RishHost host = HOSTS.get(callingPid);
if (host == null) {
Log.d(TAG, "Not existing host created by " + callingPid);
return -1;
}
return host.getExitCode();
}
public abstract void enforceCallingPermission(String func);
public boolean onTransact(int code, @NonNull Parcel data, @Nullable Parcel reply, int flags) {
if (code == RishConfig.getTransactionCode(RishConfig.TRANSACTION_createHost)) {
Log.d(TAG, "TRANSACTION_createHost");
enforceCallingPermission("createHost");
if (reply == null || (flags & IBinder.FLAG_ONEWAY) != 0) {
return true;
}
ParcelFileDescriptor stdin;
ParcelFileDescriptor stdout;
ParcelFileDescriptor stderr = null;
data.enforceInterface(RishConfig.getInterfaceToken());
byte tty = data.readByte();
stdin = data.readFileDescriptor();
stdout = data.readFileDescriptor();
if ((tty & RishConstants.ATTY_ERR) == 0) {
stderr = data.readFileDescriptor();
}
String[] args = data.createStringArray();
String[] env = data.createStringArray();
String dir = data.readString();
createHost(args, env, dir, tty, stdin, stdout, stderr);
reply.writeNoException();
return true;
} else if (code == RishConfig.getTransactionCode(RishConfig.TRANSACTION_setWindowSize)) {
Log.d(TAG, "TRANSACTION_setWindowSize");
enforceCallingPermission("setWindowSize");
data.enforceInterface(RishConfig.getInterfaceToken());
long size = data.readLong();
setWindowSize(size);
if (reply != null) {
reply.writeNoException();
}
return true;
} else if (code == RishConfig.getTransactionCode(RishConfig.TRANSACTION_getExitCode)) {
Log.d(TAG, "TRANSACTION_getExitCode");
enforceCallingPermission("getExitCode");
data.enforceInterface(RishConfig.getInterfaceToken());
int exitCode = getExitCode();
if (reply != null) {
reply.writeNoException();
reply.writeInt(exitCode);
}
return true;
}
return false;
}
}
|
[
"rikka@shizuku.moe"
] |
rikka@shizuku.moe
|
b116d82d2847735e12c5dd889265470f2423af1d
|
049e3518735f8251852f9499da5a1fedfc449799
|
/paymentPlatform2/build/generated/source/r/androidTest/debug/com/hentica/app/pay/test/R.java
|
ec8487ac69be2fb917245aee3431b9fbbd00b0a7
|
[] |
no_license
|
StoneInCHN/XGG-Android
|
d7225921e1baeeeb847de06bbbe810b6211899bb
|
563f83ca73818ee4d01fb6366803b7f057094d65
|
refs/heads/master
| 2021-07-18T01:25:39.115525
| 2017-10-27T04:54:03
| 2017-10-27T04:54:03
| 101,979,075
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,679
|
java
|
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.hentica.app.pay.test;
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int good0=0x7f020000;
public static final int good1=0x7f020001;
public static final int good2=0x7f020002;
public static final int good3=0x7f020003;
public static final int msp_demo_title=0x7f020004;
public static final int msp_demo_title_bg=0x7f020005;
public static final int msp_icon=0x7f020006;
}
public static final class id {
public static final int activity_null_transparent_layout=0x7f060000;
}
public static final class layout {
public static final int activity_null_transparent_layout=0x7f030000;
}
public static final class string {
public static final int apk=0x7f040000;
public static final int jar=0x7f040001;
public static final int payBYAPK=0x7f040002;
public static final int payBYJAR=0x7f040003;
}
public static final class style {
/**
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
*/
public static final int AppBaseTheme=0x7f050000;
/** All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f050001;
}
}
|
[
"zengqiang@yxsh-tech.com"
] |
zengqiang@yxsh-tech.com
|
7609447ffabbe8eb2453e93c1cf8804965c2f16a
|
2cf3f0dc5bb5a14ec847e254aa03ceca8d54ca8e
|
/StanfordPOS/src/com/aliasi/test/unit/sentences/SentenceChunkerTest.java
|
1758d579c4e9220f3d490ae1aea8861995ff4cff
|
[] |
no_license
|
manishc1/Security_Word_Similarity_Model
|
f2966c20290b1d4be841265dbf98a875301d8e46
|
6b9171bb7c7fa503662cca103b237bea19f36fdf
|
refs/heads/master
| 2021-01-01T20:00:40.011537
| 2014-06-07T23:38:12
| 2014-06-07T23:38:12
| 20,576,010
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,152
|
java
|
/*
* LingPipe v. 3.9
* Copyright (C) 2003-2010 Alias-i
*
* This program is licensed under the Alias-i Royalty Free License
* Version 1 WITHOUT ANY WARRANTY, without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Alias-i
* Royalty Free License Version 1 for more details.
*
* You should have received a copy of the Alias-i Royalty Free License
* Version 1 along with this program; if not, visit
* http://alias-i.com/lingpipe/licenses/lingpipe-license-1.txt or contact
* Alias-i, Inc. at 181 North 11th Street, Suite 401, Brooklyn, NY 11211,
* +1 (718) 290-9170.
*/
package com.aliasi.test.unit.sentences;
import com.aliasi.chunk.Chunk;
import com.aliasi.chunk.ChunkFactory;
import com.aliasi.sentences.IndoEuropeanSentenceModel;
import com.aliasi.sentences.SentenceChunker;
import com.aliasi.sentences.SentenceModel;
import com.aliasi.tokenizer.IndoEuropeanTokenizerFactory;
import com.aliasi.tokenizer.TokenizerFactory;
import com.aliasi.util.AbstractExternalizable;
import java.io.IOException;
import java.util.Set;
import java.util.LinkedHashSet;
import org.junit.Test;
import static junit.framework.Assert.assertEquals;
public class SentenceChunkerTest {
static final TokenizerFactory tf = new IndoEuropeanTokenizerFactory();
static final SentenceModel sm = new IndoEuropeanSentenceModel();
@Test
public void testSentenceChunks() throws IOException, ClassNotFoundException {
SentenceChunker sentenceChunker = new SentenceChunker(tf,sm);
// simple test
String[] sents = new String[] {
"John ran.",
"He saw Susan."
};
String[] whitespaces = new String[] {
" ",
" ",
""
};
assertChunks(sentenceChunker,sents,whitespaces);
// single sentence
sents = new String[] {
"His temperature was 99.5 and rising."
};
whitespaces = new String[] {
" ",
""
};
assertChunks(sentenceChunker,sents,whitespaces);
// no sentences
sents = new String[] {
};
whitespaces = new String[] {
""
};
assertChunks(sentenceChunker,sents,whitespaces);
// sample medline data
sents = new String[] {
"Transcription of the nirIX gene cluster itself was controlled by NNR, a member of the family of FNR-like transcriptional activators.",
"The NirI sequence corresponds to that of a membrane-bound protein with six transmembrane helices, a large periplasmic domain and cysteine-rich cytoplasmic domains that resemble the binding sites of [4Fe-4S] clusters in many ferredoxin-like proteins.",
"An NNR binding sequence is located in the middle of the intergenic region between the nirI and nirS genes with its centre located at position -41.5 relative to the transcription start sites of both genes.",
"In eight families we identified six novel MLH1 and two novel MSH2 mutations comprising one frame shift mutation (c.1420 del C), two missense mutations (L622H and R687W), two splice site mutations (c.1990-1 G>A and c.453+2 T>C and one nonsense mutation (K329X) in the MLH1 gene as well as two frame shift mutations (c.1979-1980 del AT and c.1704-1705 del AG) in the MSH2 gene."
};
whitespaces = new String[] {
" ",
" ",
" ",
" ",
""
};
assertChunks(sentenceChunker,sents,whitespaces);
}
void assertChunks(SentenceChunker sentenceChunker,
String[] sents, String[] whitespaces) throws IOException, ClassNotFoundException {
assertChunks1(sentenceChunker,sents,whitespaces);
@SuppressWarnings("unchecked")
SentenceChunker sentenceChunker2
= (SentenceChunker)
AbstractExternalizable.serializeDeserialize(sentenceChunker);
assertChunks1(sentenceChunker2,sents,whitespaces);
}
void assertChunks1(SentenceChunker sentenceChunker,
String[] sents, String[] whitespaces) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < sents.length; ++i) {
sb.append(whitespaces[i]);
sb.append(sents[i]);
}
sb.append(whitespaces[sents.length]);
String input = sb.toString();
char[] cs = input.toCharArray();
LinkedHashSet expectedChunks = new LinkedHashSet();
int end = 0;
int start = 0;
for (int i = 0; i < sents.length; ++i) {
start = end + whitespaces[i].length();
end = start + sents[i].length();
Chunk chunk
= ChunkFactory.createChunk(start,start+sents[i].length(),
SentenceChunker
.SENTENCE_CHUNK_TYPE);
expectedChunks.add(chunk);
}
Set foundChunks
= sentenceChunker.chunk(cs,0,input.length()).chunkSet();
assertEquals(expectedChunks,foundChunks);
}
}
|
[
"manishc1@umbc.edu"
] |
manishc1@umbc.edu
|
2265478f7830d2cd159ab35b62d3493cf0848710
|
8393780468d8d33a19d18f49f93ea0084a107feb
|
/src/org/traccar/protocol/XexunProtocol.java
|
47a7881a9ec35bae7cf00cb0710c582546f20fec
|
[
"Apache-2.0"
] |
permissive
|
shukia/traccar-unsafe
|
1a73879ac92f10d711246537bea2cd4665d9687c
|
2e149f3b05b61e4fd1b7ffc1c83ccfe41d6d19d5
|
refs/heads/master
| 2023-02-05T22:27:14.231495
| 2020-12-23T16:06:52
| 2020-12-23T16:06:52
| 323,945,854
| 0
| 0
|
Apache-2.0
| 2020-12-23T16:07:23
| 2020-12-23T16:06:23
|
Java
|
UTF-8
|
Java
| false
| false
| 2,059
|
java
|
/*
* Copyright 2015 - 2018 Anton Tananaev (anton@traccar.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.traccar.protocol;
import org.traccar.BaseProtocol;
import org.traccar.Context;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
import org.traccar.model.Command;
import io.netty.handler.codec.LineBasedFrameDecoder;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
import java.util.List;
public class XexunProtocol extends BaseProtocol {
public XexunProtocol() {
setSupportedDataCommands(
Command.TYPE_ENGINE_STOP,
Command.TYPE_ENGINE_RESUME);
}
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
serverList.add(new TrackerServer(false, getName()) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
boolean full = Context.getConfig().getBoolean(getName() + ".extended");
if (full) {
pipeline.addLast(new LineBasedFrameDecoder(1024)); // tracker bug \n\r
} else {
pipeline.addLast(new XexunFrameDecoder());
}
pipeline.addLast(new StringEncoder());
pipeline.addLast(new StringDecoder());
pipeline.addLast(new XexunProtocolEncoder());
pipeline.addLast(new XexunProtocolDecoder(XexunProtocol.this, full));
}
});
}
}
|
[
"shuki.avraham@whitesourcesoftware.com"
] |
shuki.avraham@whitesourcesoftware.com
|
a96a38f21ea31870ea8d697f5d946d7b185b85ef
|
7626c8fc8742859f369834eaab3a6120dd2c5f6f
|
/src/main/java/org/rcsb/cif/model/generated/PdbxTrnaInfo.java
|
775463899dd1f8725c5c1de34cf4e0d6ba6230e2
|
[
"MIT"
] |
permissive
|
BobHanson/ciftools-SwingJS
|
58c02723827c7c2b6e7716b7cd9c870076ce0f54
|
e5266a8bfe6e6d5feeab85dc97b0f67e6b0e2594
|
refs/heads/master
| 2020-09-12T10:28:07.592153
| 2019-11-29T21:18:43
| 2019-11-29T21:18:43
| 222,393,459
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,469
|
java
|
package org.rcsb.cif.model.generated;
import org.rcsb.cif.model.*;
import javax.annotation.Generated;
import java.util.Map;
/**
* Data items in the PDBX_TRNA_INFO category are still used until
* the 'entity' categories are entered into the database, even though the
* T-RNA is repeated.
*/
@Generated("org.rcsb.cif.generator.SchemaGenerator")
public class PdbxTrnaInfo extends BaseCategory {
public PdbxTrnaInfo(String name, Map<String, Column> columns) {
super(name, columns);
}
public PdbxTrnaInfo(String name, int rowCount, Object[] encodedColumns) {
super(name, rowCount, encodedColumns);
}
public PdbxTrnaInfo(String name) {
super(name);
}
/**
* Serial number.
* @return StrColumn
*/
public StrColumn getId() {
return (StrColumn) (isText ? textFields.computeIfAbsent("id", StrColumn::new) :
getBinaryColumn("id"));
}
/**
* Name of trna.
* @return StrColumn
*/
public StrColumn getName() {
return (StrColumn) (isText ? textFields.computeIfAbsent("name", StrColumn::new) :
getBinaryColumn("name"));
}
/**
* Number of trna molecules per asymmetric unit.
* @return IntColumn
*/
public IntColumn getNumPerAsymUnit() {
return (IntColumn) (isText ? textFields.computeIfAbsent("num_per_asym_unit", IntColumn::new) :
getBinaryColumn("num_per_asym_unit"));
}
}
|
[
"bittrich@hs-mittweida.de"
] |
bittrich@hs-mittweida.de
|
907b6a4070bbaac426c572a2138d6b73ad49c7f4
|
882e77219bce59ae57cbad7e9606507b34eebfcf
|
/mi2s_securitycenter_miui12/src/main/java/com/xiaomi/stat/z.java
|
2727e5b7e43369e2cd80d55fee6e296acab784e6
|
[] |
no_license
|
CrackerCat/XiaomiFramework
|
17a12c1752296fa1a52f61b83ecf165f328f4523
|
0b7952df317dac02ebd1feea7507afb789cef2e3
|
refs/heads/master
| 2022-06-12T03:30:33.285593
| 2020-05-06T11:30:54
| 2020-05-06T11:30:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 889
|
java
|
package com.xiaomi.stat;
import com.xiaomi.stat.a.l;
class z implements Runnable {
/* renamed from: a reason: collision with root package name */
final /* synthetic */ Throwable f8620a;
/* renamed from: b reason: collision with root package name */
final /* synthetic */ String f8621b;
/* renamed from: c reason: collision with root package name */
final /* synthetic */ boolean f8622c;
/* renamed from: d reason: collision with root package name */
final /* synthetic */ e f8623d;
z(e eVar, Throwable th, String str, boolean z) {
this.f8623d = eVar;
this.f8620a = th;
this.f8621b = str;
this.f8622c = z;
}
public void run() {
if (b.a() && this.f8623d.g(false)) {
e eVar = this.f8623d;
eVar.a(l.a(this.f8620a, this.f8621b, this.f8622c, eVar.f8570b));
}
}
}
|
[
"sanbo.xyz@gmail.com"
] |
sanbo.xyz@gmail.com
|
31dc62a4d4576ac33e75879abec04f9e47fa7d45
|
b4f2e2a9d51a7ae1e40d95f3bdf968ba4247c7c1
|
/app/src/main/java/com/brahamaputra/mahindra/brahamaputrajio/SignaturePadUtils/SvgPoint.java
|
b2064ce1a523b34f455972888d65fe524e451281
|
[] |
no_license
|
freelanceapp/BrahamaputraJio
|
9c0d8f3d244f32f4f36e25cf9e8384c78a6c038b
|
fdf5511e3bf682f60d01970d1ac4f0349b4e19b4
|
refs/heads/master
| 2020-06-18T07:15:29.340586
| 2019-05-16T07:31:26
| 2019-05-16T07:31:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,466
|
java
|
package com.brahamaputra.mahindra.brahamaputrajio.SignaturePadUtils;
/**
* Represent a point as it would be in the generated SVG document.
*/
class SvgPoint {
final Integer x, y;
public SvgPoint(TimedPoint point) {
// one optimisation is to get rid of decimals as they are mostly non-significant in the
// produced SVG image
x = Math.round(point.x);
y = Math.round(point.y);
}
public SvgPoint(int x, int y) {
this.x = x;
this.y = y;
}
public String toAbsoluteCoordinates() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(x);
stringBuilder.append(",");
stringBuilder.append(y);
return stringBuilder.toString();
}
public String toRelativeCoordinates(final SvgPoint referencePoint) {
return (new SvgPoint(x - referencePoint.x, y - referencePoint.y)).toString();
}
@Override
public String toString() {
return toAbsoluteCoordinates();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SvgPoint svgPoint = (SvgPoint) o;
if (!x.equals(svgPoint.x)) return false;
return y.equals(svgPoint.y);
}
@Override
public int hashCode() {
int result = x.hashCode();
result = 31 * result + y.hashCode();
return result;
}
}
|
[
"shashank.khochikar@gmail.com"
] |
shashank.khochikar@gmail.com
|
e8f53d8d40a1eccfa6d588d3bcd66f1d0115d724
|
7ff86fb5d426a9e2314292a28b719c4c3b0a897d
|
/src/com/yqx/dao/EduDao.java
|
3722750cf5f19da6990292fdb1d9dccad211989e
|
[] |
no_license
|
YangChingyuk/sm4.0
|
b2ac81b310d8af7a9cb7c336f2f8acc925901dd2
|
e93b4493bf2e00ba63e760555c3a73c10e260738
|
refs/heads/master
| 2020-04-26T21:26:56.915141
| 2019-03-05T00:16:42
| 2019-03-05T00:16:42
| 173,842,341
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,336
|
java
|
package com.yqx.dao;
import java.util.List;
import com.yqx.entity.Edu;
public interface EduDao {
/**
* 添加记录
*
* @param
*/
public void add(Edu edu);
/**
* 批量添加记录
*
* @param list
*/
public void addMore(List<Edu> list);
/**
* 根据主键删除记录
*
* @param id
*/
public void deleteById(int id);
/**
* 根据主键批量删除记录
*
* @param ids
*/
public void deleteMore(String ids);
/**
* 更新记录
*
* @param student
*/
public void update(Edu edu);
/**
* 根据主键查询单条记录
*
* @param id
* @return
*/
public Edu queryById(int id);
/**
* 查询所有记录
*
* @return
*/
public List<Edu> queryAll();
/**
* 分页查询记录
*
* @param currentPage
* @param pageSize
* @return
*/
public List<Edu> queryByPage(int currentPage, int pageSize);
/**
* 条件分页查询记录
*
* @param currentPage
* @param pageSize
* @return
*/
public List<Edu> queryByPage(int currentPage, int pageSize, String condition);
/**
* 获取总记录数
*
* @return
*/
public int getTotals();
/**
* 根据条件获取总记录数
*
* @return
*/
public int getTotals(String condition);
}
|
[
"Administrator@80DR054LIU0TTAN"
] |
Administrator@80DR054LIU0TTAN
|
937bfa819c93c5ce55c91db796187865ca693ead
|
ea2d22e859084a3f86e2b65295b9941005308680
|
/app/src/main/java/net/suntrans/powerpeace/bean/PayResult.java
|
fed758bcb70311098ca52dc6973ae8376354efea
|
[] |
no_license
|
luping1994/PowerPeace
|
d55af00cc410fc5966430fdda54d889106a6b221
|
1f26c3aa9ddf4e976f78ce2251fa2dfb4ad3d2be
|
refs/heads/master
| 2021-01-21T10:47:05.836013
| 2018-10-19T06:20:22
| 2018-10-19T06:20:22
| 101,985,717
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 265
|
java
|
package net.suntrans.powerpeace.bean;
/**
* Created by Looney on 2017/6/3.
*/
public class PayResult {
public PayResult(String msg, int code) {
this.msg = msg;
this.errorCode = code;
}
public String msg;
public int errorCode;
}
|
[
"250384247@qq.com"
] |
250384247@qq.com
|
7de9bcdd442a570680587659cc62383e64c857a7
|
ccf82688f082e26cba5fc397c76c77cc007ab2e8
|
/Mage/src/main/java/mage/abilities/common/CrewIncreasedPowerAbility.java
|
29411d66f74767d4d50de02f47ce4e23d9fd5c9f
|
[
"MIT"
] |
permissive
|
magefree/mage
|
3261a89320f586d698dd03ca759a7562829f247f
|
5dba61244c738f4a184af0d256046312ce21d911
|
refs/heads/master
| 2023-09-03T15:55:36.650410
| 2023-09-03T03:53:12
| 2023-09-03T03:53:12
| 4,158,448
| 1,803
| 1,133
|
MIT
| 2023-09-14T20:18:55
| 2012-04-27T13:18:34
|
Java
|
UTF-8
|
Java
| false
| false
| 722
|
java
|
package mage.abilities.common;
import mage.abilities.StaticAbility;
import mage.abilities.effects.common.InfoEffect;
import mage.constants.Zone;
/**
* @author TheElk801
*/
public class CrewIncreasedPowerAbility extends StaticAbility {
public CrewIncreasedPowerAbility() {
this("{this}");
}
public CrewIncreasedPowerAbility(String selfName) {
super(Zone.BATTLEFIELD, new InfoEffect(selfName + " crews Vehicles as though its power were 2 greater."));
}
private CrewIncreasedPowerAbility(final CrewIncreasedPowerAbility ability) {
super(ability);
}
@Override
public CrewIncreasedPowerAbility copy() {
return new CrewIncreasedPowerAbility(this);
}
}
|
[
"theelk801@gmail.com"
] |
theelk801@gmail.com
|
f21da50491a99016d809ab8ec17aeb968644202f
|
c84088fed6a7b4f392810bb166e66dbfe3df4286
|
/BackCRM/src/main/dao/impl/MessageDaoImpl.java
|
420690ad9eb4cb22a192ad90baac9e139ddf92e0
|
[] |
no_license
|
1Will/Work1
|
4c419b9013d2989c4bbe6721c155de609e5ce9b5
|
16e707588da13e9dede5f7de97ca53e15a7d5a78
|
refs/heads/master
| 2020-05-22T16:52:56.501596
| 2018-03-20T01:21:01
| 2018-03-20T01:21:01
| 84,697,600
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,716
|
java
|
package main.dao.impl;
import java.util.List;
import main.dao.MessageDao;
import main.pojo.Message;
import org.hibernate.Query;
import org.hibernate.Session;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
public class MessageDaoImpl extends HibernateDaoSupport implements MessageDao {
@Override
public void saveMessage(Message message) {
try {
this.getHibernateTemplate().save(message);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void updateMessage(Message message) {
try {
this.getHibernateTemplate().update(message);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void deleteMessage(Message message) {
try {
this.getHibernateTemplate().delete(message);
} catch (Exception e) {
e.printStackTrace();
}
}
@SuppressWarnings("unchecked")
@Override
public List<Message> getAllMessage(Long[] messageIds) {
String hql = "from Message m where m.id in (:alist)";
Query query = getSession().createQuery(hql);
query.setParameterList("alist", messageIds);
return this.getHibernateTemplate().find(hql);
}
@SuppressWarnings("unchecked")
@Override
public List<Message> getSomeMessage(){
String hql = "from Message";
Query query = getSession().createQuery(hql);
query.setFirstResult(0); //从第0条开始
query.setMaxResults(100);//一共取10条
return query.list();
}
@Override
public Message getMessageById(Long id) {
Message message = null;
try {
message = (Message) getSession().load(Message.class, id);
} catch (Exception e) {
e.printStackTrace();
}
return message;
}
@Override
public Session getSuperSession() {
return this.getSession(true);
}
}
|
[
"287463504@qq.com"
] |
287463504@qq.com
|
7c7745a8ecc1f9bb1fc4c638d0396e7dbfc43556
|
cca87c4ade972a682c9bf0663ffdf21232c9b857
|
/com/tencent/mm/plugin/game/c/bu.java
|
388e0f24ce6c35bdc40fb7337d9d631822698c8c
|
[] |
no_license
|
ZoranLi/wechat_reversing
|
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
|
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
|
refs/heads/master
| 2021-07-05T01:17:20.533427
| 2017-09-25T09:07:33
| 2017-09-25T09:07:33
| 104,726,592
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,629
|
java
|
package com.tencent.mm.plugin.game.c;
import com.tencent.mm.bd.a;
public final class bu extends a {
public String fDC;
public String muU;
protected final int a(int i, Object... objArr) {
if (i == 0) {
a.a.a.c.a aVar = (a.a.a.c.a) objArr[0];
if (this.muU != null) {
aVar.e(1, this.muU);
}
if (this.fDC == null) {
return 0;
}
aVar.e(2, this.fDC);
return 0;
} else if (i == 1) {
if (this.muU != null) {
r0 = a.a.a.b.b.a.f(1, this.muU) + 0;
} else {
r0 = 0;
}
if (this.fDC != null) {
r0 += a.a.a.b.b.a.f(2, this.fDC);
}
return r0;
} else if (i == 2) {
a.a.a.a.a aVar2 = new a.a.a.a.a((byte[]) objArr[0], unknownTagHandler);
for (r0 = a.a(aVar2); r0 > 0; r0 = a.a(aVar2)) {
if (!super.a(aVar2, this, r0)) {
aVar2.cid();
}
}
return 0;
} else if (i != 3) {
return -1;
} else {
a.a.a.a.a aVar3 = (a.a.a.a.a) objArr[0];
bu buVar = (bu) objArr[1];
switch (((Integer) objArr[2]).intValue()) {
case 1:
buVar.muU = aVar3.xmD.readString();
return 0;
case 2:
buVar.fDC = aVar3.xmD.readString();
return 0;
default:
return -1;
}
}
}
}
|
[
"lizhangliao@xiaohongchun.com"
] |
lizhangliao@xiaohongchun.com
|
6f884030d8558c3be09f9036405f61ebff7b6bec
|
2e9a86693b665b879c59b14dfd63c2c92acbf08a
|
/webconverter/decomiledJars/rt/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java
|
221e8d0dd082288461c831a2ab52baf8cd4ff336
|
[] |
no_license
|
shaikgsb/webproject-migration-code-java
|
9e2271255077025111e7ea3f887af7d9368c6933
|
3b17211e497658c61435f6c0e118b699e7aa3ded
|
refs/heads/master
| 2021-01-19T18:36:42.835783
| 2017-07-13T09:11:05
| 2017-07-13T09:11:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,659
|
java
|
package com.sun.xml.internal.ws.api.wsdl.parser;
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault;
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType;
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault;
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLInput;
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput;
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort;
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType;
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService;
import javax.xml.stream.XMLStreamReader;
public abstract class WSDLParserExtension
{
public WSDLParserExtension() {}
public void start(WSDLParserExtensionContext paramWSDLParserExtensionContext) {}
public void serviceAttributes(EditableWSDLService paramEditableWSDLService, XMLStreamReader paramXMLStreamReader) {}
public boolean serviceElements(EditableWSDLService paramEditableWSDLService, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void portAttributes(EditableWSDLPort paramEditableWSDLPort, XMLStreamReader paramXMLStreamReader) {}
public boolean portElements(EditableWSDLPort paramEditableWSDLPort, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public boolean portTypeOperationInput(EditableWSDLOperation paramEditableWSDLOperation, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public boolean portTypeOperationOutput(EditableWSDLOperation paramEditableWSDLOperation, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public boolean portTypeOperationFault(EditableWSDLOperation paramEditableWSDLOperation, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public boolean definitionsElements(XMLStreamReader paramXMLStreamReader)
{
return false;
}
public boolean bindingElements(EditableWSDLBoundPortType paramEditableWSDLBoundPortType, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void bindingAttributes(EditableWSDLBoundPortType paramEditableWSDLBoundPortType, XMLStreamReader paramXMLStreamReader) {}
public boolean portTypeElements(EditableWSDLPortType paramEditableWSDLPortType, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void portTypeAttributes(EditableWSDLPortType paramEditableWSDLPortType, XMLStreamReader paramXMLStreamReader) {}
public boolean portTypeOperationElements(EditableWSDLOperation paramEditableWSDLOperation, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void portTypeOperationAttributes(EditableWSDLOperation paramEditableWSDLOperation, XMLStreamReader paramXMLStreamReader) {}
public boolean bindingOperationElements(EditableWSDLBoundOperation paramEditableWSDLBoundOperation, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void bindingOperationAttributes(EditableWSDLBoundOperation paramEditableWSDLBoundOperation, XMLStreamReader paramXMLStreamReader) {}
public boolean messageElements(EditableWSDLMessage paramEditableWSDLMessage, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void messageAttributes(EditableWSDLMessage paramEditableWSDLMessage, XMLStreamReader paramXMLStreamReader) {}
public boolean portTypeOperationInputElements(EditableWSDLInput paramEditableWSDLInput, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void portTypeOperationInputAttributes(EditableWSDLInput paramEditableWSDLInput, XMLStreamReader paramXMLStreamReader) {}
public boolean portTypeOperationOutputElements(EditableWSDLOutput paramEditableWSDLOutput, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void portTypeOperationOutputAttributes(EditableWSDLOutput paramEditableWSDLOutput, XMLStreamReader paramXMLStreamReader) {}
public boolean portTypeOperationFaultElements(EditableWSDLFault paramEditableWSDLFault, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void portTypeOperationFaultAttributes(EditableWSDLFault paramEditableWSDLFault, XMLStreamReader paramXMLStreamReader) {}
public boolean bindingOperationInputElements(EditableWSDLBoundOperation paramEditableWSDLBoundOperation, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void bindingOperationInputAttributes(EditableWSDLBoundOperation paramEditableWSDLBoundOperation, XMLStreamReader paramXMLStreamReader) {}
public boolean bindingOperationOutputElements(EditableWSDLBoundOperation paramEditableWSDLBoundOperation, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void bindingOperationOutputAttributes(EditableWSDLBoundOperation paramEditableWSDLBoundOperation, XMLStreamReader paramXMLStreamReader) {}
public boolean bindingOperationFaultElements(EditableWSDLBoundFault paramEditableWSDLBoundFault, XMLStreamReader paramXMLStreamReader)
{
return false;
}
public void bindingOperationFaultAttributes(EditableWSDLBoundFault paramEditableWSDLBoundFault, XMLStreamReader paramXMLStreamReader) {}
public void finished(WSDLParserExtensionContext paramWSDLParserExtensionContext) {}
public void postFinished(WSDLParserExtensionContext paramWSDLParserExtensionContext) {}
}
|
[
"Subbaraju.Gadiraju@Lnttechservices.com"
] |
Subbaraju.Gadiraju@Lnttechservices.com
|
8a936638b39dac6588dd959d487c1c75e42982fa
|
05e5bee54209901d233f4bfa425eb6702970d6ab
|
/net/minecraft/server/v1_7_R4/CommandNetstat.java
|
315e88ca4e5abf3aebc1253f27be1a099bc3d9af
|
[] |
no_license
|
TheShermanTanker/PaperSpigot-1.7.10
|
23f51ff301e7eb05ef6a3d6999dd2c62175c270f
|
ea9d33bcd075e00db27b7f26450f9dc8e6d18262
|
refs/heads/master
| 2022-12-24T10:32:09.048106
| 2020-09-25T15:43:22
| 2020-09-25T15:43:22
| 298,614,646
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,714
|
java
|
/* */ package net.minecraft.server.v1_7_R4;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class CommandNetstat
/* */ extends CommandAbstract
/* */ {
/* */ public String getCommand() {
/* 13 */ return "netstat";
/* */ }
/* */
/* */
/* */ public int a() {
/* 18 */ return 0;
/* */ }
/* */
/* */
/* */ public String c(ICommandListener paramICommandListener) {
/* 23 */ return "commands.players.usage";
/* */ }
/* */
/* */
/* */ public void execute(ICommandListener paramICommandListener, String[] paramArrayOfString) {
/* 28 */ if (paramICommandListener instanceof EntityHuman) {
/* 29 */ paramICommandListener.sendMessage(new ChatComponentText("Command is not available for players"));
/* */
/* */ return;
/* */ }
/* 33 */ if (paramArrayOfString.length > 0 && paramArrayOfString[0].length() > 1) {
/* 34 */ if ("hottest-read".equals(paramArrayOfString[0])) {
/* 35 */ paramICommandListener.sendMessage(new ChatComponentText(NetworkManager.h.e().toString()));
/* 36 */ } else if ("hottest-write".equals(paramArrayOfString[0])) {
/* 37 */ paramICommandListener.sendMessage(new ChatComponentText(NetworkManager.h.g().toString()));
/* 38 */ } else if ("most-read".equals(paramArrayOfString[0])) {
/* 39 */ paramICommandListener.sendMessage(new ChatComponentText(NetworkManager.h.f().toString()));
/* 40 */ } else if ("most-write".equals(paramArrayOfString[0])) {
/* 41 */ paramICommandListener.sendMessage(new ChatComponentText(NetworkManager.h.h().toString()));
/* 42 */ } else if ("packet-read".equals(paramArrayOfString[0])) {
/* 43 */ if (paramArrayOfString.length > 1 && paramArrayOfString[1].length() > 0) {
/* */ try {
/* 45 */ int i = Integer.parseInt(paramArrayOfString[1].trim());
/* 46 */ PacketStatistics packetStatistics = NetworkManager.h.a(i);
/* 47 */ a(paramICommandListener, i, packetStatistics);
/* 48 */ } catch (Exception exception) {
/* 49 */ paramICommandListener.sendMessage(new ChatComponentText("Packet " + paramArrayOfString[1] + " not found!"));
/* */ }
/* */ } else {
/* 52 */ paramICommandListener.sendMessage(new ChatComponentText("Packet id is missing"));
/* */ }
/* 54 */ } else if ("packet-write".equals(paramArrayOfString[0])) {
/* 55 */ if (paramArrayOfString.length > 1 && paramArrayOfString[1].length() > 0) {
/* */ try {
/* 57 */ int i = Integer.parseInt(paramArrayOfString[1].trim());
/* 58 */ PacketStatistics packetStatistics = NetworkManager.h.b(i);
/* 59 */ a(paramICommandListener, i, packetStatistics);
/* 60 */ } catch (Exception exception) {
/* 61 */ paramICommandListener.sendMessage(new ChatComponentText("Packet " + paramArrayOfString[1] + " not found!"));
/* */ }
/* */ } else {
/* 64 */ paramICommandListener.sendMessage(new ChatComponentText("Packet id is missing"));
/* */ }
/* 66 */ } else if ("read-count".equals(paramArrayOfString[0])) {
/* 67 */ paramICommandListener.sendMessage(new ChatComponentText("total-read-count" + String.valueOf(NetworkManager.h.c())));
/* 68 */ } else if ("write-count".equals(paramArrayOfString[0])) {
/* 69 */ paramICommandListener.sendMessage(new ChatComponentText("total-write-count" + String.valueOf(NetworkManager.h.d())));
/* */ } else {
/* 71 */ paramICommandListener.sendMessage(new ChatComponentText("Unrecognized: " + paramArrayOfString[0]));
/* */ }
/* */ } else {
/* 74 */ String str = "reads: " + NetworkManager.h.a();
/* 75 */ str = str + ", writes: " + NetworkManager.h.b();
/* 76 */ paramICommandListener.sendMessage(new ChatComponentText(str));
/* */ }
/* */ }
/* */
/* */ private void a(ICommandListener paramICommandListener, int paramInt, PacketStatistics paramPacketStatistics) {
/* 81 */ if (paramPacketStatistics != null) {
/* 82 */ paramICommandListener.sendMessage(new ChatComponentText(paramPacketStatistics.toString()));
/* */ } else {
/* 84 */ paramICommandListener.sendMessage(new ChatComponentText("Packet " + paramInt + " not found!"));
/* */ }
/* */ }
/* */ }
/* Location: D:\Paper-1.7.10\PaperSpigot-1.7.10-R0.1-SNAPSHOT-latest.jar!\net\minecraft\server\v1_7_R4\CommandNetstat.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/
|
[
"tanksherman27@gmail.com"
] |
tanksherman27@gmail.com
|
314d50c819c951a3d241892be701982a115cad30
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/no_seeding/81_javathena-org.javathena.core.data.Skill-1.0-6/org/javathena/core/data/Skill_ESTest.java
|
3b15b37a4e781b5fa7d19427bf26d6fd16168b64
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 639
|
java
|
/*
* This file was automatically generated by EvoSuite
* Mon Oct 28 19:53:34 GMT 2019
*/
package org.javathena.core.data;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class Skill_ESTest extends Skill_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
cff31636e42a56b7a425005c90e27916bd1e966d
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_20057.java
|
f1e3d8d1eea5385b3c5c849a89945210a5622999
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,013
|
java
|
@Override protected void onSuccess(@Nullable Bitmap originalCameraImage,@NonNull FirebaseVisionDocumentText text,@NonNull FrameMetadata frameMetadata,@NonNull GraphicOverlay graphicOverlay){
graphicOverlay.clear();
Log.d(TAG,"detected text is: " + text.getText());
List<FirebaseVisionDocumentText.Block> blocks=text.getBlocks();
for (int i=0; i < blocks.size(); i++) {
List<FirebaseVisionDocumentText.Paragraph> paragraphs=blocks.get(i).getParagraphs();
for (int j=0; j < paragraphs.size(); j++) {
List<FirebaseVisionDocumentText.Word> words=paragraphs.get(j).getWords();
for (int l=0; l < words.size(); l++) {
List<FirebaseVisionDocumentText.Symbol> symbols=words.get(l).getSymbols();
for (int m=0; m < symbols.size(); m++) {
CloudDocumentTextGraphic cloudDocumentTextGraphic=new CloudDocumentTextGraphic(graphicOverlay,symbols.get(m));
graphicOverlay.add(cloudDocumentTextGraphic);
}
}
}
}
graphicOverlay.postInvalidate();
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
fc86d985e62039eccd84dde1683a9468293a5969
|
f7f9d7fa841e856927e02513ecc74dc00c935f8a
|
/server/src/main/java/org/codelibs/fesen/script/GeneralScriptException.java
|
e6c04117fff21983d8fda2d35956b015cb92f19b
|
[
"CDDL-1.0",
"MIT",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LGPL-2.1-only",
"NAIST-2003",
"LicenseRef-scancode-generic-export-compliance",
"ICU",
"SunPro",
"Python-2.0",
"CC-BY-SA-3.0",
"MPL-1.1",
"GPL-2.0-only",
"CPL-1.0",
"LicenseRef-scancode-other-copyleft",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"CC-PDDC",
"BSD-2-Clause",
"LicenseRef-scancode-unicode-mappings",
"LicenseRef-scancode-unicode",
"CC0-1.0",
"Apache-1.1",
"EPL-1.0",
"Classpath-exception-2.0"
] |
permissive
|
codelibs/fesen
|
3f949fd3533e8b25afc3d3475010d1b1a0d95c09
|
b2440fbda02e32f7abe77d2be95ead6a16c8af06
|
refs/heads/main
| 2022-07-27T21:14:02.455938
| 2021-12-21T23:54:20
| 2021-12-21T23:54:20
| 330,334,670
| 4
| 0
|
Apache-2.0
| 2022-05-17T01:54:31
| 2021-01-17T07:07:56
|
Java
|
UTF-8
|
Java
| false
| false
| 1,710
|
java
|
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch 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.codelibs.fesen.script;
import java.io.IOException;
import org.codelibs.fesen.FesenException;
import org.codelibs.fesen.common.io.stream.StreamInput;
/**
* Simple exception class from a script.
* <p>
* Use of this exception should generally be avoided, it doesn't provide
* much context or structure to users trying to debug scripting when
* things go wrong.
* @deprecated Use ScriptException for exceptions from the scripting engine,
* otherwise use a more appropriate exception (e.g. if thrown
* from various abstractions)
*/
@Deprecated
public class GeneralScriptException extends FesenException {
public GeneralScriptException(String msg) {
super(msg);
}
public GeneralScriptException(String msg, Throwable cause) {
super(msg, cause);
}
public GeneralScriptException(StreamInput in) throws IOException{
super(in);
}
}
|
[
"shinsuke@apache.org"
] |
shinsuke@apache.org
|
0cdd73f95d5c886b08b42a383cb2b7bd949efc2c
|
2903eadab6dad7e8d66462b9647f4baacfeababa
|
/day180327/src/com/sum/HapMain.java
|
6e1cbf7585ae7320f7cb84237e44c0c2589674fc
|
[] |
no_license
|
swchod1/multicampus_javaworkspace
|
53f9f811d2beac15dc3f11354b7c55fc70ed4e47
|
1c2296836a3fc50190df9c16f19ae353a382981c
|
refs/heads/master
| 2023-01-21T16:08:33.085840
| 2020-11-30T13:40:10
| 2020-11-30T13:40:10
| 316,420,968
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 244
|
java
|
package com.sum;
public class HapMain {
public static void main(String[] args) {
// TODO Auto-generated method stub
Hap ha = new Hap();
ha.input(); // 입력
int s = ha.sum(); // 연산
ha.write(s); // 출력
}
}
|
[
"swchod1@gmail.com"
] |
swchod1@gmail.com
|
47afdf77d210f2149b919aa215412779d1d31293
|
81382551cea049fa53136a38df6f376d8e62449e
|
/lottery-manager-system/src/main/java/com/manager/bean/DeclareConsumableBean.java
|
607f714ad1b0e295b788d74da77c3dca2c6540a9
|
[] |
no_license
|
yangdonghui/LotteryManagerSystemPro
|
caf07d60b00199e3329498b16cf0746a71c353f0
|
c527fcda2b72b741b30e3a5a1f66fbd0f684add5
|
refs/heads/master
| 2021-01-11T04:21:55.492005
| 2016-10-18T02:25:44
| 2016-10-18T02:25:44
| 71,200,515
| 4
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,977
|
java
|
package com.manager.bean;
/**
* 耗材申报 属性
* @author donghuiyang
* @create time 2016/6/28 0028.
*/
public class DeclareConsumableBean extends BaseBean{
public DeclareConsumableBean(String id,
int parentType,
String parentTypeInfo,
int childType,
String childTypeInfo,
String time,
String info,
int num){
this.id = id;
this.parentType = parentType;
this.declareParentType = parentTypeInfo;
this.childType = childType;
this.declareChildType = childTypeInfo;
this.declareTime = time;
this.declareInfo = info;
this.num = num;
}
public String getId() {
return id;
}
public DeclareConsumableBean setId(String id) {
this.id = id;
return this;
}
public int getParentType() {
return parentType;
}
public DeclareConsumableBean setParentType(int parentType) {
this.parentType = parentType;
return this;
}
public String getDeclareParentType() {
return declareParentType;
}
public DeclareConsumableBean setDeclareParentType(String declareParentType) {
this.declareParentType = declareParentType;
return this;
}
public int getChildType() {
return childType;
}
public DeclareConsumableBean setChildType(int childType) {
this.childType = childType;
return this;
}
public String getDeclareChildType() {
return declareChildType;
}
public DeclareConsumableBean setDeclareChildType(String declareChildType) {
this.declareChildType = declareChildType;
return this;
}
public String getDeclareTime() {
return declareTime;
}
public DeclareConsumableBean setDeclareTime(String declareTime) {
this.declareTime = declareTime;
return this;
}
public String getDeclareInfo() {
return declareInfo;
}
public DeclareConsumableBean setDeclareInfo(String declareInfo) {
this.declareInfo = declareInfo;
return this;
}
public int getNum() {
return num;
}
public DeclareConsumableBean setNum(int num) {
this.num = num;
return this;
}
public int getPrice() {
return price;
}
public DeclareConsumableBean setPrice(int price) {
this.price = price;
return this;
}
private String id;
private int parentType;
//申报分类
private String declareParentType = "";
private int childType;
//类型
private String declareChildType = "";
//期望日期
private String declareTime = "";
//备注
private String declareInfo = "";
private int num;
private int price = 0;
}
|
[
"123456"
] |
123456
|
e3af647e26781e62517779ee9427001a05df6987
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/127/222/CWE129_Improper_Validation_of_Array_Index__URLConnection_array_write_no_check_67a.java
|
48d950ef068925734535b30896a0d92883d91662
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 7,529
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE129_Improper_Validation_of_Array_Index__URLConnection_array_write_no_check_67a.java
Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml
Template File: sources-sinks-67a.tmpl.java
*/
/*
* @description
* CWE: 129 Improper Validation of Array Index
* BadSource: URLConnection Read data from a web server with URLConnection
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: array_write_no_check
* GoodSink: Write to array after verifying index
* BadSink : Write to array without any verification of index
* Flow Variant: 67 Data flow: data passed in a class from one method to another in different source files in the same package
*
* */
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import java.util.logging.Level;
public class CWE129_Improper_Validation_of_Array_Index__URLConnection_array_write_no_check_67a extends AbstractTestCase
{
static class Container
{
public int containerOne;
}
public void bad() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
/* read input from URLConnection */
{
URLConnection urlConnection = (new URL("http://www.example.org/")).openConnection();
BufferedReader readerBuffered = null;
InputStreamReader readerInputStream = null;
try
{
readerInputStream = new InputStreamReader(urlConnection.getInputStream(), "UTF-8");
readerBuffered = new BufferedReader(readerInputStream);
/* POTENTIAL FLAW: Read data from a web server with URLConnection */
/* This will be reading the first "line" of the response body,
* which could be very long if there are no newlines in the HTML */
String stringNumber = readerBuffered.readLine();
if (stringNumber != null) // avoid NPD incidental warnings
{
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch (NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat);
}
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
finally
{
/* clean up stream reading objects */
try
{
if (readerBuffered != null)
{
readerBuffered.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO);
}
try
{
if (readerInputStream != null)
{
readerInputStream.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO);
}
}
}
Container dataContainer = new Container();
dataContainer.containerOne = data;
(new CWE129_Improper_Validation_of_Array_Index__URLConnection_array_write_no_check_67b()).badSink(dataContainer );
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* 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;
Container dataContainer = new Container();
dataContainer.containerOne = data;
(new CWE129_Improper_Validation_of_Array_Index__URLConnection_array_write_no_check_67b()).goodG2BSink(dataContainer );
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
/* read input from URLConnection */
{
URLConnection urlConnection = (new URL("http://www.example.org/")).openConnection();
BufferedReader readerBuffered = null;
InputStreamReader readerInputStream = null;
try
{
readerInputStream = new InputStreamReader(urlConnection.getInputStream(), "UTF-8");
readerBuffered = new BufferedReader(readerInputStream);
/* POTENTIAL FLAW: Read data from a web server with URLConnection */
/* This will be reading the first "line" of the response body,
* which could be very long if there are no newlines in the HTML */
String stringNumber = readerBuffered.readLine();
if (stringNumber != null) // avoid NPD incidental warnings
{
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch (NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat);
}
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
finally
{
/* clean up stream reading objects */
try
{
if (readerBuffered != null)
{
readerBuffered.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO);
}
try
{
if (readerInputStream != null)
{
readerInputStream.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO);
}
}
}
Container dataContainer = new Container();
dataContainer.containerOne = data;
(new CWE129_Improper_Validation_of_Array_Index__URLConnection_array_write_no_check_67b()).goodB2GSink(dataContainer );
}
/* 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);
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
d0756c9971bb9f3c733c45d81afc4f6cd15134fb
|
f567c98cb401fc7f6ad2439cd80c9bcb45e84ce9
|
/src/main/java/com/alipay/api/domain/AlipaySecurityProdCtidVerifyModel.java
|
dada7b30db8721cd24dec2096c76fc95fc0eda87
|
[
"Apache-2.0"
] |
permissive
|
XuYingJie-cmd/alipay-sdk-java-all
|
0887fa02f857dac538e6ea7a72d4d9279edbe0f3
|
dd18a679f7543a65f8eba2467afa0b88e8ae5446
|
refs/heads/master
| 2023-07-15T23:01:02.139231
| 2021-09-06T07:57:09
| 2021-09-06T07:57:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,316
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 网证验证接口
*
* @author auto create
* @since 1.0, 2019-01-14 14:46:41
*/
public class AlipaySecurityProdCtidVerifyModel extends AlipayObject {
private static final long serialVersionUID = 4656848781322447934L;
/**
* 身份证号码
*/
@ApiField("id_number")
private String idNumber;
/**
* 认证模式
*/
@ApiField("identify_model")
private String identifyModel;
/**
* 图片的base64编码
*/
@ApiField("picture")
private String picture;
/**
* 个人用户姓名
*/
@ApiField("user_name")
private String userName;
public String getIdNumber() {
return this.idNumber;
}
public void setIdNumber(String idNumber) {
this.idNumber = idNumber;
}
public String getIdentifyModel() {
return this.identifyModel;
}
public void setIdentifyModel(String identifyModel) {
this.identifyModel = identifyModel;
}
public String getPicture() {
return this.picture;
}
public void setPicture(String picture) {
this.picture = picture;
}
public String getUserName() {
return this.userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
a3b1e95b8f235b48bb078fa0e8518ca4a0db5a06
|
c22e314eb8b33bb7823f72653e931f82e5ac4175
|
/org.dbdoclet.tag/src/main/java/org/dbdoclet/tag/html/Center.java
|
df27ab3bdc4462b4d03d209930931f241243bab7
|
[] |
no_license
|
mfuchs23/markup
|
5239a0448ef07deb8df5751d1e2e9666cdf1501e
|
af0d1610a1be93c4f1f3bda8ee1e6d9e66cbeaa2
|
refs/heads/master
| 2023-06-24T15:50:15.997213
| 2023-06-07T10:45:48
| 2023-06-07T10:45:48
| 22,429,612
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 427
|
java
|
/*
* ### Copyright (C) 2008 Michael Fuchs ###
* ### All Rights Reserved. ###
*
* Author: Michael Fuchs
* E-Mail: michael.fuchs@dbdoclet.org
* URL: http://www.michael-a-fuchs.de
*/
package org.dbdoclet.tag.html;
public class Center extends Inline2Element {
private static final String tag = "center";
public Center() {
setNodeName(tag);
setFormatType(FORMAT_BLOCK);
}
}
|
[
"michael.fuchs@dbdoclet.org"
] |
michael.fuchs@dbdoclet.org
|
5848a0a488947e5b9d7e7d55b31dfe016e1b8084
|
48ae8e24dfe5a8e099eb1ce2d14c9a24f48975cc
|
/Product/Production/Services/DocumentSubmissionCore/src/main/java/gov/hhs/fha/nhinc/docsubmission/entity/OutboundDocSubmissionOrchestrationContextBuilder.java
|
d5c17970e79e624e6a9b9746bd6343b7104a5d48
|
[
"BSD-3-Clause"
] |
permissive
|
CONNECT-Continuum/Continuum
|
f12394db3cc8b794fdfcb2cb3224e4a89f23c9d5
|
23acf3ea144c939905f82c59ffeff221efd9cc68
|
refs/heads/master
| 2022-12-16T15:04:50.675762
| 2019-09-07T16:14:08
| 2019-09-07T16:14:08
| 206,986,335
| 0
| 0
|
NOASSERTION
| 2022-12-05T23:32:14
| 2019-09-07T15:18:59
|
Java
|
UTF-8
|
Java
| false
| false
| 3,717
|
java
|
/*
* Copyright (c) 2009-2019, United States Government, as represented by the Secretary of Health and Human Services.
* 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 United States Government nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE UNITED STATES GOVERNMENT 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 gov.hhs.fha.nhinc.docsubmission.entity;
import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType;
import gov.hhs.fha.nhinc.common.nhinccommon.NhinTargetSystemType;
import gov.hhs.fha.nhinc.orchestration.OrchestrationContext;
import gov.hhs.fha.nhinc.orchestration.OrchestrationContextBuilder;
import gov.hhs.fha.nhinc.orchestration.OutboundDelegate;
import gov.hhs.fha.nhinc.orchestration.OutboundOrchestratable;
import ihe.iti.xds_b._2007.ProvideAndRegisterDocumentSetRequestType;
/**
*
* @author zmelnick
*/
public abstract class OutboundDocSubmissionOrchestrationContextBuilder implements OrchestrationContextBuilder {
private AssertionType assertionType;
private OutboundDelegate nhinDelegate;
private ProvideAndRegisterDocumentSetRequestType request;
private NhinTargetSystemType target;
@Override
public abstract OrchestrationContext build();
public void init(OutboundOrchestratable message) {
setAssertionType(message.getAssertion());
setRequest(((OutboundDocSubmissionOrchestratable) message).getRequest());
setTarget(((OutboundDocSubmissionOrchestratable) message).getTarget());
setNhinDelegate(((OutboundDocSubmissionOrchestratable) message).getNhinDelegate());
}
public AssertionType getAssertionType() {
return assertionType;
}
public void setAssertionType(AssertionType assertionType) {
this.assertionType = assertionType;
}
public OutboundDelegate getNhinDelegate() {
return nhinDelegate;
}
public void setNhinDelegate(OutboundDelegate nhinDelegate) {
this.nhinDelegate = nhinDelegate;
}
public ProvideAndRegisterDocumentSetRequestType getRequest() {
return request;
}
public void setRequest(ProvideAndRegisterDocumentSetRequestType request) {
this.request = request;
}
public NhinTargetSystemType getTarget() {
return target;
}
public void setTarget(NhinTargetSystemType target) {
this.target = target;
}
}
|
[
"minh-hai.nguyen@cgi.com"
] |
minh-hai.nguyen@cgi.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.